From 01be0d63d55b34d35caf64bfcff64f8477693fdd Mon Sep 17 00:00:00 2001 From: Mark Hodgkinson <m.hodgkinson@sheffield.ac.uk> Date: Wed, 17 Jan 2018 11:52:47 +0000 Subject: [PATCH 001/562] Migrate m_floatCompressionFactor and maxIntSize to be const static, as requested in ATLJETMET-882. Former-commit-id: 9e64ac9f60ec2b4f5517cd7de8af3d3e63b1620f --- Event/xAOD/xAODPFlow/Root/PFO_v1.cxx | 6 +++--- Event/xAOD/xAODPFlow/xAODPFlow/versions/PFO_v1.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Event/xAOD/xAODPFlow/Root/PFO_v1.cxx b/Event/xAOD/xAODPFlow/Root/PFO_v1.cxx index 129ec2fe404c..ce4b392c357b 100644 --- a/Event/xAOD/xAODPFlow/Root/PFO_v1.cxx +++ b/Event/xAOD/xAODPFlow/Root/PFO_v1.cxx @@ -43,11 +43,11 @@ namespace xAOD { }; PFO_v1::PFO_v1() - : IParticle(), m_p4(), m_p4Cached( false ), m_p4EM(), m_p4EMCached(false), m_floatCompressionFactor(1000) { + : IParticle(), m_p4(), m_p4Cached( false ), m_p4EM(), m_p4EMCached(false) { } - PFO_v1::PFO_v1(const PFO_v1& other) : IParticle(), m_p4(), m_p4Cached( false ), m_p4EM(), m_p4EMCached(false), m_floatCompressionFactor(1000) { + PFO_v1::PFO_v1(const PFO_v1& other) : IParticle(), m_p4(), m_p4Cached( false ), m_p4EM(), m_p4EMCached(false) { this->makePrivateStore(other); } @@ -282,7 +282,7 @@ namespace xAOD { template<> void PFO_v1::setAttribute(PFODetails::PFOAttributes AttributeType, const float& anAttribute) { if (this->isJetETMissFloatForCompression(AttributeType)){ float dummy = anAttribute*m_floatCompressionFactor; - int maxIntSize = 1000000000; + const static int maxIntSize = 1000000000; int internalAttribute = maxIntSize; if (dummy < 0) internalAttribute *= -1;//if we had a large -ve energy, then we should set the max size to a -ve value if (dummy < maxIntSize && dummy > -maxIntSize) internalAttribute = static_cast<int>(dummy); diff --git a/Event/xAOD/xAODPFlow/xAODPFlow/versions/PFO_v1.h b/Event/xAOD/xAODPFlow/xAODPFlow/versions/PFO_v1.h index 789300762b6f..f9c4e0f2d18b 100644 --- a/Event/xAOD/xAODPFlow/xAODPFlow/versions/PFO_v1.h +++ b/Event/xAOD/xAODPFlow/xAODPFlow/versions/PFO_v1.h @@ -190,7 +190,7 @@ namespace xAOD { /** bool to track whether we have cached EM 4-vector - mutable so it can be set in non-const getter function */ mutable bool m_p4EMCached; /** this defines the factor to compress floats by */ - int m_floatCompressionFactor; + const static int m_floatCompressionFactor = 1000; }; // class PFO -- GitLab From 7a9fef99dae4d25050293978a9ddba665c009a8c Mon Sep 17 00:00:00 2001 From: Jochen Meyer <Jochen.Meyer@cern.ch> Date: Sat, 12 May 2018 22:46:21 +0200 Subject: [PATCH 002/562] manual sweep of !11238 from rel 21.3 random cleaning in muon code Just some random cleaning in muon code (like removing unnecessary includes, migration to log macro, fixing compiler warnings ...) while watching movie. Former-commit-id: b1f77a1895811ca94fd037f7e1d6cbadd88c62c2 --- .../RPC_Digitization/RpcDigitizationTool.h | 1 - .../sTGC_Digitization/sTgcDigitizationTool.h | 1 - .../src/sTgcDigitizationTool.cxx | 14 +-- .../MuonIdHelpersAlgs/CscHashId.h | 2 - .../MuonIdHelpersAlgs/TestMuonIdHelpers.h | 1 - .../MuonIdHelpersAlgs/src/CscHashId.cxx | 14 +-- .../src/TestMuonIdHelpers.cxx | 20 +--- .../MuonTGMeasAssocAlg/MuonTGMeasAssocAlg.h | 10 +- .../RpcClusterization/RpcClusterBuilderPRD.h | 11 +- .../src/RpcClusterBuilderPRD.cxx | 103 +++++------------- .../MuonHoughPatternTool.h | 2 - .../src/MuonLayerHoughAlg.h | 5 - 12 files changed, 41 insertions(+), 143 deletions(-) diff --git a/MuonSpectrometer/MuonDigitization/RPC_Digitization/RPC_Digitization/RpcDigitizationTool.h b/MuonSpectrometer/MuonDigitization/RPC_Digitization/RPC_Digitization/RpcDigitizationTool.h index f872e5c18bdc..17d2e7a3d92c 100644 --- a/MuonSpectrometer/MuonDigitization/RPC_Digitization/RPC_Digitization/RpcDigitizationTool.h +++ b/MuonSpectrometer/MuonDigitization/RPC_Digitization/RPC_Digitization/RpcDigitizationTool.h @@ -60,7 +60,6 @@ class RpcDigitContainer; class RpcIdHelper; class PileUpMergeSvc; class IAtRndmGenSvc; -class MsgStream; class ITagInfoMgr; class IRPCConditionsSvc; diff --git a/MuonSpectrometer/MuonDigitization/sTGC_Digitization/sTGC_Digitization/sTgcDigitizationTool.h b/MuonSpectrometer/MuonDigitization/sTGC_Digitization/sTGC_Digitization/sTgcDigitizationTool.h index d7f2ededd1da..ba65c4567016 100644 --- a/MuonSpectrometer/MuonDigitization/sTGC_Digitization/sTGC_Digitization/sTgcDigitizationTool.h +++ b/MuonSpectrometer/MuonDigitization/sTGC_Digitization/sTGC_Digitization/sTgcDigitizationTool.h @@ -59,7 +59,6 @@ class sTgcIdHelper; class sTgcDigitMaker; class sTgcHitIdHelper; class IAtRndmGenSvc; -class MsgStream; class TFile; class TH2F; diff --git a/MuonSpectrometer/MuonDigitization/sTGC_Digitization/src/sTgcDigitizationTool.cxx b/MuonSpectrometer/MuonDigitization/sTGC_Digitization/src/sTgcDigitizationTool.cxx index 0aa8118f7b82..90fdd5104ab5 100644 --- a/MuonSpectrometer/MuonDigitization/sTGC_Digitization/src/sTgcDigitizationTool.cxx +++ b/MuonSpectrometer/MuonDigitization/sTGC_Digitization/src/sTgcDigitizationTool.cxx @@ -22,16 +22,6 @@ #include "sTGC_Digitization/sTgcVMMSim.h" #include "sTGC_Digitization/sTgcSimDigitData.h" -//Gaudi - Core -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/IToolSvc.h" -#include "GaudiKernel/SystemOfUnits.h" -#include "StoreGate/StoreGateSvc.h" -#include "PathResolver/PathResolver.h" -#include "AIDA/IHistogram1D.h" -#include "EventInfo/TagInfo.h" -#include "EventInfoMgt/ITagInfoMgr.h" - //Geometry #include "MuonReadoutGeometry/MuonDetectorManager.h" #include "MuonReadoutGeometry/sTgcReadoutElement.h" @@ -55,11 +45,9 @@ #include "CLHEP/Random/RandFlat.h" #include "CLHEP/Random/RandGauss.h" -#include <string> #include <sstream> #include <iostream> #include <fstream> -#include <vector> #include <TFile.h> #include <TH2.h> @@ -146,7 +134,7 @@ sTgcDigitizationTool::sTgcDigitizationTool(const std::string& type, const std::s m_timeJitterElectronicsStrip(0), m_timeJitterElectronicsPad(0), m_hitTimeMergeThreshold(0), - m_energyDepositThreshold(300.0*Gaudi::Units::eV) + m_energyDepositThreshold(300.0*CLHEP::eV) //m_file(0), //m_SimHitOrg(0), diff --git a/MuonSpectrometer/MuonIdHelpersAlgs/MuonIdHelpersAlgs/CscHashId.h b/MuonSpectrometer/MuonIdHelpersAlgs/MuonIdHelpersAlgs/CscHashId.h index 970428eddc02..cedc0afa963d 100644 --- a/MuonSpectrometer/MuonIdHelpersAlgs/MuonIdHelpersAlgs/CscHashId.h +++ b/MuonSpectrometer/MuonIdHelpersAlgs/MuonIdHelpersAlgs/CscHashId.h @@ -8,11 +8,9 @@ #include <vector> #include "AthenaBaseComps/AthAlgorithm.h" -#include "StoreGate/ActiveStoreSvc.h" #include "Identifier/Identifier.h" class StoreGateSvc; -class MsgStream; class CscIdHelper; namespace MuonGM { class MuonDetectorManager; diff --git a/MuonSpectrometer/MuonIdHelpersAlgs/MuonIdHelpersAlgs/TestMuonIdHelpers.h b/MuonSpectrometer/MuonIdHelpersAlgs/MuonIdHelpersAlgs/TestMuonIdHelpers.h index 78c6cd78eed3..9aa2f4ba3dc5 100644 --- a/MuonSpectrometer/MuonIdHelpersAlgs/MuonIdHelpersAlgs/TestMuonIdHelpers.h +++ b/MuonSpectrometer/MuonIdHelpersAlgs/MuonIdHelpersAlgs/TestMuonIdHelpers.h @@ -12,7 +12,6 @@ class StoreGateSvc; class ActiveStoreSvc; -class MsgStream; class MdtIdHelper; class CscIdHelper; class RpcIdHelper; diff --git a/MuonSpectrometer/MuonIdHelpersAlgs/src/CscHashId.cxx b/MuonSpectrometer/MuonIdHelpersAlgs/src/CscHashId.cxx index a2b847375913..faa08fd6847c 100644 --- a/MuonSpectrometer/MuonIdHelpersAlgs/src/CscHashId.cxx +++ b/MuonSpectrometer/MuonIdHelpersAlgs/src/CscHashId.cxx @@ -2,10 +2,6 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "GaudiKernel/MsgStream.h" - -#include "StoreGate/StoreGateSvc.h" - #include "MuonIdHelpers/CscIdHelper.h" #include "MuonIdHelpersAlgs/CscHashId.h" @@ -80,15 +76,15 @@ StatusCode CscHashId::cscHash() { Identifier id = *firstId; if (m_cscId->validElement(id)) { if(!m_cscId->get_hash(id, moduleHashId, &moduleContext)) { - std::cout << "The CSC Chamber hash id is " << moduleHashId - << " for " << m_cscId->show_to_string(id,&moduleContext) << std::endl; - std::cout << "*****The strips in this Chamber ********************" << std::endl; + ATH_MSG_INFO( "The CSC Chamber hash id is " << moduleHashId + << " for " << m_cscId->show_to_string(id,&moduleContext) ); + ATH_MSG_INFO( "*****The strips in this Chamber ********************" ); std::vector<Identifier> vect; m_cscId->idChannels(id, vect); for (unsigned int i=0; i<vect.size(); ++i) { if(!m_cscId->get_hash(vect[i], channelHashId, &channelContext)) { - std::cout << "The CSC strip hash id is " << channelHashId - << " for " << m_cscId->show_to_string(vect[i],&channelContext) << std::endl; + ATH_MSG_INFO( "The CSC strip hash id is " << channelHashId + << " for " << m_cscId->show_to_string(vect[i],&channelContext) ); } } } diff --git a/MuonSpectrometer/MuonIdHelpersAlgs/src/TestMuonIdHelpers.cxx b/MuonSpectrometer/MuonIdHelpersAlgs/src/TestMuonIdHelpers.cxx index 7e1d169b11d5..c0398de2ae9b 100644 --- a/MuonSpectrometer/MuonIdHelpersAlgs/src/TestMuonIdHelpers.cxx +++ b/MuonSpectrometer/MuonIdHelpersAlgs/src/TestMuonIdHelpers.cxx @@ -2,10 +2,6 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "GaudiKernel/MsgStream.h" - -#include "StoreGate/StoreGateSvc.h" - #include "MuonDigitContainer/MdtDigitContainer.h" #include "MuonDigitContainer/MdtDigitCollection.h" #include "MuonDigitContainer/MdtDigit.h" @@ -33,9 +29,6 @@ #include <algorithm> #include <cmath> -using namespace std; - - ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// @@ -109,12 +102,11 @@ StatusCode TestMuonIdHelpers::finalize() { ATH_MSG_DEBUG( "in finalize()" ); - std::cout << "ntries, user, kernel, elapsed " + ATH_MSG_INFO( "ntries, user, kernel, elapsed " << m_nTries << " " << m_deltaUser << " " << m_deltaKernel << " " - << m_deltaElapsed << " " - << std::endl; + << m_deltaElapsed ); return StatusCode::SUCCESS; @@ -134,7 +126,7 @@ StatusCode TestMuonIdHelpers::testMdtIdHelper() { typedef MdtDigitContainer::const_iterator collection_iterator; typedef MdtDigitCollection::const_iterator digit_iterator; - string key = "MDT_DIGITS"; + std::string key = "MDT_DIGITS"; const DataHandle <MdtDigitContainer> container; ATH_CHECK( (*m_activeStore)->retrieve(container,key) ); collection_iterator it1_coll= container->begin(); @@ -188,7 +180,7 @@ StatusCode TestMuonIdHelpers::testCscIdHelper() { typedef CscDigitContainer::const_iterator collection_iterator; typedef CscDigitCollection::const_iterator digit_iterator; - string key = "CSC_DIGITS"; + std::string key = "CSC_DIGITS"; const DataHandle <CscDigitContainer> container; ATH_CHECK( (*m_activeStore)->retrieve(container,key) ); collection_iterator it1_coll= container->begin(); @@ -241,7 +233,7 @@ StatusCode TestMuonIdHelpers::testRpcIdHelper() { typedef RpcDigitContainer::const_iterator collection_iterator; typedef RpcDigitCollection::const_iterator digit_iterator; - string key = "RPC_DIGITS"; + std::string key = "RPC_DIGITS"; const DataHandle <RpcDigitContainer> container; ATH_CHECK( (*m_activeStore)->retrieve(container,key) ); collection_iterator it1_coll= container->begin(); @@ -294,7 +286,7 @@ StatusCode TestMuonIdHelpers::testTgcIdHelper() { typedef TgcDigitContainer::const_iterator collection_iterator; typedef TgcDigitCollection::const_iterator digit_iterator; - string key = "TGC_DIGITS"; + std::string key = "TGC_DIGITS"; const DataHandle <TgcDigitContainer> container; ATH_CHECK( (*m_activeStore)->retrieve(container,key) ); collection_iterator it1_coll= container->begin(); diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MuonTGMeasAssocAlg/MuonTGMeasAssocAlg/MuonTGMeasAssocAlg.h b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MuonTGMeasAssocAlg/MuonTGMeasAssocAlg/MuonTGMeasAssocAlg.h index 3840eb6803d5..ee1f35db77d9 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MuonTGMeasAssocAlg/MuonTGMeasAssocAlg/MuonTGMeasAssocAlg.h +++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MuonTGMeasAssocAlg/MuonTGMeasAssocAlg/MuonTGMeasAssocAlg.h @@ -11,9 +11,6 @@ // Base class #include "AthenaBaseComps/AthAlgorithm.h" -#include "GaudiKernel/ToolHandle.h" -#include "StoreGate/DataHandle.h" -#include "StoreGate/StoreGateSvc.h" #include "TrkTrack/Track.h" #include "TrkExInterfaces/IExtrapolator.h" #include "TrkGeometry/TrackingGeometry.h" @@ -134,8 +131,7 @@ private: inline StatusCode MuonTGMeasAssocAlg::retrieveMeasurements() { // Get the messaging service, print where you are - MsgStream log(msgSvc(), name()); - log << MSG::DEBUG << "MuonTGMeasAssocAlg::retrieveMeasurements()" << endmsg; + ATH_MSG_DEBUG( "MuonTGMeasAssocAlg::retrieveMeasurements()" ); // //if (m_allHits) delete m_allHits; if (m_mdtHits) delete m_mdtHits; @@ -147,9 +143,9 @@ private: if (m_rpcIn) m_rpcHits = createRpcHitCollectionLayers(); if (m_cscIn) m_cscHits = createCscHitCollectionLayers(); if (m_tgcIn) m_tgcHits = createTgcHitCollectionLayers(); - StatusCode sc = createStationHitCollection(); + ATH_CHECK( createStationHitCollection() ); - log << MSG::DEBUG << "MuonTGMeasAssocAlg::collected hits from " << m_allHits->size() << " stations" << endmsg; + ATH_MSG_DEBUG( "MuonTGMeasAssocAlg::collected hits from " << m_allHits->size() << " stations" ); if (m_allHits->size()) return StatusCode::SUCCESS; diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/RpcClusterization/RpcClusterization/RpcClusterBuilderPRD.h b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/RpcClusterization/RpcClusterization/RpcClusterBuilderPRD.h index 6b7dafe0a418..4b4220a40810 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/RpcClusterization/RpcClusterization/RpcClusterBuilderPRD.h +++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/RpcClusterization/RpcClusterization/RpcClusterBuilderPRD.h @@ -5,11 +5,8 @@ #ifndef RpcClusterBuilderPRD_H #define RpcClusterBuilderPRD_H - #include "AthenaBaseComps/AthAlgorithm.h" -#include "StoreGate/DataHandle.h" #include "Identifier/Identifier.h" -//#include "CLHEP/Geometry/Point3D.h" #include "MuonPrepRawData/MuonPrepDataContainer.h" #include "MuonPrepRawData/RpcPrepData.h" @@ -17,13 +14,9 @@ #include "MuonDigitContainer/RpcDigitContainer.h" #include "MuonDigitContainer/RpcDigitCollection.h" #include "MuonDigitContainer/RpcDigit.h" -#include <vector> #include "MuonReadoutGeometry/MuonDetectorManager.h" #include "EventPrimitives/EventPrimitives.h" -class StoreGateSvc; -class ActiveStoreSvc; -class MsgStream; class RpcIdHelper; class RpcClusterBuilderPRD:public AthAlgorithm { @@ -47,7 +40,7 @@ private: void push_back(Muon::RpcPrepData *& newCluster); - std::vector<Muon::RpcPrepDataCollection*> m_coll_vect; + std::vector<Muon::RpcPrepDataCollection*> m_coll_vect; Muon::RpcPrepDataCollection* m_temp_coll; std::string m_colKey; @@ -60,8 +53,6 @@ private: protected: Muon::RpcPrepDataContainer * m_rpcClusterContainer; - ActiveStoreSvc* m_activeStore; - StoreGateSvc *m_EvtStore; const MuonGM::MuonDetectorManager * m_muonMgr; const RpcIdHelper * m_rpcId; diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/RpcClusterization/src/RpcClusterBuilderPRD.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/RpcClusterization/src/RpcClusterBuilderPRD.cxx index ae8c0d111981..3ad32e8ba6b8 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/RpcClusterization/src/RpcClusterBuilderPRD.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/RpcClusterization/src/RpcClusterBuilderPRD.cxx @@ -8,32 +8,25 @@ Based on CscClusterBuilder by Ketevi A. Assamagan */ -#include "GaudiKernel/MsgStream.h" -#include "StoreGate/StoreGateSvc.h" - #include "MuonReadoutGeometry/RpcReadoutElement.h" #include "MuonIdHelpers/RpcIdHelper.h" #include "RpcClusterization/RpcClusterBuilderPRD.h" -#include <algorithm> -#include <cmath> -#include <cassert> +#include <cmath> +#include <cassert> #include <fstream> #include <strstream> //#include "TrkEventPrimitives/ErrorMatrix.h" //#include "TrkEventPrimitives/CovarianceMatrix.h" - -using namespace std; - ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// RpcClusterBuilderPRD::RpcClusterBuilderPRD(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator), m_temp_coll(NULL), m_rpcClusterContainer(NULL), - m_activeStore(NULL), m_EvtStore(NULL), m_muonMgr(NULL), m_rpcId(NULL) + m_muonMgr(NULL), m_rpcId(NULL) { // Declare the properties @@ -45,64 +38,26 @@ RpcClusterBuilderPRD::RpcClusterBuilderPRD(const std::string& name, ISvcLocator* StatusCode RpcClusterBuilderPRD::initialize(){ - StatusCode sc; - - // Store Gate active store - sc = serviceLocator()->service("ActiveStoreSvc", m_activeStore); - if (sc != StatusCode::SUCCESS ) { - ATH_MSG_ERROR(" Cannot get ActiveStoreSvc "); - return sc ; - } - - // Store Gate transient event store - sc = serviceLocator()->service("StoreGateSvc", m_EvtStore); - if (sc != StatusCode::SUCCESS ) { - ATH_MSG_ERROR(" Cannot get StoreGateSvc "); - return sc ; - } - - // initialize the detectore store service and GeoModel - StoreGateSvc* detStore=0; - sc = serviceLocator()->service("DetectorStore", detStore); - if (sc.isFailure()) { - ATH_MSG_FATAL("DetectorStore service not found !"); - return sc; - } - - sc = detStore->retrieve( m_muonMgr ); - if (sc.isFailure()) { - ATH_MSG_ERROR(" Cannot retrieve MuonGeoModel "); - return sc; - } + ATH_CHECK( detStore()->retrieve( m_muonMgr ) ); m_rpcId = m_muonMgr->rpcIdHelper(); - - // Create an empty cluster container // m_rpcClusterContainer = new Muon::RpcPrepDataContainer(m_rpcId->module_hash_max()); // m_rpcClusterContainer->addRef(); - - return sc; + return StatusCode::SUCCESS; } StatusCode RpcClusterBuilderPRD::execute() { - StatusCode sc; - m_rpcClusterContainer = new Muon::RpcPrepDataContainer(m_rpcId->module_hash_max()); // m_rpcClusterContainer->cleanup(); - sc = m_EvtStore->record(m_rpcClusterContainer,m_colKey); - if (sc.isFailure()) { - ATH_MSG_ERROR(" Cannot record RPC Cluster Container "); - return StatusCode::FAILURE; - } - + ATH_CHECK( evtStore()->record(m_rpcClusterContainer,m_colKey) ); - sc=fill_rpcClusterContainer(); + StatusCode sc=fill_rpcClusterContainer(); if(sc.isFailure()) ATH_MSG_WARNING("couldn't build clusters for this event"); @@ -124,10 +79,8 @@ StatusCode RpcClusterBuilderPRD::finalize() { StatusCode RpcClusterBuilderPRD::fill_rpcClusterContainer() { - StatusCode sc; - const Muon::RpcPrepDataContainer* container; - sc = m_EvtStore->retrieve(container,m_colKeyIn); + StatusCode sc = evtStore()->retrieve(container,m_colKeyIn); if (sc.isFailure()) { ATH_MSG_WARNING(" Cannot retrieve RPC Digit Container with key " << m_colKeyIn.c_str() ); return StatusCode::SUCCESS; @@ -136,7 +89,7 @@ StatusCode RpcClusterBuilderPRD::fill_rpcClusterContainer() { Muon::RpcPrepDataContainer::const_iterator rpcCollection=container->begin(); Muon::RpcPrepDataContainer::const_iterator lastCollection=container->end(); - // sc = m_EvtStore->retrieve(rpcCollection, lastCollection); + // sc = evtStore()->retrieve(rpcCollection, lastCollection); // if (sc.isFailure()) { // ATH_MSG_ERROR(" Cannot retrieve RPC Digit collections "); // return StatusCode::SUCCESS; @@ -209,7 +162,7 @@ int RpcClusterBuilderPRD::buildPatterns(const Muon::RpcPrepDataCollection* rpcCo //const Muon::RpcPrepDataCollection rpcCollection = *iter; - vector<Muon::RpcPrepData*> theDigits= rpcCollection->stdcont(); + std::vector<Muon::RpcPrepData*> theDigits= rpcCollection->stdcont(); Identifier eleId=rpcCollection->identify(); @@ -263,7 +216,7 @@ void RpcClusterBuilderPRD::buildClusters(Identifier elementId) { // loop over existing patterns - map<Identifier, pattern >::iterator patt_it=m_digits.begin(); + std::map<Identifier, pattern >::iterator patt_it=m_digits.begin(); for(;patt_it!=m_digits.end();++patt_it){ @@ -275,17 +228,17 @@ void RpcClusterBuilderPRD::buildClusters(Identifier elementId) { //const RpcReadoutElement* descriptor=m_muonMgr->getRpcReadoutElement(elementId); - map<int, Muon::RpcPrepData*, less<int> >::iterator dig_it=m_digits[panelId].begin(); + std::map<int, Muon::RpcPrepData*, std::less<int> >::iterator dig_it=m_digits[panelId].begin(); - vector<Identifier> theIDs; - vector<int> theAmbFlags; + std::vector<Identifier> theIDs; + std::vector<int> theAmbFlags; int lastStrip=-999; float lastTime=-999; float mintime=0; Amg::Vector3D localPosition(0,0,0); Amg::Vector3D globalPosition(0,0,0); unsigned int count=0; - // vector<Trk::PrepRawData*> digitsInCluster; + // std::vector<Trk::PrepRawData*> digitsInCluster; // get the ID from the first digit in collection @@ -331,7 +284,7 @@ void RpcClusterBuilderPRD::buildClusters(Identifier elementId) { // std::cout<<"deciding amb flag"<<std::endl; for(unsigned int k=0;k<theAmbFlags.size();++k){ - clusAmbFlag=max(clusAmbFlag,theAmbFlags[k]); + clusAmbFlag=std::max(clusAmbFlag,theAmbFlags[k]); // std::cout<<theAmbFlags[k]<< " "<<clusAmbFlag<<std::endl; if(theAmbFlags[k]==1) hasGoldenStrip=true; } @@ -408,7 +361,7 @@ void RpcClusterBuilderPRD::buildClusters(Identifier elementId) { // std::cout<<"deciding amb flag"<<std::endl; for(unsigned int k=0;k<theAmbFlags.size();++k){ - clusAmbFlag=max(clusAmbFlag,theAmbFlags[k]); + clusAmbFlag=std::max(clusAmbFlag,theAmbFlags[k]); // std::cout<<theAmbFlags[k]<< " "<<clusAmbFlag<<std::endl; if(theAmbFlags[k]==1) hasGoldenStrip=true; } @@ -475,7 +428,7 @@ void RpcClusterBuilderPRD::push_back(Muon::RpcPrepData *& newCluster){ // IdContext rpcContext = m_rpcId->module_context(); // Muon::RpcPrepDataContainer::KEY key = m_rpcClusterContainer->key(elementId); -// if (!m_EvtStore->contains<Muon::RpcPrepDataCollection>(key)) { +// if (!evtStore()->contains<Muon::RpcPrepDataCollection>(key)) { // IdentifierHash rpcHashId; // if (m_rpcId->get_hash(elementId, rpcHashId, &rpcContext)) { // ATH_MSG_ERROR("Unable to get RPC hash id from RPC PreDataCollection collection id" @@ -493,7 +446,7 @@ void RpcClusterBuilderPRD::push_back(Muon::RpcPrepData *& newCluster){ // << " in StoreGate!"); // } else { // Muon::RpcPrepDataCollection * oldCollection; -// status = m_EvtStore->retrieve(oldCollection, key); +// status = evtStore()->retrieve(oldCollection, key); // if (status.isFailure()) // ATH_MSG_ERROR("Couldn't retrieve RpcDigitCollection with key=" // << key << " from StoreGate!"); @@ -503,16 +456,10 @@ void RpcClusterBuilderPRD::push_back(Muon::RpcPrepData *& newCluster){ StatusCode RpcClusterBuilderPRD::retrieve_rpcClusterContainer() const { - StatusCode sc; - typedef Muon::RpcPrepDataCollection::const_iterator cluster_iterator; const Muon::RpcPrepDataContainer* PRDcontainer; - sc = m_EvtStore->retrieve(PRDcontainer,m_colKey); - if (sc.isFailure()) { - ATH_MSG_ERROR(" Cannot retrieve RPC PrepData Cluster Container "); - return StatusCode::FAILURE; - } + ATH_CHECK( evtStore()->retrieve(PRDcontainer,m_colKey) ); for (Muon::RpcPrepDataContainer::const_iterator container_iterator=PRDcontainer->begin(); container_iterator != PRDcontainer->end(); @@ -529,11 +476,11 @@ StatusCode RpcClusterBuilderPRD::retrieve_rpcClusterContainer() const { Amg::Vector3D position = cluster->globalPosition(); ATH_MSG_INFO("RPC Cluster ID, Position (mm), size = " << m_rpcId->show_to_string(cluster->identify()) << " [" - << setiosflags(ios::fixed) << setprecision(3) << setw(12) << position.x() - << setiosflags(ios::fixed) << setprecision(3) << setw(12) << position.y() - << setiosflags(ios::fixed) << setprecision(3) << setw(12) << position.z() - // << setiosflags(ios::fixed) << setprecision(3) << setw(12) << cluster->width() - << setiosflags(ios::fixed) << setprecision(3) << setw(12) << cluster->rdoList().size() + << setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << position.x() + << setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << position.y() + << setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << position.z() + // << setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << cluster->width() + << setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << cluster->rdoList().size() << " ]"); } ATH_MSG_INFO("Number of Clusters in the collection is " << collection->size() ); diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonHoughPatternTool.h b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonHoughPatternTool.h index 23df88312e84..67f1258f1cf8 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonHoughPatternTool.h +++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonHoughPatternTool.h @@ -10,9 +10,7 @@ #include "MuonHoughPatternTools/IMuonHoughPatternTool.h" #include "AthenaBaseComps/AthAlgTool.h" -#include "GaudiKernel/MsgStream.h" -class IInterface; class MuonHoughTransformSteering; class MuonHoughTransformer; class TFile; diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughAlg.h b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughAlg.h index 3c06e081605a..10f176371ee8 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughAlg.h +++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughAlg.h @@ -6,13 +6,8 @@ #define MUONLAYERHOUGHALG_H #include "AthenaBaseComps/AthAlgorithm.h" -#include "GaudiKernel/ToolHandle.h" #include "MuonHoughPatternTools/MuonLayerHoughTool.h" - -class MsgStream; -class StoreGateSvc; - class MuonLayerHoughAlg : public AthAlgorithm { public: -- GitLab From ad46a63ec85fe079a674736a0fcf593b43f2c9b3 Mon Sep 17 00:00:00 2001 From: Batool Safarzadeh Samani <safarzad@lxplus098.cern.ch> Date: Mon, 21 May 2018 14:46:49 +0200 Subject: [PATCH 003/562] new photonHypo and algo, updated photonfex and validation code Former-commit-id: 9b848c603e37512bcdcaeaea68304a7a18a5138e --- .../python/TrigL2PhotonFexMTConfig.py | 4 +- .../python/TrigL2PhotonHypoTool.py | 37 +++ .../TrigEgammaHypo/src/TrigL2PhotonFexMT.cxx | 26 +- .../TrigL2PhotonFexMT.h | 5 + .../src/TrigL2PhotonHypoAlgMT.cxx | 143 +++++++++++ .../src/TrigL2PhotonHypoAlgMT.h | 53 ++++ .../src/TrigL2PhotonHypoTool.cxx | 240 ++++++++++++++++++ .../TrigEgammaHypo/src/TrigL2PhotonHypoTool.h | 82 ++++++ .../src/components/TrigEgammaHypo_entries.cxx | 10 +- .../TrigUpgradeTest/CMakeLists.txt | 6 + .../TrigUpgradeTest/share/photon.withViews.py | 194 +++++++++----- .../test/test_photon_run_data.sh | 5 + 12 files changed, 731 insertions(+), 74 deletions(-) create mode 100644 Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2PhotonHypoTool.py rename Trigger/TrigHypothesis/TrigEgammaHypo/{TrigEgammaHypo => src}/TrigL2PhotonFexMT.h (90%) mode change 100755 => 100644 create mode 100644 Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.cxx create mode 100644 Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.h create mode 100755 Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.cxx create mode 100644 Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.h create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_photon_run_data.sh diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2PhotonFexMTConfig.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2PhotonFexMTConfig.py index 7e1b9bcf498a..9d637340019a 100755 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2PhotonFexMTConfig.py +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2PhotonFexMTConfig.py @@ -1,10 +1,10 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2PhotonFex +from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2PhotonFexMT # basic cut -class L2PhotonFex_1 (TrigL2PhotonFex): +class L2PhotonFex_1 (TrigL2PhotonFexMT): __slots__ = [] def __init__(self, name = "L2PhotonFex_1"): super( L2PhotonFex_1, self ).__init__( name ) diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2PhotonHypoTool.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2PhotonHypoTool.py new file mode 100644 index 000000000000..db4f2d7e90fd --- /dev/null +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2PhotonHypoTool.py @@ -0,0 +1,37 @@ + +def TrigL2PhotonHypoToolFromName( name ): + """ provides configuration of the hypo tool giben the chain name + The argument will be replaced by "parsed" chain dict. For now it only serves simplest chain HLT_eXYZ. + """ + bname = name.split('_') + + threshold = bname[1] + from TrigEgammaHypo.TrigL2CaloHypoTool import decodeThreshold + thresholds = decodeThreshold( threshold ) + + from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2PhotonHypoTool + tool = TrigL2PhotonHypoTool(name) + tool.MonTool = "" + from TriggerJobOpts.TriggerFlags import TriggerFlags + if 'Validation' in TriggerFlags.enableMonitoring() or 'Online' in TriggerFlags.enableMonitoring(): + from AthenaMonitoring.GenericMonitoringTool import GenericMonitoringTool, defineHistogram + monTool = GenericMonitoringTool("MonTool"+name) + monTool.Histograms = [ + defineHistogram('CutCounter', type='TH1I', title="L2Photon Hypo Cut Counter;Cut Counter", xbins=8, xmin=-1.5, xmax=7.5, opt="kCumulative"), + defineHistogram('PtCalo', type='TH1F', title="L2Photon Hypo p_{T}^{calo} [MeV];p_{T}^{calo} [MeV];Nevents", xbins=50, xmin=0, xmax=100000), + defineHistogram('CaloEta', type='TH1F', title="L2Photon Hypo #eta^{calo} ; #eta^{calo};Nevents", xbins=200, xmin=-2.5, xmax=2.5), + defineHistogram('CaloPhi', type='TH1F', title="L2Photon Hypo #phi^{calo} ; #phi^{calo};Nevents", xbins=320, xmin=-3.2, xmax=3.2) ] + + monTool.HistPath = 'L2PhotonHypo/'+tool.name() + tool.MonTool = monTool + tool += monTool + + return tool + + +if __name__ == "__main__": + tool = TrigL2PhotonHypoToolFromName("HLT_g5_etcut") + assert tool, "Not configured simple tool" + + + print ( "\n\nALL OK\n\n" ) diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonFexMT.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonFexMT.cxx index 1728e1138480..f2a6cda62371 100755 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonFexMT.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonFexMT.cxx @@ -21,7 +21,7 @@ ** Created: Thu Jun 06 16:01:12 BST 2006 **************************************************************************/ -#include "TrigEgammaHypo/TrigL2PhotonFexMT.h" +#include "TrigL2PhotonFexMT.h" #include "xAODTrigCalo/TrigEMClusterContainer.h" #include "xAODTrigCalo/TrigEMClusterAuxContainer.h" #include "xAODTrigEgamma/TrigPhotonAuxContainer.h" @@ -63,16 +63,24 @@ StatusCode TrigL2PhotonFexMT::execute() using namespace xAOD; auto ctx = getContext(); - xAOD::TrigPhotonAuxContainer trigPhotonAuxContainer; + // xAOD::TrigPhotonAuxContainer trigPhotonAuxContainer; + + + auto trigPhotoColl = SG::makeHandle (m_outputPhotonsKey, ctx); + ATH_CHECK( trigPhotoColl.record (std::make_unique<xAOD::TrigPhotonContainer>(), + std::make_unique<xAOD::TrigEMClusterAuxContainer>()) ); + + ATH_MSG_DEBUG( "Made WriteHandle " << m_outputPhotonsKey ); + ATH_MSG_INFO( name() << " running with store " << getContext().getExtension<Atlas::ExtendedEventContext>()->proxy()->name() ); // always create a TrigPhotonContainer, even if it will be empty - if(!m_trigPhotonContainer) { - m_trigPhotonContainer = new xAOD::TrigPhotonContainer(); - m_trigPhotonContainer->setStore(&trigPhotonAuxContainer); - } - else { - m_trigPhotonContainer->clear(); - } + // if(!m_trigPhotonContainer) { + // m_trigPhotonContainer = new xAOD::TrigPhotonContainer(); + // m_trigPhotonContainer->setStore(&trigPhotonAuxContainer); + // } + // else { + // m_trigPhotonContainer->clear(); + //} auto roiCollection = SG::makeHandle(m_roiCollectionKey, ctx); diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/TrigEgammaHypo/TrigL2PhotonFexMT.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonFexMT.h old mode 100755 new mode 100644 similarity index 90% rename from Trigger/TrigHypothesis/TrigEgammaHypo/TrigEgammaHypo/TrigL2PhotonFexMT.h rename to Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonFexMT.h index 79df0e914536..20d69ae5acea --- a/Trigger/TrigHypothesis/TrigEgammaHypo/TrigEgammaHypo/TrigL2PhotonFexMT.h +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonFexMT.h @@ -84,6 +84,11 @@ class TrigL2PhotonFexMT : public AthAlgorithm { "clusters", // default value of StoreGate key "input TrigEMCluster Container name"}; + SG::WriteHandleKey<xAOD::TrigPhotonContainer> m_outputPhotonsKey{ this, + "PhotonsName", // property name + "Photons", // default value of StoreGate key + "output Photon container name "}; + }; diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.cxx new file mode 100644 index 000000000000..4ea74f5c354f --- /dev/null +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.cxx @@ -0,0 +1,143 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "GaudiKernel/Property.h" +#include "TrigL2PhotonHypoAlgMT.h" +#include "DecisionHandling/HLTIdentifier.h" +#include "DecisionHandling/TrigCompositeUtils.h" +#include "TrigL2PhotonHypoTool.h" + + +using namespace TrigCompositeUtils; + +TrigL2PhotonHypoAlgMT::TrigL2PhotonHypoAlgMT( const std::string& name, + ISvcLocator* pSvcLocator ) : + ::HypoBase( name, pSvcLocator ) {} + +TrigL2PhotonHypoAlgMT::~TrigL2PhotonHypoAlgMT() {} + +StatusCode TrigL2PhotonHypoAlgMT::initialize() { + ATH_MSG_INFO ( "Initializing " << name() << "..." ); + + + CHECK( m_hypoTools.retrieve() ); + + CHECK( m_photonsKey.initialize() ); + renounce( m_photonsKey );// clusters are made in views, so they are not in the EvtStore: hide them + + return StatusCode::SUCCESS; +} + +StatusCode TrigL2PhotonHypoAlgMT::finalize() { + return StatusCode::SUCCESS; +} + + +StatusCode TrigL2PhotonHypoAlgMT::execute_r( const EventContext& context ) const { + ATH_MSG_DEBUG ( "Executing " << name() << "..." ); + auto previousDecisionsHandle = SG::makeHandle( decisionInput(), context ); + if( not previousDecisionsHandle.isValid() ) {//implicit + ATH_MSG_DEBUG( "No implicit RH for previous decisions "<< decisionInput().key()<<": is this expected?" ); + return StatusCode::SUCCESS; + } + + ATH_MSG_DEBUG( "Running with "<< previousDecisionsHandle->size() <<" implicit ReadHandles for previous decisions"); + + // map between cluster pointer and index + + std::map<const xAOD::TrigEMCluster*, size_t> clusterToIndexMap; + size_t clusterCounter = 0; + for ( auto previousDecision : *previousDecisionsHandle){ + ElementLink<xAOD::TrigEMClusterContainer> clusterLink; + recursivelyFindFeature(previousDecision, clusterLink); + ATH_CHECK( clusterLink.isValid() ); + const xAOD::TrigEMCluster* cluster = *clusterLink; + clusterToIndexMap.insert( std::make_pair( cluster, clusterCounter ) ); + clusterCounter++; + } + ATH_MSG_DEBUG( "Cluster ptr to decision map has size " << clusterToIndexMap.size() ); + + auto decisions = std::make_unique<DecisionContainer>(); + auto aux = std::make_unique<DecisionAuxContainer>(); + decisions->setStore( aux.get() ); + + + std::vector<TrigL2PhotonHypoTool::PhotonInfo> hypoToolInput; + + for ( auto previousDecision: *previousDecisionsHandle ) { + // get View + auto viewEL = previousDecision->objectLink<std::vector<SG::View*>>( "view" ); + CHECK( viewEL.isValid() ); + const SG::View* view_const = *viewEL; + SG::View* view = const_cast<SG::View*>(view_const); // CHECK THIS! + + // get electron from that view: + size_t photonCounter = 0; + auto photonsHandle = SG::makeHandle( m_photonsKey, context ); + CHECK( photonsHandle.setProxyDict( view ) ); + CHECK( photonsHandle.isValid() ); + ATH_MSG_DEBUG ( "electron handle size: " << photonsHandle->size() << "..." ); + + for ( auto photonIter = photonsHandle->begin(); photonIter != photonsHandle->end(); ++photonIter, photonCounter++ ) { + auto d = newDecisionIn( decisions.get() ); + d->setObjectLink( "feature", ElementLink<xAOD::TrigPhotonContainer>( view->name()+"_"+m_photonsKey.key(), photonCounter ) ); + + auto clusterPtr = (*photonIter)->emCluster(); + CHECK( clusterPtr != nullptr ); + + // now find matching cluster + // could use geometric matching but in fact the cluster owned by the decision object and the cluster owned by the photon should be the same + // since we have a map made in advance we can make use of the index lookup w/o the need for additional loop + auto origCluster = clusterToIndexMap.find( clusterPtr ); + ATH_CHECK( origCluster != clusterToIndexMap.end() ); + linkToPrevious( d, decisionInput().key(), origCluster->second ); + + // now we have DecisionObject ready to be passed to hypo tool. it has link to photon, + // and decisions on clusters + // we shall avoid calling the tools for chains which were already rejected on certain cluster, but this is left to hypo tools + DecisionIDContainer clusterDecisionIDs; + decisionIDs( previousDecisionsHandle->at( origCluster->second ), clusterDecisionIDs ); + + hypoToolInput.emplace_back( TrigL2PhotonHypoTool::PhotonInfo{ d, *photonIter, origCluster->first, clusterDecisionIDs } ); + } + } + + for ( auto & tool: m_hypoTools ) { + ATH_CHECK( tool->decide( hypoToolInput ) ); + } + + auto outputHandle = SG::makeHandle(decisionOutput(), context); + CHECK( outputHandle.record(std::move(decisions), std::move(aux) ) ); + + ATH_MSG_DEBUG( "Exiting with "<< outputHandle->size() <<" decisions"); + //debug + for (auto outh: *outputHandle){ + TrigCompositeUtils::DecisionIDContainer objDecisions; + TrigCompositeUtils::decisionIDs( outh, objDecisions ); + + ATH_MSG_DEBUG("Number of positive decisions for this input: " << objDecisions.size() ); + + for ( TrigCompositeUtils::DecisionID id : objDecisions ) { + ATH_MSG_DEBUG( " --- found new decision " << HLT::Identifier( id ) ); + } + + } + + return StatusCode::SUCCESS; +} + + +bool TrigL2PhotonHypoAlgMT::recursivelyFindFeature( const TrigCompositeUtils::Decision* start, ElementLink<xAOD::TrigEMClusterContainer>& clusterlink) const{ + //recursively find in the seeds + if ( start->hasObjectLink( "feature" ) ) { + clusterlink=start->objectLink<xAOD::TrigEMClusterContainer>( "feature" ); + return true; + } + if (TrigCompositeUtils::hasLinkToPrevious(start) ){ + auto thelinkToPrevious =TrigCompositeUtils::linkToPrevious( start); + return recursivelyFindFeature( *thelinkToPrevious, clusterlink); + } + return false; +} + diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.h new file mode 100644 index 000000000000..a28ea6cc6e91 --- /dev/null +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.h @@ -0,0 +1,53 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ +#ifndef TRIGEGAMMAHYPO_L2TRIGL2PHOTONHYPOALG_H +#define TRIGEGAMMAHYPO_L2TRIGL2PHOTONHYPOALG_H 1 + +#include <string> + +#include "AthenaBaseComps/AthReentrantAlgorithm.h" +#include "xAODTrigEgamma/TrigPhotonContainer.h" +#include "DecisionHandling/TrigCompositeUtils.h" +#include "AthViews/View.h" +#include "TrigSteeringEvent/TrigRoiDescriptorCollection.h" + +#include "TrigL2PhotonHypoTool.h" +#include "xAODTrigCalo/TrigEMClusterContainer.h" +#include "DecisionHandling/HypoBase.h" +#include "ITrigL2CaloHypoTool.h" + + +/** + * @class TrigL2PhotonHypoAlgoMT + * @brief Implements Hypo selection on L2 photons + **/ + +class TrigL2PhotonHypoAlgMT : public ::HypoBase +{ + public: + + TrigL2PhotonHypoAlgMT( const std::string& name, ISvcLocator* pSvcLocator ); + + virtual ~TrigL2PhotonHypoAlgMT(); + + virtual StatusCode initialize() override; + virtual StatusCode execute_r(const EventContext& context) const override; + virtual StatusCode finalize() override; + + + + private: + TrigL2PhotonHypoAlgMT(); + ToolHandleArray< TrigL2PhotonHypoTool > m_hypoTools {this, "HypoTools", {}, "Tools to perfrom selection"}; + Gaudi::Property< bool > m_runInView { this, "RunInView", false , "Set input DH for running in views" }; + // internally used to getch from views + SG::ReadHandleKey< xAOD::TrigPhotonContainer > m_photonsKey {this, "Photons", "L2PhotonContainer", "Input"}; + + + bool recursivelyFindFeature( const TrigCompositeUtils::Decision* d, ElementLink<xAOD::TrigEMClusterContainer>& clusterlink) const; + + +}; + +#endif //> !TRIGEGAMMAHYPO_TRIGL2PHOTONHYPOALG_H diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.cxx new file mode 100755 index 000000000000..4d47bf0d3c23 --- /dev/null +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.cxx @@ -0,0 +1,240 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + + +#include "DecisionHandling/HLTIdentifier.h" +#include "DecisionHandling/Combinators.h" +#include "AthenaMonitoring/MonitoredScope.h" + +#include "TrigL2PhotonHypoTool.h" + +using namespace TrigCompositeUtils; + +TrigL2PhotonHypoTool::TrigL2PhotonHypoTool( const std::string& type, + const std::string& name, + const IInterface* parent ) + : AthAlgTool( type, name, parent ), + m_decisionId( HLT::Identifier::fromToolName( name ) ) {} + +StatusCode TrigL2PhotonHypoTool::initialize() { + + // if ( !m_monTool.empty() ) CHECK( m_monTool.retrieve() ); + + ATH_MSG_DEBUG( "Initialization completed successfully:" ); + ATH_MSG_DEBUG( "AcceptAll = " + << ( m_acceptAll==true ? "True" : "False" ) ); + ATH_MSG_DEBUG ( "EtaBins = " << m_etabin ); + ATH_MSG_DEBUG( "ETthr = " + << m_eTthr << "(lo)/" << m_eT2thr << "(hi)" ); + ATH_MSG_DEBUG ( "HADETthr = " + << m_hadeTthr << "(lo)/" << m_hadeT2thr << "(hi)" ); + ATH_MSG_DEBUG( "CARCOREthr = " << m_carcorethr ); + ATH_MSG_DEBUG( "CAERATIOthr = " << m_caeratiothr ); + ATH_MSG_DEBUG( "dPHICLUSTERthr = " << m_dphicluster ); + ATH_MSG_DEBUG( "dETACLUSTERthr = " << m_detacluster ); + + unsigned int nEtaBin=m_etabin.size(); + if ( m_eTthr.size() != nEtaBin-1 ) { + ATH_MSG_ERROR( " etThr size is " << m_eTthr.size() << " but needs " << nEtaBin-1 ); + return StatusCode::FAILURE; + } + + + if ( m_eT2thr.size() != nEtaBin-1 ) { + ATH_MSG_ERROR( " et2Thr size is " << m_eT2thr.size() << " but needs " << nEtaBin-1 ); + return StatusCode::FAILURE; + } + + if ( m_hadeTthr.size() != nEtaBin-1 ) { + ATH_MSG_ERROR( " hadetThr size is " << m_hadeTthr.size() << " but needs " << nEtaBin-1 ); + return StatusCode::FAILURE; + } + + if ( m_hadeT2thr.size() != nEtaBin-1 ) { + ATH_MSG_ERROR( " hadet2Thr size is " << m_hadeT2thr.size() << " but needs " << nEtaBin-1 ); + return StatusCode::FAILURE; + } + + if ( m_carcorethr.size() != nEtaBin-1 ) { + ATH_MSG_ERROR( " carcore size is " << m_carcorethr.size() << " but needs " << nEtaBin-1 ); + return StatusCode::FAILURE; + } + + if ( m_caeratiothr.size() != nEtaBin-1 ) { + ATH_MSG_ERROR( " caeratio size is " << m_caeratiothr.size() << " but needs " << nEtaBin-1 ); + return StatusCode::FAILURE; + } + + + return StatusCode::SUCCESS; +} + + +TrigL2PhotonHypoTool::~TrigL2PhotonHypoTool() {} + + +bool TrigL2PhotonHypoTool::decideOnSingleObject( const xAOD::TrigPhoton* photon, + size_t cutIndex ) const { + using namespace Monitored; + + auto cutCounter = MonitoredScalar::declare<int>( "CutCounter", -1 ); + auto cutIndexM = MonitoredScalar::declare<int>( "CutIndex", cutIndex ); + auto PhEt = MonitoredScalar::declare( "PhEt", -99. ); + auto PhEta = MonitoredScalar::declare( "PhEta", -99. ); + auto PhPhi = MonitoredScalar::declare( "PhPhi", -99. ); + auto dEta = MonitoredScalar::declare( "dEta", -99. ); + auto dPhi = MonitoredScalar::declare( "dPhi", -99. ); + auto PhRcore = MonitoredScalar::declare( "PhRcore", -99. ); + auto PhEratio = MonitoredScalar::declare( "PhRcore", -99. ); + auto PhHadEt = MonitoredScalar::declare( "PhHadEt", -99. ); + auto PhF1 = MonitoredScalar::declare( "PhF1", -99. ); + auto monitorIt = MonitoredScope::declare( m_monTool, + cutCounter, cutIndexM, + PhEt, + PhEta, PhPhi, + dEta, dPhi, + PhRcore, PhEratio, + PhHadEt, PhF1 ); + + + double EmET = -99.0; + double HadEmRatio = -99.0; + double Reta = -99.0; + double Eratio = -99.0; + double f1 = -99.0; + double HadET = -99.0; + + if ( photon == 0 ) + return false; + cutCounter++; + + // Determine which eta bin to apply the cuts + float absEta = fabs( photon->eta() ); + int etaBin = -1; + for (std::size_t iBin = 0; iBin < m_etabin.size()-1; iBin++) + if ( absEta > m_etabin[iBin] && absEta < m_etabin[iBin+1] ) etaBin = iBin; + + // getting photon variable + dEta = photon->dEta(); + dPhi = photon->dPhi(); + Eratio = photon->eratio(); + Reta = photon->rcore(); + EmET = photon->pt(); + HadET = photon->etHad(); + f1 = photon->f1(); + + if(m_etCutOnly) { + ATH_MSG_DEBUG ( "EtCutOnly property is set: TrigPhoton: ET_em=" << EmET + << " cut in etaBin " << etaBin << " is ET_em >= " << m_eTthr[0] ); + } + + //now use the ratio, not the absolute HadEt (this is not yet persistified in the TrigPhoton) + HadEmRatio = (EmET!=0) ? HadET/EmET : -1.0; + + ATH_MSG_VERBOSE( "Cut index " << cutIndex ); + if ( fabs(dEta) < m_detacluster[cutIndex] ){ + ATH_MSG_VERBOSE( "Fails dEta cut " << fabs(dEta) << " < " << m_detacluster[cutIndex] ); + return false; + } + cutCounter++; + + if ( fabs(dPhi) < m_dphicluster[cutIndex] ){ + ATH_MSG_VERBOSE( "Fails dphi cut " << fabs(dPhi) << " < " << m_dphicluster[cutIndex] ); + return false; + } + cutCounter++; + + // eta range + if ( etaBin==-1 ) { + ATH_MSG_VERBOSE( "Photon eta: " << absEta << " outside eta range " << m_etabin[m_etabin.size()-1] ); + return false; + } else { + ATH_MSG_VERBOSE( "eta bin used for cuts " << etaBin ); + } + cutCounter++; // passed eta cut + // Reta (was previously called Rcore) + if ( Reta > m_carcorethr[etaBin][cutIndex] ){ + ATH_MSG_VERBOSE( "TrigPhoton Reta=" << Reta + << " cut in etaBin " << etaBin << " is Reta >= " << m_carcorethr[etaBin][cutIndex] ); + return false; + } + cutCounter++; + // // Eratio + bool inCrack = ( absEta > 2.37 || ( absEta > 1.37 && absEta < 1.52) ); + if ( inCrack || f1<m_F1thr[0] ) { + ATH_MSG_VERBOSE( "TrigPhoton: InCrack= " << inCrack << " F1=" << f1 + << " Eratio cut not being applied" ); + } else { + if ( Eratio > m_caeratiothr[etaBin][cutIndex] ) return false; + } + cutCounter++; + if(inCrack) Eratio = -1; //Set default value in crack for monitoring. + + // ET_em + if ( EmET > m_eTthr[etaBin][cutIndex]) { + ATH_MSG_VERBOSE( "TrigPhoton: ET_em=" << EmET + << " not in etaBin " << etaBin << " is ET_em < " << m_eTthr[etaBin][cutIndex] ); + return false; + } + cutCounter++; + + + // ET_had + // find which ET_had to apply : this depends on the ET_em and the eta bin + std::vector<double> hadET_cut={-1}; + + if ( EmET > m_eT2thr[etaBin][cutIndex] ) { + hadET_cut[etaBin] = m_hadeT2thr[etaBin][cutIndex] ; + ATH_MSG_VERBOSE( "ET_em>" << m_eT2thr[etaBin][cutIndex] + << ": use high ET_had cut: <" << hadET_cut[etaBin] ); + } else { + hadET_cut[etaBin] = m_hadeTthr[etaBin][cutIndex]; + ATH_MSG_VERBOSE( "ET_em<" << m_eT2thr[etaBin][cutIndex] + << ": use low ET_had cut: <" << hadET_cut[etaBin] ); + } + + if ( HadEmRatio < hadET_cut[etaBin] ){ + ATH_MSG_VERBOSE( "TrigPhoton: ET_had=" << HadEmRatio + << " not in etaBin " << etaBin << " is ET_had <=" << hadET_cut[etaBin] ); + return false; + + } + cutCounter++; + return true; + +} + +StatusCode TrigL2PhotonHypoTool::inclusiveSelection( std::vector<PhotonInfo>& input ) const { + for ( auto i: input ) { + if ( m_respectPreviousDecision + and ( i.previousDecisionIDs.count( m_decisionId.numeric() ) == 0 ) ) continue; // the decision was negative or not even made in previous stage + + auto objDecision = decideOnSingleObject( i.photon, 0 ); + if ( objDecision == true ) { + addDecisionID( m_decisionId.numeric(), i.decision ); + } + } + return StatusCode::SUCCESS; +} + + +StatusCode TrigL2PhotonHypoTool::markPassing( std::vector<PhotonInfo>& input, const std::set<size_t>& passing ) const { + + for ( auto idx: passing ) + addDecisionID( m_decisionId.numeric(), input[idx].decision ); + return StatusCode::SUCCESS; +} + +StatusCode TrigL2PhotonHypoTool::decide( std::vector<PhotonInfo>& input ) const { + if ( m_multiplicity == 1 ) { + return inclusiveSelection( input ); + + } //else { + // return multiplicitySelection( input ); + // } + + return StatusCode::SUCCESS; +} + + diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.h new file mode 100644 index 000000000000..0bd1d8fcff70 --- /dev/null +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.h @@ -0,0 +1,82 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ +#ifndef TRIGEGAMMAHYPO_TRIGL2PHOTONHYPOTOOL_H +#define TRIGEGAMMAHYPO_TRIGL2PHOTONHYPOTOOL_H 1 + +#include "GaudiKernel/Property.h" +#include "CLHEP/Units/SystemOfUnits.h" +#include "xAODTrigCalo/TrigEMCluster.h" +#include "xAODTrigEgamma/TrigPhotonContainer.h" +#include "AthenaBaseComps/AthAlgTool.h" +#include "AthenaMonitoring/GenericMonitoringTool.h" +#include "DecisionHandling/HLTIdentifier.h" +#include "DecisionHandling/TrigCompositeUtils.h" + + +/** + * @class Implementation of the Egamma selection for CaloClusters + * @brief + **/ + +class TrigL2PhotonHypoTool : virtual public ::AthAlgTool +{ + public: + TrigL2PhotonHypoTool( const std::string& type, + const std::string& name, + const IInterface* parent ); + + virtual ~TrigL2PhotonHypoTool(); + virtual StatusCode initialize() override; + + + + struct PhotonInfo { + TrigCompositeUtils::Decision* decision; + const xAOD::TrigPhoton* photon; + const xAOD::TrigEMCluster* cluster; + const TrigCompositeUtils::DecisionIDContainer previousDecisionIDs; + }; + + + StatusCode decide( std::vector<PhotonInfo>& decisions ) const; + + bool decideOnSingleObject( const xAOD::TrigPhoton* photon, size_t cutIndex ) const; + + StatusCode inclusiveSelection( std::vector<PhotonInfo>& input ) const; + + StatusCode multiplicitySelection( std::vector<PhotonInfo>& input ) const; + + StatusCode markPassing( std::vector<PhotonInfo>& input, const std::set<size_t>& passing ) const; + + + + + + private: + HLT::Identifier m_decisionId; + + Gaudi::Property<bool> m_decisionPerCluster{ this, "DecisionPerCluster", true, "Is multiplicity requirement refering to photons ( false ) or RoIs ( false ), relevant only in when multiplicity > 1" }; + + Gaudi::Property<bool> m_respectPreviousDecision{ this, "RespectPreviousDecision", false, "If false, ( do not even check ), the decision made for the cluster" }; + Gaudi::Property<bool> m_acceptAll{ this, "AcceptAll", false, "Ignore selection" }; + Gaudi::Property<bool> m_etCutOnly{ this, "EtCutOnly", false, "" }; + Gaudi::Property< std::vector<float> > m_etabin{ this, "EtaBins", {0}, "Eta bins" }; + + Gaudi::Property< std::vector<float> > m_detacluster{ this, "dETACLUSTERthr", {0.2}, "Delta Eta to Cluster" }; + Gaudi::Property< std::vector<float> > m_dphicluster{ this, "dPHICLUSTERthr", {0.2}, "Delta Phi to Cluster" }; + Gaudi::Property< std::vector<float> > m_F1thr{ this, "F1thr", {0}, "F1 Threshold" }; + std::vector<std::vector <double> > m_eTthr; + std::vector<std::vector <double> > m_eT2thr; + std::vector<std::vector <double> > m_hadeTthr; + std::vector<std::vector <double> > m_hadeT2thr; + std::vector<std::vector <double> > m_carcorethr; + std::vector<std::vector <double> > m_caeratiothr; + + + size_t m_multiplicity = 1; + + ToolHandle<GenericMonitoringTool> m_monTool{ this, "MonTool", "", "Monitoring tool" }; +}; + +#endif //> !TRIGEGAMMAHYPO_TRIGL2CALOHYPOTOOL_H diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx index 234678b427d2..5a492dcc08d8 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx @@ -1,7 +1,7 @@ #include "TrigEgammaHypo/TrigL2CaloHypo.h" #include "TrigEgammaHypo/TrigL2ElectronFex.h" #include "TrigEgammaHypo/TrigL2ElectronHypo.h" -#include "TrigEgammaHypo/TrigL2PhotonFex.h" +#include "../TrigL2PhotonFexMT.h" #include "TrigEgammaHypo/TrigL2PhotonHypo.h" #include "TrigEgammaHypo/TrigEFDielectronMassHypo.h" #include "TrigEgammaHypo/TrigEFDielectronMassFex.h" @@ -18,13 +18,14 @@ #include "../TrigL2ElectronHypoTool.h" #include "../TrigL2ElectronFexMT.h" #include "../TrigL2ElectronHypoAlgMT.h" -#include "../TrigL2ElectronHypoTool.h" +#include "../TrigL2PhotonHypoAlgMT.h" +#include "../TrigL2PhotonHypoTool.h" DECLARE_COMPONENT( TrigL2CaloHypo ) DECLARE_COMPONENT( TrigL2ElectronFex ) DECLARE_COMPONENT( TrigL2ElectronHypo ) -DECLARE_COMPONENT( TrigL2PhotonFex ) +DECLARE_COMPONENT( TrigL2PhotonFexMT ) DECLARE_COMPONENT( TrigL2PhotonHypo ) DECLARE_COMPONENT( TrigEFDielectronMassHypo ) DECLARE_COMPONENT( TrigEFDielectronMassFex ) @@ -37,8 +38,9 @@ DECLARE_COMPONENT( TrigEFTrackHypo ) DECLARE_COMPONENT( TrigL2CaloLayersHypo ) DECLARE_COMPONENT( TrigL2CaloHypoAlgMT ) DECLARE_COMPONENT( TrigL2ElectronHypoAlgMT ) +DECLARE_COMPONENT( TrigL2PhotonHypoAlgMT ) DECLARE_COMPONENT( TrigL2CaloHypoToolInc ) DECLARE_COMPONENT( TrigL2CaloHypoToolMult ) DECLARE_COMPONENT( TrigL2ElectronHypoTool ) DECLARE_COMPONENT( TrigL2ElectronFexMT ) -DECLARE_COMPONENT( TrigL2ElectronHypoTool ) +DECLARE_COMPONENT( TrigL2PhotonHypoTool ) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt index a1588868e882..43dc0be3a54b 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt +++ b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt @@ -74,6 +74,12 @@ atlas_add_test( egammaRunData PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_egammaRunData ) +file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_photonRunData ) +atlas_add_test( photonRunData + SCRIPT test/test_photon_run_data.sh + PROPERTIES TIMEOUT 500 + PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_photonRunData ) + # EXTRA_PATTERNS "TriggerSummary" file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_egammaMenu ) atlas_add_test( egammaMenu diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/photon.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/photon.withViews.py index 3284200a7709..a5e0b53f322c 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/photon.withViews.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/photon.withViews.py @@ -2,12 +2,13 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration # - include("TrigUpgradeTest/testHLT_MT.py") + #workaround to prevent online trigger folders to be enabled from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags InDetTrigFlags.useConditionsClasses.set_Value_and_Lock(False) + from InDetRecExample.InDetJobProperties import InDetFlags InDetFlags.doCaloSeededBrem = False @@ -23,6 +24,12 @@ InDetFlags.doTRTSeededTrackFinder = True InDetFlags.doTruth = False InDetFlags.init() +# PixelLorentzAngleSvc and SCTLorentzAngleSvc +include("InDetRecExample/InDetRecConditionsAccess.py") + +from AthenaCommon.AlgSequence import AlgSequence +topSequence = AlgSequence() + from InDetRecExample.InDetKeys import InDetKeys @@ -33,111 +40,180 @@ if globalflags.InputFormat.is_bytestream(): testChains = ["HLT_g5_etcut"] + from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import T2CaloEgamma_FastAlgo theFastCaloAlgo=T2CaloEgamma_FastAlgo("FastCaloAlgo" ) theFastCaloAlgo.OutputLevel=VERBOSE theFastCaloAlgo.ClustersName="L2CaloClusters" svcMgr.ToolSvc.TrigDataAccess.ApplyOffsetCorrection=False -from AthenaCommon.CFElements import parOR, seqOR, seqAND, stepSeq + +from TrigMultiVarHypo.TrigL2CaloRingerFexMTInit import init_ringer +trigL2CaloRingerFexMT = init_ringer() +trigL2CaloRingerFexMT.OutputLevel = DEBUG -from DecisionHandling.DecisionHandlingConf import RoRSeqFilter, DumpDecisions -from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm - -fastCaloInViewAlgs = seqAND("fastCaloInViewAlgs", [ theFastCaloAlgo ]) +from AthenaCommon.CFElements import parOR, seqOR, seqAND, stepSeq, findAlgorithm +from DecisionHandling.DecisionHandlingConf import RoRSeqFilter, DumpDecisions +from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm -filterL1RoIsAlg = RoRSeqFilter("filterL1RoIsAlg") -filterL1RoIsAlg.Input = ["EMRoIDecisions"] -filterL1RoIsAlg.Output = ["FilteredEMRoIDecisions"] -filterL1RoIsAlg.Chains = testChains -filterL1RoIsAlg.OutputLevel = DEBUG +def createFastCaloSequence(rerun=False): + __prefix = "Rerurn_" if rerun else "" + __l1RoIDecisions = "RerunEMRoIDecisions" if rerun else "EMRoIDecisions" + __forViewDecsions = "RerunEMRoIDecisions" if rerun else "Filtered"+__l1RoIDecisions - + from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import T2CaloEgamma_FastAlgo + #clusterMaker=T2CaloEgamma_FastAlgo(__prefix+"FastClusterMaker" ) + clusterMaker=T2CaloEgamma_FastAlgo( "FastClusterMaker" ) + clusterMaker.OutputLevel=VERBOSE + clusterMaker.ClustersName="L2CaloClusters" + svcMgr.ToolSvc.TrigDataAccess.ApplyOffsetCorrection=False + fastCaloInViewAlgs = seqAND( __prefix+"fastCaloInViewAlgs", [ clusterMaker ]) -fastCaloViewsMaker = EventViewCreatorAlgorithm("fastCaloViewsMaker", OutputLevel=DEBUG) -fastCaloViewsMaker.ViewFallThrough = True -fastCaloViewsMaker.Decisions = "FilteredEMRoIDecisions" # from EMRoIsUnpackingTool -fastCaloViewsMaker.RoIsLink = "initialRoI" # -||- -fastCaloViewsMaker.InViewRoIs = "EMCaloRoIs" # contract with the fastCalo -fastCaloViewsMaker.Views = "EMCaloViews" -fastCaloViewsMaker.ViewNodeName = "fastCaloInViewAlgs" -theFastCaloAlgo.RoIs = fastCaloViewsMaker.InViewRoIs + filterL1RoIsAlg = RoRSeqFilter( __prefix+"filterL1RoIsAlg") + filterL1RoIsAlg.Input = [__l1RoIDecisions] + filterL1RoIsAlg.Output = ["Filtered"+__l1RoIDecisions] + filterL1RoIsAlg.Chains = testChains + filterL1RoIsAlg.OutputLevel = DEBUG + fastCaloViewsMaker = EventViewCreatorAlgorithm( __prefix+"fastCaloViewsMaker", OutputLevel=DEBUG) + fastCaloViewsMaker.ViewFallThrough = True + fastCaloViewsMaker.InputMakerInputDecisions = [ __forViewDecsions ] + fastCaloViewsMaker.RoIsLink = "initialRoI" # -||- + fastCaloViewsMaker.InViewRoIs = "EMCaloRoIs" # contract with the fastCalo + fastCaloViewsMaker.Views = __prefix+"EMCaloViews" + fastCaloViewsMaker.ViewNodeName = __prefix+"fastCaloInViewAlgs" + fastCaloViewsMaker.InputMakerOutputDecisions = [ "L2CaloLinks"] + clusterMaker.RoIs = fastCaloViewsMaker.InViewRoIs -from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2PhotonHypo -from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2CaloHypoAlg -from TrigEgammaHypo.TrigL2CaloHypoTool import TrigL2CaloHypoToolFromName -theFastCaloHypo = TrigL2CaloHypoAlg("L2CaloHypo") -theFastCaloHypo.OutputLevel = DEBUG -theFastCaloHypo.L1Decisions = "EMRoIDecisions" -theFastCaloHypo.Views = fastCaloViewsMaker.Views -theFastCaloHypo.CaloClusters = theFastCaloAlgo.ClustersName -theFastCaloHypo.RoIs = fastCaloViewsMaker.InViewRoIs -theFastCaloHypo.Decisions = "EgammaCaloDecisions" -theFastCaloHypo.HypoTools = [ TrigL2CaloHypoToolFromName ( c ) for c in testChains ] + from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2CaloHypoAlgMT + from TrigEgammaHypo.TrigL2CaloHypoTool import TrigL2CaloHypoToolFromName + fastCaloHypo = TrigL2CaloHypoAlgMT( __prefix+"L2CaloHypo" ) + fastCaloHypo.OutputLevel = DEBUG + fastCaloHypo.HypoInputDecisions = fastCaloViewsMaker.InputMakerOutputDecisions[0] # __l1RoIDecisions +# fastCaloHypo.Views = fastCaloViewsMaker.Views + fastCaloHypo.CaloClusters = clusterMaker.ClustersName +# fastCaloHypo.RoIs = fastCaloViewsMaker.InViewRoIs + fastCaloHypo.HypoOutputDecisions = __prefix+"EgammaCaloDecisions" + fastCaloHypo.HypoTools = [ TrigL2CaloHypoToolFromName( c ) for c in testChains ] -for t in theFastCaloHypo.HypoTools: - t.OutputLevel = DEBUG - -# topSequence += theFastCaloHypo + for t in fastCaloHypo.HypoTools: + t.OutputLevel = DEBUG -caloDecisionsDumper = DumpDecisions("caloDecisionsDumper", OutputLevel=DEBUG, Decisions = theFastCaloHypo.Decisions ) + fastCaloSequence = seqAND( __prefix+"fastCaloSequence", [fastCaloViewsMaker, fastCaloInViewAlgs, fastCaloHypo ]) + #if rerun: + # return parOR(__prefix+"egammaCaloStep", [ fastCaloSequence ] ) + return stepSeq(__prefix+"egammaCaloStep", filterL1RoIsAlg, [ fastCaloSequence ]) -fastCaloSequence = seqAND("fastCaloSequence", [fastCaloViewsMaker, fastCaloInViewAlgs, theFastCaloHypo ]) - -egammaCaloStep = stepSeq("egammaCaloStep", filterL1RoIsAlg, [ fastCaloSequence, caloDecisionsDumper ]) +egammaCaloStep = createFastCaloSequence( rerun=False ) from TrigEgammaHypo.TrigL2PhotonFexMTConfig import L2PhotonFex_1 - thePhotonFex= L2PhotonFex_1() +thePhotonFex.TrigEMClusterName = theFastCaloAlgo.ClustersName +thePhotonFex.PhotonsName="Photons" thePhotonFex.OutputLevel=VERBOSE filterCaloRoIsAlg = RoRSeqFilter("filterCaloRoIsAlg") -filterCaloRoIsAlg.Input = [theFastCaloHypo.Decisions] -filterCaloRoIsAlg.Output = ["Filtered"+theFastCaloHypo.Decisions] +caloHypoDecisions = findAlgorithm(egammaCaloStep, "L2CaloHypo").HypoOutputDecisions +print "kkkk ", caloHypoDecisions +filterCaloRoIsAlg.Input = [caloHypoDecisions] +filterCaloRoIsAlg.Output = ["Filtered" + caloHypoDecisions] filterCaloRoIsAlg.Chains = testChains filterCaloRoIsAlg.OutputLevel = DEBUG -l2PhotonViewsMaker = EventViewCreatorAlgorithm("l2PhotonViewsMaker", OutputLevel=DEBUG) -l2PhotonViewsMaker.Decisions = filterCaloRoIsAlg.Output[0] # output of L2CaloHypo -l2PhotonViewsMaker.RoIsLink = "roi" # -||- -l2PhotonViewsMaker.InViewRoIs = "EMIDRoIs" # contract with the fastCalo -l2PhotonViewsMaker.Views = "EMPhotonViews" -l2PhotonViewsMaker.ViewFallThrough = True +from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2PhotonHypoAlgMT +from TrigEgammaHypo.TrigL2PhotonHypoTool import TrigL2PhotonHypoToolFromName +thePhotonHypo = TrigL2PhotonHypoAlgMT() +thePhotonHypo.RunInView=True +thePhotonHypo.Photons = thePhotonFex.PhotonsName + +thePhotonHypo.OutputLevel = VERBOSE -egammaIDStep = stepSeq("egammaIDStep", filterCaloRoIsAlg, [ l2PhotonViewsMaker ] ) +thePhotonHypo.HypoTools = [ TrigL2PhotonHypoToolFromName( c ) for c in testChains ] +for t in thePhotonHypo.HypoTools: + t.OutputLevel = VERBOSE +# topSequence += thePhotonHypo +# InDetCacheCreatorTrigViews, +photonSequence = seqAND("photonSequence", [ thePhotonHypo ] ) +egammaIDStep = stepSeq("egammaIDStep", filterCaloRoIsAlg, [ photonSequence ] ) # CF construction -step0 = parOR("step0", [ egammaCaloStep ] ) +from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg +summaryStep0 = TriggerSummaryAlg( "TriggerSummaryStep1" ) +summaryStep0.InputDecision = "HLTChains" +summaryStep0.HLTSummary = "MonitoringSummaryStep1" +summaryStep0.FinalDecisions = [ caloHypoDecisions ] +summaryStep0.OutputLevel = DEBUG + + +step0 = parOR("step0", [ egammaCaloStep, summaryStep0 ] ) step1 = parOR("step1", [ egammaIDStep ] ) -from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg + +egammaCaloStepRR = createFastCaloSequence( rerun=True ) + +step0r = parOR("step0r", [ egammaCaloStepRR ]) + summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) -summary.L1Decision = "HLTChains" -summary.FinalDecisions = [ "ElectronL2Decisions", "MuonL2Decisions", "PhotonL2Decisions" ] +summary.InputDecision = "HLTChains" +summary.FinalDecisions = [ "PhotonL2Decisions" ] +from TrigOutputHandling.TrigOutputHandlingConf import HLTEDMCreator +edmCreator = HLTEDMCreator() +edmCreator.TrigCompositeContainer = [ "EgammaCaloDecisions", "PhotonL2Decisions", "EMRoIDecisions", "HLTChainsResult" ] + + +egammaViewsMerger = HLTEDMCreator("egammaViewsMerger") + +summary.OutputTools = [ edmCreator, egammaViewsMerger ] + + summary.OutputLevel = DEBUG -steps = seqAND("HLTSteps", [ step0, step1, summary ] ) +steps = seqAND("HLTSteps", [ step0, step1, step0r, summary ] ) -mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) -mon.L1Decision = "HLTChains" +from TrigSteerMonitor.TrigSteerMonitorConf import TrigSignatureMoniMT +mon = TrigSignatureMoniMT() mon.FinalDecisions = [ "PhotonL2Decisions", "MuonL2Decisions", "WhateverElse" ] -mon.HLTSummary = "MonitoringSummary" +from TrigUpgradeTest.TestUtils import MenuTest +mon.ChainsList = [ x.split(":")[1] for x in MenuTest.CTPToChainMapping ] mon.OutputLevel = DEBUG -hltTop = seqOR( "hltTop", [ steps, mon] ) +import AthenaPoolCnvSvc.WriteAthenaPool +from OutputStreamAthenaPool.OutputStreamAthenaPool import createOutputStream +StreamESD=createOutputStream("StreamESD","myESD.pool.root",True) +StreamESD.OutputLevel=VERBOSE +topSequence.remove( StreamESD ) + +def addTC(name): + StreamESD.ItemList += [ "xAOD::TrigCompositeContainer#"+name, "xAOD::TrigCompositeAuxContainer#"+name+"Aux." ] + +for tc in edmCreator.TrigCompositeContainer: + addTC( tc ) + +addTC("HLTSummary") + +StreamESD.ItemList += [ "xAOD::TrigPhotonContainer#HLT_photons"] + +print "ESD file content " +print StreamESD.ItemList + + +hltTop = seqOR( "hltTop", [ steps, mon, summary, StreamESD ] ) topSequence += hltTop - + + + + + diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_photon_run_data.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_photon_run_data.sh new file mode 100755 index 000000000000..a66201f9e6ac --- /dev/null +++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_photon_run_data.sh @@ -0,0 +1,5 @@ +#!/bin/sh +# art-type: build +# art-ci: master + +athena --threads=1 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/photon.withViews.py -- GitLab From ab481c5fd8e9e64dd98d383c4ac6841487795d50 Mon Sep 17 00:00:00 2001 From: Batool Safarzadeh Samani <safarzad@lxplus098.cern.ch> Date: Mon, 21 May 2018 15:13:42 +0200 Subject: [PATCH 004/562] Photon Hypo. ... Former-commit-id: 270caf57545f7d79b72b35c9b4567d9b783c6de4 --- .../src/components/TrigEgammaHypo_entries.cxx | 1 + .../TrigUpgradeTest/share/photon.withViews.py | 28 ------------------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx index 5a492dcc08d8..7028cf9ab5f8 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx @@ -43,4 +43,5 @@ DECLARE_COMPONENT( TrigL2CaloHypoToolInc ) DECLARE_COMPONENT( TrigL2CaloHypoToolMult ) DECLARE_COMPONENT( TrigL2ElectronHypoTool ) DECLARE_COMPONENT( TrigL2ElectronFexMT ) +DECLARE_COMPONENT( TrigL2ElectronHypoTool ) DECLARE_COMPONENT( TrigL2PhotonHypoTool ) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/photon.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/photon.withViews.py index a5e0b53f322c..eea2ee6a8486 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/photon.withViews.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/photon.withViews.py @@ -4,34 +4,6 @@ include("TrigUpgradeTest/testHLT_MT.py") -#workaround to prevent online trigger folders to be enabled -from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags -InDetTrigFlags.useConditionsClasses.set_Value_and_Lock(False) - - -from InDetRecExample.InDetJobProperties import InDetFlags -InDetFlags.doCaloSeededBrem = False - - -from InDetRecExample.InDetJobProperties import InDetFlags -InDetFlags.InDet25nsec = True -InDetFlags.doPrimaryVertex3DFinding = False -InDetFlags.doPrintConfigurables = False -InDetFlags.doResolveBackTracks = True -InDetFlags.doSiSPSeededTrackFinder = True -InDetFlags.doTRTPhaseCalculation = True -InDetFlags.doTRTSeededTrackFinder = True -InDetFlags.doTruth = False -InDetFlags.init() - -# PixelLorentzAngleSvc and SCTLorentzAngleSvc -include("InDetRecExample/InDetRecConditionsAccess.py") - -from AthenaCommon.AlgSequence import AlgSequence -topSequence = AlgSequence() - - -from InDetRecExample.InDetKeys import InDetKeys # provide a minimal menu information if globalflags.InputFormat.is_bytestream(): -- GitLab From 97fc9f1130f856acdfec71e4063cee2cfa12453d Mon Sep 17 00:00:00 2001 From: Batool Safarzadeh Samani <batool.safarzadeh.samani@cern.ch> Date: Mon, 21 May 2018 13:33:22 +0000 Subject: [PATCH 005/562] Update photon.withViews.py Former-commit-id: f19942a8a15b425a6aa3e14f79e1924ab92f0b4d --- .../TrigUpgradeTest/share/photon.withViews.py | 29 ------------------- 1 file changed, 29 deletions(-) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/photon.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/photon.withViews.py index a5e0b53f322c..93d53a29dbe3 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/photon.withViews.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/photon.withViews.py @@ -4,35 +4,6 @@ include("TrigUpgradeTest/testHLT_MT.py") -#workaround to prevent online trigger folders to be enabled -from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags -InDetTrigFlags.useConditionsClasses.set_Value_and_Lock(False) - - -from InDetRecExample.InDetJobProperties import InDetFlags -InDetFlags.doCaloSeededBrem = False - - -from InDetRecExample.InDetJobProperties import InDetFlags -InDetFlags.InDet25nsec = True -InDetFlags.doPrimaryVertex3DFinding = False -InDetFlags.doPrintConfigurables = False -InDetFlags.doResolveBackTracks = True -InDetFlags.doSiSPSeededTrackFinder = True -InDetFlags.doTRTPhaseCalculation = True -InDetFlags.doTRTSeededTrackFinder = True -InDetFlags.doTruth = False -InDetFlags.init() - -# PixelLorentzAngleSvc and SCTLorentzAngleSvc -include("InDetRecExample/InDetRecConditionsAccess.py") - -from AthenaCommon.AlgSequence import AlgSequence -topSequence = AlgSequence() - - -from InDetRecExample.InDetKeys import InDetKeys - # provide a minimal menu information if globalflags.InputFormat.is_bytestream(): topSequence.L1DecoderTest.ctpUnpacker.OutputLevel=DEBUG -- GitLab From fe41b723596903c5950fce20ef018afaf45ba40d Mon Sep 17 00:00:00 2001 From: Batool Safarzadeh Samani <batool.safarzadeh.samani@cern.ch> Date: Tue, 22 May 2018 11:46:28 +0000 Subject: [PATCH 006/562] Update TrigL2PhotonHypoAlgMT.h Former-commit-id: 5fab336f2b429011e0e7e8fd183ebaabced17295 --- .../TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.h index a28ea6cc6e91..f89a9a1c84f0 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.h +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.h @@ -1,8 +1,9 @@ /* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef TRIGEGAMMAHYPO_L2TRIGL2PHOTONHYPOALG_H -#define TRIGEGAMMAHYPO_L2TRIGL2PHOTONHYPOALG_H 1 + +#ifndef TRIGEGAMMAHYPO_TRIGL2PHOTONHYPOALGMT_H +#define TRIGEGAMMAHYPO_TRIGL2PHOTONHYPOALGMT_H 1 #include <string> @@ -50,4 +51,5 @@ class TrigL2PhotonHypoAlgMT : public ::HypoBase }; -#endif //> !TRIGEGAMMAHYPO_TRIGL2PHOTONHYPOALG_H +#endif //> !TRIGEGAMMAHYPO_TRIGL2PHOTONHYPOALGMT_H + -- GitLab From 47cda243a5d074e2ddd9fe89a4ebd18c7b0a03e8 Mon Sep 17 00:00:00 2001 From: Batool Safarzadeh Samani <batool.safarzadeh.samani@cern.ch> Date: Tue, 22 May 2018 11:48:20 +0000 Subject: [PATCH 007/562] Update TrigEgammaHypo_entries.cxx Former-commit-id: 9f349c37fe7282eda99b4984bb2152e8e98ab4aa --- .../TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx index 5a492dcc08d8..58bb0b14ee88 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx @@ -1,5 +1,6 @@ #include "TrigEgammaHypo/TrigL2CaloHypo.h" #include "TrigEgammaHypo/TrigL2ElectronFex.h" +#include "TrigEgammaHypo/TrigL2PhotonFex.h" #include "TrigEgammaHypo/TrigL2ElectronHypo.h" #include "../TrigL2PhotonFexMT.h" #include "TrigEgammaHypo/TrigL2PhotonHypo.h" @@ -24,6 +25,7 @@ DECLARE_COMPONENT( TrigL2CaloHypo ) DECLARE_COMPONENT( TrigL2ElectronFex ) +DECLARE_COMPONENT( TrigL2PhotonFex ) DECLARE_COMPONENT( TrigL2ElectronHypo ) DECLARE_COMPONENT( TrigL2PhotonFexMT ) DECLARE_COMPONENT( TrigL2PhotonHypo ) -- GitLab From a09baccfc9c958d342963288f7d8cb49dc7bde36 Mon Sep 17 00:00:00 2001 From: Batool Safarzadeh Samani <safarzad@lxplus098.cern.ch> Date: Thu, 24 May 2018 18:07:14 +0200 Subject: [PATCH 008/562] updaate PhotonHypoTool Former-commit-id: 67304a0d0be8f7586059f117b464d32c055d3132 --- .../TrigEgammaHypo/src/TrigL2PhotonFexMT.h | 24 ++------ .../src/TrigL2PhotonHypoAlgMT.h | 10 ++-- .../src/TrigL2PhotonHypoTool.cxx | 2 +- .../TrigEgammaHypo/src/TrigL2PhotonHypoTool.h | 22 +++---- .../src/components/TrigEgammaHypo_entries.cxx | 4 +- .../TrigUpgradeTest/share/photon.withViews.py | 57 ++++++++----------- 6 files changed, 49 insertions(+), 70 deletions(-) diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonFexMT.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonFexMT.h index 20d69ae5acea..0f1032e7d8ec 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonFexMT.h +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonFexMT.h @@ -3,25 +3,9 @@ */ -/************************************************************************** - ** - ** Original Author: R.Goncalo - ** - ** File: Trigger/TrigHypothesis/TrigEgammaHypo/TrigL2PhotonFex.h - ** - ** Class Description: Fex algo for TrigPhotons - ** - ** Authors: R. Goncalo - ** V. Perez-Reale - ** N. Berger - ** A. Hamilton - ** - ** Created: Tue Nov 28 16:01:12 CET 2006 - ** - **************************************************************************/ - -#ifndef TRIG_PHOTON_FEX_H -#define TRIG_PHOTON_FEX_H + +#ifndef TRIG_PHOTON_FEXMT_H +#define TRIG_PHOTON_FEXMT_H // athena stuff #include "GaudiKernel/IToolSvc.h" @@ -51,7 +35,7 @@ /** - * \class TrigL2PhotonFex + * \class TrigL2PhotonFexMT * \brief TrigL2PhotonFex is an HLT Fex Algorithm that creates TrigPhotons * from the the L2 TrigEMClusters that passed the TrigL2CaloHypo. * The TrigPhotons will then be retrieved by the hypothesis algorithm TrigL2PhotonHypo diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.h index a28ea6cc6e91..026e17646f3c 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.h +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.h @@ -1,8 +1,8 @@ /* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef TRIGEGAMMAHYPO_L2TRIGL2PHOTONHYPOALG_H -#define TRIGEGAMMAHYPO_L2TRIGL2PHOTONHYPOALG_H 1 +#ifndef TRIGEGAMMAHYPO_TRIGL2PHOTONHYPOALGMT_H +#define TRIGEGAMMAHYPO_TRIGL2PHOTONHYPOALGMT_H 1 #include <string> @@ -18,6 +18,8 @@ #include "ITrigL2CaloHypoTool.h" + + /** * @class TrigL2PhotonHypoAlgoMT * @brief Implements Hypo selection on L2 photons @@ -40,7 +42,7 @@ class TrigL2PhotonHypoAlgMT : public ::HypoBase private: TrigL2PhotonHypoAlgMT(); ToolHandleArray< TrigL2PhotonHypoTool > m_hypoTools {this, "HypoTools", {}, "Tools to perfrom selection"}; - Gaudi::Property< bool > m_runInView { this, "RunInView", false , "Set input DH for running in views" }; + Gaudi::Property< bool > m_runInView { this, "RunInView", false , "Set input DH for running in views" }; // internally used to getch from views SG::ReadHandleKey< xAOD::TrigPhotonContainer > m_photonsKey {this, "Photons", "L2PhotonContainer", "Input"}; @@ -50,4 +52,4 @@ class TrigL2PhotonHypoAlgMT : public ::HypoBase }; -#endif //> !TRIGEGAMMAHYPO_TRIGL2PHOTONHYPOALG_H +#endif //> !TRIGEGAMMAHYPO_TRIGL2PHOTONHYPOALGMT_H diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.cxx index 4d47bf0d3c23..83982a03b6f8 100755 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.cxx @@ -110,7 +110,7 @@ bool TrigL2PhotonHypoTool::decideOnSingleObject( const xAOD::TrigPhoton* photon, cutCounter++; // Determine which eta bin to apply the cuts - float absEta = fabs( photon->eta() ); + double absEta = fabs( photon->eta() ); int etaBin = -1; for (std::size_t iBin = 0; iBin < m_etabin.size()-1; iBin++) if ( absEta > m_etabin[iBin] && absEta < m_etabin[iBin+1] ) etaBin = iBin; diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.h index 0bd1d8fcff70..ea24e7187812 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.h +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.h @@ -61,17 +61,17 @@ class TrigL2PhotonHypoTool : virtual public ::AthAlgTool Gaudi::Property<bool> m_respectPreviousDecision{ this, "RespectPreviousDecision", false, "If false, ( do not even check ), the decision made for the cluster" }; Gaudi::Property<bool> m_acceptAll{ this, "AcceptAll", false, "Ignore selection" }; Gaudi::Property<bool> m_etCutOnly{ this, "EtCutOnly", false, "" }; - Gaudi::Property< std::vector<float> > m_etabin{ this, "EtaBins", {0}, "Eta bins" }; - - Gaudi::Property< std::vector<float> > m_detacluster{ this, "dETACLUSTERthr", {0.2}, "Delta Eta to Cluster" }; - Gaudi::Property< std::vector<float> > m_dphicluster{ this, "dPHICLUSTERthr", {0.2}, "Delta Phi to Cluster" }; - Gaudi::Property< std::vector<float> > m_F1thr{ this, "F1thr", {0}, "F1 Threshold" }; - std::vector<std::vector <double> > m_eTthr; - std::vector<std::vector <double> > m_eT2thr; - std::vector<std::vector <double> > m_hadeTthr; - std::vector<std::vector <double> > m_hadeT2thr; - std::vector<std::vector <double> > m_carcorethr; - std::vector<std::vector <double> > m_caeratiothr; + Gaudi::Property< std::vector<double> > m_etabin{ this, "EtaBins", {}, "Eta bins" }; + + Gaudi::Property< std::vector<double> > m_detacluster{ this, "dETACLUSTERthr", {0.2}, "Delta Eta to Cluster" }; + Gaudi::Property< std::vector<double> > m_dphicluster{ this, "dPHICLUSTERthr", {0.2}, "Delta Phi to Cluster" }; + Gaudi::Property< std::vector<double> > m_F1thr{ this, "F1thr", {}, "F1 Threshold" }; + Gaudi::Property< std::vector<std::vector<double>> > m_eTthr{this, "m_eTthr", {{}}, "et threshold"}; + Gaudi::Property< std::vector<std::vector<double>> > m_eT2thr{this, "m_eT2thr", {{}}, "eT2 threshold"}; + Gaudi::Property< std::vector<std::vector<double>> > m_hadeTthr{this, "m_hadeTthr", {{}}, "hadet threshold"}; + Gaudi::Property< std::vector<std::vector<double>> > m_hadeT2thr{this, "m_hadeT2thr", {{}}, "hadet2 threshold"}; + Gaudi::Property< std::vector<std::vector<double>> > m_carcorethr{this, "m_carcorethr", {{}}, "car core threshold"}; + Gaudi::Property< std::vector<std::vector<double>> > m_caeratiothr{this, "m_caeratiothr", {{}}, " cera ratio threshold"}; size_t m_multiplicity = 1; diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx index 7028cf9ab5f8..8ea30da4a842 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx @@ -2,6 +2,7 @@ #include "TrigEgammaHypo/TrigL2ElectronFex.h" #include "TrigEgammaHypo/TrigL2ElectronHypo.h" #include "../TrigL2PhotonFexMT.h" +#include "TrigEgammaHypo/TrigL2PhotonFex.h" #include "TrigEgammaHypo/TrigL2PhotonHypo.h" #include "TrigEgammaHypo/TrigEFDielectronMassHypo.h" #include "TrigEgammaHypo/TrigEFDielectronMassFex.h" @@ -24,6 +25,7 @@ DECLARE_COMPONENT( TrigL2CaloHypo ) DECLARE_COMPONENT( TrigL2ElectronFex ) +DECLARE_COMPONENT( TrigL2PhotonFex ) DECLARE_COMPONENT( TrigL2ElectronHypo ) DECLARE_COMPONENT( TrigL2PhotonFexMT ) DECLARE_COMPONENT( TrigL2PhotonHypo ) @@ -42,6 +44,6 @@ DECLARE_COMPONENT( TrigL2PhotonHypoAlgMT ) DECLARE_COMPONENT( TrigL2CaloHypoToolInc ) DECLARE_COMPONENT( TrigL2CaloHypoToolMult ) DECLARE_COMPONENT( TrigL2ElectronHypoTool ) +DECLARE_COMPONENT( TrigL2PhotonHypoTool ) DECLARE_COMPONENT( TrigL2ElectronFexMT ) DECLARE_COMPONENT( TrigL2ElectronHypoTool ) -DECLARE_COMPONENT( TrigL2PhotonHypoTool ) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/photon.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/photon.withViews.py index eea2ee6a8486..9a58caa9f18a 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/photon.withViews.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/photon.withViews.py @@ -4,8 +4,6 @@ include("TrigUpgradeTest/testHLT_MT.py") - -# provide a minimal menu information if globalflags.InputFormat.is_bytestream(): topSequence.L1DecoderTest.ctpUnpacker.OutputLevel=DEBUG topSequence.L1DecoderTest.roiUnpackers[0].OutputLevel=DEBUG @@ -102,26 +100,36 @@ filterCaloRoIsAlg.OutputLevel = DEBUG +l2PhotonViewsMaker = EventViewCreatorAlgorithm("l2PhotonViewsMaker", OutputLevel=DEBUG) +l2PhotonViewsMaker.InputMakerInputDecisions = [ filterCaloRoIsAlg.Output[0] ] # output of L2CaloHypo +l2PhotonViewsMaker.RoIsLink = "roi" # -||- +l2PhotonViewsMaker.InViewRoIs = "EMIDRoIs" # contract with the fastCalo +l2PhotonViewsMaker.Views = "EMPhotonViews" +l2PhotonViewsMaker.ViewFallThrough = True +l2PhotonViewsMaker.InputMakerOutputDecisions = ["L2PhotonLinks"] + +photonInViewAlgs = parOR("photonInViewAlgs", [thePhotonFex ]) +l2PhotonViewsMaker.ViewNodeName = "photonInViewAlgs" + + from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2PhotonHypoAlgMT from TrigEgammaHypo.TrigL2PhotonHypoTool import TrigL2PhotonHypoToolFromName thePhotonHypo = TrigL2PhotonHypoAlgMT() thePhotonHypo.RunInView=True thePhotonHypo.Photons = thePhotonFex.PhotonsName - thePhotonHypo.OutputLevel = VERBOSE - thePhotonHypo.HypoTools = [ TrigL2PhotonHypoToolFromName( c ) for c in testChains ] + for t in thePhotonHypo.HypoTools: t.OutputLevel = VERBOSE # topSequence += thePhotonHypo # InDetCacheCreatorTrigViews, -photonSequence = seqAND("photonSequence", [ thePhotonHypo ] ) +photonSequence = seqAND("photonSequence", [ l2PhotonViewsMaker , photonInViewAlgs, thePhotonHypo ] ) egammaIDStep = stepSeq("egammaIDStep", filterCaloRoIsAlg, [ photonSequence ] ) # CF construction - from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg summaryStep0 = TriggerSummaryAlg( "TriggerSummaryStep1" ) summaryStep0.InputDecision = "HLTChains" @@ -140,14 +148,22 @@ step0r = parOR("step0r", [ egammaCaloStepRR ]) summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) summary.InputDecision = "HLTChains" -summary.FinalDecisions = [ "PhotonL2Decisions" ] +summary.FinalDecisions = [ "ElectronL2Decisions", "MuonL2Decisions" ] from TrigOutputHandling.TrigOutputHandlingConf import HLTEDMCreator edmCreator = HLTEDMCreator() -edmCreator.TrigCompositeContainer = [ "EgammaCaloDecisions", "PhotonL2Decisions", "EMRoIDecisions", "HLTChainsResult" ] +edmCreator.TrigCompositeContainer = [ "EgammaCaloDecisions", "PhotonL2Decisions", "MuonL2Decisions", "EMRoIDecisions", "METRoIDecisions", "MURoIDecisions", "HLTChainsResult" ] + egammaViewsMerger = HLTEDMCreator("egammaViewsMerger") +egammaViewsMerger.TrigPhotonContainerViews = [ l2PhotonViewsMaker.Views ] +egammaViewsMerger.TrigPhotonContainerInViews = [ thePhotonFex.PhotonsName ] +egammaViewsMerger.TrigPhotonContainer = ["HLT_photons"] + + + + summary.OutputTools = [ edmCreator, egammaViewsMerger ] @@ -162,30 +178,5 @@ from TrigUpgradeTest.TestUtils import MenuTest mon.ChainsList = [ x.split(":")[1] for x in MenuTest.CTPToChainMapping ] mon.OutputLevel = DEBUG -import AthenaPoolCnvSvc.WriteAthenaPool -from OutputStreamAthenaPool.OutputStreamAthenaPool import createOutputStream -StreamESD=createOutputStream("StreamESD","myESD.pool.root",True) -StreamESD.OutputLevel=VERBOSE -topSequence.remove( StreamESD ) - -def addTC(name): - StreamESD.ItemList += [ "xAOD::TrigCompositeContainer#"+name, "xAOD::TrigCompositeAuxContainer#"+name+"Aux." ] - -for tc in edmCreator.TrigCompositeContainer: - addTC( tc ) - -addTC("HLTSummary") - -StreamESD.ItemList += [ "xAOD::TrigPhotonContainer#HLT_photons"] - -print "ESD file content " -print StreamESD.ItemList - - -hltTop = seqOR( "hltTop", [ steps, mon, summary, StreamESD ] ) -topSequence += hltTop - - - -- GitLab From 40b53e93cbbfad570b3a41f01b47e338ef5bdf58 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Fri, 25 May 2018 10:52:27 +0200 Subject: [PATCH 009/562] Adding testing JOs Former-commit-id: b88f80d61c6ce94b8987a83ee4e84a7f81cf328d --- Trigger/TrigValidation/TrigUpgradeTest/share/checkESD.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Trigger/TrigValidation/TrigUpgradeTest/share/checkESD.py diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/checkESD.py b/Trigger/TrigValidation/TrigUpgradeTest/share/checkESD.py new file mode 100644 index 000000000000..d63c5f9dd252 --- /dev/null +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/checkESD.py @@ -0,0 +1,6 @@ +include("AthenaPoolDataModelTest/esdtoesd_base.py") + +svcMgr.EventSelector.InputCollections = [ "myESD.pool.root" ] +from TrigValAlgs.TrigValAlgsConf import TrigEDMChecker +checker = TrigEDMChecker() +topSequence += checker -- GitLab From 115b28c67fa0d879df3d49146f5c1f1fec79f0af Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Fri, 25 May 2018 18:32:37 +0200 Subject: [PATCH 010/562] Extended functionality to print TrigComposite Former-commit-id: abbb779b116e68d460eb979a15baff9ced6f79c5 --- .../TrigValAlgs/TrigValAlgs/TrigEDMChecker.h | 3 ++ .../TrigValAlgs/src/TrigEDMChecker.cxx | 41 +++++++++++++++++-- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/Trigger/TrigValidation/TrigValAlgs/TrigValAlgs/TrigEDMChecker.h b/Trigger/TrigValidation/TrigValAlgs/TrigValAlgs/TrigEDMChecker.h index 52afb7d1cd57..cfe5071d7fe9 100755 --- a/Trigger/TrigValidation/TrigValAlgs/TrigValAlgs/TrigEDMChecker.h +++ b/Trigger/TrigValidation/TrigValAlgs/TrigValAlgs/TrigEDMChecker.h @@ -163,6 +163,9 @@ class TrigEDMChecker : public AthAlgorithm { void dumpTrigVertexCounts(); void dumpTrigTrackCounts(); + + std::vector<std::string> m_dumpTrigCompositeContainers; + StatusCode dumpTrigComposite(); ToolHandle<Rec::IMuonPrintingTool> m_muonPrinter; }; diff --git a/Trigger/TrigValidation/TrigValAlgs/src/TrigEDMChecker.cxx b/Trigger/TrigValidation/TrigValAlgs/src/TrigEDMChecker.cxx index dd592db2a487..68f2aef5ba91 100644 --- a/Trigger/TrigValidation/TrigValAlgs/src/TrigEDMChecker.cxx +++ b/Trigger/TrigValidation/TrigValAlgs/src/TrigEDMChecker.cxx @@ -13,6 +13,8 @@ #include "xAODTrigger/TrigPassBitsContainer.h" #include "xAODTrigger/TrigPassBits.h" +#include "xAODTrigger/TrigCompositeContainer.h" +#include "AthContainers/debug.h" #include "xAODJet/JetContainer.h" #include "xAODJet/JetConstituentVector.h" #include "xAODTrigMissingET/TrigMissingETAuxContainer.h" @@ -140,6 +142,7 @@ TrigEDMChecker::TrigEDMChecker(const std::string& name, ISvcLocator* pSvcLocator declareProperty("doDumpxAODVertex", m_doDumpxAODVertex = false); declareProperty("doDumpxAODTauJetContainer", m_doDumpxAODTauJetContainer = false); declareProperty("doDumpxAODTrigMinBias", m_doDumpxAODTrigMinBias = false); + declareProperty("dumpTrigCompositeContainers", m_dumpTrigCompositeContainers, "List of TC to dump" ); } @@ -187,8 +190,8 @@ StatusCode TrigEDMChecker::initialize() { ATH_MSG_INFO("REGTEST m_doDumpxAODVertex = " << m_doDumpxAODVertex ); ATH_MSG_INFO("REGTEST m_doDumpxAODTauJetContainer = " << m_doDumpxAODTauJetContainer ); ATH_MSG_INFO("REGTEST m_doDumpxAODTrigMinBias = " << m_doDumpxAODTrigMinBias ); - - + ATH_MSG_INFO("REGTEST dumpTrigCompositeContainers = " << m_dumpTrigCompositeContainers ); + // puts this here for the moment maxRepWarnings = 5; ATH_MSG_INFO("maxRepWarning = " << maxRepWarnings ); @@ -490,7 +493,9 @@ StatusCode TrigEDMChecker::execute() { ATH_MSG_ERROR("The method dumpTrigPassBits() failed"); } } - + + ATH_CHECK( dumpTrigComposite() ); + return StatusCode::SUCCESS; } @@ -3932,3 +3937,33 @@ StatusCode TrigEDMChecker::dumpxAODVertex() { return StatusCode::SUCCESS; } + +StatusCode TrigEDMChecker::dumpTrigComposite() { + ATH_MSG_INFO( "REGTEST ==========END of xAOD::TrigCompositeContainer DUMP===========" ); + for ( const std::string & key: m_dumpTrigCompositeContainers ) { + // get the collection + if ( not evtStore()->contains<xAOD::TrigCompositeContainer>(key) ) { + ATH_MSG_INFO("Absent TrigCompositeContainer: " << key ); + continue; + } + ATH_MSG_DEBUG( "Dumping container of : " << key ); + const xAOD::TrigCompositeContainer* cont= nullptr; + ATH_CHECK( evtStore()->retrieve( cont, key ) ); + + for ( auto tc: *cont ) { + ATH_MSG_DEBUG("name: " << tc->name()); + + // one gets a bit of info but is not that useful, we need to develop + //SGdebug::print_aux_vars( *tc ); + //SGdebug::dump_aux_vars( *tc ); + + // find the EL and check them + ATH_MSG_DEBUG( "Link col names : " << tc->linkColNames() ); + ATH_MSG_DEBUG( "Link col keys : " << tc->linkColKeys() ); + ATH_MSG_DEBUG( "Link col CLIDs : " << tc->linkColClids() ); + ATH_MSG_DEBUG( "Link col indices : " << tc->linkColIndices() ); + } + } + ATH_MSG_INFO( "REGTEST ==========END of xAOD::TrigCompositeContainer DUMP===========" ); + return StatusCode::SUCCESS; +} -- GitLab From 2ef3305f4ac61f0582c263ec5ad50535deae2496 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Fri, 25 May 2018 18:33:09 +0200 Subject: [PATCH 011/562] ESD validation script Former-commit-id: 236de2bf2077f4aef4e35d841ad402eaa415ffd4 --- .../TrigUpgradeTest/share/checkESD.py | 16 ++++++++++++++-- .../TrigUpgradeTest/share/egamma.withViews.py | 19 +++++++++++++++---- .../test/test_egamma_run_data.sh | 2 ++ 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/checkESD.py b/Trigger/TrigValidation/TrigUpgradeTest/share/checkESD.py index d63c5f9dd252..b779924bf707 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/checkESD.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/checkESD.py @@ -1,6 +1,18 @@ include("AthenaPoolDataModelTest/esdtoesd_base.py") -svcMgr.EventSelector.InputCollections = [ "myESD.pool.root" ] +svcMgr.EventSelector.InputCollections = [ "myESD.pool.root" ] from TrigValAlgs.TrigValAlgsConf import TrigEDMChecker -checker = TrigEDMChecker() +checker = TrigEDMChecker() +checker.OutputLevel = DEBUG +checker.doDumpAll = False +checker.doDumpxAODTrigElectronContainer = True +checker.doDumpxAODTrackParticle = True +# this list was obtained by: checkxAOD.py myESD.pool.root | grep Composite | tr -s " "| cut -d" " -f10 | awk '{print "\""$1"\""}' | tr "\n" "," > f +checker.dumpTrigCompositeContainers = ["MURoIDecisions","MuonL2Decisions","ElectronL2Decisions" + ,"HLTSummary","EMRoIDecisions","METRoIDecisions","HLTChainsResult", + "EgammaCaloDecisions","MURoIDecisions","MuonL2Decisions", + "ElectronL2Decisions","HLTSummary","METRoIDecisions", + "EgammaCaloDecisions","EMRoIDecisions","HLTChainsResult"] + +from AthenaCommon.AppMgr import topSequence topSequence += checker diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py index cf4dbd700706..52b89fae039f 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py @@ -222,12 +222,17 @@ edmCreator.TrigCompositeContainer = [ "EgammaCaloDecisions", "ElectronL2Decision egammaViewsMerger = HLTEDMCreator("egammaViewsMerger") egammaViewsMerger.TrackParticleContainerViews = [ l2ElectronViewsMaker.Views ] -egammaViewsMerger.TrackParticleContainerInViews = [ theElectronFex.TrackParticlesName ] -egammaViewsMerger.TrackParticleContainer = ["HLT_electron_tracks"] +egammaViewsMerger.TrackParticleContainerInViews = [ "xAODTracks" ] +egammaViewsMerger.TrackParticleContainer = ["HLT_xAOD_TrackParticleContainer_L2ElectronTracks"] egammaViewsMerger.TrigElectronContainerViews = [ l2ElectronViewsMaker.Views ] egammaViewsMerger.TrigElectronContainerInViews = [ theElectronFex.ElectronsName ] -egammaViewsMerger.TrigElectronContainer = ["HLT_electrons"] +egammaViewsMerger.TrigElectronContainer = ["HLT_xAOD__TrigElectronContainer_L2ElectronFex"] + +egammaViewsMerger.TrigEMClusterContainerViews = [ "EMCaloViews" ] +egammaViewsMerger.TrigEMClusterContainerInViews = [ "L2CaloClusters" ] +egammaViewsMerger.TrigEMClusterContainer = ["HLT_xAOD__TrigEMClusterContainer_L2CaloClusters"] + @@ -260,7 +265,13 @@ for tc in edmCreator.TrigCompositeContainer: addTC("HLTSummary") -StreamESD.ItemList += [ "xAOD::TrigElectronContainer#HLT_electrons", "xAOD::TrackParticleContainer#HLT_electron_tracks"] +StreamESD.ItemList += [ "xAOD::TrigElectronContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFex", + "xAOD::TrackParticleContainer#HLT_xAOD_TrackParticleContainer_L2ElectronTracks", + "xAOD::TrigEMClusterContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters"] + +StreamESD.ItemList += [ "xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux.", + "xAOD::TrackParticleAuxContainer#HLT_xAOD_TrackParticleContainer_L2ElectronTracksAux.", + "xAOD::TrigEMClusterAuxContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux."] print "ESD file content " print StreamESD.ItemList diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_run_data.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_run_data.sh index 22ba9893239b..70978b0e0d46 100755 --- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_run_data.sh +++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_run_data.sh @@ -3,3 +3,5 @@ # art-ci: master athena --dump-config=CONF.txt --threads=1 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/egamma.withViews.py +checkxAOD.py myESD.pool.root +athena TrigUpgradeTest/checkESD.py \ No newline at end of file -- GitLab From acd9e5e2621fad22608285fcab338c9e141b0038 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Mon, 28 May 2018 21:50:30 +0200 Subject: [PATCH 012/562] Streamlined/fixed logic of finding object through parent views Former-commit-id: 544b5b0402b13f6a518d7ff678c54a79b626822e --- Control/AthViews/src/SimpleView.cxx | 32 ++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Control/AthViews/src/SimpleView.cxx b/Control/AthViews/src/SimpleView.cxx index f74aeaf65d79..20b6b66c1c29 100644 --- a/Control/AthViews/src/SimpleView.cxx +++ b/Control/AthViews/src/SimpleView.cxx @@ -69,24 +69,24 @@ SG::DataProxy * SimpleView::proxy_exact( SG::sgkey_t sgkey ) const SG::DataProxy * SimpleView::proxy( const CLID& id, const std::string& key ) const { const std::string viewKey = m_name + "_" + key; - auto local = m_store->proxy( id, viewKey ); - + auto localProxy = m_store->proxy( id, viewKey ); + if ( localProxy ) + return localProxy; + for ( auto parent: m_parents ) { - auto dp = parent->proxy( id, key ); - if ( dp and not local ) { - return dp; - } else if ( dp and local ) { - throw std::runtime_error("Duplicate object CLID:"+ std::to_string(id) + " key: " + key + " found in views: " + name()+ " and parent " + parent->name() ); - } // else search further + auto proxyInParent = parent->proxy( id, key ); + if ( proxyInParent != nullptr ) { + return proxyInParent; + } // else look further } - - //Look in the default store - change to fix IDC - if ( m_allowFallThrough and not local ) - { - return m_store->proxy( id, key ); - } - - return local; // can be the nullptr still + + //Look in the default store if cound not find in any view - for instance for event-wise IDCs + if ( m_allowFallThrough ) { + auto mainStoreProxy = m_store->proxy( id, key ); + return mainStoreProxy; + } + + return localProxy; // can be the nullptr still } -- GitLab From 34447a3e6dbb72a56509ad7a7ade8f39694bfbcb Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Mon, 28 May 2018 21:51:04 +0200 Subject: [PATCH 013/562] Finished testing the ESD writing Former-commit-id: 523b0585c217f772185be492d777348fc56a072b --- .../TrigUpgradeTest/share/egamma.withViews.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py index 52b89fae039f..fa831a22340a 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py @@ -225,6 +225,7 @@ egammaViewsMerger.TrackParticleContainerViews = [ l2ElectronViewsMaker.Views ] egammaViewsMerger.TrackParticleContainerInViews = [ "xAODTracks" ] egammaViewsMerger.TrackParticleContainer = ["HLT_xAOD_TrackParticleContainer_L2ElectronTracks"] +# this merging directive causes the issue egammaViewsMerger.TrigElectronContainerViews = [ l2ElectronViewsMaker.Views ] egammaViewsMerger.TrigElectronContainerInViews = [ theElectronFex.ElectronsName ] egammaViewsMerger.TrigElectronContainer = ["HLT_xAOD__TrigElectronContainer_L2ElectronFex"] @@ -233,16 +234,16 @@ egammaViewsMerger.TrigEMClusterContainerViews = [ "EMCaloViews" ] egammaViewsMerger.TrigEMClusterContainerInViews = [ "L2CaloClusters" ] egammaViewsMerger.TrigEMClusterContainer = ["HLT_xAOD__TrigEMClusterContainer_L2CaloClusters"] +egammaViewsMerger.OutputLevel = VERBOSE - - +svcMgr.StoreGateSvc.OutputLevel = VERBOSE summary.OutputTools = [ edmCreator, egammaViewsMerger ] summary.OutputLevel = DEBUG -steps = seqAND("HLTSteps", [ step0, step1, step0r, summary ] ) +steps = seqAND("HLTSteps", [ step0, step1, step0r ] ) from TrigSteerMonitor.TrigSteerMonitorConf import TrigSignatureMoniMT mon = TrigSignatureMoniMT() @@ -254,7 +255,6 @@ mon.OutputLevel = DEBUG import AthenaPoolCnvSvc.WriteAthenaPool from OutputStreamAthenaPool.OutputStreamAthenaPool import createOutputStream StreamESD=createOutputStream("StreamESD","myESD.pool.root",True) -StreamESD.OutputLevel=VERBOSE topSequence.remove( StreamESD ) def addTC(name): -- GitLab From e983f54310abffe9760e789fd0148f7eb70806ba Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Tue, 29 May 2018 10:58:01 +0200 Subject: [PATCH 014/562] Removed check from the test that we do not implement it now Former-commit-id: 5eb1ea6941a9a13a85ef1d925e692e7790c4e62a --- Control/AthViews/test/ViewLinking_test.cxx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Control/AthViews/test/ViewLinking_test.cxx b/Control/AthViews/test/ViewLinking_test.cxx index 088ba42b6e59..1d1ebca03f24 100644 --- a/Control/AthViews/test/ViewLinking_test.cxx +++ b/Control/AthViews/test/ViewLinking_test.cxx @@ -99,11 +99,6 @@ void testDataInView( StoreGateSvc* /*sg*/ , MsgStream& log ) { } - { - SG::ReadHandle<TestClass> rh( "test1" ); - rh.setProxyDict( childView ); - EXPECT_EXCEPTION( std::runtime_error, rh.isValid() ); - } log << MSG::INFO << "Hiding works as expected " << endmsg; -- GitLab From 425d479cf680a7f33492b7778c8e9235ae737d75 Mon Sep 17 00:00:00 2001 From: Walter Lampl <Walter.Lampl@cern.ch> Date: Tue, 29 May 2018 17:22:03 +0200 Subject: [PATCH 015/562] allow config-methods to return their 'principal component'. Use this functionality for private tools Former-commit-id: 9cf0cda0de7c8317a1054234a33b1b04968dfcdb --- .../CaloRec/python/CaloCellMakerConfig.py | 2 +- .../python/ComponentAccumulator.py | 38 +++++++------------ .../python/LArBadChannelConfig.py | 6 +-- .../LArCellRec/python/LArCellBuilderConfig.py | 11 +----- 4 files changed, 20 insertions(+), 37 deletions(-) diff --git a/Calorimeter/CaloRec/python/CaloCellMakerConfig.py b/Calorimeter/CaloRec/python/CaloCellMakerConfig.py index bc2f3b1aa3ed..6fb8d62c3ec6 100644 --- a/Calorimeter/CaloRec/python/CaloCellMakerConfig.py +++ b/Calorimeter/CaloRec/python/CaloCellMakerConfig.py @@ -20,7 +20,7 @@ def CaloCellMakerCfg(configFlags): theTileCellBuilder = TileCellBuilder() result.addEventAlgo(CaloCellMaker(CaloCellMakerToolNames=theLArCellMaker+ - [CaloCellContainerFinalizerTool()]+theLArCellCorrectors, + [CaloCellContainerFinalizerTool(),]+theLArCellCorrectors, CaloCellsOutputName="AllCalo")) return result diff --git a/Control/AthenaConfiguration/python/ComponentAccumulator.py b/Control/AthenaConfiguration/python/ComponentAccumulator.py index 0073c98f3bd5..e47b5ad09fc1 100644 --- a/Control/AthenaConfiguration/python/ComponentAccumulator.py +++ b/Control/AthenaConfiguration/python/ComponentAccumulator.py @@ -8,6 +8,7 @@ from AthenaCommon.AlgSequence import AlgSequence from AthenaConfiguration.AthConfigFlags import AthConfigFlags import GaudiKernel.GaudiHandles as GaudiHandles import ast +import collections class DeduplicationFailed(RuntimeError): pass @@ -44,8 +45,6 @@ class ComponentAccumulator(object): self._theAppProps=dict() #Properties of the ApplicationMgr - self._privateTools=[] #Private tools are not merged! Belong to parent algo - #Backward compatiblity hack: Allow also public tools: self._publicTools=[] @@ -161,16 +160,6 @@ class ComponentAccumulator(object): self._deduplicate(newSvc,self._services) #will raise on conflict return newSvc - def addAlgTool(self,newTool): - if not isinstance(newTool,ConfigurableAlgTool): - raise TypeError("Attempt to add wrong type as AlgTool") - self._privateTools.append(newTool) - return newTool - - - def clearAlgTools(self): - self._privateTools=[] - def addPublicTool(self,newTool): if not isinstance(newTool,ConfigurableAlgTool): @@ -232,9 +221,6 @@ class ComponentAccumulator(object): return svc raise KeyError("No service with name %s known" % name) - def getAlgTools(self): - return self._privateTools - def getAlgTool(self,name): for tool in self._privateTools: if tool.getName()==name: @@ -361,16 +347,20 @@ class ComponentAccumulator(object): retval=fct(configFlags,*args,**kwargs) CurrentSequence.set( currentSeq ) - self.__merge(retval) - - #Get private tools if there are any - #Those are not merged and not passed through the call-chain, - #instead we overwrite whatever was there before - #The client is supposed to grab the private tools and attach - #them to their parent component - self._privateTools=retval._privateTools - return self._privateTools + if isinstance(retval,collections.Sequence) and len(retval)>0: + toMerge=retval[0] + toReturn=list(retval[1:]) + elif isinstance(retval,ComponentAccumulator): + toMerge=retval + toReturn=[] + else: + print retval + raise ConfigurationError("Return value of configuration methods must be instaces of ComponentAccumulator or tuples starting with an instance of ComponentAccumulator") + + + self.__merge(toMerge) + return toReturn def appendConfigurable(self,confElem): name=confElem.getJobOptName() # to be FIXED diff --git a/LArCalorimeter/LArBadChannelTool/python/LArBadChannelConfig.py b/LArCalorimeter/LArBadChannelTool/python/LArBadChannelConfig.py index 0829ab9ae170..558ab72a15e0 100644 --- a/LArCalorimeter/LArBadChannelTool/python/LArBadChannelConfig.py +++ b/LArCalorimeter/LArBadChannelTool/python/LArBadChannelConfig.py @@ -50,10 +50,10 @@ def LArBadChannelMaskerCfg(configFlags,problemsToMask,doMasking=True, result=ComponentAccumulator() result.addConfig(LArBadChannelCfg,configFlags) - result.addAlgTool(LArBadChannelMasker(ToolName,ProblemsToMask=problemsToMask, - DoMasking=doMasking)) + bcMasker=LArBadChannelMasker(ToolName,ProblemsToMask=problemsToMask, + DoMasking=doMasking) - return result + return result,bcMasker diff --git a/LArCalorimeter/LArCellRec/python/LArCellBuilderConfig.py b/LArCalorimeter/LArCellRec/python/LArCellBuilderConfig.py index 5833ee4b0461..ac799e76f93b 100644 --- a/LArCalorimeter/LArCellRec/python/LArCellBuilderConfig.py +++ b/LArCalorimeter/LArCellRec/python/LArCellBuilderConfig.py @@ -10,10 +10,7 @@ def LArCellBuilderCfg(configFlags): theLArCellBuilder = LArCellBuilderFromLArRawChannelTool() theLArCellBuilder.addDeadOTX = False #Create flag? Requires bad-feb DB access - result.addAlgTool(theLArCellBuilder) - - - return result + return result,theLArCellBuilder @@ -47,11 +44,7 @@ def LArCellCorrectorCfg(configFlags): #Many more tools to be added, eg HV correction - result.clearAlgTools() - for t in correctionTools: - result.addAlgTool(t) - - return result + return [result,]+correctionTools -- GitLab From e3e05e24848c38a46bb5000d9d15b50470d95685 Mon Sep 17 00:00:00 2001 From: Peter van Gemmeren <gemmeren@anl.gov> Date: Tue, 29 May 2018 13:01:42 -0500 Subject: [PATCH 016/562] Some clean-up to allow iterating proxies rather than reading DataHeader when possible. Former-commit-id: 814c0b8865c0cdb39383623d680dba4ae49e867a --- .../share/EventSplit_jo.py | 1 + .../src/AthenaOutputStreamTool.cxx | 8 ++- .../CMakeLists.txt | 2 +- .../AthenaPoolExample_FilterJobOptions.py | 1 + .../src/AthenaPoolAddressProviderSvc.cxx | 71 +++++++++++-------- .../src/EventSelectorAthenaPool.cxx | 10 --- .../src/EventSelectorAthenaPool.h | 1 - .../src/RegistrationStream.cxx | 6 ++ 8 files changed, 54 insertions(+), 46 deletions(-) diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/EventSplit_jo.py b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/EventSplit_jo.py index 916d538db3ec..bf31cf15371b 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/EventSplit_jo.py +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/EventSplit_jo.py @@ -45,6 +45,7 @@ svcMgr.PoolSvc.WriteCatalog = "XMLFileCatalog_file:EventSplit.xml" #svcMgr.EventSelector.InputCollections = ["AthenaPoolMultiTest_Splittable0.root"]; # The input file name svcMgr.EventSelector.InputCollections = ["PFN:SplittableCollection.root"]; # The input file name svcMgr.EventSelector.CollectionType = "ExplicitROOT" +svcMgr.AthenaPoolAddressProviderSvc.DataHeaderIterator = False #-------------------------------------------------------------- # Private Application Configuration options diff --git a/Control/AthenaServices/src/AthenaOutputStreamTool.cxx b/Control/AthenaServices/src/AthenaOutputStreamTool.cxx index b01b8b25d487..bf5b2e53229e 100644 --- a/Control/AthenaServices/src/AthenaOutputStreamTool.cxx +++ b/Control/AthenaServices/src/AthenaOutputStreamTool.cxx @@ -184,13 +184,15 @@ StatusCode AthenaOutputStreamTool::connectOutput(const std::string& outputName) m_store->keys<DataHeader>(dhKeys); for (std::vector<std::string>::const_iterator dhKey = dhKeys.begin(), dhKeyEnd = dhKeys.end(); dhKey != dhKeyEnd; dhKey++) { - if (!m_store->transientContains<DataHeader>(*dhKey)) { // Do not retrieve BackNavigation DataHeader - continue; + bool primaryDH = false; + if (!m_store->transientContains<DataHeader>(*dhKey)) { + if (*dhKey == "EventSelector") primaryDH = true; + ATH_MSG_DEBUG("No transientContains DataHeader with key " << *dhKey); } if (m_store->retrieve(dh, *dhKey).isFailure()) { ATH_MSG_DEBUG("Unable to retrieve the DataHeader with key " << *dhKey); } - if (dh->checkStatus(DataHeader::Primary)) { + if (dh->checkStatus(DataHeader::Primary) || primaryDH) { // Add DataHeader token to new DataHeader if (m_extendProvenanceRecord) { std::string pTag; diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/CMakeLists.txt b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/CMakeLists.txt index 07561a00d135..4a8b00339ac1 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/CMakeLists.txt +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/CMakeLists.txt @@ -100,7 +100,7 @@ _add_test( AthenaPoolExample_ReadBN # Read all output w/o BackNavigation _add_test( AthenaPoolExample_ReadNoBN "athena.py AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadNoBNJobOptions.py" - EXTRA_PATTERNS "BYTES_READ|DEBUG lookupPFN|DEBUG registered PFN|XMLCatalog +INFO" + EXTRA_PATTERNS "BYTES_READ|READ_CALLS|DEBUG lookupPFN|DEBUG registered PFN|XMLCatalog +INFO" DEPENDS AthenaPoolExampleAlgorithms_AthenaPoolExample_ReWrite_ctest ) # Copy 'Hits' file without extending provenance diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_FilterJobOptions.py b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_FilterJobOptions.py index 330c26fb5b47..2697ef2a3b94 100755 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_FilterJobOptions.py +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_FilterJobOptions.py @@ -58,6 +58,7 @@ import AthenaPoolCnvSvc.ReadAthenaPool svcMgr.EventSelector.InputCollections = [ "SimplePoolCollection3.root" ]; # ** mandatory parameter ** // The input file name svcMgr.EventSelector.CollectionType = "ExplicitROOT" +svcMgr.AthenaPoolAddressProviderSvc.DataHeaderIterator = False svcMgr.EventSelector.Query = "EventNumber > 5" diff --git a/Database/AthenaPOOL/EventSelectorAthenaPool/src/AthenaPoolAddressProviderSvc.cxx b/Database/AthenaPOOL/EventSelectorAthenaPool/src/AthenaPoolAddressProviderSvc.cxx index be48f00ef0ee..f4ab4ffa2942 100755 --- a/Database/AthenaPOOL/EventSelectorAthenaPool/src/AthenaPoolAddressProviderSvc.cxx +++ b/Database/AthenaPOOL/EventSelectorAthenaPool/src/AthenaPoolAddressProviderSvc.cxx @@ -139,47 +139,56 @@ StatusCode AthenaPoolAddressProviderSvc::loadAddresses(StoreID::type storeID, oid2 = token.oid().second; } } + const DataHandle<DataHeader> dataHeader; if (thisFile == Guid::null() || oid2 == 0L || thisFile != m_guid) { // New file (or reading DataHeader) - const DataHandle<DataHeader> dataHeader; if (!eventStore()->retrieve(dataHeader, m_dataHeaderKey.value()).isSuccess() || !dataHeader.isValid()) { ATH_MSG_ERROR("Cannot retrieve DataHeader from StoreGate."); return(StatusCode::FAILURE); } - dataHeader->setStatus(DataHeader::Primary); - ATH_MSG_DEBUG("The current Event contains: " << dataHeader->size() << " objects"); - for (const auto& element : *dataHeader) { - SG::TransientAddress* tadd = element.getAddress(); - if (tadd->clID() == ClassID_traits<DataHeader>::ID()) { // self reference - if (tadd->name() != "StreamRAW") { - if (tadd->name().empty() && dataHeader->sizeProvenance() == 1) { // reading DataHeader satellite - SG::TransientAddress* taddDh = dataHeader->beginProvenance()->getAddress(); - if (taddDh != 0) { - tads.push_back(new SG::TransientAddress(taddDh->clID(), "Full", taddDh->address())); // full DataHeader - } - delete taddDh; taddDh = 0; - } - dataHeader->setProcessTag(tadd->name()); - } - delete tadd; tadd = 0; - } else { - ATH_MSG_DEBUG("loadAddresses: DataObject address, clid = " << tadd->clID() << ", name = " << tadd->name()); - tadd->setProvider(this, storeID); - if (m_dataHeaderIterator) { - tadd->clearAddress(false); - } - tads.push_back(tadd); + if (m_dataHeaderIterator) { + ServiceHandle<StoreGateSvc> mds("MetaDataStore", name()); + if (!mds.retrieve().isFailure()) { + const DataHeader* dataHeaderCopy = new DataHeader(*dataHeader.cptr()); + if (mds->record(dataHeaderCopy, thisFile.toString()).isFailure()) ATH_MSG_WARNING("Can't copy event DataHeader to MetaData store."); } - EventSelectorAthenaPoolUtil::registerKeys(element, eventStore()); } - m_guid = thisFile; - } else { // Iterating in current file, use DataHeader file entry number for all object references. - for (const auto& proxy : eventStore()->proxies()) { - TokenAddress* tokAddr = dynamic_cast<TokenAddress*>(proxy->address()); - if (tokAddr != 0 && tokAddr->getToken() != 0) { - const_cast<Token*>(tokAddr->getToken())->oid().second = oid2; + } else { + ServiceHandle<StoreGateSvc> mds("MetaDataStore", name()); + if (mds.retrieve().isFailure() || mds->retrieve(dataHeader, thisFile.toString()).isFailure()) { + ATH_MSG_WARNING("Can't get event DataHeader from MetaData store."); + if (!eventStore()->retrieve(dataHeader, m_dataHeaderKey.value()).isSuccess() || !dataHeader.isValid()) { + ATH_MSG_ERROR("Cannot retrieve DataHeader from StoreGate."); + return(StatusCode::FAILURE); } } } + dataHeader->setStatus(DataHeader::Primary); + ATH_MSG_DEBUG("The current Event contains: " << dataHeader->size() << " objects"); + for (const auto& element : *dataHeader) { + if (m_dataHeaderIterator) { // Get oid2 (event file entry number) from DataHeader proxy + const_cast<Token*>(element.getToken())->oid().second = oid2; + } + SG::TransientAddress* tadd = element.getAddress(); + if (tadd->clID() == ClassID_traits<DataHeader>::ID()) { // self reference + if (tadd->name() != "StreamRAW") { + if (tadd->name().empty() && dataHeader->sizeProvenance() == 1) { // reading DataHeader satellite + SG::TransientAddress* taddDh = dataHeader->beginProvenance()->getAddress(); + if (taddDh != 0) { + tads.push_back(new SG::TransientAddress(taddDh->clID(), "Full", taddDh->address())); // full DataHeader + } + delete taddDh; taddDh = 0; + } + dataHeader->setProcessTag(tadd->name()); + } + delete tadd; tadd = 0; + } else { + ATH_MSG_DEBUG("loadAddresses: DataObject address, clid = " << tadd->clID() << ", name = " << tadd->name()); + tadd->setProvider(this, storeID); + tads.push_back(tadd); + } + EventSelectorAthenaPoolUtil::registerKeys(element, eventStore()); + } + m_guid = thisFile; return(StatusCode::SUCCESS); } //________________________________________________________________________________ diff --git a/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.cxx b/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.cxx index e1a60aca6854..8f8fd83306ce 100755 --- a/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.cxx +++ b/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.cxx @@ -48,7 +48,6 @@ EventSelectorAthenaPool::EventSelectorAthenaPool(const std::string& name, ISvcLo m_beginIter(0), m_endIter(0), m_activeStoreSvc("ActiveStoreSvc", name), - m_tagDataStore("StoreGateSvc/TagMetaDataStore", name), m_poolCollectionConverter(0), m_headerIterator(0), m_guid(), @@ -156,11 +155,6 @@ StatusCode EventSelectorAthenaPool::initialize() { ATH_MSG_FATAL("Cannot get " << m_athenaPoolCnvSvc.typeAndName() << "."); return(StatusCode::FAILURE); } - // Get TagMetaDataStore - if (!m_tagDataStore.retrieve().isSuccess()) { - ATH_MSG_FATAL("Cannot get " << m_tagDataStore.typeAndName() << "."); - return(StatusCode::FAILURE); - } // Get CounterTool (if configured) if (!m_counterTool.empty() && !m_counterTool.retrieve().isSuccess()) { ATH_MSG_FATAL("Cannot get CounterTool."); @@ -470,10 +464,6 @@ StatusCode EventSelectorAthenaPool::finalize() { if (!m_helperTools.release().isSuccess()) { ATH_MSG_WARNING("Cannot release " << m_helperTools); } - // Release TagMetaDataStore - if (!m_tagDataStore.release().isSuccess()) { - ATH_MSG_WARNING("Cannot release " << m_tagDataStore.typeAndName() << "."); - } // Release AthenaPoolCnvSvc if (!m_athenaPoolCnvSvc.release().isSuccess()) { ATH_MSG_WARNING("Cannot release " << m_athenaPoolCnvSvc.typeAndName() << "."); diff --git a/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.h b/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.h index e3801bbb53b9..2c1b42787670 100755 --- a/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.h +++ b/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.h @@ -145,7 +145,6 @@ private: // data EventContextAthenaPool* m_endIter; ServiceHandle<ActiveStoreSvc> m_activeStoreSvc; - ServiceHandle<StoreGateSvc> m_tagDataStore; mutable PoolCollectionConverter* m_poolCollectionConverter; mutable pool::ICollectionCursor* m_headerIterator; diff --git a/Database/RegistrationServices/src/RegistrationStream.cxx b/Database/RegistrationServices/src/RegistrationStream.cxx index 5875df464e02..654b76440c88 100755 --- a/Database/RegistrationServices/src/RegistrationStream.cxx +++ b/Database/RegistrationServices/src/RegistrationStream.cxx @@ -346,6 +346,12 @@ StatusCode RegistrationStream::getRefs(std::vector< std::pair<std::string,std::s } } } + if (hdr==0) { + if (evtStore()->retrieve(hdr, "EventSelector").isFailure()) { + ATH_MSG_DEBUG ("Could not retrieve DataHeader with key EventSelector."); + continue; + } + } } else { // i.e. key is not "*" StatusCode status = StatusCode::FAILURE; -- GitLab From 8b8852a739ae634e031319a7462f1bc4a38908a4 Mon Sep 17 00:00:00 2001 From: Peter Hansen <hansenph@lxplus002.cern.ch> Date: Wed, 30 May 2018 00:26:47 +0200 Subject: [PATCH 017/562] Update TRT conditions access Former-commit-id: ebbe65b347062982184b51671aadde1f46c9026c --- .../python/InDetAlignFolders.py | 28 +- .../TRT_ConditionsAlgs/TRTCondWrite.h | 59 +-- .../TRT_ConditionsAlgs/src/TRTCondWrite.cxx | 154 +------ .../src/TRTStrawStatusWrite.cxx | 78 +--- .../TRT_ConditionsServices/ITRT_CalDbSvc.h | 3 +- .../ITRT_StrawStatusSummarySvc.h | 20 +- .../src/TRT_CalDbSvc.cxx | 213 +++++++-- .../TRT_ConditionsServices/src/TRT_CalDbSvc.h | 22 +- .../src/TRT_StrawStatusSummarySvc.cxx | 407 +++++++++--------- .../src/TRT_StrawStatusSummarySvc.h | 143 ++++-- .../share/InDetRecConditionsAccess.py | 37 +- .../python/InDetTrigConfigConditions.py | 38 +- 12 files changed, 586 insertions(+), 616 deletions(-) diff --git a/InnerDetector/InDetConditions/InDetCondFolders/python/InDetAlignFolders.py b/InnerDetector/InDetConditions/InDetCondFolders/python/InDetAlignFolders.py index 3c0f20a9836d..31a88aa02c8c 100644 --- a/InnerDetector/InDetConditions/InDetCondFolders/python/InDetAlignFolders.py +++ b/InnerDetector/InDetConditions/InDetCondFolders/python/InDetAlignFolders.py @@ -1,17 +1,31 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration from IOVDbSvc.CondDB import conddb - +from AthenaCommon.AthenaCommonFlags import athenaCommonFlags +from AthenaCommon.DetFlags import DetFlags # Inner Detector alignment #conddb.addFolderSplitOnline("INDET","/Indet/Onl/Align","/Indet/Align") #conddb.addFolderSplitOnline("TRT","/TRT/Onl/Align","/TRT/Align") conddb.addFolderSplitOnline("TRT","/TRT/Onl/Calib/DX","/TRT/Calib/DX") -#conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/StatusHT","/TRT/Cond/StatusHT",className='TRTCond::StrawStatusMultChanContainer') -conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/StatusHT","/TRT/Cond/StatusHT") -#conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/Status","/TRT/Cond/Status",className='TRTCond::StrawStatusMultChanContainer') -conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/Status","/TRT/Cond/Status") -#conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/StatusPermanent","/TRT/Cond/StatusPermanent",className='TRTCond::StrawStatusMultChanContainer') -conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/StatusPermanent","/TRT/Cond/StatusPermanent") + +# Dead/Noisy Straw Lists +if DetFlags.simulate.any_on() or athenaCommonFlags.EvtMax==1: # revert to old style CondHandle in case of simulation or streaming to sqlite + conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/Status","/TRT/Cond/Status") +else: + conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/Status","/TRT/Cond/Status",className='TRTCond::StrawStatusMultChanContainer') + +if DetFlags.simulate.any_on() or athenaCommonFlags.EvtMax==1: + conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/StatusPermanent","/TRT/Cond/StatusPermanent") +else: + conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/StatusPermanent","/TRT/Cond/StatusPermanent",className='TRTCond::StrawStatusMultChanContainer') + +# Argon straw list +if DetFlags.simulate.any_on() or athenaCommonFlags.EvtMax==1: + conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/StatusHT","/TRT/Cond/StatusHT") +else: + conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/StatusHT","/TRT/Cond/StatusHT",className='TRTCond::StrawStatusMultChanContainer') + + # Pixel module distortions conddb.addFolderSplitOnline("INDET","/Indet/Onl/PixelDist","/Indet/PixelDist") # IBL stave distortions diff --git a/InnerDetector/InDetConditions/TRT_ConditionsAlgs/TRT_ConditionsAlgs/TRTCondWrite.h b/InnerDetector/InDetConditions/TRT_ConditionsAlgs/TRT_ConditionsAlgs/TRTCondWrite.h index 5e77608a7c33..f96abc772797 100755 --- a/InnerDetector/InDetConditions/TRT_ConditionsAlgs/TRT_ConditionsAlgs/TRTCondWrite.h +++ b/InnerDetector/InDetConditions/TRT_ConditionsAlgs/TRT_ConditionsAlgs/TRTCondWrite.h @@ -7,34 +7,24 @@ /** @file TRTCondWrite.h * @brief Algorithm to read/write TRT Conditions objects in - * the TRTCond namespace from/to text file or StoreGate Conditions Store. - * This should replace all TRT Conditions CALL-BACKs in tools and services + * the TRTCond namespace from/to text file or StoreGate. * @author Peter Hansen <phansen@nbi.dk> **/ // #include <vector> #include <string> -#include "AthenaBaseComps/AthReentrantAlgorithm.h" +#include "AthenaBaseComps/AthAlgorithm.h" #include "GaudiKernel/ServiceHandle.h" -//#include "GaudiKernel/ThreadLocalContext.h" #include "TRT_ConditionsServices/ITRT_CalDbSvc.h" -#include "GaudiKernel/ICondSvc.h" -#include "StoreGate/WriteCondHandleKey.h" -#include "StoreGate/ReadCondHandleKey.h" -#include "GaudiKernel/EventIDBase.h" -#include "GaudiKernel/EventIDRange.h" -#include "GaudiKernel/DataObjID.h" - - class TRT_ID; /** @class TRTCondWrite - write constants in TRTCond namespace to persistency + write/read constants in TRTCond namespace to/from text **/ -class TRTCondWrite:public AthReentrantAlgorithm { +class TRTCondWrite:public AthAlgorithm { public: typedef TRTCond::RtRelationMultChanContainer RtRelationContainer ; typedef TRTCond::StrawT0MultChanContainer StrawT0Container ; @@ -45,50 +35,19 @@ public: /** destructor **/ ~TRTCondWrite(void); - virtual StatusCode initialize(void) override; - virtual StatusCode execute_r(const EventContext& ctx) const override; - virtual StatusCode finalize(void) override; - // IOV method - EventIDBase runlbl (int run, int lbl) const; + virtual StatusCode initialize(void); + virtual StatusCode execute(void); + virtual StatusCode finalize(void); private: ServiceHandle<ITRT_CalDbSvc> m_caldbtool; //<! db tool const TRT_ID* m_trtid; //!< trt id helper bool m_setup; //!< true at first event - std::string m_par_calfile; //!< calibration text file specified in jobOptions + std::string m_par_calfile; //!< calibration text file specified in jobOptions std::string m_par_caloutputfile; - - ServiceHandle<ICondSvc> m_condSvc; - - // ReadHandle keys - SG::ReadCondHandleKey<RtRelationContainer> m_rtReadKey{this,"RtReadKeyName","in","r-t relation in-key"}; - SG::ReadCondHandleKey<RtRelationContainer> m_errReadKey{this,"ErrorReadKeyName","in","error on r in-key"}; - SG::ReadCondHandleKey<RtRelationContainer> m_slopeReadKey{this,"SlopeReadKeyName","in","slope of error in-key"}; - SG::ReadCondHandleKey<StrawT0Container> m_t0ReadKey{this,"T0ReadKeyName","in","t0 in-key"}; - - // WriteHandle keys - SG::WriteCondHandleKey<RtRelationContainer> m_rtWriteKey{this,"RtWriteKeyName","out","r-t relation out-key"}; - SG::WriteCondHandleKey<RtRelationContainer> m_errWriteKey{this,"ErrorWriteKeyName","out","error on r out-key"}; - SG::WriteCondHandleKey<RtRelationContainer> m_slopeWriteKey{this,"SlopeWriteKeyName","out","slope of error out-key"}; - SG::WriteCondHandleKey<StrawT0Container> m_t0WriteKey{this,"T0WriteKeyName","in","t0 out-key"}; - // IOV - int m_run1; - int m_lbl1; - int m_run2; - int m_lbl2; - - }; -inline -EventIDBase TRTCondWrite::runlbl (int run, int lbl) const -{ - return EventIDBase (run, // run - EventIDBase::UNDEFNUM, // event - EventIDBase::UNDEFNUM, // timestamp - EventIDBase::UNDEFNUM, // timestamp ns - lbl); // lumiblock -} + #endif // TRTCONDITIONSALGS_TRTCONDWRITE_H diff --git a/InnerDetector/InDetConditions/TRT_ConditionsAlgs/src/TRTCondWrite.cxx b/InnerDetector/InDetConditions/TRT_ConditionsAlgs/src/TRTCondWrite.cxx index 10cb77e34a1f..599d37513d19 100755 --- a/InnerDetector/InDetConditions/TRT_ConditionsAlgs/src/TRTCondWrite.cxx +++ b/InnerDetector/InDetConditions/TRT_ConditionsAlgs/src/TRTCondWrite.cxx @@ -6,50 +6,30 @@ #include <iostream> #include <string> #include "TRT_ConditionsAlgs/TRTCondWrite.h" -#include "StoreGate/ReadCondHandle.h" -#include "StoreGate/WriteCondHandle.h" #include "InDetIdentifier/TRT_ID.h" -#include "AthenaKernel/IOVTime.h" /** @file TRTCondWrite.cxx * Algoritm for publishing TRT Calibration constants to CondStore * * If constants are supplied by text-files these are read - * filled into CondStore by help of TRT_CalDbSvc + * filled into Storegate by help of TRT_CalDbSvc * - * If an output text file is specified, the contents of CondStore are dumped. + * If an output text file is specified, the contents of Storegate are dumped. * * @author Peter Hansen <phansen@nbi.dk> **/ TRTCondWrite::TRTCondWrite(const std::string& name, ISvcLocator* pSvcLocator) - :AthReentrantAlgorithm (name, pSvcLocator), + :AthAlgorithm (name, pSvcLocator), m_caldbtool("TRT_CalDbSvc",name), m_trtid(0), m_setup(false), m_par_calfile(""), - m_par_caloutputfile(""), //set this to calibout_n, where n=0,1,2,3 refers to the format - m_condSvc("CondSvc",name), - m_rtReadKey("/TRT/Calib/RT"), - m_errReadKey("/TRT/Calib/errors2d"), - m_slopeReadKey("/TRT/Calib/slopes"), - m_t0ReadKey("/TRT/Calib/T0"), - m_rtWriteKey("/TRT/Calib/RT"), - m_errWriteKey("/TRT/Calib/Errors2d"), - m_slopeWriteKey("/TRT/Calib/Slopes"), - m_t0WriteKey("/TRT/Calib/T0"), - m_run1(1), - m_lbl1(0), - m_run2(2147483647), - m_lbl2(2147483647) + m_par_caloutputfile("") //set this to calibout_n, where n=0,1,2,3 refers to the format { // declare algorithm parameters declareProperty("CalibInputFile",m_par_calfile); declareProperty("CalibOutputFile",m_par_caloutputfile); - declareProperty("StartRunIOV",m_run1); - declareProperty("StartLblIOV",m_lbl1); - declareProperty("EndRunIOV",m_run2); - declareProperty("EndLblIOV",m_lbl2); } TRTCondWrite::~TRTCondWrite(void) @@ -74,137 +54,45 @@ StatusCode TRTCondWrite::initialize() { return StatusCode::FAILURE; } - - // CondSvc - ATH_CHECK( m_condSvc.retrieve() ); - // Read keys - ATH_CHECK( m_rtReadKey.initialize() ); - ATH_CHECK( m_errReadKey.initialize() ); - ATH_CHECK( m_slopeReadKey.initialize() ); - ATH_CHECK( m_t0ReadKey.initialize() ); - // Write keys - ATH_CHECK( m_rtWriteKey.initialize() ); - ATH_CHECK( m_errWriteKey.initialize() ); - ATH_CHECK( m_slopeWriteKey.initialize() ); - ATH_CHECK( m_t0WriteKey.initialize() ); - if (m_par_calfile!="") ATH_MSG_INFO("Calibration constants will be read from text file "); return StatusCode::SUCCESS; } -StatusCode TRTCondWrite::execute_r(const EventContext& ctx) const { +StatusCode TRTCondWrite::execute(){ StatusCode sc = StatusCode::SUCCESS; // // at first event: if (!m_setup) { - const_cast<TRTCondWrite*>(this)->m_setup=true; - - EventIDRange rangeW(runlbl(m_run1,m_lbl1),runlbl(m_run2,m_lbl2)); //IOV + m_setup=true; + //Read text file. if(!m_par_calfile.empty()) { - bool useit=true; - m_caldbtool->useCachedPtr(useit); //to avoid reading the pointers from CondStore before they are written + msg(MSG::INFO) << " A calibration text file is supplied. Remember to block the relevant folders and set EvtMax=1" << endmsg; + int format=0; - msg(MSG::INFO) << " A calibration text file is supplied. Remember to block the relevant folders in InDetRecConditionsAccess.py" << endmsg; - int format=0; // text file format - //Read text file. sc=m_caldbtool->readTextFile(m_par_calfile, format); if(sc!=StatusCode::SUCCESS) { msg(MSG::ERROR) << " Could not read TRT Calibration from " << m_par_calfile << endmsg; return sc; } + //Write text file. + } else if (!m_par_caloutputfile.empty()) { - // In the following, the new containers are recorded in SG - // Register Rt write handle - //if ( m_condSvc->regHandle(const_cast<TRTCondWrite*>(this), m_rtWriteKey, m_rtWriteKey.dbKey()).isFailure()) { - if ( m_condSvc->regHandle(const_cast<TRTCondWrite*>(this), m_rtWriteKey).isFailure()) { - ATH_MSG_ERROR("unable to register WriteCondHandle " << m_rtWriteKey.fullKey() << " with CondSvc"); - return StatusCode::FAILURE; - } - SG::WriteCondHandle<RtRelationContainer> rtWriteHandle(m_rtWriteKey, ctx); - - if(rtWriteHandle.record(rangeW,m_caldbtool->getRtContainer()).isFailure()){ - ATH_MSG_ERROR("Failed to record RtRelationContainer " << rtWriteHandle.fullKey() << " with CondSvc "); - return StatusCode::FAILURE; - } - - // Register T0 write handle - //if ( m_condSvc->regHandle(const_cast<TRTCondWrite*>(this), m_t0WriteKey, m_t0WriteKey.dbKey()).isFailure()) { - if ( m_condSvc->regHandle(const_cast<TRTCondWrite*>(this), m_t0WriteKey).isFailure()) { - ATH_MSG_ERROR("unable to register WriteCondHandle " << m_t0WriteKey.fullKey() << " with CondSvc"); - return StatusCode::FAILURE; - } - // Write container to SG - SG::WriteCondHandle<StrawT0Container> t0WriteHandle(m_t0WriteKey, ctx); - if(t0WriteHandle.record(rangeW,m_caldbtool->getT0Container()).isFailure()){ - ATH_MSG_ERROR("Failed to record StrawT0Container " << t0WriteHandle.fullKey() << " with CondSvc "); - return StatusCode::FAILURE; - } - - if(format>1) { // the drift circle errors are included in the text file - // Register Error write handle - //if ( m_condSvc->regHandle(const_cast<TRTCondWrite*>(this), m_errWriteKey, m_errWriteKey.dbKey()).isFailure() ) { - if ( m_condSvc->regHandle(const_cast<TRTCondWrite*>(this), m_errWriteKey).isFailure() ) { - ATH_MSG_ERROR("unable to register WriteCondHandle " << m_errWriteKey.fullKey() << " with CondSvc"); - return StatusCode::FAILURE; - } - // Write container to SG - SG::WriteCondHandle<RtRelationContainer> errWriteHandle(m_errWriteKey, ctx); - if(errWriteHandle.record(rangeW,m_caldbtool->getErrContainer()).isFailure()){ - ATH_MSG_ERROR("Failed to record DC Error Container " << errWriteHandle.fullKey() << " with CondSvc "); - return StatusCode::FAILURE; - } - } else { // we read the errors from SG - SG::ReadCondHandle<RtRelationContainer> erc(m_errReadKey, ctx); - m_caldbtool->setErrContainer( const_cast<RtRelationContainer*>(*erc) ); - } - - if(format>2) { // the slope of the drift circle errors are included in the text file - // Register slope write handle - //if ( m_condSvc->regHandle(const_cast<TRTCondWrite*>(this), m_slopeWriteKey, m_slopeWriteKey.dbKey()).isFailure() ) { - if ( m_condSvc->regHandle(const_cast<TRTCondWrite*>(this), m_slopeWriteKey).isFailure() ) { - ATH_MSG_ERROR("unable to register WriteCondHandle " << m_slopeWriteKey.fullKey() << " with CondSvc"); - return StatusCode::FAILURE; - } - // Write container to SG - SG::WriteCondHandle<RtRelationContainer> slopeWriteHandle(m_slopeWriteKey, ctx); - if(slopeWriteHandle.record(rangeW,m_caldbtool->getSlopeContainer()).isFailure()){ - ATH_MSG_ERROR("Failed to record slope container " << slopeWriteHandle.fullKey() << " with CondSvc "); - return StatusCode::FAILURE; - } - } else { // we read the slopes from SG - SG::ReadCondHandle<RtRelationContainer> slc(m_slopeReadKey, ctx); - m_caldbtool->setSlopeContainer( const_cast<RtRelationContainer*>(*slc) ); - } - - } else { //no text file supplied. Read from SG - SG::ReadCondHandle<RtRelationContainer> rtc(m_rtReadKey, ctx); - m_caldbtool->setRtContainer( const_cast<RtRelationContainer*>(*rtc) ); - SG::ReadCondHandle<StrawT0Container> t0c(m_t0ReadKey, ctx); - m_caldbtool->setT0Container( const_cast<StrawT0Container*>(*t0c) ); - SG::ReadCondHandle<RtRelationContainer> erc(m_errReadKey, ctx); - m_caldbtool->setErrContainer( const_cast<RtRelationContainer*>(*erc) ); - SG::ReadCondHandle<RtRelationContainer> slc(m_slopeReadKey, ctx); - m_caldbtool->setSlopeContainer( const_cast<RtRelationContainer*>(*slc) ); - } - //Dump conditions containers - - if (m_par_caloutputfile!="") { std::ofstream outfile(m_par_caloutputfile.c_str()); if(m_par_caloutputfile=="calibout_0.txt") { outfile << "# Fileformat=" << 0 << std::endl ; sc=m_caldbtool->writeTextFile_Format0(outfile); - } else if (m_par_caloutputfile=="calibout_1.txt"){ + } else if (m_par_caloutputfile=="calibout_1.txt") { outfile << "# Fileformat=" << 1 << std::endl ; sc=m_caldbtool->writeTextFile_Format1(outfile); - } else if(m_par_caloutputfile=="calibout_2.txt") { + } else if (m_par_caloutputfile=="calibout_2.txt") { outfile << "# Fileformat=" << 2 << std::endl ; sc=m_caldbtool->writeTextFile_Format2(outfile); } else if (m_par_caloutputfile=="calibout_3.txt") { @@ -222,23 +110,7 @@ StatusCode TRTCondWrite::execute_r(const EventContext& ctx) const { } outfile.close(); } - return sc; } - // at each event: - // cache an EventSpecificPtr in TRT_CalDbTool - - if(m_par_calfile.empty()) { - SG::ReadCondHandle<RtRelationContainer> rtc(m_rtReadKey, ctx); - m_caldbtool->setRtContainer( const_cast<RtRelationContainer*>(*rtc) ); - SG::ReadCondHandle<StrawT0Container> t0c(m_t0ReadKey, ctx); - m_caldbtool->setT0Container( const_cast<StrawT0Container*>(*t0c) ); - SG::ReadCondHandle<RtRelationContainer> erc(m_errReadKey, ctx); - m_caldbtool->setErrContainer( const_cast<RtRelationContainer*>(*erc) ); - SG::ReadCondHandle<RtRelationContainer> slc(m_slopeReadKey, ctx); - m_caldbtool->setSlopeContainer( const_cast<RtRelationContainer*>(*slc) ); - } - - return sc; } diff --git a/InnerDetector/InDetConditions/TRT_ConditionsAlgs/src/TRTStrawStatusWrite.cxx b/InnerDetector/InDetConditions/TRT_ConditionsAlgs/src/TRTStrawStatusWrite.cxx index 2e90670f4e27..c16cb5ccdb98 100755 --- a/InnerDetector/InDetConditions/TRT_ConditionsAlgs/src/TRTStrawStatusWrite.cxx +++ b/InnerDetector/InDetConditions/TRT_ConditionsAlgs/src/TRTStrawStatusWrite.cxx @@ -1,7 +1,3 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - ////////////////////////////// //TRTStrawStatusWrite.cxx //////////////////////////// @@ -14,10 +10,9 @@ TRTStrawStatusWrite::TRTStrawStatusWrite( const std::string &name, ISvcLocator * AthAlgorithm( name, pSvcLocator ), m_trtStrawStatusIF("TRT_StrawStatusSummarySvc",name), m_trtStrawStatus("TRT_StrawStatusSummarySvc",name), - //m_par_statusfile("/afs/cern.ch/user/i/idcalib/w0/TRT_Calibration/uploadedDB/Status/AprilRepro/listHotStraws.collisions2010.athenaFormat.txt"), - m_par_statusfile("dummyNonExisting_TRT_StrawStatus_InputFile"), // /afs/cern.ch/user/i/idcalib/w0/TRT_Calibration/uploadedDB/Status/2010_09_10_sasa/listNoisyStraws.0162690.athenaFormat.txt"), + m_par_statusfile(""), m_par_statusfilepermanent(""), - m_par_statusfileHT("HTtest.t"), + m_par_statusfileHT(""), m_setup(false) { declareProperty("StatusTool",m_trtStrawStatusIF); @@ -32,26 +27,13 @@ TRTStrawStatusWrite::~TRTStrawStatusWrite( ) StatusCode TRTStrawStatusWrite::initialize() { - -// m_par_statusfile= "/afs/cern.ch/user/i/idcalib/w0/TRT_Calibration/uploadedDB/Status/AprilRepro/listHotStraws.collisions2010.athenaFormat.txt"; -// m_par_statusfile="/afs/cern.ch/user/i/idcalib/w0/TRT_Calibration/uploadedDB/Status/2010_09_10_sasa/listNoisyStraws.0162690.athenaFormat.txt"; -//"/afs/cern.ch/user/a/attrtcal/TRT_Calibration/uploadedDB/Status/2010_06_30/listNoisyStraws.0158269.athenaFormat.txt"; - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "TRTStrawStatusWrite initialise" << endmsg; - StatusCode sc; if(StatusCode::SUCCESS != m_trtStrawStatusIF.retrieve()){ - msg(MSG::ERROR) << " Can't get TRTStrawtatusTool" << endmsg; + msg(MSG::ERROR) << " Can't get TRTStrawstatusTool" << endmsg; return StatusCode::FAILURE; } - /* - m_trtStrawStatus=dynamic_cast<TRTStrawStatusSummaryTool *>(&(* m_trtStrawStatusIF)); - if(!m_trtStrawStatus){ - msg(MSG::ERROR) << " Can't do a dynamic cast to TRTStrawStatusSummaryTool" << endmsg; - return StatusCode::FAILURE; - } -*/ if( m_trtStrawStatus.retrieve().isFailure() ) { msg(MSG::ERROR) << " Can't do a dynamic cast to TRTStrawStatusSummaryTool" << endmsg; @@ -64,50 +46,30 @@ StatusCode TRTStrawStatusWrite::initialize() StatusCode TRTStrawStatusWrite::execute() { - -// static bool first_event = true; - -// if ( !first_event ) return StatusCode::SUCCESS; - - StatusCode sc; - - //m_par_statusfile= "/afs/cern.ch/user/i/idcalib/w0/TRT_Calibration/uploadedDB/Status/AprilRepro/listHotStraws.collisions2010.athenaFormat.txt"; -// m_par_statusfile="/afs/cern.ch/user/i/idcalib/w0/TRT_Calibration/uploadedDB/Status/2010_09_10_sasa/listNoisyStraws.0162690.athenaFormat.txt"; -// "/afs/cern.ch/user/a/attrtcal/TRT_Calibration/uploadedDB/Status/2010_06_30/listNoisyStraws.0158269.athenaFormat.txt"; - - msg(MSG::INFO) << "TRTStrawStatusWrite::execute write DB tag for straw status file " << m_par_statusfile << endmsg; - - // - // at first event: -// if (!m_setup) { -// m_setup=true; - -// if ( (m_par_statusfile!="") || (m_par_statusfilepermanent!="") ) { - // read status constants from text file -// if (m_par_statusfile!="") -sc=m_trtStrawStatus->readFromTextFile(m_par_statusfile); -// if (m_par_statusfilepermanent!="") sc=m_trtStrawStatus->readFromTextFile(m_par_statusfilepermanent); -// if (m_par_statusfileHT!="") sc=m_trtStrawStatus->readFromTextFile(m_par_statusfileHT); - + StatusCode sc = StatusCode::SUCCESS; + + msg(MSG::INFO) << "TRTStrawStatusWrite::execute write DB tag for files " + << m_par_statusfile << " " << m_par_statusfilepermanent << " " << m_par_statusfileHT << endmsg; + if (m_par_statusfile !="") sc=m_trtStrawStatus->readFromTextFile(m_par_statusfile); + if (m_par_statusfilepermanent !="") sc=m_trtStrawStatus->readFromTextFile(m_par_statusfilepermanent); + if (m_par_statusfileHT !="") sc=m_trtStrawStatus->readFromTextFile(m_par_statusfileHT); + if(sc!=StatusCode::SUCCESS) { - msg(MSG::ERROR) << " Could not read TRT StrawStatusSummary objects from " - << m_par_statusfile << endmsg; + msg(MSG::ERROR) << " Could not read TRT StrawStatusSummary objects " << endmsg; return StatusCode::FAILURE; } -// -// } else { -// -// sc=m_trtStrawStatus->writeToTextFile("strawstatussummary.txt"); -// -// } -// } - // first_event=false; - return StatusCode::SUCCESS; + return sc; } StatusCode TRTStrawStatusWrite::finalize() { - + + StatusCode sc ; + msg(MSG::INFO) << " Dump the Straw Status: " << endmsg; + sc = m_trtStrawStatus->writeToTextFile("StrawStatusDump_Writer.txt"); + if (sc.isFailure()) { + msg(MSG::ERROR) <<" Error writing the file out" <<endmsg; + } return StatusCode::SUCCESS; } diff --git a/InnerDetector/InDetConditions/TRT_ConditionsServices/TRT_ConditionsServices/ITRT_CalDbSvc.h b/InnerDetector/InDetConditions/TRT_ConditionsServices/TRT_ConditionsServices/ITRT_CalDbSvc.h index 51d9a3a96a7c..d2c3f6c32385 100644 --- a/InnerDetector/InDetConditions/TRT_ConditionsServices/TRT_ConditionsServices/ITRT_CalDbSvc.h +++ b/InnerDetector/InDetConditions/TRT_ConditionsServices/TRT_ConditionsServices/ITRT_CalDbSvc.h @@ -49,6 +49,7 @@ class ITRT_CalDbSvc: virtual public IService virtual StatusCode writeTextFile_Format1(std::ostream&) const =0; virtual StatusCode writeTextFile_Format2(std::ostream&) const =0; virtual StatusCode writeTextFile_Format3(std::ostream&) const =0; + virtual StatusCode checkTextFile(const std::string&, int&) =0; virtual StatusCode readTextFile(const std::string&, int&) =0; virtual StatusCode readTextFile_Format0(std::istream&) =0 ; virtual StatusCode readTextFile_Format1(std::istream&) =0 ; @@ -64,7 +65,7 @@ class ITRT_CalDbSvc: virtual public IService virtual void setErrContainer(RtRelationContainer*)= 0 ; virtual void setSlopeContainer(RtRelationContainer*)= 0 ; virtual void setT0Container(StrawT0Container*) = 0 ; - virtual void useCachedPtr(const bool&) = 0; + }; inline const InterfaceID& ITRT_CalDbSvc::interfaceID() { static const InterfaceID IID("ITRT_CalDbSvc",1,0); diff --git a/InnerDetector/InDetConditions/TRT_ConditionsServices/TRT_ConditionsServices/ITRT_StrawStatusSummarySvc.h b/InnerDetector/InDetConditions/TRT_ConditionsServices/TRT_ConditionsServices/ITRT_StrawStatusSummarySvc.h index a024dbfb9cd0..691ef777e9fe 100755 --- a/InnerDetector/InDetConditions/TRT_ConditionsServices/TRT_ConditionsServices/ITRT_StrawStatusSummarySvc.h +++ b/InnerDetector/InDetConditions/TRT_ConditionsServices/TRT_ConditionsServices/ITRT_StrawStatusSummarySvc.h @@ -47,23 +47,21 @@ class ITRT_StrawStatusSummarySvc: virtual public IService virtual bool get_pid_status(Identifier) =0; virtual void set_track_status(Identifier, bool) =0; virtual bool get_track_status(Identifier) =0; - virtual StatusCode readFromTextFile(const std::string&) =0; - virtual StatusCode writeToTextFile(const std::string& ) const =0; + virtual StatusCode readFromTextFile(const std::string& ) =0; + virtual StatusCode writeToTextFile(const std::string& ) =0; virtual StatusCode streamOutStrawStatObjects () const =0; virtual StatusCode registerObjects(std::string, int, int, int, int) const =0; - virtual StatusCode IOVCallBack(IOVSVC_CALLBACK_ARGS) =0; - virtual StrawStatusContainer* getStrawStatusContainer() const =0; - virtual StrawStatusContainer* getStrawStatusPermanentContainer() const =0; - virtual StrawStatusContainer* getStrawStatusHTContainer() const =0; + virtual const StrawStatusContainer* getStrawStatusContainer() =0; + virtual const StrawStatusContainer* getStrawStatusPermanentContainer() =0; + virtual const StrawStatusContainer* getStrawStatusHTContainer() =0; - virtual StatusCode ComputeAliveStraws() =0; + virtual void ComputeAliveStraws() =0; - - virtual int *getStwTotal() = 0; - virtual int **getStwLocal() = 0; - virtual int **getStwWheel() = 0; + virtual int *getStwTotal() = 0; + virtual int **getStwLocal() = 0; + virtual int **getStwWheel() = 0; }; diff --git a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_CalDbSvc.cxx b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_CalDbSvc.cxx index 29053d0b4b0b..45cc040c69d9 100644 --- a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_CalDbSvc.cxx +++ b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_CalDbSvc.cxx @@ -36,7 +36,10 @@ TRT_CalDbSvc::TRT_CalDbSvc( const std::string& name, ISvcLocator* pSvcLocator ) m_streamer("AthenaOutputStreamTool/CondStream1"), m_detstore("DetectorStore",name), m_condSvc("CondSvc",name), - m_useCachedPtr(false) + m_rtContainer(nullptr), + m_errContainer(nullptr), + m_slopeContainer(nullptr), + m_t0Container(nullptr) { declareProperty("StreamTool",m_streamer); declareProperty("calibTextFile",m_par_caltextfile); @@ -80,11 +83,98 @@ StatusCode TRT_CalDbSvc::initialize() return StatusCode::FAILURE; } + + int format=0; + int readformat=0; + if( !m_par_caltextfile.empty() ) { + if(StatusCode::SUCCESS!=this->checkTextFile(m_par_caltextfile, readformat)) { + msg(MSG::FATAL) << "Could not read calibration objects from text file" << m_par_caltextfile << endmsg; + return StatusCode::FAILURE ; + } + format=readformat+1; + } // Read keys - ATH_CHECK( m_rtReadKey.initialize() ); - ATH_CHECK( m_errReadKey.initialize() ); - ATH_CHECK( m_slopeReadKey.initialize() ); - ATH_CHECK( m_t0ReadKey.initialize() ); + + if(format==0) ATH_CHECK( m_rtReadKey.initialize() ); + if(format<3) ATH_CHECK( m_errReadKey.initialize() ); + if(format<4) ATH_CHECK( m_slopeReadKey.initialize() ); + if(format==0) ATH_CHECK( m_t0ReadKey.initialize() ); + + + // Here we are reading from text file. Revert to old non-MT style + // Assume implicitely that the folder was blocked. Create, record and update data handle + if(!m_par_caltextfile.empty()) { + + if(format>0) { + + if(msgLvl(MSG::INFO)) msg() << "Creating new T0 container" << endmsg ; + TRTCond::StrawT0Container* t0container = new TRTCond::StrawT0Container() ; + + if( (m_detstore->record(t0container,m_par_t0containerkey))!=StatusCode::SUCCESS ) { + msg(MSG::ERROR) << "Could not record T0 Container for key " << m_par_t0containerkey << endmsg; + return StatusCode::FAILURE; + } + if(StatusCode::SUCCESS!=m_detstore->retrieve(m_t0Container,m_par_t0containerkey)) { + msg(MSG::FATAL) << "Could not retrieve data handle for T0 Container " << endmsg; + return StatusCode::FAILURE ; + } + + if(msgLvl(MSG::INFO)) msg() << "Creating new Rt container" << endmsg ; + TRTCond::RtRelationContainer* rtcontainer = new TRTCond::RtRelationContainer() ; + + if( (m_detstore->record(rtcontainer,m_par_rtcontainerkey))!=StatusCode::SUCCESS ) { + msg(MSG::ERROR) << "Could not record Rt Container for key " << m_par_rtcontainerkey << endmsg; + return StatusCode::FAILURE; + } + if(StatusCode::SUCCESS!=m_detstore->retrieve(m_rtContainer,m_par_t0containerkey)) { + msg(MSG::FATAL) << "Could not retrieve data handle for Rt Container " << endmsg; + return StatusCode::FAILURE ; + } + + } + + if(format>1) { + if(msgLvl(MSG::INFO)) msg() << "Creating new error container" << endmsg ; + TRTCond::RtRelationContainer* rtcontainer = new TRTCond::RtRelationContainer() ; + + if( (m_detstore->record(rtcontainer,m_par_errcontainerkey))!=StatusCode::SUCCESS ) { + msg(MSG::ERROR) << "Could not record Rt Container for key " << m_par_errcontainerkey << endmsg; + return StatusCode::FAILURE; + } + if(StatusCode::SUCCESS!=m_detstore->retrieve(m_errContainer,m_par_errcontainerkey)) { + msg(MSG::FATAL) << "Could not retrieve data handle for Rt Container " << endmsg; + return StatusCode::FAILURE ; + } + + } + + if(format>2) { + if(msgLvl(MSG::INFO)) msg() << "Creating new slope container" << endmsg ; + TRTCond::RtRelationContainer* rtcontainer = new TRTCond::RtRelationContainer() ; + + if( (m_detstore->record(rtcontainer,m_par_slopecontainerkey))!=StatusCode::SUCCESS ) { + msg(MSG::ERROR) << "Could not record Rt Container for key " << m_par_slopecontainerkey << endmsg; + return StatusCode::FAILURE; + } + if(StatusCode::SUCCESS!=m_detstore->retrieve(m_slopeContainer,m_par_slopecontainerkey)) { + msg(MSG::FATAL) << "Could not retrieve data handle for Rt Container " << endmsg; + return StatusCode::FAILURE ; + } + + } + + + } else { + msg(MSG::INFO) << "TRT_CalDbSvc::initialize for standard running " << endmsg; + } + + if( !m_par_caltextfile.empty() ) { + if(StatusCode::SUCCESS!=this->readTextFile(m_par_caltextfile, readformat)) { + msg(MSG::FATAL) << "Could not read calibration objects from text file. Have you set athenaCommon.EvtMax=1? Try 2" << m_par_caltextfile << endmsg; + return StatusCode::FAILURE ; + } + } + return StatusCode::SUCCESS; } @@ -98,36 +188,36 @@ StatusCode TRT_CalDbSvc::finalize() TRT_CalDbSvc::RtRelationContainer* TRT_CalDbSvc::getRtContainer() const { - if(!m_useCachedPtr) { + if(!m_rtContainer) { SG::ReadCondHandle<RtRelationContainer> rtc(m_rtReadKey); return const_cast<RtRelationContainer*>(*rtc); } - return m_rtContainer.get(); + return m_rtContainer; } TRT_CalDbSvc::RtRelationContainer* TRT_CalDbSvc::getErrContainer() const { - if(!m_useCachedPtr) { + if(!m_errContainer) { SG::ReadCondHandle<RtRelationContainer> erc(m_errReadKey); return const_cast<RtRelationContainer*>(*erc); } - return m_errContainer.get(); + return m_errContainer; } TRT_CalDbSvc::RtRelationContainer* TRT_CalDbSvc::getSlopeContainer() const { - if(!m_useCachedPtr) { + if(!m_slopeContainer) { SG::ReadCondHandle<RtRelationContainer> slc(m_slopeReadKey); return const_cast<RtRelationContainer*>(*slc); } - return m_slopeContainer.get(); + return m_slopeContainer; } TRT_CalDbSvc::StrawT0Container* TRT_CalDbSvc::getT0Container() const { - if(!m_useCachedPtr) { + if(!m_t0Container) { SG::ReadCondHandle<StrawT0Container> t0c(m_t0ReadKey); return const_cast<StrawT0Container*>(*t0c); } - return m_t0Container.get(); + return m_t0Container; } @@ -180,6 +270,35 @@ StatusCode TRT_CalDbSvc::readTextFile(const std::string& filename, int& format ) return sc ; } +StatusCode TRT_CalDbSvc::checkTextFile(const std::string& filename, int& format ) +{ + + StatusCode sc=StatusCode::SUCCESS ; + std::ifstream infile(filename.c_str()) ; + if(!infile) { + msg(MSG::ERROR) << "Cannot find input file " << filename << endmsg ; + sc=StatusCode::FAILURE; + } else { + // read the format tag. if none, default to 0 + format = 0 ; + char line[512] ; + infile.getline(line,512) ; + std::string linestring(line) ; + size_t pos = linestring.find("Fileformat") ; + if(pos != std::string::npos) { + sscanf(line,"# Fileformat=%d",&format) ; + } else { + msg(MSG::WARNING) << "Input file has no Fileformat identifier. Assuming format=0." << endmsg; + // 'rewind' the file + + infile.close() ; + infile.open(filename.c_str()) ; + } + } + infile.close() ; + return sc ; +} + StatusCode TRT_CalDbSvc::writeTextFile_Format0(std::ostream& outfile) const { @@ -217,11 +336,10 @@ StatusCode TRT_CalDbSvc::readTextFile_Format0(std::istream& infile) { //If you supply a text file in format 0 remember to block the RT and T0 folders - - - m_rtContainer = new RtRelationContainer() ; - m_t0Container = new StrawT0Container() ; - + RtRelationContainer* rtContainer = getRtContainer() ; + StrawT0Container* t0Container = getT0Container() ; + rtContainer->clear(); + t0Container->clear(); TRTCond::ExpandedIdentifier calid ; float t0,t0err,d0,a[4]; @@ -240,14 +358,14 @@ StatusCode TRT_CalDbSvc::readTextFile_Format0(std::istream& infile) ++nentries ; } else ++ninvalid ; } - size_t t0footprint = m_t0Container->footprint() ; - size_t rtfootprint = m_rtContainer->footprint() ; + size_t t0footprint = t0Container->footprint() ; + size_t rtfootprint = rtContainer->footprint() ; //t0container->crunch() ; //rtcontainer->crunch() ; msg(MSG::INFO) << "read " << nentries << " from file. " << " t0/rt footprints before " << t0footprint << " / " << rtfootprint << " and after " - << m_t0Container->footprint() << " / " << m_rtContainer->footprint() << " compression." << endmsg ; + << t0Container->footprint() << " / " << rtContainer->footprint() << " compression." << endmsg ; if(ninvalid>0) msg(MSG::WARNING) << "read " << ninvalid << " invalid lines from input file" << endmsg ; return StatusCode::SUCCESS ; @@ -289,18 +407,20 @@ StatusCode TRT_CalDbSvc::readTextFile_Format1(std::istream& infile) //If you supply a text file in format 1 remember to block the RT and T0 folders - m_rtContainer = new RtRelationContainer() ; - m_t0Container = new StrawT0Container() ; - enum ReadMode { ReadingRtRelation, ReadingStrawT0, ReadingGarbage } ; ReadMode readmode =ReadingGarbage ; + RtRelationContainer* rtContainer = getRtContainer() ; + StrawT0Container* t0Container = getT0Container() ; + rtContainer->clear(); + t0Container->clear(); + char line[512] ; int nrtrelations(0), nstrawt0(0) ; while( infile.getline(line,512) ) { if(line[0] == '#') { // line with tag std::string linestring(line) ; - if( linestring.find("RtRelation") != std::string::npos) + if(linestring.find("RtRelation") != std::string::npos) readmode = ReadingRtRelation ; else if(linestring.find("StrawT0") != std::string::npos) readmode = ReadingStrawT0 ; @@ -330,14 +450,14 @@ StatusCode TRT_CalDbSvc::readTextFile_Format1(std::istream& infile) } } } - size_t t0footprint = m_t0Container->footprint() ; - size_t rtfootprint = m_rtContainer->footprint() ; + size_t t0footprint = t0Container->footprint() ; + size_t rtfootprint = rtContainer->footprint() ; //t0container->crunch() ; //rtcontainer->crunch() ; msg(MSG::INFO) << "read " << nstrawt0 << " t0 and " << nrtrelations << " rt from file. " << " t0/rt footprints before " << t0footprint << " / " << rtfootprint << " and after " - << m_t0Container->footprint() << " / " << m_rtContainer->footprint() << " compression." << endmsg ; + << t0Container->footprint() << " / " << rtContainer->footprint() << " compression." << endmsg ; return StatusCode::SUCCESS ; } @@ -392,22 +512,26 @@ StatusCode TRT_CalDbSvc::readTextFile_Format2(std::istream& infile) ReadMode readmode =ReadingGarbage ; char line[512] ; int nrtrelations(0), nerrors(0), nstrawt0(0) ; - m_rtContainer = new RtRelationContainer() ; - m_errContainer = new RtRelationContainer() ; - m_t0Container = new StrawT0Container() ; + RtRelationContainer* rtContainer = getRtContainer() ; + RtRelationContainer* errContainer = getErrContainer() ; + StrawT0Container* t0Container = getT0Container() ; + rtContainer->clear(); + t0Container->clear(); + errContainer->clear(); + while( infile.getline(line,512) ) { if(line[0] == '#') { // line with tag std::string linestring(line) ; if( linestring.find("RtRelation") != std::string::npos) { readmode = ReadingRtRelation ; - m_rtContainer->clear() ; + rtContainer->clear() ; } else if(linestring.find("StrawT0") != std::string::npos) { readmode = ReadingStrawT0 ; - m_t0Container->clear() ; + t0Container->clear() ; } else if(linestring.find("RtErrors") != std::string::npos) { readmode = ReadingErrors ; - m_errContainer->clear() ; + errContainer->clear() ; } else { readmode = ReadingGarbage ; } } else if( readmode != ReadingGarbage) { std::istringstream is(line) ; @@ -452,31 +576,36 @@ StatusCode TRT_CalDbSvc::readTextFile_Format3(std::istream& infile) { //If you supply a text file in format 3 remember to block the RT, T0, errors2 and slopes folders + RtRelationContainer* rtContainer = getRtContainer() ; + RtRelationContainer* errContainer = getErrContainer() ; + RtRelationContainer* slopeContainer = getSlopeContainer() ; + StrawT0Container* t0Container = getT0Container() ; + t0Container->clear(); + rtContainer->clear(); + errContainer->clear(); + slopeContainer->clear(); enum ReadMode { ReadingRtRelation, ReadingErrors, ReadingSlopes, ReadingStrawT0, ReadingGarbage } ; ReadMode readmode =ReadingGarbage ; char line[512] ; int nrtrelations(0), nerrors(0), nslopes(0), nstrawt0(0) ; - m_rtContainer = new RtRelationContainer() ; - m_errContainer = new RtRelationContainer() ; - m_slopeContainer = new RtRelationContainer() ; - m_t0Container = new StrawT0Container() ; + while( infile.getline(line,512) ) { if(line[0] == '#') { // line with tag std::string linestring(line) ; if( linestring.find("RtRelation") != std::string::npos) { readmode = ReadingRtRelation ; - m_rtContainer->clear() ; + rtContainer->clear() ; } else if(linestring.find("RtErrors") != std::string::npos) { readmode = ReadingErrors ; - m_errContainer->clear() ; + errContainer->clear() ; } else if(linestring.find("RtSlopes") != std::string::npos) { readmode = ReadingSlopes ; - m_slopeContainer->clear() ; + slopeContainer->clear() ; } else if(linestring.find("StrawT0") != std::string::npos) { readmode = ReadingStrawT0 ; - m_t0Container->clear() ; + t0Container->clear() ; } else { readmode = ReadingGarbage ; } } else if( readmode != ReadingGarbage) { std::istringstream is(line) ; diff --git a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_CalDbSvc.h b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_CalDbSvc.h index 83c9103949e8..ed6b489c9d88 100644 --- a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_CalDbSvc.h +++ b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_CalDbSvc.h @@ -13,7 +13,6 @@ //Gaudi Includes #include "AthenaBaseComps/AthService.h" #include "GaudiKernel/IInterface.h" -#include "GaudiKernel/ContextSpecificPtr.h" #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" #include "GaudiKernel/ICondSvc.h" @@ -103,6 +102,7 @@ class TRT_CalDbSvc: public AthService , virtual public ITRT_CalDbSvc StatusCode writeTextFile_Format3(std::ostream&) const; /// read calibration from text file into TDS + StatusCode checkTextFile(const std::string& file, int& format); StatusCode readTextFile(const std::string& file, int& format); StatusCode readTextFile_Format0(std::istream&) ; StatusCode readTextFile_Format1(std::istream&) ; @@ -122,12 +122,11 @@ class TRT_CalDbSvc: public AthService , virtual public ITRT_CalDbSvc RtRelationContainer* getErrContainer() const ; RtRelationContainer* getSlopeContainer() const ; StrawT0Container* getT0Container() const ; - // Access via a cached ContextSpecificPtr is used for text file input + // Access via a cached pointer is used for text file input void setRtContainer(RtRelationContainer* rc); void setErrContainer(RtRelationContainer* rc); void setSlopeContainer(RtRelationContainer* rc); void setT0Container(StrawT0Container* rc); - void useCachedPtr(const bool& useit); private: @@ -142,17 +141,19 @@ class TRT_CalDbSvc: public AthService , virtual public ITRT_CalDbSvc ServiceHandle<StoreGateSvc> m_detstore; ServiceHandle<ICondSvc> m_condSvc; + // used in case of text file input + RtRelationContainer* m_rtContainer; + RtRelationContainer* m_errContainer; + RtRelationContainer* m_slopeContainer; + StrawT0Container* m_t0Container; + + // ReadHandle keys SG::ReadCondHandleKey<RtRelationContainer> m_rtReadKey{this,"RtReadKeyName","/TRT/Calib/RT","r-t relation in-key"}; SG::ReadCondHandleKey<RtRelationContainer> m_errReadKey{this,"ErrorReadKeyName","/TRT/Calib/errors2d","error on r in-key"}; SG::ReadCondHandleKey<RtRelationContainer> m_slopeReadKey{this,"SlopeReadKeyName","/TRT/Calib/slopes","slope of error in-key"}; SG::ReadCondHandleKey<StrawT0Container> m_t0ReadKey{this,"T0ReadKeyName","/TRT/Calib/T0","t0 in-key"}; - bool m_useCachedPtr; - Gaudi::Hive::ContextSpecificPtr<RtRelationContainer> m_rtContainer; - Gaudi::Hive::ContextSpecificPtr<RtRelationContainer> m_errContainer; - Gaudi::Hive::ContextSpecificPtr<RtRelationContainer> m_slopeContainer; - Gaudi::Hive::ContextSpecificPtr<StrawT0Container> m_t0Container; /// Keep track of the number of instances @@ -238,11 +239,6 @@ TRT_CalDbSvc::setRtSlopes( const TRTCond::ExpandedIdentifier& id, const TRTCond: getSlopeContainer()->set( id,const_cast<TRTCond::RtRelation*>(rtr)); } -inline void -TRT_CalDbSvc::useCachedPtr( const bool& useit) -{ - m_useCachedPtr=useit; -} /// Query Interface diff --git a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_StrawStatusSummarySvc.cxx b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_StrawStatusSummarySvc.cxx index 80e4b20c4eb8..a3751c2b07fb 100755 --- a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_StrawStatusSummarySvc.cxx +++ b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_StrawStatusSummarySvc.cxx @@ -30,8 +30,7 @@ #include "InDetReadoutGeometry/TRT_BaseElement.h" #include "InDetReadoutGeometry/TRT_DetectorManager.h" - -class TRT_ID; +#include "StoreGate/ReadCondHandle.h" @@ -49,14 +48,22 @@ TRT_StrawStatusSummarySvc::TRT_StrawStatusSummarySvc( const std::string& name, m_par_statstream("StatStream1"), m_trtid(0), m_trtDetMgr(0), - m_strawstatuscontainerexists(false), - m_strawstatuspermanentcontainerexists(false), - m_strawstatusHTcontainerexists(false) + m_condSvc("CondSvc",name), + m_statReadKey("/TRT/Cond/Status"), + m_permReadKey("/TRT/Cond/StatusPermanent"), + m_statHTReadKey("/TRT/Cond/StatusHT"), + m_isGEANT4(true), + m_strawstatusG4(nullptr), + m_strawstatuspermanentG4(nullptr), + m_strawstatusHTG4(nullptr), + m_setup(false) + { declareProperty("statusTextFile",m_par_stattextfile); declareProperty("statusTextFilePermanent",m_par_stattextfilepermanent); declareProperty("statusTextFileHT",m_par_stattextfileHT); declareProperty("ToolSvc",m_toolsvc); + declareProperty("isGEANT4",m_isGEANT4); // create arrays for alive straws m_stw_total = new int[7]; @@ -64,10 +71,18 @@ TRT_StrawStatusSummarySvc::TRT_StrawStatusSummarySvc( const std::string& name, m_stw_wheel = new int*[34]; for (int i=0; i<6 ; ++i) m_stw_local[i] = new int[32]; for (int i=0; i<34; ++i) m_stw_wheel[i] = new int[32]; - - resetArrays();//RM moved to c'tor from initialize() to avoid coverity defects + + // initialise event number cache + m_evtstat.push_back(-1); + m_evtperm.push_back(-1); + m_evtstatHT.push_back(-1); + m_strawstatuscontainer.push_back(nullptr); + m_strawstatuspermanentcontainer.push_back(nullptr); + m_strawstatusHTcontainer.push_back(nullptr); + + } -// declareProperty("statusTextFile",m_par_stattextfile); + TRT_StrawStatusSummarySvc::~TRT_StrawStatusSummarySvc() @@ -78,7 +93,6 @@ StatusCode TRT_StrawStatusSummarySvc::initialize() { msg(MSG::INFO) << "TRT_StrawStatusSummarySvc initialize method called" << endmsg; - // if (m_par_stattextfilepermanent=="") m_par_stattextfilepermanent=PathResolver::find_file ("strawstatuspermanent-01.txt", "DATAPATH"); // Retrieve the DetectorStore if (StatusCode::SUCCESS!=m_detStore.retrieve()) { @@ -98,85 +112,90 @@ StatusCode TRT_StrawStatusSummarySvc::initialize() return StatusCode::FAILURE; } - msg(MSG::INFO) << "TRT_StrawStatusSummarySvc::initialize " << m_par_stattextfile << endmsg; + + if(!m_isGEANT4) { - if(msgLvl(MSG::DEBUG)) msg() <<"trying to read "<<m_par_strawstatuscontainerkey<< " from StoreGateSvc"<<endmsg; - m_strawstatuscontainerexists = m_detStore->StoreGateSvc::contains<TRTCond::StrawStatusMultChanContainer>(m_par_strawstatuscontainerkey) ; - - if( m_strawstatuscontainerexists ) { - if(msgLvl(MSG::DEBUG)) msg() << " strawstatuscontainerexists " <<endmsg; - if( (m_detStore->regFcn(&TRT_StrawStatusSummarySvc::IOVCallBack,this,m_strawstatuscontainer,m_par_strawstatuscontainerkey)).isFailure()) - msg(MSG::ERROR) << "Could not register IOV callback for key: " << m_par_strawstatuscontainerkey << endmsg ; - } else if (!m_par_stattextfile.empty()) { - // create, record and update data handle - if(msgLvl(MSG::DEBUG)) msg() << "Creating new strawstatus container" << endmsg ; - const TRTCond::StrawStatusMultChanContainer* strawstatuscontainer = new TRTCond::StrawStatusMultChanContainer() ; - - if( (m_detStore->record(strawstatuscontainer,m_par_strawstatuscontainerkey))!=StatusCode::SUCCESS ) { - msg(MSG::ERROR) << "Could not record StrawStatusContainer for key " << m_par_strawstatuscontainerkey << endmsg; - } - else{ - msg( MSG::VERBOSE) << "Got record StrawStatusContainer for key " << m_par_strawstatuscontainerkey << endmsg; - m_strawstatuscontainerexists = true; - } - if(StatusCode::SUCCESS!=m_detStore->retrieve(m_strawstatuscontainer,m_par_strawstatuscontainerkey)) { - msg(MSG::FATAL) << "Could not retrieve data handle for StrawStatusContainer " << endmsg; - return StatusCode::FAILURE ; - }else{if(msgLvl(MSG::VERBOSE)) msg() << "Retrieved data handle for StrawStatusContainer " << endmsg;} - if(!m_par_stattextfile.empty()) return readFromTextFile( m_par_stattextfile ) ; + // Read keys in case of normal reconstruction/digitization + ATH_CHECK( m_statReadKey.initialize() ); + ATH_CHECK( m_permReadKey.initialize() ); + ATH_CHECK( m_statHTReadKey.initialize() ); } - if(msgLvl(MSG::DEBUG)) msg() <<"trying to read "<<m_par_strawstatuspermanentcontainerkey<< " from StoreGateSvc"<<endmsg; - m_strawstatuspermanentcontainerexists = m_detStore->StoreGateSvc::contains<TRTCond::StrawStatusMultChanContainer>(m_par_strawstatuspermanentcontainerkey) ; - - if( m_strawstatuspermanentcontainerexists ) { - if(msgLvl(MSG::DEBUG)) msg() << " strawstatuspermanentcontainerexists " <<endmsg; - if( (m_detStore->regFcn(&TRT_StrawStatusSummarySvc::IOVCallBack,this,m_strawstatuspermanentcontainer,m_par_strawstatuspermanentcontainerkey)).isFailure()) - msg(MSG::ERROR) << "Could not register IOV callback for key: " << m_par_strawstatuspermanentcontainerkey << endmsg ; - } else if (!m_par_stattextfilepermanent.empty()) { - // create, record and update data handle - if(msgLvl(MSG::DEBUG)) msg() << "Creating new strawstatuspermanent container" << endmsg ; - - const TRTCond::StrawStatusMultChanContainer* strawstatuspermanentcontainer = new TRTCond::StrawStatusMultChanContainer() ; - if( (m_detStore->record(strawstatuspermanentcontainer,m_par_strawstatuspermanentcontainerkey))!=StatusCode::SUCCESS ) { - msg(MSG::ERROR) << "Could not record StrawStatuspermanentContainer for key " << m_par_strawstatuspermanentcontainerkey << endmsg; - } - else{ - if(msgLvl(MSG::VERBOSE)) msg() << "Got record StrawStatuspermanentContainer for key " << m_par_strawstatuspermanentcontainerkey << endmsg; - m_strawstatuspermanentcontainerexists = true; - } - if(StatusCode::SUCCESS!=m_detStore->retrieve(m_strawstatuspermanentcontainer,m_par_strawstatuspermanentcontainerkey)) { - msg(MSG::FATAL) << "Could not retrieve data handle for StrawStatuspermanentContainer " << endmsg; - return StatusCode::FAILURE ; - }else{if(msgLvl(MSG::VERBOSE)) msg() << "Retrieved data handle for StrawStatuspermanentContainer " << endmsg;} - if(!m_par_stattextfilepermanent.empty()) return readFromTextFile( m_par_stattextfilepermanent ) ; - } + if(m_isGEANT4) { + // Here we are either doing GEANT4 simulation or reading from text file. In either case revert to old non-MT style + if (m_par_stattextfile.empty()) { + msg(MSG::INFO) << "TRT_StrawStatusSummarySvc::initialize for simulation or streaming to/from text file" << endmsg; + if(StatusCode::SUCCESS!=m_detStore->retrieve(m_strawstatusG4,m_par_strawstatuscontainerkey)) { + ATH_MSG_FATAL("Could not retrieve folder " << m_par_strawstatuscontainerkey); + return StatusCode::FAILURE; + } + } + if (m_par_stattextfilepermanent.empty()) { + if(StatusCode::SUCCESS!=m_detStore->retrieve(m_strawstatuspermanentG4,m_par_strawstatuspermanentcontainerkey)) { + ATH_MSG_FATAL("Could not retrieve folder " << m_par_strawstatuspermanentcontainerkey); + return StatusCode::FAILURE; + } + } + if (m_par_stattextfileHT.empty()) { + if(StatusCode::SUCCESS!=m_detStore->retrieve(m_strawstatusHTG4,m_par_strawstatusHTcontainerkey)) { + ATH_MSG_FATAL("Could not retrieve folder " << m_par_strawstatusHTcontainerkey); + return StatusCode::FAILURE; + } + } + if (!m_par_stattextfile.empty()) { + // Assume implicitely that the folder was blocked. Create, record and update data handle + if(msgLvl(MSG::INFO)) msg() << "Creating new strawstatus container" << endmsg ; + const TRTCond::StrawStatusMultChanContainer* strawstatuscontainer = new TRTCond::StrawStatusMultChanContainer() ; + + if( (m_detStore->record(strawstatuscontainer,m_par_strawstatuscontainerkey))!=StatusCode::SUCCESS ) { + msg(MSG::ERROR) << "Could not record StrawStatusContainer for key " << m_par_strawstatuscontainerkey << endmsg; + return StatusCode::FAILURE; + } + if(StatusCode::SUCCESS!=m_detStore->retrieve(m_strawstatusG4,m_par_strawstatuscontainerkey)) { + msg(MSG::FATAL) << "Could not retrieve data handle for StrawStatusContainer " << endmsg; + return StatusCode::FAILURE ; + } + return readFromTextFile( m_par_stattextfile ) ; + } + if (!m_par_stattextfilepermanent.empty()) { + // Assume implicitely that the folder was blocked. Create, record and update data handle + if(msgLvl(MSG::INFO)) msg() << "Creating new strawstatuspermanent container" << endmsg ; + const TRTCond::StrawStatusMultChanContainer* strawstatuscontainer = new TRTCond::StrawStatusMultChanContainer() ; + + if( (m_detStore->record(strawstatuscontainer,m_par_strawstatuspermanentcontainerkey))!=StatusCode::SUCCESS ) { + msg(MSG::ERROR) << "Could not record StrawStatusContainer for key " << m_par_strawstatuspermanentcontainerkey << endmsg; + return StatusCode::FAILURE; + } - - if(msgLvl(MSG::DEBUG)) msg() <<"trying to read "<<m_par_strawstatusHTcontainerkey<< " from StoreGateSvc"<<endmsg; - m_strawstatusHTcontainerexists = m_detStore->StoreGateSvc::contains<TRTCond::StrawStatusMultChanContainer>(m_par_strawstatusHTcontainerkey) ; - - if( m_strawstatusHTcontainerexists ) { - if(msgLvl(MSG::DEBUG)) msg() << " strawstatusHTcontainerexists " <<endmsg; - if( (m_detStore->regFcn(&TRT_StrawStatusSummarySvc::IOVCallBack,this,m_strawstatusHTcontainer,m_par_strawstatusHTcontainerkey)).isFailure()) - msg(MSG::ERROR) << "Could not register IOV callback for key: " << m_par_strawstatusHTcontainerkey << endmsg ; - } else if (!m_par_stattextfileHT.empty()) { - // create, record and update data handle - if(msgLvl(MSG::DEBUG)) msg() << "Creating new strawstatusHT container" << endmsg ; - const TRTCond::StrawStatusMultChanContainer* strawstatusHTcontainer = new TRTCond::StrawStatusMultChanContainer() ; - if( (m_detStore->record(strawstatusHTcontainer,m_par_strawstatusHTcontainerkey))!=StatusCode::SUCCESS ) { - msg(MSG::ERROR) << "Could not record StrawStatusHTContainer for key " << m_par_strawstatusHTcontainerkey << endmsg; - } - else{ - if(msgLvl(MSG::VERBOSE)) msg() << "Got record StrawStatusHTContainer for key " << m_par_strawstatusHTcontainerkey << endmsg; - m_strawstatusHTcontainerexists = true; - } - if(StatusCode::SUCCESS!=m_detStore->retrieve(m_strawstatusHTcontainer,m_par_strawstatusHTcontainerkey)) { - msg(MSG::FATAL) << "Could not retrieve data handle for StrawStatusHTContainer " << endmsg; - return StatusCode::FAILURE ; - }else{if(msgLvl(MSG::VERBOSE)) msg() << "Retrieved data handle for StrawStatusHTContainer " << endmsg;} - if(!m_par_stattextfileHT.empty()) return readFromTextFile( m_par_stattextfileHT ) ; + if(StatusCode::SUCCESS!=m_detStore->retrieve(m_strawstatuspermanentG4,m_par_strawstatuspermanentcontainerkey)) { + msg(MSG::FATAL) << "Could not retrieve data handle for StrawStatusPermanentContainer " << endmsg; + return StatusCode::FAILURE ; + } + + + return readFromTextFile( m_par_stattextfilepermanent ) ; + } + if (!m_par_stattextfileHT.empty()) { + // Assume implicitely that the folder was blocked. Create, record and update data handle + if(msgLvl(MSG::INFO)) msg() << "Creating new strawstatusHT container" << endmsg ; + const TRTCond::StrawStatusMultChanContainer* strawstatuscontainer = new TRTCond::StrawStatusMultChanContainer() ; + + if( (m_detStore->record(strawstatuscontainer,m_par_strawstatusHTcontainerkey))!=StatusCode::SUCCESS ) { + msg(MSG::ERROR) << "Could not record StrawStatusContainer for key " << m_par_strawstatusHTcontainerkey << endmsg; + return StatusCode::FAILURE; + } + + if(StatusCode::SUCCESS!=m_detStore->retrieve(m_strawstatusHTG4,m_par_strawstatusHTcontainerkey)) { + msg(MSG::FATAL) << "Could not retrieve data handle for StrawStatusHTContainer " << endmsg; + return StatusCode::FAILURE ; + } + + return readFromTextFile( m_par_stattextfileHT ) ; + } + + } else { + msg(MSG::INFO) << "TRT_StrawStatusSummarySvc::initialize for reconstruction or digitization " << endmsg; } @@ -226,7 +245,7 @@ int TRT_StrawStatusSummarySvc::getStatus(Identifier offlineID){ TRTCond::ExpandedIdentifier id= TRTCond::ExpandedIdentifier( m_trtid->barrel_ec(offlineID),m_trtid->layer_or_wheel(offlineID), m_trtid->phi_module(offlineID),m_trtid->straw_layer(offlineID), m_trtid->straw(offlineID),level ); - StrawStatusContainer* strawstatuscontainer = getStrawStatusContainer(); + const StrawStatusContainer* strawstatuscontainer = getStrawStatusContainer(); static int countStrawStatusContainerError(0); if (!strawstatuscontainer) { if (countStrawStatusContainerError<5) { @@ -247,7 +266,7 @@ int TRT_StrawStatusSummarySvc::getStatusPermanent(Identifier offlineID){ TRTCond::ExpandedIdentifier id= TRTCond::ExpandedIdentifier( m_trtid->barrel_ec(offlineID),m_trtid->layer_or_wheel(offlineID), m_trtid->phi_module(offlineID),m_trtid->straw_layer(offlineID), m_trtid->straw(offlineID),level ); - StrawStatusContainer* strawstatuspermanentcontainer = getStrawStatusPermanentContainer(); + const StrawStatusContainer* strawstatuspermanentcontainer = getStrawStatusPermanentContainer(); static int countStrawStatusContainerError(0); if (!strawstatuspermanentcontainer) { if (countStrawStatusContainerError<5) { msg(MSG::WARNING) << "TRT_StrawStatusSummarySvc::getStatusPermanent, strawstatuspermanentcontainer == 0, dead straws not set" << endmsg; @@ -267,7 +286,7 @@ int TRT_StrawStatusSummarySvc::getStatusHT(Identifier offlineID){ TRTCond::ExpandedIdentifier id= TRTCond::ExpandedIdentifier( m_trtid->barrel_ec(offlineID),m_trtid->layer_or_wheel(offlineID), m_trtid->phi_module(offlineID),m_trtid->straw_layer(offlineID), m_trtid->straw(offlineID),level ); - StrawStatusContainer* strawstatusHTcontainer = getStrawStatusHTContainer(); + const StrawStatusContainer* strawstatusHTcontainer = getStrawStatusHTContainer(); static int countStrawStatusContainerError(0); if (!strawstatusHTcontainer) { @@ -310,7 +329,7 @@ void TRT_StrawStatusSummarySvc::set_LT_occ(Identifier offlineID, double lt_occ) status = status | org_stat ; - StrawStatusContainer* strawstatuscontainer = getStrawStatusContainer(); + StrawStatusContainer* strawstatuscontainer = const_cast<StrawStatusContainer*>(getStrawStatusContainer()); ((*strawstatuscontainer).set(id,status)); } @@ -346,7 +365,7 @@ void TRT_StrawStatusSummarySvc::set_HT_occ(Identifier offlineID, double ht_occ) //carefull not to change information which is already set status = status | (org_stat & (~htbitmask&(~(0x31) ))) ; - StrawStatusContainer* strawstatuscontainer = getStrawStatusContainer(); + StrawStatusContainer* strawstatuscontainer = const_cast<StrawStatusContainer*>(getStrawStatusContainer()); ((*strawstatuscontainer).set(id,status)); } @@ -368,17 +387,8 @@ void TRT_StrawStatusSummarySvc::set_status_temp(Identifier offlineID, bool set) m_trtid->straw(offlineID),level ); unsigned int org_stat = getStatus(offlineID); const unsigned int statusbitmask = 1 << 8;// 0000001 00000000 - /* - unsigned int status = 0; - if (set) { - status= (org_stat | statusbitmask); - } - else if ((!set)&&(get_status(offlineID))) { - status = org_stat - 256; - } - m_data.set(id,status); - */ - StrawStatusContainer* strawstatuscontainer = getStrawStatusContainer(); + + StrawStatusContainer* strawstatuscontainer = const_cast<StrawStatusContainer*>(getStrawStatusContainer()); if (set) { (*strawstatuscontainer).set(id, (org_stat|statusbitmask)); }else{ (*strawstatuscontainer).set(id, (org_stat & (~statusbitmask) )); } } @@ -392,7 +402,7 @@ void TRT_StrawStatusSummarySvc::set_status_permanent(Identifier offlineID, bool m_trtid->straw(offlineID),level ); unsigned int org_stat = getStatusPermanent(offlineID); const unsigned int statusbitmask = 1 << 8;// 0000001 00000000 - StrawStatusContainer* strawstatuspermanentcontainer = getStrawStatusPermanentContainer(); + StrawStatusContainer* strawstatuspermanentcontainer = const_cast<StrawStatusContainer*>(getStrawStatusPermanentContainer()); if (set) { (*strawstatuspermanentcontainer).set(id, (org_stat|statusbitmask)); }else{ (*strawstatuspermanentcontainer).set(id, (org_stat & (~statusbitmask) )); } } @@ -408,14 +418,10 @@ bool TRT_StrawStatusSummarySvc::get_status(Identifier offlineID){ else if (getStatus(offlineID)==0) st = false; else {st = bool( (getStatus(offlineID) & statusbitmask) >> 8);}; - // Safety check: Won't do any good unless a somewhere a StatusPermanent tag is defined. - - if (m_strawstatuspermanentcontainerexists) { if (getStatusPermanent(offlineID)==1) stperm = true; else if (getStatusPermanent(offlineID)==0) stperm = false; else {stperm = bool( (getStatusPermanent(offlineID) & statusbitmask) >> 8);}; - } return ( (st||stperm) ); @@ -428,15 +434,10 @@ bool TRT_StrawStatusSummarySvc::get_statusHT(Identifier offlineID){ if(msgLvl(MSG::VERBOSE)) msg() <<"offlineID "<<offlineID<<" "<<getStatus(offlineID)<<" "<<((getStatus(offlineID) & statusbitmask) >> 8)<<endmsg; bool stHT=false; - // Safety check: Won't do any good unless a somewhere a StatusHT - - if (m_strawstatusHTcontainerexists) { if (getStatusHT(offlineID)==1) stHT = true; else if (getStatusHT(offlineID)==0) stHT = false; else {stHT = bool( (getStatusHT(offlineID) & statusbitmask) >> 8);}; - } - else { if(msgLvl(MSG::WARNING)) msg() <<"Attempt to use get_statusHT flag, but CondDB folder not available. Returning StrawStatus::Good "<<endmsg; } return ( stHT ); @@ -454,7 +455,7 @@ void TRT_StrawStatusSummarySvc::set_pid_status(Identifier offlineID, bool set){ m_trtid->straw(offlineID),level ); unsigned int org_stat = getStatus(offlineID); const unsigned int pidstatusbitmask = 0x80; //0000000 10000000 - StrawStatusContainer* strawstatuscontainer = getStrawStatusContainer(); + StrawStatusContainer* strawstatuscontainer = const_cast<StrawStatusContainer*>(getStrawStatusContainer()); if (set) { (*strawstatuscontainer).set(id, (org_stat|pidstatusbitmask)); }else{ (*strawstatuscontainer).set(id, (org_stat & (~pidstatusbitmask) )); } @@ -473,7 +474,7 @@ void TRT_StrawStatusSummarySvc::set_track_status(Identifier offlineID, bool set m_trtid->straw(offlineID),level ); unsigned int org_stat = getStatus(offlineID); const unsigned int trackstatusbitmask = 0x40; //0000000 01000000 - StrawStatusContainer* strawstatuscontainer = getStrawStatusContainer(); + StrawStatusContainer* strawstatuscontainer = const_cast<StrawStatusContainer*>(getStrawStatusContainer()); if (set) { (*strawstatuscontainer).set(id, (org_stat|trackstatusbitmask)); }else{ (*strawstatuscontainer).set(id, (org_stat & (~trackstatusbitmask) )); } @@ -499,24 +500,14 @@ bool TRT_StrawStatusSummarySvc::get_track_status(Identifier offlineID){ StatusCode TRT_StrawStatusSummarySvc::readFromTextFile(const std::string& filename) { -/* - -TRT_StrawStatusSummarySvc INFO IOVCALLBACK for key /TRT/Cond/Status number 2 -TRT_StrawStatusSummarySvc INFO IOVCALLBACK for key /TRT/Cond/StatusPermanent number 2 -TRT_StrawStatusSummarySvc INFO TRT_StrawStatusSummarySvc::readFromTextFile dummyNonExisting_TRT_StrawStatus_InputFile_TRT_StrawStatusSummarySvc -TRT_StrawStatusSummarySvc DEBUG Permanently dead straws are removed based on the txt file: -TRT_StrawStatusSummarySvc ERROR Cannot initialize TRT_StrawStatusSummarySvc: Read from text file chosen, but no text file is found. To resolve: copy strawstatus.txt from TRT_ConditionsAlgs/share to your run dir -IOVSvcTool ERROR Problems calling TRT_StrawStatusSummarySvc[0xf2f0b80]+d1 -ServiceManager DEBUG Stopping service TRT_StrawStatusSummarySvc -myOCA INFO 0: TRTCond::StrawStatusMultChanContainer#/TRT/Cond/Status#/TRT/Cond/Status -ToolSvc.myOCATool DEBUG Found object for type TRTCond::StrawStatusMultChanContainer key /TRT/Cond/Status -AthenaSealSvc DEBUG Checking members of type NestedContainerBase<2,TRTCond::NestedContainer<3,TRTCond::StrawStatus,TRTCond::DeadStrawTrait>,TRTCond::StrawStatus,TRTCond::DeadStrawTrait> for 2 members: ok -*/ msg(MSG::INFO) << "TRT_StrawStatusSummarySvc::readFromTextFile " << filename << endmsg; -// m_par_stattextfile = filename; + + // Input text file + std::ifstream ifs(m_par_stattextfile.c_str()) ; if(!m_par_stattextfile.empty()) { - StrawStatusContainer* strawstatuscontainer = getStrawStatusContainer(); + StrawStatusContainer* strawstatuscontainer = const_cast<StrawStatusContainer*>(getStrawStatusContainer()); strawstatuscontainer->clear(); + const InDetDD::TRT_DetectorManager* TRTDetectorManager ; if ((m_detStore->retrieve(TRTDetectorManager)).isFailure()) { @@ -535,15 +526,12 @@ AthenaSealSvc DEBUG Checking members of type NestedC TRTCond::ExpandedIdentifier::LAYERWHEEL ) ; strawstatuscontainer->setStatus(id,TRTCond::StrawStatus::Good ); } - - - // std::ifstream ifs(filename.c_str()) ; - std::ifstream ifs(m_par_stattextfile.c_str()) ; - if(msgLvl(MSG::INFO)) msg(MSG::INFO) << "Permanently dead straws are removed based on the txt file: "<<m_par_stattextfilepermanent<< endmsg; + + if(msgLvl(MSG::INFO)) msg(MSG::INFO) << "Run dependent dead straws are removed based on the txt file: "<<m_par_stattextfile<< endmsg; if (!ifs) { - msg(MSG::ERROR) << "Cannot initialize TRT_StrawStatusSummarySvc: Read from text file chosen, but no text file is found. To resolve: copy strawstatus.txt from TRT_ConditionsAlgs/share to your run dir" << endmsg; + msg(MSG::ERROR) << "No text file is found. To resolve: copy strawstatus.txt from TRT_ConditionsAlgs/share to your run dir" << endmsg; return StatusCode::FAILURE; } @@ -563,13 +551,13 @@ AthenaSealSvc DEBUG Checking members of type NestedC } int level = TRTCond::ExpandedIdentifier::STRAW ; line +=1; - // std::cout<<"read "<< bec<< " "<<layer<<" "<<sector<<" "<<strawlayer<<" "<<straw<<" "<<level<<" "<<std::endl; + if( straw<0 ) { level = TRTCond::ExpandedIdentifier::STRAWLAYER ; straw = 0 ; } if( strawlayer<0 ) { level = TRTCond::ExpandedIdentifier::MODULE ; strawlayer = 0 ; } if( sector<0 ) { level = TRTCond::ExpandedIdentifier::LAYERWHEEL ; sector = 0 ; } if( layer<0 ) { level = TRTCond::ExpandedIdentifier::BARRELEC ; layer = 0 ; } if( bec<-2 ) { level = TRTCond::ExpandedIdentifier::DETECTOR ; bec = -2 ; } - msg(MSG::INFO) << "StrawRead FromText File: bec: " << bec << " layer: " << layer << " phi: " << sector << " stl: " << strawlayer << " stw: " << straw << endmsg; + msg(MSG::INFO) << "StrawRead FromText File: bec: " << bec << " layer: " << layer << " phi: " << sector << " stl: " << strawlayer << " stw: " << straw << endmsg; TRTCond::ExpandedIdentifier id( bec,layer,sector,strawlayer,straw,level); strawstatuscontainer->set(id,TRTCond::StrawStatus::Dead) ; strawstatuscontainer->setStatus(id,TRTCond::StrawStatus::Dead ); @@ -583,6 +571,7 @@ AthenaSealSvc DEBUG Checking members of type NestedC } msg(MSG::INFO) << "Straw Status read from: " << filename << " We read: " << line << " straws on it" << endmsg; + } else { msg(MSG::ERROR) << "TRT_StrawStatusSummarySvc::readFromTextFile: can not read the file, file missing: " << filename << endmsg; @@ -593,34 +582,21 @@ AthenaSealSvc DEBUG Checking members of type NestedC std::ifstream ifsHT(m_par_stattextfileHT.c_str()) ; if(!m_par_stattextfileHT.empty()) { - StrawStatusContainer* strawstatuscontainer = getStrawStatusHTContainer(); + StrawStatusContainer* strawstatuscontainer = const_cast<StrawStatusContainer*>(getStrawStatusHTContainer()); strawstatuscontainer->clear(); + const InDetDD::TRT_DetectorManager* TRTDetectorManager ; if ((m_detStore->retrieve(TRTDetectorManager)).isFailure()) { msg(MSG::FATAL) << "Problem retrieving TRT_DetectorManager" << endmsg; } - // initialize strawlayers with status 'good' - for( InDetDD::TRT_DetElementCollection::const_iterator it = TRTDetectorManager->getDetectorElementBegin() ; - it != TRTDetectorManager->getDetectorElementEnd() ; ++it) { - Identifier ident = (*it)->identify() ; - TRTCond::ExpandedIdentifier id( m_trtid->barrel_ec(ident), - m_trtid->layer_or_wheel(ident), - 0, - m_trtid->straw_layer(ident), - m_trtid->straw(ident), - TRTCond::ExpandedIdentifier::LAYERWHEEL ) ; - strawstatuscontainer->setStatus(id,TRTCond::StrawStatus::Good ); - } - std::ifstream ifsHT(m_par_stattextfileHT.c_str()) ; + if(msgLvl(MSG::INFO)) msg(MSG::INFO) << "HT dead straws are removed based on the txt file: "<<m_par_stattextfileHT<< endmsg; if (!ifsHT) { - msg(MSG::ERROR) << "Cannot initialize TRT_StrawStatusSummarySvc: Read from text file chosen, but no text file is found. To resolve: copy strawstatus.txt from TRT_ConditionsAlgs/share to your run dir" << endmsg; + msg(MSG::ERROR) << "No text file is found. To resolve: copy strawstatus.txt from TRT_ConditionsAlgs/share to your run dir" << endmsg; return StatusCode::FAILURE; } - - if (ifsHT) { @@ -634,7 +610,7 @@ AthenaSealSvc DEBUG Checking members of type NestedC while( ifsHT >> bec >> sector>> straw >> strawlayer >> layer >> status ) { int level = TRTCond::ExpandedIdentifier::STRAW ; - // std::cout<<"read "<< bec<< " "<<layer<<" "<<sector<<" "<<strawlayer<<" "<<straw<<" "<<level<<" "<<std::endl; + line +=1; if( straw<0 ) { level = TRTCond::ExpandedIdentifier::STRAWLAYER ; straw = 0 ; } if( strawlayer<0 ) { level = TRTCond::ExpandedIdentifier::MODULE ; strawlayer = 0 ; } @@ -679,9 +655,6 @@ AthenaSealSvc DEBUG Checking members of type NestedC - - - //Permanent @@ -692,10 +665,9 @@ AthenaSealSvc DEBUG Checking members of type NestedC if (ifspermanent) { - StrawStatusContainer* strawstatuspermanentcontainer = getStrawStatusPermanentContainer(); + StrawStatusContainer* strawstatuspermanentcontainer = const_cast<StrawStatusContainer*>(getStrawStatusPermanentContainer()); strawstatuspermanentcontainer->clear(); - int bec, layer, sector, strawlayer, straw, status; //int pid_status, track_status; //double lt_occ, ht_occ; @@ -708,7 +680,7 @@ AthenaSealSvc DEBUG Checking members of type NestedC return StatusCode::FAILURE; } int level = TRTCond::ExpandedIdentifier::STRAW ; - // std::cout<<"read "<< bec<< " "<<layer<<" "<<sector<<" "<<strawlayer<<" "<<straw<<" "<<level<<" "<<std::endl; + line +=1; if( straw<0 ) { level = TRTCond::ExpandedIdentifier::STRAWLAYER ; straw = 0 ; } if( strawlayer<0 ) { level = TRTCond::ExpandedIdentifier::MODULE ; strawlayer = 0 ; } @@ -738,64 +710,65 @@ AthenaSealSvc DEBUG Checking members of type NestedC - - - - - /////////////////////////////////////////////////// -StatusCode TRT_StrawStatusSummarySvc::writeToTextFile(const std::string& filename ) const +StatusCode TRT_StrawStatusSummarySvc::writeToTextFile(const std::string& filename ) { std::ofstream outfile(filename.c_str()); - msg(MSG::INFO) << " Dump To File: StrawStatus " << endmsg; -if(m_strawstatuscontainer->numObjects()>0){ + + if(getStrawStatusHTContainer()->numObjects()>0){ + msg(MSG::INFO) << " Dump To File: StrawStatus " << endmsg; outfile << " Status: " << std::endl; - TRTCond::StrawStatusLayerContainer::FlatContainer flatcontainer; - m_strawstatuscontainer ->getall(flatcontainer) ; - for( TRTCond::StrawStatusContainer::FlatContainer::const_iterator + TRTCond::StrawStatusLayerContainer::FlatContainer flatcontainer; + + getStrawStatusContainer()->getall(flatcontainer) ; + + for( TRTCond::StrawStatusContainer::FlatContainer::const_iterator it = flatcontainer.begin() ; it != flatcontainer.end() ; ++it) { - TRTCond::ExpandedIdentifier id = it->first ; - const TRTCond::StrawStatus* status = it->second ; - outfile << id << " " << int(status->getstatus()) << std::endl ; + TRTCond::ExpandedIdentifier id = it->first ; + const TRTCond::StrawStatus* status = it->second ; + outfile << id << " " << int(status->getstatus()) << std::endl ; + } } -} + + if( getStrawStatusHTContainer()->numObjects()>0){ msg(MSG::INFO) << " Dump To File: StrawStatus HT " << endmsg; -if( m_strawstatusHTcontainer->numObjects()>0){ - TRTCond::StrawStatusLayerContainer::FlatContainer flatcontainerHT; - m_strawstatusHTcontainer ->getall(flatcontainerHT) ; + outfile << " HT Status: " << std::endl; + TRTCond::StrawStatusLayerContainer::FlatContainer flatcontainerHT; + getStrawStatusHTContainer()->getall(flatcontainerHT) ; - outfile << " HT Status: " << std::endl; - for( TRTCond::StrawStatusContainer::FlatContainer::const_iterator + + for( TRTCond::StrawStatusContainer::FlatContainer::const_iterator it = flatcontainerHT.begin() ; it != flatcontainerHT.end() ; ++it) { - TRTCond::ExpandedIdentifier id = it->first ; - const TRTCond::StrawStatus* status = it->second ; - outfile << id << " " << int(status->getstatus()) << std::endl ; + TRTCond::ExpandedIdentifier id = it->first ; + const TRTCond::StrawStatus* status = it->second ; + outfile << id << " " << int(status->getstatus()) << std::endl ; + } } -} -if(m_strawstatuspermanentcontainer->numObjects()>0){ - msg(MSG::INFO) << " Dump To File: StrawStatus permanent " << endmsg; - TRTCond::StrawStatusLayerContainer::FlatContainer flatcontainerpermanent; - m_strawstatuspermanentcontainer ->getall(flatcontainerpermanent) ; + if(getStrawStatusPermanentContainer()->numObjects()>0){ + msg(MSG::INFO) << " Dump To File: StrawStatus permanent " << endmsg; + outfile << " permanent Status: " << std::endl; + TRTCond::StrawStatusLayerContainer::FlatContainer flatcontainerpermanent; + + getStrawStatusPermanentContainer() ->getall(flatcontainerpermanent) ; - outfile << " permanent Status: " << std::endl; - for( TRTCond::StrawStatusContainer::FlatContainer::const_iterator + for( TRTCond::StrawStatusContainer::FlatContainer::const_iterator it = flatcontainerpermanent.begin() ; it != flatcontainerpermanent.end() ; ++it) { - TRTCond::ExpandedIdentifier id = it->first ; - const TRTCond::StrawStatus* status = it->second ; - outfile << id << " " << int(status->getstatus()) << std::endl ; - } -} - return StatusCode::SUCCESS ; + TRTCond::ExpandedIdentifier id = it->first ; + const TRTCond::StrawStatus* status = it->second ; + outfile << id << " " << int(status->getstatus()) << std::endl ; + } + } + return StatusCode::SUCCESS ; @@ -803,10 +776,6 @@ if(m_strawstatuspermanentcontainer->numObjects()>0){ - - - - /////////////////////////////////////////////////// // // Helpers for the alive straws tool Need to consistent with TRT_ElectronPIDTool @@ -914,7 +883,7 @@ void TRT_StrawStatusSummarySvc::resetArrays(){ /////////////////////////////////////////////////// -StatusCode TRT_StrawStatusSummarySvc::ComputeAliveStraws(){ +void TRT_StrawStatusSummarySvc::ComputeAliveStraws(){ // The TRT helper: bool detectorManager = true; if (StatusCode::SUCCESS!=m_detStore->retrieve(m_trtDetMgr,"TRT")) { @@ -922,6 +891,7 @@ StatusCode TRT_StrawStatusSummarySvc::ComputeAliveStraws(){ detectorManager = false; } + resetArrays(); for (std::vector<Identifier>::const_iterator it = m_trtid->straw_layer_begin(); it != m_trtid->straw_layer_end(); it++ ) { unsigned int nstraws = 0; @@ -956,27 +926,38 @@ StatusCode TRT_StrawStatusSummarySvc::ComputeAliveStraws(){ }//For }//For + m_setup=true; ATH_MSG_DEBUG("Active Straws: " << m_stw_total[0] << " \t" << m_stw_total[1]<< "\t" << m_stw_total[2]<< "\t" << m_stw_total[3] ); - return StatusCode::SUCCESS; -} +} -/////////////////////////////////////////////////// +int* TRT_StrawStatusSummarySvc::getStwTotal() +{ + if(!m_setup) { + resetArrays(); + ComputeAliveStraws(); + } + return m_stw_total; +} -StatusCode TRT_StrawStatusSummarySvc::IOVCallBack(IOVSVC_CALLBACK_ARGS_P(I,keys)) +int** TRT_StrawStatusSummarySvc::getStwLocal() { - for (std::list<std::string>::const_iterator - itr=keys.begin(); itr!=keys.end(); ++itr) - msg(MSG::INFO) << " IOVCALLBACK for key " << *itr << " number " << I << endmsg; - - // if constants need to be read from textfile, we sue the call back routine to refill the IOV objects - if(!m_par_stattextfile.empty()) return readFromTextFile( m_par_stattextfile) ; + if(!m_setup) { + resetArrays(); + ComputeAliveStraws(); + } - msg(MSG::INFO) << " Compute Alive Straws " << endmsg; - StatusCode sc = ComputeAliveStraws(); - return sc ; + return m_stw_local; +} + +int** TRT_StrawStatusSummarySvc::getStwWheel() +{ + if(!m_setup) { + resetArrays(); + ComputeAliveStraws(); + } + return m_stw_wheel; } -//////////////////////////////// StatusCode TRT_StrawStatusSummarySvc::streamOutStrawStatObjects() const diff --git a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_StrawStatusSummarySvc.h b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_StrawStatusSummarySvc.h index 4e47d3c31887..3f2404b37678 100755 --- a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_StrawStatusSummarySvc.h +++ b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_StrawStatusSummarySvc.h @@ -14,10 +14,17 @@ #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" #include "StoreGate/DataHandle.h" +#include "GaudiKernel/ContextSpecificPtr.h" +#include "GaudiKernel/ThreadLocalContext.h" +#include "GaudiKernel/ICondSvc.h" +#include "StoreGate/ReadCondHandleKey.h" +#include "StoreGate/DataHandle.h" //#include "InDetIdentifier/TRT_ID.h" #include "TRT_ConditionsServices/ITRT_StrawStatusSummarySvc.h" #include "TRT_ConditionsServices/ITRT_ConditionsSvc.h" #include "StoreGate/StoreGateSvc.h" +#include "InDetIdentifier/TRT_ID.h" +#include "InDetReadoutGeometry/TRT_BaseElement.h" class TRT_ID; @@ -94,20 +101,18 @@ class TRT_StrawStatusSummarySvc: public AthService, bool get_track_status(Identifier offlineID); StatusCode readFromTextFile(const std::string& filename) ; - StatusCode writeToTextFile(const std::string& filename) const ; + StatusCode writeToTextFile(const std::string& filename) ; StatusCode streamOutStrawStatObjects () const ; StatusCode registerObjects(std::string tag, int run1, int event1, int run2, int event2) const; - StatusCode IOVCallBack(IOVSVC_CALLBACK_ARGS); - - StatusCode ComputeAliveStraws() ; - StrawStatusContainer* getStrawStatusContainer() const ; - StrawStatusContainer* getStrawStatusPermanentContainer() const ; - StrawStatusContainer* getStrawStatusHTContainer() const ; + const StrawStatusContainer* getStrawStatusContainer() ;// const ; + const StrawStatusContainer* getStrawStatusPermanentContainer() ; //const ; + const StrawStatusContainer* getStrawStatusHTContainer() ; //const ; + void ComputeAliveStraws() ; int *getStwTotal() ; int **getStwLocal() ; int **getStwWheel() ; @@ -125,25 +130,36 @@ class TRT_StrawStatusSummarySvc: public AthService, std::string m_par_strawstatusHTcontainerkey; std::string m_par_stattextfile; //input text file - - //std::string m_par_strawstatuspermanentcontainerkey; - std::string m_par_stattextfilepermanent; //input text file: permanent - std::string m_par_stattextfileHT; //input text file + std::string m_par_stattextfilepermanent; //input text file: permanent + std::string m_par_stattextfileHT; //input text file HT std::string m_par_statstream; //output stream - std::string m_inputFile; const TRT_ID* m_trtid; const InDetDD::TRT_DetectorManager* m_trtDetMgr; // TRT detector manager (to get ID helper) - TRTCond::StrawStatusMultChanContainer m_deadstraws ; - bool m_strawstatuscontainerexists; - bool m_strawstatuspermanentcontainerexists; - bool m_strawstatusHTcontainerexists; + ServiceHandle<ICondSvc> m_condSvc; + // ReadHandle keys + SG::ReadCondHandleKey<StrawStatusContainer> m_statReadKey{this,"StatReadKeyName","in","StrawStatus in-key"}; + SG::ReadCondHandleKey<StrawStatusContainer> m_permReadKey{this,"PermReadKeyName","in","StrawStatusPermanent in-key"}; + SG::ReadCondHandleKey<StrawStatusContainer> m_statHTReadKey{this,"StatHTReadKeyName","in","StrawStatusHT in-key"}; + + // Caches + mutable std::vector<const StrawStatusContainer*> m_strawstatuscontainer; + mutable std::vector<const StrawStatusContainer*> m_strawstatuspermanentcontainer; + mutable std::vector<const StrawStatusContainer*> m_strawstatusHTcontainer; + mutable std::mutex m_cacheMutex; + mutable std::vector<EventContext::ContextEvt_t> m_evtstat; + mutable std::vector<EventContext::ContextEvt_t> m_evtperm; + mutable std::vector<EventContext::ContextEvt_t> m_evtstatHT; + // Used in simulation (GEANT4) jobs + bool m_isGEANT4; + const DataHandle<StrawStatusContainer> m_strawstatusG4; + const DataHandle<StrawStatusContainer> m_strawstatuspermanentG4; + const DataHandle<StrawStatusContainer> m_strawstatusHTG4; + + bool m_setup; - const DataHandle<TRTCond::StrawStatusMultChanContainer> m_strawstatuscontainer ; //Same name as in getStrawStatusContainer! - const DataHandle<TRTCond::StrawStatusMultChanContainer> m_strawstatuspermanentcontainer ; //Same name as in getStrawStatusContainer! - const DataHandle<TRTCond::StrawStatusMultChanContainer> m_strawstatusHTcontainer ; //Same name as in getStrawStatusContainer! int *m_stw_total; @@ -165,42 +181,85 @@ class TRT_StrawStatusSummarySvc: public AthService, // inline methods //////////////////////////////////////////////////////////////////////////////////////////// -inline int* TRT_StrawStatusSummarySvc::getStwTotal() -{ - return m_stw_total; -} -inline int** TRT_StrawStatusSummarySvc::getStwLocal() -{ - return m_stw_local; -} -inline int** TRT_StrawStatusSummarySvc::getStwWheel() +inline void TRT_StrawStatusSummarySvc::setStatus( const TRTCond::ExpandedIdentifier& id, unsigned int status ) { - return m_stw_wheel; + const_cast<StrawStatusContainer*>(getStrawStatusContainer())->set( id, status) ; } +inline const TRT_StrawStatusSummarySvc::StrawStatusContainer* TRT_StrawStatusSummarySvc::getStrawStatusContainer() { + if(m_isGEANT4) { + return &(*m_strawstatusG4); + } + const EventContext& event_context=Gaudi::Hive::currentContext(); + EventContext::ContextID_t slot=event_context.slot(); + EventContext::ContextEvt_t event_id=event_context.evt(); + std::lock_guard<std::mutex> lock(m_cacheMutex); + if(slot>=m_evtstat.size()) { + m_evtstat.resize(slot+1); + m_strawstatuscontainer.resize(slot+1); + } -inline void TRT_StrawStatusSummarySvc::setStatus( const TRTCond::ExpandedIdentifier& id, unsigned int status ) -{ - getStrawStatusContainer()->set( id, status) ;//, lt_occ, ht_occ); -} + if(m_evtstat[slot]!=event_id) { + SG::ReadCondHandle<StrawStatusContainer> rst(m_statReadKey,event_context); + m_strawstatuscontainer[slot]=(*rst); + m_evtstat[slot]=event_id; + } + return m_strawstatuscontainer[slot]; -inline TRT_StrawStatusSummarySvc::StrawStatusContainer* TRT_StrawStatusSummarySvc::getStrawStatusContainer() const { - const StrawStatusContainer* rcesben = &(*m_strawstatuscontainer) ; - return const_cast<StrawStatusContainer*>(rcesben) ; } -inline TRT_StrawStatusSummarySvc::StrawStatusContainer* TRT_StrawStatusSummarySvc::getStrawStatusPermanentContainer() const { - const StrawStatusContainer* rcesben = &(*m_strawstatuspermanentcontainer) ; - return const_cast<StrawStatusContainer*>(rcesben) ; +inline const TRT_StrawStatusSummarySvc::StrawStatusContainer* TRT_StrawStatusSummarySvc::getStrawStatusPermanentContainer() { + + if(m_isGEANT4) { + return &(*m_strawstatuspermanentG4); + } + const EventContext& event_context=Gaudi::Hive::currentContext(); + EventContext::ContextID_t slot=event_context.slot(); + EventContext::ContextEvt_t event_id=event_context.evt(); + std::lock_guard<std::mutex> lock(m_cacheMutex); + if(slot>=m_evtperm.size()) { + m_evtperm.resize(slot+1); + m_strawstatuspermanentcontainer.resize(slot+1); + } + + if(m_evtperm[slot]!=event_id) { + SG::ReadCondHandle<StrawStatusContainer> rp(m_permReadKey,event_context); + m_strawstatuspermanentcontainer[slot]=(*rp); + m_evtperm[slot]=event_id; + } + + return m_strawstatuspermanentcontainer[slot]; + } -inline TRT_StrawStatusSummarySvc::StrawStatusContainer* TRT_StrawStatusSummarySvc::getStrawStatusHTContainer() const { - const StrawStatusContainer* rcesben = &(*m_strawstatusHTcontainer) ; - return const_cast<StrawStatusContainer*>(rcesben) ; +inline const TRT_StrawStatusSummarySvc::StrawStatusContainer* TRT_StrawStatusSummarySvc::getStrawStatusHTContainer() { + + if(m_isGEANT4) { + return &(*m_strawstatusHTG4); + } + const EventContext& event_context=Gaudi::Hive::currentContext(); + EventContext::ContextID_t slot=event_context.slot(); + EventContext::ContextEvt_t event_id=event_context.evt(); + std::lock_guard<std::mutex> lock(m_cacheMutex); + if(slot>=m_evtstatHT.size()) { + m_evtstatHT.resize(slot+1); + m_strawstatusHTcontainer.resize(slot+1); + } + + if(m_evtstatHT[slot]!=event_id) { + SG::ReadCondHandle<StrawStatusContainer> rht(m_statHTReadKey,event_context); + m_strawstatusHTcontainer[slot]=(*rht); + m_evtstatHT[slot]=event_id; + } + + return m_strawstatusHTcontainer[slot]; } + + + inline StatusCode TRT_StrawStatusSummarySvc::queryInterface( const InterfaceID& riid, void** ppvIf ) { if ( riid == ITRT_StrawStatusSummarySvc::interfaceID() ) { diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py index 762a0dbd6226..661706e66422 100644 --- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py @@ -2,6 +2,7 @@ # block include of file, this is used by many packages include.block ("InDetRecExample/InDetRecConditionsAccess.py") +from AthenaCommon.AthenaCommonFlags import athenaCommonFlags isData = (globalflags.DataSource == 'data') eventInfoKey = "ByteStreamEventInfo" @@ -383,19 +384,22 @@ if DetFlags.haveRIO.TRT_on(): conddb.addFolder("TRT_ONL","/TRT/Onl/ROD/Compress") # Calibration constants - # Block folders if they are to be read in from text files + # Block folders if they are to be read from or written to text files #conddb.blockFolder("/TRT/Calib/RT") #conddb.blockFolder("/TRT/Calib/T0") if not conddb.folderRequested('/TRT/Calib/RT'): conddb.addFolderSplitOnline("TRT","/TRT/Onl/Calib/RT","/TRT/Calib/RT",className='TRTCond::RtRelationMultChanContainer') + if not conddb.folderRequested('/TRT/Calib/T0'): conddb.addFolderSplitOnline("TRT","/TRT/Onl/Calib/T0","/TRT/Calib/T0",className='TRTCond::StrawT0MultChanContainer') + if not conddb.folderRequested('/TRT/Calib/errors2d'): TRTErrorsFolder = conddb.addFolderSplitOnline ("TRT","/TRT/Onl/Calib/errors2d","/TRT/Calib/errors2d",className='TRTCond::RtRelationMultChanContainer') + if not conddb.folderRequested('/TRT/Calib/slopes'): TRTSlopesFolder = conddb.addFolderSplitOnline ("TRT","/TRT/Onl/Calib/slopes","/TRT/Calib/slopes",className='TRTCond::RtRelationMultChanContainer') - + if not conddb.folderRequested('/TRT/Calib/ToTCalib'): conddb.addFolderSplitOnline("TRT","/TRT/Onl/Calib/ToTCalib","/TRT/Calib/ToTCalib") @@ -411,28 +415,17 @@ if DetFlags.haveRIO.TRT_on(): if(InDetFlags.doPrintConfigurables()): print InDetTRTCalDbSvc - # Calibration folder management - # Use this for reading folders from text files - #from TRT_ConditionsAlgs.TRT_ConditionsAlgsConf import TRTCondWrite - #TRTCondWrite = TRTCondWrite( name = "TRTCondWrite", - # CalibInputFile = "dbconst.336630.txt", - # CalibOutputFile = "") - # use as CalibOutputFile the name calibout_n, where n=0,1,2,3 is the format - # - #topSequence += TRTCondWrite - #if (InDetFlags.doPrintConfigurables()): - # print TRTCondWrite - - # Dead/Noisy Straw Lists if not conddb.folderRequested('/TRT/Cond/Status'): - conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/Status","/TRT/Cond/Status") + conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/Status","/TRT/Cond/Status",className='TRTCond::StrawStatusMultChanContainer') + if not conddb.folderRequested('/TRT/Cond/StatusPermanent'): - conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/StatusPermanent","/TRT/Cond/StatusPermanent") + conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/StatusPermanent","/TRT/Cond/StatusPermanent",className='TRTCond::StrawStatusMultChanContainer') + # Argon straw list if not conddb.folderRequested('/TRT/Cond/StatusHT'): - conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/StatusHT","/TRT/Cond/StatusHT") + conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/StatusHT","/TRT/Cond/StatusHT",className='TRTCond::StrawStatusMultChanContainer') # DCS Data Folders if (globalflags.InputFormat() == 'bytestream' and globalflags.DataSource() == 'data'): @@ -485,8 +478,12 @@ if DetFlags.haveRIO.TRT_on(): InDetTRTConditionsServices=[] # Dead/Noisy Straw Service + useOldStyle = False + if DetFlags.simulate.any_on() or athenaCommonFlags.EvtMax==1: + useOldStyle = True from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_StrawStatusSummarySvc - InDetTRTStrawStatusSummarySvc = TRT_StrawStatusSummarySvc(name = "InDetTRTStrawStatusSummarySvc") + InDetTRTStrawStatusSummarySvc = TRT_StrawStatusSummarySvc(name = "InDetTRTStrawStatusSummarySvc", + isGEANT4 = useOldStyle) ServiceMgr += InDetTRTStrawStatusSummarySvc if (InDetFlags.doPrintConfigurables()): print InDetTRTStrawStatusSummarySvc @@ -497,7 +494,7 @@ if DetFlags.haveRIO.TRT_on(): # DCS Conditions Service if InDetFlags.useTrtDCS(): - + # Hardware Mapping Service from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_HWMappingSvc InDetTRT_HWMappingSvc = TRT_HWMappingSvc(name="InDetTRT_HWMappingSvc") diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py index 1f7b6ddefee0..aa0abb6a17ca 100644 --- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py +++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py @@ -542,14 +542,18 @@ class TRTConditionsServicesSetup: if not (conddb.folderRequested('/TRT/Onl/ROD/Compress')): conddb.addFolder("TRT_ONL","/TRT/Onl/ROD/Compress") - if not (conddb.folderRequested('/TRT/Calib/RT') or conddb.folderRequested('/TRT/Onl/Calib/RT')): - conddb.addFolderSplitOnline('TRT','/TRT/Onl/Calib/RT','/TRT/Calib/RT',className='TRTCond::RtRelationMultChanContainer') - if not (conddb.folderRequested('/TRT/Calib/T0') or conddb.folderRequested('/TRT/Onl/Calib/T0')): - conddb.addFolderSplitOnline('TRT','/TRT/Onl/Calib/T0','/TRT/Calib/T0',className='TRTCond::StrawT0MultChanContainer') + if not conddb.folderRequested('/TRT/Calib/RT'): + conddb.addFolderSplitOnline("TRT","/TRT/Onl/Calib/RT","/TRT/Calib/RT",className='TRTCond::RtRelationMultChanContainer') + + if not conddb.folderRequested('/TRT/Calib/T0'): + conddb.addFolderSplitOnline("TRT","/TRT/Onl/Calib/T0","/TRT/Calib/T0",className='TRTCond::StrawT0MultChanContainer') + + if not conddb.folderRequested('/TRT/Calib/errors2d'): + TRTErrorsFolder = conddb.addFolderSplitOnline ("TRT","/TRT/Onl/Calib/errors2d","/TRT/Calib/errors2d",className='TRTCond::RtRelationMultChanContainer') + + if not conddb.folderRequested('/TRT/Calib/slopes'): + TRTSlopesFolder = conddb.addFolderSplitOnline ("TRT","/TRT/Onl/Calib/slopes","/TRT/Calib/slopes",className='TRTCond::RtRelationMultChanContainer') - if not (conddb.folderRequested('/TRT/Calib/errors') or conddb.folderRequested('/TRT/Onl/Calib/errors')): - conddb.addFolderSplitOnline ("TRT","/TRT/Onl/Calib/errors","/TRT/Calib/errors",className='TRTCond::RtRelationMultChanContainer') - # not needed anymore conddb.addOverride('/TRT/Onl/Calib/errors','TrtCalibErrorsOnl-ErrorVal-00-00') if not (conddb.folderRequested('/TRT/Calib/ToTCalib') or conddb.folderRequested('/TRT/Onl/Calib/ToTCalib')): conddb.addFolderSplitOnline("TRT","/TRT/Onl/Calib/ToTCalib","/TRT/Calib/ToTCalib") @@ -560,7 +564,7 @@ class TRTConditionsServicesSetup: # Calibration DB Service from AthenaCommon.AppMgr import ServiceMgr from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_CalDbSvc - #InDetTRTCalDbSvc = TRT_CalDbSvc(self.instanceName('TRT_CalDbSvc')) # + InDetTRTCalDbSvc = TRT_CalDbSvc('TRT_CalDbSvc') ServiceMgr += InDetTRTCalDbSvc if self._print: @@ -568,16 +572,14 @@ class TRTConditionsServicesSetup: # Dead/Noisy Straw Lists - if not (conddb.folderRequested('/TRT/Cond/Status') or conddb.folderRequested('/TRT/Onl/Cond/Status')): - conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/Status", "/TRT/Cond/Status") - #there used to be an additional tag here! - #conddb.addFolder("TRT","/TRT/Cond/StatusPermanent<tag>TrtStrawStatusPermanent-01</tag>") - if not (conddb.folderRequested('/TRT/Cond/StatusPermanent') or conddb.folderRequested('/TRT/Onl/Cond/StatusPermanent')): - conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/StatusPermanent", "/TRT/Cond/StatusPermanent") - - #high threshold capabilities - if not (conddb.folderRequested('/TRT/Cond/StatusHT') or conddb.folderRequested('/TRT/Onl/Cond/StatusHT')): - conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/StatusHT", "/TRT/Cond/StatusHT") + if not conddb.folderRequested('/TRT/Cond/Status'): + conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/Status","/TRT/Cond/Status",className='TRTCond::StrawStatusMultChanContainer') + if not conddb.folderRequested('/TRT/Cond/StatusPermanent'): + conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/StatusPermanent","/TRT/Cond/StatusPermanent",className='TRTCond::StrawStatusMultChanContainer') + + # Argon straw list + if not conddb.folderRequested('/TRT/Cond/StatusHT'): + conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/StatusHT","/TRT/Cond/StatusHT",className='TRTCond::StrawStatusMultChanContainer') # DCS Data Folders -- GitLab From 41fe5c7e71172745a46799d52579da14a9cb89ca Mon Sep 17 00:00:00 2001 From: Batool Safarzadeh Samani <safarzad@lxplus008.cern.ch> Date: Wed, 30 May 2018 15:20:50 +0200 Subject: [PATCH 018/562] fixing the issue with the references Former-commit-id: 8a4377e915ab472632fb08b6f6c73018b7282694 --- .../TrigEgammaHypo/TrigL2PhotonFex.h | 4 +-- .../TrigEgammaHypo/src/TrigL2PhotonFexMT.h | 4 +-- .../src/TrigL2PhotonHypoAlgMT.cxx | 11 +++--- .../src/TrigL2PhotonHypoTool.cxx | 36 +++---------------- 4 files changed, 16 insertions(+), 39 deletions(-) diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/TrigEgammaHypo/TrigL2PhotonFex.h b/Trigger/TrigHypothesis/TrigEgammaHypo/TrigEgammaHypo/TrigL2PhotonFex.h index 4b3b301d603d..f1cc64136951 100755 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/TrigEgammaHypo/TrigL2PhotonFex.h +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/TrigEgammaHypo/TrigL2PhotonFex.h @@ -20,8 +20,8 @@ ** **************************************************************************/ -#ifndef TRIG_PHOTON_FEX_H -#define TRIG_PHOTON_FEX_H +#ifndef TRIG_TrigL2PhotonFex_H +#define TRIG_TrigL2PhotonFex_H // athena stuff #include "GaudiKernel/IToolSvc.h" diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonFexMT.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonFexMT.h index 0f1032e7d8ec..75bbc6789db3 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonFexMT.h +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonFexMT.h @@ -4,8 +4,8 @@ -#ifndef TRIG_PHOTON_FEXMT_H -#define TRIG_PHOTON_FEXMT_H +#ifndef TRIG_TrigL2PhotonFexMT_H +#define TRIG_TrigL2PhotonFexMT_H // athena stuff #include "GaudiKernel/IToolSvc.h" diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.cxx index 4ea74f5c354f..95a0572b50a4 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.cxx @@ -4,12 +4,15 @@ #include "GaudiKernel/Property.h" #include "TrigL2PhotonHypoAlgMT.h" -#include "DecisionHandling/HLTIdentifier.h" -#include "DecisionHandling/TrigCompositeUtils.h" -#include "TrigL2PhotonHypoTool.h" -using namespace TrigCompositeUtils; + +using TrigCompositeUtils::DecisionContainer; +using TrigCompositeUtils::DecisionAuxContainer; +using TrigCompositeUtils::DecisionIDContainer; +using TrigCompositeUtils::decisionIDs; +using TrigCompositeUtils::newDecisionIn; +using TrigCompositeUtils::linkToPrevious; TrigL2PhotonHypoAlgMT::TrigL2PhotonHypoAlgMT( const std::string& name, ISvcLocator* pSvcLocator ) : diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.cxx index 83982a03b6f8..e56367e97506 100755 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.cxx @@ -19,7 +19,7 @@ TrigL2PhotonHypoTool::TrigL2PhotonHypoTool( const std::string& type, StatusCode TrigL2PhotonHypoTool::initialize() { - // if ( !m_monTool.empty() ) CHECK( m_monTool.retrieve() ); + // if ( !m_monTool.empty() ) CHECK( m_monTool.rerthrieve() ); ATH_MSG_DEBUG( "Initialization completed successfully:" ); ATH_MSG_DEBUG( "AcceptAll = " @@ -34,38 +34,12 @@ StatusCode TrigL2PhotonHypoTool::initialize() { ATH_MSG_DEBUG( "dPHICLUSTERthr = " << m_dphicluster ); ATH_MSG_DEBUG( "dETACLUSTERthr = " << m_detacluster ); - unsigned int nEtaBin=m_etabin.size(); - if ( m_eTthr.size() != nEtaBin-1 ) { - ATH_MSG_ERROR( " etThr size is " << m_eTthr.size() << " but needs " << nEtaBin-1 ); - return StatusCode::FAILURE; - } - - - if ( m_eT2thr.size() != nEtaBin-1 ) { - ATH_MSG_ERROR( " et2Thr size is " << m_eT2thr.size() << " but needs " << nEtaBin-1 ); - return StatusCode::FAILURE; - } - - if ( m_hadeTthr.size() != nEtaBin-1 ) { - ATH_MSG_ERROR( " hadetThr size is " << m_hadeTthr.size() << " but needs " << nEtaBin-1 ); - return StatusCode::FAILURE; - } - if ( m_hadeT2thr.size() != nEtaBin-1 ) { - ATH_MSG_ERROR( " hadet2Thr size is " << m_hadeT2thr.size() << " but needs " << nEtaBin-1 ); - return StatusCode::FAILURE; - } - - if ( m_carcorethr.size() != nEtaBin-1 ) { - ATH_MSG_ERROR( " carcore size is " << m_carcorethr.size() << " but needs " << nEtaBin-1 ); - return StatusCode::FAILURE; - } - - if ( m_caeratiothr.size() != nEtaBin-1 ) { - ATH_MSG_ERROR( " caeratio size is " << m_caeratiothr.size() << " but needs " << nEtaBin-1 ); - return StatusCode::FAILURE; - } + std::vector<size_t> sizes( {m_eTthr.size(), m_eT2thr.size(), m_hadeTthr.size(), m_hadeT2thr.size(), m_carcorethr.size(), m_caeratiothr.size() } ); +if ( *std::min_element( sizes.begin(), sizes.end() ) != *std::max_element( sizes.begin(), sizes.end() ) ) { + ATH_MSG_ERROR( "Missconfiguration, cut properties listed above ( when DEBUG ) have different dimensions shortest: " << *std::min_element( sizes.begin(), sizes.end() ) << " longest " << *std::max_element( sizes.begin(), sizes.end() ) ); + return StatusCode::FAILURE; } return StatusCode::SUCCESS; } -- GitLab From 1de875dc29478ecc2afd83e95ffd71a50af1216d Mon Sep 17 00:00:00 2001 From: Francesca Pastore <francesca.pastore@cern.ch> Date: Thu, 31 May 2018 16:10:56 +0200 Subject: [PATCH 019/562] added mu.menu test, with new MuFastHypoAlg Former-commit-id: 94486143e4208af9d0562a2d5a18e9f1366668b1 --- .../TrigMuonHypo/TrigMufastHypoAlg.h | 14 +- .../python/testTrigMuonHypoConfig.py | 1875 +++++++++++++++++ .../TrigMuonHypo/src/TrigMufastHypoAlg.cxx | 148 +- .../TrigUpgradeTest/CMakeLists.txt | 10 +- .../TrigUpgradeTest/python/HLTCFConfig.py | 4 +- .../TrigUpgradeTest/python/MenuComponents.py | 11 +- .../TrigUpgradeTest/python/MenuHypoTools.py | 22 +- .../TrigUpgradeTest/share/egamma.menu.py | 2 +- .../TrigUpgradeTest/share/mu.menu.py | 842 ++++++++ .../TrigUpgradeTest/share/mu.withViews.py | 88 +- .../TrigUpgradeTest/test/test_mu_menu.sh | 8 + 11 files changed, 2877 insertions(+), 147 deletions(-) create mode 100755 Trigger/TrigHypothesis/TrigMuonHypo/python/testTrigMuonHypoConfig.py create mode 100644 Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_menu.sh diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMufastHypoAlg.h b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMufastHypoAlg.h index 90d0773ad7aa..c301248824ee 100644 --- a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMufastHypoAlg.h +++ b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMufastHypoAlg.h @@ -15,6 +15,7 @@ #include "DecisionHandling/TrigCompositeUtils.h" #include "TrigMuonHypo/TrigMufastHypoTool.h" +#include "DecisionHandling/HypoBase.h" class StoreGateSvc; class TriggerElement; @@ -23,7 +24,7 @@ class TriggerElement; // -------------------------------------------------------------------------------- class TrigMufastHypoAlg - : public ::AthReentrantAlgorithm + : public ::HypoBase { public: @@ -40,20 +41,9 @@ class TrigMufastHypoAlg TrigMufastHypoAlg(); ToolHandleArray<TrigMufastHypoTool> m_hypoTools {this, "HypoTools", {}, "Tools to perform selection"}; - SG::WriteHandleKey<TrigCompositeUtils::DecisionContainer> m_decisionsKey{ - this, "Decisions", "L2MuonFastDecisions", "Name of the decisions object attached by TrigMufastHypo"}; - - SG::ReadHandleKey<std::vector< SG::View*>> m_viewsKey{ - this, "ViewRoIs", "MUViewRoIs", "Name of the input data on Views produced by EventCreatorAlgorithms"}; - SG::ReadHandleKey<xAOD::L2StandAloneMuonContainer> m_muFastKey{ this, "MuonL2SAInfoFromMuFastAlg", "MuonL2SAInfo", "Name of the input data on xAOD::L2StandAloneMuonContainer produced by MuFastSteering"}; - SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiKey{ - this, "RoIs", "MURoIs", "Name of the input data from L1Decoder"}; - - SG::ReadHandleKey<TrigCompositeUtils::DecisionContainer> m_previousDecisionsKey{ - this, "L1Decisions", "", "Name of the input decisions object produced by MuFastSteering"}; }; #endif diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/python/testTrigMuonHypoConfig.py b/Trigger/TrigHypothesis/TrigMuonHypo/python/testTrigMuonHypoConfig.py new file mode 100755 index 000000000000..fce942b8da68 --- /dev/null +++ b/Trigger/TrigHypothesis/TrigMuonHypo/python/testTrigMuonHypoConfig.py @@ -0,0 +1,1875 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +from TrigMuonHypo.TrigMuonHypoConf import * +from TrigMuonHypo.TrigMuonHypoMonitoring import * +from AthenaCommon.SystemOfUnits import GeV +from MuonByteStream.MuonByteStreamFlags import muonByteStreamFlags +from TrigMuonBackExtrapolator.TrigMuonBackExtrapolatorConfig import * +from AthenaCommon.AppMgr import ToolSvc +from TriggerJobOpts.TriggerFlags import TriggerFlags +import re + +ToolSvc += MuonBackExtrapolatorForAlignedDet() +ToolSvc += MuonBackExtrapolatorForMisalignedDet() + +trigMuonEFSAThresholds = { + '0GeV' : [ [0,9.9], [ 0.100 ] ], + '2GeV' : [ [0,9.9], [ 2.000 ] ], + '3GeV' : [ [0,9.9], [ 3.000 ] ], + '4GeV' : [ [0,1.05,1.5,2.0,9.9], [ 3.0, 2.5, 2.5, 2.5] ], + '4GeV_barrelOnly' : [ [0,1.05,1.5,2.0,9.9], [ 3.0,1000.0,1000.0,1000.0]], + '5GeV' : [ [0,1.05,1.5,2.0,9.9], [ 4.6, 3.3, 4.0, 4.5] ], + '6GeV' : [ [0,1.05,1.5,2.0,9.9], [ 5.4, 4.5, 4.9, 5.3] ], + '7GeV' : [ [0,1.05,1.5,2.0,9.9], [ 6.3, 5.6, 5.6, 6.3] ], + '8GeV' : [ [0,1.05,1.5,2.0,9.9], [ 7.2, 6.7, 6.4, 7.3] ], + '10GeV' : [ [0,1.05,1.5,2.0,9.9], [ 8.9, 9.0, 8.4, 9.2] ], + '11GeV' : [ [0,1.05,1.5,2.0,9.9], [ 9.8, 10.1, 9.3, 10.1] ], + '12GeV' : [ [0,1.05,1.5,2.0,9.9], [ 10.6, 11.0, 10.2, 11.0] ], + '13GeV' : [ [0,1.05,1.5,2.0,9.9], [ 11.4, 12.0, 11.1, 12.0] ], + '14GeV' : [ [0,1.05,1.5,2.0,9.9], [ 12.2, 13.0, 12.1, 13.0] ], + '15GeV' : [ [0,1.05,1.5,2.0,9.9], [ 13.0, 14.0, 13.0, 14.0] ], + '18GeV' : [ [0,1.05,1.5,2.0,9.9], [ 15.7, 16.6, 15.4, 16.3] ], + '20GeV' : [ [0,1.05,1.5,2.0,9.9], [ 17.5, 18.5, 17.0, 18.0] ], + '22GeV' : [ [0,1.05,1.5,2.0,9.9], [ 19.1, 20.0, 18.4, 19.6] ], + '24GeV' : [ [0,1.05,1.5,2.0,9.9], [ 20.4, 20.8, 19.3, 21.0] ], + '30GeV' : [ [0,1.05,1.5,2.0,9.9], [ 25.0, 24.5, 23.0, 26.0] ], + '40GeV' : [ [0,1.05,1.5,2.0,9.9], [ 31.5, 30.0, 28.5, 32.5] ], + '40GeV_barrelOnly' : [ [0,1.05,1.5,2.0,9.9], [ 31.5,1000.0,1000.0,1000.0]], + '40GeV_uptoEC2' : [ [0,1.05,1.5,2.0,9.9], [ 31.5, 30.0, 28.5, 1000.0]], + '50GeV' : [ [0,1.05,1.5,2.0,9.9], [ 45.0, 45.0, 45.0, 45.0] ], + '50GeV_barrelOnly' : [ [0,1.05,1.5,2.0,9.9], [ 45.0,1000.0,1000.0,1000.0]], + '60GeV' : [ [0,1.05,1.5,2.0,9.9], [ 54.0, 54.0, 54.0, 54.0] ], + '60GeV_barrelOnly' : [ [0,1.05,1.5,2.0,9.9], [ 54.0,1000.0,1000.0,1000.0]], + '70GeV' : [ [0,1.05,1.5,2.0,9.9], [ 63.0, 63.0, 63.0, 63.0] ], + '80GeV' : [ [0,1.05,1.5,2.0,9.9], [ 72.0, 72.0, 72.0, 72.0] ], + '100GeV' : [ [0,1.05,1.5,2.0,9.9], [ 90.0, 90.0, 90.0, 90.0] ], + } + + +efCombinerThresholds = { + '2GeV' : [ [0,9.9], [2.000] ], + '3GeV' : [ [0,9.9], [3.000] ], + '4GeV' : [ [0,1.05,1.5,2.0,9.9], [ 3.93, 3.91, 3.88, 3.88] ], + '5GeV' : [ [0,1.05,1.5,2.0,9.9], [ 4.91, 4.86, 4.84, 4.83] ], + '6GeV' : [ [0,1.05,1.5,2.0,9.9], [ 5.88, 5.81, 5.78, 5.76] ], + '7GeV' : [ [0,1.05,1.5,2.0,9.9], [ 6.85, 6.77, 6.74, 6.74] ], + '8GeV' : [ [0,1.05,1.5,2.0,9.9], [ 7.82, 7.74, 7.70, 7.72] ], + '10GeV' : [ [0,1.05,1.5,2.0,9.9], [ 9.77, 9.67, 9.62, 9.57] ], + '11GeV' : [ [0,1.05,1.5,2.0,9.9], [ 10.74, 10.64, 10.58, 10.53] ], + '12GeV' : [ [0,1.05,1.5,2.0,9.9], [ 11.70, 11.59, 11.53, 11.49] ], + '13GeV' : [ [0,1.05,1.5,2.0,9.9], [ 12.67, 12.55, 12.49, 12.46] ], + '14GeV' : [ [0,1.05,1.5,2.0,9.9], [ 13.65, 13.52, 13.46, 13.42] ], + '15GeV' : [ [0,1.05,1.5,2.0,9.9], [ 14.63, 14.49, 14.42, 14.38] ], + '18GeV' : [ [0,1.05,1.5,2.0,9.9], [ 17.53, 17.39, 17.34, 17.28] ], + '20GeV' : [ [0,1.05,1.5,2.0,9.9], [ 19.47, 19.33, 19.30, 19.22] ], + '22GeV' : [ [0,1.05,1.5,2.0,9.9], [ 21.40, 21.27, 21.25, 21.16] ], + '24GeV' : [ [0,1.05,1.5,2.0,9.9], [ 23.34, 23.19, 23.14, 23.06] ], + '26GeV' : [ [0,1.05,1.5,2.0,9.9], [ 25.29, 25.15, 25.14, 25.05] ], + '27GeV' : [ [0,1.05,1.5,2.0,9.9], [ 26.26, 26.12, 26.11, 26.02] ], + '28GeV' : [ [0,1.05,1.5,2.0,9.9], [ 27.23, 27.09, 27.07, 26.99] ], + '30GeV' : [ [0,1.05,1.5,2.0,9.9], [ 29.17, 29.03, 29.00, 28.92] ], + '32GeV' : [ [0,1.05,1.5,2.0,9.9], [ 31.10, 30.96, 30.91, 30.84] ], + '34GeV' : [ [0,1.05,1.5,2.0,9.9], [ 33.04, 32.88, 32.81, 32.74] ], + '36GeV' : [ [0,1.05,1.5,2.0,9.9], [ 34.96, 34.78, 34.69, 34.63] ], + '38GeV' : [ [0,1.05,1.5,2.0,9.9], [ 36.87, 36.67, 36.55, 36.48] ], + '40GeV' : [ [0,1.05,1.5,2.0,9.9], [ 38.76, 38.54, 38.38, 38.31] ], + '50GeV' : [ [0,1.05,1.5,2.0,9.9], [ 45.00, 45.00, 45.00, 45.00] ], + '60GeV' : [ [0,1.05,1.5,2.0,9.9], [ 54.00, 54.00, 54.00, 54.00] ], + '70GeV' : [ [0,1.05,1.5,2.0,9.9], [ 63.00, 63.00, 63.00, 63.00] ], + '80GeV' : [ [0,1.05,1.5,2.0,9.9], [ 72.00, 72.00, 72.00, 72.00] ], + '100GeV' : [ [0,1.05,1.5,2.0,9.9], [ 90.00, 90.00, 90.00, 90.00] ], + # original + 2015 tuning + '2GeV_v15a' : [ [0,9.9], [2.000] ], + '3GeV_v15a' : [ [0,9.9], [3.000] ], + '4GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 3.94, 3.91, 3.77, 3.72] ], + '5GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 4.91, 4.86, 4.84, 4.83] ], + '6GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 5.92, 5.86, 5.70, 5.64] ], + '7GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 6.85, 6.77, 6.74, 6.74] ], + '8GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 7.89, 7.81, 7.60, 7.53] ], + '10GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 9.84, 9.77, 9.54, 9.47] ], + '11GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 10.74, 10.64, 10.58, 10.53] ], + '12GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 11.70, 11.59, 11.53, 11.49] ], + '13GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 12.80, 12.67, 12.43, 12.38] ], + '14GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 13.75, 13.62, 13.38, 13.36] ], + '15GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 14.63, 14.49, 14.42, 14.38] ], + '16GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 15.65, 15.50, 15.39, 15.37] ], # Lidia - extrapolated not optimized + '18GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 17.68, 17.51, 17.34, 17.34] ], + '20GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 19.65, 19.42, 19.16, 19.19] ], + '22GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 21.57, 21.32, 21.07, 21.11] ], + '24GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 23.53, 23.21, 22.99, 23.03] ], + '26GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 25.49, 25.15, 24.90, 24.95] ], + '27GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 26.26, 26.12, 26.11, 26.02] ], + '28GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 27.23, 27.09, 27.07, 26.99] ], + '30GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 29.17, 29.03, 29.00, 28.92] ], + '32GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 31.10, 30.96, 30.91, 30.84] ], + '34GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 33.04, 32.88, 32.81, 32.74] ], + '35GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 34.14, 33.82, 33.65, 33.65] ], # Lidia - extrapolated not optimized + '36GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 35.23, 34.75, 34.48, 34.55] ], + '38GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 36.87, 36.67, 36.55, 36.48] ], + '40GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 38.76, 38.54, 38.38, 38.31] ], + '50GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 45.00, 45.00, 45.00, 45.00] ], + '60GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 54.00, 54.00, 54.00, 54.00] ], + '70GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 63.00, 63.00, 63.00, 63.00] ], + '80GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 72.00, 72.00, 72.00, 72.00] ], + '100GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 90.00, 90.00, 90.00, 90.00] ], + } + +efCaloTagThresholds = { + '0GeV' : [ [0,9.9], [ 0.1, 0.1, 0.1, 0.1 ] ], + '2GeV' : [ [0,9.9], [ 2.0, 2.0, 2.0, 2.0 ] ], + '3GeV' : [ [0,9.9], [ 3.0, 3.0, 3.0, 3.0 ] ], + '4GeV' : [ [0,1.05,1.5,2.0,9.9], [ 4.0, 4.0, 4.0, 4.0 ] ], + '5GeV' : [ [0,1.05,1.5,2.0,9.9], [ 5.0, 5.0, 5.0, 5.0 ] ], + '6GeV' : [ [0,1.05,1.5,2.0,9.9], [ 6.0, 6.0, 6.0, 6.0 ] ], + '7GeV' : [ [0,1.05,1.5,2.0,9.9], [ 7.0, 7.0, 7.0, 7.0 ] ], + '8GeV' : [ [0,1.05,1.5,2.0,9.9], [ 8.0, 8.0, 8.0, 8.0 ] ], + '10GeV' : [ [0,1.05,1.5,2.0,9.9], [ 10.0, 10.0, 10.0, 10.0 ] ], + '11GeV' : [ [0,1.05,1.5,2.0,9.9], [ 11.0, 11.0, 11.0, 11.0 ] ], + '12GeV' : [ [0,1.05,1.5,2.0,9.9], [ 12.0, 12.0, 12.0, 12.0 ] ], + '13GeV' : [ [0,1.05,1.5,2.0,9.9], [ 13.0, 13.0, 13.0, 13.0 ] ], + '14GeV' : [ [0,1.05,1.5,2.0,9.9], [ 14.0, 14.0, 14.0, 14.0 ] ], + '15GeV' : [ [0,1.05,1.5,2.0,9.9], [ 15.0, 15.0, 15.0, 15.0 ] ], + '18GeV' : [ [0,1.05,1.5,2.0,9.9], [ 18.0, 18.0, 18.0, 18.0 ] ], + '20GeV' : [ [0,1.05,1.5,2.0,9.9], [ 20.0, 20.0, 20.0, 20.0 ] ], + '22GeV' : [ [0,1.05,1.5,2.0,9.9], [ 22.0, 22.0, 22.0, 22.0 ] ], + '24GeV' : [ [0,1.05,1.5,2.0,9.9], [ 24.0, 24.0, 24.0, 24.0 ] ], + '30GeV' : [ [0,1.05,1.5,2.0,9.9], [ 30.0, 30.0, 30.0, 30.0 ] ], + '40GeV' : [ [0,1.05,1.5,2.0,9.9], [ 40.0, 40.0, 40.0, 40.0 ] ], + '50GeV' : [ [0,1.05,1.5,2.0,9.9], [ 50.0, 50.0, 50.0, 50.0 ] ], + '60GeV' : [ [0,1.05,1.5,2.0,9.9], [ 60.0, 60.0, 60.0, 60.0 ] ], + '70GeV' : [ [0,1.05,1.5,2.0,9.9], [ 70.0, 70.0, 70.0, 70.0 ] ], + '80GeV' : [ [0,1.05,1.5,2.0,9.9], [ 80.0, 80.0, 80.0, 80.0 ] ], + '100GeV' : [ [0,1.05,1.5,2.0,9.9], [ 100.0,100.0,100.0,100.0 ] ] +} + + +muCombThresholds = { + '2GeV' : [ [0,9.9], [ 2.000] ], + '3GeV' : [ [0,9.9], [ 3.000] ], + '4GeV' : [ [0,1.05,1.5,2.0,9.9], [ 3.0, 2.5, 2.5, 2.5] ], + '5GeV' : [ [0,1.05,1.5,2.0,9.9], [ 4.9, 4.8, 4.8, 4.8] ], + '6GeV' : [ [0,1.05,1.5,2.0,9.9], [ 5.8, 5.8, 5.8, 5.6] ], + '7GeV' : [ [0,1.05,1.5,2.0,9.9], [ 6.8, 6.7, 6.7, 6.6] ], + '8GeV' : [ [0,1.05,1.5,2.0,9.9], [ 7.8, 7.7, 7.7, 7.7] ], + '10GeV' : [ [0,1.05,1.5,2.0,9.9], [ 9.8, 9.5, 9.6, 9.7] ], + '11GeV' : [ [0,1.05,1.5,2.0,9.9], [ 10.8, 10.4, 10.6, 10.6] ], + '12GeV' : [ [0,1.05,1.5,2.0,9.9], [ 11.7, 11.3, 11.4, 11.5] ], + '13GeV' : [ [0,1.05,1.5,2.0,9.9], [ 12.6, 12.2, 12.2, 12.4] ], + '14GeV' : [ [0,1.05,1.5,2.0,9.9], [ 13.6, 13.1, 13.1, 13.5] ], + '15GeV' : [ [0,1.05,1.5,2.0,9.9], [ 14.5, 14.0, 14.0, 14.5] ], + '18GeV' : [ [0,1.05,1.5,2.0,9.9], [ 17.5, 16.6, 16.6, 16.8] ], + '20GeV' : [ [0,1.05,1.5,2.0,9.9], [ 19.5, 18.5, 18.5, 18.5] ], + '22GeV' : [ [0,1.05,1.5,2.0,9.9], [ 21.4, 20.3, 20.3, 20.1] ], + '24GeV' : [ [0,1.05,1.5,2.0,9.9], [ 23.2, 22.2, 22.2, 21.8] ], + '25GeV' : [ [0,1.05,1.5,2.0,9.9], [ 24.2, 23.2, 23.2, 22.6] ], + '26GeV' : [ [0,1.05,1.5,2.0,9.9], [ 25.3, 24.1, 24.1, 23.5] ], + '27GeV' : [ [0,1.05,1.5,2.0,9.9], [ 26.2, 25.1, 25.1, 24.4] ], + '28GeV' : [ [0,1.05,1.5,2.0,9.9], [ 27.1, 26.0, 26.0, 25.2] ], + '30GeV' : [ [0,1.05,1.5,2.0,9.9], [ 29.0, 28.0, 28.0, 27.0] ], + '32GeV' : [ [0,1.05,1.5,2.0,9.9], [ 30.7, 29.9, 29.9, 28.7] ], + '34GeV' : [ [0,1.05,1.5,2.0,9.9], [ 32.5, 31.8, 31.8, 30.4] ], + '36GeV' : [ [0,1.05,1.5,2.0,9.9], [ 34.2, 33.6, 33.6, 32.1] ], + '38GeV' : [ [0,1.05,1.5,2.0,9.9], [ 35.8, 35.4, 35.4, 33.6] ], + '40GeV' : [ [0,1.05,1.5,2.0,9.9], [ 37.5, 37.0, 37.0, 35.0] ], + '40GeV_slow' : [ [0,1.05,1.5,2.0,9.9], [ 40.0, 40.0, 40.0, 40.0] ], + '50GeV' : [ [0,1.05,1.5,2.0,9.9], [ 40.0, 40.0, 40.0, 40.0] ], + '60GeV' : [ [0,1.05,1.5,2.0,9.9], [ 45.0, 45.0, 45.0, 45.0] ], + '60GeV_slow' : [ [0,1.05,1.5,2.0,9.9], [ 47.0, 47.0, 47.0, 47.0] ], + '70GeV' : [ [0,1.05,1.5,2.0,9.9], [ 49.0, 49.0, 49.0, 49.0] ], + '80GeV' : [ [0,1.05,1.5,2.0,9.9], [ 56.0, 56.0, 56.0, 56.0] ], + '100GeV' : [ [0,1.05,1.5,2.0,9.9], [ 70.0, 70.0, 70.0, 70.0] ], + # original + 2015 tuning + '2GeV_v15a' : [ [0,9.9], [ 2.000] ], + '3GeV_v15a' : [ [0,9.9], [ 3.000] ], + '4GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 3.86, 3.77, 3.69, 3.70] ], + '5GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 4.9, 4.8, 4.8, 4.8] ], + '6GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 5.87, 5.79, 5.70, 5.62] ], + '7GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 6.8, 6.7, 6.7, 6.6] ], + '8GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 7.80, 7.72, 7.59, 7.46] ], + '10GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 9.73, 9.63, 9.45, 9.24] ], + '11GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 10.8, 10.4, 10.6, 10.6] ], + '12GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 11.7, 11.3, 11.4, 11.5] ], + '13GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 12.62, 12.48, 12.24, 11.88] ], + '14GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 13.57, 13.44, 13.21, 12.77] ], + '15GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 14.5, 14.0, 14.0, 14.5] ], + '16GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 15.47, 15.09, 14.98, 15.08] ], # Lidia - extrapolated not optimized + '18GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 17.41, 17.27, 16.95, 16.25] ], + '20GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 19.31, 19.19, 18.80, 17.95] ], + '22GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 21.19, 21.07, 20.68, 19.71] ], + '24GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 23.08, 22.99, 22.56, 21.39] ], + '25GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 24.2, 23.2, 23.2, 22.6] ], + '26GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 24.95, 24.86, 24.39, 23.13] ], + '27GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 26.2, 25.1, 25.1, 24.4] ], + '28GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 27.1, 26.0, 26.0, 25.2] ], + '30GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 29.0, 28.0, 28.0, 27.0] ], + '32GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 30.7, 29.9, 29.9, 28.7] ], + '34GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 32.5, 31.8, 31.8, 30.4] ], + '36GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 34.03, 34.29, 33.58, 31.36] ], + '38GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 35.8, 35.4, 35.4, 33.6] ], + '40GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 37.5, 37.0, 37.0, 35.0] ], + '40GeV_slow_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 40.0, 40.0, 40.0, 40.0] ], + '50GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 40.0, 40.0, 40.0, 40.0] ], + '60GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 45.0, 45.0, 45.0, 45.0] ], + '60GeV_slow_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 47.0, 47.0, 47.0, 47.0] ], + '70GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 49.0, 49.0, 49.0, 49.0] ], + '80GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 56.0, 56.0, 56.0, 56.0] ], + '100GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 70.0, 70.0, 70.0, 70.0] ], + } + + +muFastThresholds = { + # + # original + 2010 tuning + '2GeV' : [ [0,9.9], [ 2.000] ], + '3GeV' : [ [0,9.9], [ 3.000] ], + '4GeV' : [ [0,1.05,1.5,2.0,9.9], [ 3.0, 2.5, 2.5, 2.5] ], + '4GeV_V2' : [ [0,1.05,1.5,2.0,9.9], [ 3.0, 1.8, 2.0, 2.5] ], + '5GeV' : [ [0,1.05,1.5,2.0,9.9], [ 4.6, 3.3, 4.0, 4.5] ], + '6GeV' : [ [0,1.05,1.5,2.0,9.9], [ 5.4, 4.5, 4.9, 5.3] ], + '6GeV_V2' : [ [0,1.05,1.5,2.0,9.9], [ 5.2, 4.0, 4.0, 4.5] ], + '7GeV' : [ [0,1.05,1.5,2.0,9.9], [ 6.3, 5.6, 5.6, 6.3] ], + '8GeV' : [ [0,1.05,1.5,2.0,9.9], [ 7.2, 6.7, 6.4, 7.3] ], + '10GeV' : [ [0,1.05,1.5,2.0,9.9], [ 8.9, 9.0, 8.4, 9.2] ], + '10GeV_V2' : [ [0,1.05,1.5,2.0,9.9], [ 8.5, 7.0, 7.0, 8.0] ], + '11GeV' : [ [0,1.05,1.5,2.0,9.9], [ 9.8, 10.1, 9.3, 10.1] ], + '12GeV' : [ [0,1.05,1.5,2.0,9.9], [ 10.6, 11.0, 10.2, 11.0] ], + '13GeV' : [ [0,1.05,1.5,2.0,9.9], [ 11.4, 12.0, 11.1, 12.0] ], + '14GeV' : [ [0,1.05,1.5,2.0,9.9], [ 12.2, 13.0, 12.1, 13.0] ], + '15GeV' : [ [0,1.05,1.5,2.0,9.9], [ 13.0, 14.0, 13.0, 14.0] ], + '18GeV' : [ [0,1.05,1.5,2.0,9.9], [ 15.7, 16.6, 15.4, 16.3] ], + '20GeV' : [ [0,1.05,1.5,2.0,9.9], [ 17.5, 18.5, 17.0, 18.0] ], + '20GeV_V2' : [ [0,1.05,1.5,2.0,9.9], [ 16.2, 12.9, 13.2, 15.5] ], + '22GeV' : [ [0,1.05,1.5,2.0,9.9], [ 19.1, 20.0, 18.4, 19.6] ], + '30GeV' : [ [0,1.05,1.5,2.0,9.9], [ 25.0, 24.5, 23.0, 26.0] ], + '30GeV_V2' : [ [0,1.05,1.5,2.0,9.9], [ 22.3, 17.1, 18.6, 22.2] ], + '40GeV' : [ [0,1.05,1.5,2.0,9.9], [ 31.5, 30.0, 28.5, 32.5] ], + '40GeV_barrelOnly' : [ [0,1.05,1.5,2.0,9.9], [ 31.5,1000.0,1000.0,1000.0] ], + '40GeV_uptoEC2' : [ [0,1.05,1.5,2.0,9.9], [ 31.5, 30.0, 28.5, 1000.0] ], + '40GeV_V2' : [ [0,1.05,1.5,2.0,9.9], [ 27.1, 23.6, 24.2, 26.4] ], + '40GeV_slow' : [ [0,1.05,1.5,2.0,9.9], [ 40.0, 40.0, 40.0, 40.0] ], + '50GeV' : [ [0,1.05,1.5,2.0,9.9], [ 31.5, 30.0, 28.5, 32.5] ], + '60GeV' : [ [0,1.05,1.5,2.0,9.9], [ 37.8, 36., 34.2, 39.] ], + '60GeV_slow' : [ [0,1.05,1.5,2.0,9.9], [ 40.0, 40.0, 45.0, 40.0] ], + '70GeV' : [ [0,1.05,1.5,2.0,9.9], [ 37.8, 36.0, 34.2, 39.0] ], + '80GeV' : [ [0,1.05,1.5,2.0,9.9], [ 37.8, 36.0, 34.2, 39.0] ], + '100GeV' : [ [0,1.05,1.5,2.0,9.9], [ 37.8, 36.0, 34.2, 39.0] ], + # + # 2011a tuning (95%, based on 2010 repro data) + '4GeV_v11a' : [ [0,1.05,1.5,2.0,9.9], [ 3.41, 3.21, 3.39, 3.53] ], + '4GeV_barrelOnly_v11a' : [ [0,1.05,1.5,2.0,9.9], [ 3.41, 1000., 1000., 1000.] ], + '6GeV_v11a' : [ [0,1.05,1.5,2.0,9.9], [ 5.04, 4.81, 5.01, 5.25] ], + '10GeV_v11a' : [ [0,1.05,1.5,2.0,9.9], [ 8.08, 7.68, 8.28, 8.90] ], + '13GeV_v11a' : [ [0,1.05,1.5,2.0,9.9], [ 10.00, 9.33, 10.28, 11.42] ], + '15GeV_v11a' : [ [0,1.05,1.5,2.0,9.9], [ 11.31, 10.52, 12.00, 13.24] ], + '18GeV_v11a' : [ [0,1.05,1.5,2.0,9.9], [ 12.95, 12.32, 13.92, 15.51] ], + '20GeV_v11a' : [ [0,1.05,1.5,2.0,9.9], [ 13.94, 13.50, 15.28, 16.79] ], + '22GeV_v11a' : [ [0,1.05,1.5,2.0,9.9], [ 14.85, 14.48, 16.36, 18.45] ], + '24GeV_v11a' : [ [0,1.05,1.5,2.0,9.9], [ 15.68, 15.51, 17.49, 19.82] ], + '30GeV_v11a' : [ [0,1.05,1.5,2.0,9.9], [ 17.83, 18.32, 20.46, 23.73] ], + '40GeV_v11a' : [ [0,1.05,1.5,2.0,9.9], [ 21.13, 21.20, 25.38, 29.54] ], + '40GeV_uptoEC2_v11a' : [ [0,1.05,1.5,2.0,9.9], [ 21.13, 21.20, 25.38, 1000.] ], + '40GeV_barrelOnly_v11a' : [ [0,1.05,1.5,2.0,9.9], [ 21.13, 1000., 1000., 1000.] ], + '50GeV_barrelOnly_v11a' : [ [0,1.05,1.5,2.0,9.9], [ 21.13, 1000., 1000., 1000.] ], + '60GeV_barrelOnly_v11a' : [ [0,1.05,1.5,2.0,9.9], [ 21.13, 1000., 1000., 1000.] ], + # 2011b tuning (90%, based on 2010 repro data) + '40GeV_v11b' : [ [0,1.05,1.5,2.0,9.9], [ 26.88, 26.54, 29.22, 32.18] ], + '40GeV_uptoEC2_v11b' : [ [0,1.05,1.5,2.0,9.9], [ 26.88, 26.54, 29.22, 1000.] ], + '40GeV_barrelOnly_v11b' : [ [0,1.05,1.5,2.0,9.9], [ 26.88, 1000., 1000., 1000.] ], + # 2011a tuning + 2015 tuning + '4GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 3.38, 1.25, 3.17, 3.41] ], + '4GeV_barrelOnly_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 3.38, 1000., 1000., 1000.] ], + '6GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 5.17, 3.25, 4.69, 5.14] ], + '8GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 6.63, 5.17, 6.39, 6.81] ], + '10GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 8.28, 6.35, 7.19, 8.58] ], + '13GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 10.42, 7.16, 7.81, 10.80] ], + '14GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 11.15, 7.58, 8.43, 11.61] ], + '15GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 11.31, 10.52, 12.00, 13.24] ], + '18GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 14.33, 9.45, 10.96, 14.35] ], + '20GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 15.87, 10.73, 12.21, 15.87] ], + '22GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 17.00, 10.77, 13.38, 17.05] ], + '24GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 18.24, 11.35, 14.49, 17.91] ], + '26GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 19.52, 11.61, 15.42, 19.35] ], + '30GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 17.83, 18.32, 20.46, 23.73] ], + '36GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 23.94, 12.25, 19.80, 23.17] ], + '40GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 21.13, 21.20, 25.38, 29.54] ], + '60GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 21.13, 21.20, 25.38, 29.54] ], + '80GeV_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 21.13, 21.20, 25.38, 29.54] ], + '40GeV_uptoEC2_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 21.13, 21.20, 25.38, 1000.] ], + '40GeV_barrelOnly_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 21.13, 1000., 1000., 1000.] ], + '50GeV_barrelOnly_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 21.13, 1000., 1000., 1000.] ], + '60GeV_barrelOnly_v15a' : [ [0,1.05,1.5,2.0,9.9], [ 21.13, 1000., 1000., 1000.] ], + } + + +muFastThresholdsForECWeakBRegion = { + # + # original + 2010 tuning + '2GeV' : [ 2.0, 2.0 ], + '3GeV' : [ 3.0, 3.0 ], + '4GeV' : [ 2.5, 2.5 ], + '4GeV_V2' : [ 1.8, 2.0 ], + '5GeV' : [ 3.3, 4.0 ], + '6GeV' : [ 4.5, 4.9 ], + '6GeV_V2' : [ 4.0, 4.0 ], + '7GeV' : [ 5.6, 5.6 ], + '8GeV' : [ 6.7, 6.4 ], + '10GeV' : [ 9.0, 8.4 ], + '10GeV_V2' : [ 7.0, 7.0 ], + '11GeV' : [ 10.1, 9.3 ], + '12GeV' : [ 11.0, 10.2 ], + '13GeV' : [ 12.0, 11.1 ], + '14GeV' : [ 13.0, 12.1 ], + '15GeV' : [ 14.0, 13.0 ], + '18GeV' : [ 16.6, 15.4 ], + '20GeV' : [ 18.5, 17.0 ], + '20GeV_V2' : [ 12.9, 13.2 ], + '22GeV' : [ 20.0, 18.4 ], + '30GeV' : [ 24.5, 23.0 ], + '30GeV_V2' : [ 17.1, 18.6 ], + '40GeV' : [ 30.0, 28.5 ], + '40GeV_barrelOnly' : [ 1000.0, 1000.0 ], + '40GeV_uptoEC2' : [ 30.0, 28.5 ], + '40GeV_V2' : [ 23.6, 24.2 ], + '40GeV_slow' : [ 40.0, 40.0 ], + '50GeV' : [ 30.0, 28.5 ], + '60GeV' : [ 30.0, 28.5 ], + '60GeV_slow' : [ 60.0, 60.0 ], + '70GeV' : [ 30.0, 28.5 ], + '80GeV' : [ 30.0, 28.5 ], + '100GeV' : [ 30.0, 28.5 ], + # + # 2011a tuning (95%, based on 2010 repro data) + '4GeV_v11a' : [ 2.11, 2.97 ], + '4GeV_barrelOnly_v11a' : [ 1000., 1000. ], + '6GeV_v11a' : [ 4.37, 3.77 ], + '10GeV_v11a' : [ 6.61, 5.34 ], + '13GeV_v11a' : [ 6.81, 6.97 ], + '15GeV_v11a' : [ 7.61, 7.81 ], + '18GeV_v11a' : [ 9.01, 9.83 ], + '20GeV_v11a' : [ 10.15, 11.88 ], + '22GeV_v11a' : [ 10.72, 12.54 ], + '24GeV_v11a' : [ 11.66, 13.97 ], + '30GeV_v11a' : [ 14.41, 17.43 ], + '40GeV_v11a' : [ 15.07, 18.02 ], + '40GeV_uptoEC2_v11a' : [ 15.07, 18.02 ], + '40GeV_barrelOnly_v11a' : [ 1000., 1000. ], + '50GeV_barrelOnly_v11a' : [ 1000., 1000. ], + '60GeV_barrelOnly_v11a' : [ 1000., 1000. ], + # 2011b tuning (90%, based on 2010 repro data) + '40GeV_v11b' : [ 26.54, 29.22 ], + '40GeV_uptoEC2_v11b' : [ 26.54, 29.22 ], + '40GeV_barrelOnly_v11b' : [ 1000., 1000. ], + '50GeV_barrelOnly_v11b' : [ 1000., 1000. ], + '60GeV_barrelOnly_v11b' : [ 1000., 1000. ], + # 2011a tuning + 2015 tuning + '4GeV_v15a' : [ 2.72, 1.58], + '4GeV_barrelOnly_v15a' : [ 1000., 1000. ], + '6GeV_v15a' : [ 3.91, 2.22], + '8GeV_v15a' : [ 4.65, 3.26], + '10GeV_v15a' : [ 5.96, 4.24], + '13GeV_v15a' : [ 6.65, 4.64], + '14GeV_v15a' : [ 6.78, 5.03], + '15GeV_v15a' : [ 7.61, 7.81 ], + '18GeV_v15a' : [ 8.48, 7.26], + '20GeV_v15a' : [ 8.63, 7.26], + '22GeV_v15a' : [ 9.53, 7.77], + '24GeV_v15a' : [ 9.02, 8.31], + '26GeV_v15a' : [ 9.89, 8.77], + '30GeV_v15a' : [ 14.41, 17.43 ], + '36GeV_v15a' : [ 10.78, 10.66], + '40GeV_v15a' : [ 15.07, 18.02 ], + '60GeV_v15a' : [ 15.07, 18.02 ], + '80GeV_v15a' : [ 15.07, 18.02 ], + '40GeV_uptoEC2_v15a' : [ 15.07, 18.02 ], + '40GeV_barrelOnly_v15a' : [ 1000., 1000. ], + '50GeV_barrelOnly_v15a' : [ 1000., 1000. ], + '60GeV_barrelOnly_v15a' : [ 1000., 1000. ], + } + + +def TrigMufastHypoToolFromName( thresholdHLT ): + + name = "TrigMufastHypoTool" + config = TrigMufastHypoConfig() + + # Separete HLT_NmuX to bname[0]=HLT and bname[1]=NmuX + bname = thresholdHLT.split('_') + threshold = bname[1] + thresholds = config.decodeThreshold( threshold ) + print "TrigMufastHypoConfig: Decoded ", thresholdHLT, " to ", thresholds + + tool=config.ConfigurationHypoTool( thresholdHLT, thresholds ) + + # Setup MonTool for monitored variables in AthenaMonitoring package + TriggerFlags.enableMonitoring = ["Validation"] + + try: + if 'Validation' in TriggerFlags.enableMonitoring() or 'Online' in TriggerFlags.enableMonitoring() or 'Cosmic' in TriggerFlags.enableMonitoring(): + tool.MonTool = TrigMufastHypoMonitoring( name + "Monitoring_" + thresholdHLT ) + except AttributeError: + tool.MonTool = "" + print name, ' Monitoring Tool failed' + + return tool + + +class TrigMufastHypoConfig(): + + def decodeThreshold( self, threshold ): + """ decodes the thresholds of the form mu6, 2mu6, ... """ + print "decoding ", threshold + + if threshold[0].isdigit(): # If the form is NmuX, return as list [X,X,X...N times...] + assert threshold[1:3] == "mu", "Two digit multiplicity not supported" + return [ threshold[3:] ] * int( threshold[0] ) + + if threshold.count('mu') > 1: # If theform is muXmuY, return as [X,Y] + return threshold.strip('mu').split('mu') + + # If the form is muX(inclusive), return as 1 element list + return [ threshold[2:] ] + + def ConfigurationHypoTool( self, thresholdHLT, thresholds ): + + tool = TrigMufastHypoTool( thresholdHLT ) + + datayear = '2017' + + nt = len(thresholds) + print "TrigMufastHypoConfig: Set ", nt, " thresholds" + tool.PtBins = [ [ 0, 2.5 ] ] * nt + tool.PtThresholds = [ [ 5.49 * GeV ] ] * nt + tool.PtThresholdForECWeakBRegionA = [ 3. * GeV ] * nt + tool.PtThresholdForECWeakBRegionB = [ 3. * GeV ] * nt + + for th, thvalue in enumerate(thresholds): + if datayear == '2015'or datayear == '2016' or datayear == '2017': + thvaluename = thvalue + 'GeV_v15a' + else: + thvaluename = thvalue + 'GeV' + print "Number of threshold = ", th, ", Value of threshold = ", thvaluename + + try: + tool.AcceptAll = False + values = muFastThresholds[thvaluename] + tool.PtBins[th] = values[0] + tool.PtThresholds[th] = [ x * GeV for x in values[1] ] + print "TrigMufastHypoConfig: Configration of threshold[", th, "] ", tool.PtThresholds[th] + print "TrigMufastHypoConfig: Configration of PtBins[", th, "] ", tool.PtBins[th] + if thvaluename in muFastThresholdsForECWeakBRegion: + spThres = muFastThresholdsForECWeakBRegion[thvaluename] + tool.PtThresholdForECWeakBRegionA[th] = spThres[0] * GeV + tool.PtThresholdForECWeakBRegionB[th] = spThres[1] * GeV + print 'TrigMufastHypoConfig: -> Thresholds for A[', th, ']/B[', th, ']=',tool.PtThresholdForECWeakBRegionA[th],'/',tool.PtThresholdForECWeakBRegionB[th] + else: + print 'TrigMufastHypoConfig: No special thresholds for EC weak Bfield regions for',thvaluename + print 'TrigMufastHypoConfig: -> Copy EC1 for region A, EC2 for region B' + spThres = values[0][1] + if thvaluename == '2GeV' or thvaluename == '3GeV': + tool.PtThresholdForECWeakBRegionA[th] = spThres[0] * GeV + tool.PtThresholdForECWeakBRegionB[th] = spThres[0] * GeV + else: + tool.PtThresholdForECWeakBRegionA[th] = spThres[1] * GeV + tool.PtThresholdForECWeakBRegionB[th] = spThres[2] * GeV + print 'TrigMufastHypoConfig: -> Thresholds for A[', th, ']/B[', th, ']=',tool.PtThresholdForECWeakBRegionA[th],'/',tool.PtThresholdForECWeakBRegionB[th] + + except LookupError: + if (thvaluename=='passthrough'): + tool.PtBins[th] = [-10000.,10000.] + tool.PtThresholds[th] = [ -1. * GeV ] + else: + raise Exception('MuFast Hypo Misconfigured: threshold %r not supported' % thvaluename) + + return tool + + + +# This class is copied from MucombHypoConfig. +class TrigmuCombHypoConfig(TrigmuCombHypoAlg): + + __slots__ = [] + + # thresholdHLT: name threshold, for example HLT_mu6 etc + def TrigmuCombHypoToolFromName( self, name, thresholdHLT ): + + from AthenaCommon.Constants import DEBUG + tool = TrigmuCombHypoTool( thresholdHLT ) + tool.OutputLevel = DEBUG + + # Separete HLT_NmuX to bname[0]=HLT and bname[1]=NmuX + bname = thresholdHLT.split('_') + + threshold = bname[1] + thresholds = TrigMufastHypoConfig().decodeThreshold( threshold ) + tight = False + + TrigmuCombHypoConfig().ConfigrationHypoTool( name, thresholdHLT, thresholds, tight ) + print """ Configration SUCCESS: Configure threshold """, threshold, """ at TrigmuCombHypoTool """ + + # Setup MonTool for monitored variables in AthenaMonitoring package + TriggerFlags.enableMonitoring = ["Validation"] + + try: + if 'Validation' in TriggerFlags.enableMonitoring() or 'Online' in TriggerFlags.enableMonitoring() or 'Cosmic' in TriggerFlags.enableMonitoring(): + tool.MonTool = TrigmuCombHypoMonitoring( name + "Monitoring_" + thresholdHLT ) + except AttributeError: + tool.MonTool = "" + print name, ' Monitoring Tool failed' + + return tool + + def ConfigrationHypoTool( self, name, thresholdHLT, thresholds, tight ): + + tool = TrigmuCombHypoTool( thresholdHLT ) + print 'MucombHypoConfig configured for threshold: ',thresholds + + datayear = "2017" + + nt = len(thresholds) + print "TrigMufastHypoConfig: Set ", nt, " thresholds" + tool.PtBins = [ [ 0, 2.5 ] ] * nt + tool.PtThresholds = [ [ 5.83 * GeV ] ] * nt + + for th, thvalue in enumerate(thresholds): + if datayear == '2015'or datayear == '2016' or datayear == '2017': + thvaluename = thvalue + 'GeV_v15a' + else: + thvaluename = thvalue + 'GeV' + print "Number of threshold = ", th, ", Value of threshold = ", thvaluename + + try: + values = muCombThresholds[thvaluename] + tool.PtBins[th] = values[0] + tool.PtThresholds[th] = [ x * GeV for x in values[1] ] + except LookupError: + if (threshold=='passthrough'): + tool.AcceptAll = True + tool.PtBins[th] = [-10000.,10000.] + tool.PtThresholds[th] = [ -1. * GeV ] + tool.ApplyStrategyDependentCuts = True + tool.ApplyPikCuts = False + else: + raise Exception('MuComb Hypo Misconfigured: threshold %r not supported' % thvaluename) + + if (tight == True): + tool.ApplyPikCuts = True + tool.MaxPtToApplyPik = 25. + tool.MaxChi2IDPik = 3.5 + + return thvaluename + + +class MufastHypoConfig(MufastHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + if len(args) == 2: + newargs = ['%s_%s_%s' % (cls.getType(),args[0],args[1])] + list(args) + if len(args) == 4: + newargs = ['%s_%s_%s_%s_%s' % (cls.getType(),args[0],args[1],args[2],args[3])] + list(args) + return super( MufastHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( MufastHypoConfig, self ).__init__( name ) + + threshold = args[1] + + try: + values = muFastThresholds[threshold] + self.PtBins = values[0] + self.PtThresholds = [ x * GeV for x in values[1] ] + if threshold in muFastThresholdsForECWeakBRegion: + spThres = muFastThresholdsForECWeakBRegion[threshold] + self.PtThresholdForECWeakBRegionA = spThres[0] * GeV + self.PtThresholdForECWeakBRegionB = spThres[1] * GeV + else: + print 'MufastHypoConfig: No special thresholds for EC weak Bfield regions for',threshold + print 'MufastHypoConfig: -> Copy EC1 for region A, EC2 for region B' + spThres = values[0][1] + if threshold == '2GeV' or threshold == '3GeV': + self.PtThresholdForECWeakBRegionA = spThres[0] * GeV + self.PtThresholdForECWeakBRegionB = spThres[0] * GeV + else: + self.PtThresholdForECWeakBRegionA = spThres[1] * GeV + self.PtThresholdForECWeakBRegionB = spThres[2] * GeV + print 'MufastHypoConfig: -> Thresholds for A/B=',self.PtThresholdForECWeakBRegionA,'/',self.PtThresholdForECWeakBRegionB + + except LookupError: + if (threshold=='passthrough'): + self.PtBins = [-10000.,10000.] + self.PtThresholds = [ -1. * GeV ] + else: + raise Exception('MuFast Hypo Misconfigured: threshold %r not supported' % threshold) + + validation = MufastHypoValidationMonitoring() + online = MufastHypoOnlineMonitoring() + cosmic = MufastHypoCosmicMonitoring() + + self.AthenaMonTools = [ validation, online, cosmic ] + + def setDefaults(cls,handle): + if hasattr(handle,'PtThresholds') and hasattr(handle,'PtBins'): + if len(handle.PtThresholds)!=len(handle.PtBins)-1: + print handle.name," eta bins doesn't match the Pt thresholds!" + + +class MufastStauHypoConfig(MufastStauHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + if len(args) == 2: + newargs = ['%s_%s_%s' % (cls.getType(),args[0],args[1])] + list(args) + if len(args) == 4: + newargs = ['%s_%s_%s_%s_%s' % (cls.getType(),args[0],args[1],args[2],args[3])] + list(args) + return super( MufastStauHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( MufastStauHypoConfig, self ).__init__( name ) + + threshold = args[1] + + try: + values = muFastThresholds[threshold] + self.PtBins = values[0] + self.PtThresholds = [ x * GeV for x in values[1] ] + except LookupError: + if (threshold=='passthrough'): + self.PtBins = [-10000.,10000.] + self.PtThresholds = [ -1. * GeV ] + else: + raise Exception('MuFast Hypo Misconfigured: threshold %r not supported' % threshold) + + validation = MufastStauHypoValidationMonitoring() + online = MufastStauHypoOnlineMonitoring() + cosmic = MufastStauHypoCosmicMonitoring() + + self.AthenaMonTools = [ validation, online, cosmic ] + if (args[0]=='Tight'): + print "sofia OK" + self.EtaCut = True + + def setDefaults(cls,handle): + if hasattr(handle,'PtThresholds') and hasattr(handle,'PtBins'): + if len(handle.PtThresholds)!=len(handle.PtBins)-1: + print handle.name," eta bins doesn't match the Pt thresholds!" + + +class MufastPEBHypoConfig(MufastPEBHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + newargs = ['%s_%s' % (cls.getType(),args[0])] + list(args) + return super( MufastPEBHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( MufastPEBHypoConfig, self ).__init__( name ) + + validation = MufastPEBHypoValidationMonitoring() + online = MufastPEBHypoOnlineMonitoring() + cosmic = MufastPEBHypoCosmicMonitoring() + + self.AthenaMonTools = [ validation, online, cosmic ] + + +class MufastCALHypoConfig(MufastCALHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + if len(args) == 2: + newargs = ['%s_%s_%s' % (cls.getType(),args[0],args[1])] + list(args) + #newargs = ['%s_%s' % (cls.getType(),args[0])] + list(args) + return super( MufastCALHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( MufastCALHypoConfig, self ).__init__( name ) + + validation = MufastCALHypoValidationMonitoring() + online = MufastCALHypoOnlineMonitoring() + cosmic = MufastCALHypoCosmicMonitoring() + + self.AthenaMonTools = [ validation, online, cosmic ] + + +class MufastOTRHypoConfig(MufastOTRHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + if len(args) == 2: + newargs = ['%s_%s_%s' % (cls.getType(),args[0],args[1])] + list(args) + if len(args) == 4: + newargs = ['%s_%s_%s_%s_%s' % (cls.getType(),args[0],args[1],args[2],args[3])] + list(args) + return super( MufastOTRHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( MufastOTRHypoConfig, self ).__init__( name ) + + threshold = int(args[1]) + + self.SegmentsTh = threshold + + validation = MufastOTRHypoValidationMonitoring() + online = MufastOTRHypoOnlineMonitoring() + cosmic = MufastOTRHypoCosmicMonitoring() + + self.AthenaMonTools = [ validation, online, cosmic ] + + + +class MucombHypoConfig(MucombHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + newargs = ['%s_%s_%s' % (cls.getType(),args[0],args[1])] + list(args) + return super( MucombHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( MucombHypoConfig, self ).__init__( name ) + + threshold = args[1] + print 'MucombHypoConfig configured for threshold: ',threshold + + try: + values = muCombThresholds[threshold] + self.PtBins = values[0] + self.PtThresholds = [ x * GeV for x in values[1] ] + except LookupError: + if (threshold=='passthrough'): + self.AcceptAll = True + self.PtBins = [-10000.,10000.] + self.PtThresholds = [ -1. * GeV ] + self.ApplyStrategyDependentCuts = True + self.Apply_pik_Cuts = False + else: + raise Exception('MuComb Hypo Misconfigured: threshold %r not supported' % threshold) + + conf = args[0] + if (conf.find("tight")!=-1): + self.Apply_pik_Cuts = True + self.MaxPtToApply_pik = 25. + self.MaxChi2ID_pik = 3.5 + + validation = MucombHypoValidationMonitoring() + online = MucombHypoOnlineMonitoring() + + self.AthenaMonTools = [ validation, online ] + + def setDefaults(cls,handle): + if hasattr(handle,'PtThresholds') and hasattr(handle,'PtBins'): + if len(handle.PtThresholds)!=len(handle.PtBins)-1: + print handle.name," eta bins doesn't match the Pt thresholds!" + + +class MucombStauHypoConfig(MucombStauHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + newargs = ['%s_%s_%s' % (cls.getType(),args[0],args[1])] + list(args) + return super( MucombStauHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( MucombStauHypoConfig, self ).__init__( name ) + + threshold = args[1] + + try: + values = muCombThresholds[threshold] + self.PtBins = values[0] + self.PtThresholds = [ x * GeV for x in values[1] ] + except LookupError: + raise Exception('MuCombStau Hypo Misconfigured: threshold %r not supported' % threshold) + + + if ( muonByteStreamFlags.RpcDataType()=='atlas' ): + self.BackExtrapolator = MuonBackExtrapolatorForMisalignedDet() + else: + self.BackExtrapolator = MuonBackExtrapolatorForAlignedDet() + + conf = args[0] + if (conf.find("tight")!=-1): + self.Apply_pik_Cuts = True + + validation = MucombStauHypoValidationMonitoring() + online = MucombStauHypoOnlineMonitoring() + + self.AthenaMonTools = [ validation, online ] + + def setDefaults(cls,handle): + if hasattr(handle,'PtThresholds') and hasattr(handle,'PtBins'): + if len(handle.PtThresholds)!=len(handle.PtBins)-1: + print handle.name," eta bins doesn't match the Pt thresholds!" + + +class MuisoHypoConfig(MuisoHypo): + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + newargs = ['%s' % (cls.getType())] + list(args) + if len(args) == 1: + newargs = ['%s_%s' % (cls.getType(),args[0])] + list(args) + if len(args) == 2: + newargs = ['%s_%s_%s' % (cls.getType(),args[0],args[1])] + list(args) + return super( MuisoHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( MuisoHypoConfig, self ).__init__( name ) + + validation = MuisoHypoValidationMonitoring() + online = MuisoHypoOnlineMonitoring() + cosmic = MuisoHypoCosmicMonitoring() + + self.AthenaMonTools = [ validation, online, cosmic] + + # If configured with passthrough, set AcceptAll flag on + self.AcceptAll = False + if len(args) == 2: + if (args[1]=='passthrough'): + self.AcceptAll = True + print 'MuisoHypoConfig configured in pasthrough mode' + + if "FTK" in name: # allows us to use different working points in FTK mode + self.IDConeSize = 2; + self.MaxIDIso_1 = 0.12 + self.MaxIDIso_2 = 0.12 + self.MaxIDIso_3 = 0.12 + else: + self.IDConeSize = 2; + self.MaxIDIso_1 = 0.1 + self.MaxIDIso_2 = 0.1 + self.MaxIDIso_3 = 0.1 + + print 'MuisoHypoConfig configuration done' + + +class TrigMooreHypoConfig(TrigMooreHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + newargs = ['%s_%s_%s' % (cls.getType(),args[0],args[1])] + list(args) + return super( TrigMooreHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( TrigMooreHypoConfig, self ).__init__( name ) + + threshold = args[1] + + try: + values = trigMuonEFSAThresholds[threshold] + self.PtBins = values[0] + self.PtThresholds = [ x * GeV for x in values[1] ] + #values = dirThresholdValues[threshold] + #self.PtBins = values[2][0] + #self.PtThresholds = [ x * GeV for x in values[2][1] ] + except LookupError: + raise Exception('TrigMoore Hypo Misconfigured!') + + validation = TrigMooreHypoValidationMonitoring() + online = TrigMooreHypoOnlineMonitoring() + + self.AthenaMonTools = [ validation, online ] + + def setDefaults(cls,handle): + if hasattr(handle,'PtThresholds') and hasattr(handle,'PtBins'): + if len(handle.PtThresholds)!=len(handle.PtBins)-1: + print handle.name," eta bins doesn't match the Pt thresholds!" + + +class TrigMuonEFSegmentFinderHypoConfig(TrigMuonEFSegmentFinderHypo): + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + newargs = ['%s_%s_%s' % (cls.getType(),args[0],args[1])] + list(args) + return super( TrigMuonEFSegmentFinderHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( TrigMuonEFSegmentFinderHypoConfig, self ).__init__( name ) + +# from TrigMuonHypo.TrigMuonHypoMonitoring import TrigMuonEFSegmentFinderHypoOnlineMonitoring,TrigMuonEFSegmentFinderHypoValidationMonitoring +# validation = TrigMuonEFSegmentFinderHypoValidationMonitoring() +# online = TrigMuonEFSegmentFinderHypoOnlineMonitoring() +# cosmic = TrigMuonEFSegmentFinderHypoCosmicMonitoring() + + from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig + time = TrigTimeHistToolConfig("TrigMuonEFSegmentFinderHypo_Time") + +# self.AthenaMonTools = [ validation, online, time, cosmic] + + # AcceptAll flag: if true take events regardless of cuts + self.AcceptAll = False + + # If configured with passthrough, set AcceptAll flag on + if (args[1]=='passthrough'): + self.AcceptAll = True + + # Hypothesis configuration and cuts + # std. cuts SG-10-11-08) + self.Nseg = 1 + + + +class TrigMuonEFTrackBuilderHypoConfig(TrigMuonEFTrackBuilderHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + newargs = ['%s_%s_%s' % (cls.getType(),args[0],args[1])] + list(args) + return super( TrigMuonEFTrackBuilderHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( TrigMuonEFTrackBuilderHypoConfig, self ).__init__( name ) + + threshold = args[1] + + try: + values = trigMuonEFSAThresholds[threshold] + self.PtBins = values[0] + self.PtThresholds = [ x * GeV for x in values[1] ] + self.AcceptAll = False + except LookupError: + if (threshold=='passthrough'): + self.PtBins = [-10000.,10000.] + self.PtThresholds = [ -1. * GeV ] + self.AcceptAll = True + else: + raise Exception('TrigMuonEFTrackBuilder Hypo Misconfigured: threshold %r not supported' % threshold) + + validation = TrigMuonEFTrackBuilderHypoValidationMonitoring() + online = TrigMuonEFTrackBuilderHypoOnlineMonitoring() + + self.AthenaMonTools = [ validation, online ] + + def setDefaults(cls,handle): + if hasattr(handle,'PtThresholds') and hasattr(handle,'PtBins'): + if len(handle.PtThresholds)!=len(handle.PtBins)-1: + print handle.name," eta bins doesn't match the Pt thresholds!" + + + +class TrigMuonEFExtrapolatorHypoConfig(TrigMuonEFExtrapolatorHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + newargs = ['%s_%s_%s' % (cls.getType(),args[0],args[1])] + list(args) + return super( TrigMuonEFExtrapolatorHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( TrigMuonEFExtrapolatorHypoConfig, self ).__init__( name ) + + threshold = args[1] + + try: + values = trigMuonEFSAThresholds[threshold] + self.PtBins = values[0] + self.PtThresholds = [ x * GeV for x in values[1] ] + self.AcceptAll = False + except LookupError: + if (threshold=='passthrough'): + self.PtBins = [-10000.,10000.] + self.PtThresholds = [ -1. * GeV ] + self.AcceptAll = True + else: + raise Exception('TrigMuonEFExtrapolator Hypo Misconfigured: threshold %r not supported' % threshold) + + validation = TrigMuonEFExtrapolatorHypoValidationMonitoring() + online = TrigMuonEFExtrapolatorHypoOnlineMonitoring() + + self.AthenaMonTools = [ validation, online ] + + def setDefaults(cls,handle): + if hasattr(handle,'PtThresholds') and hasattr(handle,'PtBins'): + if len(handle.PtThresholds)!=len(handle.PtBins)-1: + print handle.name," eta bins doesn't match the Pt thresholds!" + + + +class TrigMuonEFCombinerHypoConfig(TrigMuonEFCombinerHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + newargs = ['%s_%s_%s' % (cls.getType(),args[0],args[1])] + list(args) + return super( TrigMuonEFCombinerHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( TrigMuonEFCombinerHypoConfig, self ).__init__( name ) + + threshold = args[1] + + try: + values = efCombinerThresholds[threshold] + self.PtBins = values[0] + self.PtThresholds = [ x * GeV for x in values[1] ] + self.AcceptAll = False + except LookupError: + if (threshold=='passthrough'): + self.PtBins = [-10000.,10000.] + self.PtThresholds = [ -1. * GeV ] + self.AcceptAll = True + else: + raise Exception('TrigMuonEFCombiner Hypo Misconfigured: threshold %r not supported' % threshold) + + validation = TrigMuonEFCombinerHypoValidationMonitoring() + online = TrigMuonEFCombinerHypoOnlineMonitoring() + + self.AthenaMonTools = [ validation, online ] + + def setDefaults(cls,handle): + if hasattr(handle,'PtThresholds') and hasattr(handle,'PtBins'): + if len(handle.PtThresholds)!=len(handle.PtBins)-1: + print handle.name," eta bins doesn't match the Pt thresholds!" + + +#AOH +# +# Multi Muon hypothesis. +# Thresholds must be inclusive, but no ordering required. +# +# arg[0] = "Muon" +# arg[1] = [1st muon threshold] +# arg[2] = [2nd muon threshold] +# arg[3] = [3rd muon threshold] +# ... +# arg[N] = {Nth muon threshold] + +class TrigMuonEFCombinerMultiHypoConfig(TrigMuonEFCombinerMultiHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + #newargs = ['%s_%s_%s' % (cls.getType(),args[0],args[1])] + list(args) + newargs = ['%s_%s' % (cls.getType(),reduce(lambda s1,s2: s1+"_"+s2, args))] + list(args) + return super( TrigMuonEFCombinerMultiHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( TrigMuonEFCombinerMultiHypoConfig, self ).__init__( name ) + + try: + import itertools as it + PtMultiplicity = list() + PtBins = list() + PtThresholds = list() + i = 0 + for threshold in list(it.islice(args,1,None)) : + values = efCombinerThresholds[threshold] + PtMultiplicity += [ i for x in values[1] ] + PtBins += values[0] + PtThresholds += [ x * GeV for x in values[1] ] + i += 1 + self.PtMultiplicity = PtMultiplicity + self.PtBins = PtBins + self.PtThresholds = PtThresholds + self.AcceptAll = False + except LookupError: + if (threshold=='passthrough'): + self.PtBins = [-10000.,10000.] + self.PtThresholds = [ -1. * GeV ] + self.AcceptAll = True + else: + raise Exception('TrigMuonEFCombiner Multi Hypo Misconfigured: threshold %r not supported' % threshold) + + validation = TrigMuonEFCombinerMultiHypoValidationMonitoring() + online = TrigMuonEFCombinerMultiHypoOnlineMonitoring() + + self.AthenaMonTools = [ validation, online ] + + def setDefaults(cls,handle): + if hasattr(handle,'PtThresholds') and hasattr(handle,'PtBins') and hasattr(handle,'PtMultiplicity'): + nmult = max(handle.PtMultiplicity) - min(handle.PtMultiplicity) + 1 + if len(handle.PtThresholds)!=len(handle.PtBins)-nmult: + print handle.name," eta bins doesn't match the Pt thresholds!" + + +class TrigMuonEFExtrapolatorMultiHypoConfig(TrigMuonEFExtrapolatorMultiHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + #newargs = ['%s_%s_%s' % (cls.getType(),args[0],args[1])] + list(args) + newargs = ['%s_%s' % (cls.getType(),reduce(lambda s1,s2: s1+"_"+s2, args))] + list(args) + return super( TrigMuonEFExtrapolatorMultiHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( TrigMuonEFExtrapolatorMultiHypoConfig, self ).__init__( name ) + + try: + import itertools as it + PtMultiplicity = list() + PtBins = list() + PtThresholds = list() + i = 0 + for threshold in list(it.islice(args,1,None)) : + values = trigMuonEFSAThresholds[threshold] + PtMultiplicity += [ i for x in values[1] ] + PtBins += values[0] + PtThresholds += [ x * GeV for x in values[1] ] + i += 1 + self.PtMultiplicity = PtMultiplicity + self.PtBins = PtBins + self.PtThresholds = PtThresholds + self.AcceptAll = False + except LookupError: + if (threshold=='passthrough'): + self.PtBins = [-10000.,10000.] + self.PtThresholds = [ -1. * GeV ] + self.AcceptAll = True + else: + raise Exception('TrigMuonEFExtrapolator Multi Hypo Misconfigure: threshold %r not supported' % threshold) + + validation = TrigMuonEFExtrapolatorMultiHypoValidationMonitoring() + online = TrigMuonEFExtrapolatorMultiHypoOnlineMonitoring() + + self.AthenaMonTools = [ validation, online ] + + def setDefaults(cls,handle): + if hasattr(handle,'PtThresholds') and hasattr(handle,'PtBins') and hasattr(handle,'PtMultiplicity'): + nmult = max(handle.PtMultiplicity) - min(handle.PtMultiplicity) + 1 + if len(handle.PtThresholds)!=len(handle.PtBins)-nmult: + print handle.name," eta bins doesn't match the Pt thresholds!" + + +class TrigMuonEFTrackBuilderMultiHypoConfig(TrigMuonEFTrackBuilderMultiHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + #newargs = ['%s_%s_%s' % (cls.getType(),args[0],args[1])] + list(args) + newargs = ['%s_%s' % (cls.getType(),reduce(lambda s1,s2: s1+"_"+s2, args))] + list(args) + return super( TrigMuonEFTrackBuilderMultiHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( TrigMuonEFTrackBuilderMultiHypoConfig, self ).__init__( name ) + + try: + import itertools as it + PtMultiplicity = list() + PtBins = list() + PtThresholds = list() + i = 0 + for threshold in list(it.islice(args,1,None)) : + values = trigMuonEFSAThresholds[threshold] + PtMultiplicity += [ i for x in values[1] ] + PtBins += values[0] + PtThresholds += [ x * GeV for x in values[1] ] + i += 1 + self.PtMultiplicity = PtMultiplicity + self.PtBins = PtBins + self.PtThresholds = PtThresholds + self.AcceptAll = False + except LookupError: + if (threshold=='passthrough'): + self.PtBins = [-10000.,10000.] + self.PtThresholds = [ -1. * GeV ] + self.AcceptAll = True + else: + raise Exception('TrigMuonEFTrackBuilder Multi Hypo Misconfigured: threshold %r not supported' % threshold) + + validation = TrigMuonEFTrackBuilderMultiHypoValidationMonitoring() + online = TrigMuonEFTrackBuilderMultiHypoOnlineMonitoring() + + self.AthenaMonTools = [ validation, online ] + + def setDefaults(cls,handle): + if hasattr(handle,'PtThresholds') and hasattr(handle,'PtBins') and hasattr(handle,'PtMultiplicity'): + nmult = max(handle.PtMultiplicity) - min(handle.PtMultiplicity) + 1 + if len(handle.PtThresholds)!=len(handle.PtBins)-nmult: + print handle.name," eta bins doesn't match the Pt thresholds!" + + +class StauHypoConfig(StauHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + newargs = ['%s_%s' % (cls.getType(),args[0])] + list(args) + return super( StauHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( StauHypoConfig, self ).__init__( name ) + + # Isolation Hypothesis configuration and cuts + self.PtThreshold = 30000.0 + self.BetaMax = 0.97 + self.MMin = 40000.0 + + +class TileMuHypoConfig(TileMuHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + if len(args) == 2: + newargs = ['%s_%s_%s' % (cls.getType(),args[0],args[1])] + list(args) + elif len(args) == 3: + newargs = ['%s_%s_%s_%s' % (cls.getType(),args[0],args[1],args[2])] + list(args) + else: + newargs = ['%s_%s' % (cls.getType(),args[0])] + list(args) + + return super( TileMuHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( TileMuHypoConfig, self ).__init__( name ) + + # Isolation Hypothesis configuration and cuts + #self.AcceptAll = True + self.AcceptAll = False + #self.IOptIDScan = 0 + self.IOptIDScan = 1 + if len(args) > 2: + TrackType = args[2] + if (TrackType=='NoTrack'): + self.IOptIDScan = 0 + if (TrackType=='SITRACK'): + self.IOptIDScan = 2 + if (TrackType=='TRTXK'): + self.IOptIDScan = 3 + if (TrackType=='TRTSEG'): + self.IOptIDScan = 4 + + #self.UseIDScan = True # Not use! (2008/Jan/18) + #self.DelPhi_Cut = 0.1 + #self.DelEta_Cut = 0.1 + + self.Pt_Cut = 2000.0 + # Unit(Pt):MeV! It is the default value! + if len(args) == 2: + threshold = args[1] + if (threshold=='6GeV'): + self.Pt_Cut = 6000.0 + if (threshold=='4GeV'): + self.Pt_Cut = 4000.0 + + # Add for histogram + validation = TileMuHypoValidationMonitoring() + online = TileMuHypoOnlineMonitoring() + cosmic = TileMuHypoCosmicMonitoring() + + self.AthenaMonTools = [ validation, online, cosmic ] + +class TrigMuGirlHypoConfig(TrigMuGirlHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + newargs = ['%s_%s_%s' % (cls.getType(),args[0],args[1])] + list(args) + return super( TrigMuGirlHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( TrigMuGirlHypoConfig, self ).__init__( name ) + + threshold = args[1] + + try: + values = efCombinerThresholds[threshold] + self.PtBins = values[0] + self.PtThresholds = [ x * GeV for x in values[1] ] + self.AcceptAll = False + except LookupError: + raise Exception('TrigMuGirl Hypo Misconfigured: threshold %r not supported' % threshold) + +# validation = TrigMuGirlHypoValidationMonitoring() +# online = TrigMuGirlHypoOnlineMonitoring() +# self.AthenaMonTools = [ validation, online ] + + + from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig + time = TrigTimeHistToolConfig("Time") + time.TimerHistLimits = [0, 100] + time.NumberOfHistBins = 100 + self.AthenaMonTools = [ time ] + + def setDefaults(cls,handle): + if hasattr(handle,'PtThresholds') and hasattr(handle,'PtBins'): + if len(handle.PtThresholds)!=len(handle.PtBins)-1: + print handle.name," eta bins doesn't match the Pt thresholds!" + + +class TrigMuGirlStauHypoConfig(TrigMuGirlStauHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + newargs = ['%s_%s_%s' % (cls.getType(),args[0],args[1])] + list(args) + return super( TrigMuGirlStauHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( TrigMuGirlStauHypoConfig, self ).__init__( name ) + + threshold = args[1] + + try: + values = efCombinerThresholds[threshold] + self.PtBins = values[0] + self.PtThresholds = [ x * GeV for x in values[1] ] + self.AcceptAll = False + except LookupError: + raise Exception('TrigMuGirlStau Hypo Misconfigured: threshold %r not supported' % threshold) + +# validation = TrigMuGirlHypoValidationMonitoring() +# online = TrigMuGirlHypoOnlineMonitoring() +# self.AthenaMonTools = [ validation, online ] + + + from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig + time = TrigTimeHistToolConfig("Time") + time.TimerHistLimits = [0, 100] + time.NumberOfHistBins = 100 + self.AthenaMonTools = [ time ] + + def setDefaults(cls,handle): + if hasattr(handle,'PtThresholds') and hasattr(handle,'PtBins'): + if len(handle.PtThresholds)!=len(handle.PtBins)-1: + print handle.name," eta bins doesn't match the Pt thresholds!" + + + +class TrigMuTagIMOHypoConfig(TrigMuTagIMOHypo) : + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + newargs = ['%s_%s_%s' % (cls.getType(),args[0],args[1])] + list(args) + return super( TrigMuTagIMOHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name = "TrigMuTagIMOHypoConfig", *args, **kwargs): + super( TrigMuTagIMOHypoConfig, self ).__init__( name ) + + threshold = args[1] + + try: + # borrow muFast threshold + values = muFastThresholds[threshold] + self.PtBins = values[0] + self.PtThresholds = [ x * GeV for x in values[1] ] + self.AcceptAll = False + except LookupError: + raise Exception('TrigMuTagIMOHypo Misconfigured!') + + validation = TrigMuTagIMOHypoValidationMonitoring() + online = TrigMuTagIMOHypoOnlineMonitoring() + cosmic = TrigMuTagIMOHypoCosmicMonitoring() + self.AthenaMonTools = [ validation, online, cosmic ] + + from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig + time = TrigTimeHistToolConfig("Time") + time.TimerHistLimits = [0, 10] + time.NumberOfHistBins = 20 + self.AthenaMonTools = [ time ] + + def setDefaults(cls,handle): + if hasattr(handle,'PtThresholds') and hasattr(handle,'PtBins'): + if len(handle.PtThresholds)!=len(handle.PtBins)-1: + print handle.name," eta bins doesn't match the Pt thresholds!" + + +class MuonRoiFexConfig(MuonRoiFex) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + if len(args) == 1: + newargs = ['%s_%s' % (cls.getType(),args[0])] + list(args) + return super( MuonRoiFexConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( MuonRoiFexConfig, self ).__init__( name ) + + mode = args[0] + + if (mode=='passthrough'): + self.AcceptAll = True + self.RpcOnly = False + self.RpcHorizontal = False + elif (mode=='RpcOnly'): + self.AcceptAll = False + self.RpcOnly = True + self.RpcHorizontal = False + elif (mode=='RpcHorizontal'): + self.AcceptAll = False + self.RpcOnly = False + self.RpcHorizontal = True + self.dPhiForRpcHorizontal = 0.78 + else: + raise Exception('MuonRoiFex Misconfigured!') + +# Working points for EF track isolation algorithm +# syntax is: +# 'WPname' : [cut on 0.2 cone, cut on 0.3 cone] +# put < 0 for no cut +# For a relative cut the WPname should contain 'Rel' +trigMuonEFTrkIsoThresholds = { + 'EFOnlyLoose' : [ 4200.0, -1.0 ], + 'EFOnlyTight' : [ 1500.0, -1.0 ], + 'Loose' : [ 2800.0, -1.0 ], + 'Tight' : [ -1.0, 1000.0], + 'TauCP' : [ -1.0, 1.0], + + 'RelEFOnlyLoose' : [ 0.2, -1.0 ], + 'RelEFOnlyMedium' : [ 0.12, -1.0 ], + 'RelEFOnlyTight' : [ 0.06, -1.0 ], + + 'EFOnlyLooseWide' : [ -1.0, 4200.0], + 'EFOnlyMediumWide' : [ -1.0, 2100.0], + 'EFOnlyTightWide' : [ -1.0, 1500.0], + + 'MSEFOnlyLooseWide' : [ -1.0, 3000.0], + + 'RelEFOnlyLooseWide' : [-1.0 , 0.2 ], + 'RelEFOnlyMediumWide' : [-1.0 , 0.12 ], + 'RelEFOnlyTightWide' : [-1.0 , 0.06 ], + + 'VarEFOnlyLoose' : [ 4200.0, -1.0 ], + 'VarEFOnlyTight' : [ 1500.0, -1.0 ], + 'VarLoose' : [ 2800.0, -1.0 ], + 'VarTight' : [ -1.0, 1000.0], + 'VarTauCP' : [ -1.0, 1.0], + + 'RelEFOnlyVarLoose' : [ 0.2, -1.0 ], +# 'RelEFOnlyVarMedium' : [ 0.18, -1.0 ], #MC15C + 'RelEFOnlyVarMedium' : [ -1.0, 0.16], #ivarloose + 'RelEFOnlyVarTight' : [ 0.06, -1.0 ], + + 'EFOnlyVarLooseWide' : [ -1.0, 4200.0], + 'EFOnlyVarMediumWide' : [ -1.0, 2100.0], + 'EFOnlyVarTightWide' : [ -1.0, 1500.0], + + 'RelEFOnlyVarLooseWide' : [-1.0 , 0.2 ], + 'RelEFOnlyVarMediumWide' : [-1.0 , 0.12 ], +# 'RelEFOnlyVarTightWide' : [-1.0 , 0.08 ] #MC15C + 'RelEFOnlyVarTightWide' : [-1.0 , 0.07 ] #ivarmedium + } + + + +trigMuonEFCaloIsoThresholds = { + + 'Rel' : [ 0.3, 0.3, 0.3 ], + 'AbsCalo' : [ 5200.0, 4800.0, 4000.0], + + } + +""" +Class for hypothesis cuts on EF track isolation algorithm. +arg[0] = Muon +arg[1] = working point +See trigMuonEFTrkIsoThresholds for available working points +Put passthrough in arg[1] for passthrough +""" + +class TrigMuonEFTrackIsolationHypoConfig(TrigMuonEFTrackIsolationHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + newargs = ['%s_%s_%s' % (cls.getType(),args[0],args[1])] + list(args) + return super( TrigMuonEFTrackIsolationHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( TrigMuonEFTrackIsolationHypoConfig, self ).__init__( name ) + + try: + cuts = trigMuonEFTrkIsoThresholds[ args[1] ] + ptcone02 = cuts[0] + ptcone03 = cuts[1] + + self.PtCone02Cut = ptcone02 + self.PtCone03Cut = ptcone03 + self.AcceptAll = False + + if 'MS' in args[1]: + self.RequireCombinedMuon = False + else: + self.RequireCombinedMuon = True + + if 'Rel' in args[1] : + self.DoAbsCut = False + else : + self.DoAbsCut = True + if 'Var' in args[1] : + self.useVarIso = True + else : + self.useVarIso = False + except LookupError: + if(args[1]=='passthrough') : + print 'Setting passthrough' + self.AcceptAll = True + else: + print 'args[1] = ', args[1] + raise Exception('TrigMuonEFTrackIsolation Hypo Misconfigured') + + + validation = TrigMuonEFTrackIsolationHypoValidationMonitoring() + online = TrigMuonEFTrackIsolationHypoOnlineMonitoring() + + self.AthenaMonTools = [ validation, online ] + + +""" +Class for hypothesis cuts on EF calo isolation algorithm. +arg[0] = Muon +arg[1]-arg[3] = working point (eta dependent) +Put passthrough in arg[1] for passthrough +""" + +class TrigMuonEFCaloIsolationHypoConfig(TrigMuonEFCaloIsolationHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + newargs = ['%s_%s_%s' % (cls.getType(),args[0],args[1])] + list(args) + #newargs = ['%s_%s' % (cls.getType(),args[0])] + list(args) + + return super( TrigMuonEFCaloIsolationHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( TrigMuonEFCaloIsolationHypoConfig, self ).__init__( name ) + + try: + cuts = trigMuonEFCaloIsoThresholds[ args[1] ] + + # If configured with passthrough, set AcceptAll flag on + self.AcceptAll = False + if len(args) == 2: + if (args[1]=='passthrough'): + self.AcceptAll = True + print 'TrigMuonEFCaloIsolationConfig configured in passthrough mode' + + #Default cuts (more than 95% eff on Z->mumu) tuned on 2011 run 178044 data <beta>~6 + #These probably should be updated! + self.CaloConeSize = 2; + self.MaxCaloIso_1 = cuts[0] + self.MaxCaloIso_2 = cuts[1] + self.MaxCaloIso_3 = cuts[2] + + if 'Rel' in args[1] : + self.DoAbsCut = False + else : + self.DoAbsCut = True + + except LookupError: + if(args[1]=='passthrough') : + print 'Setting passthrough' + self.AcceptAll = True + else: + print 'args[1] = ', args[1] + raise Exception('TrigMuonEFCaloIsolation Hypo Misconfigured') + + + #validation = TrigMuonEFCaloIsolationHypoValidationMonitoring() + #online = TrigMuonEFCaloIsolationHypoOnlineMonitoring() + + #self.AthenaMonTools = [ validation, online ] + + + +""" +Class for hypothesis cuts on EF combiner dimuon mass hypo +arg[0] = mass working point +arg[1] = sign (NS/OS/SS) +Put passthrough in arg[1] for passthrough +""" +trigMuonEFCombinerDiMuonMassThresholds = { + 'Jpsi' : [ 2.5, 4.3 ], + 'Upsi' : [ 8.0, 12.0 ], + 'Z' : [ 80.0, 100.0 ], + } + +class TrigMuonEFCombinerDiMuonMassHypoConfig(TrigMuonEFCombinerDiMuonMassHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + newargs = ['%s_%s_%s' % (cls.getType(),args[0],args[1])] + list(args) + return super( TrigMuonEFCombinerDiMuonMassHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( TrigMuonEFCombinerDiMuonMassHypoConfig, self ).__init__( name ) + + try: + cuts = trigMuonEFCombinerDiMuonMassThresholds[ args[0] ] + massThresLow = cuts[0] + massThresHigh = cuts[1] + + self.massThresLow = massThresLow + self.massThresHigh = massThresHigh + self.AcceptAll = False + + if 'NS' in args[1] : + self.signRequirement = 0 + elif 'OS' in args[1] : + self.signRequirement = -1 + elif 'SS' in args[1] : + self.signRequirement = 1 + else : + print 'args[1] = ', args[1] + raise Exception('TrigMuonEFCombinerDiMuonMass Hypo Misconfigured') + + except LookupError: + if(args[0]=='passthrough') : + print 'Setting passthrough' + self.AcceptAll = True + else: + print 'args[0] = ', args[0] + raise Exception('TrigMuonEFCombinerDiMuonMass Hypo Misconfigured') + + + validation = TrigMuonEFCombinerDiMuonMassHypoValidationMonitoring() + online = TrigMuonEFCombinerDiMuonMassHypoOnlineMonitoring() + + self.AthenaMonTools = [ validation, online ] + +#vvvvv pvn +class TrigMuonEFCombinerDiMuonMassPtImpactsHypoConfig(TrigMuonEFCombinerDiMuonMassPtImpactsHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + newargs = ['%s_%s_%s' % (cls.getType(),args[0],args[1])] + list(args) + return super( TrigMuonEFCombinerDiMuonMassPtImpactsHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( TrigMuonEFCombinerDiMuonMassPtImpactsHypoConfig, self ).__init__( name ) + + try: + # in GeV + + # HLT_2mu6_10invm30_pt2_z10 + self.massThresLow = 10.0 + self.massThresHigh = 30.0 + self.pairptThresLow = -1 + self.pairptThresHigh = 2.0 + self.deltaZThres = 10.0 + self.deltaPhiThresLow = -1 + self.deltaPhiThresHigh = -1 + self.AcceptAll = False + + # Only for debug + # This should be commented out once debugging is done + # self.pairptThresHigh = 200.0 + + except LookupError: + if(args[0]=='passthrough') : + print 'Setting passthrough' + self.AcceptAll = True + else: + print 'args[0] = ', args[0] + raise Exception('TrigMuonEFCombinerDiMuonMassPtImpacts Hypo Misconfigured') + + online = TrigMuonEFCombinerDiMuonMassPtImpactsHypoOnlineMonitoring() + + self.AthenaMonTools = [ online ] + +#^^^^^ pvn + + +class MufastNSWHypoConfig(MufastNSWHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + newargs = ['%s_%s' % (cls.getType(),args[0])] + list(args) + return super( MufastNSWHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( MufastNSWHypoConfig, self ).__init__( name ) + + self.AcceptAll = False + + validation = MufastNSWHypoValidationMonitoring() + online = MufastNSWHypoOnlineMonitoring() + + self.AthenaMonTools = [ validation, online ] + + +class TrigMuonEFExtrapolatorNSWHypoConfig(TrigMuonEFExtrapolatorNSWHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + newargs = ['%s_%s' % (cls.getType(),args[0])] + list(args) + return super( TrigMuonEFExtrapolatorNSWHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( TrigMuonEFExtrapolatorNSWHypoConfig, self ).__init__( name ) + + self.AcceptAll = False + + validation = TrigMuonEFExtrapolatorNSWHypoValidationMonitoring() + online = TrigMuonEFExtrapolatorNSWHypoOnlineMonitoring() + + self.AthenaMonTools = [ validation, online ] + +class TrigMuonCaloTagHypoConfig(TrigMuonCaloTagHypo) : + __slots__ = [] + + def __new__(cls, *args, **kwargs): + newargs = ['%s_%s' % (cls.getType(),reduce(lambda s1,s2: str(s1)+"_"+str(s2), args))] + list(args) + #newargs = ['%s' % (cls.getType())] + list(args) + return super( TrigMuonCaloTagHypoConfig, cls).__new__(cls, *newargs, **kwargs) + + def __init__(self, name, *args, **kwargs): + super( TrigMuonCaloTagHypoConfig, self).__init__(name) + + self.PtThresholds = [t*1000 for t in efCaloTagThresholds[args[1]][1][:args[2]]] + self.UseLH = False + self.TightCaloTag = True + self.MaxMissingCells = 3 + + +class TrigMuonIDTrackMultiHypoConfig(TrigMuonIDTrackMultiHypo) : + + __slots__ = [] + + def __new__( cls, *args, **kwargs ): + newargs = ['%s_%s_%s' % (cls.getType(),args[0],args[1])] + list(args) + return super( TrigMuonIDTrackMultiHypoConfig, cls ).__new__( cls, *newargs, **kwargs ) + + def __init__( self, name, *args, **kwargs ): + super( TrigMuonIDTrackMultiHypoConfig, self ).__init__( name ) + + try: + if args[0]=='passthrough': + self.AcceptAll = True + else: + self.AcceptAll = False + + if args[1]=='FTF': + self.TrkAlgo = "InDetTrigTrackingxAODCnv_Muon_FTF" + elif args[1]=='IDTrig': + self.TrkAlgo = "InDetTrigTrackingxAODCnv_Muon_IDTrig" + elif args[1]=='Muon': + self.UseMuon = True + elif args[1]=='MuRoI': + self.UseMuRoiDr = True + self.UseMuRoiDrOnly = True + pass + else: + print 'args[1] = ', args[1] + raise Exception('TrigMuonIDTrackMultiHypo Misconfigured') + + split_args = args[0].split("_") + pattern_pt = re.compile("pt") + pattern_mass = re.compile("m") + pattern_dr = re.compile("dr") + for i in range(len(split_args)): + if pattern_pt.search(split_args[i]) : + ptargs = split_args[i].split("pt") + threshold = ptargs[1] + multiplicity = ptargs[0] + if args[1]=='FTF': + values = muCombThresholds[threshold+"GeV_v15a"] + if args[1]=='IDTrig': + values = efCombinerThresholds[threshold+"GeV_v15a"] + if args[1]=='Muon': + values = efCombinerThresholds[threshold+"GeV_v15a"] + if i == 0: + self.PtBins1 = values[0] + self.PtThresholds1 = [ x * GeV for x in values[1] ] + self.Multiplicity1 = int(multiplicity) + if i == 1: + self.PtBins2 = values[0] + self.PtThresholds2 = [ x * GeV for x in values[1] ] + self.Multiplicity2 = int(multiplicity) + if i == 2: + self.PtBins3 = values[0] + self.PtThresholds3 = [ x * GeV for x in values[1] ] + self.Multiplicity3 = int(multiplicity) + if i > 2: + raise Exception('TrigMuonIDTrackMultiHypo Misconfigured : more than 3 pt settings') + elif pattern_mass.search(split_args[i]) : + massargs = split_args[i].split("m") + self.LowMassCut = int(massargs[0]) + self.HighMassCut = int(massargs[1]) + elif pattern_dr.search(split_args[i]) : + drargs = split_args[i].split("dr") + if drargs[0] == '0':self.MuRoiDrMin = 0.0; + if drargs[0] == '005':self.MuRoiDrMin = 0.05; + if drargs[0] == '01':self.MuRoiDrMin = 0.1; + if drargs[0] == '015':self.MuRoiDrMin = 0.15; + if drargs[0] == '02':self.MuRoiDrMin = 0.2; + if drargs[0] == '025':self.MuRoiDrMin = 0.25; + if drargs[0] == '03':self.MuRoiDrMin = 0.3; + if drargs[0] == '035':self.MuRoiDrMin = 0.35; + if drargs[0] == '04':self.MuRoiDrMin = 0.4; + if drargs[0] == '045':self.MuRoiDrMin = 0.45; + if drargs[0] == '05':self.MuRoiDrMin = 0.5; + if drargs[0] == '1':self.MuRoiDrMin = 1.0; + if drargs[1] == '0':self.MuRoiDrMax = 0.0; + if drargs[1] == '005':self.MuRoiDrMax = 0.05; + if drargs[1] == '01':self.MuRoiDrMax = 0.1; + if drargs[1] == '015':self.MuRoiDrMax = 0.15; + if drargs[1] == '02':self.MuRoiDrMax = 0.2; + if drargs[1] == '025':self.MuRoiDrMax = 0.25; + if drargs[1] == '03':self.MuRoiDrMax = 0.3; + if drargs[1] == '035':self.MuRoiDrMax = 0.35; + if drargs[1] == '04':self.MuRoiDrMax = 0.4; + if drargs[1] == '045':self.MuRoiDrMax = 0.45; + if drargs[1] == '05':self.MuRoiDrMax = 0.5; + if drargs[1] == '1':self.MuRoiDrMax = 1.0; + + + + except LookupError: + print 'args[0] = ', args[0] + raise Exception('TrigMuonIDTrackMultiHypo Misconfigured') + + online = TrigMuonIDTrackMultiHypoOnlineMonitoring() + + self.AthenaMonTools = [ online ] + + +########MT EF hypo +class TrigMuonEFMSonlyHypoConfig(TrigMuonEFMSonlyHypoAlg) : + + __slots__ = [] + + # nath: name threshold, for example HLT_mu6 etc + def TrigMuonEFMSonlyHypoToolFromName( self, name, nath ): + + from AthenaCommon.Constants import DEBUG + tool = TrigMuonEFMSonlyHypoTool( nath ) + tool.OutputLevel = DEBUG + bname = nath.split('_') + + # this needs to be correctly defined, as this is defined for test run + if len(bname) == 2: + th = re.findall(r'[0-9]+', bname[1]) + threshold = str(th[0]) + 'GeV' + TrigMuonEFMSonlyHypoConfig().ConfigrationHypoTool( name, nath, threshold ) + else: + print """ Configration ERROR: Can't configure threshold at TrigMuonEFMSonlyHypoTool """ + return tool + + # Setup MonTool for monitored variables in AthenaMonitoring package + try: + TriggerFlags.enableMonitoring = ["Validation"] + if 'Validation' in TriggerFlags.enableMonitoring() or 'Online' in TriggerFlags.enableMonitoring() or 'Cosmic' in TriggerFlags.enableMonitoring(): + tool.MonTool = TrigMuonEFMSonlyHypoMonitoring() + except AttributeError: + tool.MonTool = "" + print name, ' Monitoring Tool failed' + + return tool + + def ConfigrationHypoTool( self, name, nath, threshold ): + + tool = TrigMuonEFMSonlyHypoTool( nath ) + + try: + tool.AcceptAll = False + values = trigMuonEFSAThresholds[threshold] + tool.PtBins = values[0] + tool.PtThresholds = [ x * GeV for x in values[1] ] + except LookupError: + if (threshold=='passthrough'): + tool.PtBins = [-10000.,10000.] + tool.PtThresholds = [ -1. * GeV ] + else: + raise Exception('MuonEFMSonly Hypo Misconfigured: threshold %r not supported' % threshold) + return threshold diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoAlg.cxx b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoAlg.cxx index d6b66bcba511..b61f71761931 100755 --- a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoAlg.cxx +++ b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoAlg.cxx @@ -17,10 +17,9 @@ using namespace TrigCompositeUtils; TrigMufastHypoAlg::TrigMufastHypoAlg( const std::string& name, ISvcLocator* pSvcLocator ) : - ::AthReentrantAlgorithm( name, pSvcLocator ) -{ + ::HypoBase( name, pSvcLocator ) +{} -} TrigMufastHypoAlg::~TrigMufastHypoAlg() {} @@ -33,17 +32,8 @@ StatusCode TrigMufastHypoAlg::initialize() ATH_MSG_INFO ( "Initializing " << name() << "..." ); ATH_CHECK(m_hypoTools.retrieve()); - ATH_CHECK(m_viewsKey.initialize()); - renounce(m_muFastKey); ATH_CHECK(m_muFastKey.initialize()); - - renounce(m_roiKey); - ATH_CHECK(m_roiKey.initialize()); - - ATH_CHECK(m_decisionsKey.initialize()); - - ATH_CHECK(m_previousDecisionsKey.initialize()); ATH_MSG_INFO( "Initialization completed successfully" ); return StatusCode::SUCCESS; @@ -65,84 +55,67 @@ StatusCode TrigMufastHypoAlg::finalize() StatusCode TrigMufastHypoAlg::execute_r( const EventContext& context ) const { + // common for all Hypos, to move in the base class ATH_MSG_DEBUG("StatusCode TrigMufastHypoAlg::execute_r start"); - - auto viewsHandle = SG::makeHandle( m_viewsKey, context ); - - std::map<const TrigRoiDescriptor*, const TrigCompositeUtils::Decision* > roiToDecision; - auto previousDecisionsHandle = SG::makeHandle( m_previousDecisionsKey, context ); - for ( auto previousDecision: *previousDecisionsHandle ) { - auto roiEL = previousDecision->objectLink<TrigRoiDescriptorCollection>( "initialRoI" ); - if (!roiEL.isValid()) { - ATH_MSG_ERROR("ReadHandle for std::vector<SG::View*> key:" << m_viewsKey.key() << " is failed"); - return StatusCode::FAILURE; - } - const TrigRoiDescriptor* roi = *roiEL; - roiToDecision.insert( std::make_pair( roi, previousDecision ) ); - } - ATH_MSG_DEBUG("REGTEST: RoI to decisions map size: " << roiToDecision.size() ); + auto previousDecisionsHandle = SG::makeHandle( decisionInput(), context ); + if( not previousDecisionsHandle.isValid() ) {//implicit + ATH_MSG_DEBUG( "No implicit RH for previous decisions "<< decisionInput().key()<<": is this expected?" ); + return StatusCode::SUCCESS; + } + ATH_MSG_DEBUG( "Running with "<< previousDecisionsHandle->size() <<" implicit ReadHandles for previous decisions"); auto decisions = std::make_unique<DecisionContainer>(); auto aux = std::make_unique<DecisionAuxContainer>(); decisions->setStore(aux.get()); + // end of common + - size_t counter = 0; // view counter std::vector<TrigMufastHypoTool::MuonClusterInfo> toolInput; - for (auto view: *viewsHandle) { - auto d = newDecisionIn( decisions.get() ); + // loop over previous decisions + size_t counter=0; + for ( auto previousDecision: *previousDecisionsHandle ) { + //get RoI + auto roiEL = previousDecision->objectLink<TrigRoiDescriptorCollection>( "initialRoI" ); + CHECK( roiEL.isValid() ); + const TrigRoiDescriptor* roi = *roiEL; + + // get View + auto viewEL = previousDecision->objectLink<std::vector<SG::View*>>( "view" ); + CHECK( viewEL.isValid() ); + const SG::View* view_const = *viewEL; + SG::View* view = const_cast<SG::View*>(view_const); // CHECK THIS! + + // get info of that view + auto muFastHandle = SG::makeHandle( m_muFastKey, context ); + CHECK( muFastHandle.setProxyDict( view ) ); + ATH_MSG_DEBUG ( "Muinfo handle size: " << muFastHandle->size() << "..." ); - // retrieve MuFastDecisions with ReadHandle - auto muFastHandle = SG::makeHandle( m_muFastKey, context ); - if (muFastHandle.setProxyDict(view).isFailure()) { - ATH_MSG_ERROR("ReadHandle for xAOD::L2StandAloneMuonContainer key:" << m_muFastKey.key() << " is failed"); - return StatusCode::FAILURE; - } const xAOD::L2StandAloneMuon* fast = muFastHandle.cptr()->at(0); - - // retrieve MuFastDecisions with ReadHandle - auto roiHandle = SG::makeHandle( m_roiKey, context ); - if (roiHandle.setProxyDict(view).isFailure()) { - ATH_MSG_ERROR("ReadHandle for TrigRoiDescriptor key:" << m_roiKey.key() << " is failed"); - return StatusCode::FAILURE; - } - const TrigRoiDescriptor* roi = roiHandle.cptr()->at(0); + + // create new decision + auto d = newDecisionIn( decisions.get() ); // push_back to toolInput - toolInput.emplace_back( d, roi, fast, roiToDecision[roi] ); - - { // retrieve MUViewRoIs - auto element = ElementLink< std::vector<SG::View*> >( m_viewsKey.key(), counter ); - if(!element.isValid()) { - ATH_MSG_ERROR("ReadHandle for std::vector<SG::View*> key:" << m_viewsKey.key() << " isn't Valid"); - return StatusCode::FAILURE; - } else { - d->setObjectLink( "view", element ); - ATH_MSG_DEBUG("REGTEST: " << m_viewsKey.key() << " = " << (*element)); - } - } - { // retrieve MURoIs - auto element = ElementLink<TrigRoiDescriptorCollection>( view->name()+"_"+m_roiKey.key(), 0 ); - if(!element.isValid()) { - ATH_MSG_ERROR("ReadHandle for TrigRoiDescriptorCollection key:" << m_roiKey.key() << " isn't Valid"); - return StatusCode::FAILURE; - } else { - d->setObjectLink( "roi", element ); - ATH_MSG_DEBUG("REGTEST: " << m_roiKey.key() << " eta/phi = " << (*element)->eta() << "/" << (*element)->phi()); - } - } - { // retrieve xAOD::MuonFastDecision - auto element = ElementLink<xAOD::L2StandAloneMuonContainer>( view->name()+"_"+m_muFastKey.key(), 0 ); - if(!element.isValid()) { - ATH_MSG_ERROR("ReadHandle for xAOD::L2StandAloneMuonContainer key:" << m_muFastKey.key() << " isn't Valid"); - return StatusCode::FAILURE; - } else { - d->setObjectLink( "feature", element ); - ATH_MSG_DEBUG("REGTEST: " << m_muFastKey.key() << " pT = " << (*element)->pt() << " GeV"); - ATH_MSG_DEBUG("REGTEST: " << m_muFastKey.key() << " eta/phi = " << (*element)->eta() << "/" << (*element)->phi()); - } + toolInput.emplace_back( d, roi, fast, previousDecision ); + + { + auto element = ElementLink<xAOD::L2StandAloneMuonContainer>( view->name()+"_"+m_muFastKey.key(), 0 ); + CHECK( element.isValid() ); + d->setObjectLink( "feature", element ); + ATH_MSG_DEBUG("REGTEST: " << m_muFastKey.key() << " pT = " << (*element)->pt() << " GeV"); + ATH_MSG_DEBUG("REGTEST: " << m_muFastKey.key() << " eta/phi = " << (*element)->eta() << "/" << (*element)->phi()); } + d->setObjectLink( "roi", roiEL ); + d->setObjectLink( "view", viewEL ); + ATH_MSG_DEBUG("REGTEST: View = " << (*viewEL)); + ATH_MSG_DEBUG("REGTEST: RoI = eta/phi = " << (*roiEL)->eta() << "/" << (*roiEL)->phi()); + TrigCompositeUtils::linkToPrevious( d, decisionInput().key(), counter ); + ATH_MSG_DEBUG( "Added view, roi, cluster, previous decision to new decision "<<counter <<" for view "<<view->name() ); counter++; - } // End of view loops */ + } + + ATH_MSG_DEBUG( "Found "<<toolInput.size()<<" inputs to tools"); + // to TrigMufastHypoTool StatusCode sc = StatusCode::SUCCESS; @@ -153,10 +126,25 @@ StatusCode TrigMufastHypoAlg::execute_r( const EventContext& context ) const ATH_MSG_ERROR("MuonHypoTool is failed"); return StatusCode::FAILURE; } - } // End of tool algorithms */ + } // End of tool algorithms */ + + + + {// make output handle and debug, in the base class + auto outputHandle = SG::makeHandle(decisionOutput(), context); + CHECK( outputHandle.record( std::move( decisions ), std::move( aux ) ) ); + ATH_MSG_DEBUG ( "Exit with "<<outputHandle->size() <<" decisions"); + TrigCompositeUtils::DecisionIDContainer allPassingIDs; + if ( outputHandle.isValid() ) { + for ( auto decisionObject: *outputHandle ) { + TrigCompositeUtils::decisionIDs( decisionObject, allPassingIDs ); + } + for ( TrigCompositeUtils::DecisionID id : allPassingIDs ) { + ATH_MSG_DEBUG( " +++ " << HLT::Identifier( id ) ); + } + } + } - auto handle = SG::makeHandle(m_decisionsKey, context); - ATH_CHECK( handle.record( std::move(decisions), std::move(aux) ) ); ATH_MSG_DEBUG("StatusCode TrigMufastHypoAlg::execute_r success"); return StatusCode::SUCCESS; diff --git a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt index a1588868e882..9bd5d8cfc9fd 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt +++ b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt @@ -81,7 +81,7 @@ atlas_add_test( egammaMenu PROPERTIES TIMEOUT 500 PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_egammaMenu ) -# EXTRA_PATTERNS "TriggerSummary" + file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_muRunData ) atlas_add_test( muRunData SCRIPT test/test_mu_run_data.sh @@ -89,6 +89,14 @@ atlas_add_test( muRunData PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_muRunData ) +file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_muMenu ) +atlas_add_test( muMenu + SCRIPT test/test_mu_menu.sh + PROPERTIES TIMEOUT 500 + PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_muMenu + ) + + file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_idCaloRunData ) atlas_add_test( idCaloRunData SCRIPT test/test_id_calo_run_data.sh diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/HLTCFConfig.py b/Trigger/TrigValidation/TrigUpgradeTest/python/HLTCFConfig.py index afc3f4ecccdf..afa268cc0848 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/HLTCFConfig.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/HLTCFConfig.py @@ -119,10 +119,10 @@ def decisionTree_From_Chains(HLTNode, chains): chain_step_name= "%s:%s"%(stepCF_name, chain.name) log.debug("\n*******Filling step %s for chain %s", stepCF_name, chain.name) - sequenceHypoTools=chain_step.sequences + #sequenceHypoTools=chain_step.sequences hypotool=chain.hypoToolName countseq=0 - for sequence in sequenceHypoTools: + for sequence in chain_step.sequences: cfseq_name= sequence.name log.debug("Going through sequence %s with threshold %s", sequence.name, hypotool) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/MenuComponents.py b/Trigger/TrigValidation/TrigUpgradeTest/python/MenuComponents.py index b73a371690a2..9508dd71f679 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/MenuComponents.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/MenuComponents.py @@ -138,11 +138,7 @@ class HypoAlgNode(AlgNode): tools = self.Alg.HypoTools ## HypoTools are private, so need to be created when added to the Alg - try: - self.Alg.HypoTools = tools+[createHypoTool(hypoToolClassName, hypoToolName)] - except: - print "Error in creating HypoTool " + hypoToolName + " of type " + hypoToolClassName - + self.Alg.HypoTools = tools+[createHypoTool(hypoToolClassName, hypoToolName)] self.tools.append(hypoToolName) return True @@ -266,7 +262,10 @@ class InputMakerNode(AlgNode): ######################################################### def isHypoBase(alg): - return ('HypoInputDecisions' in alg.__class__.__dict__) + if 'HypoInputDecisions' in alg.__class__.__dict__: + return True + prop = alg.__class__.__dict__.get('_properties') + return ('HypoInputDecisions' in prop) def isInputMakerBase(alg): return ('InputMakerInputDecisions' in alg.__class__.__dict__) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/MenuHypoTools.py b/Trigger/TrigValidation/TrigUpgradeTest/python/MenuHypoTools.py index 4b164bf55d1e..2481a465d5cf 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/MenuHypoTools.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/MenuHypoTools.py @@ -1,11 +1,16 @@ from TrigUpgradeTest.HLTSignatureConfig import TestHypoTool, MuTestHypoTool, ElTestHypoTool from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2CaloHypoToolInc, TrigL2CaloHypoToolMult, TrigL2ElectronHypoTool -from TrigEgammaHypo.TrigL2CaloHypoTool import * - +#from TrigEgammaHypo.TrigL2CaloHypoTool import * +from TrigMuonHypo.TrigMuonHypoConf import TrigMufastHypoTool def createHypoTool(hypoToolClassName, hypoToolName): - return eval(hypoToolClassName)(hypoToolName) + try: + obj=eval(hypoToolClassName)(hypoToolName) + except: + print "Error in creating HypoTool " + hypoToolName + " of type " + hypoToolClassName + raise + return obj def TrigL2CaloHypoToolConf(name): @@ -21,3 +26,14 @@ def TrigL2ElectronHypoToolConf(name): hypotool= TrigL2ElectronHypoToolFromName(name) hypotool.OutputLevel = DEBUG return hypotool + + +def TrigMufastHypoToolConf(name): + from AthenaCommon.Constants import DEBUG + from TrigMuonHypo.testTrigMuonHypoConfig import TrigMufastHypoToolFromName + print "in TrigMufastHypoToolConf" + #TrigMufastHypoToolFromName + hypotool= TrigMufastHypoToolFromName(name) + #hypotool= TrigMufastHypoConfig.TrigMufastHypoToolFromName(name) + hypotool.OutputLevel = DEBUG + return hypotool diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.menu.py b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.menu.py index e5bd4c7df22e..1233f0a8df0d 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.menu.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.menu.py @@ -93,7 +93,7 @@ fastCalo_HLTSequence = HLTRecoSequence("fastCalo_HLTSequence", fastCaloSequence = MenuSequence("egammaCaloStep", recoSeqList=[fastCalo_HLTSequence], Hypo=theFastCaloHypo, - HypoToolClassName="TrigL2CaloHypoToolConf",) + HypoToolClassName="TrigL2CaloHypoToolConf") ######################################### # second step: tracking..... diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py new file mode 100644 index 000000000000..3430cc7c4980 --- /dev/null +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py @@ -0,0 +1,842 @@ +# +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# +# OutputLevel: INFO < DEBUG < VERBOSE +# + +include("TrigUpgradeTest/testHLT_MT.py") + +### workaround to prevent online trigger folders to be enabled ### +from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags +InDetTrigFlags.useConditionsClasses.set_Value_and_Lock(False) + +from InDetRecExample.InDetJobProperties import InDetFlags +InDetFlags.doCaloSeededBrem = False + +from InDetRecExample.InDetJobProperties import InDetFlags +InDetFlags.InDet25nsec = True +InDetFlags.doPrimaryVertex3DFinding = False +InDetFlags.doPrintConfigurables = False +InDetFlags.doResolveBackTracks = True +InDetFlags.doSiSPSeededTrackFinder = True +InDetFlags.doTRTPhaseCalculation = True +InDetFlags.doTRTSeededTrackFinder = True +InDetFlags.doTruth = False +InDetFlags.init() + +### PixelLorentzAngleSvc and SCTLorentzAngleSvc ### +include("InDetRecExample/InDetRecConditionsAccess.py") + +from InDetRecExample.InDetKeys import InDetKeys + +from AthenaCommon.AlgSequence import AlgSequence +topSequence = AlgSequence() + +### If inputFile is BS(ByteStream), the bool is true. ### +isData = False +if globalflags.InputFormat.is_bytestream(): + isData = True + +### provide a minimal menu information ### +if isData: + topSequence.L1DecoderTest.ctpUnpacker.OutputLevel=DEBUG + topSequence.L1DecoderTest.roiUnpackers[0].OutputLevel=DEBUG + topSequence.L1DecoderTest.roiUnpackers[1].OutputLevel=DEBUG +else: + pass + +### for Desplaying StoreGate Dump ### +from AthenaCommon.AppMgr import ServiceMgr +ServiceMgr.StoreGateSvc=Service("StoreGateSvc") +ServiceMgr.StoreGateSvc.Dump=True + + +# menu components +from TrigUpgradeTest.HLTCFConfig import decisionTree_From_Chains +from TrigUpgradeTest.MenuComponents import HLTRecoSequence, MenuSequence, Chain, ChainStep + +### for Control Flow ### +from AthenaCommon.CFElements import parOR, seqAND, seqOR, stepSeq + +from AthenaCommon.AlgScheduler import AlgScheduler +AlgScheduler.CheckDependencies( True ) +AlgScheduler.OutputLevel( DEBUG ) +AlgScheduler.ShowDataDependencies( True ) +AlgScheduler.setDataLoaderAlg( 'SGInputLoader' ) + + +from AthenaCommon.CfgGetter import getPublicTool, getPublicToolClone +from AthenaCommon import CfgMgr + +doL2SA=True +doL2CB=False +doEFSA=False + +TriggerFlags.doID=False + +# =============================================================================================== +# Setup PrepData +# =============================================================================================== + +### Used the algorithms as Step2 "muComb step" ### +if TriggerFlags.doID: + + from TrigUpgradeTest.InDetSetup import makeInDetAlgs + + (viewAlgs, eventAlgs) = makeInDetAlgs() + + from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_Muon + theFTF = TrigFastTrackFinder_Muon() + theFTF.OutputLevel = DEBUG + theFTF.TracksName = "TrigFastTrackFinder_MuTracks" + theFTF.isRoI_Seeded = True + viewAlgs.append(theFTF) + + ### A simple algorithm to confirm that data has been inherited from parent view ### + ### Required to satisfy data dependencies ### + ViewVerify = CfgMgr.AthViews__ViewDataVerifier("muFastViewDataVerifier") + ViewVerify.DataObjects = [('xAOD::L2StandAloneMuonContainer','StoreGateSvc+MuonL2SAInfo')] + viewAlgs.append(ViewVerify) + + + +### Used the algorithms as Step1 "muFast step" ### +if TriggerFlags.doMuon: + ### Load data from Muon detectors ### + import MuonRecExample.MuonRecStandaloneOnlySetup + from MuonCombinedRecExample.MuonCombinedRecFlags import muonCombinedRecFlags + muonRecFlags.doTrackPerformance = True + muonRecFlags.TrackPerfSummaryLevel = 2 + muonRecFlags.TrackPerfDebugLevel = 5 + muonRecFlags.doCSCs = True + muonRecFlags.doNSWNewThirdChain = False + muonCombinedRecFlags.doCaloTrkMuId = False + muonCombinedRecFlags.printSummary = False + from RecExConfig.RecFlags import rec + from AthenaCommon.AlgSequence import AthSequencer + from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm + + if doL2SA: + l2MuViewNode = seqAND("l2MuViewNode") + #l2MuViewNode = AthSequencer("l2MuViewNode", Sequential=False, ModeOR=False, StopOverride=False) + l2MuViewsMaker = EventViewCreatorAlgorithm("l2MuViewsMaker", OutputLevel=DEBUG) + l2MuViewsMaker.ViewFallThrough = True + +# l2MuViewsMaker.InputMakerInputDecisions = ["MURoIDecisions"] +# l2MuViewsMaker.InputMakerOutputDecisions = ["MURoIDecisionsOutput"] + l2MuViewsMaker.RoIsLink = "initialRoI" # -||- + l2MuViewsMaker.InViewRoIs = "MURoIs" # contract with the consumer + l2MuViewsMaker.Views = "MUViewRoIs" + l2MuViewsMaker.ViewNodeName = l2MuViewNode.name() + + if doEFSA: + + efMuViewNode = AthSequencer("efMuViewNode", Sequential=False, ModeOR=False, StopOverride=False) + efMuViewsMaker = EventViewCreatorAlgorithm("efMuViewsMaker", OutputLevel=DEBUG) + efMuViewsMaker.ViewFallThrough = True + + efMuViewsMaker.InputMakerInputDecisions = ["MURoIDecisions"] + efMuViewsMaker.InputMakerOutputDecisions = ["MURoIDecisionsOutputEF"] + efMuViewsMaker.RoIsLink = "initialRoI" # -||- + efMuViewsMaker.InViewRoIs = "MURoIs" # contract with the consumer + efMuViewsMaker.Views = "EFMUViewRoIs" + efMuViewsMaker.ViewNodeName = efMuViewNode.name() + + if doEFSA or doL2SA: + ### ==================== Data prepartion needed for the EF and L2 SA #######################333 + ### CSC RDO data ### + if muonRecFlags.doCSCs(): + from MuonCSC_CnvTools.MuonCSC_CnvToolsConf import Muon__CscROD_Decoder + CSCRodDecoder = Muon__CscROD_Decoder(name = "CSCRodDecoder", + IsCosmics = False, + IsOldCosmics = False, + OutputLevel = INFO ) + ToolSvc += CSCRodDecoder + + from MuonCSC_CnvTools.MuonCSC_CnvToolsConf import Muon__CSC_RawDataProviderTool + MuonCscRawDataProviderTool = Muon__CSC_RawDataProviderTool(name = "MuonCscRawDataProviderTool", + Decoder = ToolSvc.CSCRodDecoder, + OutputLevel = INFO ) + ToolSvc += MuonCscRawDataProviderTool + + from MuonCSC_CnvTools.MuonCSC_CnvToolsConf import Muon__CscRdoToCscPrepDataTool + CscRdoToCscPrepDataTool = Muon__CscRdoToCscPrepDataTool(name = "CscRdoToPrepDataTool", + OutputLevel = INFO, + RawDataProviderTool = MuonCscRawDataProviderTool, + useBStoRdoTool = True) + ToolSvc += CscRdoToCscPrepDataTool + + from MuonRdoToPrepData.MuonRdoToPrepDataConf import CscRdoToCscPrepData + CscRdoToCscPrepData = CscRdoToCscPrepData(name = "CscRdoToCscPrepDataProvider", + CscRdoToCscPrepDataTool = CscRdoToCscPrepDataTool, + PrintPrepData = False, + OutputLevel = INFO) + CscRdoToCscPrepData.DoSeededDecoding = True + CscRdoToCscPrepData.RoIs = "MURoIs" + + from MuonByteStream.MuonByteStreamConf import Muon__CscRawDataProvider + CscRawDataProvider = Muon__CscRawDataProvider(name = "CscRawDataProvider", + ProviderTool = MuonCscRawDataProviderTool, + OutputLevel = INFO) + + from CscClusterization.CscClusterizationConf import CscThresholdClusterBuilderTool + CscClusterBuilderTool = CscThresholdClusterBuilderTool(name = "CscThesholdClusterBuilderTool", + OutputLevel = INFO) + ToolSvc += CscClusterBuilderTool + + #CSC cluster building + from CscClusterization.CscClusterizationConf import CscThresholdClusterBuilder + CscClusterBuilder = CscThresholdClusterBuilder(name = "CscThesholdClusterBuilder", + OutputLevel = INFO, + cluster_builder = CscClusterBuilderTool) + + if doEFSA: + efMuViewNode += CscRdoToCscPrepData + efMuViewNode += CscClusterBuilder + if doL2SA: + l2MuViewNode += CscRawDataProvider + + ### MDT RDO data ### + if muonRecFlags.doMDTs(): + from MuonMDT_CnvTools.MuonMDT_CnvToolsConf import MdtROD_Decoder + MDTRodDecoder = MdtROD_Decoder(name = "MDTRodDecoder", + OutputLevel = INFO ) + ToolSvc += MDTRodDecoder + + from MuonMDT_CnvTools.MuonMDT_CnvToolsConf import Muon__MDT_RawDataProviderTool + MuonMdtRawDataProviderTool = Muon__MDT_RawDataProviderTool(name = "MuonMdtRawDataProviderTool", + Decoder = ToolSvc.MDTRodDecoder, + OutputLevel = INFO ) + ToolSvc += MuonMdtRawDataProviderTool + + from MuonMDT_CnvTools.MuonMDT_CnvToolsConf import Muon__MdtRdoToPrepDataTool + MdtRdoToMdtPrepDataTool = Muon__MdtRdoToPrepDataTool(name = "MdtRdoToPrepDataTool", + OutputLevel = INFO, + RawDataProviderTool = MuonMdtRawDataProviderTool, + useBStoRdoTool = True) + ToolSvc += MdtRdoToMdtPrepDataTool + + from MuonRdoToPrepData.MuonRdoToPrepDataConf import MdtRdoToMdtPrepData + MdtRdoToMdtPrepData = MdtRdoToMdtPrepData(name = "MdtRdoToMdtPrepDataProvider", + DecodingTool = MdtRdoToMdtPrepDataTool, + PrintPrepData = False, + OutputLevel = INFO) + MdtRdoToMdtPrepData.DoSeededDecoding = True + MdtRdoToMdtPrepData.RoIs = "MURoIs" + + from MuonByteStream.MuonByteStreamConf import Muon__MdtRawDataProvider + MdtRawDataProvider = Muon__MdtRawDataProvider(name = "MdtRawDataProvider", + ProviderTool = MuonMdtRawDataProviderTool, + OutputLevel = INFO) + if doEFSA: + efMuViewNode += MdtRdoToMdtPrepData + if doL2SA: + l2MuViewNode += MdtRawDataProvider + + ### RPC RDO data ### + if muonRecFlags.doRPCs(): + from MuonRPC_CnvTools.MuonRPC_CnvToolsConf import Muon__RpcROD_Decoder + RPCRodDecoder = Muon__RpcROD_Decoder(name = "RPCRodDecoder", + OutputLevel = INFO ) + ToolSvc += RPCRodDecoder + + from MuonRPC_CnvTools.MuonRPC_CnvToolsConf import Muon__RPC_RawDataProviderTool + MuonRpcRawDataProviderTool = Muon__RPC_RawDataProviderTool(name = "MuonRpcRawDataProviderTool", + Decoder = RPCRodDecoder ) + ToolSvc += MuonRpcRawDataProviderTool + + from MuonRPC_CnvTools.MuonRPC_CnvToolsConf import Muon__RpcRdoToPrepDataTool + RpcRdoToRpcPrepDataTool = Muon__RpcRdoToPrepDataTool(name = "RpcRdoToPrepDataTool", + OutputLevel = INFO, + RawDataProviderTool = MuonRpcRawDataProviderTool, + useBStoRdoTool = True) + ToolSvc += RpcRdoToRpcPrepDataTool + + from MuonRdoToPrepData.MuonRdoToPrepDataConf import RpcRdoToRpcPrepData + RpcRdoToRpcPrepData = RpcRdoToRpcPrepData(name = "RpcRdoToRpcPrepDataProvider", + DecodingTool = RpcRdoToRpcPrepDataTool, + PrintPrepData = False, + OutputLevel = INFO) + RpcRdoToRpcPrepData.DoSeededDecoding = True + RpcRdoToRpcPrepData.RoIs = "MURoIs" + + from MuonByteStream.MuonByteStreamConf import Muon__RpcRawDataProvider + RpcRawDataProvider = Muon__RpcRawDataProvider(name = "RpcRawDataProvider", + ProviderTool = MuonRpcRawDataProviderTool, + OutputLevel = INFO) + if doEFSA: + efMuViewNode += RpcRdoToRpcPrepData + if doL2SA: + l2MuViewNode += RpcRawDataProvider + + ### TGC RDO data ### + if muonRecFlags.doTGCs(): + from MuonTGC_CnvTools.MuonTGC_CnvToolsConf import Muon__TGC_RodDecoderReadout + TGCRodDecoder = Muon__TGC_RodDecoderReadout(name = "TGCRodDecoder", + OutputLevel = INFO ) + ToolSvc += TGCRodDecoder + + from MuonTGC_CnvTools.MuonTGC_CnvToolsConf import Muon__TGC_RawDataProviderTool + MuonTgcRawDataProviderTool = Muon__TGC_RawDataProviderTool(name = "MuonTgcRawDataProviderTool", + Decoder = TGCRodDecoder ) + ToolSvc += MuonTgcRawDataProviderTool + + from MuonTGC_CnvTools.MuonTGC_CnvToolsConf import Muon__TgcRdoToPrepDataTool + TgcRdoToTgcPrepDataTool = Muon__TgcRdoToPrepDataTool(name = "TgcRdoToPrepDataTool", + OutputLevel = INFO, + RawDataProviderTool = MuonTgcRawDataProviderTool, + useBStoRdoTool = True) + + ToolSvc += TgcRdoToTgcPrepDataTool + + from MuonRdoToPrepData.MuonRdoToPrepDataConf import TgcRdoToTgcPrepData + TgcRdoToTgcPrepData = TgcRdoToTgcPrepData(name = "TgcRdoToTgcPrepDataProvider", + DecodingTool = TgcRdoToTgcPrepDataTool, + PrintPrepData = False, + OutputLevel = INFO) + TgcRdoToTgcPrepData.DoSeededDecoding = True + TgcRdoToTgcPrepData.RoIs = "MURoIs" + + + from MuonByteStream.MuonByteStreamConf import Muon__TgcRawDataProvider + TgcRawDataProvider = Muon__TgcRawDataProvider(name = "TgcRawDataProvider", + ProviderTool = MuonTgcRawDataProviderTool, + OutputLevel = INFO) + if doEFSA: + efMuViewNode += TgcRdoToTgcPrepData + if doL2SA: + l2MuViewNode += TgcRawDataProvider + + + #Run clustering + if muonRecFlags.doCreateClusters(): + from MuonClusterization.MuonClusterizationConf import MuonClusterizationTool + MuonClusterTool = MuonClusterizationTool(name = "MuonClusterizationTool", + OutputLevel = INFO) + ToolSvc += MuonClusterTool + + from MuonClusterization.MuonClusterizationConf import MuonClusterizationAlg + MuonClusterAlg = MuonClusterizationAlg(name = "MuonClusterizationAlg", + OutputLevel = INFO, + ClusterTool = MuonClusterTool, + TgcPrepDataContainer = "TGC_MeasurementsAllBCs") + + if doEFSA: + efMuViewNode += MuonClusterAlg + + + ### muon thresholds ### + testChains = ["HLT_mu6", "HLT_2mu6"] + + ### set up L1RoIsFilter ### + from DecisionHandling.DecisionHandlingConf import RoRSeqFilter, DumpDecisions + filterL1RoIsAlg = RoRSeqFilter("filterL1RoIsAlg") + filterL1RoIsAlg.Input = ["MURoIDecisions"] + filterL1RoIsAlg.Output = ["FilteredMURoIDecisions"] + filterL1RoIsAlg.Chains = testChains + filterL1RoIsAlg.OutputLevel = DEBUG + + +# =============================================================================================== +# Setup L2MuonSA +# =============================================================================================== + + if doL2SA: + ### set up MuFastSteering ### + from TrigL2MuonSA.TrigL2MuonSAConfig import TrigL2MuonSAMTConfig + muFastAlg = TrigL2MuonSAMTConfig("Muon") + muFastAlg.OutputLevel = DEBUG + + svcMgr.ToolSvc.TrigDataAccess.ApplyOffsetCorrection = False + + l2MuViewNode += muFastAlg + + muFastAlg.MuRoIs = l2MuViewsMaker.InViewRoIs + muFastAlg.RecMuonRoI = "RecMURoIs" + muFastAlg.MuonL2SAInfo = "MuonL2SAInfo" + muFastAlg.MuonCalibrationStream = "MuonCalibrationStream" + muFastAlg.forID = "forID" + muFastAlg.forMS = "forMS" + + # set up MuFastHypo + from TrigMuonHypo.TrigMuonHypoConfig import TrigMufastHypoConfig + trigMufastHypo = TrigMufastHypoConfig("L2MufastHypoAlg") + +# from TrigMuonHypo.TrigMuonHypoConf import TrigMufastHypoAlg +# trigMufastHypo = TrigMufastHypoAlg("L2MufastHypoAlg") + trigMufastHypo.OutputLevel = DEBUG + + #trigMufastHypo.ViewRoIs = l2MuViewsMaker.Views + trigMufastHypo.MuonL2SAInfoFromMuFastAlg = muFastAlg.MuonL2SAInfo + #trigMufastHypo.RoIs = l2MuViewsMaker.InViewRoIs + #trigMufastHypo.Decisions = "L2MuonFastDecisions" + #trigMufastHypo.L1Decisions = l2MuViewsMaker.InputMakerInputDecisions[0] + + #trigMufastHypo.HypoTools = [ trigMufastHypo.TrigMufastHypoToolFromName( "L2MufastHypoTool", c ) for c in testChains ] + +# muFastDecisionsDumper = DumpDecisions("muFastDecisionsDumper", OutputLevel=DEBUG, Decisions = trigMufastHypo.Decisions ) + l2muFastSequence = seqAND("l2muFastSequence", [ l2MuViewsMaker, l2MuViewNode ]) + + l2muFast_HLTSequence = HLTRecoSequence("l2muFast_HLTSequence", + Sequence=l2muFastSequence, + Maker=l2MuViewsMaker, + Seed="L1MU") + + muFastStep = MenuSequence("muFastStep", + recoSeqList=[l2muFast_HLTSequence], + Hypo=trigMufastHypo, + HypoToolClassName="TrigMufastHypoToolConf") + + + + #muFastStep = stepSeq("muFastStep", filterL1RoIsAlg, [ l2muFastSequence, muFastDecisionsDumper ] ) + + +# =============================================================================================== +# Setup muComb +# =============================================================================================== + + if doL2CB: + ### RoRSeqFilter step2 ### + filterL2SAAlg = RoRSeqFilter("filterL2SAAlg") + filterL2SAAlg.Input = [trigMufastHypo.Decisions] + filterL2SAAlg.Output = ["Filtered"+trigMufastHypo.Decisions] + filterL2SAAlg.Chains = testChains + filterL2SAAlg.OutputLevel = DEBUG + + l2muCombViewNode = AthSequencer("l2muCombViewNode", Sequential=False, ModeOR=False, StopOverride=False) + l2muCombViewsMaker = EventViewCreatorAlgorithm("l2muCombViewsMaker", OutputLevel=DEBUG) + l2muCombViewsMaker.ViewFallThrough = True + + l2muCombViewsMaker.InputMakerInputDecisions = [ filterL2SAAlg.Output[0] ] # Output of TrigMufastHypo + l2muCombViewsMaker.InputMakerOutputDecisions = [ filterL2SAAlg.Output[0]+"Comb" ] # Output of TrigMufastHypo + l2muCombViewsMaker.RoIsLink = "roi" # -||- + l2muCombViewsMaker.InViewRoIs = "MUTrkRoIs" # contract with the consumer + l2muCombViewsMaker.Views = "MUTrkViewRoIs" + l2muCombViewsMaker.ViewNodeName = l2muCombViewNode.name() + + ### Define input data of Inner Detector algorithms ### + ### and Define EventViewNodes to run the algprithms ### + TrackParticlesName = "" + for viewAlg in viewAlgs: + l2muCombViewNode += viewAlg + if viewAlg.properties().has_key("RoIs"): + viewAlg.RoIs = l2muCombViewsMaker.InViewRoIs + if viewAlg.properties().has_key("roiCollectionName"): + viewAlg.roiCollectionName = l2muCombViewsMaker.InViewRoIs + if viewAlg.name() == "InDetTrigTrackParticleCreatorAlg": + TrackParticlesName = viewAlg.TrackParticlesName + viewAlg.TrackName = theFTF.TracksName + + ### please read out TrigmuCombMTConfig file ### + ### and set up to run muCombMT algorithm ### + from TrigmuComb.TrigmuCombMTConfig import TrigmuCombMTConfig + muCombAlg = TrigmuCombMTConfig("Muon", theFTF.getName()) + muCombAlg.OutputLevel = DEBUG + muCombAlg.L2StandAloneMuonContainerName = muFastAlg.MuonL2SAInfo + muCombAlg.TrackParticlesContainerName = TrackParticlesName + muCombAlg.L2CombinedMuonContainerName = "MuonL2CBInfo" + + l2muCombViewNode += muCombAlg + + ### set up muCombHypo algorithm ### + from TrigMuonHypo.TrigMuonHypoConfig import TrigmuCombHypoConfig + trigmuCombHypo = TrigmuCombHypoConfig("L2muCombHypoAlg") + trigmuCombHypo.OutputLevel = DEBUG + + trigmuCombHypo.Decisions = "MuonL2CBDecisions" + trigmuCombHypo.L2MuonFastDecisions = trigMufastHypo.Decisions + trigmuCombHypo.ViewRoIs = l2muCombViewsMaker.Views + trigmuCombHypo.MuonL2CBInfoFromMuCombAlg = muCombAlg.L2CombinedMuonContainerName + + trigmuCombHypo.HypoTools = [ trigmuCombHypo.TrigmuCombHypoToolFromName( "L2muCombHypoTool", c ) for c in testChains ] + + muCombDecisionsDumper = DumpDecisions("muCombDecisionsDumper", OutputLevel=DEBUG, Decisions = trigmuCombHypo.Decisions ) + + ### Define a Sequence to run for muComb ### + l2muCombSequence = seqAND("l2muCombSequence", eventAlgs + [l2muCombViewsMaker, l2muCombViewNode, trigmuCombHypo ] ) + muCombStep = stepSeq("muCombStep", filterL2SAAlg, [ l2muCombSequence, muCombDecisionsDumper ] ) + + +# =============================================================================================== +# Setup EFMuonSA +# =============================================================================================== + + if doEFSA: + ### RoRSeqFilter step2 ### + filterEFSAAlg = RoRSeqFilter("filterEFSAAlg") + filterEFSAAlg.Input = [trigmuCombHypo.Decisions] + filterEFSAAlg.Output = ["Filtered"+trigmuCombHypo.Decisions] + filterEFSAAlg.Chains = testChains + filterEFSAAlg.OutputLevel = DEBUG + + from TrkDetDescrSvc.TrkDetDescrSvcConf import Trk__TrackingVolumesSvc + ServiceMgr += Trk__TrackingVolumesSvc("TrackingVolumesSvc",BuildVolumesFromTagInfo = False) + + theSegmentFinder = CfgGetter.getPublicToolClone("MuonSegmentFinder","MooSegmentFinder") + theSegmentFinder.DoSummary=True + CfgGetter.getPublicTool("MuonLayerHoughTool").DoTruth=False + theSegmentFinderAlg=CfgMgr.MooSegmentFinderAlg( "MuonSegmentMaker", + SegmentFinder=theSegmentFinder, + MuonSegmentOutputLocation = "MooreSegments", + UseCSC = muonRecFlags.doCSCs(), + UseMDT = muonRecFlags.doMDTs(), + UseRPC = muonRecFlags.doRPCs(), + UseTGC = muonRecFlags.doTGCs(), + doClusterTruth=False, + UseTGCPriorBC = False, + UseTGCNextBC = False, + doTGCClust = muonRecFlags.doTGCClusterSegmentFinding(), + doRPCClust = muonRecFlags.doRPCClusterSegmentFinding(), OutputLevel=DEBUG ) + + + + theNCBSegmentFinderAlg=CfgMgr.MooSegmentFinderAlg( "MuonSegmentMaker_NCB", + SegmentFinder = getPublicToolClone("MooSegmentFinder_NCB","MuonSegmentFinder", + DoSummary=False, + Csc2dSegmentMaker = getPublicToolClone("Csc2dSegmentMaker_NCB","Csc2dSegmentMaker", + segmentTool = getPublicToolClone("CscSegmentUtilTool_NCB", + "CscSegmentUtilTool", + TightenChi2 = False, + IPconstraint=False)), + Csc4dSegmentMaker = getPublicToolClone("Csc4dSegmentMaker_NCB","Csc4dSegmentMaker", + segmentTool = getPublicTool("CscSegmentUtilTool_NCB")), + DoMdtSegments=False,DoSegmentCombinations=False,DoSegmentCombinationCleaning=False), + MuonPatternCombinationLocation = "NCB_MuonHoughPatternCombinations", + MuonSegmentOutputLocation = "NCB_MuonSegments", + MuonSegmentCombinationOutputLocation = "NCB_MooreSegmentCombinations", + UseCSC = muonRecFlags.doCSCs(), + UseMDT = False, + UseRPC = False, + UseTGC = False, + UseTGCPriorBC = False, + UseTGCNextBC = False, + doTGCClust = False, + doRPCClust = False) + + from MuonRecExample.MuonStandalone import MuonTrackSteering + MuonTrackSteering.DoSummary=True + MuonTrackSteering.DoSummary=DEBUG + TrackBuilder = CfgMgr.MuPatTrackBuilder("MuPatTrackBuilder" ) + TrackBuilder.TrackSteering=CfgGetter.getPublicToolClone("MuonTrackSteering", "MuonTrackSteering") + + from AthenaCommon.Include import include + include("InDetBeamSpotService/BeamCondSvc.py" ) + from xAODTrackingCnv.xAODTrackingCnvConf import xAODMaker__TrackParticleCnvAlg, xAODMaker__TrackCollectionCnvTool, xAODMaker__RecTrackParticleContainerCnvTool + + muonParticleCreatorTool = getPublicTool("MuonParticleCreatorTool") + + muonTrackCollectionCnvTool = xAODMaker__TrackCollectionCnvTool( name = "MuonTrackCollectionCnvTool", TrackParticleCreator = muonParticleCreatorTool ) + + muonRecTrackParticleContainerCnvTool = xAODMaker__RecTrackParticleContainerCnvTool(name = "MuonRecTrackParticleContainerCnvTool", TrackParticleCreator = muonParticleCreatorTool ) + + xAODTrackParticleCnvAlg = xAODMaker__TrackParticleCnvAlg( name = "MuonStandaloneTrackParticleCnvAlg", + TrackParticleCreator = muonParticleCreatorTool, + TrackCollectionCnvTool=muonTrackCollectionCnvTool, + RecTrackParticleContainerCnvTool = muonRecTrackParticleContainerCnvTool, + TrackContainerName = "MuonSpectrometerTracks", + xAODTrackParticlesFromTracksContainerName = "MuonSpectrometerTrackParticles", + ConvertTrackParticles = False, + ConvertTracks = True) + + + thetrkbuilder = getPublicToolClone("CombinedMuonTrackBuilder_SA", "CombinedMuonTrackBuilder", MuonHoleRecovery="", CaloMaterialProvider='TMEF_TrkMaterialProviderTool') + + theCandidateTool = getPublicToolClone("MuonCandidateTool_SA", "MuonCandidateTool", TrackBuilder=thetrkbuilder) + theMuonCandidateAlg=CfgMgr.MuonCombinedMuonCandidateAlg("MuonCandidateAlg",MuonCandidateTool=theCandidateTool) + + + thecreatortool= getPublicToolClone("MuonCreatorTool_SA", "MuonCreatorTool", ScatteringAngleTool="", CaloMaterialProvider='TMEF_TrkMaterialProviderTool', MuonSelectionTool="", FillTimingInformation=False, OutputLevel=DEBUG) + + themuoncreatoralg = CfgMgr.MuonCreatorAlg("MuonCreatorAlg") + themuoncreatoralg.MuonCreatorTool=thecreatortool + themuoncreatoralg.CreateSAmuons=True + themuoncreatoralg.ClusterContainerName="" + + #Algorithms to views + efMuViewNode += theSegmentFinderAlg +# efMuViewNode += theNCBSegmentFinderAlg #The configuration still needs some sorting out for this so disabled for now. + efMuViewNode += TrackBuilder + efMuViewNode += xAODTrackParticleCnvAlg + efMuViewNode += theMuonCandidateAlg + efMuViewNode += themuoncreatoralg + + #Setup MS-only hypo + from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFMSonlyHypoConfig + trigMuonEFSAHypo = TrigMuonEFMSonlyHypoConfig("MuonEFSAHypoAlg") + trigMuonEFSAHypo.OutputLevel = DEBUG + + trigMuonEFSAHypo.ViewRoIs = efMuViewsMaker.Views + trigMuonEFSAHypo.MuonDecisions = "Muons" + trigMuonEFSAHypo.RoIs = efMuViewsMaker.InViewRoIs + trigMuonEFSAHypo.Decisions = "EFMuonSADecisions" + trigMuonEFSAHypo.L1Decisions = efMuViewsMaker.InputMakerInputDecisions[0] + + trigMuonEFSAHypo.HypoTools = [ trigMuonEFSAHypo.TrigMuonEFMSonlyHypoToolFromName( "TrigMuonEFMSonlyHypoTool", c ) for c in testChains ] + + muonEFSADecisionsDumper = DumpDecisions("muonEFSADecisionsDumper", OutputLevel=DEBUG, Decisions = trigMuonEFSAHypo.Decisions ) + muonEFSAStep = seqAND("muonEFSAStep", [filterEFSAAlg, efMuViewsMaker, efMuViewNode, trigMuonEFSAHypo, muonEFSADecisionsDumper]) + + +# =============================================================================================== +# Setup CF(Control Flow) +# =============================================================================================== + + ### CF construction ### + +oldstuff=False +newstuff=True + +if TriggerFlags.doMuon==True and newstuff: + ########################################## + # menu + ########################################## + + # map L1 decisions for menu + for unpack in topSequence.L1DecoderTest.roiUnpackers: + if unpack.name() is "EMRoIsUnpackingTool": + unpack.Decisions="L1EM" + if unpack.name() is "MURoIsUnpackingTool": + unpack.Decisions="L1MU" + + for unpack in topSequence.L1DecoderTest.rerunRoiUnpackers: + if unpack.name() is "EMRerunRoIsUnpackingTool": + unpack.Decisions="RerunL1EM" + unpack.SourceDecisions="L1EM" + + for unpack in topSequence.L1DecoderTest.rerunRoiUnpackers: + if unpack.name() is "EMRerunRoIsUnpackingTool": + unpack.SourceDecisions="L1EM" + if unpack.name() is "MURerunRoIsUnpackingTool": + unpack.SourceDecisions="L1MU" + + + # menu + MenuChains = [] + + + if TriggerFlags.doID==False: + if doL2SA==True and doL2CB==False and doEFSA==False: + MenuChains += [Chain(name='HLT_mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]) ])] + MenuChains += [Chain(name='HLT_2mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]) ])] + if doEFSA==True and doL2SA==False and doL2CB==False: + MenuChains += [Chain(name='HLT_mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]) ])] + elif TriggerFlags.doID==True: + if doL2SA==True and doL2CB==True and doEFSA==False: + MenuChains += [Chain(name='HLT_mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]) ])] + if doL2SA==True and doEFSA==True and doL2CB==True: + MenuChains += [Chain(name='HLT_mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]) ])] + + + + + + + ########################################## + # add summary and monitor: + ########################################## + from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg + + summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) + summary.InputDecision = "HLTChains" + summary.OutputLevel = DEBUG + + + mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) + mon.InputDecision = "HLTChains" + mon.HLTSummary = "MonitoringSummary" + mon.OutputLevel = DEBUG + + if TriggerFlags.doID==False: + if doL2SA==True and doL2CB==False and doEFSA==False: + summary.FinalDecisions = [ trigMufastHypo.HypoOutputDecisions ] + mon.FinalDecisions = [ trigMufastHypo.HypoOutputDecisions, "WhateverElse" ] + + ## step0 = parOR("step0", [ muFastStep ] ) + ## HLTsteps = seqAND("HLTsteps", [ step0, summary ] ) + ## hltTop = seqOR( "hltTop", [ HLTsteps, mon] ) + ## topSequence += hltTop + + if doEFSA==True and doL2SA==False and doL2CB==False: + summary.FinalDecisions = [ trigMuonEFSAHypo.Decisions ] + mon.FinalDecisions = [ trigMuonEFSAHypo.Decisions, "WhateverElse" ] + + ## step0 = parOR("step0", [ muonEFSAStep ] ) + ## HLTsteps = seqAND("HLTsteps", [ step0, summary ] ) + ## hltTop = seqOR( "hltTop", [ HLTsteps, mon] ) + ## topSequence += hltTop + + elif TriggerFlags.doID==True: + if doL2SA==True and doL2CB==True and doEFSA==False: + ## from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg + ## summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) + ## summary.InputDecision = "HLTChains" + summary.FinalDecisions = [ trigmuCombHypo.Decisions ] + + ## step0 = parOR("step0", [ muFastStep ] ) + ## step1 = parOR("step1", [ muCombStep ] ) + ## HLTsteps = seqAND("HLTsteps", [ step0, step1, summary ] ) + + ## mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) + ## mon.InputDecision = "HLTChains" + mon.FinalDecisions = [ trigmuCombHypo.Decisions, "WhateverElse" ] + ## mon.HLTSummary = "MonitoringSummary" + ## mon.OutputLevel = DEBUG + ## hltTop = seqOR( "hltTop", [ HLTsteps, mon] ) + + ## topSequence += hltTop + + if doL2SA==True and doEFSA==True and doL2CB==True: + # from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg + ## summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) + ## summary.InputDecision = "HLTChains" + summary.FinalDecisions = [ trigMuonEFSAHypo.Decisions ] +# summary.OutputLevel = DEBUG + ## step0 = parOR("step0", [ muFastStep ] ) + ## step1 = parOR("step1", [ muCombStep ] ) + ## step2 = parOR("step2", [ muonEFSAStep ] ) + ## HLTsteps = seqAND("HLTsteps", [ step0, step1, step2, summary ] ) + + ## mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) + ## mon.InputDecision = "HLTChains" + mon.FinalDecisions = [ trigMuonEFSAHypo.Decisions, "WhateverElse" ] +# mon.HLTSummary = "MonitoringSummary" + ## mon.OutputLevel = DEBUG + ## hltTop = seqOR( "hltTop", [ HLTsteps, mon] ) + + ## topSequence += hltTop + + + + # + + ########################################## + # CF construction + ########################################## + from AthenaCommon.CFElements import parOR, seqOR, seqAND, stepSeq + + steps = seqAND("MuMenu_HLTSteps" ) + decisionTree_From_Chains(steps, MenuChains) + steps += summary + + from TrigSteerMonitor.TrigSteerMonitorConf import TrigSignatureMoniMT + mon = TrigSignatureMoniMT() + mon.FinalDecisions = [ "ElectronL2Decisions", "MuonL2Decisions", "WhateverElse" ] + from TrigUpgradeTest.TestUtils import MenuTest + mon.ChainsList = [ x.split(":")[1] for x in MenuTest.CTPToChainMapping ] + mon.OutputLevel = DEBUG + + import AthenaPoolCnvSvc.WriteAthenaPool + from OutputStreamAthenaPool.OutputStreamAthenaPool import createOutputStream + StreamESD=createOutputStream("StreamESD","myESD.pool.root",True) + StreamESD.OutputLevel=VERBOSE + topSequence.remove( StreamESD ) + def addTC(name): + StreamESD.ItemList += [ "xAOD::TrigCompositeContainer#"+name, "xAOD::TrigCompositeAuxContainer#"+name+"Aux." ] + + from TrigOutputHandling.TrigOutputHandlingConf import HLTEDMCreator + edmCreator = HLTEDMCreator() + edmCreator.TrigCompositeContainer = [ "EgammaCaloDecisions", "ElectronL2Decisions", "MuonL2Decisions", "EMRoIDecisions", "METRoIDecisions", "MURoIDecisions", "HLTChainsResult" ] + summary.OutputTools = [ edmCreator ] + summary.OutputLevel = DEBUG + + for tc in edmCreator.TrigCompositeContainer: + addTC( tc ) + + addTC("HLTSummary") + + print "ESD file content " + print StreamESD.ItemList + + + hltTop = seqOR( "hltTop", [ steps, mon, summary, StreamESD ] ) + topSequence += hltTop + + + from AthenaCommon.AlgSequence import dumpSequence + dumpSequence(topSequence) + + ########################################## + ########################################## + +if TriggerFlags.doMuon==True and oldstuff: + from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg + if doL2SA==True and doL2CB==False and doEFSA==False: + summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) + summary.InputDecision = "HLTChains" + summary.FinalDecisions = [ trigMufastHypo.Decisions ] + summary.OutputLevel = DEBUG + step0 = parOR("step0", [ muFastStep ] ) + HLTsteps = seqAND("HLTsteps", [ step0, summary ] ) + + mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) + mon.InputDecision = "HLTChains" + mon.FinalDecisions = [ trigMufastHypo.Decisions, "WhateverElse" ] + mon.HLTSummary = "MonitoringSummary" + mon.OutputLevel = DEBUG + hltTop = seqOR( "hltTop", [ HLTsteps, mon] ) + + topSequence += hltTop + + if doEFSA==True and doL2SA==False and doL2CB==False: + summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) + summary.InputDecision = "HLTChains" + summary.FinalDecisions = [ trigMuonEFSAHypo.Decisions ] + summary.OutputLevel = DEBUG + step0 = parOR("step0", [ muonEFSAStep ] ) + HLTsteps = seqAND("HLTsteps", [ step0, summary ] ) + + mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) + mon.InputDecision = "HLTChains" + mon.FinalDecisions = [ trigMuonEFSAHypo.Decisions, "WhateverElse" ] + mon.HLTSummary = "MonitoringSummary" + mon.OutputLevel = DEBUG + hltTop = seqOR( "hltTop", [ HLTsteps, mon] ) + topSequence += hltTop + +if TriggerFlags.doMuon==True and TriggerFlags.doID==True and oldstuff: + if doL2SA==True and doL2CB==True and doEFSA==False: + from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg + summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) + summary.InputDecision = "HLTChains" + summary.FinalDecisions = [ trigmuCombHypo.Decisions ] + summary.OutputLevel = DEBUG + step0 = parOR("step0", [ muFastStep ] ) + step1 = parOR("step1", [ muCombStep ] ) + HLTsteps = seqAND("HLTsteps", [ step0, step1, summary ] ) + + mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) + mon.InputDecision = "HLTChains" + mon.FinalDecisions = [ trigmuCombHypo.Decisions, "WhateverElse" ] + mon.HLTSummary = "MonitoringSummary" + mon.OutputLevel = DEBUG + hltTop = seqOR( "hltTop", [ HLTsteps, mon] ) + + topSequence += hltTop + +if TriggerFlags.doMuon==True and TriggerFlags.doID==True and oldstuff: + if doL2SA==True and doEFSA==True and doL2CB==True: + from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg + summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) + summary.InputDecision = "HLTChains" + summary.FinalDecisions = [ trigMuonEFSAHypo.Decisions ] + summary.OutputLevel = DEBUG + step0 = parOR("step0", [ muFastStep ] ) + step1 = parOR("step1", [ muCombStep ] ) + step2 = parOR("step2", [ muonEFSAStep ] ) + HLTsteps = seqAND("HLTsteps", [ step0, step1, step2, summary ] ) + + mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) + mon.InputDecision = "HLTChains" + mon.FinalDecisions = [ trigMuonEFSAHypo.Decisions, "WhateverElse" ] + mon.HLTSummary = "MonitoringSummary" + mon.OutputLevel = DEBUG + hltTop = seqOR( "hltTop", [ HLTsteps, mon] ) + + topSequence += hltTop + + +def TMEF_TrkMaterialProviderTool(name='TMEF_TrkMaterialProviderTool',**kwargs): + from TrkMaterialProvider.TrkMaterialProviderConf import Trk__TrkMaterialProviderTool + kwargs.setdefault("UseCaloEnergyMeasurement", False) + return Trk__TrkMaterialProviderTool(name,**kwargs) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py index 1051ebb0edad..4fea9dbb6335 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py @@ -52,6 +52,8 @@ ServiceMgr.StoreGateSvc.Dump=True ### for Control Flow ### from AthenaCommon.CFElements import parOR, seqAND, seqOR, stepSeq +from DecisionHandling.DecisionHandlingConf import RoRSeqFilter, DumpDecisions + from AthenaCommon.AlgScheduler import AlgScheduler AlgScheduler.CheckDependencies( True ) @@ -67,6 +69,12 @@ doL2SA=True doL2CB=True doEFSA=True +#TriggerFlags.doID=False + + ### muon thresholds ### +testChains = ["HLT_mu6", "HLT_2mu6"] + + # =============================================================================================== # Setup PrepData @@ -111,23 +119,14 @@ if TriggerFlags.doMuon: from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm if doL2SA: - l2MuViewNode = AthSequencer("l2MuViewNode", Sequential=False, ModeOR=False, StopOverride=False) - l2MuViewsMaker = EventViewCreatorAlgorithm("l2MuViewsMaker", OutputLevel=DEBUG) - l2MuViewsMaker.ViewFallThrough = True - - l2MuViewsMaker.InputMakerInputDecisions = ["MURoIDecisions"] - l2MuViewsMaker.InputMakerOutputDecisions = ["MURoIDecisionsOutput"] - l2MuViewsMaker.RoIsLink = "initialRoI" # -||- - l2MuViewsMaker.InViewRoIs = "MURoIs" # contract with the consumer - l2MuViewsMaker.Views = "MUViewRoIs" - l2MuViewsMaker.ViewNodeName = l2MuViewNode.name() - + l2MuViewNode = seqAND("l2MuViewNode") + if doEFSA: - efMuViewNode = AthSequencer("efMuViewNode", Sequential=False, ModeOR=False, StopOverride=False) + efMuViewNode = seqAND("efMuViewNode") efMuViewsMaker = EventViewCreatorAlgorithm("efMuViewsMaker", OutputLevel=DEBUG) efMuViewsMaker.ViewFallThrough = True - + # probably wrong input to the EVMaker efMuViewsMaker.InputMakerInputDecisions = ["MURoIDecisions"] efMuViewsMaker.InputMakerOutputDecisions = ["MURoIDecisionsOutputEF"] efMuViewsMaker.RoIsLink = "initialRoI" # -||- @@ -318,16 +317,7 @@ if TriggerFlags.doMuon: efMuViewNode += MuonClusterAlg - ### muon thresholds ### - testChains = ["HLT_mu6", "HLT_2mu6"] - - ### set up L1RoIsFilter ### - from DecisionHandling.DecisionHandlingConf import RoRSeqFilter, DumpDecisions - filterL1RoIsAlg = RoRSeqFilter("filterL1RoIsAlg") - filterL1RoIsAlg.Input = ["MURoIDecisions"] - filterL1RoIsAlg.Output = ["FilteredMURoIDecisions"] - filterL1RoIsAlg.Chains = testChains - filterL1RoIsAlg.OutputLevel = DEBUG + # =============================================================================================== @@ -335,38 +325,52 @@ if TriggerFlags.doMuon: # =============================================================================================== if doL2SA: + + svcMgr.ToolSvc.TrigDataAccess.ApplyOffsetCorrection = False + + ### set up L1RoIsFilter ### + filterL1RoIsAlg = RoRSeqFilter("filterL1RoIsAlg") + filterL1RoIsAlg.Input = ["MURoIDecisions"] + filterL1RoIsAlg.Output = ["FilteredMURoIDecisions"] + filterL1RoIsAlg.Chains = testChains + filterL1RoIsAlg.OutputLevel = DEBUG + + # set the EVCreator + l2MuViewsMaker = EventViewCreatorAlgorithm("l2MuViewsMaker", OutputLevel=DEBUG) + l2MuViewsMaker.ViewFallThrough = True + l2MuViewsMaker.InputMakerInputDecisions = filterL1RoIsAlg.Output + l2MuViewsMaker.InputMakerOutputDecisions = ["MURoIDecisionsOutput"] + l2MuViewsMaker.RoIsLink = "initialRoI" # -||- + l2MuViewsMaker.InViewRoIs = "MURoIs" # contract with the consumer + l2MuViewsMaker.Views = "MUViewRoIs" + l2MuViewsMaker.ViewNodeName = l2MuViewNode.name() + ### set up MuFastSteering ### from TrigL2MuonSA.TrigL2MuonSAConfig import TrigL2MuonSAMTConfig muFastAlg = TrigL2MuonSAMTConfig("Muon") muFastAlg.OutputLevel = DEBUG - - svcMgr.ToolSvc.TrigDataAccess.ApplyOffsetCorrection = False - - l2MuViewNode += muFastAlg - muFastAlg.MuRoIs = l2MuViewsMaker.InViewRoIs muFastAlg.RecMuonRoI = "RecMURoIs" muFastAlg.MuonL2SAInfo = "MuonL2SAInfo" muFastAlg.MuonCalibrationStream = "MuonCalibrationStream" muFastAlg.forID = "forID" muFastAlg.forMS = "forMS" - + l2MuViewNode += muFastAlg + # set up MuFastHypo from TrigMuonHypo.TrigMuonHypoConfig import TrigMufastHypoConfig trigMufastHypo = TrigMufastHypoConfig("L2MufastHypoAlg") trigMufastHypo.OutputLevel = DEBUG - - trigMufastHypo.ViewRoIs = l2MuViewsMaker.Views trigMufastHypo.MuonL2SAInfoFromMuFastAlg = muFastAlg.MuonL2SAInfo - trigMufastHypo.RoIs = l2MuViewsMaker.InViewRoIs - trigMufastHypo.Decisions = "L2MuonFastDecisions" - trigMufastHypo.L1Decisions = l2MuViewsMaker.InputMakerInputDecisions[0] - + trigMufastHypo.HypoOutputDecisions = "L2MuonFastDecisions" + trigMufastHypo.HypoInputDecisions = l2MuViewsMaker.InputMakerOutputDecisions[0] trigMufastHypo.HypoTools = [ trigMufastHypo.TrigMufastHypoToolFromName( "L2MufastHypoTool", c ) for c in testChains ] - muFastDecisionsDumper = DumpDecisions("muFastDecisionsDumper", OutputLevel=DEBUG, Decisions = trigMufastHypo.Decisions ) - l2muFastSequence = seqAND("l2muFastSequence", [ l2MuViewsMaker, l2MuViewNode, trigMufastHypo ]) + # set the dumper + muFastDecisionsDumper = DumpDecisions("muFastDecisionsDumper", OutputLevel=DEBUG, Decisions = trigMufastHypo.HypoOutputDecisions ) + # make sequences + l2muFastSequence = seqAND("l2muFastSequence", [ l2MuViewsMaker, l2MuViewNode, trigMufastHypo ]) muFastStep = stepSeq("muFastStep", filterL1RoIsAlg, [ l2muFastSequence, muFastDecisionsDumper ] ) @@ -377,8 +381,8 @@ if TriggerFlags.doMuon: if doL2CB: ### RoRSeqFilter step2 ### filterL2SAAlg = RoRSeqFilter("filterL2SAAlg") - filterL2SAAlg.Input = [trigMufastHypo.Decisions] - filterL2SAAlg.Output = ["Filtered"+trigMufastHypo.Decisions] + filterL2SAAlg.Input = [trigMufastHypo.HypoOutputDecisions] + filterL2SAAlg.Output = ["Filtered"+trigMufastHypo.HypoOutputDecisions] filterL2SAAlg.Chains = testChains filterL2SAAlg.OutputLevel = DEBUG @@ -423,7 +427,7 @@ if TriggerFlags.doMuon: trigmuCombHypo.OutputLevel = DEBUG trigmuCombHypo.Decisions = "MuonL2CBDecisions" - trigmuCombHypo.L2MuonFastDecisions = trigMufastHypo.Decisions + trigmuCombHypo.L2MuonFastDecisions = trigMufastHypo.HypoOutputDecisions trigmuCombHypo.ViewRoIs = l2muCombViewsMaker.Views trigmuCombHypo.MuonL2CBInfoFromMuCombAlg = muCombAlg.L2CombinedMuonContainerName @@ -566,14 +570,14 @@ if TriggerFlags.doMuon==True: if doL2SA==True and doL2CB==False and doEFSA==False: summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) summary.InputDecision = "HLTChains" - summary.FinalDecisions = [ trigMufastHypo.Decisions ] + summary.FinalDecisions = [ trigMufastHypo.HypoOutputDecisions ] summary.OutputLevel = DEBUG step0 = parOR("step0", [ muFastStep ] ) HLTsteps = seqAND("HLTsteps", [ step0, summary ] ) mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) mon.InputDecision = "HLTChains" - mon.FinalDecisions = [ trigMufastHypo.Decisions, "WhateverElse" ] + mon.FinalDecisions = [ trigMufastHypo.HypoOutputDecisions, "WhateverElse" ] mon.HLTSummary = "MonitoringSummary" mon.OutputLevel = DEBUG hltTop = seqOR( "hltTop", [ HLTsteps, mon] ) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_menu.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_menu.sh new file mode 100755 index 000000000000..7905bab775f2 --- /dev/null +++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_menu.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# art-type: build +# art-ci: master + +### BSfile ### +athena --threads=1 --skipEvents=10 --evtMax=20 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/mu.menu.py +### RDOfile ### +#athena --threads=1 -c 'EvtMax=50;FilesInput="/afs/cern.ch/user/s/shhayash/workspace/public/RDOfile/ttbar/RDO_TRIG.root"' TrigUpgradeTest/mu.withViews.py -- GitLab From 05a4666fdf52aab36d309551361f72c9e3a12602 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Fri, 1 Jun 2018 09:17:20 +0200 Subject: [PATCH 020/562] Enforce the same keys for in view and out of view Former-commit-id: e54265f9349dbc3ba0ed0d54dbd2d2a7479ddf06 --- .../TrigOutputHandling/src/HLTEDMCreator.cxx | 8 +++++-- .../TrigUpgradeTest/share/egamma.withViews.py | 22 +++++++++---------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx index c42366a29ec3..a1b6fda0b919 100644 --- a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx +++ b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx @@ -25,8 +25,12 @@ StatusCode HLTEDMCreator::initHandles( const HandlesGroup<T>& handles ) { CHECK( handles.in.size() == 0 ); } else { // the case with views, we want to store from many views into a single output container - CHECK( handles.in.size() == handles.views.size() ); - CHECK( handles.out.size() == 1 ); + CHECK( handles.out.size() == 1 ); // one output collection + CHECK( handles.in.size() == handles.views.size() ); + for ( int i = 0; i < handles.in.size(); ++i ) { + CHECK( handles.in.at(i).key() == handles.out.at(i).key() ); + } + } return StatusCode::SUCCESS; } diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py index fa831a22340a..fd1ac1f18978 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py @@ -45,7 +45,7 @@ topSequence.L1DecoderTest.prescaler.Prescales = ["HLT_e3_etcut:2", "HLT_2e3_etcu from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import T2CaloEgamma_FastAlgo theFastCaloAlgo=T2CaloEgamma_FastAlgo("FastCaloAlgo" ) theFastCaloAlgo.OutputLevel=VERBOSE -theFastCaloAlgo.ClustersName="L2CaloClusters" +theFastCaloAlgo.ClustersName="HLT_xAOD__TrigEMClusterContainer_L2CaloClusters" #"L2CaloClusters" svcMgr.ToolSvc.TrigDataAccess.ApplyOffsetCorrection=False @@ -69,7 +69,7 @@ def createFastCaloSequence(rerun=False): #clusterMaker=T2CaloEgamma_FastAlgo(__prefix+"FastClusterMaker" ) clusterMaker=T2CaloEgamma_FastAlgo( "FastClusterMaker" ) clusterMaker.OutputLevel=VERBOSE - clusterMaker.ClustersName="L2CaloClusters" + clusterMaker.ClustersName = theFastCaloAlgo.ClustersName svcMgr.ToolSvc.TrigDataAccess.ApplyOffsetCorrection=False fastCaloInViewAlgs = seqAND( __prefix+"fastCaloInViewAlgs", [ clusterMaker ]) @@ -125,21 +125,21 @@ viewAlgs.append(theFTF) # A simple algorithm to confirm that data has been inherited from parent view # Required to satisfy data dependencies ViewVerify = CfgMgr.AthViews__ViewDataVerifier("electronViewDataVerifier") -ViewVerify.DataObjects = [('xAOD::TrigEMClusterContainer','StoreGateSvc+L2CaloClusters')] +ViewVerify.DataObjects = [('xAOD::TrigEMClusterContainer','StoreGateSvc+'+theFastCaloAlgo.ClustersName)] ViewVerify.OutputLevel = DEBUG viewAlgs.append(ViewVerify) -TrackParticlesName = "" +TrackParticlesName = "HLT_xAOD_TrackParticleContainer_L2ElectronTracks" for viewAlg in viewAlgs: if viewAlg.name() == "InDetTrigTrackParticleCreatorAlg": - TrackParticlesName = viewAlg.TrackParticlesName + viewAlg.TrackParticlesName = TrackParticlesName from TrigEgammaHypo.TrigL2ElectronFexMTConfig import L2ElectronFex_1 theElectronFex= L2ElectronFex_1() theElectronFex.TrigEMClusterName = theFastCaloAlgo.ClustersName theElectronFex.TrackParticlesName = TrackParticlesName -theElectronFex.ElectronsName="Electrons" +theElectronFex.ElectronsName= "HLT_xAOD__TrigElectronContainer_L2ElectronFex" #"Electrons" theElectronFex.OutputLevel=VERBOSE @@ -222,17 +222,17 @@ edmCreator.TrigCompositeContainer = [ "EgammaCaloDecisions", "ElectronL2Decision egammaViewsMerger = HLTEDMCreator("egammaViewsMerger") egammaViewsMerger.TrackParticleContainerViews = [ l2ElectronViewsMaker.Views ] -egammaViewsMerger.TrackParticleContainerInViews = [ "xAODTracks" ] -egammaViewsMerger.TrackParticleContainer = ["HLT_xAOD_TrackParticleContainer_L2ElectronTracks"] +egammaViewsMerger.TrackParticleContainerInViews = [ TrackParticlesName ] +egammaViewsMerger.TrackParticleContainer = [ TrackParticlesName ] # this merging directive causes the issue egammaViewsMerger.TrigElectronContainerViews = [ l2ElectronViewsMaker.Views ] egammaViewsMerger.TrigElectronContainerInViews = [ theElectronFex.ElectronsName ] -egammaViewsMerger.TrigElectronContainer = ["HLT_xAOD__TrigElectronContainer_L2ElectronFex"] +egammaViewsMerger.TrigElectronContainer = [ theElectronFex.ElectronsName ] egammaViewsMerger.TrigEMClusterContainerViews = [ "EMCaloViews" ] -egammaViewsMerger.TrigEMClusterContainerInViews = [ "L2CaloClusters" ] -egammaViewsMerger.TrigEMClusterContainer = ["HLT_xAOD__TrigEMClusterContainer_L2CaloClusters"] +egammaViewsMerger.TrigEMClusterContainerInViews = [ theFastCaloAlgo.ClustersName ] +egammaViewsMerger.TrigEMClusterContainer = [ theFastCaloAlgo.ClustersName ] egammaViewsMerger.OutputLevel = VERBOSE -- GitLab From f9fddd4836783b3a4ed7a2e75128c06f8ad98b64 Mon Sep 17 00:00:00 2001 From: Peter Hansen <hansenph@lxplus066.cern.ch> Date: Fri, 1 Jun 2018 15:14:47 +0200 Subject: [PATCH 021/562] bring InDetRecConditionsAccess and InDetTrigConfigConditions up to date Former-commit-id: 9ac15371b7b8ad7f52e8a984ffa35db0f1be4f55 --- .../share/InDetRecConditionsAccess.py | 2 -- .../python/InDetTrigConfigConditions.py | 21 +++++++------------ 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py index 661706e66422..0fa9b733a78e 100644 --- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py @@ -409,8 +409,6 @@ if DetFlags.haveRIO.TRT_on(): # Calibration DB Service from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_CalDbSvc InDetTRTCalDbSvc = TRT_CalDbSvc() - InDetTRTCalDbSvc.ErrorReadKeyName = TRTErrorsFolder - InDetTRTCalDbSvc.SlopeReadKeyName = TRTSlopesFolder ServiceMgr += InDetTRTCalDbSvc if(InDetFlags.doPrintConfigurables()): print InDetTRTCalDbSvc diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py index aa0abb6a17ca..2e195bbfbdc2 100644 --- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py +++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py @@ -542,18 +542,14 @@ class TRTConditionsServicesSetup: if not (conddb.folderRequested('/TRT/Onl/ROD/Compress')): conddb.addFolder("TRT_ONL","/TRT/Onl/ROD/Compress") - if not conddb.folderRequested('/TRT/Calib/RT'): - conddb.addFolderSplitOnline("TRT","/TRT/Onl/Calib/RT","/TRT/Calib/RT",className='TRTCond::RtRelationMultChanContainer') - - if not conddb.folderRequested('/TRT/Calib/T0'): - conddb.addFolderSplitOnline("TRT","/TRT/Onl/Calib/T0","/TRT/Calib/T0",className='TRTCond::StrawT0MultChanContainer') - - if not conddb.folderRequested('/TRT/Calib/errors2d'): - TRTErrorsFolder = conddb.addFolderSplitOnline ("TRT","/TRT/Onl/Calib/errors2d","/TRT/Calib/errors2d",className='TRTCond::RtRelationMultChanContainer') - - if not conddb.folderRequested('/TRT/Calib/slopes'): - TRTSlopesFolder = conddb.addFolderSplitOnline ("TRT","/TRT/Onl/Calib/slopes","/TRT/Calib/slopes",className='TRTCond::RtRelationMultChanContainer') + if not (conddb.folderRequested('/TRT/Calib/RT') or conddb.folderRequested('/TRT/Onl/Calib/RT')): + conddb.addFolderSplitOnline('TRT','/TRT/Onl/Calib/RT','/TRT/Calib/RT',className='TRTCond::RtRelationMultChanContainer') + if not (conddb.folderRequested('/TRT/Calib/T0') or conddb.folderRequested('/TRT/Onl/Calib/T0')): + conddb.addFolderSplitOnline('TRT','/TRT/Onl/Calib/T0','/TRT/Calib/T0',className='TRTCond::StrawT0MultChanContainer') + if not (conddb.folderRequested('/TRT/Calib/errors') or conddb.folderRequested('/TRT/Onl/Calib/errors')): + conddb.addFolderSplitOnline ("TRT","/TRT/Onl/Calib/errors","/TRT/Calib/errors",className='TRTCond::RtRelationMultChanContainer') + # not needed anymore conddb.addOverride('/TRT/Onl/Calib/errors','TrtCalibErrorsOnl-ErrorVal-00-00') if not (conddb.folderRequested('/TRT/Calib/ToTCalib') or conddb.folderRequested('/TRT/Onl/Calib/ToTCalib')): conddb.addFolderSplitOnline("TRT","/TRT/Onl/Calib/ToTCalib","/TRT/Calib/ToTCalib") @@ -564,13 +560,12 @@ class TRTConditionsServicesSetup: # Calibration DB Service from AthenaCommon.AppMgr import ServiceMgr from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_CalDbSvc - + #InDetTRTCalDbSvc = TRT_CalDbSvc(self.instanceName('TRT_CalDbSvc')) # InDetTRTCalDbSvc = TRT_CalDbSvc('TRT_CalDbSvc') ServiceMgr += InDetTRTCalDbSvc if self._print: print InDetTRTCalDbSvc - # Dead/Noisy Straw Lists if not conddb.folderRequested('/TRT/Cond/Status'): conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/Status","/TRT/Cond/Status",className='TRTCond::StrawStatusMultChanContainer') -- GitLab From 5542e5399098d3edfc2b888284167cc1a463d1a3 Mon Sep 17 00:00:00 2001 From: Batool Safarzadeh Samani <safarzad@lxplus058.cern.ch> Date: Fri, 1 Jun 2018 15:54:06 +0200 Subject: [PATCH 022/562] replace vectorSG::View* by ViewContainer Former-commit-id: 0d57845d12f93a80a8262e601bcde1dce3bc8830 --- .../TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.cxx index 95a0572b50a4..a7390176200b 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.cxx @@ -7,6 +7,7 @@ + using TrigCompositeUtils::DecisionContainer; using TrigCompositeUtils::DecisionAuxContainer; using TrigCompositeUtils::DecisionIDContainer; @@ -69,12 +70,15 @@ StatusCode TrigL2PhotonHypoAlgMT::execute_r( const EventContext& context ) const std::vector<TrigL2PhotonHypoTool::PhotonInfo> hypoToolInput; for ( auto previousDecision: *previousDecisionsHandle ) { - // get View - auto viewEL = previousDecision->objectLink<std::vector<SG::View*>>( "view" ); + + auto viewEL = previousDecision->objectLink< ViewContainer >( "view" ); CHECK( viewEL.isValid() ); const SG::View* view_const = *viewEL; SG::View* view = const_cast<SG::View*>(view_const); // CHECK THIS! + // get View + + // get electron from that view: size_t photonCounter = 0; auto photonsHandle = SG::makeHandle( m_photonsKey, context ); -- GitLab From 1d2c9158d475ccc20407afda8c57bb2b7b7f32ae Mon Sep 17 00:00:00 2001 From: Francesca Pastore <francesca.pastore@cern.ch> Date: Fri, 1 Jun 2018 17:16:00 +0200 Subject: [PATCH 023/562] updated to ViewContainer Former-commit-id: 1b299723413e787f4877569b0e3a8f8a6e733356 --- Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoAlg.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoAlg.cxx b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoAlg.cxx index 6ab977bae785..bd684370d59a 100755 --- a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoAlg.cxx +++ b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoAlg.cxx @@ -80,8 +80,9 @@ StatusCode TrigMufastHypoAlg::execute_r( const EventContext& context ) const const TrigRoiDescriptor* roi = *roiEL; // get View - auto viewEL = previousDecision->objectLink<std::vector<SG::View*>>( "view" ); + auto viewEL = previousDecision->objectLink< ViewContainer >( "view" ); CHECK( viewEL.isValid() ); + const SG::View* view_const = *viewEL; SG::View* view = const_cast<SG::View*>(view_const); // CHECK THIS! @@ -96,7 +97,6 @@ StatusCode TrigMufastHypoAlg::execute_r( const EventContext& context ) const auto d = newDecisionIn( decisions.get() ); // push_back to toolInput - toolInput.emplace_back( d, roi, fast, previousDecision ); { -- GitLab From cb33fbdba43c2d6df0a9a9499aa39818fd1c181d Mon Sep 17 00:00:00 2001 From: John Baines <john.baines@cern.ch> Date: Fri, 1 Jun 2018 18:03:39 +0200 Subject: [PATCH 024/562] add MT versions of TrigCaloCellMaker TrigCaloClusterMaker TrigCaloTowerMaker Former-commit-id: 3870bd1d2499573f14d06bee55af59fa6e313c1c --- .../TrigCaloRec/python/TrigCaloRecConfig.py | 857 ++++++++++++++++++ .../TrigCaloRec/src/TrigCaloCellMakerMT.cxx | 368 ++++++++ .../TrigCaloRec/src/TrigCaloCellMakerMT.h | 142 +++ .../src/TrigCaloClusterMakerMT.cxx | 368 ++++++++ .../TrigCaloRec/src/TrigCaloClusterMakerMT.h | 102 +++ .../TrigCaloRec/src/TrigCaloTowerMakerMT.cxx | 290 ++++++ .../TrigCaloRec/src/TrigCaloTowerMakerMT.h | 103 +++ .../src/components/TrigCaloRec_entries.cxx | 9 + 8 files changed, 2239 insertions(+) create mode 100755 Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloCellMakerMT.cxx create mode 100755 Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloCellMakerMT.h create mode 100644 Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloClusterMakerMT.cxx create mode 100644 Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloClusterMakerMT.h create mode 100644 Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloTowerMakerMT.cxx create mode 100644 Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloTowerMakerMT.h diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py b/Trigger/TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py index d6bfbee4de76..21105c6173cb 100755 --- a/Trigger/TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py +++ b/Trigger/TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py @@ -1,5 +1,8 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +from TrigCaloRec.TrigCaloRecConf import TrigCaloClusterMakerMT +from TrigCaloRec.TrigCaloRecConf import TrigCaloTowerMakerMT +from TrigCaloRec.TrigCaloRecConf import TrigCaloCellMakerMT from TrigCaloRec.TrigCaloRecConf import TrigCaloCellMaker from TrigCaloRec.TrigCaloRecConf import TrigFullCaloCellMaker from TrigCaloRec.TrigCaloRecConf import TrigCaloTowerMaker @@ -503,6 +506,8 @@ class TrigCaloTowerMaker_jet (TrigCaloTowerMakerBase): tilecmbtwrbldr = TileTowerBuilderTool("TileCmbTwrBldr", CellContainerName = "RoIEMCalo", + DumpTowers = FALSE, + DumpWeightMap = FALSE ) #tilecmbtwrbldr.CellContainerName = "RoIEMCalo" #tilecmbtwrbldr.DumpTowers = FALSE @@ -1127,3 +1132,855 @@ def SLW_Clustering(): algseq = [TrigCaloCellMaker_eGamma(), TrigCaloTowerMaker_eGamma(), TrigCaloClusterMaker_slw()] return [te_in, algseq, te_out] + + +# MT clases + + +class TrigCaloCellMakerMTBase (TrigCaloCellMakerMT): + __slots__ = [] + def __init__(self, name): + super( TrigCaloCellMakerMTBase, self ).__init__(name) + + # cellvalidation = TrigCaloCellMakerValidationMonitoring() +# cellonline = TrigCaloCellMakerOnlineMonitoring() +# cellcosmic = TrigCaloCellMakerCosmicMonitoring() + +# celltime = TrigTimeHistToolConfig("TrigCaloCellMaker_Time") + +# self.AthenaMonTools = [ cellvalidation, cellonline, celltime, cellcosmic] + + + + +class TrigCaloCellMakerFCalMTBase (TrigCaloCellMakerMT): + __slots__ = [] + def __init__(self, name): + super( TrigCaloCellMakerFCalMTBase, self ).__init__(name) + +# cellvalidation = TrigCaloCellMakerFCalValidationMonitoring() +# cellonline = TrigCaloCellMakerOnlineMonitoring() +# cellcosmic = TrigCaloCellMakerCosmicMonitoring() + +# celltime = TrigTimeHistToolConfig("TrigCaloCellMaker_Time") + +# self.AthenaMonTools = [ cellvalidation, cellonline, celltime, cellcosmic] + +# use the TrigCaloCellMaker as base class, yet +# use the fullcalo monitoring + +class TrigFullCaloCellMakerMTFCalBase (TrigCaloCellMakerMT): + __slots__ = [] + def __init__(self, name): + super( TrigFullCaloCellMakerMTFCalBase, self ).__init__(name) + +# cellvalidation = TrigFullCaloCellMakerValidationMonitoring() +# cellonline = TrigFullCaloCellMakerOnlineMonitoring() +# cellcosmic = TrigFullCaloCellMakerCosmicMonitoring() + +# celltime = TrigTimeHistToolConfig("TrigFullCaloCellMaker_Time") + +# self.AthenaMonTools = [ cellvalidation, cellonline, celltime, cellcosmic] + + + + +class TrigCaloTowerMakerMTBase (TrigCaloTowerMakerMT): + __slots__ = [] + def __init__(self, name): + super( TrigCaloTowerMakerMTBase, self ).__init__(name) + +# towervalidation = TrigCaloTowerMakerValidationMonitoring() +# toweronline = TrigCaloTowerMakerOnlineMonitoring() + # towercosmic = TrigCaloTowerMakerCosmicMonitoring() + +# towertime = TrigTimeHistToolConfig("TrigCaloTowerMaker_Time") + # towertime.TimerPerObjHistLimits = [0,1000] + # towertime.TimerHistLimits = [0,1000] + # towertime.TimerHistLimits = [0,40] + +# self.AthenaMonTools = [ towervalidation, toweronline, towertime, towercosmic] + + +class TrigCaloClusterMakerMTBase (TrigCaloClusterMakerMT): + __slots__ = [] + def __init__(self, name): + super( TrigCaloClusterMakerMTBase, self ).__init__(name) + + # clvalidation = TrigCaloClusterMakerValidationMonitoring() + # clonline = TrigCaloClusterMakerOnlineMonitoring() + # clcosmic = TrigCaloClusterMakerCosmicMonitoring() + + # cltime = TrigTimeHistToolConfig("TrigCaloClusterMaker_Time") + +# self.AthenaMonTools = [ clvalidation, clonline, cltime, clcosmic] + + +class TrigCaloCellMakerMT_eGamma (TrigCaloCellMakerMTBase): + __slots__ = [] + def __init__ (self, name='TrigCaloCellMakerMT_eGamma'): + super(TrigCaloCellMakerMT_eGamma, self).__init__(name) + + self.eta_size = 16 + self.phi_size = 16 + + self.CreateRoiForID = True + self.EtaWidthForID = 0.1 + self.PhiWidthForID = 0.1 + + from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault + theCaloNoiseTool=CaloNoiseToolDefault() + from AthenaCommon.AppMgr import ToolSvc + ToolSvc+=theCaloNoiseTool + + roilaremcellcontmaker = RoILArEMCellContMaker() + roilaremcellcontmaker.CaloNoiseTool = theCaloNoiseTool + roilarhadcellcontmaker = RoILArHadCellContMaker() + roilarhadcellcontmaker.CaloNoiseTool = theCaloNoiseTool + roilaremcellcontmaker.DoLArCellsNoiseSuppression = 0 + roilarhadcellcontmaker.DoLArCellsNoiseSuppression = 0 + + roitilehadcellcontmaker = RoITileCellContMaker() + roitilehadcellcontmaker.CaloNoiseTool = theCaloNoiseTool + + + self.ContainerTools = [] + self.ContainerTools = [CaloCellContainerCorrectorTool("LArCellCorrectorTool").getFullName(), + CaloCellContainerFinalizerTool().getFullName(), + CaloCellContainerCheckerTool().getFullName()] + + +class TrigCaloCellMakerMT_jet (TrigCaloCellMakerFCalMTBase): + __slots__ = [] + def __init__ (self, name='TrigCaloCellMakerMT_jet', eta_size=64, phi_size=64, doNoise=1, AbsE = False): + super(TrigCaloCellMaker_jet, self).__init__(name) + + self.eta_size = eta_size + self.phi_size = phi_size + + from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault + theCaloNoiseTool=CaloNoiseToolDefault() + from AthenaCommon.AppMgr import ToolSvc + ToolSvc+=theCaloNoiseTool + + roilaremcellcontmaker = RoILArEMCellContMaker() + roilaremcellcontmaker.CaloNoiseTool = theCaloNoiseTool + roilarhadcellcontmaker = RoILArHadCellContMaker() + roilarhadcellcontmaker.CaloNoiseTool = theCaloNoiseTool + roifcalemcellcontmaker = RoIFCalEmCellContMaker() + roifcalemcellcontmaker.CaloNoiseTool = theCaloNoiseTool + roifcalhadcellcontmaker = RoIFCalHadCellContMaker() + roifcalhadcellcontmaker.CaloNoiseTool = theCaloNoiseTool + + roilaremcellcontmaker.DoLArCellsNoiseSuppression = doNoise + roilaremcellcontmaker.AbsEinSigma = AbsE + roilarhadcellcontmaker.DoLArCellsNoiseSuppression = doNoise + roilarhadcellcontmaker.AbsEinSigma = AbsE + roifcalemcellcontmaker.DoLArCellsNoiseSuppression = doNoise + roifcalhadcellcontmaker.DoLArCellsNoiseSuppression = doNoise + roitilehadcellcontmaker = RoITileCellContMaker() + roitilehadcellcontmaker.CaloNoiseTool = theCaloNoiseTool + + self.ContainerTools = [CaloCellContainerCorrectorTool("LArCellCorrectorTool").getFullName(), + CaloCellContainerFinalizerTool().getFullName(), + CaloCellContainerCheckerTool().getFullName()] + + #self.OutputLevel=INFO + + +class TrigCaloCellMakerMT_super (TrigCaloCellMakerMT_jet): + __slots__ = [] + def __init__ (self, name='TrigCaloCellMakerMT_super', eta_size=64, phi_size=64, doNoise=1, AbsE = False): + super(TrigCaloCellMaker_super, self).__init__(name) + self.TrustRoiLimits = True + + +class TrigCaloCellMakerMT_jet_super (TrigCaloCellMakerFCalMTBase): + __slots__ = [] + def __init__ (self, name='TrigCaloCellMakerMT_jet_super', eta_size=64, phi_size=64, doNoise=1, AbsE = False): + super(TrigCaloCellMaker_jet_super, self).__init__(name) + + self.TrustRoiLimits = True + + from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault + theCaloNoiseTool=CaloNoiseToolDefault() + from AthenaCommon.AppMgr import ToolSvc + ToolSvc+=theCaloNoiseTool + + roilaremcellcontmaker = RoILArEMCellContMaker() + roilaremcellcontmaker.CaloNoiseTool = theCaloNoiseTool + roilarhadcellcontmaker = RoILArHadCellContMaker() + roilarhadcellcontmaker.CaloNoiseTool = theCaloNoiseTool + roifcalemcellcontmaker = RoIFCalEmCellContMaker() + roifcalemcellcontmaker.CaloNoiseTool = theCaloNoiseTool + roifcalhadcellcontmaker = RoIFCalHadCellContMaker() + roifcalhadcellcontmaker.CaloNoiseTool = theCaloNoiseTool + + roilaremcellcontmaker.DoLArCellsNoiseSuppression = doNoise + roilaremcellcontmaker.AbsEinSigma = AbsE + roilarhadcellcontmaker.DoLArCellsNoiseSuppression = doNoise + roilarhadcellcontmaker.AbsEinSigma = AbsE + roifcalemcellcontmaker.DoLArCellsNoiseSuppression = doNoise + roifcalhadcellcontmaker.DoLArCellsNoiseSuppression = doNoise + roitilehadcellcontmaker = RoITileCellContMaker() + roitilehadcellcontmaker.CaloNoiseTool = theCaloNoiseTool + + self.ContainerTools = [CaloCellContainerCorrectorTool("LArCellCorrectorTool").getFullName(), + CaloCellContainerFinalizerTool().getFullName(), + CaloCellContainerCheckerTool().getFullName()] + + #self.OutputLevel=INFO + + + +class TrigCaloCellMakerMT_jet_fullcalo (TrigFullCaloCellMakerMTFCalBase): + __slots__ = [] + def __init__ (self, name='TrigCaloCellMakerMT_jet_fullcalo', eta_size=64, phi_size=64, doNoise=1, AbsE=False, doPers=False): + super(TrigCaloCellMakerMT_jet_fullcalo, self).__init__(name) + + + print "****JTB configuring TrigCaloCellMakerMT_jet_fullcalo" + + # these aren't actually used in this instance + # self.eta_size = eta_size + # self.phi_size = phi_size + + self.FullScanEnabled = True + + self.TrustRoiLimits = True + + from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault + theCaloNoiseTool=CaloNoiseToolDefault() + from AthenaCommon.AppMgr import ToolSvc + ToolSvc+=theCaloNoiseTool + + fullcalocellcontmaker = FullCaloCellContMaker(DoLArCellsNoiseSuppression = doNoise, AbsEinSigma = AbsE,CaloNoiseTool = theCaloNoiseTool) + + self.ContainerTools = [CaloCellContainerCorrectorTool("LArCellCorrectorTool").getFullName()] + #CaloCellContainerFinalizerTool().getFullName(), + #CaloCellContainerCheckerTool().getFullName()] + + if doPers: + self.PersistencyPrescaleFactor=1 + self.PersistencyKeyName="TrigCaloCellMaker_jet_fullcalo" + + #self.OutputLevel=INFO + + + + +class TrigCaloCellMakerMT_tau (TrigCaloCellMakerMTBase): + __slots__ = [] + def __init__ (self, name='TrigCaloCellMaker_tau'): + super(TrigCaloCellMakerMT_tau, self).__init__(name) + + self.eta_size = 32 + self.phi_size = 32 + + self.CreateRoiForID = True + self.EtaWidthForID = 0.2 + self.PhiWidthForID = 0.2 + + from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault + theCaloNoiseTool=CaloNoiseToolDefault() + from AthenaCommon.AppMgr import ToolSvc + ToolSvc+=theCaloNoiseTool + + roilaremcellcontmaker = RoILArEMCellContMaker() + roilaremcellcontmaker.CaloNoiseTool = theCaloNoiseTool + roilaremcellcontmaker.DoLArCellsNoiseSuppression = 0 + roilarhadcellcontmaker = RoILArHadCellContMaker() + roilarhadcellcontmaker.CaloNoiseTool = theCaloNoiseTool + roilarhadcellcontmaker.DoLArCellsNoiseSuppression = 0 + roitilehadcellcontmaker = RoITileCellContMaker() + roitilehadcellcontmaker.CheckCellWithinRoI = True + roitilehadcellcontmaker.CaloNoiseTool = theCaloNoiseTool + + self.ContainerTools = [CaloCellContainerCorrectorTool("LArCellCorrectorTool").getFullName(), + CaloCellContainerFinalizerTool().getFullName(), + CaloCellContainerCheckerTool().getFullName()] + +class TrigCaloCellMakerMT_tau_cells (TrigCaloCellMakerMT_tau): + __slots__ = [] + def __init__ (self, name='TrigCaloCellMakerMT_tau_cells'): + super(TrigCaloCellMakerMT_tau_cells, self).__init__(name) + + self.PersistencyPrescaleFactor=1 + self.PersistencyKeyName="TrigCaloCellMakerMT_tau" + +class TrigCaloTowerMakerMT_eGamma (TrigCaloTowerMakerMTBase): + __slots__ = [] + def __init__ (self, name='TrigCaloTowerMakerMT_eGamma'): + super(TrigCaloTowerMakerMT_eGamma, self).__init__(name) + + #input to LArTowerMBuilder: Cells in LArEM + try: + from LArRecUtils.LArRecUtilsConf import LArTowerBuilderTool + except: + mlog.error("TrigCaloTowerMaker: could not get handle to LArTowerBuilderTool. Quit") + print traceback.format_exc() + return False + + + lartowerbuilder = LArTowerBuilderTool("LArTowerBuilder", + CellContainerName = "RoIEMCalo", + IncludedCalos = [ "LAREM" ], + OutputLevel=ERROR + ) + #lartowerbuilder.CellContainerName = "RoIEMCalo" #useless + #lartowerbuilder.IncludedCalos = [ "LAREM" ] + #lartowerbuilder.OutputLevel=ERROR + self +=lartowerbuilder + self.TowerMakerTools=[ lartowerbuilder.getFullName() ] + self.NumberOfPhiTowers=256 + self.NumberOfEtaTowers=200 + self.EtaMin=-2.5 + self.EtaMax=2.5 + self.DeltaEta=0.5 + self.DeltaPhi=0.5 + + + +class TrigCaloTowerMakerMT_jet (TrigCaloTowerMakerMTBase): + __slots__ = [] + def __init__ (self, name='TrigCaloTowerMakerMT_jet'): + super(TrigCaloTowerMakerMT_jet, self).__init__(name) + + #input to TileTowerBuilder: cells in TILE + try: + from TileRecUtils.TileRecUtilsConf import TileTowerBuilderTool + except: + mlog.error("could not get handle to TileTowerBuilderTool Quit") + print traceback.format_exc() + return False + + # input to LArTowerBuilder: cells in LArEM and LARHEC + try: + from LArRecUtils.LArRecUtilsConf import LArTowerBuilderTool,LArFCalTowerBuilderTool + except: + mlog.error("TrigCaloTowerMaker: could not get handle to LArTowerBuilderTool or/and LArFCalTowerBuilderTool. Quit") + print traceback.format_exc() + return False + + + larcmbtwrbldr = LArTowerBuilderTool("LArCmbTwrBldr", + CellContainerName = "RoIEMCalo", + IncludedCalos = [ "LAREM", "LARHEC" ], + OutputLevel=ERROR + ) + + #larcmbtwrbldr.CellContainerName = "RoIEMCalo" + #larcmbtwrbldr.IncludedCalos = [ "LAREM", "LARHEC" ] + #larcmbtwrbldr.OutputLevel=ERROR + + fcalcmbtwrbldr = LArFCalTowerBuilderTool("FCalCmbTwrBldr", + CellContainerName = "RoIEMCalo", + MinimumEt = 0.*MeV, + OutputLevel=ERROR + ) + + #fcalcmbtwrbldr.CellContainerName = "RoIEMCalo" + #fcalcmbtwrbldr.MinimumEt = 0.*MeV + #fcalcmbtwrbldr.OutputLevel=ERROR + + tilecmbtwrbldr = TileTowerBuilderTool("TileCmbTwrBldr", + CellContainerName = "RoIEMCalo", + DumpTowers = FALSE, + DumpWeightMap = FALSE + ) + #tilecmbtwrbldr.CellContainerName = "RoIEMCalo" + #tilecmbtwrbldr.DumpTowers = FALSE + #tilecmbtwrbldr.DumpWeightMap = FALSE + + + self +=larcmbtwrbldr + self +=fcalcmbtwrbldr + self +=tilecmbtwrbldr + self.NumberOfPhiTowers=64 + self.NumberOfEtaTowers=100 + self.EtaMin=-5.0 + self.EtaMax=5.0 + self.DeltaEta=1.2 + self.DeltaPhi=1.2 + self.TowerMakerTools = [ tilecmbtwrbldr.getFullName(), larcmbtwrbldr.getFullName(), fcalcmbtwrbldr.getFullName() ] + + +class TrigCaloTowerMakerMT_tau (TrigCaloTowerMakerMTBase): + __slots__ = [] + def __init__ (self, name='TrigCaloTowerMakerMT_tau'): + super(TrigCaloTowerMakerMT_tau, self).__init__(name) + + #input to LArTowerMBuilder: Cells in LArEM + try: + from LArRecUtils.LArRecUtilsConf import LArTowerBuilderTool + except: + mlog.error("TrigCaloTowerMaker: could not get handle to LArTowerBuilderTool. Quit") + print traceback.format_exc() + return False + + lartowerbuilder = LArTowerBuilderTool("LArTowerBuilder", + CellContainerName = "RoIEMCalo", + IncludedCalos = [ "LAREM" ], + OutputLevel=ERROR + ) + + #lartowerbuilder.CellContainerName = "RoIEMCalo" + #lartowerbuilder.IncludedCalos = [ "LAREM" ] + #lartowerbuilder.OutputLevel=ERROR + + self +=lartowerbuilder + self.NumberOfPhiTowers=256 + self.NumberOfEtaTowers=200 + self.EtaMin=-2.5 + self.EtaMax=2.5 + self.DeltaEta=0.8 + self.DeltaPhi=0.8 + self.TowerMakerTools=[lartowerbuilder.getFullName()] + + +class TrigCaloClusterMakerMT_slw (TrigCaloClusterMakerMTBase): + __slots__ = [] + def __init__ (self, name='TrigCaloClusterMakerMT_slw', cells="cells", towers="calotowers"): + super(TrigCaloClusterMakerMT_slw, self).__init__(name) + + try: + from CaloRec.CaloRecMakers import make_CaloClusterBuilderSW + except: + mlog.error("TrigCaloRec: could not get handle to make_CaloClusterBuilderSW Quit") + print traceback.format_exc() + return False + + + trigslw= make_CaloClusterBuilderSW ("trigslw", + tower_container = towers, + eta_size = 3, + phi_size = 5, + #eta_sizep = 3, + #phi_sizep = 3, + e_threshold = 2.5 * GeV, + FillClusterCells = False, + #nextra = 0, + #eta_SeedGrid = 5, + #phi_SeedGrid = 5, + eta_Duplicate = 5, + phi_Duplicate = 5 + ) + trigslw .CaloCellContainer=cells + self +=trigslw + self.ClusterMakerTools=[ trigslw.getFullName() ] + + try: + from CaloClusterCorrection.CaloSwCorrections import make_CaloSwCorrections + for tool in make_CaloSwCorrections ("ele37"): + self += tool + self.ClusterCorrectionTools += [tool.getFullName()] + print " Adding tool ", tool.getFullName() + for tool in make_CaloSwCorrections ("ele55"): + self += tool + self.ClusterCorrectionTools += [tool.getFullName()] + print " Adding tool ", tool.getFullName() + except: + mlog.error("TrigCaloRec: could not get handle to CaloSwCorrections_compat Quit") + print traceback.format_exc() + return False + + + +class TrigCaloClusterMakerMT_topo (TrigCaloClusterMakerMTBase): + __slots__ = [] + def __init__ (self, name='TrigCaloClusterMakerMT_topo', cells="cells",doMoments=True, doLC=True ): + super(TrigCaloClusterMakerMT_topo, self).__init__(name) + + self.Cells=cells + + try: + from CaloUtils.CaloUtilsConf import CaloLCWeightTool, CaloLCClassificationTool, CaloLCOutOfClusterTool, CaloLCDeadMaterialTool + from CaloClusterCorrection.CaloClusterCorrectionConf import CaloClusterLocalCalib + from CaloClusterCorrection.CaloClusterBadChannelListCorr import CaloClusterBadChannelListCorr + from CaloRec.CaloRecConf import CaloTopoClusterMaker, CaloTopoClusterSplitter, CaloClusterMomentsMaker, CaloClusterMaker, CaloCell2ClusterMapper + from CaloRec.CaloTopoClusterFlags import jobproperties + from AthenaCommon.SystemOfUnits import deg + from AthenaCommon.AlgSequence import AlgSequence + from AthenaCommon.GlobalFlags import globalflags + except: + mlog.error("TrigCaloRec: could not get handle to CaloTopoClusterMaker and/or CaloTopoClusterSplitter. Quit") + print traceback.format_exc() + return False + + print jobproperties.CaloTopoClusterFlags.doTopoClusterLocalCalib() + # tools used by tools + from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault + theCaloNoiseTool=CaloNoiseToolDefault() #flag='tool', name='myCaloNoiseToolDefault') + from AthenaCommon.AppMgr import ToolSvc + ToolSvc+=theCaloNoiseTool + + if doLC: + + TrigLCClassify = CaloLCClassificationTool("TrigLCClassify") + TrigLCClassify.ClassificationKey = "EMFracClassify" + TrigLCClassify.UseSpread = False + TrigLCClassify.MaxProbability = 0.5 + TrigLCClassify.StoreClassificationProbabilityInAOD = True + + TrigLCWeight = CaloLCWeightTool("TrigLCWeight") + TrigLCWeight.CorrectionKey = "H1ClusterCellWeights" + TrigLCWeight.SignalOverNoiseCut = 2.0 + TrigLCWeight.CaloNoiseTool = theCaloNoiseTool + TrigLCWeight.UseHadProbability = True + + TrigLCOut = CaloLCOutOfClusterTool("TrigLCOut") + TrigLCOut.CorrectionKey = "OOCCorrection" + TrigLCOut.UseEmProbability = False + TrigLCOut.UseHadProbability = True + + TrigLCOutPi0 = CaloLCOutOfClusterTool("TrigLCOutPi0") + TrigLCOutPi0.CorrectionKey = "OOCPi0Correction" + TrigLCOutPi0.UseEmProbability = True + TrigLCOutPi0.UseHadProbability = False + + TrigLCDeadMaterial = CaloLCDeadMaterialTool("TrigLCDeadMaterial") + TrigLCDeadMaterial.HadDMCoeffKey = "HadDMCoeff2" + #TrigLCDeadMaterial.SignalOverNoiseCut = 1.0 + TrigLCDeadMaterial.ClusterRecoStatus = 0 + TrigLCDeadMaterial.WeightModeDM = 2 + #TrigLCDeadMaterial.CaloNoiseTool = theCaloNoiseTool + TrigLCDeadMaterial.UseHadProbability = True + + # correction tools using tools + TrigLocalCalib = CaloClusterLocalCalib ("TrigLocalCalib") + TrigLocalCalib.ClusterClassificationTool = [TrigLCClassify] + #TrigLocalCalib.ClusterRecoStatus = [2] + TrigLocalCalib.ClusterRecoStatus = [1,2] + TrigLocalCalib.LocalCalibTools = [TrigLCWeight] + + TrigLocalCalib += TrigLCClassify + TrigLocalCalib += TrigLCWeight + + TrigOOCCalib = CaloClusterLocalCalib ("TrigOOCCalib") + #TrigOOCCalib.ClusterRecoStatus = [2] + TrigOOCCalib.ClusterRecoStatus = [1,2] + TrigOOCCalib.LocalCalibTools = [TrigLCOut] + + TrigOOCCalib += TrigLCOut + + TrigOOCPi0Calib = CaloClusterLocalCalib ("TrigOOCPi0Calib") + #OOCPi0Calib.ClusterRecoStatus = [1] + TrigOOCPi0Calib.ClusterRecoStatus = [1,2] + TrigOOCPi0Calib.LocalCalibTools = [TrigLCOutPi0] + + TrigOOCPi0Calib += TrigLCOutPi0 + + + TrigDMCalib = CaloClusterLocalCalib ("TrigDMCalib") + TrigDMCalib.ClusterRecoStatus = [1,2] + TrigDMCalib.LocalCalibTools = [TrigLCDeadMaterial] + + TrigDMCalib += TrigLCDeadMaterial + + + if doMoments: + + # correction tools not using tools + TrigTopoMoments = CaloClusterMomentsMaker ("TrigTopoMoments") + TrigTopoMoments.OutputLevel = INFO + TrigTopoMoments.MaxAxisAngle = 20*deg + TrigTopoMoments.CaloNoiseTool = theCaloNoiseTool + TrigTopoMoments.TwoGaussianNoise = jobproperties.CaloTopoClusterFlags.doTwoGaussianNoise() + TrigTopoMoments.UsePileUpNoise = True + TrigTopoMoments.MinBadLArQuality = 4000 + TrigTopoMoments.MomentsNames = ["FIRST_PHI" + ,"FIRST_ETA" + ,"SECOND_R" + ,"SECOND_LAMBDA" + ,"DELTA_PHI" + ,"DELTA_THETA" + ,"DELTA_ALPHA" + ,"CENTER_X" + ,"CENTER_Y" + ,"CENTER_Z" + ,"CENTER_MAG" + ,"CENTER_LAMBDA" + ,"LATERAL" + ,"LONGITUDINAL" + ,"FIRST_ENG_DENS" + ,"ENG_FRAC_EM" + ,"ENG_FRAC_MAX" + ,"ENG_FRAC_CORE" + ,"FIRST_ENG_DENS" + ,"SECOND_ENG_DENS" + ,"ISOLATION" + ,"ENG_BAD_CELLS" + ,"N_BAD_CELLS" + ,"N_BAD_CELLS_CORR" + ,"BAD_CELLS_CORR_E" + ,"BADLARQ_FRAC" + ,"ENG_POS" + ,"SIGNIFICANCE" + ,"CELL_SIGNIFICANCE" + ,"CELL_SIG_SAMPLING" + ,"AVG_LAR_Q" + ,"AVG_TILE_Q" + ] + #TrigLockVariables = CaloClusterLockVars("TrigLockVariables") + #TrigLockVariables.FixBasicEnergy = True + #TrigLockVariables.LockedSamplingVariables = [] + #TrigLockVariables.LockedSamplingVariables += [ + # "Energy", "Max_Energy"] + #TrigLockVariables.LockedSamplingVariables += [ + # "Eta", "Phi", "Delta_Eta", + # "Delta_Phi", "Max_Eta", "Max_Phi" + # ] + + # maker tools + TrigTopoMaker = CaloTopoClusterMaker("TrigTopoMaker") + + TrigTopoMaker.CellsName = cells + TrigTopoMaker.CalorimeterNames=["LAREM", + "LARHEC", + "LARFCAL", + "TILE"] + # cells from the following samplings will be able to form + # seeds. By default no sampling is excluded + TrigTopoMaker.SeedSamplingNames = ["PreSamplerB", "EMB1", "EMB2", "EMB3", + "PreSamplerE", "EME1", "EME2", "EME3", + "HEC0", "HEC1","HEC2", "HEC3", + "TileBar0", "TileBar1", "TileBar2", + "TileExt0", "TileExt1", "TileExt2", + "TileGap1", "TileGap2", "TileGap3", + "FCAL0", "FCAL1", "FCAL2"] + + TrigTopoMaker.CaloNoiseTool=theCaloNoiseTool + TrigTopoMaker.UseCaloNoiseTool=True + TrigTopoMaker.UsePileUpNoise=True + TrigTopoMaker.NeighborOption = "super3D" + TrigTopoMaker.RestrictHECIWandFCalNeighbors = False + TrigTopoMaker.CellThresholdOnEorAbsEinSigma = 0.0 + TrigTopoMaker.NeighborThresholdOnEorAbsEinSigma = 2.0 #instead of 2 + TrigTopoMaker.SeedThresholdOnEorAbsEinSigma = 4.0 #instead of 4 + # note Et or AbsEt + #TrigTopoMaker.NeighborCutsInAbsE = False + #TrigTopoMaker.CellCutsInAbsE = False + # + # the following cut must be set to TRUE in order to make double + # sided cuts on the seed and the cluster level ( neighbor and cell + # cuts are always double sided) + # + TrigTopoMaker.SeedCutsInAbsE = True + TrigTopoMaker.ClusterEtorAbsEtCut = 0.0*MeV + # the following Et thresholds are ignored in case UsePileUpNoise + # is TRUE + # + # + #CellThresholdOnEtorAbsEt = 0.0*MeV + #NeighborThresholdOnEtorAbsEt = 100.0*MeV + #SeedThresholdOnEtorAbsEt = 200.0*MeV + + # use 2-gaussian or single gaussian noise for TileCal + TrigTopoMaker.TwoGaussianNoise = jobproperties.CaloTopoClusterFlags.doTwoGaussianNoise() + + TrigTopoSplitter = CaloTopoClusterSplitter("TrigTopoSplitter") + # cells from the following samplings will be able to form local + # maxima. The excluded samplings are PreSamplerB, EMB1, + # PreSamplerE, EME1, all Tile samplings, all HEC samplings and the + # two rear FCal samplings. + # + TrigTopoSplitter.SamplingNames = ["EMB2", "EMB3", + "EME2", "EME3", + "FCAL0"] + # cells from the following samplings will also be able to form + # local maxima but only if they are not overlapping in eta and phi + # with local maxima in previous samplings from the primary list. + # + TrigTopoSplitter.SecondarySamplingNames = ["EMB1","EME1", + "TileBar0","TileBar1","TileBar2", + "TileExt0","TileExt1","TileExt2", + "HEC0","HEC1","HEC2","HEC3", + "FCAL1","FCAL2"] + TrigTopoSplitter.ShareBorderCells = True + TrigTopoSplitter.RestrictHECIWandFCalNeighbors = False + # + # the following options are not set, since these are the default + # values + # + # NeighborOption = "super3D", + # NumberOfCellsCut = 4, + # EnergyCut = 500*MeV, + + + # cluster maker + #TrigCaloTopoCluster = CaloClusterMaker ("TrigCaloTopoCluster") + #TrigCaloTopoCluster.ClustersOutputName="CaloCalTopoCluster" + #TrigCaloTopoCluster.ClusterMakerTools = [ + + if not doMoments: + self.ClusterMakerTools = [ TrigTopoMaker.getFullName(), TrigTopoSplitter.getFullName()] + else: + self.ClusterMakerTools = [ TrigTopoMaker.getFullName(), TrigTopoSplitter.getFullName(), TrigTopoMoments.getFullName()] + + # do not use BadChannelListCorr since this is not used for jet and tau in offline + #TrigBadChannelListCorr = CaloClusterBadChannelListCorr() + #self.ClusterCorrectionTools += [TrigBadChannelListCorr.getFullName()] + + self += TrigTopoMaker + self += TrigTopoSplitter + #self += TrigBadChannelListCorr + if doMoments: + self += TrigTopoMoments + + self.ClusterCorrectionTools = [ ] + #self.ClusterCorrectionTools = [ TrigLockVariables.getFullName() ] + #self += TrigLockVariables + + if doLC: + self.ClusterCorrectionTools += [ TrigLocalCalib.getFullName(), + TrigOOCCalib.getFullName(), + TrigOOCPi0Calib.getFullName(), + TrigDMCalib.getFullName()] + self += TrigLocalCalib + self += TrigOOCCalib + self += TrigOOCPi0Calib + self += TrigDMCalib + + # + # pool/cool part + # + if doLC: + if globalflags.DetDescrVersion().startswith("Rome"): + self.TrigLocalCalib.TrigLCClassify.MaxProbability = 0.85 + self.TrigLocalCalib.TrigLCClassify.UseNormalizedEnergyDensity = False + else: + self.TrigLocalCalib.TrigLCClassify.MaxProbability = 0.50 + self.TrigLocalCalib.TrigLCClassify.UseNormalizedEnergyDensity = True + + from CaloRec import CaloClusterTopoCoolFolder + + + + +class TrigCaloClusterMakerMT_EMtopo (TrigCaloClusterMakerMTBase): + __slots__ = [] + def __init__ (self, name='TrigCaloClusterMakerMT_EMtopo'): + super(TrigCaloClusterMakerMT_EMtopo, self).__init__(name) + + try: + from CaloRec.CaloRecConf import CaloTopoClusterMaker, CaloTopoClusterSplitter, CaloClusterMomentsMaker, CaloClusterMaker, CaloCell2ClusterMapper + from CaloRec.CaloTopoClusterFlags import jobproperties + emtopocluster = CaloTopoClusterMaker("EMTrigTopoCluster") + emtoposplitter = CaloTopoClusterSplitter("EMTrigTopoSplitter") + except: + mlog.error("TrigCaloRec: could not get handle to CaloTopoClusterMaker and/or CaloTopoClusterSplitter. Quit") + print traceback.format_exc() + return False + + emtopocluster.CellsNames=["RoIEMCalo"] + emtopocluster.CalorimeterNames=[ "LAREM" ] + # + # cells from the following samplings will be able to form seeds. By default + # no sampling is excluded + # + emtopocluster.OutputLevel=VERBOSE + emtopocluster.SeedSamplingNames = [ + "PreSamplerB", "EMB1", "EMB2", + "PreSamplerE", "EME1", "EME2" ] + from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault + theCaloNoiseTool=CaloNoiseToolDefault() + from AthenaCommon.AppMgr import ToolSvc + ToolSvc+=theCaloNoiseTool + emtopocluster.CaloNoiseTool=theCaloNoiseTool + + emtopocluster.UseCaloNoiseTool=True + emtopocluster.UsePileUpNoise=False + + emtopocluster.NeighborOption = "all3D" + emtopocluster.CellThresholdOnEorAbsEinSigma = 0.0 + emtopocluster.NeighborThresholdOnEorAbsEinSigma = 2.0 + emtopocluster.SeedThresholdOnEorAbsEinSigma = 4.0 + # note E or AbsE + # + # the following cut must be set to TRUE in order to make double sided + # cuts on the seed and the cluster level ( neighbor and cell cuts are + # always double sided) + # + emtopocluster.SeedCutsInAbsE = TRUE + emtopocluster.ClusterEtorAbsEtCut = 1*GeV + # + # the following Et thresholds are ignored in case UsePileUpNoise is TRUE + # + # emtopocluster.CellThresholdOnAbsEt = 0.0*MeV + # emtopocluster.NeighborThresholdOnAbsEt = 100.0*MeV + # emtopocluster.SeedThresholdOnEtorAbsEt = 200.0*MeV # note Et or AbsEt + + + # + # cells from the following samplings will be able to form local maxima. The + # excluded samplings are PreSamplerB, EMB1, PreSamplerE, EME1, + # and all samplings from Tile, HEC and FCAL + # + emtoposplitter.OutputLevel=VERBOSE + emtoposplitter.SamplingNames = ["EMB2", "EME2"] + emtoposplitter.SecondarySamplingNames = ["EMB1", "EME1"] + emtoposplitter.ShareBorderCells = True + emtoposplitter.RestrictHECIWandFCalNeighbors = False + # the following options are not set, since these are the default values + # the following options are not set, since these are the default values + # + # emtoposplitter.NumberOfCellsCut = 4 + # emtoposplitter.EtDensityCut = 500*MeV/(600000*mm3) # this corresponds to 500 MeV in a typical EM Layer 2 cell + + + try: + from CaloRec.CaloRecConf import CaloClusterMomentsMaker + emtopomoments = CaloClusterMomentsMaker("EMTrigTopoMoments") + except: + mlog.error("TrigCaloRec: could not get handle to CaloClusterMomentsMaker. Quit") + print traceback.format_exc() + return False + + emtopomoments.OutputLevel = INFO + emtopomoments.MaxAxisAngle = 20*deg + emtopomoments.CaloNoiseTool = theCaloNoiseTool + emtopomoments.TwoGaussianNoise = jobproperties.CaloTopoClusterFlags.doTwoGaussianNoise() + emtopomoments.UsePileUpNoise = True + emtopomoments.MinBadLArQuality = 4000 + emtopomoments.MomentsNames = ["FIRST_PHI" + ,"FIRST_ETA" + ,"SECOND_R" + ,"SECOND_LAMBDA" + ,"DELTA_PHI" + ,"DELTA_THETA" + ,"DELTA_ALPHA" + ,"CENTER_X" + ,"CENTER_Y" + ,"CENTER_Z" + ,"CENTER_MAG" + ,"CENTER_LAMBDA" + ,"LATERAL" + ,"LONGITUDINAL" + ,"FIRST_ENG_DENS" + ,"ENG_FRAC_EM" + ,"ENG_FRAC_MAX" + ,"ENG_FRAC_CORE" + ,"FIRST_ENG_DENS" + ,"SECOND_ENG_DENS" + ,"ISOLATION" + ,"ENG_BAD_CELLS" + ,"N_BAD_CELLS" + ,"N_BAD_CELLS_CORR" + ,"BAD_CELLS_CORR_E" + ,"BADLARQ_FRAC" + ,"ENG_POS" + ,"SIGNIFICANCE" + ,"CELL_SIGNIFICANCE" + ,"CELL_SIG_SAMPLING" + ,"AVG_LAR_Q" + ,"AVG_TILE_Q" + ] + + self.ClusterMakerTools = [emtopocluster.getFullName(), emtoposplitter.getFullName(), emtopomoments.getFullName()] + #self.ClusterMakerTools = [emtopocluster.getFullName(), emtoposplitter.getFullName()] + #self.ClusterCorrectionTools = [ emtopomoments.getFullName() ] + self += emtopocluster + self += emtoposplitter + self += emtopomoments + + diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloCellMakerMT.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloCellMakerMT.cxx new file mode 100755 index 000000000000..11687e7dc14d --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloCellMakerMT.cxx @@ -0,0 +1,368 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// ******************************************************************** +// +// NAME: TrigCaloCellMakerMT.cxx +// PACKAGE: Trigger/TrigAlgorithms/TrigCaloRec +// +// AUTHOR: P.A. Delsart +// This is an Hlt algorithm that creates a cell container +// with calorimeter cells within an RoI. Based on Cibran +// Santamarina original TrigCaloRec +// +// ******************************************************************** +// + +#include <sstream> +// +#include "GaudiKernel/MsgStream.h" +#include "GaudiKernel/IToolSvc.h" +#include "GaudiKernel/StatusCode.h" +#include "GaudiKernel/ListItem.h" +// +#include "AthenaMonitoring/MonitoredScope.h" + +#include "TrigT1Interfaces/TrigT1Interfaces_ClassDEF.h" +#include "TrigSteeringEvent/TrigRoiDescriptor.h" +#include "TrigSteeringEvent/PhiHelper.h" +// +#include "CaloEvent/CaloCellContainer.h" +// +#include "EventKernel/INavigable4Momentum.h" +#include "NavFourMom/INavigable4MomentumCollection.h" +// +#include "CaloUtils/CaloCollectionHelper.h" + +#include "TrigCaloCellMakerMT.h" +#include "TrigCaloRec/IAlgToolEFCalo.h" +#include "TrigCaloRec/TrigCaloQuality.h" +#include "CaloInterface/ICaloCellMakerTool.h" +#include "AthContainers/ConstDataVector.h" +#include "TrigT2CaloCommon/ITrigCaloDataAccessSvc.h" + +// +class ISvcLocator; +// EM mid layer cell size. +const double TrigCaloCellMakerMT::m_detas2 = 0.025; +const double TrigCaloCellMakerMT::m_dphis2 = 0.0245436926; + + +///////////////////////////////////////////////////////////////////// +// CONSTRUCTOR: +///////////////////////////////////////////////////////////////////// + +TrigCaloCellMakerMT::TrigCaloCellMakerMT(const std::string& name, ISvcLocator* pSvcLocator) + : AthAlgorithm(name, pSvcLocator), + m_counter(0), + m_dataAccessSvc( "TrigCaloDataAccessSvc/TrigCaloDataAccessSvc", name ), + m_caloCellContainer(NULL), + m_trigCaloQuality(NULL), + m_fullScanEnabled(false), + m_trustRoiLimits(false), + m_createRoiForID(false), + m_etaWidthForID(0), + m_phiWidthForID(0) + { + + // Name of Tools to check and finalize the cell container... + declareProperty("ContainerTools",m_containerToolNames); + + // Eta and Phi size of the RoI window... + declareProperty("FullScanEnabled",m_fullScanEnabled); + declareProperty("eta_size",m_neta); + declareProperty("phi_size",m_nphi); + + /// Trust the limits encoded in the RoI already + declareProperty("TrustRoiLimits", m_trustRoiLimits=false); + + /// create an RoI for the ID trigger + declareProperty("CreateRoiForID", m_createRoiForID=false); + declareProperty("EtaWidthForID", m_etaWidthForID=0); + declareProperty("PhiWidthForID", m_phiWidthForID=0); + + +} + +///////////////////////////////////////////////////////////////////// +// DESTRUCTOR: +///////////////////////////////////////////////////////////////////// +// +TrigCaloCellMakerMT::~TrigCaloCellMakerMT() +{ } + +///////////////////////////////////////////////////////////////////// +// INITIALIZE: +// The initialize method will create all the required algorithm objects +// Note that it is NOT NSSARY to run the initialize of individual +// sub-algorithms. The framework takes care of it. +///////////////////////////////////////////////////////////////////// +// + +StatusCode TrigCaloCellMakerMT::initialize() +{ + ATH_MSG_INFO("in initialize()"); + + m_counter = 0; + + // Cache pointer to ToolSvc + IToolSvc* toolSvc = 0;// Pointer to Tool Service + if (service("ToolSvc", toolSvc).isFailure()) { + ATH_MSG_FATAL (" Tool Service not found "); + // return HLT::TOOL_FAILURE; + return StatusCode::SUCCESS; + } + if (!m_monTool.empty()) { + ATH_MSG_DEBUG("Retrieving monTool"); + CHECK(m_monTool.retrieve()); + } else { + ATH_MSG_INFO("No monTool configured => NO MONITOING"); + } + + + + CHECK( m_dataAccessSvc.retrieve() ); + + std::vector<std::string>::iterator itrName; + std::vector<std::string>::iterator endName; + + // access CellContainer tools and store them + itrName = m_containerToolNames.begin() ; + endName = m_containerToolNames.end() ; + + for (; itrName!=endName; ++itrName) { + + ListItem theItem(*itrName); + IAlgTool* algtool; + + if( toolSvc->retrieveTool(theItem.type(), theItem.name(), algtool,this).isFailure() ) { + ATH_MSG_FATAL("Unable to find tool for "); + //return HLT::TOOL_FAILURE; + return StatusCode::SUCCESS; + } else { + ATH_MSG_INFO ((*itrName) << " successfully retrieved" ); + // Save the cell container tools (only for checking purposes) in m_containerTools + m_containerTools.push_back(dynamic_cast<ICaloCellMakerTool*>(algtool) ); + } + } + // end of helpers... + + ATH_MSG_DEBUG ("Initialization of TrigCaloCellMakerMT completed successfully"); + + + if (!m_fullScanEnabled) { + ATH_MSG_DEBUG("In RoI mode"); + ATH_CHECK( m_inputRoiKey.initialize() ); + + ATH_CHECK( m_outputCaloRoiKey.initialize() ); + ATH_CHECK( m_outputIDRoiKey.initialize() ); + } else { + ATH_MSG_DEBUG("In FullScan mode"); + } + + ATH_CHECK( m_outputCellsKey.initialize() ); + ATH_CHECK( m_outputCDVcellsKey.initialize() ); + ATH_CHECK( m_outputTrigCaloQualityKey.initialize() ); + + return StatusCode::SUCCESS; +} + + +StatusCode TrigCaloCellMakerMT::finalize() +{ + ATH_MSG_DEBUG ("in finalize()"); + + return StatusCode::SUCCESS; +} + +StatusCode TrigCaloCellMakerMT::execute() +{ + using namespace Monitored; + + // Monitoring initialization... + auto timer = MonitoredTimer::declare("TIME_execute"); + auto time_tools = MonitoredTimer::declare("TIME_ContainerTools"); + auto mon_CellContainerSize = MonitoredScalar::declare("CellContainerSize", 0.); + auto mon_roi_phi = MonitoredScalar::declare("RoIPhi", 0.); + auto mon_roi_eta = MonitoredScalar::declare("RoIEta", 0.); + + auto monitorIt = MonitoredScope::declare( m_monTool, timer, time_tools, mon_roi_eta, mon_roi_phi, mon_CellContainerSize); + + // for(int id=0; id<IAlgToolEFCalo::MAXNEFCALO; id++) m_conversionError[id]=0; + + ATH_MSG_DEBUG("in execute()"); + + + auto ctx = getContext(); + ATH_MSG_DEBUG(" Make Output Handles"); + auto caloCellContainer = SG::makeHandle (m_outputCellsKey, ctx); + auto trigCaloQuality = SG::makeHandle (m_outputTrigCaloQualityKey, ctx); + + + ATH_CHECK(caloCellContainer.record (std::make_unique<CaloCellContainer>())); + ATH_CHECK(trigCaloQuality.record (std::make_unique<TrigCaloQuality>())); + + // caloCellContainer->reserve(190000); + + const TrigRoiDescriptor* roiDescriptor=nullptr; + if (!m_fullScanEnabled) { + ATH_MSG_DEBUG(" Make RoI Handles"); + auto outputCaloRoiColl = SG::makeHandle (m_outputCaloRoiKey, ctx); + + auto outputIDRoiColl = SG::makeHandle (m_outputIDRoiKey, ctx); + + ATH_CHECK( outputCaloRoiColl.record (std::make_unique<TrigRoiDescriptorCollection>())); + ATH_CHECK( outputIDRoiColl.record (std::make_unique<TrigRoiDescriptorCollection>())); + + auto roiCollection = SG::makeHandle(m_inputRoiKey, ctx); + + if (roiCollection->size()==0) { + ATH_MSG_DEBUG(" RoI collection size = 0"); + return StatusCode::SUCCESS; + } + + roiDescriptor = *(roiCollection->begin()); + if (roiCollection->size() > 1) ATH_MSG_WARNING("Misconfiguration - Called with " << roiCollection->size() << " RoI, but it should be called with 1 RoI - Will only process the first RoI"); + + mon_roi_eta=roiDescriptor->eta(); + mon_roi_phi=roiDescriptor->phi(); + + if ( !roiDescriptor->composite() ) { + if ( !m_trustRoiLimits ){ + + double eta0 = roiDescriptor->eta(); + double phi0 = HLT::wrapPhi(roiDescriptor->phi()); + + double etamin = eta0-(m_detas2*(float)m_neta)/2.; + double etamax = eta0+(m_detas2*(float)m_neta)/2.; + // What if phimin < 0 or phimax > 2Pi ?? question + double phimin = HLT::wrapPhi(phi0 - (m_dphis2*(float)m_nphi)/2.); + double phimax = HLT::wrapPhi(phi0 + (m_dphis2*(float)m_nphi)/2.); + + ATH_MSG_DEBUG(" eta0 = "<< eta0); + ATH_MSG_DEBUG("phi0 = "<< phi0); + ATH_MSG_DEBUG(" etamin = "<< etamin); + ATH_MSG_DEBUG(" etamax = "<< etamax); + ATH_MSG_DEBUG(" phimin = " << phimin); + ATH_MSG_DEBUG(" phimax = " <<phimax); + + TrigRoiDescriptor* roi = new TrigRoiDescriptor( roiDescriptor->roiWord(), roiDescriptor->l1Id(), roiDescriptor->roiId(), + eta0, etamin, etamax, phi0, phimin, phimax ); + + + ATH_MSG_DEBUG(" pusing back output Roi"); + outputCaloRoiColl->push_back(roi); + roiDescriptor = roi; + } + } + // create and attache an RoI for the ID Trigger + if (m_createRoiForID ) { + + if ( roiDescriptor->composite() ) { + msg() << MSG::WARNING << " Request to build an RoI for the ID From a composite RoiDescriptor" << *roiDescriptor << endmsg; + } + + + TrigRoiDescriptor* roi = new TrigRoiDescriptor( roiDescriptor->roiWord(), + roiDescriptor->l1Id(), + roiDescriptor->roiId(), + roiDescriptor->eta(), + roiDescriptor->eta()-m_etaWidthForID, + roiDescriptor->eta()+m_etaWidthForID, + roiDescriptor->phi(), + HLT::wrapPhi(roiDescriptor->phi()-m_phiWidthForID), + HLT::wrapPhi(roiDescriptor->phi()+m_phiWidthForID) ); + + if ( m_etaWidthForID==0 || m_phiWidthForID==0 ) { + msg() << MSG::WARNING << "ZERO width RoI requested for the ID: " << *roi << endmsg; + } + + ATH_MSG_DEBUG("REGTEST: push_back RoI for ID " << *roi); + outputIDRoiColl->push_back(roi); + } + } + + + // Creating the cells containers... + int index=0; + uint32_t error = 0; + + // if (timerSvc()) m_timer[1]->start(); + SG::WriteHandle<ConstDataVector<CaloCellContainer> > CDVcellContainer = SG::WriteHandle<ConstDataVector<CaloCellContainer> > ( m_outputCDVcellsKey, ctx ); + + auto cdv = CxxUtils::make_unique<ConstDataVector<CaloCellContainer> >(SG::VIEW_ELEMENTS); + if(m_fullScanEnabled) { + ATH_MSG_DEBUG("Getting ConstDataVector<CaloCellContainer> from " << m_dataAccessSvc.name()); + m_dataAccessSvc->loadFullCollections( ctx, *cdv ); + ATH_MSG_DEBUG("ConstDataVector<CaloCellContainer> size " << (*cdv).size()); + } else { + ATH_MSG_DEBUG("ROI etaMinus "<< roiDescriptor->etaMinus() << "ROI etaPlus "<< roiDescriptor->etaPlus() << " phiMinus "<< roiDescriptor->phiMinus() << "ROI phiPlus "<< roiDescriptor->phiPlus() ); + LArTT_Selector<LArCellCont> sel; + m_dataAccessSvc->loadCollections( ctx, *roiDescriptor, TTEM, 2, sel ); + for( const auto cell : sel ) {cdv->push_back( cell ); } + } + + // FIXME: Need to convert from the ConstDataVector<CaloCellContainer> returned by the DataAccessSvc to a CaloCellContainer needed by downstream algorithms + for ( const CaloCell* c : (*cdv)) { + CaloCell* newcell= new CaloCell(*c); + caloCellContainer->push_back(newcell); + } + + // Also record the cdv (but could probably delete it instead). + auto ss = CDVcellContainer.record( std::move(cdv) ); + ATH_CHECK( ss ); + + + + if (caloCellContainer->size() < 1) { + //return HLT::ErrorCode(HLT::Action::ABORT_CHAIN, HLT::Reason::MISSING_FEATURE); + ATH_MSG_WARNING("caloCellContainer->size() is 0"); + return StatusCode::SUCCESS; + } + + // Check conversion status + trigCaloQuality->setPersistencyFlag(false); + // trigCaloQuality->setPersistencyFlag(isPersistent); + trigCaloQuality->setPersistencyFlag(true); + trigCaloQuality->setError(error); + + // Looping over cell container tools... this could be used for calibrations... + time_tools.start(); + std::vector<ICaloCellMakerTool*> ::const_iterator itrcont=m_containerTools.begin(); + std::vector<ICaloCellMakerTool*> ::const_iterator endcont=m_containerTools.end(); + + index=0; + for (; itrcont!=endcont; ++itrcont) { + // if (timerSvc()) m_timer[2+index]->start(); + ATH_MSG_DEBUG("Executing container tool " <<(*itrcont)->name()); + if ( (*itrcont)->process(caloCellContainer.ptr()).isFailure() ) { + //msg() << MSG::ERROR << "Error executing tool " << m_containerToolNames[index] << endmsg; + ATH_MSG_ERROR("Error executing container tool " <<(*itrcont)->name()); + } +else { + ATH_MSG_DEBUG("Executed container tool "); + } + // if (timerSvc()) m_timer[2+index]->stop(); + ++index; + } + time_tools.stop(); + + if ( m_fullScanEnabled) caloCellContainer->updateCaloIterators(); + + + ATH_MSG_DEBUG(" REGTEST: Produced a Cell Container of Size= " << caloCellContainer->size() ); + + //monitoring + mon_CellContainerSize = (float)caloCellContainer->size(); + + + if (error) { + //return HLT::ErrorCode(HLT::Action::CONTINUE, HLT::Reason::USERDEF_2); + return StatusCode::SUCCESS; + } + ++m_counter; + + return StatusCode::SUCCESS; +} + diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloCellMakerMT.h b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloCellMakerMT.h new file mode 100755 index 000000000000..196f733c96af --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloCellMakerMT.h @@ -0,0 +1,142 @@ +// Hi Emacs ! this is -*- C++ -*- + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/******************************************************************** + * + * NAME: TrigCaloCellMakerMT + * PACKAGE: Trigger/TrigAlgorithms/TrigCaloRec + * + * AUTHOR: P.A. Delsart + * CREATED: August 2006 + * + *********************************************************************/ +#ifndef TRIGCALORECMT_TRIGCALOCELLMAKER_H +#define TRIGCALORECMT_TRIGCALOCELLMAKER_H + +#include "AthenaBaseComps/AthAlgorithm.h" +#include "CaloEvent/CaloCellContainer.h" +#include "TrigCaloRec/IAlgToolEFCalo.h" +#include "StoreGate/ReadHandleKey.h" +#include "StoreGate/WriteHandleKey.h" +#include "TrigSteeringEvent/TrigRoiDescriptor.h" +#include "CaloEvent/CaloCellContainer.h" +#include "TrigCaloRec/TrigCaloQuality.h" +#include "AthenaMonitoring/GenericMonitoringTool.h" + +class IAlgToolEFCalo; +class ICaloCellMakerTool; +class TrigCaloQuality; +class ITrigCaloDataAccessSvc; + +class TrigCaloCellMakerMT : public AthAlgorithm { + + public: + + /** constructor */ + TrigCaloCellMakerMT(const std::string& name, ISvcLocator* pSvcLocator); + + /** destructor */ + ~TrigCaloCellMakerMT(); + + /** HLT method to initialize */ + StatusCode initialize(); + + /** HLT method to finalize */ + StatusCode finalize(); + + /** HLT method to execute FEX algo on a given TE. + input is the Triger Element (TE) from the previous algorithm in + the configuration chain, the output is the result from the + TrigCaloCellMakerMT execution. **/ + StatusCode execute(); + + private: + + /** Calorimeter second sampling eta granularity. */ + static const double m_detas2; + + /** Calorimeter second sampling phi granularity. */ + static const double m_dphis2; + + /** RoI window size in units of EM calo 2nd sampling cells */ + int m_neta, m_nphi; + + /** Prescale factor for persistency **/ + unsigned int m_persistencyPSF; + std::string m_persistencyKey; + unsigned int m_counter; + + /** Offline Tool names for CellContainer ordering and checking. */ + std::vector<std::string> m_containerToolNames; + + /** Offline Tool pointers for CellContainer ordering and checking. */ + //ToolHandleArray<ICaloCellMakerTool> m_containerTools; // pointers to tools + std::vector<ICaloCellMakerTool*> m_containerTools; // pointers to tools + + /** Pointers to timers */ + // std::vector<TrigTimer*> m_timer; + + ServiceHandle<ITrigCaloDataAccessSvc> m_dataAccessSvc; + + SG::ReadHandleKey<TrigRoiDescriptorCollection> m_inputRoiKey{ this, + "RoIs", // property name + "rois", // default value of StoreGate key + "input RoI collection name"}; + + SG::WriteHandleKey<TrigRoiDescriptorCollection> m_outputCaloRoiKey{ this, + "OutputCaloRoi", // property name + "RoiForCalo", // default value of StoreGate key + "output Calo RoI collection name "}; + + SG::WriteHandleKey<TrigRoiDescriptorCollection> m_outputIDRoiKey{ this, + "OutputIDRoi", // property name + "RoiForID", // default value of StoreGate key + "output Calo RoI collection name "}; + + SG::WriteHandleKey<CaloCellContainer> m_outputCellsKey{ this, + "Cells", // property name + "cells", // default value of StoreGate key + "output CaloCellContainer "}; + + SG::WriteHandleKey<ConstDataVector<CaloCellContainer> > m_outputCDVcellsKey{ this, + "CVDcells", // property name + "CDVcells", // default value of StoreGate key + "output ConstDataVector<CaloCellContainer> "}; + + SG::WriteHandleKey<TrigCaloQuality> m_outputTrigCaloQualityKey{ this, + "CaloQuality", // property name + "caloquality", // default value of StoreGate key + "output TrigCaloQuality"}; + + + /** Produced Calorimeter Cell Container. */ + CaloCellContainer* m_caloCellContainer; + + + /** data preparation error */ + // unsigned int m_conversionError[6]; + TrigCaloQuality * m_trigCaloQuality; + + // double m_EtaL2, m_PhiL2; + bool m_fullScanEnabled; + + bool m_trustRoiLimits; + + bool m_createRoiForID; + + double m_etaWidthForID; + double m_phiWidthForID; + + // std::vector<uint32_t> m_vec_robs; + + ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool" }; + +//public: +// +// inline CaloCellContainer* GetCellContainer() const {return pCaloCellContainer;} + +}; +#endif diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloClusterMakerMT.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloClusterMakerMT.cxx new file mode 100644 index 000000000000..d284d1d363c9 --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloClusterMakerMT.cxx @@ -0,0 +1,368 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// ******************************************************************** +// +// NAME: TrigCaloClusterMaker.cxx +// PACKAGE: Trigger/TrigAlgorithms/TrigCaloRec +// +// AUTHOR: C. Santamarina +// This is an Hlt algorithm that creates a cell container +// with calorimeter cells within an RoI. Afterwards a cluster +// container with the clusters made with those cells is +// created with the standard offline clustering algorithms. +// +// ******************************************************************** +// +#include <sstream> + +// +#include "GaudiKernel/MsgStream.h" +#include "GaudiKernel/IToolSvc.h" +#include "GaudiKernel/ListItem.h" +#include "CaloInterface/ISetCaloCellContainerName.h" +// +#include "AthenaMonitoring/MonitoredScope.h" + +#include "TrigT1Interfaces/TrigT1Interfaces_ClassDEF.h" +// +#include "CaloEvent/CaloCellContainer.h" +// +#include "EventKernel/INavigable4Momentum.h" +#include "NavFourMom/INavigable4MomentumCollection.h" +// +#include "CaloUtils/CaloCollectionHelper.h" +// +#include "CaloUtils/CaloClusterStoreHelper.h" +// +#include "CaloRec/CaloClusterCollectionProcessor.h" +#include "CaloRec/CaloClusterProcessor.h" + +#include "CaloEvent/CaloTowerContainer.h" +// +#include "TrigCaloClusterMakerMT.h" +#include "TrigCaloRec/TrigCaloQuality.h" +//#include "TrigTimeAlgs/TrigTimerSvc.h" + +//#include "xAODCaloEvent/CaloClusterAuxContainer.h" +#include "xAODTrigCalo/CaloClusterTrigAuxContainer.h" +//#include "xAODCaloEvent/CaloClusterChangeSignalState.h" + +// +class ISvcLocator; + + +///////////////////////////////////////////////////////////////////// +// CONSTRUCTOR: +///////////////////////////////////////////////////////////////////// +// +TrigCaloClusterMakerMT::TrigCaloClusterMakerMT(const std::string& name, ISvcLocator* pSvcLocator) + : AthAlgorithm(name, pSvcLocator), + m_pCaloClusterContainer(NULL), + m_pTrigCaloQuality(NULL) +{ + + // Eta and Phi size of the RoI window... + + // Name(s) of Cluster Maker Tools + declareProperty("ClusterMakerTools",m_clusterMakerNames); + + // Name(s) of Cluster Correction Tools + declareProperty("ClusterCorrectionTools",m_clusterCorrectionNames); + + +} + +///////////////////////////////////////////////////////////////////// + // DESTRUCTOR: + ///////////////////////////////////////////////////////////////////// + // + TrigCaloClusterMakerMT::~TrigCaloClusterMakerMT() +{ } + +///////////////////////////////////////////////////////////////////// + // INITIALIZE: + // The initialize method will create all the required algorithm objects + // Note that it is NOT NECESSARY to run the initialize of individual + // sub-algorithms. The framework takes care of it. + ///////////////////////////////////////////////////////////////////// + // + + StatusCode TrigCaloClusterMakerMT::initialize() +{ + ATH_MSG_DEBUG("in TrigCaloClusterMakerMT::initialize()" ); + + if (!m_monTool.empty()) { + ATH_MSG_DEBUG("Retrieving monTool"); + CHECK(m_monTool.retrieve()); + } else { + ATH_MSG_INFO("No monTool configured => NO MONITOING"); + } + + // Cache pointer to ToolSvc + IToolSvc* toolSvc = 0;// Pointer to Tool Service + if (service("ToolSvc", toolSvc).isFailure()) { + ATH_MSG_FATAL (" Tool Service not found " ); + return StatusCode::FAILURE; + } + + std::vector<std::string>::iterator itrName; + std::vector<std::string>::iterator endName; + + for (int iC=1;iC<3;++iC){ + if (iC==1) { + itrName = m_clusterMakerNames.begin(); + endName = m_clusterMakerNames.end(); + } else if (iC==2) { + itrName = m_clusterCorrectionNames.begin(); + endName = m_clusterCorrectionNames.end(); + } + + for (; itrName!=endName; ++itrName) { + + ListItem theItem(*itrName); + IAlgTool* algtool; + + if( toolSvc->retrieveTool(theItem.type(), theItem.name(), algtool,this).isFailure() ) { + ATH_MSG_FATAL ("Unable to find tool for " << (*itrName) ); + return StatusCode::FAILURE; + } else { + ATH_MSG_DEBUG((*itrName) << " successfully retrieved" ); + if(iC==1) { + m_clusterMakerPointers.push_back(dynamic_cast<CaloClusterCollectionProcessor*>(algtool) ); + } else if (iC==2) { + m_clusterCorrectionPointers.push_back(dynamic_cast<CaloClusterProcessor*>(algtool) ); + } + } + } + } + + // end of helpers... + +ATH_CHECK( m_inputCaloQualityKey.initialize() ); +ATH_CHECK( m_inputCellsKey.initialize() ); +ATH_CHECK( m_inputTowersKey.initialize() ); +ATH_CHECK( m_outputClustersKey.initialize() ); + + ATH_MSG_DEBUG("Initialization of TrigCaloClusterMakerMT completed successfully"); + + return StatusCode::SUCCESS; +} + + +StatusCode TrigCaloClusterMakerMT::finalize() +{ + ATH_MSG_DEBUG("in finalize()" ); +return StatusCode::SUCCESS; + +} + + +StatusCode TrigCaloClusterMakerMT::execute() +{ + using namespace Monitored; + // Monitoring initialization... + auto time_tot = MonitoredTimer::declare("TIME_execute"); + auto time_clusMaker = MonitoredTimer::declare("TIME_ClustMaker"); + auto time_clusCorr = MonitoredTimer::declare("TIME_ClustCorr"); + + + + + ATH_MSG_DEBUG("in TrigCaloClusterMakerMT::execute()" ); + + bool isSW=false; + + auto ctx = getContext(); + + // We now take care of the Cluster Making... + auto clusterContainer = SG::makeHandle (m_outputClustersKey, ctx); + ATH_MSG_DEBUG(" Output Clusters : " << clusterContainer.name()); + + ATH_CHECK( clusterContainer.record (std::make_unique<xAOD::CaloClusterContainer>(), std::make_unique<xAOD::CaloClusterTrigAuxContainer> () )); + + xAOD::CaloClusterContainer* pCaloClusterContainer = clusterContainer.ptr(); + ATH_MSG_DEBUG(" created ClusterContainer at 0x" << std::hex << pCaloClusterContainer); + + + // monitored variables + auto mon_container_size = MonitoredScalar::declare("container_size", 0.); + auto mon_clusEt = MonitoredCollection::declare("Et", *pCaloClusterContainer, &xAOD::CaloCluster::et ); + auto mon_clusSignalState = MonitoredCollection::declare("signalState", *pCaloClusterContainer, &xAOD::CaloCluster::signalState ); + auto mon_clusSize = MonitoredCollection::declare("clusterSize", *pCaloClusterContainer, &xAOD::CaloCluster::clusterSize ); + std::vector<double> clus_phi; + std::vector<double> clus_eta; + std::vector<double> N_BAD_CELLS; + std::vector<double> ENG_FRAC_MAX; + std::vector<unsigned int> sizeVec; + auto mon_clusPhi = MonitoredCollection::declare("Phi", clus_phi); // phi and eta are virtual methods of CaloCluster + auto mon_clusEta = MonitoredCollection::declare("Eta", clus_eta); + auto mon_badCells = MonitoredCollection::declare("N_BAD_CELLS",N_BAD_CELLS ); + auto mon_engFrac = MonitoredCollection::declare("ENG_FRAC_MAX",N_BAD_CELLS ); + auto mon_size = MonitoredCollection::declare("size",sizeVec ); + auto monitorIt = MonitoredScope::declare( m_monTool, time_clusMaker, time_clusCorr, mon_container_size, mon_clusEt, + mon_clusPhi, mon_clusEta, mon_clusSignalState, mon_clusSize, + mon_badCells, mon_engFrac, mon_size); + + + auto pTrigCaloQuality = SG::makeHandle (m_inputCaloQualityKey, ctx); + //TrigCaloQuality* pTrigCaloQuality = trigCaloQuality.ptr(); + + ATH_MSG_DEBUG(" Input CaloQuality : " << pTrigCaloQuality.name()); + + + // Looping over cluster maker tools... + + time_clusMaker.start(); + + auto cells = SG::makeHandle(m_inputCellsKey, ctx); + ATH_MSG_DEBUG(" Input Cells : " << cells.name()); + + auto towers = SG::makeHandle(m_inputTowersKey, ctx); + ATH_MSG_DEBUG(" Input Towers : " << towers.name()); + + int index=0; + for (CaloClusterCollectionProcessor* clproc : m_clusterMakerPointers) { + + // JTB: TO DO: The offline tools should be changed to set declare ReadHandles + + // We need to set the properties of the offline tools. this way of doing is ugly... + // Abusing of harcoding?? Yes... + + AlgTool* algtool = dynamic_cast<AlgTool*> (clproc); + if(m_clusterMakerNames[index].find("CaloTopoClusterMaker") != std::string::npos){ + + + if(!algtool || algtool->setProperty( StringProperty("CellsName",cells.name() )).isFailure()) { + ATH_MSG_ERROR ("ERROR setting the CellsName name in the offline tool" ); + // return HLT::TOOL_FAILURE; + return StatusCode::SUCCESS; + } + + } else if(m_clusterMakerNames[index].find("trigslw") != std::string::npos){ + if(!algtool || algtool->setProperty( StringProperty("CaloCellContainer",cells.name()) ).isFailure()) { + ATH_MSG_ERROR ("ERROR setting the CaloCellContainer name in the offline tool" ); + //return HLT::TOOL_FAILURE; + return StatusCode::SUCCESS; + } + if(!algtool || algtool->setProperty( StringProperty("TowerContainer", towers.name() )).isFailure()) { + ATH_MSG_ERROR ("ERROR setting the Tower Container name in the offline tool" ); + //return HLT::TOOL_FAILURE; + return StatusCode::SUCCESS; + } + } + + + if ( (clproc->name()).find("trigslw") != std::string::npos ) isSW=true; + if ( clproc->execute(pCaloClusterContainer).isFailure() ) { + ATH_MSG_ERROR("Error executing tool " << m_clusterMakerNames[index] ); + } else { + ATH_MSG_DEBUG("Executed tool " << m_clusterMakerNames[index] ); + } + + ++index; + } + time_clusMaker.stop(); + + + //save raw state (uncalibrated) + for (xAOD::CaloCluster* cl : *pCaloClusterContainer) + { + ATH_MSG_VERBOSE("found cluster with state " + << cl->signalState() << ", calE: " << cl->calE() << ", calEta: " << cl->calEta() << ", calPhi: " << cl->calPhi() << " calM: " <<cl->calM()); + ATH_MSG_DEBUG(" Cluster Et = " << cl->et() ); + ATH_MSG_DEBUG(" Cluster eta = " << cl->eta() ); + ATH_MSG_DEBUG(" Cluster phi = " << cl->phi() ); + cl->setRawE(cl->calE()); + cl->setRawEta(cl->calEta()); + cl->setRawPhi(cl->calPhi()); + cl->setRawM(cl->calM()); + ATH_MSG_DEBUG(" before correction=>Cluster Et = " << cl->et() ); + ATH_MSG_DEBUG(" before correction=>Cluster eta = " << cl->eta() ); + ATH_MSG_DEBUG(" before correction=>Cluster phi = " << cl->phi() ); + } + + + + // Looping over cluster correction tools... + + time_clusCorr.start(); + ATH_MSG_DEBUG(" Running cluster correction tools"); + std::vector<CaloClusterProcessor*>::const_iterator itrcct = m_clusterCorrectionPointers.begin(); + std::vector<CaloClusterProcessor*>::const_iterator endcct = m_clusterCorrectionPointers.end(); + + index=0; + for (; itrcct!=endcct; ++itrcct) { + + ATH_MSG_DEBUG(" Running " << (*itrcct)->name()); + ISetCaloCellContainerName* setter = + dynamic_cast<ISetCaloCellContainerName*> (*itrcct); + if (setter) { + if(setter->setCaloCellContainerName(cells.name()) .isFailure()) { + ATH_MSG_ERROR("ERROR setting the CaloCellContainer name in the offline tool" ); + // return HLT::BAD_JOB_SETUP; + return StatusCode::SUCCESS; + } + } + + for (xAOD::CaloCluster* cl : *pCaloClusterContainer) { + bool exec = false; + if ( (fabsf(cl->eta0())<1.45) && ((*itrcct)->name().find("37") != std::string::npos ) ) exec=true; + else if ( (fabsf(cl->eta0())>=1.45) && ((*itrcct)->name().find("55") != std::string::npos ) ) exec=true; + else exec = false; + if (!isSW) exec=true; + if ( exec ) { + if ( (*itrcct)->execute(cl).isFailure() ) { + ATH_MSG_ERROR("Error executing correction tool " << m_clusterCorrectionNames[index] ); + // return HLT::TOOL_FAILURE; + return StatusCode::SUCCESS; + } else { + ATH_MSG_DEBUG("Executed correction tool " << m_clusterCorrectionNames[index] ); + } + } // Check conditions + } + ++index; + + } + time_clusCorr.stop(); + + // quality flag for clusters +#if 0 + if (pTrigCaloQuality && pTrigCaloQuality->getError()) { // conversion errors in this RoI + for (xAOD::CaloCluster* cl : *pCaloClusterContainer) { + CaloClusterBadChannelData data(-999.,-999.,CaloSampling::Unknown,CaloBadChannel(4)); // unphysical data + cl->addBadChannel(data); + } + } +#endif + + // fill monitored variables + for (xAOD::CaloCluster* cl : *pCaloClusterContainer) { + + CaloClusterCellLink* num_cell_links = cl->getCellLinks(); + if(! num_cell_links) { + sizeVec.push_back(0); + } else { + sizeVec.push_back(num_cell_links->size()); + } + clus_phi.push_back(cl->phi()); + clus_eta.push_back(cl->eta()); + N_BAD_CELLS.push_back(cl->getMomentValue(xAOD::CaloCluster::N_BAD_CELLS)); + ENG_FRAC_MAX.push_back(cl->getMomentValue(xAOD::CaloCluster::ENG_FRAC_MAX)); + } + + + ATH_MSG_DEBUG(" REGTEST: Produced a Cluster Container of Size= " << pCaloClusterContainer->size() ); + if(!pCaloClusterContainer->empty()) { + ATH_MSG_DEBUG(" REGTEST: Last Cluster Et = " << (pCaloClusterContainer->back())->et() ); + ATH_MSG_DEBUG(" REGTEST: Last Cluster eta = " << (pCaloClusterContainer->back())->eta() ); + ATH_MSG_DEBUG(" REGTEST: Last Cluster phi = " << (pCaloClusterContainer->back())->phi() ); + mon_container_size = pCaloClusterContainer->size(); // fill monitored variable + } + + return StatusCode::SUCCESS; +} + + + diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloClusterMakerMT.h b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloClusterMakerMT.h new file mode 100644 index 000000000000..aeff6f449608 --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloClusterMakerMT.h @@ -0,0 +1,102 @@ + +// Hi Emacs ! this is -*- C++ -*- + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/******************************************************************** + * + * NAME: TrigCaloClusterMaker + * PACKAGE: Trigger/TrigAlgorithms/TrigCaloRec + * + * AUTHOR: P.A. Delsart + * CREATED: August 2006 + * + * Builds Clusters from CaloCell in a ROI using offline calo tools. + * Works currently only for CaloTopoCluster and SWClusters. (hard coded hack...) + *********************************************************************/ +#ifndef TRIGCALOREC_TRIGCALOCLUSTERMAKERMT_H +#define TRIGCALOREC_TRIGCALOCLUSTERMAKERMT_H + +#include "AthenaBaseComps/AthAlgorithm.h" +#include "CaloEvent/CaloClusterContainer.h" +#include "xAODCaloEvent/CaloClusterContainer.h" +#include "TrigCaloRec/TrigCaloQuality.h" +#include "AthenaMonitoring/GenericMonitoringTool.h" + + +class IAlgToolEFCalo; +class CaloClusterCollectionProcessor; +class CaloClusterProcessor; +class CaloClusterContainer; +class CaloCellLinkContainer; + +class TrigCaloClusterMakerMT : public AthAlgorithm { + + public: + + TrigCaloClusterMakerMT(const std::string& name, ISvcLocator* pSvcLocator); + ~TrigCaloClusterMakerMT(); + + StatusCode initialize(); + StatusCode finalize(); + StatusCode execute(); + + private: + + std::vector<std::string> m_clusterMakerNames; // Cluster maker tools name + std::vector<std::string> m_clusterCorrectionNames; // Cluster correction tools name + + + // Following used for testing only : + //bool m_useMeaningfullNames; + std::string m_clustersOutputName; + + + //Other members + std::vector<CaloClusterCollectionProcessor*> m_clusterMakerPointers; //pointers to tools + std::vector<CaloClusterProcessor*> m_clusterCorrectionPointers; //pointers to tools + xAOD::CaloClusterContainer* m_pCaloClusterContainer; + TrigCaloQuality* m_pTrigCaloQuality; + +// double m_Eta; +// double m_Phi; +// double m_Et; +// double m_rCore; +// double m_EtaEFvsL2; +// double m_PhiEFvsL2; +// double m_IsoFrac; +// double m_StripWidth; +// double m_EMFraction; +// double m_EdRFraction; + + SG::ReadHandleKey<TrigCaloQuality> m_inputCaloQualityKey{ this, + "CaloQuality", // property name + "caloquality", // default value of StoreGate key + "input TrigCaloQuality"}; + + SG::ReadHandleKey<CaloCellContainer> m_inputCellsKey{ this, + "Cells", // property name + "cells", // default value of StoreGate key + "input CaloCellContainer "}; + + SG::ReadHandleKey<CaloTowerContainer> m_inputTowersKey{ this, + "CaloTowers", // property name + "calotowers", // default value of StoreGate key + "output CaloTowerContainer"}; + + SG::WriteHandleKey<xAOD::CaloClusterContainer> m_outputClustersKey{ this, + "CaloClusters", // property name + "caloclusters", // default value of StoreGate key + "output CaloClusterContainer"}; + + + ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool" }; + +public: + + inline xAOD::CaloClusterContainer* GetClusterContainer() const {return m_pCaloClusterContainer;} + +}; +#endif diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloTowerMakerMT.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloTowerMakerMT.cxx new file mode 100644 index 000000000000..1ab4683edc66 --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloTowerMakerMT.cxx @@ -0,0 +1,290 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// ******************************************************************** +// +// NAME: TrigCaloTowerMakerMT.cxx +// PACKAGE: Trigger/TrigAlgorithms/TrigCaloRec +// +// AUTHOR: P.A. Delsart +// This is an Hlt algorithm that creates Calorimeter towers +// It assumes CaloCellContainers are already produced and accessable +// through the input TriggerElement. Based on TrigCaloRec +// +// ******************************************************************** +// +// +#include <sstream> +#include "GaudiKernel/MsgStream.h" +#include "GaudiKernel/IToolSvc.h" +#include "GaudiKernel/StatusCode.h" +#include "GaudiKernel/ListItem.h" +// +#include "AthenaMonitoring/MonitoredScope.h" +#include "TrigT1Interfaces/TrigT1Interfaces_ClassDEF.h" +#include "TrigSteeringEvent/TrigRoiDescriptor.h" +// +#include "CaloEvent/CaloCellContainer.h" + +// +#include "EventKernel/INavigable4Momentum.h" +#include "NavFourMom/INavigable4MomentumCollection.h" +// +#include "CaloUtils/CaloCollectionHelper.h" +// + +#include "CaloUtils/CaloTowerBuilderToolBase.h" +#include "CaloEvent/CaloTowerSeg.h" +#include "CaloEvent/CaloTowerContainer.h" + +//#include "TrigTimeAlgs/TrigTimerSvc.h" + +#include "TrigCaloTowerMakerMT.h" +// +class ISvcLocator; + + + +///////////////////////////////////////////////////////////////////// +// CONSTRUCTOR: +///////////////////////////////////////////////////////////////////// +// +TrigCaloTowerMakerMT::TrigCaloTowerMakerMT(const std::string& name, ISvcLocator* pSvcLocator) + : AthAlgorithm(name, pSvcLocator) + , m_nEtaTowers(50) + , m_nPhiTowers(64) + , m_minEta(-2.5) + , m_maxEta(2.5) + , m_deta(0.5) + , m_dphi(0.5) + , m_includeFcal(false) +{ + + + // Name of Tower Maker Tools + declareProperty( "TowerMakerTools", m_towerMakerNames ); + declareProperty( "NumberOfEtaTowers", m_nEtaTowers ); + declareProperty( "NumberOfPhiTowers", m_nPhiTowers ); + declareProperty( "EtaMin", m_minEta ); + declareProperty( "EtaMax", m_maxEta ); + declareProperty( "DeltaEta", m_deta ); + declareProperty( "DeltaPhi", m_dphi ); + + + +} + +///////////////////////////////////////////////////////////////////// + // DESTRUCTOR: + ///////////////////////////////////////////////////////////////////// + // + TrigCaloTowerMakerMT::~TrigCaloTowerMakerMT() +{ } + +///////////////////////////////////////////////////////////////////// + // INITIALIZE: + // The initialize method will create all the required algorithm objects + // Note that it is NOT NECESSARY to run the initialize of individual + // sub-algorithms. The framework takes care of it. + ///////////////////////////////////////////////////////////////////// + + + StatusCode TrigCaloTowerMakerMT::initialize() +{ + ATH_MSG_DEBUG ("in initialize()"); + + if (!m_monTool.empty()) { + ATH_MSG_DEBUG("Retrieving monTool"); + CHECK(m_monTool.retrieve()); + } else { + ATH_MSG_INFO("No monTool configured => NO MONITOING"); + } + + // Cache pointer to ToolSvc + IToolSvc* toolSvc = 0;// Pointer to Tool Service + if (service("ToolSvc", toolSvc).isFailure()) { + ATH_MSG_FATAL ( " Tool Service not found " ); + return StatusCode::FAILURE; + } + + std::vector<std::string>::iterator itrName; + std::vector<std::string>::iterator endName; + + itrName = m_towerMakerNames.begin(); + endName = m_towerMakerNames.end(); + + CaloTowerSeg theTowerSeg(m_nEtaTowers,m_nPhiTowers,m_minEta,m_maxEta); + + for (; itrName!=endName; ++itrName) { + + ListItem theItem(*itrName); + IAlgTool* algtool; + if ( (*itrName).find("FC") != std::string::npos ) m_includeFcal=true; + + if( toolSvc->retrieveTool(theItem.type(), theItem.name(), algtool,this).isFailure() ) { + ATH_MSG_FATAL ( "Unable to find tool for " << (*itrName) ); + return StatusCode::FAILURE; + } else { + CaloTowerBuilderToolBase* mytool = dynamic_cast<CaloTowerBuilderToolBase*>(algtool); + if(mytool == NULL) { + ATH_MSG_FATAL("dynamic cast to CaloTowerBuilderToolBase failed for" << theItem.name()); + return StatusCode::FAILURE; + } + else { + ATH_MSG_DEBUG ( " set towerSet for this tool " << theItem.name() ); + mytool->setTowerSeg(theTowerSeg); + m_towerMakerPointers.push_back(mytool); + } + } + } + + // end of helpers... + + // if (timerSvc()) { + //m_totalTimer = addTimer("TimeTot"); + //m_towerContTimer = addTimer("TCRRTowerContainer"); + //} + m_caloTowerNav4LinkKey = m_outputTowerKey.key(); + +ATH_CHECK( m_inputRoiKey.initialize() ); +ATH_CHECK( m_inputCellsKey.initialize() ); +ATH_CHECK( m_outputTowerKey.initialize() ); +ATH_CHECK( m_caloTowerNav4LinkKey.initialize() ); + + ATH_MSG_DEBUG + ( "Initialization of TrigCaloTowerMakerMT completed successfully" + ); + + return StatusCode::SUCCESS; +} + + +StatusCode TrigCaloTowerMakerMT::finalize() +{ + + ATH_MSG_DEBUG ( "in finalize()" ); + + return StatusCode::SUCCESS; +} + + +StatusCode TrigCaloTowerMakerMT::execute() + +{ + using namespace Monitored; + + // Monitoring initialization... + auto timer = MonitoredTimer::declare("TIME_execute"); + auto time_tools = MonitoredTimer::declare("TIME_tools"); + auto mon_towerContainerSize = MonitoredScalar::declare("towerContainerSize", 0.); + + auto monitorIt = MonitoredScope::declare( m_monTool, timer, time_tools, mon_towerContainerSize); + + ATH_MSG_DEBUG ( "in execute()" ); + + + auto ctx = getContext(); + + // Get RoiDescriptor + auto roiCollection = SG::makeHandle(m_inputRoiKey, ctx); + + auto caloTowerContainer = SG::makeHandle (m_outputTowerKey, ctx); + + if (roiCollection->size()==0) { + ATH_MSG_DEBUG(" RoI collection size = 0"); + return StatusCode::SUCCESS; + } + + const TrigRoiDescriptor* roiDescriptor = *(roiCollection->begin()); + if (roiCollection->size() > 1) ATH_MSG_WARNING("Misconfiguration - Called with " << roiCollection->size() << " ROI, but it should be called with 1 RoI - Will only process the first RoI"); + + + ATH_MSG_DEBUG ( " RoI id " << roiDescriptor->roiId() + << " located at phi = " << roiDescriptor->phi() + << ", eta = " << roiDescriptor->eta() ); + + /// ho hum, this needs a flag for using own wdiths rather than those from the roiDescriptor + /// in addition, this will *not* work properly for composite RoIs + + if ( roiDescriptor->composite() ) { + ATH_MSG_WARNING ( " Attempting to use composite RoI as a normal RoI - this is probably *not* what you want to do " + << *roiDescriptor ); + } + + double eta0 = roiDescriptor->eta(); + double phi0 = roiDescriptor->phi(); + + while (phi0 > 2.*M_PI) phi0 -= 2. * M_PI; + while (phi0 < 0. ) phi0 += 2. * M_PI; + double etamin = eta0-m_deta/2.; + double etamax = eta0+m_deta/2.; + // What if phimin < 0 or phimax > 2Pi ?? question + double phimin = phi0 - m_dphi/2.; + double phimax = phi0 + m_dphi/2.; + + ATH_MSG_DEBUG(" eta0 = "<< eta0 << " phi0 = "<< phi0 << + " etamin = "<< etamin << " etamax = "<< etamax << + " phimin = "<< phimin << " phimax = "<< phimax); + + + CaloTowerSeg myseg (m_nEtaTowers,m_nPhiTowers,m_minEta,m_maxEta); + CaloTowerSeg::SubSeg subseg = myseg.subseg ( roiDescriptor->eta(), m_deta, roiDescriptor->phi(), m_dphi ); + if ( m_includeFcal ) { + ATH_CHECK( caloTowerContainer .record (std::make_unique<CaloTowerContainer>(myseg))); + } else { + ATH_CHECK( caloTowerContainer .record (std::make_unique<CaloTowerContainer>( subseg.segmentation() ))); + } + CaloTowerContainer* pCaloTowerContainer=caloTowerContainer .ptr(); + + ATH_CHECK( caloTowerContainer.symLink (m_caloTowerNav4LinkKey)); + ATH_MSG_DEBUG( "CaloTowerContainer" << caloTowerContainer.name() << " symlinked to INavigable4MomentumCollection in StoreGate"); + + // if (timerSvc()) m_towerContTimer->start(); // Measures the time to retrieve the cells in the RoI + + auto caloCellContainer = SG::makeHandle (m_inputCellsKey, ctx); + + + // Get the last container in the vector. Should be th one produced by the previous TrigCaloCellMaker. + const CaloCellContainer* theCellCont = caloCellContainer.ptr(); + + ATH_MSG_DEBUG(" REGTEST: Retrieved a Cell Container of Size= " << theCellCont->size()); + + // Now Build the towers ----------------------------------------------------------------- + + if(!m_towerMakerNames.empty()) { + + time_tools.start(); + std::vector<CaloTowerBuilderToolBase*>::const_iterator itrtwr=m_towerMakerPointers.begin(); + std::vector<CaloTowerBuilderToolBase*>::const_iterator endtwr=m_towerMakerPointers.end(); + int index=0; + for (; itrtwr!=endtwr; ++itrtwr) { + //if((*itrtwr)->setProperty( StringProperty("CellContainerName",cellCollKey) ).isFailure()) { + //ATH_MSG_ERROR ( "ERROR setting the CaloCellContainer name in the offline tool" ); + //return HLT::TOOL_FAILURE; + //} + if ( m_includeFcal ) { + if ( (*itrtwr)->execute(pCaloTowerContainer, theCellCont).isFailure() ) { + ATH_MSG_ERROR("Error executing tool " << m_towerMakerNames[index]); + } else { + ATH_MSG_DEBUG("Executed tool " << m_towerMakerNames[index]); + } + } else { + if ( (*itrtwr)->execute(pCaloTowerContainer,theCellCont, &subseg).isFailure() ) { + ATH_MSG_ERROR("Error executing tool " << m_towerMakerNames[index]); + } else { + ATH_MSG_DEBUG("Executed tool " << m_towerMakerNames[index]); + } + } + ++index; + time_tools.stop(); + + } + + ATH_MSG_DEBUG(" REGTEST: Produced a Tower Container " << caloTowerContainer.name() << " at " << caloTowerContainer.cptr() << " of Size= " << pCaloTowerContainer->size()); + ATH_MSG_DEBUG(" handle info: " << caloTowerContainer); + mon_towerContainerSize = (float)pCaloTowerContainer->size() ; + } + + return StatusCode::SUCCESS; +} diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloTowerMakerMT.h b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloTowerMakerMT.h new file mode 100644 index 000000000000..79898a0815d3 --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloTowerMakerMT.h @@ -0,0 +1,103 @@ +// Hi Emacs ! this is -*- C++ -*- + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/******************************************************************** + * + * NAME: TrigCaloTowerMakerMT + * PACKAGE: Trigger/TrigAlgorithms/TrigCaloRec + * + * AUTHOR: P.A. Delsart + * CREATED: August 2006 + * + *********************************************************************/ +#ifndef TRIGCALOREC_TRIGCALOTOWERMAKERMT_H +#define TRIGCALOREC_TRIGCALOTOWERMAKERMT_H + +#include "AthenaBaseComps/AthAlgorithm.h" +#include "CaloEvent/CaloTowerContainer.h" +#include "AthenaMonitoring/GenericMonitoringTool.h" + + +class IAlgToolEFCalo; +class ICaloCellMakerTool; +class CaloTowerBuilderToolBase; +class CaloTowerContainer; + + +class TrigCaloTowerMakerMT : public AthAlgorithm { + + public: + + /** constructor */ + TrigCaloTowerMakerMT(const std::string& name, ISvcLocator* pSvcLocator); + + /** destructor */ + ~TrigCaloTowerMakerMT(); + + /** HLT method to initialize */ + StatusCode initialize(); + + /** HLT method to finalize */ + StatusCode finalize(); + + StatusCode execute(); + private: + + /** Number of eta segments in which we divide the calorimeter */ + unsigned int m_nEtaTowers; + + /** Number of phi segments in which we divide the calorimeter */ + unsigned int m_nPhiTowers; + + /** Eta limits of the region where the towers are built */ + double m_minEta, m_maxEta; + double m_deta, m_dphi; + + /** Name of the offlinet tools for tower making wrapped-up by TrigCaloTowerMakerMT */ + std::vector<std::string> m_towerMakerNames; + + /** Pointers for offline tower maker tools */ + std::vector<CaloTowerBuilderToolBase*> m_towerMakerPointers; + + /** Pointers to timers */ + // TrigTimer* m_totalTimer; + //TrigTimer* m_towerContTimer; + + SG::ReadHandleKey<TrigRoiDescriptorCollection> m_inputRoiKey{ this, + "RoIs", // property name + "rois", // default value of StoreGate key + "input RoI collection name"}; + + SG::ReadHandleKey<CaloCellContainer> m_inputCellsKey{ this, + "Cells", // property name + "cells", // default value of StoreGate key + "input CaloCellContainer "}; + + SG::WriteHandleKey<CaloTowerContainer> m_outputTowerKey{ this, + "CaloTowers", // property name + "calotowers", // default value of StoreGate key + "output CaloTowerContainer"}; + + SG::WriteHandleKey< INavigable4MomentumCollection> m_caloTowerNav4LinkKey{this, + "CaloTowersSymLinkName", // property name + "calotowers", // default value of StoreGate key + "Calo Towers SymLink Name - don't set this"}; + + + /** Tower Container size (for monitoring purpouses). */ + // double m_TowerContainerSize; + + /** To help structure Tower container */ + bool m_includeFcal; + + ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool" }; + +public: + + // inline CaloTowerContainer* GetTowerContainer() const {return m_pCaloTowerContainer;} + +}; +#endif diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/components/TrigCaloRec_entries.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/components/TrigCaloRec_entries.cxx index 66e90b1daa5a..e0d7f391978b 100644 --- a/Trigger/TrigAlgorithms/TrigCaloRec/src/components/TrigCaloRec_entries.cxx +++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/components/TrigCaloRec_entries.cxx @@ -15,11 +15,20 @@ #include "TrigCaloRec/TrigL1BSTowerMaker.h" #include "TrigCaloRec/TrigL1BSTowerHypo.h" +#include "../TrigCaloClusterMakerMT.h" +#include "../TrigCaloCellMakerMT.h" +#include "../TrigCaloTowerMakerMT.h" +#include "../TrigFullCaloCellMakerMT.h" + #include "TrigCaloRec/TrigCaloTopoTowerAlgorithm.h" #include "TrigCaloRec/TrigCaloCell2ClusterMapper.h" #include "../HLTCaloCellMaker.h" #include "../HLTCaloCellSumMaker.h" +DECLARE_COMPONENT( TrigCaloCellMakerMT ) +DECLARE_COMPONENT( TrigFullCaloCellMakerMT ) +DECLARE_COMPONENT( TrigCaloTowerMakerMT ) +DECLARE_COMPONENT( TrigCaloClusterMakerMT ) DECLARE_COMPONENT( TrigCaloCellMaker ) DECLARE_COMPONENT( TrigFullCaloCellMaker ) DECLARE_COMPONENT( TrigCaloTowerMaker ) -- GitLab From f7bd9b935f0dba05d5cc84bf93652f48917f6804 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Sat, 2 Jun 2018 14:33:20 +0200 Subject: [PATCH 025/562] Restored checking parent for the duplicate Former-commit-id: 684ed6ab48001cf688ab4666b517ec4dbb391444 --- Control/AthViews/src/SimpleView.cxx | 43 ++++++++++++---------- Control/AthViews/test/ViewLinking_test.cxx | 5 +++ 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/Control/AthViews/src/SimpleView.cxx b/Control/AthViews/src/SimpleView.cxx index 20b6b66c1c29..48fad95fdf9e 100644 --- a/Control/AthViews/src/SimpleView.cxx +++ b/Control/AthViews/src/SimpleView.cxx @@ -68,25 +68,30 @@ SG::DataProxy * SimpleView::proxy_exact( SG::sgkey_t sgkey ) const */ SG::DataProxy * SimpleView::proxy( const CLID& id, const std::string& key ) const { - const std::string viewKey = m_name + "_" + key; - auto localProxy = m_store->proxy( id, viewKey ); - if ( localProxy ) - return localProxy; - - for ( auto parent: m_parents ) { - auto proxyInParent = parent->proxy( id, key ); - if ( proxyInParent != nullptr ) { - return proxyInParent; - } // else look further - } - - //Look in the default store if cound not find in any view - for instance for event-wise IDCs - if ( m_allowFallThrough ) { - auto mainStoreProxy = m_store->proxy( id, key ); - return mainStoreProxy; - } - - return localProxy; // can be the nullptr still + auto isValid = [](const SG::DataProxy* p) { return p != nullptr and p->isValid(); }; + const std::string viewKey = m_name + "_" + key; + auto localProxy = m_store->proxy( id, viewKey ); + + // std::cout << " while looking for object " << key << " in view " << name() << " found proxy in this view store with validity " << isValid( localProxy ) << std::endl; + for ( auto parent: m_parents ) { + auto inParentProxy = parent->proxy( id, key ); + // std::cout << " while looking for object " << key << " in view " << name() << " found proxy in parent view store with validity " << isValid( inParentProxy ) << std::endl; + if ( isValid( inParentProxy ) ) { + if ( isValid( localProxy ) ) { + throw std::runtime_error("Duplicate object CLID:"+ std::to_string(id) + " key: " + key + " found in views: " + name()+ " and parent " + parent->name() ); + } + localProxy = inParentProxy; + break; + } + } + + //Look in the default store if cound not find in any view - for instance for event-wise IDCs + if ( (not isValid( localProxy )) and m_allowFallThrough ) { + auto mainStoreProxy = m_store->proxy( id, key ); + // std::cout << " while looking for object " << key << " in view " << name() << " found proxy in the main store with validity " << isValid( mainStoreProxy ) << std::endl; + return mainStoreProxy; + } + return localProxy; // can be the nullptr still } diff --git a/Control/AthViews/test/ViewLinking_test.cxx b/Control/AthViews/test/ViewLinking_test.cxx index 1d1ebca03f24..c83818bf4d03 100644 --- a/Control/AthViews/test/ViewLinking_test.cxx +++ b/Control/AthViews/test/ViewLinking_test.cxx @@ -98,6 +98,11 @@ void testDataInView( StoreGateSvc* /*sg*/ , MsgStream& log ) { VALUE( status.isSuccess() ) EXPECTED( true ); } + { + SG::ReadHandle<TestClass> rh( "test1" ); + rh.setProxyDict( childView ); + EXPECT_EXCEPTION( std::runtime_error, rh.isValid() ); + } log << MSG::INFO << "Hiding works as expected " << endmsg; -- GitLab From 48a346af1558cb8742c024083d78420cdfcce68e Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Sat, 2 Jun 2018 14:33:54 +0200 Subject: [PATCH 026/562] Reordered the creation and recording of the output collection Former-commit-id: 2d71ff3be408be5134385f3583b12d6896173116 --- .../TrigOutputHandling/src/HLTEDMCreator.cxx | 90 +++++++++++-------- .../TrigOutputHandling/src/HLTEDMCreator.h | 3 +- 2 files changed, 55 insertions(+), 38 deletions(-) diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx index a1b6fda0b919..b0c90cbb5045 100644 --- a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx +++ b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx @@ -27,7 +27,7 @@ StatusCode HLTEDMCreator::initHandles( const HandlesGroup<T>& handles ) { // the case with views, we want to store from many views into a single output container CHECK( handles.out.size() == 1 ); // one output collection CHECK( handles.in.size() == handles.views.size() ); - for ( int i = 0; i < handles.in.size(); ++i ) { + for ( size_t i = 0; i < handles.in.size(); ++i ) { CHECK( handles.in.at(i).key() == handles.out.at(i).key() ); } @@ -59,22 +59,31 @@ StatusCode HLTEDMCreator::initialize() } template<class T> -StatusCode plainGenerator( SG::WriteHandle<T>& h ) { - - return h.record( std::move( std::make_unique<T>() ) ); - -} - +struct plainGenerator { + std::unique_ptr<T> data; + void create() { + data = std::make_unique<T>(); + } + StatusCode record( SG::WriteHandle<T>& h ) { + return h.record( std::move( data ) ); + } +}; template<class T, class STORE> -StatusCode xAODGenerator( SG::WriteHandle<T>& h ) { - - auto coll = std::make_unique<T>(); - auto store = std::make_unique<STORE>(); - coll->setStore( store.get() ); +struct xAODGenerator { + std::unique_ptr<T> data; + std::unique_ptr<STORE> store; + + void create() { + data = std::make_unique<T>(); + store = std::make_unique<STORE>(); + data->setStore( store.get() ); + } - return h.record( std::move( coll ), std::move( store ) ); -} + StatusCode record ( SG::WriteHandle<T>& h ) { + return h.record( std::move( data ), std::move( store ) ); + } +}; template<typename T> StatusCode HLTEDMCreator::noMerge( ViewContainer const&, const SG::ReadHandleKey<T>&, @@ -98,24 +107,20 @@ StatusCode HLTEDMCreator::viewsMerge( ViewContainer const& views, const SG::Rea } + template<typename T, typename G, typename M> -StatusCode HLTEDMCreator::createIfMissing( const EventContext& context, const ConstHandlesGroup<T>& handles, G createAndRecord, M merger) const { +StatusCode HLTEDMCreator::createIfMissing( const EventContext& context, const ConstHandlesGroup<T>& handles, G& generator, M merger) const { for ( auto writeHandleKey : handles.out ) { SG::ReadHandle<T> readHandle( writeHandleKey.key() ); if ( readHandle.isValid() ) { ATH_MSG_DEBUG( "The " << writeHandleKey.key() << " already present" ); - - } else { - - SG::WriteHandle<T> writeHandle = SG::makeHandle( writeHandleKey ); - CHECK( createAndRecord( writeHandle ) ); - - ATH_MSG_DEBUG( "The " << writeHandleKey.key() << " was absent, created empty one" ); - + } else { + ATH_MSG_DEBUG( "The " << writeHandleKey.key() << " was absent, creating it, possibly filling with content from views" ); + generator.create(); if ( handles.views.size() != 0 ) { - + ATH_MSG_DEBUG("Will be merging from " << handles.views.size() << " view containers into that output"); auto viewCollKeyIter = handles.views.begin(); auto inViewCollKeyIter = handles.in.begin(); @@ -125,11 +130,13 @@ StatusCode HLTEDMCreator::createIfMissing( const EventContext& context, const ATH_MSG_DEBUG("Will be merging from " << viewCollKeyIter->key() << " view container using key " << inViewCollKeyIter->key() ); auto viewsHandle = SG::makeHandle( *viewCollKeyIter ); if ( viewsHandle.isValid() ) { - CHECK( (this->*merger)( *viewsHandle, *inViewCollKeyIter , context, *writeHandle ) ); + CHECK( (this->*merger)( *viewsHandle, *inViewCollKeyIter , context, *generator.data.get() ) ); } } - } - } + } + auto writeHandle = SG::makeHandle( writeHandleKey ); + CHECK( generator.record( writeHandle ) ); + } } return StatusCode::SUCCESS; } @@ -139,25 +146,34 @@ StatusCode HLTEDMCreator::createIfMissing( const EventContext& context, const StatusCode HLTEDMCreator::createOutput(const EventContext& context) const { #define CREATE(__TYPE) \ - CHECK( createIfMissing<__TYPE>( context, ConstHandlesGroup<__TYPE>( m_##__TYPE, m_##__TYPE##InViews, m_##__TYPE##Views ), plainGenerator<__TYPE>, &HLTEDMCreator::noMerge<__TYPE> ) ) + { \ + plainGenerator<__TYPE> generator; \ + CHECK( createIfMissing<__TYPE>( context, ConstHandlesGroup<__TYPE>( m_##__TYPE, m_##__TYPE##InViews, m_##__TYPE##Views ), generator, &HLTEDMCreator::noMerge<__TYPE> ) ); \ + } - CREATE( TrigRoiDescriptorCollection ); + CREATE( TrigRoiDescriptorCollection ) #undef CREATE #define CREATE_XAOD(__TYPE, __STORE_TYPE) \ - CHECK( createIfMissing<xAOD::__TYPE>( context, ConstHandlesGroup<xAOD::__TYPE>( m_##__TYPE, m_##__TYPE##InViews, m_##__TYPE##Views ), xAODGenerator<xAOD::__TYPE, xAOD::__STORE_TYPE>, &HLTEDMCreator::viewsMerge<xAOD::__TYPE> ) ) + { \ + xAODGenerator<xAOD::__TYPE, xAOD::__STORE_TYPE> generator; \ + CHECK( createIfMissing<xAOD::__TYPE>( context, ConstHandlesGroup<xAOD::__TYPE>( m_##__TYPE, m_##__TYPE##InViews, m_##__TYPE##Views ), generator, &HLTEDMCreator::viewsMerge<xAOD::__TYPE> ) ); \ + } #define CREATE_XAOD_NO_MERGE(__TYPE, __STORE_TYPE) \ - CHECK( createIfMissing<xAOD::__TYPE>( context, ConstHandlesGroup<xAOD::__TYPE>( m_##__TYPE, m_##__TYPE##InViews, m_##__TYPE##Views ), xAODGenerator<xAOD::__TYPE, xAOD::__STORE_TYPE>, &HLTEDMCreator::noMerge<xAOD::__TYPE> ) ) + { \ + xAODGenerator<xAOD::__TYPE, xAOD::__STORE_TYPE> generator; \ + CHECK( createIfMissing<xAOD::__TYPE>( context, ConstHandlesGroup<xAOD::__TYPE>( m_##__TYPE, m_##__TYPE##InViews, m_##__TYPE##Views ), generator, &HLTEDMCreator::noMerge<xAOD::__TYPE> ) ); \ + } - CREATE_XAOD_NO_MERGE( TrigCompositeContainer, TrigCompositeAuxContainer ); - CREATE_XAOD( TrigElectronContainer, TrigElectronAuxContainer ); - CREATE_XAOD( TrigPhotonContainer, TrigPhotonAuxContainer ); - CREATE_XAOD( TrigEMClusterContainer, TrigEMClusterAuxContainer ); - CREATE_XAOD( TrigCaloClusterContainer, TrigCaloClusterAuxContainer ); - CREATE_XAOD( TrackParticleContainer, TrackParticleAuxContainer ); + CREATE_XAOD_NO_MERGE( TrigCompositeContainer, TrigCompositeAuxContainer ) + CREATE_XAOD( TrigElectronContainer, TrigElectronAuxContainer ) + CREATE_XAOD( TrigPhotonContainer, TrigPhotonAuxContainer ) + CREATE_XAOD( TrigEMClusterContainer, TrigEMClusterAuxContainer ) + CREATE_XAOD( TrigCaloClusterContainer, TrigCaloClusterAuxContainer ) + CREATE_XAOD( TrackParticleContainer, TrackParticleAuxContainer ) #undef CREATE_XAOD #undef CREATE_XAOD_NO_MERGE diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.h b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.h index 68b512694ce2..81989eea315b 100644 --- a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.h +++ b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.h @@ -126,7 +126,8 @@ class HLTEDMCreator: public extends<AthAlgTool, IHLTOutputTool> { template<typename T, typename G, typename M > - StatusCode createIfMissing( const EventContext& context, const ConstHandlesGroup<T>& handles, G generator, M merger ) const; + StatusCode createIfMissing( const EventContext& context, const ConstHandlesGroup<T>& handles, + G& generator, M merger ) const; template<typename T> -- GitLab From 6b775f5f5f0aa483f133486e3fda7a020f52e988 Mon Sep 17 00:00:00 2001 From: Susumu Oda <Susumu.Oda@cern.ch> Date: Sun, 3 Jun 2018 03:05:02 +0200 Subject: [PATCH 027/562] Scott's patch. RecExCommon: Adjust hideInput list in esdtoesd. esdtoesd no longer produces LArClusterCM by default, so remove it from the hideInput list. Former-commit-id: a6635045617d6cdd547d3f1a17f9cebea1e4f7cf --- Reconstruction/RecExample/RecExCommon/share/esdtoesd.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/Reconstruction/RecExample/RecExCommon/share/esdtoesd.py b/Reconstruction/RecExample/RecExCommon/share/esdtoesd.py index de0188e965b6..a9c73230eaaa 100755 --- a/Reconstruction/RecExample/RecExCommon/share/esdtoesd.py +++ b/Reconstruction/RecExample/RecExCommon/share/esdtoesd.py @@ -29,7 +29,6 @@ hideInput ('CaloClusterCellLinkContainer', 'CaloCalTopoClusters_links') hideInput ('CaloClusterCellLinkContainer', 'ForwardElectronClusters_links') hideInput ('CaloClusterCellLinkContainer', 'InDetTrackParticlesAssociatedClusters_links') hideInput ('CaloClusterCellLinkContainer', 'LArClusterEM7_11Nocorr_links') -hideInput ('CaloClusterCellLinkContainer', 'LArClusterEM_links') hideInput ('CaloClusterCellLinkContainer', 'MuonClusterCollection_links') hideInput ('CaloClusterCellLinkContainer', 'TauPi0Clusters_links') hideInput ('CaloClusterCellLinkContainer', 'egammaClusters_links') @@ -55,7 +54,6 @@ hideInput ('xAOD::CaloClusterContainer', 'InDetTrackParticlesAssociatedClusters' hideInput ('xAOD::CaloClusterContainer', 'MuonClusterCollection') hideInput ('xAOD::CaloClusterContainer', 'TauPi0Clusters') hideInput ('xAOD::CaloClusterContainer', 'egammaClusters') -hideInput ('xAOD::CaloClusterContainer', 'LArClusterEM') hideInput ('xAOD::CaloClusterContainer', 'LArClusterEM7_11Nocorr') hideInput ('xAOD::CaloClusterContainer', 'CaloCalTopoClusters') hideInput ('xAOD::CaloRingsContainer', 'ElectronCaloRings') -- GitLab From 69c45c95603d10e5f7ebe966173ce17650fdaa5b Mon Sep 17 00:00:00 2001 From: Susumu Oda <Susumu.Oda@cern.ch> Date: Mon, 4 Jun 2018 11:07:14 +0200 Subject: [PATCH 028/562] Add SCT_FlaggedCondData_p1 Former-commit-id: ed9c1f822a64cf0985a0070e6e908c6d018f0b9c --- .../InDetEventAthenaPoolCnvDict.h | 3 ++- .../SCT_FlaggedCondData_p1.h | 22 +++++++++++++++++++ .../InDetEventAthenaPool/selection.xml | 1 + .../InDetRecExample/share/WriteInDetESD.py | 1 + 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/SCT_FlaggedCondData_p1.h diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/InDetEventAthenaPoolCnvDict.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/InDetEventAthenaPoolCnvDict.h index 6603d9ebcde5..1d4249e409c3 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/InDetEventAthenaPoolCnvDict.h +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/InDetEventAthenaPoolCnvDict.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #ifndef INDETEVENTATHENAPOOLDICT_H @@ -20,6 +20,7 @@ #include "InDetEventAthenaPool/SCT_RawDataContainer_p1.h" #include "InDetEventAthenaPool/SCT_RawDataContainer_p2.h" #include "InDetEventAthenaPool/SCT_RawDataContainer_p3.h" +#include "InDetEventAthenaPool/SCT_FlaggedCondData_p1.h" namespace InDetEventAthenaPoolCnvDict { diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/SCT_FlaggedCondData_p1.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/SCT_FlaggedCondData_p1.h new file mode 100644 index 000000000000..176d8f76b498 --- /dev/null +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/SCT_FlaggedCondData_p1.h @@ -0,0 +1,22 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef SCT_FLAGGEDCONDDATA_P1_H +#define SCT_FLAGGEDCONDDATA_P1_H + +#include <map> +#include <string> + +#include "Identifier/IdentifierHash.h" + +class SCT_FlaggedCondData_p1 { + public: + SCT_FlaggedCondData_p1(): m_data{} {}; + // List of Cnv classes that convert this into Rdo objects + friend class SCT_FlaggedCondDataCnv_p1; + private: + std::map<IdentifierHash::value_type, std::string> m_data; +}; + +#endif // SCT_FLAGGEDCONDDATA_P1_H diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/selection.xml b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/selection.xml index 3583eae8a192..895861f556fc 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/selection.xml +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/selection.xml @@ -31,4 +31,5 @@ <class name="SCT_RawDataContainer_p2" id="D1258125-2CBA-476E-8578-E09D54F477E1" /> <class name="SCT_RawDataContainer_p3" id="5FBC8D4D-7B4D-433A-8487-0EA0C870CBDB" /> <class name="std::vector<InDetRawDataCollection_p1>" /> + <class name="SCT_FlaggedCondData_p1" id="0C10E502-F02B-440B-9E8F-6A8C31915D7C" /> </lcgdict> diff --git a/InnerDetector/InDetExample/InDetRecExample/share/WriteInDetESD.py b/InnerDetector/InDetExample/InDetRecExample/share/WriteInDetESD.py index 8d9e46b2e040..7a9b04514efe 100755 --- a/InnerDetector/InDetExample/InDetRecExample/share/WriteInDetESD.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/WriteInDetESD.py @@ -130,6 +130,7 @@ if globalflags.InputFormat()=='bytestream': InDetESDList+=['TRT_BSErrContainer#'+InDetKeys.TRT_ByteStreamErrs()] InDetESDList+=['TRT_BSIdErrContainer#'+InDetKeys.TRT_ByteStreamIdErrs()] InDetESDList+=['SCT_ByteStreamFractionContainer#'+InDetKeys.SCT_ByteStreamFrac()] + InDetESDList+=['SCT_FlaggedCondData#'+'SCT_FlaggedCondData'] if InDetFlags.doxAOD(): excludedAuxData = "-caloExtension.-cellAssociation.-clusterAssociation." -- GitLab From 6a161518da3470877e7c030fd72c9dbe383edb1b Mon Sep 17 00:00:00 2001 From: Susumu Oda <Susumu.Oda@cern.ch> Date: Mon, 4 Jun 2018 11:54:29 +0200 Subject: [PATCH 029/562] Fix bugs Former-commit-id: ff6225a3cd7347f1876fb957601338592207d526 --- .../InDetEventAthenaPool/CMakeLists.txt | 1 + .../src/SCT_FlaggedCondDataCnv_p1.cxx | 29 +++++++++++++++++++ .../src/SCT_FlaggedCondDataCnv_p1.h | 27 +++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_FlaggedCondDataCnv_p1.cxx create mode 100644 InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_FlaggedCondDataCnv_p1.h diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/CMakeLists.txt b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/CMakeLists.txt index 5cfcedd6d3ed..7a79c4fdb8c1 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/CMakeLists.txt +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/CMakeLists.txt @@ -22,6 +22,7 @@ atlas_depends_on_subdirs( Database/AthenaPOOL/AthenaPoolUtilities Database/AtlasSealCLHEP GaudiKernel + InnerDetector/InDetConditions/SCT_ConditionsData InnerDetector/InDetDetDescr/InDetIdentifier InnerDetector/InDetDetDescr/InDetReadoutGeometry InnerDetector/InDetEventCnv/InDetEventTPCnv diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_FlaggedCondDataCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_FlaggedCondDataCnv_p1.cxx new file mode 100644 index 000000000000..951985fae828 --- /dev/null +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_FlaggedCondDataCnv_p1.cxx @@ -0,0 +1,29 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "MsgUtil.h" + +// Converter header file +#include "SCT_FlaggedCondDataCnv_p1.h" + +// Other stuff +#include "Identifier/IdentifierHash.h" +#include <map> +#include <string> + +void +SCT_FlaggedCondDataCnv_p1::persToTrans(const SCT_FlaggedCondData_p1* persObj, SCT_FlaggedCondData* transObj, MsgStream& /*log*/) +{ + for (const auto& it : persObj->m_data) { + transObj->insert(std::make_pair(IdentifierHash(it.first), it.second)); + } +} + +void +SCT_FlaggedCondDataCnv_p1::transToPers(const SCT_FlaggedCondData* transObj, SCT_FlaggedCondData_p1* persObj, MsgStream& /*log*/) +{ + for (const auto& it : *transObj) { + persObj->m_data.insert(std::make_pair(it.first.value(), it.second)); + } +} diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_FlaggedCondDataCnv_p1.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_FlaggedCondDataCnv_p1.h new file mode 100644 index 000000000000..b72b5722b574 --- /dev/null +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_FlaggedCondDataCnv_p1.h @@ -0,0 +1,27 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef SCT_FlaggedCondDataCnv_p1_h +#define SCT_FlaggedCondDataCnv_p1_h + +/* +Transient/Persistent converter for SCT_FlaggedCondData class +*/ + +#include "SCT_ConditionsData/SCT_FlaggedCondData.h" +#include "InDetEventAthenaPool/SCT_FlaggedCondData_p1.h" + +#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" + +class MsgStream; + +class SCT_FlaggedCondDataCnv_p1 : public T_AthenaPoolTPCnvBase<SCT_FlaggedCondData, SCT_FlaggedCondData_p1> +{ +public: + SCT_FlaggedCondDataCnv_p1() {} + virtual void persToTrans(const SCT_FlaggedCondData_p1* persObj, SCT_FlaggedCondData* transObj, MsgStream &log); + virtual void transToPers(const SCT_FlaggedCondData* transObj, SCT_FlaggedCondData_p1* persObj, MsgStream &log); +}; + +#endif // SCT_FlaggedCondDataCnv_p1_h -- GitLab From 57fc6e8b2436ff20c00147c21e9c19e027a8f065 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Mon, 4 Jun 2018 14:43:50 +0200 Subject: [PATCH 030/562] LArRawConditions: Fix race in LArConditionsContainerDB. LArConditionsContainerDB was caching iterators in get(). This was not thread-safe, and was leading to incorrect results in MT jobs. Fixed by removing the cache. Tried to mitigate the performance implications by introducing a hash map as well to use for lookups. (We still need to keep an ordered version for iteration to work.) Former-commit-id: dd3c0be375e4723e57709fd2701be3a278642913 --- .../LArConditionsContainerDB.h | 131 +++++++----------- 1 file changed, 49 insertions(+), 82 deletions(-) diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArConditionsContainerDB.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArConditionsContainerDB.h index f3a30c8fec82..d00416316dba 100755 --- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArConditionsContainerDB.h +++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArConditionsContainerDB.h @@ -40,6 +40,7 @@ #include "LArRawConditions/LArConditionsSubset.h" #include "LArIdentifier/LArOnlineID.h" #include <map> +#include <unordered_map> #include <vector> #define NChannelPerFEB 128 @@ -54,6 +55,7 @@ public: typedef typename Traits::ChannelVector ChannelVector; typedef typename Traits::ChannelVectorPointer ChannelVectorPointer; typedef typename std::map<FebId, ChannelVectorPointer > ConditionsMap; + typedef typename std::unordered_map<FebId, ChannelVectorPointer > ConditionsHashMap; typedef typename ChannelVector::const_iterator ConstChannelIt; typedef typename ChannelVector::iterator ChannelIt; typedef typename ConditionsMap::const_iterator ConstConditionsMapIterator; @@ -128,7 +130,7 @@ public: /// Do conditions for FebId? Used by writers to check whether add /// is needed. - bool exist(FebId id); + bool exist(FebId id) const; /// Iterator over all channels const_iterator begin(const LArOnlineID* onlineHelper) const; @@ -164,25 +166,15 @@ public: protected: + // Store the FEB -> ChannelVector mapping twice: once as an ordered map + // (this will be used for iteration) and once as an unordered_map + // (this will be used for fast lookup). ConditionsMap m_febMap; + ConditionsHashMap m_febHashMap; + unsigned int m_gain; private: - - // Since the raw-data usually comes FEB-wise, we assume that - // subsequent calls to operator[] are likely to concern the same - // FEB. Therefore we cache an iterator to current FEB to save - // unnecessary map-lookups. The variable is mutable to allow - // caching inside of const objects (the content of the DetectorStore - // is usually const :-) - mutable ConstConditionsMapIterator m_curr_feb_it; - mutable bool m_feb_it_valid; - - //Similar variables, but non-const for writing - mutable ConditionsMapIterator m_curr_feb_it_write; - mutable bool m_feb_it_valid_write; - - //Dummy iterators to mark the beginning and the end of an empty container instance const iterator m_dummyIt; const const_iterator m_dummyConstIt; @@ -194,11 +186,7 @@ template<class T> inline LArConditionsContainerDB<T>::LArConditionsContainerDB(unsigned int gain) : - m_gain(gain), - m_curr_feb_it(m_febMap.end()), - m_feb_it_valid(false), - m_curr_feb_it_write(m_febMap.end()), - m_feb_it_valid_write(false) + m_gain(gain) {} @@ -577,44 +565,41 @@ inline void LArConditionsContainerDB<T>::set(const FebId febId, const int channel, const T& payload) { - // Set the payload for FEB ID + channel - if (!m_feb_it_valid_write || m_curr_feb_it_write->first != febId) { - - // Must lookup febId again - m_curr_feb_it_write = m_febMap.find(febId); - if (m_curr_feb_it_write == m_febMap.end()) { - // Should never get here - std::cout << "LArConditionsContainerDB<T>::set ERROR could not find FEB ID " - << febId << std::endl; - m_feb_it_valid_write = false; - return; - } - m_feb_it_valid_write = true; - } - - // Set payload - (*(m_curr_feb_it_write->second))[channel] = payload; + typename ConditionsHashMap::iterator it = m_febHashMap.find (febId); + if (it == m_febHashMap.end()) { + // Should never get here + std::cout << "LArConditionsContainerDB<T>::set ERROR could not find FEB ID " + << febId << std::endl; + return; + } + // Set payload + (*(it->second))[channel] = payload; } + template<class T> inline typename LArConditionsContainerDB<T>::ConstReference LArConditionsContainerDB<T>::get(const FebId febId, const int channel) const { - if (!m_feb_it_valid || m_curr_feb_it->first!=febId) { - // no feb iterator cached or not valid any more - m_curr_feb_it = m_febMap.find(febId); - if (m_curr_feb_it == m_febMap.end()) { //Unknown FEB - m_feb_it_valid = false; - return Traits::empty(); - } - m_feb_it_valid=true; + // The get/set methods used to cache the iterator in m_febMap where the + // last access was found. That, however, is not at all thread-safe + // (and was in fact observed to lead to incorrect results in MT jobs). + // We need to get rid of the caching, but we'll also introduce + // m_febHashMap to try to reduce the lookup overhead. + // If this turns out to be a hot spot, then the iterator could + // be returned to the caller via a cookie. + typename ConditionsHashMap::const_iterator it = m_febHashMap.find (febId); + if (it == m_febHashMap.end()) { + // Unknown FEB + return Traits::empty(); } + const ChannelVector& vec = *it->second; // First check the size - channel vec may be empty - if ((*(m_curr_feb_it->second)).size()) { - return ((*(m_curr_feb_it->second))[channel]); + if (channel < static_cast<int>(vec.size())) { + return vec[channel]; } else { return Traits::empty(); @@ -626,37 +611,23 @@ inline typename LArConditionsContainerDB<T>::Reference LArConditionsContainerDB<T>::getNonConst(const FebId febId, const int channel) { - if (!m_feb_it_valid_write || m_curr_feb_it_write->first != febId) { - // no feb iterator cached or not valid any more - - m_curr_feb_it_write = m_febMap.find(febId); - if (m_curr_feb_it_write == m_febMap.end()) {//Unknown FEB - m_feb_it_valid_write = false; - return (Traits::empty()); - } - m_feb_it_valid_write = true; - } + typename ConditionsHashMap::iterator it = m_febHashMap.find (febId); + if (it == m_febHashMap.end()) { + // Unknown FEB + return Traits::empty(); + } + + ChannelVector& vec = *it->second; // Note: channel vec should always be full for non-const access - return ((*(m_curr_feb_it_write->second))[channel]); + return vec[channel]; } template<class T> inline bool -LArConditionsContainerDB<T>::exist(FebId id) +LArConditionsContainerDB<T>::exist(FebId id) const { - if (m_feb_it_valid_write && m_curr_feb_it_write->first == id) { - return (true); - } - m_curr_feb_it_write = m_febMap.find(id); - if (m_curr_feb_it_write == m_febMap.end()) { - m_feb_it_valid_write = false; - return (false); - } - else { - m_feb_it_valid_write = true; - return (true); - } + return m_febHashMap.find (id) != m_febHashMap.end(); } template<class T> @@ -690,14 +661,10 @@ void LArConditionsContainerDB<T>::add(const LArConditionsContainerDB<T>* p) // copy the data to this container. FEB by FEB. // if FEB id exist, the old data will be overwritten. - const ConditionsMap& febs = p->m_febMap; - ConstConditionsMapIterator it = febs.begin(); - ConstConditionsMapIterator it_e = febs.end(); - for( ;it!=it_e;++it) - { - m_febMap[(*it).first]=(*it).second ; - } - return ; + for (const auto& pp : p->m_febMap) { + m_febMap[pp.first] = pp.second; + m_febHashMap[pp.first] = pp.second; + } } template<class T> @@ -706,8 +673,7 @@ void LArConditionsContainerDB<T>::add(FebId id, ChannelVectorPointer channelVec) { m_febMap[id] = channelVec; - // Map got reorganized, cached iterator maybe not valid any more. - m_feb_it_valid = false; + m_febHashMap[id] = channelVec; } template<class T> @@ -716,6 +682,7 @@ void LArConditionsContainerDB<T>::erase(FebId id) { m_febMap.erase(id); + m_febHashMap.erase(id); } -- GitLab From cba029b4e59a0508d51e4f91cd8320dc4dcf4355 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Mon, 4 Jun 2018 21:46:52 +0200 Subject: [PATCH 031/562] First version of the MET alg and tool Former-commit-id: c2da79d2dc459a8bb0fe024b620f1f6d8bc1b6d1 --- .../TrigEFMissingET/CMakeLists.txt | 6 + .../TrigEFMissingET/share/testMET.py | 57 +++++++++ .../TrigEFMissingET/src/EFMissingETAlgMT.cxx | 95 ++++++++++++++ .../TrigEFMissingET/src/EFMissingETAlgMT.h | 43 +++++++ .../src/EFMissingETFromCellsMT.cxx | 117 ++++++++++++++++++ .../src/EFMissingETFromCellsMT.h | 59 +++++++++ .../TrigEFMissingET/src/IMissingETTool.h | 35 ++++++ .../components/TrigEFMissingET_entries.cxx | 4 + .../TrigEFMissingET/test/test_met_fexes.sh | 5 + 9 files changed, 421 insertions(+) create mode 100644 Trigger/TrigAlgorithms/TrigEFMissingET/share/testMET.py create mode 100644 Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETAlgMT.cxx create mode 100644 Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETAlgMT.h create mode 100644 Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.cxx create mode 100644 Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.h create mode 100644 Trigger/TrigAlgorithms/TrigEFMissingET/src/IMissingETTool.h create mode 100755 Trigger/TrigAlgorithms/TrigEFMissingET/test/test_met_fexes.sh diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigEFMissingET/CMakeLists.txt index 429d944448d0..cb8f0088e3b3 100644 --- a/Trigger/TrigAlgorithms/TrigEFMissingET/CMakeLists.txt +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/CMakeLists.txt @@ -65,3 +65,9 @@ atlas_add_component( TrigEFMissingET # Install files from the package: atlas_install_python_modules( python/*.py ) +atlas_install_joboptions( share/*.py ) + +atlas_add_test( METFexes + SCRIPT test/test_met_fexes.sh + PROPERTIES TIMEOUT 500 + ) diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/share/testMET.py b/Trigger/TrigAlgorithms/TrigEFMissingET/share/testMET.py new file mode 100644 index 000000000000..468ea41cd637 --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/share/testMET.py @@ -0,0 +1,57 @@ +# +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# + +include("TrigUpgradeTest/testHLT_MT.py") + +from AthenaCommon.AlgSequence import AlgSequence +topSequence = AlgSequence() + +isData = False +if globalflags.InputFormat.is_bytestream(): + isData = True + + + +import math +from TrigT2CaloCommon.TrigT2CaloCommonConf import TrigCaloDataAccessSvc#, TestCaloDataAccess +from AthenaMonitoring.GenericMonitoringTool import GenericMonitoringTool, defineHistogram + +mon = GenericMonitoringTool("CaloDataAccessSvcMon") +mon.Histograms += [defineHistogram( "TIME_locking_LAr_RoI", title="Time spent in unlocking the LAr collection", xbins=100, xmin=0, xmax=100 ), + defineHistogram( "roiROBs_LAr", title="Number of ROBs unpacked in RoI requests", xbins=20, xmin=0, xmax=20 ), + defineHistogram( "TIME_locking_LAr_FullDet", title="Time spent in unlocking the LAr collection", xbins=100, xmin=0, xmax=100 ), + defineHistogram( "roiEta_LAr,roiPhi_LAr", type="TH2F", title="Geometric usage", xbins=50, xmin=-5, xmax=5, ybins=64, ymin=-math.pi, ymax=math.pi )] + +svcMgr += TrigCaloDataAccessSvc() +svcMgr.TrigCaloDataAccessSvc.MonTool = mon +svcMgr.TrigCaloDataAccessSvc.OutputLevel=INFO + +from TrigCaloRec.TrigCaloRecConf import HLTCaloCellMaker +cellMakerAlgo = HLTCaloCellMaker("CellMakerMT", roiMode=True) +cellMakerAlgo.RoIs="METRoIs" +cellMakerAlgo.OutputLevel=VERBOSE +cellMakerAlgo.CellsName="cells" +topSequence += cellMakerAlgo + +from TrigEFMissingET.TrigEFMissingETConf import EFMissingETAlgMT, EFMissingETFromCellsMT + +cellTool = EFMissingETFromCellsMT( name="METFromCellsTool" ) +cellTool.CellsCollection = "cells" + +metAlg = EFMissingETAlgMT( name="EFMET" ) +metAlg.METTools=[ cellTool ] +metAlg += cellTool +topSequence += metAlg + +# from TrigCaloRec.TrigCaloRecConfig import TrigCaloClusterMakerMT_topo + +# # clusterMakerAlgo = TrigCaloClusterMakerMT_topo(name="ClustermakerMT_topo",cells="cells",doMoments=True,doLC=True) +# # Get conditions error using TrigLocalCalib tool, so set doLC=False +# clusterMakerAlgo = TrigCaloClusterMakerMT_topo(name="ClustermakerMT_topo",cells="cells",doMoments=True,doLC=False) +# clusterMakerAlgo.OutputLevel=VERBOSE +# topSequence += clusterMakerAlgo + +# print ToolSvc + + diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETAlgMT.cxx b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETAlgMT.cxx new file mode 100644 index 000000000000..c112085c3e34 --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETAlgMT.cxx @@ -0,0 +1,95 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ +#include <cmath> +#include "xAODTrigMissingET/TrigMissingETAuxContainer.h" +#include "TrigEFMissingET/EFMissingETHelper.h" +#include "AthenaMonitoring/MonitoredScope.h" +#include "EFMissingETAlgMT.h" + + + +EFMissingETAlgMT::EFMissingETAlgMT( const std::string& name, + ISvcLocator* pSvcLocator ) + : AthReentrantAlgorithm( name, pSvcLocator ) {} + +EFMissingETAlgMT::~EFMissingETAlgMT() {} + +StatusCode EFMissingETAlgMT::initialize() { + CHECK( m_metTools.retrieve() ); + CHECK( m_metContainerKey.initialize() ); + CHECK( m_monTool.retrieve() ); + return StatusCode::SUCCESS; +} + + +//!< Converts from MeV to GeV and them log10, preserving the sign, the minimum dictated by monitoring histograms +double toLogGeV( double x, double fallback = 0, double epsilon = 1.189 ) { + const double absXGeV = std::fabs( x * 1.e-3 ); + if ( absXGeV < epsilon ) + return fallback; + return std::copysign( std::log10( absXGeV ), x ); +} + +//!< converts to from MeV to GeV if above threshold, else falback value +double toLinGeV( double x, double fallback = 0, double epsilon = 1e-6 ) { + const double xGeV = x * 1.e-3; + if ( xGeV < epsilon ) + return fallback; + return xGeV; +} + + +StatusCode EFMissingETAlgMT::execute_r( const EventContext& context ) const { + ATH_MSG_DEBUG ( "Executing " << name() << "..." ); + using namespace Monitored; + auto totalTimer = MonitoredTimer::declare( "Total" ); + auto loopTimer = MonitoredTimer::declare( "Loop" ); + + auto metContainer = std::make_unique<xAOD::TrigMissingETContainer>(); + auto metAuxContainer = std::make_unique<xAOD::TrigMissingETAuxContainer>(); + metContainer->setStore( metAuxContainer.get() ); + + auto met = new xAOD::TrigMissingET(); + metContainer->push_back( met ); + + TrigEFMissingEtHelper metHelper(42); + + loopTimer.start(); + for ( auto& t: m_metTools ) { + ATH_MSG_DEBUG( "Invoking tool " << t->name() << " to update the MET obejct" ); + t->update( met, &metHelper ); + } + loopTimer.stop(); + + + auto EF_MEx_log = MonitoredScalar::declare( "EF_MEx_log", toLogGeV( met->ex() ) ); + auto EF_MEy_log = MonitoredScalar::declare( "EF_MEy_log", toLogGeV( met->ey() ) ); + auto EF_MEz_log = MonitoredScalar::declare( "EF_MEz_log", toLogGeV( met->ez() ) ); + auto EF_MET_log = MonitoredScalar::declare( "EF_MET_log", toLogGeV( std::hypot( met->ex(), met->ey() ) ) ); + auto EF_ME_log = MonitoredScalar::declare( "EF_ME_log", toLogGeV( std::hypot( std::hypot(met->ex(), met->ey()), met->ez() ) ) ); + auto EF_SumEt_log = MonitoredScalar::declare( "EF_SumEt_log", toLogGeV( met->sumEt() ) ); + auto EF_SumE_log = MonitoredScalar::declare( "EF_SumE_log", toLogGeV( met->sumE(), -9e9 ) ); + + auto EF_MEx_lin = MonitoredScalar::declare( "EF_MEx_lin", toLinGeV( met->ex() ) ); + auto EF_MEy_lin = MonitoredScalar::declare( "EF_MEy_lin", toLinGeV( met->ey() ) ); + auto EF_MEz_lin = MonitoredScalar::declare( "EF_MEz_lin", toLinGeV( met->ez() ) ); + auto EF_MET_lin = MonitoredScalar::declare( "EF_MET_lin", toLinGeV( std::hypot( met->ex(), met->ey() ) ) ); + auto EF_ME_lin = MonitoredScalar::declare( "EF_ME_lin", toLinGeV( std::hypot( std::hypot(met->ex(), met->ey()), met->ez() ) ) ); + auto EF_SumEt_lin = MonitoredScalar::declare( "EF_SumEt_lin", toLinGeV( met->sumEt() ) ); + auto EF_SumE_lin = MonitoredScalar::declare( "EF_SumE_lin", toLinGeV( met->sumE(), -9e9 ) ); + auto EF_XS = MonitoredScalar::declare( "EF_XS", toLinGeV( std::hypot( met->ex(), met->ey() ) ) / toLinGeV( met->sumEt() ) ); + auto EF_MET_phi = MonitoredScalar::declare( "EF_MET_phi", std::atan2( met->ey(), met->ex() ) ); + + auto monitorIt = MonitoredScope::declare( m_monTool, + totalTimer, loopTimer, + EF_MEx_log, EF_MEy_log, EF_MEz_log, EF_MET_log, EF_ME_log, EF_ME_log, EF_SumE_log, + EF_MEx_lin, EF_MEy_lin, EF_MEz_lin, EF_MET_lin, EF_ME_lin, EF_SumEt_lin, EF_SumE_lin, + EF_XS, EF_MET_phi); + + auto handle = SG::makeHandle( m_metContainerKey, context ); + CHECK( handle.record( std::move( metContainer ), std::move ( metAuxContainer ) ) ); + return StatusCode::SUCCESS; +} + + diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETAlgMT.h b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETAlgMT.h new file mode 100644 index 000000000000..d281a585ee44 --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETAlgMT.h @@ -0,0 +1,43 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ +#ifndef TRIGEFMISSINGET_EFMISSINGETALGMT_H +#define TRIGEFMISSINGET_EFMISSINGETALGMT_H 1 + +#include <string> +#include "GaudiKernel/Property.h" +#include "AthenaBaseComps/AthReentrantAlgorithm.h" +#include "AthenaMonitoring/GenericMonitoringTool.h" +#include "xAODTrigMissingET/TrigMissingETContainer.h" + +#include "./IMissingETTool.h" + + +/** + * @class HLT MET algorithm + * @brief It is responsible for creation of the MET object and execution of number of MET tools filling it + **/ + +class EFMissingETAlgMT : public ::AthReentrantAlgorithm +{ + public: + + EFMissingETAlgMT( const std::string& name, ISvcLocator* pSvcLocator ); + + virtual ~EFMissingETAlgMT(); + + + //EFMissingETMT &operator=(const EFMissingETMT &alg); + + virtual StatusCode initialize() override; + virtual StatusCode execute_r(const EventContext& context) const override; + + private: + + SG::WriteHandleKey<xAOD::TrigMissingETContainer> m_metContainerKey { this, "METContainerKey", "HLT_MET", "Name of the output collection" }; + ToolHandleArray<IMissingETTool> m_metTools { this, "METTools", {}, "Tools to fille MET object" }; + ToolHandle<GenericMonitoringTool> m_monTool{ this, "MonTool", "", "Monitoring tool" }; +}; + + +#endif //> !TRIGEFMISSINGET_EFMISSINGETMT_H diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.cxx b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.cxx new file mode 100644 index 000000000000..60c16a34faba --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.cxx @@ -0,0 +1,117 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ +// FrameWork includes +#include "AthenaMonitoring/MonitoredScope.h" +#include "GaudiKernel/IToolSvc.h" + +// TrigEFMissingET includes +#include "EFMissingETFromCellsMT.h" + + +EFMissingETFromCellsMT::EFMissingETFromCellsMT( const std::string& type, + const std::string& name, + const IInterface* parent ) + : base_class( type, name, parent ) { + //declareProperty( "Property", m_nProperty ); +} + +StatusCode EFMissingETFromCellsMT::initialize() +{ + ATH_MSG_INFO ("Initializing " << name() << "..."); + CHECK( m_cellsKey.initialize() ); + + m_maxThreshold = m_rmsOneSided; + if ( m_rmsOneSided < fabsf( m_rmsTwoSided ) ) m_maxThreshold = fabsf( m_rmsTwoSided ); + + return StatusCode::SUCCESS; +} + +StatusCode EFMissingETFromCellsMT::update( xAOD::TrigMissingET */*met*/, + TrigEFMissingEtHelper *metHelper ) const { + using namespace Monitored; + auto totalTimer = MonitoredTimer::declare( "Total" ); + const EventContext context{ Gaudi::Hive::currentContext() }; + auto caloCellsHandle = SG::makeHandle( m_cellsKey ); + + auto loopTimer = MonitoredTimer::declare( "Loop" ); + auto countUsedCells = MonitoredScalar::declare<unsigned>( "UsedCells", 0 ); + + // now it is time to iterate over the cells + for ( const CaloCell* cell: *caloCellsHandle ) { + const CaloDetDescrElement* cDDE = cell->caloDDE(); + if (cDDE == 0) { + ATH_MSG_WARNING( "cannot get CaloDetDescrElement from cell " << cell->ID() ); + continue; + } + + TrigEFMissingEtComponent *metComp = metHelper->GetComponent( cDDE->getSampling() ); + if (metComp == 0) { + ATH_MSG_FATAL( "Cannot find calo sampling!" ); + return StatusCode::FAILURE; + } + + //TB not sure about skipping logic, looks incorrect in the original code + // + + if ( m_noiseTool ) { // == noise suppression required + const bool noiseCutPassed = true; // noiseCut( cell ); + if ( not noiseCutPassed ) + continue; + } + + countUsedCells = countUsedCells + 1; + + double E = cell->e(); + double et = E * cDDE->sinTh(); + double ez = E * cDDE->cosTh(); + double sinPhi = cDDE->sinPhi(); + double cosPhi = cDDE->cosPhi(); + metComp->m_ex -= et*cosPhi; + metComp->m_ey -= et*sinPhi; + metComp->m_ez -= ez; + metComp->m_sumEt += et; + metComp->m_sumE += E; + metComp->m_usedChannels += 1; + + if( cell->quality() > m_MaxLArQ ) metComp->m_sumBadEt += et; + // if (BSerrors) metComp->m_status |= m_maskErrBSconv; // | m_maskCompErrors; + metComp->m_sumOfSigns += static_cast<short int>(floor(copysign(1.0,E) + 0.5)); + + // 5. auxiliary quantities for robustness checks + if ( not m_makeRobustness) continue; + if ( not m_doCellNoiseSupp || (m_doCellNoiseSupp && + m_MinCellSNratio[cDDE->getSampling()] > m_maxThreshold)) { + if (fabs(E) < m_MinCellSNratio[cDDE->getSampling()] * + m_noiseTool->getNoise( cell, ICalorimeterNoiseTool::TOTALNOISE)) + continue; + } + + float time = cell->time() * 1e-3; // ns + float quality = cell->quality(); + if (time < metComp->m_minTime) metComp->m_minTime = time; + if (time > metComp->m_maxTime) metComp->m_maxTime = time; + if (quality > metComp->m_maxQlty) metComp->m_maxQlty = quality; + if (E < metComp->m_minE) metComp->m_minE = E; + if (E > metComp->m_maxE) metComp->m_maxE = E; + + } + + return StatusCode::SUCCESS; +} + + + + + + + + + + + + + + + + diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.h b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.h new file mode 100644 index 000000000000..eab14e2f0ac5 --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.h @@ -0,0 +1,59 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ +#ifndef TRIGEFMISSINGET_EFMISSINGETFROMCELLSMT_H +#define TRIGEFMISSINGET_EFMISSINGETFROMCELLSMT_H 1 + +// FrameWork includes +#include "AthenaBaseComps/AthAlgTool.h" +#include "GaudiKernel/ServiceHandle.h" + +#include "CaloEvent/CaloCellContainer.h" +#include "CaloInterface/ICalorimeterNoiseTool.h" + +// TrigEFMissingET includes +#include "./IMissingETTool.h" + + + +/** + * @class Tool for calculations of MET from bare cells + * @brief + **/ + +class EFMissingETFromCellsMT: public extends<AthAlgTool, IMissingETTool> { + + public: + + EFMissingETFromCellsMT( const std::string& type, + const std::string& name, + const IInterface* parent ); + + virtual ~EFMissingETFromCellsMT(){} + + virtual StatusCode initialize(); + + virtual StatusCode update( xAOD::TrigMissingET *met, + TrigEFMissingEtHelper *metHelper ) const override; + + private: + EFMissingETFromCellsMT(); + + Gaudi::Property<bool>m_doCellNoiseSupp { this, "DoCellNoiseSuppression", false, "switch on/off cell noise suppression" }; + Gaudi::Property<bool>m_useFullColl { this, "useFullCollection", true, "switch on/off fast access via LoadFullCollection" }; + Gaudi::Property<bool>m_makeRobustness { this, "makeRobustness", true , "switch on/off robustness checks" }; + Gaudi::Property<float>m_rmsOneSided { this, "CaloNoiseOneSidedCut", 3.0, "1-sided noise suppression (unit = rms }" }; + Gaudi::Property<float>m_rmsTwoSided { this, "CaloNoiseTwoSidedCut", 2.0, "2-sided noise suppression (unit = rms }" }; + float m_maxThreshold; //<! maximum between the previous ones + Gaudi::Property<int>m_MaxLArQ { this, "MaxLArQ", 4000, "Max Q LAr Cell value" }; + Gaudi::Property<int>m_MaxTileQ { this, "MaxTileQ", 254, "Max Q Tile Cell value" }; + Gaudi::Property<std::vector<float> >m_MinCellSNratio { this, "MinCellSNratio", std::vector<float>(24, 3.0), "(vector) min cell |energy|/rms for robustness checks" }; + + SG::ReadHandleKey<CaloCellContainer> m_cellsKey { this, "CellsCollection", "CaloCells", "Collection containg all cels" }; + + ToolHandle<ICalorimeterNoiseTool> m_noiseTool { this, "CaloNoiseTool", "", "Tool Handle for noise tool" }; + +}; + + +#endif //> !TRIGEFMISSINGET_EFMISSINGETFROMCELLSMT_H diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/IMissingETTool.h b/Trigger/TrigAlgorithms/TrigEFMissingET/src/IMissingETTool.h new file mode 100644 index 000000000000..d8bb4431adcc --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/IMissingETTool.h @@ -0,0 +1,35 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ +#ifndef TRIGEFMISSINGET_IMISSINGETTOOL_H +#define TRIGEFMISSINGET_IMISSINGETTOOL_H 1 + +#include "GaudiKernel/IAlgTool.h" + +#include "TrigEFMissingET/EFMissingETHelper.h" +#include "xAODTrigMissingET/TrigMissingET.h" + +/** + * @class Adds info the the missing ET object + * @brief Specific implementations may use various input data types + **/ + +class IMissingETTool : virtual public ::IAlgTool { + +public: + DeclareInterfaceID( IMissingETTool, 1, 0 ); + virtual ~IMissingETTool(){} + + /** + * a method to update the met object (and met helper object) + * The API deliberately does not include EventContext as it is only needed + * in one implementation when input is not taken from the regular store. + **/ + virtual StatusCode update( xAOD::TrigMissingET *met, + TrigEFMissingEtHelper *metHelper ) const = 0; + +}; + + + +#endif //> !TRIGEFMISSINGET_IMISSINGETTOOL_H diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/components/TrigEFMissingET_entries.cxx b/Trigger/TrigAlgorithms/TrigEFMissingET/src/components/TrigEFMissingET_entries.cxx index 0363d82acd34..40f5811c903f 100644 --- a/Trigger/TrigAlgorithms/TrigEFMissingET/src/components/TrigEFMissingET_entries.cxx +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/components/TrigEFMissingET_entries.cxx @@ -10,6 +10,8 @@ //#include "TrigEFMissingET/EFMissingETFromLvl1Ppr.h" #include "TrigEFMissingET/EFMissingETFlags.h" #include "TrigEFMissingET/EFMissingETFromHelper.h" +#include "../EFMissingETAlgMT.h" +#include "../EFMissingETFromCellsMT.h" DECLARE_COMPONENT( EFMissingET ) DECLARE_COMPONENT( EFMissingETBaseTool ) @@ -23,4 +25,6 @@ DECLARE_COMPONENT( EFMissingETFromTrackAndJets ) //DECLARE_COMPONENT( EFMissingETFromLvl1Ppr ) DECLARE_COMPONENT( EFMissingETFlags ) DECLARE_COMPONENT( EFMissingETFromHelper ) +DECLARE_COMPONENT( EFMissingETAlgMT ) +DECLARE_COMPONENT( EFMissingETFromCellsMT ) diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/test/test_met_fexes.sh b/Trigger/TrigAlgorithms/TrigEFMissingET/test/test_met_fexes.sh new file mode 100755 index 000000000000..56bb5d608451 --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/test/test_met_fexes.sh @@ -0,0 +1,5 @@ +#!/bin/sh +# art-type: build +# art-ci: master + +athena --threads=1 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigEFMissingET/testMET.py \ No newline at end of file -- GitLab From 0a6bdb543db0cdb037eec6ff3a3372bcfdb1ecbd Mon Sep 17 00:00:00 2001 From: Susumu Oda <Susumu.Oda@cern.ch> Date: Tue, 5 Jun 2018 07:25:06 +0200 Subject: [PATCH 032/562] More fixes Former-commit-id: bbed8e1662cdae2acdbfd84fd848111c33d52209 --- .../InDetEventAthenaPool/CMakeLists.txt | 3 +- .../src/SCT_FlaggedCondDataCnv.cxx | 35 +++++++++++++++++++ .../src/SCT_FlaggedCondDataCnv.h | 35 +++++++++++++++++++ 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_FlaggedCondDataCnv.cxx create mode 100644 InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_FlaggedCondDataCnv.h diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/CMakeLists.txt b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/CMakeLists.txt index 7a79c4fdb8c1..1ec9b8c3009e 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/CMakeLists.txt +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/CMakeLists.txt @@ -43,12 +43,13 @@ atlas_add_poolcnv_library( InDetEventAthenaPoolPoolCnv InDetSimData/InDetSimDataCollection.h InDetLowBetaInfo/InDetLowBetaCandidate.h InDetLowBetaInfo/InDetLowBetaContainer.h + SCT_ConditionsData/SCT_FlaggedCondData.h TYPES_WITH_NAMESPACE InDet::InDetLowBetaCandidate LINK_LIBRARIES Identifier GeneratorObjectsTPCnv AthAllocators AthContainers AthenaBaseComps AthenaKernel SGTools StoreGateLib AthenaPoolCnvSvcLib AthenaPoolUtilities AtlasSealCLHEP GaudiKernel InDetIdentifier InDetReadoutGeometry InDetEventTPCnv InDetRawData InDetSimData - InDetLowBetaInfo InDetPrepRawData TrkTrack ) + InDetLowBetaInfo InDetPrepRawData SCT_ConditionsData TrkTrack ) atlas_add_dictionary( InDetEventAthenaPoolCnvDict InDetEventAthenaPool/InDetEventAthenaPoolCnvDict.h diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_FlaggedCondDataCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_FlaggedCondDataCnv.cxx new file mode 100644 index 000000000000..7da4c7c5c11a --- /dev/null +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_FlaggedCondDataCnv.cxx @@ -0,0 +1,35 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file SCT_FlaggedCondDataCnv.cxx + * @brief Generated implementation file which includes header files needed by SCT_FlaggedCondDataCnv + * @author Susumu Oda <Susumu.Oda@cern.ch> + */ + +#include "SCT_FlaggedCondDataCnv.h" + +SCT_FlaggedCondData_PERS* +SCT_FlaggedCondDataCnv::createPersistent(SCT_FlaggedCondData* transCont) { + MsgStream log(msgSvc(), "SCT_FlaggedCondDataCnv"); + SCT_FlaggedCondDataCnv_p1 cnv; + SCT_FlaggedCondData_PERS *persObj = new SCT_FlaggedCondData_PERS(); + cnv.transToPers(transCont, persObj, log); + return persObj; +} + +SCT_FlaggedCondData* +SCT_FlaggedCondDataCnv::createTransient() { + MsgStream log(msgSvc(), "SCT_FlaggedCondDataCnv"); + static pool::Guid p1_guid("0C10E502-F02B-440B-9E8F-6A8C31915D7C"); + if( compareClassGuid(p1_guid) ) { + /** using auto_ptr ensures deletion of the persistent object */ + std::auto_ptr<SCT_FlaggedCondData_p1> col_vect( poolReadObject< SCT_FlaggedCondData_p1 >() ); + SCT_FlaggedCondDataCnv_p1 cnv; + SCT_FlaggedCondData* trasnObj = new SCT_FlaggedCondData(); + cnv.persToTrans(col_vect.get(), trasnObj, log); + return trasnObj; + } + throw std::runtime_error("Unsupported persistent version of Data Collection"); +} diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_FlaggedCondDataCnv.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_FlaggedCondDataCnv.h new file mode 100644 index 000000000000..f4da431859ea --- /dev/null +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_FlaggedCondDataCnv.h @@ -0,0 +1,35 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file SCT_FlaggedCondDataCnv.h + * @brief Header file which defines a typedef for templated converter class + * @author Susumu Oda <Susumu.Oda@cern.ch> + */ + +#ifndef SCT_FlaggedCondDataCnv_H +#define SCT_FlaggedCondDataCnv_H + +#include "AthenaPoolCnvSvc/T_AthenaPoolCnv.h" +#include "SCT_ConditionsData/SCT_FlaggedCondData.h" + +#include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h" +#include "InDetEventAthenaPool/SCT_FlaggedCondData_p1.h" +#include "SCT_FlaggedCondDataCnv_p1.h" + +typedef SCT_FlaggedCondData_p1 SCT_FlaggedCondData_PERS; +typedef T_AthenaPoolCustomCnv<SCT_FlaggedCondData, SCT_FlaggedCondData_PERS> SCT_FlaggedCondDataCnvBase; + +class SCT_FlaggedCondDataCnv : public SCT_FlaggedCondDataCnvBase { +friend class CnvFactory<SCT_FlaggedCondDataCnv>; +public: + SCT_FlaggedCondDataCnv(ISvcLocator* svcloc) : SCT_FlaggedCondDataCnvBase(svcloc) {} +protected: + virtual SCT_FlaggedCondData_PERS* createPersistent(SCT_FlaggedCondData* transCont); + virtual SCT_FlaggedCondData* createTransient(); + + SCT_FlaggedCondDataCnv_p1 m_TPConverter; +}; + +#endif // SCT_FlaggedCondDataCnv_H -- GitLab From 0c97b6cec19dde81905585b923b72de06ea5d8b0 Mon Sep 17 00:00:00 2001 From: Susumu Oda <Susumu.Oda@cern.ch> Date: Tue, 5 Jun 2018 08:52:07 +0200 Subject: [PATCH 033/562] Change the condition to save SCT_FlaggedCondData Former-commit-id: 19009a650d8a5abaabdd7389053c91e10e575f53 --- .../InDetExample/InDetRecExample/share/WriteInDetESD.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/InnerDetector/InDetExample/InDetRecExample/share/WriteInDetESD.py b/InnerDetector/InDetExample/InDetRecExample/share/WriteInDetESD.py index 7a9b04514efe..c9f4baffc9ab 100755 --- a/InnerDetector/InDetExample/InDetRecExample/share/WriteInDetESD.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/WriteInDetESD.py @@ -33,6 +33,8 @@ elif InDetFlags.writePRDs(): InDetESDList+=["InDet::PixelGangedClusterAmbiguities#"+InDetKeys.GangedPixelMap()] if InDetFlags.doPixelClusterSplitting(): InDetESDList+=["InDet::PixelGangedClusterAmbiguities#"+InDetKeys.SplitClusterAmbiguityMap()] + # Save SCT_FlaggedCondData for SCT_FlaggedConditionTool + InDetESDList+=['SCT_FlaggedCondData#'+'SCT_FlaggedCondData'] # add tracks # ---------- @@ -130,7 +132,6 @@ if globalflags.InputFormat()=='bytestream': InDetESDList+=['TRT_BSErrContainer#'+InDetKeys.TRT_ByteStreamErrs()] InDetESDList+=['TRT_BSIdErrContainer#'+InDetKeys.TRT_ByteStreamIdErrs()] InDetESDList+=['SCT_ByteStreamFractionContainer#'+InDetKeys.SCT_ByteStreamFrac()] - InDetESDList+=['SCT_FlaggedCondData#'+'SCT_FlaggedCondData'] if InDetFlags.doxAOD(): excludedAuxData = "-caloExtension.-cellAssociation.-clusterAssociation." -- GitLab From df802993c5bbba895c901ff0508aad7649be6a43 Mon Sep 17 00:00:00 2001 From: Alan Watson <Alan.Watson@cern.ch> Date: Tue, 5 Jun 2018 15:01:05 +0200 Subject: [PATCH 034/562] Changes to enable more sophisticated eta masking in MET and TE triggers, bringing offline in line wih online system. Necessary for correct behaviour in MC and to avoid false error reports in monitoring. Similar changes are being collected for Tier 0, and probably P1 Former-commit-id: 8686d57f2a67dc43db6471f51261459a69db3627 --- .../TrigT1/TrigT1CaloSim/src/EnergyCMX.cxx | 33 ++++++++---- .../TrigT1CaloToolInterfaces/IL1EtTools.h | 12 ++--- .../TrigT1CaloTools/L1EnergyCMXTools.h | 6 +-- .../TrigT1CaloTools/L1EtTools.h | 12 ++--- .../TrigT1CaloTools/src/L1EnergyCMXTools.cxx | 52 +++++++++++-------- .../TrigT1/TrigT1CaloTools/src/L1EtTools.cxx | 24 ++++----- .../TrigT1CaloUtils/CrateEnergy.h | 4 +- .../TrigT1CaloUtils/src/CrateEnergy.cxx | 40 +++----------- 8 files changed, 90 insertions(+), 93 deletions(-) diff --git a/Trigger/TrigT1/TrigT1CaloSim/src/EnergyCMX.cxx b/Trigger/TrigT1/TrigT1CaloSim/src/EnergyCMX.cxx index 18f117a81f1f..74f9b1cb61fc 100755 --- a/Trigger/TrigT1/TrigT1CaloSim/src/EnergyCMX.cxx +++ b/Trigger/TrigT1/TrigT1CaloSim/src/EnergyCMX.cxx @@ -127,10 +127,13 @@ StatusCode EnergyCMX::execute( ) m_resultsFull = &resultsFull; /** Find restructed eta range. - * This will use the min/max values for any threshold in the range 9-16 to define the ranges + * This will use the min/max values for the first valid threshold in the range 9-16 to define the ranges */ - float etaTruncXE = 4.9; - float etaTruncTE = 4.9; + uint32_t maskXE = 0; + uint32_t maskTE = 0; + bool maskXESet = false; + bool maskTESet = false; + const float moduleEta[8] = {-4.,-2.,-1.2,-0.4,0.4,1.2,2.,4.}; L1DataDef def; std::vector<TriggerThreshold*> thresholds = m_configSvc->ctpConfig()->menu().thresholdVector(); @@ -140,14 +143,24 @@ StatusCode EnergyCMX::execute( ) if ( ( (*it)->type() == def.xeType() || (*it)->type() == def.teType()) && (*it)->thresholdNumber() > 7 ) { std::vector<TriggerThresholdValue*> ttvs = (*it)->thresholdValueVector(); std::vector<TriggerThresholdValue*>::const_iterator itv; + // Make sure only set masks from the first valid threshold in the range (for each type) + if (maskXE > 0) maskXESet = true; + if (maskTE > 0) maskTESet = true; for (itv = ttvs.begin(); itv != ttvs.end(); ++itv) { - if ( (*it)->type() == def.xeType() ) { - if ( abs((*itv)->etamin())*0.1 < etaTruncXE ) etaTruncXE = abs((*itv)->etamin())*0.1; - if ( abs((*itv)->etamax())*0.1 < etaTruncXE ) etaTruncXE = abs((*itv)->etamax())*0.1; + // Bits are set false by default, so ignore thresholds that are just doing that + if ((*itv)->thresholdValueCount() >= 0x7fff) continue; + // Set bits true if module centre between etaMin and etaMax + if ( (*it)->type() == def.xeType() && !maskXESet ) { + for (unsigned int bin = 0; bin < 8; ++bin) { + if (moduleEta[bin] > (*itv)->etamin()*0.1 && moduleEta[bin] < (*itv)->etamax()*0.1) + maskXE |= (1<<bin); + } } - else if ( (*it)->type() == def.teType() ) { - if ( abs((*itv)->etamin())*0.1 < etaTruncTE ) etaTruncTE = abs((*itv)->etamin())*0.1; - if ( abs((*itv)->etamax())*0.1 < etaTruncTE ) etaTruncTE = abs((*itv)->etamax())*0.1; + else if ( (*it)->type() == def.teType() && !maskTESet ) { + for (unsigned int bin = 0; bin < 8; ++bin) { + if (moduleEta[bin] > (*itv)->etamin()*0.1 && moduleEta[bin] < (*itv)->etamax()*0.1) + maskTE |= (1<<bin); + } } } // loop over TTV } // Is this XE or TE threshold? @@ -155,7 +168,7 @@ StatusCode EnergyCMX::execute( ) // form crate sums (restricted eta range). Explicitly set restricted eta flag regardless of eta range DataVector<CrateEnergy>* cratesTrunc = new DataVector<CrateEnergy>; - m_EtTool->crateSums(jemContainer, cratesTrunc, etaTruncXE, etaTruncTE, true); + m_EtTool->crateSums(jemContainer, cratesTrunc, maskXE, maskTE, true); // system summation and threshold tests SystemEnergy resultsTrunc = m_EtTool->systemSums(cratesTrunc); m_resultsTrunc = &resultsTrunc; diff --git a/Trigger/TrigT1/TrigT1CaloToolInterfaces/TrigT1CaloToolInterfaces/IL1EtTools.h b/Trigger/TrigT1/TrigT1CaloToolInterfaces/TrigT1CaloToolInterfaces/IL1EtTools.h index 7e241bfe599c..ad87a8cf47ab 100755 --- a/Trigger/TrigT1/TrigT1CaloToolInterfaces/TrigT1CaloToolInterfaces/IL1EtTools.h +++ b/Trigger/TrigT1/TrigT1CaloToolInterfaces/TrigT1CaloToolInterfaces/IL1EtTools.h @@ -38,16 +38,16 @@ Interface definition for L1EtTools virtual void moduleSums(const xAOD::JetElementMap_t* jemap, DataVector<ModuleEnergy>* modules, int slice = -1) const = 0; virtual void crateSums(const DataVector<ModuleEnergy>* modules, - DataVector<CrateEnergy>* crates, float etaMaxXE = 5., float etaMaxTE = 5., bool restricted = false) const = 0 ; + DataVector<CrateEnergy>* crates, uint32_t maskXE = 0xff, uint32_t maskTE = 0xff, bool restricted = false) const = 0 ; virtual void crateSums(const DataVector<EnergyCMXData>* modules, - DataVector<CrateEnergy>* crates, float etaMaxXE = 5., float etaMaxTE = 5., bool restricted = false) const = 0 ; + DataVector<CrateEnergy>* crates, uint32_t maskXE = 0xff, uint32_t maskTE = 0xff, bool restricted = false) const = 0 ; virtual void crateSums(const xAOD::JetElementContainer* jetelements, - DataVector<CrateEnergy>* crates, int slice = -1, float etaMaxXE = 5., float etaMaxTE = 5., bool restricted = false) const = 0; + DataVector<CrateEnergy>* crates, int slice = -1, uint32_t maskXE = 0xff, uint32_t maskTE = 0xff, bool restricted = false) const = 0; virtual void crateSums(const xAOD::JetElementMap_t* jemap, - DataVector<CrateEnergy>* crates, int slice = -1, float etaMaxXE = 5., float etaMaxTE = 5., bool restricted = false) const = 0; + DataVector<CrateEnergy>* crates, int slice = -1, uint32_t maskXE = 0xff, uint32_t maskTE = 0xff, bool restricted = false) const = 0; virtual SystemEnergy systemSums(const DataVector<CrateEnergy>* crates) const = 0; - virtual SystemEnergy systemSums(const xAOD::JetElementContainer* jetelements, int slice = -1, float etaMaxXE = 5., float etaMaxTE = 5., bool restricted = false) const = 0; - virtual SystemEnergy systemSums(const xAOD::JetElementMap_t* jemap, int slice = -1, float etaMaxXE = 5., float etaMaxTE = 5., bool restricted = false) const = 0; + virtual SystemEnergy systemSums(const xAOD::JetElementContainer* jetelements, int slice = -1, uint32_t maskXE = 0xff, uint32_t maskTE = 0xff, bool restricted = false) const = 0; + virtual SystemEnergy systemSums(const xAOD::JetElementMap_t* jemap, int slice = -1, uint32_t maskXE = 0xff, uint32_t maskTE = 0xff, bool restricted = false) const = 0; }; diff --git a/Trigger/TrigT1/TrigT1CaloTools/TrigT1CaloTools/L1EnergyCMXTools.h b/Trigger/TrigT1/TrigT1CaloTools/TrigT1CaloTools/L1EnergyCMXTools.h index 3387336d4ac3..5419d6829535 100644 --- a/Trigger/TrigT1/TrigT1CaloTools/TrigT1CaloTools/L1EnergyCMXTools.h +++ b/Trigger/TrigT1/TrigT1CaloTools/TrigT1CaloTools/L1EnergyCMXTools.h @@ -115,7 +115,7 @@ class L1EnergyCMXTools : virtual public IL1EnergyCMXTools, public AthAlgTool /** Convert maps from internal SystemEnergy objects to CMXEtSums objects */ void etMapsToEtSums(const MultiSliceSystemEnergy &systemVec, xAOD::CMXEtSumsContainer *cmxEtSumsVec, int peak) const; - void findRestrictedEta(float &etaTruncXE, float &etaTruncTE) const; + void findRestrictedEta(uint32_t &maskXE, uint32_t &maskTE) const; /** trigger configuration service */ ServiceHandle<TrigConf::ITrigConfigSvc> m_configSvc; /** Tool for JetElement map */ @@ -127,8 +127,8 @@ class L1EnergyCMXTools : virtual public IL1EnergyCMXTools, public AthAlgTool /** Find restructed eta range. * This will use the min/max values for any threshold in the range 9-16 to define the ranges */ - float m_etaTruncXE; - float m_etaTruncTE; + uint32_t m_maskXE; + uint32_t m_maskTE; }; } // end of namespace diff --git a/Trigger/TrigT1/TrigT1CaloTools/TrigT1CaloTools/L1EtTools.h b/Trigger/TrigT1/TrigT1CaloTools/TrigT1CaloTools/L1EtTools.h index 93404888476b..81e6dadf05eb 100755 --- a/Trigger/TrigT1/TrigT1CaloTools/TrigT1CaloTools/L1EtTools.h +++ b/Trigger/TrigT1/TrigT1CaloTools/TrigT1CaloTools/L1EtTools.h @@ -77,19 +77,19 @@ namespace LVL1 DataVector<ModuleEnergy>* modules, int slice = -1) const; /** Returns a vector of LVL1::CrateEnergy objects */ virtual void crateSums(const DataVector<ModuleEnergy>* modules, - DataVector<CrateEnergy>* crates, float etaMaxXE = 5., float etaMaxTE = 5., bool restricted = false) const; + DataVector<CrateEnergy>* crates, uint32_t maskXE = 0xff, uint32_t maskTE = 0xff, bool restricted = false) const; virtual void crateSums(const DataVector<EnergyCMXData>* modules, - DataVector<CrateEnergy>* crates, float etaMaxXE = 5., float etaMaxTE = 5., bool restricted = false) const; + DataVector<CrateEnergy>* crates, uint32_t maskXE = 0xff, uint32_t maskTE = 0xff, bool restricted = false) const; /** Directly obtain LVL1::CrateEnergy objects */ virtual void crateSums(const xAOD::JetElementContainer* jetelements, - DataVector<CrateEnergy>* crates, int slice = -1, float etaMaxXE = 5., float etaMaxTE = 5., bool restricted = false) const; + DataVector<CrateEnergy>* crates, int slice = -1, uint32_t maskXE = 0xff, uint32_t maskTE = 0xff, bool restricted = false) const; virtual void crateSums(const xAOD::JetElementMap_t* jemap, - DataVector<CrateEnergy>* crates, int slice = -1, float etaMaxXE = 5., float etaMaxTE = 5., bool restricted = false) const; + DataVector<CrateEnergy>* crates, int slice = -1, uint32_t maskXE = 0xff, uint32_t maskTE = 0xff, bool restricted = false) const; /** Returns a LVL1::SystemEnergy object */ virtual SystemEnergy systemSums(const DataVector<CrateEnergy>* crates) const; /** Directly obtain a LVL1::SystemEnergy object */ - virtual SystemEnergy systemSums(const xAOD::JetElementContainer* jetelements, int slice = -1, float etaMaxXE = 5., float etaMaxTE = 5., bool restricted = false) const; - virtual SystemEnergy systemSums(const xAOD::JetElementMap_t* jemap, int slice = -1, float etaMaxXE = 5., float etaMaxTE = 5., bool restricted = false) const; + virtual SystemEnergy systemSums(const xAOD::JetElementContainer* jetelements, int slice = -1, uint32_t maskXE = 0xff, uint32_t maskTE = 0xff, bool restricted = false) const; + virtual SystemEnergy systemSums(const xAOD::JetElementMap_t* jemap, int slice = -1, uint32_t maskXE = 0xff, uint32_t maskTE = 0xff, bool restricted = false) const; private: diff --git a/Trigger/TrigT1/TrigT1CaloTools/src/L1EnergyCMXTools.cxx b/Trigger/TrigT1/TrigT1CaloTools/src/L1EnergyCMXTools.cxx index 6c421738d7b2..3f01facc531b 100644 --- a/Trigger/TrigT1/TrigT1CaloTools/src/L1EnergyCMXTools.cxx +++ b/Trigger/TrigT1/TrigT1CaloTools/src/L1EnergyCMXTools.cxx @@ -77,10 +77,10 @@ StatusCode L1EnergyCMXTools::initialize() return sc; } - findRestrictedEta(m_etaTruncXE, m_etaTruncTE); - ATH_MSG_INFO("Restricted eta ranges etaTruncXE=" << m_etaTruncXE << " etaTruncTE=" << m_etaTruncTE); + findRestrictedEta(m_maskXE, m_maskTE); + ATH_MSG_DEBUG("Restricted eta masks: XE=" << MSG::hex << m_maskXE << ", TE=" << m_maskTE << MSG::dec); - ATH_MSG_INFO("Initialization completed"); + ATH_MSG_DEBUG("Initialization completed"); return sc; } @@ -201,10 +201,13 @@ void L1EnergyCMXTools::formCMXEtSumsModule( } /** form partial CMXEtSums (crate) from module CMXEtSums */ -void L1EnergyCMXTools::findRestrictedEta(float &etaTruncXE, float &etaTruncTE) const +void L1EnergyCMXTools::findRestrictedEta(uint32_t &maskXE, uint32_t &maskTE) const { - etaTruncXE = 4.9; - etaTruncTE = 4.9; + const float moduleEta[8] = {-4.,-2.,-1.2,-0.4,0.4,1.2,2.,4.}; + maskXE = 0; + maskTE = 0; + bool maskXESet = false; + bool maskTESet = false; TrigConf::L1DataDef def; @@ -212,21 +215,26 @@ void L1EnergyCMXTools::findRestrictedEta(float &etaTruncXE, float &etaTruncTE) c { if ((it->type() == def.xeType() || it->type() == def.teType()) && it->thresholdNumber() > 7) { + if (maskXE > 0) maskXESet = true; + if (maskTE > 0) maskTESet = true; for (auto itv : it->thresholdValueVector()) { - if (it->type() == def.xeType()) + // Already initialised mask to zero, so only need to check where threshold is active + if (itv->thresholdValueCount() >= 0x7fff) continue; + // Set bits for modules within the range of any restricted eta threshold + if (it->type() == def.xeType() && !maskXESet) { - if (abs(itv->etamin()) * 0.1 < etaTruncXE) - etaTruncXE = abs(itv->etamin()) * 0.1; - if (abs(itv->etamax()) * 0.1 < etaTruncXE) - etaTruncXE = abs(itv->etamax()) * 0.1; + for (unsigned int bin = 0; bin < 8; ++bin) { + if (moduleEta[bin] > itv->etamin()*0.1 && moduleEta[bin] < itv->etamax()*0.1) + maskXE |= (1<<bin); + } } - else if (it->type() == def.teType()) + else if (it->type() == def.teType() && !maskTESet) { - if (abs(itv->etamin()) * 0.1 < etaTruncTE) - etaTruncTE = abs(itv->etamin()) * 0.1; - if (abs(itv->etamax()) * 0.1 < etaTruncTE) - etaTruncTE = abs(itv->etamax()) * 0.1; + for (unsigned int bin = 0; bin < 8; ++bin) { + if (moduleEta[bin] > itv->etamin()*0.1 && moduleEta[bin] < itv->etamax()*0.1) + maskTE |= (1<<bin); + } } } // loop over TTV } // Is this XE or TE threshold? @@ -236,9 +244,9 @@ void L1EnergyCMXTools::formCMXEtSumsCrate( const xAOD::CMXEtSumsContainer *cmxEtSumsMod, xAOD::CMXEtSumsContainer *cmxEtSumsCrate) const { - float etaTruncXE, etaTruncTE; - findRestrictedEta(etaTruncXE, etaTruncTE); - ATH_MSG_INFO("Restricted eta ranges etaTruncXE=" << etaTruncXE << " etaTruncTE=" << etaTruncTE); + uint32_t maskXE, maskTE; + findRestrictedEta(maskXE, maskTE); + ATH_MSG_DEBUG("Restricted eta masks: XE=" << MSG::hex << maskXE << ", TE=" << maskTE << MSG::dec); // Convert to internal containers int peak = 0; MultiSliceModuleEnergy modulesVec; @@ -254,7 +262,7 @@ void L1EnergyCMXTools::formCMXEtSumsCrate( cratesVecFull.push_back(cratesFull); cratesVecRestricted.push_back(cratesRestricted); m_etTool->crateSums(modules, cratesFull); - m_etTool->crateSums(modules, cratesRestricted, etaTruncXE, etaTruncTE, true); + m_etTool->crateSums(modules, cratesRestricted, maskXE, maskTE, true); delete modules; } @@ -840,7 +848,7 @@ void L1EnergyCMXTools::etMapsToEtSums( }else{ nslicesFull++; } - // ATH_MSG_INFO("isRestriced=" << isRestricted << " slice=" << (isRestricted? nslicesRestricted: nslicesFull) + // ATH_MSG_DEBUG("isRestriced=" << isRestricted << " slice=" << (isRestricted? nslicesRestricted: nslicesFull) // << " et=" << systemVec[i]->et() << " etSumHits=" << systemVec[i]->etSumHits()); } @@ -903,7 +911,7 @@ void L1EnergyCMXTools::etMapsToEtSums( (*sumEt)->addEy(etVec, *error); (*sumEt)->addEt(etVec, *error); - // ATH_MSG_INFO("slice=" << slice << " restricted=" << restricted << " etVec=" << (*sumEt)->etVec() << " etSumHits=" << etSumHits); + // ATH_MSG_DEBUG("slice=" << slice << " restricted=" << restricted << " etVec=" << (*sumEt)->etVec() << " etSumHits=" << etSumHits); } unsigned int etMissHits = energy->etMissHits(); if (etMissHits) diff --git a/Trigger/TrigT1/TrigT1CaloTools/src/L1EtTools.cxx b/Trigger/TrigT1/TrigT1CaloTools/src/L1EtTools.cxx index e35bce24fbef..cfc569108fb5 100755 --- a/Trigger/TrigT1/TrigT1CaloTools/src/L1EtTools.cxx +++ b/Trigger/TrigT1/TrigT1CaloTools/src/L1EtTools.cxx @@ -170,12 +170,12 @@ void L1EtTools::moduleSums(const xAOD::JetElementMap_t* jemap, //=====================Form JE Crate ET sums ==================== -void L1EtTools::crateSums(const DataVector<ModuleEnergy>* modules, DataVector<CrateEnergy>* crates, float etaMaxXE, float etaMaxTE, bool restricted) const { +void L1EtTools::crateSums(const DataVector<ModuleEnergy>* modules, DataVector<CrateEnergy>* crates, uint32_t maskXE, uint32_t maskTE, bool restricted) const { crates->clear(); // Loop over crates and create set of CrateEnergy objects for (int crate = 0; crate < 2; ++crate) { - crates->push_back( new CrateEnergy(crate, modules, etaMaxXE, etaMaxTE, restricted) ); + crates->push_back( new CrateEnergy(crate, modules, maskXE, maskTE, restricted) ); } return; @@ -183,12 +183,12 @@ void L1EtTools::crateSums(const DataVector<ModuleEnergy>* modules, DataVector<Cr //=====================Form JE Crate ET sums ==================== -void L1EtTools::crateSums(const DataVector<EnergyCMXData>* modules, DataVector<CrateEnergy>* crates, float etaMaxXE, float etaMaxTE, bool restricted) const { +void L1EtTools::crateSums(const DataVector<EnergyCMXData>* modules, DataVector<CrateEnergy>* crates, uint32_t maskXE, uint32_t maskTE, bool restricted) const { crates->clear(); // Loop over crates and create set of CrateEnergy objects for (int crate = 0; crate < 2; ++crate) { - crates->push_back( new CrateEnergy(crate, modules, etaMaxXE, etaMaxTE, restricted) ); + crates->push_back( new CrateEnergy(crate, modules, maskXE, maskTE, restricted) ); } return; @@ -207,7 +207,7 @@ SystemEnergy L1EtTools::systemSums(const DataVector<CrateEnergy>* crates) const //=====================Return JE Crate ET sums directly ============= void L1EtTools::crateSums(const xAOD::JetElementContainer* jetelements, - DataVector<CrateEnergy>* crates, int slice, float etaMaxXE, float etaMaxTE, bool restricted) const { + DataVector<CrateEnergy>* crates, int slice, uint32_t maskXE, uint32_t maskTE, bool restricted) const { crates->clear(); @@ -218,7 +218,7 @@ void L1EtTools::crateSums(const xAOD::JetElementContainer* jetelements, // Loop over crates and create set of CrateEnergy objects for (int crate = 0; crate < 2; ++crate) { - crates->push_back( new CrateEnergy(crate, modules, etaMaxXE, etaMaxTE, restricted) ); + crates->push_back( new CrateEnergy(crate, modules, maskXE, maskTE, restricted) ); } delete modules; @@ -229,7 +229,7 @@ void L1EtTools::crateSums(const xAOD::JetElementContainer* jetelements, //=====================Return JE Crate ET sums directly ============= void L1EtTools::crateSums(const xAOD::JetElementMap_t* jemap, - DataVector<CrateEnergy>* crates, int slice, float etaMaxXE, float etaMaxTE, bool restricted) const { + DataVector<CrateEnergy>* crates, int slice, uint32_t maskXE, uint32_t maskTE, bool restricted) const { crates->clear(); @@ -240,7 +240,7 @@ void L1EtTools::crateSums(const xAOD::JetElementMap_t* jemap, // Loop over crates and create set of CrateEnergy objects for (int crate = 0; crate < 2; ++crate) { - crates->push_back( new CrateEnergy(crate, modules, etaMaxXE, etaMaxTE, restricted) ); + crates->push_back( new CrateEnergy(crate, modules, maskXE, maskTE, restricted) ); } delete modules; @@ -250,12 +250,12 @@ void L1EtTools::crateSums(const xAOD::JetElementMap_t* jemap, //=====================Return final System ET sums directly ============= -SystemEnergy L1EtTools::systemSums(const xAOD::JetElementContainer* jetelements, int slice, float etaMaxXE, float etaMaxTE, bool restricted) const { +SystemEnergy L1EtTools::systemSums(const xAOD::JetElementContainer* jetelements, int slice, uint32_t maskXE, uint32_t maskTE, bool restricted) const { // First need to form modules and crates DataVector<CrateEnergy>* crates = new DataVector<CrateEnergy>; - crateSums(jetelements, crates, slice, etaMaxXE, etaMaxTE, restricted); + crateSums(jetelements, crates, slice, maskXE, maskTE, restricted); // Then do the final summing, thresholding etc SystemEnergy result(crates, m_configSvc); @@ -266,12 +266,12 @@ SystemEnergy L1EtTools::systemSums(const xAOD::JetElementContainer* jetelements, //=====================Return final System ET sums directly ============= -SystemEnergy L1EtTools::systemSums(const xAOD::JetElementMap_t* jemap, int slice, float etaMaxXE, float etaMaxTE, bool restricted) const { +SystemEnergy L1EtTools::systemSums(const xAOD::JetElementMap_t* jemap, int slice, uint32_t maskXE, uint32_t maskTE, bool restricted) const { // First need to form modules and crates DataVector<CrateEnergy>* crates = new DataVector<CrateEnergy>; - crateSums(jemap, crates, slice, etaMaxXE, etaMaxTE, restricted); + crateSums(jemap, crates, slice, maskXE, maskTE, restricted); // Then do the final summing, thresholding etc SystemEnergy result(crates, m_configSvc); diff --git a/Trigger/TrigT1/TrigT1CaloUtils/TrigT1CaloUtils/CrateEnergy.h b/Trigger/TrigT1/TrigT1CaloUtils/TrigT1CaloUtils/CrateEnergy.h index 98557c770bd3..80e4cdbcb874 100755 --- a/Trigger/TrigT1/TrigT1CaloUtils/TrigT1CaloUtils/CrateEnergy.h +++ b/Trigger/TrigT1/TrigT1CaloUtils/TrigT1CaloUtils/CrateEnergy.h @@ -35,8 +35,8 @@ System CMM logic is done in EnergyTrigger*/ class CrateEnergy { public: - CrateEnergy(unsigned int crate, const DataVector<ModuleEnergy>* modules, float etaMaxXE = 5., float etaMaxTE = 5., bool restricted = false); - CrateEnergy(unsigned int crate, const DataVector<EnergyCMXData>* modules, float etaMaxXE = 5., float etaMaxTE = 5., bool restricted = false); + CrateEnergy(unsigned int crate, const DataVector<ModuleEnergy>* modules, uint32_t maskXE = 0xff, uint32_t maskTE = 0xff, bool restricted = false); + CrateEnergy(unsigned int crate, const DataVector<EnergyCMXData>* modules, uint32_t maskXE = 0xff, uint32_t maskTE = 0xff, bool restricted = false); CrateEnergy(unsigned int crate, unsigned int et, unsigned int exTC, unsigned int eyTC, unsigned int overflowT, unsigned int overflowX, unsigned int overflowY, bool restricted = false); diff --git a/Trigger/TrigT1/TrigT1CaloUtils/src/CrateEnergy.cxx b/Trigger/TrigT1/TrigT1CaloUtils/src/CrateEnergy.cxx index f5102b079d7e..c19fb0a7aafb 100755 --- a/Trigger/TrigT1/TrigT1CaloUtils/src/CrateEnergy.cxx +++ b/Trigger/TrigT1/TrigT1CaloUtils/src/CrateEnergy.cxx @@ -19,7 +19,7 @@ namespace LVL1 { -CrateEnergy::CrateEnergy(unsigned int crate, const DataVector<ModuleEnergy>* JEMs, float etaMaxXE, float etaMaxTE, bool restricted): +CrateEnergy::CrateEnergy(unsigned int crate, const DataVector<ModuleEnergy>* JEMs, uint32_t maskXE, uint32_t maskTE, bool restricted): m_crate(crate), m_crateEt(0), m_crateEx(0), @@ -34,19 +34,7 @@ CrateEnergy::CrateEnergy(unsigned int crate, const DataVector<ModuleEnergy>* JEM if (m_crate > 1) return; /** Added for restricted eta triggers in Run 2 */ - int moduleMinXE = 0; - if (etaMaxXE <= 2.41) moduleMinXE = 1; - if (etaMaxXE <= 1.61) moduleMinXE = 2; - if (etaMaxXE <= 0.81) moduleMinXE = 3; - int moduleMaxXE = 7 - moduleMinXE; - - int moduleMinTE = 0; - if (etaMaxTE <= 2.41) moduleMinTE = 1; - if (etaMaxTE <= 1.61) moduleMinTE = 2; - if (etaMaxTE <= 0.81) moduleMinTE = 3; - int moduleMaxTE = 7 - moduleMinTE; - - if (moduleMinXE > 0 || moduleMinTE > 0) m_restricted = true; + if ((maskXE&0xff) != 0xff || (maskTE&0xff) != 0xff) m_restricted = true; /** Summing within a crate proceeds as follows: <br> unsigned 14 bit Ex, Ey, Et sums are formed for each half crate<br> @@ -63,11 +51,11 @@ CrateEnergy::CrateEnergy(unsigned int crate, const DataVector<ModuleEnergy>* JEM int moduleInQuad = (*it)->module() % 8; if ((*it)->crate() == m_crate) { int quad = ( (*it)->module() < 8 ? 0 : 1 ); - if (moduleInQuad >= moduleMinTE && moduleInQuad <= moduleMaxTE) { + if ((maskTE>>moduleInQuad)&1) { eT[quad] += (*it)->et(); if ( (*it)->et() >= m_jemEtSaturation ) m_overflowT = 1; } - if (moduleInQuad >= moduleMinXE && moduleInQuad <= moduleMaxXE) { + if ((maskXE>>moduleInQuad)&1) { eX[quad] += (*it)->ex(); eY[quad] += (*it)->ey(); if ( (*it)->ex() >= m_jemEtSaturation ) m_overflowX = 1; @@ -109,7 +97,7 @@ CrateEnergy::CrateEnergy(unsigned int crate, const DataVector<ModuleEnergy>* JEM } -CrateEnergy::CrateEnergy(unsigned int crate, const DataVector<EnergyCMXData>* JEMs, float etaMaxXE, float etaMaxTE, bool restricted): +CrateEnergy::CrateEnergy(unsigned int crate, const DataVector<EnergyCMXData>* JEMs, uint32_t maskXE, uint32_t maskTE, bool restricted): m_crate(crate), m_crateEt(0), m_crateEx(0), @@ -124,19 +112,7 @@ CrateEnergy::CrateEnergy(unsigned int crate, const DataVector<EnergyCMXData>* JE if (m_crate > 1) return; /** Added for restricted eta triggers in Run 2 */ - int moduleMinXE = 0; - if (etaMaxXE <= 2.41) moduleMinXE = 1; - if (etaMaxXE <= 1.61) moduleMinXE = 2; - if (etaMaxXE <= 0.81) moduleMinXE = 3; - int moduleMaxXE = 7 - moduleMinXE; - - int moduleMinTE = 0; - if (etaMaxTE <= 2.41) moduleMinTE = 1; - if (etaMaxTE <= 1.61) moduleMinTE = 2; - if (etaMaxTE <= 0.81) moduleMinTE = 3; - int moduleMaxTE = 7 - moduleMinTE; - - if (moduleMinXE > 0 || moduleMinTE > 0) m_restricted = true; + if ((maskXE&0xff) != 0xff || (maskTE&0xff) != 0xff) m_restricted = true; /** Summing within a crate proceeds as follows: <br> unsigned 14 bit Ex, Ey, Et sums are formed for each half crate<br> @@ -154,11 +130,11 @@ CrateEnergy::CrateEnergy(unsigned int crate, const DataVector<EnergyCMXData>* JE if ((unsigned int)(*it)->crate() == m_crate) { int quad = ( (*it)->module() < 8 ? 0 : 1 ); - if (moduleInQuad >= moduleMinTE && moduleInQuad <= moduleMaxTE) { + if ((maskTE>>moduleInQuad)&1) { eT[quad] += (*it)->Et(); if ( (*it)->Et() >= m_jemEtSaturation ) m_overflowT = 1; } - if (moduleInQuad >= moduleMinXE && moduleInQuad <= moduleMaxXE) { + if ((maskXE>>moduleInQuad)&1) { eX[quad] += (*it)->Ex(); eY[quad] += (*it)->Ey(); if ( (*it)->Ex() >= m_jemEtSaturation ) m_overflowX = 1; -- GitLab From b3b129c57408aa55d1e862d4850ddbf24eb90ac4 Mon Sep 17 00:00:00 2001 From: John Chapman <jchapman@cern.ch> Date: Tue, 5 Jun 2018 16:09:35 +0200 Subject: [PATCH 035/562] Fix build of PixelConditionsTools in AthSimulation project (ATLASSIM-3731) These changes allow the `PixelConditionsTools` package to build as part of the `AthSimulation` project by hiding the following classes which were added to the package in !11019: - `PixelConditionsSummaryTool` - `PixelDCSCondTool` - `PixelSiliconConditionsTool` and the additional dependencies which they introduce. This should fix ATLASSIM-3731. Former-commit-id: 750d5fb47e0bc7514c0ea2bc4d4c471cb4c35ba7 --- .../PixelConditionsTools/CMakeLists.txt | 16 +++++++++++----- .../src/PixelConditionsSummaryTool.cxx | 2 ++ .../src/PixelDCSCondTool.cxx | 2 ++ .../src/PixelSiliconConditionsTool.cxx | 2 ++ .../components/PixelConditionsTools_entries.cxx | 5 ++++- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/CMakeLists.txt b/InnerDetector/InDetConditions/PixelConditionsTools/CMakeLists.txt index 6862086bed12..041e5d5e31f2 100644 --- a/InnerDetector/InDetConditions/PixelConditionsTools/CMakeLists.txt +++ b/InnerDetector/InDetConditions/PixelConditionsTools/CMakeLists.txt @@ -5,6 +5,14 @@ # Declare the package name: atlas_subdir( PixelConditionsTools ) +# Possible extra dependencies: +set( extra_dep ) +set( extra_lib ) +if( NOT SIMULATIONBASE ) + set( extra_dep InnerDetector/InDetConditions/InDetConditionsSummaryService InnerDetector/InDetConditions/PixelConditionsServices InnerDetector/InDetDetDescr/PixelGeoModel ) +set( extra_lib PixelGeoModelLib ) +endif() + # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC Control/AthenaKernel @@ -21,13 +29,11 @@ atlas_depends_on_subdirs( PUBLIC DetectorDescription/GeoModel/GeoModelUtilities InnerDetector/InDetConditions/PixelConditionsData InnerDetector/InDetConditions/PixelCoralClientUtils - InnerDetector/InDetConditions/InDetConditionsSummaryService - InnerDetector/InDetConditions/PixelConditionsServices InnerDetector/InDetDetDescr/InDetIdentifier InnerDetector/InDetDetDescr/InDetReadoutGeometry - InnerDetector/InDetDetDescr/PixelGeoModel TestPolicy - Tools/PathResolver ) + Tools/PathResolver + ${extra_dep} ) # External dependencies: find_package( CLHEP ) @@ -39,7 +45,7 @@ atlas_add_component( PixelConditionsTools src/*.cxx src/components/*.cxx INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaKernel GeoPrimitives GaudiKernel AthenaBaseComps SGTools AthenaPoolUtilities DetDescrConditions Identifier PixelConditionsData PixelCoralClientUtils InDetIdentifier GeoModelUtilities InDetReadoutGeometry PathResolver PixelGeoModelLib ) + LINK_LIBRARIES ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaKernel GeoPrimitives GaudiKernel AthenaBaseComps SGTools AthenaPoolUtilities DetDescrConditions Identifier PixelConditionsData PixelCoralClientUtils InDetIdentifier GeoModelUtilities InDetReadoutGeometry PathResolver ${extra_lib} ) # Install files from the package: atlas_install_headers( PixelConditionsTools ) diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelConditionsSummaryTool.cxx b/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelConditionsSummaryTool.cxx index 3e2c8a2f0494..172f78d08da3 100644 --- a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelConditionsSummaryTool.cxx +++ b/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelConditionsSummaryTool.cxx @@ -2,6 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ +#ifndef SIMULATIONBASE #include "PixelConditionsSummaryTool.h" #include "StoreGate/StoreGate.h" @@ -591,3 +592,4 @@ void PixelConditionsSummaryTool::getID(const Identifier& id, unsigned int& pixID pixID = ModuleSpecialPixelMap::encodePixelID( endcap, phimod, etapix, phipix, mchips ); } +#endif // not SIMULATIONBASE diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelDCSCondTool.cxx b/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelDCSCondTool.cxx index 5937bbc47233..bb601c0b862a 100644 --- a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelDCSCondTool.cxx +++ b/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelDCSCondTool.cxx @@ -2,6 +2,7 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ +#ifndef SIMULATIONBASE #include "PixelDCSCondTool.h" #include "GaudiKernel/ThreadLocalContext.h" @@ -193,3 +194,4 @@ const PixelDCSCondData* PixelDCSCondTool::getCondDataTemp0(const EventContext& c } return m_pModulesTemp0.get(); } +#endif // not SIMULATIONBASE diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelSiliconConditionsTool.cxx b/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelSiliconConditionsTool.cxx index b8f9b019019e..c2b507d74e59 100644 --- a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelSiliconConditionsTool.cxx +++ b/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelSiliconConditionsTool.cxx @@ -2,6 +2,7 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ +#ifndef SIMULATIONBASE #include "PixelSiliconConditionsTool.h" PixelSiliconConditionsTool::PixelSiliconConditionsTool(const std::string& type, const std::string& name, const IInterface* parent): @@ -94,3 +95,4 @@ const PixelDCSCondData* PixelSiliconConditionsTool::getCondDataTemp() const { } return *condData; } +#endif // not SIMULATIONBASE diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/src/components/PixelConditionsTools_entries.cxx b/InnerDetector/InDetConditions/PixelConditionsTools/src/components/PixelConditionsTools_entries.cxx index f4d09227d1ef..c744d1243bd2 100644 --- a/InnerDetector/InDetConditions/PixelConditionsTools/src/components/PixelConditionsTools_entries.cxx +++ b/InnerDetector/InDetConditions/PixelConditionsTools/src/components/PixelConditionsTools_entries.cxx @@ -1,14 +1,17 @@ #include "src/PixelRecoDbTool.h" #include "src/PixelCalibDbTool.h" #include "src/PixelDistortionsTool.h" +#ifndef SIMULATIONBASE #include "src/PixelConditionsSummaryTool.h" #include "src/PixelDCSCondTool.h" #include "src/PixelSiliconConditionsTool.h" +#endif DECLARE_COMPONENT( PixelRecoDbTool ) DECLARE_COMPONENT( PixelCalibDbTool ) DECLARE_COMPONENT( PixelDistortionsTool ) +#ifndef SIMULATIONBASE DECLARE_COMPONENT( PixelConditionsSummaryTool ) DECLARE_COMPONENT( PixelDCSCondTool ) DECLARE_COMPONENT( PixelSiliconConditionsTool ) - +#endif -- GitLab From 1634bc5645ec9d340a02acb47c405ce08e1c302e Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Tue, 5 Jun 2018 17:16:46 +0200 Subject: [PATCH 036/562] Working test JO Former-commit-id: 5be4323accb0e2d75e7d11911a9c8aeee5671985 --- .../TrigAlgorithms/TrigEFMissingET/share/testMET.py | 13 +++++++------ .../TrigEFMissingET/src/EFMissingETFromCellsMT.cxx | 2 ++ .../TrigEFMissingET/src/EFMissingETFromCellsMT.h | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/share/testMET.py b/Trigger/TrigAlgorithms/TrigEFMissingET/share/testMET.py index 468ea41cd637..5af3f2c6c36c 100644 --- a/Trigger/TrigAlgorithms/TrigEFMissingET/share/testMET.py +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/share/testMET.py @@ -36,13 +36,14 @@ topSequence += cellMakerAlgo from TrigEFMissingET.TrigEFMissingETConf import EFMissingETAlgMT, EFMissingETFromCellsMT -cellTool = EFMissingETFromCellsMT( name="METFromCellsTool" ) -cellTool.CellsCollection = "cells" -metAlg = EFMissingETAlgMT( name="EFMET" ) -metAlg.METTools=[ cellTool ] -metAlg += cellTool -topSequence += metAlg +# cellTool = EFMissingETFromCellsMT( name="METFromCellsTool", CaloNoiseTool=ToolSvc.CaloNoiseToolDefault ) +# cellTool.CellsCollection = "cells" + +# metAlg = EFMissingETAlgMT( name="EFMET" ) +# metAlg.METTools=[ cellTool ] +# metAlg += cellTool +# topSequence += metAlg # from TrigCaloRec.TrigCaloRecConfig import TrigCaloClusterMakerMT_topo diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.cxx b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.cxx index 60c16a34faba..b6b0b9413d9f 100644 --- a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.cxx +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.cxx @@ -24,6 +24,8 @@ StatusCode EFMissingETFromCellsMT::initialize() m_maxThreshold = m_rmsOneSided; if ( m_rmsOneSided < fabsf( m_rmsTwoSided ) ) m_maxThreshold = fabsf( m_rmsTwoSided ); + CHECK( m_noiseTool.retrieve() ); + return StatusCode::SUCCESS; } diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.h b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.h index eab14e2f0ac5..89433a3b8909 100644 --- a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.h +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.h @@ -51,7 +51,7 @@ class EFMissingETFromCellsMT: public extends<AthAlgTool, IMissingETTool> { SG::ReadHandleKey<CaloCellContainer> m_cellsKey { this, "CellsCollection", "CaloCells", "Collection containg all cels" }; - ToolHandle<ICalorimeterNoiseTool> m_noiseTool { this, "CaloNoiseTool", "", "Tool Handle for noise tool" }; + PublicToolHandle<ICalorimeterNoiseTool> m_noiseTool { this, "CaloNoiseTool", "CaloNoiseTool/CaloNoiseToolDefault", "Tool Handle for noise tool" }; }; -- GitLab From 43f936c664e91afe9aa1fbd9b58d2e41fbab2583 Mon Sep 17 00:00:00 2001 From: John Derek Chapman <chapman@hep.phy.cam.ac.uk> Date: Thu, 31 May 2018 14:39:30 +0000 Subject: [PATCH 037/562] Merge branch 'sTGC_xml_ConfirmFlip' into '21.3' Add stations.v2.03.xml and stations.v1.79.xml See merge request atlas/athena!11745 (cherry picked from commit 725ca609375a760edbbe6f3c8c1ce7798cf9d782 [formerly 578e9bc52d5afde39f10672735903e99f1b9de48]) 02475d35 Add stations.v2.03.xml and stations.v1.79.xml Former-commit-id: 5d9fb60ae0ac6ab8563636a812b83288dd72ed00 --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../NSW_Sim/data/NSW_StationDescription.xml | 2 +- .../MuonG4/NSW_Sim/data/stations.v1.79.xml | 323 +++ .../MuonG4/NSW_Sim/data/stations.v2.03.xml | 1787 +++++++++++++++++ 4 files changed, 2111 insertions(+), 1 deletion(-) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h create mode 100644 MuonSpectrometer/MuonG4/NSW_Sim/data/stations.v1.79.xml create mode 100644 MuonSpectrometer/MuonG4/NSW_Sim/data/stations.v2.03.xml diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 diff --git a/MuonSpectrometer/MuonG4/NSW_Sim/data/NSW_StationDescription.xml b/MuonSpectrometer/MuonG4/NSW_Sim/data/NSW_StationDescription.xml index 8ede66a2b3bf..cd500edbfdfb 120000 --- a/MuonSpectrometer/MuonG4/NSW_Sim/data/NSW_StationDescription.xml +++ b/MuonSpectrometer/MuonG4/NSW_Sim/data/NSW_StationDescription.xml @@ -1 +1 @@ -stations.v1.78.xml \ No newline at end of file +stations.v1.79.xml \ No newline at end of file diff --git a/MuonSpectrometer/MuonG4/NSW_Sim/data/stations.v1.79.xml b/MuonSpectrometer/MuonG4/NSW_Sim/data/stations.v1.79.xml new file mode 100644 index 000000000000..6af030a1bf3d --- /dev/null +++ b/MuonSpectrometer/MuonG4/NSW_Sim/data/stations.v1.79.xml @@ -0,0 +1,323 @@ +<?xml version="1.0" encoding="UTF-8"?> +<AGDD> + +<section name="NSW_Parameters" version="1" top_volume="useless" date="December 16 2014" author="S.Chen" > +<!-- Global variables--> +<var name="NSW_NbrOfLayers" value="4"/> +<var name="NSW_NbrOfDriftPcb" value="3"/> +<var name="NSW_NbrOfROPcb" value="2"/> +</section> + +<section name="NSW_sTGC_Parameters" version="13.7" top_volume="useless" date=" June 30, 2016 " author="Daniel Lellouch"> +<!-- ================ Global Variables ================= --> + +<!-- Thickness of a quadruplet --> +<var name="NSW_sTGC_Tck" value="49.34"/> +<!-- Gas Gap inside one layer --> +<var name="NSW_sTGC_GasTck" value="2.85"/> +<!-- G10 thickness per layer --> +<var name="NSW_sTGC_pcbTck" value="3"/> +<!-- Number of layers in a quaduplet --> +<var name="NSW_sTGC_NbrOfLayers" value="4"/> +<!-- Wire pitch --> +<var name="NSW_sTGC_WirePitch" value="1.8"/> +<!-- Strip pitch --> +<var name="NSW_sTGC_StripPitch" value="3.2"/> +<!-- Strip width --> +<var name="NSW_sTGC_StripWidth" value="2.7"/> +<!-- Width of G10 frame besides gas volume --> +<var name="NSW_sTGC_SideFrame" value="28.5"/> +<!-- Width of G10 frame in base w/o capacitor --> +<var name="NSW_sTGC_hFrameNoCapacitor" value="11"/> +<!-- Width of G10 frame in base with capacitor --> +<var name="NSW_sTGC_hFrameCapacitor" value="14"/> +<!-- Opening (in degrees) of trapezes in small wedges --> +<var name="NSW_sTGC_SmallOpening" value="17"/> +<!-- Opening (in degrees) of trapezes in large wedges --> +<var name="NSW_sTGC_LargeOpening" value="28"/> +<!-- Z center of small Pivot --> +<var name="NSW_sTGC_ZSmallPivot" value="7344"/> +<!-- Z center of small Confirm --> +<var name="NSW_sTGC_ZSmallConfirm" value="7010"/> +<!-- Z center of Large Pivot --> +<var name="NSW_sTGC_ZLargePivot" value="7474"/> +<!-- Z center of Large Confirm --> +<var name="NSW_sTGC_ZLargeConfirm" value="7808"/> +<!-- Z of each volume, relative to center of quadruplet --> +<array name="NSW_sTGC_LayerDeltaZ" values="-16.45;-5.48;5.49;16.46"/> +<!-- Side of the Pad readout --> +<array name="NSW_sTGC_PadSide" values="-1;1;-1;1"/> +<!-- Side of the Strip readout --> +<array name="NSW_sTGC_StripSide" values="1;-1;1;-1"/> +</section> + +<!-- ================ sTGC ========================= --> + + +<section name="NewSmallWheels_sTGC" version="20.2" top_volume="useless" date=" March 31, 2018 " author="Daniel Lellouch"> + +<composition name="NSW_sTGC"> + +<sTGC_Tech type="sTGC_1" geometryLevel="1" nLayers="NSW_sTGC_NbrOfLayers" gasTck="NSW_sTGC_GasTck" pcbTck="NSW_sTGC_pcbTck" Tck="NSW_sTGC_Tck" f4="NSW_sTGC_hFrameNoCapacitor" f5="NSW_sTGC_hFrameNoCapacitor" f6="NSW_sTGC_SideFrame"/> + +<!-- ================ small Pivot ========================= --> + +<sTGC type="sTG1-QS1P" tech="sTGC_1" subType="QS1P" sWidth="346.93" lWidth="743.15" Length="1325.6" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" yCutoutCathode="0" stripPitch="NSW_sTGC_StripPitch" stripWidth="NSW_sTGC_StripWidth" wirePitch="NSW_sTGC_WirePitch"> + +<sTGC_readout sPadWidth="279.32" lPadWidth="667.18" sStripWidth="293.48" lStripWidth="681.33" padH="80;80;80.24;80.24" nPadPhi="4;4;3;3" anglePadPhi="5" firstPadPhiDivision_C="-5;-5;-2.5;-2.5" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="-5;-5;-2.5;-2.5" PadPhiShift_A="-2;2;-2;2" nPadH="17;17;17;17" firstPadH="65.8;65.8;28.61;28.61" firstPadRow="1;1;1;1" nWires="371;370;370;370" wireCutout="802.8;829.8;856.8;883.8" firstWire="-333;-331.65;-332.55;-332.1" wireGroupWidth="20" nStrips="406" firstTriggerBand="3;3;3;3" nTriggerBands="28;28;28;28" firstStripInTrigger="44;44;44;44" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13; 12;13;12;13;12;13;10" StripsInBandsLayer2="12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13;13;12; 13;12;13;12;13;12;10" StripsInBandsLayer3="12;13;12;13;12;13;12;13;13;12;13;12;13;12;13;12;13;12;13;12;13;12; 13;12;13;13;12;13;8" StripsInBandsLayer4="12;13;12;13;12;13;13;12;13;12;13;12;13;12;13;13;12;13;12;13;12;13; 12;13;12;13;13;12;8" nWireGroups="19;20;19;19" firstWireGroup="20;5;10;15"/> +</sTGC> + +<chamberPosition volume="sTG1-QS1P" type="ENDCAP" chamberType="sTGS" radius="1563" zPos="NSW_sTGC_ZSmallPivot" phi0="22.5"/> + +<sTGC type="sTG1-QS2P" tech="sTGC_1" subType="QS2P" sWidth="746.14" lWidth="1102.25" Length="1191.4" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" yCutoutCathode="0" stripPitch="NSW_sTGC_StripPitch" stripWidth="NSW_sTGC_StripWidth" wirePitch="NSW_sTGC_WirePitch"> + +<sTGC_readout sPadWidth="677.64" lPadWidth="1026.28" sStripWidth="691.8" lStripWidth="1040.43" padH="80;80;80.24;80.24" nPadPhi="2;2;3;3" anglePadPhi="7.5" firstPadPhiDivision_C="0;0;-3.75;-3.75" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="0;0;-3.75;-3.75" PadPhiShift_A="-2;2;-2;2" nPadH="15;15;15;15" firstPadH="93.2;93.2;60.09;60.09" firstPadRow="18;18;18;18" nWires="569;570;570;570" wireCutout="0;0;0;0" firstWire="-511.2;-511.65;-512.55;-512.1" wireGroupWidth="20" nStrips="365" firstTriggerBand="34;34;34;34" nTriggerBands="30;30;30;30" firstStripInTrigger="1;1;1;1" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="4;13;12;13;12;13;12;13;12;12; 12;13;12;12;13;12;13;12;13;12; 13;12;13;12;13;12;13;12;13;11" StripsInBandsLayer2="5;12;13;12;13;12;13;12;13;13; 13;12;13;12;13;12;13;12;13;12; 13;12;13;12;13;12;13;12;13;10" StripsInBandsLayer3="5;12;13;12;13;12;13;12;13;13; 13;12;13;12;13;12;13;12;13;12; 13;12;13;12;13;12;13;12;13;10" StripsInBandsLayer4="7;12;13;12;13;12;13;13;12;12; 12;13;12;13;12;13;13;12;13;12; 13;12;13;12;13;12;13;13;12;7" nWireGroups="29;30;29;29" firstWireGroup="20;5;10;15"/> +</sTGC> + +<chamberPosition volume="sTG1-QS2P" type="ENDCAP" chamberType="sTGS" radius="2831.5" zPos="NSW_sTGC_ZSmallPivot" phi0="22.5"/> + +<sTGC type="sTG1-QS3P" tech="sTGC_1" subType="QS3P" sWidth="1105.96" lWidth="1406.59" Length="1005.8" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" yCutoutCathode="0" stripPitch="NSW_sTGC_StripPitch" stripWidth="NSW_sTGC_StripWidth" wirePitch="NSW_sTGC_WirePitch"> + +<sTGC_readout sPadWidth="1037.46" lPadWidth="1330.62" sStripWidth="293.48" lStripWidth="681.33" padH="80;80;80.24;80.24" nPadPhi="2;2;3;3" anglePadPhi="7.5" firstPadPhiDivision_C="0;0;-3.75;-3.75" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="0;0;-3.75;-3.75" PadPhiShift_A="-2;2;2;2" nPadH="12;12;13;13" firstPadH="89.4;89.4;59.88;59.88" firstPadRow="33;33;33;33" nWires="739;739;739;738" wireCutout="0;0;0;0" firstWire="-664.2;-664.65;-663.75;-663.3" wireGroupWidth="20" nStrips="307" firstTriggerBand="64;64;64;64" nTriggerBands="26;26;25;25" firstStripInTrigger="1;1;1;1" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="3;12;13;12;13;12;13;12;13;13; 13;12;13;12;13;12;12;13;12;13; 12;13;12;13;12;5" StripsInBandsLayer2="6;12;13;12;13;13;12;13;12;12; 12;13;12;13;12;13;12;13;12;13; 13;12;13;12;13;3" StripsInBandsLayer3="6;12;13;12;13;13;12;13;12;12; 12;13;12;13;12;13;12;13;12;13; 12;13;12;13;13" StripsInBandsLayer4="7;13;12;13;12;13;12;13;12;12; 12;13;13;12;13;12;13;12;13;12; 13;12;13;13;11" nWireGroups="37;38;38;38" firstWireGroup="20;14;10;3"/> +</sTGC> + +<chamberPosition volume="sTG1-QS3P" type="ENDCAP" chamberType="sTGS" radius="3942.5" zPos="NSW_sTGC_ZSmallPivot" phi0="22.5"/> + + +<!-- ================ small confirm =============== --> + +<sTGC type="sTG1-QS1C" tech="sTGC_1" subType="QS1C" sWidth="346.93" lWidth="743.15" Length="1325.6" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" yCutoutCathode="0" stripPitch="NSW_sTGC_StripPitch" stripWidth="NSW_sTGC_StripWidth" wirePitch="NSW_sTGC_WirePitch"> + +<sTGC_readout sPadWidth="293.48" lPadWidth="681.33" sStripWidth="691.8" lStripWidth="1040.43" padH="76.35;76.35;76.59;76.59" nPadPhi="4;4;4;4" anglePadPhi="5" firstPadPhiDivision_C="-3.75;-6.25;-3.75;-6.25" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-6.25;-3.75;-6.25;-3.75" PadPhiShift_A="2;-2;2;-2" nPadH="18;18;17;17" firstPadH="40.22;40.22;81.51;81.51" firstPadRow="2;2;2;2" nWires="370;370;370;371" wireCutout="883.8;856.8;829.8;802.8" firstWire="-332.1;-331.65;-332.55;-333" wireGroupWidth="20" nStrips="406" firstTriggerBand="5;5;5;5" nTriggerBands="32;32;31;31" firstStripInTrigger="44;44;44;44" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="12;12;12;11;12;12;12;12;12;12; 12;12;12;12;12;12;11;12;12;12; 12;12;12;12;12;12;12;12;11;12;12;12" StripsInBandsLayer2="12;12;12;12;11;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12; 11;12;12;12;12;12;12;12;12;12;12;11" StripsInBandsLayer3="12;12;12;12;11;12;12;12;12; 12;12;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12;11;10" StripsInBandsLayer4="12;12;12;12;12;12;12;12;11; 12;12;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12;12;9" nWireGroups="20;19;19;19" firstWireGroup="5;10;15;20"/> +</sTGC> + +<chamberPosition volume="sTG1-QS1C" type="ENDCAP" chamberType="sTGS" radius="1563" zPos="NSW_sTGC_ZSmallConfirm" phi0="22.5"/> + +<sTGC type="sTG1-QS2C" tech="sTGC_1" subType="QS2C" sWidth="746.14" lWidth="1102.25" Length="1191.4" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" yCutoutCathode="0" stripPitch="NSW_sTGC_StripPitch" stripWidth="NSW_sTGC_StripWidth" wirePitch="NSW_sTGC_WirePitch"> + +<sTGC_readout sPadWidth="691.8" lPadWidth="1040.43" sStripWidth="1051.61" lStripWidth="1344.78" padH="76.35;76.35;76.59;76.59" nPadPhi="3;3;3;3" anglePadPhi="7.5" firstPadPhiDivision_C="-5.62;-1.87;-5.62;-1.87" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-1.87;-5.62;-1.87;-5.62" PadPhiShift_A="2;-2;2;-2" nPadH="15;15;16;16" firstPadH="81.98;81.98;50.99;50.99" firstPadRow="20;20;19;19" nWires="570;570;570;569" wireCutout="0;0;0;0" firstWire="-512.1;-511.65;-512.55;-511.2" wireGroupWidth="20" nStrips="365" firstTriggerBand="64;64;64;64" nTriggerBands="31;31;31;31" firstStripInTrigger="1;1;1;1" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="2;12;12;12;11;12;12;12;12;12;12; 12;12;12;12;12;11;12;12;12;12; 12;12;12;12;12;12;12;12;11;12" StripsInBandsLayer2="12;12;12;12;12;12;12;12;12;12;12; 12;12;12;11;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12" StripsInBandsLayer3="2;12;12;12;12;12;12;12;12;12;12; 12;12;12;11;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12" StripsInBandsLayer4="5;12;11;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12" nWireGroups="30;29;29;29" firstWireGroup="5;10;15;20"/> +</sTGC> + +<chamberPosition volume="sTG1-QS2C" type="ENDCAP" chamberType="sTGS" radius="2831.5" zPos="NSW_sTGC_ZSmallConfirm" phi0="22.5"/> + +<sTGC type="sTG1-QS3C" tech="sTGC_1" subType="QS3C" sWidth="1105.96" lWidth="1406.59" Length="1005.8" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" yCutoutCathode="0" stripPitch="NSW_sTGC_StripPitch" stripWidth="NSW_sTGC_StripWidth" wirePitch="NSW_sTGC_WirePitch"> + +<sTGC_readout sPadWidth="1051.61" lPadWidth="1344.78" sStripWidth="1051.61" lStripWidth="1344.78" padH="76.35;76.35;76.59;76.59" nPadPhi="3;3;3;3" anglePadPhi="7.5" firstPadPhiDivision_C="-5.62;-1.87;-5.62;-1.87" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-1.87;-5.62;-1.87;-5.62" PadPhiShift_A="2;-2;2;-2" nPadH="13;13;13;13" firstPadH="99.84;99.84;72.68;72.68" firstPadRow="36;36;35;35" nWires="738;739;739;739" wireCutout="0;0;0;0" firstWire="-663.3;-664.65;-663.75;-664.2" wireGroupWidth="20" nStrips="307" firstTriggerBand="37;37;37;37" nTriggerBands="26;26;25;25" firstStripInTrigger="1;1;1;1" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="6;7;12;12;12;12;12;12;11;11; 12;12;12;12;12;12;12;12;12;12; 12;11;12;13;12;12" StripsInBandsLayer2="2;10;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12; 12;12;12;12;13;12" StripsInBandsLayer3="2;10;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12; 12;12;12;13;13" StripsInBandsLayer4="1;12;12;12;12;12;12;11;12;12; 12;12;12;12;12;12;12;12;12;12; 12;12;12;13;11" nWireGroups="38;38;38;38" firstWireGroup="5;14;15;3"/> +</sTGC> + +<chamberPosition volume="sTG1-QS3C" type="ENDCAP" chamberType="sTGS" radius="3942.5" zPos="NSW_sTGC_ZSmallConfirm" phi0="22.5"/> + + +<!-- ================ Large Pivot ==================== --> + +<sTGC type="sTG1-QL1P" tech="sTGC_1" subType="QL1P" sWidth="542.61" lWidth="1206.82" Length="1332" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" yCutoutCathode="0" stripPitch="NSW_sTGC_StripPitch" stripWidth="NSW_sTGC_StripWidth" wirePitch="NSW_sTGC_WirePitch"> + +<sTGC_readout sPadWidth="476.42" lPadWidth="1126.66" sStripWidth="490.84" lStripWidth="1141.09" padH="81.42;81.42;81.66;81.66" nPadPhi="6;6;7;7" anglePadPhi="5" firstPadPhiDivision_C="-10;-10;-12.5;-12.5" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="-10;-10;-12.5;-12.5" PadPhiShift_A="-2;2;-2;2" nPadH="17;17;16;16" firstPadH="54.39;54.39;98.15;98.15" firstPadRow="1;1;2;2" nWires="621;620;620;620" wireCutout="808;835;862;889" firstWire="-558;-556.65;-557.55;-557.1" wireGroupWidth="20" nStrips="408" firstTriggerBand="3;3;3;3" nTriggerBands="30;30;30;30" firstStripInTrigger="45;45;45;45" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="13;13;12;13;13;13;12;13;13;12;13;13;13;12;13;13;12;13;13;13;12;13; 13;12;13;13;13;12;13;13" StripsInBandsLayer2="13;13;12;13;13;13;12;13;13;13;12;13;13;12;13;13;13;12;13;13;13;12; 13;13;12;13;13;13;12;13" StripsInBandsLayer3="13;13;12;13;13;13;12;13;13;13;12;13;13;13;12;13;13;13;12;13;13;13; 12;13;13;13;12;13;13;13" StripsInBandsLayer4="13;13;12;13;13;13;13;12;13;13;13;12;13;13;13;12;13;13;13;13;12;13; 13;13;12;13;13;13;12;13" nWireGroups="32;32;32;32" firstWireGroup="20;5;10;15"/> +</sTGC> +<chamberPosition volume="sTG1-QL1P" type="ENDCAP" chamberType="sTGL" radius="1595" zPos="NSW_sTGC_ZLargePivot" phi0="0.0"/> + +<sTGC type="sTG1-QL2P" tech="sTGC_1" subType="QL2P" sWidth="1211.81" lWidth="1807.5" Length="1194.6" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" yCutoutCathode="0" stripPitch="NSW_sTGC_StripPitch" stripWidth="NSW_sTGC_StripWidth" wirePitch="NSW_sTGC_WirePitch"> + +<sTGC_readout sPadWidth="1144.12" lPadWidth="1727.34" sStripWidth="1158.55" lStripWidth="1741.77" padH="81.42;81.42;81.66;81.66" nPadPhi="4;4;5;5" anglePadPhi="7.5" firstPadPhiDivision_C="-7.5;-7.5;-11.25;-11.25" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="-7.5;-7.5;-11.25;-11.25" PadPhiShift_A="-2;2;-2;2" nPadH="14;14;15;15" firstPadH="99.51;99.51;65.69;65.69" firstPadRow="18;18;18;18" nWires="953;954;954;954" wireCutout="0;0;0;0" firstWire="-856.8;-857.25;-858.15;-857.7" wireGroupWidth="20" nStrips="366" firstTriggerBand="33;33;33;33" nTriggerBands="30;30;30;29" firstStripInTrigger="1;1;1;1" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="9;6;12;13;13;12;13;13;13;12;13;13;1313;13;13;13;12;13;13;12;13;13;13; 12;13;13;12;13;13;13" StripsInBandsLayer2="9;6;13;13;12;13;13;13;12;13;13;12;1213;13;13;12;13;13;13;12;13;13;13; 12;13;13;12;13;13;13" StripsInBandsLayer3="7;8;12;13;13;13;12;13;13;13;12;13;1313;13;12;13;13;13;12;13;13;13;12; 13;13;13;12;13;13;13" StripsInBandsLayer4="7;8;13;13;13;12;13;13;13;12;13;13;1313;13;12;13;13;13;12;13;13;13;12; 13;13;13;12;13;13" nWireGroups="48;49;49;48" firstWireGroup="20;5;10;15"/> +</sTGC> + +<chamberPosition volume="sTG1-QL2P" type="ENDCAP" chamberType="sTGL" radius="2868.3" zPos="NSW_sTGC_ZLargePivot" phi0="0.0"/> + +<sTGC type="sTG1-QL3P" tech="sTGC_1" subType="QL3P" sWidth="1813.68" lWidth="2111" Length="1153" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="545.3" yCutoutCathode="539.26" stripPitch="NSW_sTGC_StripPitch" stripWidth="NSW_sTGC_StripWidth" wirePitch="NSW_sTGC_WirePitch"> +<sTGC_readout sPadWidth="1745.99" lPadWidth="2054" sStripWidth="1760.42" lStripWidth="2054" + padH="81.42;81.42;81.66;81.66" nPadPhi="4;4;5;5" anglePadPhi="7.5" firstPadPhiDivision_C="-7.5;-7.5;-11.25;-3.75" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="-7.5;-7.5;-11.25;-3.75" PadPhiShift_A="-2;2;-2;2" nPadH="15;15;14;14" firstPadH="32.38;32.38;83.57;83.57" firstPadRow="32;32;33;33" nWires="1133;1134;1134;1134" wireCutout="0;0;0;0" firstWire="-1018.8;-1019.25;-1020.15;-1019.7" wireGroupWidth="20" nStrips="353" firstTriggerBand="63;63;63;62" nTriggerBands="28;28;28;29" firstStripInTrigger="1;1;1;1" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="10;13;12;13;13;12;13;13;13; 12;13;13;12;13;13;12;13;13;13; 12;13;13;12;13;13;13;12;13" StripsInBandsLayer2="11;13;12;13;13;13;12;13;13; 12;13;13;13;12;13;13;13;12;13; 13;13;12;13;13;12;13;13;11" StripsInBandsLayer3="13;13;13;12;13;13;13;12;13; 13;13;12;13;13;13;12;13;13;13; 12;13;13;13;12;13;13;13;8" StripsInBandsLayer4="1;13;13;13;12;13;13;13;13;12; 13;13;13;12;13;13;13;12;13;13; 13;13;12;13;13;13;12;13;7" nWireGroups="57;58;58;57" firstWireGroup="20;5;10;15"/> +</sTGC> + +<chamberPosition volume="sTG1-QL3P" type="ENDCAP" chamberType="sTGL" radius="4054.5" zPos="NSW_sTGC_ZLargePivot" phi0="0.0"/> + +<!-- =============== Large Confirm ===================== --> + +<sTGC type="sTG1-QL1C" tech="sTGC_1" subType="QL1C" sWidth="542.61" lWidth="1206.82" Length="1332" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" yCutoutCathode="0" stripPitch="NSW_sTGC_StripPitch" stripWidth="NSW_sTGC_StripWidth" wirePitch="NSW_sTGC_WirePitch"> + +<sTGC_readout sPadWidth="490.84" lPadWidth="1141.09" sStripWidth="490.84" lStripWidth="1141.09" padH="85.07;85.07;85.31;85.31" nPadPhi="6;6;6;6" anglePadPhi="5" firstPadPhiDivision_C="-8.75;-11.25;-8.75;-11.25" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-11.25;-8.75;-11.25;-8.75" PadPhiShift_A="2;-2;2;-2" nPadH="16;16;16;16" firstPadH="35.26;35.26;80.66;80.66" firstPadRow="1;1;1;1" nWires="620;620;620;621" wireCutout="889;862;835;808" firstWire="-557.1;-556.65;-557.55;-558" wireGroupWidth="20" nStrips="408" firstTriggerBand="3;3;3;3" nTriggerBands="29;29;28;28" firstStripInTrigger="44;44;44;44" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="13;13;13;14;13;13;14;13;13;13; 14;13;13;14;13;13;13;14;13;13; 13;14;13;13;14;13;13;13" StripsInBandsLayer2="13;13;13;14;13;13;14;13;13;14; 13;13;13;14;13;13;14;13;13;14; 13;13;13;14;13;13;14;13" StripsInBandsLayer3="14;13;13;14;13;13;14;13;13;14; 13;13;14;13;13;14;13;13;14;13; 13;13;14;13;13;14;13;13" StripsInBandsLayer4="14;13;13;14;13;13;14;13;13;14; 13;13;14;13;13;14;13;13;14;13; 14;13;13;14;13;13;14;13" nWireGroups="32;32;32;32" firstWireGroup="5;10;15;20"/> +</sTGC> + +<chamberPosition volume="sTG1-QL1C" type="ENDCAP" chamberType="sTGL" radius="1595" zPos="NSW_sTGC_ZLargeConfirm" phi0="0.0"/> + +<sTGC type="sTG1-QL2C" tech="sTGC_1" subType="QL2C" sWidth="1211.81" lWidth="1807.5" Length="1194.6" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" yCutoutCathode="0" stripPitch="NSW_sTGC_StripPitch" stripWidth="NSW_sTGC_StripWidth" wirePitch="NSW_sTGC_WirePitch"> + +<sTGC_readout sPadWidth="1158.55" lPadWidth="1741.77" sStripWidth="1158.55" lStripWidth="1741.77" padH="85.07;85.07;85.31;85.31" nPadPhi="4;4;4;4" anglePadPhi="7.5" firstPadPhiDivision_C="-5.62;-9.37;-5.62;-9.37" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-9.37;-5.62;-9.37;-5.62" PadPhiShift_A="2;-2;2;-2" nPadH="14;14;14;14" firstPadH="57.31;57.31;106.55;106.55" firstPadRow="17;17;17;17" nWires="954;954;954;953" wireCutout="0;0;0;0" firstWire="-857.7;-857.25;-858.15;-856.8" wireGroupWidth="20" nStrips="366" firstTriggerBand="30;30;30;30" nTriggerBands="29;29;29;29" firstStripInTrigger="1;1;1;1" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="12;5;13;13;13;14;13;13;14;13; 13;13;14;13;13;14;13;13;13;14; 13;13;14;13;13;13;14;13;13" StripsInBandsLayer2="11;5;13;14;13;13;14;13;13;13; 14;13;13;14;13;13;14;13;13;14; 13;13;13;14;13;13;14;13;13" StripsInBandsLayer3="10;7;13;13;14;13;13;14;13;13; 13;14;13;13;14;13;13;14;13;13; 14;13;13;14;13;13;14;13;13" StripsInBandsLayer4="9;7;13;14;13;13;14;13;13;14; 13;13;14;13;13;14;13;14;13;13; 14;13;13;14;13;13;14;13;12" nWireGroups="49;49;48;48" firstWireGroup="5;10;15;20"/> +</sTGC> + +<chamberPosition volume="sTG1-QL2C" type="ENDCAP" chamberType="sTGL" radius="2868.3" zPos="NSW_sTGC_ZLargeConfirm" phi0="0.0"/> + +<sTGC type="sTG1-QL3C" tech="sTGC_1" subType="QL3C" sWidth="1813.68" lWidth="2111" Length="1153" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="545.3" yCutoutCathode="539.26" stripPitch="NSW_sTGC_StripPitch" stripWidth="NSW_sTGC_StripWidth" wirePitch="NSW_sTGC_WirePitch"> + +<sTGC_readout sPadWidth="1760.42" lPadWidth="2054" sStripWidth="1760.42" lStripWidth="2054" padH="85.07;85.07;85.31;85.31" nPadPhi="4;4;4;4" anglePadPhi="7.5" firstPadPhiDivision_C="-5.62;-9.37;-5.62;-9.37" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-9.37;-5.62;-9.37;-5.62" PadPhiShift_A="2;-2;2;-2" nPadH="14;14;13;13" firstPadH="41.23;41.23;93.82;93.82" firstPadRow="31;31;31;31" nWires="1134;1134;1134;1133" wireCutout="0;0;0;0" firstWire="-1019.7;-1019.25;-1020.15;-1018.8" wireGroupWidth="20" nStrips="353" firstTriggerBand="60;60;60;60" nTriggerBands="28;28;28;28" firstStripInTrigger="1;1;1;1" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="3;13;13;13;13;14;13;13;14;13;13; 13;14;13;13;14;13;13;13;14;13; 13;13;14;13;13;14;8" StripsInBandsLayer2="2;14;13;13;14;13;13;13;14;13;13; 14;13;13;14;13;13;13;14;13;13; 14;13;13;14;13;13;7" StripsInBandsLayer3="2;14;13;13;14;13;13;14;13;13;14; 13;13;14;13;13;13;14;13;13;14; 13;13;14;13;13;14;4" StripsInBandsLayer4="3;14;13;13;14;13;13;14;13;13;14; 13;13;14;13;13;14;13;13;14;13; 13;14;13;13;14;13;3" nWireGroups="58;58;57;57" firstWireGroup="5;10;15;20"/> +</sTGC> + +<chamberPosition volume="sTG1-QL3C" type="ENDCAP" chamberType="sTGL" radius="4054.5" zPos="NSW_sTGC_ZLargeConfirm" phi0="0.0"/> + +</composition> +</section> + + +<!-- ========== MicroMegas ============================== --> + +<section name="NSW_MM_Parameters" version="1" top_volume="useless" date="December 16 2014" author="S.Chen" > + +<!-- Frames. "f1": frame width close to the trapezium large side. "f2": frame width close to the trapezium small side. "f3": frame width close to the trapezium oblique side --> + +<!-- Distance from IP, labeled zmin_MM in Parameter Book --> +<var name="NSW_MM_LM_distanceFromIP" value="7536"/> +<var name="NSW_MM_SM_distanceFromIP" value="7072"/> +<!-- Thickness of Multilayer and the subcomponent (mm)--> +<var name="NSW_MM_GasTck" value="5.04"/> +<var name="NSW_MM_ROPcbTck" value="11.69"/> +<var name="NSW_MM_DriftPcbTck" value="11.284"/> +<var name="NSW_MM_MultilayerTck" value="NSW_NbrOfLayers* NSW_MM_GasTck + (NSW_NbrOfDriftPcb) * NSW_MM_DriftPcbTck+ ( NSW_NbrOfROPcb) * NSW_MM_ROPcbTck" /> <!-- Thickness of one multilayer --> + +<!-- Large sector modules (LM1" LM2). Modules are all trapezoid. ""Height"": radial envelope" ""base/top Width"": upper/lower side of the trapezoid--> +<var name="NSW_MM_LM1_InnerRadius" value="923" /> +<var name="NSW_MM_LM1_Length" value="2310" /> +<var name="NSW_MM_LM1_outerRadius" value="NSW_MM_LM1_InnerRadius+NSW_MM_LM1_Length" /> +<var name="NSW_MM_LM1_f1" value="30"/> +<var name="NSW_MM_LM1_f2" value="30"/> +<var name="NSW_MM_LM1_f3" value="100"/> +<var name="NSW_MM_LMGap_Length" value="5" /> <!-- Radial gap between LM1 and LM2 --> +<var name="NSW_MM_LM2_InnerRadius" value="NSW_MM_LM1_outerRadius+NSW_MM_LMGap_Length" /> +<var name="NSW_MM_LM2_Length" value="1410" /> +<var name="NSW_MM_LM2_outerRadius" value="NSW_MM_LM2_InnerRadius+NSW_MM_LM2_Length" /> +<var name="NSW_MM_LM1_baseWidth" value="640" /> +<var name="NSW_MM_LM1_topWidth" value="2008.5" /> +<var name="NSW_MM_LM2_baseWidth" value="2022.8" /> +<var name="NSW_MM_LM2_topWidth" value="2220" /> +<var name="NSW_MM_LM2_f1" value="30"/> +<var name="NSW_MM_LM2_f2" value="30"/> +<var name="NSW_MM_LM2_f3" value="100"/> +<!-- Small sector modules (SM1" SM2). Modules are all trapezoids. ""Height"": radial envelope" ""base/top Width"": upper/lower side --> +<var name="NSW_MM_SM1_InnerRadius" value="895" /> +<var name="NSW_MM_SM1_Length" value="2210" /> +<var name="NSW_MM_SM1_outerRadius" value="NSW_MM_SM1_InnerRadius+NSW_MM_SM1_Length" /> +<var name="NSW_MM_SMGap_Length" value="5" /> <!-- Radial gap between SM1 and SM2 --> +<var name="NSW_MM_SM1_f1" value="30"/> +<var name="NSW_MM_SM1_f2" value="30"/> +<var name="NSW_MM_SM1_f3" value="100"/> +<var name="NSW_MM_SM2_InnerRadius" value="NSW_MM_SM1_outerRadius+NSW_MM_SMGap_Length" /> +<var name="NSW_MM_SM2_Length" value="1350" /> +<var name="NSW_MM_SM2_outerRadius" value="NSW_MM_SM2_InnerRadius+NSW_MM_SM2_Length" /> +<var name="NSW_MM_SM1_baseWidth" value="500" /> +<var name="NSW_MM_SM1_topWidth" value="1319.2" /> +<var name="NSW_MM_SM2_baseWidth" value="1321.1" /> +<var name="NSW_MM_SM2_topWidth" value="1821.5" /> +<var name="NSW_MM_SM2_f1" value="30"/> +<var name="NSW_MM_SM2_f2" value="30"/> +<var name="NSW_MM_SM2_f3" value="100"/> + +<var name="NSW_MM_LargeSector_ZCENTER" value="(NSW_sTGC_ZLargePivot+NSW_sTGC_ZLargeConfirm)/2."/> +<var name="NSW_MM_SmallSector_ZCENTER" value="(NSW_sTGC_ZSmallPivot+NSW_sTGC_ZSmallConfirm)/2."/> + + +<!-- Thickness of inter-multilayer spacers --> +<var name="NSW_MM_SpacerThickness" value="50" /> + +<!-- Global z-coordinate for the sector center --> +<!-- <var name="NSW_MM_LargeSector_ZCENTER" value="NSW_MM_LM_distanceFromIP + 4.*NSW_MM_DriftPcbTck + 4.*NSW_MM_ROPcbTck + 4.*NSW_MM_GasTck + NSW_MM_SpacerThickness/2."/> +<var name="NSW_MM_SmallSector_ZCENTER" value="NSW_MM_SM_distanceFromIP + 4.*NSW_MM_DriftPcbTck + 4.*NSW_MM_ROPcbTck + 4.*NSW_MM_GasTck + NSW_MM_SpacerThickness/2."/> --> + +</section> + +<section name="NewSmallWheelsMM" version="1" top_volume="useless" date="December 16 2014" author="S.Chen" > + + +<!-- Technologies --> +<mm_Tech type="MM_1" geometryLevel="1" nLayers="NSW_NbrOfLayers" gasTck="NSW_MM_GasTck" driftPcbTck="NSW_MM_DriftPcbTck" ROPcbTck="NSW_MM_ROPcbTck" Tck="NSW_MM_MultilayerTck" /> +<mmSpacer_Tech type="Spa_1" Tck="NSW_MM_SpacerThickness" /> + +<!-- large wheel --> +<micromegas type="sMD1-1-1" tech="MM_1" subType="M1L1" sWidth="NSW_MM_LM1_baseWidth" lWidth="NSW_MM_LM1_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_LM1_Length" ylFrame="NSW_MM_LM1_f1" ysFrame="NSW_MM_LM1_f2" xFrame="NSW_MM_LM1_f3"> +<mm_readout stripPitch="0.45" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.; 0.; 0.02618; -0.02618" readoutSide="-1; 1; -1; 1" zPos="NSW_MM_LargeSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_LM1_InnerRadius" roLength="NSW_MM_LM1_Length"/> +</micromegas> +<micromegas type="sMD1-2-1" tech="MM_1" subType="M2L1" sWidth="NSW_MM_LM2_baseWidth" lWidth="NSW_MM_LM2_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_LM2_Length" ylFrame="NSW_MM_LM2_f1" ysFrame="NSW_MM_LM2_f2" xFrame="NSW_MM_LM2_f3"> +<mm_readout stripPitch="0.45" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.; 0.; 0.02618; -0.02618" readoutSide="-1; 1; -1; 1" zPos="NSW_MM_LargeSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_LM2_InnerRadius" roLength="NSW_MM_LM2_Length"/> +</micromegas> +<micromegas type="sMD1-1-2" tech="MM_1" subType="M1L2" sWidth="NSW_MM_LM1_baseWidth" lWidth="NSW_MM_LM1_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_LM1_Length" ylFrame="NSW_MM_LM1_f1" ysFrame="NSW_MM_LM1_f2" xFrame="NSW_MM_LM1_f3"> +<mm_readout stripPitch="0.45" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.02618; -0.02618; 0.; 0." readoutSide="-1; 1; -1; 1" zPos="NSW_MM_LargeSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_LM1_InnerRadius" roLength="NSW_MM_LM1_Length"/> +</micromegas> +<micromegas type="sMD1-2-2" tech="MM_1" subType="M2L2" sWidth="NSW_MM_LM2_baseWidth" lWidth="NSW_MM_LM2_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_LM2_Length" ylFrame="NSW_MM_LM2_f1" ysFrame="NSW_MM_LM2_f2" xFrame="NSW_MM_LM2_f3"> +<mm_readout stripPitch="0.45" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.02618; -0.02618; 0.; 0." readoutSide="-1; 1; -1; 1" zPos="NSW_MM_LargeSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_LM2_InnerRadius" roLength="NSW_MM_LM2_Length"/> +</micromegas> + +<mmSpacer type="spa1-1" tech="Spa_1" sWidth="NSW_MM_LM1_baseWidth" lWidth="NSW_MM_LM1_topWidth" Tck="NSW_MM_SpacerThickness" Length="NSW_MM_LM1_Length" /> +<mmSpacer type="spa1-2" tech="Spa_1" sWidth="NSW_MM_LM2_baseWidth" lWidth="NSW_MM_LM2_topWidth" Tck="NSW_MM_SpacerThickness" Length="NSW_MM_LM2_Length" /> + + +<!-- small wheel --> +<micromegas type="sMD3-1-1" tech="MM_1" subType="M1S1" sWidth="NSW_MM_SM1_baseWidth" lWidth="NSW_MM_SM1_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_SM1_Length" ylFrame="NSW_MM_SM1_f1" ysFrame="NSW_MM_SM1_f2" xFrame="NSW_MM_SM1_f3"> +<mm_readout stripPitch="0.425" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.; 0.; 0.02618; -0.02618" readoutSide="-1; 1; -1; 1" zPos="NSW_MM_SmallSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_SM1_InnerRadius" roLength="NSW_MM_SM1_Length"/> +</micromegas> +<micromegas type="sMD3-2-1" tech="MM_1" subType="M2S1" sWidth="NSW_MM_SM2_baseWidth" lWidth="NSW_MM_SM2_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_SM2_Length" ylFrame="NSW_MM_SM2_f1" ysFrame="NSW_MM_SM2_f2" xFrame="NSW_MM_SM2_f3"> +<mm_readout stripPitch="0.425" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.; 0.; 0.02618; -0.02618" readoutSide="-1; 1; -1; 1" zPos="NSW_MM_SmallSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_SM2_InnerRadius" roLength="NSW_MM_SM2_Length"/> +</micromegas> +<micromegas type="sMD3-1-2" tech="MM_1" subType="M1S2" sWidth="NSW_MM_SM1_baseWidth" lWidth="NSW_MM_SM1_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_SM1_Length" ylFrame="NSW_MM_SM1_f1" ysFrame="NSW_MM_SM1_f2" xFrame="NSW_MM_SM1_f3"> +<mm_readout stripPitch="0.425" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.02618; -0.02618; 0.; 0." readoutSide="-1; 1; -1; 1" zPos="NSW_MM_SmallSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_SM1_InnerRadius" roLength="NSW_MM_SM1_Length"/> +</micromegas> +<micromegas type="sMD3-2-2" tech="MM_1" subType="M2S2" sWidth="NSW_MM_SM2_baseWidth" lWidth="NSW_MM_SM2_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_SM2_Length" ylFrame="NSW_MM_SM2_f1" ysFrame="NSW_MM_SM2_f2" xFrame="NSW_MM_SM2_f3"> +<mm_readout stripPitch="0.425" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.02618; -0.02618; 0.; 0." readoutSide="-1; 1; -1; 1" zPos="NSW_MM_SmallSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_SM2_InnerRadius" roLength="NSW_MM_SM2_Length"/> +</micromegas> +<mmSpacer type="spa3-1" tech="Spa_1" sWidth="NSW_MM_SM1_baseWidth" lWidth="NSW_MM_SM1_topWidth" Tck="NSW_MM_SpacerThickness" Length="NSW_MM_SM1_Length" /> +<mmSpacer type="spa3-2" tech="Spa_1" sWidth="NSW_MM_SM2_baseWidth" lWidth="NSW_MM_SM2_topWidth" Tck="NSW_MM_SpacerThickness" Length="NSW_MM_SM2_Length" /> + +<composition name="NSW_MM" > +<!-- A-SIDE --> + +<!-- LARGE SECTOR --> + +<!-- MM multilayer 1 --> +<chamberPosition volume="sMD1-1-1" radius="(NSW_MM_LM1_InnerRadius+NSW_MM_LM1_outerRadius)/2" zPos="NSW_MM_LargeSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="0" /> +<chamberPosition volume="sMD1-2-1" radius="(NSW_MM_LM2_InnerRadius+NSW_MM_LM2_outerRadius)/2" zPos="NSW_MM_LargeSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="0" /> +<!-- spacer --> +<mposPhi volume="spa1-1" ncopy="8" R_Z="(NSW_MM_LM1_InnerRadius+NSW_MM_LM1_outerRadius)/2;NSW_MM_LargeSector_ZCENTER" Phi0="0" rot=" 90.; 270.; 90." /> +<mposPhi volume="spa1-2" ncopy="8" R_Z="(NSW_MM_LM2_InnerRadius+NSW_MM_LM2_outerRadius)/2;NSW_MM_LargeSector_ZCENTER" Phi0="0" rot=" 90.; 270.; 90." /> + +<!-- MM multilayer 2 --> +<chamberPosition volume="sMD1-1-2" radius="(NSW_MM_LM1_InnerRadius+NSW_MM_LM1_outerRadius)/2" zPos="NSW_MM_LargeSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="0" /> +<chamberPosition volume="sMD1-2-2" radius="(NSW_MM_LM2_InnerRadius+NSW_MM_LM2_outerRadius)/2" zPos="NSW_MM_LargeSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="0" /> + +<!-- SMALL SECTOR --> + +<!-- MM multilayer 1 --> +<chamberPosition volume="sMD3-1-1" radius="(NSW_MM_SM1_InnerRadius+NSW_MM_SM1_outerRadius)/2" zPos="NSW_MM_SmallSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="22.5" /> +<chamberPosition volume="sMD3-2-1" radius="(NSW_MM_SM2_InnerRadius+NSW_MM_SM2_outerRadius)/2" zPos="NSW_MM_SmallSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="22.5" /> + +<!-- spacer --> +<mposPhi volume="spa3-1" ncopy="8" R_Z="(NSW_MM_SM1_InnerRadius+NSW_MM_SM1_outerRadius)/2;NSW_MM_SmallSector_ZCENTER" Phi0="22.5" rot=" 90.; 270.; 90." /> +<mposPhi volume="spa3-2" ncopy="8" R_Z="(NSW_MM_SM2_InnerRadius+NSW_MM_SM2_outerRadius)/2;NSW_MM_SmallSector_ZCENTER" Phi0="22.5" rot=" 90.; 270.; 90." /> + +<!-- MM multilayer 2 --> +<chamberPosition volume="sMD3-1-2" radius="(NSW_MM_SM1_InnerRadius+NSW_MM_SM1_outerRadius)/2" zPos="NSW_MM_SmallSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="22.5" /> +<chamberPosition volume="sMD3-2-2" radius="(NSW_MM_SM2_InnerRadius+NSW_MM_SM2_outerRadius)/2" zPos="NSW_MM_SmallSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="22.5" /> + +<!-- C-SIDE --> +<!-- LARGE SECTOR --> +<!-- spacer --> +<mposPhi volume="spa1-1" ncopy="8" R_Z="(NSW_MM_LM1_InnerRadius+NSW_MM_LM1_outerRadius)/2;-NSW_MM_LargeSector_ZCENTER" Phi0="0" rot=" 90.; 90.; 90." /> +<mposPhi volume="spa1-2" ncopy="8" R_Z="(NSW_MM_LM2_InnerRadius+NSW_MM_LM2_outerRadius)/2;-NSW_MM_LargeSector_ZCENTER" Phi0="0" rot=" 90.; 90.; 90." /> + +<!-- SMALL SECTOR --> +<!-- spacer --> +<mposPhi volume="spa3-1" ncopy="8" R_Z="(NSW_MM_SM1_InnerRadius+NSW_MM_SM1_outerRadius)/2;-NSW_MM_SmallSector_ZCENTER" Phi0="22.5" rot=" 90.; 90.; 90." /> +<mposPhi volume="spa3-2" ncopy="8" R_Z="(NSW_MM_SM2_InnerRadius+NSW_MM_SM2_outerRadius)/2;-NSW_MM_SmallSector_ZCENTER" Phi0="22.5" rot=" 90.; 90.; 90." /> + +</composition> + +</section> + + +<!-- ========== Poisitionning sTGC in NSW================ --> + + +<section name="NewSmallWheels" version="4.3" top_volume="useless" date=" April 20, 2015 " author="Daniel Lellouch"> + +<composition name="NewSmallWheel"> + <posXYZ volume="NSW_sTGC" X_Y_Z="0.;0.;0."/> + <posXYZ volume="NSW_MM" X_Y_Z="0.;0.;0." /> +</composition> + +</section> +</AGDD> diff --git a/MuonSpectrometer/MuonG4/NSW_Sim/data/stations.v2.03.xml b/MuonSpectrometer/MuonG4/NSW_Sim/data/stations.v2.03.xml new file mode 100644 index 000000000000..56934a2ef7b7 --- /dev/null +++ b/MuonSpectrometer/MuonG4/NSW_Sim/data/stations.v2.03.xml @@ -0,0 +1,1787 @@ +<?xml version="1.0" encoding="UTF-8"?> +<AGDD> + +<section name="NSW_Parameters" version="1" top_volume="useless" date="December 16 2014" author="S.Chen" > +<!-- Global variables--> +<var name="NSW_NbrOfLayers" value="4"/> +<var name="NSW_NbrOfDriftPcb" value="3"/> +<var name="NSW_NbrOfROPcb" value="2"/> +<!--Center between the large sectors and the small sectors--> +<var name="ZCenter_Global" value="7409"/> +</section> + +<section name="NSW_sTGC_Parameters" version="13.7" top_volume="useless" date=" June 30, 2016 " author="Daniel Lellouch"> +<!-- ================ Global Variables ================= --> + +<!-- Thickness of a quadruplet --> +<var name="NSW_sTGC_Tck" value="49.34"/> +<!-- Gas Gap inside one layer --> +<var name="NSW_sTGC_GasTck" value="2.85"/> +<!-- G10 thickness per layer --> +<var name="NSW_sTGC_pcbTck" value="3"/> +<!-- Number of layers in a quaduplet --> +<var name="NSW_sTGC_NbrOfLayers" value="4"/> +<!-- Wire pitch --> +<var name="NSW_sTGC_WirePitch" value="1.8"/> +<!-- Strip pitch --> +<var name="NSW_sTGC_StripPitch" value="3.2"/> +<!-- Strip width --> +<var name="NSW_sTGC_StripWidth" value="2.7"/> +<!-- Width of G10 frame besides gas volume --> +<var name="NSW_sTGC_SideFrame" value="28.5"/> +<!-- Width of G10 frame in base w/o capacitor --> +<var name="NSW_sTGC_hFrameNoCapacitor" value="11"/> +<!-- Width of G10 frame in base with capacitor --> +<var name="NSW_sTGC_hFrameCapacitor" value="14"/> +<!-- Opening (in degrees) of trapezes in small wedges --> +<var name="NSW_sTGC_SmallOpening" value="17"/> +<!-- Opening (in degrees) of trapezes in large wedges --> +<var name="NSW_sTGC_LargeOpening" value="28"/> +<!-- Z center of small Pivot --> +<var name="NSW_sTGC_ZSmallPivot" value="ZCenter_Global-51.5"/> +<!-- Z center of small Confirm --> +<var name="NSW_sTGC_ZSmallConfirm" value="ZCenter_Global-399"/> +<!-- Z center of Large Pivot --> +<var name="NSW_sTGC_ZLargePivot" value="ZCenter_Global+51.5"/> +<!-- Z center of Large Confirm --> +<var name="NSW_sTGC_ZLargeConfirm" value="ZCenter_Global+399"/> +<!-- Z of each volume, relative to center of quadruplet --> +<array name="NSW_sTGC_LayerDeltaZ" values="-16.45;-5.48;5.49;16.46"/> +<!-- Side of the Pad readout --> +<array name="NSW_sTGC_PadSide" values="-1;1;-1;1"/> +<!-- Side of the Strip readout --> +<array name="NSW_sTGC_StripSide" values="1;-1;1;-1"/> +</section> + +<!-- ================ sTGC ========================= --> + + +<section name="NewSmallWheels_sTGC" version="20.2" top_volume="useless" date=" March 31, 2018 " author="Daniel Lellouch"> + +<composition name="NSW_sTGC"> + +<sTGC_Tech type="sTGC_1" geometryLevel="1" nLayers="NSW_sTGC_NbrOfLayers" gasTck="NSW_sTGC_GasTck" pcbTck="NSW_sTGC_pcbTck" Tck="NSW_sTGC_Tck" f4="NSW_sTGC_hFrameNoCapacitor" f5="NSW_sTGC_hFrameNoCapacitor" f6="NSW_sTGC_SideFrame"/> + +<!-- ================ small Pivot ========================= --> + +<sTGC type="sTG1-QS1P" tech="sTGC_1" subType="QS1P" sWidth="346.93" lWidth="743.15" Length="1325.6" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" yCutoutCathode="0" stripPitch="NSW_sTGC_StripPitch" stripWidth="NSW_sTGC_StripWidth" wirePitch="NSW_sTGC_WirePitch"> + +<sTGC_readout sPadWidth="279.32" lPadWidth="667.18" sStripWidth="293.48" lStripWidth="681.33" padH="80;80;80.24;80.24" nPadPhi="4;4;3;3" anglePadPhi="5" firstPadPhiDivision_C="-5;-5;-2.5;-2.5" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="-5;-5;-2.5;-2.5" PadPhiShift_A="-2;2;-2;2" nPadH="17;17;17;17" firstPadH="65.8;65.8;28.61;28.61" firstPadRow="1;1;1;1" nWires="371;370;370;370" wireCutout="802.8;829.8;856.8;883.8" firstWire="-333;-331.65;-332.55;-332.1" wireGroupWidth="20" nStrips="406" firstTriggerBand="3;3;3;3" nTriggerBands="28;28;28;28" firstStripInTrigger="44;44;44;44" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13; 12;13;12;13;12;13;10" StripsInBandsLayer2="12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13;13;12; 13;12;13;12;13;12;10" StripsInBandsLayer3="12;13;12;13;12;13;12;13;13;12;13;12;13;12;13;12;13;12;13;12;13;12; 13;12;13;13;12;13;8" StripsInBandsLayer4="12;13;12;13;12;13;13;12;13;12;13;12;13;12;13;13;12;13;12;13;12;13; 12;13;12;13;13;12;8" nWireGroups="19;20;19;19" firstWireGroup="20;5;10;15"/> +</sTGC> + +<chamberPosition volume="sTG1-QS1P" type="ENDCAP" chamberType="sTGS" radius="1563" zPos="NSW_sTGC_ZSmallPivot" phi0="22.5"/> + +<sTGC type="sTG1-QS2P" tech="sTGC_1" subType="QS2P" sWidth="746.14" lWidth="1102.25" Length="1191.4" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" yCutoutCathode="0" stripPitch="NSW_sTGC_StripPitch" stripWidth="NSW_sTGC_StripWidth" wirePitch="NSW_sTGC_WirePitch"> + +<sTGC_readout sPadWidth="677.64" lPadWidth="1026.28" sStripWidth="691.8" lStripWidth="1040.43" padH="80;80;80.24;80.24" nPadPhi="2;2;3;3" anglePadPhi="7.5" firstPadPhiDivision_C="0;0;-3.75;-3.75" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="0;0;-3.75;-3.75" PadPhiShift_A="-2;2;-2;2" nPadH="15;15;15;15" firstPadH="93.2;93.2;60.09;60.09" firstPadRow="18;18;18;18" nWires="569;570;570;570" wireCutout="0;0;0;0" firstWire="-511.2;-511.65;-512.55;-512.1" wireGroupWidth="20" nStrips="365" firstTriggerBand="34;34;34;34" nTriggerBands="30;30;30;30" firstStripInTrigger="1;1;1;1" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="4;13;12;13;12;13;12;13;12;12; 12;13;12;12;13;12;13;12;13;12; 13;12;13;12;13;12;13;12;13;11" StripsInBandsLayer2="5;12;13;12;13;12;13;12;13;13; 13;12;13;12;13;12;13;12;13;12; 13;12;13;12;13;12;13;12;13;10" StripsInBandsLayer3="5;12;13;12;13;12;13;12;13;13; 13;12;13;12;13;12;13;12;13;12; 13;12;13;12;13;12;13;12;13;10" StripsInBandsLayer4="7;12;13;12;13;12;13;13;12;12; 12;13;12;13;12;13;13;12;13;12; 13;12;13;12;13;12;13;13;12;7" nWireGroups="29;30;29;29" firstWireGroup="20;5;10;15"/> +</sTGC> + +<chamberPosition volume="sTG1-QS2P" type="ENDCAP" chamberType="sTGS" radius="2831.5" zPos="NSW_sTGC_ZSmallPivot" phi0="22.5"/> + +<sTGC type="sTG1-QS3P" tech="sTGC_1" subType="QS3P" sWidth="1105.96" lWidth="1406.59" Length="1005.8" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" yCutoutCathode="0" stripPitch="NSW_sTGC_StripPitch" stripWidth="NSW_sTGC_StripWidth" wirePitch="NSW_sTGC_WirePitch"> + +<sTGC_readout sPadWidth="1037.46" lPadWidth="1330.62" sStripWidth="293.48" lStripWidth="681.33" padH="80;80;80.24;80.24" nPadPhi="2;2;3;3" anglePadPhi="7.5" firstPadPhiDivision_C="0;0;-3.75;-3.75" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="0;0;-3.75;-3.75" PadPhiShift_A="-2;2;2;2" nPadH="12;12;13;13" firstPadH="89.4;89.4;59.88;59.88" firstPadRow="33;33;33;33" nWires="739;739;739;738" wireCutout="0;0;0;0" firstWire="-664.2;-664.65;-663.75;-663.3" wireGroupWidth="20" nStrips="307" firstTriggerBand="64;64;64;64" nTriggerBands="26;26;25;25" firstStripInTrigger="1;1;1;1" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="3;12;13;12;13;12;13;12;13;13; 13;12;13;12;13;12;12;13;12;13; 12;13;12;13;12;5" StripsInBandsLayer2="6;12;13;12;13;13;12;13;12;12; 12;13;12;13;12;13;12;13;12;13; 13;12;13;12;13;3" StripsInBandsLayer3="6;12;13;12;13;13;12;13;12;12; 12;13;12;13;12;13;12;13;12;13; 12;13;12;13;13" StripsInBandsLayer4="7;13;12;13;12;13;12;13;12;12; 12;13;13;12;13;12;13;12;13;12; 13;12;13;13;11" nWireGroups="37;38;38;38" firstWireGroup="20;14;10;3"/> +</sTGC> + +<chamberPosition volume="sTG1-QS3P" type="ENDCAP" chamberType="sTGS" radius="3942.5" zPos="NSW_sTGC_ZSmallPivot" phi0="22.5"/> + + +<!-- ================ small confirm =============== --> + +<sTGC type="sTG1-QS1C" tech="sTGC_1" subType="QS1C" sWidth="346.93" lWidth="743.15" Length="1325.6" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" yCutoutCathode="0" stripPitch="NSW_sTGC_StripPitch" stripWidth="NSW_sTGC_StripWidth" wirePitch="NSW_sTGC_WirePitch"> + +<sTGC_readout sPadWidth="293.48" lPadWidth="681.33" sStripWidth="691.8" lStripWidth="1040.43" padH="76.35;76.35;76.59;76.59" nPadPhi="4;4;4;4" anglePadPhi="5" firstPadPhiDivision_C="-3.75;-6.25;-3.75;-6.25" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-6.25;-3.75;-6.25;-3.75" PadPhiShift_A="2;-2;2;-2" nPadH="18;18;17;17" firstPadH="40.22;40.22;81.51;81.51" firstPadRow="2;2;2;2" nWires="370;370;370;371" wireCutout="883.8;856.8;829.8;802.8" firstWire="-332.1;-331.65;-332.55;-333" wireGroupWidth="20" nStrips="406" firstTriggerBand="5;5;5;5" nTriggerBands="32;32;31;31" firstStripInTrigger="44;44;44;44" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="12;12;12;11;12;12;12;12;12;12; 12;12;12;12;12;12;11;12;12;12; 12;12;12;12;12;12;12;12;11;12;12;12" StripsInBandsLayer2="12;12;12;12;11;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12; 11;12;12;12;12;12;12;12;12;12;12;11" StripsInBandsLayer3="12;12;12;12;11;12;12;12;12; 12;12;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12;11;10" StripsInBandsLayer4="12;12;12;12;12;12;12;12;11; 12;12;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12;12;9" nWireGroups="20;19;19;19" firstWireGroup="5;10;15;20"/> +</sTGC> + +<chamberPosition volume="sTG1-QS1C" type="ENDCAP" chamberType="sTGS" radius="1563" zPos="NSW_sTGC_ZSmallConfirm" phi0="22.5"/> + +<sTGC type="sTG1-QS2C" tech="sTGC_1" subType="QS2C" sWidth="746.14" lWidth="1102.25" Length="1191.4" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" yCutoutCathode="0" stripPitch="NSW_sTGC_StripPitch" stripWidth="NSW_sTGC_StripWidth" wirePitch="NSW_sTGC_WirePitch"> + +<sTGC_readout sPadWidth="691.8" lPadWidth="1040.43" sStripWidth="1051.61" lStripWidth="1344.78" padH="76.35;76.35;76.59;76.59" nPadPhi="3;3;3;3" anglePadPhi="7.5" firstPadPhiDivision_C="-5.62;-1.87;-5.62;-1.87" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-1.87;-5.62;-1.87;-5.62" PadPhiShift_A="2;-2;2;-2" nPadH="15;15;16;16" firstPadH="81.98;81.98;50.99;50.99" firstPadRow="20;20;19;19" nWires="570;570;570;569" wireCutout="0;0;0;0" firstWire="-512.1;-511.65;-512.55;-511.2" wireGroupWidth="20" nStrips="365" firstTriggerBand="64;64;64;64" nTriggerBands="31;31;31;31" firstStripInTrigger="1;1;1;1" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="2;12;12;12;11;12;12;12;12;12;12; 12;12;12;12;12;11;12;12;12;12; 12;12;12;12;12;12;12;12;11;12" StripsInBandsLayer2="12;12;12;12;12;12;12;12;12;12;12; 12;12;12;11;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12" StripsInBandsLayer3="2;12;12;12;12;12;12;12;12;12;12; 12;12;12;11;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12" StripsInBandsLayer4="5;12;11;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12" nWireGroups="30;29;29;29" firstWireGroup="5;10;15;20"/> +</sTGC> + +<chamberPosition volume="sTG1-QS2C" type="ENDCAP" chamberType="sTGS" radius="2831.5" zPos="NSW_sTGC_ZSmallConfirm" phi0="22.5"/> + +<sTGC type="sTG1-QS3C" tech="sTGC_1" subType="QS3C" sWidth="1105.96" lWidth="1406.59" Length="1005.8" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" yCutoutCathode="0" stripPitch="NSW_sTGC_StripPitch" stripWidth="NSW_sTGC_StripWidth" wirePitch="NSW_sTGC_WirePitch"> + +<sTGC_readout sPadWidth="1051.61" lPadWidth="1344.78" sStripWidth="1051.61" lStripWidth="1344.78" padH="76.35;76.35;76.59;76.59" nPadPhi="3;3;3;3" anglePadPhi="7.5" firstPadPhiDivision_C="-5.62;-1.87;-5.62;-1.87" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-1.87;-5.62;-1.87;-5.62" PadPhiShift_A="2;-2;2;-2" nPadH="13;13;13;13" firstPadH="99.84;99.84;72.68;72.68" firstPadRow="36;36;35;35" nWires="738;739;739;739" wireCutout="0;0;0;0" firstWire="-663.3;-664.65;-663.75;-664.2" wireGroupWidth="20" nStrips="307" firstTriggerBand="37;37;37;37" nTriggerBands="26;26;25;25" firstStripInTrigger="1;1;1;1" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="6;7;12;12;12;12;12;12;11;11; 12;12;12;12;12;12;12;12;12;12; 12;11;12;13;12;12" StripsInBandsLayer2="2;10;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12; 12;12;12;12;13;12" StripsInBandsLayer3="2;10;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12; 12;12;12;13;13" StripsInBandsLayer4="1;12;12;12;12;12;12;11;12;12; 12;12;12;12;12;12;12;12;12;12; 12;12;12;13;11" nWireGroups="38;38;38;38" firstWireGroup="5;14;15;3"/> +</sTGC> + +<chamberPosition volume="sTG1-QS3C" type="ENDCAP" chamberType="sTGS" radius="3942.5" zPos="NSW_sTGC_ZSmallConfirm" phi0="22.5"/> + + +<!-- ================ Large Pivot ==================== --> + +<sTGC type="sTG1-QL1P" tech="sTGC_1" subType="QL1P" sWidth="542.61" lWidth="1206.82" Length="1332" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" yCutoutCathode="0" stripPitch="NSW_sTGC_StripPitch" stripWidth="NSW_sTGC_StripWidth" wirePitch="NSW_sTGC_WirePitch"> + +<sTGC_readout sPadWidth="476.42" lPadWidth="1126.66" sStripWidth="490.84" lStripWidth="1141.09" padH="81.42;81.42;81.66;81.66" nPadPhi="6;6;7;7" anglePadPhi="5" firstPadPhiDivision_C="-10;-10;-12.5;-12.5" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="-10;-10;-12.5;-12.5" PadPhiShift_A="-2;2;-2;2" nPadH="17;17;16;16" firstPadH="54.39;54.39;98.15;98.15" firstPadRow="1;1;2;2" nWires="621;620;620;620" wireCutout="808;835;862;889" firstWire="-558;-556.65;-557.55;-557.1" wireGroupWidth="20" nStrips="408" firstTriggerBand="3;3;3;3" nTriggerBands="30;30;30;30" firstStripInTrigger="45;45;45;45" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="13;13;12;13;13;13;12;13;13;12;13;13;13;12;13;13;12;13;13;13;12;13; 13;12;13;13;13;12;13;13" StripsInBandsLayer2="13;13;12;13;13;13;12;13;13;13;12;13;13;12;13;13;13;12;13;13;13;12; 13;13;12;13;13;13;12;13" StripsInBandsLayer3="13;13;12;13;13;13;12;13;13;13;12;13;13;13;12;13;13;13;12;13;13;13; 12;13;13;13;12;13;13;13" StripsInBandsLayer4="13;13;12;13;13;13;13;12;13;13;13;12;13;13;13;12;13;13;13;13;12;13; 13;13;12;13;13;13;12;13" nWireGroups="32;32;32;32" firstWireGroup="20;5;10;15"/> +</sTGC> + +<chamberPosition volume="sTG1-QL1P" type="ENDCAP" chamberType="sTGL" radius="1595" zPos="NSW_sTGC_ZLargePivot" phi0="0.0"/> + +<sTGC type="sTG1-QL2P" tech="sTGC_1" subType="QL2P" sWidth="1211.81" lWidth="1807.5" Length="1194.6" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" yCutoutCathode="0" stripPitch="NSW_sTGC_StripPitch" stripWidth="NSW_sTGC_StripWidth" wirePitch="NSW_sTGC_WirePitch"> + +<sTGC_readout sPadWidth="1144.12" lPadWidth="1727.34" sStripWidth="1158.55" lStripWidth="1741.77" padH="81.42;81.42;81.66;81.66" nPadPhi="4;4;5;5" anglePadPhi="7.5" firstPadPhiDivision_C="-7.5;-7.5;-11.25;-11.25" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="-7.5;-7.5;-11.25;-11.25" PadPhiShift_A="-2;2;-2;2" nPadH="14;14;15;15" firstPadH="99.51;99.51;65.69;65.69" firstPadRow="18;18;18;18" nWires="953;954;954;954" wireCutout="0;0;0;0" firstWire="-856.8;-857.25;-858.15;-857.7" wireGroupWidth="20" nStrips="366" firstTriggerBand="33;33;33;33" nTriggerBands="30;30;30;29" firstStripInTrigger="1;1;1;1" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="9;6;12;13;13;12;13;13;13;12;13;13;1313;13;13;13;12;13;13;12;13;13;13; 12;13;13;12;13;13;13" StripsInBandsLayer2="9;6;13;13;12;13;13;13;12;13;13;12;1213;13;13;12;13;13;13;12;13;13;13; 12;13;13;12;13;13;13" StripsInBandsLayer3="7;8;12;13;13;13;12;13;13;13;12;13;1313;13;12;13;13;13;12;13;13;13;12; 13;13;13;12;13;13;13" StripsInBandsLayer4="7;8;13;13;13;12;13;13;13;12;13;13;1313;13;12;13;13;13;12;13;13;13;12; 13;13;13;12;13;13" nWireGroups="48;49;49;48" firstWireGroup="20;5;10;15"/> +</sTGC> + +<chamberPosition volume="sTG1-QL2P" type="ENDCAP" chamberType="sTGL" radius="2868.3" zPos="NSW_sTGC_ZLargePivot" phi0="0.0"/> + +<sTGC type="sTG1-QL3P" tech="sTGC_1" subType="QL3P" sWidth="1813.68" lWidth="2111" Length="1153" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="545.3" yCutoutCathode="539.26" stripPitch="NSW_sTGC_StripPitch" stripWidth="NSW_sTGC_StripWidth" wirePitch="NSW_sTGC_WirePitch"> +<sTGC_readout sPadWidth="1745.99" lPadWidth="2054" sStripWidth="1760.42" lStripWidth="2054" + padH="81.42;81.42;81.66;81.66" nPadPhi="4;4;5;5" anglePadPhi="7.5" firstPadPhiDivision_C="-7.5;-7.5;-11.25;-11.25" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="-7.5;-7.5;-11.25;-11.25" PadPhiShift_A="-2;2;-2;2" nPadH="15;15;14;14" firstPadH="32.38;32.38;83.57;83.57" firstPadRow="32;32;33;33" nWires="1133;1134;1134;1134" wireCutout="0;0;0;0" firstWire="-1018.8;-1019.25;-1020.15;-1019.7" wireGroupWidth="20" nStrips="353" firstTriggerBand="63;63;63;62" nTriggerBands="28;28;28;29" firstStripInTrigger="1;1;1;1" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="10;13;12;13;13;12;13;13;13; 12;13;13;12;13;13;12;13;13;13; 12;13;13;12;13;13;13;12;13" StripsInBandsLayer2="11;13;12;13;13;13;12;13;13; 12;13;13;13;12;13;13;13;12;13; 13;13;12;13;13;12;13;13;11" StripsInBandsLayer3="13;13;13;12;13;13;13;12;13; 13;13;12;13;13;13;12;13;13;13; 12;13;13;13;12;13;13;13;8" StripsInBandsLayer4="1;13;13;13;12;13;13;13;13;12; 13;13;13;12;13;13;13;12;13;13; 13;13;12;13;13;13;12;13;7" nWireGroups="57;58;58;57" firstWireGroup="20;5;10;15"/> +</sTGC> + +<chamberPosition volume="sTG1-QL3P" type="ENDCAP" chamberType="sTGL" radius="4054.5" zPos="NSW_sTGC_ZLargePivot" phi0="0.0"/> + +<!-- =============== Large Confirm ===================== --> + +<sTGC type="sTG1-QL1C" tech="sTGC_1" subType="QL1C" sWidth="542.61" lWidth="1206.82" Length="1332" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" yCutoutCathode="0" stripPitch="NSW_sTGC_StripPitch" stripWidth="NSW_sTGC_StripWidth" wirePitch="NSW_sTGC_WirePitch"> + +<sTGC_readout sPadWidth="490.84" lPadWidth="1141.09" sStripWidth="490.84" lStripWidth="1141.09" padH="85.07;85.07;85.31;85.31" nPadPhi="6;6;6;6" anglePadPhi="5" firstPadPhiDivision_C="-8.75;-11.25;-8.75;-11.25" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-11.25;-8.75;-11.25;-8.75" PadPhiShift_A="2;-2;2;-2" nPadH="16;16;16;16" firstPadH="35.26;35.26;80.66;80.66" firstPadRow="1;1;1;1" nWires="620;620;620;621" wireCutout="889;862;835;808" firstWire="-557.1;-556.65;-557.55;-558" wireGroupWidth="20" nStrips="408" firstTriggerBand="3;3;3;3" nTriggerBands="29;29;28;28" firstStripInTrigger="44;44;44;44" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="13;13;13;14;13;13;14;13;13;13; 14;13;13;14;13;13;13;14;13;13; 13;14;13;13;14;13;13;13" StripsInBandsLayer2="13;13;13;14;13;13;14;13;13;14; 13;13;13;14;13;13;14;13;13;14; 13;13;13;14;13;13;14;13" StripsInBandsLayer3="14;13;13;14;13;13;14;13;13;14; 13;13;14;13;13;14;13;13;14;13; 13;13;14;13;13;14;13;13" StripsInBandsLayer4="14;13;13;14;13;13;14;13;13;14; 13;13;14;13;13;14;13;13;14;13; 14;13;13;14;13;13;14;13" nWireGroups="32;32;32;32" firstWireGroup="5;10;15;20"/> +</sTGC> + +<chamberPosition volume="sTG1-QL1C" type="ENDCAP" chamberType="sTGL" radius="1595" zPos="NSW_sTGC_ZLargeConfirm" phi0="0.0"/> + +<sTGC type="sTG1-QL2C" tech="sTGC_1" subType="QL2C" sWidth="1211.81" lWidth="1807.5" Length="1194.6" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" yCutoutCathode="0" stripPitch="NSW_sTGC_StripPitch" stripWidth="NSW_sTGC_StripWidth" wirePitch="NSW_sTGC_WirePitch"> + +<sTGC_readout sPadWidth="1158.55" lPadWidth="1741.77" sStripWidth="1158.55" lStripWidth="1741.77" padH="85.07;85.07;85.31;85.31" nPadPhi="4;4;4;4" anglePadPhi="7.5" firstPadPhiDivision_C="-5.62;-9.37;-5.62;-9.37" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-9.37;-5.62;-9.37;-5.62" PadPhiShift_A="2;-2;2;-2" nPadH="14;14;14;14" firstPadH="57.31;57.31;106.55;106.55" firstPadRow="17;17;17;17" nWires="954;954;954;953" wireCutout="0;0;0;0" firstWire="-857.7;-857.25;-858.15;-856.8" wireGroupWidth="20" nStrips="366" firstTriggerBand="30;30;30;30" nTriggerBands="29;29;29;29" firstStripInTrigger="1;1;1;1" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="12;5;13;13;13;14;13;13;14;13; 13;13;14;13;13;14;13;13;13;14; 13;13;14;13;13;13;14;13;13" StripsInBandsLayer2="11;5;13;14;13;13;14;13;13;13; 14;13;13;14;13;13;14;13;13;14; 13;13;13;14;13;13;14;13;13" StripsInBandsLayer3="10;7;13;13;14;13;13;14;13;13; 13;14;13;13;14;13;13;14;13;13; 14;13;13;14;13;13;14;13;13" StripsInBandsLayer4="9;7;13;14;13;13;14;13;13;14; 13;13;14;13;13;14;13;14;13;13; 14;13;13;14;13;13;14;13;12" nWireGroups="49;49;48;48" firstWireGroup="5;10;15;20"/> +</sTGC> + +<chamberPosition volume="sTG1-QL2C" type="ENDCAP" chamberType="sTGL" radius="2868.3" zPos="NSW_sTGC_ZLargeConfirm" phi0="0.0"/> + +<sTGC type="sTG1-QL3C" tech="sTGC_1" subType="QL3C" sWidth="1813.68" lWidth="2111" Length="1153" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="545.3" yCutoutCathode="539.26" stripPitch="NSW_sTGC_StripPitch" stripWidth="NSW_sTGC_StripWidth" wirePitch="NSW_sTGC_WirePitch"> + +<sTGC_readout sPadWidth="1760.42" lPadWidth="2054" sStripWidth="1760.42" lStripWidth="2054" padH="85.07;85.07;85.31;85.31" nPadPhi="4;4;4;4" anglePadPhi="7.5" firstPadPhiDivision_C="-5.62;-9.37;-5.62;-9.37" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-9.37;-5.62;-9.37;-5.62" PadPhiShift_A="2;-2;2;-2" nPadH="14;14;13;13" firstPadH="41.23;41.23;93.82;93.82" firstPadRow="31;31;31;31" nWires="1134;1134;1134;1133" wireCutout="0;0;0;0" firstWire="-1019.7;-1019.25;-1020.15;-1018.8" wireGroupWidth="20" nStrips="353" firstTriggerBand="60;60;60;60" nTriggerBands="28;28;28;28" firstStripInTrigger="1;1;1;1" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="3;13;13;13;13;14;13;13;14;13;13; 13;14;13;13;14;13;13;13;14;13; 13;13;14;13;13;14;8" StripsInBandsLayer2="2;14;13;13;14;13;13;13;14;13;13; 14;13;13;14;13;13;13;14;13;13; 14;13;13;14;13;13;7" StripsInBandsLayer3="2;14;13;13;14;13;13;14;13;13;14; 13;13;14;13;13;13;14;13;13;14; 13;13;14;13;13;14;4" StripsInBandsLayer4="3;14;13;13;14;13;13;14;13;13;14; 13;13;14;13;13;14;13;13;14;13; 13;14;13;13;14;13;3" nWireGroups="58;58;57;57" firstWireGroup="5;10;15;20"/> +</sTGC> + +<chamberPosition volume="sTG1-QL3C" type="ENDCAP" chamberType="sTGL" radius="4054.5" zPos="NSW_sTGC_ZLargeConfirm" phi0="0.0"/> + +</composition> +</section> + + +<!-- ========== MicroMegas ============================== --> + +<section name="NSW_MM_Parameters" version="1" top_volume="useless" date="December 16 2014" author="S.Chen" > + +<!-- Frames. "f1": frame width close to the trapezium large side. "f2": frame width close to the trapezium small side. "f3": frame width close to the trapezium oblique side --> + +<!-- Distance from IP, labeled zmin_MM in Parameter Book --> +<var name="NSW_MM_LM_distanceFromIP" value="7536"/> +<var name="NSW_MM_SM_distanceFromIP" value="7072"/> +<!-- Thickness of Multilayer and the subcomponent (mm)--> +<var name="NSW_MM_GasTck" value="5.04"/> +<var name="NSW_MM_ROPcbTck" value="11.69"/> +<var name="NSW_MM_DriftPcbTck" value="11.284"/> +<var name="NSW_MM_MultilayerTck" value="NSW_NbrOfLayers* NSW_MM_GasTck + (NSW_NbrOfDriftPcb) * NSW_MM_DriftPcbTck+ ( NSW_NbrOfROPcb) * NSW_MM_ROPcbTck" /> <!-- Thickness of one multilayer --> + +<!-- Large sector modules (LM1" LM2). Modules are all trapezoid. ""Height"": radial envelope" ""base/top Width"": upper/lower side of the trapezoid--> +<var name="NSW_MM_LM1_InnerRadius" value="923" /> +<var name="NSW_MM_LM1_Length" value="2310" /> +<var name="NSW_MM_LM1_outerRadius" value="NSW_MM_LM1_InnerRadius+NSW_MM_LM1_Length" /> +<var name="NSW_MM_LM1_f1" value="30"/> +<var name="NSW_MM_LM1_f2" value="30"/> +<var name="NSW_MM_LM1_f3" value="100"/> +<var name="NSW_MM_LMGap_Length" value="5" /> <!-- Radial gap between LM1 and LM2 --> +<var name="NSW_MM_LM2_InnerRadius" value="NSW_MM_LM1_outerRadius+NSW_MM_LMGap_Length" /> +<var name="NSW_MM_LM2_Length" value="1410" /> +<var name="NSW_MM_LM2_outerRadius" value="NSW_MM_LM2_InnerRadius+NSW_MM_LM2_Length" /> +<var name="NSW_MM_LM1_baseWidth" value="640" /> +<var name="NSW_MM_LM1_topWidth" value="2008.5" /> +<var name="NSW_MM_LM2_baseWidth" value="2022.8" /> +<var name="NSW_MM_LM2_topWidth" value="2220" /> +<var name="NSW_MM_LM2_f1" value="30"/> +<var name="NSW_MM_LM2_f2" value="30"/> +<var name="NSW_MM_LM2_f3" value="100"/> +<!-- Small sector modules (SM1" SM2). Modules are all trapezoids. ""Height"": radial envelope" ""base/top Width"": upper/lower side --> +<var name="NSW_MM_SM1_InnerRadius" value="895" /> +<var name="NSW_MM_SM1_Length" value="2210" /> +<var name="NSW_MM_SM1_outerRadius" value="NSW_MM_SM1_InnerRadius+NSW_MM_SM1_Length" /> +<var name="NSW_MM_SMGap_Length" value="5" /> <!-- Radial gap between SM1 and SM2 --> +<var name="NSW_MM_SM1_f1" value="30"/> +<var name="NSW_MM_SM1_f2" value="30"/> +<var name="NSW_MM_SM1_f3" value="100"/> +<var name="NSW_MM_SM2_InnerRadius" value="NSW_MM_SM1_outerRadius+NSW_MM_SMGap_Length" /> +<var name="NSW_MM_SM2_Length" value="1350" /> +<var name="NSW_MM_SM2_outerRadius" value="NSW_MM_SM2_InnerRadius+NSW_MM_SM2_Length" /> +<var name="NSW_MM_SM1_baseWidth" value="500" /> +<var name="NSW_MM_SM1_topWidth" value="1319.2" /> +<var name="NSW_MM_SM2_baseWidth" value="1321.1" /> +<var name="NSW_MM_SM2_topWidth" value="1821.5" /> +<var name="NSW_MM_SM2_f1" value="30"/> +<var name="NSW_MM_SM2_f2" value="30"/> +<var name="NSW_MM_SM2_f3" value="100"/> + +<var name="NSW_MM_LargeSector_ZCENTER" value="ZCenter_Global+232."/> +<var name="NSW_MM_SmallSector_ZCENTER" value="ZCenter_Global-232."/> + + +<!-- Thickness of inter-multilayer spacers --> +<var name="NSW_MM_SpacerThickness" value="50" /> + +<!-- Global z-coordinate for the sector center --> +<!-- <var name="NSW_MM_LargeSector_ZCENTER" value="NSW_MM_LM_distanceFromIP + 4.*NSW_MM_DriftPcbTck + 4.*NSW_MM_ROPcbTck + 4.*NSW_MM_GasTck + NSW_MM_SpacerThickness/2."/> +<var name="NSW_MM_SmallSector_ZCENTER" value="NSW_MM_SM_distanceFromIP + 4.*NSW_MM_DriftPcbTck + 4.*NSW_MM_ROPcbTck + 4.*NSW_MM_GasTck + NSW_MM_SpacerThickness/2."/> --> + +</section> + +<section name="NewSmallWheelsMM" version="1" top_volume="useless" date="December 16 2014" author="S.Chen" > + + +<!-- Technologies --> +<mm_Tech type="MM_1" geometryLevel="1" nLayers="NSW_NbrOfLayers" gasTck="NSW_MM_GasTck" driftPcbTck="NSW_MM_DriftPcbTck" ROPcbTck="NSW_MM_ROPcbTck" Tck="NSW_MM_MultilayerTck" /> +<!--Chilufya<mmSpacer_Tech type="Spa_1" Tck="NSW_MM_SpacerThickness" />Chilufya--> + +<!-- large wheel --> +<micromegas type="sMD1-1-1" tech="MM_1" subType="M1L1" sWidth="NSW_MM_LM1_baseWidth" lWidth="NSW_MM_LM1_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_LM1_Length" ylFrame="NSW_MM_LM1_f1" ysFrame="NSW_MM_LM1_f2" xFrame="NSW_MM_LM1_f3"> +<mm_readout stripPitch="0.45" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.; 0.; 0.02618; -0.02618" readoutSide="-1; 1; -1; 1" zPos="NSW_MM_LargeSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_LM1_InnerRadius" roLength="NSW_MM_LM1_Length"/> +</micromegas> +<micromegas type="sMD1-2-1" tech="MM_1" subType="M2L1" sWidth="NSW_MM_LM2_baseWidth" lWidth="NSW_MM_LM2_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_LM2_Length" ylFrame="NSW_MM_LM2_f1" ysFrame="NSW_MM_LM2_f2" xFrame="NSW_MM_LM2_f3"> +<mm_readout stripPitch="0.45" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.; 0.; 0.02618; -0.02618" readoutSide="-1; 1; -1; 1" zPos="NSW_MM_LargeSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_LM2_InnerRadius" roLength="NSW_MM_LM2_Length"/> +</micromegas> +<micromegas type="sMD1-1-2" tech="MM_1" subType="M1L2" sWidth="NSW_MM_LM1_baseWidth" lWidth="NSW_MM_LM1_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_LM1_Length" ylFrame="NSW_MM_LM1_f1" ysFrame="NSW_MM_LM1_f2" xFrame="NSW_MM_LM1_f3"> +<mm_readout stripPitch="0.45" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.02618; -0.02618; 0.; 0." readoutSide="-1; 1; -1; 1" zPos="NSW_MM_LargeSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_LM1_InnerRadius" roLength="NSW_MM_LM1_Length"/> +</micromegas> +<micromegas type="sMD1-2-2" tech="MM_1" subType="M2L2" sWidth="NSW_MM_LM2_baseWidth" lWidth="NSW_MM_LM2_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_LM2_Length" ylFrame="NSW_MM_LM2_f1" ysFrame="NSW_MM_LM2_f2" xFrame="NSW_MM_LM2_f3"> +<mm_readout stripPitch="0.45" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.02618; -0.02618; 0.; 0." readoutSide="-1; 1; -1; 1" zPos="NSW_MM_LargeSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_LM2_InnerRadius" roLength="NSW_MM_LM2_Length"/> +</micromegas> + +<!--Chilufya<mmSpacer type="spa1-1" tech="Spa_1" sWidth="NSW_MM_LM1_baseWidth" lWidth="NSW_MM_LM1_topWidth" Tck="NSW_MM_SpacerThickness" Length="NSW_MM_LM1_Length" /> +<mmSpacer type="spa1-2" tech="Spa_1" sWidth="NSW_MM_LM2_baseWidth" lWidth="NSW_MM_LM2_topWidth" Tck="NSW_MM_SpacerThickness" Length="NSW_MM_LM2_Length" />Chilufya--> + + +<!-- small wheel --> +<micromegas type="sMD3-1-1" tech="MM_1" subType="M1S1" sWidth="NSW_MM_SM1_baseWidth" lWidth="NSW_MM_SM1_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_SM1_Length" ylFrame="NSW_MM_SM1_f1" ysFrame="NSW_MM_SM1_f2" xFrame="NSW_MM_SM1_f3"> +<mm_readout stripPitch="0.425" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.; 0.; 0.02618; -0.02618" readoutSide="-1; 1; -1; 1" zPos="NSW_MM_SmallSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_SM1_InnerRadius" roLength="NSW_MM_SM1_Length"/> +</micromegas> +<micromegas type="sMD3-2-1" tech="MM_1" subType="M2S1" sWidth="NSW_MM_SM2_baseWidth" lWidth="NSW_MM_SM2_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_SM2_Length" ylFrame="NSW_MM_SM2_f1" ysFrame="NSW_MM_SM2_f2" xFrame="NSW_MM_SM2_f3"> +<mm_readout stripPitch="0.425" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.; 0.; 0.02618; -0.02618" readoutSide="-1; 1; -1; 1" zPos="NSW_MM_SmallSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_SM2_InnerRadius" roLength="NSW_MM_SM2_Length"/> +</micromegas> +<micromegas type="sMD3-1-2" tech="MM_1" subType="M1S2" sWidth="NSW_MM_SM1_baseWidth" lWidth="NSW_MM_SM1_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_SM1_Length" ylFrame="NSW_MM_SM1_f1" ysFrame="NSW_MM_SM1_f2" xFrame="NSW_MM_SM1_f3"> +<mm_readout stripPitch="0.425" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.02618; -0.02618; 0.; 0." readoutSide="-1; 1; -1; 1" zPos="NSW_MM_SmallSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_SM1_InnerRadius" roLength="NSW_MM_SM1_Length"/> +</micromegas> +<micromegas type="sMD3-2-2" tech="MM_1" subType="M2S2" sWidth="NSW_MM_SM2_baseWidth" lWidth="NSW_MM_SM2_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_SM2_Length" ylFrame="NSW_MM_SM2_f1" ysFrame="NSW_MM_SM2_f2" xFrame="NSW_MM_SM2_f3"> +<mm_readout stripPitch="0.425" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.02618; -0.02618; 0.; 0." readoutSide="-1; 1; -1; 1" zPos="NSW_MM_SmallSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_SM2_InnerRadius" roLength="NSW_MM_SM2_Length"/> +</micromegas> +<!--Chilufya<mmSpacer type="spa3-1" tech="Spa_1" sWidth="NSW_MM_SM1_baseWidth" lWidth="NSW_MM_SM1_topWidth" Tck="NSW_MM_SpacerThickness" Length="NSW_MM_SM1_Length" /> +<mmSpacer type="spa3-2" tech="Spa_1" sWidth="NSW_MM_SM2_baseWidth" lWidth="NSW_MM_SM2_topWidth" Tck="NSW_MM_SpacerThickness" Length="NSW_MM_SM2_Length" />Chilufya--> + +<composition name="NSW_MM" > +<!-- A-SIDE --> + +<!-- LARGE SECTOR --> + +<!-- MM multilayer 1 --> +<chamberPosition volume="sMD1-1-1" radius="(NSW_MM_LM1_InnerRadius+NSW_MM_LM1_outerRadius)/2" zPos="NSW_MM_LargeSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="0" /> +<chamberPosition volume="sMD1-2-1" radius="(NSW_MM_LM2_InnerRadius+NSW_MM_LM2_outerRadius)/2" zPos="NSW_MM_LargeSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="0" /> +<!-- spacer --> +<!--Chilufya<mposPhi volume="spa1-1" ncopy="8" R_Z="(NSW_MM_LM1_InnerRadius+NSW_MM_LM1_outerRadius)/2;NSW_MM_LargeSector_ZCENTER" Phi0="0" rot=" 90.; 270.; 90." /> +<mposPhi volume="spa1-2" ncopy="8" R_Z="(NSW_MM_LM2_InnerRadius+NSW_MM_LM2_outerRadius)/2;NSW_MM_LargeSector_ZCENTER" Phi0="0" rot=" 90.; 270.; 90." />Chilufya--> + +<!-- MM multilayer 2 --> +<chamberPosition volume="sMD1-1-2" radius="(NSW_MM_LM1_InnerRadius+NSW_MM_LM1_outerRadius)/2" zPos="NSW_MM_LargeSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="0" /> +<chamberPosition volume="sMD1-2-2" radius="(NSW_MM_LM2_InnerRadius+NSW_MM_LM2_outerRadius)/2" zPos="NSW_MM_LargeSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="0" /> + +<!-- SMALL SECTOR --> + +<!-- MM multilayer 1 --> +<chamberPosition volume="sMD3-1-1" radius="(NSW_MM_SM1_InnerRadius+NSW_MM_SM1_outerRadius)/2" zPos="NSW_MM_SmallSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="22.5" /> +<chamberPosition volume="sMD3-2-1" radius="(NSW_MM_SM2_InnerRadius+NSW_MM_SM2_outerRadius)/2" zPos="NSW_MM_SmallSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="22.5" /> + +<!-- spacer --> +<!--Chilufya<mposPhi volume="spa3-1" ncopy="8" R_Z="(NSW_MM_SM1_InnerRadius+NSW_MM_SM1_outerRadius)/2;NSW_MM_SmallSector_ZCENTER" Phi0="22.5" rot=" 90.; 270.; 90." /> +<mposPhi volume="spa3-2" ncopy="8" R_Z="(NSW_MM_SM2_InnerRadius+NSW_MM_SM2_outerRadius)/2;NSW_MM_SmallSector_ZCENTER" Phi0="22.5" rot=" 90.; 270.; 90." />Chilufya--> + +<!-- MM multilayer 2 --> +<chamberPosition volume="sMD3-1-2" radius="(NSW_MM_SM1_InnerRadius+NSW_MM_SM1_outerRadius)/2" zPos="NSW_MM_SmallSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="22.5" /> +<chamberPosition volume="sMD3-2-2" radius="(NSW_MM_SM2_InnerRadius+NSW_MM_SM2_outerRadius)/2" zPos="NSW_MM_SmallSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="22.5" /> + +<!-- C-SIDE --> +<!-- LARGE SECTOR --> +<!-- spacer --> +<!--Chilufya<mposPhi volume="spa1-1" ncopy="8" R_Z="(NSW_MM_LM1_InnerRadius+NSW_MM_LM1_outerRadius)/2;-NSW_MM_LargeSector_ZCENTER" Phi0="0" rot=" 90.; 90.; 90." /> +<mposPhi volume="spa1-2" ncopy="8" R_Z="(NSW_MM_LM2_InnerRadius+NSW_MM_LM2_outerRadius)/2;-NSW_MM_LargeSector_ZCENTER" Phi0="0" rot=" 90.; 90.; 90." />Chilufya--> + +<!-- SMALL SECTOR --> +<!-- spacer --> +<!--Chilufya<mposPhi volume="spa3-1" ncopy="8" R_Z="(NSW_MM_SM1_InnerRadius+NSW_MM_SM1_outerRadius)/2;-NSW_MM_SmallSector_ZCENTER" Phi0="22.5" rot=" 90.; 90.; 90." /> +<mposPhi volume="spa3-2" ncopy="8" R_Z="(NSW_MM_SM2_InnerRadius+NSW_MM_SM2_outerRadius)/2;-NSW_MM_SmallSector_ZCENTER" Phi0="22.5" rot=" 90.; 90.; 90." />Chilufya--> + +</composition> + +</section> + + + + + + + +<!--====================================SPACER FRAME===============================================--> + +<section name = "LS and SS Spacer Frames" + version = "0.0" + date = "25-07-2017" + author = "Georgian Engineering Team - Niko Tsutskiridze" + top_volume = "NSW_Spacer"> + +<!-- LS Spacer Ftame --> +<gvxy name="LS_StructuralPlate_Main" material="Aluminium" dZ="5.9"> + <gvxy_point X_Y="226.; 958."/> + <gvxy_point X_Y="914.15; 3281."/> + <gvxy_point X_Y="1007.3; 4613."/> + <gvxy_point X_Y="0.01; 4613."/> + <gvxy_point X_Y="0.01; 958."/> +</gvxy> + +<gvxy name="LS_StructuralPlate_Cut1" material="Aluminium" dZ="7."> + <gvxy_point X_Y="902.87; 4123."/> + <gvxy_point X_Y="932.24; 4543."/> + <gvxy_point X_Y="40.; 4543."/> + <gvxy_point X_Y="40.; 4123."/> +</gvxy> + +<gvxy name="LS_StructuralPlate_Cut2" material="Aluminium" dZ="7."> + <gvxy_point X_Y="774.41; 3913.25"/> + <gvxy_point X_Y="770.86; 3963."/> + <gvxy_point X_Y="135.; 3963."/> + <gvxy_point X_Y="135.; 3821.33"/> +</gvxy> + +<gvxy name="LS_StructuralPlate_Cut3" material="Aluminium" dZ="7."> + <gvxy_point X_Y="778.83; 3639.29"/> + <gvxy_point X_Y="792.52; 3835.04"/> + <gvxy_point X_Y="203.42; 3750.35"/> + <gvxy_point X_Y="203.46; 3720.65"/> +</gvxy> + +<gvxy name="LS_StructuralPlate_Cut4" material="Aluminium" dZ="7."> + <gvxy_point X_Y="477.15; 3586.36"/> + <gvxy_point X_Y="477.24; 3606.18"/> + <gvxy_point X_Y="135.; 3654.58"/> + <gvxy_point X_Y="135.; 3541.07"/> +</gvxy> + +<gvxy name="LS_StructuralPlate_Cut5" material="Aluminium" dZ="7."> + <gvxy_point X_Y="762.41; 3404.48"/> + <gvxy_point X_Y="772.57; 3549.82"/> + <gvxy_point X_Y="286.06; 3485.41"/> + <gvxy_point X_Y="286.1; 3465.58"/> +</gvxy> + +<gvxy name="LS_StructuralPlate_Cut6" material="Aluminium" dZ="7."> + <gvxy_point X_Y="600.; 3314.58"/> + <gvxy_point X_Y="602.55; 3354.42"/> + <gvxy_point X_Y="60.; 3424.01"/> + <gvxy_point X_Y="60.; 3314.58"/> +</gvxy> + +<box name="LS_StructuralPlate_Cut7" material="Aluminium" X_Y_Z="138.; 70.; 7. " /> + +<gvxy name="LS_StructuralPlate_Cut8" material="Aluminium" dZ="7."> + <gvxy_point X_Y="678.71; 2838.18"/> + <gvxy_point X_Y="772.71; 3155.5"/> + <gvxy_point X_Y="63.52; 3155.5"/> +</gvxy> + +<gvxy name="LS_StructuralPlate_Cut9" material="Aluminium" dZ="7."> + <gvxy_point X_Y="533.6; 2715.5"/> + <gvxy_point X_Y="551.94; 2791.05"/> + <gvxy_point X_Y="40.; 3055.11"/> + <gvxy_point X_Y="40.; 2715.5"/> +</gvxy> + +<gvxy name="LS_StructuralPlate_Cut10" material="Aluminium" dZ="7."> + <gvxy_point X_Y="459.9; 2169.9"/> + <gvxy_point X_Y="585.97; 2595.5"/> + <gvxy_point X_Y="117.42; 2595.5"/> +</gvxy> + +<gvxy name="LS_StructuralPlate_Cut11" material="Aluminium" dZ="7."> + <gvxy_point X_Y="391.41; 2095.5"/> + <gvxy_point X_Y="135.; 2414.15"/> + <gvxy_point X_Y="135.; 2095.5"/> +</gvxy> + +<gvxy name="LS_StructuralPlate_Cut12" material="Aluminium" dZ="7."> + <gvxy_point X_Y="344.91; 1865.18"/> + <gvxy_point X_Y="389.44; 2015.5"/> + <gvxy_point X_Y="258.79; 2015.5"/> +</gvxy> +<gvxy name="LS_StructuralPlate_Cut13" material="Aluminium" dZ="7."> + <gvxy_point X_Y="275.45; 1825.5"/> + <gvxy_point X_Y="172.35; 2005.44"/> + <gvxy_point X_Y="135.; 1995.5"/> + <gvxy_point X_Y="135.; 1825.5"/> +</gvxy> + +<gvxy name="LS_StructuralPlate_Cut14" material="Aluminium" dZ="7."> + <gvxy_point X_Y="173.8; 1028."/> + <gvxy_point X_Y="380.41; 1725.5"/> + <gvxy_point X_Y="40.; 1725.5"/> + <gvxy_point X_Y="40.; 1028."/> +</gvxy> + +<subtraction name="LS_StructuralPlateSub" > + <posXYZ volume="LS_StructuralPlate_Main" /> + <posXYZ volume="LS_StructuralPlate_Cut1" /> + <posXYZ volume="LS_StructuralPlate_Cut2" /> + <posXYZ volume="LS_StructuralPlate_Cut3" /> + <posXYZ volume="LS_StructuralPlate_Cut4" /> + <posXYZ volume="LS_StructuralPlate_Cut5" /> + <posXYZ volume="LS_StructuralPlate_Cut6" /> + <posXYZ volume="LS_StructuralPlate_Cut7" X_Y_Z="589.; 3235.5; 0." /> + <posXYZ volume="LS_StructuralPlate_Cut8" /> + <posXYZ volume="LS_StructuralPlate_Cut9" /> + <posXYZ volume="LS_StructuralPlate_Cut10" /> + <posXYZ volume="LS_StructuralPlate_Cut11" /> + <posXYZ volume="LS_StructuralPlate_Cut12" /> + <posXYZ volume="LS_StructuralPlate_Cut13" /> + <posXYZ volume="LS_StructuralPlate_Cut14" /> +</subtraction> + +<composition name="LS_StructuralPlate" > + <posXYZ volume="LS_StructuralPlateSub" /> + <posXYZ volume="LS_StructuralPlateSub" rot="0. ; 180. ; 0." /> +</composition> + +<box name="LS_Central_reference_bar" material="Aluminium" X_Y_Z="1704.; 100.; 27.8 " /> + +<box name="LS_Channel_section_L2000_Main" material="Aluminium" X_Y_Z="50.; 2000.; 30. " /> +<box name="LS_Channel_section_L2000_Cut" material="Aluminium" X_Y_Z="40.; 2050.; 20. " /> +<subtraction name="LS_Channel_section_L2000" > + <posXYZ volume="LS_Channel_section_L2000_Main" /> + <posXYZ volume="LS_Channel_section_L2000_Cut" /> +</subtraction> + +<box name="LS_Channel_section_L1200_Main" material="Aluminium" X_Y_Z="50.; 1200.; 30. " /> +<subtraction name="LS_Channel_section_L1200" > + <posXYZ volume="LS_Channel_section_L1200_Main" /> + <posXYZ volume="LS_Channel_section_L2000_Cut" /> +</subtraction> + +<box name="LS_Channel_section_L850_Main" material="Aluminium" X_Y_Z="50.; 850.; 30. " /> +<subtraction name="LS_Channel_section_L850" > + <posXYZ volume="LS_Channel_section_L850_Main" /> + <posXYZ volume="LS_Channel_section_L2000_Cut" /> +</subtraction> + +<box name="LS_Channel_section_L1000_Main" material="Aluminium" X_Y_Z="50.; 1000.; 30. " /> +<subtraction name="LS_Channel_section_L1000" > + <posXYZ volume="LS_Channel_section_L1000_Main" /> + <posXYZ volume="LS_Channel_section_L2000_Cut" /> +</subtraction> + +<box name="LS_UProfile_L1460_Main" material="Aluminium" X_Y_Z="20.; 1460.; 30. " /> +<box name="LS_UProfile_L1460_Cut" material="Aluminium" X_Y_Z="20.; 1500.; 24. " /> +<subtraction name="LS_UProfile_L1460" > + <posXYZ volume="LS_UProfile_L1460_Main" /> + <posXYZ volume="LS_UProfile_L1460_Cut" X_Y_Z="-3.; 0.; 0." /> +</subtraction> + +<box name="LS_UProfile_L750_Main" material="Aluminium" X_Y_Z="20.; 750.; 30. " /> +<subtraction name="LS_UProfile_L750" > + <posXYZ volume="LS_UProfile_L750_Main" /> + <posXYZ volume="LS_UProfile_L1460_Cut" X_Y_Z="3.; 0.; 0." /> +</subtraction> + +<gvxy name="LS_Top_Interface" material="Aluminium" dZ="30."> + <gvxy_point X_Y="914.3; 3484.44"/> + <gvxy_point X_Y="1146.47; 3571.68"/> + <gvxy_point X_Y="1141.27; 3656.86"/> + <gvxy_point X_Y="1054.98; 3656.86"/> + <gvxy_point X_Y="1054.98; 4070."/> + <gvxy_point X_Y="813.64; 4070."/> + <gvxy_point X_Y="774.65; 3494.2"/> +</gvxy> + +<gvxy name="LS_Bottom_Grabber_interface" material="Aluminium" dZ="30."> + <gvxy_point X_Y="-801.54; 2552.21"/> + <gvxy_point X_Y="-858.34; 2743.97"/> + <gvxy_point X_Y="-591.97; 2822.88"/> + <gvxy_point X_Y="-535.17; 2631.11"/> +</gvxy> + +<gvxy name="LS_Bottom_Interface" material="Aluminium" dZ="30."> + <gvxy_point X_Y="-558.42; 1731.46"/> + <gvxy_point X_Y="-616.93; 1928.98"/> + <gvxy_point X_Y="-678.34; 1910.78"/> + <gvxy_point X_Y="-727.9; 1985.99"/> + <gvxy_point X_Y="-570.48; 2124.21"/> + <gvxy_point X_Y="-437.49; 2163.6"/> + <gvxy_point X_Y="-329.56; 1799.25"/> +</gvxy> + +<box name="LS_MM_Connectors" material="Aluminium" X_Y_Z="76.; 40.; 30. " /> +<composition name="LS_MM_Connectors_Assembly" > + <posXYZ volume="LS_MM_Connectors" X_Y_Z="323.24; 1278.98; 0." rot="0. ; 0. ; -16.5" /> + <posXYZ volume="LS_MM_Connectors" X_Y_Z="596.23; 2200.58; 0." rot="0. ; 0. ; -16.5" /> + <posXYZ volume="LS_MM_Connectors" X_Y_Z="800.97; 2891.78; 0." rot="0. ; 0. ; -16.5" /> + <posXYZ volume="LS_MM_Connectors" X_Y_Z="922.31; 3368.81; 0." rot="0. ; 0. ; -4." /> + <posXYZ volume="LS_MM_Connectors" X_Y_Z="986.76; 4290.41; 0." rot="0. ; 0. ; -4." /> + <posXYZ volume="LS_MM_Connectors" X_Y_Z="824.; 4615.; 0." rot="0. ; 0. ; 90." /> +</composition> + +<box name="LS_KM_Joint" material="ShieldSteel" X_Y_Z="150.; 118.; 48. " /> + +<composition name="LS_Spacer_Frame_Assembly" > + <posXYZ volume="LS_StructuralPlate" X_Y_Z="0.; 0.; 18." /> + <posXYZ volume="LS_StructuralPlate" X_Y_Z="0.; 0.; -18." /> + <posXYZ volume="LS_Central_reference_bar" X_Y_Z="0.; 3235.5; 0." /> + <posXYZ volume="LS_Channel_section_L2000" X_Y_Z="0.; 2185.49; 0." /> + <posXYZ volume="LS_Channel_section_L1200" X_Y_Z="0.; 3885.51; 0." /> + <posXYZ volume="LS_Channel_section_L850" X_Y_Z="130.5; 3710.51; 0." /> + <posXYZ volume="LS_Channel_section_L850" X_Y_Z="-130.5; 3710.51; 0." /> + <posXYZ volume="LS_Channel_section_L1000" X_Y_Z="130.5; 2223.; 0." /> + <posXYZ volume="LS_Channel_section_L1000" X_Y_Z="-130.5; 2223.; 0." /> + <posXYZ volume="LS_UProfile_L1460" X_Y_Z="252.; 2455.49; 0." /> + <posXYZ volume="LS_UProfile_L1460" X_Y_Z="-252.; 2455.49; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="LS_UProfile_L750" X_Y_Z="252.; 3760.5; 0." /> + <posXYZ volume="LS_UProfile_L750" X_Y_Z="-252.; 3760.5; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="LS_UProfile_L750" X_Y_Z="465.; 3760.5; 0." /> + <posXYZ volume="LS_UProfile_L750" X_Y_Z="-465.; 3760.5; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="LS_UProfile_L750" X_Y_Z="678.; 3760.5; 0." /> + <posXYZ volume="LS_UProfile_L750" X_Y_Z="-678.; 3760.5; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="LS_UProfile_L750" X_Y_Z="465.; 2551.; 0." /> + <posXYZ volume="LS_UProfile_L750" X_Y_Z="-465.; 2551.; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="LS_Top_Interface" X_Y_Z="0.; 0.; 0." /> + <posXYZ volume="LS_Top_Interface" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="LS_Bottom_Grabber_interface" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." /> + <posXYZ volume="LS_Bottom_Grabber_interface" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="LS_Bottom_Interface" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." /> + <posXYZ volume="LS_Bottom_Interface" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="LS_MM_Connectors_Assembly" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." /> + <posXYZ volume="LS_MM_Connectors_Assembly" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="LS_MM_Connectors" X_Y_Z="0.; 956.; 0." rot="0. ; 0. ; 90." /> + <posXYZ volume="LS_MM_Connectors" X_Y_Z="0.; 4615.; 0." rot="0. ; 0. ; 90." /> + <posXYZ volume="LS_KM_Joint" X_Y_Z="-1130.01; 3970.; 0." rot="0. ; 0. ; 0." /> + <posXYZ volume="LS_KM_Joint" X_Y_Z="1130.01; 3970.; 0." rot="0. ; 0. ; 0." /> + <posXYZ volume="LS_KM_Joint" X_Y_Z="656.6; 1798.8; 0." rot="0. ; 0. ; -16.5" /> +</composition> + +<composition name="LS" > + <posXYZ volume="LS_Spacer_Frame_Assembly" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 0." /> + <posXYZ volume="LS_Spacer_Frame_Assembly" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 45." /> + <posXYZ volume="LS_Spacer_Frame_Assembly" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 90." /> + <posXYZ volume="LS_Spacer_Frame_Assembly" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 135." /> + <posXYZ volume="LS_Spacer_Frame_Assembly" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 180." /> + <posXYZ volume="LS_Spacer_Frame_Assembly" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 225." /> + <posXYZ volume="LS_Spacer_Frame_Assembly" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 270." /> + <posXYZ volume="LS_Spacer_Frame_Assembly" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 315." /> +</composition> +<!-- LS Spacer Ftame --> + +<!-- SS Spacer Ftame --> +<gvxy name="SS_StructuralPlate_Main" material="Aluminium" dZ="5.9"> + <gvxy_point X_Y="154.8; 930."/> + <gvxy_point X_Y="745.; 4114.46"/> + <gvxy_point X_Y="745.; 4425."/> + <gvxy_point X_Y="0.01; 4425."/> + <gvxy_point X_Y="0.01; 930."/> +</gvxy> + +<gvxy name="SS_StructuralPlate_Cut1" material="Aluminium" dZ="7."> + <gvxy_point X_Y="685.; 4242.5"/> + <gvxy_point X_Y="685.; 4375."/> + <gvxy_point X_Y="25.; 4375."/> + <gvxy_point X_Y="25.; 4242.5"/> +</gvxy> + +<gvxy name="SS_StructuralPlate_Cut2" material="Aluminium" dZ="7."> + <gvxy_point X_Y="449.11; 4102.75"/> + <gvxy_point X_Y="446.87; 4122.5"/> + <gvxy_point X_Y="125.; 4122.5"/> + <gvxy_point X_Y="125.; 4028.36"/> +</gvxy> + +<gvxy name="SS_StructuralPlate_Cut3" material="Aluminium" dZ="7."> + <gvxy_point X_Y="577.21; 3867.18"/> + <gvxy_point X_Y="620.57; 4101.07"/> + <gvxy_point X_Y="131.86; 3988.9"/> + <gvxy_point X_Y="131.86; 3969.4"/> +</gvxy> + +<gvxy name="SS_StructuralPlate_Cut4" material="Aluminium" dZ="7."> + <gvxy_point X_Y="395.9; 3847.5"/> + <gvxy_point X_Y="398.14; 3867.25"/> + <gvxy_point X_Y="125.; 3929.94"/> + <gvxy_point X_Y="125.; 3847.5"/> +</gvxy> + +<gvxy name="SS_StructuralPlate_Cut5" material="Aluminium" dZ="7."> + <gvxy_point X_Y="495.98; 3705.39"/> + <gvxy_point X_Y="495.98; 3747.5"/> + <gvxy_point X_Y="25.; 3747.5"/> + <gvxy_point X_Y="25.; 3475.7"/> +</gvxy> + +<gvxy name="SS_StructuralPlate_Cut6" material="Aluminium" dZ="7."> + <gvxy_point X_Y="488.74; 3225.16"/> + <gvxy_point X_Y="576.8; 3700.3"/> + <gvxy_point X_Y="45.63; 3441.26"/> +</gvxy> + +<gvxy name="SS_StructuralPlate_Cut7" material="Aluminium" dZ="7."> + <gvxy_point X_Y="408.58; 3177.5"/> + <gvxy_point X_Y="417.35; 3215.48"/> + <gvxy_point X_Y="25.; 3406.82"/> + <gvxy_point X_Y="25.; 3177.5"/> +</gvxy> + +<box name="SS_StructuralPlate_Cut8" material="Aluminium" X_Y_Z="92.; 70.; 7. " /> + +<gvxy name="SS_StructuralPlate_Cut9" material="Aluminium" dZ="7."> + <gvxy_point X_Y="429.19; 3037.5"/> + <gvxy_point X_Y="25.; 3037.5"/> + <gvxy_point X_Y="25.; 2483.96"/> +</gvxy> + +<gvxy name="SS_StructuralPlate_Cut10" material="Aluminium" dZ="7."> + <gvxy_point X_Y="342.44; 2435.8"/> + <gvxy_point X_Y="445.53; 2992.05"/> + <gvxy_point X_Y="50.98; 2451.7"/> + <gvxy_point X_Y="59.05; 2435.8"/> +</gvxy> + +<gvxy name="SS_StructuralPlate_Cut11" material="Aluminium" dZ="7."> + <gvxy_point X_Y="275.17; 2072.87"/> + <gvxy_point X_Y="330.64; 2372.16"/> + <gvxy_point X_Y="310.98; 2395.8"/> + <gvxy_point X_Y="39.37; 2395.8"/> +</gvxy> + +<gvxy name="SS_StructuralPlate_Cut12" material="Aluminium" dZ="7."> + <gvxy_point X_Y="245.39; 2045.82"/> + <gvxy_point X_Y="25.; 2347.65"/> + <gvxy_point X_Y="25.; 2045.82"/> +</gvxy> + +<gvxy name="SS_StructuralPlate_Cut13" material="Aluminium" dZ="7."> + <gvxy_point X_Y="144.83; 1534.74"/> + <gvxy_point X_Y="203.73; 1852.5"/> + <gvxy_point X_Y="125.; 1852.5"/> + <gvxy_point X_Y="125.; 1536.56"/> +</gvxy> + +<gvxy name="SS_StructuralPlate_Cut14" material="Aluminium" dZ="7."> + <gvxy_point X_Y="123.38; 980."/> + <gvxy_point X_Y="201.04; 1399."/> + <gvxy_point X_Y="25.; 1399."/> + <gvxy_point X_Y="25.; 980."/> +</gvxy> + +<subtraction name="SS_StructuralPlateSub" > + <posXYZ volume="SS_StructuralPlate_Main" /> + <posXYZ volume="SS_StructuralPlate_Cut1" /> + <posXYZ volume="SS_StructuralPlate_Cut2" /> + <posXYZ volume="SS_StructuralPlate_Cut3" /> + <posXYZ volume="SS_StructuralPlate_Cut4" /> + <posXYZ volume="SS_StructuralPlate_Cut5" /> + <posXYZ volume="SS_StructuralPlate_Cut6" /> + <posXYZ volume="SS_StructuralPlate_Cut7" /> + <posXYZ volume="SS_StructuralPlate_Cut8" X_Y_Z="-340.5; 3107.5; 0." /> + <posXYZ volume="SS_StructuralPlate_Cut9" /> + <posXYZ volume="SS_StructuralPlate_Cut10" /> + <posXYZ volume="SS_StructuralPlate_Cut11" /> + <posXYZ volume="SS_StructuralPlate_Cut12" /> + <posXYZ volume="SS_StructuralPlate_Cut13" /> + <posXYZ volume="SS_StructuralPlate_Cut14" /> +</subtraction> + +<composition name="SS_StructuralPlate" > + <posXYZ volume="SS_StructuralPlateSub" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." /> + <posXYZ volume="SS_StructuralPlateSub" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." /> +</composition> + +<box name="SS_Central_reference_bar" material="Aluminium" X_Y_Z="1012.; 100.; 28. " /> + +<box name="SS_Channel_section_L1100_Main" material="Aluminium" X_Y_Z="50.; 1100.; 30. " /> +<subtraction name="SS_Channel_section_L1100" > + <posXYZ volume="SS_Channel_section_L1100_Main" /> + <posXYZ volume="LS_Channel_section_L2000_Cut" /> +</subtraction> + + +<box name="SS_Channel_section_L650_Main" material="Aluminium" X_Y_Z="50.; 650.; 30. " /> +<subtraction name="SS_Channel_section_L650" > + <posXYZ volume="SS_Channel_section_L650_Main" /> + <posXYZ volume="LS_Channel_section_L2000_Cut" /> +</subtraction> + +<box name="SS_UProfile_L1000_Main" material="Aluminium" X_Y_Z="20.; 1000.; 30. " /> +<subtraction name="SS_UProfile_L1000" > + <posXYZ volume="SS_UProfile_L1000_Main" /> + <posXYZ volume="LS_UProfile_L1460_Cut" X_Y_Z="-3.; 0.; 0." /> +</subtraction> + +<box name="SS_UProfile_L920_Main" material="Aluminium" X_Y_Z="20.; 920.; 30. " /> +<subtraction name="SS_UProfile_L920" > + <posXYZ volume="SS_UProfile_L920_Main" /> + <posXYZ volume="LS_UProfile_L1460_Cut" X_Y_Z="-3.; 0.; 0." /> +</subtraction> + +<box name="SS_UProfile_L1200_Main" material="Aluminium" X_Y_Z="20.; 1200.; 30. " /> +<subtraction name="SS_UProfile_L1200" > + <posXYZ volume="SS_UProfile_L1200_Main" /> + <posXYZ volume="LS_UProfile_L1460_Cut" X_Y_Z="-3.; 0.; 0." /> +</subtraction> + +<box name="SS_UProfile_L700_Main" material="Aluminium" X_Y_Z="20.; 700.; 30. " /> +<subtraction name="SS_UProfile_L700" > + <posXYZ volume="SS_UProfile_L700_Main" /> + <posXYZ volume="LS_UProfile_L1460_Cut" X_Y_Z="-3.; 0.; 0." /> +</subtraction> + +<gvxy name="SS_Top_Interface" material="Aluminium" dZ="30."> + <gvxy_point X_Y="849.99; 3705.17"/> + <gvxy_point X_Y="849.99; 4260."/> + <gvxy_point X_Y="627.69; 4260."/> + <gvxy_point X_Y="627.69; 4106.34"/> + <gvxy_point X_Y="564.77; 3758.03"/> +</gvxy> + +<gvxy name="SS_Bottom_Grabber_interface" material="Aluminium" dZ="30."> + <gvxy_point X_Y="454.99; 1875."/> + <gvxy_point X_Y="454.99; 2075."/> + <gvxy_point X_Y="255.; 2075."/> + <gvxy_point X_Y="255.; 1875."/> +</gvxy> + +<gvxy name="SS_Bottom_Interface" material="Aluminium" dZ="30."> + <gvxy_point X_Y="442.2; 1397.5"/> + <gvxy_point X_Y="442.2; 1560.65"/> + <gvxy_point X_Y="397.; 1560.65"/> + <gvxy_point X_Y="397.; 1792.5"/> + <gvxy_point X_Y="194.29; 1792.5"/> + <gvxy_point X_Y="149.53; 1434.71"/> + <gvxy_point X_Y="204.54; 1397.5"/> +</gvxy> + +<box name="SS_MM_Connectors" material="Aluminium" X_Y_Z="76.; 40.; 30. " /> +<box name="SS_MM_Connectors_Lar" material="Aluminium" X_Y_Z="120.; 40.; 30. " /> +<composition name="SS_MM_Connectors_Assembly" > + <posXYZ volume="SS_MM_Connectors" X_Y_Z="214.86; 1243.14; 0." rot="0. ; 0. ; -10.5" /> + <posXYZ volume="SS_MM_Connectors" X_Y_Z="376.17; 2113.54; 0." rot="0. ; 0. ; -10.5" /> + <posXYZ volume="SS_MM_Connectors" X_Y_Z="497.16; 2766.34; 0." rot="0. ; 0. ; -10.5" /> + <posXYZ volume="SS_MM_Connectors" X_Y_Z="626.36; 3463.34; 0." rot="0. ; 0. ; -10.5" /> + <posXYZ volume="SS_MM_Connectors_Lar" X_Y_Z="766.02; 4337.75; 0." rot="0. ; 0. ; -10.5" /> + <posXYZ volume="SS_MM_Connectors" X_Y_Z="624.; 4427.; 0." rot="0. ; 0. ; 90." /> +</composition> + +<box name="SS_KM_Joint" material="ShieldSteel" X_Y_Z="154.; 101.; 48. " /> + +<composition name="SS_Spacer_Frame_Assembly" > + <posXYZ volume="SS_StructuralPlate" X_Y_Z="0.; 0.; 18." /> + <posXYZ volume="SS_StructuralPlate" X_Y_Z="0.; 0.; -18." /> + <posXYZ volume="SS_Central_reference_bar" X_Y_Z="0.; 3107.5; 0." /> + <posXYZ volume="LS_Channel_section_L2000" X_Y_Z="0.; 2057.49; 0." /> + <posXYZ volume="SS_Channel_section_L1100" X_Y_Z="0.; 3707.51; 0." /> + <posXYZ volume="SS_Channel_section_L1100" X_Y_Z="-110.5; 3707.51; 0." /> + <posXYZ volume="SS_Channel_section_L1100" X_Y_Z="110.5; 3707.51; 0." /> + <posXYZ volume="SS_Channel_section_L650" X_Y_Z="-110.5; 1722.; 0." /> + <posXYZ volume="SS_Channel_section_L650" X_Y_Z="110.5; 1722.; 0." /> + <posXYZ volume="SS_UProfile_L1000" X_Y_Z="-345.; 3742.5; 0." /> + <posXYZ volume="SS_UProfile_L1000" X_Y_Z="345.; 3742.5; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="SS_UProfile_L920" X_Y_Z="-195.; 3782.5; 0." /> + <posXYZ volume="SS_UProfile_L920" X_Y_Z="195.; 3782.5; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="SS_UProfile_L1200" X_Y_Z="-195.; 2457.49; 0." /> + <posXYZ volume="SS_UProfile_L1200" X_Y_Z="195.; 2457.49; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="SS_UProfile_L700" X_Y_Z="-360.; 2587.5; 0." /> + <posXYZ volume="SS_UProfile_L700" X_Y_Z="360.; 2587.5; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="SS_Top_Interface" X_Y_Z="0.; 0.; 0." /> + <posXYZ volume="SS_Top_Interface" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="SS_Bottom_Grabber_interface" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." /> + <posXYZ volume="SS_Bottom_Grabber_interface" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="SS_Bottom_Interface" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." /> + <posXYZ volume="SS_Bottom_Interface" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="SS_MM_Connectors_Assembly" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." /> + <posXYZ volume="SS_MM_Connectors_Assembly" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="SS_MM_Connectors" X_Y_Z="0.; 928.; 0." rot="0. ; 0. ; 90." /> + <posXYZ volume="SS_MM_Connectors" X_Y_Z="0.; 4427.; 0." rot="0. ; 0. ; 90." /> + <posXYZ volume="SS_KM_Joint" X_Y_Z="-927.01; 4160.; 0." rot="0. ; 0. ; 0." /> + <posXYZ volume="SS_KM_Joint" X_Y_Z="927.01; 4160.; 0." rot="0. ; 0. ; 0." /> + <posXYZ volume="SS_KM_Joint" X_Y_Z="-532.01; 1975.; 0." rot="0. ; 0. ; 0." /> +</composition> + +<composition name="SS_AssemblyRot" > + <posXYZ volume="SS_Spacer_Frame_Assembly" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 22.5" /> +</composition> + +<composition name="SS" > + <posXYZ volume="SS_AssemblyRot" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 0." /> + <posXYZ volume="SS_AssemblyRot" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 45." /> + <posXYZ volume="SS_AssemblyRot" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 90." /> + <posXYZ volume="SS_AssemblyRot" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 135." /> + <posXYZ volume="SS_AssemblyRot" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 180." /> + <posXYZ volume="SS_AssemblyRot" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 225." /> + <posXYZ volume="SS_AssemblyRot" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 270." /> + <posXYZ volume="SS_AssemblyRot" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 315." /> +</composition> +<!-- End SS Spacer_Frame--> + +<composition name="LS_and_SS_SideA" > + <posXYZ volume="LS" X_Y_Z="0.; 0.; 7641." rot=" 0. ; 0. ; 0." /> + <posXYZ volume="SS" X_Y_Z="0.; 0.; 7177." rot=" 0. ; 0. ; 0." /> +</composition> + +<composition name="LS_and_SS_SideC" > + <posXYZ volume="LS" X_Y_Z="0.; 0.; -7641." rot=" 0. ; 0. ; 0." /> + <posXYZ volume="SS" X_Y_Z="0.; 0.; -7177." rot=" 0. ; 0. ; 0." /> +</composition> + +<composition name="NSW_Spacer" > + <posXYZ volume="LS_and_SS_SideA" /> + <posXYZ volume="LS_and_SS_SideC" /> +</composition> + +</section> + + + + + + + + + + + + + + + +<!--====================================Support Structures and Hub===============================================--> + +<section name = "NSW Aluminum Structure and HUB" + version = "0.0" + date = "25-04-2017" + author = "Georgian Engineering Team - Niko Tsutskiridze" + top_volume = "NSW_Aluminum_Structure_and_HUB"> + +<!-- ********************************************** New Hub ************************************************** --> + +<!-- Horizontal Shielding --> +<gvxysx name="Hub_Outer_Plate1" material="Lead" dZ="517.5"> + <gvxy_point X_Y="-163.1; 820.05"/> + <gvxy_point X_Y=" -169.25; 850.95"/> +</gvxysx> + + <gvxysx name="Hub_Outer_Plate2" material="PolyBoron207HD5" dZ="517.5"> + <gvxy_point X_Y="-163.1; 820."/> + <gvxy_point X_Y=" -153.15; 770."/> +</gvxysx> + +<gvxysx name="Hub_Outer_Plate3" material="Lead" dZ="504."> + <gvxy_point X_Y="-163.1; 820.05"/> + <gvxy_point X_Y=" -169.25; 850.95"/> +</gvxysx> + +<gvxysx name="Hub_Outer_Plate4" material="PolyBoron207HD5" dZ="545."> + <gvxy_point X_Y="-163.1; 820."/> + <gvxy_point X_Y=" -153.15; 770."/> +</gvxysx> + +<gvxysx name="Hub_Outer_Plate5" material="Lead" dZ="30."> + <gvxy_point X_Y="-163.1; 820.05"/> + <gvxy_point X_Y=" -169.25; 850.95"/> +</gvxysx> + +<gvxysx name="Hub_Outer_Plate6" material="PolyBoron207HD5" dZ="30."> + <gvxy_point X_Y="-163.1; 820."/> + <gvxy_point X_Y=" -153.15; 770."/> +</gvxysx> + +<gvxysx name="Hub_Outer_Plate7" material="Lead" dZ="85."> + <gvxy_point X_Y="-163.1; 820.05"/> + <gvxy_point X_Y=" -169.25; 850.95"/> +</gvxysx> + +<gvxysx name="Hub_Outer_Plate8" material="PolyBoron207HD5" dZ="126."> +<gvxy_point X_Y="-163.1; 820."/> + <gvxy_point X_Y=" -153.15; 770."/> +</gvxysx> + +<composition name="Horizontal_Shielding_ForRot_Spec" > + <posXYZ volume="Hub_Outer_Plate5" X_Y_Z="0.; 0.; 908.2" /> + <posXYZ volume="Hub_Outer_Plate6" X_Y_Z="0.; 0.; 908.2" /> +</composition> + +<composition name="Horizontal_Shielding_ForRot_Spec2" > + <posXYZ volume="Hub_Outer_Plate3" X_Y_Z="0.; 0.; 248.7" rot=" 0. ; 0. ; 22.5" /> + <posXYZ volume="Hub_Outer_Plate4" X_Y_Z="0.; 0.; 228.2" rot=" 0. ; 0. ; 22.5" /> +</composition> + +<composition name="Horizontal_Shielding_ForRot" > + <posXYZ volume="Hub_Outer_Plate1" X_Y_Z="0.; 0.; 643.45" /> + <posXYZ volume="Hub_Outer_Plate2" X_Y_Z="0.; 0.; 643.45" /> + <posXYZ volume="Horizontal_Shielding_ForRot_Spec2" /> + <posXYZ volume="Hub_Outer_Plate7" X_Y_Z="0.; 0.; 39.2" /> + <posXYZ volume="Hub_Outer_Plate8" X_Y_Z="0.; 0.; 18.7" /> +</composition> + +<composition name="Horizontal_Shielding" > + <posXYZ volume="Horizontal_Shielding_ForRot" rot=" 0. ; 0. ; 0." /> + <posXYZ volume="Horizontal_Shielding_ForRot" rot=" 0. ; 0. ; 45." /> + <posXYZ volume="Horizontal_Shielding_ForRot" rot=" 0. ; 0. ; 90." /> + <posXYZ volume="Horizontal_Shielding_ForRot" rot=" 0. ; 0. ; 135." /> + <posXYZ volume="Horizontal_Shielding_ForRot" rot=" 0. ; 0. ; 180." /> + <posXYZ volume="Horizontal_Shielding_ForRot" rot=" 0. ; 0. ; 225." /> + <posXYZ volume="Horizontal_Shielding_ForRot" rot=" 0. ; 0. ; 270." /> + <posXYZ volume="Horizontal_Shielding_ForRot" rot=" 0. ; 0. ; 315." /> + <posXYZ volume="Horizontal_Shielding_ForRot_Spec" rot=" 0. ; 0. ; 22.5" /> + <posXYZ volume="Horizontal_Shielding_ForRot_Spec" rot=" 0. ; 0. ; 67.5" /> + <posXYZ volume="Horizontal_Shielding_ForRot_Spec" rot=" 0. ; 0. ; -22.5" /> + <posXYZ volume="Horizontal_Shielding_ForRot_Spec" rot=" 0. ; 0. ; -67.5" /> +</composition> +<!-- End Horizontal Shielding (New Hub) --> + +<!-- Other Parts of New Hub --> +<pcon name="HUB_Extension_inner_tube" material="ShieldSteel" nbPhi="20"> + <polyplane Rio_Z="172.; 225.; 997.75"/> + <polyplane Rio_Z=" 152.3; 225.; 0."/> +</pcon> +<tubs name="HUB_Extension_plate_HO_side" material="ShieldSteel" Rio_Z="172.5; 530.; 59.2" /> +<tubs name="Copper_disk_Extension" material="Copper" Rio_Z="225.5; 454.5; 998." /> +<tubs name="HUB_Extension_outer_tube" material="ShieldSteel" Rio_Z="455.5; 530.; 998.7" /> + +<pcon name="HUB_Main_part_inner_tube" material="ShieldSteel" nbPhi="20"> + <polyplane Rio_Z="148.7; 225.; 858.5"/> + <polyplane Rio_Z=" 137.; 225.; 0."/> +</pcon> + +<tubs name="Copper_disk_Main_part" material="Copper" Rio_Z="225.5; 699.5; 760." /> + +<gvxysxy name="Plate_IP_Main" material="ShieldSteel" dZ="91.6"> + <gvxy_point X_Y="769.95; 153.16"/> + <gvxy_point X_Y="652.77; 436.16"/> + <gvxy_point X_Y="436.16; 652.77"/> + <gvxy_point X_Y="153.16; 769.95"/> +</gvxysxy> + +<tubs name="Plate_IP_Cut_Tube" material="ShieldSteel" Rio_Z="0.; 226.; 95." /> + +<subtraction name="Plate_IP" > + <posXYZ volume="Plate_IP_Main" /> + <posXYZ volume="Plate_IP_Cut_Tube" /> +</subtraction> + +<gvxysxy name="HUB_Main_part_outer_tube_Main" material="ShieldSteel" dZ="767.7"> + <gvxy_point X_Y="769.95; 153.16"/> + <gvxy_point X_Y="652.77; 436.16"/> + <gvxy_point X_Y="436.16; 652.77"/> + <gvxy_point X_Y="153.16; 769.95"/> +</gvxysxy> + +<tubs name="HUB_Main_part_outer_tube_Cut_Tube" material="ShieldSteel" Rio_Z="0.; 700.; 770." /> + +<subtraction name="HUB_Main_part_outer_tube" > + <posXYZ volume="HUB_Main_part_outer_tube_Main" /> + <posXYZ volume="HUB_Main_part_outer_tube_Cut_Tube" /> +</subtraction> + +<gvxysxy name="Plate_HO_Main" material="ShieldSteel" dZ="78."> + <gvxy_point X_Y="769.95; 153.16"/> + <gvxy_point X_Y="652.77; 436.16"/> + <gvxy_point X_Y="436.16; 652.77"/> + <gvxy_point X_Y="153.16; 769.95"/> +</gvxysxy> + +<tubs name="Plate_HO_Cut_Tube" material="ShieldSteel" Rio_Z="0.; 150.5; 80." /> + +<subtraction name="Plate_HO" > + <posXYZ volume="Plate_HO_Main" /> + <posXYZ volume="Plate_HO_Cut_Tube" /> +</subtraction> + +<tubs name="Plate_HO_SupportTube" material="ShieldSteel" Rio_Z="585.; 770.; 21.4" profile="-15.; 210." nbPhi="20"/> + +<tubs name="Disque_shileding_ext" material="PolyBoron207HD5" Rio_Z="532.5; 800.; 40." /> +<tubs name="Plaque_polyboron_droite_v2" material="PolyBoron207HD5" Rio_Z="532.5; 582.5; 200." /> + +<composition name="Hub_Other_Parts_Assembly" > + <posXYZ volume="HUB_Extension_plate_HO_side" X_Y_Z="0.; 0.; 1920.6" /> + <posXYZ volume="HUB_Extension_inner_tube" X_Y_Z="0.; 0.; 892.25" /> + <posXYZ volume="Copper_disk_Extension" X_Y_Z="0.; 0.; 1391.95" /> + <posXYZ volume="HUB_Extension_outer_tube" X_Y_Z="0.; 0.; 1391.6" /> + <posXYZ volume="HUB_Main_part_inner_tube" X_Y_Z="0.; 0.; -45.8" /> + <posXYZ volume="Copper_disk_Main_part" X_Y_Z="0.; 0.; 434.2" /> + <posXYZ volume="Plate_IP" /> + <posXYZ volume="HUB_Main_part_outer_tube" X_Y_Z="0.; 0.; 430.3" /> + <posXYZ volume="Disque_shileding_ext" X_Y_Z="0.; 0.; 944.2" /> + <posXYZ volume="Plaque_polyboron_droite_v2" X_Y_Z="0.; 0.; 1064.25" /> + <posXYZ volume="Plate_HO" X_Y_Z="0.; 0.; 853.2" /> + <posXYZ volume="Plate_HO_SupportTube" X_Y_Z="0.; 0.; 902.95" /> +</composition> +<!-- End Other Parts of New Hub --> + +<composition name="New_Hub" > + <posXYZ volume="Hub_Other_Parts_Assembly" /> + <posXYZ volume="Horizontal_Shielding" /> +</composition> +<!-- ************************************************************************************** End New Hub *********************************************** --> + +<!-- **************************************************** Inner Spoke ******************************************************************* --> +<gvxysx name="Base_Leg" material="Aluminium" dZ="390."> + <gvxy_point X_Y="40.; 531.5"/> + <gvxy_point X_Y=" 40.; -501.5"/> + <gvxy_point X_Y="150.; -501.5"/> + <gvxy_point X_Y=" 150.; -531.5"/> +</gvxysx> + +<gvxy name="JOINING_BAR3" material="Aluminium" dZ="150."> + <gvxy_point X_Y="75.; 23."/> + <gvxy_point X_Y="75.; 7."/> + <gvxy_point X_Y="640.; 7."/> + <gvxy_point X_Y="640.; -23."/> + <gvxy_point X_Y="-640.; -23."/> + <gvxy_point X_Y="-640.; 7."/> + <gvxy_point X_Y="-75.; 7."/> + <gvxy_point X_Y="-75.; 23."/> +</gvxy> + +<box name="LATERAL_PLATE_L" material="Aluminium" X_Y_Z="21.; 1680.; 390. " /> + +<gvxysx name="Front_plate2" material="Aluminium" dZ="14."> + <gvxy_point X_Y="98.65; 2867.18"/> + <gvxy_point X_Y=" 89.94; 2805.19"/> + <gvxy_point X_Y="89.94; 2587.18"/> +</gvxysx> + +<gvxysx name="LS_OUTER3_MainBox" material="Aluminium" dZ="30."> + <gvxy_point X_Y="323.7; 450."/> + <gvxy_point X_Y=" 197.21; -450."/> +</gvxysx> + +<box name="LS_OUTER3_CutBox" material="Aluminium" X_Y_Z="250.; 600.; 35. " /> + +<subtraction name="LS_OUTER3" > + <posXYZ volume="LS_OUTER3_MainBox" /> + <posXYZ volume="LS_OUTER3_CutBox" X_Y_Z=" 0.; -50.; 0. " /> +</subtraction> + +<gvxysx name="REAR_PLATE1" material="Aluminium" dZ="30."> + <gvxy_point X_Y="176.95; 309.25"/> + <gvxy_point X_Y=" 90.03; -309.25"/> +</gvxysx> + +<gvxy name="REAR_PLATE2" material="Aluminium" dZ="30."> + <gvxy_point X_Y="273.95; 174.5"/> + <gvxy_point X_Y="224.9; -174.5"/> + <gvxy_point X_Y="125.; -174.5"/> + <gvxy_point X_Y="125.; -154.5"/> + <gvxy_point X_Y="-125.; -154.5"/> + <gvxy_point X_Y="-125.; -174.5"/> + <gvxy_point X_Y="-224.9; -174.5"/> + <gvxy_point X_Y="-273.95; 174.5"/> +</gvxy> + +<box name="SHIM1" material="Aluminium" X_Y_Z="700.; 150.; 21.6 " /> +<box name="SHIM2" material="Aluminium" X_Y_Z="350.; 150.; 21.6 " /> + +<gvxysx name="REAR_PLATE3" material="Aluminium" dZ="30."> + <gvxy_point X_Y="323.7; 80."/> + <gvxy_point X_Y=" 301.21; -80."/> +</gvxysx> + +<box name="KM_FRONT_PLATE1" material="ShieldSteel" X_Y_Z="34.; 160.; 250. " /> +<box name="KM_LOCKING_PLATE1" material="ShieldSteel" X_Y_Z="20.; 120.; 200. " /> + +<gvxy name="JOINING_BAR2" material="Aluminium" dZ="29."> + <gvxy_point X_Y="175.; 75."/> + <gvxy_point X_Y="964.81; -64.27"/> + <gvxy_point X_Y="938.77; -211.99"/> + <gvxy_point X_Y="161.88; -75."/> + <gvxy_point X_Y="-161.88; -75."/> + <gvxy_point X_Y="-938.77; -211.99"/> + <gvxy_point X_Y="-964.81; -64.27"/> + <gvxy_point X_Y="-175.; 75."/> +</gvxy> + +<gvxy name="JOINING_BAR1" material="Aluminium" dZ="29."> + <gvxy_point X_Y="350.; 75."/> + <gvxy_point X_Y="1196.93; -74.34"/> + <gvxy_point X_Y="1170.88; -222.06"/> + <gvxy_point X_Y="336.88; -75."/> + <gvxy_point X_Y="-336.88; -75."/> + <gvxy_point X_Y="-1170.88; -222.06"/> + <gvxy_point X_Y="-1196.93; -74.34"/> + <gvxy_point X_Y="-350.; 75."/> +</gvxy> + +<composition name="Inner_Spoke_Assembly" > + <posXYZ volume="Base_Leg" X_Y_Z="0.; 1301.5; 0." /> + <posXYZ volume="JOINING_BAR1" X_Y_Z="0.; 4385.; -231.2" /> + <posXYZ volume="JOINING_BAR2" X_Y_Z="0.; 3065.; -231.2" /> + <posXYZ volume="JOINING_BAR3" X_Y_Z="0.; 1715.; -218.05" rot=" 90. ; 0. ; 0." /> + <posXYZ volume="LATERAL_PLATE_L" X_Y_Z="-217.3; 3635.56; 0." rot=" 0. ; 0. ; 8." /> + <posXYZ volume="LATERAL_PLATE_L" X_Y_Z="217.3; 3635.56; 0." rot=" 0. ; 0. ; -8." /> + <posXYZ volume="Front_plate2" X_Y_Z="0.; 0.; 188." /> + <posXYZ volume="LS_OUTER3" X_Y_Z="0.; 4018.41; 180." /> + <posXYZ volume="REAR_PLATE1" X_Y_Z="0.; 3114.99; -180." /> + <posXYZ volume="REAR_PLATE2" X_Y_Z="0.; 3939.93; -180." /> + <posXYZ volume="REAR_PLATE3" X_Y_Z="0.; 4388.42; -180." /> + <posXYZ volume="SHIM1" X_Y_Z="0.; 4385.; -205.85" /> + <posXYZ volume="SHIM2" X_Y_Z="0.; 3065.; -205.85" /> + <posXYZ volume="KM_FRONT_PLATE1" X_Y_Z="318.34; 4156.56; 25." rot=" 0. ; 0. ; -8." /> + <posXYZ volume="KM_FRONT_PLATE1" X_Y_Z="-318.34; 4156.56; 25." rot=" 0. ; 0. ; 8." /> + <posXYZ volume="KM_LOCKING_PLATE1" X_Y_Z="270.71; 4163.26; 0." rot=" 0. ; 0. ; -8." /> + <posXYZ volume="KM_LOCKING_PLATE1" X_Y_Z="-270.71; 4163.26; 0." rot=" 0. ; 0. ; 8." /> +</composition> + +<composition name="Inner_Spoke" > + <posXYZ volume="Inner_Spoke_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 22.5" /> + <posXYZ volume="Inner_Spoke_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 67.5" /> + <posXYZ volume="Inner_Spoke_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 112.5" /> + <posXYZ volume="Inner_Spoke_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 157.5" /> + <posXYZ volume="Inner_Spoke_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 202.5" /> + <posXYZ volume="Inner_Spoke_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 247.5" /> + <posXYZ volume="Inner_Spoke_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 292.5" /> + <posXYZ volume="Inner_Spoke_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 337.5" /> +</composition> + +<!-- *********************************************************************************** End Inner Spoke **************************************************\ +************************************* --> + +<!-- *********************************************************************************** Outer Spoke ******************************************************\ +************************************* --> + +<box name="NSW_F1_spoke_MainBox" material="Aluminium" X_Y_Z="135.; 1060.; 185. " /> +<box name="NSW_F1_spoke_CutBox" material="Aluminium" X_Y_Z="111.; 1070.; 161. " /> + +<subtraction name="NSW_F1_spoke" > + <posXYZ volume="NSW_F1_spoke_MainBox" /> + <posXYZ volume="NSW_F1_spoke_CutBox" /> +</subtraction> +<box name="NSW_F1_spoke_Bot_Plate" material="Aluminium" X_Y_Z="300.; 48.; 300. " /> + +<gvxysx name="Plaque_interface2" material="Aluminium" dZ="37."> + <gvxy_point X_Y="182.5; 375."/> + <gvxy_point X_Y="146.5; 213.2"/> + <gvxy_point X_Y="90.; -375."/> +</gvxysx> + +<gvxysx name="Plaque_interface2.1" material="Aluminium" dZ="45."> + <gvxy_point X_Y="182.5; 375."/> + <gvxy_point X_Y="146.5; 213.2"/> + <gvxy_point X_Y="90.; -375."/> +</gvxysx> + +<box name="NSW_SS_spoke_Pillar_MainBox" material="Aluminium" X_Y_Z="135.; 2683.25; 185. " /> +<box name="NSW_SS_spoke_Pillar_CutBox" material="Aluminium" X_Y_Z="113.; 2685.; 163. " /> + +<subtraction name="NSW_SS_spoke_Pillar" > + <posXYZ volume="NSW_SS_spoke_Pillar_MainBox" /> + <posXYZ volume="NSW_SS_spoke_Pillar_CutBox" /> +</subtraction> + +<box name="Spoke_Joint" material="ShieldSteel" X_Y_Z="75.; 85.; 124.4 " /> + +<gvxysx name="Manifolds_Support_Main" material="Aluminium" dZ="150."> + <gvxy_point X_Y="585.; 75."/> + <gvxy_point X_Y=" 551.74; -75."/> +</gvxysx> + +<box name="Manifolds_Support_CutBox1" material="Aluminium" X_Y_Z="1180.; 140.; 140. " /> +<box name="Manifolds_Support_CutBox2" material="Aluminium" X_Y_Z="160.; 90.; 160. " /> + +<subtraction name="Manifolds_Support" > + <posXYZ volume="Manifolds_Support_Main" /> + <posXYZ volume="Manifolds_Support_CutBox1" /> + <posXYZ volume="Manifolds_Support_CutBox2" X_Y_Z="135.; -45.; 0." /> +</subtraction> + +<box name="Cale" material="Aluminium" X_Y_Z="135.; 280.; 52. " /> +<box name="JD_JOINT2.1_Plate1" material="Aluminium" X_Y_Z="250.; 270.; 20. " /> +<box name="Shim_JD" material="Aluminium" X_Y_Z="250.; 270.; 29. " /> +<box name="JD_JOINT1_Pipe_MainBox" material="Aluminium" X_Y_Z="1300.; 120.; 80." /> +<box name="JD_JOINT1_Pipe_CutBox" material="Aluminium" X_Y_Z="1305.; 100.; 60. " /> + +<subtraction name="JD_JOINT1_Pipe" > + <posXYZ volume="JD_JOINT1_Pipe_MainBox" /> + <posXYZ volume="JD_JOINT1_Pipe_CutBox" /> +</subtraction> + +<box name="JD_JOINT2_Pipe_MainBox" material="Aluminium" X_Y_Z="900.; 120.; 80." /> + +<subtraction name="JD_JOINT2_Pipe" > + <posXYZ volume="JD_JOINT2_Pipe_MainBox" /> + <posXYZ volume="JD_JOINT1_Pipe_CutBox" /> +</subtraction> + +<box name="KM_FRONT_PLATE.1.1" material="ShieldSteel" X_Y_Z="27.; 272.; 120. " /> +<box name="Manifolds_Support_Plate" material="Aluminium" X_Y_Z="9.8; 275.; 175. " /> +<box name="AL_BAR_KM_INCLINED_PLATE" material="Aluminium" X_Y_Z="290.; 38.; 67. " /> + +<composition name="Outer_Spoke_Assembly" > + <posXYZ volume="NSW_F1_spoke" X_Y_Z="0.; 1350.; 0." /> + <posXYZ volume="NSW_F1_spoke_Bot_Plate" X_Y_Z="0.; 795.95; 0." /> + <posXYZ volume="Manifolds_Support" X_Y_Z="0.; 4515.33; 0." /> + <posXYZ volume="Plaque_interface2" X_Y_Z="0.; 1745.; 111.05" /> + <posXYZ volume="Plaque_interface2.1" X_Y_Z="0.; 1745.; -115.05" /> + <posXYZ volume="NSW_SS_spoke_Pillar" X_Y_Z="371.; 3267.85; 0." rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="NSW_SS_spoke_Pillar" X_Y_Z="-371.; 3267.85; 0." rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="Spoke_Joint" X_Y_Z="610.52; 4348.24; 154.75" rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Spoke_Joint" X_Y_Z="322.65; 3049.77; 154.75" rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Spoke_Joint" X_Y_Z="-610.52; 4348.24; 154.75" rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="Spoke_Joint" X_Y_Z="-322.65; 3049.77; 154.75" rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="Cale" X_Y_Z="537.79; 4020.21; -118.55" rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Cale" X_Y_Z="338.24; 3120.06; -118.55" rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Cale" X_Y_Z="-537.79; 4020.21; -118.55" rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="Cale" X_Y_Z="-338.24; 3120.06; -118.55" rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="JD_JOINT2.1_Plate1" X_Y_Z="515.; 4020.2; -154.6" /> + <posXYZ volume="JD_JOINT2.1_Plate1" X_Y_Z="315.; 3120.6; -154.6" /> + <posXYZ volume="JD_JOINT2.1_Plate1" X_Y_Z="-515.; 4020.2; -154.6" /> + <posXYZ volume="JD_JOINT2.1_Plate1" X_Y_Z="-315.; 3120.6; -154.6" /> + <posXYZ volume="Shim_JD" X_Y_Z="515.; 4020.2; -261.55" /> + <posXYZ volume="Shim_JD" X_Y_Z="315.; 3120.6; -261.55" /> + <posXYZ volume="Shim_JD" X_Y_Z="-515.; 4020.2; -261.55" /> + <posXYZ volume="Shim_JD" X_Y_Z="-315.; 3120.6; -261.55" /> + <posXYZ volume="JD_JOINT1_Pipe" X_Y_Z="0.; 4020.2; -207." /> + <posXYZ volume="JD_JOINT2_Pipe" X_Y_Z="0.; 3120.6; -207." /> + <posXYZ volume="KM_FRONT_PLATE.1.1" X_Y_Z="641.41; 4289.16; 0." rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="KM_FRONT_PLATE.1.1" X_Y_Z="-641.41; 4289.16; 0." rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="Manifolds_Support_Plate" X_Y_Z="560.93; 4459.11; 0." rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Manifolds_Support_Plate" X_Y_Z="-560.93; 4459.11; 0." rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="AL_BAR_KM_INCLINED_PLATE" X_Y_Z="-243.; 4099.25; -228.5" /> +</composition> + +<!-- Outer Spoke Foot --> +<gvxysx name="Plaque_interface2_SpecMain" material="Aluminium" dZ="37."> + <gvxy_point X_Y="182.5; 375."/> + <gvxy_point X_Y="146.5; 213.2"/> + <gvxy_point X_Y="90.; -375."/> +</gvxysx> + +<box name="Plaque_interface2_Spec_CutBox" material="Aluminium" X_Y_Z="160.; 260.; 13. " /> + +<subtraction name="Plaque_interface2_Spec" > + <posXYZ volume="Plaque_interface2_SpecMain" /> + <posXYZ volume="Plaque_interface2_Spec_CutBox" X_Y_Z="-120.94; 337.19; -12.5" rot=" 0. ; 0. ; 12.5" /> +</subtraction> + +<gvxysx name="Plaque_interface2.1_SpecMain" material="Aluminium" dZ="45."> + <gvxy_point X_Y="182.5; 375."/> + <gvxy_point X_Y="146.5; 213.2"/> + <gvxy_point X_Y="90.; -375."/> +</gvxysx> + +<subtraction name="Plaque_interface2.1_Spec" > + <posXYZ volume="Plaque_interface2.1_SpecMain" /> + <posXYZ volume="Plaque_interface2_Spec_CutBox" X_Y_Z="-120.94; 337.19; 16.5" rot=" 0. ; 0. ; 12.5" /> +</subtraction> + +<box name="NSW_SS_spoke_PillarSpec_MainBox" material="ShieldSteel" X_Y_Z="135.; 2818.1; 210. " /> +<box name="NSW_SS_spoke_PillarSpec_CutBox" material="Aluminium" X_Y_Z="91.; 2820.; 166. " /> + +<subtraction name="NSW_SS_spokeSpec_Pillar" > + <posXYZ volume="NSW_SS_spoke_PillarSpec_MainBox" /> + <posXYZ volume="NSW_SS_spoke_PillarSpec_CutBox" /> +</subtraction> + +<box name="Cale_Spec" material="Aluminium" X_Y_Z="135.; 280.; 38.6 " /> +<box name="Spoke_Joint1.2" material="Aluminium" X_Y_Z="66.; 100.; 111.9 " /> + +<box name="BOTTOM_PLATE.1_Horisontal_Plate" material="ShieldSteel" X_Y_Z="29.8; 775.; 495. " /> +<box name="BOTTOM_PLATE.1_Vertical_Main_Plate" material="ShieldSteel" X_Y_Z="460.; 640.; 35. " /> + +<gvxy name="Connecting_Plates2.1" material="Aluminium" dZ="22."> + <gvxy_point X_Y="-252.; 130.65"/> + <gvxy_point X_Y="70.; 130.65"/> + <gvxy_point X_Y="252.; 25.65"/> + <gvxy_point X_Y="258.6; -124.1"/> + <gvxy_point X_Y="108.7; -130.65"/> + <gvxy_point X_Y="-252.; 19.35"/> +</gvxy> + +<box name="Tube_alu_feet_MainBox" material="Aluminium" X_Y_Z="1050.; 135.; 185. " /> +<box name="Tube_alu_feet_CutBox" material="Aluminium" X_Y_Z="1055.; 111.4; 161.4 " /> + +<subtraction name="Tube_alu_feet" > + <posXYZ volume="Tube_alu_feet_MainBox" /> + <posXYZ volume="Tube_alu_feet_CutBox" X_Y_Z="-120.94; 337.19; 16.5" rot=" 0. ; 0. ; 12.5" /> +</subtraction> + +<box name="Fix_nut" material="ShieldSteel" X_Y_Z="50.; 52.; 290. " /> + +<gvxy name="Beam_Interface" material="Aluminium" dZ="300."> + <gvxy_point X_Y="-80.; 73.4"/> + <gvxy_point X_Y="80.; 73.4"/> + <gvxy_point X_Y="80.; -73.4"/> + <gvxy_point X_Y="-80.; 28.5"/> +</gvxy> + +<gvxy name="Beam_Interface2" material="Aluminium" dZ="300."> + <gvxy_point X_Y="-80.; 79.8"/> + <gvxy_point X_Y="80.; 79.8"/> + <gvxy_point X_Y="80.; 12.6"/> + <gvxy_point X_Y="-80.; -79.8"/> +</gvxy> + +<box name="LS_T_Joint" material="ShieldSteel" X_Y_Z="80.; 70.; 134.9 " /> +<box name="LS_T_Joint2" material="ShieldSteel" X_Y_Z="77.; 67.; 147.4 " /> + +<gvxy name="Renfort_Bas1_MainBox" material="Aluminium" dZ="135."> + <gvxy_point X_Y="-337.73; -67.5"/> + <gvxy_point X_Y="-251.72; 67.5"/> + <gvxy_point X_Y="251.72; 67.5"/> + <gvxy_point X_Y="337.27; -67.5"/> +</gvxy> + +<box name="Renfort_Bas1_CutBox" material="Aluminium" X_Y_Z="680.; 115.; 115. " /> + + +<subtraction name="Renfort_Bas1" > + <posXYZ volume="Renfort_Bas1_MainBox" /> + <posXYZ volume="Renfort_Bas1_CutBox" /> +</subtraction> + +<composition name="Outer_Spoke_Assembly_FOOT1" > + <posXYZ volume="NSW_F1_spoke" X_Y_Z="0.; 1350.; 0." /> + <posXYZ volume="NSW_F1_spoke_Bot_Plate" X_Y_Z="0.; 795.95; 0." /> + <posXYZ volume="Plaque_interface2_Spec" X_Y_Z="0.; 1745.; 111.05" /> + <posXYZ volume="Plaque_interface2.1_Spec" X_Y_Z="0.; 1745.; -115.05" /> + <posXYZ volume="NSW_SS_spoke_Pillar" X_Y_Z="371.; 3267.85; 0." rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="NSW_SS_spokeSpec_Pillar" X_Y_Z="-385.59; 3333.67; 0." rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="Shim_JD" X_Y_Z="515.; 4020.2; -261.55" /> + <posXYZ volume="Shim_JD" X_Y_Z="315.; 3120.6; -261.55" /> + <posXYZ volume="Shim_JD" X_Y_Z="-515.; 4020.2; -261.55" /> + <posXYZ volume="Shim_JD" X_Y_Z="-315.; 3120.6; -261.55" /> + <posXYZ volume="JD_JOINT2.1_Plate1" X_Y_Z="515.; 4020.2; -154.6" /> + <posXYZ volume="JD_JOINT2.1_Plate1" X_Y_Z="315.; 3120.6; -154.6" /> + <posXYZ volume="JD_JOINT2.1_Plate1" X_Y_Z="-515.; 4020.2; -154.6" /> + <posXYZ volume="JD_JOINT2.1_Plate1" X_Y_Z="-315.; 3120.6; -154.6" /> + <posXYZ volume="Cale" X_Y_Z="537.79; 4020.21; -118.55" rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Cale" X_Y_Z="338.24; 3120.06; -118.55" rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Cale_Spec" X_Y_Z="-537.79; 4020.21; -124.35" rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="Cale_Spec" X_Y_Z="-338.24; 3120.06; -124.35" rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="JD_JOINT1_Pipe" X_Y_Z="0.; 4020.2; -207." /> + <posXYZ volume="JD_JOINT2_Pipe" X_Y_Z="0.; 3120.6; -207." /> + <posXYZ volume="AL_BAR_KM_INCLINED_PLATE" X_Y_Z="-243.; 4099.25; -228.5" /> + <posXYZ volume="Spoke_Joint" X_Y_Z="322.65; 3049.77; 154.75" rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Spoke_Joint" X_Y_Z="610.52; 4348.24; 154.75" rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Spoke_Joint1.2" X_Y_Z="-322.65; 3049.28; 161." rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="Spoke_Joint1.2" X_Y_Z="-610.4; 4347.75; 161." rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="KM_FRONT_PLATE.1.1" X_Y_Z="641.41; 4289.16; 0." rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="BOTTOM_PLATE.1_Horisontal_Plate" X_Y_Z="-675.29; 4889.64; -29." rot=" 0. ; 0. ; -45." /> + <posXYZ volume="BOTTOM_PLATE.1_Vertical_Main_Plate" X_Y_Z="-491.47; 4727.04; -257.5" rot=" 0. ; 0. ; -45." /> + <posXYZ volume="Connecting_Plates2.1" X_Y_Z="475.73; 4596.28; 103.55" rot=" 0. ; 0. ; -15." /> + <posXYZ volume="Connecting_Plates2.1" X_Y_Z="475.73; 4596.28; -103.55" rot=" 0. ; 0. ; -15." /> + <posXYZ volume="Tube_alu_feet" X_Y_Z="35.49; 4779.63; 0." rot=" 0. ; 0. ; -15." /> + <posXYZ volume="Fix_nut" X_Y_Z="-840.79; 4666.23; -5." rot=" 0. ; 0. ; -45." /> + <posXYZ volume="Fix_nut" X_Y_Z="-443.82; 5063.2; -5." rot=" 0. ; 0. ; -45." /> + <posXYZ volume="Beam_Interface" X_Y_Z="-716.12; 4723.86; 0." rot=" 0. ; 0. ; 45." /> + <posXYZ volume="Beam_Interface2" X_Y_Z="-496.92; 4934.01; 0." rot=" 0. ; 0. ; 45." /> + <posXYZ volume="LS_T_Joint" X_Y_Z="-649.; 4560.58; -172.5" rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="LS_T_Joint2" X_Y_Z="-356.49; 4881.55; -166.25" rot=" 0. ; 0. ; 75." /> + <posXYZ volume="Renfort_Bas1" X_Y_Z="-329.24; 4539.98; 0." rot=" 0. ; 0. ; 45." /> +</composition> + +<composition name="Outer_Spoke_Assembly_FOOT2" > + <posXYZ volume="NSW_F1_spoke" X_Y_Z="0.; 1350.; 0." /> + <posXYZ volume="NSW_F1_spoke_Bot_Plate" X_Y_Z="0.; 795.95; 0." /> + <posXYZ volume="Plaque_interface2_Spec" X_Y_Z="0.; 1745.; 111.05" /> + <posXYZ volume="Plaque_interface2.1_Spec" X_Y_Z="0.; 1745.; -115.05" /> + <posXYZ volume="NSW_SS_spoke_Pillar" X_Y_Z="371.; 3267.85; 0." rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="NSW_SS_spokeSpec_Pillar" X_Y_Z="-385.59; 3333.67; 0." rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="Shim_JD" X_Y_Z="515.; 4020.2; 261.55" /> + <posXYZ volume="Shim_JD" X_Y_Z="315.; 3120.6; 261.55" /> + <posXYZ volume="Shim_JD" X_Y_Z="-515.; 4020.2; 261.55" /> + <posXYZ volume="Shim_JD" X_Y_Z="-315.; 3120.6; 261.55" /> + <posXYZ volume="JD_JOINT2.1_Plate1" X_Y_Z="515.; 4020.2; 154.6" /> + <posXYZ volume="JD_JOINT2.1_Plate1" X_Y_Z="315.; 3120.6; 154.6" /> + <posXYZ volume="JD_JOINT2.1_Plate1" X_Y_Z="-515.; 4020.2; 154.6" /> + <posXYZ volume="JD_JOINT2.1_Plate1" X_Y_Z="-315.; 3120.6; 154.6" /> + <posXYZ volume="Cale" X_Y_Z="537.79; 4020.21; 118.55" rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Cale" X_Y_Z="338.24; 3120.06; 118.55" rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Cale_Spec" X_Y_Z="-537.79; 4020.21; 124.35" rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="Cale_Spec" X_Y_Z="-338.24; 3120.06; 124.35" rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="JD_JOINT1_Pipe" X_Y_Z="0.; 4020.2; 207." /> + <posXYZ volume="JD_JOINT2_Pipe" X_Y_Z="0.; 3120.6; 207." /> + <posXYZ volume="AL_BAR_KM_INCLINED_PLATE" X_Y_Z="-243.; 4099.25; 228.5" /> + <posXYZ volume="Spoke_Joint" X_Y_Z="322.65; 3049.77; -154.75" rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Spoke_Joint" X_Y_Z="610.52; 4348.24; -154.75" rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Spoke_Joint1.2" X_Y_Z="-322.65; 3049.28; -161." rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="Spoke_Joint1.2" X_Y_Z="-610.4; 4347.75; -161." rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="KM_FRONT_PLATE.1.1" X_Y_Z="641.41; 4289.16; 0." rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="BOTTOM_PLATE.1_Horisontal_Plate" X_Y_Z="-675.29; 4889.64; 29." rot=" 0. ; 0. ; -45." /> + <posXYZ volume="BOTTOM_PLATE.1_Vertical_Main_Plate" X_Y_Z="-491.47; 4727.04; 257.5" rot=" 0. ; 0. ; -45." /> + <posXYZ volume="Connecting_Plates2.1" X_Y_Z="475.73; 4596.28; -103.55" rot=" 0. ; 0. ; -15." /> + <posXYZ volume="Connecting_Plates2.1" X_Y_Z="475.73; 4596.28; 103.55" rot=" 0. ; 0. ; -15." /> + <posXYZ volume="Tube_alu_feet" X_Y_Z="35.49; 4779.63; 0." rot=" 0. ; 0. ; -15." /> + <posXYZ volume="Fix_nut" X_Y_Z="-840.79; 4666.23; -5." rot=" 0. ; 0. ; -45." /> + <posXYZ volume="Fix_nut" X_Y_Z="-443.82; 5063.2; -5." rot=" 0. ; 0. ; -45." /> + <posXYZ volume="Beam_Interface" X_Y_Z="-716.12; 4723.86; 0." rot=" 0. ; 0. ; 45." /> + <posXYZ volume="Beam_Interface2" X_Y_Z="-496.92; 4934.01; 0." rot=" 0. ; 0. ; 45." /> + <posXYZ volume="LS_T_Joint" X_Y_Z="-649.; 4560.58; 172.5" rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="LS_T_Joint2" X_Y_Z="-356.49; 4881.55; 166.25" rot=" 0. ; 0. ; 75." /> + <posXYZ volume="Renfort_Bas1" X_Y_Z="-329.24; 4539.98; 0." rot=" 0. ; 0. ; 45." /> +</composition> +<!-- End Outer Spoke Foot --> + + +<composition name="Outer_Spoke" > + <posXYZ volume="Outer_Spoke_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 0." /> + <posXYZ volume="Outer_Spoke_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 45." /> + <posXYZ volume="Outer_Spoke_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 90." /> + <posXYZ volume="Outer_Spoke_Assembly_FOOT1" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 135." /> + <posXYZ volume="Outer_Spoke_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 180." /> + <posXYZ volume="Outer_Spoke_Assembly_FOOT2" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 180. ; 225." /> + <posXYZ volume="Outer_Spoke_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 270." /> + <posXYZ volume="Outer_Spoke_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 315." /> +</composition> +<!-- ********************************************************************************* End Outer Spoke ****************************************************\ +************************************** --> + +<!-- *********************************************************************************** LSO LSI Connection ***********************************************\ +************************************* --> + +<box name="LSO_LSI_connection_Rot" material="ShieldSteel" X_Y_Z="63.; 754.1; 46. " /> + +<composition name="LSO_LSI_connection_Pos" > + <posXYZ volume="LSO_LSI_connection_Rot" X_Y_Z="0.; 2210.09; 0." /> +</composition> + +<composition name="LSO_LSI_Connection" > + <posXYZ volume="LSO_LSI_connection_Pos" X_Y_Z="0.; 0.; 870.2" rot=" 0. ; 0. ; 22.5" /> + <posXYZ volume="LSO_LSI_connection_Pos" X_Y_Z="0.; 0.; 870.2" rot=" 0. ; 0. ; 67.5" /> + <posXYZ volume="LSO_LSI_connection_Pos" X_Y_Z="0.; 0.; 870.2" rot=" 0. ; 0. ; -22.5" /> + <posXYZ volume="LSO_LSI_connection_Pos" X_Y_Z="0.; 0.; 870.2" rot=" 0. ; 0. ; -67.5" /> +</composition> + +<!-- *********************************************************************************** End LSO LSI Connection *******************************************\ +************************************* --> + +<!-- *********************************************************************************** Alignment Bars ***************************************************\ +**************************************** --> + +<!-- SS Bar --> +<tubs name="SS_Bar_Tube" material="Aluminium" Rio_Z="0.; 49.1; 2382." /> + +<composition name="SS_Bar_Assembly" > + <posXYZ volume="SS_Bar_Tube" X_Y_Z="69.2; 3364.6; 0" rot=" 90. ; 0. ; -3.35" /> +</composition> + +<composition name="SS_Bar" > + <posXYZ volume="SS_Bar_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 0." /> + <posXYZ volume="SS_Bar_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 45." /> + <posXYZ volume="SS_Bar_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 90." /> + <posXYZ volume="SS_Bar_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 135." /> + <posXYZ volume="SS_Bar_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 180." /> + <posXYZ volume="SS_Bar_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 225." /> + <posXYZ volume="SS_Bar_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 270." /> + <posXYZ volume="SS_Bar_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 315." /> +</composition> +<!-- End SS Bar --> + +<!-- LS Bar --> +<tubs name="LS_Bar_Tube" material="Aluminium" Rio_Z="0.; 48.; 2340." /> +<box name="LS_Arm" material="Aluminium" X_Y_Z="1010.; 40.; 50. " /> + +<composition name="LS_Bar_Assembly" > + <posXYZ volume="LS_Bar_Tube" X_Y_Z="1286.4; 3086.18; 0." rot=" 90. ; 0. ; -25." /> + <posXYZ volume="LS_Arm" X_Y_Z="1789.34; 4164.73; 0." rot=" 0. ; 0. ; -25." /> +</composition> + +<composition name="LS_Bar" > + <posXYZ volume="LS_Bar_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 0." /> + <posXYZ volume="LS_Bar_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 45." /> + <posXYZ volume="LS_Bar_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 90." /> + <posXYZ volume="LS_Bar_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 135." /> + <posXYZ volume="LS_Bar_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 180." /> + <posXYZ volume="LS_Bar_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 225." /> + <posXYZ volume="LS_Bar_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 270." /> + <posXYZ volume="LS_Bar_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 315." /> +</composition> +<!-- End LS Bar --> + +<!-- *********************************************************************************** End Alignment Bars ***********************************************\ +******************************************** --> + + +<composition name="NSW_Aluminum_Structure_and_HUB_Assembly" > + <posXYZ volume="New_Hub" /> + <posXYZ volume="Inner_Spoke" /> + <posXYZ volume="LSO_LSI_Connection" /> + <posXYZ volume="Outer_Spoke" /> + <posXYZ volume="SS_Bar" /> + <posXYZ volume="LS_Bar" /> +</composition> + +<composition name="NSW_Aluminum_Structure_and_HUB_SideA" > + <posXYZ volume="NSW_Aluminum_Structure_and_HUB_Assembly" X_Y_Z="0.; 0.; 6943.8" rot=" 0. ; 0. ; 0." /> +</composition> + +<composition name="NSW_Aluminum_Structure_and_HUB_SideC" > + <posXYZ volume="NSW_Aluminum_Structure_and_HUB_Assembly" X_Y_Z="0.; 0.; -6943.8" rot=" 0. ; 180. ; 0." /> +</composition> + +<composition name="NSW_Aluminum_Structure_and_HUB" > + <posXYZ volume="NSW_Aluminum_Structure_and_HUB_SideA" /> + <posXYZ volume="NSW_Aluminum_Structure_and_HUB_SideC" /> +</composition> + +</section> + +<!-- ===========================================NJD=========================================== --> + +<section name = "NJD Disk" + version = "0.0" + date = "16-11-2016" + author = "Georgian Engineering Team - Niko Tsutskiridze" + top_volume = "NJD_Disk"> + +<!-- NJD Disk --> + +<!-- main disk--> +<tubs name="MD01" material="ShieldSteel" Rio_Z="430.; 4360.; 40." nbPhi="32." /> +<tubs name="MD02" material="ShieldSteel" Rio_Z="430.; 2700.; 48.7" nbPhi="32." /> +<tubs name="MDB01_Cut" material="ShieldSteel" Rio_Z="0.; 840.; 3." nbPhi="32." /> + +<gvxy name="MD03" material="ShieldSteel" dZ="40." > + <gvxy_point X_Y="-3370.; -3950."/> + <gvxy_point X_Y="-3370.; -3880."/> + <gvxy_point X_Y="-3679.5; -2484."/> + <gvxy_point X_Y="-3990.; -1734.39"/> + <gvxy_point X_Y="-2599.16; -3470."/> + <gvxy_point X_Y="-2670.; -3570."/> + <gvxy_point X_Y="-2670.; -3950."/> +</gvxy> + +<subtraction name="MDB01_Un" > + <posXYZ volume="MD01" /> + <posXYZ volume="MDB01_Cut" X_Y_Z=" 0.; 0.; 19.4 " /> +</subtraction> + +<union name="MDB01" > + <posXYZ volume="MDB01_Un" /> + <posXYZ volume="MD03" /> + <posXYZ volume="MD03" rot=" 0.; 180.; 0."/> +</union> +<!-- End main disk--> + + +<!-- Ret.Flux --> +<tubs name="FLUX_Box" material="ShieldSteel" Rio_Z="3800.; 4360.; 39.9" nbPhi="32." /> +<box name="FLUX_Cut_Box" material="ShieldSteel" X_Y_Z="2200.; 400.; 50." /> + +<subtraction name="FLUX" > + <posXYZ volume="FLUX_Box" /> + <posXYZ volume="FLUX_Cut_Box" X_Y_Z=" -1930.; 3430.; 0." /> +</subtraction> +<!-- End Ret.Flux --> + +<!-- FIXING PLATE --> +<box name="FIXING_PLATE" material="ShieldSteel" X_Y_Z="350.; 975.; 40.9" /> +<box name="FIXING_PLATE_Special" material="ShieldSteel" X_Y_Z="350.; 787.5; 40.9" /> + +<composition name="FIXING_PLATE_Pos" > + <posXYZ volume="FIXING_PLATE" X_Y_Z=" 0.; 3252.5; 0." /> +</composition> + +<composition name="FIXING_PLATE_Ass" > + <posXYZ volume="FIXING_PLATE_Special" X_Y_Z=" -1208.8; 2918.31; 0." rot=" 0.; 0.; 22.5" /> + <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 67.5" /> + <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 112.5" /> + <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 157.5" /> + <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 202.5" /> + <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 247.5" /> + <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 292.5" /> + <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 337.5" /> +</composition> +<!-- End FIXING PLATE --> + +<!-- NJD feet--> +<gvxy name="JF01" material="ShieldSteel" dZ="37.3" > + <gvxy_point X_Y="-3300.; -3950."/> + <gvxy_point X_Y="-3300.; -3480."/> + <gvxy_point X_Y="-3270.; -3450."/> + <gvxy_point X_Y="-2730.; -3450."/> + <gvxy_point X_Y="-2700.; -3480."/> + <gvxy_point X_Y="-2700.; -3950."/> +</gvxy> + +<gvxy name="JF02" material="ShieldSteel" dZ="35." > + <gvxy_point X_Y="-342.4; -3950."/> + <gvxy_point X_Y="-342.4; -3930."/> + <gvxy_point X_Y="-77.4; -3470."/> + <gvxy_point X_Y="-57.4; -3470."/> + <gvxy_point X_Y="-57.4; -3920."/> + <gvxy_point X_Y="-87.4; -3950."/> +</gvxy> + +<gvxy name="JF03" material="ShieldSteel" dZ="48." > + <gvxy_point X_Y="-3370.; -362."/> + <gvxy_point X_Y="-3370.; 704."/> + <gvxy_point X_Y="-3495.; 704."/> + <gvxy_point X_Y="-3495.; 933."/> + <gvxy_point X_Y="-2660.; 933."/> + <gvxy_point X_Y="-2660.; 653."/> + <gvxy_point X_Y="-2700.; 653."/> + <gvxy_point X_Y="-2700.; 523."/> + <gvxy_point X_Y="-2590.; 523."/> + <gvxy_point X_Y="-2590.; -52."/> + <gvxy_point X_Y="-2685.; -52."/> + <gvxy_point X_Y="-2685.; -362."/> +</gvxy> + +<gvxy name="JF04" material="ShieldSteel" dZ="41.6" > + <gvxy_point X_Y="-453.5; -4251.1"/> + <gvxy_point X_Y="-453.5; -4158.1"/> + <gvxy_point X_Y="-603.; -4083.1"/> + <gvxy_point X_Y="-603.; -4038.1"/> + <gvxy_point X_Y="-362.; -4038.1"/> + <gvxy_point X_Y="-362.; -3998.1"/> + <gvxy_point X_Y="883.; -3998.1"/> + <gvxy_point X_Y="883.; -4251.1"/> +</gvxy> + +<gvxy name="JF05" material="ShieldSteel" dZ="356.1" > + <gvxy_point X_Y="-603.; -4048.1"/> + <gvxy_point X_Y="-603.; -4038.1"/> + <gvxy_point X_Y="-362.; -4038.1"/> + <gvxy_point X_Y="-362.; -3998.1"/> + <gvxy_point X_Y="-253.; -3998.1"/> + <gvxy_point X_Y="-253.; -4048.1"/> +</gvxy> + +<box name="JF06" material="ShieldSteel" X_Y_Z="536.; 253.; 71.4" /> + +<!-- Right--> +<composition name="Right_Feet" > + <posXYZ volume="JF01" X_Y_Z=" 0.; 0.; 38.7" rot=" 0.; 0.; 0." /> + <posXYZ volume="JF02" X_Y_Z=" -2802.5; 0.; 0." rot=" 0.; 90.; 0." /> + <posXYZ volume="JF02" X_Y_Z=" -3197.5; 0.; 0." rot=" 0.; 90.; 0." /> + <posXYZ volume="JF03" X_Y_Z=" 0.; -3974.05; 0." rot=" -90.; 0.; 0." /> + <posXYZ volume="JF04" X_Y_Z=" -2805.2; 0.; 0." rot=" 0.; 90.; 0." /> + <posXYZ volume="JF04" X_Y_Z=" -3203.; 0.; 0." rot=" 0.; 90.; 0." /> + <posXYZ volume="JF05" X_Y_Z=" -3004.1; 0.; 0." rot=" 0.; 90.; 0." /> + <posXYZ volume="JF06" X_Y_Z=" -3000.; -4124.6; -918.75" rot=" 0.; 0.; 0." /> +</composition> +<!-- End Right--> + +<!-- Left--> +<composition name="Left_Feet" > + <posXYZ volume="JF01" X_Y_Z=" 0.; 0.; 38.7" rot=" 0.; 180.; 0." /> + <posXYZ volume="JF02" X_Y_Z=" 2802.5; 0.; 0." rot=" 0.; 90.; 0." /> + <posXYZ volume="JF02" X_Y_Z=" 3197.5; 0.; 0." rot=" 0.; 90.; 0." /> + <posXYZ volume="JF03" X_Y_Z=" 0.; -3974.05; 0." rot=" -90.; 0.; 180." /> + <posXYZ volume="JF04" X_Y_Z=" 2805.2; 0.; 0." rot=" 0.; 90.; 0." /> + <posXYZ volume="JF04" X_Y_Z=" 3203.; 0.; 0." rot=" 0.; 90.; 0." /> + <posXYZ volume="JF05" X_Y_Z=" 3004.1; 0.; 0." rot=" 0.; 90.; 0." /> + <posXYZ volume="JF06" X_Y_Z=" 3000.; -4124.6; -918.75" rot=" 0.; 0.; 0." /> +</composition> +<!-- End Right--> +<!-- End NJD feet--> + +<composition name="JDDisk_ASide" > + <posXYZ volume="MDB01" X_Y_Z=" 0.; 0.; 6880." rot=" 0.; 0.; 0." /> + <posXYZ volume="MD02" X_Y_Z=" 0.; 0.; 6835.6" rot=" 0.; 0.;0."/> + <posXYZ volume="FLUX" X_Y_Z=" 0.; 0.; 6840." rot=" 0.; 0.; 0." /> + <posXYZ volume="FIXING_PLATE_Ass" X_Y_Z=" 0.; 0.; 6839.5" rot=" 0.; 0.; 0." /> + <posXYZ volume="Right_Feet" X_Y_Z=" 0.; 0.; 6880." rot=" 0.; 180.; 0." /> + <posXYZ volume="Left_Feet" X_Y_Z=" 0.; 0.; 6880." rot=" 0.; 180.; 0." /> +</composition> + +<composition name="JDDisk_CSide" > + <posXYZ volume="MDB01" X_Y_Z=" 0.; 0.; -6880." rot=" 0.; 180.; 0." /> + <posXYZ volume="MD02" X_Y_Z=" 0.; 0.; -6835.6" rot=" 0.; 0.;0."/> + <posXYZ volume="FLUX" X_Y_Z=" 0.; 0.; -6840." rot=" 0.; 0.; 0." /> + <posXYZ volume="FIXING_PLATE_Ass" X_Y_Z=" 0.; 0.; -6839.5" rot=" 0.; 0.; 0." /> + <posXYZ volume="Right_Feet" X_Y_Z=" 0.; 0.; -6880." rot=" 0.; 0.; 0." /> + <posXYZ volume="Left_Feet" X_Y_Z=" 0.; 0.; -6880." rot=" 0.; 0.; 0." /> +</composition> +<!-- End NJD Disk --> + +<composition name="NJD_Disk" > + <posXYZ volume="JDDisk_ASide" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 0." /> + <posXYZ volume="JDDisk_CSide" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 0." /> +</composition> + +</section> + +<!-- ==================================================Feet========================================= --> + +<section name = "A Plate" + version = "0.0" + date = "29-05-2017" + author = "Georgian Engineering Team - Niko Tsutskiridze" + top_volume = "A_Plate"> + +<gvxy name="Lateral_Plate_Main" material="ShieldSteel" dZ="21."> + <gvxy_point X_Y="-3300.; -4000."/> + <gvxy_point X_Y="-3548.3; -3235.72"/> + <gvxy_point X_Y="-1458.4; -560.8"/> + <gvxy_point X_Y="73.9; 73.9"/> + <gvxy_point X_Y="-628.9; -1622.8"/> + <gvxy_point X_Y="-818.3; -1544.4"/> + <gvxy_point X_Y="-1558.6; -2491.9"/> + <gvxy_point X_Y="-1427.8; -2980."/> + <gvxy_point X_Y="-0.01; -2980."/> + <gvxy_point X_Y="-0.01; -3280."/> + <gvxy_point X_Y="-1701.9; -3280."/> + <gvxy_point X_Y="-1995.3; -3050.8"/> + <gvxy_point X_Y="-2650.; -3889."/> + <gvxy_point X_Y="-2650.; -4000."/> +</gvxy> + +<tubs name="Lateral_plate_TubeCut" material="ShieldSteel" Rio_Z=" 0. ; 600. ; 25." nbPhi="36." /> + +<subtraction name="Lateral_Plate" > + <posXYZ volume="Lateral_Plate_Main" /> + <posXYZ volume="Lateral_plate_TubeCut" X_Y_Z="-0.01; -0.01; 0." rot=" 0. ; 0. ; 0." /> +</subtraction> + +<tubs name="Anchorage" material="ShieldSteel" Rio_Z=" 0. ; 22.6 ; 577." nbPhi="36." /> + +<gvxy name="Vertical_Top_Plate" material="ShieldSteel" dZ="33."> + <gvxy_point X_Y="-3300.; -3998."/> + <gvxy_point X_Y="-3300.; -3730."/> + <gvxy_point X_Y="-2865.; -3730."/> + <gvxy_point X_Y="-2675.; -3920."/> + <gvxy_point X_Y="-2675.; -3998."/> +</gvxy> + +<box name="Horizontal_Plate" material="ShieldSteel" X_Y_Z="625.; 40.6; 287. " /> + +<composition name="A_Plate_Assembly" > + <posXYZ volume="Lateral_Plate" /> + <posXYZ volume="Lateral_Plate" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="Anchorage" X_Y_Z="-3447.; -3283.25; -299.01" rot="0. ; 0. ; 0." /> + <posXYZ volume="Anchorage" X_Y_Z="3447.; -3283.25; -299.01" rot="0. ; 0. ; 0." /> + <posXYZ volume="Vertical_Top_Plate" X_Y_Z="0.; 0.; -27.01" rot="0. ; 0. ; 0." /> + <posXYZ volume="Vertical_Top_Plate" X_Y_Z="0.; 0.; -27.01" rot="0. ; 180. ; 0." /> + <posXYZ volume="Horizontal_Plate" X_Y_Z="-2987.5; -3929.7; -187.02" rot="0. ; 0. ; 0." /> + <posXYZ volume="Horizontal_Plate" X_Y_Z="2987.5; -3929.7; -187.02" rot="0. ; 0. ; 0." /> +</composition> + +<composition name="A_Plate_SideA" > + <posXYZ volume="A_Plate_Assembly" X_Y_Z=" 0. ; 0.; 7857.5" /> +</composition> + +<composition name="A_Plate_SideC" > + <posXYZ volume="A_Plate_Assembly" X_Y_Z=" 0. ; 0.; -7857.5" rot="0. ; 180. ; 0." /> +</composition> + +<composition name="A_Plate" > + <posXYZ volume="A_Plate_SideA" /> + <posXYZ volume="A_Plate_SideC" /> +</composition> + +</section> + +<!-- ========== Poisitionning all Volumes in NSW================ --> + +<section name="NewSmallWheels" version="4.3" top_volume="useless" date=" April 20, 2015 " author="Daniel Lellouch"> + +<composition name="NewSmallWheel"> + <posXYZ volume="NSW_sTGC" X_Y_Z="0.;0.;0."/> + <posXYZ volume="NSW_MM" X_Y_Z="0.;0.;0." /> + <posXYZ volume="NSW_Spacer" /> + <posXYZ volume="NSW_Aluminum_Structure_and_HUB" /> + <posXYZ volume="NJD_Disk" /> + <posXYZ volume="A_Plate" /> +</composition> + +</section> + +</AGDD> -- GitLab From 6be2a4cecabc3e558195a39423bbdec8df3e954b Mon Sep 17 00:00:00 2001 From: Jochen Meyer <Jochen.Meyer@cern.ch> Date: Tue, 5 Jun 2018 19:23:44 +0200 Subject: [PATCH 038/562] fixing permissions bug Former-commit-id: 5675fd6992e419023500eef04cc9f5382c466429 --- Event/EventContainers/test/ID_ContainerTest.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100755 new mode 100644 -- GitLab From 68b7b7f257047c2fa2dd142cf46461ca0f7a1760 Mon Sep 17 00:00:00 2001 From: Jochen Meyer <Jochen.Meyer@cern.ch> Date: Tue, 5 Jun 2018 19:40:13 +0200 Subject: [PATCH 039/562] adding std to setiosflags in RpcClusterBuilderPRD Former-commit-id: 7f798c5156ac3eb8bc40a408d8dbc4d3a7dd025f --- .../RpcClusterization/src/RpcClusterBuilderPRD.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/RpcClusterization/src/RpcClusterBuilderPRD.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/RpcClusterization/src/RpcClusterBuilderPRD.cxx index 3ad32e8ba6b8..ba4678f92ac1 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/RpcClusterization/src/RpcClusterBuilderPRD.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/RpcClusterization/src/RpcClusterBuilderPRD.cxx @@ -476,11 +476,11 @@ StatusCode RpcClusterBuilderPRD::retrieve_rpcClusterContainer() const { Amg::Vector3D position = cluster->globalPosition(); ATH_MSG_INFO("RPC Cluster ID, Position (mm), size = " << m_rpcId->show_to_string(cluster->identify()) << " [" - << setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << position.x() - << setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << position.y() - << setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << position.z() - // << setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << cluster->width() - << setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << cluster->rdoList().size() + << std::setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << position.x() + << std::setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << position.y() + << std::setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << position.z() + // << std::setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << cluster->width() + << std::setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << cluster->rdoList().size() << " ]"); } ATH_MSG_INFO("Number of Clusters in the collection is " << collection->size() ); -- GitLab From 7966ce6344436a5944f128ab5d8940791dfe5448 Mon Sep 17 00:00:00 2001 From: Francesca Pastore <francesca.pastore@cern.ch> Date: Tue, 5 Jun 2018 20:42:28 +0200 Subject: [PATCH 040/562] lots of simplifications; added egammaMu test Former-commit-id: c829912316341c5f32bf0117548d419cad8fdff8 --- .../TrigMuonHypo/src/TrigMufastHypoAlg.cxx | 38 +- .../TrigUpgradeTest/CMakeLists.txt | 6 + .../TrigUpgradeTest/python/HLTCFConfig.py | 132 ++- .../python/HLTSignatureConfig.py | 2 +- .../TrigUpgradeTest/python/MenuComponents.py | 19 +- .../TrigUpgradeTest/python/egammaMenuDefs.py | 173 ++++ .../TrigUpgradeTest/python/muMenuDefs.py | 539 ++++++++++++ .../share/EmuStepProcessingTest.py | 141 ++-- .../TrigUpgradeTest/share/egamma.menu.py | 233 +----- .../TrigUpgradeTest/share/egamma_mu.menu.py | 85 ++ .../TrigUpgradeTest/share/mu.menu.py | 770 +----------------- .../test/test_egamma_mu_menu.sh | 5 + 12 files changed, 1059 insertions(+), 1084 deletions(-) create mode 100644 Trigger/TrigValidation/TrigUpgradeTest/python/egammaMenuDefs.py create mode 100644 Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py create mode 100644 Trigger/TrigValidation/TrigUpgradeTest/share/egamma_mu.menu.py create mode 100755 Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_mu_menu.sh diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoAlg.cxx b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoAlg.cxx index bd684370d59a..2d99a0b40932 100755 --- a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoAlg.cxx +++ b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoAlg.cxx @@ -82,7 +82,6 @@ StatusCode TrigMufastHypoAlg::execute_r( const EventContext& context ) const // get View auto viewEL = previousDecision->objectLink< ViewContainer >( "view" ); CHECK( viewEL.isValid() ); - const SG::View* view_const = *viewEL; SG::View* view = const_cast<SG::View*>(view_const); // CHECK THIS! @@ -91,31 +90,36 @@ StatusCode TrigMufastHypoAlg::execute_r( const EventContext& context ) const CHECK( muFastHandle.setProxyDict( view ) ); ATH_MSG_DEBUG ( "Muinfo handle size: " << muFastHandle->size() << "..." ); - const xAOD::L2StandAloneMuon* fast = muFastHandle.cptr()->at(0); - + + auto muonEL = ElementLink<xAOD::L2StandAloneMuonContainer>( view->name()+"_"+m_muFastKey.key(), 0 ); + CHECK( muonEL.isValid() ); + const xAOD::L2StandAloneMuon* muon = *muonEL; + + // or instead: + //const xAOD::L2StandAloneMuon* muon = muFastHandle.cptr()->at(0); + //auto muonEL = ElementLink<xAOD::L2StandAloneMuonContainer>( muFastHandle.cptr(), 0 ); + // CHECK( muonEL.isValid() ); + // create new decision - auto d = newDecisionIn( decisions.get() ); + auto newd = newDecisionIn( decisions.get() ); // push_back to toolInput - toolInput.emplace_back( d, roi, fast, previousDecision ); + toolInput.emplace_back( newd, roi, muon, previousDecision ); - { - auto element = ElementLink<xAOD::L2StandAloneMuonContainer>( view->name()+"_"+m_muFastKey.key(), 0 ); - CHECK( element.isValid() ); - d->setObjectLink( "feature", element ); - ATH_MSG_DEBUG("REGTEST: " << m_muFastKey.key() << " pT = " << (*element)->pt() << " GeV"); - ATH_MSG_DEBUG("REGTEST: " << m_muFastKey.key() << " eta/phi = " << (*element)->eta() << "/" << (*element)->phi()); - } - d->setObjectLink( "roi", roiEL ); - d->setObjectLink( "view", viewEL ); + newd->setObjectLink( "feature", muonEL ); + newd->setObjectLink( "roi", roiEL ); + newd->setObjectLink( "view", viewEL ); + TrigCompositeUtils::linkToPrevious( newd, decisionInput().key(), counter ); + + ATH_MSG_DEBUG("REGTEST: " << m_muFastKey.key() << " pT = " << (*muonEL)->pt() << " GeV"); + ATH_MSG_DEBUG("REGTEST: " << m_muFastKey.key() << " eta/phi = " << (*muonEL)->eta() << "/" << (*muonEL)->phi()); ATH_MSG_DEBUG("REGTEST: View = " << (*viewEL)); ATH_MSG_DEBUG("REGTEST: RoI = eta/phi = " << (*roiEL)->eta() << "/" << (*roiEL)->phi()); - TrigCompositeUtils::linkToPrevious( d, decisionInput().key(), counter ); - ATH_MSG_DEBUG( "Added view, roi, cluster, previous decision to new decision "<<counter <<" for view "<<view->name() ); + ATH_MSG_DEBUG("Added view, roi, cluster, previous decision to new decision "<<counter <<" for view "<<view->name() ); counter++; } - ATH_MSG_DEBUG( "Found "<<toolInput.size()<<" inputs to tools"); + ATH_MSG_DEBUG("Found "<<toolInput.size()<<" inputs to tools"); // to TrigMufastHypoTool diff --git a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt index 9bd5d8cfc9fd..476be68e2511 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt +++ b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt @@ -96,6 +96,12 @@ atlas_add_test( muMenu PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_muMenu ) +file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_egammaMuMenu ) +atlas_add_test( egammaMuMenu + SCRIPT test/test_egamma_mu_menu.sh + PROPERTIES TIMEOUT 500 + PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_egammaMuMenu + ) file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_idCaloRunData ) atlas_add_test( idCaloRunData diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/HLTCFConfig.py b/Trigger/TrigValidation/TrigUpgradeTest/python/HLTCFConfig.py index afa268cc0848..73697b9f9584 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/HLTCFConfig.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/HLTCFConfig.py @@ -1,5 +1,5 @@ # Classes to configure the CF graph, via Nodes -from AthenaCommon.CFElements import parOR, seqAND +from AthenaCommon.CFElements import parOR, seqAND, seqOR from AthenaCommon.Logging import logging from AthenaCommon.AlgSequence import dumpSequence from TrigUpgradeTest.HLTCFDot import stepCF_DataFlow_to_dot, stepCF_ControlFlow_to_dot, all_DataFlow_to_dot @@ -16,9 +16,43 @@ def makeSummary(name, decisions): summary.InputDecision = "HLTChains" summary.FinalDecisions = decisions summary.HLTSummary = "MonitoringSummary"+name + from TrigOutputHandling.TrigOutputHandlingConf import HLTEDMCreator + edmCreator = HLTEDMCreator() + edmCreator.TrigCompositeContainer = decisions + summary.OutputTools = [ edmCreator ] return summary +def makeMonitor(name, decisions, EnabledChainNames): + from TrigSteerMonitor.TrigSteerMonitorConf import TrigSignatureMoniMT + mon = TrigSignatureMoniMT(name, OutputLevel = 2) + mon.FinalDecisions = decisions + mon.L1Decisions = "HLTChainsResult" # connection with L1Decoder + from TrigUpgradeTest.TestUtils import MenuTest + mon.ChainsList = EnabledChainNames + #[ x.split(":")[1] for x in MenuTest.CTPToChainMapping ] + print mon + return mon + +def makeStreamESD(name, decisions): + import AthenaPoolCnvSvc.WriteAthenaPool + from OutputStreamAthenaPool.OutputStreamAthenaPool import createOutputStream + StreamESD=createOutputStream(name,"myESD.pool.root",True) + StreamESD.OutputLevel=3 + from AthenaCommon.AlgSequence import AlgSequence + topSequence = AlgSequence() + topSequence.remove( StreamESD ) + def addTC(name): + StreamESD.ItemList += [ "xAOD::TrigCompositeContainer#"+name, "xAOD::TrigCompositeAuxContainer#"+name+"Aux." ] + + for tc in decisions: + #edmCreator.TrigCompositeContainer: + addTC( tc ) + + addTC("HLTSummary") + print "ESD file content " + print StreamESD.ItemList + return StreamESD def create_step_reco_node(name, seq_list, dump=False): """ elementary HLT reco step, contianing all sequences of the step """ @@ -90,6 +124,41 @@ def addChainToHypoAlg(hypoAlg, chain): ## CORE of Decision Handling ####################################### + + +def makeHLTTree(HLTChains): + """ creates the full HLT tree""" + +# TopHLTRootSeq = seqAND("TopHLTRoot") # Root + + #add the L1Upcacking +# TopHLTRootSeq += L1UnpackingSeq + + # add the HLT steps Node + steps = seqAND("HLTAllSteps") + # make CF tree + finalDecisions = decisionTree_From_Chains(steps, HLTChains) + EnabledChainNames = [c.name for c in HLTChains] +# TopHLTRootSeq += HLTAllStepsSeq + + ## from TrigOutputHandling.TrigOutputHandlingConf import HLTEDMCreator + ## edmCreator = HLTEDMCreator() + ## edmCreator.TrigCompositeContainer = finalDecisions + + summary = makeSummary("TriggerSummaryFinal", finalDecisions) + mon = makeMonitor("TriggerMonitorFinal", finalDecisions, EnabledChainNames) + StreamESD = makeStreamESD("StreamESD", finalDecisions) + + # main HLT top sequence + hltTop = seqOR( "hltTop", [ steps, mon, summary, StreamESD ] ) + + + from AthenaCommon.AlgSequence import AlgSequence + topSequence = AlgSequence() + topSequence += hltTop + + + def decisionTree_From_Chains(HLTNode, chains): """ creates the decision tree, given the starting node and the chains containing the sequences """ log.debug("Run decisionTree_From_Chains on %s", HLTNode.name()) @@ -106,7 +175,8 @@ def decisionTree_From_Chains(HLTNode, chains): from TrigUpgradeTest.MenuComponents import CFSequence, RoRSequenceFilterNode #loop over chains to configure count_steps=0 -# finalDecisions = [] # needed for monitor + finalDecisions = [] # needed for monitor + step_decisions = [] allSeq_list = [] for nstep in range(0, NSTEPS): stepCF_name = "Step%i"%(nstep+1) @@ -114,21 +184,20 @@ def decisionTree_From_Chains(HLTNode, chains): step_decisions = [] for chain in chains: if len(chain.steps) <= count_steps: + for seq in chain.steps[count_steps-1].sequences: + finalDecisions.extend(seq.outputs) continue chain_step=chain.steps[count_steps] - chain_step_name= "%s:%s"%(stepCF_name, chain.name) - log.debug("\n*******Filling step %s for chain %s", stepCF_name, chain.name) - - #sequenceHypoTools=chain_step.sequences + log.debug("\n*******Filling step %s for chain %s", stepCF_name, chain.name) hypotool=chain.hypoToolName countseq=0 + # loop over menuSequences of this step chain for sequence in chain_step.sequences: - cfseq_name= sequence.name log.debug("Going through sequence %s with threshold %s", sequence.name, hypotool) + #### define sequence input seeds= [recoSeq.seed for recoSeq in sequence.recoSeqList] - log.debug("Found these seeds form the sequence: %s", seeds) - #define sequence input + log.debug("Found these seeds from the sequence: %s", seeds) if count_steps == 0: # L1 seeding filter_input= seeds log.debug("Seeds from this chain: %s", filter_input) @@ -146,7 +215,7 @@ def decisionTree_From_Chains(HLTNode, chains): log.error("found %d filter inputs and %d seeds", len(filter_input), len(previous_seeds)) sys.exit("ERROR, in size") - + #### attach HypoTools hypoAlg= sequence.hypo hypoToolClassName= sequence.hypoToolClassName log.debug("Adding HypoTool::%s with name %s to %s", @@ -160,28 +229,31 @@ def decisionTree_From_Chains(HLTNode, chains): # if the previous hypo has more than one output, try to get all of them # one filter per previous sequence: 1 input/previous seq, 1 output/next seq filter_name="Filter%s_on_%s"%(stepCF_name,previous_sequence) - filter_already_exists=False - findFilter= [cfseq.filter for cfseq in CFseq_list if filter_name in cfseq.filter.algname] - if len(findFilter): + findFilter= [cfseq.filter for cfseq in CFseq_list if filter_name in cfseq.filter.algname] + n_filters = len(findFilter) + if n_filters == 1: log.debug("Filter %s already exists", filter_name) - filter_already_exists=True sfilter=findFilter[0] log.debug("Adding chain %s to %s", chain.name,sfilter.algname) sfilter.setChains(chain.name) log.debug(sfilter.getChains()) continue - else: + elif n_filters == 0: sfilter = RoRSequenceFilterNode(name=filter_name) log.debug("Adding these seeds to filter: %s", previous_seeds) for i in previous_seeds: sfilter.addSeed(i) for i in filter_input: sfilter.addInput(i) filter_out=["%s_from_%s_out"%(filter_name,i) for i in filter_input] for o in filter_out: sfilter.setOutput(o) - sfilter.setChains(chain.name) log.debug("Filter Done: %s", sfilter.name) + else: + log.error("found %d filters with name %s", n_filters, filter_name) + sys.exit("ERROR, in filter configuration") + + - # Connect the InputMaker + #### Connect the InputMaker #loop over RecoSequences of this sequence to add inputs to InputMaker and send decisions to HypoAlg for recoSeq in sequence.recoSeqList: seed=recoSeq.seed @@ -194,24 +266,26 @@ def decisionTree_From_Chains(HLTNode, chains): if len(input_maker_input) == 0: sys.exit("ERROR, no inputs to sequence are set!") for i in input_maker_input: recoSeq.addInput(i) - input_maker_output=["%s_from_%s_output"%(recoSeq.maker.algname,i) for i in input_maker_input ] + input_maker_output=["%s_from_%s"%(recoSeq.maker.algname,i) for i in input_maker_input ] if len(input_maker_output) == 0: - sys.exit("ERROR, no outputs to sequence are set!") + sys.exit("ERROR, no outputs to sequence are set!") + for out in input_maker_output: + recoSeq.maker.addOutput(out) + sequence.hypo.setPreviousDecision(out) + if log.isEnabledFor(logging.DEBUG): log.debug("connecting InputMaker to HypoAlg") log.debug("Adding %d output to InputMaker::%s and sending to HypoAlg::%s", len(input_maker_output), recoSeq.maker.algname, sequence.hypo.algname) for i in input_maker_output: log.debug(i) - for out in input_maker_output: - recoSeq.addOutputDecision(out) - sequence.hypo.setPreviousDecision(out) + #needed for the summary step_decisions.extend(sequence.outputs) - CF_seq = CFSequence( cfseq_name, FilterAlg=sfilter, MenuSequence=sequence) + CF_seq = CFSequence( sequence.name, FilterAlg=sfilter, MenuSequence=sequence) log.debug(CF_seq) CFseq_list.append(CF_seq) countseq+=1 @@ -233,9 +307,11 @@ def decisionTree_From_Chains(HLTNode, chains): # then the monitor summary summary=makeSummary("TriggerSummary"+ stepCF_name, step_decisions) HLTNode += summary + + # update final decisions -# finalDecisions=step_decisions + log.debug("Now Draw...") stepCF_DataFlow_to_dot("%s_%s"%(HLTNodeName,stepCF_name), CFseq_list) @@ -247,8 +323,10 @@ def decisionTree_From_Chains(HLTNode, chains): - # summary=makeSummary("TriggerSummaryFinal", finalDecisions) - # HLTNode += summary + # dumpSequence (HLTNode, indent=0) + finalDecisions.extend(step_decisions) + print "finalDecisions" + print finalDecisions all_DataFlow_to_dot(HLTNodeName, allSeq_list) - return + return finalDecisions diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/HLTSignatureConfig.py b/Trigger/TrigValidation/TrigUpgradeTest/python/HLTSignatureConfig.py index 7ae8c2d975c8..7cce59806681 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/HLTSignatureConfig.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/HLTSignatureConfig.py @@ -50,7 +50,7 @@ def MuStep2HypoTool(): muIM= InputMakerAlg(name="Step1MuInputMaker") muIM.Output='muIM_out' -print "CACCA" + print muIM muAlg = muMSRecAlg(name="muMSRecAlg", FileName="msmu.dat") muAlg.Output='muAlg_out' diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/MenuComponents.py b/Trigger/TrigValidation/TrigUpgradeTest/python/MenuComponents.py index 9508dd71f679..6084e5363c76 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/MenuComponents.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/MenuComponents.py @@ -42,7 +42,7 @@ class AlgNode(Node): def addDefaultOutput(self): if self.outputProp is not '': - self.setOutput(("%s_%s_out"%(self.algname,self.outputProp))) + self.setOutput(("%s_%s"%(self.algname,self.outputProp))) def setPar(self, prop, name): cval = self.Alg.getProperties()[prop] @@ -285,9 +285,8 @@ class HLTRecoSequence(): print "Making sequence %s"%(name) self.name = name self.seed = Seed - self.sequence = Node( Alg=Sequence, inputProp='%s_in'%(Sequence.name()), outputProp='%s_out'%(Sequence.name())) - self.maker = InputMakerNode( Alg=Maker) - #self.maker = AlgNode( Alg=Maker, inputProp='InputMakerInputDecisions', outputProp='InputMakerOutputDecisions') + self.sequence = Node( Alg=Sequence, inputProp='%s_in'%(Sequence.name()), outputProp='%s_out'%(Sequence.name())) + self.maker = InputMakerNode( Alg=Maker) self.reuse = False def getOutputList(self): @@ -300,9 +299,9 @@ class HLTRecoSequence(): print "adding input to sequence: %s to %s"%(theinput, self.maker.algname ) self.maker.addInput(theinput) - def addOutputDecision(self,theinput): - print "adding output decisions (%s) to sequence %s (output of alg %s)"%(theinput, self.name, self.maker.algname ) - self.maker.addOutput(theinput) + # def addOutputDecision(self,theinput): + # print "adding output decisions (%s) to sequence %s (output of alg %s)"%(theinput, self.name, self.maker.algname ) + # self.maker.addOutput(theinput) def __str__(self): return "HLTRecoSequence::%s with \n Seed::%s \n Maker::%s \n Sequence::%s"%(self.name, self.seed, self.maker, self.sequence) @@ -350,13 +349,7 @@ class CFSequence(): self.filter, \ self.menuSeq) - -class SequenceHypoTool: - def __init__(self, MenuSequence, HypoTool): - self.sequence = MenuSequence - self.hypotool = HypoTool - class ChainStep: def __init__(self, name, Sequences=[]): self.name = name diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/egammaMenuDefs.py b/Trigger/TrigValidation/TrigUpgradeTest/python/egammaMenuDefs.py new file mode 100644 index 000000000000..683b51b77593 --- /dev/null +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/egammaMenuDefs.py @@ -0,0 +1,173 @@ +# +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# + +#include("TrigUpgradeTest/testHLT_MT.py") +## # provide a minimal menu information +## if globalflags.InputFormat.is_bytestream(): +## topSequence.L1DecoderTest.ctpUnpacker.OutputLevel=DEBUG +## topSequence.L1DecoderTest.roiUnpackers[0].OutputLevel=DEBUG + +from AthenaCommon.Include import include +from AthenaCommon.Constants import VERBOSE,DEBUG +from AthenaCommon.AppMgr import ServiceMgr as svcMgr +import AthenaCommon.CfgMgr as CfgMgr + + +#workaround to prevent online trigger folders to be enabled +from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags +InDetTrigFlags.useConditionsClasses.set_Value_and_Lock(False) + + +from InDetRecExample.InDetJobProperties import InDetFlags +InDetFlags.doCaloSeededBrem = False +InDetFlags.InDet25nsec = True +InDetFlags.doPrimaryVertex3DFinding = False +InDetFlags.doPrintConfigurables = False +InDetFlags.doResolveBackTracks = True +InDetFlags.doSiSPSeededTrackFinder = True +InDetFlags.doTRTPhaseCalculation = True +InDetFlags.doTRTSeededTrackFinder = True +InDetFlags.doTruth = False +InDetFlags.init() + +# PixelLorentzAngleSvc and SCTLorentzAngleSvc +include("InDetRecExample/InDetRecConditionsAccess.py") +from InDetRecExample.InDetKeys import InDetKeys + +# menu components +from TrigUpgradeTest.MenuComponents import HLTRecoSequence, MenuSequence + +# =============================================================================================== +# L2 Calo +# =============================================================================================== + +from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import T2CaloEgamma_FastAlgo +theFastCaloAlgo=T2CaloEgamma_FastAlgo("FastCaloAlgo" ) +theFastCaloAlgo.OutputLevel=VERBOSE +theFastCaloAlgo.ClustersName="L2CaloClusters" +svcMgr.ToolSvc.TrigDataAccess.ApplyOffsetCorrection=False + + +from TrigMultiVarHypo.TrigL2CaloRingerFexMTInit import init_ringer +trigL2CaloRingerFexMT = init_ringer() +trigL2CaloRingerFexMT.OutputLevel = DEBUG + + + +from AthenaCommon.CFElements import parOR, seqOR, seqAND, stepSeq +from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm + +fastCaloInViewAlgs = seqAND("fastCaloInViewAlgs", [theFastCaloAlgo, trigL2CaloRingerFexMT]) + + + +fastCaloViewsMaker = EventViewCreatorAlgorithm("fastCaloViewsMaker", OutputLevel=DEBUG) +fastCaloViewsMaker.ViewFallThrough = True +fastCaloViewsMaker.RoIsLink = "initialRoI" # -||- +fastCaloViewsMaker.InViewRoIs = "EMCaloRoIs" # contract with the fastCalo +fastCaloViewsMaker.Views = "EMCaloViews" +fastCaloViewsMaker.ViewNodeName = "fastCaloInViewAlgs" +theFastCaloAlgo.RoIs = fastCaloViewsMaker.InViewRoIs + +# are these needed? +CaloViewVerify = CfgMgr.AthViews__ViewDataVerifier("FastCaloViewDataVerifier") +CaloViewVerify.DataObjects = [('TrigRoiDescriptorCollection' , 'StoreGateSvc+fastCaloViewsMaker_InViewRoIs_out')] + + +from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2CaloHypoAlgMT +theFastCaloHypo = TrigL2CaloHypoAlgMT("L2CaloHypo") +theFastCaloHypo.OutputLevel = DEBUG +theFastCaloHypo.CaloClusters = theFastCaloAlgo.ClustersName + + +fastCaloSequence = seqAND("fastCaloSequence",[fastCaloViewsMaker, fastCaloInViewAlgs ]) + +fastCalo_HLTSequence = HLTRecoSequence("fastCalo_HLTSequence", + Sequence=fastCaloSequence, + Maker=fastCaloViewsMaker, + Seed="L1EM") + +fastCaloSequence = MenuSequence("egammaCaloStep", + recoSeqList=[fastCalo_HLTSequence], + Hypo=theFastCaloHypo, + HypoToolClassName="TrigL2CaloHypoToolConf") + +######################################### +# second step: tracking..... +######################################### +# + + +from TrigUpgradeTest.InDetSetup import makeInDetAlgs + +(viewAlgs, eventAlgs) = makeInDetAlgs() +from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_eGamma + +theFTF = TrigFastTrackFinder_eGamma() +theFTF.isRoI_Seeded = True +viewAlgs.append(theFTF) + + +# A simple algorithm to confirm that data has been inherited from parent view +# Required to satisfy data dependencies +ViewVerify = CfgMgr.AthViews__ViewDataVerifier("electronViewDataVerifier") +ViewVerify.DataObjects = [('xAOD::TrigEMClusterContainer','StoreGateSvc+L2CaloClusters')] +ViewVerify.OutputLevel = DEBUG +viewAlgs.append(ViewVerify) + +TrackParticlesName = "" +for viewAlg in viewAlgs: + if viewAlg.name() == "InDetTrigTrackParticleCreatorAlg": + TrackParticlesName = viewAlg.TrackParticlesName + + +from TrigEgammaHypo.TrigL2ElectronFexMTConfig import L2ElectronFex_1 +theElectronFex= L2ElectronFex_1() +theElectronFex.TrigEMClusterName = theFastCaloAlgo.ClustersName +theElectronFex.TrackParticlesName = TrackParticlesName +theElectronFex.ElectronsName="Electrons" +theElectronFex.OutputLevel=VERBOSE + + +l2ElectronViewsMaker = EventViewCreatorAlgorithm("l2ElectronViewsMaker", OutputLevel=DEBUG) +l2ElectronViewsMaker.RoIsLink = "roi" # -||- +l2ElectronViewsMaker.InViewRoIs = "EMIDRoIs" # contract with the fastCalo +l2ElectronViewsMaker.Views = "EMElectronViews" +l2ElectronViewsMaker.ViewFallThrough = True + + +for viewAlg in viewAlgs: + if viewAlg.properties().has_key("RoIs"): + viewAlg.RoIs = l2ElectronViewsMaker.InViewRoIs + if viewAlg.properties().has_key("roiCollectionName"): + viewAlg.roiCollectionName = l2ElectronViewsMaker.InViewRoIs +theElectronFex.RoIs = l2ElectronViewsMaker.InViewRoIs + +electronInViewAlgs = parOR("electronInViewAlgs", viewAlgs + [ theElectronFex ]) + +l2ElectronViewsMaker.ViewNodeName = "electronInViewAlgs" + + +from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2ElectronHypoAlgMT +theElectronHypo = TrigL2ElectronHypoAlgMT() +theElectronHypo.Electrons = theElectronFex.ElectronsName +theElectronHypo.RunInView=True +theElectronHypo.OutputLevel = VERBOSE + +# this needs to be added: +#electronDecisionsDumper = DumpDecisions("electronDecisionsDumper", OutputLevel=DEBUG, Decisions = theElectronHypo.Output ) + +electronSequence = seqAND("electronSequence", eventAlgs + [l2ElectronViewsMaker, electronInViewAlgs ] ) + +electron_HLTSequence = HLTRecoSequence("electron_HLTSequence", + Maker=l2ElectronViewsMaker, + Sequence=electronSequence, + Seed="L1EM") + + +electronSequence = MenuSequence("electronStep", + recoSeqList=[electron_HLTSequence], + Hypo=theElectronHypo, + HypoToolClassName="TrigL2ElectronHypoToolConf") + diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py b/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py new file mode 100644 index 000000000000..b1be97b846d7 --- /dev/null +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py @@ -0,0 +1,539 @@ +# +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# +# OutputLevel: INFO < DEBUG < VERBOSE +# + +from AthenaCommon.Include import include +from AthenaCommon.Constants import VERBOSE,DEBUG, INFO +from AthenaCommon.AppMgr import ServiceMgr +from AthenaCommon.AppMgr import ToolSvc +import AthenaCommon.CfgMgr as CfgMgr + +### workaround to prevent online trigger folders to be enabled ### +from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags +InDetTrigFlags.useConditionsClasses.set_Value_and_Lock(False) + +from InDetRecExample.InDetJobProperties import InDetFlags +InDetFlags.doCaloSeededBrem = False + +from InDetRecExample.InDetJobProperties import InDetFlags +InDetFlags.InDet25nsec = True +InDetFlags.doPrimaryVertex3DFinding = False +InDetFlags.doPrintConfigurables = False +InDetFlags.doResolveBackTracks = True +InDetFlags.doSiSPSeededTrackFinder = True +InDetFlags.doTRTPhaseCalculation = True +InDetFlags.doTRTSeededTrackFinder = True +InDetFlags.doTruth = False +InDetFlags.init() + +### PixelLorentzAngleSvc and SCTLorentzAngleSvc ### +include("InDetRecExample/InDetRecConditionsAccess.py") + +from InDetRecExample.InDetKeys import InDetKeys +from TriggerJobOpts.TriggerFlags import TriggerFlags +from MuonRecExample.MuonRecFlags import muonRecFlags + + +# menu components +from TrigUpgradeTest.MenuComponents import HLTRecoSequence, MenuSequence + +### for Control Flow ### +from AthenaCommon.CFElements import parOR, seqAND, seqOR, stepSeq + + +doL2SA=True +doL2CB=False +doEFSA=False +TriggerFlags.doID=False + +# =============================================================================================== +# Setup PrepData +# =============================================================================================== + +### Used the algorithms as Step2 "muComb step" ### +if TriggerFlags.doID: + + from TrigUpgradeTest.InDetSetup import makeInDetAlgs + + (viewAlgs, eventAlgs) = makeInDetAlgs() + + from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_Muon + theFTF = TrigFastTrackFinder_Muon() + theFTF.OutputLevel = DEBUG + theFTF.TracksName = "TrigFastTrackFinder_MuTracks" + theFTF.isRoI_Seeded = True + viewAlgs.append(theFTF) + + ### A simple algorithm to confirm that data has been inherited from parent view ### + ### Required to satisfy data dependencies ### + ViewVerify = CfgMgr.AthViews__ViewDataVerifier("muFastViewDataVerifier") + ViewVerify.DataObjects = [('xAOD::L2StandAloneMuonContainer','StoreGateSvc+MuonL2SAInfo')] + viewAlgs.append(ViewVerify) + + + +### Used the algorithms as Step1 "muFast step" ### +if TriggerFlags.doMuon: + ### Load data from Muon detectors ### + import MuonRecExample.MuonRecStandaloneOnlySetup + from MuonCombinedRecExample.MuonCombinedRecFlags import muonCombinedRecFlags + muonRecFlags.doTrackPerformance = True + muonRecFlags.TrackPerfSummaryLevel = 2 + muonRecFlags.TrackPerfDebugLevel = 5 + muonRecFlags.doCSCs = True + muonRecFlags.doNSWNewThirdChain = False + muonCombinedRecFlags.doCaloTrkMuId = False + muonCombinedRecFlags.printSummary = False + from RecExConfig.RecFlags import rec + from AthenaCommon.AlgSequence import AthSequencer + from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm + + if doL2SA: + l2MuViewNode = seqAND("l2MuViewNode") + l2MuViewsMaker = EventViewCreatorAlgorithm("l2MuViewsMaker", OutputLevel=DEBUG) + l2MuViewsMaker.ViewFallThrough = True + l2MuViewsMaker.RoIsLink = "initialRoI" # -||- + l2MuViewsMaker.InViewRoIs = "MURoIs" # contract with the consumer + l2MuViewsMaker.Views = "MUViewRoIs" + l2MuViewsMaker.ViewNodeName = l2MuViewNode.name() + + if doEFSA: + efMuViewNode = AthSequencer("efMuViewNode", Sequential=False, ModeOR=False, StopOverride=False) + efMuViewsMaker = EventViewCreatorAlgorithm("efMuViewsMaker", OutputLevel=DEBUG) + efMuViewsMaker.ViewFallThrough = True + + efMuViewsMaker.InputMakerInputDecisions = ["MURoIDecisions"] + efMuViewsMaker.InputMakerOutputDecisions = ["MURoIDecisionsOutputEF"] + efMuViewsMaker.RoIsLink = "initialRoI" # -||- + efMuViewsMaker.InViewRoIs = "MURoIs" # contract with the consumer + efMuViewsMaker.Views = "EFMUViewRoIs" + efMuViewsMaker.ViewNodeName = efMuViewNode.name() + + if doEFSA or doL2SA: + ### ==================== Data prepartion needed for the EF and L2 SA #######################333 + ### CSC RDO data ### + if muonRecFlags.doCSCs(): + from MuonCSC_CnvTools.MuonCSC_CnvToolsConf import Muon__CscROD_Decoder + CSCRodDecoder = Muon__CscROD_Decoder(name = "CSCRodDecoder", + IsCosmics = False, + IsOldCosmics = False, + OutputLevel = INFO ) + ToolSvc += CSCRodDecoder + + from MuonCSC_CnvTools.MuonCSC_CnvToolsConf import Muon__CSC_RawDataProviderTool + MuonCscRawDataProviderTool = Muon__CSC_RawDataProviderTool(name = "MuonCscRawDataProviderTool", + Decoder = ToolSvc.CSCRodDecoder, + OutputLevel = INFO ) + ToolSvc += MuonCscRawDataProviderTool + + from MuonCSC_CnvTools.MuonCSC_CnvToolsConf import Muon__CscRdoToCscPrepDataTool + CscRdoToCscPrepDataTool = Muon__CscRdoToCscPrepDataTool(name = "CscRdoToPrepDataTool", + OutputLevel = INFO, + RawDataProviderTool = MuonCscRawDataProviderTool, + useBStoRdoTool = True) + ToolSvc += CscRdoToCscPrepDataTool + + from MuonRdoToPrepData.MuonRdoToPrepDataConf import CscRdoToCscPrepData + CscRdoToCscPrepData = CscRdoToCscPrepData(name = "CscRdoToCscPrepDataProvider", + CscRdoToCscPrepDataTool = CscRdoToCscPrepDataTool, + PrintPrepData = False, + OutputLevel = INFO) + CscRdoToCscPrepData.DoSeededDecoding = True + CscRdoToCscPrepData.RoIs = "MURoIs" + + from MuonByteStream.MuonByteStreamConf import Muon__CscRawDataProvider + CscRawDataProvider = Muon__CscRawDataProvider(name = "CscRawDataProvider", + ProviderTool = MuonCscRawDataProviderTool, + OutputLevel = INFO) + + from CscClusterization.CscClusterizationConf import CscThresholdClusterBuilderTool + CscClusterBuilderTool = CscThresholdClusterBuilderTool(name = "CscThesholdClusterBuilderTool", + OutputLevel = INFO) + ToolSvc += CscClusterBuilderTool + + #CSC cluster building + from CscClusterization.CscClusterizationConf import CscThresholdClusterBuilder + CscClusterBuilder = CscThresholdClusterBuilder(name = "CscThesholdClusterBuilder", + OutputLevel = INFO, + cluster_builder = CscClusterBuilderTool) + + if doEFSA: + efMuViewNode += CscRdoToCscPrepData + efMuViewNode += CscClusterBuilder + if doL2SA: + l2MuViewNode += CscRawDataProvider + + ### MDT RDO data ### + if muonRecFlags.doMDTs(): + from MuonMDT_CnvTools.MuonMDT_CnvToolsConf import MdtROD_Decoder + MDTRodDecoder = MdtROD_Decoder(name = "MDTRodDecoder", + OutputLevel = INFO ) + ToolSvc += MDTRodDecoder + + from MuonMDT_CnvTools.MuonMDT_CnvToolsConf import Muon__MDT_RawDataProviderTool + MuonMdtRawDataProviderTool = Muon__MDT_RawDataProviderTool(name = "MuonMdtRawDataProviderTool", + Decoder = ToolSvc.MDTRodDecoder, + OutputLevel = INFO ) + ToolSvc += MuonMdtRawDataProviderTool + + from MuonMDT_CnvTools.MuonMDT_CnvToolsConf import Muon__MdtRdoToPrepDataTool + MdtRdoToMdtPrepDataTool = Muon__MdtRdoToPrepDataTool(name = "MdtRdoToPrepDataTool", + OutputLevel = INFO, + RawDataProviderTool = MuonMdtRawDataProviderTool, + useBStoRdoTool = True) + ToolSvc += MdtRdoToMdtPrepDataTool + + from MuonRdoToPrepData.MuonRdoToPrepDataConf import MdtRdoToMdtPrepData + MdtRdoToMdtPrepData = MdtRdoToMdtPrepData(name = "MdtRdoToMdtPrepDataProvider", + DecodingTool = MdtRdoToMdtPrepDataTool, + PrintPrepData = False, + OutputLevel = INFO) + MdtRdoToMdtPrepData.DoSeededDecoding = True + MdtRdoToMdtPrepData.RoIs = "MURoIs" + + from MuonByteStream.MuonByteStreamConf import Muon__MdtRawDataProvider + MdtRawDataProvider = Muon__MdtRawDataProvider(name = "MdtRawDataProvider", + ProviderTool = MuonMdtRawDataProviderTool, + OutputLevel = INFO) + if doEFSA: + efMuViewNode += MdtRdoToMdtPrepData + if doL2SA: + l2MuViewNode += MdtRawDataProvider + + ### RPC RDO data ### + if muonRecFlags.doRPCs(): + from MuonRPC_CnvTools.MuonRPC_CnvToolsConf import Muon__RpcROD_Decoder + RPCRodDecoder = Muon__RpcROD_Decoder(name = "RPCRodDecoder", + OutputLevel = INFO ) + ToolSvc += RPCRodDecoder + + from MuonRPC_CnvTools.MuonRPC_CnvToolsConf import Muon__RPC_RawDataProviderTool + MuonRpcRawDataProviderTool = Muon__RPC_RawDataProviderTool(name = "MuonRpcRawDataProviderTool", + Decoder = RPCRodDecoder ) + ToolSvc += MuonRpcRawDataProviderTool + + from MuonRPC_CnvTools.MuonRPC_CnvToolsConf import Muon__RpcRdoToPrepDataTool + RpcRdoToRpcPrepDataTool = Muon__RpcRdoToPrepDataTool(name = "RpcRdoToPrepDataTool", + OutputLevel = INFO, + RawDataProviderTool = MuonRpcRawDataProviderTool, + useBStoRdoTool = True) + ToolSvc += RpcRdoToRpcPrepDataTool + + from MuonRdoToPrepData.MuonRdoToPrepDataConf import RpcRdoToRpcPrepData + RpcRdoToRpcPrepData = RpcRdoToRpcPrepData(name = "RpcRdoToRpcPrepDataProvider", + DecodingTool = RpcRdoToRpcPrepDataTool, + PrintPrepData = False, + OutputLevel = INFO) + RpcRdoToRpcPrepData.DoSeededDecoding = True + RpcRdoToRpcPrepData.RoIs = "MURoIs" + + from MuonByteStream.MuonByteStreamConf import Muon__RpcRawDataProvider + RpcRawDataProvider = Muon__RpcRawDataProvider(name = "RpcRawDataProvider", + ProviderTool = MuonRpcRawDataProviderTool, + OutputLevel = INFO) + if doEFSA: + efMuViewNode += RpcRdoToRpcPrepData + if doL2SA: + l2MuViewNode += RpcRawDataProvider + + ### TGC RDO data ### + if muonRecFlags.doTGCs(): + from MuonTGC_CnvTools.MuonTGC_CnvToolsConf import Muon__TGC_RodDecoderReadout + TGCRodDecoder = Muon__TGC_RodDecoderReadout(name = "TGCRodDecoder", + OutputLevel = INFO ) + ToolSvc += TGCRodDecoder + + from MuonTGC_CnvTools.MuonTGC_CnvToolsConf import Muon__TGC_RawDataProviderTool + MuonTgcRawDataProviderTool = Muon__TGC_RawDataProviderTool(name = "MuonTgcRawDataProviderTool", + Decoder = TGCRodDecoder ) + ToolSvc += MuonTgcRawDataProviderTool + + from MuonTGC_CnvTools.MuonTGC_CnvToolsConf import Muon__TgcRdoToPrepDataTool + TgcRdoToTgcPrepDataTool = Muon__TgcRdoToPrepDataTool(name = "TgcRdoToPrepDataTool", + OutputLevel = INFO, + RawDataProviderTool = MuonTgcRawDataProviderTool, + useBStoRdoTool = True) + + ToolSvc += TgcRdoToTgcPrepDataTool + + from MuonRdoToPrepData.MuonRdoToPrepDataConf import TgcRdoToTgcPrepData + TgcRdoToTgcPrepData = TgcRdoToTgcPrepData(name = "TgcRdoToTgcPrepDataProvider", + DecodingTool = TgcRdoToTgcPrepDataTool, + PrintPrepData = False, + OutputLevel = INFO) + TgcRdoToTgcPrepData.DoSeededDecoding = True + TgcRdoToTgcPrepData.RoIs = "MURoIs" + + + from MuonByteStream.MuonByteStreamConf import Muon__TgcRawDataProvider + TgcRawDataProvider = Muon__TgcRawDataProvider(name = "TgcRawDataProvider", + ProviderTool = MuonTgcRawDataProviderTool, + OutputLevel = INFO) + if doEFSA: + efMuViewNode += TgcRdoToTgcPrepData + if doL2SA: + l2MuViewNode += TgcRawDataProvider + + + #Run clustering + if muonRecFlags.doCreateClusters(): + from MuonClusterization.MuonClusterizationConf import MuonClusterizationTool + MuonClusterTool = MuonClusterizationTool(name = "MuonClusterizationTool", + OutputLevel = INFO) + ToolSvc += MuonClusterTool + + from MuonClusterization.MuonClusterizationConf import MuonClusterizationAlg + MuonClusterAlg = MuonClusterizationAlg(name = "MuonClusterizationAlg", + OutputLevel = INFO, + ClusterTool = MuonClusterTool, + TgcPrepDataContainer = "TGC_MeasurementsAllBCs") + + if doEFSA: + efMuViewNode += MuonClusterAlg + + + ### muon thresholds ### + testChains = ["HLT_mu6", "HLT_2mu6"] + + ### set up L1RoIsFilter ### + from DecisionHandling.DecisionHandlingConf import RoRSeqFilter, DumpDecisions + filterL1RoIsAlg = RoRSeqFilter("filterL1RoIsAlg") + filterL1RoIsAlg.Input = ["MURoIDecisions"] + filterL1RoIsAlg.Output = ["FilteredMURoIDecisions"] + filterL1RoIsAlg.Chains = testChains + filterL1RoIsAlg.OutputLevel = DEBUG + + +# =============================================================================================== +# Setup L2MuonSA +# =============================================================================================== + + if doL2SA: + ### set up MuFastSteering ### + from TrigL2MuonSA.TrigL2MuonSAConfig import TrigL2MuonSAMTConfig + muFastAlg = TrigL2MuonSAMTConfig("Muon") + muFastAlg.OutputLevel = DEBUG + + ServiceMgr.ToolSvc.TrigDataAccess.ApplyOffsetCorrection = False + + l2MuViewNode += muFastAlg + + muFastAlg.MuRoIs = l2MuViewsMaker.InViewRoIs + muFastAlg.RecMuonRoI = "RecMURoIs" + muFastAlg.MuonL2SAInfo = "MuonL2SAInfo" + muFastAlg.MuonCalibrationStream = "MuonCalibrationStream" + muFastAlg.forID = "forID" + muFastAlg.forMS = "forMS" + + # set up MuFastHypo + from TrigMuonHypo.TrigMuonHypoConf import TrigMufastHypoAlg + trigMufastHypo = TrigMufastHypoAlg("L2MufastHypoAlg") + trigMufastHypo.OutputLevel = DEBUG + trigMufastHypo.MuonL2SAInfoFromMuFastAlg = muFastAlg.MuonL2SAInfo + l2muFastSequence = seqAND("l2muFastSequence", [ l2MuViewsMaker, l2MuViewNode ]) + + l2muFast_HLTSequence = HLTRecoSequence("l2muFast_HLTSequence", + Sequence=l2muFastSequence, + Maker=l2MuViewsMaker, + Seed="L1MU") + + muFastStep = MenuSequence("muFastStep", + recoSeqList=[l2muFast_HLTSequence], + Hypo=trigMufastHypo, + HypoToolClassName="TrigMufastHypoToolConf") + + +# =============================================================================================== +# Setup muComb +# =============================================================================================== + + if doL2CB: + ### RoRSeqFilter step2 ### + filterL2SAAlg = RoRSeqFilter("filterL2SAAlg") + filterL2SAAlg.Input = [trigMufastHypo.Decisions] + filterL2SAAlg.Output = ["Filtered"+trigMufastHypo.Decisions] + filterL2SAAlg.Chains = testChains + filterL2SAAlg.OutputLevel = DEBUG + + l2muCombViewNode = AthSequencer("l2muCombViewNode", Sequential=False, ModeOR=False, StopOverride=False) + l2muCombViewsMaker = EventViewCreatorAlgorithm("l2muCombViewsMaker", OutputLevel=DEBUG) + l2muCombViewsMaker.ViewFallThrough = True + + l2muCombViewsMaker.InputMakerInputDecisions = [ filterL2SAAlg.Output[0] ] # Output of TrigMufastHypo + l2muCombViewsMaker.InputMakerOutputDecisions = [ filterL2SAAlg.Output[0]+"Comb" ] # Output of TrigMufastHypo + l2muCombViewsMaker.RoIsLink = "roi" # -||- + l2muCombViewsMaker.InViewRoIs = "MUTrkRoIs" # contract with the consumer + l2muCombViewsMaker.Views = "MUTrkViewRoIs" + l2muCombViewsMaker.ViewNodeName = l2muCombViewNode.name() + + ### Define input data of Inner Detector algorithms ### + ### and Define EventViewNodes to run the algprithms ### + TrackParticlesName = "" + for viewAlg in viewAlgs: + l2muCombViewNode += viewAlg + if viewAlg.properties().has_key("RoIs"): + viewAlg.RoIs = l2muCombViewsMaker.InViewRoIs + if viewAlg.properties().has_key("roiCollectionName"): + viewAlg.roiCollectionName = l2muCombViewsMaker.InViewRoIs + if viewAlg.name() == "InDetTrigTrackParticleCreatorAlg": + TrackParticlesName = viewAlg.TrackParticlesName + viewAlg.TrackName = theFTF.TracksName + + ### please read out TrigmuCombMTConfig file ### + ### and set up to run muCombMT algorithm ### + from TrigmuComb.TrigmuCombMTConfig import TrigmuCombMTConfig + muCombAlg = TrigmuCombMTConfig("Muon", theFTF.getName()) + muCombAlg.OutputLevel = DEBUG + muCombAlg.L2StandAloneMuonContainerName = muFastAlg.MuonL2SAInfo + muCombAlg.TrackParticlesContainerName = TrackParticlesName + muCombAlg.L2CombinedMuonContainerName = "MuonL2CBInfo" + + l2muCombViewNode += muCombAlg + + ### set up muCombHypo algorithm ### + from TrigMuonHypo.TrigMuonHypoConfig import TrigmuCombHypoConfig + trigmuCombHypo = TrigmuCombHypoConfig("L2muCombHypoAlg") + trigmuCombHypo.OutputLevel = DEBUG + + trigmuCombHypo.Decisions = "MuonL2CBDecisions" + trigmuCombHypo.L2MuonFastDecisions = trigMufastHypo.Decisions + trigmuCombHypo.ViewRoIs = l2muCombViewsMaker.Views + trigmuCombHypo.MuonL2CBInfoFromMuCombAlg = muCombAlg.L2CombinedMuonContainerName + + trigmuCombHypo.HypoTools = [ trigmuCombHypo.TrigmuCombHypoToolFromName( "L2muCombHypoTool", c ) for c in testChains ] + + muCombDecisionsDumper = DumpDecisions("muCombDecisionsDumper", OutputLevel=DEBUG, Decisions = trigmuCombHypo.Decisions ) + + ### Define a Sequence to run for muComb ### + l2muCombSequence = seqAND("l2muCombSequence", eventAlgs + [l2muCombViewsMaker, l2muCombViewNode, trigmuCombHypo ] ) + muCombStep = stepSeq("muCombStep", filterL2SAAlg, [ l2muCombSequence, muCombDecisionsDumper ] ) + + +# =============================================================================================== +# Setup EFMuonSA +# =============================================================================================== + + if doEFSA: + ### RoRSeqFilter step2 ### + filterEFSAAlg = RoRSeqFilter("filterEFSAAlg") + filterEFSAAlg.Input = [trigmuCombHypo.Decisions] + filterEFSAAlg.Output = ["Filtered"+trigmuCombHypo.Decisions] + filterEFSAAlg.Chains = testChains + filterEFSAAlg.OutputLevel = DEBUG + + from TrkDetDescrSvc.TrkDetDescrSvcConf import Trk__TrackingVolumesSvc + ServiceMgr += Trk__TrackingVolumesSvc("TrackingVolumesSvc",BuildVolumesFromTagInfo = False) + + theSegmentFinder = CfgGetter.getPublicToolClone("MuonSegmentFinder","MooSegmentFinder") + theSegmentFinder.DoSummary=True + CfgGetter.getPublicTool("MuonLayerHoughTool").DoTruth=False + theSegmentFinderAlg=CfgMgr.MooSegmentFinderAlg( "MuonSegmentMaker", + SegmentFinder=theSegmentFinder, + MuonSegmentOutputLocation = "MooreSegments", + UseCSC = muonRecFlags.doCSCs(), + UseMDT = muonRecFlags.doMDTs(), + UseRPC = muonRecFlags.doRPCs(), + UseTGC = muonRecFlags.doTGCs(), + doClusterTruth=False, + UseTGCPriorBC = False, + UseTGCNextBC = False, + doTGCClust = muonRecFlags.doTGCClusterSegmentFinding(), + doRPCClust = muonRecFlags.doRPCClusterSegmentFinding(), OutputLevel=DEBUG ) + + + + theNCBSegmentFinderAlg=CfgMgr.MooSegmentFinderAlg( "MuonSegmentMaker_NCB", + SegmentFinder = getPublicToolClone("MooSegmentFinder_NCB","MuonSegmentFinder", + DoSummary=False, + Csc2dSegmentMaker = getPublicToolClone("Csc2dSegmentMaker_NCB","Csc2dSegmentMaker", + segmentTool = getPublicToolClone("CscSegmentUtilTool_NCB", + "CscSegmentUtilTool", + TightenChi2 = False, + IPconstraint=False)), + Csc4dSegmentMaker = getPublicToolClone("Csc4dSegmentMaker_NCB","Csc4dSegmentMaker", + segmentTool = getPublicTool("CscSegmentUtilTool_NCB")), + DoMdtSegments=False,DoSegmentCombinations=False,DoSegmentCombinationCleaning=False), + MuonPatternCombinationLocation = "NCB_MuonHoughPatternCombinations", + MuonSegmentOutputLocation = "NCB_MuonSegments", + MuonSegmentCombinationOutputLocation = "NCB_MooreSegmentCombinations", + UseCSC = muonRecFlags.doCSCs(), + UseMDT = False, + UseRPC = False, + UseTGC = False, + UseTGCPriorBC = False, + UseTGCNextBC = False, + doTGCClust = False, + doRPCClust = False) + + from MuonRecExample.MuonStandalone import MuonTrackSteering + MuonTrackSteering.DoSummary=True + MuonTrackSteering.DoSummary=DEBUG + TrackBuilder = CfgMgr.MuPatTrackBuilder("MuPatTrackBuilder" ) + TrackBuilder.TrackSteering=CfgGetter.getPublicToolClone("MuonTrackSteering", "MuonTrackSteering") + + from AthenaCommon.Include import include + include("InDetBeamSpotService/BeamCondSvc.py" ) + from xAODTrackingCnv.xAODTrackingCnvConf import xAODMaker__TrackParticleCnvAlg, xAODMaker__TrackCollectionCnvTool, xAODMaker__RecTrackParticleContainerCnvTool + + muonParticleCreatorTool = getPublicTool("MuonParticleCreatorTool") + + muonTrackCollectionCnvTool = xAODMaker__TrackCollectionCnvTool( name = "MuonTrackCollectionCnvTool", TrackParticleCreator = muonParticleCreatorTool ) + + muonRecTrackParticleContainerCnvTool = xAODMaker__RecTrackParticleContainerCnvTool(name = "MuonRecTrackParticleContainerCnvTool", TrackParticleCreator = muonParticleCreatorTool ) + + xAODTrackParticleCnvAlg = xAODMaker__TrackParticleCnvAlg( name = "MuonStandaloneTrackParticleCnvAlg", + TrackParticleCreator = muonParticleCreatorTool, + TrackCollectionCnvTool=muonTrackCollectionCnvTool, + RecTrackParticleContainerCnvTool = muonRecTrackParticleContainerCnvTool, + TrackContainerName = "MuonSpectrometerTracks", + xAODTrackParticlesFromTracksContainerName = "MuonSpectrometerTrackParticles", + ConvertTrackParticles = False, + ConvertTracks = True) + + + thetrkbuilder = getPublicToolClone("CombinedMuonTrackBuilder_SA", "CombinedMuonTrackBuilder", MuonHoleRecovery="", CaloMaterialProvider='TMEF_TrkMaterialProviderTool') + + theCandidateTool = getPublicToolClone("MuonCandidateTool_SA", "MuonCandidateTool", TrackBuilder=thetrkbuilder) + theMuonCandidateAlg=CfgMgr.MuonCombinedMuonCandidateAlg("MuonCandidateAlg",MuonCandidateTool=theCandidateTool) + + + thecreatortool= getPublicToolClone("MuonCreatorTool_SA", "MuonCreatorTool", ScatteringAngleTool="", CaloMaterialProvider='TMEF_TrkMaterialProviderTool', MuonSelectionTool="", FillTimingInformation=False, OutputLevel=DEBUG) + + themuoncreatoralg = CfgMgr.MuonCreatorAlg("MuonCreatorAlg") + themuoncreatoralg.MuonCreatorTool=thecreatortool + themuoncreatoralg.CreateSAmuons=True + themuoncreatoralg.ClusterContainerName="" + + #Algorithms to views + efMuViewNode += theSegmentFinderAlg +# efMuViewNode += theNCBSegmentFinderAlg #The configuration still needs some sorting out for this so disabled for now. + efMuViewNode += TrackBuilder + efMuViewNode += xAODTrackParticleCnvAlg + efMuViewNode += theMuonCandidateAlg + efMuViewNode += themuoncreatoralg + + #Setup MS-only hypo + from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFMSonlyHypoConfig + trigMuonEFSAHypo = TrigMuonEFMSonlyHypoConfig("MuonEFSAHypoAlg") + trigMuonEFSAHypo.OutputLevel = DEBUG + + trigMuonEFSAHypo.ViewRoIs = efMuViewsMaker.Views + trigMuonEFSAHypo.MuonDecisions = "Muons" + trigMuonEFSAHypo.RoIs = efMuViewsMaker.InViewRoIs + trigMuonEFSAHypo.Decisions = "EFMuonSADecisions" + trigMuonEFSAHypo.L1Decisions = efMuViewsMaker.InputMakerInputDecisions[0] + + trigMuonEFSAHypo.HypoTools = [ trigMuonEFSAHypo.TrigMuonEFMSonlyHypoToolFromName( "TrigMuonEFMSonlyHypoTool", c ) for c in testChains ] + + muonEFSADecisionsDumper = DumpDecisions("muonEFSADecisionsDumper", OutputLevel=DEBUG, Decisions = trigMuonEFSAHypo.Decisions ) + muonEFSAStep = seqAND("muonEFSAStep", [filterEFSAAlg, efMuViewsMaker, efMuViewNode, trigMuonEFSAHypo, muonEFSADecisionsDumper]) + + + + +def TMEF_TrkMaterialProviderTool(name='TMEF_TrkMaterialProviderTool',**kwargs): + from TrkMaterialProvider.TrkMaterialProviderConf import Trk__TrkMaterialProviderTool + kwargs.setdefault("UseCaloEnergyMeasurement", False) + return Trk__TrkMaterialProviderTool(name,**kwargs) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessingTest.py b/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessingTest.py index a2984306cb17..8f8d6681370d 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessingTest.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessingTest.py @@ -61,56 +61,9 @@ writeEmulationFiles(data) from AthenaCommon.CFElements import parOR, seqAND, stepSeq -########################## L1 ################################################# - -L1UnpackingSeq = parOR("L1UnpackingSeq") - -from L1Decoder.L1DecoderConf import CTPUnpackingEmulationTool, RoIsUnpackingEmulationTool, L1Decoder -l1Decoder = L1Decoder( OutputLevel=DEBUG, RoIBResult="" ) -l1Decoder.prescaler.EventInfo="" - -ctpUnpacker = CTPUnpackingEmulationTool( OutputLevel = DEBUG, ForceEnableAllChains=False , InputFilename="ctp.dat" ) -#ctpUnpacker.CTPToChainMapping = [ "0:HLT_g100", "1:HLT_e20", "2:HLT_mu20", "3:HLT_2mu8", "3:HLT_mu8", "33:HLT_2mu8", "15:HLT_mu8_e8" ] -l1Decoder.ctpUnpacker = ctpUnpacker - -emUnpacker = RoIsUnpackingEmulationTool("EMRoIsUnpackingTool", OutputLevel=DEBUG, InputFilename="l1emroi.dat", OutputTrigRoIs="L1EMRoIs", Decisions="L1EM" ) -emUnpacker.ThresholdToChainMapping = ["EM7 : HLT_mu8_e8", "EM20 : HLT_e20", "EM50 : HLT_2g50", "EM100 : HLT_g100" ] - -muUnpacker = RoIsUnpackingEmulationTool("MURoIsUnpackingTool", OutputLevel=DEBUG, InputFilename="l1muroi.dat", OutputTrigRoIs="L1MURoIs", Decisions="L1MU" ) -muUnpacker.ThresholdToChainMapping = ["MU6 : HLT_mu6", "MU8 : HLT_mu8", "MU8 : HLT_2mu8", "MU8 : HLT_mu8_e8", "MU10 : HLT_mu20", "EM100 : HLT_g100" ] - -l1Decoder.roiUnpackers = [emUnpacker, muUnpacker] - -#print l1Decoder -L1UnpackingSeq += l1Decoder -print L1UnpackingSeq - -########################## L1 ################################################# - -# Cati's menu code -#print "=============== MEOW ================" -#include("TrigUpgradeTest/TriggerMenuMT.py") -#genMenu = GenerateMenu() -#genMenu.generate() -#print "=============== WOOF ================" - - -# steps: sequential AND of 1=Filter 2=Processing -# chainstep=single chain step -# global step=joint for all chains -# filters: one SeqFilter per step, per chain -# inputMakers: one per each first RecoAlg in a step (so one per step), one input per chain that needs that step -# map L1 decisions for menu -for unpack in l1Decoder.roiUnpackers: - if unpack.name() is "EMRoIsUnpackingTool": - unpack.Decisions="L1EM" - if unpack.name() is "MURoIsUnpackingTool": - unpack.Decisions="L1MU" - - # signatures -from TrigUpgradeTest.HLTCFConfig import decisionTree_From_Chains +from TrigUpgradeTest.HLTCFConfig import makeHLTTree from TrigUpgradeTest.MenuComponents import MenuSequence, Chain, ChainStep @@ -118,7 +71,12 @@ doMuon=True doElectron=True doCombo=True -group_of_chains = [] +HLTChains = [] +EnableElChains = [] +EnabledMuChains = [] +EnabledMComboChains = [] + + # muon chains if doMuon: from TrigUpgradeTest.HLTSignatureConfig import muStep1Sequence, muStep2Sequence @@ -131,7 +89,8 @@ if doMuon: Chain(name='HLT_mu8', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mu8", [muStep1]) , ChainStep("Step2_mu8", [muStep2] ) ] ) ] - group_of_chains += MuChains + HLTChains += MuChains + EnabledMuChains= [c.seed.strip().split("_")[1] +" : "+ c.name for c in MuChains] @@ -143,9 +102,11 @@ if doElectron: elStep2 = elStep2Sequence() ElChains = [ Chain(name='HLT_e20' , Seed="L1_EM10", ChainSteps=[ ChainStep("Step1_e20", [elStep1]), ChainStep("Step2_e20", [elStep2]) ] ) +# Chain(name='HLT_e20' , Seed="L1_EM10", ChainSteps=[ ChainStep("Step1_e20", [elStep1]) ] ) ] - group_of_chains += ElChains + HLTChains += ElChains + EnabledElChains= [c.seed.strip().split("_")[1] +" : "+ c.name for c in ElChains] # combined chain @@ -158,29 +119,77 @@ if doCombo: ChainStep("Step2_mu8_e8", [muelStep2]) ] ) ] - group_of_chains += CombChains + HLTChains += CombChains + EnabledComboChains= [c.seed.strip().split("_")[1] +" : "+ c.name for c in CombChains] +EnabledChainNamesToCTP = [str(n)+":"+c.name for n,c in enumerate(HLTChains)] + +print EnabledChainNamesToCTP + + + +########################## L1 ################################################# + +L1UnpackingSeq = parOR("L1UnpackingSeq") +from L1Decoder.L1DecoderConf import CTPUnpackingEmulationTool, RoIsUnpackingEmulationTool, L1Decoder +l1Decoder = L1Decoder( OutputLevel=DEBUG, RoIBResult="" ) +l1Decoder.prescaler.EventInfo="" +l1Decoder.Chains="HLTChainsResult" + +ctpUnpacker = CTPUnpackingEmulationTool( OutputLevel = DEBUG, ForceEnableAllChains=False , InputFilename="ctp.dat" ) +ctpUnpacker.CTPToChainMapping = EnabledChainNamesToCTP +#[ "0:HLT_g100", "1:HLT_e20", "2:HLT_mu20", "3:HLT_2mu8", "3:HLT_mu8", "33:HLT_2mu8", "15:HLT_mu8_e8" ] +l1Decoder.ctpUnpacker = ctpUnpacker + +emUnpacker = RoIsUnpackingEmulationTool("EMRoIsUnpackingTool", OutputLevel=DEBUG, InputFilename="l1emroi.dat", OutputTrigRoIs="L1EMRoIs", Decisions="L1EM" ) +emUnpacker.ThresholdToChainMapping = EnabledElChains +print EnabledElChains +#["EM7 : HLT_mu8_e8", "EM20 : HLT_e20", "EM50 : HLT_2g50", "EM100 : HLT_g100" ] + +muUnpacker = RoIsUnpackingEmulationTool("MURoIsUnpackingTool", OutputLevel=DEBUG, InputFilename="l1muroi.dat", OutputTrigRoIs="L1MURoIs", Decisions="L1MU" ) +muUnpacker.ThresholdToChainMapping = EnabledMuChains +print EnabledMuChains +#["MU6 : HLT_mu6", "MU8 : HLT_mu8", "MU8 : HLT_2mu8", "MU8 : HLT_mu8_e8", "MU10 : HLT_mu20", "EM100 : HLT_g100" ] + +l1Decoder.roiUnpackers = [emUnpacker, muUnpacker] + +#print l1Decoder +L1UnpackingSeq += l1Decoder +print L1UnpackingSeq + +########################## L1 ################################################# + +# Cati's menu code +#print "=============== MEOW ================" +#include("TrigUpgradeTest/TriggerMenuMT.py") +#genMenu = GenerateMenu() +#genMenu.generate() +#print "=============== WOOF ================" -# main HLT top sequence -from AthenaCommon.AlgSequence import AlgSequence, AthSequencer, dumpSequence -topSequence = AlgSequence() -#dumpSequence(topSequence) - -TopHLTRootSeq = seqAND("TopHLTRootSeq") # Root -topSequence += TopHLTRootSeq -#add the L1Upcacking -TopHLTRootSeq += L1UnpackingSeq +# steps: sequential AND of 1=Filter 2=Processing +# chainstep=single chain step +# global step=joint for all chains +# filters: one SeqFilter per step, per chain +# inputMakers: one per each first RecoAlg in a step (so one per step), one input per chain that needs that step -# add the HLT steps Node -HLTAllStepsSeq = seqAND("EmuTest_HLTAllStepsSequence") -TopHLTRootSeq += HLTAllStepsSeq +# map L1 decisions for menu +for unpack in l1Decoder.roiUnpackers: + if unpack.name() is "EMRoIsUnpackingTool": + unpack.Decisions="L1EM" + if unpack.name() is "MURoIsUnpackingTool": + unpack.Decisions="L1MU" -# make CF tree -decisionTree_From_Chains(HLTAllStepsSeq, group_of_chains) + +from AthenaCommon.AlgSequence import AlgSequence, AthSequencer, dumpSequence +topSequence = AlgSequence() +topSequence += L1UnpackingSeq +##### Make all HLT ####### +makeHLTTree(HLTChains) + from AthenaCommon.AlgSequence import dumpMasterSequence dumpMasterSequence() diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.menu.py b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.menu.py index 1233f0a8df0d..a8673291c2da 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.menu.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.menu.py @@ -3,180 +3,11 @@ # include("TrigUpgradeTest/testHLT_MT.py") - -#workaround to prevent online trigger folders to be enabled -from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags -InDetTrigFlags.useConditionsClasses.set_Value_and_Lock(False) - - -from InDetRecExample.InDetJobProperties import InDetFlags -InDetFlags.doCaloSeededBrem = False -InDetFlags.InDet25nsec = True -InDetFlags.doPrimaryVertex3DFinding = False -InDetFlags.doPrintConfigurables = False -InDetFlags.doResolveBackTracks = True -InDetFlags.doSiSPSeededTrackFinder = True -InDetFlags.doTRTPhaseCalculation = True -InDetFlags.doTRTSeededTrackFinder = True -InDetFlags.doTruth = False -InDetFlags.init() - -# PixelLorentzAngleSvc and SCTLorentzAngleSvc -include("InDetRecExample/InDetRecConditionsAccess.py") - -from AthenaCommon.AlgSequence import AlgSequence -topSequence = AlgSequence() - - -from InDetRecExample.InDetKeys import InDetKeys - # provide a minimal menu information if globalflags.InputFormat.is_bytestream(): topSequence.L1DecoderTest.ctpUnpacker.OutputLevel=DEBUG topSequence.L1DecoderTest.roiUnpackers[0].OutputLevel=DEBUG - -# menu components -from TrigUpgradeTest.HLTCFConfig import decisionTree_From_Chains -from TrigUpgradeTest.MenuComponents import HLTRecoSequence, MenuSequence, Chain, ChainStep - -# =============================================================================================== -# L2 Calo -# =============================================================================================== - -from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import T2CaloEgamma_FastAlgo -theFastCaloAlgo=T2CaloEgamma_FastAlgo("FastCaloAlgo" ) -theFastCaloAlgo.OutputLevel=VERBOSE -theFastCaloAlgo.ClustersName="L2CaloClusters" -svcMgr.ToolSvc.TrigDataAccess.ApplyOffsetCorrection=False - - -from TrigMultiVarHypo.TrigL2CaloRingerFexMTInit import init_ringer -trigL2CaloRingerFexMT = init_ringer() -trigL2CaloRingerFexMT.OutputLevel = DEBUG - - - -from AthenaCommon.CFElements import parOR, seqOR, seqAND, stepSeq -from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm - -fastCaloInViewAlgs = seqAND("fastCaloInViewAlgs", [theFastCaloAlgo, trigL2CaloRingerFexMT]) - - - -fastCaloViewsMaker = EventViewCreatorAlgorithm("fastCaloViewsMaker", OutputLevel=DEBUG) -fastCaloViewsMaker.ViewFallThrough = True -fastCaloViewsMaker.RoIsLink = "initialRoI" # -||- -fastCaloViewsMaker.InViewRoIs = "EMCaloRoIs" # contract with the fastCalo -fastCaloViewsMaker.Views = "EMCaloViews" -fastCaloViewsMaker.ViewNodeName = "fastCaloInViewAlgs" -theFastCaloAlgo.RoIs = fastCaloViewsMaker.InViewRoIs - -# are these needed? -CaloViewVerify = CfgMgr.AthViews__ViewDataVerifier("FastCaloViewDataVerifier") -CaloViewVerify.DataObjects = [('TrigRoiDescriptorCollection' , 'StoreGateSvc+fastCaloViewsMaker_InViewRoIs_out')] - - -from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2CaloHypoAlgMT -theFastCaloHypo = TrigL2CaloHypoAlgMT("L2CaloHypo") -theFastCaloHypo.OutputLevel = DEBUG -theFastCaloHypo.CaloClusters = theFastCaloAlgo.ClustersName - - -fastCaloSequence = seqAND("fastCaloSequence",[fastCaloViewsMaker, fastCaloInViewAlgs ]) - -fastCalo_HLTSequence = HLTRecoSequence("fastCalo_HLTSequence", - Sequence=fastCaloSequence, - Maker=fastCaloViewsMaker, - Seed="L1EM") - -fastCaloSequence = MenuSequence("egammaCaloStep", - recoSeqList=[fastCalo_HLTSequence], - Hypo=theFastCaloHypo, - HypoToolClassName="TrigL2CaloHypoToolConf") - -######################################### -# second step: tracking..... -######################################### -# - - -from TrigUpgradeTest.InDetSetup import makeInDetAlgs - -(viewAlgs, eventAlgs) = makeInDetAlgs() -from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_eGamma - -theFTF = TrigFastTrackFinder_eGamma() -theFTF.isRoI_Seeded = True -viewAlgs.append(theFTF) - - -# A simple algorithm to confirm that data has been inherited from parent view -# Required to satisfy data dependencies -ViewVerify = CfgMgr.AthViews__ViewDataVerifier("electronViewDataVerifier") -ViewVerify.DataObjects = [('xAOD::TrigEMClusterContainer','StoreGateSvc+L2CaloClusters')] -ViewVerify.OutputLevel = DEBUG -viewAlgs.append(ViewVerify) - -TrackParticlesName = "" -for viewAlg in viewAlgs: - if viewAlg.name() == "InDetTrigTrackParticleCreatorAlg": - TrackParticlesName = viewAlg.TrackParticlesName - - -from TrigEgammaHypo.TrigL2ElectronFexMTConfig import L2ElectronFex_1 -theElectronFex= L2ElectronFex_1() -theElectronFex.TrigEMClusterName = theFastCaloAlgo.ClustersName -theElectronFex.TrackParticlesName = TrackParticlesName -theElectronFex.ElectronsName="Electrons" -theElectronFex.OutputLevel=VERBOSE - - -l2ElectronViewsMaker = EventViewCreatorAlgorithm("l2ElectronViewsMaker", OutputLevel=DEBUG) -l2ElectronViewsMaker.RoIsLink = "roi" # -||- -l2ElectronViewsMaker.InViewRoIs = "EMIDRoIs" # contract with the fastCalo -l2ElectronViewsMaker.Views = "EMElectronViews" -l2ElectronViewsMaker.ViewFallThrough = True - - -for viewAlg in viewAlgs: - if viewAlg.properties().has_key("RoIs"): - viewAlg.RoIs = l2ElectronViewsMaker.InViewRoIs - if viewAlg.properties().has_key("roiCollectionName"): - viewAlg.roiCollectionName = l2ElectronViewsMaker.InViewRoIs -theElectronFex.RoIs = l2ElectronViewsMaker.InViewRoIs - -electronInViewAlgs = parOR("electronInViewAlgs", viewAlgs + [ theElectronFex ]) - -l2ElectronViewsMaker.ViewNodeName = "electronInViewAlgs" - - -from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2ElectronHypoAlgMT -theElectronHypo = TrigL2ElectronHypoAlgMT() -theElectronHypo.Electrons = theElectronFex.ElectronsName -theElectronHypo.RunInView=True -theElectronHypo.OutputLevel = VERBOSE - -# this needs to be added: -#electronDecisionsDumper = DumpDecisions("electronDecisionsDumper", OutputLevel=DEBUG, Decisions = theElectronHypo.Output ) - -electronSequence = seqAND("electronSequence", eventAlgs + [l2ElectronViewsMaker, electronInViewAlgs ] ) - -electron_HLTSequence = HLTRecoSequence("electron_HLTSequence", - Maker=l2ElectronViewsMaker, - Sequence=electronSequence, - Seed="L1EM") - - -electronSequence = MenuSequence("electronStep", - recoSeqList=[electron_HLTSequence], - Hypo=theElectronHypo, - HypoToolClassName="TrigL2ElectronHypoToolConf") - -########################################## -# menu -########################################## - # map L1 decisions for menu for unpack in topSequence.L1DecoderTest.roiUnpackers: if unpack.name() is "EMRoIsUnpackingTool": @@ -196,7 +27,12 @@ for unpack in topSequence.L1DecoderTest.rerunRoiUnpackers: unpack.SourceDecisions="L1MU" -# menu + +########################################## +# menu +########################################## +from TrigUpgradeTest.MenuComponents import Chain, ChainStep +from TrigUpgradeTest.egammaMenuDefs import fastCaloSequence, electronSequence testChains = [ Chain(name='HLT_e3_etcut', Seed="L1_EM3", \ @@ -211,69 +47,22 @@ testChains = [ ] topSequence.L1DecoderTest.prescaler.Prescales = ["HLT_e3_etcut:2", "HLT_2e3_etcut:2.5"] - - ########################################## # CF construction ########################################## -from AthenaCommon.CFElements import parOR, seqOR, seqAND, stepSeq - -from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg -summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) -summary.InputDecision = "HLTChains" -summary.FinalDecisions = [ "ElectronL2Decisions", "MuonL2Decisions" ] -from TrigOutputHandling.TrigOutputHandlingConf import HLTEDMCreator -edmCreator = HLTEDMCreator() -edmCreator.TrigCompositeContainer = [ "EgammaCaloDecisions", "ElectronL2Decisions", "MuonL2Decisions", "EMRoIDecisions", "METRoIDecisions", "MURoIDecisions", "HLTChainsResult" ] -summary.OutputTools = [ edmCreator ] -summary.OutputLevel = DEBUG - -steps = seqAND("EgammaMenu_HLTSteps" ) -decisionTree_From_Chains(steps, testChains) -steps += summary -from TrigSteerMonitor.TrigSteerMonitorConf import TrigSignatureMoniMT -mon = TrigSignatureMoniMT() -mon.FinalDecisions = [ "ElectronL2Decisions", "MuonL2Decisions", "WhateverElse" ] -from TrigUpgradeTest.TestUtils import MenuTest -mon.ChainsList = [ x.split(":")[1] for x in MenuTest.CTPToChainMapping ] -mon.OutputLevel = DEBUG +##### Make all HLT ####### +from TrigUpgradeTest.HLTCFConfig import makeHLTTree +makeHLTTree(testChains) -import AthenaPoolCnvSvc.WriteAthenaPool -from OutputStreamAthenaPool.OutputStreamAthenaPool import createOutputStream -StreamESD=createOutputStream("StreamESD","myESD.pool.root",True) -StreamESD.OutputLevel=VERBOSE -topSequence.remove( StreamESD ) -def addTC(name): - StreamESD.ItemList += [ "xAOD::TrigCompositeContainer#"+name, "xAOD::TrigCompositeAuxContainer#"+name+"Aux." ] - -for tc in edmCreator.TrigCompositeContainer: - addTC( tc ) - -addTC("HLTSummary") - -print "ESD file content " -print StreamESD.ItemList - - -hltTop = seqOR( "hltTop", [ steps, mon, summary, StreamESD ] ) -topSequence += hltTop ########################################## - - - +# Some debug +########################################## from AthenaCommon.AlgSequence import dumpSequence dumpSequence(topSequence) -print "Now some debug" -print theElectronFex -#print fastCaloSequence -print theFastCaloHypo -print fastCaloViewsMaker -print l2ElectronViewsMaker -print ViewVerify diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma_mu.menu.py b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma_mu.menu.py new file mode 100644 index 000000000000..687f74b040ef --- /dev/null +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma_mu.menu.py @@ -0,0 +1,85 @@ +# +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# + +include("TrigUpgradeTest/testHLT_MT.py") + + + +# provide a minimal menu information +if globalflags.InputFormat.is_bytestream(): + topSequence.L1DecoderTest.ctpUnpacker.OutputLevel=DEBUG + topSequence.L1DecoderTest.roiUnpackers[0].OutputLevel=DEBUG + topSequence.L1DecoderTest.roiUnpackers[1].OutputLevel=DEBUG + + # map L1 decisions for menu +for unpack in topSequence.L1DecoderTest.roiUnpackers: + if unpack.name() is "EMRoIsUnpackingTool": + unpack.Decisions="L1EM" + if unpack.name() is "MURoIsUnpackingTool": + unpack.Decisions="L1MU" + +for unpack in topSequence.L1DecoderTest.rerunRoiUnpackers: + if unpack.name() is "EMRerunRoIsUnpackingTool": + unpack.Decisions="RerunL1EM" + unpack.SourceDecisions="L1EM" + + if unpack.name() is "MURerunRoIsUnpackingTool": + unpack.Decisions="RerunL1MU" + unpack.SourceDecisions="L1MU" + + + + +########################################## +# menu +########################################## +from TrigUpgradeTest.MenuComponents import Chain, ChainStep +from TrigUpgradeTest.egammaMenuDefs import fastCaloSequence, electronSequence +from TrigUpgradeTest.muMenuDefs import muFastStep, doL2SA, doL2CB, doEFSA + +egammaChains = [ + Chain(name='HLT_e3_etcut', Seed="L1_EM3", \ + ChainSteps=[ ChainStep("Step1_e3_etcut", [fastCaloSequence]), + ChainStep("Step2_e3_etcut", [electronSequence])] ), + Chain(name='HLT_e5_etcut', Seed="L1_EM3", \ + ChainSteps=[ChainStep("Step1_e5_etcut", [fastCaloSequence])]), + Chain(name='HLT_e7_etcut', Seed="L1_EM3", \ + ChainSteps=[ChainStep("Step1_e7_etcut", [fastCaloSequence])]), + ] + +MuonChains = [] +if TriggerFlags.doID==False: + if doL2SA==True and doL2CB==False and doEFSA==False: + MuonChains += [Chain(name='HLT_mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]) ])] + MuonChains += [Chain(name='HLT_2mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]) ])] + if doEFSA==True and doL2SA==False and doL2CB==False: + MuonChains += [Chain(name='HLT_mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]) ])] +elif TriggerFlags.doID==True: + if doL2SA==True and doL2CB==True and doEFSA==False: + MuonChains += [Chain(name='HLT_mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]) ])] + if doL2SA==True and doEFSA==True and doL2CB==True: + MuonChains += [Chain(name='HLT_mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]) ])] + + +testChains = egammaChains + MuonChains +topSequence.L1DecoderTest.prescaler.Prescales = ["HLT_e3_etcut:2", "HLT_2e3_etcut:2.5"] + +########################################## +# CF construction +########################################## + +##### Make all HLT ####### +from TrigUpgradeTest.HLTCFConfig import makeHLTTree +makeHLTTree(testChains) + + + +########################################## +# Some debug +########################################## +from AthenaCommon.AlgSequence import dumpSequence +dumpSequence(topSequence) + + + diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py index 3430cc7c4980..21d8fdde74be 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py @@ -6,28 +6,28 @@ include("TrigUpgradeTest/testHLT_MT.py") -### workaround to prevent online trigger folders to be enabled ### -from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags -InDetTrigFlags.useConditionsClasses.set_Value_and_Lock(False) +## ### workaround to prevent online trigger folders to be enabled ### +## from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags +## InDetTrigFlags.useConditionsClasses.set_Value_and_Lock(False) -from InDetRecExample.InDetJobProperties import InDetFlags -InDetFlags.doCaloSeededBrem = False +## from InDetRecExample.InDetJobProperties import InDetFlags +## InDetFlags.doCaloSeededBrem = False -from InDetRecExample.InDetJobProperties import InDetFlags -InDetFlags.InDet25nsec = True -InDetFlags.doPrimaryVertex3DFinding = False -InDetFlags.doPrintConfigurables = False -InDetFlags.doResolveBackTracks = True -InDetFlags.doSiSPSeededTrackFinder = True -InDetFlags.doTRTPhaseCalculation = True -InDetFlags.doTRTSeededTrackFinder = True -InDetFlags.doTruth = False -InDetFlags.init() +## from InDetRecExample.InDetJobProperties import InDetFlags +## InDetFlags.InDet25nsec = True +## InDetFlags.doPrimaryVertex3DFinding = False +## InDetFlags.doPrintConfigurables = False +## InDetFlags.doResolveBackTracks = True +## InDetFlags.doSiSPSeededTrackFinder = True +## InDetFlags.doTRTPhaseCalculation = True +## InDetFlags.doTRTSeededTrackFinder = True +## InDetFlags.doTruth = False +## InDetFlags.init() -### PixelLorentzAngleSvc and SCTLorentzAngleSvc ### -include("InDetRecExample/InDetRecConditionsAccess.py") +## ### PixelLorentzAngleSvc and SCTLorentzAngleSvc ### +## include("InDetRecExample/InDetRecConditionsAccess.py") -from InDetRecExample.InDetKeys import InDetKeys +## from InDetRecExample.InDetKeys import InDetKeys from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() @@ -68,514 +68,6 @@ AlgScheduler.setDataLoaderAlg( 'SGInputLoader' ) from AthenaCommon.CfgGetter import getPublicTool, getPublicToolClone from AthenaCommon import CfgMgr -doL2SA=True -doL2CB=False -doEFSA=False - -TriggerFlags.doID=False - -# =============================================================================================== -# Setup PrepData -# =============================================================================================== - -### Used the algorithms as Step2 "muComb step" ### -if TriggerFlags.doID: - - from TrigUpgradeTest.InDetSetup import makeInDetAlgs - - (viewAlgs, eventAlgs) = makeInDetAlgs() - - from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_Muon - theFTF = TrigFastTrackFinder_Muon() - theFTF.OutputLevel = DEBUG - theFTF.TracksName = "TrigFastTrackFinder_MuTracks" - theFTF.isRoI_Seeded = True - viewAlgs.append(theFTF) - - ### A simple algorithm to confirm that data has been inherited from parent view ### - ### Required to satisfy data dependencies ### - ViewVerify = CfgMgr.AthViews__ViewDataVerifier("muFastViewDataVerifier") - ViewVerify.DataObjects = [('xAOD::L2StandAloneMuonContainer','StoreGateSvc+MuonL2SAInfo')] - viewAlgs.append(ViewVerify) - - - -### Used the algorithms as Step1 "muFast step" ### -if TriggerFlags.doMuon: - ### Load data from Muon detectors ### - import MuonRecExample.MuonRecStandaloneOnlySetup - from MuonCombinedRecExample.MuonCombinedRecFlags import muonCombinedRecFlags - muonRecFlags.doTrackPerformance = True - muonRecFlags.TrackPerfSummaryLevel = 2 - muonRecFlags.TrackPerfDebugLevel = 5 - muonRecFlags.doCSCs = True - muonRecFlags.doNSWNewThirdChain = False - muonCombinedRecFlags.doCaloTrkMuId = False - muonCombinedRecFlags.printSummary = False - from RecExConfig.RecFlags import rec - from AthenaCommon.AlgSequence import AthSequencer - from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm - - if doL2SA: - l2MuViewNode = seqAND("l2MuViewNode") - #l2MuViewNode = AthSequencer("l2MuViewNode", Sequential=False, ModeOR=False, StopOverride=False) - l2MuViewsMaker = EventViewCreatorAlgorithm("l2MuViewsMaker", OutputLevel=DEBUG) - l2MuViewsMaker.ViewFallThrough = True - -# l2MuViewsMaker.InputMakerInputDecisions = ["MURoIDecisions"] -# l2MuViewsMaker.InputMakerOutputDecisions = ["MURoIDecisionsOutput"] - l2MuViewsMaker.RoIsLink = "initialRoI" # -||- - l2MuViewsMaker.InViewRoIs = "MURoIs" # contract with the consumer - l2MuViewsMaker.Views = "MUViewRoIs" - l2MuViewsMaker.ViewNodeName = l2MuViewNode.name() - - if doEFSA: - - efMuViewNode = AthSequencer("efMuViewNode", Sequential=False, ModeOR=False, StopOverride=False) - efMuViewsMaker = EventViewCreatorAlgorithm("efMuViewsMaker", OutputLevel=DEBUG) - efMuViewsMaker.ViewFallThrough = True - - efMuViewsMaker.InputMakerInputDecisions = ["MURoIDecisions"] - efMuViewsMaker.InputMakerOutputDecisions = ["MURoIDecisionsOutputEF"] - efMuViewsMaker.RoIsLink = "initialRoI" # -||- - efMuViewsMaker.InViewRoIs = "MURoIs" # contract with the consumer - efMuViewsMaker.Views = "EFMUViewRoIs" - efMuViewsMaker.ViewNodeName = efMuViewNode.name() - - if doEFSA or doL2SA: - ### ==================== Data prepartion needed for the EF and L2 SA #######################333 - ### CSC RDO data ### - if muonRecFlags.doCSCs(): - from MuonCSC_CnvTools.MuonCSC_CnvToolsConf import Muon__CscROD_Decoder - CSCRodDecoder = Muon__CscROD_Decoder(name = "CSCRodDecoder", - IsCosmics = False, - IsOldCosmics = False, - OutputLevel = INFO ) - ToolSvc += CSCRodDecoder - - from MuonCSC_CnvTools.MuonCSC_CnvToolsConf import Muon__CSC_RawDataProviderTool - MuonCscRawDataProviderTool = Muon__CSC_RawDataProviderTool(name = "MuonCscRawDataProviderTool", - Decoder = ToolSvc.CSCRodDecoder, - OutputLevel = INFO ) - ToolSvc += MuonCscRawDataProviderTool - - from MuonCSC_CnvTools.MuonCSC_CnvToolsConf import Muon__CscRdoToCscPrepDataTool - CscRdoToCscPrepDataTool = Muon__CscRdoToCscPrepDataTool(name = "CscRdoToPrepDataTool", - OutputLevel = INFO, - RawDataProviderTool = MuonCscRawDataProviderTool, - useBStoRdoTool = True) - ToolSvc += CscRdoToCscPrepDataTool - - from MuonRdoToPrepData.MuonRdoToPrepDataConf import CscRdoToCscPrepData - CscRdoToCscPrepData = CscRdoToCscPrepData(name = "CscRdoToCscPrepDataProvider", - CscRdoToCscPrepDataTool = CscRdoToCscPrepDataTool, - PrintPrepData = False, - OutputLevel = INFO) - CscRdoToCscPrepData.DoSeededDecoding = True - CscRdoToCscPrepData.RoIs = "MURoIs" - - from MuonByteStream.MuonByteStreamConf import Muon__CscRawDataProvider - CscRawDataProvider = Muon__CscRawDataProvider(name = "CscRawDataProvider", - ProviderTool = MuonCscRawDataProviderTool, - OutputLevel = INFO) - - from CscClusterization.CscClusterizationConf import CscThresholdClusterBuilderTool - CscClusterBuilderTool = CscThresholdClusterBuilderTool(name = "CscThesholdClusterBuilderTool", - OutputLevel = INFO) - ToolSvc += CscClusterBuilderTool - - #CSC cluster building - from CscClusterization.CscClusterizationConf import CscThresholdClusterBuilder - CscClusterBuilder = CscThresholdClusterBuilder(name = "CscThesholdClusterBuilder", - OutputLevel = INFO, - cluster_builder = CscClusterBuilderTool) - - if doEFSA: - efMuViewNode += CscRdoToCscPrepData - efMuViewNode += CscClusterBuilder - if doL2SA: - l2MuViewNode += CscRawDataProvider - - ### MDT RDO data ### - if muonRecFlags.doMDTs(): - from MuonMDT_CnvTools.MuonMDT_CnvToolsConf import MdtROD_Decoder - MDTRodDecoder = MdtROD_Decoder(name = "MDTRodDecoder", - OutputLevel = INFO ) - ToolSvc += MDTRodDecoder - - from MuonMDT_CnvTools.MuonMDT_CnvToolsConf import Muon__MDT_RawDataProviderTool - MuonMdtRawDataProviderTool = Muon__MDT_RawDataProviderTool(name = "MuonMdtRawDataProviderTool", - Decoder = ToolSvc.MDTRodDecoder, - OutputLevel = INFO ) - ToolSvc += MuonMdtRawDataProviderTool - - from MuonMDT_CnvTools.MuonMDT_CnvToolsConf import Muon__MdtRdoToPrepDataTool - MdtRdoToMdtPrepDataTool = Muon__MdtRdoToPrepDataTool(name = "MdtRdoToPrepDataTool", - OutputLevel = INFO, - RawDataProviderTool = MuonMdtRawDataProviderTool, - useBStoRdoTool = True) - ToolSvc += MdtRdoToMdtPrepDataTool - - from MuonRdoToPrepData.MuonRdoToPrepDataConf import MdtRdoToMdtPrepData - MdtRdoToMdtPrepData = MdtRdoToMdtPrepData(name = "MdtRdoToMdtPrepDataProvider", - DecodingTool = MdtRdoToMdtPrepDataTool, - PrintPrepData = False, - OutputLevel = INFO) - MdtRdoToMdtPrepData.DoSeededDecoding = True - MdtRdoToMdtPrepData.RoIs = "MURoIs" - - from MuonByteStream.MuonByteStreamConf import Muon__MdtRawDataProvider - MdtRawDataProvider = Muon__MdtRawDataProvider(name = "MdtRawDataProvider", - ProviderTool = MuonMdtRawDataProviderTool, - OutputLevel = INFO) - if doEFSA: - efMuViewNode += MdtRdoToMdtPrepData - if doL2SA: - l2MuViewNode += MdtRawDataProvider - - ### RPC RDO data ### - if muonRecFlags.doRPCs(): - from MuonRPC_CnvTools.MuonRPC_CnvToolsConf import Muon__RpcROD_Decoder - RPCRodDecoder = Muon__RpcROD_Decoder(name = "RPCRodDecoder", - OutputLevel = INFO ) - ToolSvc += RPCRodDecoder - - from MuonRPC_CnvTools.MuonRPC_CnvToolsConf import Muon__RPC_RawDataProviderTool - MuonRpcRawDataProviderTool = Muon__RPC_RawDataProviderTool(name = "MuonRpcRawDataProviderTool", - Decoder = RPCRodDecoder ) - ToolSvc += MuonRpcRawDataProviderTool - - from MuonRPC_CnvTools.MuonRPC_CnvToolsConf import Muon__RpcRdoToPrepDataTool - RpcRdoToRpcPrepDataTool = Muon__RpcRdoToPrepDataTool(name = "RpcRdoToPrepDataTool", - OutputLevel = INFO, - RawDataProviderTool = MuonRpcRawDataProviderTool, - useBStoRdoTool = True) - ToolSvc += RpcRdoToRpcPrepDataTool - - from MuonRdoToPrepData.MuonRdoToPrepDataConf import RpcRdoToRpcPrepData - RpcRdoToRpcPrepData = RpcRdoToRpcPrepData(name = "RpcRdoToRpcPrepDataProvider", - DecodingTool = RpcRdoToRpcPrepDataTool, - PrintPrepData = False, - OutputLevel = INFO) - RpcRdoToRpcPrepData.DoSeededDecoding = True - RpcRdoToRpcPrepData.RoIs = "MURoIs" - - from MuonByteStream.MuonByteStreamConf import Muon__RpcRawDataProvider - RpcRawDataProvider = Muon__RpcRawDataProvider(name = "RpcRawDataProvider", - ProviderTool = MuonRpcRawDataProviderTool, - OutputLevel = INFO) - if doEFSA: - efMuViewNode += RpcRdoToRpcPrepData - if doL2SA: - l2MuViewNode += RpcRawDataProvider - - ### TGC RDO data ### - if muonRecFlags.doTGCs(): - from MuonTGC_CnvTools.MuonTGC_CnvToolsConf import Muon__TGC_RodDecoderReadout - TGCRodDecoder = Muon__TGC_RodDecoderReadout(name = "TGCRodDecoder", - OutputLevel = INFO ) - ToolSvc += TGCRodDecoder - - from MuonTGC_CnvTools.MuonTGC_CnvToolsConf import Muon__TGC_RawDataProviderTool - MuonTgcRawDataProviderTool = Muon__TGC_RawDataProviderTool(name = "MuonTgcRawDataProviderTool", - Decoder = TGCRodDecoder ) - ToolSvc += MuonTgcRawDataProviderTool - - from MuonTGC_CnvTools.MuonTGC_CnvToolsConf import Muon__TgcRdoToPrepDataTool - TgcRdoToTgcPrepDataTool = Muon__TgcRdoToPrepDataTool(name = "TgcRdoToPrepDataTool", - OutputLevel = INFO, - RawDataProviderTool = MuonTgcRawDataProviderTool, - useBStoRdoTool = True) - - ToolSvc += TgcRdoToTgcPrepDataTool - - from MuonRdoToPrepData.MuonRdoToPrepDataConf import TgcRdoToTgcPrepData - TgcRdoToTgcPrepData = TgcRdoToTgcPrepData(name = "TgcRdoToTgcPrepDataProvider", - DecodingTool = TgcRdoToTgcPrepDataTool, - PrintPrepData = False, - OutputLevel = INFO) - TgcRdoToTgcPrepData.DoSeededDecoding = True - TgcRdoToTgcPrepData.RoIs = "MURoIs" - - - from MuonByteStream.MuonByteStreamConf import Muon__TgcRawDataProvider - TgcRawDataProvider = Muon__TgcRawDataProvider(name = "TgcRawDataProvider", - ProviderTool = MuonTgcRawDataProviderTool, - OutputLevel = INFO) - if doEFSA: - efMuViewNode += TgcRdoToTgcPrepData - if doL2SA: - l2MuViewNode += TgcRawDataProvider - - - #Run clustering - if muonRecFlags.doCreateClusters(): - from MuonClusterization.MuonClusterizationConf import MuonClusterizationTool - MuonClusterTool = MuonClusterizationTool(name = "MuonClusterizationTool", - OutputLevel = INFO) - ToolSvc += MuonClusterTool - - from MuonClusterization.MuonClusterizationConf import MuonClusterizationAlg - MuonClusterAlg = MuonClusterizationAlg(name = "MuonClusterizationAlg", - OutputLevel = INFO, - ClusterTool = MuonClusterTool, - TgcPrepDataContainer = "TGC_MeasurementsAllBCs") - - if doEFSA: - efMuViewNode += MuonClusterAlg - - - ### muon thresholds ### - testChains = ["HLT_mu6", "HLT_2mu6"] - - ### set up L1RoIsFilter ### - from DecisionHandling.DecisionHandlingConf import RoRSeqFilter, DumpDecisions - filterL1RoIsAlg = RoRSeqFilter("filterL1RoIsAlg") - filterL1RoIsAlg.Input = ["MURoIDecisions"] - filterL1RoIsAlg.Output = ["FilteredMURoIDecisions"] - filterL1RoIsAlg.Chains = testChains - filterL1RoIsAlg.OutputLevel = DEBUG - - -# =============================================================================================== -# Setup L2MuonSA -# =============================================================================================== - - if doL2SA: - ### set up MuFastSteering ### - from TrigL2MuonSA.TrigL2MuonSAConfig import TrigL2MuonSAMTConfig - muFastAlg = TrigL2MuonSAMTConfig("Muon") - muFastAlg.OutputLevel = DEBUG - - svcMgr.ToolSvc.TrigDataAccess.ApplyOffsetCorrection = False - - l2MuViewNode += muFastAlg - - muFastAlg.MuRoIs = l2MuViewsMaker.InViewRoIs - muFastAlg.RecMuonRoI = "RecMURoIs" - muFastAlg.MuonL2SAInfo = "MuonL2SAInfo" - muFastAlg.MuonCalibrationStream = "MuonCalibrationStream" - muFastAlg.forID = "forID" - muFastAlg.forMS = "forMS" - - # set up MuFastHypo - from TrigMuonHypo.TrigMuonHypoConfig import TrigMufastHypoConfig - trigMufastHypo = TrigMufastHypoConfig("L2MufastHypoAlg") - -# from TrigMuonHypo.TrigMuonHypoConf import TrigMufastHypoAlg -# trigMufastHypo = TrigMufastHypoAlg("L2MufastHypoAlg") - trigMufastHypo.OutputLevel = DEBUG - - #trigMufastHypo.ViewRoIs = l2MuViewsMaker.Views - trigMufastHypo.MuonL2SAInfoFromMuFastAlg = muFastAlg.MuonL2SAInfo - #trigMufastHypo.RoIs = l2MuViewsMaker.InViewRoIs - #trigMufastHypo.Decisions = "L2MuonFastDecisions" - #trigMufastHypo.L1Decisions = l2MuViewsMaker.InputMakerInputDecisions[0] - - #trigMufastHypo.HypoTools = [ trigMufastHypo.TrigMufastHypoToolFromName( "L2MufastHypoTool", c ) for c in testChains ] - -# muFastDecisionsDumper = DumpDecisions("muFastDecisionsDumper", OutputLevel=DEBUG, Decisions = trigMufastHypo.Decisions ) - l2muFastSequence = seqAND("l2muFastSequence", [ l2MuViewsMaker, l2MuViewNode ]) - - l2muFast_HLTSequence = HLTRecoSequence("l2muFast_HLTSequence", - Sequence=l2muFastSequence, - Maker=l2MuViewsMaker, - Seed="L1MU") - - muFastStep = MenuSequence("muFastStep", - recoSeqList=[l2muFast_HLTSequence], - Hypo=trigMufastHypo, - HypoToolClassName="TrigMufastHypoToolConf") - - - - #muFastStep = stepSeq("muFastStep", filterL1RoIsAlg, [ l2muFastSequence, muFastDecisionsDumper ] ) - - -# =============================================================================================== -# Setup muComb -# =============================================================================================== - - if doL2CB: - ### RoRSeqFilter step2 ### - filterL2SAAlg = RoRSeqFilter("filterL2SAAlg") - filterL2SAAlg.Input = [trigMufastHypo.Decisions] - filterL2SAAlg.Output = ["Filtered"+trigMufastHypo.Decisions] - filterL2SAAlg.Chains = testChains - filterL2SAAlg.OutputLevel = DEBUG - - l2muCombViewNode = AthSequencer("l2muCombViewNode", Sequential=False, ModeOR=False, StopOverride=False) - l2muCombViewsMaker = EventViewCreatorAlgorithm("l2muCombViewsMaker", OutputLevel=DEBUG) - l2muCombViewsMaker.ViewFallThrough = True - - l2muCombViewsMaker.InputMakerInputDecisions = [ filterL2SAAlg.Output[0] ] # Output of TrigMufastHypo - l2muCombViewsMaker.InputMakerOutputDecisions = [ filterL2SAAlg.Output[0]+"Comb" ] # Output of TrigMufastHypo - l2muCombViewsMaker.RoIsLink = "roi" # -||- - l2muCombViewsMaker.InViewRoIs = "MUTrkRoIs" # contract with the consumer - l2muCombViewsMaker.Views = "MUTrkViewRoIs" - l2muCombViewsMaker.ViewNodeName = l2muCombViewNode.name() - - ### Define input data of Inner Detector algorithms ### - ### and Define EventViewNodes to run the algprithms ### - TrackParticlesName = "" - for viewAlg in viewAlgs: - l2muCombViewNode += viewAlg - if viewAlg.properties().has_key("RoIs"): - viewAlg.RoIs = l2muCombViewsMaker.InViewRoIs - if viewAlg.properties().has_key("roiCollectionName"): - viewAlg.roiCollectionName = l2muCombViewsMaker.InViewRoIs - if viewAlg.name() == "InDetTrigTrackParticleCreatorAlg": - TrackParticlesName = viewAlg.TrackParticlesName - viewAlg.TrackName = theFTF.TracksName - - ### please read out TrigmuCombMTConfig file ### - ### and set up to run muCombMT algorithm ### - from TrigmuComb.TrigmuCombMTConfig import TrigmuCombMTConfig - muCombAlg = TrigmuCombMTConfig("Muon", theFTF.getName()) - muCombAlg.OutputLevel = DEBUG - muCombAlg.L2StandAloneMuonContainerName = muFastAlg.MuonL2SAInfo - muCombAlg.TrackParticlesContainerName = TrackParticlesName - muCombAlg.L2CombinedMuonContainerName = "MuonL2CBInfo" - - l2muCombViewNode += muCombAlg - - ### set up muCombHypo algorithm ### - from TrigMuonHypo.TrigMuonHypoConfig import TrigmuCombHypoConfig - trigmuCombHypo = TrigmuCombHypoConfig("L2muCombHypoAlg") - trigmuCombHypo.OutputLevel = DEBUG - - trigmuCombHypo.Decisions = "MuonL2CBDecisions" - trigmuCombHypo.L2MuonFastDecisions = trigMufastHypo.Decisions - trigmuCombHypo.ViewRoIs = l2muCombViewsMaker.Views - trigmuCombHypo.MuonL2CBInfoFromMuCombAlg = muCombAlg.L2CombinedMuonContainerName - - trigmuCombHypo.HypoTools = [ trigmuCombHypo.TrigmuCombHypoToolFromName( "L2muCombHypoTool", c ) for c in testChains ] - - muCombDecisionsDumper = DumpDecisions("muCombDecisionsDumper", OutputLevel=DEBUG, Decisions = trigmuCombHypo.Decisions ) - - ### Define a Sequence to run for muComb ### - l2muCombSequence = seqAND("l2muCombSequence", eventAlgs + [l2muCombViewsMaker, l2muCombViewNode, trigmuCombHypo ] ) - muCombStep = stepSeq("muCombStep", filterL2SAAlg, [ l2muCombSequence, muCombDecisionsDumper ] ) - - -# =============================================================================================== -# Setup EFMuonSA -# =============================================================================================== - - if doEFSA: - ### RoRSeqFilter step2 ### - filterEFSAAlg = RoRSeqFilter("filterEFSAAlg") - filterEFSAAlg.Input = [trigmuCombHypo.Decisions] - filterEFSAAlg.Output = ["Filtered"+trigmuCombHypo.Decisions] - filterEFSAAlg.Chains = testChains - filterEFSAAlg.OutputLevel = DEBUG - - from TrkDetDescrSvc.TrkDetDescrSvcConf import Trk__TrackingVolumesSvc - ServiceMgr += Trk__TrackingVolumesSvc("TrackingVolumesSvc",BuildVolumesFromTagInfo = False) - - theSegmentFinder = CfgGetter.getPublicToolClone("MuonSegmentFinder","MooSegmentFinder") - theSegmentFinder.DoSummary=True - CfgGetter.getPublicTool("MuonLayerHoughTool").DoTruth=False - theSegmentFinderAlg=CfgMgr.MooSegmentFinderAlg( "MuonSegmentMaker", - SegmentFinder=theSegmentFinder, - MuonSegmentOutputLocation = "MooreSegments", - UseCSC = muonRecFlags.doCSCs(), - UseMDT = muonRecFlags.doMDTs(), - UseRPC = muonRecFlags.doRPCs(), - UseTGC = muonRecFlags.doTGCs(), - doClusterTruth=False, - UseTGCPriorBC = False, - UseTGCNextBC = False, - doTGCClust = muonRecFlags.doTGCClusterSegmentFinding(), - doRPCClust = muonRecFlags.doRPCClusterSegmentFinding(), OutputLevel=DEBUG ) - - - - theNCBSegmentFinderAlg=CfgMgr.MooSegmentFinderAlg( "MuonSegmentMaker_NCB", - SegmentFinder = getPublicToolClone("MooSegmentFinder_NCB","MuonSegmentFinder", - DoSummary=False, - Csc2dSegmentMaker = getPublicToolClone("Csc2dSegmentMaker_NCB","Csc2dSegmentMaker", - segmentTool = getPublicToolClone("CscSegmentUtilTool_NCB", - "CscSegmentUtilTool", - TightenChi2 = False, - IPconstraint=False)), - Csc4dSegmentMaker = getPublicToolClone("Csc4dSegmentMaker_NCB","Csc4dSegmentMaker", - segmentTool = getPublicTool("CscSegmentUtilTool_NCB")), - DoMdtSegments=False,DoSegmentCombinations=False,DoSegmentCombinationCleaning=False), - MuonPatternCombinationLocation = "NCB_MuonHoughPatternCombinations", - MuonSegmentOutputLocation = "NCB_MuonSegments", - MuonSegmentCombinationOutputLocation = "NCB_MooreSegmentCombinations", - UseCSC = muonRecFlags.doCSCs(), - UseMDT = False, - UseRPC = False, - UseTGC = False, - UseTGCPriorBC = False, - UseTGCNextBC = False, - doTGCClust = False, - doRPCClust = False) - - from MuonRecExample.MuonStandalone import MuonTrackSteering - MuonTrackSteering.DoSummary=True - MuonTrackSteering.DoSummary=DEBUG - TrackBuilder = CfgMgr.MuPatTrackBuilder("MuPatTrackBuilder" ) - TrackBuilder.TrackSteering=CfgGetter.getPublicToolClone("MuonTrackSteering", "MuonTrackSteering") - - from AthenaCommon.Include import include - include("InDetBeamSpotService/BeamCondSvc.py" ) - from xAODTrackingCnv.xAODTrackingCnvConf import xAODMaker__TrackParticleCnvAlg, xAODMaker__TrackCollectionCnvTool, xAODMaker__RecTrackParticleContainerCnvTool - - muonParticleCreatorTool = getPublicTool("MuonParticleCreatorTool") - - muonTrackCollectionCnvTool = xAODMaker__TrackCollectionCnvTool( name = "MuonTrackCollectionCnvTool", TrackParticleCreator = muonParticleCreatorTool ) - - muonRecTrackParticleContainerCnvTool = xAODMaker__RecTrackParticleContainerCnvTool(name = "MuonRecTrackParticleContainerCnvTool", TrackParticleCreator = muonParticleCreatorTool ) - - xAODTrackParticleCnvAlg = xAODMaker__TrackParticleCnvAlg( name = "MuonStandaloneTrackParticleCnvAlg", - TrackParticleCreator = muonParticleCreatorTool, - TrackCollectionCnvTool=muonTrackCollectionCnvTool, - RecTrackParticleContainerCnvTool = muonRecTrackParticleContainerCnvTool, - TrackContainerName = "MuonSpectrometerTracks", - xAODTrackParticlesFromTracksContainerName = "MuonSpectrometerTrackParticles", - ConvertTrackParticles = False, - ConvertTracks = True) - - - thetrkbuilder = getPublicToolClone("CombinedMuonTrackBuilder_SA", "CombinedMuonTrackBuilder", MuonHoleRecovery="", CaloMaterialProvider='TMEF_TrkMaterialProviderTool') - - theCandidateTool = getPublicToolClone("MuonCandidateTool_SA", "MuonCandidateTool", TrackBuilder=thetrkbuilder) - theMuonCandidateAlg=CfgMgr.MuonCombinedMuonCandidateAlg("MuonCandidateAlg",MuonCandidateTool=theCandidateTool) - - - thecreatortool= getPublicToolClone("MuonCreatorTool_SA", "MuonCreatorTool", ScatteringAngleTool="", CaloMaterialProvider='TMEF_TrkMaterialProviderTool', MuonSelectionTool="", FillTimingInformation=False, OutputLevel=DEBUG) - - themuoncreatoralg = CfgMgr.MuonCreatorAlg("MuonCreatorAlg") - themuoncreatoralg.MuonCreatorTool=thecreatortool - themuoncreatoralg.CreateSAmuons=True - themuoncreatoralg.ClusterContainerName="" - - #Algorithms to views - efMuViewNode += theSegmentFinderAlg -# efMuViewNode += theNCBSegmentFinderAlg #The configuration still needs some sorting out for this so disabled for now. - efMuViewNode += TrackBuilder - efMuViewNode += xAODTrackParticleCnvAlg - efMuViewNode += theMuonCandidateAlg - efMuViewNode += themuoncreatoralg - - #Setup MS-only hypo - from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFMSonlyHypoConfig - trigMuonEFSAHypo = TrigMuonEFMSonlyHypoConfig("MuonEFSAHypoAlg") - trigMuonEFSAHypo.OutputLevel = DEBUG - - trigMuonEFSAHypo.ViewRoIs = efMuViewsMaker.Views - trigMuonEFSAHypo.MuonDecisions = "Muons" - trigMuonEFSAHypo.RoIs = efMuViewsMaker.InViewRoIs - trigMuonEFSAHypo.Decisions = "EFMuonSADecisions" - trigMuonEFSAHypo.L1Decisions = efMuViewsMaker.InputMakerInputDecisions[0] - - trigMuonEFSAHypo.HypoTools = [ trigMuonEFSAHypo.TrigMuonEFMSonlyHypoToolFromName( "TrigMuonEFMSonlyHypoTool", c ) for c in testChains ] - - muonEFSADecisionsDumper = DumpDecisions("muonEFSADecisionsDumper", OutputLevel=DEBUG, Decisions = trigMuonEFSAHypo.Decisions ) - muonEFSAStep = seqAND("muonEFSAStep", [filterEFSAAlg, efMuViewsMaker, efMuViewNode, trigMuonEFSAHypo, muonEFSADecisionsDumper]) # =============================================================================================== @@ -583,11 +75,13 @@ if TriggerFlags.doMuon: # =============================================================================================== ### CF construction ### +from TrigUpgradeTest.MenuComponents import Chain, ChainStep +from TrigUpgradeTest.egammaMenuDefs import fastCaloSequence, electronSequence + -oldstuff=False -newstuff=True -if TriggerFlags.doMuon==True and newstuff: + +if TriggerFlags.doMuon==True: ########################################## # menu ########################################## @@ -603,15 +97,16 @@ if TriggerFlags.doMuon==True and newstuff: if unpack.name() is "EMRerunRoIsUnpackingTool": unpack.Decisions="RerunL1EM" unpack.SourceDecisions="L1EM" - - for unpack in topSequence.L1DecoderTest.rerunRoiUnpackers: - if unpack.name() is "EMRerunRoIsUnpackingTool": - unpack.SourceDecisions="L1EM" + if unpack.name() is "MURerunRoIsUnpackingTool": + unpack.Decisions="RerunL1MU" unpack.SourceDecisions="L1MU" # menu + from TrigUpgradeTest.MenuComponents import Chain, ChainStep + from TrigUpgradeTest.muMenuDefs import muFastStep, doL2SA, doL2CB, doEFSA + MenuChains = [] @@ -629,214 +124,13 @@ if TriggerFlags.doMuon==True and newstuff: - + ########################################## - # add summary and monitor: - ########################################## - from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg - - summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) - summary.InputDecision = "HLTChains" - summary.OutputLevel = DEBUG - - - mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) - mon.InputDecision = "HLTChains" - mon.HLTSummary = "MonitoringSummary" - mon.OutputLevel = DEBUG - - if TriggerFlags.doID==False: - if doL2SA==True and doL2CB==False and doEFSA==False: - summary.FinalDecisions = [ trigMufastHypo.HypoOutputDecisions ] - mon.FinalDecisions = [ trigMufastHypo.HypoOutputDecisions, "WhateverElse" ] - - ## step0 = parOR("step0", [ muFastStep ] ) - ## HLTsteps = seqAND("HLTsteps", [ step0, summary ] ) - ## hltTop = seqOR( "hltTop", [ HLTsteps, mon] ) - ## topSequence += hltTop - - if doEFSA==True and doL2SA==False and doL2CB==False: - summary.FinalDecisions = [ trigMuonEFSAHypo.Decisions ] - mon.FinalDecisions = [ trigMuonEFSAHypo.Decisions, "WhateverElse" ] - - ## step0 = parOR("step0", [ muonEFSAStep ] ) - ## HLTsteps = seqAND("HLTsteps", [ step0, summary ] ) - ## hltTop = seqOR( "hltTop", [ HLTsteps, mon] ) - ## topSequence += hltTop - - elif TriggerFlags.doID==True: - if doL2SA==True and doL2CB==True and doEFSA==False: - ## from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg - ## summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) - ## summary.InputDecision = "HLTChains" - summary.FinalDecisions = [ trigmuCombHypo.Decisions ] - - ## step0 = parOR("step0", [ muFastStep ] ) - ## step1 = parOR("step1", [ muCombStep ] ) - ## HLTsteps = seqAND("HLTsteps", [ step0, step1, summary ] ) - - ## mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) - ## mon.InputDecision = "HLTChains" - mon.FinalDecisions = [ trigmuCombHypo.Decisions, "WhateverElse" ] - ## mon.HLTSummary = "MonitoringSummary" - ## mon.OutputLevel = DEBUG - ## hltTop = seqOR( "hltTop", [ HLTsteps, mon] ) - - ## topSequence += hltTop - - if doL2SA==True and doEFSA==True and doL2CB==True: - # from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg - ## summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) - ## summary.InputDecision = "HLTChains" - summary.FinalDecisions = [ trigMuonEFSAHypo.Decisions ] -# summary.OutputLevel = DEBUG - ## step0 = parOR("step0", [ muFastStep ] ) - ## step1 = parOR("step1", [ muCombStep ] ) - ## step2 = parOR("step2", [ muonEFSAStep ] ) - ## HLTsteps = seqAND("HLTsteps", [ step0, step1, step2, summary ] ) - - ## mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) - ## mon.InputDecision = "HLTChains" - mon.FinalDecisions = [ trigMuonEFSAHypo.Decisions, "WhateverElse" ] -# mon.HLTSummary = "MonitoringSummary" - ## mon.OutputLevel = DEBUG - ## hltTop = seqOR( "hltTop", [ HLTsteps, mon] ) - - ## topSequence += hltTop - - - - # - - ########################################## # CF construction ########################################## - from AthenaCommon.CFElements import parOR, seqOR, seqAND, stepSeq - - steps = seqAND("MuMenu_HLTSteps" ) - decisionTree_From_Chains(steps, MenuChains) - steps += summary - - from TrigSteerMonitor.TrigSteerMonitorConf import TrigSignatureMoniMT - mon = TrigSignatureMoniMT() - mon.FinalDecisions = [ "ElectronL2Decisions", "MuonL2Decisions", "WhateverElse" ] - from TrigUpgradeTest.TestUtils import MenuTest - mon.ChainsList = [ x.split(":")[1] for x in MenuTest.CTPToChainMapping ] - mon.OutputLevel = DEBUG - - import AthenaPoolCnvSvc.WriteAthenaPool - from OutputStreamAthenaPool.OutputStreamAthenaPool import createOutputStream - StreamESD=createOutputStream("StreamESD","myESD.pool.root",True) - StreamESD.OutputLevel=VERBOSE - topSequence.remove( StreamESD ) - def addTC(name): - StreamESD.ItemList += [ "xAOD::TrigCompositeContainer#"+name, "xAOD::TrigCompositeAuxContainer#"+name+"Aux." ] - - from TrigOutputHandling.TrigOutputHandlingConf import HLTEDMCreator - edmCreator = HLTEDMCreator() - edmCreator.TrigCompositeContainer = [ "EgammaCaloDecisions", "ElectronL2Decisions", "MuonL2Decisions", "EMRoIDecisions", "METRoIDecisions", "MURoIDecisions", "HLTChainsResult" ] - summary.OutputTools = [ edmCreator ] - summary.OutputLevel = DEBUG - - for tc in edmCreator.TrigCompositeContainer: - addTC( tc ) - addTC("HLTSummary") - - print "ESD file content " - print StreamESD.ItemList - - - hltTop = seqOR( "hltTop", [ steps, mon, summary, StreamESD ] ) - topSequence += hltTop - - - from AthenaCommon.AlgSequence import dumpSequence - dumpSequence(topSequence) - - ########################################## - ########################################## - -if TriggerFlags.doMuon==True and oldstuff: - from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg - if doL2SA==True and doL2CB==False and doEFSA==False: - summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) - summary.InputDecision = "HLTChains" - summary.FinalDecisions = [ trigMufastHypo.Decisions ] - summary.OutputLevel = DEBUG - step0 = parOR("step0", [ muFastStep ] ) - HLTsteps = seqAND("HLTsteps", [ step0, summary ] ) - - mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) - mon.InputDecision = "HLTChains" - mon.FinalDecisions = [ trigMufastHypo.Decisions, "WhateverElse" ] - mon.HLTSummary = "MonitoringSummary" - mon.OutputLevel = DEBUG - hltTop = seqOR( "hltTop", [ HLTsteps, mon] ) - - topSequence += hltTop - - if doEFSA==True and doL2SA==False and doL2CB==False: - summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) - summary.InputDecision = "HLTChains" - summary.FinalDecisions = [ trigMuonEFSAHypo.Decisions ] - summary.OutputLevel = DEBUG - step0 = parOR("step0", [ muonEFSAStep ] ) - HLTsteps = seqAND("HLTsteps", [ step0, summary ] ) - - mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) - mon.InputDecision = "HLTChains" - mon.FinalDecisions = [ trigMuonEFSAHypo.Decisions, "WhateverElse" ] - mon.HLTSummary = "MonitoringSummary" - mon.OutputLevel = DEBUG - hltTop = seqOR( "hltTop", [ HLTsteps, mon] ) - topSequence += hltTop - -if TriggerFlags.doMuon==True and TriggerFlags.doID==True and oldstuff: - if doL2SA==True and doL2CB==True and doEFSA==False: - from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg - summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) - summary.InputDecision = "HLTChains" - summary.FinalDecisions = [ trigmuCombHypo.Decisions ] - summary.OutputLevel = DEBUG - step0 = parOR("step0", [ muFastStep ] ) - step1 = parOR("step1", [ muCombStep ] ) - HLTsteps = seqAND("HLTsteps", [ step0, step1, summary ] ) - - mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) - mon.InputDecision = "HLTChains" - mon.FinalDecisions = [ trigmuCombHypo.Decisions, "WhateverElse" ] - mon.HLTSummary = "MonitoringSummary" - mon.OutputLevel = DEBUG - hltTop = seqOR( "hltTop", [ HLTsteps, mon] ) - - topSequence += hltTop - -if TriggerFlags.doMuon==True and TriggerFlags.doID==True and oldstuff: - if doL2SA==True and doEFSA==True and doL2CB==True: - from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg - summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) - summary.InputDecision = "HLTChains" - summary.FinalDecisions = [ trigMuonEFSAHypo.Decisions ] - summary.OutputLevel = DEBUG - step0 = parOR("step0", [ muFastStep ] ) - step1 = parOR("step1", [ muCombStep ] ) - step2 = parOR("step2", [ muonEFSAStep ] ) - HLTsteps = seqAND("HLTsteps", [ step0, step1, step2, summary ] ) - - mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) - mon.InputDecision = "HLTChains" - mon.FinalDecisions = [ trigMuonEFSAHypo.Decisions, "WhateverElse" ] - mon.HLTSummary = "MonitoringSummary" - mon.OutputLevel = DEBUG - hltTop = seqOR( "hltTop", [ HLTsteps, mon] ) - - topSequence += hltTop - - -def TMEF_TrkMaterialProviderTool(name='TMEF_TrkMaterialProviderTool',**kwargs): - from TrkMaterialProvider.TrkMaterialProviderConf import Trk__TrkMaterialProviderTool - kwargs.setdefault("UseCaloEnergyMeasurement", False) - return Trk__TrkMaterialProviderTool(name,**kwargs) + ##### Make all HLT ####### + from TrigUpgradeTest.HLTCFConfig import makeHLTTree + makeHLTTree(MenuChains) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_mu_menu.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_mu_menu.sh new file mode 100755 index 000000000000..30c35236067d --- /dev/null +++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_mu_menu.sh @@ -0,0 +1,5 @@ +#!/bin/sh +# art-type: build +# art-ci: master + +athena --threads=1 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/egamma_mu.menu.py -- GitLab From ec90230075d29a484210cd0d1516869c294613f8 Mon Sep 17 00:00:00 2001 From: Peter van Gemmeren <gemmeren@anl.gov> Date: Tue, 5 Jun 2018 15:32:38 -0500 Subject: [PATCH 041/562] Do not remove unused TagMetaDataStore as it crashes Simulation (to be investigated). Former-commit-id: 3be6dc5e9bff56beaeddb58f02d9d5a83b1bc504 --- .../src/EventSelectorAthenaPool.cxx | 10 ++++++++++ .../src/EventSelectorAthenaPool.h | 1 + 2 files changed, 11 insertions(+) diff --git a/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.cxx b/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.cxx index 8f8fd83306ce..e1a60aca6854 100755 --- a/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.cxx +++ b/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.cxx @@ -48,6 +48,7 @@ EventSelectorAthenaPool::EventSelectorAthenaPool(const std::string& name, ISvcLo m_beginIter(0), m_endIter(0), m_activeStoreSvc("ActiveStoreSvc", name), + m_tagDataStore("StoreGateSvc/TagMetaDataStore", name), m_poolCollectionConverter(0), m_headerIterator(0), m_guid(), @@ -155,6 +156,11 @@ StatusCode EventSelectorAthenaPool::initialize() { ATH_MSG_FATAL("Cannot get " << m_athenaPoolCnvSvc.typeAndName() << "."); return(StatusCode::FAILURE); } + // Get TagMetaDataStore + if (!m_tagDataStore.retrieve().isSuccess()) { + ATH_MSG_FATAL("Cannot get " << m_tagDataStore.typeAndName() << "."); + return(StatusCode::FAILURE); + } // Get CounterTool (if configured) if (!m_counterTool.empty() && !m_counterTool.retrieve().isSuccess()) { ATH_MSG_FATAL("Cannot get CounterTool."); @@ -464,6 +470,10 @@ StatusCode EventSelectorAthenaPool::finalize() { if (!m_helperTools.release().isSuccess()) { ATH_MSG_WARNING("Cannot release " << m_helperTools); } + // Release TagMetaDataStore + if (!m_tagDataStore.release().isSuccess()) { + ATH_MSG_WARNING("Cannot release " << m_tagDataStore.typeAndName() << "."); + } // Release AthenaPoolCnvSvc if (!m_athenaPoolCnvSvc.release().isSuccess()) { ATH_MSG_WARNING("Cannot release " << m_athenaPoolCnvSvc.typeAndName() << "."); diff --git a/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.h b/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.h index 2c1b42787670..e3801bbb53b9 100755 --- a/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.h +++ b/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.h @@ -145,6 +145,7 @@ private: // data EventContextAthenaPool* m_endIter; ServiceHandle<ActiveStoreSvc> m_activeStoreSvc; + ServiceHandle<StoreGateSvc> m_tagDataStore; mutable PoolCollectionConverter* m_poolCollectionConverter; mutable pool::ICollectionCursor* m_headerIterator; -- GitLab From b716a01f27b1809a6b0e69c3ad64279fb68ebd54 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Tue, 5 Jun 2018 22:58:31 +0200 Subject: [PATCH 042/562] Added an algorithm useful for testing full scal algorithms Former-commit-id: e45718bfb3ccda900985ac4f7cf7ca5ec8470b1f --- .../L1Decoder/src/CreateFullScanRoI.cxx | 41 +++++++++++++++++++ .../L1Decoder/src/CreateFullScanRoI.h | 30 ++++++++++++++ .../src/components/L1Decoder_entries.cxx | 2 + 3 files changed, 73 insertions(+) create mode 100644 Trigger/TrigSteer/L1Decoder/src/CreateFullScanRoI.cxx create mode 100644 Trigger/TrigSteer/L1Decoder/src/CreateFullScanRoI.h diff --git a/Trigger/TrigSteer/L1Decoder/src/CreateFullScanRoI.cxx b/Trigger/TrigSteer/L1Decoder/src/CreateFullScanRoI.cxx new file mode 100644 index 000000000000..bb8235213dbe --- /dev/null +++ b/Trigger/TrigSteer/L1Decoder/src/CreateFullScanRoI.cxx @@ -0,0 +1,41 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "CreateFullScanRoI.h" + +CreateFullScanRoI::CreateFullScanRoI(const std::string& name, ISvcLocator* pSvcLocator) : + AthReentrantAlgorithm(name, pSvcLocator) +{ +} + +CreateFullScanRoI::~CreateFullScanRoI() +{ +} + +StatusCode CreateFullScanRoI::initialize() +{ + //ATH_MSG_DEBUG("Use macros for logging!"); + CHECK( m_roisKey.initialize() ); + + return StatusCode::SUCCESS; +} + +StatusCode CreateFullScanRoI::finalize() +{ + return StatusCode::SUCCESS; +} + +StatusCode CreateFullScanRoI::execute_r(const EventContext& context) const +{ + + auto roisCollection = std::make_unique<TrigRoiDescriptorCollection>(); + auto roi = new TrigRoiDescriptor( true ); // this is FullScan RoI + roisCollection->push_back( roi ); + + + auto handle = SG::makeHandle( m_roisKey, context ); + CHECK( handle.record( std::move( roisCollection ) ) ); + return StatusCode::SUCCESS; +} + diff --git a/Trigger/TrigSteer/L1Decoder/src/CreateFullScanRoI.h b/Trigger/TrigSteer/L1Decoder/src/CreateFullScanRoI.h new file mode 100644 index 000000000000..884eec97ca47 --- /dev/null +++ b/Trigger/TrigSteer/L1Decoder/src/CreateFullScanRoI.h @@ -0,0 +1,30 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ +#ifndef L1DECODER_CREATEFULLSCANROI_H +#define L1DECODER_CREATEFULLSCANROI_H + +// Framework includes +#include "AthenaBaseComps/AthReentrantAlgorithm.h" +#include "TrigSteeringEvent/TrigRoiDescriptorCollection.h" + +#include <string> + +/** + * @class CreateFullScanRoI + * @brief in every event creates collection with single FullScanRoI (for testing MET, Jet and similar FS reco) + **/ +class CreateFullScanRoI : public AthReentrantAlgorithm { +public: + CreateFullScanRoI(const std::string& name, ISvcLocator* pSvcLocator); + virtual ~CreateFullScanRoI() override; + + virtual StatusCode initialize() override; + virtual StatusCode execute_r(const EventContext& context) const override; + virtual StatusCode finalize() override; + +private: + SG::WriteHandleKey<TrigRoiDescriptorCollection> m_roisKey{ this, "RoIsKey", "FullScanRoIs", "name of the output"}; +}; + +#endif // L1DECODER_CREATEFULLSCANROI_H diff --git a/Trigger/TrigSteer/L1Decoder/src/components/L1Decoder_entries.cxx b/Trigger/TrigSteer/L1Decoder/src/components/L1Decoder_entries.cxx index 907f6e4bbe69..93cdece0d64d 100644 --- a/Trigger/TrigSteer/L1Decoder/src/components/L1Decoder_entries.cxx +++ b/Trigger/TrigSteer/L1Decoder/src/components/L1Decoder_entries.cxx @@ -15,6 +15,7 @@ #include "../MURoIsUnpackingTool.h" #include "../RerunRoIsUnpackingTool.h" #include "../PrescalingEmulationTool.h" +#include "../CreateFullScanRoI.h" DECLARE_COMPONENT( L1CaloDecoder ) @@ -34,3 +35,4 @@ DECLARE_COMPONENT( JRoIsUnpackingTool ) DECLARE_COMPONENT( TAURoIsUnpackingTool ) DECLARE_COMPONENT( PrescalingEmulationTool ) DECLARE_COMPONENT( RerunRoIsUnpackingTool ) +DECLARE_COMPONENT( CreateFullScanRoI ) -- GitLab From 38023f96c846a7f5edadacf055fd69e614e6bb14 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Tue, 5 Jun 2018 22:59:33 +0200 Subject: [PATCH 043/562] Fixed issues in new MET codes, jobs now do run Former-commit-id: ccc58e435302f9e1397789167709c1a9d20ed14f --- .../TrigCaloRec/src/HLTCaloCellMaker.cxx | 92 +++++++++---------- .../TrigEFMissingET/share/testMET.py | 38 +++++--- .../TrigEFMissingET/src/EFMissingETAlgMT.cxx | 4 +- .../src/EFMissingETFromCellsMT.cxx | 23 ++--- .../src/EFMissingETFromCellsMT.h | 2 +- 5 files changed, 86 insertions(+), 73 deletions(-) diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx index eb8c91fb0e97..c97d623c8de2 100644 --- a/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx +++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx @@ -2,7 +2,7 @@ * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration * */ - /* +/* * NAME: HLTCaloCellMaker.cxx * PACKAGE: Trigger/TrigDataAccess/TrigCaloDataAccessSvc * @@ -20,11 +20,11 @@ HLTCaloCellMaker::HLTCaloCellMaker(const std::string & name, ISvcLocator* pSvcLo m_dataAccessSvc( "TrigCaloDataAccessSvc/TrigCaloDataAccessSvc", name ), m_roiMode(true) { - declareProperty("RoIs", m_roiCollectionKey = std::string("OutputRoIs"), "RoIs to read in"); - declareProperty("CellsVName", m_cellContainerVKey = std::string("CellsVClusters"), "Calo cells container"); - declareProperty("CellsName", m_cellContainerKey = std::string("CellsClusters"), "Calo cells container"); - declareProperty("TrigDataAccessMT",m_dataAccessSvc,"Data Access for LVL2 Calo Algorithms in MT"); - declareProperty("roiMode",m_roiMode,"RoiMode roi->CaloCellCollection"); + declareProperty("RoIs", m_roiCollectionKey = std::string("OutputRoIs"), "RoIs to read in"); + declareProperty("CellsVName", m_cellContainerVKey = std::string("CellsVClusters"), "Calo cells container"); + declareProperty("CellsName", m_cellContainerKey = std::string("CellsClusters"), "Calo cells container"); + declareProperty("TrigDataAccessMT",m_dataAccessSvc,"Data Access for LVL2 Calo Algorithms in MT"); + declareProperty("roiMode",m_roiMode,"RoiMode roi->CaloCellCollection"); } HLTCaloCellMaker::~HLTCaloCellMaker() @@ -32,13 +32,13 @@ HLTCaloCellMaker::~HLTCaloCellMaker() } StatusCode HLTCaloCellMaker::initialize() { - ATH_CHECK( m_roiCollectionKey.initialize() ); - if ( m_roiMode ) - ATH_CHECK( m_cellContainerKey.initialize() ); - else - ATH_CHECK( m_cellContainerVKey.initialize() ); - CHECK( m_dataAccessSvc.retrieve() ); - return StatusCode::SUCCESS; + ATH_CHECK( m_roiCollectionKey.initialize() ); + if ( m_roiMode ) + ATH_CHECK( m_cellContainerKey.initialize() ); + else + ATH_CHECK( m_cellContainerVKey.initialize() ); + CHECK( m_dataAccessSvc.retrieve() ); + return StatusCode::SUCCESS; } StatusCode HLTCaloCellMaker::execute_r( const EventContext& context ) const { @@ -49,43 +49,43 @@ StatusCode HLTCaloCellMaker::execute_r( const EventContext& context ) const { // datahandle if ( m_roiMode ) { - if ( roiCollection->size() > 1 ) - ATH_MSG_INFO ( "roiMode but multiple rois found, will only use the first one"); - SG::WriteHandle<ConstDataVector<CaloCellContainer> > cellContainer = SG::WriteHandle<ConstDataVector<CaloCellContainer> > ( m_cellContainerKey, context ); - auto cdv = CxxUtils::make_unique<ConstDataVector<CaloCellContainer> >(SG::VIEW_ELEMENTS); - for( const TrigRoiDescriptor* roiDescriptor : *roiCollection) { - if ( roiDescriptor->isFullscan() ) { - m_dataAccessSvc->loadFullCollections( context, *cdv ); + if ( roiCollection->size() > 1 ) + ATH_MSG_INFO ( "roiMode but multiple rois found, will only use the first one"); + SG::WriteHandle<ConstDataVector<CaloCellContainer> > cellContainer = SG::WriteHandle<ConstDataVector<CaloCellContainer> > ( m_cellContainerKey, context ); + auto cdv = CxxUtils::make_unique<ConstDataVector<CaloCellContainer> >(SG::VIEW_ELEMENTS); + for( const TrigRoiDescriptor* roiDescriptor : *roiCollection) { + if ( roiDescriptor->isFullscan() ) { + m_dataAccessSvc->loadFullCollections( context, *cdv ); - } else { - LArTT_Selector<LArCellCont> sel; - m_dataAccessSvc->loadCollections( context, *roiDescriptor, TTEM, 2, sel ); - for( const auto cell : sel ) {cdv->push_back( cell ); } - } - auto ss = cellContainer.record( std::move(cdv) ); - ATH_CHECK( ss ); - return StatusCode::SUCCESS; - } + } else { + LArTT_Selector<LArCellCont> sel; + m_dataAccessSvc->loadCollections( context, *roiDescriptor, TTEM, 2, sel ); + for( const auto cell : sel ) {cdv->push_back( cell ); } + } + auto ss = cellContainer.record( std::move(cdv) ); + ATH_CHECK( ss ); + return StatusCode::SUCCESS; + } } else { - SG::WriteHandle<ConstDataVector<CaloCellContainerVector> > cellContainerV( m_cellContainerVKey, context ); - auto cdv = CxxUtils::make_unique<ConstDataVector<CaloCellContainerVector> >(); - ATH_CHECK( cellContainerV.record( std::move(cdv) ) ); - for( const TrigRoiDescriptor* roiDescriptor : *roiCollection) { - if ( roiDescriptor->isFullscan() ) { - auto c = std::make_unique<ConstDataVector<CaloCellContainer> >(SG::VIEW_ELEMENTS); - m_dataAccessSvc->loadFullCollections( context, *c ); - cellContainerV->push_back( c.release()->asDataVector() ); + SG::WriteHandle<ConstDataVector<CaloCellContainerVector> > cellContainerV( m_cellContainerVKey, context ); + auto cdv = CxxUtils::make_unique<ConstDataVector<CaloCellContainerVector> >(); + ATH_CHECK( cellContainerV.record( std::move(cdv) ) ); + for( const TrigRoiDescriptor* roiDescriptor : *roiCollection) { + if ( roiDescriptor->isFullscan() ) { + auto c = std::make_unique<ConstDataVector<CaloCellContainer> >(SG::VIEW_ELEMENTS); + m_dataAccessSvc->loadFullCollections( context, *c ); + cellContainerV->push_back( c.release()->asDataVector() ); - } else { - LArTT_Selector<LArCellCont> sel; - m_dataAccessSvc->loadCollections( context, *roiDescriptor, TTEM, 2, sel ); - auto c = std::make_unique<ConstDataVector<CaloCellContainer> >(SG::VIEW_ELEMENTS); - int cc(0); - for( const auto cell : sel ) {c->push_back( cell ); cc++;} - cellContainerV->push_back( c.release()->asDataVector() ); - } - } + } else { + LArTT_Selector<LArCellCont> sel; + m_dataAccessSvc->loadCollections( context, *roiDescriptor, TTEM, 2, sel ); + auto c = std::make_unique<ConstDataVector<CaloCellContainer> >(SG::VIEW_ELEMENTS); + int cc(0); + for( const auto cell : sel ) {c->push_back( cell ); cc++;} + cellContainerV->push_back( c.release()->asDataVector() ); + } + } } diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/share/testMET.py b/Trigger/TrigAlgorithms/TrigEFMissingET/share/testMET.py index 5af3f2c6c36c..9a395cf96f63 100644 --- a/Trigger/TrigAlgorithms/TrigEFMissingET/share/testMET.py +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/share/testMET.py @@ -7,12 +7,6 @@ include("TrigUpgradeTest/testHLT_MT.py") from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() -isData = False -if globalflags.InputFormat.is_bytestream(): - isData = True - - - import math from TrigT2CaloCommon.TrigT2CaloCommonConf import TrigCaloDataAccessSvc#, TestCaloDataAccess from AthenaMonitoring.GenericMonitoringTool import GenericMonitoringTool, defineHistogram @@ -27,9 +21,13 @@ svcMgr += TrigCaloDataAccessSvc() svcMgr.TrigCaloDataAccessSvc.MonTool = mon svcMgr.TrigCaloDataAccessSvc.OutputLevel=INFO +from L1Decoder.L1DecoderConf import CreateFullScanRoI +topSequence += CreateFullScanRoI() + from TrigCaloRec.TrigCaloRecConf import HLTCaloCellMaker cellMakerAlgo = HLTCaloCellMaker("CellMakerMT", roiMode=True) -cellMakerAlgo.RoIs="METRoIs" +cellMakerAlgo.RoIs="FullScanRoIs" + cellMakerAlgo.OutputLevel=VERBOSE cellMakerAlgo.CellsName="cells" topSequence += cellMakerAlgo @@ -37,13 +35,27 @@ topSequence += cellMakerAlgo from TrigEFMissingET.TrigEFMissingETConf import EFMissingETAlgMT, EFMissingETFromCellsMT -# cellTool = EFMissingETFromCellsMT( name="METFromCellsTool", CaloNoiseTool=ToolSvc.CaloNoiseToolDefault ) -# cellTool.CellsCollection = "cells" +cellTool = EFMissingETFromCellsMT( name="METFromCellsTool" ) +cellTool.CellsCollection = "cells" + +metAlg = EFMissingETAlgMT( name="EFMET" ) + + +metAlg.METTools=[ cellTool ] +#metAlg.OutputLevel=DEBUG +metMon = GenericMonitoringTool("METMonTool") +metMon.Histograms = [ defineHistogram( "TIME_Total", title="Time spent Alg", xbins=100, xmin=0, xmax=100 ), + defineHistogram( "TIME_Loop", title="Time spent in Tools loop", xbins=100, xmin=0, xmax=100 )] +from TrigEFMissingET.TrigEFMissingETMonitoring import * +metMon.Histograms = [ hEx_log, hEy_log, hEz_log, hMET_log, hSumEt_log ] +metMon.Histograms += [ hMET_lin, hSumEt_lin ] +metMon.Histograms += [ hXS, hMETPhi, hMETStatus] +metMon.Histograms += [ hCompEx, hCompEy, hCompEz, hCompEt, hCompSumEt, hCompSumE ] +metMon.Histograms += [ hCompEt_lin, hCompSumEt_lin ] -# metAlg = EFMissingETAlgMT( name="EFMET" ) -# metAlg.METTools=[ cellTool ] -# metAlg += cellTool -# topSequence += metAlg +metAlg.MonTool = metMon +#metAlg += cellTool +topSequence += metAlg # from TrigCaloRec.TrigCaloRecConfig import TrigCaloClusterMakerMT_topo diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETAlgMT.cxx b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETAlgMT.cxx index c112085c3e34..df39c0b71f07 100644 --- a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETAlgMT.cxx +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETAlgMT.cxx @@ -43,8 +43,8 @@ double toLinGeV( double x, double fallback = 0, double epsilon = 1e-6 ) { StatusCode EFMissingETAlgMT::execute_r( const EventContext& context ) const { ATH_MSG_DEBUG ( "Executing " << name() << "..." ); using namespace Monitored; - auto totalTimer = MonitoredTimer::declare( "Total" ); - auto loopTimer = MonitoredTimer::declare( "Loop" ); + auto totalTimer = MonitoredTimer::declare( "TIME_Total" ); + auto loopTimer = MonitoredTimer::declare( "TIME_Loop" ); auto metContainer = std::make_unique<xAOD::TrigMissingETContainer>(); auto metAuxContainer = std::make_unique<xAOD::TrigMissingETAuxContainer>(); diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.cxx b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.cxx index b6b0b9413d9f..3a38c6d6bfd8 100644 --- a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.cxx +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.cxx @@ -24,7 +24,8 @@ StatusCode EFMissingETFromCellsMT::initialize() m_maxThreshold = m_rmsOneSided; if ( m_rmsOneSided < fabsf( m_rmsTwoSided ) ) m_maxThreshold = fabsf( m_rmsTwoSided ); - CHECK( m_noiseTool.retrieve() ); + + //CHECK( m_noiseTool.retrieve() ); return StatusCode::SUCCESS; } @@ -32,11 +33,11 @@ StatusCode EFMissingETFromCellsMT::initialize() StatusCode EFMissingETFromCellsMT::update( xAOD::TrigMissingET */*met*/, TrigEFMissingEtHelper *metHelper ) const { using namespace Monitored; - auto totalTimer = MonitoredTimer::declare( "Total" ); + auto totalTimer = MonitoredTimer::declare( "TIME_Total" ); const EventContext context{ Gaudi::Hive::currentContext() }; auto caloCellsHandle = SG::makeHandle( m_cellsKey ); - auto loopTimer = MonitoredTimer::declare( "Loop" ); + auto loopTimer = MonitoredTimer::declare( "TIME_Loop" ); auto countUsedCells = MonitoredScalar::declare<unsigned>( "UsedCells", 0 ); // now it is time to iterate over the cells @@ -56,11 +57,11 @@ StatusCode EFMissingETFromCellsMT::update( xAOD::TrigMissingET */*met*/, //TB not sure about skipping logic, looks incorrect in the original code // - if ( m_noiseTool ) { // == noise suppression required - const bool noiseCutPassed = true; // noiseCut( cell ); - if ( not noiseCutPassed ) - continue; - } + // if ( m_noiseTool ) { // == noise suppression required + // const bool noiseCutPassed = true; // noiseCut( cell ); + // if ( not noiseCutPassed ) + // continue; + // } countUsedCells = countUsedCells + 1; @@ -84,9 +85,9 @@ StatusCode EFMissingETFromCellsMT::update( xAOD::TrigMissingET */*met*/, if ( not m_makeRobustness) continue; if ( not m_doCellNoiseSupp || (m_doCellNoiseSupp && m_MinCellSNratio[cDDE->getSampling()] > m_maxThreshold)) { - if (fabs(E) < m_MinCellSNratio[cDDE->getSampling()] * - m_noiseTool->getNoise( cell, ICalorimeterNoiseTool::TOTALNOISE)) - continue; + // if (fabs(E) < m_MinCellSNratio[cDDE->getSampling()] * + // m_noiseTool->getNoise( cell, ICalorimeterNoiseTool::TOTALNOISE)) + continue; } float time = cell->time() * 1e-3; // ns diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.h b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.h index 89433a3b8909..18089672c45f 100644 --- a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.h +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.h @@ -51,7 +51,7 @@ class EFMissingETFromCellsMT: public extends<AthAlgTool, IMissingETTool> { SG::ReadHandleKey<CaloCellContainer> m_cellsKey { this, "CellsCollection", "CaloCells", "Collection containg all cels" }; - PublicToolHandle<ICalorimeterNoiseTool> m_noiseTool { this, "CaloNoiseTool", "CaloNoiseTool/CaloNoiseToolDefault", "Tool Handle for noise tool" }; + //PublicToolHandle<ICalorimeterNoiseTool> m_noiseTool { this, "CaloNoiseTool", "CaloNoiseTool/CaloNoiseToolDefault", "Tool Handle for noise tool" }; }; -- GitLab From cf10a08a44f134a0d6fe5009b99a50c46dfb1075 Mon Sep 17 00:00:00 2001 From: Tamara Vazquez Schroeder <tamara.vazquez.schroeder@cern.ch> Date: Tue, 5 Jun 2018 13:26:36 +0000 Subject: [PATCH 044/562] Merge branch 'ATLASRECTS_4459' into '21.0' Fix for ATLASRECTS-4459 See merge request atlas/athena!11829 (cherry picked from commit 47a48fb5a554227d1b5a2bd83c14376cac105273 [formerly 6b6af42f5894bbe2b21e2681aa8544bc65a18f46]) b5eb112d Fix for ATLASRECTS-4459 Former-commit-id: 4c7072a090cd5190a19d9a48986a0b9127287dc2 --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../MuonID/MuonSelectorTools/Root/MuonSelectionTool.cxx | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 diff --git a/PhysicsAnalysis/MuonID/MuonSelectorTools/Root/MuonSelectionTool.cxx b/PhysicsAnalysis/MuonID/MuonSelectorTools/Root/MuonSelectionTool.cxx index 6897e0783d98..b3065bcb5b26 100644 --- a/PhysicsAnalysis/MuonID/MuonSelectorTools/Root/MuonSelectionTool.cxx +++ b/PhysicsAnalysis/MuonID/MuonSelectorTools/Root/MuonSelectionTool.cxx @@ -282,7 +282,7 @@ namespace CP { // LOOSE / MEDIUM / TIGHT WP const xAOD::TrackParticle* idtrack = mu.trackParticle( xAOD::Muon::InnerDetectorTrackParticle ); const xAOD::TrackParticle* metrack = mu.trackParticle( xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle ); - if( idtrack && metrack ) { + if( idtrack && metrack && metrack->definingParametersCovMatrix()(4,4)>0 ) { float mePt = -999999., idPt = -999999.; if( !m_TurnOffMomCorr ) { // now using corrected ID/MS momenta -- GitLab From 6fd546c009dc9d85af20c787dd168e60cfe05d29 Mon Sep 17 00:00:00 2001 From: Tamara Vazquez Schroeder <tamara.vazquez.schroeder@cern.ch> Date: Tue, 5 Jun 2018 13:34:30 +0000 Subject: [PATCH 045/562] Merge branch 'ATLASRECTS_4483' into '21.0' Fix for bug in MuonTrackCleaner See merge request atlas/athena!11746 (cherry picked from commit af2515ac8acc6d0c9f88cbe068c5f2629ab79e9a [formerly 0d95f1d1dbdadb868314bebc92e3bbd397d7b2f7]) 4f566601 Fix for bug in MuonTrackCleaner Former-commit-id: dbecfe900d8990f2b04885e7a77a14f749afd7d8 --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../MuonTrackFinderTools/src/MuonTrackCleaner.cxx | 15 ++++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackCleaner.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackCleaner.cxx index 380c995baa06..e5802a2f151c 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackCleaner.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackCleaner.cxx @@ -893,17 +893,18 @@ namespace Muon { bool remove = hit->chId == chId && ( (removePhi && measuresPhi) || (removeEta && !measuresPhi) ); // hits that are flagged as outlier or hits in the chamber to be removed are added as Outlier if( !hit->useInFit || remove ){ - hit->useInFit = 0; if( msgLvl(MSG::DEBUG) && remove ) msg() << MSG::DEBUG << " removing hit " << m_idHelper->toString(hit->id) << " pull " << hit->resPull->pull().front() << endmsg; // add as outlier if( hit->inBounds ) tsos->push_back( MuonTSOSHelper::cloneTSOSWithUpdate( *hit->originalState, - *hit->meas, - *hit->pars, - Trk::TrackStateOnSurface::Outlier) ); + *hit->meas, + *hit->pars, + Trk::TrackStateOnSurface::Outlier) ); // if removed, add hit to vector of hits - if( remove ) result.removedHits.push_back(&*hit); + //but only if the hit was not already an outlier to be skipped! + if( remove && hit->useInFit) result.removedHits.push_back(&*hit); + hit->useInFit = 0; continue; } } @@ -922,12 +923,12 @@ namespace Muon { // fit new track if ( msgLvl(MSG::DEBUG) ) { - const DataVector<const Trk::TrackStateOnSurface>* states = track.trackStateOnSurfaces(); + const DataVector<const Trk::TrackStateOnSurface>* states = cleanedTrack->trackStateOnSurfaces(); int nStates = 0; if ( states ) nStates = states->size(); msg() << MSG::DEBUG << "removeChamber: Calling fit with hits: " << nStates; if ( msgLvl(MSG::VERBOSE) ) { - msg() << MSG::VERBOSE << std::endl << m_printer->printMeasurements( track ); + msg() << MSG::VERBOSE << std::endl << m_printer->printMeasurements( *cleanedTrack ); } msg() << endmsg; if( !cleanedTrack->perigeeParameters() ){ -- GitLab From ee020224506953561ac42b6a48c5170d78979f80 Mon Sep 17 00:00:00 2001 From: Tamara Vazquez Schroeder <tamara.vazquez.schroeder@cern.ch> Date: Tue, 5 Jun 2018 13:25:42 +0000 Subject: [PATCH 046/562] Merge branch '21.0-FCS-energy-sim-updates' into '21.0' Energy simulation and SimulationState updates See merge request atlas/athena!11846 (cherry picked from commit f7c9ef8cd4777bd117cbace9cb94a6067f8057c9 [formerly ed24b936a2cc408fdd19e9090b0352ae50bdee15]) 75c584db Energy simulation and SimulationState updates Former-commit-id: a0c529a5fa753ad5c715930caafc8d4934a71297 --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../TFCSPCAEnergyParametrization.h | 4 +- .../TFCSSimulationState.h | 3 + .../src/TFCSPCAEnergyParametrization.cxx | 114 +++++++----------- 4 files changed, 49 insertions(+), 72 deletions(-) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSPCAEnergyParametrization.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSPCAEnergyParametrization.h index f694f282e8e0..1f9f9d9ce5a7 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSPCAEnergyParametrization.h +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSPCAEnergyParametrization.h @@ -36,6 +36,9 @@ class TFCSPCAEnergyParametrization:public TFCSEnergyParametrization void clean(); void Print(Option_t *option = "") const; + + int do_rescale; + private: std::vector<int> m_RelevantLayers; @@ -45,7 +48,6 @@ class TFCSPCAEnergyParametrization:public TFCSEnergyParametrization std::vector<TVectorD*> m_SigmaValues; std::vector<TVectorD*> m_Gauss_means; std::vector<TVectorD*> m_Gauss_rms; - std::vector<TVectorD*> m_LowerBounds; std::vector<std::vector<TFCS1DFunction*> > m_cumulative; int m_numberpcabins; diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSSimulationState.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSSimulationState.h index 2aabffd5d981..f2ef1a4dc74a 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSSimulationState.h +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSSimulationState.h @@ -36,12 +36,15 @@ class TFCSSimulationState:public TObject void deposit(const CaloDetDescrElement* cellele, float E); void Print(Option_t *option="") const; + void set_SF(double mysf) {SF=mysf;} + double get_SF() {return SF;} void clear(); private: int m_Ebin; double m_Etot; // TO BE CLEANED UP! SHOULD ONLY STORE EITHER E OR EFRAC!!! + double SF; double m_E[CaloCell_ID_FCS::MaxSample]; double m_Efrac[CaloCell_ID_FCS::MaxSample]; diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSPCAEnergyParametrization.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSPCAEnergyParametrization.cxx index 3007f1c27cd9..bf3695b474dc 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSPCAEnergyParametrization.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSPCAEnergyParametrization.cxx @@ -23,6 +23,7 @@ TFCSPCAEnergyParametrization::TFCSPCAEnergyParametrization(const char* name, const char* title):TFCSEnergyParametrization(name,title) { m_numberpcabins=1; + do_rescale=1; } bool TFCSPCAEnergyParametrization::is_match_Ekin_bin(int Ekin_bin) const @@ -67,97 +68,71 @@ void TFCSPCAEnergyParametrization::simulate(TFCSSimulationState& simulstate,cons TVectorD* SigmaValues =m_SigmaValues[pcabin-1]; TVectorD* Gauss_means =m_Gauss_means[pcabin-1]; TVectorD* Gauss_rms =m_Gauss_rms[pcabin-1]; - TVectorD* LowerBounds =m_LowerBounds[pcabin-1]; std::vector<TFCS1DFunction*> cumulative=m_cumulative[pcabin-1]; TRandom3* Random3=new TRandom3(); Random3->SetSeed(0); - std::vector<std::string> layer; std::vector<int> layerNr; for(unsigned int i=0;i<m_RelevantLayers.size();i++) - layerNr.push_back(m_RelevantLayers[i]); - for(unsigned int i=0;i<layerNr.size();i++) - { - std::string thislayer=Form("layer%i",layerNr[i]); - layer.push_back(thislayer); - } - layer.push_back("totalE"); + layerNr.push_back(m_RelevantLayers[i]); double* vals_gauss_means=(double*)Gauss_means->GetMatrixArray(); double* vals_gauss_rms =Gauss_rms->GetMatrixArray(); - double* vals_lowerBounds=LowerBounds->GetMatrixArray(); - double *output_data = new double[layer.size()] ; - double *input_data = new double[layer.size()] ; + double *output_data = new double[layerNr.size()+1]; + double *input_data = new double[layerNr.size()+1]; - for(unsigned int l=0;l<layer.size();l++) - { - double mean=vals_gauss_means[l]; - double rms =vals_gauss_rms[l]; - double gauszz=Random3->Gaus(mean,rms); - input_data[l]=gauszz; - } + for(unsigned int l=0;l<=layerNr.size();l++) + { + double mean=vals_gauss_means[l]; + double rms =vals_gauss_rms[l]; + double gauszz=Random3->Gaus(mean,rms); + input_data[l]=gauszz; + } - P2X(SigmaValues, MeanValues, EV, layer.size(), input_data, output_data, layer.size()); + P2X(SigmaValues, MeanValues, EV, layerNr.size()+1, input_data, output_data, layerNr.size()+1); - double *simdata_uniform = new double[layer.size()]; - double *simdata = new double[layer.size()]; - double *simdata_scaled = new double[layer.size()]; + double *simdata = new double[layerNr.size()+1]; double sum_fraction=0.0; - for(unsigned int l=0;l<layer.size();l++) - { - simdata_uniform[l]=(TMath::Erf(output_data[l]/1.414213562)+1)/2.f; - - if(simdata_uniform[l]<vals_lowerBounds[l]) simdata_uniform[l]=vals_lowerBounds[l]; - - simdata[l]=cumulative[l]->rnd_to_fct(simdata_uniform[l]); - - if(simdata[l]<0) simdata[l]=0; - if(layer[l]!="totalE" && simdata[l]>1) simdata[l]=1; - if(layer[l]!="totalE") sum_fraction+=simdata[l]; - - } - - double scale=1.0/sum_fraction; - - sum_fraction=0.0; - - for(unsigned int l=0;l<layer.size();l++) - { - if(layer[l]!="totalE") - { - simdata_scaled[l]=simdata[l]*scale; - if(l<layerNr.size()) - { - sum_fraction+=simdata_scaled[l]; - } - } - } - - double total_energy=simdata[layer.size()-1]*simulstate.E()/Ekin_nominal(); - //double total_energy=simdata[layer.size()-1]; + for(unsigned int l=0;l<=layerNr.size();l++) + { + double simdata_uniform=(TMath::Erf(output_data[l]/1.414213562)+1)/2.f; + + simdata[l]=cumulative[l]->rnd_to_fct(simdata_uniform); + + if(l!=layerNr.size()) //sum up the fractions, but not the totalE + sum_fraction+=simdata[l]; + } + + double scalefactor=1.0/sum_fraction; + if(!do_rescale) scalefactor=1.0; + + for(unsigned int l=0;l<layerNr.size();l++) + { + simdata[l]*=scalefactor; + } + + double total_energy=simdata[layerNr.size()]*simulstate.E()/Ekin_nominal(); simulstate.set_E(total_energy); ATH_MSG_DEBUG("set E to total_energy="<<total_energy); for(int s=0;s<CaloCell_ID_FCS::MaxSample;s++) - { - double energyfrac=0.0; - for(unsigned int l=0;l<layerNr.size();l++) - { - if(layerNr[l]==s) - energyfrac=simdata_scaled[l]; - } - simulstate.set_Efrac(s,energyfrac); - simulstate.set_E(s,energyfrac*total_energy); - } + { + double energyfrac=0.0; + for(unsigned int l=0;l<layerNr.size();l++) + { + if(layerNr[l]==s) + energyfrac=simdata[l]; + } + simulstate.set_Efrac(s,energyfrac); + simulstate.set_E(s,energyfrac*total_energy); + simulstate.set_SF(scalefactor); + } delete Random3; delete [] output_data; delete [] input_data; delete [] simdata; - delete [] simdata_uniform; - delete [] simdata_scaled; - } @@ -228,14 +203,12 @@ bool TFCSPCAEnergyParametrization::loadInputs(TFile* file, std::string folder) TVectorD* SigmaValues =(TVectorD*)gDirectory->Get("SigmaValues"); TVectorD* Gauss_means =(TVectorD*)gDirectory->Get("Gauss_means"); TVectorD* Gauss_rms =(TVectorD*)gDirectory->Get("Gauss_rms"); - TVectorD* LowerBounds =(TVectorD*)gDirectory->Get("LowerBounds"); if(symCov == NULL) {ATH_MSG_WARNING("TFCSPCAEnergyParametrization::symCov in pcabin "<<bin<<" is null!"); load_ok=false;} if(MeanValues == NULL) {ATH_MSG_WARNING("TFCSPCAEnergyParametrization::MeanValues in pcabin "<<bin<<" is null!"); load_ok=false;} if(SigmaValues == NULL) {ATH_MSG_WARNING("TFCSPCAEnergyParametrization::SigmaValues in pcabin "<<bin<<" is null!"); load_ok=false;} if(Gauss_means == NULL) {ATH_MSG_WARNING("TFCSPCAEnergyParametrization::Gauss_means in pcabin "<<bin<<" is null!"); load_ok=false;} if(Gauss_rms == NULL) {ATH_MSG_WARNING("TFCSPCAEnergyParametrization::Gause_rms in pcabin "<<bin<<" is null!"); load_ok=false;} - if(LowerBounds == NULL) {ATH_MSG_WARNING("TFCSPCAEnergyParametrization::LowerBounds in pcabin "<<bin<<" is null!"); load_ok=false;} if(!load_ok) return false; @@ -246,7 +219,6 @@ bool TFCSPCAEnergyParametrization::loadInputs(TFile* file, std::string folder) m_SigmaValues.push_back(SigmaValues); m_Gauss_means.push_back(Gauss_means); m_Gauss_rms.push_back(Gauss_rms); - m_LowerBounds.push_back(LowerBounds); std::vector<std::string> layer; std::vector<int> layerNr; -- GitLab From af8f88760f447a5315806156234c386dd56a94cc Mon Sep 17 00:00:00 2001 From: Tamara Vazquez Schroeder <tamara.vazquez.schroeder@cern.ch> Date: Tue, 5 Jun 2018 13:41:02 +0000 Subject: [PATCH 047/562] Merge branch '21.0-reenableCaloCellVecMonInCollisions' into '21.0' CaloCellVecMon reenabled in Main and ZeroBias See merge request atlas/athena!10947 (cherry picked from commit e35a2a737fe80ef5b49dcc5e2572a2303cdd80a1 [formerly a5f5d37fefe8fd7c6b3cbb14fe35cd5559b4f198]) f32b8169 CaloCellVecMon reenabled in Main and ZeroBias f3f618b7 Merge remote-tracking branch 'upstream/21.0' into 21.0-reenableCaloCellVecMonInCollisions de3869b4 Fixing capital typo Former-commit-id: 1005eaeae77df6ba0e63f8e2cd90186ea05ba452 --- .../CaloMonitoring/share/CaloCellVecMonCollisions_jobOpt.py | 2 +- Event/EventContainers/test/ID_ContainerTest.h | 0 2 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Calorimeter/CaloMonitoring/share/CaloCellVecMonCollisions_jobOpt.py b/Calorimeter/CaloMonitoring/share/CaloCellVecMonCollisions_jobOpt.py index 81b2e6d7c12b..ed1acda36945 100644 --- a/Calorimeter/CaloMonitoring/share/CaloCellVecMonCollisions_jobOpt.py +++ b/Calorimeter/CaloMonitoring/share/CaloCellVecMonCollisions_jobOpt.py @@ -37,7 +37,7 @@ ToolSvc+=theLArBadChannelTool # All 2D plot occupancy are activate only for express and cosmiccalo -if (rec.triggerStream()=='CosmicCalo' or rec.triggerStream()=='express') or (DQMonFlags.monManEnvironment() == 'online'): +if (rec.triggerStream()=='CosmicCalo' or rec.triggerStream()=='express' or rec.triggerStream()=='Main' or rec.triggerStream()=='ZeroBias') or (DQMonFlags.monManEnvironment() == 'online'): do2DOcc = True else: do2DOcc = False diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 -- GitLab From 281b516a32835d4a278d0a59cb8fc680f3d2b1c2 Mon Sep 17 00:00:00 2001 From: Sara Alderweireldt <sara.alderweireldt@cern.ch> Date: Tue, 5 Jun 2018 14:33:25 +0000 Subject: [PATCH 048/562] Merge branch 'cherry-pick-265465edc2 [formerly dc7232fa07]-21.1' into '21.1' Sweeping !11872 from 21.1-dev to 21.1. Fix chain counts in the chain parser utility See merge request atlas/athena!11883 (cherry picked from commit e71d159f6422d9b484e2da0af0181f7474d7005b [formerly 2c1c4646ff9402de4ff8b5829b8d572c5ad5db5c]) 2aa279e7 Merge branch '21.1-dev-2018-05-15' into '21.1-dev' Former-commit-id: 9818f03e67faf45ca5003db5832848c4f4a12007 --- .../TrigInDetAnalysisUser/Analysis/src/chainparser.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/chainparser.cxx b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/chainparser.cxx index 246b928c7086..0fb234432a51 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/chainparser.cxx +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/chainparser.cxx @@ -237,6 +237,7 @@ int main( int argc, char** argv ) { chains.insert( chain_map::value_type( "MuonPurity", "_mu" ) ); chains.insert( chain_map::value_type( "TauPurity", "_tau" ) ); chains.insert( chain_map::value_type( "BjetPurity", "_j" ) ); + chains.insert( chain_map::value_type( "FTKPurity", "" ) ); if ( sig != "" ) chains.insert( chain_map::value_type( sig, pat ) ); @@ -284,6 +285,7 @@ int main( int argc, char** argv ) { else if ( expl[index] == "TRIDT" ) { if ( expl[index+2] == "Expert" && !purity ) expected_size = 7-diff; else if ( expl[index+2] == "Shifter" && contains(expl[3],"etVtx") ) expected_size = 7-diff; + else if ( expl[index+3] == "Fullscan" && purity ) expected_size = 7-diff; else if ( expl[index+2] == "Shifter" || purity ) expected_size = 6-diff; else { std::cerr << "unknown HIST type " << expl[index+2] << std::endl; @@ -297,7 +299,10 @@ int main( int argc, char** argv ) { if ( expl.size() > expected_size ) { - int counts = std::atoi(expl[expected_size].c_str()); + int counts = std::atof(expl[expected_size].c_str()); + + // for ( size_t ie=0 ; ie<expl.size() ; ie++ ) std::cout << ie << " " << expl[ie] << " / "; + // std::cout << "counts: " << counts << " (" << expected_size << ")" << std::endl; /// ignore chains with no entries ( could print out as problem chains if required) if ( counts >= userthreshold ) { -- GitLab From 8b83edfc32b790da9a12e2b2ef71093f5d5a340e Mon Sep 17 00:00:00 2001 From: John Derek Chapman <chapman@hep.phy.cam.ac.uk> Date: Tue, 5 Jun 2018 08:39:13 +0000 Subject: [PATCH 049/562] Merge branch '21.3-MM-boardFlip' into '21.3' MM_Digitization: Board flipping in strip simulation was done one too many times See merge request atlas/athena!11804 (cherry picked from commit ce87dcd00a5ad67520d65f478f7ec58725692517 [formerly ce1ca6e079743c845172abd261ba6407b6b832cf]) 90423a94 MM_Digitization: Board flipping in strip simulation was done one too many times Former-commit-id: bdbb3519d5abbc1e06018c4fb0860e4c2434e494 --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../MM_Digitization/src/MM_DigitizationTool.cxx | 4 ---- 2 files changed, 4 deletions(-) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx index 749183358d37..51080ba4fdc6 100644 --- a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx +++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx @@ -826,10 +826,6 @@ StatusCode MM_DigitizationTool::doDigitization() { float inAngle_XZ = 90. - inAngleCompliment_XZ; float inAngle_YZ = 90. - inAngleCompliment_YZ; - // Flipping angles for flipped boards... Need to check this. - inAngle_XZ = (roParam.readoutSide).at(m_muonHelper->GetLayer(simId)-1)*inAngle_XZ ; - inAngle_YZ = (roParam.readoutSide).at(m_muonHelper->GetLayer(simId)-1)*inAngle_YZ ; - ATH_MSG_DEBUG( "At eta: " << m_idHelper->stationEta(layerID) << " phi: " -- GitLab From 7620a086803a9a28c81dd976caae4fa837ac6911 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Tue, 5 Jun 2018 18:15:12 +0200 Subject: [PATCH 050/562] OutputStreamAthenaPool: Don't crash if RecExConfig isn't available. The code to enable input dependencies for AthenaOutputStream relied on RecExConfig; however, that package is not available in all builds (such as AthConfiguration). Be tolerant of this. See ATLASSIM-3724. Former-commit-id: 30bb7e1f7a77fb7a6f527156acd94a0701e68fe1 --- .../python/OutputStreamAthenaPool.py | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/python/OutputStreamAthenaPool.py b/Database/AthenaPOOL/OutputStreamAthenaPool/python/OutputStreamAthenaPool.py index 256289aab293..c41a7489a6de 100644 --- a/Database/AthenaPOOL/OutputStreamAthenaPool/python/OutputStreamAthenaPool.py +++ b/Database/AthenaPOOL/OutputStreamAthenaPool/python/OutputStreamAthenaPool.py @@ -10,7 +10,6 @@ from AthenaCommon.AppMgr import theApp from AthenaCommon.AppMgr import ServiceMgr as svcMgr from AthenaServices.AthenaServicesConf import AthenaOutputStream from AthenaServices.AthenaServicesConf import AthenaOutputStreamTool -from RecExConfig.ObjKeyStore import objKeyStore def createOutputStream( streamName, fileName = "", asAlg = False, noTag = True ): # define athena output stream @@ -56,11 +55,24 @@ def createOutputStream( streamName, fileName = "", asAlg = False, noTag = True ) streamInfoTool.Key = streamName outputStream.HelperTools = [ streamInfoTool ] - tlist = [] - for typ, klist in objKeyStore['transient'].getProperties().items(): - for k in klist: - tlist.append (typ + '#' + k) - outputStream.TransientItems += tlist + # Set the list of transient items based on what we know is in the transient + # store. The output algorithm will then declare input dependencies + # for objects which are both listed here and in the ItemList. + # (We do it like this because ItemList is typically configured to include + # everything which might possibly be output. If this gets cleaned up, + # then we can remove this.) + # Some builds don't include RecExConfig, so don't crash in that case. + # FIXME: Rather than using ObjKeyStore, we could scan all algorithms + # and look for write handles. + try: + tlist = [] + from RecExConfig.ObjKeyStore import objKeyStore + for typ, klist in objKeyStore['transient'].getProperties().items(): + for k in klist: + tlist.append (typ + '#' + k) + outputStream.TransientItems += tlist + except ImportError: + pass return outputStream -- GitLab From 64cb53a6c23a334556360403cd08b7d9e6dfc50e Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Tue, 5 Jun 2018 17:06:45 +0200 Subject: [PATCH 051/562] xAODTruthCnv: Make xAODTruthCnvAlg reentrant. Make xAODTruthCnvAlg reentrant. xAODTruthCnvAlg has some non-const data, used for writing to the metadata store. Factor these out into a separate helper object, which we declare as mutable and protect with a mutex. Former-commit-id: a7e5ca20587437f0763bef3f66b92b97805410f3 --- Event/xAOD/xAODTruthCnv/CMakeLists.txt | 1 + .../xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.cxx | 105 +++++++++++------- Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.h | 40 +++++-- 3 files changed, 100 insertions(+), 46 deletions(-) diff --git a/Event/xAOD/xAODTruthCnv/CMakeLists.txt b/Event/xAOD/xAODTruthCnv/CMakeLists.txt index 82aaf864b29e..e226116ad1ce 100644 --- a/Event/xAOD/xAODTruthCnv/CMakeLists.txt +++ b/Event/xAOD/xAODTruthCnv/CMakeLists.txt @@ -23,6 +23,7 @@ endif() # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC + Control/CxxUtils Control/AthToolSupport/AsgTools Event/xAOD/xAODTruth ${extra_dep} ) diff --git a/Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.cxx b/Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.cxx index 44a434624cdd..6fe5bd6b2116 100644 --- a/Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.cxx +++ b/Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.cxx @@ -41,7 +41,7 @@ namespace xAODMaker { xAODTruthCnvAlg::xAODTruthCnvAlg( const string& name, ISvcLocator* svcLoc ) - : AthAlgorithm( name, svcLoc ), m_metaStore( "MetaDataStore", name ), m_inputMetaStore( "StoreGateSvc/InputMetaDataStore",name) + : AthReentrantAlgorithm( name, svcLoc ), m_metaStore( "MetaDataStore", name ), m_inputMetaStore( "StoreGateSvc/InputMetaDataStore",name) { // leaving metadata alone for now--to be updated declareProperty( "MetaObjectName", m_metaName = "TruthMetaData" ); @@ -56,15 +56,7 @@ namespace xAODMaker { } if (m_writeMetaData) { - CHECK( m_metaStore.retrieve() ); - // Create an empty truth meta data container: - xAOD::TruthMetaDataAuxContainer* aux = new xAOD::TruthMetaDataAuxContainer(); - m_tmd = new xAOD::TruthMetaDataContainer(); - m_tmd->setStore( aux ); - - // Record the trigger configuration metadata into it: - CHECK( m_metaStore->record( aux, m_metaName + "Aux." ) ); - CHECK( m_metaStore->record( m_tmd, m_metaName ) ); + ATH_CHECK( m_meta.initialize (m_metaStore, m_metaName) ); } // initialize handles @@ -93,13 +85,13 @@ namespace xAODMaker { } - StatusCode xAODTruthCnvAlg::execute() { + StatusCode xAODTruthCnvAlg::execute_r (const EventContext& ctx) const { - SG::WriteHandle<xAODTruthParticleLinkVector> truthLinkVec(m_truthLinkContainerKey); + SG::WriteHandle<xAODTruthParticleLinkVector> truthLinkVec(m_truthLinkContainerKey, ctx); ATH_CHECK(truthLinkVec.record(std::make_unique<xAODTruthParticleLinkVector>())); // Retrieve the HepMC truth: - SG::ReadHandle<McEventCollection> mcColl(m_aodContainerKey); + SG::ReadHandle<McEventCollection> mcColl(m_aodContainerKey, ctx); // validity check is only really needed for serial running. Remove when MT is only way. if (!mcColl.isValid()) { ATH_MSG_ERROR("Could not retrieve HepMC with key:" << m_aodContainerKey.key()); @@ -112,7 +104,7 @@ namespace xAODMaker { // Create the xAOD containers and their auxiliary stores: // ************************************************************** // Signal event - SG::WriteHandle<xAOD::TruthEventContainer> xTruthEventContainer(m_xaodTruthEventContainerKey); + SG::WriteHandle<xAOD::TruthEventContainer> xTruthEventContainer(m_xaodTruthEventContainerKey, ctx); ATH_CHECK(xTruthEventContainer.record(std::make_unique<xAOD::TruthEventContainer>(), std::make_unique<xAOD::TruthEventAuxContainer>())); ATH_MSG_DEBUG( "Recorded TruthEventContainer with key: " << m_xaodTruthEventContainerKey.key() ); @@ -120,19 +112,19 @@ namespace xAODMaker { // Pile-up events SG::WriteHandle<xAOD::TruthPileupEventContainer> xTruthPileupEventContainer; if (m_doAllPileUp || m_doInTimePileUp) { - xTruthPileupEventContainer = SG::WriteHandle<xAOD::TruthPileupEventContainer>(m_xaodTruthPUEventContainerKey); + xTruthPileupEventContainer = SG::WriteHandle<xAOD::TruthPileupEventContainer>(m_xaodTruthPUEventContainerKey, ctx); ATH_CHECK(xTruthPileupEventContainer.record(std::make_unique<xAOD::TruthPileupEventContainer>(), std::make_unique<xAOD::TruthPileupEventAuxContainer>())); ATH_MSG_DEBUG( "Recorded TruthPileupEventContainer with key: " << m_xaodTruthPUEventContainerKey.key() ); } // Particles - SG::WriteHandle<xAOD::TruthParticleContainer> xTruthParticleContainer(m_xaodTruthParticleContainerKey); + SG::WriteHandle<xAOD::TruthParticleContainer> xTruthParticleContainer(m_xaodTruthParticleContainerKey, ctx); ATH_CHECK(xTruthParticleContainer.record(std::make_unique<xAOD::TruthParticleContainer>(), std::make_unique<xAOD::TruthParticleAuxContainer>())); ATH_MSG_DEBUG( "Recorded TruthParticleContainer with key: " << m_xaodTruthParticleContainerKey.key() ); // Vertices - SG::WriteHandle<xAOD::TruthVertexContainer> xTruthVertexContainer(m_xaodTruthVertexContainerKey); + SG::WriteHandle<xAOD::TruthVertexContainer> xTruthVertexContainer(m_xaodTruthVertexContainerKey, ctx); ATH_CHECK(xTruthVertexContainer.record(std::make_unique<xAOD::TruthVertexContainer>(), std::make_unique<xAOD::TruthVertexAuxContainer>())); ATH_MSG_DEBUG( "Recorded TruthVertexContainer with key: " << m_xaodTruthVertexContainerKey.key() ); @@ -206,27 +198,7 @@ namespace xAODMaker { CHECK( m_inputMetaStore->retrieve(esi)); uint32_t mcChannelNumber = esi->getEventTypes().begin()->mc_channel_number(); - //Inserting in a (unordered_)set returns an <iterator, boolean> pair, where the boolean - //is used to check if the key already exists (returns false in the case it exists) - if( m_existingMetaDataChan.insert(mcChannelNumber).second ) { - xAOD::TruthMetaData* md = new xAOD::TruthMetaData(); - m_tmd->push_back( md ); - - auto weightNameMap = genEvt->m_weights.m_names; - std::vector<std::string> orderedWeightNameVec; - orderedWeightNameVec.reserve( weightNameMap.size() ); - for (auto& entry: weightNameMap) { - orderedWeightNameVec.push_back(entry.first); - } - - //The map from the HepMC record pairs the weight names with a corresponding index, - //it is not guaranteed that the indices are ascending when iterating over the map - std::sort(orderedWeightNameVec.begin(), orderedWeightNameVec.end(), - [&](std::string i, std::string j){return weightNameMap.at(i) < weightNameMap.at(j);}); - - md->setMcChannelNumber(mcChannelNumber); - md->setWeightNames( std::move(orderedWeightNameVec) ); - } + ATH_CHECK( m_meta.maybeWrite (mcChannelNumber, *genEvt) ); } // Event weights vector<float> weights; @@ -413,6 +385,63 @@ namespace xAODMaker { tp->setPz(gp->momentum().pz()); tp->setE(gp->momentum().e()); } + + + StatusCode + xAODTruthCnvAlg::MetaDataWriter::initialize (ServiceHandle<StoreGateSvc>& metaStore, + const std::string& metaName) + { + ATH_CHECK( metaStore.retrieve() ); + + auto md = std::make_unique<xAOD::TruthMetaDataContainer>(); + m_tmd = md.get(); + + auto aux = std::make_unique<xAOD::TruthMetaDataAuxContainer>(); + md->setStore( aux.get() ); + + // Record the trigger configuration metadata into it: + CHECK( metaStore->record( std::move (aux), metaName + "Aux." ) ); + CHECK( metaStore->record( std::move (md), metaName ) ); + return StatusCode::SUCCESS; + } + + + StatusCode + xAODTruthCnvAlg::MetaDataWriter::maybeWrite (uint32_t mcChannelNumber, + const HepMC::GenEvent& genEvt) + { + // This bit needs to be serialized. + lock_t lock (m_mutex); + + //Inserting in a (unordered_)set returns an <iterator, boolean> pair, where the boolean + //is used to check if the key already exists (returns false in the case it exists) + if( m_existingMetaDataChan.insert(mcChannelNumber).second ) { + m_tmd->push_back (std::make_unique <xAOD::TruthMetaData>()); + xAOD::TruthMetaData* md = m_tmd->back(); + + // FIXME: class member protection violation here. + // This appears to be because WeightContainer has no public methods + // to get information about the weight names. + const std::map<std::string,HepMC::WeightContainer::size_type>& weightNameMap = + genEvt.weights().m_names; + std::vector<std::string> orderedWeightNameVec; + orderedWeightNameVec.reserve( weightNameMap.size() ); + for (const auto& entry: weightNameMap) { + orderedWeightNameVec.push_back(entry.first); + } + + //The map from the HepMC record pairs the weight names with a corresponding index, + //it is not guaranteed that the indices are ascending when iterating over the map + std::sort(orderedWeightNameVec.begin(), orderedWeightNameVec.end(), + [&](std::string i, std::string j){return weightNameMap.at(i) < weightNameMap.at(j);}); + + md->setMcChannelNumber(mcChannelNumber); + md->setWeightNames( std::move(orderedWeightNameVec) ); + } + + return StatusCode::SUCCESS; + } + } // namespace xAODMaker diff --git a/Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.h b/Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.h index 9a71d86ae96f..10b3fb5c02b7 100644 --- a/Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.h +++ b/Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.h @@ -5,7 +5,7 @@ #ifndef XAODCREATORALGS_XAODTRUTHCNVALG_H #define XAODCREATORALGS_XAODTRUTHCNVALG_H -#include "AthenaBaseComps/AthAlgorithm.h" +#include "AthenaBaseComps/AthReentrantAlgorithm.h" // The lines below I don't like. We should fix them when we update the // the metadata to handles (ATLASRECTS-4162). @@ -25,6 +25,7 @@ #include "StoreGate/StoreGateSvc.h" #include "StoreGate/ReadHandleKey.h" #include "StoreGate/WriteHandleKey.h" +#include "CxxUtils/checker_macros.h" #include <unordered_set> @@ -43,19 +44,41 @@ namespace xAODMaker { /// @author James Catmore <James.Catmore@cern.ch> /// @author Jovan Mitreski <Jovan.Mitreski@cern.ch> /// @author Andy Buckley <Andy.Buckley@cern.ch> - class xAODTruthCnvAlg : public AthAlgorithm { + class xAODTruthCnvAlg : public AthReentrantAlgorithm { public: /// Regular algorithm constructor xAODTruthCnvAlg( const std::string& name, ISvcLocator* svcLoc ); /// Function initialising the algorithm - virtual StatusCode initialize(); + virtual StatusCode initialize() override; /// Function executing the algorithm - virtual StatusCode execute(); + virtual StatusCode execute_r (const EventContext& ctx) const override; private: + /// Factor out the pieces dealing with writing to meta data. + /// This will be non-const, so need to protect with a mutex. + class MetaDataWriter + { + public: + StatusCode initialize (ServiceHandle<StoreGateSvc>& metaStore, + const std::string& metaName); + StatusCode maybeWrite (uint32_t mcChannelNumber, + const HepMC::GenEvent& genEvt); + + + private: + /// Mutex to control access to meta data writing. + std::mutex m_mutex; + typedef std::lock_guard<std::mutex> lock_t; + + /// The meta data container to be written out + xAOD::TruthMetaDataContainer* m_tmd = nullptr; + + /// Set for tracking the mc channels for which we already added meta data + std::unordered_set<uint32_t> m_existingMetaDataChan; + }; /// Type for tracking particles connected to a single vertex struct VertexParticles { @@ -91,15 +114,16 @@ namespace xAODMaker { Gaudi::Property<bool> m_doAllPileUp{this, "WriteAllPileUpTruth", false}; Gaudi::Property<bool> m_doInTimePileUp{this, "WriteInTimePileUpTruth", false}; + /// Helper for writing to the meta data store. + /// This factors out the pieces that are non-const. + /// It's declared mutable and protected with a mutex. + mutable MetaDataWriter m_meta ATLAS_THREAD_SAFE; + /// Connection to the metadata store ServiceHandle< StoreGateSvc > m_metaStore; ServiceHandle<StoreGateSvc> m_inputMetaStore; - /// The meta data container to be written out - xAOD::TruthMetaDataContainer* m_tmd; /// SG key and name for meta data std::string m_metaName; - /// Set for tracking the mc channels for which we already added meta data - std::unordered_set<uint32_t> m_existingMetaDataChan; /// option to disable writing of metadata (e.g. if running a filter on xAOD in generators) Gaudi::Property<bool> m_writeMetaData{this, "WriteTruthMetaData", true}; -- GitLab From 18f9027bd79e4d015d84812b551390749fbb1f0e Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Tue, 5 Jun 2018 17:08:22 +0200 Subject: [PATCH 052/562] AthenaCommon: cmake fix Remove reference to nonexistent file Bootstrap.py. Former-commit-id: f02a4232eca970c56b197f8a3f00a6a8ae2718e7 --- Control/AthenaCommon/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Control/AthenaCommon/CMakeLists.txt b/Control/AthenaCommon/CMakeLists.txt index 8ef13df834a6..2b63211ceaaa 100644 --- a/Control/AthenaCommon/CMakeLists.txt +++ b/Control/AthenaCommon/CMakeLists.txt @@ -12,7 +12,7 @@ atlas_depends_on_subdirs( PRIVATE # Install files from the package: atlas_install_headers( AthenaCommon ) atlas_install_python_modules( python/*.py python/Utils ) -atlas_install_joboptions( share/Bootstrap.py share/Preparation.py share/Execution.py share/Atlas.UnixStandardJob.py test/*.py share/Atlas_Gen.UnixStandardJob.py share/MemTraceInclude.py share/runbatch.py ) +atlas_install_joboptions( share/Preparation.py share/Execution.py share/Atlas.UnixStandardJob.py test/*.py share/Atlas_Gen.UnixStandardJob.py share/MemTraceInclude.py share/runbatch.py ) atlas_install_scripts( share/athena.py share/athena-app.py share/chappy.py share/find_cfg_dups.py share/test_cfg_pickling.py ) # Aliases: -- GitLab From c33ab5f7c18e2a010aa530e0818e41a70b3d024a Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Tue, 5 Jun 2018 17:08:57 +0200 Subject: [PATCH 053/562] EventContainers: Add missing test reference file. Add missing test reference file. Former-commit-id: beee9d0138056af0c976f2ed64a4b5bac35933f9 --- Event/EventContainers/CMakeLists.txt | 2 +- Event/EventContainers/share/IDStressTest.ref | 38 ++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 Event/EventContainers/share/IDStressTest.ref diff --git a/Event/EventContainers/CMakeLists.txt b/Event/EventContainers/CMakeLists.txt index 14c306713921..188034631484 100644 --- a/Event/EventContainers/CMakeLists.txt +++ b/Event/EventContainers/CMakeLists.txt @@ -33,5 +33,5 @@ atlas_add_test( IdMTCont SOURCES test/IDMT_ContainerTest.cxx atlas_add_test( IDStressTest SOURCES test/IDC_Realistic_Test.cxx INCLUDE_DIRS src test EventContainers LINK_LIBRARIES Identifier GaudiKernel SGTools EventContainers - EXTRA_PATTERNS "elapsed" + EXTRA_PATTERNS "elapsed|^no lock time|^deleted|^countHit" ) diff --git a/Event/EventContainers/share/IDStressTest.ref b/Event/EventContainers/share/IDStressTest.ref new file mode 100644 index 000000000000..4c8b5a4e4d9e --- /dev/null +++ b/Event/EventContainers/share/IDStressTest.ref @@ -0,0 +1,38 @@ +range 0 to 1000 +range 50 to 1050 +range 100 to 1100 +range 150 to 1150 +range 200 to 1200 +range 250 to 1250 +range 300 to 1300 +range 350 to 1350 +range 400 to 1400 +range 450 to 1450 +0/200 +10/200 +20/200 +30/200 +40/200 +50/200 +60/200 +70/200 +80/200 +90/200 +100/200 +110/200 +120/200 +130/200 +140/200 +150/200 +160/200 +170/200 +180/200 +190/200 +NoLock +deleted 305487 +countHit 1404513 +fills 2000000 +reads 2000000 +Total elements 500000 +MyDigits left undeleted 0 +no lock time 12.8273 -- GitLab From d7a6135485cfdc4183e419f459337a7345bac5af Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Tue, 5 Jun 2018 17:10:05 +0200 Subject: [PATCH 054/562] AthenaAuditors: cmake fix Fix typo in package dependency list. Former-commit-id: a07dfd31a0e88f8024a95b30b43c6dddb72cd3d1 --- Control/AthenaAuditors/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Control/AthenaAuditors/CMakeLists.txt b/Control/AthenaAuditors/CMakeLists.txt index 79d140e3a954..39398ec295bc 100644 --- a/Control/AthenaAuditors/CMakeLists.txt +++ b/Control/AthenaAuditors/CMakeLists.txt @@ -12,7 +12,7 @@ atlas_depends_on_subdirs( Control/AthenaBaseComps Control/CoWTools Control/StoreGate - Event/xAOD/EventInfo + Event/xAOD/xAODEventInfo GaudiKernel ) # External dependencies: -- GitLab From 941ab1c2109bfc0e0f33bbc4c689e042abb83ed2 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Tue, 5 Jun 2018 17:10:39 +0200 Subject: [PATCH 055/562] TRT_Cabling: Fix clang warning. clang warning: unused variable. Former-commit-id: 0125f41d2ee2d0347cf5d5e0b8be45f59016beae --- .../InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_TB04.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_TB04.cxx b/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_TB04.cxx index a5e197c47db3..a4027d1d212f 100644 --- a/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_TB04.cxx +++ b/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_TB04.cxx @@ -38,7 +38,6 @@ namespace { const int invalidInput{-1}; const int maxPossiblePhiModule{9}; const int maxPossibleModule{3}; - const int maxPossibleStrawNumber{999}; const int maxPossibleBufferLocation{2000}; } -- GitLab From 2bcf40c7dc73c783cde58504cb887e2ea50b2aa1 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Wed, 6 Jun 2018 05:47:48 +0200 Subject: [PATCH 056/562] AthenaConfiguration: Add IOVDbSvc.FoldersToMetaData to _propsToUnify. Fix crash in L1Decoder tests. Former-commit-id: b10f3672b52129d63c1947be8500d40119393a4e --- Control/AthenaConfiguration/python/ComponentAccumulator.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Control/AthenaConfiguration/python/ComponentAccumulator.py b/Control/AthenaConfiguration/python/ComponentAccumulator.py index 95a0204331c8..8ee461aae9de 100644 --- a/Control/AthenaConfiguration/python/ComponentAccumulator.py +++ b/Control/AthenaConfiguration/python/ComponentAccumulator.py @@ -29,7 +29,10 @@ class CurrentSequence: return CurrentSequence.sequence -_propsToUnify=frozenset(("GeoModelSvc.DetectorTools","CondInputLoader.Load","IOVDbSvc.Folders","EvtPersistencySvc.CnvServices", +_propsToUnify=frozenset(("GeoModelSvc.DetectorTools","CondInputLoader.Load", + "IOVDbSvc.Folders", + "IOVDbSvc.FoldersToMetaData", + "EvtPersistencySvc.CnvServices", "PoolSvc.ReadCatalog","ProxyProviderSvc.ProviderNames" )) def unifyProp(prop1,prop2): -- GitLab From 4e3f69acd84d3da1c6907804fc59c156747b2f10 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Tue, 29 May 2018 20:24:56 +0200 Subject: [PATCH 057/562] TrigServices: Services should derive from AthService. THistSvcHLT should derive from AthService. Fixes Gaudi checker warnings. Former-commit-id: c98b9cc9159558411cc3ed410a7cba80be14984d --- HLT/Trigger/TrigControl/TrigServices/src/THistSvcHLT.cxx | 2 -- HLT/Trigger/TrigControl/TrigServices/src/THistSvcHLT.h | 4 +++- .../TrigControl/TrigServices/src/TrigMonTHistSvc.cxx | 3 +-- HLT/Trigger/TrigControl/TrigServices/src/TrigMonTHistSvc.h | 6 +----- .../TrigServices/src/components/TrigServices_entries.cxx | 2 ++ 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/HLT/Trigger/TrigControl/TrigServices/src/THistSvcHLT.cxx b/HLT/Trigger/TrigControl/TrigServices/src/THistSvcHLT.cxx index 12da877f9d14..d8c09abd4dce 100644 --- a/HLT/Trigger/TrigControl/TrigServices/src/THistSvcHLT.cxx +++ b/HLT/Trigger/TrigControl/TrigServices/src/THistSvcHLT.cxx @@ -33,8 +33,6 @@ // local headers #include "THistSvcHLT.h" -DECLARE_COMPONENT( THistSvcHLT ) - namespace { template <typename InputIterator, typename OutputIterator, typename UnaryOperation, typename UnaryPredicate> diff --git a/HLT/Trigger/TrigControl/TrigServices/src/THistSvcHLT.h b/HLT/Trigger/TrigControl/TrigServices/src/THistSvcHLT.h index 9ff4a578f276..8c976be132e6 100644 --- a/HLT/Trigger/TrigControl/TrigServices/src/THistSvcHLT.h +++ b/HLT/Trigger/TrigControl/TrigServices/src/THistSvcHLT.h @@ -28,9 +28,11 @@ #include "TObject.h" #include "TTree.h" +#include "AthenaBaseComps/AthService.h" + class IIncidentSvc; -class THistSvcHLT : public extends<Service, ITHistSvc, IIncidentListener, IIoComponent> +class THistSvcHLT : public extends<AthService, ITHistSvc, IIncidentListener, IIoComponent> { public: THistSvcHLT( const std::string& name, ISvcLocator* svc ); diff --git a/HLT/Trigger/TrigControl/TrigServices/src/TrigMonTHistSvc.cxx b/HLT/Trigger/TrigControl/TrigServices/src/TrigMonTHistSvc.cxx index 18d55195216e..77d8f687d4a2 100644 --- a/HLT/Trigger/TrigControl/TrigServices/src/TrigMonTHistSvc.cxx +++ b/HLT/Trigger/TrigControl/TrigServices/src/TrigMonTHistSvc.cxx @@ -29,7 +29,6 @@ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * TrigMonTHistSvc::TrigMonTHistSvc( const std::string& name, ISvcLocator* svc ) : THistSvcHLT(name, svc), - AthMessaging(msgSvc(), name), m_excludeType("()"), m_includeType(".+"), m_excludeName(".*\\..*"), @@ -58,7 +57,7 @@ StatusCode TrigMonTHistSvc::initialize() { CHECK(THistSvcHLT::initialize()); CHECK(setProperties()); - AthMessaging::msg().setLevel(outputLevel()); + msg().setLevel(outputLevel()); // fix summing up flag if not running in separate threads // Protect against multiple instances of TROOT diff --git a/HLT/Trigger/TrigControl/TrigServices/src/TrigMonTHistSvc.h b/HLT/Trigger/TrigControl/TrigServices/src/TrigMonTHistSvc.h index fe23b7e7c6d2..c5c52d19f5db 100644 --- a/HLT/Trigger/TrigControl/TrigServices/src/TrigMonTHistSvc.h +++ b/HLT/Trigger/TrigControl/TrigServices/src/TrigMonTHistSvc.h @@ -33,14 +33,10 @@ class TTree; #include <boost/regex.hpp> -class TrigMonTHistSvc: virtual public THistSvcHLT, - public AthMessaging +class TrigMonTHistSvc: public THistSvcHLT { public: - // fwd compat w/ gaudi-21 - using AthMessaging::msg; - TrigMonTHistSvc(const std::string& name, ISvcLocator *svc ); virtual ~TrigMonTHistSvc(); diff --git a/HLT/Trigger/TrigControl/TrigServices/src/components/TrigServices_entries.cxx b/HLT/Trigger/TrigControl/TrigServices/src/components/TrigServices_entries.cxx index a1845cfcb1fc..1bf48550a122 100644 --- a/HLT/Trigger/TrigControl/TrigServices/src/components/TrigServices_entries.cxx +++ b/HLT/Trigger/TrigControl/TrigServices/src/components/TrigServices_entries.cxx @@ -5,6 +5,7 @@ #include "TrigServices/TrigIS.h" #include "TrigServices/TrigISHelper.h" #include "../TrigCOOLUpdateHelper.h" +#include "../THistSvcHLT.h" DECLARE_COMPONENT( TrigMessageSvc ) DECLARE_COMPONENT( TrigMonTHistSvc ) @@ -13,4 +14,5 @@ DECLARE_COMPONENT( HltEventLoopMgr ) DECLARE_COMPONENT( HltROBDataProviderSvc ) DECLARE_COMPONENT( TrigISHelper ) DECLARE_COMPONENT( TrigCOOLUpdateHelper ) +DECLARE_COMPONENT( THistSvcHLT ) -- GitLab From ea08fc1bb9f74c69fab2743c6513acb66fd92a6c Mon Sep 17 00:00:00 2001 From: Susumu Oda <Susumu.Oda@cern.ch> Date: Wed, 6 Jun 2018 07:32:53 +0200 Subject: [PATCH 058/562] Use SiLorentzAngleTool in SCT_FastDigitizationTool Former-commit-id: a7d14be2017736c3f1a3159ad3c9fa73a5ef6f80 --- .../InDetDigitization/FastSiDigitization/CMakeLists.txt | 1 + .../FastSiDigitization/SCT_FastDigitizationTool.h | 3 +++ .../FastSiDigitization/python/FastSiDigitizationConfig.py | 7 +++++++ .../FastSiDigitization/src/SCT_FastDigitizationTool.cxx | 7 +++++-- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/CMakeLists.txt b/InnerDetector/InDetDigitization/FastSiDigitization/CMakeLists.txt index 49afd7c57902..952a3e320a50 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/CMakeLists.txt +++ b/InnerDetector/InDetDigitization/FastSiDigitization/CMakeLists.txt @@ -14,6 +14,7 @@ atlas_depends_on_subdirs( PUBLIC Event/xAOD/xAODEventInfo GaudiKernel InnerDetector/InDetConditions/InDetConditionsSummaryService + InnerDetector/InDetConditions/InDetCondServices InnerDetector/InDetConditions/PixelConditionsTools InnerDetector/InDetConditions/SiPropertiesSvc InnerDetector/InDetDetDescr/InDetReadoutGeometry diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SCT_FastDigitizationTool.h b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SCT_FastDigitizationTool.h index 6c72cea121ce..19e004898f15 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SCT_FastDigitizationTool.h +++ b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SCT_FastDigitizationTool.h @@ -42,6 +42,8 @@ #include "EventPrimitives/EventPrimitives.h" #include "StoreGate/WriteHandle.h" +#include "InDetCondServices/ISiLorentzAngleTool.h" + #include <vector> #include <list> #include <utility> /* pair */ @@ -133,6 +135,7 @@ private: TimedHitCollection<SiHit>* m_thpcsi; ToolHandle<InDet::ClusterMakerTool> m_clusterMaker; + ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SCTLorentzAngleTool", "Tool to retreive Lorentz angle"}; IntegerProperty m_vetoThisBarcode; typedef std::multimap<IdentifierHash, const InDet::SCT_Cluster*> SCT_detElement_RIO_map; diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/python/FastSiDigitizationConfig.py b/InnerDetector/InDetDigitization/FastSiDigitization/python/FastSiDigitizationConfig.py index bea1a1a7415f..90eccd9cbbe4 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/python/FastSiDigitizationConfig.py +++ b/InnerDetector/InDetDigitization/FastSiDigitization/python/FastSiDigitizationConfig.py @@ -114,6 +114,13 @@ def commonSCT_FastDigitizationConfig(name,**kwargs): kwargs.setdefault("FirstXing", FastSCT_FirstXing()) kwargs.setdefault("LastXing", FastSCT_LastXing() ) + # SiLorentzAngleTool for SCT_FastDigitizationTool + from AthenaCommon.AppMgr import ToolSvc + if not hasattr(ToolSvc, "SCTLorentzAngleTool"): + from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() + kwargs.setdefault("LorentzAngleTool", ToolSvc.SCTLorentzAngleTool) + from AthenaCommon import CfgMgr return CfgMgr.SCT_FastDigitizationTool(name,**kwargs) diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitizationTool.cxx index c43dce991c55..b1b34a78ec01 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitizationTool.cxx +++ b/InnerDetector/InDetDigitization/FastSiDigitization/src/SCT_FastDigitizationTool.cxx @@ -143,6 +143,8 @@ StatusCode SCT_FastDigitizationTool::initialize() //locate the PileUpMergeSvc and initialize our local ptr CHECK(m_mergeSvc.retrieve()); + CHECK(m_lorentzAngleTool.retrieve()); + return StatusCode::SUCCESS ; } @@ -416,11 +418,12 @@ StatusCode SCT_FastDigitizationTool::digitize() //InDetDD::SiCellId intersectionCellId = hitSiDetElement->cellIdFromIdentifier(intersectionId); // apply the lorentz correction - const double tanLorAng = m_sctTanLorentzAngleScalor*hitSiDetElement->getTanLorentzAnglePhi(); + const IdentifierHash detElHash = hitSiDetElement->identifyHash(); + const double tanLorAng = m_sctTanLorentzAngleScalor*m_lorentzAngleTool->getTanLorentzAngle(detElHash); const int lorentzDirection = tanLorAng > 0. ? 1 : -1; const bool useLorentzDrift = fabs(tanLorAng) > 0.01; // shift parameters - const double shift = hitSiDetElement->getLorentzCorrection(); + const double shift = m_lorentzAngleTool->getLorentzShift(detElHash); // lorenz angle effects : offset goes against the lorentzAngle const double xLoffset = -lorentzDirection*thickness*tanLorAng; -- GitLab From 48a29a88592be33cb2377906dbe2847020401784 Mon Sep 17 00:00:00 2001 From: Walter Lampl <Walter.Lampl@cern.ch> Date: Wed, 6 Jun 2018 15:46:17 +0200 Subject: [PATCH 059/562] remove obsolete method getAlgTool(name) Former-commit-id: 855e342a56eb3f9a9e52d1f21793eb7741c097bf --- Control/AthenaConfiguration/python/ComponentAccumulator.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Control/AthenaConfiguration/python/ComponentAccumulator.py b/Control/AthenaConfiguration/python/ComponentAccumulator.py index e47b5ad09fc1..1a36c7be8d8f 100644 --- a/Control/AthenaConfiguration/python/ComponentAccumulator.py +++ b/Control/AthenaConfiguration/python/ComponentAccumulator.py @@ -221,13 +221,6 @@ class ComponentAccumulator(object): return svc raise KeyError("No service with name %s known" % name) - def getAlgTool(self,name): - for tool in self._privateTools: - if tool.getName()==name: - return tool - raise KeyError("No AlgTool with name %s known" % name) - - def getPublicTool(self,name): for pt in self._publicTools: if pt.getName()==name: -- GitLab From 6255e0bcd0dd37b9938b384f45da0579872a44b8 Mon Sep 17 00:00:00 2001 From: Edward Moyse <edward.moyse@cern.ch> Date: Wed, 6 Jun 2018 16:34:19 +0200 Subject: [PATCH 060/562] Updated externals to 2.0.6 Former-commit-id: 634b7d50b463d1e28ed46790b2ae8657d1465de2 --- Projects/AnalysisBase/externals.txt | 2 +- Projects/AnalysisTop/externals.txt | 2 +- Projects/AthDataQuality/externals.txt | 2 +- Projects/AthSimulation/externals.txt | 2 +- Projects/Athena/externals.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Projects/AnalysisBase/externals.txt b/Projects/AnalysisBase/externals.txt index ae045743b82d..9da9bf8a3314 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.5 +AnalysisBaseExternalsVersion = 2.0.6 diff --git a/Projects/AnalysisTop/externals.txt b/Projects/AnalysisTop/externals.txt index 3001a3c9cbe4..fd2435cf6953 100644 --- a/Projects/AnalysisTop/externals.txt +++ b/Projects/AnalysisTop/externals.txt @@ -1,4 +1,4 @@ # Versions of the various externals to build before starting the build of # this project, when doing a full stack nightly build. -AnalysisBaseExternalsVersion = 2.0.5 +AnalysisBaseExternalsVersion = 2.0.6 diff --git a/Projects/AthDataQuality/externals.txt b/Projects/AthDataQuality/externals.txt index 1030f7f8dacc..7616245f3e7f 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.5 +AtlasExternalsVersion = 2.0.6 diff --git a/Projects/AthSimulation/externals.txt b/Projects/AthSimulation/externals.txt index 20810a778c3a..80e19b3c1c09 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.5 +AthSimulationExternalsVersion = 2.0.6 # The version of atlas/Gaudi to use: GaudiVersion = v30r2.003 diff --git a/Projects/Athena/externals.txt b/Projects/Athena/externals.txt index fa7ab1649f07..2f4b37529d6b 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.5 +AthenaExternalsVersion = 2.0.6 # The version of atlas/Gaudi to use: GaudiVersion = v30r2.003 -- GitLab From ea7f5dcca74e33e4007d3a7ddab484bd546effd1 Mon Sep 17 00:00:00 2001 From: tkharlam <tatyana.kharlamova@cern.ch> Date: Wed, 6 Jun 2018 21:36:31 +0200 Subject: [PATCH 061/562] add art-include for Overlay ART 21/Athena and master branches are defined to run overlay ART tests. Former-commit-id: bd0ace4142d934be7313d13db3a559282b94d838 --- Event/EventOverlay/OverlayMonitoringRTT/test/test_BSFilter.sh | 3 ++- .../OverlayMonitoringRTT/test/test_DataOverlayMC16.sh | 3 ++- .../OverlayMonitoringRTT/test/test_MCOverlayMC16_singlemu.sh | 3 ++- .../OverlayMonitoringRTT/test/test_MCOverlayMC16_ttbar.sh | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Event/EventOverlay/OverlayMonitoringRTT/test/test_BSFilter.sh b/Event/EventOverlay/OverlayMonitoringRTT/test/test_BSFilter.sh index 25728eadbb03..a18dab459208 100755 --- a/Event/EventOverlay/OverlayMonitoringRTT/test/test_BSFilter.sh +++ b/Event/EventOverlay/OverlayMonitoringRTT/test/test_BSFilter.sh @@ -2,7 +2,8 @@ # art-description: BSOverlayFilter_tf legacy test # art-type: grid -# art-ci: 21.0, master +# art-include: 21.0/Athena +# art-include: master/Athena # art-output: trigs_tar.txt # art-output: log.* diff --git a/Event/EventOverlay/OverlayMonitoringRTT/test/test_DataOverlayMC16.sh b/Event/EventOverlay/OverlayMonitoringRTT/test/test_DataOverlayMC16.sh index ceb77498618d..64eaaa99c2d2 100755 --- a/Event/EventOverlay/OverlayMonitoringRTT/test/test_DataOverlayMC16.sh +++ b/Event/EventOverlay/OverlayMonitoringRTT/test/test_DataOverlayMC16.sh @@ -2,7 +2,8 @@ # art-description: OverlayChain+Reco test for data16. # art-type: grid -# art-ci: 21.0 +# art-include: 21.0/Athena +# art-include: master/Athena # art-output: *.root # art-output: log.* diff --git a/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_singlemu.sh b/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_singlemu.sh index 6e8a3ba94b23..60685782c302 100755 --- a/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_singlemu.sh +++ b/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_singlemu.sh @@ -2,7 +2,8 @@ # art-description: MC+MC Overlay for MC16, single mu, no trigger # art-type: grid -# art-ci: 21.0, master +# art-include: 21.0/Athena +# art-include: master/Athena # art-output: *.root # art-output: log.* diff --git a/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_ttbar.sh b/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_ttbar.sh index f029154bebea..fda7db525cf5 100755 --- a/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_ttbar.sh +++ b/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_ttbar.sh @@ -2,7 +2,8 @@ # art-description: MC+MC Overlay for MC16, ttbar, no trigger # art-type: grid -# art-ci: 21.0 +# art-include: 21.0/Athena +# art-include: master/Athena # art-output: *.root # art-output: log.* -- GitLab From 1746d80ee38bec6509f1bc061effcd8a9b2d501a Mon Sep 17 00:00:00 2001 From: tkharlam <tatyana.kharlamova@cern.ch> Date: Wed, 6 Jun 2018 21:45:12 +0200 Subject: [PATCH 062/562] add ART overlay test for 21.3 release also Former-commit-id: c0494638ea004547628fd459e3671a6a82b06da7 --- Event/EventOverlay/OverlayMonitoringRTT/test/test_BSFilter.sh | 1 + .../OverlayMonitoringRTT/test/test_DataOverlayMC16.sh | 1 + .../OverlayMonitoringRTT/test/test_MCOverlayMC16_singlemu.sh | 1 + .../OverlayMonitoringRTT/test/test_MCOverlayMC16_ttbar.sh | 1 + 4 files changed, 4 insertions(+) diff --git a/Event/EventOverlay/OverlayMonitoringRTT/test/test_BSFilter.sh b/Event/EventOverlay/OverlayMonitoringRTT/test/test_BSFilter.sh index a18dab459208..a9608c6e476d 100755 --- a/Event/EventOverlay/OverlayMonitoringRTT/test/test_BSFilter.sh +++ b/Event/EventOverlay/OverlayMonitoringRTT/test/test_BSFilter.sh @@ -3,6 +3,7 @@ # art-description: BSOverlayFilter_tf legacy test # art-type: grid # art-include: 21.0/Athena +# art-include: 21.3/Athena # art-include: master/Athena # art-output: trigs_tar.txt diff --git a/Event/EventOverlay/OverlayMonitoringRTT/test/test_DataOverlayMC16.sh b/Event/EventOverlay/OverlayMonitoringRTT/test/test_DataOverlayMC16.sh index 64eaaa99c2d2..c4b59f53b32c 100755 --- a/Event/EventOverlay/OverlayMonitoringRTT/test/test_DataOverlayMC16.sh +++ b/Event/EventOverlay/OverlayMonitoringRTT/test/test_DataOverlayMC16.sh @@ -3,6 +3,7 @@ # art-description: OverlayChain+Reco test for data16. # art-type: grid # art-include: 21.0/Athena +# art-include: 21.3/Athena # art-include: master/Athena # art-output: *.root diff --git a/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_singlemu.sh b/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_singlemu.sh index 60685782c302..0cf6fa9c7413 100755 --- a/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_singlemu.sh +++ b/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_singlemu.sh @@ -3,6 +3,7 @@ # art-description: MC+MC Overlay for MC16, single mu, no trigger # art-type: grid # art-include: 21.0/Athena +# art-include: 21.3/Athena # art-include: master/Athena # art-output: *.root diff --git a/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_ttbar.sh b/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_ttbar.sh index fda7db525cf5..135fedd45c8e 100755 --- a/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_ttbar.sh +++ b/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16_ttbar.sh @@ -3,6 +3,7 @@ # art-description: MC+MC Overlay for MC16, ttbar, no trigger # art-type: grid # art-include: 21.0/Athena +# art-include: 21.3/Athena # art-include: master/Athena # art-output: *.root -- GitLab From f5175fb73616448ba085c563c3ec92e8c13dc806 Mon Sep 17 00:00:00 2001 From: Shota Hayashida <hayashida@hepl.phys.nagoya-u.ac.jp> Date: Thu, 7 Jun 2018 06:18:23 +0200 Subject: [PATCH 063/562] Changed the number of EvtMax to 10 Former-commit-id: 4933502bfe9e49587a5ce6833f476fec99fa9604 --- Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_run_data.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_run_data.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_run_data.sh index 20ef90b7c367..e9e994378fe7 100755 --- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_run_data.sh +++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_run_data.sh @@ -3,6 +3,6 @@ # art-ci: master ### BSfile ### -athena --threads=1 --skipEvents=10 --evtMax=20 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/mu.withViews.py +athena --threads=1 --skipEvents=10 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/mu.withViews.py ### RDOfile ### #athena --threads=1 -c 'EvtMax=50;FilesInput="/afs/cern.ch/user/s/shhayash/workspace/public/RDOfile/ttbar/RDO_TRIG.root"' TrigUpgradeTest/mu.withViews.py -- GitLab From a6d8dc2149ddf31cb0114d3e81d13ded4e6856e4 Mon Sep 17 00:00:00 2001 From: Shota Hayashida <hayashida@hepl.phys.nagoya-u.ac.jp> Date: Thu, 7 Jun 2018 06:59:24 +0200 Subject: [PATCH 064/562] Removed timersvc on TrigL2MuonSA Former-commit-id: 240f852a34c4b53431707491b0853373265a160c --- .../TrigL2MuonSA/MuFastSteering.h | 4 +- .../TrigL2MuonSA/src/MuFastSteering.cxx | 106 +++++++++--------- 2 files changed, 57 insertions(+), 53 deletions(-) diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h index 78e24395a3d4..af69bc6195d3 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h @@ -158,8 +158,8 @@ class MuFastSteering : public HLT::FexAlgo, ServiceHandle<StoreGateSvc> m_storeGate; /** Timers */ - ITrigTimerSvc* m_timerSvc; - std::vector<TrigTimer*> m_timers; + //ITrigTimerSvc* m_timerSvc; + //std::vector<TrigTimer*> m_timers; IRegSelSvc* m_regionSelector; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx index 99959e28cab2..6ecac82b7147 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx @@ -32,7 +32,7 @@ using namespace SG; MuFastSteering::MuFastSteering(const std::string& name, ISvcLocator* svc) : HLT::FexAlgo(name, svc), m_storeGate("StoreGateSvc", this->name()), - m_timerSvc(0), + //m_timerSvc(0), m_regionSelector(0), m_recMuonRoIUtils(), m_rpcHits(), m_tgcHits(), @@ -63,22 +63,26 @@ HLT::ErrorCode MuFastSteering::hltInitialize() StatusCode sc; - m_timerSvc = 0; + //m_timerSvc = 0; + //if (m_use_timer) { + // StatusCode sc = service( "TrigTimerSvc", m_timerSvc, true); + // if( sc.isFailure() ) { + // ATH_MSG_ERROR(": Unable to locate TrigTimer Service"); + // } + // + // if(m_timerSvc) { + // m_timers.push_back(m_timerSvc->addItem(name()+":DataPreparator")); + // m_timers.push_back(m_timerSvc->addItem(name()+":PatternFinder")); + // m_timers.push_back(m_timerSvc->addItem(name()+":StationFitter")); + // m_timers.push_back(m_timerSvc->addItem(name()+":TrackFitter")); + // m_timers.push_back(m_timerSvc->addItem(name()+":TrackExtrapolator")); + // m_timers.push_back(m_timerSvc->addItem(name()+":CalibrationStreamer")); + // m_timers.push_back(m_timerSvc->addItem(name()+":TotalProcessing")); + // } + //} + if (m_use_timer) { - StatusCode sc = service( "TrigTimerSvc", m_timerSvc, true); - if( sc.isFailure() ) { - ATH_MSG_ERROR(": Unable to locate TrigTimer Service"); - } - - if(m_timerSvc) { - m_timers.push_back(m_timerSvc->addItem(name()+":DataPreparator")); - m_timers.push_back(m_timerSvc->addItem(name()+":PatternFinder")); - m_timers.push_back(m_timerSvc->addItem(name()+":StationFitter")); - m_timers.push_back(m_timerSvc->addItem(name()+":TrackFitter")); - m_timers.push_back(m_timerSvc->addItem(name()+":TrackExtrapolator")); - m_timers.push_back(m_timerSvc->addItem(name()+":CalibrationStreamer")); - m_timers.push_back(m_timerSvc->addItem(name()+":TotalProcessing")); - } + ATH_MSG_WARNING("Already removed timersvc to migrate to AthenaMT, so please don't use it"); } // Locate RegionSelector @@ -574,18 +578,18 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr StatusCode sc = StatusCode::SUCCESS; - if (m_timerSvc) { - for (unsigned int i_timer=0; i_timer<m_timers.size(); i_timer++) { - m_timers[i_timer]->start(); - m_timers[i_timer]->pause(); - } - } + //if (m_timerSvc) { + // for (unsigned int i_timer=0; i_timer<m_timers.size(); i_timer++) { + // m_timers[i_timer]->start(); + // m_timers[i_timer]->pause(); + // } + //} ATH_MSG_DEBUG("REGTEST: " << m_roiCollectionKey.key() << " size = " << roids.size() << " (argument)"); ATH_MSG_DEBUG("REGTEST: " << m_recRoiCollectionKey.key() << " size = " << muonRoIs.size() << " (argument)"); - if (m_timerSvc) m_timers[ITIMER_TOTAL_PROCESSING]->resume(); - if (m_timerSvc) m_timers[ITIMER_DATA_PREPARATOR]->resume(); + //if (m_timerSvc) m_timers[ITIMER_TOTAL_PROCESSING]->resume(); + //if (m_timerSvc) m_timers[ITIMER_DATA_PREPARATOR]->resume(); DataVector<const TrigRoiDescriptor>::const_iterator p_roids; DataVector<const LVL1::RecMuonRoI>::const_iterator p_roi; @@ -645,7 +649,7 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr trackPatterns, outputTracks, outputID, outputMS); return StatusCode::SUCCESS; } - if (m_timerSvc) m_timers[ITIMER_DATA_PREPARATOR]->pause(); + //if (m_timerSvc) m_timers[ITIMER_DATA_PREPARATOR]->pause(); if ( m_rpcErrToDebugStream && m_dataPreparator->isRpcFakeRoi() ) { ATH_MSG_ERROR("Invalid RoI in RPC data found: event to debug stream"); @@ -659,7 +663,7 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr } // Pattern finding - if (m_timerSvc) m_timers[ITIMER_PATTERN_FINDER]->resume(); + //if (m_timerSvc) m_timers[ITIMER_PATTERN_FINDER]->resume(); sc = m_patternFinder->findPatterns(m_muonRoad, m_mdtHits_normal, trackPatterns); @@ -671,10 +675,10 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr trackPatterns, outputTracks, outputID, outputMS); return StatusCode::SUCCESS; } - if (m_timerSvc) m_timers[ITIMER_PATTERN_FINDER]->pause(); + //if (m_timerSvc) m_timers[ITIMER_PATTERN_FINDER]->pause(); // Superpoint fit - if (m_timerSvc) m_timers[ITIMER_STATION_FITTER]->resume(); + //if (m_timerSvc) m_timers[ITIMER_STATION_FITTER]->resume(); sc = m_stationFitter->findSuperPoints(*p_roi, m_rpcFitResult, trackPatterns); @@ -686,10 +690,10 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr trackPatterns, outputTracks, outputID, outputMS); return StatusCode::SUCCESS; } - if (m_timerSvc) m_timers[ITIMER_STATION_FITTER]->pause(); + //if (m_timerSvc) m_timers[ITIMER_STATION_FITTER]->pause(); // Track fitting - if (m_timerSvc) m_timers[ITIMER_TRACK_FITTER]->resume(); + //if (m_timerSvc) m_timers[ITIMER_TRACK_FITTER]->resume(); sc = m_trackFitter->findTracks(*p_roi, m_rpcFitResult, trackPatterns); @@ -702,7 +706,7 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr trackPatterns, outputTracks, outputID, outputMS); return StatusCode::SUCCESS; } - if (m_timerSvc) m_timers[ITIMER_TRACK_FITTER]->pause(); + //if (m_timerSvc) m_timers[ITIMER_TRACK_FITTER]->pause(); } else { // Endcap ATH_MSG_DEBUG("Endcap"); @@ -729,10 +733,10 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr trackPatterns, outputTracks, outputID, outputMS); return StatusCode::SUCCESS; } - if (m_timerSvc) m_timers[ITIMER_DATA_PREPARATOR]->pause(); + //if (m_timerSvc) m_timers[ITIMER_DATA_PREPARATOR]->pause(); // Pattern finding - if (m_timerSvc) m_timers[ITIMER_PATTERN_FINDER]->resume(); + //if (m_timerSvc) m_timers[ITIMER_PATTERN_FINDER]->resume(); sc = m_patternFinder->findPatterns(m_muonRoad, m_mdtHits_normal, trackPatterns); @@ -746,10 +750,10 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr trackPatterns, outputTracks, outputID, outputMS); return StatusCode::SUCCESS; } - if (m_timerSvc) m_timers[ITIMER_PATTERN_FINDER]->pause(); + //if (m_timerSvc) m_timers[ITIMER_PATTERN_FINDER]->pause(); // Superpoint fit - if (m_timerSvc) m_timers[ITIMER_STATION_FITTER]->resume(); + //if (m_timerSvc) m_timers[ITIMER_STATION_FITTER]->resume(); if(!m_use_new_segmentfit){ sc = m_stationFitter->findSuperPoints(*p_roi, m_tgcFitResult, @@ -772,10 +776,10 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr return StatusCode::SUCCESS; } - if (m_timerSvc) m_timers[ITIMER_STATION_FITTER]->pause(); + //if (m_timerSvc) m_timers[ITIMER_STATION_FITTER]->pause(); // Track fittingh - if (m_timerSvc) m_timers[ITIMER_TRACK_FITTER]->resume(); + //if (m_timerSvc) m_timers[ITIMER_TRACK_FITTER]->resume(); sc = m_trackFitter->findTracks(*p_roi, m_tgcFitResult, trackPatterns, @@ -789,7 +793,7 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr trackPatterns, outputTracks, outputID, outputMS); return StatusCode::SUCCESS; } - if (m_timerSvc) m_timers[ITIMER_TRACK_FITTER]->pause(); + //if (m_timerSvc) m_timers[ITIMER_TRACK_FITTER]->pause(); } // fix if eta is strange @@ -806,7 +810,7 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr } // Track extrapolation for ID combined - if (m_timerSvc) m_timers[ITIMER_TRACK_EXTRAPOLATOR]->resume(); + //if (m_timerSvc) m_timers[ITIMER_TRACK_EXTRAPOLATOR]->resume(); sc = m_trackExtrapolator->extrapolateTrack(trackPatterns, m_winPt); @@ -818,7 +822,7 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr trackPatterns, outputTracks, outputID, outputMS); return StatusCode::SUCCESS; } - if (m_timerSvc) m_timers[ITIMER_TRACK_EXTRAPOLATOR]->pause(); + //if (m_timerSvc) m_timers[ITIMER_TRACK_EXTRAPOLATOR]->pause(); // Update monitoring variables sc = updateMonitor(*p_roi, m_mdtHits_normal, trackPatterns); @@ -838,7 +842,7 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr // call the calibration streamer if (m_doCalStream && trackPatterns.size()>0 ) { TrigL2MuonSA::TrackPattern tp = trackPatterns[0]; - if (m_timerSvc) m_timers[ITIMER_CALIBRATION_STREAMER]->resume(); + //if (m_timerSvc) m_timers[ITIMER_CALIBRATION_STREAMER]->resume(); // m_calStreamer->setInstanceName(this->name()); @@ -853,7 +857,7 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr if (sc != StatusCode::SUCCESS ) { ATH_MSG_WARNING("Calibration streamer: create Roi Fragment failed"); } - if (m_timerSvc) m_timers[ITIMER_CALIBRATION_STREAMER]->pause(); + //if (m_timerSvc) m_timers[ITIMER_CALIBRATION_STREAMER]->pause(); // if it's a data scouting chain check the buffer length if ( m_calDataScouting ) { @@ -888,16 +892,16 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr if (p_roids==roids.end()) break; } - if (m_timerSvc) m_timers[ITIMER_TOTAL_PROCESSING]->pause(); + //if (m_timerSvc) m_timers[ITIMER_TOTAL_PROCESSING]->pause(); - int nRoI = muonRoIs.size(); - - if (m_timerSvc) { - for (unsigned int i_timer=0; i_timer<m_timers.size(); i_timer++) { - m_timers[i_timer]->propVal(nRoI); - m_timers[i_timer]->stop(); - } - } + //int nRoI = muonRoIs.size(); + + //if (m_timerSvc) { + // for (unsigned int i_timer=0; i_timer<m_timers.size(); i_timer++) { + // m_timers[i_timer]->propVal(nRoI); + // m_timers[i_timer]->stop(); + // } + //} ATH_MSG_DEBUG("StatusCode MuFastSteering::findMuonSignature success"); return StatusCode::SUCCESS; -- GitLab From c6cb5cdf41e7381f5988366cc8c2f4eb3af4a791 Mon Sep 17 00:00:00 2001 From: Shota Hayashida <hayashida@hepl.phys.nagoya-u.ac.jp> Date: Thu, 7 Jun 2018 08:37:48 +0200 Subject: [PATCH 065/562] Migrate the retrievals of IRegSelSvc and IJobOptionsSvc to use ServiceHandle Former-commit-id: d4a1fab87b2304c883f328c7f3b952763abfc89f --- .../TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h | 6 +++--- .../TrigL2MuonSA/src/MuFastSteering.cxx | 17 +++++------------ 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h index af69bc6195d3..cea7c70d2a70 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h @@ -161,7 +161,7 @@ class MuFastSteering : public HLT::FexAlgo, //ITrigTimerSvc* m_timerSvc; //std::vector<TrigTimer*> m_timers; - IRegSelSvc* m_regionSelector; + ServiceHandle<IRegSelSvc> m_regionSelector; // Tools ToolHandle<TrigL2MuonSA::MuFastDataPreparator> m_dataPreparator { @@ -235,8 +235,8 @@ class MuFastSteering : public HLT::FexAlgo, float getRoiSizeForID(bool isEta, const xAOD::L2StandAloneMuon* muonSA); // calibration streamer properties - IJobOptionsSvc* m_jobOptionsSvc; - //ServiceHandle<IJobOptionsSvc> m_jobOptionsSvc("JobOptionsSvc"); + ServiceHandle<IJobOptionsSvc> m_jobOptionsSvc; + Gaudi::Property< bool > m_allowOksConfig { this, "AllowOksConfig", true, ""}; Gaudi::Property< std::string > m_calBufferName { this, "MuonCalBufferName", "/tmp/testOutput", ""}; Gaudi::Property< int > m_calBufferSize { this, "MuonCalBufferSize", 1024*1024, ""}; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx index 6ecac82b7147..83c98e6227c5 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx @@ -33,14 +33,14 @@ MuFastSteering::MuFastSteering(const std::string& name, ISvcLocator* svc) : HLT::FexAlgo(name, svc), m_storeGate("StoreGateSvc", this->name()), //m_timerSvc(0), - m_regionSelector(0), + m_regionSelector("RegSelSvc", this->name()), m_recMuonRoIUtils(), m_rpcHits(), m_tgcHits(), m_mdtRegion(), m_muonRoad(), m_rpcFitResult(), m_tgcFitResult(), m_mdtHits_normal(), m_mdtHits_overlap(), m_cscHits(), - m_jobOptionsSvc(0) + m_jobOptionsSvc("JobOptionsSvc", this->name()) { } // -------------------------------------------------------------------------------- @@ -86,8 +86,7 @@ HLT::ErrorCode MuFastSteering::hltInitialize() } // Locate RegionSelector - sc = service("RegSelSvc", m_regionSelector); - if( sc.isFailure() ) { + if (m_regionSelector.retrieve().isFailure()) { ATH_MSG_ERROR("Could not retrieve the regionselector service"); return HLT::ERROR; } @@ -170,17 +169,11 @@ HLT::ErrorCode MuFastSteering::hltInitialize() } m_trackFitter -> setUseEIFromBarrel( m_use_endcapInnerFromBarrel ); - // initialize the joboptions service - sc = service("JobOptionsSvc", m_jobOptionsSvc); - if (sc.isFailure()) { + if (m_jobOptionsSvc.retrieve().isFailure()) { ATH_MSG_ERROR("Could not find JobOptionsSvc"); return HLT::ERROR; - } else { - IService* svc = dynamic_cast<IService*>(m_jobOptionsSvc); - if(svc != 0 ) { - ATH_MSG_DEBUG(" Algorithm = " << name() << " is connected to JobOptionsSvc Service = " << svc->name()); - } } + ATH_MSG_DEBUG(" Algorithm = " << name() << " is connected to JobOptionsSvc Service = " << m_jobOptionsSvc.name()); // // Initialize the calibration streamer and the incident -- GitLab From 7957de4cbf0bc860e8df144006543a98f8306afa Mon Sep 17 00:00:00 2001 From: Shota Hayashida <hayashida@hepl.phys.nagoya-u.ac.jp> Date: Thu, 7 Jun 2018 09:36:01 +0200 Subject: [PATCH 066/562] Migrated the retrieval of TimerSvc to use ServiceHandle Former-commit-id: c1e9b2ce40499a18b4176ef3c93e63e50f22034c --- .../TrigL2MuonSA/MuFastSteering.h | 4 +- .../TrigL2MuonSA/src/MuFastSteering.cxx | 103 ++++++++---------- 2 files changed, 50 insertions(+), 57 deletions(-) diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h index cea7c70d2a70..264c4cf3ab6b 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h @@ -158,8 +158,8 @@ class MuFastSteering : public HLT::FexAlgo, ServiceHandle<StoreGateSvc> m_storeGate; /** Timers */ - //ITrigTimerSvc* m_timerSvc; - //std::vector<TrigTimer*> m_timers; + ServiceHandle<ITrigTimerSvc> m_timerSvc; + std::vector<TrigTimer*> m_timers; ServiceHandle<IRegSelSvc> m_regionSelector; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx index 83c98e6227c5..a2bafb711d2f 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx @@ -32,7 +32,7 @@ using namespace SG; MuFastSteering::MuFastSteering(const std::string& name, ISvcLocator* svc) : HLT::FexAlgo(name, svc), m_storeGate("StoreGateSvc", this->name()), - //m_timerSvc(0), + m_timerSvc("TrigTimerSvc", name), m_regionSelector("RegSelSvc", this->name()), m_recMuonRoIUtils(), m_rpcHits(), m_tgcHits(), @@ -63,26 +63,19 @@ HLT::ErrorCode MuFastSteering::hltInitialize() StatusCode sc; - //m_timerSvc = 0; - //if (m_use_timer) { - // StatusCode sc = service( "TrigTimerSvc", m_timerSvc, true); - // if( sc.isFailure() ) { - // ATH_MSG_ERROR(": Unable to locate TrigTimer Service"); - // } - // - // if(m_timerSvc) { - // m_timers.push_back(m_timerSvc->addItem(name()+":DataPreparator")); - // m_timers.push_back(m_timerSvc->addItem(name()+":PatternFinder")); - // m_timers.push_back(m_timerSvc->addItem(name()+":StationFitter")); - // m_timers.push_back(m_timerSvc->addItem(name()+":TrackFitter")); - // m_timers.push_back(m_timerSvc->addItem(name()+":TrackExtrapolator")); - // m_timers.push_back(m_timerSvc->addItem(name()+":CalibrationStreamer")); - // m_timers.push_back(m_timerSvc->addItem(name()+":TotalProcessing")); - // } - //} - if (m_use_timer) { - ATH_MSG_WARNING("Already removed timersvc to migrate to AthenaMT, so please don't use it"); + if (m_timerSvc.retrieve().isFailure()) { + ATH_MSG_ERROR("Unable to locate TrigTimer Service"); + } else { + ATH_MSG_DEBUG("Retrieved TrigTimer Service"); + m_timers.push_back(m_timerSvc->addItem(name()+":DataPreparator")); + m_timers.push_back(m_timerSvc->addItem(name()+":PatternFinder")); + m_timers.push_back(m_timerSvc->addItem(name()+":StationFitter")); + m_timers.push_back(m_timerSvc->addItem(name()+":TrackFitter")); + m_timers.push_back(m_timerSvc->addItem(name()+":TrackExtrapolator")); + m_timers.push_back(m_timerSvc->addItem(name()+":CalibrationStreamer")); + m_timers.push_back(m_timerSvc->addItem(name()+":TotalProcessing")); + } } // Locate RegionSelector @@ -571,18 +564,18 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr StatusCode sc = StatusCode::SUCCESS; - //if (m_timerSvc) { - // for (unsigned int i_timer=0; i_timer<m_timers.size(); i_timer++) { - // m_timers[i_timer]->start(); - // m_timers[i_timer]->pause(); - // } - //} + if (m_use_timer) { + for (unsigned int i_timer=0; i_timer<m_timers.size(); i_timer++) { + m_timers[i_timer]->start(); + m_timers[i_timer]->pause(); + } + } ATH_MSG_DEBUG("REGTEST: " << m_roiCollectionKey.key() << " size = " << roids.size() << " (argument)"); ATH_MSG_DEBUG("REGTEST: " << m_recRoiCollectionKey.key() << " size = " << muonRoIs.size() << " (argument)"); - //if (m_timerSvc) m_timers[ITIMER_TOTAL_PROCESSING]->resume(); - //if (m_timerSvc) m_timers[ITIMER_DATA_PREPARATOR]->resume(); + if (m_use_timer) m_timers[ITIMER_TOTAL_PROCESSING]->resume(); + if (m_use_timer) m_timers[ITIMER_DATA_PREPARATOR]->resume(); DataVector<const TrigRoiDescriptor>::const_iterator p_roids; DataVector<const LVL1::RecMuonRoI>::const_iterator p_roi; @@ -642,7 +635,7 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr trackPatterns, outputTracks, outputID, outputMS); return StatusCode::SUCCESS; } - //if (m_timerSvc) m_timers[ITIMER_DATA_PREPARATOR]->pause(); + if (m_use_timer) m_timers[ITIMER_DATA_PREPARATOR]->pause(); if ( m_rpcErrToDebugStream && m_dataPreparator->isRpcFakeRoi() ) { ATH_MSG_ERROR("Invalid RoI in RPC data found: event to debug stream"); @@ -656,7 +649,7 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr } // Pattern finding - //if (m_timerSvc) m_timers[ITIMER_PATTERN_FINDER]->resume(); + if (m_use_timer) m_timers[ITIMER_PATTERN_FINDER]->resume(); sc = m_patternFinder->findPatterns(m_muonRoad, m_mdtHits_normal, trackPatterns); @@ -668,10 +661,10 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr trackPatterns, outputTracks, outputID, outputMS); return StatusCode::SUCCESS; } - //if (m_timerSvc) m_timers[ITIMER_PATTERN_FINDER]->pause(); + if (m_use_timer) m_timers[ITIMER_PATTERN_FINDER]->pause(); // Superpoint fit - //if (m_timerSvc) m_timers[ITIMER_STATION_FITTER]->resume(); + if (m_use_timer) m_timers[ITIMER_STATION_FITTER]->resume(); sc = m_stationFitter->findSuperPoints(*p_roi, m_rpcFitResult, trackPatterns); @@ -683,10 +676,10 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr trackPatterns, outputTracks, outputID, outputMS); return StatusCode::SUCCESS; } - //if (m_timerSvc) m_timers[ITIMER_STATION_FITTER]->pause(); + if (m_use_timer) m_timers[ITIMER_STATION_FITTER]->pause(); // Track fitting - //if (m_timerSvc) m_timers[ITIMER_TRACK_FITTER]->resume(); + if (m_use_timer) m_timers[ITIMER_TRACK_FITTER]->resume(); sc = m_trackFitter->findTracks(*p_roi, m_rpcFitResult, trackPatterns); @@ -699,7 +692,7 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr trackPatterns, outputTracks, outputID, outputMS); return StatusCode::SUCCESS; } - //if (m_timerSvc) m_timers[ITIMER_TRACK_FITTER]->pause(); + if (m_use_timer) m_timers[ITIMER_TRACK_FITTER]->pause(); } else { // Endcap ATH_MSG_DEBUG("Endcap"); @@ -726,10 +719,10 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr trackPatterns, outputTracks, outputID, outputMS); return StatusCode::SUCCESS; } - //if (m_timerSvc) m_timers[ITIMER_DATA_PREPARATOR]->pause(); + if (m_use_timer) m_timers[ITIMER_DATA_PREPARATOR]->pause(); // Pattern finding - //if (m_timerSvc) m_timers[ITIMER_PATTERN_FINDER]->resume(); + if (m_use_timer) m_timers[ITIMER_PATTERN_FINDER]->resume(); sc = m_patternFinder->findPatterns(m_muonRoad, m_mdtHits_normal, trackPatterns); @@ -743,10 +736,10 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr trackPatterns, outputTracks, outputID, outputMS); return StatusCode::SUCCESS; } - //if (m_timerSvc) m_timers[ITIMER_PATTERN_FINDER]->pause(); + if (m_use_timer) m_timers[ITIMER_PATTERN_FINDER]->pause(); // Superpoint fit - //if (m_timerSvc) m_timers[ITIMER_STATION_FITTER]->resume(); + if (m_use_timer) m_timers[ITIMER_STATION_FITTER]->resume(); if(!m_use_new_segmentfit){ sc = m_stationFitter->findSuperPoints(*p_roi, m_tgcFitResult, @@ -769,10 +762,10 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr return StatusCode::SUCCESS; } - //if (m_timerSvc) m_timers[ITIMER_STATION_FITTER]->pause(); + if (m_use_timer) m_timers[ITIMER_STATION_FITTER]->pause(); // Track fittingh - //if (m_timerSvc) m_timers[ITIMER_TRACK_FITTER]->resume(); + if (m_use_timer) m_timers[ITIMER_TRACK_FITTER]->resume(); sc = m_trackFitter->findTracks(*p_roi, m_tgcFitResult, trackPatterns, @@ -786,7 +779,7 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr trackPatterns, outputTracks, outputID, outputMS); return StatusCode::SUCCESS; } - //if (m_timerSvc) m_timers[ITIMER_TRACK_FITTER]->pause(); + if (m_use_timer) m_timers[ITIMER_TRACK_FITTER]->pause(); } // fix if eta is strange @@ -803,7 +796,7 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr } // Track extrapolation for ID combined - //if (m_timerSvc) m_timers[ITIMER_TRACK_EXTRAPOLATOR]->resume(); + if (m_use_timer) m_timers[ITIMER_TRACK_EXTRAPOLATOR]->resume(); sc = m_trackExtrapolator->extrapolateTrack(trackPatterns, m_winPt); @@ -815,7 +808,7 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr trackPatterns, outputTracks, outputID, outputMS); return StatusCode::SUCCESS; } - //if (m_timerSvc) m_timers[ITIMER_TRACK_EXTRAPOLATOR]->pause(); + if (m_use_timer) m_timers[ITIMER_TRACK_EXTRAPOLATOR]->pause(); // Update monitoring variables sc = updateMonitor(*p_roi, m_mdtHits_normal, trackPatterns); @@ -835,7 +828,7 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr // call the calibration streamer if (m_doCalStream && trackPatterns.size()>0 ) { TrigL2MuonSA::TrackPattern tp = trackPatterns[0]; - //if (m_timerSvc) m_timers[ITIMER_CALIBRATION_STREAMER]->resume(); + if (m_use_timer) m_timers[ITIMER_CALIBRATION_STREAMER]->resume(); // m_calStreamer->setInstanceName(this->name()); @@ -850,7 +843,7 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr if (sc != StatusCode::SUCCESS ) { ATH_MSG_WARNING("Calibration streamer: create Roi Fragment failed"); } - //if (m_timerSvc) m_timers[ITIMER_CALIBRATION_STREAMER]->pause(); + if (m_use_timer) m_timers[ITIMER_CALIBRATION_STREAMER]->pause(); // if it's a data scouting chain check the buffer length if ( m_calDataScouting ) { @@ -885,16 +878,16 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr if (p_roids==roids.end()) break; } - //if (m_timerSvc) m_timers[ITIMER_TOTAL_PROCESSING]->pause(); + if (m_use_timer) m_timers[ITIMER_TOTAL_PROCESSING]->pause(); - //int nRoI = muonRoIs.size(); - - //if (m_timerSvc) { - // for (unsigned int i_timer=0; i_timer<m_timers.size(); i_timer++) { - // m_timers[i_timer]->propVal(nRoI); - // m_timers[i_timer]->stop(); - // } - //} + int nRoI = muonRoIs.size(); + + if (m_use_timer) { + for (unsigned int i_timer=0; i_timer<m_timers.size(); i_timer++) { + m_timers[i_timer]->propVal(nRoI); + m_timers[i_timer]->stop(); + } + } ATH_MSG_DEBUG("StatusCode MuFastSteering::findMuonSignature success"); return StatusCode::SUCCESS; -- GitLab From a4e67b7476a0e364aa5c31e2984def2065a4e12d Mon Sep 17 00:00:00 2001 From: Shota Hayashida <hayashida@hepl.phys.nagoya-u.ac.jp> Date: Thu, 7 Jun 2018 09:42:03 +0200 Subject: [PATCH 067/562] Changed the event number running for muon test to run HLT_2mu6 Former-commit-id: 2769d9f6423e4ad6b2268d44b71d28103e807092 --- Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_run_data.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_run_data.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_run_data.sh index e9e994378fe7..02de1b42844f 100755 --- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_run_data.sh +++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_mu_run_data.sh @@ -3,6 +3,6 @@ # art-ci: master ### BSfile ### -athena --threads=1 --skipEvents=10 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/mu.withViews.py +athena --threads=1 --skipEvents=30 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/mu.withViews.py ### RDOfile ### #athena --threads=1 -c 'EvtMax=50;FilesInput="/afs/cern.ch/user/s/shhayash/workspace/public/RDOfile/ttbar/RDO_TRIG.root"' TrigUpgradeTest/mu.withViews.py -- GitLab From 1d0bd3dcac6092a770aa97126accc0e85b7f27f6 Mon Sep 17 00:00:00 2001 From: Walter Lampl <Walter.Lampl@cern.ch> Date: Thu, 7 Jun 2018 10:10:39 +0200 Subject: [PATCH 068/562] configure iovMetaDataTool and bsMetaDataTool as public tool Former-commit-id: 6a791025e361a33ef36c1349666e66e8b4c61e9f --- Event/ByteStreamCnvSvc/python/ByteStreamConfig.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py b/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py index 872cf70ab7a5..4da7c633c0f6 100644 --- a/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py +++ b/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py @@ -46,11 +46,11 @@ def TrigBSReadCfg( inputFlags ): from IOVDbMetaDataTools.IOVDbMetaDataToolsConf import IOVDbMetaDataTool iovMetaDataTool = IOVDbMetaDataTool() - acc.addAlgTool( iovMetaDataTool ) + acc.addPublicTool( iovMetaDataTool ) from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamMetadataTool bsMetaDataTool = ByteStreamMetadataTool() - acc.addAlgTool( bsMetaDataTool ) + acc.addPublicTool( bsMetaDataTool ) from StoreGate.StoreGateConf import ProxyProviderSvc, StoreGateSvc metaDataStore = StoreGateSvc("MetaDataStore") @@ -63,7 +63,7 @@ def TrigBSReadCfg( inputFlags ): acc.addService( metaDataSvc ) metaDataSvc.MetaDataContainer = "MetaDataHdr" - metaDataSvc.MetaDataTools = [ iovMetaDataTool.name(), bsMetaDataTool.name() ] + metaDataSvc.MetaDataTools = [ iovMetaDataTool, bsMetaDataTool ] proxy = ProxyProviderSvc() proxy.ProviderNames += [ bsAddressProviderSvc.name(), metaDataSvc.name() ] -- GitLab From 0e95407cfd5caf68268a43d6fd4bd1c3f7951d7c Mon Sep 17 00:00:00 2001 From: Walter Lampl <Walter.Lampl@cern.ch> Date: Thu, 7 Jun 2018 10:32:44 +0200 Subject: [PATCH 069/562] don't call addAlgTool for tools already assigned to a parent Former-commit-id: e04ee24bfe4232f20dc4e8a72d59b73e6bfe88ef --- .../TrigUpgradeTest/python/EgammaCaloMod.py | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/EgammaCaloMod.py b/Trigger/TrigValidation/TrigUpgradeTest/python/EgammaCaloMod.py index 07218da0a513..e712198d8c17 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/EgammaCaloMod.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/EgammaCaloMod.py @@ -61,17 +61,17 @@ def TileCond( flags ): def __addFolder(f): acc.addConfig( addFolders, flags, '%s <key>%s</key>' %(f,f), 'TILE_OFL' if '/OFL' in f else 'TILE_ONL') - tool.ProxyOflCes = acc.addAlgTool( TileCondProxyCoolFlt('TileCondProxyCool_OflCes', Source = '/TILE/OFL02/CALIB/CES') ) - tool.ProxyOflCisLin = acc.addAlgTool( TileCondProxyCoolFlt('TileCondProxyCool_OflCisLin', Source = '/TILE/OFL02/CALIB/CIS/LIN') ) - tool.ProxyOflCisNln = acc.addAlgTool( TileCondProxyCoolFlt('TileCondProxyCool_OflCisNln', Source = '/TILE/OFL02/CALIB/CIS/NLN') ) - tool.ProxyOflEms = acc.addAlgTool( TileCondProxyCoolFlt('TileCondProxyCool_OflEms', Source = '/TILE/OFL02/CALIB/EMS') ) - tool.ProxyOflLasFib = acc.addAlgTool( TileCondProxyCoolFlt('TileCondProxyCool_OflLasFib', Source = '/TILE/OFL02/CALIB/LAS/FIBER') ) - tool.ProxyOflLasLin = acc.addAlgTool( TileCondProxyCoolFlt('TileCondProxyCool_OflLasLin', Source = '/TILE/OFL02/CALIB/LAS/LIN') ) - tool.ProxyOflLasNln = acc.addAlgTool( TileCondProxyCoolFlt('TileCondProxyCool_OflLasNln', Source = '/TILE/OFL02/CALIB/LAS/NLN') ) - tool.ProxyOnlCes = acc.addAlgTool( TileCondProxyCoolFlt('TileCondProxyCool_OnlCes', Source = '/TILE/ONL01/CALIB/CES') ) - tool.ProxyOnlCis = acc.addAlgTool( TileCondProxyCoolFlt('TileCondProxyCool_OnlCis', Source = '/TILE/ONL01/CALIB/CIS/LIN') ) - tool.ProxyOnlEms = acc.addAlgTool( TileCondProxyCoolFlt('TileCondProxyCool_OnlEms', Source = '/TILE/ONL01/CALIB/EMS') ) - tool.ProxyOnlLas = acc.addAlgTool( TileCondProxyCoolFlt('TileCondProxyCool_OnlLas', Source = '/TILE/ONL01/CALIB/LAS/LIN') ) + tool.ProxyOflCes = TileCondProxyCoolFlt('TileCondProxyCool_OflCes', Source = '/TILE/OFL02/CALIB/CES') + tool.ProxyOflCisLin = TileCondProxyCoolFlt('TileCondProxyCool_OflCisLin', Source = '/TILE/OFL02/CALIB/CIS/LIN') + tool.ProxyOflCisNln = TileCondProxyCoolFlt('TileCondProxyCool_OflCisNln', Source = '/TILE/OFL02/CALIB/CIS/NLN') + tool.ProxyOflEms = TileCondProxyCoolFlt('TileCondProxyCool_OflEms', Source = '/TILE/OFL02/CALIB/EMS') + tool.ProxyOflLasFib = TileCondProxyCoolFlt('TileCondProxyCool_OflLasFib', Source = '/TILE/OFL02/CALIB/LAS/FIBER') + tool.ProxyOflLasLin = TileCondProxyCoolFlt('TileCondProxyCool_OflLasLin', Source = '/TILE/OFL02/CALIB/LAS/LIN') + tool.ProxyOflLasNln = TileCondProxyCoolFlt('TileCondProxyCool_OflLasNln', Source = '/TILE/OFL02/CALIB/LAS/NLN') + tool.ProxyOnlCes = TileCondProxyCoolFlt('TileCondProxyCool_OnlCes', Source = '/TILE/ONL01/CALIB/CES') + tool.ProxyOnlCis = TileCondProxyCoolFlt('TileCondProxyCool_OnlCis', Source = '/TILE/ONL01/CALIB/CIS/LIN') + tool.ProxyOnlEms = TileCondProxyCoolFlt('TileCondProxyCool_OnlEms', Source = '/TILE/ONL01/CALIB/EMS') + tool.ProxyOnlLas = TileCondProxyCoolFlt('TileCondProxyCool_OnlLas', Source = '/TILE/ONL01/CALIB/LAS/LIN') __addFolder( '/TILE/OFL02/CALIB/CES') __addFolder( '/TILE/OFL02/CALIB/CIS/LIN') @@ -245,8 +245,6 @@ def EgammaCaloMod( flags ): accessTool = TrigDataAccess() accessTool.ApplyOffsetCorrection = False - acc.addAlgTool( accessTool ) - fastCalo.IAlgToolList = __fex_tools from TrigT2CaloCalibration.EgammaCalibrationConfig import EgammaHitsCalibrationBarrelConfig, EgammaHitsCalibrationEndcapConfig, EgammaGapCalibrationConfig from TrigT2CaloCalibration.EgammaCalibrationConfig import EgammaTransitionRegionsConfig @@ -261,12 +259,12 @@ def EgammaCaloMod( flags ): __barrelTools = [ __sshape, __hits, __gap, __transition ] fastCalo.CalibListBarrel = __barrelTools - [ acc.addAlgTool( t ) for t in __barrelTools ] + #[ acc.addAlgTool( t ) for t in __barrelTools ] __endcapTools = [ EgammaSshapeCalibrationEndcapConfig(), EgammaHitsCalibrationEndcapConfig(), EgammaGapCalibrationConfig() ] - [ acc.addAlgTool( t ) for t in __endcapTools ] + #[ acc.addAlgTool( t ) for t in __endcapTools ] fastCalo.CalibListEndcap= __endcapTools acc.addEventAlgo( fastCalo, sequence=inViewAlgsSeqName ) @@ -293,7 +291,7 @@ def EgammaCaloMod( flags ): hypo.HypoTools = [ TrigL2CaloHypoToolFromName( c ) for c in chains ] acc.addEventAlgo( hypo, sequence = 'L2CaloEgamma' ) - return acc + return acc,accessTool if __name__ == '__main__': -- GitLab From 3b7bc876e57be3673b60a1eb93b3075e646bec53 Mon Sep 17 00:00:00 2001 From: Shota Hayashida <hayashida@hepl.phys.nagoya-u.ac.jp> Date: Thu, 7 Jun 2018 11:56:39 +0200 Subject: [PATCH 070/562] Migrate the retrieval of TimerSvc to use ServiceHandle Former-commit-id: 5276cec21c1aa33ba161d50ef00b485f113d49f7 --- .../TrigL2MuonSA/MuFastSteering.h | 2 +- .../TrigL2MuonSA/src/MuFastSteering.cxx | 68 +++++++++---------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h index 264c4cf3ab6b..72ba07c2afec 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h @@ -159,7 +159,7 @@ class MuFastSteering : public HLT::FexAlgo, /** Timers */ ServiceHandle<ITrigTimerSvc> m_timerSvc; - std::vector<TrigTimer*> m_timers; + std::vector<TrigTimer*> m_timingTimers; ServiceHandle<IRegSelSvc> m_regionSelector; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx index a2bafb711d2f..090b790e820d 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx @@ -68,13 +68,13 @@ HLT::ErrorCode MuFastSteering::hltInitialize() ATH_MSG_ERROR("Unable to locate TrigTimer Service"); } else { ATH_MSG_DEBUG("Retrieved TrigTimer Service"); - m_timers.push_back(m_timerSvc->addItem(name()+":DataPreparator")); - m_timers.push_back(m_timerSvc->addItem(name()+":PatternFinder")); - m_timers.push_back(m_timerSvc->addItem(name()+":StationFitter")); - m_timers.push_back(m_timerSvc->addItem(name()+":TrackFitter")); - m_timers.push_back(m_timerSvc->addItem(name()+":TrackExtrapolator")); - m_timers.push_back(m_timerSvc->addItem(name()+":CalibrationStreamer")); - m_timers.push_back(m_timerSvc->addItem(name()+":TotalProcessing")); + m_timingTimers.push_back(m_timerSvc->addItem(name()+":DataPreparator")); + m_timingTimers.push_back(m_timerSvc->addItem(name()+":PatternFinder")); + m_timingTimers.push_back(m_timerSvc->addItem(name()+":StationFitter")); + m_timingTimers.push_back(m_timerSvc->addItem(name()+":TrackFitter")); + m_timingTimers.push_back(m_timerSvc->addItem(name()+":TrackExtrapolator")); + m_timingTimers.push_back(m_timerSvc->addItem(name()+":CalibrationStreamer")); + m_timingTimers.push_back(m_timerSvc->addItem(name()+":TotalProcessing")); } } @@ -565,17 +565,17 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr StatusCode sc = StatusCode::SUCCESS; if (m_use_timer) { - for (unsigned int i_timer=0; i_timer<m_timers.size(); i_timer++) { - m_timers[i_timer]->start(); - m_timers[i_timer]->pause(); + for (unsigned int i_timer=0; i_timer<m_timingTimers.size(); i_timer++) { + m_timingTimers[i_timer]->start(); + m_timingTimers[i_timer]->pause(); } } ATH_MSG_DEBUG("REGTEST: " << m_roiCollectionKey.key() << " size = " << roids.size() << " (argument)"); ATH_MSG_DEBUG("REGTEST: " << m_recRoiCollectionKey.key() << " size = " << muonRoIs.size() << " (argument)"); - if (m_use_timer) m_timers[ITIMER_TOTAL_PROCESSING]->resume(); - if (m_use_timer) m_timers[ITIMER_DATA_PREPARATOR]->resume(); + if (m_use_timer) m_timingTimers[ITIMER_TOTAL_PROCESSING]->resume(); + if (m_use_timer) m_timingTimers[ITIMER_DATA_PREPARATOR]->resume(); DataVector<const TrigRoiDescriptor>::const_iterator p_roids; DataVector<const LVL1::RecMuonRoI>::const_iterator p_roi; @@ -635,7 +635,7 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr trackPatterns, outputTracks, outputID, outputMS); return StatusCode::SUCCESS; } - if (m_use_timer) m_timers[ITIMER_DATA_PREPARATOR]->pause(); + if (m_use_timer) m_timingTimers[ITIMER_DATA_PREPARATOR]->pause(); if ( m_rpcErrToDebugStream && m_dataPreparator->isRpcFakeRoi() ) { ATH_MSG_ERROR("Invalid RoI in RPC data found: event to debug stream"); @@ -649,7 +649,7 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr } // Pattern finding - if (m_use_timer) m_timers[ITIMER_PATTERN_FINDER]->resume(); + if (m_use_timer) m_timingTimers[ITIMER_PATTERN_FINDER]->resume(); sc = m_patternFinder->findPatterns(m_muonRoad, m_mdtHits_normal, trackPatterns); @@ -661,10 +661,10 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr trackPatterns, outputTracks, outputID, outputMS); return StatusCode::SUCCESS; } - if (m_use_timer) m_timers[ITIMER_PATTERN_FINDER]->pause(); + if (m_use_timer) m_timingTimers[ITIMER_PATTERN_FINDER]->pause(); // Superpoint fit - if (m_use_timer) m_timers[ITIMER_STATION_FITTER]->resume(); + if (m_use_timer) m_timingTimers[ITIMER_STATION_FITTER]->resume(); sc = m_stationFitter->findSuperPoints(*p_roi, m_rpcFitResult, trackPatterns); @@ -676,10 +676,10 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr trackPatterns, outputTracks, outputID, outputMS); return StatusCode::SUCCESS; } - if (m_use_timer) m_timers[ITIMER_STATION_FITTER]->pause(); + if (m_use_timer) m_timingTimers[ITIMER_STATION_FITTER]->pause(); // Track fitting - if (m_use_timer) m_timers[ITIMER_TRACK_FITTER]->resume(); + if (m_use_timer) m_timingTimers[ITIMER_TRACK_FITTER]->resume(); sc = m_trackFitter->findTracks(*p_roi, m_rpcFitResult, trackPatterns); @@ -692,7 +692,7 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr trackPatterns, outputTracks, outputID, outputMS); return StatusCode::SUCCESS; } - if (m_use_timer) m_timers[ITIMER_TRACK_FITTER]->pause(); + if (m_use_timer) m_timingTimers[ITIMER_TRACK_FITTER]->pause(); } else { // Endcap ATH_MSG_DEBUG("Endcap"); @@ -719,10 +719,10 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr trackPatterns, outputTracks, outputID, outputMS); return StatusCode::SUCCESS; } - if (m_use_timer) m_timers[ITIMER_DATA_PREPARATOR]->pause(); + if (m_use_timer) m_timingTimers[ITIMER_DATA_PREPARATOR]->pause(); // Pattern finding - if (m_use_timer) m_timers[ITIMER_PATTERN_FINDER]->resume(); + if (m_use_timer) m_timingTimers[ITIMER_PATTERN_FINDER]->resume(); sc = m_patternFinder->findPatterns(m_muonRoad, m_mdtHits_normal, trackPatterns); @@ -736,10 +736,10 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr trackPatterns, outputTracks, outputID, outputMS); return StatusCode::SUCCESS; } - if (m_use_timer) m_timers[ITIMER_PATTERN_FINDER]->pause(); + if (m_use_timer) m_timingTimers[ITIMER_PATTERN_FINDER]->pause(); // Superpoint fit - if (m_use_timer) m_timers[ITIMER_STATION_FITTER]->resume(); + if (m_use_timer) m_timingTimers[ITIMER_STATION_FITTER]->resume(); if(!m_use_new_segmentfit){ sc = m_stationFitter->findSuperPoints(*p_roi, m_tgcFitResult, @@ -762,10 +762,10 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr return StatusCode::SUCCESS; } - if (m_use_timer) m_timers[ITIMER_STATION_FITTER]->pause(); + if (m_use_timer) m_timingTimers[ITIMER_STATION_FITTER]->pause(); // Track fittingh - if (m_use_timer) m_timers[ITIMER_TRACK_FITTER]->resume(); + if (m_use_timer) m_timingTimers[ITIMER_TRACK_FITTER]->resume(); sc = m_trackFitter->findTracks(*p_roi, m_tgcFitResult, trackPatterns, @@ -779,7 +779,7 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr trackPatterns, outputTracks, outputID, outputMS); return StatusCode::SUCCESS; } - if (m_use_timer) m_timers[ITIMER_TRACK_FITTER]->pause(); + if (m_use_timer) m_timingTimers[ITIMER_TRACK_FITTER]->pause(); } // fix if eta is strange @@ -796,7 +796,7 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr } // Track extrapolation for ID combined - if (m_use_timer) m_timers[ITIMER_TRACK_EXTRAPOLATOR]->resume(); + if (m_use_timer) m_timingTimers[ITIMER_TRACK_EXTRAPOLATOR]->resume(); sc = m_trackExtrapolator->extrapolateTrack(trackPatterns, m_winPt); @@ -808,7 +808,7 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr trackPatterns, outputTracks, outputID, outputMS); return StatusCode::SUCCESS; } - if (m_use_timer) m_timers[ITIMER_TRACK_EXTRAPOLATOR]->pause(); + if (m_use_timer) m_timingTimers[ITIMER_TRACK_EXTRAPOLATOR]->pause(); // Update monitoring variables sc = updateMonitor(*p_roi, m_mdtHits_normal, trackPatterns); @@ -828,7 +828,7 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr // call the calibration streamer if (m_doCalStream && trackPatterns.size()>0 ) { TrigL2MuonSA::TrackPattern tp = trackPatterns[0]; - if (m_use_timer) m_timers[ITIMER_CALIBRATION_STREAMER]->resume(); + if (m_use_timer) m_timingTimers[ITIMER_CALIBRATION_STREAMER]->resume(); // m_calStreamer->setInstanceName(this->name()); @@ -843,7 +843,7 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr if (sc != StatusCode::SUCCESS ) { ATH_MSG_WARNING("Calibration streamer: create Roi Fragment failed"); } - if (m_use_timer) m_timers[ITIMER_CALIBRATION_STREAMER]->pause(); + if (m_use_timer) m_timingTimers[ITIMER_CALIBRATION_STREAMER]->pause(); // if it's a data scouting chain check the buffer length if ( m_calDataScouting ) { @@ -878,14 +878,14 @@ StatusCode MuFastSteering::findMuonSignature(const DataVector<const TrigRoiDescr if (p_roids==roids.end()) break; } - if (m_use_timer) m_timers[ITIMER_TOTAL_PROCESSING]->pause(); + if (m_use_timer) m_timingTimers[ITIMER_TOTAL_PROCESSING]->pause(); int nRoI = muonRoIs.size(); if (m_use_timer) { - for (unsigned int i_timer=0; i_timer<m_timers.size(); i_timer++) { - m_timers[i_timer]->propVal(nRoI); - m_timers[i_timer]->stop(); + for (unsigned int i_timer=0; i_timer<m_timingTimers.size(); i_timer++) { + m_timingTimers[i_timer]->propVal(nRoI); + m_timingTimers[i_timer]->stop(); } } -- GitLab From d68a2aaf7a82bf3af4e7b716ca6287e804800d15 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Thu, 7 Jun 2018 14:22:20 +0200 Subject: [PATCH 071/562] AthenaKernel: Add calls from CondCont to the conditions cleaning service. CondCont makes a call to the cleaning service after a conditions object is added to the container. Former-commit-id: 0803c3978913a9e7c5735d05d04630a66b88d9b3 --- Control/AthenaKernel/AthenaKernel/CondCont.h | 25 +++++++++- .../AthenaKernel/AthenaKernel/CondCont.icc | 19 +------ Control/AthenaKernel/src/CondCont.cxx | 45 +++++++++++++++++ Control/AthenaKernel/test/CondCont_test.cxx | 49 ++++++++++++++++++- 4 files changed, 118 insertions(+), 20 deletions(-) diff --git a/Control/AthenaKernel/AthenaKernel/CondCont.h b/Control/AthenaKernel/AthenaKernel/CondCont.h index 5fe8c6256906..5ee7ec7fa8ad 100644 --- a/Control/AthenaKernel/AthenaKernel/CondCont.h +++ b/Control/AthenaKernel/AthenaKernel/CondCont.h @@ -15,12 +15,15 @@ #include "AthenaKernel/ClassID_traits.h" #include "AthenaKernel/BaseInfo.h" #include "AthenaKernel/RCUUpdater.h" +#include "AthenaKernel/IConditionsCleanerSvc.h" #include "CxxUtils/ConcurrentRangeMap.h" +#include "CxxUtils/checker_macros.h" #include "GaudiKernel/EventIDBase.h" #include "GaudiKernel/EventIDRange.h" #include "GaudiKernel/DataObjID.h" #include "GaudiKernel/StatusCode.h" +#include "GaudiKernel/ServiceHandle.h" #include "boost/preprocessor/facilities/overload.hpp" #include <iostream> @@ -333,6 +336,14 @@ public: }; + /** + * @brief Allow overriding the name of the global conditions cleaner + * service (for testing purposes). + * @param name The name of the global conditions cleaner service. + */ + static void setCleanerSvcName ATLAS_NOT_THREAD_SAFE (const std::string& name); + + protected: /** * @brief Internal constructor. @@ -373,10 +384,22 @@ protected: const EventIDBase& t, EventIDRange const** r) const = 0; - + + /** + * @brief Tell the cleaner that a new object was added to the container. + */ + StatusCode inserted (const EventContext& ctx); + + private: /// CLID of the most-derived @c CondCont CLID m_clid; + + /// Handle to the cleaner service. + ServiceHandle<Athena::IConditionsCleanerSvc> m_cleanerSvc; + + /// Name of the global conditions cleaner service. + static std::string s_cleanerSvcName ATLAS_THREAD_SAFE; }; diff --git a/Control/AthenaKernel/AthenaKernel/CondCont.icc b/Control/AthenaKernel/AthenaKernel/CondCont.icc index 518c38d69a7e..6c33e65451f5 100644 --- a/Control/AthenaKernel/AthenaKernel/CondCont.icc +++ b/Control/AthenaKernel/AthenaKernel/CondCont.icc @@ -20,23 +20,6 @@ CLID CondContBase::clid() const } -/** - * @brief Internal constructor. - * @param rcusvc RCU service instance. - * @param CLID of the most-derived @c CondCont. - * @param id CLID+key for this object. - * @param proxy @c DataProxy for this object. - */ -inline -CondContBase::CondContBase (Athena::IRCUSvc& /*rcusvc*/, - CLID clid, - const DataObjID& /*id*/, - SG::DataProxy* /*proxy*/) - : m_clid (clid) -{ -} - - /** * @brief Do pointer conversion for the payload type. * @param clid CLID for the desired pointer type. @@ -357,7 +340,7 @@ StatusCode CondCont<T>::insert (const EventIDRange& r, return StatusCode::FAILURE; } - return StatusCode::SUCCESS; + return this->inserted (ctx); } diff --git a/Control/AthenaKernel/src/CondCont.cxx b/Control/AthenaKernel/src/CondCont.cxx index c004c5d1c3b2..cb32f06d9b74 100644 --- a/Control/AthenaKernel/src/CondCont.cxx +++ b/Control/AthenaKernel/src/CondCont.cxx @@ -10,6 +10,10 @@ #include "AthenaKernel/CondCont.h" +/// Default name of the global conditions cleaner service. +std::string CondContBase::s_cleanerSvcName = "Athena::ConditionsCleanerSvc"; + + /** * @brief Name of the category. */ @@ -56,3 +60,44 @@ bool CondContBase::Category::isDuplicate (StatusCode code) STATUSCODE_ENUM_IMPL (CondContStatusCode, CondContBase::Category) + + +/** + * @brief Internal constructor. + * @param rcusvc RCU service instance. + * @param CLID of the most-derived @c CondCont. + * @param id CLID+key for this object. + * @param proxy @c DataProxy for this object. + */ +CondContBase::CondContBase (Athena::IRCUSvc& /*rcusvc*/, + CLID clid, + const DataObjID& /*id*/, + SG::DataProxy* /*proxy*/) + : m_clid (clid), + m_cleanerSvc (s_cleanerSvcName, "CondContBase") +{ + if (!m_cleanerSvc.retrieve().isSuccess()) { + std::abort(); + } +} + + +/** + * @brief Tell the cleaner that a new object was added to the container. + */ +StatusCode CondContBase::inserted (const EventContext& ctx) +{ + return m_cleanerSvc->condObjAdded (ctx, *this); +} + + +/** + * @brief Allow overriding the name of the global conditions cleaner + * service (for testing purposes). + * @param name The name of the global conditions cleaner service. + */ +void CondContBase::setCleanerSvcName (const std::string& name) +{ + s_cleanerSvcName = name; +} + diff --git a/Control/AthenaKernel/test/CondCont_test.cxx b/Control/AthenaKernel/test/CondCont_test.cxx index 613a02761148..f2de77090565 100644 --- a/Control/AthenaKernel/test/CondCont_test.cxx +++ b/Control/AthenaKernel/test/CondCont_test.cxx @@ -14,13 +14,16 @@ #include "AthenaKernel/CondCont.h" #include "AthenaKernel/CLASS_DEF.h" #include "TestTools/random.h" +#include "CxxUtils/checker_macros.h" #include "GaudiKernel/EventContext.h" #include "GaudiKernel/ThreadLocalContext.h" +#include "GaudiKernel/Service.h" #include <mutex> #include <shared_mutex> #include <thread> #include <cassert> #include <iostream> +#include <atomic> namespace SG { @@ -55,6 +58,46 @@ public: }; +class ConditionsCleanerTest + : public extends<Service, Athena::IConditionsCleanerSvc> +{ +public: + ConditionsCleanerTest (const std::string& name, + ISvcLocator* svcloc) + : base_class (name, svcloc) + {} + virtual StatusCode event (const EventContext& ctx, + bool allowAsync) override; + virtual StatusCode condObjAdded (const EventContext& ctx, + CondContBase& cc) override; + + virtual StatusCode printStats() const override + { std::abort(); } + + static std::atomic<int> s_nobj; +}; + +std::atomic<int> ConditionsCleanerTest::s_nobj; + + +StatusCode ConditionsCleanerTest::event (const EventContext& /*ctx*/, + bool /*allowAsync*/) +{ + return StatusCode::SUCCESS; +} + + +StatusCode ConditionsCleanerTest::condObjAdded (const EventContext& /*ctx*/, + CondContBase& /*cc*/) +{ + ++s_nobj; + return StatusCode::SUCCESS; +} + + +DECLARE_COMPONENT( ConditionsCleanerTest ) + + class B { public: @@ -111,6 +154,7 @@ const EventIDRange r3 (timestamp (123), timestamp (456)); template <class T> void fillit (CondCont<T>& cc, std::vector<T*> & ptrs) { + int nsave = ConditionsCleanerTest::s_nobj; assert (cc.entries() == 0); assert (cc.entriesTimestamp() == 0); assert (cc.entriesRunLBN() == 0); @@ -156,6 +200,7 @@ RE: [0]\n"); auto t4 = std::make_unique<T> (4); assert( ! cc.insert (EventIDRange (runlbn (40, 2), timestamp (543)), std::move(t4)).isSuccess() ); + assert (ConditionsCleanerTest::s_nobj - nsave == 3); } @@ -465,8 +510,10 @@ void test3 (TestRCUSvc& rcusvc) } -int main() +int main ATLAS_NOT_THREAD_SAFE () { + CondContBase::setCleanerSvcName ("ConditionsCleanerTest"); + // Verify that B is indeed offset in D, so we get to test a nontrivial conversion. { D d(0); -- GitLab From ef0ee536546db1fa19d6ddedccd8b2db93833282 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Thu, 7 Jun 2018 15:45:16 +0200 Subject: [PATCH 072/562] Solve coverity 114097, and tidy up #includes Former-commit-id: 659af6037ddcbb95f14698391cabe3913c2116b2 --- .../src/TRTDigitizationTool.cxx | 19 ++++++--------- .../src/TRTDigitizationTool.h | 23 ++++++++++++------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.cxx b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.cxx index 6315d362474c..98ddbd57957d 100644 --- a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.cxx +++ b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.cxx @@ -8,8 +8,6 @@ // Implementation file for class TRTDigitizationTool // /////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// #include "TRTDigitizationTool.h" #include "HitManagement/TimedHitCollection.h" @@ -55,8 +53,6 @@ // Gaudi includes #include "GaudiKernel/SmartDataPtr.h" -#include <set> -#include <sstream> #include "TRT_ConditionsServices/ITRT_StrawNeighbourSvc.h" //CondDB @@ -69,7 +65,6 @@ static constexpr unsigned int crazyParticleBarcode(std::numeric_limits<int32_t>: #include "CLHEP/Random/RandGaussZiggurat.h" -#include "StoreGate/WriteHandleKey.h" //#include "driftCircle.h" // local copy for debugging and development //_____________________________________________________________________________ @@ -755,26 +750,26 @@ StatusCode TRTDigitizationTool::createAndStoreRDOs() if (IdHash != IdHashOld) { RDOColl = new TRT_RDO_Collection(IdHash); - ATH_MSG_DEBUG ( "New TRT RDO Collection created with IdHash " << static_cast<int>(IdHash) ); - IdHashOld = IdHash; RDOColl->setIdentifier(layer_id); // Add to the container if (m_trtrdo_container->addCollection(RDOColl, RDOColl->identifyHash()).isFailure()) { - ATH_MSG_FATAL ( "Container " << m_outputRDOCollName.key() << " could not be registered in StoreGate !" ); - return StatusCode::FAILURE; + ATH_MSG_FATAL ( "Container " << m_outputRDOCollName.key() << " could not be registered in StoreGate !" ); + return StatusCode::FAILURE; } else { - ATH_MSG_DEBUG ( "Container " << m_outputRDOCollName.key() << " registered in StoreGate" ); + ATH_MSG_DEBUG ( "Container " << m_outputRDOCollName.key() << " registered in StoreGate" ); } } // Put RDO into Collection TRT_LoLumRawData *p_rdo(new TRT_LoLumRawData(idStraw, TRTDigitIter->GetDigit())); - if (RDOColl!=NULL) { RDOColl->push_back(p_rdo); } - else { + if (RDOColl) { + RDOColl->push_back(p_rdo); + } else { ATH_MSG_FATAL ( "Failed to create the TRT_RDO_Collection before trying to add an RDO to it! IdHash = " << static_cast<int>(IdHash) ); + delete p_rdo; return StatusCode::FAILURE; } ++TRTDigitIter; diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.h b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.h index 249ffdddb1dd..9297d7656014 100644 --- a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.h +++ b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.h @@ -9,9 +9,7 @@ * $Id: PileUpStream.h,v 1.18 2008-10-31 18:34:42 calaf Exp $ * @author Paolo Calafiura - ATLAS Collaboration */ -#include <vector> -#include <list> -#include <utility> /* pair */ + #include "xAODEventInfo/EventInfo.h" /*SubEvent*/ #include "PileUpTools/PileUpToolBase.h" #include "TRTDigit.h" @@ -19,13 +17,13 @@ #include "GaudiKernel/ToolHandle.h" #include "InDetRawData/TRT_RDO_Container.h" #include "InDetSimData/InDetSimDataCollection.h" -//#include "CommissionEvent/ComTime.h" -#include "TRT_ConditionsServices/ITRT_StrawNeighbourSvc.h" -#include "HepPDT/ParticleDataTable.hh" -#include "TRT_ConditionsServices/ITRT_StrawStatusSummarySvc.h" -#include "CLHEP/Random/RandomEngine.h" + #include "StoreGate/WriteHandleKey.h" #include "StoreGate/WriteHandle.h" +#include <vector> +#include <list> +#include <set> +#include <utility> /* pair */ class PileUpMergeSvc; class ITRT_PAITool; @@ -37,6 +35,15 @@ class TRTElectronicsProcessing; class TRTDigCondBase; class TRTNoise; class ITRT_StrawNeighbourSvc; +class ITRT_StrawStatusSummarySvc; + +namespace CLHEP{ + class HepRandomEngine; +} + +namespace HepPDT{ + class ParticleDataTable; +} #include "HitManagement/TimedHitCollection.h" class TRTUncompressedHit; -- GitLab From ff9d4695a415e5c2b46f8d86773950dd90730aea Mon Sep 17 00:00:00 2001 From: tkharlam <tatyana.kharlamova@cern.ch> Date: Thu, 7 Jun 2018 17:29:33 +0200 Subject: [PATCH 073/562] Fixes for overlay jobs to run: 1) InDet configuration update to fix ATLASSIM-3642 2) Muon configuration update with the request https://gitlab.cern.ch/atlas/athena/merge_requests/11592 Former-commit-id: 628849013b65a1e723451d1d79ece9388f6e5e75 --- .../share/InnerDetectorOverlay_jobOptions.py | 17 ++--------------- .../share/MuonOverlay_jobOptions.py | 4 +++- .../InDetOverlay/python/InDetOverlayConfig.py | 8 +++++++- .../RPC_Digitization/RpcDigitizationTool.h | 2 +- .../python/RPC_DigitizationConfig.py | 2 +- .../src/RpcDigitizationTool.cxx | 1 + .../TGC_Digitization/TgcDigitizationTool.h | 2 +- .../python/TGC_DigitizationConfig.py | 2 +- 8 files changed, 17 insertions(+), 21 deletions(-) diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py index 4ab85873deff..6753682414d2 100644 --- a/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py +++ b/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py @@ -64,27 +64,14 @@ if DetFlags.overlay.pixel_on() or DetFlags.overlay.SCT_on() or DetFlags.overlay. #conddb.addFolderWithTag("TRT_OFL","/TRT/Cond/DigVers","TRTCondDigVers-Collisions-01",force=True,forceMC=True) conddb.addFolder("TRT_OFL","/TRT/Cond/DigVers",forceMC=True) - job += CfgGetter.getAlgorithm("TRT_OverlayDigitization") - - indetovl.do_TRT = True - - - from Digitization.DigitizationFlags import digitizationFlags - rndmStream = "InDetOverlay" - indetovl.RndmEngine = rndmStream - indetovl.RndmSvc = digitizationFlags.rndmSvc.get_Value(); - from TRT_ElectronPidTools.TRT_ElectronPidToolsConf import InDet__TRT_LocalOccupancy TRT_LocalOccupancy = InDet__TRT_LocalOccupancy( name ="TRT_LocalOccupancy", isTrigger = False, ) ToolSvc += TRT_LocalOccupancy - indetovl.TRT_LocalOccupancyTool = TRT_LocalOccupancy - - #HT hit correction fraction - indetovl.TRT_HT_OccupancyCorrectionBarrel = 0.160 - indetovl.TRT_HT_OccupancyCorrectionEndcap = 0.130 + job += CfgGetter.getAlgorithm("TRT_OverlayDigitization") + from InDetRecExample.InDetJobProperties import InDetFlags include("InDetRecExample/InDetRecConditionsAccess.py") diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/MuonOverlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/MuonOverlay_jobOptions.py index 1835409bc215..88b90882734e 100644 --- a/Event/EventOverlay/EventOverlayJobTransforms/share/MuonOverlay_jobOptions.py +++ b/Event/EventOverlay/EventOverlayJobTransforms/share/MuonOverlay_jobOptions.py @@ -58,7 +58,9 @@ if DetFlags.overlay.MDT_on() or DetFlags.overlay.CSC_on() or DetFlags.overlay.RP job += CfgGetter.getAlgorithm("MdtOverlay") from MuonByteStreamCnvTest.MuonByteStreamCnvTestConf import MdtDigitToMdtRDO job += MdtDigitToMdtRDO() - job.MdtDigitToMdtRDO.EvtStore = job.MdtOverlay.OutputStore + job.MdtDigitToMdtRDO.InputObjectName = overlayFlags.dataStore()+"+MDT_DIGITS" + job.MdtDigitToMdtRDO.OutputObjectName = overlayFlags.dataStore()+"+MDTCSM" + if readBS: ToolSvc.MdtRawDataProviderTool.RdoLocation = "OriginalEvent_SG+MDTCSM" diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfig.py b/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfig.py index 72f268c54fc0..4c42d86a4832 100644 --- a/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfig.py +++ b/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfig.py @@ -5,12 +5,18 @@ from AthenaCommon import CfgMgr def getInDetOverlay(name="InDetOverlay", **kwargs): from AthenaCommon.DetFlags import DetFlags from OverlayCommonAlgs.OverlayFlags import overlayFlags - + from Digitization.DigitizationFlags import digitizationFlags kwargs.setdefault("do_TRT", DetFlags.overlay.TRT_on()); kwargs.setdefault("do_TRT_background", DetFlags.overlay.TRT_on()); kwargs.setdefault("mainInputTRTKey", overlayFlags.dataStore() + "+TRT_RDOs"); kwargs.setdefault("overlayInputTRTKey", overlayFlags.evtStore() + "+TRT_RDOs"); kwargs.setdefault("mainOutputTRTKey", overlayFlags.outputStore() + "+TRT_RDOs"); + kwargs.setdefault("RndmEngine", "InDetOverlay") + kwargs.setdefault("RndmSvc",digitizationFlags.rndmSvc.get_Value()) + kwargs.setdefault("TRT_LocalOccupancyTool","TRT_LocalOccupancy") + #HT hit correction fraction + kwargs.setdefault("TRT_HT_OccupancyCorrectionBarrel",0.160) + kwargs.setdefault("TRT_HT_OccupancyCorrectionEndcap",0.130) kwargs.setdefault("do_SCT", DetFlags.overlay.SCT_on()); kwargs.setdefault("do_SCT_background", DetFlags.overlay.SCT_on()); kwargs.setdefault("mainInputSCTKey", overlayFlags.dataStore() + "+SCT_RDOs"); diff --git a/MuonSpectrometer/MuonDigitization/RPC_Digitization/RPC_Digitization/RpcDigitizationTool.h b/MuonSpectrometer/MuonDigitization/RPC_Digitization/RPC_Digitization/RpcDigitizationTool.h index 797a353bdb81..e44dd2cf112f 100644 --- a/MuonSpectrometer/MuonDigitization/RPC_Digitization/RPC_Digitization/RpcDigitizationTool.h +++ b/MuonSpectrometer/MuonDigitization/RPC_Digitization/RPC_Digitization/RpcDigitizationTool.h @@ -229,7 +229,7 @@ protected: PileUpMergeSvc *m_mergeSvc; // Pile up service std::string m_inputHitCollectionName; // name of the input objects SG::WriteHandleKey<RpcDigitContainer> m_outputDigitCollectionKey{this,"OutputObjectName","RPC_DIGITS","WriteHandleKey for Output RpcDigitContainer"}; // name of the output digits - SG::WriteHandleKey<MuonSimDataCollection> m_outputSDO_CollectionKey{this,"OutputSDOsName","RPC_SDO","WriteHandleKey for Output MuonSimDataCollection"}; // name of the output SDOs + SG::WriteHandleKey<MuonSimDataCollection> m_outputSDO_CollectionKey{this,"OutputSDOName","RPC_SDO","WriteHandleKey for Output MuonSimDataCollection"}; // name of the output SDOs ServiceHandle<IAtRndmGenSvc> m_rndmSvc; // Random number service CLHEP::HepRandomEngine *m_rndmEngine; // Random number engine used - not init in SiDigitization diff --git a/MuonSpectrometer/MuonDigitization/RPC_Digitization/python/RPC_DigitizationConfig.py b/MuonSpectrometer/MuonDigitization/RPC_Digitization/python/RPC_DigitizationConfig.py index 671da905d567..95125facf2d4 100644 --- a/MuonSpectrometer/MuonDigitization/RPC_Digitization/python/RPC_DigitizationConfig.py +++ b/MuonSpectrometer/MuonDigitization/RPC_Digitization/python/RPC_DigitizationConfig.py @@ -157,5 +157,5 @@ def Rpc_OverlayDigitizationTool(name="RpcDigitizationTool", **kwargs): from OverlayCommonAlgs.OverlayFlags import overlayFlags kwargs.setdefault("EvtStore", overlayFlags.evtStore()) kwargs.setdefault("OutputObjectName",overlayFlags.evtStore()+"+RPC_DIGITS") - kwargs.setdefault("OutputSDOsName",overlayFlags.evtStore()+"+RPC_SDO") + kwargs.setdefault("OutputSDOName",overlayFlags.evtStore()+"+RPC_SDO") return RpcDigitizationTool(name, **kwargs) diff --git a/MuonSpectrometer/MuonDigitization/RPC_Digitization/src/RpcDigitizationTool.cxx b/MuonSpectrometer/MuonDigitization/RPC_Digitization/src/RpcDigitizationTool.cxx index cc14c79c5b1c..50f6978dc0a8 100644 --- a/MuonSpectrometer/MuonDigitization/RPC_Digitization/src/RpcDigitizationTool.cxx +++ b/MuonSpectrometer/MuonDigitization/RPC_Digitization/src/RpcDigitizationTool.cxx @@ -154,6 +154,7 @@ StatusCode RpcDigitizationTool::initialize() { ATH_MSG_DEBUG ( "Parameters " << m_paraFile ); ATH_MSG_DEBUG ( "InputObjectName " << m_inputHitCollectionName ); ATH_MSG_DEBUG ( "OutputObjectName " << m_outputDigitCollectionKey.key() ); + ATH_MSG_DEBUG ( "OutputSDOName " << m_outputSDO_CollectionKey.key()); ATH_MSG_DEBUG ( "WindowLowerOffset " << m_timeWindowLowerOffset ); ATH_MSG_DEBUG ( "WindowUpperOffset " << m_timeWindowUpperOffset ); ATH_MSG_DEBUG ( "DeadTime " << m_deadTime ); diff --git a/MuonSpectrometer/MuonDigitization/TGC_Digitization/TGC_Digitization/TgcDigitizationTool.h b/MuonSpectrometer/MuonDigitization/TGC_Digitization/TGC_Digitization/TgcDigitizationTool.h index 09aa6148cac2..24df60af6ac8 100644 --- a/MuonSpectrometer/MuonDigitization/TGC_Digitization/TGC_Digitization/TgcDigitizationTool.h +++ b/MuonSpectrometer/MuonDigitization/TGC_Digitization/TGC_Digitization/TgcDigitizationTool.h @@ -103,7 +103,7 @@ private: std::string m_inputHitCollectionName; // name of the input objects SG::WriteHandleKey<TgcDigitContainer> m_outputDigitCollectionKey{this,"OutputObjectName","TGC_DIGITS","WriteHandleKey for Output TgcDigitContainer"}; // name of the output digits - SG::WriteHandleKey<MuonSimDataCollection> m_outputSDO_CollectionKey{this,"OutputSDOsName","TGC_SDO","WriteHandleKey for Output MuonSimDataCollection"}; // name of the output SDOs + SG::WriteHandleKey<MuonSimDataCollection> m_outputSDO_CollectionKey{this,"OutputSDOName","TGC_SDO","WriteHandleKey for Output MuonSimDataCollection"}; // name of the output SDOs //pileup truth veto bool m_includePileUpTruth; diff --git a/MuonSpectrometer/MuonDigitization/TGC_Digitization/python/TGC_DigitizationConfig.py b/MuonSpectrometer/MuonDigitization/TGC_Digitization/python/TGC_DigitizationConfig.py index 041b62d22f2f..3c4b397d8b1b 100644 --- a/MuonSpectrometer/MuonDigitization/TGC_Digitization/python/TGC_DigitizationConfig.py +++ b/MuonSpectrometer/MuonDigitization/TGC_Digitization/python/TGC_DigitizationConfig.py @@ -39,6 +39,6 @@ def getTgcRange(name="TgcRange", **kwargs): def Tgc_OverlayDigitizationTool(name="Tgc_OverlayDigitizationTool", **kwargs): from OverlayCommonAlgs.OverlayFlags import overlayFlags kwargs.setdefault("OutputObjectName",overlayFlags.evtStore()+"+TGC_DIGITS") - kwargs.setdefault("OutputSDOsName",overlayFlags.evtStore()+"+TGC_SDO") + kwargs.setdefault("OutputSDOName",overlayFlags.evtStore()+"+TGC_SDO") kwargs.setdefault("EvtStore", overlayFlags.evtStore()) return TgcDigitizationTool(name,**kwargs) -- GitLab From 4e5679b76f628996fbb63444b87e3b683b416fd8 Mon Sep 17 00:00:00 2001 From: John Baines <john.baines@cern.ch> Date: Thu, 7 Jun 2018 17:32:33 +0200 Subject: [PATCH 074/562] fix TrigCaloRec_entries.cxx Former-commit-id: c6e4ade7f9941401989c36bf5a51690e5d689c8d --- .../TrigCaloRec/src/components/TrigCaloRec_entries.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/components/TrigCaloRec_entries.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/components/TrigCaloRec_entries.cxx index e0d7f391978b..931040dea02b 100644 --- a/Trigger/TrigAlgorithms/TrigCaloRec/src/components/TrigCaloRec_entries.cxx +++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/components/TrigCaloRec_entries.cxx @@ -18,7 +18,6 @@ #include "../TrigCaloClusterMakerMT.h" #include "../TrigCaloCellMakerMT.h" #include "../TrigCaloTowerMakerMT.h" -#include "../TrigFullCaloCellMakerMT.h" #include "TrigCaloRec/TrigCaloTopoTowerAlgorithm.h" #include "TrigCaloRec/TrigCaloCell2ClusterMapper.h" @@ -26,7 +25,6 @@ #include "../HLTCaloCellSumMaker.h" DECLARE_COMPONENT( TrigCaloCellMakerMT ) -DECLARE_COMPONENT( TrigFullCaloCellMakerMT ) DECLARE_COMPONENT( TrigCaloTowerMakerMT ) DECLARE_COMPONENT( TrigCaloClusterMakerMT ) DECLARE_COMPONENT( TrigCaloCellMaker ) -- GitLab From a4ed7687e07c273cbe89419522a2eb26394ab8ad Mon Sep 17 00:00:00 2001 From: charles leggett <leggett@cern.ch> Date: Thu, 7 Jun 2018 09:59:59 -0700 Subject: [PATCH 075/562] add some patterns to ignore in post.sh Former-commit-id: 519919f2b1d6773ff9735a6fec5461102363a243 --- AtlasTest/TestTools/share/post.sh | 4 ++++ Control/DataModelTest/DataModelRunTests/test/post.sh | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/AtlasTest/TestTools/share/post.sh b/AtlasTest/TestTools/share/post.sh index ac79eb0cbd82..04290bea01f3 100755 --- a/AtlasTest/TestTools/share/post.sh +++ b/AtlasTest/TestTools/share/post.sh @@ -170,6 +170,10 @@ PP="$PP"'|DEBUG Calling destructor' PP="$PP"'|INFO TopAlg list empty.' +PP="$PP"'|^ChronoStatSvc +INFO +Number of skipped events for MemStat' +PP="$PP"'|^Py:Athena +INFO +including file' +PP="$PP"'|^Athena +INFO +including file' + # Ignore annoying error from root 6.10.06 PP="$PP"'|no interpreter information for class TSelectorCint' diff --git a/Control/DataModelTest/DataModelRunTests/test/post.sh b/Control/DataModelTest/DataModelRunTests/test/post.sh index d34c80e3f870..41005182f8cd 100755 --- a/Control/DataModelTest/DataModelRunTests/test/post.sh +++ b/Control/DataModelTest/DataModelRunTests/test/post.sh @@ -85,7 +85,9 @@ PP="$PP"'|^Warning in <TClass::TClass>: no dictionary for class' PP="$PP"'|^.+ *INFO Initializing .+ - package version .*' PP="$PP"'|^.+ *INFO Finalizing .+ - package version .*' PP="$PP"'|^PoolSvc *INFO Database .* attribute .FILE_SIZE.:' -PP="$PP"'|^ChronoStatSvc INFO Number of skipped events for MemStat-1' +PP="$PP"'|^ChronoStatSvc +INFO +Number of skipped events for MemStat' +PP="$PP"'|^Py:Athena +INFO +including file' +PP="$PP"'|^Athena +INFO +including file' PP="$PP"'|^ StorageSvc Error Cannot connect to proper technology domain.' PP="$PP"'|^PoolSvc ERROR Failed to set POOL property, TREE_MAX_SIZE to 1099511627776L' PP="$PP"'|^AthenaPoolCnvSvc WARNING setAttribute FAILED for TREE_MAX_SIZE' -- GitLab From 7243a03e30b63953c3594b517263f5b5ee246bb2 Mon Sep 17 00:00:00 2001 From: tkharlam <tatyana.kharlamova@cern.ch> Date: Thu, 7 Jun 2018 20:11:56 +0200 Subject: [PATCH 076/562] Update pedestalKey to be LArPedestal Former-commit-id: 69272ae157ceef6c0078d4f807d1144921513fb3 --- .../EventOverlayJobTransforms/share/CaloOverlay_jobOptions.py | 2 +- .../EventOverlayJobTransforms/share/LArMcSignal_jobOptions.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/CaloOverlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/CaloOverlay_jobOptions.py index 682d98e075bf..e2f0a89ab8f1 100644 --- a/Event/EventOverlay/EventOverlayJobTransforms/share/CaloOverlay_jobOptions.py +++ b/Event/EventOverlay/EventOverlayJobTransforms/share/CaloOverlay_jobOptions.py @@ -58,7 +58,7 @@ if DetFlags.overlay.LAr_on(): #job.digitmaker1.LArPileUpTool.OutputLevel=DEBUG #MessageSvc.debugLimit = 100000 #job.digitmaker1.LArPileUpTool.useLArFloat=False - job.digitmaker1.LArPileUpTool.PedestalKey = "Pedestal" + job.digitmaker1.LArPileUpTool.PedestalKey = "LArPedestal" job.LArRawChannelBuilder.DataLocation = "LArDigitContainer_MC" #---------------------------------------------------------------- diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/LArMcSignal_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/LArMcSignal_jobOptions.py index 0cf60cc46327..405537047fab 100644 --- a/Event/EventOverlay/EventOverlayJobTransforms/share/LArMcSignal_jobOptions.py +++ b/Event/EventOverlay/EventOverlayJobTransforms/share/LArMcSignal_jobOptions.py @@ -59,7 +59,7 @@ if DetFlags.overlay.LAr_on(): newLArRawChannelBuilder.UseOFCTool= False newLArRawChannelBuilder.PhaseInversion=True newLArRawChannelBuilder.LArRawChannelContainerName = "LArRawChannels" - newLArRawChannelBuilder.PedestalKey='Pedestal' + newLArRawChannelBuilder.PedestalKey='LArPedestal' else : from LArRecUtils.LArOFCToolDefault import LArOFCToolDefault theOFCTool = LArOFCToolDefault() -- GitLab From ed43718594b180bc0215ff0b745885cd5047cbc0 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Thu, 7 Jun 2018 15:36:35 +0200 Subject: [PATCH 077/562] LArRawUtils: Further workarounds for cabling service initialization. Further hacking around cabling service initialization issues. The root tension here seems to be that the cabling service doesn't want to initialize until after the first event is read and conditions are fully available, but there are some clients (such as the region selector) that need it initialized earlier. Former-commit-id: 6601a6e7dea3ce850a38f3cc039c1a0eea3ae30f --- .../LArRawUtils/LArRawUtils/LArRoI_Map.h | 2 ++ LArCalorimeter/LArRawUtils/src/LArRoI_Map.cxx | 21 +++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/LArCalorimeter/LArRawUtils/LArRawUtils/LArRoI_Map.h b/LArCalorimeter/LArRawUtils/LArRawUtils/LArRoI_Map.h index f31ee9dfe2ce..a4cd397a030d 100755 --- a/LArCalorimeter/LArRawUtils/LArRawUtils/LArRoI_Map.h +++ b/LArCalorimeter/LArRawUtils/LArRawUtils/LArRoI_Map.h @@ -94,6 +94,8 @@ class LArRoI_Map : public AthAlgTool, void print(); + StatusCode initCabling(); + /** Map for offline ID and online id */ typedef std::map<unsigned int, TT_ID> OFFMAP ; diff --git a/LArCalorimeter/LArRawUtils/src/LArRoI_Map.cxx b/LArCalorimeter/LArRawUtils/src/LArRoI_Map.cxx index 48cc6677f4a8..581755f150e5 100755 --- a/LArCalorimeter/LArRawUtils/src/LArRoI_Map.cxx +++ b/LArCalorimeter/LArRawUtils/src/LArRoI_Map.cxx @@ -90,7 +90,7 @@ StatusCode LArRoI_Map::initialize() void LArRoI_Map::handle(const Incident& /*inc*/) -{ +{ ATH_MSG_INFO( " handle called " ); initData().ignore(); @@ -103,11 +103,8 @@ StatusCode LArRoI_Map::iovCallBack(IOVSVC_CALLBACK_ARGS) { m_validCache = false; - // HACK: Force a call to the cabling service iov callback to make sure - // it gets initialized early enough. - int dum1 = 0; - std::list<std::string> dum2 { "/LAR/Identifier/OnOffIdMap" }; - return m_cablingSvc->iovCallBack (dum1, dum2); + ATH_CHECK( initCabling() ); + return StatusCode::SUCCESS; } @@ -120,6 +117,8 @@ StatusCode LArRoI_Map::initData() return StatusCode::SUCCESS; } + ATH_CHECK( initCabling() ); + ATH_MSG_DEBUG(" in initData, cache is not valid" ); m_offmap.clear(); @@ -563,3 +562,13 @@ void LArRoI_Map::print() } + +StatusCode LArRoI_Map::initCabling() +{ + // HACK: Force a call to the cabling service iov callback to make sure + // it gets initialized early enough. + int dum1 = 0; + std::list<std::string> dum2 { "/LAR/Identifier/OnOffIdMap" }; + return m_cablingSvc->iovCallBack (dum1, dum2); +} + -- GitLab From 817e9206404800c766e8b46341d6790758c31b15 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Thu, 7 Jun 2018 15:41:09 +0200 Subject: [PATCH 078/562] TrigHLTJetRec: Fix placement of using declarations. Using declarations should not be in the global namespace in headers. Former-commit-id: 524ae320cbc290dcdfd80f438e47b3fb10a6b9df --- .../TrigHLTJetRec/TrigHLTJetRec/ITriggerJetBuildTool.h | 4 +--- .../TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecBase.h | 8 ++++---- .../TrigHLTJetRec/TrigHLTJetRecBase_tpl.h | 10 +++++----- .../TrigHLTJetRec/TrigHLTJetRecFromCluster.h | 2 +- .../TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecFromJet.h | 2 +- .../TrigHLTJetRec/TrigHLTJetRecFromTriggerTower.h | 2 +- .../TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecGroomer.h | 2 +- .../TrigHLTJetRec/TrigHLTJetRec/TriggerJetBuildTool.h | 2 +- .../TrigHLTJetRec/src/TrigHLTJetRecFromCluster.cxx | 4 ++-- .../TrigHLTJetRec/src/TrigHLTJetRecFromJet.cxx | 4 ++-- .../src/TrigHLTJetRecFromTriggerTower.cxx | 4 ++-- .../TrigHLTJetRec/src/TrigHLTJetRecGroomer.cxx | 6 +++--- .../TrigHLTJetRec/src/TriggerJetBuildTool.cxx | 6 +++--- 13 files changed, 27 insertions(+), 29 deletions(-) diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/ITriggerJetBuildTool.h b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/ITriggerJetBuildTool.h index 30ba9ed1f639..8f7308f1c7dc 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/ITriggerJetBuildTool.h +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/ITriggerJetBuildTool.h @@ -22,8 +22,6 @@ namespace fastjet{ class ClusterSequence; } -using fastjet::ClusterSequence; -using xAOD::JetContainer; // class ITriggerJetBuildTool: virtual public IJetBuildTool { class ITriggerJetBuildTool: virtual public asg::IAsgTool { @@ -36,7 +34,7 @@ public: // set inputs for jet finding. label is a type flag used // for IParticle selection virtual void prime(const xAOD::IParticleContainer*) = 0; - virtual int build(ClusterSequence*&, JetContainer*&) const = 0; + virtual int build(fastjet::ClusterSequence*&, xAOD::JetContainer*&) const = 0; // Allow owner Algorithm to reset the Pseudojets (no managed by the evt store) virtual void resetInputs() = 0; diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecBase.h b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecBase.h index b9bd61da9a59..266fbdeefd15 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecBase.h +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecBase.h @@ -68,10 +68,10 @@ class TrigHLTJetRecBase: public HLT::FexAlgo { // ToolHandle<ITriggerPseudoJetGetter> m_secondarypseudoJetGetter; // a secondary pseudojet getter (for e.g. ghost association) // - virtual HLT::ErrorCode build(ClusterSequence*&, JetContainer*&) const = 0; + virtual HLT::ErrorCode build(fastjet::ClusterSequence*&, xAOD::JetContainer*&) const = 0; - HLT::ErrorCode defaultBuild(ClusterSequence*&, - JetContainer*&) const; + HLT::ErrorCode defaultBuild(fastjet::ClusterSequence*&, + xAOD::JetContainer*&) const; const PseudoJetContainer* getPseudoJetContainer() const; @@ -105,7 +105,7 @@ class TrigHLTJetRecBase: public HLT::FexAlgo { HLT::ErrorCode attachJetCollection(HLT::TriggerElement*, const xAOD::JetContainer*, - const ClusterSequence*); + const fastjet::ClusterSequence*); }; diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecBase_tpl.h b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecBase_tpl.h index 268150cd1e99..ac0c3e5483c6 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecBase_tpl.h +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecBase_tpl.h @@ -203,8 +203,8 @@ TrigHLTJetRecBase<InputContainer>::hltExecute(const HLT::TriggerElement* ATH_MSG_DEBUG("Executing tool " << m_jetBuildTool->name()); ATH_MSG_DEBUG(m_jetBuildTool->toString(1)); - ClusterSequence* clusterSequence{nullptr}; - JetContainer* j_container{nullptr}; + fastjet::ClusterSequence* clusterSequence{nullptr}; + xAOD::JetContainer* j_container{nullptr}; status = build(clusterSequence, j_container); if(status != HLT::OK){return HLT::ERROR;} @@ -247,7 +247,7 @@ TrigHLTJetRecBase<InputContainer>::attachJetCollection(HLT::TriggerElement* outputTE, const xAOD::JetContainer* j_container, - const ClusterSequence* + const fastjet::ClusterSequence* cs){ // We have to explicitly delete the aux store, so get a pointer to it. @@ -359,8 +359,8 @@ TrigHLTJetRecBase<InputContainer>::getInputContainer(const HLT::TriggerElement* template<typename InputContainer> HLT::ErrorCode -TrigHLTJetRecBase<InputContainer>::defaultBuild(ClusterSequence*& cs, - JetContainer*& jc) const{ +TrigHLTJetRecBase<InputContainer>::defaultBuild(fastjet::ClusterSequence*& cs, + xAOD::JetContainer*& jc) const{ int rc = m_jetBuildTool->build(cs, jc); if(rc != 0){ ATH_MSG_ERROR("Error building jets. Build tool error code "<< rc); diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecFromCluster.h b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecFromCluster.h index b883de5e7c68..67632bd645ce 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecFromCluster.h +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecFromCluster.h @@ -38,7 +38,7 @@ public TrigHLTJetRecBase<xAOD::CaloClusterContainer>{ */ - HLT::ErrorCode build(ClusterSequence*&, JetContainer*&) const override; + HLT::ErrorCode build(fastjet::ClusterSequence*&, xAOD::JetContainer*&) const override; private: /* A secondary PseudojetGetter shared by this algorithm and the IJetBuildTool for tracks diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecFromJet.h b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecFromJet.h index ee0d4eae9608..b04afbc365cd 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecFromJet.h +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecFromJet.h @@ -15,7 +15,7 @@ class TrigHLTJetRecFromJet: public TrigHLTJetRecBase<xAOD::JetContainer>{ ~TrigHLTJetRecFromJet(); protected: - HLT::ErrorCode build(ClusterSequence*&, JetContainer*&) const override; + HLT::ErrorCode build(fastjet::ClusterSequence*&, xAOD::JetContainer*&) const override; }; #endif diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecFromTriggerTower.h b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecFromTriggerTower.h index 6e7ce85519f3..f58dce6947a2 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecFromTriggerTower.h +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecFromTriggerTower.h @@ -17,7 +17,7 @@ public TrigHLTJetRecBase<xAOD::TriggerTowerContainer>{ ~TrigHLTJetRecFromTriggerTower(); - HLT::ErrorCode build(ClusterSequence*&, JetContainer*&) const override; + HLT::ErrorCode build(fastjet::ClusterSequence*&, xAOD::JetContainer*&) const override; }; #endif diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecGroomer.h b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecGroomer.h index 1b066f5078b6..50e8055af9b2 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecGroomer.h +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecGroomer.h @@ -29,7 +29,7 @@ class TrigHLTJetRecGroomer : public TrigHLTJetRecFromCluster virtual HLT::ErrorCode hltInitialize() override; protected: - HLT::ErrorCode build(ClusterSequence*&, JetContainer*&) const override; + HLT::ErrorCode build(fastjet::ClusterSequence*&, xAOD::JetContainer*&) const override; private: // properties configurable via python diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TriggerJetBuildTool.h b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TriggerJetBuildTool.h index 8c387c24734e..ed2ff5d85ca1 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TriggerJetBuildTool.h +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TriggerJetBuildTool.h @@ -43,7 +43,7 @@ class TriggerJetBuildTool : // Set EDM inputs for jet finding virtual void prime(const xAOD::IParticleContainer*) override; - virtual int build(ClusterSequence*&, JetContainer*&) const override; + virtual int build(fastjet::ClusterSequence*&, xAOD::JetContainer*&) const override; virtual std::string toString(int verbosity) const override; void print() const override; diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TrigHLTJetRecFromCluster.cxx b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TrigHLTJetRecFromCluster.cxx index 1578282da687..d1d552e71957 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TrigHLTJetRecFromCluster.cxx +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TrigHLTJetRecFromCluster.cxx @@ -171,7 +171,7 @@ TrigHLTJetRecFromCluster::~TrigHLTJetRecFromCluster(){} //PS 3/4/18} HLT::ErrorCode -TrigHLTJetRecFromCluster::build(ClusterSequence*& cs, - JetContainer*& jc) const{ +TrigHLTJetRecFromCluster::build(fastjet::ClusterSequence*& cs, + xAOD::JetContainer*& jc) const{ return TrigHLTJetRecBase<xAOD::CaloClusterContainer>::defaultBuild(cs, jc); } diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TrigHLTJetRecFromJet.cxx b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TrigHLTJetRecFromJet.cxx index ca0a763bcd6a..e0447854c5e4 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TrigHLTJetRecFromJet.cxx +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TrigHLTJetRecFromJet.cxx @@ -14,7 +14,7 @@ TrigHLTJetRecFromJet::TrigHLTJetRecFromJet(const std::string& name, TrigHLTJetRecFromJet::~TrigHLTJetRecFromJet(){} -HLT::ErrorCode TrigHLTJetRecFromJet::build(ClusterSequence*& cs, - JetContainer*& jc) const{ +HLT::ErrorCode TrigHLTJetRecFromJet::build(fastjet::ClusterSequence*& cs, + xAOD::JetContainer*& jc) const{ return TrigHLTJetRecBase<xAOD::JetContainer>::defaultBuild(cs, jc); } diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TrigHLTJetRecFromTriggerTower.cxx b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TrigHLTJetRecFromTriggerTower.cxx index ef7d8a40a544..4ea564e4839a 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TrigHLTJetRecFromTriggerTower.cxx +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TrigHLTJetRecFromTriggerTower.cxx @@ -13,7 +13,7 @@ TrigHLTJetRecFromTriggerTower::TrigHLTJetRecFromTriggerTower(const std::string& TrigHLTJetRecFromTriggerTower::~TrigHLTJetRecFromTriggerTower(){} -HLT::ErrorCode TrigHLTJetRecFromTriggerTower::build(ClusterSequence*& cs, - JetContainer*& jc) const{ +HLT::ErrorCode TrigHLTJetRecFromTriggerTower::build(fastjet::ClusterSequence*& cs, + xAOD::JetContainer*& jc) const{ return TrigHLTJetRecBase<xAOD::TriggerTowerContainer>::defaultBuild(cs, jc); } diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TrigHLTJetRecGroomer.cxx b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TrigHLTJetRecGroomer.cxx index fe2d74ff612e..99c57591b6ba 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TrigHLTJetRecGroomer.cxx +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TrigHLTJetRecGroomer.cxx @@ -47,14 +47,14 @@ HLT::ErrorCode TrigHLTJetRecGroomer::hltInitialize() //const xAOD::JetContainer* TrigHLTJetRecGroomer::build() const HLT::ErrorCode -TrigHLTJetRecGroomer::build(ClusterSequence*& cs, - JetContainer*& trimmedJets) const{ +TrigHLTJetRecGroomer::build(fastjet::ClusterSequence*& cs, + xAOD::JetContainer*& trimmedJets) const{ ATH_MSG_VERBOSE("Preparing to groom jets..."); // get the ungroomed jet collection ATH_MSG_VERBOSE("Building ungroomed input jet container"); - JetContainer* ungroomedJets = new JetContainer; + xAOD::JetContainer* ungroomedJets = new xAOD::JetContainer; // auto ungroomedJets = HLT::ErrorCode status = TrigHLTJetRecBase<xAOD::CaloClusterContainer>::defaultBuild(cs, diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TriggerJetBuildTool.cxx b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TriggerJetBuildTool.cxx index 2ffa6a48d5e3..8a3b5e367c03 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TriggerJetBuildTool.cxx +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TriggerJetBuildTool.cxx @@ -73,12 +73,12 @@ StatusCode TriggerJetBuildTool::finalize() { //********************************************************************** -int TriggerJetBuildTool::build(ClusterSequence*& pcs, - JetContainer*& pjets) const { +int TriggerJetBuildTool::build(fastjet::ClusterSequence*& pcs, + xAOD::JetContainer*& pjets) const { ATH_MSG_DEBUG("Entering build..."); // Make a new empty jet collection to write to. - pjets = new JetContainer; + pjets = new xAOD::JetContainer; pjets->setStore(new xAOD::JetTrigAuxContainer); ATH_MSG_DEBUG("Created jet container, set aux container..."); -- GitLab From b156dd17d1bbc3ca049e4123d0c4bb1f0b48f1f6 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Thu, 7 Jun 2018 15:42:04 +0200 Subject: [PATCH 079/562] ViewAlgs: Fix clang warning. clang warning: missing override keyword. Former-commit-id: 7377c1dc57eb3d63206e23d521ad1ddfd22b1a7c --- Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithm.h b/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithm.h index 71d2d5bfa033..196f3fb01a56 100644 --- a/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithm.h +++ b/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithm.h @@ -31,7 +31,7 @@ class EventViewCreatorAlgorithm : public ::InputMakerBase public: EventViewCreatorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator ); virtual ~EventViewCreatorAlgorithm(); - virtual StatusCode initialize(); + virtual StatusCode initialize() override; virtual StatusCode execute_r(const EventContext&) const override; virtual StatusCode finalize() override; -- GitLab From 7326cc38c8713d86057e06ff69e39a6690515771 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Thu, 7 Jun 2018 15:42:17 +0200 Subject: [PATCH 080/562] egammaTools: Fix clang warnings. clang warnings: missing override keywords; unused private data member. Former-commit-id: 26abea9c5edf13b82e2ddd7b40f208771cd08ad6 --- Reconstruction/egamma/egammaTools/src/EMPIDBuilder.h | 4 ++-- Reconstruction/egamma/egammaTools/src/EMShowerBuilder.h | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Reconstruction/egamma/egammaTools/src/EMPIDBuilder.h b/Reconstruction/egamma/egammaTools/src/EMPIDBuilder.h index d26594949ad4..fc991ade3776 100644 --- a/Reconstruction/egamma/egammaTools/src/EMPIDBuilder.h +++ b/Reconstruction/egamma/egammaTools/src/EMPIDBuilder.h @@ -38,11 +38,11 @@ public: ~EMPIDBuilder(); /** @brief initialize method*/ - StatusCode initialize(); + virtual StatusCode initialize() override; /** @brief standard execute method */ virtual StatusCode execute(xAOD::Egamma*) const override final ; /** @brief finalize method*/ - StatusCode finalize(); + virtual StatusCode finalize() override; protected: /** Handle to the selectors */ diff --git a/Reconstruction/egamma/egammaTools/src/EMShowerBuilder.h b/Reconstruction/egamma/egammaTools/src/EMShowerBuilder.h index 36994b261e15..fbfd14488bbf 100644 --- a/Reconstruction/egamma/egammaTools/src/EMShowerBuilder.h +++ b/Reconstruction/egamma/egammaTools/src/EMShowerBuilder.h @@ -58,13 +58,13 @@ public: ~EMShowerBuilder(); /** @brief initialize method*/ - StatusCode initialize(); + virtual StatusCode initialize() override; /** @brief standard execute method */ virtual StatusCode execute(xAOD::Egamma*) const override final ; /** @brief method to calculate shower shapes from a CaloCellContainer */ virtual StatusCode recoExecute(xAOD::Egamma* eg, const CaloCellContainer* cellcoll) const override final; /** @brief finalize method*/ - StatusCode finalize(); + virtual StatusCode finalize() override; private: /** @brief method to retrieve ShowerBuilder tool */ @@ -97,9 +97,6 @@ private: "HadronicLeakageTool", "egammaIso", "Handle of the EMCaloIsolationTool for Hadronic leakage"}; - /** @brief the CaloCell container */ - const CaloCellContainer* m_cellcoll; - /** @brief boolean to print results*/ Gaudi::Property<bool> m_Print {this, "Print", false, "in case of extra prints"}; -- GitLab From 5843baee20d97368813d32123394d79644bd38b9 Mon Sep 17 00:00:00 2001 From: Sara Alderweireldt <sara.alderweireldt@cern.ch> Date: Thu, 7 Jun 2018 15:02:12 +0000 Subject: [PATCH 081/562] Merge branch 'cherry-pick-47a48fb5a5 [formerly 6b6af42f58]-21.1' into '21.1' Sweeping !11829 from 21.0 to 21.1. Fix for ATLASRECTS-4459 See merge request atlas/athena!11917 (cherry picked from commit deb4170cfb190a7dd29fe10d76b8d6bfe1204d1b [formerly 9438f209c3d1ed89c55aecfbc612df367152489e]) aab97852 Merge branch 'ATLASRECTS_4459' into '21.0' Former-commit-id: f4ee908f173dad49ad12ebbc9b7f28b2ed5c4dda --- .../MuonID/MuonSelectorTools/Root/MuonSelectionTool.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PhysicsAnalysis/MuonID/MuonSelectorTools/Root/MuonSelectionTool.cxx b/PhysicsAnalysis/MuonID/MuonSelectorTools/Root/MuonSelectionTool.cxx index 6897e0783d98..b3065bcb5b26 100644 --- a/PhysicsAnalysis/MuonID/MuonSelectorTools/Root/MuonSelectionTool.cxx +++ b/PhysicsAnalysis/MuonID/MuonSelectorTools/Root/MuonSelectionTool.cxx @@ -282,7 +282,7 @@ namespace CP { // LOOSE / MEDIUM / TIGHT WP const xAOD::TrackParticle* idtrack = mu.trackParticle( xAOD::Muon::InnerDetectorTrackParticle ); const xAOD::TrackParticle* metrack = mu.trackParticle( xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle ); - if( idtrack && metrack ) { + if( idtrack && metrack && metrack->definingParametersCovMatrix()(4,4)>0 ) { float mePt = -999999., idPt = -999999.; if( !m_TurnOffMomCorr ) { // now using corrected ID/MS momenta -- GitLab From 95113beebbe40ddb64237c409cb56334c5510b4a Mon Sep 17 00:00:00 2001 From: John Derek Chapman <chapman@hep.phy.cam.ac.uk> Date: Thu, 7 Jun 2018 10:17:53 +0000 Subject: [PATCH 082/562] Merge branch '21.3-fix_3722' into '21.3' fixing leaks in FastCaloSim See merge request atlas/athena!11773 (cherry picked from commit 00dea021bea2e3afb2e63eb76a95d7f803de7581 [formerly ba47d6044845945cbff6e9dc30d624b2d0a17502]) 52b23cd2 Adding ParticleEnergyParametrization destructor 9f8ef1d0 Adding ParticleEnergyParametrizationInDistbin destructor a6ac168d Adding TShape_Result destructor 9d4eabe4 Define a FastShowerCellBuilderTool destructor f6d148f3 Define the ParticleEnergyParametrization destructor 3cd8173e Define the ParticleEnergyParametrizationInDistbin destructor 838dcc8f Define the TShape_Result destructor 7db2d88a Deleting pointers in FastCaloSimSvcPU.cxx Former-commit-id: 7cfdc01774ddf9491acdfa49fefef407c1970363 --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../ParticleEnergyParametrization.h | 1 + .../ParticleEnergyParametrizationInDistbin.h | 1 + .../FastCaloSim/FastCaloSim/TShape_Result.h | 1 + .../src/FastShowerCellBuilderTool.cxx | 18 ++++++++++++++++++ .../src/ParticleEnergyParametrization.cxx | 6 ++++++ .../ParticleEnergyParametrizationInDistbin.cxx | 5 +++++ .../FastCaloSim/src/TShape_Result.cxx | 5 +++++ .../src/FastCaloSimSvcPU.cxx | 3 +++ 9 files changed, 40 insertions(+) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 diff --git a/Simulation/FastShower/FastCaloSim/FastCaloSim/ParticleEnergyParametrization.h b/Simulation/FastShower/FastCaloSim/FastCaloSim/ParticleEnergyParametrization.h index d06ccd92ef2a..1658b9588966 100755 --- a/Simulation/FastShower/FastCaloSim/FastCaloSim/ParticleEnergyParametrization.h +++ b/Simulation/FastShower/FastCaloSim/FastCaloSim/ParticleEnergyParametrization.h @@ -29,6 +29,7 @@ public: // typedef std::vector<TMatrixD> TMatrixD_vec; ParticleEnergyParametrization(int id=22,double E=10000,double eta=20); + ~ParticleEnergyParametrization(); double& weight(int calosample) {return m_weights[calosample];}; double& weight_err(int calosample) {return m_weights_err[calosample];}; diff --git a/Simulation/FastShower/FastCaloSim/FastCaloSim/ParticleEnergyParametrizationInDistbin.h b/Simulation/FastShower/FastCaloSim/FastCaloSim/ParticleEnergyParametrizationInDistbin.h index 5135c2475aa7..053bd41d17c4 100755 --- a/Simulation/FastShower/FastCaloSim/FastCaloSim/ParticleEnergyParametrizationInDistbin.h +++ b/Simulation/FastShower/FastCaloSim/FastCaloSim/ParticleEnergyParametrizationInDistbin.h @@ -21,6 +21,7 @@ public: TMatrixD m_corr; ParticleEnergyParametrizationInDistbin(); + ~ParticleEnergyParametrizationInDistbin(); void SetNoDirectoryHisto(); diff --git a/Simulation/FastShower/FastCaloSim/FastCaloSim/TShape_Result.h b/Simulation/FastShower/FastCaloSim/FastCaloSim/TShape_Result.h index 3ca113698860..ad8533f77d23 100755 --- a/Simulation/FastShower/FastCaloSim/FastCaloSim/TShape_Result.h +++ b/Simulation/FastShower/FastCaloSim/FastCaloSim/TShape_Result.h @@ -27,6 +27,7 @@ public: kHasShapeFactor = TLateralShapeCorrectionBase::kHasShapeFactor, // set if the shapefactor function is sensible kHasCellFactor = TLateralShapeCorrectionBase::kHasCellFactor // set if the cellfactor function is sensible }; + virtual ~TShape_Result(); protected: inline double Sqr(double a) {return a*a;}; double m_fitsplines_EnergyDistribution_maxx;//! diff --git a/Simulation/FastShower/FastCaloSim/src/FastShowerCellBuilderTool.cxx b/Simulation/FastShower/FastCaloSim/src/FastShowerCellBuilderTool.cxx index 1608b2c1493e..6ff55f0e7602 100755 --- a/Simulation/FastShower/FastCaloSim/src/FastShowerCellBuilderTool.cxx +++ b/Simulation/FastShower/FastCaloSim/src/FastShowerCellBuilderTool.cxx @@ -199,6 +199,24 @@ FastShowerCellBuilderTool::FastShowerCellBuilderTool(const std::string& type, co FastShowerCellBuilderTool::~FastShowerCellBuilderTool() { + for (auto* el : m_shape_correction ) delete el; + m_shape_correction.clear(); + for (auto const& m1 : m_map_ParticleShapeParametrizationMap ) { + for (auto const& m2 : m1.second ) { + for (auto const& m3 : m2.second ) { + for (auto* el : m3.second ) { + delete el; + } + } + } + } + for (auto const& m1 : m_map_ParticleEnergyParametrizationMap ) { + for (auto const& m2 : m1.second ) { + for (auto const& m3 : m2.second ) { + delete m3.second; + } + } + } } void FastShowerCellBuilderTool::LoadParametrizationsFromDir(std::string dir) diff --git a/Simulation/FastShower/FastCaloSim/src/ParticleEnergyParametrization.cxx b/Simulation/FastShower/FastCaloSim/src/ParticleEnergyParametrization.cxx index f92cd5503533..a1921dcc0cdb 100755 --- a/Simulation/FastShower/FastCaloSim/src/ParticleEnergyParametrization.cxx +++ b/Simulation/FastShower/FastCaloSim/src/ParticleEnergyParametrization.cxx @@ -21,6 +21,12 @@ ParticleEnergyParametrization::ParticleEnergyParametrization(int id,double E,dou } } +ParticleEnergyParametrization::~ParticleEnergyParametrization() { + m_DistPara.Delete(); + delete m_Ecal_vs_dist; + delete m_h_layer_d_fine; +} + void ParticleEnergyParametrization::set_Ecal_vs_dist(TH2* h) { m_Ecal_vs_dist=h; m_DistPara.Expand(h->GetNbinsX()+2); diff --git a/Simulation/FastShower/FastCaloSim/src/ParticleEnergyParametrizationInDistbin.cxx b/Simulation/FastShower/FastCaloSim/src/ParticleEnergyParametrizationInDistbin.cxx index fbbf8ac15e0c..2cd80b7a6de5 100755 --- a/Simulation/FastShower/FastCaloSim/src/ParticleEnergyParametrizationInDistbin.cxx +++ b/Simulation/FastShower/FastCaloSim/src/ParticleEnergyParametrizationInDistbin.cxx @@ -12,6 +12,11 @@ ParticleEnergyParametrizationInDistbin::ParticleEnergyParametrizationInDistbin() for(int i=CaloCell_ID_FCS::FirstSample;i<CaloCell_ID_FCS::MaxSample;++i) m_ElayerProp[i]=0; } +ParticleEnergyParametrizationInDistbin::~ParticleEnergyParametrizationInDistbin() +{ + for(auto &el : m_ElayerProp) delete el; +} + void ParticleEnergyParametrizationInDistbin::SetNoDirectoryHisto() { for(int i=CaloCell_ID_FCS::FirstSample;i<CaloCell_ID_FCS::MaxSample;++i) if(m_ElayerProp[i]) { diff --git a/Simulation/FastShower/FastCaloSim/src/TShape_Result.cxx b/Simulation/FastShower/FastCaloSim/src/TShape_Result.cxx index 9d542953e7fa..5ccaedae87b2 100755 --- a/Simulation/FastShower/FastCaloSim/src/TShape_Result.cxx +++ b/Simulation/FastShower/FastCaloSim/src/TShape_Result.cxx @@ -34,6 +34,11 @@ TShape_Result::TShape_Result(const char* name, const char* title):TNamed(name,ti { } +TShape_Result::~TShape_Result() { + delete m_fitsplines_EnergyDistribution; + delete m_fitsplines_EtaPhiAspectRatio; +} + //______________________________________________________________________________ void TShape_Result::Streamer(TBuffer &R__b) { diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx index f594624d1625..b344efcce0f8 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx @@ -105,6 +105,7 @@ StatusCode ISF::FastCaloSimSvcPU::initialize() //IdDictMgr& lar_idd = parser->parse("IdDictParser/IdDictLArCalorimeter.xml"); IdDictMgr& lar_idd = parser->parse("IdDictParser/ATLAS_IDS.xml"); larID->initialize_from_dictionary(lar_idd); + delete parser; // access tools and store them if ( retrieveTools<ICaloCellMakerTool>(m_caloCellMakerTools_setup).isFailure() ) @@ -161,6 +162,8 @@ StatusCode ISF::FastCaloSimSvcPU::initialize() StatusCode ISF::FastCaloSimSvcPU::finalize() { ATH_MSG_INFO ( m_screenOutputPrefix << "Finalizing ..."); + delete detID; + delete larID; return StatusCode::SUCCESS; } -- GitLab From 98c322353d237b5642328a478d7d4ea12dee0610 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Fri, 8 Jun 2018 12:56:18 +0200 Subject: [PATCH 083/562] Used modern way to configure dependent tools so it is visible to the configuration Former-commit-id: 3b51973d997cf04f249f278057ce5b9d69f3bd32 --- LArCalorimeter/LArRawUtils/LArRawUtils/LArRoI_Map.h | 11 ++++++----- LArCalorimeter/LArRawUtils/src/LArRoI_Map.cxx | 8 +++----- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/LArCalorimeter/LArRawUtils/LArRawUtils/LArRoI_Map.h b/LArCalorimeter/LArRawUtils/LArRawUtils/LArRoI_Map.h index f31ee9dfe2ce..2caef0b3717d 100755 --- a/LArCalorimeter/LArRawUtils/LArRawUtils/LArRoI_Map.h +++ b/LArCalorimeter/LArRawUtils/LArRawUtils/LArRoI_Map.h @@ -20,8 +20,9 @@ #include "AthenaBaseComps/AthAlgTool.h" #include <map> -class LArCablingService; -class CaloTriggerTowerService; +#include "LArCabling/LArCablingService.h" +#include "CaloTriggerTool/CaloTriggerTowerService.h" + class LArOnlineID ; class LArEM_ID ; class LArHEC_ID ; @@ -107,8 +108,9 @@ class LArRoI_Map : public AthAlgTool, ONLMAP m_onlmap; ROIMAP m_roimap; - LArCablingService* m_cablingSvc; - CaloTriggerTowerService* m_ttSvc; + + ToolHandle<LArCablingService> m_cablingSvc{ this, "CablingSvc", "LArCablingService", "LAr cabling tool"}; + ToolHandle<CaloTriggerTowerService> m_ttSvc{ this, "TriggerTowerSvc", "CaloTriggerTowerService", "Towers tool"}; bool m_print; bool m_loadAtBegin; @@ -119,7 +121,6 @@ class LArRoI_Map : public AthAlgTool, const LArEM_ID* m_em_id ; const LArHEC_ID* m_hec_id ; const LArFCAL_ID* m_fcal_id; - }; diff --git a/LArCalorimeter/LArRawUtils/src/LArRoI_Map.cxx b/LArCalorimeter/LArRawUtils/src/LArRoI_Map.cxx index 48cc6677f4a8..5881260ebb96 100755 --- a/LArCalorimeter/LArRawUtils/src/LArRoI_Map.cxx +++ b/LArCalorimeter/LArRawUtils/src/LArRoI_Map.cxx @@ -14,9 +14,6 @@ #include "CaloIdentifier/CaloLVL1_ID.h" #include "LArIdentifier/LArOnlineID.h" -#include "LArCabling/LArCablingService.h" -#include "CaloTriggerTool/CaloTriggerTowerService.h" - #include "StoreGate/StoreGateSvc.h" #include "GaudiKernel/IIncidentSvc.h" @@ -62,8 +59,9 @@ StatusCode LArRoI_Map::initialize() ATH_CHECK( detStore()->retrieve(m_em_id) ); ATH_CHECK( detStore()->retrieve(m_hec_id) ); ATH_CHECK( detStore()->retrieve(m_fcal_id) ); - ATH_CHECK( toolSvc()->retrieveTool("LArCablingService",m_cablingSvc) ); - ATH_CHECK( toolSvc()->retrieveTool("CaloTriggerTowerService",m_ttSvc) ); + + ATH_CHECK( m_cablingSvc.retrieve() ); + ATH_CHECK( m_ttSvc.retrieve() ); ATH_CHECK( detStore()->regFcn(&LArCablingService::iovCallBack,&(*m_cablingSvc), &LArRoI_Map::iovCallBack, -- GitLab From 7f7746de6eebecf09e411edc7eb05168b2575c0c Mon Sep 17 00:00:00 2001 From: Tamara Vazquez Schroeder <tamara.vazquez.schroeder@cern.ch> Date: Tue, 5 Jun 2018 13:27:20 +0000 Subject: [PATCH 084/562] Merge branch 'tilecal-for-21.0' into '21.0' Using run number from SimFlags when it is avaliable See merge request atlas/athena!11826 Former-commit-id: 927819653f20eaa49a14ba983ca94c461416fd37 --- .../share/TileConditions_jobOptions.py | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/TileCalorimeter/TileConditions/share/TileConditions_jobOptions.py b/TileCalorimeter/TileConditions/share/TileConditions_jobOptions.py index 819c66146df7..cccb975e0906 100644 --- a/TileCalorimeter/TileConditions/share/TileConditions_jobOptions.py +++ b/TileCalorimeter/TileConditions/share/TileConditions_jobOptions.py @@ -26,17 +26,28 @@ if (type(ss) != type(None)): msg.warning("Old geometry tag detected %s - will not use COOL DB for TileCal calibration" % gbltg) TileUseCOOL = False TileFrameLength = 9 - if (version=='GEO') and (not 'TileCablingType' in dir()): - if rn is None: + +if (not 'TileCablingType' in dir()): + if rn is None: + try: + from G4AtlasApps.SimFlags import simFlags + if simFlags.RunNumber.statusOn: + rn = simFlags.RunNumber() + except: + msg.info("No SimFlags available - looks like HLT job") + if rn is None: + try: from RecExConfig.AutoConfiguration import GetRunNumber rn=GetRunNumber() + except: + msg.info("No Run Number available - assume latest cabling") + + from AtlasGeoModel.InDetGMJobProperties import GeometryFlags as geoFlags + if geoFlags.Run()=="RUN1": if rn>219651: # choose RUN2 cabling for old geometry tags starting from 26-MAR-2013 TileCablingType = 4 msg.warning("Forcing RUN2 cabling for run %s with geometry %s" % (rn,gbltg) ) - if (version=='R2') and (not 'TileCablingType' in dir()): - if rn is None: - from RecExConfig.AutoConfiguration import GetRunNumber - rn=GetRunNumber() + elif geoFlags.Run()=="RUN2": if (globalflags.DataSource()!='data' and rn>=310000) or rn>=343000 or rn<1: # choose RUN2a cabling for R2 geometry tags starting from 31-Jan-2018 TileCablingType = 5 msg.info("Forcing RUN2a (2018) cabling for run %s with geometry %s" % (rn,gbltg) ) -- GitLab From 8c1368c5f5a9f2d55c67e16d671d94eab30d3132 Mon Sep 17 00:00:00 2001 From: Susumu Oda <susumu.oda@cern.ch> Date: Fri, 8 Jun 2018 13:00:19 +0000 Subject: [PATCH 085/562] Use SiLorentzAngleTool instead of SiDetectorElement in ReadSiDetectorElements (ATLASRECTS-4486) Former-commit-id: 2300adac5e8361e772605b1a74c87627619992fb --- .../src/ReadSiDetectorElements.cxx | 424 +++++++++--------- 1 file changed, 211 insertions(+), 213 deletions(-) diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx b/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx index e50fae914b5b..97ee433cd0df 100755 --- a/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx +++ b/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx @@ -24,13 +24,9 @@ #include "InDetReadoutGeometry/SiLocalPosition.h" -#include <iostream> #include <vector> #include <string> -using std::cout; -using std::endl; - using namespace InDetDD; // or just the ones we need. // using InDetDD::SiDetectorManager; @@ -87,7 +83,7 @@ StatusCode ReadSiDetectorElements::initialize(){ // Get Pixel ID helper // // Pixel ID helper: const PixelID * m_pixelIdHelper; - ATH_CHECK (detStore()->retrieve(m_pixelIdHelper, "PixelID")); + ATH_CHECK(detStore()->retrieve(m_pixelIdHelper, "PixelID")); // If common pixel/SCT code can copy to pointer to AtlasDetectorID m_idHelper = m_pixelIdHelper; @@ -97,7 +93,7 @@ StatusCode ReadSiDetectorElements::initialize(){ // Get SCT ID helper // // SCT ID helper: const SCT_ID * m_sctIdHelper; - ATH_CHECK (detStore()->retrieve(m_sctIdHelper, "SCT_ID")); + ATH_CHECK(detStore()->retrieve(m_sctIdHelper, "SCT_ID")); // If common pixel/SCT code can copy to pointer to AtlasDetectorID m_idHelper = m_sctIdHelper; @@ -154,61 +150,63 @@ void ReadSiDetectorElements::printAllElements() { for (iter = m_manager->getDetectorElementBegin(); iter != m_manager->getDetectorElementEnd(); ++iter){ const SiDetectorElement * element = *iter; if (element) { - cout << m_idHelper->show_to_string(element->identify()) << endl; + ATH_MSG_ALWAYS(m_idHelper->show_to_string(element->identify())); // The id helper is also available through the elements // // element->getIdHelper()->show(element->identify()); // - cout << " center = " << element->center() << endl; - cout << " sin(tilt), sin(stereo) = " << element->sinTilt() << " " - << element->sinStereo() << endl; - cout << " width, minWidth, maxWidth, length (mm) = " - << element->width()/CLHEP::mm << " " - << element->minWidth()/CLHEP::mm << " " - << element->maxWidth()/CLHEP::mm << " " - << element->length()/CLHEP::mm << endl; + ATH_MSG_ALWAYS(" center = " << element->center()); + ATH_MSG_ALWAYS(" sin(tilt), sin(stereo) = " << element->sinTilt() << " " + << element->sinStereo()); + ATH_MSG_ALWAYS(" width, minWidth, maxWidth, length (mm) = " + << element->width()/CLHEP::mm << " " + << element->minWidth()/CLHEP::mm << " " + << element->maxWidth()/CLHEP::mm << " " + << element->length()/CLHEP::mm); // These are no longer accessed through the detector element. IdentifierHash hashId = element->identifyHash(); - cout << " Temperature (C), bias voltage, depletion voltage: "; if (m_useConditionsTools) { - cout << m_siConditionsTool->temperature(hashId) << " " - << m_siConditionsTool->biasVoltage(hashId) << " " - << m_siConditionsTool->depletionVoltage(hashId); + ATH_MSG_ALWAYS(" Temperature (C), bias voltage, depletion voltage: " + << m_siConditionsTool->temperature(hashId) << " " + << m_siConditionsTool->biasVoltage(hashId) << " " + << m_siConditionsTool->depletionVoltage(hashId)); } else { - cout << m_siConditionsSvc->temperature(hashId) << " " - << m_siConditionsSvc->biasVoltage(hashId) << " " - << m_siConditionsSvc->depletionVoltage(hashId); + ATH_MSG_ALWAYS(" Temperature (C), bias voltage, depletion voltage: " + << m_siConditionsSvc->temperature(hashId) << " " + << m_siConditionsSvc->biasVoltage(hashId) << " " + << m_siConditionsSvc->depletionVoltage(hashId)); } - cout << endl; - - //cout << "Via SiDetectorElement:" - cout << " Lorentz correction (mm), tanLorentzPhi = " - << element->getLorentzCorrection()/CLHEP::mm << " " - << element->getTanLorentzAnglePhi() << endl; - - //cout << "Direct from SiLorentzAngleSvc:" - //cout << " Lorentz correction (mm), tanLorentzPhi = " - // << m_siLorentzAngleSvc->getLorentzShift(hashId)/CLHEP::mm << " " - // << m_siLorentzAngleSvc->getTanLorentzAngle(hashId) << endl; - + + if (m_manager->getName() == "Pixel") { + //msg(MSG::ALWAYS) << "Via SiDetectorElement:" + ATH_MSG_ALWAYS(" Lorentz correction (mm), tanLorentzPhi = " + << element->getLorentzCorrection()/CLHEP::mm << " " + << element->getTanLorentzAnglePhi()); + } else { + //msg(MSG::ALWAYS) << "Direct from SiLorentzAngleSvc:" + ATH_MSG_ALWAYS(" Lorentz correction (mm), tanLorentzPhi = " + << m_siLorentzAngleTool->getLorentzShift(hashId)/CLHEP::mm << " " + << m_siLorentzAngleTool->getTanLorentzAngle(hashId)); + } + // These are no longer accessed through the detector element. const InDet::SiliconProperties & siProperties = m_useConditionsTools ? m_siPropertiesTool->getSiProperties(hashId) : m_siPropertiesSvc->getSiProperties(hashId); - cout << " Hall Mobility (cm2/volt/s), Drift mobility (cm2/volt/s), diffusion constant (cm2/s) = " - << siProperties.hallMobility(element->carrierType()) /(CLHEP::cm2/CLHEP::volt/CLHEP::s) << " " - << siProperties.driftMobility(element->carrierType()) /(CLHEP::cm2/CLHEP::volt/CLHEP::s) << " " - << siProperties.diffusionConstant(element->carrierType()) /(CLHEP::cm2/CLHEP::s) << endl; - //cout << element->hitDepthDirection() << " " + ATH_MSG_ALWAYS(" Hall Mobility (cm2/volt/s), Drift mobility (cm2/volt/s), diffusion constant (cm2/s) = " + << siProperties.hallMobility(element->carrierType()) /(CLHEP::cm2/CLHEP::volt/CLHEP::s) << " " + << siProperties.driftMobility(element->carrierType()) /(CLHEP::cm2/CLHEP::volt/CLHEP::s) << " " + << siProperties.diffusionConstant(element->carrierType()) /(CLHEP::cm2/CLHEP::s)); + // ATH_MSG_ALWAYS(element->hitDepthDirection() << " " // << element->hitPhiDirection() << " " // << element->hitEtaDirection() << " " // << element->swapPhiReadoutDirection() << " " - // << element->swapEtaReadoutDirection() << endl; - //cout << "isBarrel: " << element->isBarrel() << endl; + // << element->swapEtaReadoutDirection()); + // ATH_MSG_ALWAYS("isBarrel: " << element->isBarrel()); - cout << " HashId, Id : " << hashId << "\t" << element->identify().getString() << endl; + ATH_MSG_ALWAYS(" HashId, Id : " << hashId << "\t" << element->identify().getString()); // Make some consistency tests for the identifier. Identifier idTest; @@ -225,17 +223,16 @@ void ReadSiDetectorElements::printAllElements() { const SiDetectorElement * elementtest1 = m_manager->getDetectorElement(element->identify()); const SiDetectorElement * elementtest2 = m_manager->getDetectorElement(hashId); bool idOK = true; - if (idHashTest != hashId) {cout << " Id test 1 FAILED!" << endl; idOK = false;} - if (idTest != element->identify()) {cout << " Id test 2 FAILED!" << endl; idOK = false;} - if (elementtest1 != element) {cout << " Id test 3 FAILED!" << endl; idOK = false;} - if (elementtest2 != element) {cout << " Id test 4 FAILED!" << endl; idOK = false;} - if (idOK) cout << " ID tests OK" << std::endl; + if (idHashTest != hashId) {ATH_MSG_ALWAYS(" Id test 1 FAILED!"); idOK = false;} + if (idTest != element->identify()) {ATH_MSG_ALWAYS(" Id test 2 FAILED!"); idOK = false;} + if (elementtest1 != element) {ATH_MSG_ALWAYS(" Id test 3 FAILED!"); idOK = false;} + if (elementtest2 != element) {ATH_MSG_ALWAYS(" Id test 4 FAILED!"); idOK = false;} + if (idOK) ATH_MSG_ALWAYS(" ID tests OK") ; } else { - // cout << "Missing element!!!!!!!!!!!" << endl; + // ATH_MSG_ALWAYS("Missing element!!!!!!!!!!!"); } } } - cout << endl; // Testing numerology const SiNumerology siNumerology(m_manager->numerology()); int nSides = 1; @@ -245,13 +242,13 @@ void ReadSiDetectorElements::printAllElements() { // Barrel for (int iBarrelIndex = 0; iBarrelIndex < siNumerology.numBarrels(); iBarrelIndex++) { int iBarrel = siNumerology.barrelId(iBarrelIndex); - cout << "Barrel: " << iBarrel << endl; - cout << " Num layers: " << siNumerology.numLayers() << endl; + ATH_MSG_ALWAYS("Barrel: " << iBarrel); + ATH_MSG_ALWAYS(" Num layers: " << siNumerology.numLayers()); for (int iLayer = 0; iLayer < siNumerology.numLayers(); iLayer++) { - cout << " Layer: " << iLayer << endl; - if (!siNumerology.useLayer(iLayer)) cout << " Layer not present" << endl; - cout << " Num Modules in Phi: " << siNumerology.numPhiModulesForLayer(iLayer) << endl; - cout << " Num Modules in Eta: " << siNumerology.numEtaModulesForLayer(iLayer) << endl; + ATH_MSG_ALWAYS(" Layer: " << iLayer); + if (!siNumerology.useLayer(iLayer))ATH_MSG_ALWAYS(" Layer not present"); + ATH_MSG_ALWAYS(" Num Modules in Phi: " << siNumerology.numPhiModulesForLayer(iLayer)); + ATH_MSG_ALWAYS(" Num Modules in Eta: " << siNumerology.numEtaModulesForLayer(iLayer)); for (int iPhi = 0; iPhi < siNumerology.numPhiModulesForLayer(iLayer); iPhi++) { for (int iEta = siNumerology.beginEtaModuleForLayer(iLayer); iEta < siNumerology.endEtaModuleForLayer(iLayer); iEta++) { if (!iEta && siNumerology.skipEtaZeroForLayer(iLayer)) continue; @@ -266,11 +263,11 @@ void ReadSiDetectorElements::printAllElements() { barrelCount++; if (!element) { barrelCountError++; - cout << " No element found for id: " << m_idHelper->show_to_string(id) << endl; + ATH_MSG_ALWAYS(" No element found for id: " << m_idHelper->show_to_string(id)); } else { - // For extra safety in case some strip modules do not have two sides (eg in future geometries) one could add. + // For extra safety in case some strip modules do not have two sides (eg in future geometries) one could add. if (!element->otherSide()) iSide++; - cout << " " << m_idHelper->show_to_string(id) << endl; + ATH_MSG_ALWAYS(" " << m_idHelper->show_to_string(id)); } } // iSide } // iEta @@ -283,15 +280,15 @@ void ReadSiDetectorElements::printAllElements() { // Endcap for (int iEndcapIndex = 0; iEndcapIndex < siNumerology.numEndcaps(); iEndcapIndex++) { int iEndcap = siNumerology.endcapId(iEndcapIndex); - cout << "Endcap: " << iEndcap << endl; - cout << " Num disks: " << siNumerology.numDisks() << endl; + ATH_MSG_ALWAYS("Endcap: " << iEndcap); + ATH_MSG_ALWAYS(" Num disks: " << siNumerology.numDisks()); for (int iDisk = 0; iDisk < siNumerology.numDisks(); iDisk++) { - cout << " Disk: " << iDisk << endl; - if (!siNumerology.useDisk(iDisk)) cout << " Disk not present" << endl; - cout << " Num Rings: " << siNumerology.numRingsForDisk(iDisk) << endl; + ATH_MSG_ALWAYS(" Disk: " << iDisk); + if (!siNumerology.useDisk(iDisk))ATH_MSG_ALWAYS(" Disk not present"); + ATH_MSG_ALWAYS(" Num Rings: " << siNumerology.numRingsForDisk(iDisk)); for (int iEta = 0; iEta < siNumerology.numRingsForDisk(iDisk); iEta++) { - cout << " Ring: " << iEta << endl; - cout << " Num Modules in Phi: " << siNumerology.numPhiModulesForDiskRing(iDisk,iEta) << endl; + ATH_MSG_ALWAYS(" Ring: " << iEta); + ATH_MSG_ALWAYS(" Num Modules in Phi: " << siNumerology.numPhiModulesForDiskRing(iDisk,iEta)); for (int iPhi = 0; iPhi < siNumerology.numPhiModulesForDiskRing(iDisk,iEta); iPhi++) { for (int iSide = 0; iSide < nSides; iSide++) { Identifier id; @@ -306,11 +303,11 @@ void ReadSiDetectorElements::printAllElements() { endcapCount++; if (!element) { endcapCountError++; - cout << " No element found for id: " << m_idHelper->show_to_string(id) << endl; + ATH_MSG_ALWAYS(" No element found for id: " << m_idHelper->show_to_string(id)); } else { - // For extra safety in case some strip modules do not have two sides (eg in future geometries) one could add. + // For extra safety in case some strip modules do not have two sides (eg in future geometries) one could add. if (!element->otherSide()) iSide++; - cout << " " << m_idHelper->show_to_string(id) << endl; + ATH_MSG_ALWAYS(" " << m_idHelper->show_to_string(id)); } } // iSide } // iEta @@ -318,24 +315,24 @@ void ReadSiDetectorElements::printAllElements() { } //iDisk } // Endcap; - cout << "Number of barrel elements : " << barrelCount << endl; - cout << "Number not found : " << barrelCountError << endl; - cout << "Number of endcap elements : " << endcapCount << endl; - cout << "Number not found : " << endcapCountError << endl; - + ATH_MSG_ALWAYS("Number of barrel elements : " << barrelCount); + ATH_MSG_ALWAYS("Number not found : " << barrelCountError); + ATH_MSG_ALWAYS("Number of endcap elements : " << endcapCount); + ATH_MSG_ALWAYS("Number not found : " << endcapCountError); + // Maximums - cout << "MaxNumBarrelEta: " << siNumerology.maxNumBarrelEta() << endl; - cout << "MaxNumEndcapRings: " << siNumerology.maxNumEndcapRings() << endl; - cout << "MaxNumStrips: " << siNumerology.maxNumStrips() << endl; - cout << "MaxNumPhiCells: " << siNumerology.maxNumPhiCells() << endl; - cout << "MaxNumEtaCells: " << siNumerology.maxNumEtaCells() << endl; + ATH_MSG_ALWAYS("MaxNumBarrelEta: " << siNumerology.maxNumBarrelEta()); + ATH_MSG_ALWAYS("MaxNumEndcapRings: " << siNumerology.maxNumEndcapRings()); + ATH_MSG_ALWAYS("MaxNumStrips: " << siNumerology.maxNumStrips()); + ATH_MSG_ALWAYS("MaxNumPhiCells: " << siNumerology.maxNumPhiCells()); + ATH_MSG_ALWAYS("MaxNumEtaCells: " << siNumerology.maxNumEtaCells()); - cout << "Num Designs: " << m_manager->numDesigns() << endl; + ATH_MSG_ALWAYS("Num Designs: " << m_manager->numDesigns()); } void ReadSiDetectorElements::printRandomAccess() { - msg(MSG::INFO) << "printRandomAccess()" << endmsg; + ATH_MSG_INFO("printRandomAccess()"); // Some random access if (m_manager->getName() == "Pixel") { //const PixelID * idHelper = dynamic_cast<const PixelID *>(m_manager->getIdHelper()); @@ -346,9 +343,9 @@ void ReadSiDetectorElements::printRandomAccess() { std::vector<Amg::Vector2D> positions; // wafer_id(barrel_ec, layer_disk, phi_module, eta_module) // A barrel element - cout << "----------------------------------------------" << endl; - cout << " A Pixel Barrel element (non B-layer) " << endl; - cout << "----------------------------------------------" << endl; + ATH_MSG_ALWAYS("----------------------------------------------"); + ATH_MSG_ALWAYS(" A Pixel Barrel element (non B-layer) " ); + ATH_MSG_ALWAYS("----------------------------------------------"); id = idHelper->wafer_id(0,1,15,-3); cellIds.push_back(SiCellId(32,8)); // phi,eta //add a range of cells from 151 to 175 @@ -367,9 +364,9 @@ void ReadSiDetectorElements::printRandomAccess() { testElement(id, cellIds, positions); // A barrel element (B-Layer) - cout << "----------------------------------------------" << endl; - cout << " A Pixel Barrel element (B-layer) " << endl; - cout << "----------------------------------------------" << endl; + ATH_MSG_ALWAYS("----------------------------------------------"); + ATH_MSG_ALWAYS(" A Pixel Barrel element (B-layer) " ); + ATH_MSG_ALWAYS("----------------------------------------------"); id = idHelper->wafer_id(0,0,7,-3); cellIds.clear(); positions.clear(); @@ -378,9 +375,9 @@ void ReadSiDetectorElements::printRandomAccess() { testElement(id, cellIds, positions); // An endcap element - cout << "----------------------------------------------" << endl; - cout << " A Pixel Endcap element" << endl; - cout << "----------------------------------------------" << endl; + ATH_MSG_ALWAYS("----------------------------------------------"); + ATH_MSG_ALWAYS(" A Pixel Endcap element" ); + ATH_MSG_ALWAYS("----------------------------------------------"); id = idHelper->wafer_id(2,2,13,0); cellIds.push_back(SiCellId(182,75)); // phi,eta positions.push_back(Amg::Vector2D(0*CLHEP::mm, 0*CLHEP::mm)); // eta,phi @@ -404,9 +401,9 @@ void ReadSiDetectorElements::printRandomAccess() { // wafer_id(barrel_ec, layer_disk, phi_module, eta_module, side) // A barrel element - cout << "----------------------------------------------" << endl; - cout << " A SCT Barrel element" << endl; - cout << "----------------------------------------------" << endl; + ATH_MSG_ALWAYS("----------------------------------------------"); + ATH_MSG_ALWAYS(" A SCT Barrel element" ); + ATH_MSG_ALWAYS("----------------------------------------------"); id = idHelper->wafer_id(0,1,15,-3,0); cellIds.clear(); positions.clear(); @@ -422,9 +419,9 @@ void ReadSiDetectorElements::printRandomAccess() { testElement(id, cellIds, positions); // A barrel element (other side of above) - cout << "----------------------------------------------" << endl; - cout << " A SCT Barrel element (other side of above) " << endl; - cout << "----------------------------------------------" << endl; + ATH_MSG_ALWAYS("----------------------------------------------"); + ATH_MSG_ALWAYS(" A SCT Barrel element (other side of above) "); + ATH_MSG_ALWAYS("----------------------------------------------"); id = idHelper->wafer_id(0,1,15,-3,1); cellIds.clear(); positions.clear(); @@ -433,9 +430,9 @@ void ReadSiDetectorElements::printRandomAccess() { testElement(id, cellIds, positions); // A outer fwd - cout << "----------------------------------------------" << endl; - cout << " A SCT Endcap element (outer type)" << endl; - cout << "----------------------------------------------" << endl; + ATH_MSG_ALWAYS("----------------------------------------------"); + ATH_MSG_ALWAYS(" A SCT Endcap element (outer type)" ); + ATH_MSG_ALWAYS("----------------------------------------------"); id = idHelper->wafer_id(2,3,15,0,0); cellIds.clear(); positions.clear(); @@ -449,9 +446,9 @@ void ReadSiDetectorElements::printRandomAccess() { positions.push_back(Amg::Vector2D(3*CLHEP::mm, -25*CLHEP::mm)); // eta,phi testElement(id, cellIds, positions); - cout << "----------------------------------------------" << endl; - cout << " A SCT Endcap element (outer type) other side" << endl; - cout << "----------------------------------------------" << endl; + ATH_MSG_ALWAYS("----------------------------------------------"); + ATH_MSG_ALWAYS(" A SCT Endcap element (outer type) other side"); + ATH_MSG_ALWAYS("----------------------------------------------"); id = idHelper->wafer_id(2,3,15,0,1); cellIds.clear(); positions.clear(); @@ -462,9 +459,9 @@ void ReadSiDetectorElements::printRandomAccess() { testElement(id, cellIds, positions); // A middle fwd - cout << "----------------------------------------------" << endl; - cout << " A SCT Endcap element (middle type)" << endl; - cout << "----------------------------------------------" << endl; + ATH_MSG_ALWAYS("----------------------------------------------"); + ATH_MSG_ALWAYS(" A SCT Endcap element (middle type)" ); + ATH_MSG_ALWAYS("----------------------------------------------"); id = idHelper->wafer_id(2,1,15,1,0); cellIds.clear(); positions.clear(); @@ -473,9 +470,9 @@ void ReadSiDetectorElements::printRandomAccess() { testElement(id, cellIds, positions); // A truncated middle - cout << "----------------------------------------------" << endl; - cout << " A SCT Endcap element (truncated middle type)" << endl; - cout << "----------------------------------------------" << endl; + ATH_MSG_ALWAYS("----------------------------------------------"); + ATH_MSG_ALWAYS(" A SCT Endcap element (truncated middle type)" ); + ATH_MSG_ALWAYS("----------------------------------------------"); id = idHelper->wafer_id(2,7,15,1,0); cellIds.clear(); positions.clear(); @@ -484,9 +481,9 @@ void ReadSiDetectorElements::printRandomAccess() { testElement(id, cellIds, positions); // A inner fwd - cout << "----------------------------------------------" << endl; - cout << " A SCT Endcap element (inner type)" << endl; - cout << "----------------------------------------------" << endl; + ATH_MSG_ALWAYS("----------------------------------------------"); + ATH_MSG_ALWAYS(" A SCT Endcap element (inner type)" ); + ATH_MSG_ALWAYS("----------------------------------------------"); id = idHelper->wafer_id(2,1,15,2,0); cellIds.clear(); positions.clear(); @@ -500,150 +497,155 @@ void ReadSiDetectorElements::printRandomAccess() { void ReadSiDetectorElements::testElement(const Identifier & id, - const std::vector<SiCellId> & cellIdVec, - const std::vector<Amg::Vector2D> & positionsVec) const{ - cout << "----------------------------------------------" << endl; + const std::vector<SiCellId> & cellIdVec, + const std::vector<Amg::Vector2D> & positionsVec) const{ + ATH_MSG_ALWAYS("----------------------------------------------"); const SiDetectorElement * element = m_manager->getDetectorElement(id); if (element) { IdentifierHash hashId = element->identifyHash(); - cout << element->getIdHelper()->show_to_string(id) << endl; - cout << " width, minWidth, maxWidth, length, thickness (mm) = " - << element->width()/CLHEP::mm << " " - << element->minWidth()/CLHEP::mm << " " - << element->maxWidth()/CLHEP::mm << " " - << element->length()/CLHEP::mm << " " - << element->thickness()/CLHEP::mm - << endl; - cout << " average etaPitch = " << element->etaPitch()/CLHEP::micrometer << " microns" << endl; - cout << " average phiPitch = " << element->phiPitch()/CLHEP::micrometer << " microns" << endl; - cout << " rMin, rMax, zMin, zMax (mm), phiMin, phiMax (deg) = " - << element->rMin()/CLHEP::mm << " " - << element->rMax()/CLHEP::mm << " " - << element->zMin()/CLHEP::mm << " " - << element->zMax()/CLHEP::mm << " " - << element->phiMin()/CLHEP::degree << " " - << element->phiMax()/CLHEP::degree - << endl; - cout << " center, normal, etaAxis, phiAxis = " - << element->center() << " " - << element->normal() << " " - << element->etaAxis() << " " - << element->phiAxis() - << endl; - cout << " center: r (mm) = " << element->center().perp()/CLHEP::mm - << ", phi (deg) = " << element->center().phi()/CLHEP::deg << endl; + ATH_MSG_ALWAYS(element->getIdHelper()->show_to_string(id)); + ATH_MSG_ALWAYS(" width, minWidth, maxWidth, length, thickness (mm) = " + << element->width()/CLHEP::mm << " " + << element->minWidth()/CLHEP::mm << " " + << element->maxWidth()/CLHEP::mm << " " + << element->length()/CLHEP::mm << " " + << element->thickness()/CLHEP::mm + ); + ATH_MSG_ALWAYS(" average etaPitch = " << element->etaPitch()/CLHEP::micrometer << " microns"); + ATH_MSG_ALWAYS(" average phiPitch = " << element->phiPitch()/CLHEP::micrometer << " microns"); + ATH_MSG_ALWAYS(" rMin, rMax, zMin, zMax (mm), phiMin, phiMax (deg) = " + << element->rMin()/CLHEP::mm << " " + << element->rMax()/CLHEP::mm << " " + << element->zMin()/CLHEP::mm << " " + << element->zMax()/CLHEP::mm << " " + << element->phiMin()/CLHEP::degree << " " + << element->phiMax()/CLHEP::degree + ); + ATH_MSG_ALWAYS(" center, normal, etaAxis, phiAxis = " + << element->center() << " " + << element->normal() << " " + << element->etaAxis() << " " + << element->phiAxis() + ); + ATH_MSG_ALWAYS(" center: r (mm) = " << element->center().perp()/CLHEP::mm + << ", phi (deg) = " << element->center().phi()/CLHEP::deg); const InDet::SiliconProperties & siProperties = m_useConditionsTools ? m_siPropertiesTool->getSiProperties(hashId) : m_siPropertiesSvc->getSiProperties(hashId); - cout << " Lorentz correction (mm), mobility (cm2/V/s), tanLorentzPhi = " - << element->getLorentzCorrection()/CLHEP::mm << " " - << siProperties.hallMobility(element->carrierType()) /(CLHEP::cm2/CLHEP::volt/CLHEP::s) << " " - << element->getTanLorentzAnglePhi() << endl; - cout << " Temperature (C), bias voltage, depletion voltage: "; + if (m_manager->getName() == "Pixel") { + ATH_MSG_ALWAYS(" Lorentz correction (mm), mobility (cm2/V/s), tanLorentzPhi = " + << element->getLorentzCorrection()/CLHEP::mm << " " + << element->getLorentzCorrection()/CLHEP::mm << " " + << siProperties.hallMobility(element->carrierType()) /(CLHEP::cm2/CLHEP::volt/CLHEP::s) << " " + << element->getTanLorentzAnglePhi()); + } else { + ATH_MSG_ALWAYS(" Lorentz correction (mm), mobility (cm2/V/s), tanLorentzPhi = " + << m_siLorentzAngleTool->getLorentzShift(hashId)/CLHEP::mm << " " + << element->getLorentzCorrection()/CLHEP::mm << " " + << siProperties.hallMobility(element->carrierType()) /(CLHEP::cm2/CLHEP::volt/CLHEP::s) << " " + << m_siLorentzAngleTool->getTanLorentzAngle(hashId)); + } if (m_useConditionsTools) { - cout << m_siConditionsTool->temperature(hashId) << " " - << m_siConditionsTool->biasVoltage(hashId) << " " - << m_siConditionsTool->depletionVoltage(hashId); + ATH_MSG_ALWAYS(" Temperature (C), bias voltage, depletion voltage: " + << m_siConditionsTool->temperature(hashId) << " " + << m_siConditionsTool->biasVoltage(hashId) << " " + << m_siConditionsTool->depletionVoltage(hashId)); } else { - cout << m_siConditionsSvc->temperature(hashId) << " " - << m_siConditionsSvc->biasVoltage(hashId) << " " - << m_siConditionsSvc->depletionVoltage(hashId); + ATH_MSG_ALWAYS(" Temperature (C), bias voltage, depletion voltage: " + << m_siConditionsSvc->temperature(hashId) << " " + << m_siConditionsSvc->biasVoltage(hashId) << " " + << m_siConditionsSvc->depletionVoltage(hashId)); } - cout << endl; - cout << " sin(tilt), tilt (deg), sin(stereo), stereo (deg) = " - << element->sinTilt() << ", " - << asin(element->sinTilt())/CLHEP::degree << ", " - << element->sinStereo() << ", " - << asin(element->sinStereo())/CLHEP::degree << endl; - cout << " Neighbours: " << endl; - cout << " nextInEta: " << printElementId(element->nextInEta()) << endl; - cout << " prevInEta: " << printElementId(element->prevInEta()) << endl; - cout << " nextInPhi: " << printElementId(element->nextInPhi()) << endl; - cout << " prevInPhi: " << printElementId(element->prevInPhi()) << endl; - cout << " otherSide: " << printElementId(element->otherSide()) << endl; + ATH_MSG_ALWAYS(" sin(tilt), tilt (deg), sin(stereo), stereo (deg) = " + << element->sinTilt() << ", " + << asin(element->sinTilt())/CLHEP::degree << ", " + << element->sinStereo() << ", " + << asin(element->sinStereo())/CLHEP::degree); + ATH_MSG_ALWAYS(" Neighbours: "); + ATH_MSG_ALWAYS(" nextInEta: " << printElementId(element->nextInEta()) ); + ATH_MSG_ALWAYS(" prevInEta: " << printElementId(element->prevInEta()) ); + ATH_MSG_ALWAYS(" nextInPhi: " << printElementId(element->nextInPhi()) ); + ATH_MSG_ALWAYS(" prevInPhi: " << printElementId(element->prevInPhi()) ); + ATH_MSG_ALWAYS(" otherSide: " << printElementId(element->otherSide()) ); for (unsigned int iTestCell = 0; iTestCell < cellIdVec.size(); iTestCell++) { SiCellId cellId = cellIdVec[iTestCell]; - cout << endl; - cout << " cell [phiIndex.etaIndex] = " << cellId << endl; + ATH_MSG_ALWAYS(" cell [phiIndex.etaIndex] = " << cellId); // Test cell Id -> Identifier Identifier fullCellId = element->identifierFromCellId(cellId); - cout << " identifier = "; + ATH_MSG_ALWAYS(" identifier = "); element->getIdHelper()->show(fullCellId); // Test Identifier -> cell Id SiCellId cellId2 = element->cellIdFromIdentifier(fullCellId); - cout << " extracted cell id [phiIndex.etaIndex] = " << cellId2 << endl; + ATH_MSG_ALWAYS(" extracted cell id [phiIndex.etaIndex] = " << cellId2); InDetDD::SiLocalPosition localPosRaw1 = element->rawLocalPositionOfCell(cellId); InDetDD::SiLocalPosition localPosRaw2 = element->rawLocalPositionOfCell(fullCellId); InDetDD::SiLocalPosition localPos1 = element->localPositionOfCell(cellId); InDetDD::SiLocalPosition localPos2 = element->localPositionOfCell(fullCellId); - cout << " raw localPosition (using cell id) (xPhi,xEta) = " - << localPosRaw1.xPhi() << ", " << localPosRaw1.xEta() << endl; - cout << " raw localPosition (using full id) (xPhi,xEta) = " - << localPosRaw2.xPhi() << ", " << localPosRaw2.xEta() << endl; + ATH_MSG_ALWAYS(" raw localPosition (using cell id) (xPhi,xEta) = " + << localPosRaw1.xPhi() << ", " << localPosRaw1.xEta()); + ATH_MSG_ALWAYS(" raw localPosition (using full id) (xPhi,xEta) = " + << localPosRaw2.xPhi() << ", " << localPosRaw2.xEta()); SiCellId cellIdRaw(element->cellIdOfPosition(localPosRaw1)); - cout << " corresponding cell (phiIndex,etaIndex) = " - << cellIdRaw << endl; - cout << " lorentz corrected localPosition (using cell id) (xPhi,xEta) = " - << localPos1.xPhi() << ", " << localPos1.xEta() << endl; - cout << " lorentz corrected localPosition (using cell id) (xPhi,xEta) = " - << localPos2.xPhi() << ", " << localPos2.xEta() << endl; + ATH_MSG_ALWAYS(" corresponding cell (phiIndex,etaIndex) = " + << cellIdRaw); + ATH_MSG_ALWAYS(" lorentz corrected localPosition (using cell id) (xPhi,xEta) = " + << localPos1.xPhi() << ", " << localPos1.xEta()); + ATH_MSG_ALWAYS(" lorentz corrected localPosition (using cell id) (xPhi,xEta) = " + << localPos2.xPhi() << ", " << localPos2.xEta()); SiCellId cellIdNew(element->cellIdOfPosition(localPos1)); - cout << " corresponding cell (phiIndex,etaIndex) = " - << cellIdNew << endl; - cout << " Number of connected cells (2 means ganged): " - << element->numberOfConnectedCells(cellId) << endl; - cout << " Connected cells"; + ATH_MSG_ALWAYS(" corresponding cell (phiIndex,etaIndex) = " + << cellIdNew); + ATH_MSG_ALWAYS(" Number of connected cells (2 means ganged): " + << element->numberOfConnectedCells(cellId)); + msg(MSG::ALWAYS) << " Connected cells"; for (int iCell=0; iCell < element->numberOfConnectedCells(cellId) ; iCell++) { SiCellId connectedCellId = element->connectedCell(cellId, iCell); - cout << ", "; - cout << iCell << ": " << connectedCellId; + msg(MSG::ALWAYS) << ", " << iCell << ": " << connectedCellId; } - cout << endl; - cout << "In range: " << element->design().cellIdInRange(cellId) << endl; + ATH_MSG_ALWAYS("In range: " << element->design().cellIdInRange(cellId)); } for (unsigned int iTestPos = 0; iTestPos < positionsVec.size(); iTestPos++) { const InDetDD::SiLocalPosition & localPosOrig = positionsVec[iTestPos]; - cout << endl; - cout << " Requested local pos (xPhi,xEta) = " << localPosOrig.xPhi() << ", " << localPosOrig.xEta() << endl; + ATH_MSG_ALWAYS(" Requested local pos (xPhi,xEta) = " << localPosOrig.xPhi() << ", " << localPosOrig.xEta()); //lost out to HepGeom here HepGeom::Point3D<double> globalPos(element->globalPositionCLHEP(localPosOrig)); - cout << " Global pos = " << globalPos << ", r (mm) = " << globalPos.perp()/CLHEP::mm<< ", phi (deg) = " << globalPos.phi()/CLHEP::degree << endl; + ATH_MSG_ALWAYS(" Global pos = " << globalPos << ", r (mm) = " << globalPos.perp()/CLHEP::mm<< ", phi (deg) = " << globalPos.phi()/CLHEP::degree); //...because i need a HepGeom::Point3D<double> to pass to element->localPosition... InDetDD::SiLocalPosition localPosNew(element->localPosition(globalPos)); - cout << " Returned local Pos (xPhi,xEta) = " << localPosNew.xPhi() << ", " << localPosNew.xEta() << endl; + ATH_MSG_ALWAYS(" Returned local Pos (xPhi,xEta) = " << localPosNew.xPhi() << ", " << localPosNew.xEta()); // Some arbitrary tolerance picked out of the air. double tolerance = 100*CLHEP::micrometer; SiIntersect intersectState = element->inDetector(globalPos, tolerance, tolerance); - cout << " Intersects (tolerance = " << tolerance/CLHEP::mm << " mm) " - << " (in,out,nearBoundary,mayIntersect) : " - << intersectState.in() << "," - << intersectState.out() << "," - << intersectState.nearBoundary() << "," - << intersectState.mayIntersect() << endl; - cout << " Near bond gap: (tolerance = " << tolerance/CLHEP::mm << " mm) : " - << element->nearBondGap(globalPos, tolerance) << endl; + ATH_MSG_ALWAYS(" Intersects (tolerance = " << tolerance/CLHEP::mm << " mm) " + << " (in,out,nearBoundary,mayIntersect) : " + << intersectState.in() << "," + << intersectState.out() << "," + << intersectState.nearBoundary() << "," + << intersectState.mayIntersect()); + ATH_MSG_ALWAYS(" Near bond gap: (tolerance = " << tolerance/CLHEP::mm << " mm) : " + << element->nearBondGap(globalPos, tolerance)); SiCellId returnedCellId = element->cellIdOfPosition(localPosNew); - // cout << " Returned cell Id (phiIndex,etaIndex) = " - // << returnedCellId.phiIndex() << ", " << returnedCellId.etaIndex() << endl; - cout << " Returned cell Id [phiIndex.etaIndex] = " - << returnedCellId << endl; - cout << " using global position sin(tilt), tilt (deg), sin(stereo), stereo (deg) = " - << element->sinTilt(globalPos) << ", " - << asin(element->sinTilt(globalPos))/CLHEP::degree << ", " - << element->sinStereo(globalPos) << ", " - << asin(element->sinStereo(globalPos))/CLHEP::degree << endl; + // ATH_MSG_ALWAYS(" Returned cell Id (phiIndex,etaIndex) = " + // << returnedCellId.phiIndex() << ", " << returnedCellId.etaIndex()); + ATH_MSG_ALWAYS(" Returned cell Id [phiIndex.etaIndex] = " + << returnedCellId); + ATH_MSG_ALWAYS(" using global position sin(tilt), tilt (deg), sin(stereo), stereo (deg) = " + << element->sinTilt(globalPos) << ", " + << asin(element->sinTilt(globalPos))/CLHEP::degree << ", " + << element->sinStereo(globalPos) << ", " + << asin(element->sinStereo(globalPos))/CLHEP::degree); } } else { // element == 0 - cout << " ELEMENT MISSING!!!!!!!!!! " << endl; + ATH_MSG_ALWAYS(" ELEMENT MISSING!!!!!!!!!! "); } - cout << "----------------------------------------------" << endl; + ATH_MSG_ALWAYS("----------------------------------------------"); } std::string @@ -662,10 +664,6 @@ ReadSiDetectorElements::printElementId(const SiDetectorElement * element) const{ StatusCode ReadSiDetectorElements::finalize() { // Part 1: Get the messaging service, print where you are - msg(MSG::INFO) << "finalize()" << endmsg; + ATH_MSG_INFO("finalize()"); return StatusCode::SUCCESS; } - - - - -- GitLab From 60506a2ff3ad0327fc3222a7e3edaff4a3159cc5 Mon Sep 17 00:00:00 2001 From: Scott Snyder <scott.snyder@cern.ch> Date: Fri, 8 Jun 2018 13:09:24 +0000 Subject: [PATCH 086/562] CaloInterface,CaloUtils,LArRecUtils,CaloRec: Make tower building algorithms reentrant. Former-commit-id: 725afdff2ae6147bd864503fd06268fd9ee17639 --- .../ICaloTopoTowerBuilderToolBase.h | 2 +- .../CaloInterface/ICaloTowerBuilderToolBase.h | 2 +- .../CaloRec/src/CaloTopoTowerAlgorithm.cxx | 57 ++--------- .../CaloRec/src/CaloTopoTowerAlgorithm.h | 18 +--- .../CaloRec/src/CaloTowerAlgorithm.cxx | 41 +------- Calorimeter/CaloRec/src/CaloTowerAlgorithm.h | 19 +--- Calorimeter/CaloUtils/CMakeLists.txt | 2 +- .../CaloUtils/CaloTopoTowerBuilderTool.h | 22 +---- .../CaloUtils/CaloTopoTowerBuilderToolBase.h | 12 +-- .../CaloUtils/CaloTowerBuilderTool.h | 29 ++++-- .../CaloUtils/CaloTowerBuilderToolBase.h | 27 +++-- .../CaloUtils/CaloUtils/CaloTowerStore.h | 6 +- .../CaloUtils/ICaloTowerBuilderToolBase.h | 10 -- .../src/CaloTopoTowerBuilderTool.cxx | 59 +++++------ .../CaloUtils/src/CaloTowerBuilderTool.cxx | 98 +++++++++++-------- .../src/CaloTowerBuilderToolBase.cxx | 2 +- Calorimeter/CaloUtils/src/CaloTowerStore.cxx | 26 +++-- .../src/LArFCalTowerBuilderTool.cxx | 82 +++++++++------- .../LArRecUtils/src/LArFCalTowerBuilderTool.h | 31 ++++-- 19 files changed, 259 insertions(+), 286 deletions(-) delete mode 100644 Calorimeter/CaloUtils/CaloUtils/ICaloTowerBuilderToolBase.h diff --git a/Calorimeter/CaloInterface/CaloInterface/ICaloTopoTowerBuilderToolBase.h b/Calorimeter/CaloInterface/CaloInterface/ICaloTopoTowerBuilderToolBase.h index 955e0f705142..25721560e25c 100755 --- a/Calorimeter/CaloInterface/CaloInterface/ICaloTopoTowerBuilderToolBase.h +++ b/Calorimeter/CaloInterface/CaloInterface/ICaloTopoTowerBuilderToolBase.h @@ -41,7 +41,7 @@ class ICaloTopoTowerBuilderToolBase : virtual public IAlgTool /// common initialization /// execute is abstract - virtual StatusCode execute(CaloTopoTowerContainer* theContainer,const CaloCellContainer* theCell=0) = 0; + virtual StatusCode execute(CaloTopoTowerContainer* theContainer,const CaloCellContainer* theCell=0) const = 0; virtual StatusCode initialize() =0; virtual StatusCode initializeTool() = 0; diff --git a/Calorimeter/CaloInterface/CaloInterface/ICaloTowerBuilderToolBase.h b/Calorimeter/CaloInterface/CaloInterface/ICaloTowerBuilderToolBase.h index 55e33cb91bc7..07dc0a3705cc 100755 --- a/Calorimeter/CaloInterface/CaloInterface/ICaloTowerBuilderToolBase.h +++ b/Calorimeter/CaloInterface/CaloInterface/ICaloTowerBuilderToolBase.h @@ -57,7 +57,7 @@ class ICaloTowerBuilderToolBase : virtual public IAlgTool */ virtual StatusCode execute(CaloTowerContainer* theContainer, const CaloCellContainer* theCell=0, - const CaloTowerSeg::SubSeg* subseg = 0) = 0; + const CaloTowerSeg::SubSeg* subseg = 0) const = 0; virtual StatusCode initialize() =0; virtual StatusCode initializeTool() = 0; diff --git a/Calorimeter/CaloRec/src/CaloTopoTowerAlgorithm.cxx b/Calorimeter/CaloRec/src/CaloTopoTowerAlgorithm.cxx index d9854d0f8f2a..e652ebfc2526 100644 --- a/Calorimeter/CaloRec/src/CaloTopoTowerAlgorithm.cxx +++ b/Calorimeter/CaloRec/src/CaloTopoTowerAlgorithm.cxx @@ -30,7 +30,7 @@ CaloTopoTowerAlgorithm::CaloTopoTowerAlgorithm(const std::string& name, ISvcLocator* pSvcLocator) - : AthAlgorithm(name,pSvcLocator) + : AthReentrantAlgorithm(name,pSvcLocator) , m_genericLink(true) , m_ptools( this ) , m_cellContainerKey("AllCalo") @@ -189,10 +189,6 @@ StatusCode CaloTopoTowerAlgorithm::initialize() << "::name() = \042" << (*firstITool)->name() << "\042" ); - // reset statistics - m_toolInvoke[(*firstITool)->name()] = 0; - m_toolReject[(*firstITool)->name()] = 0; - m_toolAccept[(*firstITool)->name()] = 0; ATH_MSG_INFO( "------------------------------------" ); ATH_MSG_INFO( " " ); @@ -210,7 +206,7 @@ StatusCode CaloTopoTowerAlgorithm::initialize() // Execute // ///////////// -StatusCode CaloTopoTowerAlgorithm::execute() +StatusCode CaloTopoTowerAlgorithm::execute_r (const EventContext& ctx) const { ////////////////////////// @@ -224,14 +220,14 @@ StatusCode CaloTopoTowerAlgorithm::execute() // Tool Processing // ///////////////////// /// retrieve existing Tower container - SG::ReadHandle<CaloTowerContainer> towerContainer(m_towerContainerKey); + SG::ReadHandle<CaloTowerContainer> towerContainer(m_towerContainerKey, ctx); if ( !towerContainer.isValid() ) { ATH_MSG_WARNING( " cannot retrieve tower container with key " << towerContainer.name() ); return StatusCode::SUCCESS; } /// get CaloCell container from StoreGate - SG::ReadHandle<CaloCellContainer> theCells(m_cellContainerKey); + SG::ReadHandle<CaloCellContainer> theCells(m_cellContainerKey, ctx); if ( !theCells.isValid()) { ATH_MSG_WARNING( " cannot retrieve cell container with key " << theCells.name() ); return StatusCode::SUCCESS; @@ -239,7 +235,7 @@ StatusCode CaloTopoTowerAlgorithm::execute() ATH_MSG_DEBUG( "CaloTopoTowerAlgorithm::execute " << theCells.name() << " size= " << theCells->size() ); ///+++ pick up TopoCluster from StoreGate - SG::ReadHandle<CaloClusterContainer> clusters(m_clusterKey); + SG::ReadHandle<CaloClusterContainer> clusters(m_clusterKey, ctx); if ( !clusters.isValid() ) { @@ -249,7 +245,7 @@ StatusCode CaloTopoTowerAlgorithm::execute() } ///+++ pick up CaloCell2ClusterMap from StoreGate - SG::ReadHandle<CaloCell2ClusterMap> cellToClusterMap(m_cellToClusterMapKey); + SG::ReadHandle<CaloCell2ClusterMap> cellToClusterMap(m_cellToClusterMapKey, ctx); if ( !cellToClusterMap.isValid() ){ ATH_MSG_WARNING( "cannot retrieve CaloCell2ClusterMap with key <" << cellToClusterMap.name() << ">" ); @@ -258,7 +254,7 @@ StatusCode CaloTopoTowerAlgorithm::execute() ATH_MSG_DEBUG( "Successfully retrieved CaloCell2ClusterMap <"<< cellToClusterMap.name() << ">" ); - SG::WriteHandle<CaloTopoTowerContainer> theTowers( m_newTowerContainerKey); + SG::WriteHandle<CaloTopoTowerContainer> theTowers( m_newTowerContainerKey, ctx); ATH_CHECK( theTowers.record (std::make_unique<CaloTopoTowerContainer>(towerContainer->towerseg())) ); //////////////////////////////////////////////////////////////////////////// @@ -288,8 +284,8 @@ StatusCode CaloTopoTowerAlgorithm::execute() //Finished saving variable to CaloTopoTowerContainer //////////////////////////////////////////////////////////////////////////// - ToolHandleArray<ICaloTopoTowerBuilderToolBase>::iterator firstITool = m_ptools.begin(); - ToolHandleArray<ICaloTopoTowerBuilderToolBase>::iterator lastITool = m_ptools.end(); + ToolHandleArray<ICaloTopoTowerBuilderToolBase>::const_iterator firstITool = m_ptools.begin(); + ToolHandleArray<ICaloTopoTowerBuilderToolBase>::const_iterator lastITool = m_ptools.end(); StatusCode processStatus = StatusCode::SUCCESS; // // loop stops only when Failure indicated by one of the tools @@ -306,7 +302,6 @@ StatusCode CaloTopoTowerAlgorithm::execute() //if ( (*firstITool).empty() ) { log << MSG::INFO << "tool is empty " << endmsg; } //ATH_MSG_INFO( "tool retrieved, going to start " ); - m_toolInvoke[(*firstITool)->name()]++; if ( theTicker != 0 ) { // ATH_MSG_INFO( "Chrono start " ); @@ -335,7 +330,6 @@ StatusCode CaloTopoTowerAlgorithm::execute() ATH_MSG_DEBUG( (*firstITool)->name() << ": CaloTopoTowerContainer::size() = " << theTowers->size() ); - m_toolAccept[(*firstITool)->name()]++; firstITool++; } else @@ -345,7 +339,6 @@ StatusCode CaloTopoTowerAlgorithm::execute() << (*firstITool)->name() << "\042 - cross-check CaloTopoTowerContainer::size() = " << theTowers->size() ); - m_toolReject[(*firstITool)->name()]++; firstITool++; } } @@ -378,37 +371,5 @@ StatusCode CaloTopoTowerAlgorithm::execute() StatusCode CaloTopoTowerAlgorithm::finalize() { - ////////////////////////// - // Re-allocate Services // - ////////////////////////// - - //////////////// - // Tool Stats // - //////////////// - - ATH_MSG_INFO( " " ); - ATH_MSG_INFO( "Summary of Tool invocation: (invoked/success/failure)" ); - ATH_MSG_INFO( "---------------------------" ); - - tool_stats_iterator firstName = m_toolInvoke.begin(); - tool_stats_iterator lastName = m_toolInvoke.end(); - unsigned int toolCtr = 0; - for ( ; firstName != lastName; firstName++ ) - { - toolCtr++; - ATH_MSG_INFO( std::setw(2) << toolCtr << ".) " - << std::setw(36) //<< std::setfill(".") - << (*firstName).first - << " (" - << (*firstName).second - << "/" - << m_toolAccept[(*firstName).first] - << "/" - << m_toolReject[(*firstName).first] - << ")" ); - } - ATH_MSG_INFO( "---------------------------" ); - ATH_MSG_INFO( " " ); - return StatusCode::SUCCESS; } diff --git a/Calorimeter/CaloRec/src/CaloTopoTowerAlgorithm.h b/Calorimeter/CaloRec/src/CaloTopoTowerAlgorithm.h index 5d90fd5aa776..bd46bd5fe162 100644 --- a/Calorimeter/CaloRec/src/CaloTopoTowerAlgorithm.h +++ b/Calorimeter/CaloRec/src/CaloTopoTowerAlgorithm.h @@ -21,7 +21,7 @@ /// /////////////////////////////////////////////////////////////////////////////// -#include "AthenaBaseComps/AthAlgorithm.h" +#include "AthenaBaseComps/AthReentrantAlgorithm.h" #include "GaudiKernel/ToolHandle.h" #include "CaloUtils/CaloTopoTowerBuilderToolBase.h" @@ -35,16 +35,13 @@ class StoreGateSvc; class CaloTopoTowerContainer; class ICaloTopoTowerBuilderToolBase; -class CaloTopoTowerAlgorithm : public AthAlgorithm +class CaloTopoTowerAlgorithm : public AthReentrantAlgorithm { public: - typedef std::string tool_key; typedef CaloTopoTowerBuilderToolBase tool_type; typedef std::vector<tool_type*> tool_store; typedef tool_store::const_iterator tool_iterator; - typedef std::map<tool_key,unsigned int> tool_stats; - typedef tool_stats::const_iterator tool_stats_iterator; /// Algorithm constructor CaloTopoTowerAlgorithm(const std::string& name, ISvcLocator* pService); @@ -52,9 +49,9 @@ class CaloTopoTowerAlgorithm : public AthAlgorithm virtual ~CaloTopoTowerAlgorithm(); /// inherited from Algorithm - virtual StatusCode initialize(); - virtual StatusCode execute(); - virtual StatusCode finalize(); + virtual StatusCode initialize() override; + virtual StatusCode execute_r (const EventContext& ctx) const override; + virtual StatusCode finalize() override; protected: @@ -76,11 +73,6 @@ class CaloTopoTowerAlgorithm : public AthAlgorithm // list of tools tool_store m_tools; - // tool invocation stats - tool_stats m_toolInvoke; - tool_stats m_toolAccept; - tool_stats m_toolReject; - ////////////////////////////////////////// // CaloTopoTowerContainer variables // Container name strings diff --git a/Calorimeter/CaloRec/src/CaloTowerAlgorithm.cxx b/Calorimeter/CaloRec/src/CaloTowerAlgorithm.cxx index c39db672336b..0f477e0c074b 100644 --- a/Calorimeter/CaloRec/src/CaloTowerAlgorithm.cxx +++ b/Calorimeter/CaloRec/src/CaloTowerAlgorithm.cxx @@ -22,7 +22,7 @@ CaloTowerAlgorithm::CaloTowerAlgorithm(const std::string& name, ISvcLocator* pSvcLocator) - : AthAlgorithm(name,pSvcLocator) + : AthReentrantAlgorithm(name,pSvcLocator) , m_nEtaTowers(50) , m_nPhiTowers(64) , m_minEta(-2.5) @@ -94,11 +94,6 @@ StatusCode CaloTowerAlgorithm::initialize() ATH_MSG_INFO(std::setw(2) << toolCtr << ".) " << (*firstITool)->type() << "::name() = \042" << (*firstITool)->name() << "\042"); - // reset statistics - m_toolInvoke[(*firstITool)->name()] = 0; - m_toolReject[(*firstITool)->name()] = 0; - m_toolAccept[(*firstITool)->name()] = 0; - ATH_MSG_INFO("------------------------------------"); ATH_MSG_INFO(" "); @@ -119,7 +114,7 @@ StatusCode CaloTowerAlgorithm::initialize() // Execute // ///////////// -StatusCode CaloTowerAlgorithm::execute() +StatusCode CaloTowerAlgorithm::execute_r (const EventContext& ctx) const { ////////////////////////// @@ -135,12 +130,12 @@ StatusCode CaloTowerAlgorithm::execute() CaloTowerSeg theTowerSeg(m_nEtaTowers,m_nPhiTowers,m_minEta,m_maxEta); - SG::WriteHandle<CaloTowerContainer> theTowers(m_towerContainerKey); + SG::WriteHandle<CaloTowerContainer> theTowers(m_towerContainerKey, ctx); ATH_CHECK( theTowers.record(std::make_unique<CaloTowerContainer>(theTowerSeg)) ); - ToolHandleArray<ICaloTowerBuilderToolBase>::iterator firstITool = m_ptools.begin(); - ToolHandleArray<ICaloTowerBuilderToolBase>::iterator lastITool = m_ptools.end(); + ToolHandleArray<ICaloTowerBuilderToolBase>::const_iterator firstITool = m_ptools.begin(); + ToolHandleArray<ICaloTowerBuilderToolBase>::const_iterator lastITool = m_ptools.end(); StatusCode processStatus = StatusCode::SUCCESS; // // loop stops only when Failure indicated by one of the tools @@ -150,7 +145,6 @@ StatusCode CaloTowerAlgorithm::execute() while (!processStatus.isFailure() && firstITool != lastITool) { - m_toolInvoke[(*firstITool)->name()]++; if (theTicker != 0) { theTicker->chronoStart((*firstITool)->name()); } @@ -164,7 +158,6 @@ StatusCode CaloTowerAlgorithm::execute() ATH_MSG_DEBUG((*firstITool)->name() << ": CaloTowerContainer::size() = " << theTowers->size()); - m_toolAccept[(*firstITool)->name()]++; firstITool++; } else { // some problem - but do not skip event loop! @@ -173,7 +166,6 @@ StatusCode CaloTowerAlgorithm::execute() << "\042 - cross-check CaloTowerContainer::size() = " << theTowers->size()); - m_toolReject[(*firstITool)->name()]++; firstITool++; } } @@ -187,28 +179,5 @@ StatusCode CaloTowerAlgorithm::execute() StatusCode CaloTowerAlgorithm::finalize() { - - //////////////// - // Tool Stats // - //////////////// - - ATH_MSG_INFO(" "); - ATH_MSG_INFO("Summary of Tool invocation: (invoked/success/failure)"); - ATH_MSG_INFO("---------------------------"); - - tool_stats_iterator firstName = m_toolInvoke.begin(); - tool_stats_iterator lastName = m_toolInvoke.end(); - unsigned int toolCtr = 0; - for (; firstName != lastName; firstName++) { - toolCtr++; - ATH_MSG_INFO(std::setw(2) << toolCtr << ".) " - << std::setw(36) //<< std::setfill(".") - << (*firstName).first << " (" << (*firstName).second << "/" - << m_toolAccept[(*firstName).first] << "/" - << m_toolReject[(*firstName).first] << ")"); - } - ATH_MSG_INFO("---------------------------"); - ATH_MSG_INFO(" "); - return StatusCode::SUCCESS; } diff --git a/Calorimeter/CaloRec/src/CaloTowerAlgorithm.h b/Calorimeter/CaloRec/src/CaloTowerAlgorithm.h index d8f2d052e14a..a3142cbd5e4a 100644 --- a/Calorimeter/CaloRec/src/CaloTowerAlgorithm.h +++ b/Calorimeter/CaloRec/src/CaloTowerAlgorithm.h @@ -21,7 +21,7 @@ #include "GaudiKernel/ToolHandle.h" -#include "AthenaBaseComps/AthAlgorithm.h" +#include "AthenaBaseComps/AthReentrantAlgorithm.h" #include "CaloUtils/CaloTowerBuilderToolBase.h" #include <string> @@ -32,15 +32,12 @@ class StoreGateSvc; class CaloTowerContainer; class ICaloTowerBuilderToolBase; -class CaloTowerAlgorithm: public AthAlgorithm { +class CaloTowerAlgorithm: public AthReentrantAlgorithm { public: - typedef std::string tool_key; typedef CaloTowerBuilderToolBase tool_type; typedef std::vector<tool_type*> tool_store; typedef tool_store::const_iterator tool_iterator; - typedef std::map<tool_key, unsigned int> tool_stats; - typedef tool_stats::const_iterator tool_stats_iterator; /// Algorithm constructor CaloTowerAlgorithm(const std::string& name, ISvcLocator* pService); @@ -48,9 +45,9 @@ class CaloTowerAlgorithm: public AthAlgorithm { virtual ~CaloTowerAlgorithm(); /// inherited from Algorithm - virtual StatusCode initialize(); - virtual StatusCode execute(); - virtual StatusCode finalize(); + virtual StatusCode initialize() override; + virtual StatusCode execute_r (const EventContext& ctx) const override; + virtual StatusCode finalize() override; protected: @@ -78,11 +75,5 @@ class CaloTowerAlgorithm: public AthAlgorithm { // list of tools tool_store m_tools; - - // tool invocation stats - tool_stats m_toolInvoke; - tool_stats m_toolAccept; - tool_stats m_toolReject; - }; #endif diff --git a/Calorimeter/CaloUtils/CMakeLists.txt b/Calorimeter/CaloUtils/CMakeLists.txt index 3d81e099f6bc..59c792330c0b 100644 --- a/Calorimeter/CaloUtils/CMakeLists.txt +++ b/Calorimeter/CaloUtils/CMakeLists.txt @@ -19,12 +19,12 @@ atlas_depends_on_subdirs( Control/AthenaKernel Control/Navigation Control/StoreGate + Control/CxxUtils Event/FourMom Event/xAOD/xAODCaloEvent GaudiKernel PRIVATE AtlasTest/TestTools - Control/CxxUtils Control/SGTools DetectorDescription/GeoModel/GeoModelInterfaces DetectorDescription/IdDictParser diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloTopoTowerBuilderTool.h b/Calorimeter/CaloUtils/CaloUtils/CaloTopoTowerBuilderTool.h index f3a4c862791b..5e94644fd212 100644 --- a/Calorimeter/CaloUtils/CaloUtils/CaloTopoTowerBuilderTool.h +++ b/Calorimeter/CaloUtils/CaloUtils/CaloTopoTowerBuilderTool.h @@ -46,14 +46,14 @@ class CaloTopoTowerBuilderTool : public CaloTopoTowerBuilderToolBase virtual ~CaloTopoTowerBuilderTool(); /// execute - virtual StatusCode execute(CaloTopoTowerContainer* theContainer,const CaloCellContainer* theCell=0); + virtual StatusCode execute(CaloTopoTowerContainer* theContainer,const CaloCellContainer* theCell=0) const override; //virtual StatusCode initialize(); - virtual StatusCode initializeTool(); + virtual StatusCode initializeTool() override; - virtual void handle(const Incident&); + virtual void handle(const Incident&) override; - virtual StatusCode LoadCalibration(IOVSVC_CALLBACK_ARGS); + virtual StatusCode LoadCalibration(IOVSVC_CALLBACK_ARGS) override; protected: @@ -63,21 +63,9 @@ class CaloTopoTowerBuilderTool : public CaloTopoTowerBuilderToolBase std::vector<CaloCell_ID::SUBCALO> m_caloIndices; - double m_minimumCellEnergy; - double m_minimumClusterEnergy; - bool m_useCellWeights; - - // Noise tool stuff - bool m_useNoiseTool; - bool m_usePileUpNoise; - float m_noiseSigma; - float m_cellESignificanceThreshold; - - // List of calorimeters from which to use cells - bool m_caloSelection; private: - const CaloCell2ClusterMap* CreateCaloCell2ClusterMap(const CaloClusterContainer* c); + const CaloCell2ClusterMap* CreateCaloCell2ClusterMap(const CaloClusterContainer* c) const; const CaloDetDescrManager* m_calo_dd_man; const CaloCell_ID* m_calo_id; diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloTopoTowerBuilderToolBase.h b/Calorimeter/CaloUtils/CaloUtils/CaloTopoTowerBuilderToolBase.h index 8e9a6e96ed26..6bf04b0609a8 100644 --- a/Calorimeter/CaloUtils/CaloUtils/CaloTopoTowerBuilderToolBase.h +++ b/Calorimeter/CaloUtils/CaloUtils/CaloTopoTowerBuilderToolBase.h @@ -39,19 +39,19 @@ class CaloTopoTowerBuilderToolBase : public AthAlgTool, virtual ~CaloTopoTowerBuilderToolBase(); /// common initialization - virtual StatusCode initialize(); + virtual StatusCode initialize() override; - virtual void setTowerSeg(const CaloTowerSeg& theTowerSeg); + virtual void setTowerSeg(const CaloTowerSeg& theTowerSeg) override; - virtual StatusCode LoadCalibration(IOVSVC_CALLBACK_ARGS); + virtual StatusCode LoadCalibration(IOVSVC_CALLBACK_ARGS) override; /// execute is abstract - virtual StatusCode execute(CaloTopoTowerContainer* theContainer,const CaloCellContainer* theCell=0) = 0; + virtual StatusCode execute(CaloTopoTowerContainer* theContainer,const CaloCellContainer* theCell=0) const override = 0; - virtual StatusCode initializeTool() = 0; + virtual StatusCode initializeTool() override = 0; // abstract to be implemented by derived class (Tile, LarFCal, Calo) - virtual void handle(const Incident&) = 0; + virtual void handle(const Incident&) override = 0; protected: diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloTowerBuilderTool.h b/Calorimeter/CaloUtils/CaloUtils/CaloTowerBuilderTool.h index 77b8cf61c2ef..69ed6ef27b4f 100644 --- a/Calorimeter/CaloUtils/CaloUtils/CaloTowerBuilderTool.h +++ b/Calorimeter/CaloUtils/CaloUtils/CaloTowerBuilderTool.h @@ -56,7 +56,18 @@ public: */ virtual StatusCode execute(CaloTowerContainer* theContainer, const CaloCellContainer* theCell=0, - const CaloTowerSeg::SubSeg* subseg = 0) override; + const CaloTowerSeg::SubSeg* subseg = 0) const override; + + + /** + * @brief Run tower building and add results to the tower container. + * @param theContainer The tower container to fill. + * + * If the segmentation hasn't been set, take it from the tower container. + * This is for use by converters. + */ + virtual StatusCode execute (CaloTowerContainer* theContainer) override; + virtual void setCalos( const std::vector<CaloCell_ID::SUBCALO>& v); @@ -92,27 +103,33 @@ private: // Specific Initialization // ///////////////////////////// - bool m_cacheValid; CaloTowerStore m_cellStore; virtual StatusCode checkSetup(MsgStream& log); void addTower (const CaloTowerStore::tower_iterator tower_it, const CaloCellContainer* cells, IProxyDict* sg, - CaloTower* tower); + CaloTower* tower) const; void iterateFull (CaloTowerContainer* towers, const CaloCellContainer* cells, - IProxyDict* sg); + IProxyDict* sg) const; void iterateSubSeg (CaloTowerContainer* towers, const CaloCellContainer* cells, IProxyDict* sg, - const CaloTowerSeg::SubSeg* subseg); + const CaloTowerSeg::SubSeg* subseg) const; + + + /** + * @brief Rebuild the cell lookup table. + */ + StatusCode rebuildLookup(); + /** * @brief Mark that cached data are invalid. * * Called when calibrations are updated. */ - virtual void invalidateCache() override; + virtual StatusCode invalidateCache() override; }; #endif diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloTowerBuilderToolBase.h b/Calorimeter/CaloUtils/CaloUtils/CaloTowerBuilderToolBase.h index c5e79fd56705..cc977e7626bc 100644 --- a/Calorimeter/CaloUtils/CaloUtils/CaloTowerBuilderToolBase.h +++ b/Calorimeter/CaloUtils/CaloUtils/CaloTowerBuilderToolBase.h @@ -40,11 +40,11 @@ class CaloTowerBuilderToolBase: public AthAlgTool, virtual ~CaloTowerBuilderToolBase(); /// common initialization - virtual StatusCode initialize(); + virtual StatusCode initialize() override; - virtual void setTowerSeg(const CaloTowerSeg& theTowerSeg); + virtual void setTowerSeg(const CaloTowerSeg& theTowerSeg) override; - virtual StatusCode LoadCalibration(IOVSVC_CALLBACK_ARGS); + virtual StatusCode LoadCalibration(IOVSVC_CALLBACK_ARGS) override; /** @@ -62,13 +62,24 @@ class CaloTowerBuilderToolBase: public AthAlgTool, * The tower container segmentation must match. */ virtual StatusCode execute(CaloTowerContainer* theContainer, - const CaloCellContainer* theCell = 0, - const CaloTowerSeg::SubSeg* subseg = 0) = 0; + const CaloCellContainer* theCell = nullptr, + const CaloTowerSeg::SubSeg* subseg = nullptr) const override = 0; + + /** + * @brief Run tower building and add results to the tower container. + * @param theContainer The tower container to fill. + * + * If the segmentation hasn't been set, take it from the tower container. + * This is for use by converters. + */ + virtual StatusCode execute (CaloTowerContainer* theContainer) = 0; - virtual StatusCode initializeTool() = 0; + + virtual StatusCode initializeTool() override = 0; // abstract to be implemented by derived class (Tile, LarFCal, Calo) - virtual void handle(const Incident&) = 0; + virtual void handle(const Incident&) override = 0; + protected: @@ -77,7 +88,7 @@ class CaloTowerBuilderToolBase: public AthAlgTool, * * Called when calibrations are updated. */ - virtual void invalidateCache() = 0; + virtual StatusCode invalidateCache() = 0; /** diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloTowerStore.h b/Calorimeter/CaloUtils/CaloUtils/CaloTowerStore.h index 386c75545daa..a705ae304459 100644 --- a/Calorimeter/CaloUtils/CaloUtils/CaloTowerStore.h +++ b/Calorimeter/CaloUtils/CaloUtils/CaloTowerStore.h @@ -145,6 +145,7 @@ Updated: Jul 2009, sss // include header files #include "CaloIdentifier/CaloCell_ID.h" #include "CaloEvent/CaloTowerSeg.h" +#include "CxxUtils/CachedValue.h" #include <vector> #include <utility> @@ -311,7 +312,7 @@ private: { m_it += offs; m_entry = m_store.m_entries.begin() + - m_store.m_entry_index[m_it - m_store.m_towers.begin()]; + (*m_store.m_entry_index.ptr())[m_it - m_store.m_towers.begin()]; return *this; } @@ -373,7 +374,8 @@ private: /// of the corresponding entry in m_entries. /// This is only needed for the case of iterating over a window; /// it is otherwise not filled in. - mutable std::vector<unsigned short> m_entry_index; + /// Use a CachedValue for thread-safety. + CxxUtils::CachedValue<std::vector<unsigned short> > m_entry_index; }; diff --git a/Calorimeter/CaloUtils/CaloUtils/ICaloTowerBuilderToolBase.h b/Calorimeter/CaloUtils/CaloUtils/ICaloTowerBuilderToolBase.h deleted file mode 100644 index 0ef0cfdbdcd3..000000000000 --- a/Calorimeter/CaloUtils/CaloUtils/ICaloTowerBuilderToolBase.h +++ /dev/null @@ -1,10 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef CALOREC_ICALOTOWERBUILDERTOOLBASE_H -#define CALOREC_ICALOTOWERBUILDERTOOLBASE_H - -#warning "obsolete header file: Use CaloInterface/ICaloTowerBuilderToolBase.h instead of CaloUtils/ICaloTowerBuilderToolBase.h" -#include "CaloInterface/ICaloTowerBuilderToolBase.h" -#endif diff --git a/Calorimeter/CaloUtils/src/CaloTopoTowerBuilderTool.cxx b/Calorimeter/CaloUtils/src/CaloTopoTowerBuilderTool.cxx index f84ce83d858a..1cea69a190ba 100644 --- a/Calorimeter/CaloUtils/src/CaloTopoTowerBuilderTool.cxx +++ b/Calorimeter/CaloUtils/src/CaloTopoTowerBuilderTool.cxx @@ -40,14 +40,6 @@ CaloTopoTowerBuilderTool::CaloTopoTowerBuilderTool(const std::string& name, const std::string& type, const IInterface* parent) : CaloTopoTowerBuilderToolBase(name,type,parent), - m_minimumCellEnergy(0), - m_minimumClusterEnergy(0), - m_useCellWeights(false), - m_useNoiseTool(false), - m_usePileUpNoise(false), - m_noiseSigma(0), - m_cellESignificanceThreshold(0), - m_caloSelection(false), m_calo_dd_man(nullptr), m_calo_id(nullptr) { @@ -77,7 +69,7 @@ StatusCode CaloTopoTowerBuilderTool::initializeTool() // Tower Builder // /////////////////// -StatusCode CaloTopoTowerBuilderTool::execute(CaloTopoTowerContainer* theTowers, const CaloCellContainer* /*theCells*/) +StatusCode CaloTopoTowerBuilderTool::execute(CaloTopoTowerContainer* theTowers, const CaloCellContainer* /*theCells*/) const { ////////////////////////////////////////////////////////////////////////////// //Starting loading variables from CaloTopoTowerContainer @@ -105,21 +97,21 @@ StatusCode CaloTopoTowerBuilderTool::execute(CaloTopoTowerContainer* theTowers, ATH_MSG_DEBUG( "Cluster size " << clusters->size() ); ATH_MSG_DEBUG( "Cell size " << Cells->size() ); - m_minimumCellEnergy=theTowers->GetMinimumCellEnergy(); - m_minimumClusterEnergy=theTowers->GetMinimumClusterEnergy(); + double minimumCellEnergy = theTowers->GetMinimumCellEnergy(); + double minimumClusterEnergy = theTowers->GetMinimumClusterEnergy(); - m_useCellWeights=theTowers->GetUseCellWeights(); + bool useCellWeights = theTowers->GetUseCellWeights(); - ATH_MSG_DEBUG("Energy cuts " << m_minimumCellEnergy << " " << m_minimumClusterEnergy << " " << m_useCellWeights); + ATH_MSG_DEBUG("Energy cuts " << minimumCellEnergy << " " << minimumClusterEnergy << " " << useCellWeights); // Noise tool stuff - m_useNoiseTool=theTowers->GetUseNoiseTool(); - m_usePileUpNoise=theTowers->GetUsePileUpNoise(); - m_noiseSigma=theTowers->GetNoiseSigma(); - m_cellESignificanceThreshold=theTowers->GetCellESignificanceThreshold(); + bool useNoiseTool = theTowers->GetUseNoiseTool(); + bool usePileUpNoise = theTowers->GetUsePileUpNoise(); + float noiseSigma0 = theTowers->GetNoiseSigma(); + float cellESignificanceThreshold = theTowers->GetCellESignificanceThreshold(); - if (m_useNoiseTool) { + if (useNoiseTool) { ATH_MSG_WARNING( " Using noise tool in CaloTopoTowerBuilderTool no supported. give up => No CaloTopoTowers are made" ); if(delete_cellToClusterMap){ ATH_MSG_DEBUG("Deleting cellToClusterMap Pointer"); @@ -129,13 +121,13 @@ StatusCode CaloTopoTowerBuilderTool::execute(CaloTopoTowerContainer* theTowers, return StatusCode::SUCCESS; } - ATH_MSG_DEBUG("Noise cuts "<< m_noiseSigma << " " << m_cellESignificanceThreshold << " " << m_useNoiseTool << " " << m_usePileUpNoise); + ATH_MSG_DEBUG("Noise cuts "<< noiseSigma0 << " " << cellESignificanceThreshold << " " << useNoiseTool << " " << usePileUpNoise); // List of calorimeters from which to use cells - m_caloIndices=theTowers->GetCaloIndices(); - m_caloSelection=theTowers->GetCaloSelection(); + std::vector<CaloCell_ID::SUBCALO> caloIndices = theTowers->GetCaloIndices(); + bool caloSelection = theTowers->GetCaloSelection(); - ATH_MSG_DEBUG("caloSelection " << m_caloSelection << " " << m_caloIndices.size()); + ATH_MSG_DEBUG("caloSelection " << caloSelection << " " << caloIndices.size()); //Finished loading variables from CaloTopoTowerContainer ////////////////////////////////////////////////////////////////////////////// @@ -226,23 +218,23 @@ StatusCode CaloTopoTowerBuilderTool::execute(CaloTopoTowerContainer* theTowers, continue; } - if (m_caloSelection) { + if (caloSelection) { CaloCell_ID::SUBCALO iCaloNum = (cell->caloDDE()->getSubCalo()); // keep only cells from desired calorimeter std::vector<CaloCell_ID::SUBCALO>::const_iterator theFound = - find (m_caloIndices.begin(),m_caloIndices.end(),iCaloNum); - if (theFound==m_caloIndices.end()) continue ; + find (caloIndices.begin(),caloIndices.end(),iCaloNum); + if (theFound==caloIndices.end()) continue ; } signedE = cell->e(); // get the cell energy if we got a good pointer - if (!m_useCellWeights) weight = 1.0; // if we chose not to use the cell weights, reset to 1.0 + if (!useCellWeights) weight = 1.0; // if we chose not to use the cell weights, reset to 1.0 double cellEnergy = weight * signedE; // calculate the energy of this cell in this tower using the weight float signedRatio=0; float noiseSigma = 1.0; - if (m_cellESignificanceThreshold>=0.) { - noiseSigma = m_noiseSigma; + if (cellESignificanceThreshold>=0.) { + noiseSigma = noiseSigma0; if ( noiseSigma > 0. ) signedRatio = signedE/noiseSigma; } @@ -252,7 +244,7 @@ StatusCode CaloTopoTowerBuilderTool::execute(CaloTopoTowerContainer* theTowers, ATH_MSG_VERBOSE( " Cell noise sigma = " << noiseSigma ); ATH_MSG_VERBOSE( " Cell noise signif = " << signedRatio ); /// Require that the cell have a minimum energy and energy significance - if ( (signedE > m_minimumCellEnergy) && ( fabs(signedRatio) > m_cellESignificanceThreshold) ){ + if ( (signedE > minimumCellEnergy) && ( fabs(signedRatio) > cellESignificanceThreshold) ){ // find clusters associated to this cell using the hash ID size_t cellIndex(cell->caloDDE()->calo_hash()); ATH_MSG_VERBOSE("Cell index from CaloCell2ClusterMap = " << cellIndex); @@ -275,8 +267,8 @@ StatusCode CaloTopoTowerBuilderTool::execute(CaloTopoTowerContainer* theTowers, ATH_MSG_VERBOSE( " Cluster Normal Energy = " << eClus); /// filter clusters according to cluster energy - if ( eClusRaw > m_minimumClusterEnergy ){ - ATH_MSG_VERBOSE("Cluster has at least E > " << m_minimumClusterEnergy); + if ( eClusRaw > minimumClusterEnergy ){ + ATH_MSG_VERBOSE("Cluster has at least E > " << minimumClusterEnergy); numberOfAttachedCellsInTower++; totalNumberOfCellsInAttachedClusters += clusterFromCell->getNumberOfCells(); @@ -349,8 +341,9 @@ StatusCode CaloTopoTowerBuilderTool::LoadCalibration(IOVSVC_CALLBACK_ARGS) -const CaloCell2ClusterMap* CaloTopoTowerBuilderTool::CreateCaloCell2ClusterMap(const CaloClusterContainer* clusColl){ - +const CaloCell2ClusterMap* +CaloTopoTowerBuilderTool::CreateCaloCell2ClusterMap(const CaloClusterContainer* clusColl) const +{ ATH_MSG_DEBUG("CreateCaloCell2ClusterMap() Starting"); CaloCell2ClusterMap *cell2ClusterMap; cell2ClusterMap = new CaloCell2ClusterMap(); diff --git a/Calorimeter/CaloUtils/src/CaloTowerBuilderTool.cxx b/Calorimeter/CaloUtils/src/CaloTowerBuilderTool.cxx index 9e557aca30ae..ca6119428275 100644 --- a/Calorimeter/CaloUtils/src/CaloTowerBuilderTool.cxx +++ b/Calorimeter/CaloUtils/src/CaloTowerBuilderTool.cxx @@ -39,8 +39,6 @@ CaloTowerBuilderTool::CaloTowerBuilderTool(const std::string& name, m_includedCalos[3] = "TILE"; // common properties declareProperty("IncludedCalos",m_includedCalos); - // initialize intermediate store - m_cacheValid = false; } CaloTowerBuilderTool::~CaloTowerBuilderTool() @@ -67,7 +65,7 @@ void CaloTowerBuilderTool::addTower (const CaloTowerStore::tower_iterator tower_it, const CaloCellContainer* cells, IProxyDict* sg, - CaloTower* tower) + CaloTower* tower) const { CaloTowerStore::cell_iterator firstC = tower_it.firstCell(); CaloTowerStore::cell_iterator lastC = tower_it.lastCell(); @@ -100,7 +98,7 @@ inline void CaloTowerBuilderTool::iterateFull (CaloTowerContainer* towers, const CaloCellContainer* cells, - IProxyDict* sg) + IProxyDict* sg) const { size_t sz = towers->size(); assert(m_cellStore.size() == sz); @@ -118,7 +116,7 @@ void CaloTowerBuilderTool::iterateSubSeg (CaloTowerContainer* towers, const CaloCellContainer* cells, IProxyDict* sg, - const CaloTowerSeg::SubSeg* subseg) + const CaloTowerSeg::SubSeg* subseg) const { size_t sz = towers->size(); assert(subseg->size() == sz); @@ -168,25 +166,11 @@ CaloTowerBuilderTool::iterateSubSeg (CaloTowerContainer* towers, StatusCode CaloTowerBuilderTool::execute(CaloTowerContainer* theTowers, const CaloCellContainer* theCells /*= 0*/, - const CaloTowerSeg::SubSeg* subseg /*= 0*/) + const CaloTowerSeg::SubSeg* subseg /*= 0*/) const { - // only once - if (!m_cacheValid) { - - ATH_MSG_DEBUG( - " m_cacheValid is false on first event... Building cell look up "); - - bool ok = false; - if (towerSeg().neta() == 0 || towerSeg().nphi() == 0) { - ok = m_cellStore.buildLookUp(theTowers->towerseg(), m_caloIndices); - } else { - ok = m_cellStore.buildLookUp(towerSeg(), m_caloIndices); - } - if (!ok) { - ATH_MSG_ERROR("cannot construct cell fragment lookup, fatal!"); - return StatusCode::FAILURE; - } - m_cacheValid = true; + if (m_cellStore.size() == 0) { + ATH_MSG_ERROR("Cell store not initialized."); + return StatusCode::FAILURE; } // CaloCellContainer @@ -224,6 +208,25 @@ CaloTowerBuilderTool::execute(CaloTowerContainer* theTowers, return StatusCode::SUCCESS; } + +/** + * @brief Run tower building and add results to the tower container. + * @param theContainer The tower container to fill. + * + * If the segmentation hasn't been set, take it from the tower container. + * This is for use by converters. + */ +StatusCode CaloTowerBuilderTool::execute (CaloTowerContainer* theContainer) +{ + if (m_cellStore.size() == 0) { + setTowerSeg (theContainer->towerseg()); + ATH_CHECK( rebuildLookup() ); + } + + return execute (theContainer, nullptr, nullptr); +} + + ////////////////////// // Internal Helpers // ////////////////////// @@ -249,28 +252,20 @@ StatusCode CaloTowerBuilderTool::checkSetup(MsgStream& /*log*/) { return StatusCode::SUCCESS; } -void CaloTowerBuilderTool::setCalos( - const std::vector<CaloCell_ID::SUBCALO>& v) { +void CaloTowerBuilderTool::setCalos(const std::vector<CaloCell_ID::SUBCALO>& v) +{ if (m_caloIndices != v) { - ATH_MSG_WARNING(" caloIndices to be changed, setting cacheValid to false"); - m_cacheValid = false; + if (m_cellStore.size() > 0) { + if (rebuildLookup().isFailure()) { + ATH_MSG_ERROR("rebuildLookup failed."); + } + } m_caloIndices = v; } } void CaloTowerBuilderTool::handle(const Incident&) { ATH_MSG_DEBUG("In Incident-handle"); - if (m_cacheValid) { - ATH_MSG_DEBUG("Cached data already computed."); - return; - } - if (!m_cellStore.buildLookUp(towerSeg(), m_caloIndices)) { - ATH_MSG_ERROR("cannot construct cell fragment lookup, fatal!"); - m_cacheValid = false; - } else { - m_cacheValid = true; - } - ATH_MSG_DEBUG("after building cell store lookup " << m_cacheValid); } @@ -301,13 +296,36 @@ CaloTowerBuilderTool::parseCalos } +/** + * @brief Rebuild the cell lookup table. + */ +StatusCode CaloTowerBuilderTool::rebuildLookup() +{ + if (towerSeg().neta() != 0 && towerSeg().nphi() != 0) { + if (m_cellStore.buildLookUp(towerSeg(), m_caloIndices)) { + return StatusCode::SUCCESS; + } + } + return StatusCode::FAILURE; +} + + /** * @brief Mark that cached data are invalid. * * Called when calibrations are updated. */ -void CaloTowerBuilderTool::invalidateCache() +StatusCode CaloTowerBuilderTool::invalidateCache() { - m_cacheValid = false; + // FIXME: We don't currently handle changing alignments during a run. + // This could be done if caloDD is updated to the new alignment + // scheme. Otherwise, it's incompatible with MT. + if (m_cellStore.size() > 0) { + ATH_MSG_ERROR("Cell store already filled. FIXME: changing alignments is not handled."); + return StatusCode::FAILURE; + } + + ATH_CHECK( rebuildLookup() ); + return StatusCode::SUCCESS; } diff --git a/Calorimeter/CaloUtils/src/CaloTowerBuilderToolBase.cxx b/Calorimeter/CaloUtils/src/CaloTowerBuilderToolBase.cxx index c2857504cc0c..1e7b9d7d973a 100644 --- a/Calorimeter/CaloUtils/src/CaloTowerBuilderToolBase.cxx +++ b/Calorimeter/CaloUtils/src/CaloTowerBuilderToolBase.cxx @@ -89,7 +89,7 @@ void CaloTowerBuilderToolBase::setTowerSeg(const CaloTowerSeg& theTowerSeg) { StatusCode CaloTowerBuilderToolBase::LoadCalibration(IOVSVC_CALLBACK_ARGS){ ATH_MSG_DEBUG(" in CaloTowerBuilderToolBase::LoadCalibration "); - invalidateCache(); + ATH_CHECK( invalidateCache() ); return StatusCode::SUCCESS; } diff --git a/Calorimeter/CaloUtils/src/CaloTowerStore.cxx b/Calorimeter/CaloUtils/src/CaloTowerStore.cxx index 1b592ee763ad..c33c096f952c 100644 --- a/Calorimeter/CaloUtils/src/CaloTowerStore.cxx +++ b/Calorimeter/CaloUtils/src/CaloTowerStore.cxx @@ -77,6 +77,11 @@ bool CaloTowerStore::buildLookUp(const CaloTowerSeg& theTowerSeg, std::vector<CaloCell_ID::SUBCALO> theCalos) { m_seg = theTowerSeg; + m_entries.clear(); + m_towers.clear(); + m_weights.clear(); + m_entry_index.store (std::vector<unsigned short>()); + m_entry_index.reset(); /////////////////////// // Store Preparation // @@ -272,16 +277,19 @@ bool CaloTowerStore::buildLookUp(const CaloTowerSeg& theTowerSeg, */ void CaloTowerStore::checkEntryIndex() const { - if (!m_entry_index.empty()) return; - size_t sz = m_towers.size(); - m_entry_index.resize (sz); - size_t ndx = 0; - for (size_t i = 0; i < sz; i++) { - m_entry_index[i] = ndx; - if (!m_towers[i].backref_next) - ndx += m_towers[i].nentries; + if (!m_entry_index.isValid()) { + std::vector<unsigned short> entries; + size_t sz = m_towers.size(); + entries.resize (sz); + size_t ndx = 0; + for (size_t i = 0; i < sz; i++) { + entries[i] = ndx; + if (!m_towers[i].backref_next) + ndx += m_towers[i].nentries; + } + assert (ndx < std::numeric_limits<unsigned short>::max()); + m_entry_index.set (std::move (entries)); } - assert (ndx < std::numeric_limits<unsigned short>::max()); } diff --git a/LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.cxx b/LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.cxx index 3461366ace55..c8d784d7016c 100755 --- a/LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.cxx +++ b/LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.cxx @@ -30,7 +30,6 @@ LArFCalTowerBuilderTool::LArFCalTowerBuilderTool(const std::string& name, const IInterface* parent) : CaloTowerBuilderToolBase(name,type,parent) , m_minEt(0.) - , m_cacheValid(false) { // Et cut for minicells declareProperty("MinimumEt",m_minEt); @@ -61,7 +60,7 @@ inline void LArFCalTowerBuilderTool::addTower (const tower_iterator& t, const CaloCellContainer* cells, - CaloTower* tower) + CaloTower* tower) const { LArFCalTowerStore::cell_iterator firstC = m_cellStore.firstCellofTower(t); LArFCalTowerStore::cell_iterator lastC = m_cellStore.lastCellofTower(t); @@ -89,7 +88,7 @@ LArFCalTowerBuilderTool::addTower (const tower_iterator& t, inline void LArFCalTowerBuilderTool::iterateFull (CaloTowerContainer* towers, - const CaloCellContainer* cells) + const CaloCellContainer* cells) const { size_t sz = towers->size(); assert(m_cellStore.size() == sz); @@ -106,7 +105,7 @@ inline void LArFCalTowerBuilderTool::iterateSubSeg (CaloTowerContainer* towers, const CaloCellContainer* cells, - const CaloTowerSeg::SubSeg* subseg) + const CaloTowerSeg::SubSeg* subseg) const { size_t sz = towers->size(); assert(subseg->size() == sz); @@ -126,22 +125,12 @@ LArFCalTowerBuilderTool::iterateSubSeg (CaloTowerContainer* towers, StatusCode LArFCalTowerBuilderTool::execute(CaloTowerContainer* theTowers, const CaloCellContainer* theCells, - const CaloTowerSeg::SubSeg* subseg) + const CaloTowerSeg::SubSeg* subseg) const { - /////////////////////////// - // Create Cell Fragments // - /////////////////////////// - - // only once if not done alread in begin run (for converter usage) - if (!m_cacheValid ) - { - ATH_MSG_DEBUG( " m_cacheValid false, initializing Fcal lookup in first event " ); - if ( ! m_cellStore.buildLookUp(theTowers) ){ - ATH_MSG_ERROR( "cannot construct cell fragment lookup, fatal!" ); - return StatusCode::FAILURE; - } - m_cacheValid=true; - } + if (m_cellStore.size() == 0) { + ATH_MSG_ERROR("Cell store not initialized."); + return StatusCode::FAILURE; + } // retrieve cells if (!theCells) { @@ -173,23 +162,41 @@ LArFCalTowerBuilderTool::execute(CaloTowerContainer* theTowers, return StatusCode::SUCCESS; } + +/** + * @brief Run tower building and add results to the tower container. + * @param theContainer The tower container to fill. + * + * If the segmentation hasn't been set, take it from the tower container. + * This is for use by converters. + */ +StatusCode LArFCalTowerBuilderTool::execute (CaloTowerContainer* theContainer) +{ + if (m_cellStore.size() == 0) { + setTowerSeg (theContainer->towerseg()); + ATH_CHECK( rebuildLookup() ); + } + + return execute (theContainer, nullptr, nullptr); +} + + void LArFCalTowerBuilderTool::handle(const Incident&) { ATH_MSG_DEBUG( "In Incident-handle" ); - if (m_cacheValid) { - ATH_MSG_DEBUG( "Cached data already computed." ); - return; - } - CaloTowerContainer theTowers (towerSeg()); +} - if ( ! m_cellStore.buildLookUp(&theTowers) ){ - ATH_MSG_ERROR( "cannot construct cell fragment lookup, fatal!" ); - m_cacheValid=false; - } - else { - m_cacheValid=true; + +/** + * @brief Rebuild the cell lookup table. + */ +StatusCode LArFCalTowerBuilderTool::rebuildLookup() +{ + CaloTowerContainer theTowers (towerSeg()); + if ( m_cellStore.buildLookUp(&theTowers) ) { + return StatusCode::SUCCESS; } - ATH_MSG_DEBUG( " built Fcal tower lookup " << m_cacheValid ); + return StatusCode::FAILURE; } @@ -198,8 +205,17 @@ void LArFCalTowerBuilderTool::handle(const Incident&) * * Called when calibrations are updated. */ -void LArFCalTowerBuilderTool::invalidateCache() +StatusCode LArFCalTowerBuilderTool::invalidateCache() { - m_cacheValid = false; + // FIXME: We don't currently handle changing alignments during a run. + // This could be done if caloDD is updated to the new alignment + // scheme. Otherwise, it's incompatible with MT. + if (m_cellStore.size() > 0) { + ATH_MSG_ERROR("Cell store already filled. FIXME: changing alignments is not handled."); + return StatusCode::FAILURE; + } + + ATH_CHECK( rebuildLookup() ); + return StatusCode::SUCCESS; } diff --git a/LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.h b/LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.h index f5de4e04060c..5e0651f55866 100755 --- a/LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.h +++ b/LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.h @@ -48,7 +48,19 @@ class LArFCalTowerBuilderTool : public CaloTowerBuilderToolBase virtual StatusCode execute(CaloTowerContainer* theContainer, const CaloCellContainer* theCell=0, - const CaloTowerSeg::SubSeg* subseg = 0) override; + const CaloTowerSeg::SubSeg* subseg = 0) const override; + + + /** + * @brief Run tower building and add results to the tower container. + * @param theContainer The tower container to fill. + * + * If the segmentation hasn't been set, take it from the tower container. + * This is for use by converters. + */ + virtual StatusCode execute (CaloTowerContainer* theContainer) override; + + virtual void handle(const Incident&) override; private: @@ -61,21 +73,26 @@ private: void addTower (const tower_iterator& t, const CaloCellContainer* cells, - CaloTower* tower); + CaloTower* tower) const; void iterateFull (CaloTowerContainer* towers, - const CaloCellContainer* cells); + const CaloCellContainer* cells) const; void iterateSubSeg (CaloTowerContainer* towers, const CaloCellContainer* cells, - const CaloTowerSeg::SubSeg* subseg); + const CaloTowerSeg::SubSeg* subseg) const; + + + /** + * @brief Rebuild the cell lookup table. + */ + StatusCode rebuildLookup(); + /** * @brief Mark that cached data are invalid. * * Called when calibrations are updated. */ - virtual void invalidateCache() override; - - bool m_cacheValid; + virtual StatusCode invalidateCache() override; // FCal only static CaloCell_ID::SUBCALO m_caloIndex; -- GitLab From b3f0e4ed52dadaead22534260416b02ae2614189 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Fri, 8 Jun 2018 13:14:29 +0000 Subject: [PATCH 087/562] 22.0 coverity FastSiDigitization Former-commit-id: 8e78e8ba46948d26088f5f388bde6a59a2708e57 --- .../PixelFastDigitizationTool.h | 46 ++++------- .../SiSmearedDigitizationTool.h | 16 ++-- .../src/PixelFastDigitizationTool.cxx | 57 ++++---------- .../src/SiSmearedDigitizationTool.cxx | 76 +++++++++++++------ 4 files changed, 90 insertions(+), 105 deletions(-) diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/PixelFastDigitizationTool.h b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/PixelFastDigitizationTool.h index 473663a49f8f..0d1e95c02857 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/PixelFastDigitizationTool.h +++ b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/PixelFastDigitizationTool.h @@ -6,7 +6,6 @@ // PixelFastDigitizationTool.h // Header file for class PixelFastDigitizationTool /////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software /////////////////////////////////////////////////////////////////// // Top algorithm class for Pixel fast digitization /////////////////////////////////////////////////////////////////// @@ -15,52 +14,37 @@ #define FASTSIDIGITIZATION_PIXELFASTDIGITIZATIONTOOL_H #include "PileUpTools/PileUpToolBase.h" - -#include "GaudiKernel/ToolHandle.h" -#include "GaudiKernel/ServiceHandle.h" -#include "GaudiKernel/AlgTool.h" -//#include "InDetConditionsSummaryService/IInDetConditionsSvc.h" -#include "SiPropertiesSvc/ISiPropertiesSvc.h" -#include "PixelConditionsTools/IModuleDistortionsTool.h" -#include "AthenaKernel/IAtRndmGenSvc.h" -#include "xAODEventInfo/EventInfo.h" -#include "xAODEventInfo/EventAuxInfo.h" -#include "InDetSimData/InDetSimDataCollection.h" #include "FastSiDigitization/IPixelFastDigitizationTool.h" -#include "InDetReadoutGeometry/PixelDetectorManager.h" -#include <string> - #include "HitManagement/TimedHitCollection.h" #include "InDetSimEvent/SiHit.h" -#include "InDetSimEvent/SiHitCollection.h" - -#include "SiClusterizationTool/IPixelClusteringTool.h" -#include "SiClusterizationTool/PixelClusteringToolBase.h" -#include "SiClusterizationTool/ClusterMakerTool.h" +#include "InDetSimEvent/SiHitCollection.h" // cannot fwd declare +#include "InDetPrepRawData/PixelClusterContainer.h" //typedef, cannot fwd declare +#include "InDetPrepRawData/PixelGangedClusterAmbiguities.h" //typedef, cannot fwd declare -#include "InDetPrepRawData/PixelClusterContainer.h" - -#include "TrkTruthData/PRD_MultiTruthCollection.h" - -#include "SiClusterizationTool/PixelGangedAmbiguitiesFinder.h" -#include "InDetPrepRawData/PixelGangedClusterAmbiguities.h" +#include "GaudiKernel/ToolHandle.h" +#include "GaudiKernel/ServiceHandle.h" +#include <string> +#include <vector> +#include <list> +#include <map> class PixelID; class IModuleDistortionsTool; -//class IInDetConditionsSvc; +class PRD_MultiTruthCollection; +class IAtRndmGenSvc; -namespace InDetDD{class SiDetectorElement;} +namespace InDetDD{ + class SiDetectorElement; + class PixelDetectorManager; +} namespace CLHEP {class HepRandomEngine;} namespace InDet { - class MergedPixelsTool; class ClusterMakerTool; class PixelCluster; - class IPixelClusteringTool; class PixelGangedAmbiguitiesFinder; - class PrepRawData; } class PixelFastDigitizationTool : diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SiSmearedDigitizationTool.h b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SiSmearedDigitizationTool.h index a8acb6aa6efe..8dd8d90ff503 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SiSmearedDigitizationTool.h +++ b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SiSmearedDigitizationTool.h @@ -152,32 +152,32 @@ public: ServiceHandle<PileUpMergeSvc> m_mergeSvc; /**< PileUp Merge service */ - PRD_MultiTruthCollection* m_pixelPrdTruth; + PRD_MultiTruthCollection* m_pixelPrdTruth{}; std::string m_prdTruthNamePixel; - PRD_MultiTruthCollection* m_SCTPrdTruth; + PRD_MultiTruthCollection* m_SCTPrdTruth{}; std::string m_prdTruthNameSCT; - PRD_MultiTruthCollection* m_planarPrdTruth; + PRD_MultiTruthCollection* m_planarPrdTruth{}; std::string m_prdTruthNamePlanar; - SiHitCollection* m_simHitColl; + SiHitCollection* m_simHitColl{}; std::string m_inputObjectName; //! name of the sub event hit collections. std::vector<std::pair<unsigned int, int> > m_seen; std::list<SiHitCollection*> m_siHitCollList; - Pixel_detElement_RIO_map* m_pixelClusterMap; + Pixel_detElement_RIO_map* m_pixelClusterMap{}; - Planar_detElement_RIO_map* m_planarClusterMap; + Planar_detElement_RIO_map* m_planarClusterMap{}; - SCT_detElement_RIO_map* m_sctClusterMap; + SCT_detElement_RIO_map* m_sctClusterMap{}; bool m_SmearPixel; bool m_emulateAtlas; - iFatras::IdHashDetElementCollection* m_detElementMap; + iFatras::IdHashDetElementCollection* m_detElementMap{}; std::string m_detElementMapName; std::string m_pixel_SiClustersName; diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx index 393f2f7cf185..38be93716dc9 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx +++ b/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx @@ -6,14 +6,12 @@ // PixelFastDigitizationTool.cxx // Implementation file for class PixelFastDigitizationTool //////////////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software // Pixel digitization includes #include "FastSiDigitization/PixelFastDigitizationTool.h" // Det Descr #include "Identifier/Identifier.h" -//#include "InDetConditionsSummaryService/IInDetConditionsSvc.h" #include "InDetReadoutGeometry/SiReadoutCellId.h" #include "InDetReadoutGeometry/SiDetectorDesign.h" @@ -35,17 +33,19 @@ #include "InDetReadoutGeometry/SiDetectorDesign.h" #include "InDetReadoutGeometry/PixelModuleDesign.h" - +#include "InDetReadoutGeometry/PixelDetectorManager.h" // Fatras #include "InDetPrepRawData/PixelCluster.h" #include "SiClusterizationTool/ClusterMakerTool.h" #include "TrkExUtils/LineIntersection2D.h" #include "InDetPrepRawData/SiWidth.h" -#include "InDetSimEvent/SiHitCollection.h" #include "SiClusterizationTool/IPixelClusteringTool.h" #include "SiClusterizationTool/PixelGangedAmbiguitiesFinder.h" +#include "PixelConditionsTools/IModuleDistortionsTool.h" #include "InDetPrepRawData/PixelGangedClusterAmbiguities.h" #include "InDetPrepRawData/SiClusterContainer.h" +#include "TrkTruthData/PRD_MultiTruthCollection.h" +#include "AthenaKernel/IAtRndmGenSvc.h" #include "GeneratorObjects/HepMcParticleLink.h" #include "HepMC/GenParticle.h" @@ -1275,40 +1275,20 @@ bool PixelFastDigitizationTool::areNeighbours InDetDD::SiDetectorElement* /*element*/, const PixelID& pixelID) const { - - int splitClusters = 0; - int acceptDiagonalClusters = 1; - + // note: in the PixelClusteringToolBase, m_splitClusters is a variable; here + // splitClusters was explicitly set to zero, acceptDiagonalClusters = 1 + // so much of the original code is redundant and only one path through the code + // is possible. + std::vector<Identifier>::const_iterator groupBegin = group.begin(); std::vector<Identifier>::const_iterator groupEnd = group.end(); - //Identifier elementID = element->identify(); int row2 = pixelID.phi_index(rdoID); int col2 = pixelID.eta_index(rdoID); - int maxZsize=999; - if(splitClusters == 1){ - int etamodule = pixelID.eta_module(rdoID); - int isBarrel = pixelID.barrel_ec(rdoID); - if(isBarrel == 0){ - // this goes from 0 (central stave) to 6 - int dz = abs(etamodule-6); - if(dz<4){ maxZsize=2; } - else{ maxZsize=3; } - } - else{ - maxZsize = 2; - } - if(maxZsize > 3){ - ATH_MSG_WARNING (" areNeighbours - problems "); - } - } - if(splitClusters == 2) maxZsize = 2; + - int rowmin = row2; int rowmax = row2; - int colmin = col2; - int colmax = col2; bool match=false; while (groupBegin!=groupEnd) { @@ -1321,23 +1301,12 @@ bool PixelFastDigitizationTool::areNeighbours // a side in common if(deltacol+deltarow < 2) match = true; - if(acceptDiagonalClusters != 0 && deltacol == 1 - && deltarow == 1) match = true; - - // check cluster size - if(splitClusters != 0){ - if(row1 > rowmax) rowmax = row1; - if(row1 < rowmin) rowmin = row1; - if(col1 > colmax) colmax = row1; - if(col1 < colmin) colmin = row1; - } + //condition "if (acceptDiagonalClusters !=0") is redundant + if(deltacol == 1 && deltarow == 1) match = true; ++groupBegin; } - if(match && splitClusters != 0){ - if(colmax-colmin > maxZsize-1) match = false; - if(rowmax-rowmin > 1) match = false; - } + return match; } diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx index 40fac1228084..ba6041d5ee3f 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx +++ b/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx @@ -1008,6 +1008,12 @@ StatusCode SiSmearedDigitizationTool::digitize() const iFatras::PlanarDetElement* hitPlanarDetElement_temp = it_map->second; ATH_MSG_DEBUG("Pixel PlanarDetElement --> barrel_ec " << barrelEC << ", layer_disk " << layerDisk << ", phi_module " << phiModule << ", eta_module " << etaModule ); hitPlanarDetElement = hitPlanarDetElement_temp; + // if hitPlanarDetElement is nullptr at this point, we will all go to hell, + // so we might as well throw an exception first + if (not hitPlanarDetElement){ + ATH_MSG_FATAL("hitPlanarDetElement is null in SiSmearedDigitizationTool:"<<__LINE__); + throw std::runtime_error(std::string("hitPlanarDetElement is null in SiSmearedDigitizationTool::digitize() ")); + } ATH_MSG_DEBUG("Surface " << hitPlanarDetElement->surface()); } } @@ -1028,6 +1034,12 @@ StatusCode SiSmearedDigitizationTool::digitize() const iFatras::PlanarDetElement* hitPlanarDetElement_temp = it_map->second; ATH_MSG_DEBUG("SCT PlanarDetElement --> barrel_ec " << barrelEC << ", layer_disk " << layerDisk << ", phi_module " << phiModule << ", eta_module " << etaModule << ", side " << side); hitPlanarDetElement = hitPlanarDetElement_temp; + // if hitPlanarDetElement is nullptr at this point, we will all go to hell, + // so we might as well throw an exception first + if (not hitPlanarDetElement){ + ATH_MSG_FATAL("hitPlanarDetElement is null in SiSmearedDigitizationTool:"<<__LINE__); + throw std::runtime_error(std::string("hitPlanarDetElement is null in SiSmearedDigitizationTool::digitize() ")); + } ATH_MSG_DEBUG("Surface " << hitPlanarDetElement->surface()); } } @@ -1045,7 +1057,25 @@ StatusCode SiSmearedDigitizationTool::digitize() ATH_MSG_ERROR( " could not get detector element for PlanarDetElement"); continue; } - + // untangling the logic: if not using custom geometry, hitSiDetElement + // gets dereferenced (and should be checked) + // + // if using custom geometry, hitPlanarDetElement gets dereferenced + // (and should be checked) + if (m_useCustomGeometry){ + if (not hitPlanarDetElement){ + ATH_MSG_FATAL("hitPlanarDetElement is null in SiSmearedDigitizationTool:"<<__LINE__); + throw std::runtime_error(std::string("hitPlanarDetElement is null in SiSmearedDigitizationTool::digitize() ")); + } + + } else { + if (not hitSiDetElement){ + ATH_MSG_FATAL("hitSiDetElement is null in SiSmearedDigitizationTool:"<<__LINE__); + throw std::runtime_error(std::string("hitSiDetElement is null in SiSmearedDigitizationTool::digitize() ")); + + } + } + if (m_SmearPixel && !m_useCustomGeometry && !(hitSiDetElement->isPixel())) continue; if (m_SmearPixel && m_useCustomGeometry && !(hitPlanarDetElement->isPixel())) continue; @@ -1301,7 +1331,7 @@ StatusCode SiSmearedDigitizationTool::digitize() do { sParX = CLHEP::RandGauss::shoot(m_randomEngine, 0., sigmaX); ATH_MSG_DEBUG( "--- SiSmearedDigitizationTool: extracted gaussian value for X --- " << sParX); - } while (fabs(interX+sParX)>(hitPlanarDetElement->lengthXmin()/2.)); + } while (std::fabs(interX+sParX)>(hitPlanarDetElement->lengthXmin()/2.)); interX += sParX; } if (sigmaY != 0.) { @@ -1309,7 +1339,7 @@ StatusCode SiSmearedDigitizationTool::digitize() do { sParY = CLHEP::RandGauss::shoot(m_randomEngine, 0., sigmaY); ATH_MSG_DEBUG( "--- SiSmearedDigitizationTool: extracted gaussian value for Y --- " << sParY); - } while (fabs(interY+sParY)>(hitPlanarDetElement->lengthY()/2.)); + } while (std::fabs(interY+sParY)>(hitPlanarDetElement->lengthY()/2.)); interY += sParY; } } @@ -1358,7 +1388,7 @@ StatusCode SiSmearedDigitizationTool::digitize() if (m_pitch_X == 0. || m_pitch_Y == 0.) ATH_MSG_WARNING( "--- SiSmearedDigitizationTool: pitchX and/or pitchY are 0. Cluster length is forced to be 1. mm"); - InDet::SiWidth* siWidth = new InDet::SiWidth(Amg::Vector2D(elementX,elementY), Amg::Vector2D(lengthX, lengthY)); + InDet::SiWidth siWidth(Amg::Vector2D(elementX,elementY), Amg::Vector2D(lengthX, lengthY)); InDet::PixelCluster* pixelCluster = 0; iFatras::PlanarCluster* planarCluster = 0; @@ -1374,7 +1404,7 @@ StatusCode SiSmearedDigitizationTool::digitize() pixelCluster = new InDet::PixelCluster(intersectionId, intersection, rdoList, - *siWidth, + siWidth, hitSiDetElement, clusterErr); m_pixelClusterMap->insert(std::pair<IdentifierHash, const InDet::PixelCluster* >(waferID, pixelCluster)); @@ -1388,7 +1418,7 @@ StatusCode SiSmearedDigitizationTool::digitize() planarCluster = new iFatras::PlanarCluster(intersectionId, intersection, rdoList, - *siWidth, + siWidth, hitPlanarDetElement, clusterErr); @@ -1466,10 +1496,10 @@ StatusCode SiSmearedDigitizationTool::digitize() const std::pair<InDetDD::SiLocalPosition, InDetDD::SiLocalPosition> ends(design_sct->endsOfStrip(intersection)); double stripLength = fabs(ends.first.xEta()-ends.second.xEta()); - InDet::SiWidth* siWidth = new InDet::SiWidth(Amg::Vector2D(int(rdoList.size()),1), + InDet::SiWidth siWidth(Amg::Vector2D(int(rdoList.size()),1), Amg::Vector2D(clusterWidth,stripLength) ); - const Amg::Vector2D& colRow = siWidth->colRow(); + const Amg::Vector2D& colRow = siWidth.colRow(); AmgSymMatrix(2) mat; mat.setIdentity(); @@ -1483,16 +1513,16 @@ StatusCode SiSmearedDigitizationTool::digitize() if(m_emulateAtlas && elShape == InDetDD::Trapezoid){// rotation for endcap SCT if(colRow.x() == 1){ - mat(Trk::locX,Trk::locX) = pow(siWidth->phiR(),2)/12; + mat(Trk::locX,Trk::locX) = pow(siWidth.phiR(),2)/12; } else if(colRow.x() == 2){ - mat(Trk::locX,Trk::locX) = pow(0.27*siWidth->phiR(),2)/12; + mat(Trk::locX,Trk::locX) = pow(0.27*siWidth.phiR(),2)/12; } else{ - mat(Trk::locX,Trk::locX) = pow(siWidth->phiR(),2)/12; + mat(Trk::locX,Trk::locX) = pow(siWidth.phiR(),2)/12; } - mat(Trk::locY,Trk::locY) = pow(siWidth->z()/colRow.y(),2)/12; + mat(Trk::locY,Trk::locY) = pow(siWidth.z()/colRow.y(),2)/12; double sn = hitSiDetElement->sinStereoLocal(intersection); double sn2 = sn*sn; double cs2 = 1.-sn2; @@ -1509,7 +1539,7 @@ StatusCode SiSmearedDigitizationTool::digitize() sctCluster = new InDet::SCT_Cluster(intersectionId, intersection, rdoList, - *siWidth, + siWidth, hitSiDetElement, clusterErr); @@ -1525,9 +1555,11 @@ StatusCode SiSmearedDigitizationTool::digitize() double clusterWidth = rdoList.size()*hitPlanarDetElement->phiPitch(intersection); double stripLength = hitPlanarDetElement->stripLength(intersection); - InDet::SiWidth* siWidth = new InDet::SiWidth(Amg::Vector2D(int(rdoList.size()),1), - Amg::Vector2D(clusterWidth,stripLength) ); - + //InDet::SiWidth* siWidth = new InDet::SiWidth(Amg::Vector2D(int(rdoList.size()),1), + // Amg::Vector2D(clusterWidth,stripLength) ); + + InDet::SiWidth siWidth(Amg::Vector2D(int(rdoList.size()),1), Amg::Vector2D(clusterWidth,stripLength) ); + AmgSymMatrix(2) mat; mat.setIdentity(); if(m_useDiscSurface) { @@ -1540,19 +1572,19 @@ StatusCode SiSmearedDigitizationTool::digitize() InDetDD::DetectorShape elShape = hitPlanarDetElement->shape(); if(m_emulateAtlas && elShape == InDetDD::Trapezoid){// rotation for endcap SCT - const Amg::Vector2D& colRow = siWidth->colRow(); + const Amg::Vector2D& colRow = siWidth.colRow(); if(colRow.x() == 1){ - mat(Trk::locX,Trk::locX) = pow(siWidth->phiR(),2)/12; + mat(Trk::locX,Trk::locX) = pow(siWidth.phiR(),2)/12; } else if(colRow.x() == 2){ - mat(Trk::locX,Trk::locX) = pow(0.27*siWidth->phiR(),2)/12; + mat(Trk::locX,Trk::locX) = pow(0.27*siWidth.phiR(),2)/12; } else{ - mat(Trk::locX,Trk::locX) = pow(siWidth->phiR(),2)/12; + mat(Trk::locX,Trk::locX) = pow(siWidth.phiR(),2)/12; } - mat(Trk::locY,Trk::locY) = pow(siWidth->z()/colRow.y(),2)/12; + mat(Trk::locY,Trk::locY) = pow(siWidth.z()/colRow.y(),2)/12; double sn = hitPlanarDetElement->sinStereoLocal(intersection); double sn2 = sn*sn; double cs2 = 1.-sn2; @@ -1571,7 +1603,7 @@ StatusCode SiSmearedDigitizationTool::digitize() planarCluster = new iFatras::PlanarCluster(intersectionId, intersection, rdoList, - *siWidth, + siWidth, hitPlanarDetElement, clusterErr); -- GitLab From d1d5446d54193a4ea2c00e4e5bce8801875b61ae Mon Sep 17 00:00:00 2001 From: Alexander Solodkov <Sanya.Solodkov@cern.ch> Date: Fri, 8 Jun 2018 15:19:17 +0200 Subject: [PATCH 088/562] fix for rel 22 Former-commit-id: be7278c5fafd4f65b11ea3dc485d7dcac8354ff1 --- .../TileConditions/share/TileConditions_jobOptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TileCalorimeter/TileConditions/share/TileConditions_jobOptions.py b/TileCalorimeter/TileConditions/share/TileConditions_jobOptions.py index cccb975e0906..2afaeed81dfa 100644 --- a/TileCalorimeter/TileConditions/share/TileConditions_jobOptions.py +++ b/TileCalorimeter/TileConditions/share/TileConditions_jobOptions.py @@ -42,7 +42,7 @@ if (not 'TileCablingType' in dir()): except: msg.info("No Run Number available - assume latest cabling") - from AtlasGeoModel.InDetGMJobProperties import GeometryFlags as geoFlags + from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags as geoFlags if geoFlags.Run()=="RUN1": if rn>219651: # choose RUN2 cabling for old geometry tags starting from 26-MAR-2013 TileCablingType = 4 -- GitLab From 41521a7970c79351d3b7683f4697f9acd0abc1c6 Mon Sep 17 00:00:00 2001 From: Francesca Pastore <francesca.pastore@cern.ch> Date: Fri, 8 Jun 2018 16:52:33 +0200 Subject: [PATCH 089/562] removed old code and corrected licence Former-commit-id: d735c5798d6146c5c575c9c6c30d8682552581bf --- .../python/testTrigMuonHypoConfig.py | 2 +- .../TrigUpgradeTest/python/MenuComponents.py | 6 ----- .../TrigUpgradeTest/python/egammaMenuDefs.py | 8 +------ .../TrigUpgradeTest/python/muMenuDefs.py | 2 +- .../TrigUpgradeTest/share/mu.menu.py | 24 +------------------ 5 files changed, 4 insertions(+), 38 deletions(-) diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/python/testTrigMuonHypoConfig.py b/Trigger/TrigHypothesis/TrigMuonHypo/python/testTrigMuonHypoConfig.py index fce942b8da68..4b2f376f583d 100755 --- a/Trigger/TrigHypothesis/TrigMuonHypo/python/testTrigMuonHypoConfig.py +++ b/Trigger/TrigHypothesis/TrigMuonHypo/python/testTrigMuonHypoConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration from TrigMuonHypo.TrigMuonHypoConf import * from TrigMuonHypo.TrigMuonHypoMonitoring import * diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/MenuComponents.py b/Trigger/TrigValidation/TrigUpgradeTest/python/MenuComponents.py index 6084e5363c76..817121fd164b 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/MenuComponents.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/MenuComponents.py @@ -298,10 +298,6 @@ class HLTRecoSequence(): def addInput(self,theinput): print "adding input to sequence: %s to %s"%(theinput, self.maker.algname ) self.maker.addInput(theinput) - - # def addOutputDecision(self,theinput): - # print "adding output decisions (%s) to sequence %s (output of alg %s)"%(theinput, self.name, self.maker.algname ) - # self.maker.addOutput(theinput) def __str__(self): return "HLTRecoSequence::%s with \n Seed::%s \n Maker::%s \n Sequence::%s"%(self.name, self.seed, self.maker, self.sequence) @@ -331,8 +327,6 @@ class MenuSequence(): new_output = "%s_%s"%(self.recoSeqList[0].seed, self.hypo.getOutput()) self.hypo.setOutput(new_output) self.outputs.append(new_output) - - def __str__(self): return "MenuSequence::%s \n Hypo::%s \n %s"%(self.name, self.hypo, ',\n '.join(map(str, self.recoSeqList))) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/egammaMenuDefs.py b/Trigger/TrigValidation/TrigUpgradeTest/python/egammaMenuDefs.py index 683b51b77593..75b5a26f4172 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/egammaMenuDefs.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/egammaMenuDefs.py @@ -1,13 +1,7 @@ # -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # -#include("TrigUpgradeTest/testHLT_MT.py") -## # provide a minimal menu information -## if globalflags.InputFormat.is_bytestream(): -## topSequence.L1DecoderTest.ctpUnpacker.OutputLevel=DEBUG -## topSequence.L1DecoderTest.roiUnpackers[0].OutputLevel=DEBUG - from AthenaCommon.Include import include from AthenaCommon.Constants import VERBOSE,DEBUG from AthenaCommon.AppMgr import ServiceMgr as svcMgr diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py b/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py index b1be97b846d7..e42bb300df71 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py @@ -1,5 +1,5 @@ # -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # OutputLevel: INFO < DEBUG < VERBOSE # diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py index 21d8fdde74be..a4309746227e 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py @@ -1,33 +1,11 @@ # -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # OutputLevel: INFO < DEBUG < VERBOSE # include("TrigUpgradeTest/testHLT_MT.py") -## ### workaround to prevent online trigger folders to be enabled ### -## from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags -## InDetTrigFlags.useConditionsClasses.set_Value_and_Lock(False) - -## from InDetRecExample.InDetJobProperties import InDetFlags -## InDetFlags.doCaloSeededBrem = False - -## from InDetRecExample.InDetJobProperties import InDetFlags -## InDetFlags.InDet25nsec = True -## InDetFlags.doPrimaryVertex3DFinding = False -## InDetFlags.doPrintConfigurables = False -## InDetFlags.doResolveBackTracks = True -## InDetFlags.doSiSPSeededTrackFinder = True -## InDetFlags.doTRTPhaseCalculation = True -## InDetFlags.doTRTSeededTrackFinder = True -## InDetFlags.doTruth = False -## InDetFlags.init() - -## ### PixelLorentzAngleSvc and SCTLorentzAngleSvc ### -## include("InDetRecExample/InDetRecConditionsAccess.py") - -## from InDetRecExample.InDetKeys import InDetKeys from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() -- GitLab From c2826368a2d81b067a8318fbe86f1f78ccc646de Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Fri, 8 Jun 2018 14:33:24 +0200 Subject: [PATCH 090/562] AthenaPoolCnvSvc: Fix gcc8 warning. gcc8 warning: polymorphic exception classes should be caught by reference, not by value. Former-commit-id: c7f321e8942a645984ef9a88036ff55c499945b8 --- Database/AthenaPOOL/AthenaPoolCnvSvc/src/AuxDiscoverySvc.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AuxDiscoverySvc.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AuxDiscoverySvc.cxx index 92d09b0a4331..0ca154f4d424 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AuxDiscoverySvc.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AuxDiscoverySvc.cxx @@ -99,7 +99,7 @@ SG::auxid_t AuxDiscoverySvc::getAuxID(const std::string& attrName, const std::st return SG::null_auxid; } auxid = SG::getDynamicAuxID(*eti, attrName, elemName, typeName, m_storeInt->standalone()); - } catch (std::runtime_error) { + } catch (const std::runtime_error&) { return SG::null_auxid; } } -- GitLab From 2f4cdefe487674a8ddacf968aaa1d72c261b0f32 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Fri, 8 Jun 2018 14:52:15 +0200 Subject: [PATCH 091/562] AthenaDBTestRec: Fix clang warning. clang warning: unused private data member. Former-commit-id: c32dea0d0cec429aa5f86939fdc54165ae78ba09 --- AtlasTest/DatabaseTest/AthenaDBTestRec/src/FolderInfo.h | 1 - AtlasTest/DatabaseTest/AthenaDBTestRec/src/app/FolderInfo.cxx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/AtlasTest/DatabaseTest/AthenaDBTestRec/src/FolderInfo.h b/AtlasTest/DatabaseTest/AthenaDBTestRec/src/FolderInfo.h index 4df38013b749..9863ccc9e289 100644 --- a/AtlasTest/DatabaseTest/AthenaDBTestRec/src/FolderInfo.h +++ b/AtlasTest/DatabaseTest/AthenaDBTestRec/src/FolderInfo.h @@ -70,7 +70,6 @@ class FolderInfo { int m_size; int m_period; std::vector<int> m_noisychan; - float m_noisyperiod; std::string m_tag; bool m_paytable; diff --git a/AtlasTest/DatabaseTest/AthenaDBTestRec/src/app/FolderInfo.cxx b/AtlasTest/DatabaseTest/AthenaDBTestRec/src/app/FolderInfo.cxx index 06b76fc12dbc..07dc98fae509 100644 --- a/AtlasTest/DatabaseTest/AthenaDBTestRec/src/app/FolderInfo.cxx +++ b/AtlasTest/DatabaseTest/AthenaDBTestRec/src/app/FolderInfo.cxx @@ -22,7 +22,7 @@ FolderInfo::FolderInfo(const std::string name, m_name(name), m_dbconn(dbconn), m_ndbconn(ndbconn), m_nchan(nchan), m_ptime(ptime), m_ptype(ptype), m_ncol(ncol), m_size(size), m_period(period), m_noisychan(), - m_noisyperiod(0.1), m_tag(tag), m_paytable(payloadTable), m_poolplace(0) { + m_tag(tag), m_paytable(payloadTable), m_poolplace(0) { // construct tag if (m_ptime==RUNC || m_ptime==RUNP) { // construct tag from foldername - removing / and adding explicit -<tag> -- GitLab From 40bf99df9a734d8498a2814f2774728e015da52e Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Fri, 8 Jun 2018 14:53:52 +0200 Subject: [PATCH 092/562] JetRec: cmake fixes. Remove stray `. Fix reference to gtest. Former-commit-id: 71e7eb02ff4e19f6759c80c57e70fb0686e89f9e --- Reconstruction/Jet/JetRec/CMakeLists.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Reconstruction/Jet/JetRec/CMakeLists.txt b/Reconstruction/Jet/JetRec/CMakeLists.txt index bd99f3009031..d88f1eb25076 100644 --- a/Reconstruction/Jet/JetRec/CMakeLists.txt +++ b/Reconstruction/Jet/JetRec/CMakeLists.txt @@ -36,6 +36,7 @@ find_package( FastJet COMPONENTS fastjetplugins fastjettools siscone siscone_spherical ) find_package( FastJetContrib COMPONENTS VariableR RecursiveTools ) find_package( ROOT COMPONENTS Core ) +find_package( GTest ) # Component(s) in the package: atlas_add_library( JetRecLib @@ -66,31 +67,31 @@ atlas_add_test( TestTests # test/all_tests.cx test/TestTest.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} GoogleTestTools JetRecLib ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${GTEST_LIBRARIES} JetRecLib ) atlas_add_test(JetTests SOURCES test/JetTest.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} GoogleTestTools JetRecLib ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${GTEST_LIBRARIES} JetRecLib ) atlas_add_test(PseudoJetContainerOffline SOURCES test/PseudoJetContainerOfflineTest.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} GoogleTestTools JetRecLib ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${GTEST_LIBRARIES} JetRecLib ) atlas_add_test(PseudoJetContainerTrigger SOURCES test/PseudoJetContainerTriggerTest.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} GoogleTestTools JetRecLib ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${GTEST_LIBRARIES} JetRecLib ) atlas_add_test(ExtractorUnitTests SOURCES test/ExtractorTest.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} -` LINK_LIBRARIES ${ROOT_LIBRARIES} GoogleTestTools JetRecLib ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${GTEST_LIBRARIES} JetRecLib ) # Install files from the package: atlas_install_python_modules( python/*.py ) -- GitLab From c23457c84d0ab1c4cd320a2bd6cc89c907895567 Mon Sep 17 00:00:00 2001 From: Attila Krasznahorkay <attila.krasznahorkay@cern.ch> Date: Fri, 8 Jun 2018 11:31:36 +0000 Subject: [PATCH 093/562] Merge branch 'fixCascadeMemLeak' into '21.2' Fix memory leak in Cascade Vertexing See merge request atlas/athena!11900 (cherry picked from commit a161ef324e946233cbed6aac0f57c6fd77142327 [formerly a36f23d3a9ab8ee978aedd5430590cff4e673007]) e014e9d2 Fix memory leak in cascade vertexing Former-commit-id: da4c22144a9c1c8894657d376d7f0c9d817e601c --- .../share/test_athena_ntuple_dumper_varhandles.ref | 0 .../AthenaRootComps/share/test_athena_variable_shape2.ref | 0 .../TrkVertexFitter/TrkVKalVrtFitter/src/TrkCascadeFitter.cxx | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 Database/AthenaRoot/AthenaRootComps/share/test_athena_ntuple_dumper_varhandles.ref mode change 100755 => 100644 Database/AthenaRoot/AthenaRootComps/share/test_athena_variable_shape2.ref diff --git a/Database/AthenaRoot/AthenaRootComps/share/test_athena_ntuple_dumper_varhandles.ref b/Database/AthenaRoot/AthenaRootComps/share/test_athena_ntuple_dumper_varhandles.ref old mode 100644 new mode 100755 diff --git a/Database/AthenaRoot/AthenaRootComps/share/test_athena_variable_shape2.ref b/Database/AthenaRoot/AthenaRootComps/share/test_athena_variable_shape2.ref old mode 100755 new mode 100644 diff --git a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/TrkCascadeFitter.cxx b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/TrkCascadeFitter.cxx index 8afe943ecb82..68f6ac204ba5 100755 --- a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/TrkCascadeFitter.cxx +++ b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/TrkCascadeFitter.cxx @@ -747,7 +747,7 @@ VxCascadeInfo * TrkVKalVrtFitter::fitCascade(const Vertex* primVrt, bool FirstDe xaodVrtList.push_back(tmpXAODVertex); //VK Save xAOD::Vertex // //---- Save and clean - delete tmpVTAV;delete tmpRecV; //Mandatory cleaning + delete tmpVTAV;delete tmpRecV; delete fullDeriv; //Mandatory cleaning } // // Save momenta of all particles including combined at vertex positions -- GitLab From 1c20abaaa8c61824e03fef8f5a4a7922bf0c8cb7 Mon Sep 17 00:00:00 2001 From: Jochen Meyer <Jochen.Meyer@cern.ch> Date: Sun, 10 Jun 2018 01:24:59 +0200 Subject: [PATCH 094/562] adding valgrind suppression files On the twiki page describing the use of valgrind with Athena https://twiki.cern.ch/twiki/bin/viewauth/AtlasComputing/UsingValgrind it is recommended to use several suppression files. However, some of the suppression files are not available any longer as they were part of the External/AtlasValgrind package which for some reason doesn't exist anymore. Even though parts of the suppression files seem outdated other parts may still be applicable. The suppression files added with this MR are copies of the latest ones in rel 20.7 https://gitlab.cern.ch/atlas/athena/blob/20.7/External/AtlasValgrind/share/root.supp https://gitlab.cern.ch/atlas/athena/blob/20.7/External/AtlasValgrind/share/Gaudi.supp https://gitlab.cern.ch/atlas/athena/blob/20.7/External/AtlasValgrind/share/AtlasValgrind.supp https://gitlab.cern.ch/atlas/athena/blob/20.7/External/AtlasValgrind/share/valgrind-python.supp and were tested/used in a recent job. Former-commit-id: 61a28293f262937f3e72b9aa1221e1da735b2c8e --- .../ValgrindRTTJobs/share/AtlasValgrind.supp | 1623 +++++++++++++++++ Tools/ValgrindRTTJobs/share/Gaudi.supp | 551 ++++++ Tools/ValgrindRTTJobs/share/root.supp | 1035 +++++++++++ .../share/valgrind-python.supp | 217 +++ 4 files changed, 3426 insertions(+) create mode 100644 Tools/ValgrindRTTJobs/share/AtlasValgrind.supp create mode 100644 Tools/ValgrindRTTJobs/share/Gaudi.supp create mode 100644 Tools/ValgrindRTTJobs/share/root.supp create mode 100644 Tools/ValgrindRTTJobs/share/valgrind-python.supp diff --git a/Tools/ValgrindRTTJobs/share/AtlasValgrind.supp b/Tools/ValgrindRTTJobs/share/AtlasValgrind.supp new file mode 100644 index 000000000000..61bbbffed6bd --- /dev/null +++ b/Tools/ValgrindRTTJobs/share/AtlasValgrind.supp @@ -0,0 +1,1623 @@ +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex11TypeBuilderEPKcj + fun:_ZN4ROOT6Reflex13TypeDistillerISsE3GetEv + fun:_ZN4ROOT6Reflex17FunctionDistillerIFP8IServiceSsP11ISvcLocatorEE3GetEv + fun:_ZN55_GLOBAL__N_.._src_ToolSvc_ToolSvc.cpp_9D2164D3_F2D0F4A114ToolSvc_dict20C1Ev + fun:_Z41__static_initialization_and_destruction_0ii +} + +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI17EvtPersistencySvcE6createERKSsP11ISvcLocator + fun:_ZN72_GLOBAL__N_.._src_PersistencySvc_EvtPersistencySvc.cpp_EF105EC1_8431AE9F7FactoryI17EvtPersistencySvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} + +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI23HistogramPersistencySvcE6createERKSsP11ISvcLocator + fun:_ZN78_GLOBAL__N_.._src_PersistencySvc_HistogramPersistencySvc.cpp_9D2164D3_43B39ECB7FactoryI23HistogramPersistencySvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} + +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex6ReflexC1Ev + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN4ROOT6Reflex6ReflexC2Ev + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libReflex.so + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libReflex.so +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex11TypeBuilderEPKcj + fun:_ZN4ROOT6Reflex13TypeDistillerISsE3GetEv + fun:_ZN4ROOT6Reflex17FunctionDistillerIFP8IServiceSsP11ISvcLocatorEE3GetEv + fun:_ZN55_GLOBAL__N_.._src_ToolSvc_ToolSvc.cpp_9D2164D3_0CE4793F14ToolSvc_dict20C1Ev + fun:_Z41__static_initialization_and_destruction_0ii +} +{ + TArray leak + Memcheck:Leak + fun:_Znaj + fun:_ZN7TArrayI3SetEi + fun:_ZN6TColor10SetPaletteEiPi + fun:_ZN6TStyle10SetPaletteEiPi + fun:_ZN6TStyle5ResetEPKc + fun:_ZN6TStyleC1EPKcS1_ +} +{ + TStorage leak + Memcheck:Leak + fun:_Znwj + fun:_ZN8TStorage11ObjectAllocEj + fun:_ZN7TObjectnwEj + fun:_ZNK4ROOT20TQObjectInitBehavior11CreateClassEPKcsRKSt9type_infoP16TVirtualIsAProxyPFvPvR16TMemberInspectorPcES2_S2_ii + fun:_ZN4ROOT17TGenericClassInfo8GetClassEv + fun:_ZN8TQObject5ClassEv +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZNSs4_Rep9_S_createEjjRKSaIcE + obj:/usr/lib/libstdc++.so.6.0.3 + fun:_ZNSsC1EPKcRKSaIcE + fun:_ZN4ROOT6Reflex9ScopeNameC1EPKcPNS0_9ScopeBaseE + fun:_ZN4ROOT6Reflex5Scope11__NIRVANA__Ev +} +{ + TString leak + Memcheck:Leak + fun:_Znaj + fun:_ZN10TStringRef6GetRepEii + fun:_ZN7TStringC1EPKc + fun:_ZN10TObjStringC1EPKc + fun:_ZN4ROOT18TMapTypeToClassRec3AddEPKcRP9TClassRec + fun:_ZN11TClassTable3AddEPKcsRKSt9type_infoPFvvEi +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__store_dictposition + fun:G__storerewindposition + fun:G__exec_text + fun:G__platformMacro + fun:G__set_stdio +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorIN4ROOT6Reflex5ScopeEE8allocateEjPKv + fun:_ZNSt12_Vector_baseIN4ROOT6Reflex5ScopeESaIS2_EE11_M_allocateEj + fun:_ZNSt6vectorIN4ROOT6Reflex5ScopeESaIS2_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS2_S4_EERKS2_ + fun:_ZNSt6vectorIN4ROOT6Reflex5ScopeESaIS2_EE9push_backERKS2_ + fun:_ZNK4ROOT6Reflex9ScopeBase11AddSubScopeERKNS0_5ScopeE +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex9ScopeBaseC2EPKcNS0_4TYPEE + fun:_ZN4ROOT6Reflex9NamespaceC1EPKc + fun:_ZN4ROOT6Reflex16NamespaceBuilderC1EPKc + fun:_ZN4ROOT6Reflex13PluginServiceC1Ev + fun:_ZN4ROOT6Reflex13PluginService8InstanceEv +} +{ + CINT Leak + Memcheck:Leak + fun:_Znwj + fun:G__call_setup_funcs + fun:_ZN24G__cpp_setup_initG__MathC1Ev + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN4ROOT20GenerateInitInstanceEPK8TComplex + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libCore.so +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZNK4ROOT6Reflex3Any6HolderIPKcE5CloneEv + fun:_ZN4ROOT6Reflex3AnyC1ERKS1_ + fun:_ZN4ROOT6Reflex3AnyaSERKS1_ + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyEjRKNS0_3AnyE + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyERKSsRKNS0_3AnyE +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex9ScopeBaseC2Ev + fun:_ZN4ROOT6Reflex9NamespaceC1Ev + fun:_ZN4ROOT6Reflex9Namespace11GlobalScopeEv + fun:_ZN4ROOT6Reflex6ReflexC1Ev + fun:_Z41__static_initialization_and_destruction_0ii +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex9ScopeBaseC2EPKcNS0_4TYPEE + fun:_ZN4ROOT6Reflex9NamespaceC1EPKc + fun:_ZN4ROOT6Reflex16NamespaceBuilderC1EPKc + fun:_ZN4ROOT6Reflex13PluginServiceC1Ev + fun:_ZN4ROOT6Reflex13PluginService8InstanceEv +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex9ScopeBaseC2Ev + fun:_ZN4ROOT6Reflex9NamespaceC1Ev + fun:_ZN4ROOT6Reflex9Namespace11GlobalScopeEv + fun:_ZN4ROOT6Reflex6ReflexC1Ev + fun:_Z41__static_initialization_and_destruction_0ii +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex9ScopeNameC1EPKcPNS0_9ScopeBaseE + fun:_ZN4ROOT6Reflex5Scope11__NIRVANA__Ev + fun:_ZN4ROOT6Reflex9ScopeBaseC2Ev + fun:_ZN4ROOT6Reflex9NamespaceC1Ev + fun:_ZN4ROOT6Reflex9Namespace11GlobalScopeEv +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex5Scope11__NIRVANA__Ev + fun:_ZN4ROOT6Reflex9ScopeBaseC2Ev + fun:_ZN4ROOT6Reflex9NamespaceC1Ev + fun:_ZN4ROOT6Reflex9Namespace11GlobalScopeEv + fun:_ZN4ROOT6Reflex6ReflexC1Ev +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex9ScopeNameC1EPKcPNS0_9ScopeBaseE + fun:_ZN4ROOT6Reflex11TypeBuilderEPKcj + fun:_ZN4ROOT6Reflex13TypeDistillerISsE3GetEv + fun:_ZN4ROOT6Reflex17FunctionDistillerIFP8IServiceSsP11ISvcLocatorEE3GetEv + fun:_ZN55_GLOBAL__N_.._src_ToolSvc_ToolSvc.cpp_9D2164D3_0CE4793F14ToolSvc_dict20C1Ev +} +{ + Memcheck:Leak + fun:calloc + fun:_dlerror_run + fun:dlopen@GLIBC_2.0 + fun:_ZN4ROOT6Reflex13SharedLibrary4LoadEv + fun:_ZN4ROOT6Reflex13PluginService14LoadFactoryLibERKSs + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZN5TList10NewOptLinkEP7TObjectPKcP8TObjLink + fun:_ZN5TList7AddLastEP7TObjectPKc + fun:_ZN5TList3AddEP7TObjectPKc + fun:_ZN5TROOTC1EPKcS1_PPFvvE + fun:_ZN4ROOT7GetROOTEv +} +{ + Memcheck:Leak + fun:malloc + fun:G__getparameterlist + fun:G__createfuncmacro + fun:G__define + fun:G__keyword_anytime_7 + fun:G__exec_statement +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZN11TClassTableC1Ev + fun:_ZN11TClassTable3AddEPKcsRKSt9type_infoPFvvEi + fun:_ZN4ROOT8AddClassEPKcsRKSt9type_infoPFvvEi + fun:_ZNK4ROOT20TDefaultInitBehavior8RegisterEPKcsRKSt9type_infoPFvvEi + fun:_ZN4ROOT17TGenericClassInfo4InitEi +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex9ScopeNameC1EPKcPNS0_9ScopeBaseE + fun:_ZN4ROOT6Reflex11TypeBuilderEPKcj + fun:_ZN4ROOT6Reflex13TypeDistillerIN2SG6FolderEE3GetEv + fun:_ZN4ROOT6Reflex7GetTypeIN2SG6FolderEEERKNS0_4TypeEv + fun:_ZN66_GLOBAL__N_.._src_components_SGComps_entries.cxx_9D2164D3_35A4406C12Folder_dict8C1Ev +} +{ + Memcheck:Leak + fun:malloc + fun:G__add_ipath + fun:_ZN5TCint14AddIncludePathEPKc + fun:_ZN5TROOTC1EPKcS1_PPFvvE + fun:_ZN4ROOT7GetROOTEv + fun:_ZN6TTimer5ResetEv +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT25GenerateInitInstanceLocalEPK10TObjString + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN4ROOT20GenerateInitInstanceEPK16TMemberInspector + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libCore.so + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libCore.so +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT25GenerateInitInstanceLocalEPK8TQObject + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN4ROOT20GenerateInitInstanceEPK16TMemberInspector + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libCore.so + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libCore.so +} +{ + Memcheck:Leak + fun:_Znwj + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN6TLimit7fgTableE + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libHist.so + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libHist.so + fun:_dl_init +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex11TypeBuilderEPKcj + fun:_ZN4ROOT6Reflex13TypeDistillerIN2SG6FolderEE3GetEv + fun:_ZN4ROOT6Reflex7GetTypeIN2SG6FolderEEERKNS0_4TypeEv + fun:_ZN66_GLOBAL__N_.._src_components_SGComps_entries.cxx_9D2164D3_35A4406C12Folder_dict8C1Ev + fun:_Z41__static_initialization_and_destruction_0ii +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__memfunc_para_setup + fun:G__parse_parameter_link + fun:G__memfunc_setup + fun:_Z18G__cpp_setup_func1v + fun:G__cpp_setup_funcG__Base1 +} +{ + CINT leak + Memcheck:Leak + fun:_Znwj + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I_gCINTMutex + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libCore.so + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libCore.so + fun:_dl_init +} +{ + CINT leak + Memcheck:Leak + fun:_Znwj + fun:_ZN5TCint12SetClassInfoEP6TClassb + fun:_ZN6TClass4InitEPKcsPKSt9type_infoP16TVirtualIsAProxyPFvPvR16TMemberInspectorPcES1_S1_ii + fun:_ZN6TClassC1EPKcsRKSt9type_infoP16TVirtualIsAProxyPFvPvR16TMemberInspectorPcES1_S1_ii + fun:_ZN4ROOT11CreateClassEPKcsRKSt9type_infoP16TVirtualIsAProxyPFvPvR16TMemberInspectorPcES1_S1_ii + fun:_ZNK4ROOT20TDefaultInitBehavior11CreateClassEPKcsRKSt9type_infoP16TVirtualIsAProxyPFvPvR16TMemberInspectorPcES2_S2_ii +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__createfuncmacro + fun:G__define + fun:G__keyword_anytime_7 + fun:G__exec_statement + fun:G__loadfile_tmpfile +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZNK4ROOT6Reflex3Any6HolderIjE5CloneEv + fun:_ZN4ROOT6Reflex3AnyC1ERKS1_ + fun:_ZN4ROOT6Reflex3AnyaSERKS1_ + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyEjRKNS0_3AnyE + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyERKSsRKNS0_3AnyE +} +{ + CINT leak + Memcheck:Leak + fun:_Znwj + fun:G__stack_instance + fun:G__resetplocal + fun:_Z20G__cpp_setup_global0v + fun:G__cpp_setup_globalG__Math + fun:G__cpp_setupG__Math +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorIN4ROOT6Reflex3AnyEE8allocateEjPKv + fun:_ZNSt12_Vector_baseIN4ROOT6Reflex3AnyESaIS2_EE11_M_allocateEj + fun:_ZNSt6vectorIN4ROOT6Reflex3AnyESaIS2_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS2_S4_EEjRKS2_ + fun:_ZNSt6vectorIN4ROOT6Reflex3AnyESaIS2_EE6insertEN9__gnu_cxx17__normal_iteratorIPS2_S4_EEjRKS2_ + fun:_ZNSt6vectorIN4ROOT6Reflex3AnyESaIS2_EE6resizeEjRKS2_ +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorIN4ROOT6Reflex4TypeEE8allocateEjPKv + fun:_ZNSt12_Vector_baseIN4ROOT6Reflex4TypeESaIS2_EE11_M_allocateEj + fun:_ZNSt12_Vector_baseIN4ROOT6Reflex4TypeESaIS2_EEC2EjRKS3_ + fun:_ZNSt6vectorIN4ROOT6Reflex4TypeESaIS2_EEC1ERKS4_ + fun:_ZN4ROOT6Reflex8FunctionC1ERKNS0_4TypeERKSt6vectorIS2_SaIS2_EERKSt9type_infoNS0_4TYPEE +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex9Namespace11GlobalScopeEv + fun:_ZN4ROOT6Reflex6ReflexC1Ev + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN4ROOT6Reflex6ReflexC2Ev + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libReflex.so +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__getparameterlist + fun:G__createfuncmacro + fun:G__define + fun:G__keyword_anytime_7 + fun:G__exec_statement +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZN5TList10NewOptLinkEP7TObjectPKcP8TObjLink + fun:_ZN5TList7AddLastEP7TObjectPKc + fun:_ZN5TList3AddEP7TObjectPKc + fun:_ZN5TROOTC1EPKcS1_PPFvvE + fun:_ZN4ROOT7GetROOTEv +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex8TypeBaseC2EPKcjNS0_4TYPEERKSt9type_infoRKNS0_4TypeE + fun:_ZN4ROOT6Reflex7PointerC1ERKNS0_4TypeERKSt9type_info + fun:_ZN4ROOT6Reflex14PointerBuilderERKNS0_4TypeERKSt9type_info + fun:_ZN4ROOT6Reflex13TypeDistillerIP10IInterfaceE3GetEv + fun:_ZN4ROOT6Reflex13TypeDistillerIKP10IInterfaceE3GetEv +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex16NamespaceBuilderC1EPKc + fun:_ZN4ROOT6Reflex13PluginServiceC1Ev + fun:_ZN4ROOT6Reflex13PluginService8InstanceEv + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateIP10IInterfaceS4_EET_RKSsRKT0_ +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZNK4ROOT6Reflex3Any6HolderIPKcE5CloneEv + fun:_ZN4ROOT6Reflex3AnyC1ERKS1_ + fun:_ZN4ROOT6Reflex3AnyaSERKS1_ + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyEjRKNS0_3AnyE + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyERKSsRKNS0_3AnyE +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT14DefineBehaviorEP8TQObjectS1_ + fun:_ZN4ROOT25GenerateInitInstanceLocalEPK6TTimer + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN4ROOT20GenerateInitInstanceEPK16TMemberInspector + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libCore.so +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__add_ipath + fun:_ZN5TCint14AddIncludePathEPKc + fun:_ZN5TROOTC1EPKcS1_PPFvvE + fun:_ZN4ROOT7GetROOTEv + fun:_ZN6TTimer5ResetEv +} +{ + CINT leak + Memcheck:Leak + fun:realloc + fun:G__add_setup_func + fun:_ZN26G__cpp_setup_initG__MatrixC1Ev + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN4ROOT20GenerateInitInstanceEPK12TMatrixTBaseIfE + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libMatrix.so +} +{ + CINT leak + Memcheck:Leak + fun:realloc + fun:G__add_ipath + fun:_ZN5TCint14AddIncludePathEPKc + fun:_ZN5TROOTC1EPKcS1_PPFvvE + fun:_ZN4ROOT7GetROOTEv + fun:_ZN6TTimer5ResetEv +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__malloc + fun:G__allocvariable + fun:G__letvariable + fun:G__getexpr + fun:G__set_stdio +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex8TypeBaseC2EPKcjNS0_4TYPEERKSt9type_infoRKNS0_4TypeE + fun:_ZN4ROOT6Reflex7PointerC1ERKNS0_4TypeERKSt9type_info + fun:_ZN4ROOT6Reflex14PointerBuilderERKNS0_4TypeERKSt9type_info + fun:_ZN4ROOT6Reflex13TypeDistillerIP10IInterfaceE3GetEv + fun:_ZN4ROOT6Reflex13TypeDistillerIKP10IInterfaceE3GetEv +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex8TypeBaseC2EPKcjNS0_4TYPEERKSt9type_infoRKNS0_4TypeE + fun:_ZN4ROOT6Reflex7TypedefC1EPKcRKNS0_4TypeENS0_4TYPEES6_ + fun:_ZN4ROOT6Reflex6ReflexC1Ev + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN4ROOT6Reflex6ReflexC2Ev +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyEjRKNS0_3AnyE + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyERKSsRKNS0_3AnyE + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyERKSsPKc + fun:_ZNK4ROOT6Reflex12PropertyList11AddPropertyERKSsPKc + fun:_ZN4ROOT6Reflex6ReflexC1Ev +} +{ + dlopen leak + Memcheck:Leak + fun:malloc + fun:realloc + fun:_dl_lookup_symbol_x + fun:_dl_relocate_object + fun:dl_open_worker + fun:_dl_catch_error +} +{ + dlopen leak + Memcheck:Leak + fun:malloc + fun:add_to_global + fun:dl_open_worker + fun:_dl_catch_error + fun:_dl_open + fun:dlopen_doit +} +{ + dlopen leak + Memcheck:Leak + fun:malloc + fun:_dl_map_object_deps + fun:dl_open_worker + fun:_dl_catch_error + fun:_dl_open + fun:dlopen_doit +} +{ + dlopen leak + Memcheck:Leak + fun:malloc + fun:_dl_new_object + fun:_dl_map_object_from_fd + fun:_dl_map_object + fun:openaux + fun:_dl_catch_error +} +{ + dlopen leak + Memcheck:Leak + fun:malloc + fun:open_path + fun:_dl_map_object + fun:openaux + fun:_dl_catch_error + fun:_dl_map_object_deps +} +{ + dlopen leak + Memcheck:Leak + fun:calloc + fun:_dl_check_map_versions + fun:dl_open_worker + fun:_dl_catch_error + fun:_dl_open + fun:dlopen_doit +} +{ + dlopen leak + Memcheck:Leak + fun:calloc + fun:_dl_new_object + fun:_dl_map_object_from_fd + fun:_dl_map_object + fun:dl_open_worker + fun:_dl_catch_error +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZNK4ROOT6Reflex3Any6HolderI11InterfaceIDE5CloneEv + fun:_ZN4ROOT6Reflex3AnyC1ERKS1_ + fun:_ZN4ROOT6Reflex3AnyaSERKS1_ + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyEjRKNS0_3AnyE + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyERKSsRKNS0_3AnyE +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__createfuncmacro + fun:G__define + fun:G__keyword_anytime_7 + fun:G__exec_statement + fun:G__loadfile_tmpfile +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex10MemberBaseC2EPKcRKNS0_4TypeENS0_4TYPEEj + fun:_ZN4ROOT6Reflex14FunctionMemberC1EPKcRKNS0_4TypeEPFPvS7_RKSt6vectorIS7_SaIS7_EES7_ES7_S3_jNS0_4TYPEE + fun:_ZN4ROOT6Reflex15FunctionBuilderC1ERKNS0_4TypeEPKcPFPvS7_RKSt6vectorIS7_SaIS7_EES7_ES7_S6_h + fun:_ZN67_GLOBAL__N_.._src_DataSvc_PartitionSwitchTool.cpp_9D2164D3_EEE8248227PartitionSwitchTool_dict128C1Ev + fun:_Z41__static_initialization_and_destruction_0ii +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex19FunctionTypeBuilderERKNS0_4TypeERKSt6vectorIS1_SaIS1_EERKSt9type_info + fun:_ZN4ROOT6Reflex17FunctionDistillerIFP8IAlgToolSsSsPK10IInterfaceEE3GetEv + fun:_ZN67_GLOBAL__N_.._src_DataSvc_PartitionSwitchTool.cpp_9D2164D3_EEE8248227PartitionSwitchTool_dict128C1Ev + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN67_GLOBAL__N_.._src_DataSvc_PartitionSwitchTool.cpp_9D2164D3_EEE8248229s_PartitionSwitchTool_dict128E +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex8TypeNameC1EPKcPNS0_8TypeBaseEPKSt9type_info + fun:_ZN4ROOT6Reflex8TypeBaseC2EPKcjNS0_4TYPEERKSt9type_infoRKNS0_4TypeE + fun:_ZN4ROOT6Reflex11FundamentalC1EPKcjRKSt9type_info + fun:_ZN4ROOT6Reflex6ReflexC1Ev + fun:_Z41__static_initialization_and_destruction_0ii +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex8TypeBaseC2EPKcjNS0_4TYPEERKSt9type_infoRKNS0_4TypeE + fun:_ZN4ROOT6Reflex11FundamentalC1EPKcjRKSt9type_info + fun:_ZN4ROOT6Reflex6ReflexC1Ev + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN4ROOT6Reflex6ReflexC2Ev +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex14PointerBuilderERKNS0_4TypeERKSt9type_info + fun:_ZN4ROOT6Reflex13TypeDistillerIP10IInterfaceE3GetEv + fun:_ZN4ROOT6Reflex13TypeDistillerIKP10IInterfaceE3GetEv + fun:_ZN4ROOT6Reflex7GetTypeIKP10IInterfaceEERKNS0_4TypeEv + fun:_ZN4ROOT6Reflex11ValueObjectC1IKP10IInterfaceEERT_ +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__createtemplateclass + fun:G__tagtable_setup + fun:G__cpp_setup_tagtableG__Base3 + fun:G__cpp_setupG__Base3 + fun:G__call_setup_funcs +} +{ + Graf leak + Memcheck:Leak + fun:_Znaj + fun:_ZN11TWebPaletteC1Ev + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I_gWebImagePalette + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libGraf.so + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libGraf.so +} +{ + Graf leak + Memcheck:Leak + fun:_Znaj + fun:_ZN11TWebPaletteC1Ev + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I_gWebImagePalette + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libGraf.so + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libGraf.so +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex8TypeBaseC2EPKcjNS0_4TYPEERKSt9type_infoRKNS0_4TypeE + fun:_ZN4ROOT6Reflex11FundamentalC1EPKcjRKSt9type_info + fun:_ZN4ROOT6Reflex6ReflexC1Ev + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN4ROOT6Reflex6ReflexC2Ev +} +{ + ROOT leak + Memcheck:Leak + fun:_Znwj + fun:_ZN5TList7NewLinkEP7TObjectP8TObjLink + fun:_ZN5TList7AddLastEP7TObject + fun:_ZN5TList3AddEP7TObject + fun:_ZN10THashTable3AddEP7TObject + fun:_ZN4TMap3AddEP7TObjectS1_ +} +{ + CINT leak + Memcheck:Leak + fun:_Znwj + fun:_ZN5TCint17UpdateListOfTypesEv + fun:_ZN5TROOT14GetListOfTypesEb + fun:_ZNK5TROOT7GetTypeEPKcb + fun:_ZN6TClass8GetClassEPKcb + fun:_ZNK5TROOT8GetClassEPKcb +} +{ + TClass leak + Memcheck:Leak + fun:_Znaj + fun:_ZN8TStorage5AllocEj + fun:_ZN9TObjArray4InitEii + fun:_ZN9TObjArrayC1Eii + fun:_ZN6TClass4InitEPKcsPKSt9type_infoP16TVirtualIsAProxyPFvPvR16TMemberInspectorPcES1_S1_ii + fun:_ZN6TClassC1EPKcsRKSt9type_infoP16TVirtualIsAProxyPFvPvR16TMemberInspectorPcES1_S1_ii +} +{ + TClass leak + Memcheck:Leak + fun:_Znaj + fun:_Z6StrDupPKc + fun:_ZN11TClassTable3AddEPKcsRKSt9type_infoPFvvEi + fun:_ZN4ROOT8AddClassEPKcsRKSt9type_infoPFvvEi + fun:_ZNK4ROOT20TDefaultInitBehavior8RegisterEPKcsRKSt9type_infoPFvvEi + fun:_ZN4ROOT17TGenericClassInfo4InitEi +} +{ + TClass leak + Memcheck:Leak + fun:_Znaj + fun:_ZN11TClassTableC1Ev + fun:_ZN11TClassTable3AddEPKcsRKSt9type_infoPFvvEi + fun:_ZN4ROOT8AddClassEPKcsRKSt9type_infoPFvvEi + fun:_ZNK4ROOT20TDefaultInitBehavior8RegisterEPKcsRKSt9type_infoPFvvEi + fun:_ZN4ROOT17TGenericClassInfo4InitEi +} +{ + TClass leak + Memcheck:Leak + fun:_Znwj + fun:_ZN11TClassTable11FindElementEPKcb + fun:_ZN11TClassTable3AddEPKcsRKSt9type_infoPFvvEi + fun:_ZN4ROOT8AddClassEPKcsRKSt9type_infoPFvvEi + fun:_ZNK4ROOT20TDefaultInitBehavior8RegisterEPKcsRKSt9type_infoPFvvEi + fun:_ZN4ROOT17TGenericClassInfo4InitEi +} +{ + TClass leak + Memcheck:Leak + fun:_Znaj + fun:_ZN10THashTableC1Eii + fun:_ZN4TMapC1Eii + fun:_ZN4ROOT18TMapTypeToClassRecC1Ev + fun:_ZN11TClassTableC1Ev + fun:_ZN11TClassTable3AddEPKcsRKSt9type_infoPFvvEi +} +{ + TClass leak + Memcheck:Leak + fun:_Znwj + fun:_ZN8TStorage11ObjectAllocEj + fun:_ZN7TObjectnwEj + fun:_ZN4TMap3AddEP7TObjectS1_ + fun:_ZN4ROOT18TMapTypeToClassRec3AddEPKcRP9TClassRec + fun:_ZN11TClassTable3AddEPKcsRKSt9type_infoPFvvEi +} +{ + TClass leak + Memcheck:Leak + fun:_Znaj + fun:_ZN12TObjectTableC1Ei + fun:_ZN12TObjectTable6AddObjEP7TObject + fun:_ZN7TObjectC2Ev + fun:_ZN11TClassTableC1Ev + fun:_ZN11TClassTable3AddEPKcsRKSt9type_infoPFvvEi +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorIN4ROOT6Reflex11OwnedMemberEE8allocateEjPKv + fun:_ZNSt12_Vector_baseIN4ROOT6Reflex11OwnedMemberESaIS2_EE11_M_allocateEj + fun:_ZNSt6vectorIN4ROOT6Reflex11OwnedMemberESaIS2_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS2_S4_EERKS2_ + fun:_ZNSt6vectorIN4ROOT6Reflex11OwnedMemberESaIS2_EE9push_backERKS2_ + fun:_ZNK4ROOT6Reflex9ScopeBase17AddFunctionMemberERKNS0_6MemberE +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorIN4ROOT6Reflex6MemberEE8allocateEjPKv + fun:_ZNSt12_Vector_baseIN4ROOT6Reflex6MemberESaIS2_EE11_M_allocateEj + fun:_ZNSt6vectorIN4ROOT6Reflex6MemberESaIS2_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS2_S4_EERKS2_ + fun:_ZNSt6vectorIN4ROOT6Reflex6MemberESaIS2_EE9push_backERKS2_ + fun:_ZNK4ROOT6Reflex9ScopeBase17AddFunctionMemberERKNS0_6MemberE +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZNK4ROOT6Reflex3Any6HolderISsE5CloneEv + fun:_ZN4ROOT6Reflex3AnyC1ERKS1_ + fun:_ZN4ROOT6Reflex3AnyaSERKS1_ + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyEjRKNS0_3AnyE + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyERKSsRKNS0_3AnyE +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex10MemberBaseC2EPKcRKNS0_4TypeENS0_4TYPEEj + fun:_ZN4ROOT6Reflex14FunctionMemberC1EPKcRKNS0_4TypeEPFPvS7_RKSt6vectorIS7_SaIS7_EES7_ES7_S3_jNS0_4TYPEE + fun:_ZN4ROOT6Reflex15FunctionBuilderC1ERKNS0_4TypeEPKcPFPvS7_RKSt6vectorIS7_SaIS7_EES7_ES7_S6_h + fun:_ZN59_GLOBAL__N_.._src_NTupleSvc_NTupleSvc.cpp_17E02520_8B10567116NTupleSvc_dict48C1Ev + fun:_Z41__static_initialization_and_destruction_0ii +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex8TypeNameC1EPKcPNS0_8TypeBaseEPKSt9type_info + fun:_ZN4ROOT6Reflex11TypeBuilderEPKcj + fun:_ZN4ROOT6Reflex13TypeDistillerI10IInterfaceE3GetEv + fun:_ZN4ROOT6Reflex13TypeDistillerIP10IInterfaceE3GetEv + fun:_ZN4ROOT6Reflex13TypeDistillerIKP10IInterfaceE3GetEv +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorIN4ROOT6Reflex3AnyEE8allocateEjPKv + fun:_ZNSt12_Vector_baseIN4ROOT6Reflex3AnyESaIS2_EE11_M_allocateEj + fun:_ZNSt6vectorIN4ROOT6Reflex3AnyESaIS2_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS2_S4_EEjRKS2_ + fun:_ZNSt6vectorIN4ROOT6Reflex3AnyESaIS2_EE6insertEN9__gnu_cxx17__normal_iteratorIPS2_S4_EEjRKS2_ + fun:_ZNSt6vectorIN4ROOT6Reflex3AnyESaIS2_EE6resizeEjRKS2_ +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyEjRKNS0_3AnyE + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyERKSsRKNS0_3AnyE + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyERKSsPKc + fun:_ZNK4ROOT6Reflex12PropertyList11AddPropertyERKSsPKc + fun:_ZN4ROOT6Reflex9ScopeBaseC2Ev +} +{ + TUnix leak + Memcheck:Leak + fun:_Znaj + fun:_ZN7TSystemC2EPKcS1_ + fun:_ZN11TUnixSystemC1Ev + fun:_ZN5TROOT10InitSystemEv + fun:_ZN5TROOTC1EPKcS1_PPFvvE + fun:_ZN4ROOT7GetROOTEv +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex11TypeBuilderEPKcj + fun:_ZN4ROOT6Reflex13TypeDistillerI10IInterfaceE3GetEv + fun:_ZN4ROOT6Reflex13TypeDistillerIP10IInterfaceE3GetEv + fun:_ZN4ROOT6Reflex13TypeDistillerIKP10IInterfaceE3GetEv + fun:_ZN4ROOT6Reflex7GetTypeIKP10IInterfaceEERKNS0_4TypeEv +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN69_GLOBAL__N_.._src_ApplicationMgr_ApplicationMgr.cpp_9D2164D3_A4BA85537FactoryI14ApplicationMgrFP10IInterfaceS3_EE4FuncEPvRKSt6vectorIS6_SaIS6_EES6_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateIP10IInterfaceS4_EET_RKSsRKT0_ +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZNSs4_Rep9_S_createEjjRKSaIcE + obj:/usr/lib/libstdc++.so.6.0.3 + fun:_ZNSsC1EPKcRKSaIcE + fun:_ZN4ROOT6Reflex8TypeNameC1EPKcPNS0_8TypeBaseEPKSt9type_info + fun:_ZN4ROOT6Reflex8TypeBaseC2EPKcjNS0_4TYPEERKSt9type_infoRKNS0_4TypeE +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__search_tagname + fun:G__get_linked_tagnum + fun:G__get_linked_tagnum_fwd + fun:G__cpp_setup_tagtableG__Unix + fun:G__cpp_setupG__Unix +} +{ + CINT leak + Memcheck:Leak + fun:calloc + fun:G__malloc + fun:_Z16G__alloc_var_refIiPFl8G__valueEEviT0_PcP12G__var_arrayiRS0_ + fun:G__allocvariable + fun:G__letvariable + fun:G__getexpr +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__createtemplateclass + fun:G__tagtable_setup + fun:G__cpp_setup_tagtableG__Base3 + fun:G__cpp_setupG__Base3 + fun:G__call_setup_funcs +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__search_typename + fun:G__search_typename2 + fun:G__cpp_setup_typetableG__Unix + fun:G__cpp_setupG__Unix + fun:G__call_setup_funcs +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__memfunc_para_setup + fun:G__parse_parameter_link + fun:G__memfunc_setup + fun:_Z18G__cpp_setup_func1v + fun:G__cpp_setup_funcG__Cont +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:_ZN9G__heritsixEi + fun:G__inheritance_setup + fun:G__cpp_setup_inheritanceG__Unix + fun:G__cpp_setupG__Unix + fun:G__call_setup_funcs +} +{ + CINT leak + Memcheck:Leak + fun:_Znwj + fun:G__search_tagname + fun:G__get_linked_tagnum + fun:G__get_linked_tagnum_fwd + fun:G__cpp_setup_tagtableG__Unix + fun:G__cpp_setupG__Unix +} +{ + CINT leak + Memcheck:Leak + fun:_Znwj + fun:G__search_tagname + fun:G__get_linked_tagnum + fun:G__get_linked_tagnum_fwd + fun:G__cpp_setup_tagtableG__Unix + fun:G__cpp_setupG__Unix +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__search_tagname + fun:G__get_linked_tagnum + fun:G__get_linked_tagnum_fwd + fun:G__cpp_setup_tagtableG__Unix + fun:G__cpp_setupG__Unix +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex15FunctionBuilderC1ERKNS0_4TypeEPKcPFPvS7_RKSt6vectorIS7_SaIS7_EES7_ES7_S6_h + fun:_ZN59_GLOBAL__N_.._src_NTupleSvc_NTupleSvc.cpp_17E02520_8B10567116NTupleSvc_dict48C1Ev + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN59_GLOBAL__N_.._src_NTupleSvc_NTupleSvc.cpp_17E02520_8B10567118s_NTupleSvc_dict48E + obj:/afs/cern.ch/atlas/offline/external/GAUDI/v19r6p4-LCG54f/GaudiSvc/i686-slc4-gcc34-dbg/libGaudiSvc.so +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__search_tagname + fun:G__get_linked_tagnum + fun:G__get_linked_tagnum_fwd + fun:G__cpp_setup_tagtableG__Unix + fun:G__cpp_setupG__Unix +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:_ZN9G__heritsixEi + fun:G__inheritance_setup + fun:G__cpp_setup_inheritanceG__Unix + fun:G__cpp_setupG__Unix + fun:G__call_setup_funcs +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__savestring + fun:G__allocvariable + fun:G__letvariable + fun:G__getexpr + fun:G__set_stdio +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:_ZN9G__paramsixEi + fun:G__memfunc_setup + fun:_Z18G__cpp_setup_func1v + fun:G__cpp_setup_funcG__Cont + fun:G__cpp_setupG__Cont +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__search_tagname + fun:G__get_linked_tagnum + fun:G__get_linked_tagnum_fwd + fun:G__cpp_setup_tagtableG__Unix + fun:G__cpp_setupG__Unix +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__allocvariable + fun:G__letvariable + fun:G__getexpr + fun:G__set_stdio + fun:G__main +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__search_tagname + fun:G__get_linked_tagnum + fun:G__get_linked_tagnum_fwd + fun:G__cpp_setup_tagtableG__Unix + fun:G__cpp_setupG__Unix +} +{ + + CINT leak + Memcheck:Leak + fun:malloc + fun:G__memfunc_next + fun:G__search_tagname + fun:G__get_linked_tagnum + fun:G__get_linked_tagnum_fwd + fun:G__cpp_setup_tagtableG__Unix +} + + + + + +{ + PersistencySvc factory leak + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI17EvtPersistencySvcE6createERKSsP11ISvcLocator + fun:_ZN72_GLOBAL__N_.._src_PersistencySvc_EvtPersistencySvc.cpp_EF105EC1_4A5556AB7FactoryI17EvtPersistencySvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + PersistencySvc factory leak + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI23HistogramPersistencySvcE6createERKSsP11ISvcLocator + fun:_ZN78_GLOBAL__N_.._src_PersistencySvc_HistogramPersistencySvc.cpp_9D2164D3_20537EF17FactoryI23HistogramPersistencySvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorIP8PropertyE8allocateEjPKv + fun:_ZNSt12_Vector_baseIP8PropertySaIS1_EE11_M_allocateEj + fun:_ZNSt6vectorIP8PropertySaIS1_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS1_S3_EERKS1_ + fun:_ZNSt6vectorIP8PropertySaIS1_EE9push_backERKS1_ + fun:_ZN11PropertyMgr15declarePropertyIbEEvRKSsRT_S2_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN11PropertyMgr15declarePropertyIbEEvRKSsRT_S2_ + fun:_ZNK7Service15declarePropertyIbEE10StatusCodeRKSsRT_S3_ + fun:_ZN7ServiceC2ERKSsP11ISvcLocator + fun:_ZN10MessageSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI10MessageSvcE6createERKSsP11ISvcLocator +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI10MessageSvcE6createERKSsP11ISvcLocator + fun:_ZN61_GLOBAL__N_.._src_MessageSvc_MessageSvc.cpp_9D2164D3_9ECD61837FactoryI10MessageSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI12StoreGateSvcE6createERKSsP11ISvcLocator + fun:_ZN71_GLOBAL__N_.._src_components_StoreGateSvc_entries.cxx_9D2164D3_6A2FD51A7FactoryI12StoreGateSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN11PropertyMgr15declarePropertyISsEEvRKSsRT_S2_ + fun:_ZNK7Service15declarePropertyISsEE10StatusCodeRKSsRT_S3_ + fun:_ZN10MessageSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI10MessageSvcE6createERKSsP11ISvcLocator + fun:_ZN61_GLOBAL__N_.._src_MessageSvc_MessageSvc.cpp_9D2164D3_9ECD61837FactoryI10MessageSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN7ServiceC2ERKSsP11ISvcLocator + fun:_ZN10MessageSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI10MessageSvcE6createERKSsP11ISvcLocator + fun:_ZN61_GLOBAL__N_.._src_MessageSvc_MessageSvc.cpp_9D2164D3_9ECD61837FactoryI10MessageSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorISsE8allocateEjPKv + fun:_ZNSt12_Vector_baseISsSaISsEE11_M_allocateEj + fun:_ZNSt12_Vector_baseISsSaISsEEC2EjRKS0_ + fun:_ZNSt6vectorISsSaISsEEC1ERKS1_ + fun:_ZN15BoundedVerifierISt6vectorISsSaISsEEEC1ERKS3_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI10HistorySvcE6createERKSsP11ISvcLocator + fun:_ZN61_GLOBAL__N_.._src_HistorySvc_HistorySvc.cpp_9D2164D3_852D11FA7FactoryI10HistorySvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI12EventLoopMgrE6createERKSsP11ISvcLocator + fun:_ZN67_GLOBAL__N_.._src_ApplicationMgr_EventLoopMgr.cpp_9D2164D3_238F8A117FactoryI12EventLoopMgrFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN14SimplePropertyISt6vectorISsSaISsEE15BoundedVerifierIS2_EEC1ES4_ + fun:_ZN10MessageSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI10MessageSvcE6createERKSsP11ISvcLocator + fun:_ZN61_GLOBAL__N_.._src_MessageSvc_MessageSvc.cpp_9D2164D3_9ECD61837FactoryI10MessageSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN8Property20declareUpdateHandlerI10MessageSvcEEvMT_FvRS_EPS2_ + fun:_ZN10MessageSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI10MessageSvcE6createERKSsP11ISvcLocator + fun:_ZN61_GLOBAL__N_.._src_MessageSvc_MessageSvc.cpp_9D2164D3_9ECD61837FactoryI10MessageSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKSsN5Gaudi7Parsers13PropertyEntryEEEE8allocateEjPKv + fun:_ZNSt8_Rb_treeISsSt4pairIKSsN5Gaudi7Parsers13PropertyEntryEESt10_Select1stIS5_ENS3_11_NoCaseCmp_ESaIS5_EE11_M_get_nodeEv + fun:_ZNSt8_Rb_treeISsSt4pairIKSsN5Gaudi7Parsers13PropertyEntryEESt10_Select1stIS5_ENS3_11_NoCaseCmp_ESaIS5_EE14_M_create_nodeERKS5_ + fun:_ZNSt8_Rb_treeISsSt4pairIKSsN5Gaudi7Parsers13PropertyEntryEESt10_Select1stIS5_ENS3_11_NoCaseCmp_ESaIS5_EE9_M_insertEPSt18_Rb_tree_node_baseSC_RKS5_ + fun:_ZNSt8_Rb_treeISsSt4pairIKSsN5Gaudi7Parsers13PropertyEntryEESt10_Select1stIS5_ENS3_11_NoCaseCmp_ESaIS5_EE13insert_uniqueERKS5_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI10EvtDataSvcE6createERKSsP11ISvcLocator + fun:_ZN58_GLOBAL__N_.._src_DataSvc_EvtDataSvc.cpp_EF105EC1_F55F41E77FactoryI10EvtDataSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN12StoreGateSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI12StoreGateSvcE6createERKSsP11ISvcLocator + fun:_ZN71_GLOBAL__N_.._src_components_StoreGateSvc_entries.cxx_9D2164D3_6A2FD51A7FactoryI12StoreGateSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI23HistogramPersistencySvcE6createERKSsP11ISvcLocator + fun:_ZN78_GLOBAL__N_.._src_PersistencySvc_HistogramPersistencySvc.cpp_9D2164D3_20537EF17FactoryI23HistogramPersistencySvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI12HistogramSvcE6createERKSsP11ISvcLocator + fun:_ZN65_GLOBAL__N_.._src_HistogramSvc_HistogramSvc.cpp_17E02520_EABF6AE47FactoryI12HistogramSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI13JobOptionsSvcE6createERKSsP11ISvcLocator + fun:_ZN67_GLOBAL__N_.._src_JobOptionsSvc_JobOptionsSvc.cpp_9D2164D3_253EDA187FactoryI13JobOptionsSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN8Property20declareUpdateHandlerI7ServiceEEvMT_FvRS_EPS2_ + fun:_ZN7ServiceC2ERKSsP11ISvcLocator + fun:_ZN10MessageSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI10MessageSvcE6createERKSsP11ISvcLocator + fun:_ZN61_GLOBAL__N_.._src_MessageSvc_MessageSvc.cpp_9D2164D3_9ECD61837FactoryI10MessageSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN13JobOptionsSvc22addPropertyToCatalogueERKSsRK8Property + fun:_ZN13JobOptionsSvc20fillServiceCatalogueEv + fun:_ZN13JobOptionsSvc11readOptionsERKSsS1_ + fun:_ZN13JobOptionsSvc10initializeEv + fun:_ZN14ApplicationMgr9i_startupEv +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN8Property20declareUpdateHandlerI14ApplicationMgrEEvMT_FvRS_EPS2_ + fun:_ZN14ApplicationMgrC1EP10IInterface + fun:_ZN69_GLOBAL__N_.._src_ApplicationMgr_ApplicationMgr.cpp_9D2164D3_A4BA85537FactoryI14ApplicationMgrFP10IInterfaceS3_EE4FuncEPvRKSt6vectorIS6_SaIS6_EES6_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP8IServiceEE8allocateEjPKv + fun:_ZNSt10_List_baseIP8IServiceSaIS1_EE11_M_get_nodeEv + fun:_ZNSt4listIP8IServiceSaIS1_EE14_M_create_nodeERKS1_ + fun:_ZNSt4listIP8IServiceSaIS1_EE9_M_insertESt14_List_iteratorIS1_ERKS1_ + fun:_ZNSt4listIP8IServiceSaIS1_EE9push_backERKS1_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI16ProxyProviderSvcE6createERKSsP11ISvcLocator + fun:_ZN66_GLOBAL__N_.._src_components_SGComps_entries.cxx_9D2164D3_35A4406C7FactoryI16ProxyProviderSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN11PropertyMgr15declarePropertyISt6vectorISsSaISsEEEEvRKSsRT_S5_ + fun:_ZNK7Service15declarePropertyISt6vectorISsSaISsEEEE10StatusCodeRKSsRT_S6_ + fun:_ZN10ClassIDSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI10ClassIDSvcE6createERKSsP11ISvcLocator + fun:_ZN68_GLOBAL__N_.._src_components_CLIDComps_entries.cxx_9D2164D3_6E09122B7FactoryI10ClassIDSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIN11IncidentSvc8ListenerEEE8allocateEjPKv + fun:_ZNSt10_List_baseIN11IncidentSvc8ListenerESaIS1_EE11_M_get_nodeEv + fun:_ZNSt4listIN11IncidentSvc8ListenerESaIS1_EE14_M_create_nodeERKS1_ + fun:_ZNSt4listIN11IncidentSvc8ListenerESaIS1_EE6insertESt14_List_iteratorIS1_ERKS1_ + fun:_ZN11IncidentSvc11addListenerEP17IIncidentListenerRKSslbb +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKSsSt3mapISsN5Gaudi7Parsers13PropertyEntryENS6_11_NoCaseCmp_ESaIS2_IS3_S7_EEEEEE8allocateEjPKv + fun:_ZNSt8_Rb_treeISsSt4pairIKSsSt3mapISsN5Gaudi7Parsers13PropertyEntryENS4_11_NoCaseCmp_ESaIS0_IS1_S5_EEEESt10_Select1stISA_ESt4lessISsESaISA_EE11_M_get_nodeEv + fun:_ZNSt8_Rb_treeISsSt4pairIKSsSt3mapISsN5Gaudi7Parsers13PropertyEntryENS4_11_NoCaseCmp_ESaIS0_IS1_S5_EEEESt10_Select1stISA_ESt4lessISsESaISA_EE14_M_create_nodeERKSA_ + fun:_ZNSt8_Rb_treeISsSt4pairIKSsSt3mapISsN5Gaudi7Parsers13PropertyEntryENS4_11_NoCaseCmp_ESaIS0_IS1_S5_EEEESt10_Select1stISA_ESt4lessISsESaISA_EE9_M_insertEPSt18_Rb_tree_node_baseSI_RKSA_ + fun:_ZNSt8_Rb_treeISsSt4pairIKSsSt3mapISsN5Gaudi7Parsers13PropertyEntryENS4_11_NoCaseCmp_ESaIS0_IS1_S5_EEEESt10_Select1stISA_ESt4lessISsESaISA_EE13insert_uniqueESt17_Rb_tree_iteratorISA_ERKSA_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorISt10_List_nodeISt4pairIP8IServiceiEEE8allocateEjPKv + fun:_ZNSt10_List_baseISt4pairIP8IServiceiESaIS3_EE11_M_get_nodeEv + fun:_ZNSt4listISt4pairIP8IServiceiESaIS3_EE14_M_create_nodeERKS3_ + fun:_ZNSt4listISt4pairIP8IServiceiESaIS3_EE6insertESt14_List_iteratorIS3_ERKS3_ + fun:_ZN14ServiceManager10addServiceEP8IServicei +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI10ClassIDSvcE6createERKSsP11ISvcLocator + fun:_ZN68_GLOBAL__N_.._src_components_CLIDComps_entries.cxx_9D2164D3_6E09122B7FactoryI10ClassIDSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI17EvtPersistencySvcE6createERKSsP11ISvcLocator + fun:_ZN72_GLOBAL__N_.._src_PersistencySvc_EvtPersistencySvc.cpp_EF105EC1_4A5556AB7FactoryI17EvtPersistencySvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI7ToolSvcE6createERKSsP11ISvcLocator + fun:_ZN55_GLOBAL__N_.._src_ToolSvc_ToolSvc.cpp_9D2164D3_0CE4793F7FactoryI7ToolSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI13AlgContextSvcE6createERKSsP11ISvcLocator + fun:_ZN67_GLOBAL__N_.._src_AlgContextSvc_AlgContextSvc.cpp_9D2164D3_0D7C1DBD7FactoryI13AlgContextSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI11IncidentSvcE6createERKSsP11ISvcLocator + fun:_ZN63_GLOBAL__N_.._src_IncidentSvc_IncidentSvc.cpp_9D2164D3_6CD632E57FactoryI11IncidentSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI13AppMgrRunableE6createERKSsP11ISvcLocator + fun:_ZN68_GLOBAL__N_.._src_ApplicationMgr_AppMgrRunable.cpp_9D2164D3_266AD5697FactoryI13AppMgrRunableFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN11PropertyMgr15declarePropertyIiEEvRKSsRT_S2_ + fun:_ZN14ApplicationMgrC1EP10IInterface + fun:_ZN69_GLOBAL__N_.._src_ApplicationMgr_ApplicationMgr.cpp_9D2164D3_A4BA85537FactoryI14ApplicationMgrFP10IInterfaceS3_EE4FuncEPvRKSt6vectorIS6_SaIS6_EES6_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN12StoreGateSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI12StoreGateSvcE6createERKSsP11ISvcLocator + fun:_ZN71_GLOBAL__N_.._src_components_StoreGateSvc_entries.cxx_9D2164D3_6A2FD51A7FactoryI12StoreGateSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN2SG10StringPoolC1Ev + fun:_ZN12StoreGateSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI12StoreGateSvcE6createERKSsP11ISvcLocator + fun:_ZN71_GLOBAL__N_.._src_components_StoreGateSvc_entries.cxx_9D2164D3_6A2FD51A7FactoryI12StoreGateSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN11PropertyMgr15declarePropertyIjEEvRKSsRT_S2_ + fun:_ZNK7Service15declarePropertyIjEE10StatusCodeRKSsRT_S3_ + fun:_ZN7DataSvcC2ERKSsP11ISvcLocator + fun:_ZN10EvtDataSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI10EvtDataSvcE6createERKSsP11ISvcLocator +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN7DataSvc9i_setRootERKSsP10DataObject + fun:_ZN7DataSvc7setRootERKSsP10DataObject + fun:_ZN12HistogramSvc10initializeEv + fun:_ZN7Service13sysInitializeEv + fun:_ZN14ServiceManager11makeServiceERKSsRP8IService +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN11PropertyMgr15declarePropertyISt3mapISsN5Gaudi10Histo1DDefESt4lessISsESaISt4pairIKSsS3_EEEEEvRS7_RT_SB_ + fun:_ZNK7Service15declarePropertyISt3mapISsN5Gaudi10Histo1DDefESt4lessISsESaISt4pairIKSsS3_EEEEE10StatusCodeRS7_RT_SC_ + fun:_ZN12HistogramSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI12HistogramSvcE6createERKSsP11ISvcLocator + fun:_ZN65_GLOBAL__N_.._src_HistogramSvc_HistogramSvc.cpp_17E02520_EABF6AE47FactoryI12HistogramSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN14ApplicationMgrC1EP10IInterface + fun:_ZN69_GLOBAL__N_.._src_ApplicationMgr_ApplicationMgr.cpp_9D2164D3_A4BA85537FactoryI14ApplicationMgrFP10IInterfaceS3_EE4FuncEPvRKSt6vectorIS6_SaIS6_EES6_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN11PropertyMgr15declarePropertyISt3mapISsSsSt4lessISsESaISt4pairIKSsSsEEEEEvRS5_RT_S9_ + fun:_ZN14ApplicationMgrC1EP10IInterface + fun:_ZN69_GLOBAL__N_.._src_ApplicationMgr_ApplicationMgr.cpp_9D2164D3_A4BA85537FactoryI14ApplicationMgrFP10IInterfaceS3_EE4FuncEPvRKSt6vectorIS6_SaIS6_EES6_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN8Property20declareUpdateHandlerI19MinimalEventLoopMgrEEvMT_FvRS_EPS2_ + fun:_ZN19MinimalEventLoopMgrC2ERKSsP11ISvcLocator + fun:_ZN12EventLoopMgrC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI12EventLoopMgrE6createERKSsP11ISvcLocator + fun:_ZN67_GLOBAL__N_.._src_ApplicationMgr_EventLoopMgr.cpp_9D2164D3_238F8A117FactoryI12EventLoopMgrFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN11IncidentSvc11addListenerEP17IIncidentListenerRKSslbb + fun:_ZN10ClassIDSvc10initializeEv + fun:_ZN7Service13sysInitializeEv + fun:_ZN14ServiceManager11makeServiceERKSsRP8IService + fun:_ZN14ServiceManager10getServiceERKSsRP8IServiceb +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorIPK8PropertyE8allocateEjPKv + fun:_ZNSt12_Vector_baseIPK8PropertySaIS2_EE11_M_allocateEj + fun:_ZNSt12_Vector_baseIPK8PropertySaIS2_EEC2EjRKS3_ + fun:_ZNSt6vectorIPK8PropertySaIS2_EEC1ERKS4_ + fun:_ZNSt4pairIKSsSt6vectorIPK8PropertySaIS4_EEEC1ERKS7_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN19JobOptionsCatalogueC1Ev + fun:_ZN13JobOptionsSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI13JobOptionsSvcE6createERKSsP11ISvcLocator + fun:_ZN67_GLOBAL__N_.._src_JobOptionsSvc_JobOptionsSvc.cpp_9D2164D3_253EDA187FactoryI13JobOptionsSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN14SimplePropertyIi15BoundedVerifierIiEEC1ES1_ + fun:_ZN7ServiceC2ERKSsP11ISvcLocator + fun:_ZN10MessageSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI10MessageSvcE6createERKSsP11ISvcLocator + fun:_ZN61_GLOBAL__N_.._src_MessageSvc_MessageSvc.cpp_9D2164D3_9ECD61837FactoryI10MessageSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN14SimplePropertyISs15BoundedVerifierISsEEC1ERKSsS4_S1_ + fun:_ZN13JobOptionsSvc22addPropertyToCatalogueERKSsRK8Property + fun:_ZN13JobOptionsSvc20fillServiceCatalogueEv + fun:_ZN13JobOptionsSvc11readOptionsERKSsS1_ + fun:_ZN13JobOptionsSvc10initializeEv +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN12HistogramSvc10initializeEv + fun:_ZN7Service13sysInitializeEv + fun:_ZN14ServiceManager11makeServiceERKSsRP8IService + fun:_ZN14ServiceManager10getServiceERKSsRP8IServiceb + fun:_ZN11ISvcLocator7serviceI15IDataManagerSvcEE10StatusCodeRKSsRPT_b +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN8Property20declareUpdateHandlerI12HistogramSvcEEvMT_FvRS_EPS2_ + fun:_ZN12HistogramSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI12HistogramSvcE6createERKSsP11ISvcLocator + fun:_ZN65_GLOBAL__N_.._src_HistogramSvc_HistogramSvc.cpp_17E02520_EABF6AE47FactoryI12HistogramSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN19MinimalEventLoopMgr10initializeEv + fun:_ZN12EventLoopMgr10initializeEv + fun:_ZN7Service13sysInitializeEv + fun:_ZN14ServiceManager18initializeServicesEv + fun:_ZN14ApplicationMgr10initializeEv +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN14SimplePropertyISs15BoundedVerifierISsEEC1ES1_ + fun:_ZN14ApplicationMgrC1EP10IInterface + fun:_ZN69_GLOBAL__N_.._src_ApplicationMgr_ApplicationMgr.cpp_9D2164D3_A4BA85537FactoryI14ApplicationMgrFP10IInterfaceS3_EE4FuncEPvRKSt6vectorIS6_SaIS6_EES6_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN14SimplePropertyIb15BoundedVerifierIbEEC1ES1_ + fun:_ZN7ServiceC2ERKSsP11ISvcLocator + fun:_ZN10MessageSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI10MessageSvcE6createERKSsP11ISvcLocator + fun:_ZN61_GLOBAL__N_.._src_MessageSvc_MessageSvc.cpp_9D2164D3_9ECD61837FactoryI10MessageSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN14SimplePropertyIj15BoundedVerifierIjEEC1ES1_ + fun:_ZN10MessageSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI10MessageSvcE6createERKSsP11ISvcLocator + fun:_ZN61_GLOBAL__N_.._src_MessageSvc_MessageSvc.cpp_9D2164D3_9ECD61837FactoryI10MessageSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN16AlgorithmManagerC1EP10IInterface + fun:_ZN14ApplicationMgrC1EP10IInterface + fun:_ZN69_GLOBAL__N_.._src_ApplicationMgr_ApplicationMgr.cpp_9D2164D3_A4BA85537FactoryI14ApplicationMgrFP10IInterfaceS3_EE4FuncEPvRKSt6vectorIS6_SaIS6_EES6_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} + diff --git a/Tools/ValgrindRTTJobs/share/Gaudi.supp b/Tools/ValgrindRTTJobs/share/Gaudi.supp new file mode 100644 index 000000000000..dcb31c32ce27 --- /dev/null +++ b/Tools/ValgrindRTTJobs/share/Gaudi.supp @@ -0,0 +1,551 @@ +{ + PersistencySvc factory leak + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI17EvtPersistencySvcE6createERKSsP11ISvcLocator + fun:_ZN72_GLOBAL__N_.._src_PersistencySvc_EvtPersistencySvc.cpp_EF105EC1_4A5556AB7FactoryI17EvtPersistencySvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + PersistencySvc factory leak + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI23HistogramPersistencySvcE6createERKSsP11ISvcLocator + fun:_ZN78_GLOBAL__N_.._src_PersistencySvc_HistogramPersistencySvc.cpp_9D2164D3_20537EF17FactoryI23HistogramPersistencySvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorIP8PropertyE8allocateEjPKv + fun:_ZNSt12_Vector_baseIP8PropertySaIS1_EE11_M_allocateEj + fun:_ZNSt6vectorIP8PropertySaIS1_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS1_S3_EERKS1_ + fun:_ZNSt6vectorIP8PropertySaIS1_EE9push_backERKS1_ + fun:_ZN11PropertyMgr15declarePropertyIbEEvRKSsRT_S2_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN11PropertyMgr15declarePropertyIbEEvRKSsRT_S2_ + fun:_ZNK7Service15declarePropertyIbEE10StatusCodeRKSsRT_S3_ + fun:_ZN7ServiceC2ERKSsP11ISvcLocator + fun:_ZN10MessageSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI10MessageSvcE6createERKSsP11ISvcLocator +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI10MessageSvcE6createERKSsP11ISvcLocator + fun:_ZN61_GLOBAL__N_.._src_MessageSvc_MessageSvc.cpp_9D2164D3_9ECD61837FactoryI10MessageSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI12StoreGateSvcE6createERKSsP11ISvcLocator + fun:_ZN71_GLOBAL__N_.._src_components_StoreGateSvc_entries.cxx_9D2164D3_6A2FD51A7FactoryI12StoreGateSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN11PropertyMgr15declarePropertyISsEEvRKSsRT_S2_ + fun:_ZNK7Service15declarePropertyISsEE10StatusCodeRKSsRT_S3_ + fun:_ZN10MessageSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI10MessageSvcE6createERKSsP11ISvcLocator + fun:_ZN61_GLOBAL__N_.._src_MessageSvc_MessageSvc.cpp_9D2164D3_9ECD61837FactoryI10MessageSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN7ServiceC2ERKSsP11ISvcLocator + fun:_ZN10MessageSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI10MessageSvcE6createERKSsP11ISvcLocator + fun:_ZN61_GLOBAL__N_.._src_MessageSvc_MessageSvc.cpp_9D2164D3_9ECD61837FactoryI10MessageSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorISsE8allocateEjPKv + fun:_ZNSt12_Vector_baseISsSaISsEE11_M_allocateEj + fun:_ZNSt12_Vector_baseISsSaISsEEC2EjRKS0_ + fun:_ZNSt6vectorISsSaISsEEC1ERKS1_ + fun:_ZN15BoundedVerifierISt6vectorISsSaISsEEEC1ERKS3_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI10HistorySvcE6createERKSsP11ISvcLocator + fun:_ZN61_GLOBAL__N_.._src_HistorySvc_HistorySvc.cpp_9D2164D3_852D11FA7FactoryI10HistorySvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI12EventLoopMgrE6createERKSsP11ISvcLocator + fun:_ZN67_GLOBAL__N_.._src_ApplicationMgr_EventLoopMgr.cpp_9D2164D3_238F8A117FactoryI12EventLoopMgrFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN14SimplePropertyISt6vectorISsSaISsEE15BoundedVerifierIS2_EEC1ES4_ + fun:_ZN10MessageSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI10MessageSvcE6createERKSsP11ISvcLocator + fun:_ZN61_GLOBAL__N_.._src_MessageSvc_MessageSvc.cpp_9D2164D3_9ECD61837FactoryI10MessageSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN8Property20declareUpdateHandlerI10MessageSvcEEvMT_FvRS_EPS2_ + fun:_ZN10MessageSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI10MessageSvcE6createERKSsP11ISvcLocator + fun:_ZN61_GLOBAL__N_.._src_MessageSvc_MessageSvc.cpp_9D2164D3_9ECD61837FactoryI10MessageSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKSsN5Gaudi7Parsers13PropertyEntryEEEE8allocateEjPKv + fun:_ZNSt8_Rb_treeISsSt4pairIKSsN5Gaudi7Parsers13PropertyEntryEESt10_Select1stIS5_ENS3_11_NoCaseCmp_ESaIS5_EE11_M_get_nodeEv + fun:_ZNSt8_Rb_treeISsSt4pairIKSsN5Gaudi7Parsers13PropertyEntryEESt10_Select1stIS5_ENS3_11_NoCaseCmp_ESaIS5_EE14_M_create_nodeERKS5_ + fun:_ZNSt8_Rb_treeISsSt4pairIKSsN5Gaudi7Parsers13PropertyEntryEESt10_Select1stIS5_ENS3_11_NoCaseCmp_ESaIS5_EE9_M_insertEPSt18_Rb_tree_node_baseSC_RKS5_ + fun:_ZNSt8_Rb_treeISsSt4pairIKSsN5Gaudi7Parsers13PropertyEntryEESt10_Select1stIS5_ENS3_11_NoCaseCmp_ESaIS5_EE13insert_uniqueERKS5_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI10EvtDataSvcE6createERKSsP11ISvcLocator + fun:_ZN58_GLOBAL__N_.._src_DataSvc_EvtDataSvc.cpp_EF105EC1_F55F41E77FactoryI10EvtDataSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN12StoreGateSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI12StoreGateSvcE6createERKSsP11ISvcLocator + fun:_ZN71_GLOBAL__N_.._src_components_StoreGateSvc_entries.cxx_9D2164D3_6A2FD51A7FactoryI12StoreGateSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI23HistogramPersistencySvcE6createERKSsP11ISvcLocator + fun:_ZN78_GLOBAL__N_.._src_PersistencySvc_HistogramPersistencySvc.cpp_9D2164D3_20537EF17FactoryI23HistogramPersistencySvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI12HistogramSvcE6createERKSsP11ISvcLocator + fun:_ZN65_GLOBAL__N_.._src_HistogramSvc_HistogramSvc.cpp_17E02520_EABF6AE47FactoryI12HistogramSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI13JobOptionsSvcE6createERKSsP11ISvcLocator + fun:_ZN67_GLOBAL__N_.._src_JobOptionsSvc_JobOptionsSvc.cpp_9D2164D3_253EDA187FactoryI13JobOptionsSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN8Property20declareUpdateHandlerI7ServiceEEvMT_FvRS_EPS2_ + fun:_ZN7ServiceC2ERKSsP11ISvcLocator + fun:_ZN10MessageSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI10MessageSvcE6createERKSsP11ISvcLocator + fun:_ZN61_GLOBAL__N_.._src_MessageSvc_MessageSvc.cpp_9D2164D3_9ECD61837FactoryI10MessageSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN13JobOptionsSvc22addPropertyToCatalogueERKSsRK8Property + fun:_ZN13JobOptionsSvc20fillServiceCatalogueEv + fun:_ZN13JobOptionsSvc11readOptionsERKSsS1_ + fun:_ZN13JobOptionsSvc10initializeEv + fun:_ZN14ApplicationMgr9i_startupEv +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN8Property20declareUpdateHandlerI14ApplicationMgrEEvMT_FvRS_EPS2_ + fun:_ZN14ApplicationMgrC1EP10IInterface + fun:_ZN69_GLOBAL__N_.._src_ApplicationMgr_ApplicationMgr.cpp_9D2164D3_A4BA85537FactoryI14ApplicationMgrFP10IInterfaceS3_EE4FuncEPvRKSt6vectorIS6_SaIS6_EES6_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP8IServiceEE8allocateEjPKv + fun:_ZNSt10_List_baseIP8IServiceSaIS1_EE11_M_get_nodeEv + fun:_ZNSt4listIP8IServiceSaIS1_EE14_M_create_nodeERKS1_ + fun:_ZNSt4listIP8IServiceSaIS1_EE9_M_insertESt14_List_iteratorIS1_ERKS1_ + fun:_ZNSt4listIP8IServiceSaIS1_EE9push_backERKS1_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI16ProxyProviderSvcE6createERKSsP11ISvcLocator + fun:_ZN66_GLOBAL__N_.._src_components_SGComps_entries.cxx_9D2164D3_35A4406C7FactoryI16ProxyProviderSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN11PropertyMgr15declarePropertyISt6vectorISsSaISsEEEEvRKSsRT_S5_ + fun:_ZNK7Service15declarePropertyISt6vectorISsSaISsEEEE10StatusCodeRKSsRT_S6_ + fun:_ZN10ClassIDSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI10ClassIDSvcE6createERKSsP11ISvcLocator + fun:_ZN68_GLOBAL__N_.._src_components_CLIDComps_entries.cxx_9D2164D3_6E09122B7FactoryI10ClassIDSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIN11IncidentSvc8ListenerEEE8allocateEjPKv + fun:_ZNSt10_List_baseIN11IncidentSvc8ListenerESaIS1_EE11_M_get_nodeEv + fun:_ZNSt4listIN11IncidentSvc8ListenerESaIS1_EE14_M_create_nodeERKS1_ + fun:_ZNSt4listIN11IncidentSvc8ListenerESaIS1_EE6insertESt14_List_iteratorIS1_ERKS1_ + fun:_ZN11IncidentSvc11addListenerEP17IIncidentListenerRKSslbb +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKSsSt3mapISsN5Gaudi7Parsers13PropertyEntryENS6_11_NoCaseCmp_ESaIS2_IS3_S7_EEEEEE8allocateEjPKv + fun:_ZNSt8_Rb_treeISsSt4pairIKSsSt3mapISsN5Gaudi7Parsers13PropertyEntryENS4_11_NoCaseCmp_ESaIS0_IS1_S5_EEEESt10_Select1stISA_ESt4lessISsESaISA_EE11_M_get_nodeEv + fun:_ZNSt8_Rb_treeISsSt4pairIKSsSt3mapISsN5Gaudi7Parsers13PropertyEntryENS4_11_NoCaseCmp_ESaIS0_IS1_S5_EEEESt10_Select1stISA_ESt4lessISsESaISA_EE14_M_create_nodeERKSA_ + fun:_ZNSt8_Rb_treeISsSt4pairIKSsSt3mapISsN5Gaudi7Parsers13PropertyEntryENS4_11_NoCaseCmp_ESaIS0_IS1_S5_EEEESt10_Select1stISA_ESt4lessISsESaISA_EE9_M_insertEPSt18_Rb_tree_node_baseSI_RKSA_ + fun:_ZNSt8_Rb_treeISsSt4pairIKSsSt3mapISsN5Gaudi7Parsers13PropertyEntryENS4_11_NoCaseCmp_ESaIS0_IS1_S5_EEEESt10_Select1stISA_ESt4lessISsESaISA_EE13insert_uniqueESt17_Rb_tree_iteratorISA_ERKSA_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorISt10_List_nodeISt4pairIP8IServiceiEEE8allocateEjPKv + fun:_ZNSt10_List_baseISt4pairIP8IServiceiESaIS3_EE11_M_get_nodeEv + fun:_ZNSt4listISt4pairIP8IServiceiESaIS3_EE14_M_create_nodeERKS3_ + fun:_ZNSt4listISt4pairIP8IServiceiESaIS3_EE6insertESt14_List_iteratorIS3_ERKS3_ + fun:_ZN14ServiceManager10addServiceEP8IServicei +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI10ClassIDSvcE6createERKSsP11ISvcLocator + fun:_ZN68_GLOBAL__N_.._src_components_CLIDComps_entries.cxx_9D2164D3_6E09122B7FactoryI10ClassIDSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI17EvtPersistencySvcE6createERKSsP11ISvcLocator + fun:_ZN72_GLOBAL__N_.._src_PersistencySvc_EvtPersistencySvc.cpp_EF105EC1_4A5556AB7FactoryI17EvtPersistencySvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI7ToolSvcE6createERKSsP11ISvcLocator + fun:_ZN55_GLOBAL__N_.._src_ToolSvc_ToolSvc.cpp_9D2164D3_0CE4793F7FactoryI7ToolSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI13AlgContextSvcE6createERKSsP11ISvcLocator + fun:_ZN67_GLOBAL__N_.._src_AlgContextSvc_AlgContextSvc.cpp_9D2164D3_0D7C1DBD7FactoryI13AlgContextSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI11IncidentSvcE6createERKSsP11ISvcLocator + fun:_ZN63_GLOBAL__N_.._src_IncidentSvc_IncidentSvc.cpp_9D2164D3_6CD632E57FactoryI11IncidentSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN10SvcFactoryI13AppMgrRunableE6createERKSsP11ISvcLocator + fun:_ZN68_GLOBAL__N_.._src_ApplicationMgr_AppMgrRunable.cpp_9D2164D3_266AD5697FactoryI13AppMgrRunableFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN11PropertyMgr15declarePropertyIiEEvRKSsRT_S2_ + fun:_ZN14ApplicationMgrC1EP10IInterface + fun:_ZN69_GLOBAL__N_.._src_ApplicationMgr_ApplicationMgr.cpp_9D2164D3_A4BA85537FactoryI14ApplicationMgrFP10IInterfaceS3_EE4FuncEPvRKSt6vectorIS6_SaIS6_EES6_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN12StoreGateSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI12StoreGateSvcE6createERKSsP11ISvcLocator + fun:_ZN71_GLOBAL__N_.._src_components_StoreGateSvc_entries.cxx_9D2164D3_6A2FD51A7FactoryI12StoreGateSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN2SG10StringPoolC1Ev + fun:_ZN12StoreGateSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI12StoreGateSvcE6createERKSsP11ISvcLocator + fun:_ZN71_GLOBAL__N_.._src_components_StoreGateSvc_entries.cxx_9D2164D3_6A2FD51A7FactoryI12StoreGateSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN11PropertyMgr15declarePropertyIjEEvRKSsRT_S2_ + fun:_ZNK7Service15declarePropertyIjEE10StatusCodeRKSsRT_S3_ + fun:_ZN7DataSvcC2ERKSsP11ISvcLocator + fun:_ZN10EvtDataSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI10EvtDataSvcE6createERKSsP11ISvcLocator +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN7DataSvc9i_setRootERKSsP10DataObject + fun:_ZN7DataSvc7setRootERKSsP10DataObject + fun:_ZN12HistogramSvc10initializeEv + fun:_ZN7Service13sysInitializeEv + fun:_ZN14ServiceManager11makeServiceERKSsRP8IService +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN11PropertyMgr15declarePropertyISt3mapISsN5Gaudi10Histo1DDefESt4lessISsESaISt4pairIKSsS3_EEEEEvRS7_RT_SB_ + fun:_ZNK7Service15declarePropertyISt3mapISsN5Gaudi10Histo1DDefESt4lessISsESaISt4pairIKSsS3_EEEEE10StatusCodeRS7_RT_SC_ + fun:_ZN12HistogramSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI12HistogramSvcE6createERKSsP11ISvcLocator + fun:_ZN65_GLOBAL__N_.._src_HistogramSvc_HistogramSvc.cpp_17E02520_EABF6AE47FactoryI12HistogramSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN14ApplicationMgrC1EP10IInterface + fun:_ZN69_GLOBAL__N_.._src_ApplicationMgr_ApplicationMgr.cpp_9D2164D3_A4BA85537FactoryI14ApplicationMgrFP10IInterfaceS3_EE4FuncEPvRKSt6vectorIS6_SaIS6_EES6_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN11PropertyMgr15declarePropertyISt3mapISsSsSt4lessISsESaISt4pairIKSsSsEEEEEvRS5_RT_S9_ + fun:_ZN14ApplicationMgrC1EP10IInterface + fun:_ZN69_GLOBAL__N_.._src_ApplicationMgr_ApplicationMgr.cpp_9D2164D3_A4BA85537FactoryI14ApplicationMgrFP10IInterfaceS3_EE4FuncEPvRKSt6vectorIS6_SaIS6_EES6_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN8Property20declareUpdateHandlerI19MinimalEventLoopMgrEEvMT_FvRS_EPS2_ + fun:_ZN19MinimalEventLoopMgrC2ERKSsP11ISvcLocator + fun:_ZN12EventLoopMgrC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI12EventLoopMgrE6createERKSsP11ISvcLocator + fun:_ZN67_GLOBAL__N_.._src_ApplicationMgr_EventLoopMgr.cpp_9D2164D3_238F8A117FactoryI12EventLoopMgrFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN11IncidentSvc11addListenerEP17IIncidentListenerRKSslbb + fun:_ZN10ClassIDSvc10initializeEv + fun:_ZN7Service13sysInitializeEv + fun:_ZN14ServiceManager11makeServiceERKSsRP8IService + fun:_ZN14ServiceManager10getServiceERKSsRP8IServiceb +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorIPK8PropertyE8allocateEjPKv + fun:_ZNSt12_Vector_baseIPK8PropertySaIS2_EE11_M_allocateEj + fun:_ZNSt12_Vector_baseIPK8PropertySaIS2_EEC2EjRKS3_ + fun:_ZNSt6vectorIPK8PropertySaIS2_EEC1ERKS4_ + fun:_ZNSt4pairIKSsSt6vectorIPK8PropertySaIS4_EEEC1ERKS7_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN19JobOptionsCatalogueC1Ev + fun:_ZN13JobOptionsSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI13JobOptionsSvcE6createERKSsP11ISvcLocator + fun:_ZN67_GLOBAL__N_.._src_JobOptionsSvc_JobOptionsSvc.cpp_9D2164D3_253EDA187FactoryI13JobOptionsSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN14SimplePropertyIi15BoundedVerifierIiEEC1ES1_ + fun:_ZN7ServiceC2ERKSsP11ISvcLocator + fun:_ZN10MessageSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI10MessageSvcE6createERKSsP11ISvcLocator + fun:_ZN61_GLOBAL__N_.._src_MessageSvc_MessageSvc.cpp_9D2164D3_9ECD61837FactoryI10MessageSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN14SimplePropertyISs15BoundedVerifierISsEEC1ERKSsS4_S1_ + fun:_ZN13JobOptionsSvc22addPropertyToCatalogueERKSsRK8Property + fun:_ZN13JobOptionsSvc20fillServiceCatalogueEv + fun:_ZN13JobOptionsSvc11readOptionsERKSsS1_ + fun:_ZN13JobOptionsSvc10initializeEv +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN12HistogramSvc10initializeEv + fun:_ZN7Service13sysInitializeEv + fun:_ZN14ServiceManager11makeServiceERKSsRP8IService + fun:_ZN14ServiceManager10getServiceERKSsRP8IServiceb + fun:_ZN11ISvcLocator7serviceI15IDataManagerSvcEE10StatusCodeRKSsRPT_b +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN8Property20declareUpdateHandlerI12HistogramSvcEEvMT_FvRS_EPS2_ + fun:_ZN12HistogramSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI12HistogramSvcE6createERKSsP11ISvcLocator + fun:_ZN65_GLOBAL__N_.._src_HistogramSvc_HistogramSvc.cpp_17E02520_EABF6AE47FactoryI12HistogramSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN19MinimalEventLoopMgr10initializeEv + fun:_ZN12EventLoopMgr10initializeEv + fun:_ZN7Service13sysInitializeEv + fun:_ZN14ServiceManager18initializeServicesEv + fun:_ZN14ApplicationMgr10initializeEv +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN14SimplePropertyISs15BoundedVerifierISsEEC1ES1_ + fun:_ZN14ApplicationMgrC1EP10IInterface + fun:_ZN69_GLOBAL__N_.._src_ApplicationMgr_ApplicationMgr.cpp_9D2164D3_A4BA85537FactoryI14ApplicationMgrFP10IInterfaceS3_EE4FuncEPvRKSt6vectorIS6_SaIS6_EES6_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN14SimplePropertyIb15BoundedVerifierIbEEC1ES1_ + fun:_ZN7ServiceC2ERKSsP11ISvcLocator + fun:_ZN10MessageSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI10MessageSvcE6createERKSsP11ISvcLocator + fun:_ZN61_GLOBAL__N_.._src_MessageSvc_MessageSvc.cpp_9D2164D3_9ECD61837FactoryI10MessageSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN14SimplePropertyIj15BoundedVerifierIjEEC1ES1_ + fun:_ZN10MessageSvcC1ERKSsP11ISvcLocator + fun:_ZN10SvcFactoryI10MessageSvcE6createERKSsP11ISvcLocator + fun:_ZN61_GLOBAL__N_.._src_MessageSvc_MessageSvc.cpp_9D2164D3_9ECD61837FactoryI10MessageSvcFP8IServiceSsP11ISvcLocatorEE4FuncEPvRKSt6vectorIS8_SaIS8_EES8_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} +{ + <insert a suppression name here> + Memcheck:Leak + fun:_Znwj + fun:_ZN16AlgorithmManagerC1EP10IInterface + fun:_ZN14ApplicationMgrC1EP10IInterface + fun:_ZN69_GLOBAL__N_.._src_ApplicationMgr_ApplicationMgr.cpp_9D2164D3_A4BA85537FactoryI14ApplicationMgrFP10IInterfaceS3_EE4FuncEPvRKSt6vectorIS6_SaIS6_EES6_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE +} + diff --git a/Tools/ValgrindRTTJobs/share/root.supp b/Tools/ValgrindRTTJobs/share/root.supp new file mode 100644 index 000000000000..ea69d159434e --- /dev/null +++ b/Tools/ValgrindRTTJobs/share/root.supp @@ -0,0 +1,1035 @@ +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex6ReflexC1Ev + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN4ROOT6Reflex6ReflexC2Ev + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libReflex.so + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libReflex.so +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex11TypeBuilderEPKcj + fun:_ZN4ROOT6Reflex13TypeDistillerISsE3GetEv + fun:_ZN4ROOT6Reflex17FunctionDistillerIFP8IServiceSsP11ISvcLocatorEE3GetEv + fun:_ZN55_GLOBAL__N_.._src_ToolSvc_ToolSvc.cpp_9D2164D3_0CE4793F14ToolSvc_dict20C1Ev + fun:_Z41__static_initialization_and_destruction_0ii +} +{ + TArray leak + Memcheck:Leak + fun:_Znaj + fun:_ZN7TArrayI3SetEi + fun:_ZN6TColor10SetPaletteEiPi + fun:_ZN6TStyle10SetPaletteEiPi + fun:_ZN6TStyle5ResetEPKc + fun:_ZN6TStyleC1EPKcS1_ +} +{ + TStorage leak + Memcheck:Leak + fun:_Znwj + fun:_ZN8TStorage11ObjectAllocEj + fun:_ZN7TObjectnwEj + fun:_ZNK4ROOT20TQObjectInitBehavior11CreateClassEPKcsRKSt9type_infoP16TVirtualIsAProxyPFvPvR16TMemberInspectorPcES2_S2_ii + fun:_ZN4ROOT17TGenericClassInfo8GetClassEv + fun:_ZN8TQObject5ClassEv +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZNSs4_Rep9_S_createEjjRKSaIcE + obj:/usr/lib/libstdc++.so.6.0.3 + fun:_ZNSsC1EPKcRKSaIcE + fun:_ZN4ROOT6Reflex9ScopeNameC1EPKcPNS0_9ScopeBaseE + fun:_ZN4ROOT6Reflex5Scope11__NIRVANA__Ev +} +{ + TString leak + Memcheck:Leak + fun:_Znaj + fun:_ZN10TStringRef6GetRepEii + fun:_ZN7TStringC1EPKc + fun:_ZN10TObjStringC1EPKc + fun:_ZN4ROOT18TMapTypeToClassRec3AddEPKcRP9TClassRec + fun:_ZN11TClassTable3AddEPKcsRKSt9type_infoPFvvEi +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__store_dictposition + fun:G__storerewindposition + fun:G__exec_text + fun:G__platformMacro + fun:G__set_stdio +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorIN4ROOT6Reflex5ScopeEE8allocateEjPKv + fun:_ZNSt12_Vector_baseIN4ROOT6Reflex5ScopeESaIS2_EE11_M_allocateEj + fun:_ZNSt6vectorIN4ROOT6Reflex5ScopeESaIS2_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS2_S4_EERKS2_ + fun:_ZNSt6vectorIN4ROOT6Reflex5ScopeESaIS2_EE9push_backERKS2_ + fun:_ZNK4ROOT6Reflex9ScopeBase11AddSubScopeERKNS0_5ScopeE +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex9ScopeBaseC2EPKcNS0_4TYPEE + fun:_ZN4ROOT6Reflex9NamespaceC1EPKc + fun:_ZN4ROOT6Reflex16NamespaceBuilderC1EPKc + fun:_ZN4ROOT6Reflex13PluginServiceC1Ev + fun:_ZN4ROOT6Reflex13PluginService8InstanceEv +} +{ + CINT Leak + Memcheck:Leak + fun:_Znwj + fun:G__call_setup_funcs + fun:_ZN24G__cpp_setup_initG__MathC1Ev + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN4ROOT20GenerateInitInstanceEPK8TComplex + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libCore.so +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZNK4ROOT6Reflex3Any6HolderIPKcE5CloneEv + fun:_ZN4ROOT6Reflex3AnyC1ERKS1_ + fun:_ZN4ROOT6Reflex3AnyaSERKS1_ + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyEjRKNS0_3AnyE + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyERKSsRKNS0_3AnyE +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex9ScopeBaseC2Ev + fun:_ZN4ROOT6Reflex9NamespaceC1Ev + fun:_ZN4ROOT6Reflex9Namespace11GlobalScopeEv + fun:_ZN4ROOT6Reflex6ReflexC1Ev + fun:_Z41__static_initialization_and_destruction_0ii +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex9ScopeBaseC2EPKcNS0_4TYPEE + fun:_ZN4ROOT6Reflex9NamespaceC1EPKc + fun:_ZN4ROOT6Reflex16NamespaceBuilderC1EPKc + fun:_ZN4ROOT6Reflex13PluginServiceC1Ev + fun:_ZN4ROOT6Reflex13PluginService8InstanceEv +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex9ScopeBaseC2Ev + fun:_ZN4ROOT6Reflex9NamespaceC1Ev + fun:_ZN4ROOT6Reflex9Namespace11GlobalScopeEv + fun:_ZN4ROOT6Reflex6ReflexC1Ev + fun:_Z41__static_initialization_and_destruction_0ii +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex9ScopeNameC1EPKcPNS0_9ScopeBaseE + fun:_ZN4ROOT6Reflex5Scope11__NIRVANA__Ev + fun:_ZN4ROOT6Reflex9ScopeBaseC2Ev + fun:_ZN4ROOT6Reflex9NamespaceC1Ev + fun:_ZN4ROOT6Reflex9Namespace11GlobalScopeEv +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex5Scope11__NIRVANA__Ev + fun:_ZN4ROOT6Reflex9ScopeBaseC2Ev + fun:_ZN4ROOT6Reflex9NamespaceC1Ev + fun:_ZN4ROOT6Reflex9Namespace11GlobalScopeEv + fun:_ZN4ROOT6Reflex6ReflexC1Ev +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex9ScopeNameC1EPKcPNS0_9ScopeBaseE + fun:_ZN4ROOT6Reflex11TypeBuilderEPKcj + fun:_ZN4ROOT6Reflex13TypeDistillerISsE3GetEv + fun:_ZN4ROOT6Reflex17FunctionDistillerIFP8IServiceSsP11ISvcLocatorEE3GetEv + fun:_ZN55_GLOBAL__N_.._src_ToolSvc_ToolSvc.cpp_9D2164D3_0CE4793F14ToolSvc_dict20C1Ev +} +{ + Memcheck:Leak + fun:calloc + fun:_dlerror_run + fun:dlopen@GLIBC_2.0 + fun:_ZN4ROOT6Reflex13SharedLibrary4LoadEv + fun:_ZN4ROOT6Reflex13PluginService14LoadFactoryLibERKSs + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZN5TList10NewOptLinkEP7TObjectPKcP8TObjLink + fun:_ZN5TList7AddLastEP7TObjectPKc + fun:_ZN5TList3AddEP7TObjectPKc + fun:_ZN5TROOTC1EPKcS1_PPFvvE + fun:_ZN4ROOT7GetROOTEv +} +{ + Memcheck:Leak + fun:malloc + fun:G__getparameterlist + fun:G__createfuncmacro + fun:G__define + fun:G__keyword_anytime_7 + fun:G__exec_statement +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZN11TClassTableC1Ev + fun:_ZN11TClassTable3AddEPKcsRKSt9type_infoPFvvEi + fun:_ZN4ROOT8AddClassEPKcsRKSt9type_infoPFvvEi + fun:_ZNK4ROOT20TDefaultInitBehavior8RegisterEPKcsRKSt9type_infoPFvvEi + fun:_ZN4ROOT17TGenericClassInfo4InitEi +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex9ScopeNameC1EPKcPNS0_9ScopeBaseE + fun:_ZN4ROOT6Reflex11TypeBuilderEPKcj + fun:_ZN4ROOT6Reflex13TypeDistillerIN2SG6FolderEE3GetEv + fun:_ZN4ROOT6Reflex7GetTypeIN2SG6FolderEEERKNS0_4TypeEv + fun:_ZN66_GLOBAL__N_.._src_components_SGComps_entries.cxx_9D2164D3_35A4406C12Folder_dict8C1Ev +} +{ + Memcheck:Leak + fun:malloc + fun:G__add_ipath + fun:_ZN5TCint14AddIncludePathEPKc + fun:_ZN5TROOTC1EPKcS1_PPFvvE + fun:_ZN4ROOT7GetROOTEv + fun:_ZN6TTimer5ResetEv +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT25GenerateInitInstanceLocalEPK10TObjString + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN4ROOT20GenerateInitInstanceEPK16TMemberInspector + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libCore.so + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libCore.so +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT25GenerateInitInstanceLocalEPK8TQObject + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN4ROOT20GenerateInitInstanceEPK16TMemberInspector + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libCore.so + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libCore.so +} +{ + Memcheck:Leak + fun:_Znwj + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN6TLimit7fgTableE + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libHist.so + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libHist.so + fun:_dl_init +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex11TypeBuilderEPKcj + fun:_ZN4ROOT6Reflex13TypeDistillerIN2SG6FolderEE3GetEv + fun:_ZN4ROOT6Reflex7GetTypeIN2SG6FolderEEERKNS0_4TypeEv + fun:_ZN66_GLOBAL__N_.._src_components_SGComps_entries.cxx_9D2164D3_35A4406C12Folder_dict8C1Ev + fun:_Z41__static_initialization_and_destruction_0ii +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__memfunc_para_setup + fun:G__parse_parameter_link + fun:G__memfunc_setup + fun:_Z18G__cpp_setup_func1v + fun:G__cpp_setup_funcG__Base1 +} +{ + CINT leak + Memcheck:Leak + fun:_Znwj + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I_gCINTMutex + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libCore.so + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libCore.so + fun:_dl_init +} +{ + CINT leak + Memcheck:Leak + fun:_Znwj + fun:_ZN5TCint12SetClassInfoEP6TClassb + fun:_ZN6TClass4InitEPKcsPKSt9type_infoP16TVirtualIsAProxyPFvPvR16TMemberInspectorPcES1_S1_ii + fun:_ZN6TClassC1EPKcsRKSt9type_infoP16TVirtualIsAProxyPFvPvR16TMemberInspectorPcES1_S1_ii + fun:_ZN4ROOT11CreateClassEPKcsRKSt9type_infoP16TVirtualIsAProxyPFvPvR16TMemberInspectorPcES1_S1_ii + fun:_ZNK4ROOT20TDefaultInitBehavior11CreateClassEPKcsRKSt9type_infoP16TVirtualIsAProxyPFvPvR16TMemberInspectorPcES2_S2_ii +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__createfuncmacro + fun:G__define + fun:G__keyword_anytime_7 + fun:G__exec_statement + fun:G__loadfile_tmpfile +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZNK4ROOT6Reflex3Any6HolderIjE5CloneEv + fun:_ZN4ROOT6Reflex3AnyC1ERKS1_ + fun:_ZN4ROOT6Reflex3AnyaSERKS1_ + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyEjRKNS0_3AnyE + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyERKSsRKNS0_3AnyE +} +{ + CINT leak + Memcheck:Leak + fun:_Znwj + fun:G__stack_instance + fun:G__resetplocal + fun:_Z20G__cpp_setup_global0v + fun:G__cpp_setup_globalG__Math + fun:G__cpp_setupG__Math +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorIN4ROOT6Reflex3AnyEE8allocateEjPKv + fun:_ZNSt12_Vector_baseIN4ROOT6Reflex3AnyESaIS2_EE11_M_allocateEj + fun:_ZNSt6vectorIN4ROOT6Reflex3AnyESaIS2_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS2_S4_EEjRKS2_ + fun:_ZNSt6vectorIN4ROOT6Reflex3AnyESaIS2_EE6insertEN9__gnu_cxx17__normal_iteratorIPS2_S4_EEjRKS2_ + fun:_ZNSt6vectorIN4ROOT6Reflex3AnyESaIS2_EE6resizeEjRKS2_ +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorIN4ROOT6Reflex4TypeEE8allocateEjPKv + fun:_ZNSt12_Vector_baseIN4ROOT6Reflex4TypeESaIS2_EE11_M_allocateEj + fun:_ZNSt12_Vector_baseIN4ROOT6Reflex4TypeESaIS2_EEC2EjRKS3_ + fun:_ZNSt6vectorIN4ROOT6Reflex4TypeESaIS2_EEC1ERKS4_ + fun:_ZN4ROOT6Reflex8FunctionC1ERKNS0_4TypeERKSt6vectorIS2_SaIS2_EERKSt9type_infoNS0_4TYPEE +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex9Namespace11GlobalScopeEv + fun:_ZN4ROOT6Reflex6ReflexC1Ev + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN4ROOT6Reflex6ReflexC2Ev + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libReflex.so +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__getparameterlist + fun:G__createfuncmacro + fun:G__define + fun:G__keyword_anytime_7 + fun:G__exec_statement +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZN5TList10NewOptLinkEP7TObjectPKcP8TObjLink + fun:_ZN5TList7AddLastEP7TObjectPKc + fun:_ZN5TList3AddEP7TObjectPKc + fun:_ZN5TROOTC1EPKcS1_PPFvvE + fun:_ZN4ROOT7GetROOTEv +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex8TypeBaseC2EPKcjNS0_4TYPEERKSt9type_infoRKNS0_4TypeE + fun:_ZN4ROOT6Reflex7PointerC1ERKNS0_4TypeERKSt9type_info + fun:_ZN4ROOT6Reflex14PointerBuilderERKNS0_4TypeERKSt9type_info + fun:_ZN4ROOT6Reflex13TypeDistillerIP10IInterfaceE3GetEv + fun:_ZN4ROOT6Reflex13TypeDistillerIKP10IInterfaceE3GetEv +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex16NamespaceBuilderC1EPKc + fun:_ZN4ROOT6Reflex13PluginServiceC1Ev + fun:_ZN4ROOT6Reflex13PluginService8InstanceEv + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateIP10IInterfaceS4_EET_RKSsRKT0_ +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZNK4ROOT6Reflex3Any6HolderIPKcE5CloneEv + fun:_ZN4ROOT6Reflex3AnyC1ERKS1_ + fun:_ZN4ROOT6Reflex3AnyaSERKS1_ + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyEjRKNS0_3AnyE + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyERKSsRKNS0_3AnyE +} +{ + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT14DefineBehaviorEP8TQObjectS1_ + fun:_ZN4ROOT25GenerateInitInstanceLocalEPK6TTimer + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN4ROOT20GenerateInitInstanceEPK16TMemberInspector + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libCore.so +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__add_ipath + fun:_ZN5TCint14AddIncludePathEPKc + fun:_ZN5TROOTC1EPKcS1_PPFvvE + fun:_ZN4ROOT7GetROOTEv + fun:_ZN6TTimer5ResetEv +} +{ + CINT leak + Memcheck:Leak + fun:realloc + fun:G__add_setup_func + fun:_ZN26G__cpp_setup_initG__MatrixC1Ev + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN4ROOT20GenerateInitInstanceEPK12TMatrixTBaseIfE + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libMatrix.so +} +{ + CINT leak + Memcheck:Leak + fun:realloc + fun:G__add_ipath + fun:_ZN5TCint14AddIncludePathEPKc + fun:_ZN5TROOTC1EPKcS1_PPFvvE + fun:_ZN4ROOT7GetROOTEv + fun:_ZN6TTimer5ResetEv +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__malloc + fun:G__allocvariable + fun:G__letvariable + fun:G__getexpr + fun:G__set_stdio +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex8TypeBaseC2EPKcjNS0_4TYPEERKSt9type_infoRKNS0_4TypeE + fun:_ZN4ROOT6Reflex7PointerC1ERKNS0_4TypeERKSt9type_info + fun:_ZN4ROOT6Reflex14PointerBuilderERKNS0_4TypeERKSt9type_info + fun:_ZN4ROOT6Reflex13TypeDistillerIP10IInterfaceE3GetEv + fun:_ZN4ROOT6Reflex13TypeDistillerIKP10IInterfaceE3GetEv +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex8TypeBaseC2EPKcjNS0_4TYPEERKSt9type_infoRKNS0_4TypeE + fun:_ZN4ROOT6Reflex7TypedefC1EPKcRKNS0_4TypeENS0_4TYPEES6_ + fun:_ZN4ROOT6Reflex6ReflexC1Ev + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN4ROOT6Reflex6ReflexC2Ev +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyEjRKNS0_3AnyE + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyERKSsRKNS0_3AnyE + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyERKSsPKc + fun:_ZNK4ROOT6Reflex12PropertyList11AddPropertyERKSsPKc + fun:_ZN4ROOT6Reflex6ReflexC1Ev +} +{ + dlopen leak + Memcheck:Leak + fun:malloc + fun:realloc + fun:_dl_lookup_symbol_x + fun:_dl_relocate_object + fun:dl_open_worker + fun:_dl_catch_error +} +{ + dlopen leak + Memcheck:Leak + fun:malloc + fun:add_to_global + fun:dl_open_worker + fun:_dl_catch_error + fun:_dl_open + fun:dlopen_doit +} +{ + dlopen leak + Memcheck:Leak + fun:malloc + fun:_dl_map_object_deps + fun:dl_open_worker + fun:_dl_catch_error + fun:_dl_open + fun:dlopen_doit +} +{ + dlopen leak + Memcheck:Leak + fun:malloc + fun:_dl_new_object + fun:_dl_map_object_from_fd + fun:_dl_map_object + fun:openaux + fun:_dl_catch_error +} +{ + dlopen leak + Memcheck:Leak + fun:malloc + fun:open_path + fun:_dl_map_object + fun:openaux + fun:_dl_catch_error + fun:_dl_map_object_deps +} +{ + dlopen leak + Memcheck:Leak + fun:calloc + fun:_dl_check_map_versions + fun:dl_open_worker + fun:_dl_catch_error + fun:_dl_open + fun:dlopen_doit +} +{ + dlopen leak + Memcheck:Leak + fun:calloc + fun:_dl_new_object + fun:_dl_map_object_from_fd + fun:_dl_map_object + fun:dl_open_worker + fun:_dl_catch_error +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZNK4ROOT6Reflex3Any6HolderI11InterfaceIDE5CloneEv + fun:_ZN4ROOT6Reflex3AnyC1ERKS1_ + fun:_ZN4ROOT6Reflex3AnyaSERKS1_ + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyEjRKNS0_3AnyE + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyERKSsRKNS0_3AnyE +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__createfuncmacro + fun:G__define + fun:G__keyword_anytime_7 + fun:G__exec_statement + fun:G__loadfile_tmpfile +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex10MemberBaseC2EPKcRKNS0_4TypeENS0_4TYPEEj + fun:_ZN4ROOT6Reflex14FunctionMemberC1EPKcRKNS0_4TypeEPFPvS7_RKSt6vectorIS7_SaIS7_EES7_ES7_S3_jNS0_4TYPEE + fun:_ZN4ROOT6Reflex15FunctionBuilderC1ERKNS0_4TypeEPKcPFPvS7_RKSt6vectorIS7_SaIS7_EES7_ES7_S6_h + fun:_ZN67_GLOBAL__N_.._src_DataSvc_PartitionSwitchTool.cpp_9D2164D3_EEE8248227PartitionSwitchTool_dict128C1Ev + fun:_Z41__static_initialization_and_destruction_0ii +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex19FunctionTypeBuilderERKNS0_4TypeERKSt6vectorIS1_SaIS1_EERKSt9type_info + fun:_ZN4ROOT6Reflex17FunctionDistillerIFP8IAlgToolSsSsPK10IInterfaceEE3GetEv + fun:_ZN67_GLOBAL__N_.._src_DataSvc_PartitionSwitchTool.cpp_9D2164D3_EEE8248227PartitionSwitchTool_dict128C1Ev + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN67_GLOBAL__N_.._src_DataSvc_PartitionSwitchTool.cpp_9D2164D3_EEE8248229s_PartitionSwitchTool_dict128E +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex8TypeNameC1EPKcPNS0_8TypeBaseEPKSt9type_info + fun:_ZN4ROOT6Reflex8TypeBaseC2EPKcjNS0_4TYPEERKSt9type_infoRKNS0_4TypeE + fun:_ZN4ROOT6Reflex11FundamentalC1EPKcjRKSt9type_info + fun:_ZN4ROOT6Reflex6ReflexC1Ev + fun:_Z41__static_initialization_and_destruction_0ii +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex8TypeBaseC2EPKcjNS0_4TYPEERKSt9type_infoRKNS0_4TypeE + fun:_ZN4ROOT6Reflex11FundamentalC1EPKcjRKSt9type_info + fun:_ZN4ROOT6Reflex6ReflexC1Ev + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN4ROOT6Reflex6ReflexC2Ev +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex14PointerBuilderERKNS0_4TypeERKSt9type_info + fun:_ZN4ROOT6Reflex13TypeDistillerIP10IInterfaceE3GetEv + fun:_ZN4ROOT6Reflex13TypeDistillerIKP10IInterfaceE3GetEv + fun:_ZN4ROOT6Reflex7GetTypeIKP10IInterfaceEERKNS0_4TypeEv + fun:_ZN4ROOT6Reflex11ValueObjectC1IKP10IInterfaceEERT_ +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__createtemplateclass + fun:G__tagtable_setup + fun:G__cpp_setup_tagtableG__Base3 + fun:G__cpp_setupG__Base3 + fun:G__call_setup_funcs +} +{ + Graf leak + Memcheck:Leak + fun:_Znaj + fun:_ZN11TWebPaletteC1Ev + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I_gWebImagePalette + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libGraf.so + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libGraf.so +} +{ + Graf leak + Memcheck:Leak + fun:_Znaj + fun:_ZN11TWebPaletteC1Ev + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I_gWebImagePalette + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libGraf.so + obj:/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34_dbg/root/lib/libGraf.so +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex8TypeBaseC2EPKcjNS0_4TYPEERKSt9type_infoRKNS0_4TypeE + fun:_ZN4ROOT6Reflex11FundamentalC1EPKcjRKSt9type_info + fun:_ZN4ROOT6Reflex6ReflexC1Ev + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN4ROOT6Reflex6ReflexC2Ev +} +{ + ROOT leak + Memcheck:Leak + fun:_Znwj + fun:_ZN5TList7NewLinkEP7TObjectP8TObjLink + fun:_ZN5TList7AddLastEP7TObject + fun:_ZN5TList3AddEP7TObject + fun:_ZN10THashTable3AddEP7TObject + fun:_ZN4TMap3AddEP7TObjectS1_ +} +{ + CINT leak + Memcheck:Leak + fun:_Znwj + fun:_ZN5TCint17UpdateListOfTypesEv + fun:_ZN5TROOT14GetListOfTypesEb + fun:_ZNK5TROOT7GetTypeEPKcb + fun:_ZN6TClass8GetClassEPKcb + fun:_ZNK5TROOT8GetClassEPKcb +} +{ + TClass leak + Memcheck:Leak + fun:_Znaj + fun:_ZN8TStorage5AllocEj + fun:_ZN9TObjArray4InitEii + fun:_ZN9TObjArrayC1Eii + fun:_ZN6TClass4InitEPKcsPKSt9type_infoP16TVirtualIsAProxyPFvPvR16TMemberInspectorPcES1_S1_ii + fun:_ZN6TClassC1EPKcsRKSt9type_infoP16TVirtualIsAProxyPFvPvR16TMemberInspectorPcES1_S1_ii +} +{ + TClass leak + Memcheck:Leak + fun:_Znaj + fun:_Z6StrDupPKc + fun:_ZN11TClassTable3AddEPKcsRKSt9type_infoPFvvEi + fun:_ZN4ROOT8AddClassEPKcsRKSt9type_infoPFvvEi + fun:_ZNK4ROOT20TDefaultInitBehavior8RegisterEPKcsRKSt9type_infoPFvvEi + fun:_ZN4ROOT17TGenericClassInfo4InitEi +} +{ + TClass leak + Memcheck:Leak + fun:_Znaj + fun:_ZN11TClassTableC1Ev + fun:_ZN11TClassTable3AddEPKcsRKSt9type_infoPFvvEi + fun:_ZN4ROOT8AddClassEPKcsRKSt9type_infoPFvvEi + fun:_ZNK4ROOT20TDefaultInitBehavior8RegisterEPKcsRKSt9type_infoPFvvEi + fun:_ZN4ROOT17TGenericClassInfo4InitEi +} +{ + TClass leak + Memcheck:Leak + fun:_Znwj + fun:_ZN11TClassTable11FindElementEPKcb + fun:_ZN11TClassTable3AddEPKcsRKSt9type_infoPFvvEi + fun:_ZN4ROOT8AddClassEPKcsRKSt9type_infoPFvvEi + fun:_ZNK4ROOT20TDefaultInitBehavior8RegisterEPKcsRKSt9type_infoPFvvEi + fun:_ZN4ROOT17TGenericClassInfo4InitEi +} +{ + TClass leak + Memcheck:Leak + fun:_Znaj + fun:_ZN10THashTableC1Eii + fun:_ZN4TMapC1Eii + fun:_ZN4ROOT18TMapTypeToClassRecC1Ev + fun:_ZN11TClassTableC1Ev + fun:_ZN11TClassTable3AddEPKcsRKSt9type_infoPFvvEi +} +{ + TClass leak + Memcheck:Leak + fun:_Znwj + fun:_ZN8TStorage11ObjectAllocEj + fun:_ZN7TObjectnwEj + fun:_ZN4TMap3AddEP7TObjectS1_ + fun:_ZN4ROOT18TMapTypeToClassRec3AddEPKcRP9TClassRec + fun:_ZN11TClassTable3AddEPKcsRKSt9type_infoPFvvEi +} +{ + TClass leak + Memcheck:Leak + fun:_Znaj + fun:_ZN12TObjectTableC1Ei + fun:_ZN12TObjectTable6AddObjEP7TObject + fun:_ZN7TObjectC2Ev + fun:_ZN11TClassTableC1Ev + fun:_ZN11TClassTable3AddEPKcsRKSt9type_infoPFvvEi +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorIN4ROOT6Reflex11OwnedMemberEE8allocateEjPKv + fun:_ZNSt12_Vector_baseIN4ROOT6Reflex11OwnedMemberESaIS2_EE11_M_allocateEj + fun:_ZNSt6vectorIN4ROOT6Reflex11OwnedMemberESaIS2_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS2_S4_EERKS2_ + fun:_ZNSt6vectorIN4ROOT6Reflex11OwnedMemberESaIS2_EE9push_backERKS2_ + fun:_ZNK4ROOT6Reflex9ScopeBase17AddFunctionMemberERKNS0_6MemberE +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorIN4ROOT6Reflex6MemberEE8allocateEjPKv + fun:_ZNSt12_Vector_baseIN4ROOT6Reflex6MemberESaIS2_EE11_M_allocateEj + fun:_ZNSt6vectorIN4ROOT6Reflex6MemberESaIS2_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS2_S4_EERKS2_ + fun:_ZNSt6vectorIN4ROOT6Reflex6MemberESaIS2_EE9push_backERKS2_ + fun:_ZNK4ROOT6Reflex9ScopeBase17AddFunctionMemberERKNS0_6MemberE +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZNK4ROOT6Reflex3Any6HolderISsE5CloneEv + fun:_ZN4ROOT6Reflex3AnyC1ERKS1_ + fun:_ZN4ROOT6Reflex3AnyaSERKS1_ + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyEjRKNS0_3AnyE + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyERKSsRKNS0_3AnyE +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex10MemberBaseC2EPKcRKNS0_4TypeENS0_4TYPEEj + fun:_ZN4ROOT6Reflex14FunctionMemberC1EPKcRKNS0_4TypeEPFPvS7_RKSt6vectorIS7_SaIS7_EES7_ES7_S3_jNS0_4TYPEE + fun:_ZN4ROOT6Reflex15FunctionBuilderC1ERKNS0_4TypeEPKcPFPvS7_RKSt6vectorIS7_SaIS7_EES7_ES7_S6_h + fun:_ZN59_GLOBAL__N_.._src_NTupleSvc_NTupleSvc.cpp_17E02520_8B10567116NTupleSvc_dict48C1Ev + fun:_Z41__static_initialization_and_destruction_0ii +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex8TypeNameC1EPKcPNS0_8TypeBaseEPKSt9type_info + fun:_ZN4ROOT6Reflex11TypeBuilderEPKcj + fun:_ZN4ROOT6Reflex13TypeDistillerI10IInterfaceE3GetEv + fun:_ZN4ROOT6Reflex13TypeDistillerIP10IInterfaceE3GetEv + fun:_ZN4ROOT6Reflex13TypeDistillerIKP10IInterfaceE3GetEv +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN9__gnu_cxx13new_allocatorIN4ROOT6Reflex3AnyEE8allocateEjPKv + fun:_ZNSt12_Vector_baseIN4ROOT6Reflex3AnyESaIS2_EE11_M_allocateEj + fun:_ZNSt6vectorIN4ROOT6Reflex3AnyESaIS2_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS2_S4_EEjRKS2_ + fun:_ZNSt6vectorIN4ROOT6Reflex3AnyESaIS2_EE6insertEN9__gnu_cxx17__normal_iteratorIPS2_S4_EEjRKS2_ + fun:_ZNSt6vectorIN4ROOT6Reflex3AnyESaIS2_EE6resizeEjRKS2_ +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyEjRKNS0_3AnyE + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyERKSsRKNS0_3AnyE + fun:_ZN4ROOT6Reflex16PropertyListImpl11AddPropertyERKSsPKc + fun:_ZNK4ROOT6Reflex12PropertyList11AddPropertyERKSsPKc + fun:_ZN4ROOT6Reflex9ScopeBaseC2Ev +} +{ + TUnix leak + Memcheck:Leak + fun:_Znaj + fun:_ZN7TSystemC2EPKcS1_ + fun:_ZN11TUnixSystemC1Ev + fun:_ZN5TROOT10InitSystemEv + fun:_ZN5TROOTC1EPKcS1_PPFvvE + fun:_ZN4ROOT7GetROOTEv +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex11TypeBuilderEPKcj + fun:_ZN4ROOT6Reflex13TypeDistillerI10IInterfaceE3GetEv + fun:_ZN4ROOT6Reflex13TypeDistillerIP10IInterfaceE3GetEv + fun:_ZN4ROOT6Reflex13TypeDistillerIKP10IInterfaceE3GetEv + fun:_ZN4ROOT6Reflex7GetTypeIKP10IInterfaceEERKNS0_4TypeEv +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN69_GLOBAL__N_.._src_ApplicationMgr_ApplicationMgr.cpp_9D2164D3_A4BA85537FactoryI14ApplicationMgrFP10IInterfaceS3_EE4FuncEPvRKSt6vectorIS6_SaIS6_EES6_ + fun:_ZNK4ROOT6Reflex14FunctionMember6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateERKSsRKNS0_4TypeERKSt6vectorINS0_11ValueObjectESaIS8_EE + fun:_ZN4ROOT6Reflex13PluginService6CreateIP10IInterfaceS4_EET_RKSsRKT0_ +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZNSs4_Rep9_S_createEjjRKSaIcE + obj:/usr/lib/libstdc++.so.6.0.3 + fun:_ZNSsC1EPKcRKSaIcE + fun:_ZN4ROOT6Reflex8TypeNameC1EPKcPNS0_8TypeBaseEPKSt9type_info + fun:_ZN4ROOT6Reflex8TypeBaseC2EPKcjNS0_4TYPEERKSt9type_infoRKNS0_4TypeE +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__search_tagname + fun:G__get_linked_tagnum + fun:G__get_linked_tagnum_fwd + fun:G__cpp_setup_tagtableG__Unix + fun:G__cpp_setupG__Unix +} +{ + CINT leak + Memcheck:Leak + fun:calloc + fun:G__malloc + fun:_Z16G__alloc_var_refIiPFl8G__valueEEviT0_PcP12G__var_arrayiRS0_ + fun:G__allocvariable + fun:G__letvariable + fun:G__getexpr +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__createtemplateclass + fun:G__tagtable_setup + fun:G__cpp_setup_tagtableG__Base3 + fun:G__cpp_setupG__Base3 + fun:G__call_setup_funcs +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__search_typename + fun:G__search_typename2 + fun:G__cpp_setup_typetableG__Unix + fun:G__cpp_setupG__Unix + fun:G__call_setup_funcs +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__memfunc_para_setup + fun:G__parse_parameter_link + fun:G__memfunc_setup + fun:_Z18G__cpp_setup_func1v + fun:G__cpp_setup_funcG__Cont +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:_ZN9G__heritsixEi + fun:G__inheritance_setup + fun:G__cpp_setup_inheritanceG__Unix + fun:G__cpp_setupG__Unix + fun:G__call_setup_funcs +} +{ + CINT leak + Memcheck:Leak + fun:_Znwj + fun:G__search_tagname + fun:G__get_linked_tagnum + fun:G__get_linked_tagnum_fwd + fun:G__cpp_setup_tagtableG__Unix + fun:G__cpp_setupG__Unix +} +{ + CINT leak + Memcheck:Leak + fun:_Znwj + fun:G__search_tagname + fun:G__get_linked_tagnum + fun:G__get_linked_tagnum_fwd + fun:G__cpp_setup_tagtableG__Unix + fun:G__cpp_setupG__Unix +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__search_tagname + fun:G__get_linked_tagnum + fun:G__get_linked_tagnum_fwd + fun:G__cpp_setup_tagtableG__Unix + fun:G__cpp_setupG__Unix +} +{ + Reflex leak + Memcheck:Leak + fun:_Znwj + fun:_ZN4ROOT6Reflex15FunctionBuilderC1ERKNS0_4TypeEPKcPFPvS7_RKSt6vectorIS7_SaIS7_EES7_ES7_S6_h + fun:_ZN59_GLOBAL__N_.._src_NTupleSvc_NTupleSvc.cpp_17E02520_8B10567116NTupleSvc_dict48C1Ev + fun:_Z41__static_initialization_and_destruction_0ii + fun:_GLOBAL__I__ZN59_GLOBAL__N_.._src_NTupleSvc_NTupleSvc.cpp_17E02520_8B10567118s_NTupleSvc_dict48E + obj:/afs/cern.ch/atlas/offline/external/GAUDI/v19r6p4-LCG54f/GaudiSvc/i686-slc4-gcc34-dbg/libGaudiSvc.so +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__search_tagname + fun:G__get_linked_tagnum + fun:G__get_linked_tagnum_fwd + fun:G__cpp_setup_tagtableG__Unix + fun:G__cpp_setupG__Unix +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:_ZN9G__heritsixEi + fun:G__inheritance_setup + fun:G__cpp_setup_inheritanceG__Unix + fun:G__cpp_setupG__Unix + fun:G__call_setup_funcs +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__savestring + fun:G__allocvariable + fun:G__letvariable + fun:G__getexpr + fun:G__set_stdio +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:_ZN9G__paramsixEi + fun:G__memfunc_setup + fun:_Z18G__cpp_setup_func1v + fun:G__cpp_setup_funcG__Cont + fun:G__cpp_setupG__Cont +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__search_tagname + fun:G__get_linked_tagnum + fun:G__get_linked_tagnum_fwd + fun:G__cpp_setup_tagtableG__Unix + fun:G__cpp_setupG__Unix +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__allocvariable + fun:G__letvariable + fun:G__getexpr + fun:G__set_stdio + fun:G__main +} +{ + CINT leak + Memcheck:Leak + fun:malloc + fun:G__search_tagname + fun:G__get_linked_tagnum + fun:G__get_linked_tagnum_fwd + fun:G__cpp_setup_tagtableG__Unix + fun:G__cpp_setupG__Unix +} +{ + + CINT leak + Memcheck:Leak + fun:malloc + fun:G__memfunc_next + fun:G__search_tagname + fun:G__get_linked_tagnum + fun:G__get_linked_tagnum_fwd + fun:G__cpp_setup_tagtableG__Unix +} + diff --git a/Tools/ValgrindRTTJobs/share/valgrind-python.supp b/Tools/ValgrindRTTJobs/share/valgrind-python.supp new file mode 100644 index 000000000000..e09ea96ae120 --- /dev/null +++ b/Tools/ValgrindRTTJobs/share/valgrind-python.supp @@ -0,0 +1,217 @@ +# +# This is a valgrind suppression file that should be used when using valgrind. +# +# Here's an example of running valgrind: +# +# cd python/dist/src +# valgrind --tool=memcheck --suppressions=Misc/valgrind-python.supp \ +# ./python -E -tt ./Lib/test/regrtest.py -u bsddb,network +# +# You must edit Objects/obmalloc.c and uncomment Py_USING_MEMORY_DEBUGGER +# to use the preferred suppressions with Py_ADDRESS_IN_RANGE. +# +# If you do not want to recompile Python, you can uncomment +# suppressions for PyObject_Free and PyObject_Realloc. +# +# See Misc/README.valgrind for more information. + +# all tool names: Addrcheck,Memcheck,cachegrind,helgrind,massif +{ + ADDRESS_IN_RANGE/Invalid read of size 4 + Memcheck:Addr4 + fun:Py_ADDRESS_IN_RANGE +} + +{ + ADDRESS_IN_RANGE/Invalid read of size 4 + Memcheck:Value4 + fun:Py_ADDRESS_IN_RANGE +} + +{ + ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value + Memcheck:Cond + fun:Py_ADDRESS_IN_RANGE +} + +###{ +### ADDRESS_IN_RANGE/Invalid read of size 4 +### Memcheck:Addr4 +### fun:PyObject_Free +###} +### +###{ +### ADDRESS_IN_RANGE/Invalid read of size 4 +### Memcheck:Value4 +### fun:PyObject_Free +###} +### +###{ +### ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value +### Memcheck:Cond +### fun:PyObject_Free +###} + +###{ +### ADDRESS_IN_RANGE/Invalid read of size 4 +### Memcheck:Addr4 +### fun:PyObject_Realloc +###} +### +###{ +### ADDRESS_IN_RANGE/Invalid read of size 4 +### Memcheck:Value4 +### fun:PyObject_Realloc +###} +### +###{ +### ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value +### Memcheck:Cond +### fun:PyObject_Realloc +###} + +### +### All the suppressions below are for errors that occur within libraries +### that Python uses. The problems to not appear to be related to Python's +### use of the libraries. +### +{ + GDBM problems, see test_gdbm + Memcheck:Param + write(buf) + fun:write + fun:gdbm_open + +} + +### +### These occur from somewhere within the SSL, when running +### test_socket_sll. They are too general to leave on by default. +### +###{ +### somewhere in SSL stuff +### Memcheck:Cond +### fun:memset +###} +###{ +### somewhere in SSL stuff +### Memcheck:Value4 +### fun:memset +###} +### +###{ +### somewhere in SSL stuff +### Memcheck:Cond +### fun:MD5_Update +###} +### +###{ +### somewhere in SSL stuff +### Memcheck:Value4 +### fun:MD5_Update +###} + +# +# All of these problems come from using test_socket_ssl +# +{ + from test_socket_ssl + Memcheck:Cond + fun:BN_bin2bn +} + +{ + from test_socket_ssl + Memcheck:Cond + fun:BN_num_bits_word +} + +{ + from test_socket_ssl + Memcheck:Value4 + fun:BN_num_bits_word +} + +{ + from test_socket_ssl + Memcheck:Cond + fun:BN_mod_exp_mont_word +} + +{ + from test_socket_ssl + Memcheck:Cond + fun:BN_mod_exp_mont +} + +{ + from test_socket_ssl + Memcheck:Param + write(buf) + fun:write + obj:/usr/lib/libcrypto.so.0.9.7 +} + +{ + from test_socket_ssl + Memcheck:Cond + fun:RSA_verify +} + +{ + from test_socket_ssl + Memcheck:Value4 + fun:RSA_verify +} + +{ + from test_socket_ssl + Memcheck:Value4 + fun:DES_set_key_unchecked +} + +{ + from test_socket_ssl + Memcheck:Value4 + fun:DES_encrypt2 +} + +{ + from test_socket_ssl + Memcheck:Cond + obj:/usr/lib/libssl.so.0.9.7 +} + +{ + from test_socket_ssl + Memcheck:Value4 + obj:/usr/lib/libssl.so.0.9.7 +} + +{ + from test_socket_ssl + Memcheck:Cond + fun:BUF_MEM_grow_clean +} + +{ + from test_socket_ssl + Memcheck:Cond + fun:memcpy + fun:ssl3_read_bytes +} + +{ + from test_socket_ssl + Memcheck:Cond + fun:SHA1_Update +} + +{ + from test_socket_ssl + Memcheck:Value4 + fun:SHA1_Update +} + + + -- GitLab From 80c8578a962d663e4417a9c63ce467a93d4ebb32 Mon Sep 17 00:00:00 2001 From: Jochen Meyer <Jochen.Meyer@cern.ch> Date: Sun, 10 Jun 2018 01:31:32 +0200 Subject: [PATCH 095/562] updating AtlasValgrind.supp to the really latest of 20.7 Former-commit-id: c4dd4ba5598323a08d66c0b4f2dcea83d74b29ed --- Tools/ValgrindRTTJobs/share/AtlasValgrind.supp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Tools/ValgrindRTTJobs/share/AtlasValgrind.supp b/Tools/ValgrindRTTJobs/share/AtlasValgrind.supp index 61bbbffed6bd..26326a3c5102 100644 --- a/Tools/ValgrindRTTJobs/share/AtlasValgrind.supp +++ b/Tools/ValgrindRTTJobs/share/AtlasValgrind.supp @@ -1,3 +1,4 @@ + { Reflex leak Memcheck:Leak @@ -1621,3 +1622,14 @@ fun:_ZNK4ROOT6Reflex6Member6InvokeERKNS0_6ObjectERKSt6vectorIPvSaIS6_EE } + +##################### +# frontier_client +{ + FrontierClient:frontier_str_copy/wordcopy_fwd_dest_aligned + Memcheck:Addr8 + fun:_wordcopy_fwd_dest_aligned + fun:bcopy + fun:frontier_str_copy +} + -- GitLab From 0d683aca0ba458e511b6106f581ebd037dcbb5dd Mon Sep 17 00:00:00 2001 From: Walter Lampl <Walter.Lampl@cern.ch> Date: Mon, 11 Jun 2018 10:29:26 +0200 Subject: [PATCH 096/562] retrieve MetaData tools as private tools Former-commit-id: 1ca554df9723acb7bcfa19260b788d4c67a3ab7d --- Control/AthenaServices/src/MetaDataSvc.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Control/AthenaServices/src/MetaDataSvc.cxx b/Control/AthenaServices/src/MetaDataSvc.cxx index 89769199fd03..abf3ab0ce842 100644 --- a/Control/AthenaServices/src/MetaDataSvc.cxx +++ b/Control/AthenaServices/src/MetaDataSvc.cxx @@ -39,7 +39,8 @@ MetaDataSvc::MetaDataSvc(const std::string& name, ISvcLocator* pSvcLocator) : :: m_allowMetaDataStop(false), m_persToClid(), m_toolForClid(), - m_streamForKey() { + m_streamForKey(), + m_metaDataTools(this){ // declare properties declareProperty("MetaDataContainer", m_metaDataCont = ""); declareProperty("MetaDataTools", m_metaDataTools); -- GitLab From 0ac9518b68d77b29afedfae9991cae7c291c9fc2 Mon Sep 17 00:00:00 2001 From: Walter Lampl <Walter.Lampl@cern.ch> Date: Mon, 11 Jun 2018 10:31:05 +0200 Subject: [PATCH 097/562] adjust jobO for private meta-data tools Former-commit-id: ab4bc14da69c6e55949cb801ed85940e221a8b8e --- .../AthenaPoolCnvSvc/python/ReadAthenaPool.py | 8 ++++-- .../ByteStreamCnvSvc/python/ReadByteStream.py | 9 ++---- .../python/CutFlowHelpers.py | 3 -- .../share/RecExCommon_topOptions.py | 28 +++++++++---------- .../share/skeleton.RAWtoESD_tf.py | 4 +-- .../TrigConfigSvc/python/TriggerConfig.py | 8 ++---- 6 files changed, 23 insertions(+), 37 deletions(-) diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/python/ReadAthenaPool.py b/Database/AthenaPOOL/AthenaPoolCnvSvc/python/ReadAthenaPool.py index bc645a681acf..7748a115c4b9 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/python/ReadAthenaPool.py +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/python/ReadAthenaPool.py @@ -49,9 +49,11 @@ def _configureReadAthenaPool(): # Enable IOVDbSvc to read MetaData svcMgr.MetaDataSvc.MetaDataContainer = "MetaDataHdr" - svcMgr.MetaDataSvc.MetaDataTools += [ "IOVDbMetaDataTool" ] - if not hasattr (svcMgr.ToolSvc, 'IOVDbMetaDataTool'): - svcMgr.ToolSvc += CfgMgr.IOVDbMetaDataTool() + svcMgr.MetaDataSvc.MetaDataTools += [ CfgMgr.IOVDbMetaDataTool() ] + + #svcMgr.MetaDataSvc.MetaDataTools += [ "IOVDbMetaDataTool" ] + #if not hasattr (svcMgr.ToolSvc, 'IOVDbMetaDataTool'): + # svcMgr.ToolSvc += CfgMgr.IOVDbMetaDataTool() # Add in EventSelector svcMgr += CfgMgr.EventSelectorAthenaPool ("EventSelector") diff --git a/Event/ByteStreamCnvSvc/python/ReadByteStream.py b/Event/ByteStreamCnvSvc/python/ReadByteStream.py index 301a7b47fad9..5ff19fd6cf4c 100644 --- a/Event/ByteStreamCnvSvc/python/ReadByteStream.py +++ b/Event/ByteStreamCnvSvc/python/ReadByteStream.py @@ -58,15 +58,10 @@ if not hasattr (svcMgr, 'MetaDataStore'): # enable IOVDbSvc to read metadata svcMgr.MetaDataSvc.MetaDataContainer = "MetaDataHdr" -svcMgr.MetaDataSvc.MetaDataTools += [ "IOVDbMetaDataTool" ] - -if not hasattr (svcMgr.ToolSvc, 'IOVDbMetaDataTool'): - svcMgr.ToolSvc += CfgMgr.IOVDbMetaDataTool() +svcMgr.MetaDataSvc.MetaDataTools += [ CfgMgr.IOVDbMetaDataTool() ] # Enable ByteStream to read MetaData -svcMgr.MetaDataSvc.MetaDataTools += [ "ByteStreamMetadataTool" ] -if not hasattr (svcMgr.ToolSvc, 'ByteStreamMetadataTool'): - svcMgr.ToolSvc += CfgMgr.ByteStreamMetadataTool() +svcMgr.MetaDataSvc.MetaDataTools += [ CfgMgr.ByteStreamMetadataTool() ] # User metadata in FMD if not hasattr (svcMgr, 'ByteStreamAttListMetadataSvc'): diff --git a/Event/EventBookkeeperTools/python/CutFlowHelpers.py b/Event/EventBookkeeperTools/python/CutFlowHelpers.py index 98b28176bd21..8534bf81ca27 100644 --- a/Event/EventBookkeeperTools/python/CutFlowHelpers.py +++ b/Event/EventBookkeeperTools/python/CutFlowHelpers.py @@ -80,8 +80,6 @@ def CreateCutFlowSvc( svcName="CutFlowSvc", athFile=None, seq=None, addAlgInPlac cutflowtool = BookkeeperTool(outname+"Tool", InputCollName = inname, OutputCollName= outname) - svcMgr.ToolSvc += cutflowtool - # Add tool to MetaDataSvc svcMgr.MetaDataSvc.MetaDataTools += [cutflowtool] @@ -96,7 +94,6 @@ def CreateCutFlowSvc( svcName="CutFlowSvc", athFile=None, seq=None, addAlgInPlac pdfweighttool = BookkeeperTool(name, OutputCollName= name, InputCollName = name) - svcMgr.ToolSvc += pdfweighttool # Add tool to MetaDataSvc svcMgr.MetaDataSvc.MetaDataTools += [pdfweighttool] diff --git a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py index d59cba6d3e74..391be9044e56 100644 --- a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py +++ b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py @@ -1008,8 +1008,8 @@ if globalflags.InputFormat()=='bytestream': # enable IOVDbSvc to read metadata svcMgr.MetaDataSvc.MetaDataContainer = "MetaDataHdr" - if not hasattr (svcMgr.ToolSvc, 'IOVDbMetaDataTool'): - svcMgr.MetaDataSvc.MetaDataTools += [ "IOVDbMetaDataTool" ] + from IOVDbMetaDataTools.IOVDbMetaDataToolsConf import IOVDbMetaDataTool + svcMgr.MetaDataSvc.MetaDataTools += [ IOVDbMetaDataTool() ] MetaDataStore=svcMgr.MetaDataStore @@ -1027,13 +1027,11 @@ if rec.doFileMetaData(): else: #ok to use the metadata tool if single process from LumiBlockComps.LumiBlockCompsConf import LumiBlockMetaDataTool - svcMgr.MetaDataSvc.MetaDataTools += [ "LumiBlockMetaDataTool" ] + svcMgr.MetaDataSvc.MetaDataTools += [ LumiBlockMetaDataTool() ] # Trigger tool - ToolSvc += CfgMgr.xAODMaker__TriggerMenuMetaDataTool( "TriggerMenuMetaDataTool" ) - svcMgr.MetaDataSvc.MetaDataTools += [ ToolSvc.TriggerMenuMetaDataTool ] + svcMgr.MetaDataSvc.MetaDataTools += [ CfgMgr.xAODMaker__TriggerMenuMetaDataTool( "TriggerMenuMetaDataTool" ) ] # EventFormat tool - ToolSvc += CfgMgr.xAODMaker__EventFormatMetaDataTool( "EventFormatMetaDataTool" ) - svcMgr.MetaDataSvc.MetaDataTools += [ ToolSvc.EventFormatMetaDataTool ] + svcMgr.MetaDataSvc.MetaDataTools += [ CfgMgr.xAODMaker__EventFormatMetaDataTool( "EventFormatMetaDataTool" ) ] else: # Create LumiBlock meta data containers *before* creating the output StreamESD/AOD @@ -1054,8 +1052,7 @@ if rec.doFileMetaData(): try: # ByteStreamMetadata from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamMetadataTool - if not hasattr (svcMgr.ToolSvc, 'ByteStreamMetadataTool'): - svcMgr.MetaDataSvc.MetaDataTools += [ "ByteStreamMetadataTool" ] + svcMgr.MetaDataSvc.MetaDataTools += [ ByteStreamMetadataTool() ] except Exception: treatException("Could not load ByteStreamMetadataTool") @@ -1433,13 +1430,14 @@ if rec.doWriteAOD(): if rec.doFileMetaData(): # Trigger tool - ToolSvc += CfgMgr.xAODMaker__TriggerMenuMetaDataTool( "TriggerMenuMetaDataTool") - - svcMgr.MetaDataSvc.MetaDataTools += [ ToolSvc.TriggerMenuMetaDataTool ] + trigMDTool= CfgMgr.xAODMaker__TriggerMenuMetaDataTool( "TriggerMenuMetaDataTool") + if not trigMDTool in svcMgr.MetaDataSvc.MetaDataTools: + svcMgr.MetaDataSvc.MetaDataTools += [ trigMDTool ] # EventFormat tool - ToolSvc += CfgMgr.xAODMaker__EventFormatMetaDataTool( "EventFormatMetaDataTool") - - svcMgr.MetaDataSvc.MetaDataTools += [ ToolSvc.EventFormatMetaDataTool ] + + efMDTool=CfgMgr.xAODMaker__EventFormatMetaDataTool( "EventFormatMetaDataTool") + if not efMDTool in svcMgr.MetaDataSvc.MetaDataTools: + svcMgr.MetaDataSvc.MetaDataTools += [ efMDTool ] # Put MetaData in AOD stream via AugmentedPoolStream_ # Write all meta data containers StreamAOD_Augmented.AddMetaDataItem(dfMetadataItemList()) diff --git a/Reconstruction/RecJobTransforms/share/skeleton.RAWtoESD_tf.py b/Reconstruction/RecJobTransforms/share/skeleton.RAWtoESD_tf.py index 59c331a419e8..d050a148d1c6 100644 --- a/Reconstruction/RecJobTransforms/share/skeleton.RAWtoESD_tf.py +++ b/Reconstruction/RecJobTransforms/share/skeleton.RAWtoESD_tf.py @@ -200,9 +200,7 @@ if hasattr(runArgs,"topOptions"): include(runArgs.topOptions) else: include( "RecExCommon/RecExCommon_topOptions.py" ) if hasattr(runArgs,"inputRDO_TRIGFile") and rec.doFileMetaData(): - ToolSvc += CfgMgr.xAODMaker__TriggerMenuMetaDataTool( "TriggerMenuMetaDataTool", - OutputLevel = 3 ) - svcMgr.MetaDataSvc.MetaDataTools += [ ToolSvc.TriggerMenuMetaDataTool ] + svcMgr.MetaDataSvc.MetaDataTools += [ CfgMgr.xAODMaker__TriggerMenuMetaDataTool( "TriggerMenuMetaDataTool") ] #========================================================== # Use LZIB for compression of temporary outputs of AthenaMP diff --git a/Trigger/TrigConfiguration/TrigConfigSvc/python/TriggerConfig.py b/Trigger/TrigConfiguration/TrigConfigSvc/python/TriggerConfig.py index 16be1649eceb..49932159d721 100644 --- a/Trigger/TrigConfiguration/TrigConfigSvc/python/TriggerConfig.py +++ b/Trigger/TrigConfiguration/TrigConfigSvc/python/TriggerConfig.py @@ -180,16 +180,12 @@ def _setupConfig(): from AthenaCommon.AppMgr import ServiceMgr as svcMgr from AthenaCommon.AppMgr import ToolSvc - if not hasattr( ToolSvc, 'IOVDbMetaDataTool' ): - from IOVDbMetaDataTools.IOVDbMetaDataToolsConf import IOVDbMetaDataTool - ToolSvc += IOVDbMetaDataTool( "IOVDbMetaDataTool" ) - - if not hasattr( svcMgr, 'MetaDataSvc' ): + from IOVDbMetaDataTools.IOVDbMetaDataToolsConf import IOVDbMetaDataTool from AthenaServices.AthenaServicesConf import MetaDataSvc svcMgr += MetaDataSvc( "MetaDataSvc" ) svcMgr.MetaDataSvc.MetaDataContainer = "MetaDataHdr" - svcMgr.MetaDataSvc.MetaDataTools += [ "IOVDbMetaDataTool" ] + svcMgr.MetaDataSvc.MetaDataTools += [ IOVDbMetaDataTool() ] # for debugging uncomment the following three lines from AthenaCommon.Constants import VERBOSE -- GitLab From d8c7a7cf7794bd97636882816eec0b15a4aab77e Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Mon, 11 Jun 2018 17:15:06 +0200 Subject: [PATCH 098/562] CxxUtils: A few cleanups for multiversioned functions. Use target_clones for count_ones, rather than duplicating code. Don't clone crc64 overloads that we don't need to (that are just calling another function). Otherwise, we can run into trouble when tdaq code loads libraries with RTLD_NOW. (That's because with RTLD_NOW, the ifunc resolver may be called during reloc processing. If we get an instance of the resolver in a different library than being resolved, then we may end up looking at a GOT entry that hasn't yet been filled in.) Former-commit-id: 62cb2ef64fd6b6a4e24a1418dd296aa3c5c2a227 --- Control/CxxUtils/CxxUtils/bitscan.h | 39 +++++----------------------- Control/CxxUtils/CxxUtils/crc64.h | 33 ----------------------- Control/CxxUtils/CxxUtils/features.h | 2 +- Control/CxxUtils/Root/crc64.cxx | 38 --------------------------- 4 files changed, 8 insertions(+), 104 deletions(-) diff --git a/Control/CxxUtils/CxxUtils/bitscan.h b/Control/CxxUtils/CxxUtils/bitscan.h index 60d7f50b686b..e8b0bfc235f4 100644 --- a/Control/CxxUtils/CxxUtils/bitscan.h +++ b/Control/CxxUtils/CxxUtils/bitscan.h @@ -124,35 +124,6 @@ namespace CxxUtils { } - // We want to use the popcnt instruction for this if it's available. - // However, we're still compiling for a Model-T x86_64 by default. - // Use the target attribute and function multiversioning to use - // this instruction if it is in fact available. -#if defined(__x86_64__) && HAVE_BITCOUNT_INTRINSICS && HAVE_FUNCTION_MULTIVERSIONING - /** - * Count number of set bits. - * - * @param x Number to check - * @return Number of bits set in x. - */ - __attribute__ ((target ("popcnt"))) - inline unsigned count_ones(unsigned x) { - return __builtin_popcount(x); - } - - __attribute__ ((target ("popcnt"))) - inline unsigned count_ones(unsigned long x) { - return __builtin_popcountl(x); - } - - - __attribute__ ((target ("popcnt"))) - inline unsigned count_ones(unsigned long long x) { - return __builtin_popcountll(x); - } -#endif // defined(__x86_64__) && HAVE_BITCOUNT_INTRINSICS && HAVE_FUNCTION_MULTIVERSIONING - - /** * Count number of set bits. * @@ -160,7 +131,11 @@ namespace CxxUtils { * @return Number of bits set in x. */ #if defined(__x86_64__) && HAVE_BITCOUNT_INTRINSICS && HAVE_FUNCTION_MULTIVERSIONING - __attribute__ ((target ("default"))) + // We want to use the popcnt instruction for this if it's available. + // However, we're still compiling for a Model-T x86_64 by default. + // Use the target attribute and function multiversioning to use + // this instruction if it is in fact available. + __attribute__ ((target_clones ("popcnt,default"))) #endif inline unsigned count_ones(unsigned x) { #if HAVE_BITCOUNT_INTRINSICS @@ -171,7 +146,7 @@ namespace CxxUtils { } #if defined(__x86_64__) && HAVE_BITCOUNT_INTRINSICS && HAVE_FUNCTION_MULTIVERSIONING - __attribute__ ((target ("default"))) + __attribute__ ((target_clones ("popcnt,default"))) #endif inline unsigned count_ones(unsigned long x) { #if HAVE_BITCOUNT_INTRINSICS @@ -183,7 +158,7 @@ namespace CxxUtils { #if defined(__x86_64__) && HAVE_BITCOUNT_INTRINSICS && HAVE_FUNCTION_MULTIVERSIONING - __attribute__ ((target ("default"))) + __attribute__ ((target_clones ("popcnt,default"))) #endif inline unsigned count_ones(unsigned long long x) { #if HAVE_BITCOUNT_INTRINSICS diff --git a/Control/CxxUtils/CxxUtils/crc64.h b/Control/CxxUtils/CxxUtils/crc64.h index 660b8d386413..9a673edbb032 100644 --- a/Control/CxxUtils/CxxUtils/crc64.h +++ b/Control/CxxUtils/CxxUtils/crc64.h @@ -110,29 +110,6 @@ __attribute__ ((target ("pclmul"))) uint64_t crc64 (const CRCTable& table, const char* data, size_t data_len); - - -/** - * @brief Find the CRC-64 of a string, with the default CRC. - * @param table Precomputed CRC tables and constants. - * @param data Pointer to the string to hash. - * @param data_len Length of the string to hash, in bytes. - * - * This is the vectorized implementation, used on platforms with pclmul. - */ -__attribute__ ((target ("pclmul"))) -uint64_t crc64 (const char* data, - size_t data_len); - - -/** - * @brief Find the CRC-64 of a string, using the default polynomial. - * @param str The string to hash. - * - * This is the vectorized implementation, used on platforms with pclmul. - */ -__attribute__ ((target ("pclmul"))) -uint64_t crc64 (const std::string& s); #endif // ATH_CRC64_VEC @@ -156,12 +133,7 @@ uint64_t crc64 (const CRCTable& table, * @brief Find the CRC-64 of a string, with the default CRC. * @param data Pointer to the string to hash. * @param data_len Length of the string to hash, in bytes. - * - * This is the default implementation, used on platforms without pclmul. */ -#if ATH_CRC64_VEC -__attribute__ ((target ("default"))) -#endif uint64_t crc64 (const char* data, size_t data_len); @@ -169,12 +141,7 @@ uint64_t crc64 (const char* data, /** * @brief Find the CRC-64 of a string, using the default polynomial. * @param str The string to hash. - * - * This is the default implementation, used on platforms without pclmul. */ -#if ATH_CRC64_VEC -__attribute__ ((target ("default"))) -#endif uint64_t crc64 (const std::string& s); diff --git a/Control/CxxUtils/CxxUtils/features.h b/Control/CxxUtils/CxxUtils/features.h index 7b69fe51a53b..c0fc87c00c49 100644 --- a/Control/CxxUtils/CxxUtils/features.h +++ b/Control/CxxUtils/CxxUtils/features.h @@ -15,7 +15,7 @@ /// Do we have function multiversioning? -#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) +#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__COVERITY__) # define HAVE_FUNCTION_MULTIVERSIONING 1 #else # define HAVE_FUNCTION_MULTIVERSIONING 0 diff --git a/Control/CxxUtils/Root/crc64.cxx b/Control/CxxUtils/Root/crc64.cxx index ee2ed773a615..5ba313061703 100644 --- a/Control/CxxUtils/Root/crc64.cxx +++ b/Control/CxxUtils/Root/crc64.cxx @@ -674,34 +674,6 @@ uint64_t crc64 (const CRCTable& table, } -/** - * @brief Find the CRC-64 of a string, using a vectorized algorithm, - * with the default CRC. - * @param table Precomputed CRC tables and constants. - * @param data Pointer to the string to hash. - * @param data_len Length of the string to hash, in bytes. - */ -__attribute__ ((target ("pclmul"))) -uint64_t crc64 (const char* data, - size_t data_len) -{ - return crc64 (defaultCRCTable, data, data_len); -} - - -/** - * @brief Find the CRC-64 of a string, using the default polynomial. - * @param str The string to hash. - * - * This is the vectorized implementation, used on platforms with pclmul. - */ -__attribute__ ((target ("pclmul"))) -uint64_t crc64 (const std::string& s) -{ - return crc64 (defaultCRCTable, s.data(), s.size()); -} - - #endif // ATH_CRC64_VEC @@ -728,12 +700,7 @@ uint64_t crc64 (const CRCTable& table, * @brief Find the CRC-64 of a string, with the default CRC. * @param data Pointer to the string to hash. * @param data_len Length of the string to hash, in bytes. - * - * This is the default implementation, used on platforms without pclmul. */ -#if ATH_CRC64_VEC -__attribute__ ((target ("default"))) -#endif uint64_t crc64 (const char* data, size_t data_len) { @@ -744,12 +711,7 @@ uint64_t crc64 (const char* data, /** * @brief Find the CRC-64 of a string, using the default polynomial. * @param str The string to hash. - * - * This is the default implementation, used on platforms without pclmul. */ -#if ATH_CRC64_VEC -__attribute__ ((target ("default"))) -#endif uint64_t crc64 (const std::string& s) { return crc64 (defaultCRCTable, s.data(), s.size()); -- GitLab From c51627106c0d69259428e6a246a5866fffc8a826 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Thu, 7 Jun 2018 15:41:42 +0200 Subject: [PATCH 099/562] TrigHLTJetRec: Fix clang warnings. clang warnings: unused private class data members. Former-commit-id: 9e2f02067eba4a69abe8037eca69ee43ee481a55 --- .../TrigHLTJetRec/TrigHLTJetRec/TriggerJetBuildTool.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TriggerJetBuildTool.h b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TriggerJetBuildTool.h index ed2ff5d85ca1..335f8f797d16 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TriggerJetBuildTool.h +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TriggerJetBuildTool.h @@ -59,17 +59,12 @@ private: //IParticles - const xAOD::IParticleContainer* m_jetFinderInputs{nullptr}; - ToolHandle<IJetFinder> m_finder; ToolHandleArray<IJetModifier> m_modifiers; std::string m_concreteTypeStr; // determines m_concreteType - // m_inputType - updated from m_concreteTypeStr - xAOD::JetInput::Type m_inputType{xAOD::JetInput::Uncategorized}; - // m_concreteType - affects IParticle->PseudoJet xAOD::JetInput::Type m_concreteType{xAOD::JetInput::Uncategorized}; -- GitLab From 715c3aa4dd0065c2cc730ad06f8f2f37e9fd7f41 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Mon, 11 Jun 2018 17:18:39 +0200 Subject: [PATCH 100/562] AthenaPoolMultiTest: cmake fix Remove reference to nonexistent package MinimalRuntime. Former-commit-id: 9b8d38860f1df90ccdb30dd05d682a69d22e6b7f --- AtlasTest/DatabaseTest/AthenaPoolMultiTest/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/CMakeLists.txt b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/CMakeLists.txt index 4b3bcff263dc..e29c24434847 100644 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/CMakeLists.txt +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/CMakeLists.txt @@ -7,7 +7,6 @@ atlas_subdir( AthenaPoolMultiTest ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - Control/MinimalRunTime Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms PRIVATE AtlasTest/DatabaseTest/AthenaPoolTestData -- GitLab From f609c5902ab802bb83c72207be5f465ffae87af5 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Mon, 11 Jun 2018 17:19:41 +0200 Subject: [PATCH 101/562] BeamPipeGeoModel: Another attempt to fix coverity 113158. coverity: possible null pointer dereference. Former-commit-id: e9ee2aefe53a0b6daa400fcc97e5b2043bf67a2b --- .../BeamPipeGeoModel/CMakeLists.txt | 3 ++- .../src/BeamPipeDetectorFactory.cxx | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/AtlasGeometryCommon/BeamPipeGeoModel/CMakeLists.txt b/AtlasGeometryCommon/BeamPipeGeoModel/CMakeLists.txt index f96cfa344304..60964ae54c07 100644 --- a/AtlasGeometryCommon/BeamPipeGeoModel/CMakeLists.txt +++ b/AtlasGeometryCommon/BeamPipeGeoModel/CMakeLists.txt @@ -14,6 +14,7 @@ atlas_depends_on_subdirs( PUBLIC Control/CLIDSvc Control/SGTools Control/StoreGate + Control/AthenaKernel DetectorDescription/GeoModel/GeoModelInterfaces GaudiKernel ) @@ -27,7 +28,7 @@ atlas_add_library( BeamPipeGeoModelLib PUBLIC_HEADERS BeamPipeGeoModel INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} GeoModelKernel GeoModelUtilities StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES SGTools GaudiKernel ) + PRIVATE_LINK_LIBRARIES SGTools AthenaKernel GaudiKernel ) atlas_add_component( BeamPipeGeoModel src/components/*.cxx diff --git a/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorFactory.cxx b/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorFactory.cxx index 7451c402d084..680541da2208 100755 --- a/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorFactory.cxx +++ b/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorFactory.cxx @@ -25,6 +25,9 @@ #include "RDBAccessSvc/IRDBRecordset.h" #include "RDBAccessSvc/IRDBAccessSvc.h" +#include "AthenaKernel/getMessageSvc.h" +#include "GaudiKernel/MsgStream.h" + #include <iomanip> #include <vector> @@ -240,9 +243,15 @@ void BeamPipeDetectorFactory::addSections(GeoPhysVol* parent, int region) GeoNameTag* ntSection = new GeoNameTag(name); if (addToFirstSection && secNum!=1) { - //std::cout << "Placing section " << secNum << " in Section1" << std::endl; - pvMotherSection->add(ntSection); - pvMotherSection->add(pvSection); + if (!pvMotherSection) { + MsgStream gLog(Athena::getMessageSvc(), "BeamPipeDetectorFactory"); + gLog << MSG::ERROR << "Logic error building beam pipe." << endmsg; + } + else { + //std::cout << "Placing section " << secNum << " in Section1" << std::endl; + pvMotherSection->add(ntSection); + pvMotherSection->add(pvSection); + } } else { //std::cout << "Placing section " << secNum << " in mother envelope" << std::endl; parent->add(ntSection); -- GitLab From 3068ace367348faa7279db7eeaa4c1891a6b6df8 Mon Sep 17 00:00:00 2001 From: Hass AbouZeid <hass.abouzeid@cern.ch> Date: Tue, 12 Jun 2018 00:29:13 +0000 Subject: [PATCH 102/562] Hide storegate access in LAr and Tile PileUp for MT migration Former-commit-id: 1eafc86fcd091a2233797e6b093476d72b93b188 --- .../PileUpTools/PileUpTools/PileUpMergeSvc.h | 4 + .../PileUpTools/PileUpMergeSvc.icc | 20 +++ .../LArDigitization/LArPileUpTool.h | 2 + .../LArDigitization/src/LArPileUpTool.cxx | 148 ++++++++++++++---- .../TileSimAlgs/src/TileHitVecToCntTool.cxx | 20 +-- 5 files changed, 151 insertions(+), 43 deletions(-) diff --git a/Control/PileUpTools/PileUpTools/PileUpMergeSvc.h b/Control/PileUpTools/PileUpTools/PileUpMergeSvc.h index 9b43fbf1ad45..2e998c1aeafc 100755 --- a/Control/PileUpTools/PileUpTools/PileUpMergeSvc.h +++ b/Control/PileUpTools/PileUpTools/PileUpMergeSvc.h @@ -77,6 +77,10 @@ public: StatusCode retrieveOriginal(const KEY& dataKey, const DATA*& data); + template <typename KEY, typename DATA> + StatusCode + retrieveSingleSubEvtData(const KEY& dataKey, const DATA*& data, int bunchXing, SubEventIterator iEvt); + ///retrieve keyed DATA objs for all sub-events and attach a time to them template <typename KEY, typename TIMEDDATA> StatusCode diff --git a/Control/PileUpTools/PileUpTools/PileUpMergeSvc.icc b/Control/PileUpTools/PileUpTools/PileUpMergeSvc.icc index 319397e9fe92..96bfcb5ec35d 100755 --- a/Control/PileUpTools/PileUpTools/PileUpMergeSvc.icc +++ b/Control/PileUpTools/PileUpTools/PileUpMergeSvc.icc @@ -185,6 +185,26 @@ PileUpMergeSvc::retrieveSubSetEvtData(const KEY& dataKey, //orig evt key } +///retrieve keyed DATA objs for single sub-event (un-timed) +template <typename KEY, typename DATA> +StatusCode +PileUpMergeSvc::retrieveSingleSubEvtData(const KEY& dataKey, const DATA*& data, int bunchXing, SubEventIterator iEvt){ + + StoreGateSvc &seStore = *iEvt->ptr()->evtStore(); + ATH_MSG_VERBOSE("SubEvt StoreGate " << seStore.name() << " :" + << " bunch crossing : " << bunchXing + << " time offset : " << iEvt->time() + << " event number : " << + iEvt->ptr()->eventNumber() + << " run number : " << + iEvt->ptr()->runNumber()); + + StatusCode sc = seStore.retrieve(data, dataKey); + return sc; + +} + + ///retrieve keyed DATA objs for all sub-events and attach a time to them template <typename KEY, typename TIMEDDATA> StatusCode diff --git a/LArCalorimeter/LArDigitization/LArDigitization/LArPileUpTool.h b/LArCalorimeter/LArDigitization/LArDigitization/LArPileUpTool.h index bb0a56ff753e..594465b217a2 100755 --- a/LArCalorimeter/LArDigitization/LArDigitization/LArPileUpTool.h +++ b/LArCalorimeter/LArDigitization/LArDigitization/LArPileUpTool.h @@ -82,6 +82,8 @@ class LArPileUpTool : virtual public ILArPileUpTool, public PileUpToolBase virtual StatusCode fillMapFromHit(StoreGateSvc* seStore,float tbunch,bool isSignal) override final; + virtual StatusCode fillMapFromHit(SubEventIterator iEvt, float bunchTime, bool isSignal); + static const InterfaceID& interfaceID() { return ILArPileUpTool::interfaceID();} diff --git a/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx b/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx index 9e28393f71d9..03745ef4fc2c 100755 --- a/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx +++ b/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx @@ -212,14 +212,12 @@ StatusCode LArPileUpTool::initialize() ATH_MSG_INFO(" No overlay of random events"); } - if (m_PileUp) { - if (service("PileUpMergeSvc", m_mergeSvc).isFailure()) { - ATH_MSG_ERROR( "Can not retrive PileUpMergeSvc" ); - ATH_MSG_ERROR( "Setting PileUp and RndmOverlay flags to FALSE "); - m_PileUp = m_RndmEvtOverlay = false; - } else { - ATH_MSG_INFO( "PileUpMergeSvc successfully initialized"); - } + if (service("PileUpMergeSvc", m_mergeSvc).isFailure()) { + ATH_MSG_ERROR( "Can not retrive PileUpMergeSvc" ); + ATH_MSG_ERROR( "Setting PileUp and RndmOverlay flags to FALSE "); + m_PileUp = m_RndmEvtOverlay = false; + } else { + ATH_MSG_INFO( "PileUpMergeSvc successfully initialized"); } // @@ -609,33 +607,30 @@ StatusCode LArPileUpTool::processBunchXing(int bunchXing, SubEventIterator iEvt(bSubEvents); while (iEvt != eSubEvents) { - // event store for this sub event - StoreGateSvc& seStore(*iEvt->ptr()->evtStore()); + // do we deal with the MC signal event ? + bool isSignal = ( (iEvt->type()==xAOD::EventInfo_v1::PileUpType::Signal) || m_RndmEvtOverlay); - // do we deal with the MC signal event ? - bool isSignal = ( (iEvt->type()==xAOD::EventInfo_v1::PileUpType::Signal) || m_RndmEvtOverlay); + // fill LArHits in map + if (this->fillMapFromHit(iEvt, tbunch,isSignal).isFailure()) { - // fill LArHits in map - if (this->fillMapFromHit(&seStore,tbunch,isSignal).isFailure()) { - ATH_MSG_ERROR(" cannot fill map from hits "); - return StatusCode::FAILURE; - } + ATH_MSG_ERROR(" cannot fill map from hits "); + return StatusCode::FAILURE; + } - // store digits from randoms for overlay - if (m_RndmEvtOverlay) { - LArDigitContainer* rndm_digit_container; - if (seStore.contains<LArDigitContainer>("m_RandomDigitContainer")) { - if (seStore.retrieve(rndm_digit_container,m_RandomDigitContainer).isSuccess()) { - int ndigit=0; - for (LArDigit* digit : *rndm_digit_container) { - if (m_hitmap->AddDigit(digit)) ndigit++; - } - ATH_MSG_INFO(" Number of digits stored for RndmEvt Overlay " << ndigit); - } - } - } + // store digits from randoms for overlay + if (m_RndmEvtOverlay) { + const LArDigitContainer* rndm_digit_container; + if (m_mergeSvc->retrieveSingleSubEvtData(m_RandomDigitContainer, rndm_digit_container, bunchXing, iEvt).isSuccess()) { + int ndigit=0; + for (const LArDigit* digit : *rndm_digit_container) { + if (m_hitmap->AddDigit(digit)) ndigit++; + } + ATH_MSG_INFO(" Number of digits stored for RndmEvt Overlay " << ndigit); + } + } + + ++iEvt; - ++iEvt; } if (!m_useMBTime) { @@ -1026,6 +1021,97 @@ StatusCode LArPileUpTool::fillMapFromHit(StoreGateSvc* myStore, float bunchTime, return StatusCode::SUCCESS; } +// ============================================================================================ +StatusCode LArPileUpTool::fillMapFromHit(SubEventIterator iEvt, float bunchTime, bool isSignal) +{ + for (unsigned int iHitContainer=0;iHitContainer<m_HitContainer.size();iHitContainer++) + { + + // + // ..... Get the pointer to the Hit Container from StoreGate through the merge service + // + + ATH_MSG_DEBUG(" fillMapFromHit: asking for: " << m_HitContainer[iHitContainer]); + + unsigned int offset; + int ical=0; + if (m_CaloType[iHitContainer] == LArHitEMap::EMBARREL_INDEX || + m_CaloType[iHitContainer] == LArHitEMap::EMENDCAP_INDEX) + { + offset=0; + ical=1; + } + else if (m_CaloType[iHitContainer] == LArHitEMap::HADENDCAP_INDEX) + { + offset=m_hitmap->get_ncellem(); + ical=2; + } + else if (m_CaloType[iHitContainer] == LArHitEMap::FORWARD_INDEX) + { + offset=m_hitmap->get_ncellem()+m_hitmap->get_ncellhec(); + ical=3; + } + else + { + ATH_MSG_ERROR("unknown calo type ! "); + return StatusCode::FAILURE; + } + + if (m_useLArHitFloat) { + + const LArHitFloatContainer * hit_container; + + if (!(m_mergeSvc->retrieveSingleSubEvtData(m_HitContainer[iHitContainer], hit_container, bunchTime, + iEvt).isSuccess())){ + ATH_MSG_ERROR(" LAr Hit container not found for event key " << m_HitContainer[iHitContainer]); + return StatusCode::FAILURE; + } + + LArHitFloatContainer::const_iterator hititer; + for(hititer=hit_container->begin(); + hititer != hit_container->end();hititer++) + { + m_nhit_tot++; + Identifier cellId = (*hititer).cellID(); + float energy = (float) (*hititer).energy(); + float time; + if (m_ignoreTime) time=0.; + else time = (float) ((*hititer).time() - m_trigtime); + time = time + bunchTime; + + if (this->AddHit(cellId,energy,time,isSignal,offset,ical).isFailure()) return StatusCode::FAILURE; + } + } + else { + + const LArHitContainer * hit_container; + + if (!(m_mergeSvc->retrieveSingleSubEvtData(m_HitContainer[iHitContainer], hit_container, bunchTime, + iEvt).isSuccess())){ + ATH_MSG_ERROR(" LAr Hit container not found for event key " << m_HitContainer[iHitContainer]); + return StatusCode::FAILURE; + } + + LArHitContainer::const_iterator hititer; + for(hititer=hit_container->begin(); + hititer != hit_container->end();hititer++) + { + m_nhit_tot++; + Identifier cellId = (*hititer)->cellID(); + float energy = (float) (*hititer)->energy(); + float time; + if (m_ignoreTime) time=0.; + else time = (float) ((*hititer)->time() - m_trigtime); + time = time + bunchTime; + + if (this->AddHit(cellId,energy,time,isSignal,offset,ical).isFailure()) return StatusCode::FAILURE; + } + } + } // end loop over containers + + return StatusCode::SUCCESS; +} + // ---------------------------------------------------------------------------------------------------------------------- StatusCode LArPileUpTool::AddHit(const Identifier& cellId, float energy, float time, bool isSignal, unsigned int offset, unsigned int ical) diff --git a/TileCalorimeter/TileSimAlgs/src/TileHitVecToCntTool.cxx b/TileCalorimeter/TileSimAlgs/src/TileHitVecToCntTool.cxx index 78bcb42a8f79..091c4cc89edb 100644 --- a/TileCalorimeter/TileSimAlgs/src/TileHitVecToCntTool.cxx +++ b/TileCalorimeter/TileSimAlgs/src/TileHitVecToCntTool.cxx @@ -707,7 +707,6 @@ StatusCode TileHitVecToCntTool::processBunchXing(int bunchXing if (m_rndmEvtOverlay && bunchXing != 0) iEvt = eSubEvents; // in overlay skip all events except BC=0 while (iEvt != eSubEvents) { - StoreGateSvc& seStore(*iEvt->ptr()->evtStore()); /* zero all counters and sums */ int nHit(0); double eHitTot(0.0); @@ -719,14 +718,11 @@ StatusCode TileHitVecToCntTool::processBunchXing(int bunchXing const std::string hitVectorName(*hitVecNamesItr); if (m_pileUp || m_rndmEvtOverlay) { + const TileHitVector* inputHits; - if (!seStore.contains<TileHitVector>(hitVectorName)) { - ATH_MSG_WARNING("TileHitVector container not found for signal event key " << hitVectorName); - continue; - } - if (seStore.retrieve(inputHits, hitVectorName).isFailure()) { - continue; - } + if (!(m_mergeSvc->retrieveSingleSubEvtData(hitVectorName, inputHits, bunchXing, iEvt))){ + ATH_MSG_ERROR(" Tile Hit container not found for event key " << hitVectorName); + } const double SubEvtTimOffset(iEvt->time()); @@ -745,10 +741,10 @@ StatusCode TileHitVecToCntTool::processBunchXing(int bunchXing //* Get TileHits from TileHitVector //** const TileHitVector * inputHits; - if (evtStore()->retrieve(inputHits, hitVectorName).isFailure()) { - ATH_MSG_WARNING("Hit Vector "<< hitVectorName << " not found in StoreGate"); - continue; - } + if (!(m_mergeSvc->retrieveSingleSubEvtData(hitVectorName, inputHits, bunchXing, iEvt))){ + ATH_MSG_ERROR(" Tile Hit container not found for event key " << hitVectorName); + } + this->processHitVectorWithoutPileUp(inputHits, nHit, eHitTot); } // to pile-up or not -- GitLab From 91dfd09f0f08bf96c0eb6b9fa74b9a97b8c2d7db Mon Sep 17 00:00:00 2001 From: Susumu Oda <susumu.oda@cern.ch> Date: Tue, 12 Jun 2018 01:06:58 +0000 Subject: [PATCH 103/562] Use SiLorentzAngleTool in FastSCT_Clusterization/FastSCT_RodDecoder (ATLASRECTS-4486) Former-commit-id: 41aef0b1819583181825c83210d6f6919447f978 --- .../TrigOnlineSpacePointTool/CMakeLists.txt | 1 + .../FastSCT_Clusterization.h | 5 +++++ .../TrigOnlineSpacePointTool/FastSCT_RodDecoder.h | 3 +++ .../SCT_ClusterCacheTool.h | 2 +- .../python/TrigOnlineSpacePointTool_Config.py | 11 +++++++++++ .../src/FastSCT_Clusterization.cxx | 5 +++-- .../src/FastSCT_RodDecoder.cxx | 4 ++++ .../src/SCT_ClusterCacheTool.cxx | 15 ++------------- 8 files changed, 30 insertions(+), 16 deletions(-) diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/CMakeLists.txt b/Trigger/TrigTools/TrigOnlineSpacePointTool/CMakeLists.txt index c28e58bb8d70..f115f44b0719 100644 --- a/Trigger/TrigTools/TrigOnlineSpacePointTool/CMakeLists.txt +++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/CMakeLists.txt @@ -12,6 +12,7 @@ atlas_depends_on_subdirs( PUBLIC DetectorDescription/Identifier Event/ByteStreamData InnerDetector/InDetConditions/InDetByteStreamErrors + InnerDetector/InDetConditions/InDetCondServices InnerDetector/InDetConditions/PixelConditionsServices InnerDetector/InDetConditions/SCT_ConditionsTools InnerDetector/InDetDetDescr/InDetIdentifier diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/FastSCT_Clusterization.h b/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/FastSCT_Clusterization.h index b335ea0036c0..8a0ff4af9513 100755 --- a/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/FastSCT_Clusterization.h +++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/FastSCT_Clusterization.h @@ -10,6 +10,7 @@ #include "TrkPrepRawData/PrepRawDataCLASS_DEF.h" #include "InDetPrepRawData/SCT_ClusterCollection.h" #include "Identifier/Identifier.h" +#include "InDetCondServices/ISiLorentzAngleTool.h" #include <vector> class FastSCT_Clusterization{ @@ -21,6 +22,7 @@ public: m_man{nullptr}, m_detEl{nullptr}, m_currentClusterColl{nullptr}, + m_lorentzAngleTool{nullptr}, m_current_width{0}, m_first_strip{0}, m_last_strip{0}, @@ -34,6 +36,8 @@ public: void setSctID(const SCT_ID* sctID){ m_sctID = sctID; } + void setLorentzAngleTool(const ISiLorentzAngleTool* lorentzAngleTool) { m_lorentzAngleTool = lorentzAngleTool; } + void addHit( const Identifier elementId, const IdentifierHash hashId, const unsigned int strip ); void finishHits(); @@ -72,6 +76,7 @@ private: std::vector<const InDet::SCT_ClusterCollection *> m_clusterCollections; + const ISiLorentzAngleTool* m_lorentzAngleTool; unsigned int m_current_width; unsigned int m_first_strip; diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/FastSCT_RodDecoder.h b/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/FastSCT_RodDecoder.h index 654c37038c3d..30e258887e0d 100755 --- a/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/FastSCT_RodDecoder.h +++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/FastSCT_RodDecoder.h @@ -31,6 +31,8 @@ #include "InDetReadoutGeometry/SCT_DetectorManager.h" #include "InDetReadoutGeometry/SiDetectorElement.h" +#include "InDetCondServices/ISiLorentzAngleTool.h" + #include <deque> class FastSCT_Clusterization; @@ -63,6 +65,7 @@ public: IdContext m_cntx_sct; FastSCT_Clusterization* m_pClusterization; ISCT_CablingSvc* m_cablingSvc; + ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SCTLorentzAngleTool", "Tool to retreive Lorentz angle"}; }; #endif diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/SCT_ClusterCacheTool.h b/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/SCT_ClusterCacheTool.h index 4fa10470171e..07fead8bd8cc 100755 --- a/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/SCT_ClusterCacheTool.h +++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/SCT_ClusterCacheTool.h @@ -56,7 +56,7 @@ private: std::string m_containerName; IdContext m_cntx_sct; - FastSCT_RodDecoder* m_decoder; + ToolHandle<FastSCT_RodDecoder> m_decoder{this, "FastSCT_RodDecoder", "FastSCT_RodDecoder", "Fast SCT ROD decoder"}; ToolHandle<ISCT_RodDecoder> m_offlineDecoder; bool m_useOfflineDecoder; bool m_useOfflineClustering; diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/python/TrigOnlineSpacePointTool_Config.py b/Trigger/TrigTools/TrigOnlineSpacePointTool/python/TrigOnlineSpacePointTool_Config.py index f07dca88631a..2624fae911a5 100644 --- a/Trigger/TrigTools/TrigOnlineSpacePointTool/python/TrigOnlineSpacePointTool_Config.py +++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/python/TrigOnlineSpacePointTool_Config.py @@ -3,6 +3,7 @@ from TrigOnlineSpacePointTool.TrigOnlineSpacePointToolConf import OnlineSpacePointProviderTool from TrigOnlineSpacePointTool.TrigOnlineSpacePointToolConf import PixelClusterCacheTool from TrigOnlineSpacePointTool.TrigOnlineSpacePointToolConf import SCT_ClusterCacheTool +from TrigOnlineSpacePointTool.TrigOnlineSpacePointToolConf import FastSCT_RodDecoder from SiClusterizationTool.SiClusterizationToolConf import InDet__MergedPixelsTool from SiClusterizationTool.SiClusterizationToolConf import InDet__SCT_ClusteringTool @@ -51,8 +52,18 @@ class ConfiguredOnlineSpacePointProviderTool(OnlineSpacePointProviderTool) : ToolSvc += InDetL2TrigMergedPixelsTool ToolSvc += InDetL2TrigSCT_ClusteringTool + # SiLorentzAngleTool for FastSCT_RodDecoder + if not hasattr(ToolSvc, "SCTLorentzAngleTool"): + from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() + + # FastSCT_RodDecoder + ToolSvc += FastSCT_RodDecoder(name = "FastSCT_RodDecoder", + LorentzAngleTool=ToolSvc.SCTLorentzAngleTool) + ConfiguredPixelClusterCacheTool = PixelClusterCacheTool(PixelClusteringTool=InDetL2TrigMergedPixelsTool) ConfiguredSCT_ClusterCacheTool = SCT_ClusterCacheTool(SCT_ClusteringTool = InDetL2TrigSCT_ClusteringTool, + FastSCT_RodDecoder = ToolSvc.FastSCT_RodDecoder ) if not self.DoBS_Conversion : diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/FastSCT_Clusterization.cxx b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/FastSCT_Clusterization.cxx index e91ed7584e5e..c23706acd414 100755 --- a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/FastSCT_Clusterization.cxx +++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/FastSCT_Clusterization.cxx @@ -60,7 +60,8 @@ void FastSCT_Clusterization::addCluster(){ double clusterPos = 0.5 * static_cast<double>(strip); //double localPhiR = m_current_pitch*clusterPos + m_localXcorrection; - double shift = m_detEl->getLorentzCorrection(); + IdentifierHash hashId = m_sctID->wafer_hash(m_element); + double shift = m_lorentzAngleTool->getLorentzShift(hashId); double localPhiR = m_current_pitch*clusterPos + shift; @@ -98,7 +99,7 @@ void FastSCT_Clusterization::setupNewElement(const Identifier elementId, m_first_strip = sctStrip; m_last_strip = sctStrip; m_strips_ascending=true; - m_deltaXlorentz= m_detEl->getLorentzCorrection(); + m_deltaXlorentz= m_lorentzAngleTool->getLorentzShift(hashId); // find geometry of this element: if (m_sctID->is_barrel(elementId) ){ m_current_pitch = m_barrel_pitch; diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/FastSCT_RodDecoder.cxx b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/FastSCT_RodDecoder.cxx index 53924995cbfa..0861fc182c65 100755 --- a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/FastSCT_RodDecoder.cxx +++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/FastSCT_RodDecoder.cxx @@ -50,6 +50,9 @@ StatusCode FastSCT_RodDecoder::initialize() { } m_cntx_sct = m_sct_id->wafer_context(); + + ATH_CHECK(m_lorentzAngleTool.retrieve()); + return StatusCode::SUCCESS; } @@ -64,6 +67,7 @@ bool FastSCT_RodDecoder::fillCollections(const ROBFragment* rob, uint32_t robid, std::vector<bool>& listOfIds, FastSCT_Clusterization* pClusterization) { m_pClusterization=pClusterization; + m_pClusterization->setLorentzAngleTool(m_lorentzAngleTool.get()); m_cablingSvc=cablingSvc; // get the ROD version. It could be used to decode the data in one way or another diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/SCT_ClusterCacheTool.cxx b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/SCT_ClusterCacheTool.cxx index 1bf5e3a7368a..491f79a13af8 100755 --- a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/SCT_ClusterCacheTool.cxx +++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/SCT_ClusterCacheTool.cxx @@ -37,7 +37,6 @@ SCT_ClusterCacheTool::SCT_ClusterCacheTool( const std::string& type, m_cablingSvc(nullptr), m_indet_mgr(nullptr), m_sct_id(nullptr), - m_decoder(nullptr), m_offlineDecoder("SCT_RodDecoder",this), m_clusteringTool("InDet::SCT_ClusteringTool/InDetTrigSCT_ClusteringTool"), m_rdoContainer(nullptr), @@ -81,14 +80,6 @@ StatusCode SCT_ClusterCacheTool::initialize() { m_clusterization.setSctID(m_sct_id); m_clusterization.initializeGeometry(m_indet_mgr); - IToolSvc* toolSvc; - sc=service("ToolSvc",toolSvc); - if(sc.isFailure()) - { - ATH_MSG_ERROR( name() << "failed to get ToolSvc"); - return sc; - } - if(m_doBS) { sc=service("SCT_CablingSvc",m_cablingSvc); @@ -129,10 +120,7 @@ StatusCode SCT_ClusterCacheTool::initialize() { m_rdoContainer = new SCT_RDO_Container(m_sct_id->wafer_hash_max()); m_rdoContainer->addRef(); - if(StatusCode::SUCCESS !=toolSvc->retrieveTool("FastSCT_RodDecoder",m_decoder)) { - ATH_MSG_ERROR( "initialize(): Can't get FastSCT_RodDecoder "); - return StatusCode::FAILURE; - } + ATH_CHECK(m_decoder.retrieve()); if(StatusCode::SUCCESS !=m_offlineDecoder.retrieve()) { ATH_MSG_ERROR( "initialize(): Can't get "<<m_offlineDecoder); @@ -140,6 +128,7 @@ StatusCode SCT_ClusterCacheTool::initialize() { } } else { + m_decoder.disable(); m_offlineDecoder.disable(); } -- GitLab From 9c061f96d45717029e19a8bcc99065eacc3485f6 Mon Sep 17 00:00:00 2001 From: John Derek Chapman <chapman@hep.phy.cam.ac.uk> Date: Mon, 11 Jun 2018 15:24:23 +0000 Subject: [PATCH 104/562] Merge branch 'MM_mTPC' into '21.3' Implementation of the mTPC reconstruction for MM See merge request atlas/athena!11776 (cherry picked from commit 6674416a63b5ee65a9e8fee038c7985b51f9d73a [formerly 937f65804e4ff852f9f9475a0b2006ca81251131]) 5e0d3047 Implementation of the mTPC reconstruction for MM 3b665187 Merge remote-tracking branch 'upstream/21.3' into MM_mTPC Former-commit-id: f8a8a79b1ccf568f489bc4558604e89a15c533e4 --- .../src/MM_FastDigitizer.cxx | 99 +++++++++++---- .../src/MM_FastDigitizer.h | 1 + .../src/MuonClusterOnTrackCreator.cxx | 54 ++++++-- .../src/MuonClusterOnTrackCreator.h | 2 + .../MuonTrackFindingEvent/MuPatHit.h | 2 +- .../src/MuonClusterSegmentFinderTool.cxx | 118 +++++++++++++----- .../src/MuonClusterSegmentFinderTool.h | 5 +- .../src/MuPatHitTool.cxx | 14 ++- .../src/CombinedMuonTrackBuilder.cxx | 6 +- .../TrkGlobalChi2Fitter/GlobalChi2Fitter.h | 1 + .../TrkGlobalChi2Fitter/src/GXFTrajectory.cxx | 3 +- .../src/GlobalChi2Fitter.cxx | 46 ++++++- .../src/RIO_OnTrackCreator.cxx | 4 +- 13 files changed, 283 insertions(+), 72 deletions(-) diff --git a/MuonSpectrometer/MuonDigitization/MuonFastDigitization/src/MM_FastDigitizer.cxx b/MuonSpectrometer/MuonDigitization/MuonFastDigitization/src/MM_FastDigitizer.cxx index 8a7718e50bd0..aae0346ccde8 100644 --- a/MuonSpectrometer/MuonDigitization/MuonFastDigitization/src/MM_FastDigitizer.cxx +++ b/MuonSpectrometer/MuonDigitization/MuonFastDigitization/src/MM_FastDigitizer.cxx @@ -66,6 +66,7 @@ using namespace Muon; declareProperty("CheckIds", m_checkIds = false, "Turn on validity checking of Identifiers" ); declareProperty("MaskMultiplet", m_maskMultiplet = 0, "0: all, 1: first, 2: second, 3: both" ); declareProperty("SDOname", m_sdoName = "MMfast_SDO" ); + declareProperty("MicroTPC", m_microTPC = true, "Turn on microTPC mode" ); } /*******************************************************************************/ MM_FastDigitizer::~MM_FastDigitizer() { @@ -339,7 +340,8 @@ StatusCode MM_FastDigitizer::execute() { double scale;//, scaletop; // double gasgap = 5.; - scale = -slpos.z()/ldir.z(); + if (m_microTPC) scale = 0; + else scale = -slpos.z()/ldir.z(); // scaletop = (gasgap+slpos.z())/ldir.z(); Amg::Vector3D hitOnSurface = slpos + scale*ldir; @@ -352,6 +354,8 @@ StatusCode MM_FastDigitizer::execute() { Amg::Vector3D hitAfterTimeShift(hitOnSurface.x(),hitOnSurface.y(),shiftTimeOffset); Amg::Vector3D hitAfterTimeShiftOnSurface = hitAfterTimeShift - (shiftTimeOffset/ldirTime.z())*ldirTime; + double tdrift = 0; + // resolution = -.01/3 * angle + .64/3. double resolution; if (fabs(inAngle_XZ)<3) @@ -372,8 +376,8 @@ StatusCode MM_FastDigitizer::execute() { if( fabs(inAngle_XZ) > 70 ){ posOnSurf[0]=(slpos.x()+sp); // digiMode = 1; - // if using timing information use hit position after m_shift - }else if( m_useTimeShift ){ + // if using timing information use hit position after shift + }else if( m_useTimeShift && !m_microTPC ){ posOnSurf[0]=(hitAfterTimeShiftOnSurface.x()+sp); // digiMode = 2; } @@ -497,23 +501,83 @@ StatusCode MM_FastDigitizer::execute() { std::vector<Identifier> rdoList; rdoList.push_back(id); - Amg::MatrixX* cov = new Amg::MatrixX(1,1); - cov->setIdentity(); - (*cov)(0,0) = resolution*resolution; - MMPrepData* prd = new MMPrepData( id,hash,posOnSurf,rdoList,cov,detEl); - prd->setHashAndIndex(col->identifyHash(), col->size()); // <<< add this line to the MM code as well - col->push_back(prd); + ATH_MSG_VERBOSE("Global hit: r " << hit.globalPosition().perp() << " phi " << hit.globalPosition().phi() << " z " << hit.globalPosition().z()); - ATH_MSG_VERBOSE(" Prd: r " << prd->globalPosition().perp() << " phi " << prd->globalPosition().phi() << " z " << prd->globalPosition().z()); ATH_MSG_VERBOSE(" Calculated truth hitOnSurfaceGlobal: r " << hitOnSurfaceGlobal.perp() << " phi " << hitOnSurfaceGlobal.phi() << " z " << hitOnSurfaceGlobal.z()); ATH_MSG_VERBOSE(" detEl: r " << repos.perp() << " phi " << repos.phi() << " z " << repos.z()); ATH_MSG_VERBOSE(" Surface center: r " << surf.center().perp() << " phi " << surf.center().phi() << " z " << surf.center().z()); - ATH_MSG_VERBOSE("Local hit in Det Element Frame: x " << hit.localPosition().x() << " y " << hit.localPosition().y() << " z " << hit.localPosition().z()); - ATH_MSG_VERBOSE(" Prd: local posOnSurf.x() " << posOnSurf.x() << " posOnSurf.y() " << posOnSurf.y() ); - // << " detEl: x " << lpos.x() << " y " << lpos.y() << " z " << lpos.z() << " strip " << stripNumber); ATH_MSG_DEBUG(" hit: " << m_idHelperTool->toString(id) << " hitx " << posOnSurf.x() << " hitOnSurface.x() " << hitOnSurface.x() << " residual " << posOnSurf.x() - hitOnSurface.x() << " pull " << (posOnSurf.x() - hitOnSurface.x())/resolution ); + Amg::Vector3D CurrentHitInDriftGap = slpos; + // emulating micro track in the drift volume for microTPC + if (!m_microTPC) { + Amg::MatrixX* cov = new Amg::MatrixX(1,1); + cov->setIdentity(); + (*cov)(0,0) = resolution*resolution; + MMPrepData* prd = new MMPrepData( id,hash,Amg::Vector2D(posOnSurf.x(),0.),rdoList,cov,detEl,(int)tdrift,0); + prd->setHashAndIndex(col->identifyHash(), col->size()); // <<< add this line to the MM code as well + col->push_back(prd); + + std::vector<MuonSimData::Deposit> deposits; + MuonSimData::Deposit deposit(hit.particleLink(), MuonMCData(hitOnSurface.x(),hitOnSurface.y())); + deposits.push_back(deposit); + + MuonSimData simdata(deposits,0); + simdata.setPosition(hitOnSurfaceGlobal); + simdata.setTime(m_globalHitTime); + h_sdoContainer->insert ( std::make_pair ( id, simdata ) ); + + ATH_MSG_VERBOSE(" Prd: local x " << posOnSurf.x() << " y " << 0 ); + ATH_MSG_VERBOSE(" Prd: r " << prd->globalPosition().perp() << " phi " << prd->globalPosition().phi() << " z " << prd->globalPosition().z()); + } else { + for (int loop_direction = -1; loop_direction <=1; loop_direction+=2) { + Amg::Vector3D stepInDriftGap = loop_direction * ldir * (roParam.stripPitch/std::cos(roParam.stereoAngel.at(m_idHelper->gasGap(layid)-1) ))/abs(ldir.x()); + if (loop_direction == 1) CurrentHitInDriftGap = slpos + stepInDriftGap; + while (std::abs(CurrentHitInDriftGap.z()) <= roParam.gasThickness) { + Amg::MatrixX* cov = new Amg::MatrixX(1,1); + cov->setIdentity(); + (*cov)(0,0) = resolution*resolution; + + tdrift = CurrentHitInDriftGap.z() / vdrift + CLHEP::RandGauss::shoot(m_rndmEngine, 0., 5.); + Amg::Vector2D CurrenPosOnSurf(CurrentHitInDriftGap.x(),CurrentHitInDriftGap.y()); + + stripNumber = detEl->stripNumber(CurrenPosOnSurf,layid); + if( (stripNumber >= detEl->numberOfStrips(layid)) || (stripNumber == -1) ) { + CurrentHitInDriftGap += stepInDriftGap; + continue; + } + id = m_idHelper->channelID(parentID, m_idHelper->multilayer(layid), m_idHelper->gasGap(layid),stripNumber,m_checkIds); + if( stripNumber != m_idHelper->channel(id) ) { + CurrentHitInDriftGap += stepInDriftGap; + continue; + } + + MMPrepData* prd = new MMPrepData( id,hash,Amg::Vector2D(CurrenPosOnSurf.x(),0.),rdoList,cov,detEl,(int)tdrift,0); + prd->setHashAndIndex(col->identifyHash(), col->size()); // <<< add this line to the MM code as well + col->push_back(prd); + + std::vector<MuonSimData::Deposit> deposits; + MuonSimData::Deposit deposit(hit.particleLink(), MuonMCData(CurrenPosOnSurf.x(),CurrenPosOnSurf.y())); + deposits.push_back(deposit); + + MuonSimData simdata(deposits,0); + Amg::Vector3D SDO_GP = surf.transform()*CurrentHitInDriftGap; + simdata.setPosition(SDO_GP); + simdata.setTime(m_globalHitTime); + h_sdoContainer->insert ( std::make_pair ( id, simdata ) ); + + ATH_MSG_VERBOSE(" Local CurrentHitInDriftGap.x() " << CurrentHitInDriftGap.x() << " CurrentHitInDriftGap.y() " << CurrentHitInDriftGap.y() << " CurrentHitInDriftGap.z() " << CurrentHitInDriftGap.z() << " drift time " << (int)tdrift ); + ATH_MSG_VERBOSE(" Prd: local x " << CurrentHitInDriftGap.x() << " y " << 0 << " drift time " << (int)tdrift << " identifier " << id ); + ATH_MSG_VERBOSE(" Prd: r " << prd->globalPosition().perp() << " phi " << prd->globalPosition().phi() << " z " << prd->globalPosition().z()); + ATH_MSG_VERBOSE(" SDO: True Global position: x " << SDO_GP.x() << " y " << SDO_GP.y() << " z " << SDO_GP.z()); + + CurrentHitInDriftGap += stepInDriftGap; + } + } + } + + m_err = resolution; m_ich = m_idHelper->channel(id); m_istr = stripNumber; @@ -526,15 +590,6 @@ StatusCode MM_FastDigitizer::execute() { // } m_ntuple->Fill(); - // create SDO - MuonSimData::Deposit deposit(hit.particleLink(), MuonMCData(hitOnSurface.x(),hitOnSurface.y())); - //Record the SDO collection in StoreGate - std::vector<MuonSimData::Deposit> deposits; - deposits.push_back(deposit); - MuonSimData simData(deposits, 0); - simData.setPosition(hitOnSurfaceGlobal); - simData.setTime(m_globalHitTime); - h_sdoContainer->insert ( std::make_pair ( id, simData ) ); // OLD CODE ENDS HERE previousHit = &hit; diff --git a/MuonSpectrometer/MuonDigitization/MuonFastDigitization/src/MM_FastDigitizer.h b/MuonSpectrometer/MuonDigitization/MuonFastDigitization/src/MM_FastDigitizer.h index 01837dbc8349..d75c16fad84b 100644 --- a/MuonSpectrometer/MuonDigitization/MuonFastDigitization/src/MM_FastDigitizer.h +++ b/MuonSpectrometer/MuonDigitization/MuonFastDigitization/src/MM_FastDigitizer.h @@ -133,6 +133,7 @@ class MM_FastDigitizer : public AthAlgorithm { double m_energyThreshold; bool m_checkIds; int m_maskMultiplet; + bool m_microTPC; }; #endif // MUONDIGITIZATION_MM_DIGITIZER_H diff --git a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/MuonClusterOnTrackCreator.cxx b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/MuonClusterOnTrackCreator.cxx index 09992546baa4..51cd718907d4 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/MuonClusterOnTrackCreator.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/MuonClusterOnTrackCreator.cxx @@ -69,6 +69,7 @@ namespace Muon { declareProperty("FixedErrorTgcPhi", m_fixedErrorTgcPhi = 5. ); declareProperty("FixedErrorRpcPhi", m_fixedErrorRpcPhi = 5. ); declareProperty("FixedErrorCscPhi", m_fixedErrorCscPhi = 5. ); + declareProperty("eDriftVelocityMM", m_eDriftVelocityMM = 0.047 ); } @@ -113,7 +114,7 @@ namespace Muon { const MuonClusterOnTrack* MuonClusterOnTrackCreator::createRIO_OnTrack(const Trk::PrepRawData& RIO, - const Amg::Vector3D& GP) const + const Amg::Vector3D& GP, const Amg::Vector3D& GD) const { MuonClusterOnTrack* MClT = 0; @@ -320,13 +321,52 @@ namespace Muon { MClT = new CscClusterOnTrack(MClus,locpar,loce,positionAlongStrip,MClus->status(),MClus->timeStatus()); }else if( m_idHelper->isMM(RIO.identify()) ){ - // cast to CscPrepData + // cast to MMPrepData const MMPrepData* MClus = dynamic_cast<const MMPrepData*> (&RIO); if (!MClus) { ATH_MSG_WARNING ( "RIO not of type MMPrepData, cannot create ROT" ); return 0; } - + + Amg::Vector2D lposMM = MClus->localPosition(); + + double tOffset = 0.0; + double zshift = m_eDriftVelocityMM * (MClus->time() - tOffset); + + ATH_MSG_DEBUG( " Drift time " << MClus->time() << " zshift " << zshift); + if (zshift<-5.05) { + ATH_MSG_WARNING( "Invalid drift time: zshift " << zshift << " while volume size 10: [-5;5]. Set zshift = -5.05"); + zshift = -5.05; + } else if (zshift>5.) { + ATH_MSG_WARNING( "Invalid drift time: zshift " << zshift << " while volume size 10: [-5;5]. Set zshift = 5.05"); + zshift = 5.05; + } + ATH_MSG_DEBUG( " MM Prepdata pos locX " << lposMM[0] << " locY " << lposMM[1] << " and zshift " << zshift); + + Amg::Vector3D lposTrack = RIO.detectorElement()->surface(RIO.identify()).transform().inverse()*GP; + Amg::Vector3D GPinGasGap = GP + Amg::Vector3D(0.,0.,zshift); + Amg::Vector3D GPshifted = GPinGasGap; + if (std::abs(GD.z()) > 0.000001) + GPshifted-= zshift*GD/GD.z(); + else + ATH_MSG_WARNING ( "GD.z() is 0, mTPC correction cannot be done" );; + + ATH_MSG_DEBUG( " GD x " << GD.x() << " y " << GD.y() << " z " << GD.z()); + ATH_MSG_DEBUG( " GP x " << GP.x() << " y " << GP.y() << " z " << GP.z()); + ATH_MSG_DEBUG( " GPshifted x " << GPshifted.x() << " y " << GPshifted.y() << " z " << GPshifted.z()); + + ATH_MSG_DEBUG( " lposTrack x " << lposTrack.x() << " y " << lposTrack.y() << " z " << lposTrack.z()); + Amg::Vector3D lposTrackShifted = RIO.detectorElement()->surface(RIO.identify()).transform().inverse()*GPshifted; + ATH_MSG_DEBUG( " lposTrackShifted x " << lposTrackShifted.x() << " y " << lposTrackShifted.y() << " z " << lposTrackShifted.z()); + double locXshift = lposTrackShifted.x() - lposTrack.x(); + double locYshift = lposTrackShifted.y() - lposTrack.y(); + ATH_MSG_DEBUG( " MM ClusterOnTrack locXshift " << locXshift); + + ATH_MSG_DEBUG( " MM ClusterOnTrack old pos locX " << locpar[Trk::locX] << " Old position along strip " << positionAlongStrip); + positionAlongStrip += locYshift; + locpar[Trk::locX] = lposMM[0] + locXshift; + ATH_MSG_DEBUG( " MM ClusterOnTrack new pos locX " << locpar[Trk::locX] << " New position along strip " << positionAlongStrip); + MClT = new MMClusterOnTrack(MClus,locpar,loce,positionAlongStrip); }else if( m_idHelper->issTgc(RIO.identify()) ){ @@ -345,13 +385,13 @@ namespace Muon { } const MuonClusterOnTrack* MuonClusterOnTrackCreator:: - createRIO_OnTrack(const Trk::PrepRawData& RIO, const Amg::Vector3D& GP, - const Amg::Vector3D&) const { - return createRIO_OnTrack(RIO,GP); + createRIO_OnTrack(const Trk::PrepRawData& RIO, const Amg::Vector3D& GP) const { + const Amg::Vector3D GD = GP; + return createRIO_OnTrack(RIO,GP,GD); } const MuonClusterOnTrack* MuonClusterOnTrackCreator::correct(const Trk::PrepRawData& RIO,const Trk::TrackParameters& TP) const { - return createRIO_OnTrack(RIO,TP.position()); + return createRIO_OnTrack(RIO,TP.position(),TP.momentum()); } } diff --git a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/MuonClusterOnTrackCreator.h b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/MuonClusterOnTrackCreator.h index 9188c2db3c1f..f047899d6144 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/MuonClusterOnTrackCreator.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/MuonClusterOnTrackCreator.h @@ -108,6 +108,8 @@ namespace Muon { double m_fixedErrorTgcPhi; double m_fixedErrorRpcPhi; double m_fixedErrorCscPhi; + + double m_eDriftVelocityMM; }; } #endif // MuonClusterOnTrackCreator_H diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrackFindingEvent/MuonTrackFindingEvent/MuPatHit.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrackFindingEvent/MuonTrackFindingEvent/MuPatHit.h index 1cad2f89aacc..7ad987330214 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrackFindingEvent/MuonTrackFindingEvent/MuPatHit.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrackFindingEvent/MuonTrackFindingEvent/MuPatHit.h @@ -19,7 +19,7 @@ namespace Muon { class MuPatHit { public: - enum Type { UnknownType = -1, MDT = 0, RPC = 1, TGC = 2, CSC = 3, PREC = 4, Pseudo = 5, Scatterer = 6 }; + enum Type { UnknownType = -1, MDT = 0, RPC = 1, TGC = 2, CSC = 3, MM = 4, sTGC = 5, PREC = 6, Pseudo = 7, Scatterer = 8 }; enum Status { UnknownStatus = -1, OnTrack = 0, Outlier, NotOnTrack }; enum HitSelection { UnknownSelection = -1, Precise = 0, Broad = 1 }; diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.cxx index f7eb4d7dc608..19d277c9b502 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.cxx @@ -8,6 +8,7 @@ #include "MuonReadoutGeometry/sTgcReadoutElement.h" #include "MuonReadoutGeometry/MuonPadDesign.h" #include "MuonPrepRawData/sTgcPrepData.h" +#include "MuonPrepRawData/MMPrepData.h" #include "TrkTrack/Track.h" #include "TrkParameters/TrackParameters.h" #include "TrkEventPrimitives/FitQuality.h" @@ -60,7 +61,7 @@ namespace Muon { std::vector<const Muon::MuonSegment*>* MuonClusterSegmentFinderTool::find(std::vector< const Muon::MuonClusterOnTrack* >& muonClusters) { ATH_MSG_DEBUG("Entering MuonClusterSegmentFinderTool with " << muonClusters.size() << " clusters to be fit" ); - if(muonClusters.size() < 4) return 0; + if(belowThreshold(muonClusters,4)) return 0; std::vector<const Muon::MuonSegment*>* segs = findPrecisionSegments(muonClusters); if(segs == 0) return 0; if(segs->size() == 0) @@ -85,7 +86,7 @@ namespace Muon { bool selectPhiHits(false); std::vector< const Muon::MuonClusterOnTrack* > clusters = cleanClusters(muonClusters,selectPhiHits); ATH_MSG_VERBOSE("After hit cleaning, there are " << clusters.size() << " 2D clusters to be fit" ); - if(clusters.size() < 4){ + if(belowThreshold(clusters,4)){ return 0; } @@ -101,9 +102,9 @@ namespace Muon { std::vector< const Muon::MuonClusterOnTrack* > rioVecPrevious; //find all clusters near the seed and try to fit for(unsigned int i=0; i<seeds.size(); ++i) { - std::vector< const Muon::MuonClusterOnTrack* > rioVec = getClustersOnSegment(orderedClusters,seeds[i]); + std::vector< const Muon::MuonClusterOnTrack* > rioVec = getClustersOnSegment(orderedClusters,seeds[i],false); // make consistent cut - if(rioVec.size() <4) continue; + if(belowThreshold(rioVec,4)) continue; // logic to reduce combinatorics if(rioVec.size() == rioVecPrevious.size()) { bool sameContent = true; @@ -264,8 +265,9 @@ namespace Muon { std::vector<const Muon::MuonSegment*>* etaSegs) const { bool selectPhiHits(true); std::vector< const Muon::MuonClusterOnTrack* > clusters = cleanClusters(muonClusters,selectPhiHits); + std::vector< const Muon::MuonClusterOnTrack* > etaClusters = cleanClusters(muonClusters,false); ATH_MSG_DEBUG("After hit cleaning, there are " << clusters.size() << " 3D clusters to be fit" ); - if(clusters.size() < 4) { + if(belowThreshold(clusters,4)) { ATH_MSG_DEBUG("Not enough phi hits present, cannot perform the fit!"); return etaSegs; } @@ -273,7 +275,8 @@ namespace Muon { TrackCollection* segTrkColl = new TrackCollection; //order the clusters by layer bool useWires(true); - std::vector< std::vector<const Muon::MuonClusterOnTrack*> > orderedClusters = orderByLayer(clusters,useWires); + std::vector< std::vector<const Muon::MuonClusterOnTrack*> > orderedClusters = orderByLayer(clusters,useWires); + std::vector< std::vector<const Muon::MuonClusterOnTrack*> > orderedEtaClusters = orderByLayer(etaClusters,false); if(orderedClusters.size() == 0) { ATH_MSG_DEBUG( "No phi wire hits found ... moving to pads" ); useWires = false; @@ -326,7 +329,8 @@ namespace Muon { seed3D = seeds[i]; } - std::vector< const Muon::MuonClusterOnTrack* > phiHits = getClustersOnSegment(orderedClusters,seed3D); + std::vector< const Muon::MuonClusterOnTrack* > phiHits = getClustersOnSegment(orderedClusters,seed3D,true); + std::vector< const Muon::MuonClusterOnTrack* > etaHitsRedone = getClustersOnSegment(orderedEtaClusters,seed3D,true); if(phiHits.size() < 2) { delete startpar; continue; @@ -352,8 +356,15 @@ namespace Muon { //interleave the phi hits std::vector<const Trk::MeasurementBase*> vec2; const std::vector<const Trk::RIO_OnTrack*> etaHits = (*sit)->containedROTs(); - if(m_ipConstraint) vec2.reserve(phiHits.size()+etaHits.size()+1); - else vec2.reserve(phiHits.size()+etaHits.size()); + bool useEtaHitsRedone = false; + if(etaHitsRedone.size()>etaHits.size()) { + ATH_MSG_VERBOSE(" Found additional eta hits " << etaHitsRedone.size() - etaHits.size()); + useEtaHitsRedone = true; + } + unsigned int netas = etaHits.size(); + if(useEtaHitsRedone) netas = etaHitsRedone.size(); + if(m_ipConstraint) vec2.reserve(phiHits.size()+netas+1); + else vec2.reserve(phiHits.size()+netas); // pseudo measurement for vtx Trk::PseudoMeasurementOnTrack* pseudoVtx = nullptr; @@ -378,10 +389,14 @@ namespace Muon { iPhi++; } else { - vec2.push_back(etaHits[iEta]); + if(!useEtaHitsRedone) { + vec2.push_back(etaHits[iEta]); + } else { + vec2.push_back(etaHitsRedone[iEta]); + } iEta++; } - if( iEta >= etaHits.size() && iPhi >= phiHits.size() ) break; + if( iEta >= netas && iPhi >= phiHits.size() ) break; } @@ -584,30 +599,62 @@ namespace Muon { } std::vector< const Muon::MuonClusterOnTrack* > MuonClusterSegmentFinderTool::getClustersOnSegment(std::vector< std::vector<const Muon::MuonClusterOnTrack*> >& clusters, - std::pair<Amg::Vector3D,Amg::Vector3D>& seed) const { + std::pair<Amg::Vector3D,Amg::Vector3D>& seed, bool tight) const { ATH_MSG_VERBOSE(" getClustersOnSegment: layers " << clusters.size() ); std::vector< const Muon::MuonClusterOnTrack* > rios; int layer = 0; for(std::vector<std::vector<const Muon::MuonClusterOnTrack*> >::const_iterator cvecIt=clusters.begin(); cvecIt!=clusters.end(); ++cvecIt) { const Muon::MuonClusterOnTrack* rio = 0; double bestDist(9999.); - for(std::vector< const Muon::MuonClusterOnTrack* >::const_iterator cit=(*cvecIt).begin(); cit!=(*cvecIt).end(); ++cit) { - double dist = clusterDistanceToSeed( *cit, seed); - double error = Amg::error((*cit)->localCovariance(),Trk::locX); - if(m_idHelperTool->isMM((*cit)->identify())) error += 25.; - ATH_MSG_VERBOSE(" lay " << layer << " dist " << dist << " pull " << dist/error + double bestTimeDist(9999.); + if (m_idHelperTool->isMM((*((*cvecIt).begin()))->identify())) { // MM specific algorithm + for(std::vector< const Muon::MuonClusterOnTrack* >::const_iterator cit=(*cvecIt).begin(); cit!=(*cvecIt).end(); ++cit) { + double tdrift = (dynamic_cast<const MMPrepData *>((*cit)->prepRawData()))->time(); + double dist = clusterDistanceToSeed( *cit, seed); + double timedist = std::abs(clusterDistanceToSeed( *cit, seed)) + std::abs(tdrift*0.015); // std::abs(tdrift*0.015) is an ad hoc penalty factor, to be optimised when time resolution is known + double error = Amg::error((*cit)->localCovariance(),Trk::locX); + if (!tight) error += 1.; + ATH_MSG_VERBOSE(" lay " << layer << " tdrift " << tdrift << " dist " << dist << " timedist " << timedist << " pull " << dist/error << " cut " << m_maxClustDist << " " << m_idHelperTool->toString((*cit)->identify()) ); - if( fabs(dist/error) < m_maxClustDist) { - if(fabs(dist) < bestDist) { - bestDist = fabs(dist); - rio = (*cit); - } - } - } - if(rio) { - ATH_MSG_VERBOSE(" adding " << bestDist << " " << m_idHelperTool->toString(rio->identify()) ); - rios.push_back( rio ); - }else{ + if( std::abs(dist/error) < m_maxClustDist) { + if(std::abs(timedist) < bestTimeDist) { + bestTimeDist = std::abs(timedist); + bestDist = dist; + } + } + } + if(bestDist<9999.) { // check if at least one cluster present close to seed + ATH_MSG_VERBOSE(" Best distance " << bestDist); + ATH_MSG_VERBOSE(" Looking for RIOs from mTPC around the best distance"); + for(std::vector< const Muon::MuonClusterOnTrack* >::const_iterator cit=(*cvecIt).begin(); cit!=(*cvecIt).end(); ++cit) { + double dist = clusterDistanceToSeed( *cit, seed); + double window = std::abs(2.*5.*0.047 * ((*cit)->globalPosition().perp() / (*cit)->globalPosition().z())); // all hits in the range [bestDist-window;bestDist-window] will be accepted; 2-safety factor; 5-time resolution; 0.047-drift velocity; (hardcoded values to be removed once time resolution model is known) + double error = Amg::error((*cit)->localCovariance(),Trk::locX); + if (!tight) error += 1.; + ATH_MSG_VERBOSE(" Current RIO : distance " << dist << " window " << window << " to be attached " << ( (std::abs(std::abs(dist)-bestDist) < window) && (std::abs(dist/error) < m_maxClustDist) ) ); + if( (std::abs(dist-bestDist) < window) && (std::abs(dist/error) < m_maxClustDist) ) { + rios.push_back( (*cit) ); + ATH_MSG_VERBOSE(" adding " << dist << " " << m_idHelperTool->toString((*cit)->identify()) ); + } + } + } + } else { // algorithm for all the technoligies but MM + for(std::vector< const Muon::MuonClusterOnTrack* >::const_iterator cit=(*cvecIt).begin(); cit!=(*cvecIt).end(); ++cit) { + double dist = clusterDistanceToSeed( *cit, seed); + double error = Amg::error((*cit)->localCovariance(),Trk::locX); + ATH_MSG_VERBOSE(" lay " << layer << " dist " << dist << " pull " << dist/error + << " cut " << m_maxClustDist << " " << m_idHelperTool->toString((*cit)->identify()) ); + if( std::abs(dist/error) < m_maxClustDist) { + if(std::abs(dist) < bestDist) { + bestDist = std::abs(dist); + rio = (*cit); + } + } + } + if(rio) { + ATH_MSG_VERBOSE(" adding " << bestDist << " " << m_idHelperTool->toString(rio->identify()) ); + rios.push_back( rio ); + } } ++layer; } @@ -866,5 +913,20 @@ namespace Muon { return phiOverlap; } + bool MuonClusterSegmentFinderTool::belowThreshold(std::vector< const Muon::MuonClusterOnTrack* >& muonClusters, int threshold) const { + int n_surf_with_hits = 0; + if (muonClusters.size()>1) { + for(std::vector< const Muon::MuonClusterOnTrack* >::const_iterator cit=muonClusters.begin()+1; cit!=muonClusters.end(); cit++){ + if ((*cit) && (*(cit-1))) { + if ((*cit)->detectorElement()->center((*cit)->identify()) != (*(cit-1))->detectorElement()->center((*(cit-1))->identify())) { + n_surf_with_hits++; + } + } + } + } else + n_surf_with_hits = muonClusters.size(); + if(n_surf_with_hits < threshold) return true; + else return false; + } }//end namespace diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.h index e53b30c7f55f..289d5f2fa7b9 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.h +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.h @@ -77,11 +77,14 @@ namespace Muon { std::vector<std::pair<double,double> > getPadPhiOverlap(std::vector< std::vector<const Muon::MuonClusterOnTrack*> >& pads) const; //associate clusters to the segment seeds std::vector< const Muon::MuonClusterOnTrack* > getClustersOnSegment(std::vector< std::vector<const Muon::MuonClusterOnTrack*> >& clusters, - std::pair<Amg::Vector3D,Amg::Vector3D>& seed) const; + std::pair<Amg::Vector3D,Amg::Vector3D>& seed, bool tight) const; //distance of cluster to segment seed double clusterDistanceToSeed(const Muon::MuonClusterOnTrack* clust, std::pair<Amg::Vector3D,Amg::Vector3D>& seed) const; Amg::Vector3D intersectPlane( const Trk::PlaneSurface& surf, const Amg::Vector3D& pos, const Amg::Vector3D& dir ) const; Trk::Track* fit( const std::vector<const Trk::MeasurementBase*>& vec2, const Trk::TrackParameters& startpar ) const; + + //check if enough surfaces are hitted + bool belowThreshold(std::vector< const Muon::MuonClusterOnTrack* >& muonClusters, int threshold) const; }; diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatHitTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatHitTool.cxx index e08230638c19..960ce3436242 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatHitTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatHitTool.cxx @@ -400,6 +400,8 @@ namespace Muon { else if( m_idHelperTool->isTgc(id) ) return MuPatHit::TGC; else if( m_idHelperTool->isCsc(id) ) return MuPatHit::CSC; else if( m_idHelperTool->isRpc(id) ) return MuPatHit::RPC; + else if( m_idHelperTool->isMM(id) ) return MuPatHit::MM; + else if( m_idHelperTool->issTgc(id) ) return MuPatHit::sTGC; else if( m_idHelperTool->isMuon(id) ) return MuPatHit::PREC; return MuPatHit::UnknownType; } @@ -414,7 +416,7 @@ namespace Muon { if( hitInfo.id.is_valid() && m_idHelperTool->isMuon(hitInfo.id) ) { hitInfo.type = getHitType(hitInfo.id); hitInfo.measuresPhi = m_idHelperTool->measuresPhi(hitInfo.id); - if( hitInfo.type != MuPatHit::MDT ) hitInfo.id = m_idHelperTool->layerId(hitInfo.id); + if( hitInfo.type != MuPatHit::MDT && hitInfo.type != MuPatHit::MM ) hitInfo.id = m_idHelperTool->layerId(hitInfo.id); } } @@ -479,7 +481,7 @@ namespace Muon { // if we reached the end of the list, insert the hit at the end if( pos == list.end() ) { // check whether hit duplicate of last hit in list - if( isLargerCal(list.back(),hit) != isLargerCal(hit,list.back()) ){ + if( isLargerCal(list.back(),hit) != isLargerCal(hit,list.back()) || (hit->info().type == MuPatHit::MM && hit->info().id != list.back()->info().id) ){ ATH_MSG_VERBOSE(" inserting hit at back " << m_idHelperTool->toString(hit->info().id) << " " << m_printer->print(hit->parameters()) ); list.push_back(hit); @@ -502,7 +504,7 @@ namespace Muon { // if we reached the first list item, check whether current hit is smaller. If so insert before first. if( pos == list.begin() && !isLarger ){ // check whether hit duplicate of last hit in list - if( isLargerCal(list.front(),hit) != isLargerCal(hit,list.front()) ){ + if( isLargerCal(list.front(),hit) != isLargerCal(hit,list.front()) || (hit->info().type == MuPatHit::MM && hit->info().id != list.front()->info().id) ){ ATH_MSG_VERBOSE(" inserting hit at front " << m_idHelperTool->toString(hit->info().id) << " " << m_printer->print(hit->parameters()) ); @@ -521,7 +523,7 @@ namespace Muon { ++pos; if( pos == list.end() ) { // check whether hit duplicate of last hit in list - if( isLargerCal(list.back(),hit) != isLargerCal(hit,list.back()) ){ + if( isLargerCal(list.back(),hit) != isLargerCal(hit,list.back()) || (hit->info().type == MuPatHit::MM && hit->info().id != list.back()->info().id) ){ ATH_MSG_VERBOSE(" inserting hit at back " << m_idHelperTool->toString(hit->info().id) << " " << m_printer->print(hit->parameters()) ); list.push_back(hit); @@ -539,7 +541,7 @@ namespace Muon { // remove duplicates // check whether hit and entry at pos are a duplicate - if( isLarger == isLargerCal(*pos,hit) ){ + if( isLarger == isLargerCal(*pos,hit) && (hit->info().type != MuPatHit::MM || hit->info().id == (*pos)->info().id) ){ // hit is a duplicate ATH_MSG_VERBOSE(" NOT inserting duplicate hit " << m_idHelperTool->toString(hit->info().id) << " " << m_printer->print(hit->parameters()) ); @@ -551,7 +553,7 @@ namespace Muon { --pos; // move to previous hit // check whether hit and entry at pos are a duplicate - if( isLargerCal(hit,*pos) == isLargerCal(*pos,hit) ){ + if( isLargerCal(hit,*pos) == isLargerCal(*pos,hit) && (hit->info().type != MuPatHit::MM || hit->info().id == (*pos)->info().id) ){ ++pos; // move forward to insert position for pos // hit is a duplicate ATH_MSG_VERBOSE(" NOT inserting duplicate hit " << m_idHelperTool->toString(hit->info().id) diff --git a/Reconstruction/MuonIdentification/MuidTrackBuilder/src/CombinedMuonTrackBuilder.cxx b/Reconstruction/MuonIdentification/MuidTrackBuilder/src/CombinedMuonTrackBuilder.cxx index 5a8dfd45d4f5..f3d786d251fd 100755 --- a/Reconstruction/MuonIdentification/MuidTrackBuilder/src/CombinedMuonTrackBuilder.cxx +++ b/Reconstruction/MuonIdentification/MuidTrackBuilder/src/CombinedMuonTrackBuilder.cxx @@ -3255,7 +3255,8 @@ CombinedMuonTrackBuilder::appendSelectedTSOS( if (previousSurface && std::find(measurementSurfaces.begin(), measurementSurfaces.end(), - surface) != measurementSurfaces.end()) + surface) != measurementSurfaces.end() + && !m_idHelperTool->isMM(surface->associatedDetectorElementIdentifier())) { std::string type = ""; if (dynamic_cast<const Trk::CompetingRIOsOnTrack*>((**s).measurementOnTrack())) @@ -4088,7 +4089,8 @@ CombinedMuonTrackBuilder::createSpectrometerTSOS(const Trk::Track& spectrometerT if (previousSurface && std::find(measurementSurfaces.begin(), measurementSurfaces.end(), - surface) != measurementSurfaces.end()) + surface) != measurementSurfaces.end() + && !m_idHelperTool->isMM(surface->associatedDetectorElementIdentifier())) { std::string type = ""; if (dynamic_cast<const Trk::CompetingRIOsOnTrack*>((**s).measurementOnTrack())) diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h index ee2674d2bd95..5248b04db462 100755 --- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h +++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h @@ -293,6 +293,7 @@ private: mutable std::vector<const Trk::Layer*> m_barrelcylinders; mutable std::vector<const Trk::Layer*> m_othercylinders; mutable bool m_fastmat; + mutable int m_MMCorrectionStatus; }; //std::vector<CLHEP::HepMatrix> Trk::GlobalChi2Fitter::m_derivpool; diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrajectory.cxx b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrajectory.cxx index dd2e8609d3fa..242693cd8f7a 100644 --- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrajectory.cxx +++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GXFTrajectory.cxx @@ -173,7 +173,8 @@ namespace Trk { const MeasurementBase *meas = m_states.back()->measurement(); const MeasurementBase *meas2 = state->measurement(); if (&meas->associatedSurface() == &meas2->associatedSurface() && - meas->localParameters().parameterKey() == meas2->localParameters().parameterKey()) { + meas->localParameters().parameterKey() == meas2->localParameters().parameterKey() && + state->measurementType() != TrackState::MM) { delete state; return false; } diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx index 9b1cefe2495c..4d19e16425c7 100644 --- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx +++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx @@ -143,7 +143,8 @@ namespace Trk { m_updatescat{}, m_useCaloTG(false), m_caloMaterialProvider("Trk::TrkMaterialProviderTool/TrkMaterialProviderTool"), - m_rejectLargeNScat(false){ + m_rejectLargeNScat(false), + m_MMCorrectionStatus(0){ // tools and services declareProperty("ExtrapolationTool", m_extrapolator); declareProperty("MeasurementUpdateTool", m_updator); @@ -2238,7 +2239,48 @@ namespace Trk { MeasurementSet::const_iterator itSet = rots.begin(); MeasurementSet::const_iterator itSetEnd = rots.end(); GXFTrajectory trajectory; - for (; itSet != itSetEnd; ++itSet) { + + if (m_MMCorrectionStatus==0) { + for (itSet = rots.begin(); itSet != itSetEnd; ++itSet) { + if ((*itSet)) { + if (m_DetID->is_mm((*itSet)->associatedSurface().associatedDetectorElementIdentifier())) { + m_MMCorrectionStatus = 1; + break; + } + } + } + } + + if (m_MMCorrectionStatus==1) { + itSet = rots.begin(); + MeasurementSet rots_new; + MeasurementSet rots_tbd; + for (itSet = rots.begin(); itSet != itSetEnd; ++itSet) { + if (!(*itSet)) { + msg(MSG::WARNING) << "There is an empty MeasurementBase object in the track! Skip this object.." << endmsg; + } else { + const RIO_OnTrack *rot = dynamic_cast<const RIO_OnTrack *>(*itSet); + if (rot && m_DetID->is_mm(rot->identify())) { + const PlaneSurface* surf = dynamic_cast<const PlaneSurface *>(&rot->associatedSurface()); + AtaPlane atapl(surf->center(), param.parameters()[Trk::phi], param.parameters()[Trk::theta], param.parameters()[Trk::qOverP], *surf); + rot = m_ROTcreator->correct(*(rot->prepRawData()), atapl); + rots_tbd.push_back(rot); + rots_new.push_back(rot); + } else { + rots_new.push_back(*itSet); + } + } + } + m_MMCorrectionStatus = -1; + Track *track = fit(rots_new, param, runOutlier, matEffects); + m_MMCorrectionStatus = 0; + for (MeasurementSet::const_iterator it = rots_tbd.begin(); it != rots_tbd.end(); it++) { + delete *it; + } + return track; + } + + for (itSet = rots.begin(); itSet != itSetEnd; ++itSet) { if (!(*itSet)) { msg(MSG::WARNING) << "There is an empty MeasurementBase object in the track! Skip this object.." << endmsg; }else { diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackCreator.cxx b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackCreator.cxx index f0f9814a5848..b67d506645a3 100755 --- a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackCreator.cxx +++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackCreator.cxx @@ -213,8 +213,8 @@ Trk::RIO_OnTrackCreator::correct(const Trk::PrepRawData& rio, return m_MuonDriftCircleCor->correct(rio, trk); } } - if ( (m_idHelper->is_csc(id)) || (m_idHelper->is_rpc(id)) - || (m_idHelper->is_tgc(id)) ) { + if ( (m_idHelper->is_csc(id)) || (m_idHelper->is_rpc(id)) + || (m_idHelper->is_tgc(id)) || (m_idHelper->is_mm(id)) || (m_idHelper->is_stgc(id)) ) { if (m_mode == "indet") { msg(MSG::WARNING)<<"I have no tool to correct a CSC/RPC/TGC hit! - Giving back nil."<<endmsg; return 0; -- GitLab From 2f8cbc3ff22a79ce87e8bc8c0c883e96398ceb55 Mon Sep 17 00:00:00 2001 From: Susumu Oda <susumu.oda@cern.ch> Date: Tue, 12 Jun 2018 01:14:28 +0000 Subject: [PATCH 105/562] Use SiLorentzAngleTool instead of SiDetectorElement in SCT_ClusterOnTrack (ATLASRECTS-4486) Former-commit-id: 831310cbd55fb79dc446495f777352ed5a7a8c28 --- .../share/ElectronEoverPTracking.py | 12 +++++++++--- .../InDetRecExample/share/InDetRecLoadTools.py | 14 ++++++++++++-- .../python/InDetTrigConfigRecLoadTools.py | 10 ++++++++-- .../share/ElectronEoverPTracking.py | 10 +++++++--- .../SiClusterOnTrackTool/CMakeLists.txt | 1 + .../SiClusterOnTrackTool/SCT_ClusterOnTrackTool.h | 2 ++ .../src/SCT_ClusterOnTrackTool.cxx | 4 +++- .../egamma/egammaRec/python/EMCommonRefitter.py | 7 ++++++- .../python/TrigInDetTrackFitter_Config.py | 13 +++++++++++-- 9 files changed, 59 insertions(+), 14 deletions(-) diff --git a/InnerDetector/InDetExample/InDetAlignExample/share/ElectronEoverPTracking.py b/InnerDetector/InDetExample/InDetAlignExample/share/ElectronEoverPTracking.py index 4089e5b019ab..f7eb6e117d8b 100755 --- a/InnerDetector/InDetExample/InDetAlignExample/share/ElectronEoverPTracking.py +++ b/InnerDetector/InDetExample/InDetAlignExample/share/ElectronEoverPTracking.py @@ -20,13 +20,19 @@ topSequence = AlgSequence() ############################################################################### ############################################################################### # +# SiLorentzAngleTool +# +if not hasattr(ToolSvc, "SCTLorentzAngleTool"): + from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() +# # load SCT ROT creator, we overwrite the defaults for it # from SiClusterOnTrackTool.SiClusterOnTrackToolConf import InDet__SCT_ClusterOnTrackTool SCT_ClusterOnTrackTool = InDet__SCT_ClusterOnTrackTool ("SCT_ClusterOnTrackTool", - CorrectionStrategy = 0, # do correct position bias - ErrorStrategy = 2) # do use phi dependent errors -from AthenaCommon.AppMgr import ToolSvc + CorrectionStrategy = 0, # do correct position bias + ErrorStrategy = 2, # do use phi dependent errors + LorentzAngleTool = ToolSvc.SCTLorentzAngleTool) ToolSvc += SCT_ClusterOnTrackTool # # default ROT creator, not smart ! diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py index c7cab7818571..79407bab96e5 100755 --- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py @@ -173,11 +173,16 @@ if InDetFlags.loadRotCreator(): PixelClusterOnTrackToolDigital = None if DetFlags.haveRIO.SCT_on(): + # SiLorentzAngleTool + if not hasattr(ToolSvc, "SCTLorentzAngleTool"): + from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() from SiClusterOnTrackTool.SiClusterOnTrackToolConf import InDet__SCT_ClusterOnTrackTool SCT_ClusterOnTrackTool = InDet__SCT_ClusterOnTrackTool ("InDetSCT_ClusterOnTrackTool", #CorrectionStrategy = -1, # no position correction (test for bug #56477) CorrectionStrategy = 0, # do correct position bias - ErrorStrategy = 2) # do use phi dependent errors + ErrorStrategy = 2, # do use phi dependent errors + LorentzAngleTool = ToolSvc.SCTLorentzAngleTool) ToolSvc += SCT_ClusterOnTrackTool if (InDetFlags.doPrintConfigurables()): print SCT_ClusterOnTrackTool @@ -252,6 +257,10 @@ if InDetFlags.loadRotCreator(): BroadPixelClusterOnTrackTool = None if DetFlags.haveRIO.SCT_on(): + # SiLorentzAngleTool + if not hasattr(ToolSvc, "SCTLorentzAngleTool"): + from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() # # tool to always make conservative sct cluster errors # @@ -259,7 +268,8 @@ if InDetFlags.loadRotCreator(): BroadSCT_ClusterOnTrackTool = InDet__SCT_ClusterOnTrackTool ("InDetBroadSCT_ClusterOnTrackTool", #CorrectionStrategy = -1, # no position correction (test for bug #56477) CorrectionStrategy = 0, # do correct position bias - ErrorStrategy = 0) # do use broad errors + ErrorStrategy = 0, # do use broad errors + LorentzAngleTool = ToolSvc.SCTLorentzAngleTool) ToolSvc += BroadSCT_ClusterOnTrackTool if (InDetFlags.doPrintConfigurables()): print BroadSCT_ClusterOnTrackTool diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py index b9f6184adca3..f3531ae88ad0 100755 --- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py +++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py @@ -60,12 +60,17 @@ ToolSvc += SCT_TrigSpacePointTool # if InDetTrigFlags.loadRotCreator(): + # SiLorentzAngleTool + if not hasattr(ToolSvc, "SCTLorentzAngleTool"): + from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() #4 clusterOnTrack Tools # from SiClusterOnTrackTool.SiClusterOnTrackToolConf import InDet__SCT_ClusterOnTrackTool SCT_ClusterOnTrackTool = InDet__SCT_ClusterOnTrackTool ("SCT_ClusterOnTrackTool", CorrectionStrategy = 0, # do correct position bias - ErrorStrategy = 2) # do use phi dependent errors + ErrorStrategy = 2, # do use phi dependent errors + LorentzAngleTool = ToolSvc.SCTLorentzAngleTool) ToolSvc += SCT_ClusterOnTrackTool if (InDetTrigFlags.doPrintConfigurables()): print SCT_ClusterOnTrackTool @@ -87,7 +92,8 @@ if InDetTrigFlags.loadRotCreator(): InDetTrigBroadSCT_ClusterOnTrackTool = \ InDet__SCT_ClusterOnTrackTool ("InDetTrigBroadSCT_ClusterOnTrackTool", CorrectionStrategy = 0, # do correct position bias - ErrorStrategy = 0) # do use broad errors + ErrorStrategy = 0, # do use broad errors + LorentzAngleTool = ToolSvc.SCTLorentzAngleTool) ToolSvc += InDetTrigBroadSCT_ClusterOnTrackTool if (InDetTrigFlags.doPrintConfigurables()): print InDetTrigBroadSCT_ClusterOnTrackTool diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/share/ElectronEoverPTracking.py b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/share/ElectronEoverPTracking.py index 1458131bd88b..1f0bbb6f0db6 100755 --- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/share/ElectronEoverPTracking.py +++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/share/ElectronEoverPTracking.py @@ -19,14 +19,18 @@ topSequence = AlgSequence() ####### Tracking Realted Packaages ######## ############################################################################### ############################################################################### +# SiLorentzAngleTool +if not hasattr(ToolSvc, "SCTLorentzAngleTool"): + from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() # # load SCT ROT creator, we overwrite the defaults for it # from SiClusterOnTrackTool.SiClusterOnTrackToolConf import InDet__SCT_ClusterOnTrackTool SCT_ClusterOnTrackTool = InDet__SCT_ClusterOnTrackTool ("SCT_ClusterOnTrackTool", - CorrectionStrategy = 0, # do correct position bias - ErrorStrategy = 2) # do use phi dependent errors -from AthenaCommon.AppMgr import ToolSvc + CorrectionStrategy = 0, # do correct position bias + ErrorStrategy = 2, # do use phi dependent errors + orentzAngleTool = ToolSvc.SCTLorentzAngleTool) ToolSvc += SCT_ClusterOnTrackTool # # default ROT creator, not smart ! diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/CMakeLists.txt b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/CMakeLists.txt index 62bc468ad4a9..35cd641b82d0 100644 --- a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/CMakeLists.txt +++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/CMakeLists.txt @@ -11,6 +11,7 @@ atlas_depends_on_subdirs( PUBLIC Database/AthenaPOOL/AthenaPoolUtilities DetectorDescription/GeoPrimitives GaudiKernel + InnerDetector/InDetConditions/InDetCondServices InnerDetector/InDetDetDescr/SCT_ModuleDistortions InnerDetector/InDetRecEvent/InDetPrepRawData InnerDetector/InDetRecEvent/InDetRIO_OnTrack diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/SCT_ClusterOnTrackTool.h b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/SCT_ClusterOnTrackTool.h index 43f885c2bfdc..3ebadd3603f8 100755 --- a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/SCT_ClusterOnTrackTool.h +++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/SCT_ClusterOnTrackTool.h @@ -22,6 +22,7 @@ #include "TrkParameters/TrackParameters.h" #include "InDetRIO_OnTrack/SCT_ClusterOnTrack.h" #include "SCT_ModuleDistortions/ISCT_ModuleDistortionsTool.h" +#include "InDetCondServices/ISiLorentzAngleTool.h" namespace InDet { @@ -92,6 +93,7 @@ public: //! toolhandle for central error scaling ToolHandle< Trk::IRIO_OnTrackErrorScalingTool > m_errorScalingTool; ToolHandle<ISCT_ModuleDistortionsTool> m_distortionsTool; + ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SiLorentzAngleTool", "Tool to retreive Lorentz angle"}; //! flag storing if errors need scaling or should be kept nominal bool m_scaleSctCov; diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/SCT_ClusterOnTrackTool.cxx b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/SCT_ClusterOnTrackTool.cxx index 9bac7f457926..27c58bf40a5f 100755 --- a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/SCT_ClusterOnTrackTool.cxx +++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/SCT_ClusterOnTrackTool.cxx @@ -106,6 +106,8 @@ InDet::SCT_ClusterOnTrackTool::initialize() { return StatusCode::FAILURE; } + ATH_CHECK(m_lorentzAngleTool.retrieve()); + return sc; } @@ -156,7 +158,7 @@ InDet::SCT_ClusterOnTrackTool::correct if (m_option_errorStrategy == 2 || m_option_correctionStrategy == 0) { double pNormal = trackPar.momentum().dot(EL->normal()); double pPhi = trackPar.momentum().dot(Amg::AngleAxis3D(asin(-sinAlpha), Amg::Vector3D::UnitZ()) * EL->phiAxis()); - dphi = std::atan(pPhi / pNormal) - std::atan(EL->getTanLorentzAnglePhi()); + dphi = std::atan(pPhi / pNormal) - std::atan(m_lorentzAngleTool->getTanLorentzAngle(iH)); } Amg::Vector3D localstripdir(-sinAlpha, cosAlpha, 0.); Amg::Vector3D globalstripdir = trackPar.associatedSurface().transform().linear() * localstripdir; diff --git a/Reconstruction/egamma/egammaRec/python/EMCommonRefitter.py b/Reconstruction/egamma/egammaRec/python/EMCommonRefitter.py index a23f5f5979b0..d39654884605 100644 --- a/Reconstruction/egamma/egammaRec/python/EMCommonRefitter.py +++ b/Reconstruction/egamma/egammaRec/python/EMCommonRefitter.py @@ -75,10 +75,15 @@ def CreateEgammaRotCreator(): egPixelClusterOnTrackTool = None if DetFlags.haveRIO.SCT_on(): + # SiLorentzAngleTool + if not hasattr(ToolSvc, "SCTLorentzAngleTool"): + from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() from SiClusterOnTrackTool.SiClusterOnTrackToolConf import InDet__SCT_ClusterOnTrackTool egSCT_ClusterOnTrackTool = InDet__SCT_ClusterOnTrackTool ("egSCT_ClusterOnTrackTool", CorrectionStrategy = 0, # do correct position bias - ErrorStrategy = 2) # do use phi dependent errors + ErrorStrategy = 2, # do use phi dependent errors + LorentzAngleTool = ToolSvc.SCTLorentzAngleTool) ToolSvc += egSCT_ClusterOnTrackTool else: egSCT_ClusterOnTrackTool = None diff --git a/Trigger/TrigTools/TrigInDetTrackFitter/python/TrigInDetTrackFitter_Config.py b/Trigger/TrigTools/TrigInDetTrackFitter/python/TrigInDetTrackFitter_Config.py index dde499bd11ad..72ab137e485b 100644 --- a/Trigger/TrigTools/TrigInDetTrackFitter/python/TrigInDetTrackFitter_Config.py +++ b/Trigger/TrigTools/TrigInDetTrackFitter/python/TrigInDetTrackFitter_Config.py @@ -68,15 +68,24 @@ class ConfiguredTrigL2_InDetRotCreator(Trk__RIO_OnTrackCreator) : from InDetTrigRecExample.InDetTrigConditionsAccess import PixelConditionsSetup from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags + # SiLorentzAngleTool + if not hasattr(ToolSvc, "SCTLorentzAngleTool"): + from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() + if InDetTrigFlags.doCommissioning() : myL2_SCT_ClusterOnTrackTool = InDet__SCT_ClusterOnTrackTool("TrigL2_SCT_ClusterOnTrackTool", CorrectionStrategy = 0, - ErrorStrategy = 0) + ErrorStrategy = 0, + LorentzAngleTool = ToolSvc.SCTLorentzAngleTool) myL2_PixelClusterOnTrackTool = InDet__PixelClusterOnTrackTool("TrigL2_PixelClusterOnTrackTool", PixelOfflineCalibSvc=PixelConditionsSetup.instanceName('PixelOfflineCalibSvc'), ErrorStrategy = 0) else: - myL2_SCT_ClusterOnTrackTool = InDet__SCT_ClusterOnTrackTool("TrigL2_SCT_ClusterOnTrackTool",CorrectionStrategy = 0,ErrorStrategy = 2) + myL2_SCT_ClusterOnTrackTool = InDet__SCT_ClusterOnTrackTool("TrigL2_SCT_ClusterOnTrackTool", + CorrectionStrategy = 0, + ErrorStrategy = 2, + LorentzAngleTool = ToolSvc.SCTLorentzAngleTool) myL2_PixelClusterOnTrackTool = InDet__PixelClusterOnTrackTool("TrigL2_PixelClusterOnTrackTool",PixelOfflineCalibSvc=PixelConditionsSetup.instanceName('PixelOfflineCalibSvc'),ErrorStrategy = 1) from AthenaCommon.AppMgr import ToolSvc -- GitLab From 256c4b26b80a19a10a359bb8a269895cf0ddccee Mon Sep 17 00:00:00 2001 From: Susumu Oda <susumu.oda@cern.ch> Date: Tue, 12 Jun 2018 01:16:19 +0000 Subject: [PATCH 106/562] Partial fix of ATLASRECTS-4486 (ClusterMakerTool) Former-commit-id: dfad87f8bd03d5b78b30018371363a324f66f1aa --- .../share/InDetRecPreProcessingSilicon.py | 10 +++++++++- .../python/InDetTrigConfigRecLoadTools.py | 5 +++++ .../InDetPrepRawDataFormation/src/CacheCreator.cxx | 1 - .../InDetPrepRawDataFormation/src/CacheCreator.h | 2 -- .../SiClusterizationTool/ClusterMakerTool.h | 4 +++- .../SiClusterizationTool/src/ClusterMakerTool.cxx | 4 +++- .../python/TrigOnlineSpacePointTool_Config.py | 6 ++++++ .../TrigUpgradeTest/python/InDetSetup.py | 8 +++++++- 8 files changed, 33 insertions(+), 7 deletions(-) diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecPreProcessingSilicon.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecPreProcessingSilicon.py index 32cbc09d689f..dc87370d4287 100644 --- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecPreProcessingSilicon.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecPreProcessingSilicon.py @@ -24,6 +24,13 @@ if InDetFlags.doPRDFormation(): print InDetBCM_ZeroSuppression if DetFlags.makeRIO.pixel_on() or DetFlags.makeRIO.SCT_on(): + # + # --- SiLorentzAngleTool for SCT + # + if not hasattr(ToolSvc, "SCTLorentzAngleTool"): + from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() + # # --- ClusterMakerTool (public), needed by Pixel and SCT Clusterization # @@ -31,7 +38,8 @@ if InDetFlags.doPRDFormation(): InDetClusterMakerTool = InDet__ClusterMakerTool(name = "InDetClusterMakerTool", PixelCalibSvc = None, PixelOfflineCalibSvc = None, - UsePixelCalibCondDB = False) + UsePixelCalibCondDB = False, + SCTLorentzAngleTool = ToolSvc.SCTLorentzAngleTool) if DetFlags.makeRIO.pixel_on() and not (athenaCommonFlags.isOnline() or InDetFlags.doSLHC()): InDetClusterMakerTool.PixelCalibSvc = InDetPixelCalibSvc diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py index f3531ae88ad0..3255f08d1999 100755 --- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py +++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py @@ -19,6 +19,10 @@ log = logging.getLogger("InDetTrigConfigRecLoadTools.py") from InDetTrigRecExample.InDetTrigConditionsAccess import PixelConditionsSetup +# SiLorentzAngleTool for SCT +if not hasattr(ToolSvc, "SCTLorentzAngleTool"): + from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() # # common ClusterMakerTool @@ -31,6 +35,7 @@ InDetTrigClusterMakerTool = \ PixelOfflineCalibSvc = PixelConditionsSetup.instanceName('PixelOfflineCalibSvc'), #pixLorentzAnleSvc = "InDetTrigPixLorentzAngleSvc", #UseLorentzAngleCorrections = False + SCTLorentzAngleTool = ToolSvc.SCTLorentzAngleTool ) if (InDetTrigFlags.doPrintConfigurables()): print InDetTrigClusterMakerTool diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/CacheCreator.cxx b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/CacheCreator.cxx index aed3bd742408..2e5411fead0b 100644 --- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/CacheCreator.cxx +++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/CacheCreator.cxx @@ -47,7 +47,6 @@ namespace InDet{ ATH_CHECK( m_SCTRDOCacheKey.initialize(!m_SCTRDOCacheKey.key().empty()) ); ATH_CHECK( m_PixRDOCacheKey.initialize(!m_PixRDOCacheKey.key().empty()) ); ATH_CHECK( m_condKey5.initialize() ); - ATH_CHECK( m_condKey11.initialize() ); if(!m_disableTRT) ATH_CHECK(detStore()->retrieve(m_pTRTHelper , "TRT_ID")); ATH_CHECK(detStore()->retrieve(m_sct_idHelper, "SCT_ID")); ATH_CHECK(detStore()->retrieve(m_pix_idHelper, "PixelID")); diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/CacheCreator.h b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/CacheCreator.h index 4fa911282d3f..1ed4085d859a 100644 --- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/CacheCreator.h +++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/CacheCreator.h @@ -17,7 +17,6 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration #include "InDetPrepRawData/SCT_ClusterContainer.h" #include "TrkSpacePoint/SpacePointContainer.h" #include "PixelConditionsData/PixelOfflineCalibData.h" -#include "SiLorentzAngleSvc/SiLorentzAngleCondData.h" #include "InDetRawData/SCT_RDO_Container.h" #include "InDetRawData/PixelRDO_Container.h" @@ -54,7 +53,6 @@ namespace InDet{ bool m_disableTRT; //Temporary workarounds for problem in scheduler - remove later SG::ReadCondHandleKey<PixelCalib::PixelOfflineCalibData> m_condKey5{ this, "PixelOfflineCalibData", "PixelOfflineCalibData", "" }; - SG::ReadCondHandleKey<SiLorentzAngleCondData> m_condKey11{ this, "SiLorentzAngleCondData", "SCTSiLorentzAngleCondData", "" }; SG::ReadCondHandleKey<DetectorSpecialPixelMap> m_condKey12{ this, "SpecialPixelMap", "SpecialPixelMap", "" }; template<typename T> StatusCode CreateContainer(const SG::WriteHandleKey<T>& , long unsigned int , const EventContext& ) const; diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ClusterMakerTool.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ClusterMakerTool.h index be2fd29feb69..634a6584d865 100755 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ClusterMakerTool.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ClusterMakerTool.h @@ -21,9 +21,10 @@ //#include "GaudiKernel/AlgTool.h" #include "AthenaBaseComps/AthAlgTool.h" //#include "GaudiKernel/MsgStream.h" -//#include "GaudiKernel/ToolHandle.h" +#include "GaudiKernel/ToolHandle.h" #include <vector> #include "GeoPrimitives/GeoPrimitives.h" +#include "InDetCondServices/ISiLorentzAngleTool.h" class IPixelOfflineCalibSvc; class IPixelCalibSvc; @@ -141,6 +142,7 @@ private: bool m_calibrateCharge; ServiceHandle<IPixelCalibSvc> m_calibSvc; ServiceHandle<IPixelOfflineCalibSvc> m_offlineCalibSvc; + ToolHandle<ISiLorentzAngleTool> m_sctLorentzAngleTool{this, "SCTLorentzAngleTool", "SCTLorentzAngleTool", "Tool to retreive Lorentz angle of SCT"}; // Parametrization of the Pixel errors // now moved in PixelConditionsData, except for CTB parametrization diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx index de90aad3efa9..f9ef7ce6e785 100755 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx @@ -105,6 +105,8 @@ StatusCode ClusterMakerTool::initialize(){ } } + ATH_CHECK(m_sctLorentzAngleTool.retrieve()); + return StatusCode::SUCCESS; } @@ -496,7 +498,7 @@ SCT_Cluster* ClusterMakerTool::sctCluster( const InDetDD::SiDetectorElement* element, int errorStrategy) const{ - double shift = element->getLorentzCorrection(); + double shift = m_sctLorentzAngleTool->getLorentzShift(element->identifyHash()); // const InDetDD::SiLocalPosition& localPosition = // InDetDD::SiLocalPosition(localPos[Trk::locY), // localPos[Trk::locX)+shift,0); diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/python/TrigOnlineSpacePointTool_Config.py b/Trigger/TrigTools/TrigOnlineSpacePointTool/python/TrigOnlineSpacePointTool_Config.py index 2624fae911a5..29f8e903f5e2 100644 --- a/Trigger/TrigTools/TrigOnlineSpacePointTool/python/TrigOnlineSpacePointTool_Config.py +++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/python/TrigOnlineSpacePointTool_Config.py @@ -22,10 +22,16 @@ class ConfiguredOnlineSpacePointProviderTool(OnlineSpacePointProviderTool) : from InDetTrigRecExample.InDetTrigConditionsAccess import PixelConditionsSetup from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags + + # --- SiLorentzAngleTool for SCT + if not hasattr(ToolSvc, "SCTLorentzAngleTool"): + from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() InDetL2TrigClusterMakerTool = InDet__ClusterMakerTool( name = "InDetL2TrigClusterMakerTool", UsePixelCalibCondDB = False, PixelOfflineCalibSvc = PixelConditionsSetup.instanceName('PixelOfflineCalibSvc'), + SCTLorentzAngleTool = ToolSvc.SCTLorentzAngleTool ) ToolSvc += InDetL2TrigClusterMakerTool diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/InDetSetup.py b/Trigger/TrigValidation/TrigUpgradeTest/python/InDetSetup.py index df3f59c24d09..547c47b6c545 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/InDetSetup.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/InDetSetup.py @@ -118,6 +118,11 @@ def makeInDetAlgs(): viewAlgs.append(InDetTRTRawDataProvider) + + # SCTLorentzAngleTool for ClusterMakerTool + if not hasattr(ToolSvc, "SCTLorentzAngleTool"): + from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() #Pixel clusterisation @@ -125,7 +130,8 @@ def makeInDetAlgs(): InDetClusterMakerTool = InDet__ClusterMakerTool(name = "InDetClusterMakerTool", PixelCalibSvc = None, PixelOfflineCalibSvc = None, - UsePixelCalibCondDB = False) + UsePixelCalibCondDB = False, + SCTLorentzAngleTool = ToolSvc.SCTLorentzAngleTool) ToolSvc += InDetClusterMakerTool -- GitLab From 38d5390d717c95a97e7f8f1493efed38cbf59abd Mon Sep 17 00:00:00 2001 From: Susumu Oda <Susumu.Oda@cern.ch> Date: Tue, 12 Jun 2018 08:30:20 +0200 Subject: [PATCH 107/562] Fix Coverity CID 115598 Explicit null dereferenced Former-commit-id: 6fe96ad2b8afa8ac3ec99df5b18fadb927ace750 --- .../InDetEventTPCnv/SCT_ClusterContainerCnv_p3.h | 4 +++- .../InDetEventTPCnv/src/SCT_ClusterContainerCnv_p3.cxx | 6 ++++-- .../test/SCT_ClusterContainerCnv_p3_test.cxx | 7 ++++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/InDetEventTPCnv/SCT_ClusterContainerCnv_p3.h b/InnerDetector/InDetEventCnv/InDetEventTPCnv/InDetEventTPCnv/SCT_ClusterContainerCnv_p3.h index a4280e5d582d..0aff183ad5ac 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/InDetEventTPCnv/SCT_ClusterContainerCnv_p3.h +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/InDetEventTPCnv/SCT_ClusterContainerCnv_p3.h @@ -29,7 +29,9 @@ class SCT_ClusterContainerCnv_p3 : public T_AthenaPoolTPCnvBase<InDet::SCT_Clust MsgStream &log) ; virtual InDet::SCT_ClusterContainer* createTransient(const InDet::SCT_ClusterContainer_p3* persObj, MsgStream& log); - + + // Method for test/SCT_ClusterContainerCnv_p3_test.cxx + void setIdHelper(const SCT_ID* sct_id); private: const SCT_ID *m_sctId; diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/SCT_ClusterContainerCnv_p3.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/SCT_ClusterContainerCnv_p3.cxx index efe5cfb1bd31..06f71a3858ad 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/SCT_ClusterContainerCnv_p3.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/SCT_ClusterContainerCnv_p3.cxx @@ -241,5 +241,7 @@ StatusCode SCT_ClusterContainerCnv_p3::initialize(MsgStream &log) { return StatusCode::SUCCESS; } - - +// Method for test/SCT_ClusterContainerCnv_p3_test.cxx +void SCT_ClusterContainerCnv_p3::setIdHelper(const SCT_ID* sct_id) { + m_sctId = sct_id; +} diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p3_test.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p3_test.cxx index 71f05f52d0a3..fa5b6fb9d1a0 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p3_test.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p3_test.cxx @@ -86,10 +86,11 @@ void compare (const InDet::SCT_ClusterContainer& p1, } -void testit (const InDet::SCT_ClusterContainer& trans1) +void testit (const InDet::SCT_ClusterContainer& trans1, const SCT_ID& sct_id) { MsgStream log (0, "test"); SCT_ClusterContainerCnv_p3 cnv; + cnv.setIdHelper(&sct_id); InDet::SCT_ClusterContainer_p3 pers; cnv.transToPers (&trans1, &pers, log); std::unique_ptr<InDet::SCT_ClusterContainer> trans2 @@ -148,13 +149,13 @@ void test1(const SCT_ID& sct_id) { // Do it once without leak checking to get services initialized. std::unique_ptr<const InDet::SCT_ClusterContainer> cont = makeclusts(sct_id); - testit (*cont); + testit (*cont, sct_id); } // And again with leak checking. Athena_test::Leakcheck check; std::unique_ptr<const InDet::SCT_ClusterContainer> cont = makeclusts(sct_id); - testit (*cont); + testit (*cont, sct_id); } -- GitLab From 97ba68af8e682ba37c2e09f619ba2f517613c8fb Mon Sep 17 00:00:00 2001 From: John Derek Chapman <chapman@hep.phy.cam.ac.uk> Date: Wed, 16 May 2018 11:56:31 +0000 Subject: [PATCH 108/562] Merge branch '21.3-coverity_31599_fix-fatras' into '21.3' (ATLASSIM-3696) Coverity 31599 fix: use after free in McMaterialEffectsUpdator.cxx See merge request atlas/athena!11297 (cherry picked from commit 060b46ca3e0bb2019400606a7710c93349634aff [formerly 71f4358d27edf5ae9b33d8bdd923afe9fd9ac557]) 170868d0 Fix coverity 31599: use after free in McMaterialEffectsUpdator.cxx e134121d Update McMaterialEffectsUpdator.cxx: updateInLay to return `nullptr` Former-commit-id: 483df0e68abca56535268b07b5117318bc8e7c81 --- .../ISF_FatrasTools/src/McMaterialEffectsUpdator.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsUpdator.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsUpdator.cxx index 4bdbd2f79bf3..09e7dca42348 100755 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsUpdator.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsUpdator.cxx @@ -527,7 +527,11 @@ const Trk::TrackParameters* iFatras::McMaterialEffectsUpdator::updateInLay(const } m_particleBroker->push(regisp, m_isp); } - if (isp!=m_isp) { delete isp; delete parm; } + if (isp!=m_isp) { + delete isp; + delete parm; + return nullptr; + } return parm; } else { if ( pathLim.x0Max>0 && pathLim.process<100 && pathLim.x0Collected+dX0>= pathLim.x0Max) { // elmg. interaction @@ -565,7 +569,7 @@ const Trk::TrackParameters* iFatras::McMaterialEffectsUpdator::updateInLay(const if (1./fabs(updatedParameters[4]) < m_minimumMomentum ) { if (isp!=m_isp) delete isp; - return 0; + return nullptr; } } else { matFraction += dX0/pathCorrection/m_matProp->thicknessInX0(); @@ -596,7 +600,7 @@ const Trk::TrackParameters* iFatras::McMaterialEffectsUpdator::updateInLay(const if (parm->momentum().mag() < m_minimumMomentum ) { if (isp!=m_isp) { delete isp; delete parm; } else delete updated; - return 0; + return nullptr; } } @@ -638,7 +642,7 @@ const Trk::TrackParameters* iFatras::McMaterialEffectsUpdator::updateInLay(const if (childs.size()>0) { // assume that interaction processing failed if no children if (isp!=m_isp) { delete isp; delete parm; } else delete updated; // non-updated parameters registered with the extrapolator - return 0; + return nullptr; } } -- GitLab From 199bdef9f711287fbbcdda62078a0f9a1359e79f Mon Sep 17 00:00:00 2001 From: Scott Snyder <scott.snyder@cern.ch> Date: Tue, 12 Jun 2018 18:26:16 +0000 Subject: [PATCH 109/562] IOVSvc+LArConditionsTest: Make output ordering more predictable. Former-commit-id: 8c86375d2d24e0330261ecab54a8794eea907586 --- Control/IOVSvc/src/CondInputLoader.cxx | 13 ++++++------- .../LArTest/LArConditionsTest/CMakeLists.txt | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Control/IOVSvc/src/CondInputLoader.cxx b/Control/IOVSvc/src/CondInputLoader.cxx index 0d90d365001f..a87ebb17daee 100644 --- a/Control/IOVSvc/src/CondInputLoader.cxx +++ b/Control/IOVSvc/src/CondInputLoader.cxx @@ -168,12 +168,12 @@ CondInputLoader::initialize() std::ostringstream ost; ost << "Adding base classes:"; - for (auto &e : handles_to_load) { + for (auto &e : sortedDataObjIDColl (handles_to_load)) { // ignore empty keys - if (e.key() == "") continue; + if (e->key() == "") continue; - ost << "\n + " << e << " ->"; - CLID clid = e.clid(); + ost << "\n + " << *e << " ->"; + CLID clid = e->clid(); const SG::BaseInfoBase* bib = SG::BaseInfoBase::find( clid ); if ( ! bib ) { ost << " no bases"; @@ -183,7 +183,7 @@ CondInputLoader::initialize() std::string base("UNKNOWN"); m_clidSvc->getTypeNameOfID(clid2,base).ignore(); ost << " " << base << " (" << clid2 << ")"; - SG::VarHandleKey vhk(clid2,e.key(),Gaudi::DataHandle::Writer, + SG::VarHandleKey vhk(clid2,e->key(),Gaudi::DataHandle::Writer, StoreID::storeName(StoreID::CONDITION_STORE)); m_load.emplace(vhk.fullKey()); } @@ -250,9 +250,8 @@ CondInputLoader::start() // us the trouble of stripping out the storename from the key later. // - DataObjIDColl::iterator ditr; bool fail(false); - for (ditr = m_handlesToCreate.begin(); ditr != m_handlesToCreate.end(); ++ditr) { + for (const DataObjID* ditr : sortedDataObjIDColl (m_handlesToCreate)) { SG::VarHandleKey vhk(ditr->clid(),ditr->key(),Gaudi::DataHandle::Writer); if ( ! m_condStore->contains<CondContBase>( vhk.key() ) ){ std::string tp("UNKNOWN"); diff --git a/LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt b/LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt index 1eae8b8dd0a3..3114f7a8dddb 100644 --- a/LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt +++ b/LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt @@ -61,7 +61,7 @@ function (larconditions_run_test testName) @ONLY ) atlas_add_test( ${testName} SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/larconditions_${testName}.sh - ENVIRONMENT ATLAS_REFERENCE_TAG=LArConditionsTest/LArConditionsTest-01-00-09 + ENVIRONMENT ATLAS_REFERENCE_TAG=LArConditionsTest/LArConditionsTest-01-00-10 PROPERTIES TIMEOUT 1200 EXTRA_PATTERNS "Data source lookup|Resolved path|Failed to connect to service|Release number|Sorting algorithm|Failed to connect|Failure while attempting to connect|Reading file|^CORAL/|being retired|^Domain|INFO GeoModelSvc|locate catalog|Cache alignment|COOL_DISABLE|Failed to get ContainerHandle|^RalSessionMgr Info|^RelationalDatabase Info|Bootstrap.py" ) -- GitLab From 26bf6e2c2d72714518e33941c9c5a2f892506c0a Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Tue, 12 Jun 2018 15:46:38 +0200 Subject: [PATCH 110/562] SCT_ConditionsTools: Declare tool methods const. Several tool methods that could be const weren't. Add const declarations where appropriate. Needed to fix toolhandle constness issues in SCT_Digitization. Former-commit-id: 86e7698753f6fd1cc244a5fd86db4f610fbaa998 --- .../SCT_ConditionsTools/ISCT_ElectricFieldTool.h | 2 +- .../SCT_ConditionsTools/src/SCT_ConfigurationConditionsTool.h | 2 +- .../SCT_ConditionsTools/src/SCT_ElectricFieldTool.cxx | 2 +- .../SCT_ConditionsTools/src/SCT_ElectricFieldTool.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/SCT_ConditionsTools/ISCT_ElectricFieldTool.h b/InnerDetector/InDetConditions/SCT_ConditionsTools/SCT_ConditionsTools/ISCT_ElectricFieldTool.h index 2f5049be49d8..332bcc60608b 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/SCT_ConditionsTools/ISCT_ElectricFieldTool.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/SCT_ConditionsTools/ISCT_ElectricFieldTool.h @@ -32,7 +32,7 @@ class ISCT_ElectricFieldTool: virtual public IAlgTool double fluence, double depletionVoltage, double sensorThickness, - double biasVoltage)=0; + double biasVoltage) const =0; }; diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ConfigurationConditionsTool.h b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ConfigurationConditionsTool.h index f39148946805..432e262e2c8c 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ConfigurationConditionsTool.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ConfigurationConditionsTool.h @@ -72,7 +72,7 @@ public: /**Bad chips for a given module*/ virtual unsigned int badChips(const Identifier& moduleId) const override; /** Get the chip number containing a particular strip*/ - int getChip(const Identifier& stripId) const; + virtual int getChip(const Identifier& stripId) const override; private: // Mutex to protect the contents. diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ElectricFieldTool.cxx b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ElectricFieldTool.cxx index ba2f1fead469..bff1cec303d2 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ElectricFieldTool.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ElectricFieldTool.cxx @@ -36,7 +36,7 @@ double SCT_ElectricFieldTool::getElectricField(double positionZ, double /**fluence**/, double depletionVoltage, double sensorThickness, - double biasVoltage) { + double biasVoltage) const { if ((m_eFieldModel == UNIFORM_FIELD) or (m_eFieldModel == FLAT_DIODE)) { //-------------------------------------------------------------- // Electric Field Ez diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ElectricFieldTool.h b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ElectricFieldTool.h index 7011781eea51..8eca8036f4f7 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ElectricFieldTool.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ElectricFieldTool.h @@ -34,7 +34,7 @@ class SCT_ElectricFieldTool: public extends<AthAlgTool, ISCT_ElectricFieldTool> double fluence, double depletionVoltage, double sensorThickness, - double biasVoltage) override; + double biasVoltage) const override; private: enum FieldModel{UNIFORM_FIELD, FLAT_DIODE}; -- GitLab From 996397db3b531b548447b9717945bb125b97804f Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Tue, 12 Jun 2018 15:46:54 +0200 Subject: [PATCH 111/562] TrigConfStorage: Fix clang warnings. Clang warnings: unused private class members/variables. Former-commit-id: e5e0f8027b333562e89c1aa073519c9c36787c80 --- .../TrigConfStorage/TrigConfStorage/StorageMgr.h | 3 --- .../TrigConfiguration/TrigConfStorage/src/MenuLoader.cxx | 1 - .../TrigConfiguration/TrigConfStorage/src/StorageMgr.cxx | 6 ++---- .../TrigConfStorage/src/test/ConsistencyChecker.cxx | 2 -- 4 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Trigger/TrigConfiguration/TrigConfStorage/TrigConfStorage/StorageMgr.h b/Trigger/TrigConfiguration/TrigConfStorage/TrigConfStorage/StorageMgr.h index 2e3aad50cf89..f63eeaa8a7c6 100755 --- a/Trigger/TrigConfiguration/TrigConfStorage/TrigConfStorage/StorageMgr.h +++ b/Trigger/TrigConfiguration/TrigConfStorage/TrigConfStorage/StorageMgr.h @@ -100,8 +100,6 @@ namespace TrigConf { void closeSession(); - //virtual std::ostream& msg() { return m_ostream; } - void setUseFrontier(bool useFrontier) { m_useFrontier = useFrontier; } bool useFrontier() const { return m_useFrontier; } @@ -131,7 +129,6 @@ namespace TrigConf { std::string m_user {""}; ///< user name std::string m_password {""};///< password bool m_useFrontier {false}; ///< using frontier to connect to oracle (if set, disables sqlite) - std::ostream & m_ostream; ///< output stream int m_retrialPeriod {0}; int m_retrialTimeout {0}; diff --git a/Trigger/TrigConfiguration/TrigConfStorage/src/MenuLoader.cxx b/Trigger/TrigConfiguration/TrigConfStorage/src/MenuLoader.cxx index 86818c8031b1..c96102823cd3 100755 --- a/Trigger/TrigConfiguration/TrigConfStorage/src/MenuLoader.cxx +++ b/Trigger/TrigConfiguration/TrigConfStorage/src/MenuLoader.cxx @@ -247,7 +247,6 @@ TrigConf::TriggerItemNode* TrigConf::MenuLoader::constructTree(const LogicExpression& def, const std::vector<ThrInfo>& thr_infos) { TriggerItemNode* top_node=0; vector<LogicExpression*> sub_logics = def.subLogics(); - vector<LogicExpression*>::const_iterator p; switch (def.state()) { case LogicExpression::kELEMENT: { diff --git a/Trigger/TrigConfiguration/TrigConfStorage/src/StorageMgr.cxx b/Trigger/TrigConfiguration/TrigConfStorage/src/StorageMgr.cxx index 3515f732d429..721f858196d5 100755 --- a/Trigger/TrigConfiguration/TrigConfStorage/src/StorageMgr.cxx +++ b/Trigger/TrigConfiguration/TrigConfStorage/src/StorageMgr.cxx @@ -42,12 +42,11 @@ using namespace TrigConf; TrigConf::StorageMgr::StorageMgr( const std::string& cs, const std::string& user, const std::string& pass, - std::ostream & o) : + std::ostream & /*o*/) : TrigConfMessaging("DBStorageMgr") , m_cs( cs ) , m_user( user ) , m_password( pass ) - , m_ostream( o ) {} TrigConf::StorageMgr::StorageMgr( const std::string& type, @@ -55,14 +54,13 @@ TrigConf::StorageMgr::StorageMgr( const std::string& type, const std::string& name, const std::string& user, const std::string& pass, - std::ostream & o) : + std::ostream & /*o*/) : TrigConfMessaging("DBStorageMgr") , m_dbtype( type ) , m_dbserver( server ) , m_dbname( name ) , m_user( user ) , m_password( pass ) - , m_ostream( o ) {} diff --git a/Trigger/TrigConfiguration/TrigConfStorage/src/test/ConsistencyChecker.cxx b/Trigger/TrigConfiguration/TrigConfStorage/src/test/ConsistencyChecker.cxx index de8cefb38db6..1e2b1ae096e7 100755 --- a/Trigger/TrigConfiguration/TrigConfStorage/src/test/ConsistencyChecker.cxx +++ b/Trigger/TrigConfiguration/TrigConfStorage/src/test/ConsistencyChecker.cxx @@ -618,8 +618,6 @@ int main( int argc, char* argv[] ) { log << "TrigConfConsistencyChecker: Starting tests" << std::endl; - std::vector<TrigConf::TrigConfTest* >::iterator testIt; - for( TrigConfTest* T: mt.tests() ) { if ( gConfig.DisabledTests().count( T->name() ) != 0 ) T->enable(false); -- GitLab From 2e7e7c3dca7768e90a6d1b49e02abd78970d024b Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Tue, 12 Jun 2018 15:47:21 +0200 Subject: [PATCH 112/562] TrigConfMuctpi: Fix clang warnings. clang warnings: classes with non-virtual destructors but other virtual functions. Former-commit-id: ee29612d541481c680334d552837c254d5a10cc4 --- .../TrigConfMuctpi/TrigConfMuctpi/MioctGeometry.h | 2 +- .../TrigConfMuctpi/TrigConfMuctpi/MioctROIGeometry.h | 2 +- .../TrigConfMuctpi/TrigConfMuctpi/MioctSectorGeometry.h | 2 +- .../TrigConfMuctpi/TrigConfMuctpi/MioctTopoCellGeometry.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Trigger/TrigConfiguration/TrigConfMuctpi/TrigConfMuctpi/MioctGeometry.h b/Trigger/TrigConfiguration/TrigConfMuctpi/TrigConfMuctpi/MioctGeometry.h index 85fb6040a7b3..b9f0c02df0a9 100644 --- a/Trigger/TrigConfiguration/TrigConfMuctpi/TrigConfMuctpi/MioctGeometry.h +++ b/Trigger/TrigConfiguration/TrigConfMuctpi/TrigConfMuctpi/MioctGeometry.h @@ -15,7 +15,7 @@ class MioctTopoCellGeometry; class MioctGeometry { public: MioctGeometry(); - ~MioctGeometry(); + virtual ~MioctGeometry(); // getters unsigned int mioctId() const {return m_mioctid; }; diff --git a/Trigger/TrigConfiguration/TrigConfMuctpi/TrigConfMuctpi/MioctROIGeometry.h b/Trigger/TrigConfiguration/TrigConfMuctpi/TrigConfMuctpi/MioctROIGeometry.h index e88a393a7151..85661e58de9e 100644 --- a/Trigger/TrigConfiguration/TrigConfMuctpi/TrigConfMuctpi/MioctROIGeometry.h +++ b/Trigger/TrigConfiguration/TrigConfMuctpi/TrigConfMuctpi/MioctROIGeometry.h @@ -22,7 +22,7 @@ mioctIndent(std::ostream& o, int lvl, int size) ; class MioctROIGeometry { public: MioctROIGeometry(); - ~MioctROIGeometry(); + virtual ~MioctROIGeometry(); // getters float eta() const { return m_eta; }; diff --git a/Trigger/TrigConfiguration/TrigConfMuctpi/TrigConfMuctpi/MioctSectorGeometry.h b/Trigger/TrigConfiguration/TrigConfMuctpi/TrigConfMuctpi/MioctSectorGeometry.h index 0f18fd096c54..cbe600eaa38a 100644 --- a/Trigger/TrigConfiguration/TrigConfMuctpi/TrigConfMuctpi/MioctSectorGeometry.h +++ b/Trigger/TrigConfiguration/TrigConfMuctpi/TrigConfMuctpi/MioctSectorGeometry.h @@ -19,7 +19,7 @@ class MictROIGeometry; class MioctSectorGeometry { public: MioctSectorGeometry(); - ~MioctSectorGeometry(); + virtual ~MioctSectorGeometry(); // getters unsigned int connector() const {return m_connector; }; diff --git a/Trigger/TrigConfiguration/TrigConfMuctpi/TrigConfMuctpi/MioctTopoCellGeometry.h b/Trigger/TrigConfiguration/TrigConfMuctpi/TrigConfMuctpi/MioctTopoCellGeometry.h index 93027868cad7..d7e08f67a5e2 100644 --- a/Trigger/TrigConfiguration/TrigConfMuctpi/TrigConfMuctpi/MioctTopoCellGeometry.h +++ b/Trigger/TrigConfiguration/TrigConfMuctpi/TrigConfMuctpi/MioctTopoCellGeometry.h @@ -15,7 +15,7 @@ class MioctTopoCellGeometry { public: MioctTopoCellGeometry(); - ~MioctTopoCellGeometry(); + virtual ~MioctTopoCellGeometry(); // getters float eta() const{ return m_eta; }; -- GitLab From c080e5de4c06d2d2a01ba00f031a674afff30574 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Tue, 12 Jun 2018 15:48:46 +0200 Subject: [PATCH 113/562] McParticleKernel: Making ITruthParticleCnvTool::execute const. Also add an overload explicitly taking an EventContext. Former-commit-id: 9fed9969427f1bed9009eefb541845da11c07535 --- .../McParticleKernel/McParticleKernel/ITruthParticleCnvTool.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PhysicsAnalysis/TruthParticleID/McParticleKernel/McParticleKernel/ITruthParticleCnvTool.h b/PhysicsAnalysis/TruthParticleID/McParticleKernel/McParticleKernel/ITruthParticleCnvTool.h index 6540a6ec81f3..8b758fb39927 100755 --- a/PhysicsAnalysis/TruthParticleID/McParticleKernel/McParticleKernel/ITruthParticleCnvTool.h +++ b/PhysicsAnalysis/TruthParticleID/McParticleKernel/McParticleKernel/ITruthParticleCnvTool.h @@ -34,6 +34,7 @@ class McEventCollection; class TruthParticle; class TruthParticleContainer; +class EventContext; static const InterfaceID IID_ITruthParticleCnvTool("ITruthParticleCnvTool", 1, 0); @@ -51,7 +52,8 @@ class ITruthParticleCnvTool : virtual public IAlgTool, virtual ~ITruthParticleCnvTool(); // Athena algorithm's Hooks - virtual StatusCode execute() = 0; + virtual StatusCode execute() const = 0; + virtual StatusCode execute(const EventContext& ctx) const = 0; /////////////////////////////////////////////////////////////////// // Const methods: -- GitLab From 17c65b0f057efb700047553a33da99f71d5762e9 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Tue, 12 Jun 2018 15:49:03 +0200 Subject: [PATCH 114/562] McParticleTools: Making ITruthParticleCnvTool::execute const. Also add an overload explicitly taking an EventContext. Former-commit-id: 0fab05458fabae3fd351be770cdad1b4605ecd3d --- .../McParticleTools/src/TruthParticleCnvTool.cxx | 15 +++++++++++---- .../McParticleTools/src/TruthParticleCnvTool.h | 7 ++++--- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/TruthParticleCnvTool.cxx b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/TruthParticleCnvTool.cxx index bcf22c1f47f4..50f81de55106 100755 --- a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/TruthParticleCnvTool.cxx +++ b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/TruthParticleCnvTool.cxx @@ -17,6 +17,7 @@ // FrameWork includes #include "GaudiKernel/IPartPropSvc.h" +#include "GaudiKernel/ThreadLocalContext.h" // CLHEP/HepMC includes #include "HepMC/GenEvent.h" @@ -147,12 +148,18 @@ StatusCode TruthParticleCnvTool::initialize() return StatusCode::SUCCESS; } -StatusCode TruthParticleCnvTool::execute() +StatusCode TruthParticleCnvTool::execute() const +{ + return execute (Gaudi::Hive::currentContext()); +} + + +StatusCode TruthParticleCnvTool::execute (const EventContext& ctx) const { ATH_MSG_DEBUG("Executing " << name() << "..."); //Setup WriteHandle, and record new TruthParticleContainer - SG::WriteHandle<TruthParticleContainer> mcPartsOutputWriteHandle(m_mcPartsOutputWriteHandleKey); + SG::WriteHandle<TruthParticleContainer> mcPartsOutputWriteHandle(m_mcPartsOutputWriteHandleKey, ctx); ATH_CHECK(mcPartsOutputWriteHandle.record(std::make_unique<TruthParticleContainer>())); if (!mcPartsOutputWriteHandle.isValid()){ @@ -161,10 +168,10 @@ StatusCode TruthParticleCnvTool::execute() } //Setup ReadHandle for input McEventCollection - SG::ReadHandle<McEventCollection> mcEventsReadHandle(m_mcEventsReadHandleKey); + SG::ReadHandle<McEventCollection> mcEventsReadHandle(m_mcEventsReadHandleKey, ctx); if (!mcEventsReadHandle.isValid()){ - ATH_MSG_WARNING("Invalid ReadHamdle for McEventCollection with key [" + ATH_MSG_WARNING("Invalid ReadHandle for McEventCollection with key [" << m_mcEventsReadHandleKey.key() << "] !!" << endmsg << "TruthParticleContainer [" << m_mcPartsOutputWriteHandleKey.key() diff --git a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/TruthParticleCnvTool.h b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/TruthParticleCnvTool.h index eaaa71c3b3fe..808dc3718143 100755 --- a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/TruthParticleCnvTool.h +++ b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/TruthParticleCnvTool.h @@ -73,8 +73,9 @@ class TruthParticleCnvTool : virtual public ITruthParticleCnvTool, virtual ~TruthParticleCnvTool (); // Athena's Hooks - virtual StatusCode initialize(); - virtual StatusCode execute(); + virtual StatusCode initialize() override; + virtual StatusCode execute() const override; + virtual StatusCode execute (const EventContext& ctx) const override; /////////////////////////////////////////////////////////////////// // Const methods: @@ -91,7 +92,7 @@ class TruthParticleCnvTool : virtual public ITruthParticleCnvTool, StatusCode convert( const McEventCollection* mcEvts, const unsigned int genEvtIndex, TruthParticleContainer* mcParts, - const ITruthParticleVisitor* visitor ) const; + const ITruthParticleVisitor* visitor ) const override; /////////////////////////////////////////////////////////////////// // Non-const methods: -- GitLab From 7b8b24bcf6146186d60bb118197d05e5c83f1fca Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Tue, 12 Jun 2018 15:49:20 +0200 Subject: [PATCH 115/562] McParticleEventTPCnv: Making ITruthParticleCnvTool::execute const. Also add an overload explicitly taking an EventContext. Former-commit-id: c8e36846e1af40e745dbff59dd7b36244792f507 --- .../McParticleEventTPCnv/src/RootTruthParticleCnvTool.cxx | 3 ++- .../McParticleEventTPCnv/src/RootTruthParticleCnvTool.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/PhysicsAnalysis/TruthParticleID/McParticleEventTPCnv/src/RootTruthParticleCnvTool.cxx b/PhysicsAnalysis/TruthParticleID/McParticleEventTPCnv/src/RootTruthParticleCnvTool.cxx index 6bd588212172..2bd9a828b03c 100644 --- a/PhysicsAnalysis/TruthParticleID/McParticleEventTPCnv/src/RootTruthParticleCnvTool.cxx +++ b/PhysicsAnalysis/TruthParticleID/McParticleEventTPCnv/src/RootTruthParticleCnvTool.cxx @@ -39,7 +39,8 @@ static const boost::array<int, 100> qcharge = { // Implementation of the ITruthParticleCnvTool function(s) // -StatusCode RootTruthParticleCnvTool::execute() { abort(); } +StatusCode RootTruthParticleCnvTool::execute() const { abort(); } +StatusCode RootTruthParticleCnvTool::execute(const EventContext&) const { abort(); } StatusCode RootTruthParticleCnvTool::convert(const McEventCollection *mcCollection, diff --git a/PhysicsAnalysis/TruthParticleID/McParticleEventTPCnv/src/RootTruthParticleCnvTool.h b/PhysicsAnalysis/TruthParticleID/McParticleEventTPCnv/src/RootTruthParticleCnvTool.h index 1c5df708d98b..34c8595523ba 100644 --- a/PhysicsAnalysis/TruthParticleID/McParticleEventTPCnv/src/RootTruthParticleCnvTool.h +++ b/PhysicsAnalysis/TruthParticleID/McParticleEventTPCnv/src/RootTruthParticleCnvTool.h @@ -17,7 +17,8 @@ public: /// @{ /// A hook for Athena algorithms - virtual StatusCode execute(); + virtual StatusCode execute() const; + virtual StatusCode execute (const EventContext& ctx) const; /** Converts a @c McEventCollection into an @c TruthParticleContainer (ie: * converts it into an AOD compliant collection). -- GitLab From 7c5905ecfca12386c15f9791315353f620759bb1 Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Tue, 12 Jun 2018 14:45:34 +0000 Subject: [PATCH 116/562] Merge branch '21.0-dqmon-muChain-mu50' into '21.0' Changed the monitored non-iso chain to the HLT_mu50 See merge request atlas/athena!12033 (cherry picked from commit d63624122dafa5bc9305ebab173161155812ec3b [formerly dc680197102454a3467ea185a4e3fcb786710b22]) 75773254 Changed the monitored non-iso chain to the HLT_mu50 Former-commit-id: 7bf4a9686df9553b6d5e74ea6f4b0eb989d4ed2f --- .../config/HLT/HLTmuon/collisions_run.config | 72 +++++++++---------- .../python/TrigMuonMonitCategory.py | 7 +- 2 files changed, 39 insertions(+), 40 deletions(-) diff --git a/DataQuality/DataQualityConfigurations/config/HLT/HLTmuon/collisions_run.config b/DataQuality/DataQualityConfigurations/config/HLT/HLTmuon/collisions_run.config index 793f705cbf63..11874f19f77f 100644 --- a/DataQuality/DataQualityConfigurations/config/HLT/HLTmuon/collisions_run.config +++ b/DataQuality/DataQualityConfigurations/config/HLT/HLTmuon/collisions_run.config @@ -777,7 +777,7 @@ dir HLT { hist muChain1_highpt_effsummary_by_ESid@shifter { output = HLT/TRMUO/Shift/ES_muChain1 algorithm = effalgmin_3bins - description = muChain1 corresponds to chain HLT_mu60. Shifters could click on the link (BinContentDump) on bottom right to see the history efficiencies for each bin. + description = muChain1 corresponds to chain HLT_mu50. Shifters could click on the link (BinContentDump) on bottom right to see the history efficiencies for each bin. #description = check history efficiencies <a href="https://atlasdqm.cern.ch/dqmfquery/query?histogram=HLT%2FTRMUO%2FShift%2FES_mu36_tight%2Fmu36_tight_highpt_effsummary_by_ESid%40shifter&result=BinContentDump%7CEF+algorithm&error=BinContentDump%7CEF+algorithmError&stream=express_express&period_type=run&source=tier0&proc_ver=1&low_run=201000&high_run=&low_y=0.85&high_y=1.05&outputtype=png">EF algorithm</a> <a href="https://atlasdqm.cern.ch/dqmfquery/query?histogram=HLT%2FTRMUO%2FShift%2FES_mu36_tight%2Fmu36_tight_highpt_effsummary_by_ESid%40shifter&result=BinContentDump%7CMuComb&error=BinContentDump%7CMuCombError&stream=express_express&period_type=run&source=tier0&proc_ver=1&low_run=201000&high_run=&low_y=0.85&high_y=1.05&outputtype=png" >MuComb</a> <a href="https://atlasdqm.cern.ch/dqmfquery/query?histogram=HLT%2FTRMUO%2FShift%2FES_mu36_tight%2Fmu36_tight_highpt_effsummary_by_ESid%40shifter&result=BinContentDump%7CL2MuonSA&error=BinContentDump%7CL2MuonSAError&stream=express_express&period_type=run&source=tier0&proc_ver=1&low_run=201000&high_run=&low_y=0.85&high_y=1.05&outputtype=png">L2MuonSA</a> ## need to put reference and compare! } @@ -798,17 +798,17 @@ dir HLT { hist muChain1_ESid_L2MuonSA_Turn_On_Curve_wrt_L1_Fit@shifter { output = HLT/TRMUO/Shift/ES_muChain1 algorithm = TRMUO_fermi_fit_mu50_ESid_L2MuonSA_upstream_Fit - description = muChain1 corresponds to chain HLT_mu60. + description = muChain1 corresponds to chain HLT_mu50. } hist muChain1_ESid_MuComb_Turn_On_Curve_wrt_L2MuonSA_Fit@shifter { output = HLT/TRMUO/Shift/ES_muChain1 algorithm = TRMUO_fermi_fit_mu50_ESid_muComb_upstream_Fit - description = muChain1 corresponds to chain HLT_mu60. + description = muChain1 corresponds to chain HLT_mu50. } hist muChain1_ESid_EFmuon_Turn_On_Curve_wrt_MuComb_Fit@shifter { output = HLT/TRMUO/Shift/ES_muChain1 algorithm = TRMUO_fermi_fit_mu50_ESid_MuonEFCB_upstream_Fit - description = muChain1 corresponds to chain HLT_mu60. + description = muChain1 corresponds to chain HLT_mu50. } # ESid/wrtOffline hist muChain1_ESid_L1_Turn_On_Curve_wrt_MuidCB_Fit { @@ -852,14 +852,14 @@ dir HLT { hist muChain1_highpt3bins_effwrtL1 { output = HLT/TRMUO/Expert/muChain1 algorithm = TRMUO_GatherDataNoRef - description = muChain1 corresponds to chain HLT_mu60. For express stream, efficiencies measured with Z T&P method are biased due to stream prescales, thus expected to be larger than reference. For physics stream, no such bias. Shifters should check the efficiencies carefully for physics stream. + description = muChain1 corresponds to chain HLT_mu50. For express stream, efficiencies measured with Z T&P method are biased due to stream prescales, thus expected to be larger than reference. For physics stream, no such bias. Shifters should check the efficiencies carefully for physics stream. #description = check history efficiencies: <br> express_express: <a href="https://atlasdqm.cern.ch/dqmfquery/query?histogram=HLT%2FTRMUO%2FShift%2FZTP%2Fmu36_tight_highpt3bins_effwrtL1%40shifter&result=BinContentDump%7C30-50+GeV+Z+T%26P&error=&stream=express_express&period_type=run&source=tier0&proc_ver=1&low_run=201000&high_run=&low_y=-0.05&high_y=1.05&outputtype=png">30-50 GeV Z T&P</a> <a href="https://atlasdqm.cern.ch/dqmfquery/query?histogram=HLT%2FTRMUO%2FShift%2FZTP%2Fmu36_tight_highpt3bins_effwrtL1%40shifter&result=BinContentDump%7C50-100+GeV+Z+T%26P&error=&stream=express_express&period_type=run&source=tier0&proc_ver=1&low_run=201000&high_run=&low_y=-0.05&high_y=1.05&outputtype=png">50-100 GeV Z T&P</a> <a href="https://atlasdqm.cern.ch/dqmfquery/query?histogram=HLT%2FTRMUO%2FShift%2FZTP%2Fmu36_tight_highpt3bins_effwrtL1%40shifter&result=BinContentDump%7C100-300+GeV+MSonly_barrel-tagged&error=&stream=express_express&period_type=run&source=tier0&proc_ver=1&low_run=201000&high_run=&low_y=-0.05&high_y=1.05&outputtype=png">100-300 GeV MSonly_barrel-tagged</a> <br> physics_Muons: <a href="https://atlasdqm.cern.ch/dqmfquery/query?histogram=HLT%2FTRMUO%2FShift%2FZTP%2Fmu36_tight_highpt3bins_effwrtL1%40shifter&result=BinContentDump%7C30-50+GeV+Z+T%26P&error=&stream=physics_Muons&period_type=run&source=tier0&proc_ver=1&low_run=201000&high_run=&low_y=-0.05&high_y=1.05&outputtype=png">30-50 GeV Z T&P</a> <a href="https://atlasdqm.cern.ch/dqmfquery/query?histogram=HLT%2FTRMUO%2FShift%2FZTP%2Fmu36_tight_highpt3bins_effwrtL1%40shifter&result=BinContentDump%7C50-100+GeV+Z+T%26P&error=&stream=physics_Muons&period_type=run&source=tier0&proc_ver=1&low_run=201000&high_run=&low_y=-0.05&high_y=1.05&outputtype=png">50-100 GeV Z T&P</a> <a href="https://atlasdqm.cern.ch/dqmfquery/query?histogram=HLT%2FTRMUO%2FShift%2FZTP%2Fmu36_tight_highpt3bins_effwrtL1%40shifter&result=BinContentDump%7C100-300+GeV+MSonly_barrel-tagged&error=&stream=physics_Muons&period_type=run&source=tier0&proc_ver=1&low_run=201000&high_run=&low_y=-0.05&high_y=1.05&outputtype=png">100-300 GeV MSonly_barrel-tagged</a> ## need to put reference and compare! } hist muChain1_highpt3bins_effwrtL1@shifter { output = HLT/TRMUO/Shift/ZTP algorithm = effalgmin_2bins - description = muChain1 corresponds to chain HLT_mu60. For express stream, efficiencies measured with Z T&P method are biased due to stream prescales, thus expected to be larger than reference. For physics stream, no such bias. Shifters should check the efficiencies carefully for physics stream. + description = muChain1 corresponds to chain HLT_mu50. For express stream, efficiencies measured with Z T&P method are biased due to stream prescales, thus expected to be larger than reference. For physics stream, no such bias. Shifters should check the efficiencies carefully for physics stream. #description = check history efficiencies: <br> express_express: <a href="https://atlasdqm.cern.ch/dqmfquery/query?histogram=HLT%2FTRMUO%2FShift%2FZTP%2Fmu36_tight_highpt3bins_effwrtL1%40shifter&result=BinContentDump%7C30-50+GeV+Z+T%26P&error=BinContentDump%7C30-50+GeV+Z+T%26PError&stream=express_express&period_type=run&source=tier0&proc_ver=1&low_run=201000&high_run=&low_y=0.75&high_y=0.90&outputtype=png">30-50 GeV Z T&P</a> <a href="https://atlasdqm.cern.ch/dqmfquery/query?histogram=HLT%2FTRMUO%2FShift%2FZTP%2Fmu36_tight_highpt3bins_effwrtL1%40shifter&result=BinContentDump%7C50-100+GeV+Z+T%26P&error=BinContentDump%7C50-100+GeV+Z+T%26PError&stream=express_express&period_type=run&source=tier0&proc_ver=1&low_run=201000&high_run=&low_y=0.90&high_y=1.01&outputtype=png">50-100 GeV Z T&P</a> <a href="https://atlasdqm.cern.ch/dqmfquery/query?histogram=HLT%2FTRMUO%2FShift%2FZTP%2Fmu36_tight_highpt3bins_effwrtL1%40shifter&result=BinContentDump%7C100-300+GeV+MSonly_barrel-tagged&error=BinContentDump%7C100-300+GeV+MSonly_barrel-taggedError&stream=express_express&period_type=run&source=tier0&proc_ver=1&low_run=201000&high_run=&low_y=0.90&high_y=1.01&outputtype=png">100-300 GeV MSonly_barrel-tagged</a> <br> physics_Muons: <a href="https://atlasdqm.cern.ch/dqmfquery/query?histogram=HLT%2FTRMUO%2FShift%2FZTP%2Fmu36_tight_highpt3bins_effwrtL1%40shifter&result=BinContentDump%7C30-50+GeV+Z+T%26P&error=BinContentDump%7C30-50+GeV+Z+T%26PError&stream=physics_Muons&period_type=run&source=tier0&proc_ver=1&low_run=201000&high_run=&low_y=0.75&high_y=0.90&outputtype=png">30-50 GeV Z T&P</a> <a href="https://atlasdqm.cern.ch/dqmfquery/query?histogram=HLT%2FTRMUO%2FShift%2FZTP%2Fmu36_tight_highpt3bins_effwrtL1%40shifter&result=BinContentDump%7C50-100+GeV+Z+T%26P&error=BinContentDump%7C50-100+GeV+Z+T%26PError&stream=physics_Muons&period_type=run&source=tier0&proc_ver=1&low_run=201000&high_run=&low_y=0.90&high_y=1.01&outputtype=png">50-100 GeV Z T&P</a> <a href="https://atlasdqm.cern.ch/dqmfquery/query?histogram=HLT%2FTRMUO%2FShift%2FZTP%2Fmu36_tight_highpt3bins_effwrtL1%40shifter&result=BinContentDump%7C100-300+GeV+MSonly_barrel-tagged&error=BinContentDump%7C100-300+GeV+MSonly_barrel-taggedError&stream=physics_Muons&period_type=run&source=tier0&proc_ver=1&low_run=201000&high_run=&low_y=0.90&high_y=1.01&outputtype=png">100-300 GeV MSonly_barrel-tagged</a> ## need to put reference and compare! } @@ -3512,8 +3512,8 @@ thresholds th_TRMUO_fermi_fit_mu50_ESid_L2MuonSA_upstream { error = 0.979 } limits Threshold { - warning = 60.0 - error = 62.0 + warning = 50.0 + error = 52.0 } limits Resolution { warning = 3.0 @@ -3529,8 +3529,8 @@ thresholds th_TRMUO_fermi_fit_mu50_ESid_muComb_upstream { error = 0.964 } limits Threshold { - warning = 60.0 - error = 62.0 + warning = 50.0 + error = 52.0 } limits Resolution { warning = 3.0 @@ -3545,8 +3545,8 @@ thresholds th_TRMUO_fermi_fit_mu50_ESid_MuonEFCB_upstream { error = 0.979 } limits Threshold { - warning = 60.0 - error = 62.0 + warning = 50.0 + error = 52.0 } limits Resolution { warning = 3.0 @@ -3561,8 +3561,8 @@ thresholds th_TRMUO_fermi_fit_mu50_ESstd_L2MuonSA_upstream { error = 0.979 } limits Threshold { - warning = 60.0 - error = 62.0 + warning = 50.0 + error = 52.0 } limits Resolution { warning = 3.0 @@ -3576,8 +3576,8 @@ thresholds th_TRMUO_fermi_fit_mu50_ESstd_muComb_upstream { error = 0.94 } limits Threshold { - warning = 60.0 - error = 62.0 + warning = 50.0 + error = 52.0 } limits Resolution { warning = 3.0 @@ -3592,8 +3592,8 @@ thresholds th_TRMUO_fermi_fit_mu50_ESstd_MuonEFCB_upstream { error = 0.979 } limits Threshold { - warning = 60.0 - error = 62.0 + warning = 50.0 + error = 52.0 } limits Resolution { warning = 3.0 @@ -3801,8 +3801,8 @@ thresholds th_TRMUO_fermi_fit_mu50_L2MuonSA_upstream { error = 0.98 } limits Threshold { - warning = 60.0 - error = 62.0 + warning = 50.0 + error = 52.0 } limits Resolution { warning = 3.0 @@ -3817,8 +3817,8 @@ thresholds th_TRMUO_fermi_fit_mu50_muComb_upstream { error = 0.97 } limits Threshold { - warning = 60.0 - error = 62.0 + warning = 50.0 + error = 52.0 } limits Resolution { warning = 2.0 @@ -3847,8 +3847,8 @@ thresholds th_TRMUO_fermi_fit_mu50_MuonEFSA_upstream { error = 0.799 } limits Threshold { - warning = 60.0 - error = 62.0 + warning = 50.0 + error = 52.0 } limits Resolution { warning = 2.0 @@ -3862,8 +3862,8 @@ thresholds th_TRMUO_fermi_fit_mu50_MuonEFCB_upstream { error = 0.799 } limits Threshold { - warning = 60.0 - error = 62.0 + warning = 50.0 + error = 52.0 } limits Resolution { warning = 2.0 @@ -3880,8 +3880,8 @@ thresholds th_TRMUO_fermi_fit_mu50_L2MuonSA { error = 0.599 } limits Threshold { - warning = 60.0 - error = 62.0 + warning = 50.0 + error = 52.0 } limits Resolution { warning = 3.0 @@ -3896,8 +3896,8 @@ thresholds th_TRMUO_fermi_fit_mu50_muComb { error = 0.599 } limits Threshold { - warning = 60.0 - error = 62.0 + warning = 50.0 + error = 52.0 } limits Resolution { warning = 2.0 @@ -3911,8 +3911,8 @@ thresholds th_TRMUO_fermi_fit_mu50_MuonEFMS { error = 0.599 } limits Threshold { - warning = 60.0 - error = 62.0 + warning = 50.0 + error = 52.0 } limits Resolution { warning = 2.0 @@ -3926,8 +3926,8 @@ thresholds th_TRMUO_fermi_fit_mu50_MuonEFSA { error = 0.599 } limits Threshold { - warning = 60.0 - error = 62.0 + warning = 50.0 + error = 52.0 } limits Resolution { warning = 2.0 @@ -3941,8 +3941,8 @@ thresholds th_TRMUO_fermi_fit_mu50_MuonEFCB { error = 0.599 } limits Threshold { - warning = 60.0 - error = 62.0 + warning = 50.0 + error = 52.0 } limits Resolution { warning = 2.0 diff --git a/Trigger/TrigMonitoring/TrigMuonMonitoring/python/TrigMuonMonitCategory.py b/Trigger/TrigMonitoring/TrigMuonMonitoring/python/TrigMuonMonitCategory.py index 7bb3c9a1b322..9fef4d152402 100644 --- a/Trigger/TrigMonitoring/TrigMuonMonitoring/python/TrigMuonMonitCategory.py +++ b/Trigger/TrigMonitoring/TrigMuonMonitoring/python/TrigMuonMonitCategory.py @@ -1,11 +1,10 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -#monitoring_muonNonIso = ['HLT_mu50'] -monitoring_muonNonIso = ['HLT_mu60'] +monitoring_muonNonIso = ['HLT_mu50'] monitoring_muonNonIso_HI = ['HLT_mu15_L1MU10','HLT_mu14']#8TeV #monitoring_muonNonIso_HI = ['HLT_mu10','HLT_mu14'] -monitoring_muonNonIso_pp = ['HLT_mu60'] -#monitoring_muonNonIso_pp = ['HLT_mu50'] +monitoring_muonNonIso_pp = ['HLT_mu50'] + monitoring_muonIso = ['HLT_mu26_ivarmedium'] monitoring_muonIso_HI = [''] -- GitLab From 4ba14a3163b6acd6c09bbd01b980b1dac3f52a2b Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Tue, 12 Jun 2018 13:07:55 +0000 Subject: [PATCH 117/562] Merge branch 'GeantSetupChecker_Fix_21.0' into '21.0' Fix Coverity Defect Report 115524 in G4DebuggingTools See merge request atlas/athena!11955 (cherry picked from commit 3194cc86196d78ae217ecaba6ab55da123c0bb96 [formerly 5a10fcb1ad39952cacf0c31c795d8585f64b3755]) d2d10c37 Fix Coverity Defect Report 115524 in G4DebuggingTools Former-commit-id: 39650b8cbd1a7d50edab248f47c105047a913496 --- .../G4Utilities/G4DebuggingTools/src/Geant4SetupChecker.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/Geant4SetupChecker.cxx b/Simulation/G4Utilities/G4DebuggingTools/src/Geant4SetupChecker.cxx index d5002087f46f..cc903cdcdc5b 100644 --- a/Simulation/G4Utilities/G4DebuggingTools/src/Geant4SetupChecker.cxx +++ b/Simulation/G4Utilities/G4DebuggingTools/src/Geant4SetupChecker.cxx @@ -49,16 +49,19 @@ void Geant4SetupChecker::BeginOfRunAction(const G4Run*){ G4ExceptionDescription ed; ed << "ERROR! Reference had " << lvs << " and this setup has " << g4_logical_volume_store->size() << " logical volumes" << G4endl; G4Exception("Geant4SetupChecker","LogVolMismatch",FatalException,ed); + abort(); } if (pvs!=g4_physical_volume_store->size()){ G4ExceptionDescription ed; ed << "ERROR! Reference had " << pvs << " and this setup has " << g4_physical_volume_store->size() << " physical volumes" << G4endl; G4Exception("Geant4SetupChecker","PhysVolMismatch",FatalException,ed); + abort(); } if (regs!=g4_region_store->size()){ G4ExceptionDescription ed; ed << "ERROR! Reference had " << regs << " and this setup has " << g4_region_store->size() << " regions" << G4endl; G4Exception("Geant4SetupChecker","RegionMismatch",FatalException,ed); + abort(); } } // This was the basic geometry counting part else { // This is a region - check materials and fast sim @@ -67,6 +70,7 @@ void Geant4SetupChecker::BeginOfRunAction(const G4Run*){ G4ExceptionDescription ed; ed << "ERROR! Reference had region named " << id << "that is not in this configuration, or has changed name" << G4endl; G4Exception("Geant4SetupChecker","RegionNotFound",FatalException,ed); + abort(); } unsigned int nmat=0, nfs=0; in >> nmat >> nfs; @@ -74,12 +78,14 @@ void Geant4SetupChecker::BeginOfRunAction(const G4Run*){ G4ExceptionDescription ed; ed << "ERROR! Region " << id << " had " << nmat << " materials in ref and " << areg->GetNumberOfMaterials() << " in this setup" << G4endl; G4Exception("Geant4SetupChecker","MaterialMismatch",FatalException,ed); + abort(); } if ( (!areg->GetFastSimulationManager() && nfs!=0) || ( areg->GetFastSimulationManager() && nfs!=areg->GetFastSimulationManager()->GetFastSimulationModelList().size()) ){ G4ExceptionDescription ed; ed << "ERROR! Region " << id << " had " << nfs << " fast sims in ref and " << (areg->GetFastSimulationManager()?areg->GetFastSimulationManager()->GetFastSimulationModelList().size():0) << " in this setup" << G4endl; G4Exception("Geant4SetupChecker","FastSimMismatch",FatalException,ed); + abort(); } } // End of region handling } // loop over lines -- GitLab From 076d9ebde0755753780ec16a549692fe81e98bb4 Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Tue, 12 Jun 2018 13:10:21 +0000 Subject: [PATCH 118/562] Merge branch '21.0-trig-prescale-mon-new' into '21.0' 21.0 trig prescale mon new See merge request atlas/athena!12015 (cherry picked from commit 60f5ddd51f24564da3e6e13cb88de69770ed587c [formerly f84cfe310fafa4919cd3f75e45edb29d1b7c809a]) d263dd06 Added registration to AlgorithmManager into binHeightThreshold.cxx da0d8fff algorithm modified. Parameters Nbins, WindowSize and StartFromLast introduced. 8e71ddbb BinHeightThreshold algorithm modified to be a more general one 346eb910 Interfaces to BinHegithThreshold added. These are the algorithms the user will see 0204b870 'equalWithinDeltaMethod' modified to implement relative difference comparison. bf1eb091 check added: returns 'undefined' if there are too few bins in the input histogram a8965b5a adjustments in algorithm description Former-commit-id: d2eb6e0a92f000b4972e69b70df5aeeceb0dac25 --- .../dqm_algorithms/BinHeightThreshold.h | 9 +- .../BinHeight_Equal_Threshold.h | 24 ++ .../BinHeight_GreaterThanEqual_Threshold.h | 24 ++ .../BinHeight_GreaterThan_Threshold.h | 24 ++ .../BinHeight_LessThanEqual_Threshold.h | 24 ++ .../BinHeight_LessThan_Threshold.h | 24 ++ ...ght_redEqual_yellowGreaterThan_Threshold.h | 24 ++ ...Height_redEqual_yellowLessThan_Threshold.h | 24 ++ .../dqm_algorithms/dqm_algorithmsDict.h | 7 + .../dqm_algorithms/selection.xml | 7 + .../dqm_algorithms/src/BinHeightThreshold.cxx | 360 ++++++++++++++---- 11 files changed, 480 insertions(+), 71 deletions(-) create mode 100644 DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_Equal_Threshold.h create mode 100644 DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_GreaterThanEqual_Threshold.h create mode 100644 DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_GreaterThan_Threshold.h create mode 100644 DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_LessThanEqual_Threshold.h create mode 100644 DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_LessThan_Threshold.h create mode 100644 DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_redEqual_yellowGreaterThan_Threshold.h create mode 100644 DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_redEqual_yellowLessThan_Threshold.h diff --git a/DataQuality/dqm_algorithms/dqm_algorithms/BinHeightThreshold.h b/DataQuality/dqm_algorithms/dqm_algorithms/BinHeightThreshold.h index 657044eb7350..19025fb2a2c2 100644 --- a/DataQuality/dqm_algorithms/dqm_algorithms/BinHeightThreshold.h +++ b/DataQuality/dqm_algorithms/dqm_algorithms/BinHeightThreshold.h @@ -17,16 +17,21 @@ namespace dqm_algorithms struct BinHeightThreshold : public dqm_core::Algorithm { enum binStatus {aRedBin,aYellowBin,aGreenBin,anUndefBin=-1}; - BinHeightThreshold(); + BinHeightThreshold(const std::string & name); //overwrites virtual functions BinHeightThreshold * clone( ); dqm_core::Result * execute( const std::string & , const TObject & , const dqm_core::AlgorithmConfig & ); - BinHeightThreshold::binStatus CompareBinHeightThreshold(double bincontent, double thresholdGr, double thresholdRed); + void CheckThresholds(const std::string & type, double thresholdGr, double thresholdRed); + bool checkUndefinedStatusValue(const std::string & type,double thresholdGr, double thresholdRed,std::pair<bool,double> valueGray); + BinHeightThreshold::binStatus CompareBinHeightThreshold(const std::string & type, double bincontent, double thresholdGr, double thresholdRed,std::pair<bool,double> valueGray); + bool equalWithinPrecision(double a,double b); using dqm_core::Algorithm::printDescription; void printDescription(std::ostream& out); private: + std::string name_; + double precision_; }; } diff --git a/DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_Equal_Threshold.h b/DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_Equal_Threshold.h new file mode 100644 index 000000000000..f43745468ba1 --- /dev/null +++ b/DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_Equal_Threshold.h @@ -0,0 +1,24 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/*! \file BinHeight_Equal_Threshold.h file declares the dqm_algorithms::BinHeight_Equal_Threshold class. + * \author Margherita Spalla, following what's done in BinsGreaterThanThreshold.h +*/ + +#ifndef DQM_ALGORITHMS_BINHEIGHT_EQUAL_THRESHOLD_H +#define DQM_ALGORITHMS_BINHEIGHT_EQUAL_THRESHOLD_H + +#include <dqm_core/Algorithm.h> +#include <dqm_algorithms/BinHeightThreshold.h> + +namespace dqm_algorithms +{ + struct BinHeight_Equal_Threshold : public BinHeightThreshold + { + BinHeight_Equal_Threshold(): BinHeightThreshold("Equal") {}; + + }; +} + +#endif // DQM_ALGORITHMS_BINHEIGHT_EQUAL_THRESHOLD_H diff --git a/DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_GreaterThanEqual_Threshold.h b/DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_GreaterThanEqual_Threshold.h new file mode 100644 index 000000000000..7dc34f8373bf --- /dev/null +++ b/DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_GreaterThanEqual_Threshold.h @@ -0,0 +1,24 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/*! \file BinHeight_GreaterThanEqual_Threshold.h file declares the dqm_algorithms::BinHeight_GreaterThanEqual_Threshold class. + * \author Margherita Spalla, following what's done in BinsGreaterThanThreshold.h +*/ + +#ifndef DQM_ALGORITHMS_BINHEIGHT_GREATERTHANEQUAL_THRESHOLD_H +#define DQM_ALGORITHMS_BINHEIGHT_GREATERTHANEQUAL_THRESHOLD_H + +#include <dqm_core/Algorithm.h> +#include <dqm_algorithms/BinHeightThreshold.h> + +namespace dqm_algorithms +{ + struct BinHeight_GreaterThanEqual_Threshold : public BinHeightThreshold + { + BinHeight_GreaterThanEqual_Threshold(): BinHeightThreshold("GreaterThanEqual") {}; + + }; +} + +#endif // DQM_ALGORITHMS_BINHEIGHT_GREATERTHANEQUAL_THRESHOLD_H diff --git a/DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_GreaterThan_Threshold.h b/DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_GreaterThan_Threshold.h new file mode 100644 index 000000000000..49ec7f1afa1b --- /dev/null +++ b/DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_GreaterThan_Threshold.h @@ -0,0 +1,24 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/*! \file BinHeight_GreaterThan_Threshold.h file declares the dqm_algorithms::BinHeight_GreaterThan_Threshold class. + * \author Margherita Spalla, following what's done in BinsGreaterThanThreshold.h +*/ + +#ifndef DQM_ALGORITHMS_BINHEIGHT_GREATERTHAN_THRESHOLD_H +#define DQM_ALGORITHMS_BINHEIGHT_GREATERTHAN_THRESHOLD_H + +#include <dqm_core/Algorithm.h> +#include <dqm_algorithms/BinHeightThreshold.h> + +namespace dqm_algorithms +{ + struct BinHeight_GreaterThan_Threshold : public BinHeightThreshold + { + BinHeight_GreaterThan_Threshold(): BinHeightThreshold("GreaterThan") {}; + + }; +} + +#endif // DQM_ALGORITHMS_BINHEIGHT_GREATERTHAN_THRESHOLD_H diff --git a/DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_LessThanEqual_Threshold.h b/DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_LessThanEqual_Threshold.h new file mode 100644 index 000000000000..85bd1cf9de91 --- /dev/null +++ b/DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_LessThanEqual_Threshold.h @@ -0,0 +1,24 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/*! \file BinHeight_LessThanEqual_Threshold.h file declares the dqm_algorithms::BinHeight_LessThanEqual_Threshold class. + * \author Margherita Spalla, following what's done in BinsGreaterThanThreshold.h +*/ + +#ifndef DQM_ALGORITHMS_BINHEIGHT_LESSTHANEQUAL_THRESHOLD_H +#define DQM_ALGORITHMS_BINHEIGHT_LESSTHANEQUAL_THRESHOLD_H + +#include <dqm_core/Algorithm.h> +#include <dqm_algorithms/BinHeightThreshold.h> + +namespace dqm_algorithms +{ + struct BinHeight_LessThanEqual_Threshold : public BinHeightThreshold + { + BinHeight_LessThanEqual_Threshold(): BinHeightThreshold("LessThanEqual") {}; + + }; +} + +#endif // DQM_ALGORITHMS_BINHEIGHT_LESSTHANEQUAL_THRESHOLD_H diff --git a/DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_LessThan_Threshold.h b/DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_LessThan_Threshold.h new file mode 100644 index 000000000000..f2b91defb893 --- /dev/null +++ b/DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_LessThan_Threshold.h @@ -0,0 +1,24 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/*! \file BinHeight_LessThan_Threshold.h file declares the dqm_algorithms::BinHeight_LessThan_Threshold class. + * \author Margherita Spalla, following what's done in BinsGreaterThanThreshold.h +*/ + +#ifndef DQM_ALGORITHMS_BINHEIGHT_LESSTHAN_THRESHOLD_H +#define DQM_ALGORITHMS_BINHEIGHT_LESSTHAN_THRESHOLD_H + +#include <dqm_core/Algorithm.h> +#include <dqm_algorithms/BinHeightThreshold.h> + +namespace dqm_algorithms +{ + struct BinHeight_LessThan_Threshold : public BinHeightThreshold + { + BinHeight_LessThan_Threshold(): BinHeightThreshold("LessThan") {}; + + }; +} + +#endif // DQM_ALGORITHMS_BINHEIGHT_LESSTHAN_THRESHOLD_H diff --git a/DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_redEqual_yellowGreaterThan_Threshold.h b/DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_redEqual_yellowGreaterThan_Threshold.h new file mode 100644 index 000000000000..ed405ab8056e --- /dev/null +++ b/DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_redEqual_yellowGreaterThan_Threshold.h @@ -0,0 +1,24 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/*! \file BinHeight_redEqual_yellowGreaterThan_Threshold.h file declares the dqm_algorithms::BinHeight_redEqual_yellowGreaterThan_Threshold class. + * \author Margherita Spalla, following what's done in BinsGreaterThanThreshold.h +*/ + +#ifndef DQM_ALGORITHMS_BINHEIGHT_REDEQ_YELLOWGT_THRESHOLD_H +#define DQM_ALGORITHMS_BINHEIGHT_REDEQ_YELLOWGT_THRESHOLD_H + +#include <dqm_core/Algorithm.h> +#include <dqm_algorithms/BinHeightThreshold.h> + +namespace dqm_algorithms +{ + struct BinHeight_redEqual_yellowGreaterThan_Threshold : public BinHeightThreshold + { + BinHeight_redEqual_yellowGreaterThan_Threshold(): BinHeightThreshold("redEqual_yellowGreaterThan") {}; + + }; +} + +#endif // DQM_ALGORITHMS_BINHEIGHT_REDEQ_YELLOWGT_THRESHOLD_H diff --git a/DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_redEqual_yellowLessThan_Threshold.h b/DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_redEqual_yellowLessThan_Threshold.h new file mode 100644 index 000000000000..79f691ee27fb --- /dev/null +++ b/DataQuality/dqm_algorithms/dqm_algorithms/BinHeight_redEqual_yellowLessThan_Threshold.h @@ -0,0 +1,24 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/*! \file BinHeight_redEqual_yellowLessThan_Threshold.h file declares the dqm_algorithms::BinHeight_redEqual_yellowLessThan_Threshold class. + * \author Margherita Spalla, following what's done in BinsGreaterThanThreshold.h +*/ + +#ifndef DQM_ALGORITHMS_BINHEIGHT_REDEQ_YELLOWLT_THRESHOLD_H +#define DQM_ALGORITHMS_BINHEIGHT_REDEQ_YELLOWLT_THRESHOLD_H + +#include <dqm_core/Algorithm.h> +#include <dqm_algorithms/BinHeightThreshold.h> + +namespace dqm_algorithms +{ + struct BinHeight_redEqual_yellowLessThan_Threshold : public BinHeightThreshold + { + BinHeight_redEqual_yellowLessThan_Threshold(): BinHeightThreshold("redEqual_yellowLessThan") {}; + + }; +} + +#endif // DQM_ALGORITHMS_BINHEIGHT_REDEQ_YELLOWLT_THRESHOLD_H diff --git a/DataQuality/dqm_algorithms/dqm_algorithms/dqm_algorithmsDict.h b/DataQuality/dqm_algorithms/dqm_algorithms/dqm_algorithmsDict.h index 360f58e51b45..515b906b61f1 100644 --- a/DataQuality/dqm_algorithms/dqm_algorithms/dqm_algorithmsDict.h +++ b/DataQuality/dqm_algorithms/dqm_algorithms/dqm_algorithmsDict.h @@ -31,6 +31,13 @@ #include "dqm_algorithms/BinThresh.h" #include "dqm_algorithms/BinThreshold.h" #include "dqm_algorithms/BinHeightThreshold.h" +#include "dqm_algorithms/BinHeight_GreaterThan_Threshold.h" +#include "dqm_algorithms/BinHeight_GreaterThanEqual_Threshold.h" +#include "dqm_algorithms/BinHeight_LessThan_Threshold.h" +#include "dqm_algorithms/BinHeight_LessThanEqual_Threshold.h" +#include "dqm_algorithms/BinHeight_redEqual_yellowGreaterThan_Threshold.h" +#include "dqm_algorithms/BinHeight_redEqual_yellowLessThan_Threshold.h" +#include "dqm_algorithms/BinHeight_Equal_Threshold.h" #include "dqm_algorithms/BinsDiffByStrips.h" #include "dqm_algorithms/BinsDiffFromStripMedian.h" #include "dqm_algorithms/BinsDiffFromStripMedianOnline.h" diff --git a/DataQuality/dqm_algorithms/dqm_algorithms/selection.xml b/DataQuality/dqm_algorithms/dqm_algorithms/selection.xml index 4eaa329fe533..64d3b1fc0682 100644 --- a/DataQuality/dqm_algorithms/dqm_algorithms/selection.xml +++ b/DataQuality/dqm_algorithms/dqm_algorithms/selection.xml @@ -26,6 +26,13 @@ <class name="dqm_algorithms::BinThresh"/> <class name="dqm_algorithms::BinThreshold"/> <class name="dqm_algorithms::BinHeightThreshold"/> + <class name="dqm_algorithms::BinHeight_GreaterThan_Threshold"/> + <class name="dqm_algorithms::BinHeight_GreaterThanEqual_Threshold"/> + <class name="dqm_algorithms::BinHeight_LessThan_Threshold"/> + <class name="dqm_algorithms::BinHeight_LessThanEqual_Threshold"/> + <class name="dqm_algorithms::BinHeight_redEqual_yellowGreaterThan_Threshold"/> + <class name="dqm_algorithms::BinHeight_redEqual_yellowLessThan_Threshold"/> + <class name="dqm_algorithms::BinHeight_Equal_Threshold"/> <class name="dqm_algorithms::BinsDiffByStrips"/> <class name="dqm_algorithms::BinsDiffFromStripMedian"/> <class name="dqm_algorithms::BinsDiffFromStripMedianOnline"/> diff --git a/DataQuality/dqm_algorithms/src/BinHeightThreshold.cxx b/DataQuality/dqm_algorithms/src/BinHeightThreshold.cxx index de7df11c5a43..b1e3401bd868 100644 --- a/DataQuality/dqm_algorithms/src/BinHeightThreshold.cxx +++ b/DataQuality/dqm_algorithms/src/BinHeightThreshold.cxx @@ -19,17 +19,29 @@ #include <dqm_core/AlgorithmManager.h> +//static dqm_algorithms::BinHeightThreshold myInstance; +namespace +{ + dqm_algorithms::BinHeightThreshold HeightGreaterThan( "GreaterThan" ); + dqm_algorithms::BinHeightThreshold HeightGreaterThanEqual( "GreaterThanEqual" ); + dqm_algorithms::BinHeightThreshold HeightLessThan( "LessThan" ); + dqm_algorithms::BinHeightThreshold HeightLessThanEqual( "LessThanEqual" ); + dqm_algorithms::BinHeightThreshold HeightRedEqYellowGT( "redEqual_yellowGreaterThan" ); + dqm_algorithms::BinHeightThreshold HeightRedEqYellowLT( "redEqual_yellowLessThan" ); + dqm_algorithms::BinHeightThreshold HeightEqual( "Equal" ); +} -dqm_algorithms::BinHeightThreshold::BinHeightThreshold() +dqm_algorithms::BinHeightThreshold::BinHeightThreshold( const std::string & name ) + : name_( name ) { - dqm_core::AlgorithmManager::instance().registerAlgorithm("BinHeightThreshold", this); + precision_=1e-4; + dqm_core::AlgorithmManager::instance().registerAlgorithm("BinHeight_"+name+"_Threshold", this); } dqm_algorithms::BinHeightThreshold * dqm_algorithms::BinHeightThreshold::clone() -{ - - return new BinHeightThreshold(); +{ + return new BinHeightThreshold(name_); } @@ -49,24 +61,64 @@ dqm_algorithms::BinHeightThreshold::execute( const std::string & name, } const double minstat = 1; if (histogram->GetEntries() < minstat ) { + ERS_INFO( "Too few entries: " << histogram->GetEntries() ); dqm_core::Result *result = new dqm_core::Result(dqm_core::Result::Undefined); result->tags_["InsufficientEntries"] = histogram->GetEntries(); return result; } - double bin_threshold_red; - double bin_threshold_yellow; + int start_from_last; + int n_bins; + int window_size; double gthreshold; double rthreshold; + std::pair<bool,double> grayValue; try { - bin_threshold_yellow = dqm_algorithms::tools::GetFirstFromMap( "NBins", config.getParameters() ); - bin_threshold_red = dqm_algorithms::tools::GetFirstFromMap( "NRedBins", config.getParameters() ,bin_threshold_yellow); //with this method, bin_threshold_red should be set ==bin_threshold_yellow if a 'NRedBins' option is not provided - rthreshold = dqm_algorithms::tools::GetFromMap( "RedThreshold", config.getRedThresholds() ); - gthreshold = dqm_algorithms::tools::GetFromMap( "GreenThreshold", config.getGreenThresholds() ); + n_bins = dqm_algorithms::tools::GetFirstFromMap( "NBins", config.getParameters() ,1); + window_size = dqm_algorithms::tools::GetFirstFromMap( "WindowSize", config.getParameters() ,1); + start_from_last = dqm_algorithms::tools::GetFirstFromMap( "StartFromLast", config.getParameters() ,-1); + gthreshold = dqm_algorithms::tools::GetFromMap( "HeightThreshold", config.getGreenThresholds() ); + rthreshold = dqm_algorithms::tools::GetFromMap( "HeightThreshold", config.getRedThresholds() ); } catch ( dqm_core::Exception & ex ) { throw dqm_core::BadConfig( ERS_HERE, name, ex.what(), ex ); } + grayValue.first=true; + try { + grayValue.second = dqm_algorithms::tools::GetFirstFromMap( "UndefinedStatus", config.getParameters() ); + } + catch ( dqm_core::Exception & ex ) { + grayValue.first=false; + grayValue.second=-1; + } + try { + precision_ = dqm_algorithms::tools::GetFirstFromMap( "EqualityPrecision", config.getParameters(),1e-4); + } + catch ( dqm_core::Exception & ex ) { + precision_=1e-4; + } + + + //check if the provided parameter values make sense + if(precision_<0) { + ERS_INFO("'EqualityPrecision cannot be negative: it will be re-set to its absolute value."); + precision_=fabs(precision_); + } + if(window_size<=0) { + ERS_INFO("You set search window size (WindowSize) <= 0: I will search the whole histogram."); + } + else { + if(n_bins>window_size) { + ERS_INFO("You set the minimum number of bins for throwing error/warning (NBins) larger than the window size (WindowSize): in this way the algorithm can never return error/warning. Setting NBins=WindowSize."); + n_bins=window_size; + } + } + if(n_bins<=0) { + ERS_INFO("You set the minimum number of bins for throwing error/warning (NBins) <= 0: in this way the algorithm would always return error. Setting NBins=1 (default value)."); + n_bins=1; + } + CheckThresholds(name_,gthreshold,rthreshold); + grayValue.first=checkUndefinedStatusValue(name_,gthreshold,rthreshold,grayValue); dqm_core::Result* result = new dqm_core::Result(); TH1* resulthisto; @@ -80,63 +132,73 @@ dqm_algorithms::BinHeightThreshold::execute( const std::string & name, resulthisto->Reset(); - int countConsec=0; - //first, look for the last filled LB, i.e. the bin with nonzero content of largest x + + //first, look for the last filled LB, i.e. the bin with nonzero content of largest x if start_from_last<0, if start_from_last>=0, then starts from last but N-th bin, where N=start_from_last int i_currentLB=histogram->GetNbinsX(); - while(i_currentLB>=1) + if(start_from_last>=0) + i_currentLB-=start_from_last; + else { - if(histogram->GetBinContent(i_currentLB)!=0) break; - i_currentLB--; + while(i_currentLB>=1) + { + if(histogram->GetBinContent(i_currentLB)!=0) break; + i_currentLB--; + } } - //if the histogram is just empty, do nothing (check already done, in principle should not happen) - if(i_currentLB<=0) + //if the histogram is just empty, or still has too few bins, do nothing + if(i_currentLB<=0 || i_currentLB<n_bins) { - ERS_DEBUG(1,"Histogram is empty"); + ERS_DEBUG(1,"start_from_last parameter >= total number of bins, I just cannot do the check. Do nothing."); return result; } - //check current LB - double currentLBcont= histogram -> GetBinContent(i_currentLB); - dqm_algorithms::BinHeightThreshold::binStatus currentLBstatus=CompareBinHeightThreshold(currentLBcont, gthreshold , rthreshold); -//if current LB is not green, check the number of consecutive non-green bins - if(currentLBstatus==dqm_algorithms::BinHeightThreshold::binStatus::aYellowBin || currentLBstatus==dqm_algorithms::BinHeightThreshold::binStatus::aRedBin) - { + + //now loop over an x window of size 'window_size' int iLB=i_currentLB; - double content; - dqm_algorithms::BinHeightThreshold::binStatus LBstatus; - while(iLB>=1) + int countYellow=0; + int countRed=0; + int countGray=0; + while(iLB>=1 && (window_size<0 || (i_currentLB-iLB)<window_size)) { - content=histogram->GetBinContent(iLB); - LBstatus=CompareBinHeightThreshold(content, gthreshold , rthreshold); - if(LBstatus==currentLBstatus) + double content=histogram->GetBinContent(iLB); + dqm_algorithms::BinHeightThreshold::binStatus LBstatus=CompareBinHeightThreshold(name_,content, gthreshold , rthreshold,grayValue); + if(LBstatus==dqm_algorithms::BinHeightThreshold::binStatus::aYellowBin) { - countConsec++; - //fill result histogram - resulthisto->SetBinContent(iLB,content); + countYellow++; } - else break; + if(LBstatus==dqm_algorithms::BinHeightThreshold::binStatus::aRedBin) + { + countRed++; + } + if(LBstatus==dqm_algorithms::BinHeightThreshold::binStatus::anUndefBin) + { + countGray++; + } + //fill result histogram + resulthisto->SetBinContent(iLB,content); iLB--; } - } + - std::string thrName="RED/YELLOW"; - if(currentLBstatus==dqm_algorithms::BinHeightThreshold::binStatus::aYellowBin) thrName="YELLOW"; - if(currentLBstatus==dqm_algorithms::BinHeightThreshold::binStatus::aRedBin) thrName="RED"; - ERS_DEBUG(1,"Found " << countConsec << " consecutive " << thrName << " bins"); - ERS_DEBUG(1,"Min. # of consecutive red bins for returning Red: " << bin_threshold_red); - ERS_DEBUG(1,"Min. # of consecutive yellow bins for returning Yellow: " << bin_threshold_yellow); + ERS_DEBUG(1,"Found " << countRed << " red bins and " << countYellow << " red bins. In a window of size " << window_size << " bins, starting at bin " << i_currentLB); + ERS_DEBUG(1,"To be compared with: " << n_bins); ERS_DEBUG(1,"Green treshold=" << gthreshold << " Red threshold=" << rthreshold ); - result->tags_["NBins"] = countConsec; + result->tags_["NRedBins"] = countRed; + result->tags_["NYellowBins"] = countYellow; result->object_ = (std::auto_ptr<TObject>)(TObject*)(resulthisto); - if(currentLBstatus==dqm_algorithms::BinHeightThreshold::binStatus::aRedBin && countConsec>=bin_threshold_red) + if(countRed>=n_bins) { result->status_ = dqm_core::Result::Red; } - else if(currentLBstatus==dqm_algorithms::BinHeightThreshold::binStatus::aYellowBin && countConsec>=bin_threshold_yellow) + else if(countRed+countYellow>=n_bins) { result->status_ = dqm_core::Result::Yellow; } - else + else if(countGray>=n_bins) + { + result->status_ = dqm_core::Result::Undefined; + } + else { result->status_ = dqm_core::Result::Green; } @@ -145,37 +207,197 @@ dqm_algorithms::BinHeightThreshold::execute( const std::string & name, } + +void dqm_algorithms::BinHeightThreshold::CheckThresholds(const std::string & type, double thresholdGr, double thresholdRed) { + if(type=="GreaterThan" || type=="GreaterThanEqual") + { + if(thresholdGr>=thresholdRed) + ERS_INFO("'BinHeight_" << type << "_Threshold' algorithm expects red > yellow > green. You set the warning threshold (" << thresholdGr << ") >= error threshold (" << thresholdRed << "): it will never return 'yellow/warning'."); + } + if(type=="LessThan" || type=="LessThanEqual") + { + if(thresholdGr<=thresholdRed) + ERS_INFO("'BinHeight_" << type << "_Threshold' algorithm expects red < yellow < green. You set the warning threshold (" << thresholdGr << ") <= error threshold (" << thresholdRed << "): it will never return 'yellow/warning'. Are you sure this is what you want?"); + } + if(type=="redEqual_yellowGreaterThan") + { + if(thresholdRed>0 && thresholdRed<thresholdGr) + ERS_INFO("You set the error threshold (" << thresholdRed << ") between zero and the warning threshold (" << thresholdGr << ") in 'BinHeight_redEqual_yellowGreaterThan_Threshgold' algorithm. Are you sure this is what you want?"); + } + if(type=="redEqual_yellowLessThan") + { + if(thresholdRed>thresholdGr) + ERS_INFO("You set the error threshold (" << thresholdRed << ") larger than the warning threshold (" << thresholdGr << ") in 'BinHeight_redEqual_yellowLessThan_Threshold' algorithm. Are you sure this is what you want?"); + } +} + +bool +dqm_algorithms::BinHeightThreshold::checkUndefinedStatusValue(const std::string & type,double thresholdGr, double thresholdRed,std::pair<bool,double> valueGray) { + if(!valueGray.first) + return valueGray.first; + + if(type=="LessThan" || type=="GreaterThan") + return valueGray.first; + + if(equalWithinPrecision(valueGray.second,thresholdRed)) + { + ERS_INFO("You have set 'UndefinedStatus' equal to the error threshold in 'BinHeight_" << type << "_Threshold' algorithm. Error has the precedence here: the bin content WILL NOT be checked against 'UndefinedStatus'"); + return false; + } + + if(type!="redEqual_yellowLessThan" && type!="redEqual_yellowGreaterThan" && equalWithinPrecision(valueGray.second,thresholdGr)) + { + ERS_INFO("You have set 'UndefinedStatus' equal to the warning threshold in 'BinHeight_" << type << "_Threshold' algorithm. Warning has the precedence here: the bin content WILL NOT be checked against 'UndefinedStatus'"); + return false; + } + + return valueGray.first; +} + + + dqm_algorithms::BinHeightThreshold::binStatus -dqm_algorithms::BinHeightThreshold::CompareBinHeightThreshold(double bincontent, double thresholdGr, double thresholdRed) { -if(thresholdRed!=-1) - { - if(bincontent>=thresholdRed) +dqm_algorithms::BinHeightThreshold::CompareBinHeightThreshold(const std::string & type,double bincontent, double thresholdGr, double thresholdRed,std::pair<bool,double> valueGray) { + if(valueGray.first) + { + if(equalWithinPrecision(bincontent,valueGray.second)) + { + return dqm_algorithms::BinHeightThreshold::binStatus::anUndefBin; + } + } + + if(type=="GreaterThan") + { + if(bincontent>thresholdRed) return dqm_algorithms::BinHeightThreshold::binStatus::aRedBin; - if(bincontent>=thresholdGr) + if(bincontent>thresholdGr) return dqm_algorithms::BinHeightThreshold::binStatus::aYellowBin; - return dqm_algorithms::BinHeightThreshold::binStatus::aGreenBin; - } -else - { - if(bincontent==thresholdRed) - return dqm_algorithms::BinHeightThreshold::binStatus::aRedBin; - if(bincontent==thresholdGr) - return dqm_algorithms::BinHeightThreshold::binStatus::aGreenBin; - if(bincontent>thresholdGr) - return dqm_algorithms::BinHeightThreshold::binStatus::aYellowBin; - return dqm_algorithms::BinHeightThreshold::binStatus::anUndefBin; - } + return dqm_algorithms::BinHeightThreshold::binStatus::aGreenBin; + } + if(type=="LessThan") + { + if(bincontent<thresholdRed) + return dqm_algorithms::BinHeightThreshold::binStatus::aRedBin; + if(bincontent<thresholdGr) + return dqm_algorithms::BinHeightThreshold::binStatus::aYellowBin; + return dqm_algorithms::BinHeightThreshold::binStatus::aGreenBin; + } + if(type=="GreaterThanEqual") + { + if(bincontent>thresholdRed || equalWithinPrecision(bincontent,thresholdRed)) + return dqm_algorithms::BinHeightThreshold::binStatus::aRedBin; + if(bincontent>thresholdGr || equalWithinPrecision(bincontent,thresholdGr)) + return dqm_algorithms::BinHeightThreshold::binStatus::aYellowBin; + return dqm_algorithms::BinHeightThreshold::binStatus::aGreenBin; + } + if(type=="LessThanEqual") + { + if(bincontent<thresholdRed || equalWithinPrecision(bincontent,thresholdRed)) + return dqm_algorithms::BinHeightThreshold::binStatus::aRedBin; + if(bincontent<thresholdGr || equalWithinPrecision(bincontent,thresholdGr)) + return dqm_algorithms::BinHeightThreshold::binStatus::aYellowBin; + return dqm_algorithms::BinHeightThreshold::binStatus::aGreenBin; + } + if(type=="redEqual_yellowGreaterThan") + { + if(equalWithinPrecision(bincontent,thresholdRed)) + return dqm_algorithms::BinHeightThreshold::binStatus::aRedBin; + if(bincontent>thresholdGr) + return dqm_algorithms::BinHeightThreshold::binStatus::aYellowBin; + return dqm_algorithms::BinHeightThreshold::binStatus::aGreenBin; + } + if(type=="redEqual_yellowLessThan") + { + if(equalWithinPrecision(bincontent,thresholdRed)) + return dqm_algorithms::BinHeightThreshold::binStatus::aRedBin; + if(bincontent<thresholdGr) + return dqm_algorithms::BinHeightThreshold::binStatus::aYellowBin; + return dqm_algorithms::BinHeightThreshold::binStatus::aGreenBin; + } + if(type=="Equal") + { + if(equalWithinPrecision(bincontent,thresholdRed)) + return dqm_algorithms::BinHeightThreshold::binStatus::aRedBin; + if(equalWithinPrecision(bincontent,thresholdGr)) + return dqm_algorithms::BinHeightThreshold::binStatus::aYellowBin; + return dqm_algorithms::BinHeightThreshold::binStatus::aGreenBin; + } + return dqm_algorithms::BinHeightThreshold::binStatus::anUndefBin; } +bool +dqm_algorithms::BinHeightThreshold::equalWithinPrecision(double a,double b) +{ + //relative difference method (following what suggested in (non-ATLAS) web page http://floating-point-gui.de/errors/comparison/) + double absA = fabs(a); + double absB = fabs(b); + double diff = fabs(a - b); + + if (a == b) { // shortcut, handles infinities + return true; + } + else if (a == 0 || b == 0 || diff < DBL_MIN) { + // a or b is zero or both are extremely close to it + // relative error is less meaningful here + return diff < (precision_ * DBL_MIN); + } + else { // use relative error + return (diff / std::min((absA + absB), DBL_MAX)) < precision_; + } +} + void dqm_algorithms::BinHeightThreshold::printDescription(std::ostream& out) { - out<<"BinHeightThreshold is built to monitor trigger pre-scale (PS) as a function of lumi-block (LB). It only works with TH1 as input. LB is expected to be on x axis, PS is the bin content. It defines 'red' and 'yellow' bins depending on the value of the bin content. The algorithm looks for a set of consecutive bins which:\n \t-include the current LB (i.e. the nonzero bin at largest x).\n \t-are all 'red' or all 'yellow'.\n If the bin set is found and it is longer than Nbins, then the algorithm returns 'Red' for a set of 'red' bins, 'Yellow' for a set of 'yellow' bins.\n"<<std::endl; - out<<"Mandatory Parameter: NBins: number of consecutive red(yellow) bins over which the algorithm returns Red(Yellow).\n"<<std::endl; - out<<"Optional Parameter: NRedBins: if set, replace NBins in the case of a set of red bins. To be used if different thresholds are desired for red and yellow bin sets.\n"<<std::endl; - out<<"Mandatory Parameter: RedThreshold: used in defining 'red'/'yellow'/'green' bins (see the following).\n"<<std::endl; - out<<"Mandatory Parameter: GreenThreshold: used in defining 'red'/'yellow'/'green' bins (see the following).\n"<<std::endl; - out<<"'red'/'yellow'/'green' bins are defined depending on the RedThreshold and GreenThreshold parameters.\n If RedThreshold==-1:\n \t BinContent==RedThreshold --> red bin (i.e. trigger disabled)\n \t BinContent==GreenThreshold --> green bin\n \t BinContent>GreenThreshold --> yellow bin (i.e. trigger pre-scaled). \n If RedThreshold>0:\n \t BinContent<GreenThreshold --> green bin\n \t GreenThreshold<=BinContent<RedThreshold --> yellow bin\n \t BinContent>=RedThreshold --> red bin\n"<<std::endl; + TString redCond,yellowCond; + if(name_=="redEqual_yellowGreaterThan" || name_=="redEqual_yellowLessThan" || name_=="Equal") + { + redCond="bin_content==redThreshold"; + if(name_=="Equal") + yellowCond="bin_content==yellowThreshold && bin_content!=redThreshold"; + else if(name_=="redEqual_yellowGreaterThan") + yellowCond="bin_content>yellowThreshold && bin_content!=redThreshold"; + else + yellowCond="bin_content<yellowThreshold && bin_content!=redThreshold"; + } + else + { + if(name_=="GreaterThan") + { + redCond="bin_content>redThreshold"; + yellowCond="redThreshold>=bin_content>yellowThreshold"; + } + else if(name_=="LessThan") + { + redCond="bin_content<redThreshold"; + yellowCond="redThreshold<=bin_content<yellowThreshold"; + } + else if(name_=="GreaterThanEqual") + { + redCond="bin_content>=redThreshold"; + yellowCond="redThreshold>bin_content>=yellowThreshold"; + } + else //LessThenEqual is the only remaining + { + redCond="bin_content<=redThreshold"; + yellowCond="redThreshold<bin_content<=yellowThreshold"; + } + } + out << "BinHeight_" << name_ << "_Threshold checks the bin height of a TH1. Ideally, a quantity as a function of LB. LB is expected to be on x axis, the quantity of interest is the bin content." << std::endl; + out << "BinHeight_" << name_ << "_Threshold defines 'red' and 'yellow' bins depending on the value of the bin content:\n \t-if " << redCond << ": the bin is 'red'.\n \t-if " << yellowCond << ": the bin is 'yellow'.\n \t-if (OPTIONAL) an 'UndefinedStatus' value is set and bin_content==UndefinedStatus, the bin is 'gray'."; + if(name_!="GreaterThan" && name_!="LessThan") + out << " Note that if 'UndefinedStatus' is equal to 'redThreshold' or 'yellowThreshold', the bin will be 'red'/'yellow' rather than 'gray'."; + out << "\n \t-otherwise the bin is 'green'" << std::endl; + out << "The algorithm checks all the bins in a window of size 'WindowSize', starting from:\n \t a) the last but X bin.\n \t b) the last non-zero bin.\n Oprion a) or b) is chosen by the parameter 'StartFromLast': if('StartFromLast'>=0), (a) holds and X is equal to 'StartFromLast', while (b) holds if 'StartFromLast'<0." << std::endl; + out << "In the window of interest, the number of red/yellow/gray bins is counted, respectively Nred/Nyellow/Ngray. The output is then defined comparing these numbers against the parameter 'NBins':\n \t- if Nred>=NBins: returns 'RED'.\n \t- else, if (Nred+Nyellow)>=NBins: returns 'YELLOW'.\n \t- else, if Ngray>=NBins: returns 'GREY'.\n \t- else returns 'GREEN'." << std::endl; + out << "NOTE: to avoid issues due to rounding in double precision, the equality between the bin content and any parameter is defined asking for the relative difference between the two to be smaller than a given parameter. I.e. content==Y is implemented as (abs(content-Y)/(content+Y))<epsilon. epsilon is equal to the parameter 'EqualityPrecision' which is tunable and set to 10^-4 by default\n"<<std::endl; + + out<<"Mandatory Parameter: HeightThreshold: sets the warning (yellowThreshold) and error (redThreshold) thresholds."<<std::endl; + out<<"Optional Parameter: NBins: minimum number of red/(yellow+red)/gray bins in the window of interest for the algorithm to return Red/Yellow/Grey. Default is 1."<<std::endl; + out<<"Optional Parameter: WindowSize: size of the x-axis range (in number of bins) in which red/yellow/gray bins are searched for. If WindowSize<=0, the whole istogram is searched for. Default is 1."<<std::endl; + out<<"Optional Parameter: StartFromLast: if StartFromLast=X with X>=0, the algorithm will check the bins starting from the last but X bin. If StartFromLast<0, it will start from the first bin of nonzero content. Default is -1."<<std::endl; + out<<"Optional Parameter: UndefinedStatus: a bin is defined to be 'gray' if its content is equal to UndefinedStatus. If not set, bins are not check against it."<<std::endl; + out<<"Optional Parameter: EqualityPrecision: sets the precision with which the bin content is defined to be 'equal' to a parameter, as described above. Default is 10^-4."<<std::endl; } -- GitLab From f2db8ee50b9c1edce9ad083f312900a71c0c46ff Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Tue, 12 Jun 2018 13:04:15 +0000 Subject: [PATCH 119/562] Merge branch 'ISF_ParticleFinalStateFilter_ATLASSIM-3634_21.0' into '21.0' Move all configuration for ISF_ParticleFinalStateFilter into the CfgGetter method See merge request atlas/athena!10423 (cherry picked from commit 9243c9ede364eccc02c58bfbabfb7e95f6ecf0cd [formerly 3924bc802f57afc6ba8516c7c7f59a3005e3ab2a]) c58c7a7e Move all configuration for ISF_ParticleFinalStateFilter into the CfgGetter method Former-commit-id: 0bcd5614aa2a09cee04fd7f91a3938f8b86c4386 --- .../ISF/ISF_Geant4/ISF_Geant4Services/python/iGeant4.py | 7 ------- .../ISF_HepMC_Tools/python/ISF_HepMC_ToolsConfig.py | 8 ++++++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Services/python/iGeant4.py b/Simulation/ISF/ISF_Geant4/ISF_Geant4Services/python/iGeant4.py index 92a7a22bd1d9..85fb00e8f882 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Services/python/iGeant4.py +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Services/python/iGeant4.py @@ -44,13 +44,6 @@ class iGeant4: svcMgr += Geant4SimService self.__simSvc__ = Geant4SimService - ##FIXME: ISF_ParticleFinalStateFilter is configured in - ##ISF_HepMC_ToolsConfig.py and is only used by ISF_StackFiller - ##which is also configured in ISF_HepMC_ToolsConfig.py. - finalStateFilter = getPublicTool("ISF_ParticleFinalStateFilter") - finalStateFilter.CheckGenSimStable = False - finalStateFilter.CheckGenInteracting = False - #################################### ## ## the G4 Python part: diff --git a/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/python/ISF_HepMC_ToolsConfig.py b/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/python/ISF_HepMC_ToolsConfig.py index 23bdf3a82107..86aa55787dfa 100644 --- a/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/python/ISF_HepMC_ToolsConfig.py +++ b/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/python/ISF_HepMC_ToolsConfig.py @@ -13,9 +13,13 @@ from AthenaCommon.SystemOfUnits import MeV, mm ## GenParticleFilters def getParticleFinalStateFilter(name="ISF_ParticleFinalStateFilter", **kwargs): - # ParticleFinalStateFilter + from ISF_Config.ISF_jobProperties import ISF_Flags + G4NotInUse = not ISF_Flags.UsingGeant4.get_Value() + from G4AtlasApps.SimFlags import simFlags + G4NotInUse = G4NotInUse and simFlags.ISFRun.get_Value() # use CheckGenInteracting==False to allow GenEvent neutrinos to propagate into the simulation - #kwargs.setdefault("CheckGenInteracting" , False ) + kwargs.setdefault("CheckGenSimStable", G4NotInUse) + kwargs.setdefault("CheckGenInteracting", G4NotInUse) return CfgMgr.ISF__GenParticleFinalStateFilter(name, **kwargs) def getParticleSimWhiteList(name="ISF_ParticleSimWhiteList", **kwargs): -- GitLab From 593814ff2fa1c90d0cddbea9b4356ef738fb26c1 Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Tue, 12 Jun 2018 12:58:54 +0000 Subject: [PATCH 120/562] Merge branch '21.0-update-trfArgClasses' into '21.0' 21.0 update trf arg classes See merge request atlas/athena!11987 (cherry picked from commit ba82c39c185e18fd72aba7329bde507346b91f5d [formerly d0b0739cc87ac012f2100e85181f71b766874312]) b3f5a0ec Updating trfArgClasses 4863837f Updating trfFileUtils 20cf8aeb Updating trfArgs a5aed9f2 Transform support for reporting additional metadata (ATLASJT-375) Former-commit-id: 4bd05afcd671bf51e3af34c8210e567805a7f1b0 --- Tools/PyJobTransforms/python/trfArgClasses.py | 86 +++++++++++++++++-- Tools/PyJobTransforms/python/trfArgs.py | 4 +- Tools/PyJobTransforms/python/trfFileUtils.py | 42 +++++++++ 3 files changed, 125 insertions(+), 7 deletions(-) diff --git a/Tools/PyJobTransforms/python/trfArgClasses.py b/Tools/PyJobTransforms/python/trfArgClasses.py index 54946e52ab2c..1ee21b953cba 100644 --- a/Tools/PyJobTransforms/python/trfArgClasses.py +++ b/Tools/PyJobTransforms/python/trfArgClasses.py @@ -21,7 +21,7 @@ msg = logging.getLogger(__name__) import PyJobTransforms.trfExceptions as trfExceptions -from PyJobTransforms.trfFileUtils import athFileInterestingKeys, AthenaLiteFileInfo, NTUPEntries, HISTEntries, urlType, ROOTGetSize +from PyJobTransforms.trfFileUtils import athFileInterestingKeys, AthenaLiteFileInfo, NTUPEntries, HISTEntries, PRWEntries, urlType, ROOTGetSize from PyJobTransforms.trfUtils import call, cliToKey from PyJobTransforms.trfExitCodes import trfExit as trfExit from PyJobTransforms.trfDecorators import timelimited @@ -1578,14 +1578,26 @@ class argNTUPFile(argFile): 'file_guid': self._generateGUID, 'integrity': self._getIntegrity, }) - - + + if name and 'NTUP_PILEUP' in name: + self._metadataKeys.update({ + 'sumOfWeights': self._getNumberOfEvents, + }) + def _getNumberOfEvents(self, files): msg.debug('Retrieving event count for NTUP files {0}'.format(files)) if self._treeNames is None: - msg.debug('treeNames is set to None - event count undefined for this NTUP') for fname in files: - self._fileMetadata[fname]['nentries'] = 'UNDEFINED' + # Attempt to treat this as a pileup reweighting file + myEntries = PRWEntries(fileName=fname) + if myEntries is not None: + self._fileMetadata[fname]['nentries'] = myEntries + if self.name and 'NTUP_PILEUP' in self.name: + myEntries = PRWEntries(fileName=fname, integral=True) + self._fileMetadata[fname]['sumOfWeights'] = myEntries + else: + msg.debug('treeNames is set to None - event count undefined for this NTUP') + self._fileMetadata[fname]['nentries'] = 'UNDEFINED' else: for fname in files: try: @@ -1718,6 +1730,70 @@ class argHepEvtAsciiFile(argFile): msg.error('Event count for file {0} failed: {1!s}'.format(fname, e)) self._fileMetadata[fname]['nentries'] = None +## @brief LHE ASCII file +class argLHEFile(argFile): + def __init__(self, value=list(), io = 'output', type=None, splitter=',', runarg=True, multipleOK=None, name=None): + super(argLHEFile, self).__init__(value=value, io=io, type=type, splitter=splitter, runarg=runarg, multipleOK=multipleOK, + name=name) + + self._metadataKeys.update({ + 'nentries': self._getNumberOfEvents, + 'lheSumOfPosWeights': self._getWeightedEvents, + 'lheSumOfNegWeights': 0, + }) + + def _getNumberOfEvents(self, files): + msg.debug('Retrieving event count for LHE file {0}'.format(files)) + import tarfile + for fname in files: + # Attempt to treat this as a pileup reweighting file + try : + tar = tarfile.open(fname, "r:gz") + lhecount = 0 + for untar in tar.getmembers(): + fileTXT = tar.extractfile(untar) + if fileTXT is not None : + lines = fileTXT.read() + lhecount = lines.find('/event') + + self._fileMetadata[fname]['nentries'] = lhecount + except : + msg.debug('Entries is set to None - event count undefined for this LHE') + self._fileMetadata[fname]['nentries'] = 'UNDEFINED' + + def _getWeightedEvents(self, files): + msg.debug('Retrieving weight count for LHE file {0}'.format(files)) + import tarfile + import re + + for fname in files: + weightPos = 0 + weightNeg = 0 + try : + tar = tarfile.open(fname, "r:gz") + for untar in tar.getmembers(): + fileTXT = tar.extractfile(untar) + next = False + if fileTXT is not None : + lines = fileTXT.readlines() + for line in lines : + if next : + try : + w = float(re.sub(' +',' ',line).split(" ")[2]) + if w > 0 : weightPos += w + else : weightNeg += abs(w) + except : + pass + next = False + if "<event" in line : + next = True + + self._fileMetadata[fname]['lheSumOfPosWeights'] = weightPos + self._fileMetadata[fname]['lheSumOfNegWeights'] = weightNeg + except : + msg.debug('Entries is set to None - negative fraction count undefined for this LHE') + self._fileMetadata[fname]['lheSumOfPosWeights'] = 'UNDEFINED' + self._fileMetadata[fname]['lheSumOfNegWeights'] = 'UNDEFINED' ## @brief Base class for substep arguments # @details Sets up a dictionary with {substep1: value1, substep2: value2, ...} diff --git a/Tools/PyJobTransforms/python/trfArgs.py b/Tools/PyJobTransforms/python/trfArgs.py index a8b8f1669209..e35e36141934 100644 --- a/Tools/PyJobTransforms/python/trfArgs.py +++ b/Tools/PyJobTransforms/python/trfArgs.py @@ -475,8 +475,8 @@ def addExtraDPDTypes(parser, pick=None, transform=None, multipleOK=False, NTUPMe msg.debug('Adding DPD {0} ({1}, {2}, {3}, {4})'.format(dpd.name, dpd.type, dpd.substeps, dpd.treeNames, dpd.argclass)) # NTUPs are a bit special as they can take a treeName to count events if issubclass(dpd.argclass, trfArgClasses.argNTUPFile): - parser.add_argument('--output' + dpd.name + 'File', - type=argFactory(dpd.argclass, multipleOK=multipleOK, type=dpd.type, treeNames=dpd.treeNames), + parser.add_argument('--output' + dpd.name + 'File', + type=argFactory(dpd.argclass, name=dpd.name.upper(), multipleOK=multipleOK, type=dpd.type, treeNames=dpd.treeNames), group = 'Additional DPDs', metavar=dpd.name.upper(), help=dpd.help if dpd.help else 'DPD output {0} file'.format(dpd.name)) else: diff --git a/Tools/PyJobTransforms/python/trfFileUtils.py b/Tools/PyJobTransforms/python/trfFileUtils.py index 0735647bc6e2..b76fba42e416 100644 --- a/Tools/PyJobTransforms/python/trfFileUtils.py +++ b/Tools/PyJobTransforms/python/trfFileUtils.py @@ -212,6 +212,48 @@ def NTUPEntries(fileName, treeNames): return numberOfEntries +## @brief Determines number of entries in PRW file +# @param fileName Path to the PRW file. +# @param integral Returns sum of weights if true +# @return +# - Number of entries. +# - Sum of weights if integral is true. +# - @c None if the determination failed. +# @note Use the PyCmt forking decorator to ensure that ROOT is run completely within +# a child process and will not 'pollute' the parent python process with unthread-safe +# bits of code (otherwise strange hangs are observed on subsequent uses of ROOT) +@_decos.forking +def PRWEntries(fileName, integral=False): + + root = import_root() + + fname = root.TFile.Open(fileName, 'READ') + + if not (isinstance(fname, root.TFile) and fname.IsOpen()): + return None + + rundir = None + + for key in fname.GetListOfKeys(): + if key.GetName()=='PileupReweighting': + rundir = fname.Get('PileupReweighting') + break + # Not PRW... + + if rundir is None: return None + + total = 0 + for key in rundir.GetListOfKeys(): + if 'pileup' in key.GetName(): + msg.debug('Working on file '+fileName+' histo '+key.GetName()) + if integral: + total += rundir.Get(key.GetName()).Integral() + else: + total += rundir.Get(key.GetName()).GetEntries() + # Was not one of our histograms + return total + + ## @brief Get the size of a file via ROOT's TFile # @details Use TFile.Open to retrieve a ROOT filehandle, which will # deal with all non-posix filesystems. Return the GetSize() value. -- GitLab From e479f5de86ebf659ee7064b179be2970d9dda958 Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Tue, 12 Jun 2018 12:58:12 +0000 Subject: [PATCH 121/562] Merge branch 'ART_TESTS_v3' into '21.0' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FastChain ART job splitreco and comparison updates See merge request atlas/athena!11733 (cherry picked from commit aa56dbc196283dd176de4ce6b3824ef607bc3da1 [formerly 3c3c5a8917e370342ac9fcddf9dfb6a4b5e73c1b]) 107e95d5 Added the extra preexecs in splitreco jobs as per ATLASSIM-3715 (will remove… 6ade4f13 added `--imf=False` option to each comparison, then cleaned up the splitreco preexec arguments Former-commit-id: 9641f597577c374f0ee15a1a6ef068b161874d05 --- .../test/test_stdReco_fastSim_fullDigi.sh | 2 +- .../test/test_stdReco_fullSim_fullDigi.sh | 2 +- .../test/test_ttFC_fastSim_fastDigi.sh | 2 +- .../test/test_ttFC_fastSim_fullDigi.sh | 2 +- .../test/test_ttFC_fullHS_fastPU_simDigi.sh | 2 +- .../test/test_ttFC_fullSim_fullDigi.sh | 2 +- .../test_ttFC_reco_Split_fastSim_fastDigi.sh | 31 +++++++++++++--- .../test_ttFC_reco_Split_fastSim_fullDigi.sh | 26 ++++++++++++-- ...t_ttFC_reco_Split_fullHS_fastPU_simDigi.sh | 35 +++++++++++++++---- ...co_newTracking_PseudoT_fastSim_fastDigi.sh | 2 +- ...co_newTracking_PseudoT_fastSim_fullDigi.sh | 4 +-- ...co_newTracking_PseudoT_fullSim_fullDigi.sh | 2 +- ...C_reco_noSplit_PseudoT_fastSim_fastDigi.sh | 2 +- ...C_reco_noSplit_PseudoT_fastSim_fullDigi.sh | 2 +- ...C_reco_noSplit_PseudoT_fullSim_fullDigi.sh | 2 +- ...reco_noSplit_noPseudoT_fastSim_fastDigi.sh | 2 +- ...reco_noSplit_noPseudoT_fastSim_fullDigi.sh | 4 +-- ...reco_noSplit_noPseudoT_fullSim_fullDigi.sh | 2 +- ...C_reco_noSplit_noPseudoT_stdFullSimDigi.sh | 6 ++-- 19 files changed, 98 insertions(+), 34 deletions(-) diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_stdReco_fastSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_stdReco_fastSim_fullDigi.sh index b2449653f708..97cb61e56066 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_stdReco_fastSim_fullDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_stdReco_fastSim_fullDigi.sh @@ -24,7 +24,7 @@ echo "art-result: $? ESD step" ArtPackage=$1 ArtJobName=$2 -art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} +art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_stdReco_fullSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_stdReco_fullSim_fullDigi.sh index 1a654beb343d..834aedd61d8f 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_stdReco_fullSim_fullDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_stdReco_fullSim_fullDigi.sh @@ -19,7 +19,7 @@ echo "art-result: $? ESD step" # art-output: InDetStandardPlots.root ArtPackage=$1 ArtJobName=$2 -art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} +art.py compare grid --imf=False --entries 10 ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_stdReco_fullSim_fullDigi.sh InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/dcube_indetplots_no_pseudotracks.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fastSim_fastDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fastSim_fastDigi.sh index 967bdbb31100..6b5a5a263a3c 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fastSim_fastDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fastSim_fastDigi.sh @@ -12,7 +12,7 @@ FastChain_tf.py --simulator ATLFASTIIF_PileUp --digiSteeringConf "SplitNoMergeFF echo "art-result: $? evgen to RDO step" ArtPackage=$1 ArtJobName=$2 -art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} +art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" #add an additional payload from the job (corollary file). # art-output: InDetStandardPlots.root diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fastSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fastSim_fullDigi.sh index c8e6a4d94af8..cbf60d70fcfc 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fastSim_fullDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fastSim_fullDigi.sh @@ -14,7 +14,7 @@ echo "art-result: $? evgen step" ArtPackage=$1 ArtJobName=$2 -art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} +art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" #add an additional payload from the job (corollary file). # art-output: InDetStandardPlots.root diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fullHS_fastPU_simDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fullHS_fastPU_simDigi.sh index 8de372dc339e..c94f3525cee4 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fullHS_fastPU_simDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fullHS_fastPU_simDigi.sh @@ -16,7 +16,7 @@ FastChain_tf.py --simulator G4HS_FastPileup --digiSteeringConf "SplitNoMergeSF" echo "art-result: $? Job" ArtPackage=$1 ArtJobName=$2 -art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} +art.py compare grid --imf=False --entries 10 ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" #add an additional payload from the job (corollary file). # art-output: InDetStandardPlots.root diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fullSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fullSim_fullDigi.sh index 08d7e6c488b1..e9586c3d896f 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fullSim_fullDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fullSim_fullDigi.sh @@ -14,7 +14,7 @@ echo "art-result: $? evgen step" ArtPackage=$1 ArtJobName=$2 -art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} +art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" #add an additional payload from the job (corollary file). # art-output: InDetStandardPlots.root diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fastSim_fastDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fastSim_fastDigi.sh index a9193e46af0f..ebe40b9aeaf6 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fastSim_fastDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fastSim_fastDigi.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +B41;326;0c#!/usr/bin/env bash # art-description: test ttFC_fastSim_fastDigi + ttFC_reco_Split_fastSim_fastDigi # art-type: grid @@ -8,17 +8,40 @@ # Also include temporary branch 21.3-hmpl # art-include: 21.3-hmpl/Athena -FastChain_tf.py --simulator ATLFASTIIF_PileUp --digiSteeringConf "SplitNoMergeFF" --useISF True --randomSeed 123 --enableLooperKiller True --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root --outputRDOFile RDO_pileup_fastsim_fastdigi.pool.root --maxEvents 50 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' --preSimInclude FastChainPileup/FastPileup.py --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' --DataRunNumber '284500' --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py" +FastChain_tf.py --simulator ATLFASTIIF_PileUp \ + --digiSteeringConf "SplitNoMergeFF" \ + --useISF True --randomSeed 123 \ + --enableLooperKiller True \ + --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root \ + --outputRDOFile RDO_pileup_fastsim_fastdigi.pool.root \ + --maxEvents 50 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \ + --preSimInclude FastChainPileup/FastPileup.py \ + --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \ + --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \ + --DataRunNumber '284500' \ + --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' \ + --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py" \ echo "art-result: $? RDO step" -FastChain_tf.py --maxEvents 50 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --inputRDOFile 'RDO_pileup_fastsim_fastdigi.pool.root' --outputAODFile AOD_Split_fastSim_fastDigi.pool.root --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.pixelClusterSplittingType.set_Value_and_Lock(\"AnalogClus\");InDetFlags.doTIDE_Ambi.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True);InDetFlags.doSplitReco.set_Value_and_Lock(True);from InDetRecExample.InDetKeys import InDetKeys; InDetKeys.PixelPUClusters.set_Value_and_Lock('PixelFast_PU_Clusters');InDetKeys.PixelPUClustersTruth.set_Value_and_Lock('PRD_MultiTruthPixel_PU');InDetKeys.SCT_PU_ClustersTruth.set_Value_and_Lock('PRD_MultiTruthSCT_PU');InDetKeys.TRT_PU_DriftCirclesTruth.set_Value_and_Lock('PRD_MultiTruthTRT_PU');" +FastChain_tf.py --maxEvents 50 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --inputRDOFile 'RDO_pileup_fastsim_fastdigi.pool.root' \ + --outputAODFile AOD_Split_fastSim_fastDigi.pool.root \ + --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.pixelClusterSplittingType.set_Value_and_Lock(\"AnalogClus\");InDetFlags.doTIDE_Ambi.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True);InDetFlags.doSplitReco.set_Value_and_Lock(True);from InDetRecExample.InDetKeys import InDetKeys; InDetKeys.PixelPUClusters.set_Value_and_Lock('PixelFast_PU_Clusters');InDetFlags.doSplitReco.set_Value_and_Lock(True);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True);InDetKeys.PixelPUClustersTruth.set_Value_and_Lock('PRD_MultiTruthPixel_PU');InDetKeys.SCT_PU_ClustersTruth.set_Value_and_Lock('PRD_MultiTruthSCT_PU');InDetKeys.TRT_PU_DriftCirclesTruth.set_Value_and_Lock('PRD_MultiTruthTRT_PU');" + echo "art-result: $? AOD step" ArtPackage=$1 ArtJobName=$2 -art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} +art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" #add an additional payload from the job (corollary file). # art-output: InDetStandardPlots.root diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fastSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fastSim_fullDigi.sh index 88e77797509f..22df936c4961 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fastSim_fullDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fastSim_fullDigi.sh @@ -8,17 +8,37 @@ # Also include temporary branch 21.3-hmpl # art-include: 21.3-hmpl/Athena -FastChain_tf.py --simulator ATLFASTIIF_PileUp --digiSteeringConf "SplitNoMerge" --useISF True --randomSeed 123 --enableLooperKiller True --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root --outputRDOFile RDO_pileup_fastsim_fulldigi.pool.root --maxEvents 100 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' --preSimInclude FastChainPileup/FastPileup.py --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' --DataRunNumber '284500' --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' +FastChain_tf.py --simulator ATLFASTIIF_PileUp \ + --digiSteeringConf "SplitNoMerge" --useISF True \ + --randomSeed 123 \ + --enableLooperKiller True \ + --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root \ + --outputRDOFile RDO_pileup_fastsim_fulldigi.pool.root \ + --maxEvents 100 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \ + --preSimInclude FastChainPileup/FastPileup.py \ + --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \ + --DataRunNumber '284500' \ + --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' \ echo "art-result: $? AOD step" -FastChain_tf.py --maxEvents 500 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --inputRDOFile 'RDO_pileup_fastsim_fulldigi.pool.root' --outputAODFile AOD_Split_fastSim_fullDigi.pool.root --preExec "RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doSplitReco.set_Value_and_Lock(True);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True);InDetFlags.doStandardPlots.set_Value_and_Lock(True);rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);" +FastChain_tf.py --maxEvents 500 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --inputRDOFile 'RDO_pileup_fastsim_fulldigi.pool.root' \ + --outputAODFile AOD_Split_fastSim_fullDigi.pool.root \ + --preExec "RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doStandardPlots.set_Value_and_Lock(True);InDetFlags.doSplitReco.set_Value_and_Lock(True);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True); from InDetRecExample.InDetKeys import InDetKeys; InDetKeys.PixelPUClusters.set_Value_and_Lock('PixelFast_PU_Clusters');InDetKeys.PixelPUClustersTruth.set_Value_and_Lock('PRD_MultiTruthPixel_PU');InDetKeys.SCT_PU_ClustersTruth.set_Value_and_Lock('PRD_MultiTruthSCT_PU');InDetKeys.TRT_PU_DriftCirclesTruth.set_Value_and_Lock('PRD_MultiTruthTRT_PU');rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);" echo "art-result: $? AOD step" ArtPackage=$1 ArtJobName=$2 -art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} +art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fullHS_fastPU_simDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fullHS_fastPU_simDigi.sh index 4e03f7802c34..44dcd5558800 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fullHS_fastPU_simDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fullHS_fastPU_simDigi.sh @@ -10,16 +10,39 @@ # Run FastChain 'Fast PU, Full HS' and tests: G4HS_FastPileup sim (G4 for HS, Pythia on the fly + FastCaloSim for PU) + fast digi PU/full digi HS + Split reco (truth tracking PU, full HS) -FastChain_tf.py --simulator G4HS_FastPileup --digiSteeringConf "SplitNoMergeSF" --useISF True --randomSeed 123 --enableLooperKiller True --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root --outputRDOFile RDO_fullHS_fastPU_simdigi.pool.root --maxEvents 10 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' --preSimInclude FastChainPileup/FastPileup.py --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' --DataRunNumber '284500' --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py" +FastChain_tf.py --simulator G4HS_FastPileup \ + --digiSteeringConf "SplitNoMergeSF" \ + --useISF True \ + --randomSeed 123 \ + --enableLooperKiller True \ + --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root --outputRDOFile RDO_fullHS_fastPU_simdigi.pool.root \ + --maxEvents 10 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \ + --preSimInclude FastChainPileup/FastPileup.py \ + --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \ + --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \ + --DataRunNumber '284500' \ + --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' \ + --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py" echo "art-result: $? RDO step" -FastChain_tf.py --maxEvents 10 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --inputRDOFile 'RDO_fullHS_fastPU_simdigi.pool.root' --outputAODFile AOD_Split_fullHS_fastPU_simDigi.pool.root --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);InDetFlags.doStatistics.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.pixelClusterSplittingType.set_Value_and_Lock(\"AnalogClus\");InDetFlags.doTIDE_Ambi.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True);InDetFlags.doSplitReco.set_Value_and_Lock(True);from InDetRecExample.InDetKeys import InDetKeys; InDetKeys.PixelPUClusters.set_Value_and_Lock('PixelFast_PU_Clusters');InDetKeys.PixelPUClustersTruth.set_Value_and_Lock('PRD_MultiTruthPixel_PU');InDetKeys.SCT_PU_ClustersTruth.set_Value_and_Lock('PRD_MultiTruthSCT_PU');InDetKeys.TRT_PU_DriftCirclesTruth.set_Value_and_Lock('PRD_MultiTruthTRT_PU');" --postExec 'RAWtoESD:import AthenaCommon.AlgSequence as acas;job = acas.AlgSequence();del job.InDetSCT_ClusterizationPU;del job.InDetPixelClusterizationPU;del job.InDetPRD_MultiTruthMakerSiPU;del job.InDetPRD_MultiTruthMakerTRTPU;' +FastChain_tf.py --maxEvents 10 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --inputRDOFile 'RDO_fullHS_fastPU_simdigi.pool.root' \ + --outputAODFile AOD_Split_fullHS_fastPU_simDigi.pool.root \ + --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);InDetFlags.doStatistics.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.pixelClusterSplittingType.set_Value_and_Lock(\"AnalogClus\");InDetFlags.doTIDE_Ambi.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True);InDetFlags.doSplitReco.set_Value_and_Lock(True);from InDetRecExample.InDetKeys import InDetKeys; InDetKeys.PixelPUClusters.set_Value_and_Lock('PixelFast_PU_Clusters');InDetKeys.SCT_PU_ClustersTruth.set_Value_and_Lock('PRD_MultiTruthSCT_PU');InDetKeys.TRT_PU_DriftCirclesTruth.set_Value_and_Lock('PRD_MultiTruthTRT_PU');InDetFlags.doSplitReco.set_Value_and_Lock(True);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True); from InDetRecExample.InDetKeys import InDetKeys; InDetKeys.PixelPUClusters.set_Value_and_Lock('PixelFast_PU_Clusters');InDetKeys.PixelPUClustersTruth.set_Value_and_Lock('PRD_MultiTruthPixel_PU');InDetKeys.SCT_PU_ClustersTruth.set_Value_and_Lock('PRD_MultiTruthSCT_PU');InDetKeys.TRT_PU_DriftCirclesTruth.set_Value_and_Lock('PRD_MultiTruthTRT_PU');" \ + --postExec 'RAWtoESD:import AthenaCommon.AlgSequence as acas;job = acas.AlgSequence();del job.InDetSCT_ClusterizationPU;del job.InDetPixelClusterizationPU;del job.InDetPRD_MultiTruthMakerSiPU;del job.InDetPRD_MultiTruthMakerTRTPU;' echo "art-result: $? AOD step" ArtPackage=$1 ArtJobName=$2 -art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} +art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" #add an additional payload from the job (corollary file). # art-output: InDetStandardPlots.root @@ -30,8 +53,6 @@ echo "art-result: $? regression" # InDetStandardPlots.root -l dcube.log -p -r -x dcube.xml -s /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ -# art-output: dcube/dcube.xml -# art-output: dcube/dcube.log -# art-output: dcube/dcubelog.xml -# art-output: dcube/dcube.xml.php +# art-output: dcube/ +# dumps the entire dcube directory to output because we need all of it for plots echo "art-result: $? histcomp" diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fastSim_fastDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fastSim_fastDigi.sh index fc39512e388a..c6d93d40d141 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fastSim_fastDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fastSim_fastDigi.sh @@ -19,7 +19,7 @@ echo "art-result: $? AOD step" ArtPackage=$1 ArtJobName=$2 -art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} +art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" #add an additional payload from the job (corollary file). diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fastSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fastSim_fullDigi.sh index aa6ca528f1af..c450acae6dcb 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fastSim_fullDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fastSim_fullDigi.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +B41;326;0c#!/usr/bin/env bash # art-description: test for job configuration ttFC_fastSim_fulldigi then ttFC_reco_newTracking_PseudoT_fastSim_fullDigi # art-type: grid # @@ -18,7 +18,7 @@ FastChain_tf.py --maxEvents 500 --skipEvents 0 --geometryVersion ATLAS-R2-2015-0 echo "art-result: $? AOD step" ArtPackage=$1 ArtJobName=$2 -art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} +art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" #add an additional payload from the job (corollary file). diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fullSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fullSim_fullDigi.sh index eea65b01e7f7..823fc6ad0d1a 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fullSim_fullDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fullSim_fullDigi.sh @@ -19,7 +19,7 @@ FastChain_tf.py --maxEvents 500 --skipEvents 0 --geometryVersion ATLAS-R2-2015-0 echo "art-result: $? AOD step" ArtPackage=$1 ArtJobName=$2 -#art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} +art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" #add an additional payload from the job (corollary file). # art-output: InDetStandardPlots.root diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fastSim_fastDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fastSim_fastDigi.sh index 1d573421525d..40c448ff59cf 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fastSim_fastDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fastSim_fastDigi.sh @@ -17,7 +17,7 @@ echo "art-result: $? AOD step" ArtPackage=$1 ArtJobName=$2 -art.py compare grid --entries 10 +art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" #add an additional payload from the job (corollary file). # art-output: InDetStandardPlots.root diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fastSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fastSim_fullDigi.sh index 9c7ecc2c9fdf..ad559aa2ebdf 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fastSim_fullDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fastSim_fullDigi.sh @@ -19,7 +19,7 @@ echo "art-result: $? AOD step" ArtPackage=$1 ArtJobName=$2 -art.py compare grid --entries 10 +art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" #add an additional payload from the job (corollary file). # art-output: InDetStandardPlots.root diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fullSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fullSim_fullDigi.sh index 8758222bf66d..ae95b94962fd 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fullSim_fullDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fullSim_fullDigi.sh @@ -19,7 +19,7 @@ echo "art-result: $? RDO step" ArtPackage=$1 ArtJobName=$2 -#art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} +art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" #add an additional payload from the job (corollary file). # art-output: InDetStandardPlots.root diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fastSim_fastDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fastSim_fastDigi.sh index f513c2bf601f..ec52a88b6a84 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fastSim_fastDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fastSim_fastDigi.sh @@ -19,7 +19,7 @@ echo "art-result: $? AOD step" ArtPackage=$1 ArtJobName=$2 -art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} +art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" #add an additional payload from the job (corollary file). # art-output: InDetStandardPlots.root diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fastSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fastSim_fullDigi.sh index 02578e75102e..10b373d0388f 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fastSim_fullDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fastSim_fullDigi.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +B41;326;0c#!/usr/bin/env bash # art-description: test for job configuration ttFC_fastSim_fulldigi _ttFC_reco_noSplit_noPseudoT_fastSim_fullDigi # art-type: grid # @@ -18,7 +18,7 @@ FastChain_tf.py --maxEvents 500 --skipEvents 0 --geometryVersion ATLAS-R2-2015-0 echo "art-result: $? RDO step" ArtPackage=$1 ArtJobName=$2 -art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} +art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" #add an additional payload from the job (corollary file). # art-output: InDetStandardPlots.root diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fullSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fullSim_fullDigi.sh index 3192e536499f..11ddffcc3cd1 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fullSim_fullDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fullSim_fullDigi.sh @@ -18,7 +18,7 @@ echo "art-result: $? AOD step" ArtPackage=$1 ArtJobName=$2 -#art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} +art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" #add an additional payload from the job (corollary file). # art-output: InDetStandardPlots.root diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_stdFullSimDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_stdFullSimDigi.sh index 06f8a7de60cc..14297692cfa4 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_stdFullSimDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_stdFullSimDigi.sh @@ -30,9 +30,9 @@ echo "art-result: $? AOD step" #add an additional payload from the job (corollary file). # art-output: InDetStandardPlots.root -#ArtPackage=$1 -#ArtJobName=$2 -#art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} +ArtPackage=$1 +ArtJobName=$2 +art.py compare grid --entries 10 --imf=False ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" -- GitLab From d6c72c26341b4f69c5642b829ee205ecb76fe0bf Mon Sep 17 00:00:00 2001 From: Sara Alderweireldt <sara.alderweireldt@cern.ch> Date: Tue, 12 Jun 2018 06:51:24 +0000 Subject: [PATCH 122/562] Merge branch 'Generate_Streamfiles_from_athenaHLT_output' into '21.1' Add script to generate P1 like stream files from athenaHLT output files (ATR-17634) See merge request atlas/athena!11864 (cherry picked from commit f6d54abc23141ada226102c16a1152d9892a61af [formerly 3d9de7a3c54f5c1af71ad77c7c65491b4d96134e]) c32a268b Add script to generate P1 like stream files from athenaHLT output files (ATR-17634) Former-commit-id: ddc32379bb853a73f9950113008b9d5a314c42ce --- Event/EventContainers/test/ID_ContainerTest.h | 0 HLT/HLTTestApps/CMakeLists.txt | 1 + .../doc/README.athenaHLT-select-PEB-stream | 105 +++++++++ .../scripts/athenaHLT-select-PEB-stream.py | 205 ++++++++++++++++++ 4 files changed, 311 insertions(+) mode change 100755 => 100644 Event/EventContainers/test/ID_ContainerTest.h create mode 100644 HLT/HLTTestApps/doc/README.athenaHLT-select-PEB-stream create mode 100755 HLT/HLTTestApps/python/scripts/athenaHLT-select-PEB-stream.py diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100755 new mode 100644 diff --git a/HLT/HLTTestApps/CMakeLists.txt b/HLT/HLTTestApps/CMakeLists.txt index 7c328672f1c8..c4b24b2cd64a 100644 --- a/HLT/HLTTestApps/CMakeLists.txt +++ b/HLT/HLTTestApps/CMakeLists.txt @@ -30,3 +30,4 @@ atlas_install_python_modules( python/HLTTestApps/*.py python/HLTTestApps/plugins atlas_install_scripts( python/scripts/*.py python/scripts/*.sh ) atlas_add_alias( athenaHLT "athenaHLT.py" ) +atlas_add_alias( athenaHLT-select-PEB-stream "athenaHLT-select-PEB-stream.py" ) diff --git a/HLT/HLTTestApps/doc/README.athenaHLT-select-PEB-stream b/HLT/HLTTestApps/doc/README.athenaHLT-select-PEB-stream new file mode 100644 index 000000000000..2fbfdb00cf65 --- /dev/null +++ b/HLT/HLTTestApps/doc/README.athenaHLT-select-PEB-stream @@ -0,0 +1,105 @@ +The script + +athenaHLT-select-PEB-stream.py + +allows to select from a bystream file events which belong to a given stream and to write them to a bytestream output file which +obeys the same conventions as the files produced in P1. + +athenaHLT-select-PEB-stream.py -h + +gives a list of options which can be used: + +./athenaHLT-select-PEB-stream.py -h +global "./athenaHLT-select-PEB-stream.py" options: -[DFPadhlnpsv] | --[dump-options,help,lumi-block,max-events,option-file,output-dir,progress-bar,project-tag,start-event,stream-name,verbosity] [arguments]+ + + [Global options] + + --dump-options|-D dumps the current default options to stdout + --help|-h prints this usage message + --option-file|-F loads options from an option file (defaults to <empty>) + + + [Run mode options] + + --max-events|-n Maximum number of events in the output file. 0 means, al + l useful events from the input. (defaults to 0) + --output-dir|-d Directory in which the output file should be written (de + faults to .) + --progress-bar|-P Show progress bar when running interactively + --start-event|-a Number of events which should be skippped from the begin + (defaults to 0) + --verbosity|-v Log verbosity (defaults to 20) + + + [Stream Tag options] + + --lumi-block|-l Lumiblock number used for the output file. Use 0 if multi + ple LB in file. (defaults to 0) + --project-tag|-p Project tag which should be used for the output file (def + aults to data18_13Tev) + --stream-name|-s Name of stream which should be written out (defaults to D + ataScouting_05_Jets) + +While the script can be used with any stream name, the defaults are set for the DataScouting stream "DataScouting_05_Jets". + +Typical workflow for developers: +-------------------------------- + +1) Develop new slection code for a new stream and integrate it with the menu + +2) run athenaHLT with the new code and write a bystream outputfile + +> athenaHLT <otions> -f <input-file> -o <athenaHLT-output-file> <job-options-file> + +The <athenaHLT-output-file> will contain all events which have triggered, including also DataScouting events. + +3) Generate a P1 stream file with "athenaHLT-select-PEB-stream.py" from the athenaHLT output file + +> athenaHLT-select-PEB-stream.py -s <my-prefered-stream> <athenaHLT-output-file> + +In the case of Jet Datascouting all defaults are set already and it is sufficient to run + +> athenaHLT-select-PEB-stream.py <athenaHLT-output-file> + +There will be an output file produced of the form + +<project tag>.<run number>.<stream_type>_<stream_name>.merge.RAW._<LB number>._<production step>._<file sequence number>.data + +example: + +data18_13Tev.00349335.calibration_DataScouting_05_Jets.merge.RAW._lb0000._athenaHLT._0001.data + +All input events have to be for the same run number, but can have different lumi block numbers (LB=0 is used for output file). + +4) run over the produced stream file the standard T0 reco programs + + +Example of producing a Jet DataScouting stream file from an enhanced bias file: +------------------------------------------------------------------------------- + +> athenaHLT -M -b --db-smkey=2695 --db-hltpskey='[(317,15172)]' -f '["data18_13TeV.00349335.physics_EnhancedBias.merge.RAW._lb0163._SFO-1._0001.1"]' -o "my-athenaHLT-BS-output" +> athenaHLT-select-PEB-stream.py my-athenaHLT-BS-output._0001.data +> Reco with input file data18_13Tev.00349335.calibration_DataScouting_05_Jets.merge.RAW._lb0000._athenaHLT._0001.data + +Some Remarks: +------------- + +1) athenaHLT-select-PEB-stream.py allows to read multiple input files + +> athenaHLT-select-PEB-stream.py <file1> <file2> ... <fileN> + +All events have to be however from the same run. Events from different runs are skipped and an ERROR message is printed. + +2) the option "--lumi-block|-l " should only be used if all events are from the same LB, otherwise use 0 (default). + +3) the option "--project-tag|-p" is set per default to 2018 data (data18_13Tev). + +4) For repeated running with the same options a standard option file can be generated: + +athenaHLT-select-PEB-stream.py -D <various options> <input files> > <my-opt-file.py> + +and the run can be repeated with + +athenaHLT-select-PEB-stream.py -F <my-opt-file.py> + +The file <my-opt-file.py> can be also edited and modified with Python commands. diff --git a/HLT/HLTTestApps/python/scripts/athenaHLT-select-PEB-stream.py b/HLT/HLTTestApps/python/scripts/athenaHLT-select-PEB-stream.py new file mode 100755 index 000000000000..106ce30964fe --- /dev/null +++ b/HLT/HLTTestApps/python/scripts/athenaHLT-select-PEB-stream.py @@ -0,0 +1,205 @@ +#!/usr/bin/env tdaq_python +# Werner.Wiedenmann@cern.ch +# select events for a given stream name from an input file and write them in an outfile +# the output file obeys the conventions used by the SFO in P1 + +import sys +import os + +def peb_writer(argv): + """Runs the splitting routines""" + + import eformat, logging + import EventApps.myopt as myopt + + option = {} + + # run mode options + option['start-event'] = {'short': 'a', 'arg': True, + 'default': 0, + 'group': 'Run mode', + 'description': 'Number of events which should be skippped from the begin'} + + option['max-events'] = {'short': 'n', 'arg': True, + 'default': 0, + 'group': 'Run mode', + 'description': 'Maximum number of events in the output file. 0 means, all useful events from the input.'} + + option['verbosity'] = {'short': 'v', 'arg': True, + 'default': logging.INFO, + 'group': 'Run mode', + 'description': 'Log verbosity'} + + option['progress-bar'] = {'short': 'P', 'arg': False, + 'default': None, + 'group': 'Run mode', + 'description': 'Show progress bar when running interactively'} + + option['output-dir'] = {'short': 'd', 'arg': True, + 'default': '.', + 'group': 'Run mode', + 'description': 'Directory in which the output file should be written'} + + # stream tag options + option['stream-name'] = {'short': 's', 'arg': True, + 'default': 'DataScouting_05_Jets', + 'group': 'Stream Tag', + 'description': 'Name of stream which should be written out'} + + option['project-tag'] = {'short': 'p', 'arg': True, + 'default': 'data18_13Tev', + 'group': 'Stream Tag', + 'description': 'Project tag which should be used for the output file'} + + option['lumi-block'] = {'short': 'l', 'arg': True, + 'default': 0, + 'group': 'Stream Tag', + 'description': 'Lumiblock number used for the output file. Use 0 if multiple LB in file.'} + + parser = myopt.Parser(extra_args=True) + for (k,v) in option.items(): + parser.add_option(k, v['short'], v['description'], v['arg'], v['default'],v['group']) + + if len(sys.argv) == 1: + print parser.usage('global "%s" options:' % sys.argv[0]) + sys.exit(1) + + # process the global options + (kwargs, extra) = parser.parse(sys.argv[1:], prefix='global "%s" options:' % sys.argv[0]) + + # global defaults + logging.getLogger('').name = os.path.splitext(os.path.basename(sys.argv[0]))[0] + logging.getLogger('').setLevel(kwargs['verbosity']) + + # input data stream + stream = eformat.istream(extra) + # input event counter + totalEvents_in = 0 + + # get metadata from inputfile + dr = eformat.EventStorage.pickDataReader(extra[0]) + + # parameters for building the output file name + runNumber = dr.runNumber() + outputDirectory = kwargs['output-dir'] + streamName = kwargs['stream-name'] + projectTag = kwargs['project-tag'] + lumiBlockNumber = kwargs['lumi-block'] # if output file can have multiple lumi blocks, use 0 + applicationName = 'athenaHLT' + productionStep = 'merge' # output file with multiple lumi blocks + streamType = 'unknown' # the real stream type will be extracted from the matching stream tag + + # check the output directory if it exists + if (not os.path.exists(outputDirectory)) or (not os.path.isdir(outputDirectory)): + logging.fatal(' Output directory %s does not exist ' % outputDirectory) + sys.exit(1) + + # output event counter + totalEvents_out = 0 + + # counter of skipped events + totalEvents_skipped = 0 + + # Loop over events + for e in stream: + totalEvents_in += 1 + + # select events + if kwargs['start-event'] > 0: + kwargs['start-event'] -= 1 + totalEvents_skipped += 1 + continue + + if kwargs['max-events'] > 0 and totalEvents_in >= kwargs['max-events']: + logging.info(' Maximum number of events reached : %d' % kwargs['max-events']) + break + + # find StreamTags and see if there is a match + streamTags = e.stream_tag() + logging.debug(' === New Event nr = %s (Run,Global ID) = (%d,%d) === ' % (totalEvents_in,e.run_no(),e.global_id())) + for tag in streamTags: + if tag.name == streamName: + # the event should be written out + logging.debug(' Matching event found for stream tag = %s' % tag) + logging.debug(' Stream Tag:Robs = %s' % [hex(r) for r in tag.robs]) + logging.debug(' Stream Tag:Dets = %s' % [hex(d) for d in tag.dets]) + + # check the lumi block number from the event against the lumi block number defined for the file + # this check is only done if the lumi block number for the file is different from 0 + if lumiBlockNumber > 0: + if e.lumi_block() != lumiBlockNumber: + logging.error(' Event (Run,Global ID) = (%d,%d) has a lumi block number %d,' + ' which is different from LB = %d for the output file. Event skipped.' % + (e.run_no(),e.global_id(),e.lumi_block(),lumiBlockNumber)) + continue + + # check that all events have the same run number as the output file indicates otherwise skip event + if e.run_no() != runNumber: + logging.error(' Event (Run,Global ID) = (%d,%d) has a run number,' + ' which is different from the run number = %d for the output file. Event skipped.' % + (e.run_no(),e.global_id(),runNumber)) + continue + + # set the overall tag type for the first match + if streamType != tag.type: + streamType = tag.type + logging.debug(' streamType set to = %s' % streamType) + # create the RAW output file name + outRawFile = eformat.EventStorage.RawFileName(projectTag, + runNumber, + streamType, + streamName, + lumiBlockNumber, + applicationName, + productionStep) + logging.debug(' set output file name = %s'% outRawFile.fileNameCore()) + + # create the output stream + ostream = eformat.ostream(directory=outputDirectory, + core_name=outRawFile.fileNameCore(), + run_number=dr.runNumber(), + trigger_type=dr.triggerType(), + detector_mask=dr.detectorMask(), + beam_type=dr.beamType(), + beam_energy=dr.beamEnergy()) + + # decide what to write out + if streamType == 'physics' or streamType == 'express' or (len(tag.robs)==0 and len(tag.dets)==0): + # write out the full event fragment + pbev = eformat.write.FullEventFragment(e) + logging.debug(' Write full event fragment ') + else: + # select ROBs to write out + rob_output_list = [] + logging.debug(' Write partial event fragment ') + for rob in e: + if rob.source_id().code() in tag.robs: + rob_output_list.append(rob) + if rob.source_id().subdetector_id() in tag.dets: + rob_output_list.append(rob) + # write out the partial event fragment + pbev = eformat.write.FullEventFragment() + pbev.copy_header(e) + for out_rob in rob_output_list: + pbev.append_unchecked(out_rob) + + # put the event onto the output stream + ostream.write(pbev) + if (logging.getLogger('').getEffectiveLevel() > logging.DEBUG) and kwargs['progress-bar']: + sys.stdout.write('.') + sys.stdout.flush() + + # increase output event counter + totalEvents_out += 1 + + # print final statistics + logging.info('Total number of events processed = %d ' % totalEvents_in) + logging.info('Number of events skipped at the beginning = %d ' % totalEvents_skipped) + logging.info('Number of events written to output file = %d ' % totalEvents_out) + if totalEvents_out > 0: + logging.info('Output file = %s ' % ostream.last_filename()) + + sys.exit(0) + +if __name__ == "__main__": + peb_writer(sys.argv) -- GitLab From f1245f81965ca92b5e4d8e0a88dc523a0d0d6862 Mon Sep 17 00:00:00 2001 From: tkharlam <tatyana.kharlamova@cern.ch> Date: Wed, 13 Jun 2018 08:25:24 +0200 Subject: [PATCH 123/562] L1Calo update for overlay Update code to run L1Calo for data overlay Manual sweep of https://gitlab.cern.ch/atlas/athena/merge_requests/9665 Former-commit-id: fd29e79f51afd743d6bb8d8451e9150765e979d6 --- .../share/Level1Overlay_jobOptions.py | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/Level1Overlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/Level1Overlay_jobOptions.py index 6ea3bda4b3c9..f7f488bafb7a 100644 --- a/Event/EventOverlay/EventOverlayJobTransforms/share/Level1Overlay_jobOptions.py +++ b/Event/EventOverlay/EventOverlayJobTransforms/share/Level1Overlay_jobOptions.py @@ -100,8 +100,8 @@ if DetFlags.overlay.LVL1_on(): #-------------------------------------------------------------- # TGC stuff #-------------------------------------------------------------- - if DetFlags.simulateLVL1.TGC_on(): - import TrigT1TGC.TrigT1TGCConfig + #if DetFlags.simulateLVL1.TGC_on(): + # import TrigT1TGC.TrigT1TGCConfig #-------------------------------------------------------------- # TrigT1Muctpi Algos @@ -115,9 +115,10 @@ if DetFlags.overlay.LVL1_on(): #------------------------------------------------------- if DetFlags.simulateLVL1.Calo_on(): if DetFlags.simulateLVL1.LAr_on() and DetFlags.simulateLVL1.Tile_on(): - protectedInclude( "TrigT1CaloSim/TrigT1CaloSimJobOptions_TTL1_NoCalib.py" ) #switched to NoCalib - job.TriggerTowerMaker.DoOverlay = True - job.TriggerTowerMaker.OverlayPedestal = 40. + from TriggerJobOpts.Lvl1TriggerGetter import Lvl1SimulationGetter + lvl1 = Lvl1SimulationGetter() + protectedInclude( "TrigT1CaloCalibConditions/L1CaloCalibConditions_Overlay.py" ) + job.Run2TriggerTowerMaker.DoOverlay = True else: log.warning("NOT SIMULATING L1CALO!") log.warning("If only one of LAr and Tile LVL1 digitzation is set on then the L1Calo will NOT be simulated.") @@ -127,9 +128,9 @@ if DetFlags.overlay.LVL1_on(): #------------------------------------------------------- # TrigT1MBTS Alg #------------------------------------------------------- - if DetFlags.simulateLVL1.Calo_on(): - from TrigT1MBTS.TrigT1MBTSConf import LVL1__TrigT1MBTS - job += LVL1__TrigT1MBTS() + #if DetFlags.simulateLVL1.Calo_on(): + # from TrigT1MBTS.TrigT1MBTSConf import LVL1__TrigT1MBTS + # job += LVL1__TrigT1MBTS() #------------------------------------------------------- # TrigT1BCM Alg @@ -148,12 +149,12 @@ if DetFlags.overlay.LVL1_on(): #------------------------------------------------------- # TrigT1CTP Algos #------------------------------------------------------- - from TrigT1CTP.TrigT1CTPConfig import CTPSimulationInDigi - job += CTPSimulationInDigi() + #from TrigT1CTP.TrigT1CTPConfig import CTPSimulationInDigi + #job += CTPSimulationInDigi() #------------------------------------------------------- # TrigT1RoIB Algos #------------------------------------------------------- - from TrigT1RoIB.TrigT1RoIBConfig import RoIBuilderInDigi - job += RoIBuilderInDigi("RoIBuilder") + #from TrigT1RoIB.TrigT1RoIBConfig import RoIBuilderInDigi + #job += RoIBuilderInDigi("RoIBuilder") -- GitLab From 7555100976b2b8ceba72923e8f60e613033c0289 Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Tue, 12 Jun 2018 13:08:22 +0000 Subject: [PATCH 124/562] Merge branch 'ISF_PunchThroughTools_Fix_21.0' into '21.0' Fix for Coverity Defect 114473 in ISF_PunchThroughTools See merge request atlas/athena!11956 Former-commit-id: 5e04519a8eca10ecc693e2aa0dc2524aba44612e --- .../src/PunchThroughTool.cxx | 42 ++++++++----------- .../src/PunchThroughTool.h | 39 +++++++++-------- 2 files changed, 39 insertions(+), 42 deletions(-) diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_PunchThroughTools/src/PunchThroughTool.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_PunchThroughTools/src/PunchThroughTool.cxx index 2c41eac229ca..1d922c3fb159 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_PunchThroughTools/src/PunchThroughTool.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_PunchThroughTools/src/PunchThroughTool.cxx @@ -69,30 +69,24 @@ ISF::PunchThroughTool::PunchThroughTool( const std::string& type, const std::string& name, const IInterface* parent ) - : base_class(type, name, parent), - m_parentGenEvt(0), - m_particleDataTable(0), - m_randomSvc("AtDSFMTGenSvc", name), - m_randomEngineName("ISFRnd"), - m_randomEngine(0), - m_filenameLookupTable("CaloPunchThroughParametrisation.root"), - m_pdgInitiators(), - m_punchThroughParticles(), - m_doAntiParticles(), - m_correlatedParticle(), - m_minCorrEnergy(), - m_fullCorrEnergy(), - m_posAngleFactor(), - m_momAngleFactor(), - m_minEnergy(), - m_maxNumParticles(), - m_numParticlesFactor(), - m_energyFactor(), - m_particlePropSvc("PartPropSvc",name), - m_geoIDSvc("ISF::GeoIDSvc",name), - m_barcodeSvc("BarcodeSvc",name), - m_envDefSvc("AtlasGeometry_EnvelopeDefSvc",name), - m_beamPipe(500.) +: base_class(type, name, parent), + m_randomSvc("AtDSFMTGenSvc", name), + m_pdgInitiators(), + m_punchThroughParticles(), + m_doAntiParticles(), + m_correlatedParticle(), + m_minCorrEnergy(), + m_fullCorrEnergy(), + m_posAngleFactor(), + m_momAngleFactor(), + m_minEnergy(), + m_maxNumParticles(), + m_numParticlesFactor(), + m_energyFactor(), + m_particlePropSvc("PartPropSvc",name), + m_geoIDSvc("ISF::GeoIDSvc",name), + m_barcodeSvc("BarcodeSvc",name), + m_envDefSvc("AtlasGeometry_EnvelopeDefSvc",name) { // property definition and initialization - allows to set variables from python diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_PunchThroughTools/src/PunchThroughTool.h b/Simulation/ISF/ISF_FastCaloSim/ISF_PunchThroughTools/src/PunchThroughTool.h index 30c6ccdf42e4..588bd44ffac9 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_PunchThroughTools/src/PunchThroughTool.h +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_PunchThroughTools/src/PunchThroughTool.h @@ -110,31 +110,34 @@ namespace ISF { *---------------------------------------------------------------------*/ /** initial particle properties */ - mutable const ISF::ISFParticle* m_initPs; //!< the incoming particle - mutable double m_initEnergy; //!< the incoming particle's energy - mutable double m_initEta; //!< the incoming particle's eta - mutable double m_initTheta; //!< the incoming particle's theta - mutable double m_initPhi; //!< the incoming particle's phi + mutable const ISF::ISFParticle* m_initPs{nullptr}; //!< the incoming particle + mutable double m_initEnergy{0.}; //!< the incoming particle's energy + mutable double m_initEta{0.}; //!< the incoming particle's eta + mutable double m_initTheta{0.}; //!< the incoming particle's theta + mutable double m_initPhi{0.}; //!< the incoming particle's phi /** calo-MS borders */ - double m_R1, m_R2, m_z1, m_z2; + double m_R1{0.}; + double m_R2{0.}; + double m_z1{0.}; + double m_z2{0.}; /** the returned vector of ISFParticles */ - mutable ISF::ISFParticleContainer *m_isfpCont; + mutable ISF::ISFParticleContainer *m_isfpCont{nullptr}; /** parent event */ - mutable HepMC::GenEvent* m_parentGenEvt; //!< all newly created particles/vertices will have this common parent + mutable HepMC::GenEvent* m_parentGenEvt{nullptr}; //!< all newly created particles/vertices will have this common parent /** ParticleDataTable needed to get connection pdg_code <-> charge */ - const HepPDT::ParticleDataTable* m_particleDataTable; + const HepPDT::ParticleDataTable* m_particleDataTable{nullptr}; /** random generator service */ - ServiceHandle<IAtRndmGenSvc> m_randomSvc; //!< Random Svc - std::string m_randomEngineName; //!< Name of the random number stream - CLHEP::HepRandomEngine* m_randomEngine; //!< Random Engine + ServiceHandle<IAtRndmGenSvc> m_randomSvc; //!< Random Svc + std::string m_randomEngineName{"ISFRnd"}; //!< Name of the random number stream + CLHEP::HepRandomEngine* m_randomEngine{nullptr}; //!< Random Engine /** ROOT objects */ - TFile* m_fileLookupTable; //!< the punch-through lookup table file + TFile* m_fileLookupTable{nullptr}; //!< the punch-through lookup table file /** general information of the punch-through particles which will be created */ mutable std::map<int, bool> m_doAntiParticleMap; /*!< stores information, if anti-particles are created for any given PDG id */ @@ -143,16 +146,16 @@ namespace ISF { /** barcode steering */ - mutable Barcode::PhysicsProcessCode m_processCode; - mutable Barcode::ParticleBarcode m_primBC; - mutable Barcode::ParticleBarcode m_secBC; + mutable Barcode::PhysicsProcessCode m_processCode{0}; + mutable Barcode::ParticleBarcode m_primBC{0}; + mutable Barcode::ParticleBarcode m_secBC{0}; /*--------------------------------------------------------------------- * Properties *---------------------------------------------------------------------*/ /** Properties */ - std::string m_filenameLookupTable; //!< holds the filename of the lookup table (property) + std::string m_filenameLookupTable{"CaloPunchThroughParametrisation.root"}; //!< holds the filename of the lookup table (property) std::vector<int> m_pdgInitiators; //!< vector of punch-through initiator pgds std::vector<int> m_punchThroughParticles; //!< vector of pdgs of the particles produced in punch-throughs std::vector<bool> m_doAntiParticles; //!< vector of bools to determine if anti-particles are created for each punch-through particle type @@ -175,7 +178,7 @@ namespace ISF { ServiceHandle<IEnvelopeDefSvc> m_envDefSvc; /** beam pipe radius */ - double m_beamPipe; + double m_beamPipe{500.}; }; } -- GitLab From 3bb667e4fdf36c33e497d5a4b19d2754d3c20f75 Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Tue, 12 Jun 2018 13:08:50 +0000 Subject: [PATCH 125/562] Merge branch 'LArG4EC_CoverityFix_21.0' into '21.0' LArG4 code clean up See merge request atlas/athena!11959 Former-commit-id: a1dc4682a66974304e841061f784b5483d46d3f2 --- .../src/LArBarrelPresamplerCalculator.cxx | 27 ++++++------------- .../src/LArBarrelPresamplerCalculator.h | 2 +- .../src/LArBarrelPresamplerGeometry.cxx | 15 +++++------ .../src/LArBarrelPresamplerGeometry.h | 10 ++++--- .../LArG4Barrel/src/LArCoudeAbsorbers.cxx | 8 +++--- .../LArG4Barrel/src/LArCoudeElectrodes.cxx | 8 +++--- .../LArG4/LArG4Barrel/src/LArCoudes.cxx | 6 ++--- .../LArG4Barrel/src/LArStraightAbsorbers.cxx | 13 +++++---- .../LArG4Barrel/src/LArStraightElectrodes.cxx | 10 +++---- .../src/CryostatCalibrationLArCalculator.h | 18 ++++++------- .../LArG4EC/src/LArEMECChargeCollection.cc | 23 ++++------------ .../LArG4/LArG4HEC/src/HECGeometry.cc | 13 +++++---- .../src/LocalCalibrationCalculator.cc | 19 ++++++++----- 13 files changed, 76 insertions(+), 96 deletions(-) diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerCalculator.cxx b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerCalculator.cxx index 987c3f4b47ab..23a08e0d324b 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerCalculator.cxx +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerCalculator.cxx @@ -45,13 +45,13 @@ LArBarrelPresamplerCalculator::LArBarrelPresamplerCalculator(const std::string& , m_IflCur(true) , m_birksLaw(nullptr) , m_detectorName("LArMgr") - //, m_testbeam(false) + , m_testbeam(false) , m_volname("LArMgr::LAr::Barrel::Presampler") { declareProperty("GeometryCalculator", m_geometry); declareProperty("IflCur",m_IflCur); declareProperty("DetectorName",m_detectorName); - //declareProperty("isTestbeam",m_testbeam); + declareProperty("isTestbeam",m_testbeam); } StatusCode LArBarrelPresamplerCalculator::initialize() @@ -86,7 +86,7 @@ StatusCode LArBarrelPresamplerCalculator::initialize() ATH_MSG_INFO(" LArBarrelPresamplerCalculator: Birks' law OFF"); } - if(m_detectorName.size()==0) m_volname="LAr::Barrel::Presampler"; + if(m_detectorName.empty()) m_volname="LAr::Barrel::Presampler"; else m_volname=m_detectorName+"::LAr::Barrel::Presampler"; ATH_MSG_DEBUG("End of LArBarrelPresamplerCalculator initialization "); @@ -147,26 +147,15 @@ G4bool LArBarrelPresamplerCalculator::Process(const G4Step* a_step, std::vector< ATH_MSG_DEBUG(" Detector Name " << m_detectorName); #endif - bool testbeam=false; - - if(m_detectorName=="") - for (G4int ii=0;ii<=ndep;ii++) { - G4VPhysicalVolume* v1 = g4navigation->GetVolume(ii); - // FIXME More efficient to find the comparison volume once and compare pointers? - if (v1->GetName()=="LAr::Barrel::Presampler") idep=ii; // half barrel - // FIXME Why are we checking if the geo is test beam every step? - if (v1->GetName()=="LAr::TBBarrel::Cryostat::LAr") testbeam=true; // TB or not ? - } - else + const G4String presamplerName((m_detectorName.empty()) ? "LAr::Barrel::Presampler" : + m_detectorName+"::LAr::Barrel::Presampler"); for (G4int ii=0;ii<=ndep;ii++) { G4VPhysicalVolume* v1 = g4navigation->GetVolume(ii); #ifdef DEBUGSTEP ATH_MSG_DEBUG(" Level,VolumeName " << ii << " " << v1->GetName()); #endif // FIXME More efficient to find the comparison volume once and compare pointers? - if (v1->GetName()==G4String(m_detectorName+"::LAr::Barrel::Presampler")) idep=ii; - // FIXME Why are we checking if the geo is test beam every step? - if (v1->GetName()==G4String(m_detectorName+"::LAr::TBBarrel::Cryostat::LAr")) testbeam=true; // TB or not ? + if (v1->GetName()==presamplerName) idep=ii; } #ifdef DEBUGSTEP @@ -243,7 +232,7 @@ G4bool LArBarrelPresamplerCalculator::Process(const G4Step* a_step, std::vector< // compute cell identifier G4int zSide; - if (testbeam) + if (m_testbeam) zSide = 1; else zSide = ( startPoint.z() > 0.) ? 1 : -1; @@ -276,7 +265,7 @@ G4bool LArBarrelPresamplerCalculator::Process(const G4Step* a_step, std::vector< // time computation is not necessarily correct for test beam G4double time; - if (testbeam) + if (m_testbeam) { time=0.; } diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerCalculator.h b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerCalculator.h index d25917284981..6495720eea10 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerCalculator.h +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerCalculator.h @@ -60,7 +60,7 @@ private: // detector name, for translated geometry std::string m_detectorName; - //bool m_testbeam; + bool m_testbeam; G4String m_volname; diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerGeometry.cxx b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerGeometry.cxx index e265726422aa..9ff97658cdab 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerGeometry.cxx +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerGeometry.cxx @@ -50,6 +50,7 @@ namespace LArG4 { : base_class(name, pSvcLocator) { declareProperty("DetectorName",m_detectorName); + declareProperty("TestBeam", m_testbeam); } //===================================================================================== @@ -122,7 +123,6 @@ namespace LArG4 { const G4NavigationHistory* g4navigation = a_step->GetPreStepPoint()->GetTouchable()->GetHistory(); const G4int ndep = g4navigation->GetDepth(); bool iactive(false); - bool isTestBeam(false); G4int idep(-999); /** Now navigate through the volumes hierarchy */ @@ -130,16 +130,15 @@ namespace LArG4 { // FIXME Need to find a way to avoid these string-comparisons const G4String& vname = g4navigation->GetVolume(ii)->GetName(); if (idep<0 && vname==fullPSName) idep=ii; // half barrel - else if (!isTestBeam && vname==fullCryoName) isTestBeam=true; // TB or not ? else if (!iactive && vname==fullModuleName) iactive=true; } if (idep < 0) std::abort(); if ( iactive ) { - return this->CalculatePSActiveIdentifier( a_step , idep , isTestBeam ); + return this->CalculatePSActiveIdentifier( a_step , idep ); } - return this->CalculatePS_DMIdentifier( a_step , idep , isTestBeam); + return this->CalculatePS_DMIdentifier( a_step , idep ); } // ========================================================================================== @@ -148,7 +147,7 @@ namespace LArG4 { used for calibration hit even if the hit is not really in the "fiducial" active part */ - LArG4Identifier Geometry::CalculatePSActiveIdentifier(const G4Step* a_step, const G4int ind, const bool isTestBeam) const + LArG4Identifier Geometry::CalculatePSActiveIdentifier(const G4Step* a_step, const G4int ind) const { LArG4Identifier PSActiveID = LArG4Identifier(); @@ -164,7 +163,7 @@ namespace LArG4 { const G4NavigationHistory* g4navigation = a_step->GetPreStepPoint()->GetTouchable()->GetHistory(); const G4ThreeVector ploc = g4navigation->GetTransform(ind).TransformPoint(p); - const G4int zSide(this->determineZSide(isTestBeam, p.z())); + const G4int zSide(this->determineZSide(p.z())); CalcData currentCellData; (void)this->findCell(currentCellData,ploc.x(),ploc.y(),ploc.z()); @@ -199,7 +198,7 @@ namespace LArG4 { //========================================================================================== - LArG4Identifier Geometry::CalculatePS_DMIdentifier(const G4Step* a_step, const G4int ind, const bool isTestBeam) const + LArG4Identifier Geometry::CalculatePS_DMIdentifier(const G4Step* a_step, const G4int ind) const { /****************************************************************************** @@ -246,7 +245,7 @@ namespace LArG4 { #endif // 01-Feb-2001 WGS: Add zSide calculation. - const G4int zSide(this->determineZSide(isTestBeam, p.z())); + const G4int zSide(this->determineZSide(p.z())); /** eta,phi in "local" half barrel coordinates */ const G4double phi = (ploc2.phi() < 0.) ? ploc2.phi()+2.*M_PI : ploc2.phi(); diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerGeometry.h b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerGeometry.h index 6095e9013f44..de81a078b788 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerGeometry.h +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerGeometry.h @@ -39,13 +39,13 @@ namespace LArG4 { virtual bool findCell(CalcData & currentCellData, G4double xloc,G4double yloc,G4double zloc) const override final; private: - LArG4Identifier CalculatePSActiveIdentifier( const G4Step* , const G4int indPS , const bool itb ) const; - LArG4Identifier CalculatePS_DMIdentifier( const G4Step* , const G4int indPS , const bool itb) const; + LArG4Identifier CalculatePSActiveIdentifier( const G4Step* , const G4int indPS ) const; + LArG4Identifier CalculatePS_DMIdentifier( const G4Step* , const G4int indPS ) const; - inline G4int determineZSide(const bool isTestBeam, const double zCoord) const { + inline G4int determineZSide(const double zCoord) const { // in TB case, only 1 side, // in Atlas case, use overall z to decide side - if (isTestBeam) { return 1; } + if (m_testbeam) { return 1; } if (zCoord > 0.) { return 1; } return -1; } @@ -72,6 +72,8 @@ namespace LArG4 { G4int m_ncell_module[8]{}; // total LAr thickness G4double m_halfThickLAr{0.5*13.*Athena::Units::mm}; // LAr total gap + // is this a test beam simulation job + bool m_testbeam{false}; } ; diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudeAbsorbers.cxx b/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudeAbsorbers.cxx index 29383f8fc005..214e155fe615 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudeAbsorbers.cxx +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudeAbsorbers.cxx @@ -21,7 +21,7 @@ LArCoudeAbsorbers::LArCoudeAbsorbers(std::string strDetector) { if (s_theCoudes==nullptr) { - if (strDetector=="") { + if (strDetector.empty()) { s_theCoudes= new PhysicalVolumeAccessor("LAr::EMB::STAC", "LAr::EMB::ThinAbs::CornerDownFold"); @@ -59,7 +59,7 @@ double LArCoudeAbsorbers::XCentCoude(int stackid, int cellid) const return m_xcent[cellid][stackid]; } else { - int id=cellid+stackid*10000; + const int id=cellid+stackid*10000; const G4VPhysicalVolume *pv=s_theCoudes->GetPhysicalVolume(id); if (!pv) return 0.; const G4ThreeVector& tv=pv->GetTranslation(); @@ -72,7 +72,7 @@ double LArCoudeAbsorbers::YCentCoude(int stackid, int cellid) const return m_ycent[cellid][stackid]; } else { - int id=cellid+stackid*10000; + const int id=cellid+stackid*10000; const G4VPhysicalVolume *pv=s_theCoudes->GetPhysicalVolume(id); if (!pv) return 0.; const G4ThreeVector& tv=pv->GetTranslation(); @@ -85,7 +85,7 @@ double LArCoudeAbsorbers::PhiRot(int stackid, int cellid) const return m_phirot[cellid][stackid]; } else { - int id=cellid+stackid*10000; + const int id=cellid+stackid*10000; const G4VPhysicalVolume *pv=s_theCoudes->GetPhysicalVolume(id); if (!pv) return 0.; const G4RotationMatrix *rm=pv->GetRotation(); diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudeElectrodes.cxx b/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudeElectrodes.cxx index 0a1d773381d6..01b24c6833f8 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudeElectrodes.cxx +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudeElectrodes.cxx @@ -21,7 +21,7 @@ LArCoudeElectrodes::LArCoudeElectrodes(std::string strDetector) { if (s_theCoudes==nullptr) { - if (strDetector=="") { + if (strDetector.empty()) { s_theCoudes= new PhysicalVolumeAccessor("LAr::EMB::STAC", "LAr::EMB::Electrode::CornerDownFold"); @@ -59,7 +59,7 @@ double LArCoudeElectrodes::XCentCoude(int stackid, int cellid) const return m_xcent[cellid][stackid]; } else { - int id=cellid+stackid*10000; + const int id=cellid+stackid*10000; const G4VPhysicalVolume *pv=s_theCoudes->GetPhysicalVolume(id); if (!pv) return 0.; const G4ThreeVector& tv=pv->GetTranslation(); @@ -72,7 +72,7 @@ double LArCoudeElectrodes::YCentCoude(int stackid, int cellid) const return m_ycent[cellid][stackid]; } else { - int id=cellid+stackid*10000; + const int id=cellid+stackid*10000; const G4VPhysicalVolume *pv=s_theCoudes->GetPhysicalVolume(id); if (!pv) return 0.; const G4ThreeVector& tv=pv->GetTranslation(); @@ -85,7 +85,7 @@ double LArCoudeElectrodes::PhiRot(int stackid, int cellid) const return m_phirot[cellid][stackid]; } else { - int id=cellid+stackid*10000; + const int id=cellid+stackid*10000; const G4VPhysicalVolume *pv=s_theCoudes->GetPhysicalVolume(id); if (!pv) return 0.; const G4RotationMatrix *rm=pv->GetRotation(); diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudes.cxx b/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudes.cxx index 74335fda64e8..1e4ad7f7a4b3 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudes.cxx +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArCoudes.cxx @@ -10,7 +10,7 @@ LArCoudes::LArCoudes(std::string strDetector) { if (s_theCoudes==nullptr) { - if(strDetector=="") + if(strDetector.empty()) { s_theCoudes= new PhysicalVolumeAccessor("LAr::EMB::STAC", @@ -28,7 +28,7 @@ LArCoudes::LArCoudes(std::string strDetector) } double LArCoudes::XCentCoude(int stackid, int cellid) const { - int id=cellid+stackid*10000; + const int id=cellid+stackid*10000; const G4VPhysicalVolume *pv=s_theCoudes->GetPhysicalVolume(id); if (!pv) std::abort(); const G4ThreeVector& tv=pv->GetTranslation(); @@ -36,7 +36,7 @@ double LArCoudes::XCentCoude(int stackid, int cellid) const } double LArCoudes::YCentCoude(int stackid, int cellid) const { - int id=cellid+stackid*10000; + const int id=cellid+stackid*10000; const G4VPhysicalVolume *pv=s_theCoudes->GetPhysicalVolume(id); if (!pv) std::abort(); const G4ThreeVector& tv=pv->GetTranslation(); diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArStraightAbsorbers.cxx b/LArCalorimeter/LArG4/LArG4Barrel/src/LArStraightAbsorbers.cxx index 5fd9066bcf12..56db63f5ab60 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/LArStraightAbsorbers.cxx +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArStraightAbsorbers.cxx @@ -28,7 +28,7 @@ LArStraightAbsorbers::LArStraightAbsorbers(std::string strDetector) else m_parity=1; // first wave goes down if (s_theAbsorbers==nullptr) { - if (strDetector=="") + if (strDetector.empty()) s_theAbsorbers = new PhysicalVolumeAccessor("LAr::EMB::STAC", "LAr::EMB::ThinAbs::Straight"); else @@ -64,7 +64,7 @@ double LArStraightAbsorbers::XCentAbs(int stackid, int cellid) const return m_xcent[cellid][stackid]; } else { - int id=cellid+stackid*10000; + const int id=cellid+stackid*10000; const G4VPhysicalVolume *pv=s_theAbsorbers->GetPhysicalVolume(id); if (!pv) return 0.; const G4ThreeVector& tv=pv->GetTranslation(); @@ -89,7 +89,7 @@ double LArStraightAbsorbers::YCentAbs(int stackid, int cellid) const return m_ycent[cellid][stackid]; } else { - int id=cellid+stackid*10000; + const int id=cellid+stackid*10000; const G4VPhysicalVolume *pv=s_theAbsorbers->GetPhysicalVolume(id); if (!pv) return 0.; const G4ThreeVector& tv=pv->GetTranslation(); @@ -112,12 +112,11 @@ double LArStraightAbsorbers::YCentAbs(int stackid, int cellid) const double LArStraightAbsorbers::SlantAbs(int stackid, int cellid) const { // both stackid and cellid start from 0 in the following code - int id=cellid+stackid*10000; + const int id=cellid+stackid*10000; const G4VPhysicalVolume *pv=s_theAbsorbers->GetPhysicalVolume(id); if (!pv) return 0.; const G4RotationMatrix *rm=pv->GetRotation(); - double Slant; - Slant = (stackid%2 ==m_parity) ? 180*CLHEP::deg-(rm->thetaY()):(rm->thetaY())-180*CLHEP::deg; + double Slant = (stackid%2 ==m_parity) ? 180*CLHEP::deg-(rm->thetaY()):(rm->thetaY())-180*CLHEP::deg; if((stackid%2 == m_parity) && (rm->phiY() > 0)) Slant = 360.*CLHEP::deg - Slant; if((stackid%2 == (1-m_parity)) && (rm->phiY() < 0)) Slant = - Slant; return Slant; @@ -128,7 +127,7 @@ double LArStraightAbsorbers::HalfLength(int stackid, int cellid) const return m_halflength[cellid][stackid]; } else { - int id=cellid+stackid*10000; + const int id=cellid+stackid*10000; const G4VPhysicalVolume *pv=s_theAbsorbers->GetPhysicalVolume(id); if (!pv) return 0.; const G4LogicalVolume* lv = pv->GetLogicalVolume(); diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArStraightElectrodes.cxx b/LArCalorimeter/LArG4/LArG4Barrel/src/LArStraightElectrodes.cxx index b3b841d48124..b55255902d57 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/LArStraightElectrodes.cxx +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArStraightElectrodes.cxx @@ -27,7 +27,7 @@ LArStraightElectrodes::LArStraightElectrodes(std::string strDetector) else m_parity=1; // first wave goes down if (s_theElectrodes==nullptr) { - if (strDetector=="") + if (strDetector.empty()) s_theElectrodes=new PhysicalVolumeAccessor("LAr::EMB::STAC", "LAr::EMB::Electrode::Straight"); else @@ -63,7 +63,7 @@ double LArStraightElectrodes::XCentEle(int stackid, int cellid) const return m_xcent[cellid][stackid]; } else { - int id=cellid+stackid*10000; + const int id=cellid+stackid*10000; const G4VPhysicalVolume *pv=s_theElectrodes->GetPhysicalVolume(id); if (!pv) return 0.; const G4ThreeVector& tv=pv->GetTranslation(); @@ -89,7 +89,7 @@ double LArStraightElectrodes::YCentEle(int stackid, int cellid) const return m_ycent[cellid][stackid]; } else { - int id=cellid+stackid*10000; + const int id=cellid+stackid*10000; const G4VPhysicalVolume *pv=s_theElectrodes->GetPhysicalVolume(id); if (!pv) return 0.; const G4ThreeVector& tv=pv->GetTranslation(); @@ -112,7 +112,7 @@ double LArStraightElectrodes::YCentEle(int stackid, int cellid) const } double LArStraightElectrodes::SlantEle(int stackid, int cellid) const { - int id=cellid+stackid*10000; + const int id=cellid+stackid*10000; const G4VPhysicalVolume *pv=s_theElectrodes->GetPhysicalVolume(id); if (!pv) return 0.; const G4RotationMatrix *rm=pv->GetRotation(); @@ -128,7 +128,7 @@ double LArStraightElectrodes::HalfLength(int stackid, int cellid) const return m_halflength[cellid][stackid]; } else { - int id=cellid+stackid*10000; + const int id=cellid+stackid*10000; const G4VPhysicalVolume *pv=s_theElectrodes->GetPhysicalVolume(id); if (!pv) return 0.; const G4LogicalVolume* lv = pv->GetLogicalVolume(); diff --git a/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationLArCalculator.h b/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationLArCalculator.h index 82bb31fb57f0..43b5548d5d3c 100644 --- a/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationLArCalculator.h +++ b/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationLArCalculator.h @@ -69,19 +69,19 @@ namespace LArG4 { CaloG4::SimulationEnergies m_energyCalculator; // Access to parameters. - LArVG4DetectorParameters* m_parameters; + LArVG4DetectorParameters* m_parameters{nullptr}; // For the default calculator (hopefully temporary). ServiceHandle<ILArCalibCalculatorSvc> m_defaultCalculator; - double m_rhoOutOfEmecHec; // used as const after init - double m_zInFrontOfPresampler; // used as const after init - double m_zEMECRefPoint; // used as const after init - double m_zInFrontOfSpanishFan; // used as const after init - double m_zInFrontOfHEC; // used as const after init - double m_zBehindTile; // used as const after init - double m_endZHEC1Wheel; // used as const after init - double m_startZHEC2Wheel; // used as const after init + double m_rhoOutOfEmecHec{0.}; // used as const after init + double m_zInFrontOfPresampler{0.}; // used as const after init + double m_zEMECRefPoint{0.}; // used as const after init + double m_zInFrontOfSpanishFan{0.}; // used as const after init + double m_zInFrontOfHEC{0.}; // used as const after init + double m_zBehindTile{0.}; // used as const after init + double m_endZHEC1Wheel{0.}; // used as const after init + double m_startZHEC2Wheel{0.}; // used as const after init inline double rhoOutOfEmecHec() const { return m_rhoOutOfEmecHec; }; inline double zInFrontOfPresampler() const { return m_zInFrontOfPresampler; }; inline double zEMECRefPoint() const { return m_zEMECRefPoint; }; diff --git a/LArCalorimeter/LArG4/LArG4EC/src/LArEMECChargeCollection.cc b/LArCalorimeter/LArG4/LArG4EC/src/LArEMECChargeCollection.cc index 0f8593c7b382..afb0616c4655 100644 --- a/LArCalorimeter/LArG4/LArG4EC/src/LArEMECChargeCollection.cc +++ b/LArCalorimeter/LArG4/LArG4EC/src/LArEMECChargeCollection.cc @@ -431,15 +431,9 @@ void LArG4::EC::EnergyCalculator::LoadFieldMaps(const G4String fname){ for(G4int foldtype = 0; foldtype < foldtypemx; ++ foldtype) { for(G4int wheeltype = 0; wheeltype < 2; ++ wheeltype) { - //if(wheeltype == 0) ChCollWheelType = &ChCollInner; - //if(wheeltype == 1) ChCollWheelType = &ChCollOuter; - Wheel_Efield_Map *ChCollWheelType = (wheeltype == 0) ? &s_ChCollInner : - ( (wheeltype == 1) ? &s_ChCollOuter : 0 ); + Wheel_Efield_Map *ChCollWheelType = (wheeltype == 0) ? &s_ChCollInner : &s_ChCollOuter; - //if(foldtype == 0 ) ChCollFoldType = &(ChCollWheelType->Fold1); - //if(foldtype == 1 ) ChCollFoldType = &(ChCollWheelType->Fold0); - Fold_Efield_Map *ChCollFoldType = ( foldtype == 0 ) ? &(ChCollWheelType->Fold1) : - ( ( foldtype == 1 ) ? &(ChCollWheelType->Fold0) : 0 ); + Fold_Efield_Map *ChCollFoldType = ( foldtype == 0 ) ? &(ChCollWheelType->Fold1) : &(ChCollWheelType->Fold0); const G4int nlayer = ChCollWheelType->NumberOfRadialLayer; // should be the same for Fold0 and Fold1 @@ -508,15 +502,9 @@ void LArG4::EC::EnergyCalculator::LoadFieldMaps(const G4String fname){ for(G4int foldtype = 0; foldtype < foldtypemx; ++ foldtype) { for(G4int wheeltype = 0; wheeltype < 2; ++ wheeltype){ - //if(wheeltype == 0) ChCollWheelType = &ChCollInner; - //if(wheeltype == 1) ChCollWheelType = &ChCollOuter; - Wheel_Efield_Map *ChCollWheelType = (wheeltype == 0) ? &s_ChCollInner : - ( (wheeltype == 1) ? &s_ChCollOuter : 0 ); + Wheel_Efield_Map *ChCollWheelType = (wheeltype == 0) ? &s_ChCollInner : &s_ChCollOuter; - //if(foldtype == 0 ) ChCollFoldType = &(ChCollWheelType->Fold1); - //if(foldtype == 1 ) ChCollFoldType = &(ChCollWheelType->Fold0); - Fold_Efield_Map *ChCollFoldType = ( foldtype == 0 ) ? &(ChCollWheelType->Fold1) : - ( ( foldtype == 1 ) ? &(ChCollWheelType->Fold0) : 0 ); + Fold_Efield_Map *ChCollFoldType = ( foldtype == 0 ) ? &(ChCollWheelType->Fold1) : &(ChCollWheelType->Fold0); const G4int nlayer = ChCollWheelType->NumberOfRadialLayer; // should be the same for Fold0 and Fold1 for(G4int i=0; i<nlayer; ++i){ @@ -589,8 +577,7 @@ void LArG4::EC::EnergyCalculator::PrepareFieldMap(Wheel_Efield_Map* ChCollWheelT //if(foldtype == 0 ) ChCollFoldType = &(ChCollWheelType->Fold1); //normal fold //if(foldtype == 1 ) ChCollFoldType = &(ChCollWheelType->Fold0); //very first fold - Fold_Efield_Map *ChCollFoldType = ( foldtype == 0 ) ? &(ChCollWheelType->Fold1) : - ( ( foldtype == 1 ) ? &(ChCollWheelType->Fold0) : 0 ); + Fold_Efield_Map *ChCollFoldType = ( foldtype == 0 ) ? &(ChCollWheelType->Fold1) : &(ChCollWheelType->Fold0); for(G4int i=0; i<nlayer; ++i) { if(foldtype == 0) { //normal fold diff --git a/LArCalorimeter/LArG4/LArG4HEC/src/HECGeometry.cc b/LArCalorimeter/LArG4/LArG4HEC/src/HECGeometry.cc index 0a5226f1bd91..b00268bfcf95 100644 --- a/LArCalorimeter/LArG4/LArG4HEC/src/HECGeometry.cc +++ b/LArCalorimeter/LArG4/LArG4HEC/src/HECGeometry.cc @@ -229,8 +229,8 @@ namespace LArG4 { // Next we need to be able to handle things regardless whether the Wheels are // imbedded in a HEC Mother or whether they are placed independently into the cryostat: - bool inMother = false; - if (volumeName == "LArMgr::LAr::HEC::Mother") inMother = true; + static const G4String motherVolumeName("LArMgr::LAr::HEC::Mother"); + const bool inMother(volumeName == motherVolumeName); // This will give us the hit-position in the Wheel coordinates (ie in LAr::HEC::LiquidArgon): // But we have to be careful: We COULD be in a mother, in which case the wheel coord. is meaningless. @@ -263,11 +263,10 @@ namespace LArG4 { { - int modVol = m_g4historyDepth+1 ; // geant depth of the HEC::Module - int depthVol= m_g4historyDepth+2 ; // geant depth of the HEC::Module::Depth - - int depthIndex = theTouchable->GetHistory()->GetVolume(depthVol)->GetCopyNo(); - int moduleIndex = theTouchable->GetHistory()->GetVolume(modVol)->GetCopyNo(); + const int depthVol= m_g4historyDepth+2 ; // geant depth of the HEC::Module::Depth + const int depthIndex = theTouchable->GetHistory()->GetVolume(depthVol)->GetCopyNo(); + const int modVol = m_g4historyDepth+1 ; // geant depth of the HEC::Module + const int moduleIndex = theTouchable->GetHistory()->GetVolume(modVol)->GetCopyNo(); const G4AffineTransform moduleTransform= theTouchable->GetHistory()->GetTransform(modVol); diff --git a/LArCalorimeter/LArG4/LArG4HEC/src/LocalCalibrationCalculator.cc b/LArCalorimeter/LArG4/LArG4HEC/src/LocalCalibrationCalculator.cc index fb867593ca75..960b2dddb6fe 100644 --- a/LArCalorimeter/LArG4/LArG4HEC/src/LocalCalibrationCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4HEC/src/LocalCalibrationCalculator.cc @@ -99,19 +99,24 @@ namespace LArG4 { std::cout<<"LArHECLocalCalibrationCalculator::Process Volume: "<<hitVolume<<std::endl; #endif if(hitVolume.contains("::") ) { - int last = hitVolume.last(':'); + const int last = hitVolume.last(':'); hitVolume.remove(0,last+1); - } + } + static const G4String sliceVolume("Slice"); + static const G4String absorberVolume("Absorber"); + static const G4String electrodeVolume("Electrode"); + static const G4String copperVolume("Copper"); + static const G4String tieRodVolume("TieRod"); if(m_geometryType != kLocDead) { - if(hitVolume=="Slice" ) { + if(hitVolume==sliceVolume) { identifier = m_geometryCalculator->CalculateIdentifier(step, kLocInactive, 0, 4.*CLHEP::mm); - } else if(hitVolume=="Absorber" ) { + } else if(hitVolume==absorberVolume) { identifier = m_geometryCalculator->CalculateIdentifier(step, kLocInactive, 0, 2.*CLHEP::mm, 1.02*CLHEP::mm); - } else if(hitVolume=="Electrode") { + } else if(hitVolume==electrodeVolume) { identifier = m_geometryCalculator->CalculateIdentifier(step, kLocInactive, 1, 4.*CLHEP::mm); - } else if(hitVolume=="Copper") { + } else if(hitVolume==copperVolume) { identifier = m_geometryCalculator->CalculateIdentifier(step, kLocInactive, 2, 4.*CLHEP::mm); - } else if(hitVolume=="TieRod"){ // We should call another functions for TieRods + } else if(hitVolume==tieRodVolume){ // We should call another functions for TieRods identifier = m_geometryCalculator->CalculateIdentifier(step, kLocActive, -1); } else identifier = LArG4Identifier(); } else identifier = m_geometryCalculator->CalculateIdentifier(step, m_geometryType, 0, 4.*CLHEP::mm); -- GitLab From cfb7e73c1e4a4ad7c5dc9ec1dd67ffac7430967a Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Wed, 13 Jun 2018 12:00:51 +0200 Subject: [PATCH 126/562] Added reading cluster positions, moved component header to src sub-dir Former-commit-id: 55dad47ea73a6c6aab5c201b1b7c51e8f9169e8a --- .../src/TrigL2CaloRingerFexMT.cxx | 117 ++++++++++-------- .../src/TrigL2CaloRingerFexMT.h | 102 +++++++++++++++ .../components/TrigMultiVarHypo_entries.cxx | 3 +- 3 files changed, 166 insertions(+), 56 deletions(-) create mode 100644 Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerFexMT.h diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerFexMT.cxx b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerFexMT.cxx index 5896ae68f694..1e7ed6329a81 100644 --- a/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerFexMT.cxx +++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerFexMT.cxx @@ -2,12 +2,14 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ +#include "CLHEP/Units/SystemOfUnits.h" +#include "AthenaMonitoring/MonitoredScope.h" #include "xAODTrigCalo/TrigEMClusterContainer.h" #include "xAODTrigCalo/TrigEMClusterAuxContainer.h" #include "AthenaMonitoring/MonitoredScope.h" -#include "TrigMultiVarHypo/TrigL2CaloRingerFexMT.h" +#include "TrigL2CaloRingerFexMT.h" #include "TrigMultiVarHypo/preprocessor/TrigRingerPreprocessor.h" #include "TrigMultiVarHypo/discriminator/MultiLayerPerceptron.h" @@ -20,15 +22,17 @@ -#define SIZEOF_NODES 3 -#define SIZEOF_RINGSETS 7 +static const size_t SIZEOF_NODES = 3; +static const size_t SIZEOF_RINGSETS = 7; - TrigL2CaloRingerFexMT:: TrigL2CaloRingerFexMT(const std::string & name, ISvcLocator* pSvcLocator) - :AthAlgorithm(name, pSvcLocator){ +TrigL2CaloRingerFexMT:: TrigL2CaloRingerFexMT(const std::string & name, ISvcLocator* pSvcLocator) + :AthAlgorithm(name, pSvcLocator){ + + ATH_MSG_DEBUG( "start RingerMT const:" ); +} - ATH_MSG_DEBUG( "start RingerMT const:" ); - } TrigL2CaloRingerFexMT:: ~TrigL2CaloRingerFexMT(){} +TrigL2CaloRingerFexMT:: ~TrigL2CaloRingerFexMT(){} StatusCode TrigL2CaloRingerFexMT::initialize(){ @@ -39,27 +43,26 @@ StatusCode TrigL2CaloRingerFexMT::initialize(){ m_nDiscr = m_nodes.size()/SIZEOF_NODES; m_nPreproc = m_normRings.size()/SIZEOF_RINGSETS; - ATH_CHECK(m_ringerShape.initialize()); - //ATH_CHECK(m_TrigRingerRingsContainer.initialize()); - ATH_CHECK(m_outputKey.initialize()); + ATH_CHECK( m_ringsKey.initialize()); + ATH_CHECK( m_clustersKey.initialize()); + ATH_CHECK( m_outputKey.initialize()); if(configurationInvalid()){ return StatusCode::FAILURE; } ///Initialize all discriminators - for(unsigned i=0; i<m_nDiscr; ++i) - { + for(unsigned i=0; i<m_nDiscr; ++i) { MultiLayerPerceptron *discr = nullptr; TrigRingerPreprocessor *preproc = nullptr; - ATH_MSG_INFO("Create multi layer perceptron discriminator using configuration:"); + ATH_MSG_INFO( "Create multi layer perceptron discriminator using configuration:"); ATH_MSG_INFO( " Input layer : " << m_nodes[i*SIZEOF_NODES+0] ); ATH_MSG_INFO( " Output layer : " << m_nodes[i*SIZEOF_NODES+2] ); ATH_MSG_INFO( " Eta range : " << m_etaBins[i][0] << " < |eta| <=" << m_etaBins[i][1] ); ATH_MSG_INFO( " Et range : " << m_etBins[i][0] << " < Et[GeV] <=" << m_etBins[i][1] ); - try{ + try { ///Alloc discriminator ///TODO: find best way to parse this vector. The athena don't accept vector<vector<unsigned int>> std::vector<unsigned int> nodes(SIZEOF_NODES); @@ -68,20 +71,14 @@ StatusCode TrigL2CaloRingerFexMT::initialize(){ discr = new MultiLayerPerceptron(nodes, m_weights[i], m_bias[i], 0, m_etBins[i][0], m_etBins[i][1], m_etaBins[i][0], m_etaBins[i][1]); - } - catch(const std::bad_alloc& xa){ + } catch(const std::bad_alloc& ) { ATH_MSG_ERROR( "Weight vector size is not compatible with nodes vector." ); return StatusCode::FAILURE; - } - catch(int e){ - if (e == BAD_WEIGHT_SIZE) - { + } catch(int e){ + if (e == BAD_WEIGHT_SIZE) { ATH_MSG_ERROR( "Weight vector size is not compatible with nodes vector." ); return StatusCode::FAILURE; - } - if (e == BAD_BIAS_SIZE) - { - + } else if (e == BAD_BIAS_SIZE) { ATH_MSG_ERROR( "Bias vector size is not compatible with nodes vector." ); return StatusCode::FAILURE; } @@ -93,16 +90,14 @@ StatusCode TrigL2CaloRingerFexMT::initialize(){ try{ ///TODO: find best way to parse this vector. The athena don't accept vector<vector<unsigned int>> std::vector<unsigned int> nrings(SIZEOF_RINGSETS), normrings(SIZEOF_RINGSETS), sectionrings(SIZEOF_RINGSETS); - for(unsigned rs=0;rs<SIZEOF_RINGSETS;++rs){ - nrings[rs]=m_nRings[rs+i*SIZEOF_RINGSETS]; - normrings[rs]=m_normRings[rs+i*SIZEOF_RINGSETS]; - sectionrings[rs]=m_sectionRings[rs+i*SIZEOF_RINGSETS]; - }///parser - - preproc = new TrigRingerPreprocessor(nrings,normrings,sectionrings); - } - catch(const std::bad_alloc& xa){ - + for(unsigned rs = 0; rs < SIZEOF_RINGSETS; ++rs ){ + nrings[rs] = m_nRings[rs+i*SIZEOF_RINGSETS]; + normrings[rs] = m_normRings[rs+i*SIZEOF_RINGSETS]; + sectionrings[rs] = m_sectionRings[rs+i*SIZEOF_RINGSETS]; + } ///parser + + preproc = new TrigRingerPreprocessor( nrings, normrings, sectionrings ); + } catch(const std::bad_alloc& ){ ATH_MSG_ERROR( "Bad alloc for TrigRingerPrepoc." ); return StatusCode::FAILURE; } @@ -129,16 +124,21 @@ StatusCode TrigL2CaloRingerFexMT::finalize(){ } StatusCode TrigL2CaloRingerFexMT::execute(){ - ATH_MSG_DEBUG("start RingerMT"); + auto totalTime = Monitored::MonitoredTimer::declare("TIME_total"); + totalTime.start(); + ATH_MSG_DEBUG( "start RingerMT" ); m_output = 999; - auto ctx = getContext(); + auto context = getContext(); ///Retrieve rings pattern information - auto ringerShapeHandle = SG::makeHandle(m_ringerShape, ctx); - const xAOD::TrigRingerRings * ringerShape = ringerShapeHandle.cptr(); - //G::ReadHandle<xAOD::TrigRingerRings_v2> - + auto ringerShapeHandle = SG::makeHandle( m_ringsKey, context ); + const xAOD::TrigRingerRings* ringerRings = ringerShapeHandle.cptr(); + + + auto clustersHandle = SG::makeHandle( m_clustersKey, context ); + const xAOD::TrigEMClusterContainer* clusters = clustersHandle.cptr(); + CHECK( clusters->size() == 1 ); //It's ready to select the correct eta/et bin ATH_MSG_DEBUG("executing"); @@ -146,13 +146,12 @@ StatusCode TrigL2CaloRingerFexMT::execute(){ MultiLayerPerceptron *discr = nullptr; TrigRingerPreprocessor *preproc = nullptr; - //TODO read parameters from EM Cluster - //float eta = std::fabs(emCluster->eta()); - //if(eta>2.50) eta=2.50;///fix for events out of the ranger - //float et = emCluster->et()*1e-3; ///in GeV - float et = 10; - float eta = 1; + float eta = std::fabs(clusters->front()->eta()); + if(eta>2.50) eta=2.50;///fix for events out of the ranger + float et = clusters->front()->et() / CLHEP::GeV; // in GeV + + if(m_discriminators.size() > 0){ for(unsigned i=0; i<m_discriminators.size(); ++i){ if(et > m_discriminators[i]->etmin() && et <= m_discriminators[i]->etmax()){ @@ -165,23 +164,29 @@ StatusCode TrigL2CaloRingerFexMT::execute(){ }///Loop over discriminators ///get shape - const std::vector<float> rings = ringerShape->rings(); + const std::vector<float> rings = ringerRings->rings(); - ATH_MSG_DEBUG( "ringerShape->rings().size() is: " <<rings.size() ); + ATH_MSG_DEBUG( "rings->rings().size() is: " <<rings.size() ); std::vector<float> refRings(rings.size()); refRings.assign(rings.begin(), rings.end()); - ATH_MSG_DEBUG("Et = " << et << " GeV, |eta| = " << eta); - + ATH_MSG_DEBUG( "Et = " << et << " GeV, |eta| = " << eta ); + auto preprocessTime = Monitored::MonitoredTimer::declare("TIME_preprocess"); ///pre-processing shape + preprocessTime.start(); if(preproc) preproc->ppExecute(refRings); - - ATH_MSG_DEBUG("after preproc refRings.size() is: " << rings.size()); - + preprocessTime.stop(); + + ATH_MSG_DEBUG( "after preproc refRings.size() is: " << rings.size() ); + auto decisionTime = Monitored::MonitoredTimer::declare("TIME_decision"); ///Apply the discriminator + decisionTime.start(); if(discr) m_output = discr->propagate(refRings); + decisionTime.stop(); + auto scope = Monitored::MonitoredScope::declare( m_monTool, preprocessTime, decisionTime ); + }else{ ATH_MSG_DEBUG("There is no discriminator into this Fex."); } @@ -194,10 +199,12 @@ StatusCode TrigL2CaloRingerFexMT::execute(){ rnnOutput->setRnnDecision(m_output); - auto outputHandle = SG::makeHandle (m_outputKey, ctx); + auto outputHandle = SG::makeHandle (m_outputKey, context); ATH_CHECK( outputHandle.record(std::move(rnnOutput)) ); - + totalTime.stop(); + auto scope = Monitored::MonitoredScope::declare( m_monTool, totalTime ); + return StatusCode::SUCCESS; } diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerFexMT.h b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerFexMT.h new file mode 100644 index 000000000000..acc412e66896 --- /dev/null +++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerFexMT.h @@ -0,0 +1,102 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + + +// standard stuff +#include <vector> +#include <cmath> + +// general athena stuff +#include "GaudiKernel/IToolSvc.h" + +//Gaudi +#include "GaudiKernel/ToolHandle.h" +#include "GaudiKernel/ServiceHandle.h" + +#include "AthenaMonitoring/GenericMonitoringTool.h" +#include "AthenaBaseComps/AthAlgorithm.h" +///Local include(s) +#include "TrigMultiVarHypo/preprocessor/TrigRingerPreprocessor.h" +#include "TrigMultiVarHypo/discriminator/MultiLayerPerceptron.h" + +///xAOD include(s) +#include "xAODTrigCalo/TrigEMClusterContainer.h" +#include "xAODTrigRinger/TrigRNNOutput.h" +#include "xAODTrigRinger/TrigRNNOutputContainer.h" +#include "xAODTrigRinger/TrigRingerRings.h" +#include "xAODTrigRinger/TrigRingerRingsContainer.h" + +#include "TrigTimeAlgs/TrigTimer.h" + +class TrigL2CaloRingerFexMT : public AthAlgorithm { + + public: + TrigL2CaloRingerFexMT(const std::string & name, ISvcLocator* pSvcLocator); + ~TrigL2CaloRingerFexMT(); + + StatusCode initialize(); + StatusCode finalize(); + StatusCode execute(); + + protected: + TrigTimer* m_storeTimer; + TrigTimer* m_normTimer; + TrigTimer* m_decisionTimer; + + + + private: + + //feature keys + Gaudi::Property<std::string> m_hlt_feature {this, "HltFeature", "TrigRingerNeuralFex", "..."}; + Gaudi::Property<std::string> m_feature {this, "Feature", "TrigRingerNeuralFex", "..."}; + + //Prepoc configuration + Gaudi::Property<std::vector<unsigned int>> m_normRings {this, "NormalisationRings", std::vector<unsigned int>(), "..." }; + Gaudi::Property<std::vector<unsigned int>> m_sectionRings {this, "SectionRings", std::vector<unsigned int>(), "..."}; + Gaudi::Property<std::vector<unsigned int>> m_nRings {this, "NRings", std::vector<unsigned int>(), "..." }; + + //Disriminator configuration + Gaudi::Property<std::vector<unsigned int>> m_nodes {this, "Nodes", std::vector<unsigned int>(), "..."}; + Gaudi::Property<std::vector<std::vector<double>>> m_weights {this, "Weights", std::vector<std::vector<double>>(), "..."}; + Gaudi::Property<std::vector<std::vector<double>>> m_bias {this, "Bias", std::vector<std::vector<double>>(), "..." }; + Gaudi::Property<std::vector<double>> m_threshold {this, "Threshold", std::vector<double>(), "..."}; + Gaudi::Property<std::vector<std::vector<double>>> m_etaBins {this, "EtaBins", std::vector<std::vector<double>>(), "..." }; + Gaudi::Property<std::vector<std::vector<double>>> m_etBins {this, "EtBins", std::vector<std::vector<double>>(), "..."}; + + bool configurationInvalid(); + + //Discriminator holder + std::vector<MultiLayerPerceptron*> m_discriminators; + //Pre-processing holder + std::vector<TrigRingerPreprocessor*> m_preproc; + + + unsigned m_nDiscr; + unsigned m_nPreproc; + float m_output; + + SG::ReadHandleKey<xAOD::TrigRingerRings> m_ringsKey { + this, + "CaloRingsKey", + "CaloRings", + "" + }; + + SG::ReadHandleKey<xAOD::TrigEMClusterContainer> m_clustersKey { + this, + "ClustersKey", + "CaloClusters", + "" + }; + + SG::WriteHandleKey<xAOD::TrigRNNOutput> m_outputKey { + this, + "RNNOutputKey", + "CaloRNNOutput", + "" + }; + ToolHandle<GenericMonitoringTool> m_monTool { this, "MonTool", "GenericMonitoringTool/RingerFexMon", "Monitoring" }; + +}; diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/src/components/TrigMultiVarHypo_entries.cxx b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/components/TrigMultiVarHypo_entries.cxx index 23997e197178..8c10143751a9 100644 --- a/Trigger/TrigHypothesis/TrigMultiVarHypo/src/components/TrigMultiVarHypo_entries.cxx +++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/components/TrigMultiVarHypo_entries.cxx @@ -1,9 +1,10 @@ #include "TrigMultiVarHypo/TrigL2CaloRingerFex.h" #include "TrigMultiVarHypo/TrigL2CaloRingerHypo.h" -#include "TrigMultiVarHypo/TrigL2CaloRingerFexMT.h" +#include "../TrigL2CaloRingerFexMT.h" DECLARE_COMPONENT( TrigL2CaloRingerFex ) DECLARE_COMPONENT( TrigL2CaloRingerHypo ) DECLARE_COMPONENT( TrigL2CaloRingerFexMT ) + -- GitLab From 8deb422b0ced42f8718b59c0e2c986ff76ed4f08 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Wed, 13 Jun 2018 12:01:54 +0200 Subject: [PATCH 127/562] added monitroing tool configuration Former-commit-id: b470920cf8c10b1a5a250cdee4d8066b77813732 --- .../TrigMultiVarHypo/python/TrigL2CaloRingerFexMTInit.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/python/TrigL2CaloRingerFexMTInit.py b/Trigger/TrigHypothesis/TrigMultiVarHypo/python/TrigL2CaloRingerFexMTInit.py index c88d8fa8b8cd..77675553b449 100755 --- a/Trigger/TrigHypothesis/TrigMultiVarHypo/python/TrigL2CaloRingerFexMTInit.py +++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/python/TrigL2CaloRingerFexMTInit.py @@ -26,5 +26,11 @@ def init_ringer(): ringer.Weights = theRingerConfig.Weights ringer.EtaBins = theRingerConfig.EtaBins ringer.EtBins = theRingerConfig.EtBins - + from AthenaMonitoring.GenericMonitoringTool import GenericMonitoringTool, defineHistogram + + monTool = GenericMonitoringTool("RingerFexMon") + monTool.Histograms = [ defineHistogram( "TIME_total", title="Total Time;time[ms]", xbins=50, xmin=0, xmax=100 ), + defineHistogram( "TIME_preprocess", title="Preprocessing Time;time[ms]", xbins=50, xmin=0, xmax=50 ), + defineHistogram( "TIME_decision", title="Decision Time;time[ms]", xbins=50, xmin=0, xmax=50 )] + ringer.MonTool = monTool return ringer -- GitLab From 4e300434cc19fd87203cdb4cec74728da31ba043 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Wed, 13 Jun 2018 12:02:49 +0200 Subject: [PATCH 128/562] properly configure ringer fex to read clusters Former-commit-id: e649ce2e3f16dafac5ecfb0dceff4d80efabad7f --- .../TrigUpgradeTest/python/egammaMenuDefs.py | 2 +- .../TrigUpgradeTest/share/egamma.withViews.py | 30 ++++++++----------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/egammaMenuDefs.py b/Trigger/TrigValidation/TrigUpgradeTest/python/egammaMenuDefs.py index 75b5a26f4172..8dd2eace2e3b 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/egammaMenuDefs.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/egammaMenuDefs.py @@ -46,7 +46,7 @@ svcMgr.ToolSvc.TrigDataAccess.ApplyOffsetCorrection=False from TrigMultiVarHypo.TrigL2CaloRingerFexMTInit import init_ringer trigL2CaloRingerFexMT = init_ringer() trigL2CaloRingerFexMT.OutputLevel = DEBUG - +trigL2CaloRingerFexMT.ClustersKey = theFastCaloAlgo.ClustersName from AthenaCommon.CFElements import parOR, seqOR, seqAND, stepSeq diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py index fd1ac1f18978..6679547757df 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py @@ -40,18 +40,7 @@ if globalflags.InputFormat.is_bytestream(): testChains = ["HLT_e3_etcut", "HLT_e5_etcut", "HLT_e7_etcut", "HLT_2e3_etcut", "HLT_e3e5_etcut"] topSequence.L1DecoderTest.prescaler.Prescales = ["HLT_e3_etcut:2", "HLT_2e3_etcut:2.5"] - - -from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import T2CaloEgamma_FastAlgo -theFastCaloAlgo=T2CaloEgamma_FastAlgo("FastCaloAlgo" ) -theFastCaloAlgo.OutputLevel=VERBOSE -theFastCaloAlgo.ClustersName="HLT_xAOD__TrigEMClusterContainer_L2CaloClusters" #"L2CaloClusters" -svcMgr.ToolSvc.TrigDataAccess.ApplyOffsetCorrection=False - -from TrigMultiVarHypo.TrigL2CaloRingerFexMTInit import init_ringer -trigL2CaloRingerFexMT = init_ringer() -trigL2CaloRingerFexMT.OutputLevel = DEBUG @@ -59,6 +48,7 @@ from AthenaCommon.CFElements import parOR, seqOR, seqAND, stepSeq, findAlgorithm from DecisionHandling.DecisionHandlingConf import RoRSeqFilter, DumpDecisions from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm +clustersKey = "HLT_xAOD__TrigEMClusterContainer_L2CaloClusters" #"L2CaloClusters" def createFastCaloSequence(rerun=False): __prefix = "Rerurn_" if rerun else "" @@ -69,10 +59,16 @@ def createFastCaloSequence(rerun=False): #clusterMaker=T2CaloEgamma_FastAlgo(__prefix+"FastClusterMaker" ) clusterMaker=T2CaloEgamma_FastAlgo( "FastClusterMaker" ) clusterMaker.OutputLevel=VERBOSE - clusterMaker.ClustersName = theFastCaloAlgo.ClustersName + clusterMaker.ClustersName=clustersKey svcMgr.ToolSvc.TrigDataAccess.ApplyOffsetCorrection=False - fastCaloInViewAlgs = seqAND( __prefix+"fastCaloInViewAlgs", [ clusterMaker ]) + from TrigMultiVarHypo.TrigL2CaloRingerFexMTInit import init_ringer + trigL2CaloRingerFexMT = init_ringer() + trigL2CaloRingerFexMT.ClustersKey = clusterMaker.ClustersName + trigL2CaloRingerFexMT.OutputLevel = DEBUG + + + fastCaloInViewAlgs = seqAND( __prefix+"fastCaloInViewAlgs", [ clusterMaker, trigL2CaloRingerFexMT ]) filterL1RoIsAlg = RoRSeqFilter( __prefix+"filterL1RoIsAlg") filterL1RoIsAlg.Input = [__l1RoIDecisions] @@ -125,7 +121,7 @@ viewAlgs.append(theFTF) # A simple algorithm to confirm that data has been inherited from parent view # Required to satisfy data dependencies ViewVerify = CfgMgr.AthViews__ViewDataVerifier("electronViewDataVerifier") -ViewVerify.DataObjects = [('xAOD::TrigEMClusterContainer','StoreGateSvc+'+theFastCaloAlgo.ClustersName)] +ViewVerify.DataObjects = [('xAOD::TrigEMClusterContainer','StoreGateSvc+'+clustersKey)] ViewVerify.OutputLevel = DEBUG viewAlgs.append(ViewVerify) @@ -137,7 +133,7 @@ for viewAlg in viewAlgs: from TrigEgammaHypo.TrigL2ElectronFexMTConfig import L2ElectronFex_1 theElectronFex= L2ElectronFex_1() -theElectronFex.TrigEMClusterName = theFastCaloAlgo.ClustersName +theElectronFex.TrigEMClusterName = clustersKey theElectronFex.TrackParticlesName = TrackParticlesName theElectronFex.ElectronsName= "HLT_xAOD__TrigElectronContainer_L2ElectronFex" #"Electrons" theElectronFex.OutputLevel=VERBOSE @@ -231,8 +227,8 @@ egammaViewsMerger.TrigElectronContainerInViews = [ theElectronFex.ElectronsName egammaViewsMerger.TrigElectronContainer = [ theElectronFex.ElectronsName ] egammaViewsMerger.TrigEMClusterContainerViews = [ "EMCaloViews" ] -egammaViewsMerger.TrigEMClusterContainerInViews = [ theFastCaloAlgo.ClustersName ] -egammaViewsMerger.TrigEMClusterContainer = [ theFastCaloAlgo.ClustersName ] +egammaViewsMerger.TrigEMClusterContainerInViews = [ clustersKey ] +egammaViewsMerger.TrigEMClusterContainer = [ clustersKey ] egammaViewsMerger.OutputLevel = VERBOSE -- GitLab From 27b8f0a704c9243f494aa755f5e39cccb2a5073f Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Wed, 13 Jun 2018 12:03:24 +0200 Subject: [PATCH 129/562] make sure that test fails if any job in sequence fails Former-commit-id: c0df71a17518fc28abcf4e4543fec0e575eb25e7 --- .../TrigUpgradeTest/test/test_egamma_run_data.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_run_data.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_run_data.sh index 70978b0e0d46..3757cea2b68f 100755 --- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_run_data.sh +++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_run_data.sh @@ -2,6 +2,6 @@ # art-type: build # art-ci: master -athena --dump-config=CONF.txt --threads=1 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/egamma.withViews.py -checkxAOD.py myESD.pool.root -athena TrigUpgradeTest/checkESD.py \ No newline at end of file +athena --threads=1 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/egamma.withViews.py && +checkxAOD.py myESD.pool.root && +athena TrigUpgradeTest/checkESD.py -- GitLab From d676e3d366ced0ece6484dbed5ecc0c31678a49d Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Wed, 13 Jun 2018 12:03:34 +0200 Subject: [PATCH 130/562] Moving tile to src Former-commit-id: 2df82addc9dd995cdb56caa82e660705ced2533b --- .../TrigMultiVarHypo/TrigL2CaloRingerFexMT.h | 94 ------------------- 1 file changed, 94 deletions(-) delete mode 100644 Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/TrigL2CaloRingerFexMT.h diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/TrigL2CaloRingerFexMT.h b/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/TrigL2CaloRingerFexMT.h deleted file mode 100644 index 05f1ccb32344..000000000000 --- a/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/TrigL2CaloRingerFexMT.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - - -// standard stuff -#include <vector> -#include <cmath> - -// general athena stuff -#include "GaudiKernel/IToolSvc.h" - -//Gaudi -#include "GaudiKernel/ToolHandle.h" -#include "GaudiKernel/ServiceHandle.h" - -#include "AthenaBaseComps/AthAlgorithm.h" -///Local include(s) -#include "TrigMultiVarHypo/preprocessor/TrigRingerPreprocessor.h" -#include "TrigMultiVarHypo/discriminator/MultiLayerPerceptron.h" - -///xAOD include(s) -#include "xAODTrigCalo/TrigEMCluster.h" -#include "xAODTrigRinger/TrigRNNOutput.h" -#include "xAODTrigRinger/TrigRNNOutputContainer.h" -#include "xAODTrigRinger/TrigRingerRings.h" -#include "xAODTrigRinger/TrigRingerRingsContainer.h" - -#include "TrigTimeAlgs/TrigTimer.h" - -class TrigL2CaloRingerFexMT : public AthAlgorithm { - - public: - TrigL2CaloRingerFexMT(const std::string & name, ISvcLocator* pSvcLocator); - ~TrigL2CaloRingerFexMT(); - - StatusCode initialize(); - StatusCode finalize(); - StatusCode execute(); - - protected: - //Time monitoring - TrigTimer* m_storeTimer; - TrigTimer* m_normTimer; - TrigTimer* m_decisionTimer; - - - - private: - - //feature keys - Gaudi::Property<std::string> m_hlt_feature {this, "HltFeature", "TrigRingerNeuralFex", "..."}; - Gaudi::Property<std::string> m_feature {this, "Feature", "TrigRingerNeuralFex", "..."}; - - //Prepoc configuration - Gaudi::Property<std::vector<unsigned int>> m_normRings {this, "NormalisationRings", std::vector<unsigned int>(), "..." }; - Gaudi::Property<std::vector<unsigned int>> m_sectionRings {this, "SectionRings", std::vector<unsigned int>(), "..."}; - Gaudi::Property<std::vector<unsigned int>> m_nRings {this, "NRings", std::vector<unsigned int>(), "..." }; - - //Disriminator configuration - Gaudi::Property<std::vector<unsigned int>> m_nodes {this, "Nodes", std::vector<unsigned int>(), "..."}; - Gaudi::Property<std::vector<std::vector<double>>> m_weights {this, "Weights", std::vector<std::vector<double>>(), "..."}; - Gaudi::Property<std::vector<std::vector<double>>> m_bias {this, "Bias", std::vector<std::vector<double>>(), "..." }; - Gaudi::Property<std::vector<double>> m_threshold {this, "Threshold", std::vector<double>(), "..."}; - Gaudi::Property<std::vector<std::vector<double>>> m_etaBins {this, "EtaBins", std::vector<std::vector<double>>(), "..." }; - Gaudi::Property<std::vector<std::vector<double>>> m_etBins {this, "EtBins", std::vector<std::vector<double>>(), "..."}; - - bool configurationInvalid(); - - //Discriminator holder - std::vector<MultiLayerPerceptron*> m_discriminators; - //Pre-processing holder - std::vector<TrigRingerPreprocessor*> m_preproc; - - - unsigned m_nDiscr; - unsigned m_nPreproc; - float m_output; - - SG::ReadHandleKey<xAOD::TrigRingerRings> m_ringerShape { - this, - "CaloRingsKey", - "CaloRings", - "" - }; - - SG::WriteHandleKey<xAOD::TrigRNNOutput> m_outputKey { - this, - "RNNOutputKey", - "CaloRNNOutput", - "" - }; - -}; -- GitLab From 4b697ea82e85996a4ce474c5fc1778f1fbe6360c Mon Sep 17 00:00:00 2001 From: Marco Scodeggio <mscodegg@lxplus070.cern.ch> Date: Wed, 13 Jun 2018 14:51:45 +0200 Subject: [PATCH 131/562] ART Minor Bug Correction: Set correct maximum number of events for joboptions Former-commit-id: 1ac0f30abd18f5e45bbef483a1acbc91fd43dbda --- .../egammaValidation/share/egamma_art_checker_joboptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Reconstruction/egamma/egammaValidation/share/egamma_art_checker_joboptions.py b/Reconstruction/egamma/egammaValidation/share/egamma_art_checker_joboptions.py index 1931dc0a7df3..0acfb43ac0e4 100755 --- a/Reconstruction/egamma/egammaValidation/share/egamma_art_checker_joboptions.py +++ b/Reconstruction/egamma/egammaValidation/share/egamma_art_checker_joboptions.py @@ -20,7 +20,7 @@ job = CfgMgr.AthSequencer("AthAlgSeq") job += CfgMgr.EgammaMonitoring('MonitoringAlg', sampleType = particleType) -theApp.EvtMax = 100000 +theApp.EvtMax = 60000 outputFile = 'Nightly-monitoring_'+particleType+'.hist.root' -- GitLab From 67ba873716aaaaca5301b23440e55a17b89b12b7 Mon Sep 17 00:00:00 2001 From: Scott Snyder <scott.snyder@cern.ch> Date: Wed, 13 Jun 2018 18:32:53 +0000 Subject: [PATCH 132/562] CaloInterface+CaloTools: Make ICaloMBAverage methods const. Former-commit-id: 083ad1250518dfdb503d693d8d32b727eac4e7b1 --- .../CaloInterface/ICaloMBAverageTool.h | 13 ++++--------- Calorimeter/CaloTools/CaloTools/CaloMBAverageTool.h | 12 ++++++------ Calorimeter/CaloTools/src/CaloMBAverageTool.cxx | 6 +++--- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/Calorimeter/CaloInterface/CaloInterface/ICaloMBAverageTool.h b/Calorimeter/CaloInterface/CaloInterface/ICaloMBAverageTool.h index 4bc56e32da32..760217f6805a 100755 --- a/Calorimeter/CaloInterface/CaloInterface/ICaloMBAverageTool.h +++ b/Calorimeter/CaloInterface/CaloInterface/ICaloMBAverageTool.h @@ -16,19 +16,14 @@ class Identifier; class CaloDetDescrElement; class CaloCell; -class ICaloMBAverageTool: virtual public IAlgTool +class ICaloMBAverageTool : virtual public IAlgTool { public: + DeclareInterfaceID (ICaloMBAverageTool, 1, 0); - static const InterfaceID& interfaceID() { - static const InterfaceID IID_ICaloMBAverageTool("ICaloMBAverageTool", 1 , 0); - return IID_ICaloMBAverageTool; - } + virtual float average(const CaloCell* caloCell) const =0; - - virtual float average(const CaloCell* caloCell)=0; - - virtual float average(const CaloDetDescrElement* caloDDE, const CaloGain::CaloGain gain)=0; + virtual float average(const CaloDetDescrElement* caloDDE, const CaloGain::CaloGain gain) const =0; virtual StatusCode LoadCalibration(IOVSVC_CALLBACK_ARGS) = 0; diff --git a/Calorimeter/CaloTools/CaloTools/CaloMBAverageTool.h b/Calorimeter/CaloTools/CaloTools/CaloMBAverageTool.h index dc998594e2e2..3766d25ea9a9 100644 --- a/Calorimeter/CaloTools/CaloTools/CaloMBAverageTool.h +++ b/Calorimeter/CaloTools/CaloTools/CaloMBAverageTool.h @@ -30,8 +30,8 @@ class CaloDetDescrElement; #include "AthenaKernel/IOVSvcDefs.h" -class CaloMBAverageTool: public AthAlgTool, - virtual public ICaloMBAverageTool +class CaloMBAverageTool + : public extends<AthAlgTool, ICaloMBAverageTool> { private: //Database @@ -53,9 +53,9 @@ private: std::vector<float> m_shift; //Functions - StatusCode initialize(); + StatusCode initialize() override; - virtual StatusCode LoadCalibration(IOVSVC_CALLBACK_ARGS); + virtual StatusCode LoadCalibration(IOVSVC_CALLBACK_ARGS) override; public: @@ -64,9 +64,9 @@ public: const IInterface* parent); virtual ~CaloMBAverageTool(); - float average(const CaloCell* caloCell); + float average(const CaloCell* caloCell) const override; - float average(const CaloDetDescrElement* caloDDE,const CaloGain::CaloGain gain); + float average(const CaloDetDescrElement* caloDDE,const CaloGain::CaloGain gain) const override; }; diff --git a/Calorimeter/CaloTools/src/CaloMBAverageTool.cxx b/Calorimeter/CaloTools/src/CaloMBAverageTool.cxx index 354992b21c66..72dfde5030ec 100644 --- a/Calorimeter/CaloTools/src/CaloMBAverageTool.cxx +++ b/Calorimeter/CaloTools/src/CaloMBAverageTool.cxx @@ -12,7 +12,7 @@ CaloMBAverageTool::CaloMBAverageTool (const std::string& type, const std::string& name, const IInterface* parent) : - AthAlgTool(type, name, parent), + base_class(type, name, parent), m_OFCTool("LArOFCTool"), m_calo_id(nullptr), m_Nminbias(-1),m_deltaBunch(1),m_keyShape("LArShape"), m_keyfSampl("LArfSampl"), m_keyMinBiasAverage("LArMinBiasAverage"), @@ -150,7 +150,7 @@ StatusCode CaloMBAverageTool::LoadCalibration(IOVSVC_CALLBACK_ARGS_K(keys)) //------------------------------------------------- -float CaloMBAverageTool::average(const CaloCell* caloCell) +float CaloMBAverageTool::average(const CaloCell* caloCell) const { CaloGain::CaloGain igain = caloCell->gain(); return this->average(caloCell->caloDDE(),igain); @@ -159,7 +159,7 @@ float CaloMBAverageTool::average(const CaloCell* caloCell) //------------------------------------------------- -float CaloMBAverageTool::average(const CaloDetDescrElement* caloDDE,CaloGain::CaloGain gain) +float CaloMBAverageTool::average(const CaloDetDescrElement* caloDDE,CaloGain::CaloGain gain) const { const IdentifierHash idCaloHash = caloDDE->calo_hash(); int igain=static_cast<int>(gain); -- GitLab From b56a8eea870b244375ebec936f730f6ef42d839c Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Wed, 13 Jun 2018 22:08:17 +0200 Subject: [PATCH 133/562] AthenaPoolUtilities: Ignore dumps from CondInputLoader. When comparing with reference files, ignore diagnostic output from CondInputLoader. Former-commit-id: 37b0cb44a7e9a7fa39fe5ef6406bd295612648bf --- .../AthenaPOOL/AthenaPoolUtilities/share/post_tpcnvtest.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Database/AthenaPOOL/AthenaPoolUtilities/share/post_tpcnvtest.sh b/Database/AthenaPOOL/AthenaPoolUtilities/share/post_tpcnvtest.sh index bf1462b52318..3ed8b1dde070 100755 --- a/Database/AthenaPOOL/AthenaPoolUtilities/share/post_tpcnvtest.sh +++ b/Database/AthenaPOOL/AthenaPoolUtilities/share/post_tpcnvtest.sh @@ -236,6 +236,9 @@ PP="$PP"'|GeoModelSvc.*WARNING Getting .* with default tag' # Verbosity removed from TrackCollection in 22.0.1 PP="$PP"'|TrackCollectionCnv::initialize' +# Ignore dumps from CondInputLoader. +PP="$PP"'|ConditionStore\+/' + test=$1 if [ -z "$testStatus" ]; then -- GitLab From 279df8f743e4f4915f0f58607d322460537a2ec4 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Wed, 13 Jun 2018 16:21:07 +0200 Subject: [PATCH 134/562] CxxUtils: Add ATH_UNUSED_MEMBER to unused.h. Need a variant of ATH_UNUSED for this, since only clang recognizes the unused attribute for members. Former-commit-id: df92d09a2844883818e384b30dd58fdae9b9cd7d --- Control/CxxUtils/CxxUtils/unused.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Control/CxxUtils/CxxUtils/unused.h b/Control/CxxUtils/CxxUtils/unused.h index 017af025ed18..14e2a56d0abe 100644 --- a/Control/CxxUtils/CxxUtils/unused.h +++ b/Control/CxxUtils/CxxUtils/unused.h @@ -37,4 +37,13 @@ #endif +// Declare that a member is unused, to suppress warnings. +// Only clang recognizes an unused attribute for a member. +#ifdef __clang__ +# define ATH_UNUSED_MEMBER(v) v __attribute__((unused)) +#else +# define ATH_UNUSED_MEMBER(v) v +#endif + + #endif /* not CXXUTILS_UNUSED_H */ -- GitLab From 2f1acbd2bfcff0409b2aaaf3609f9247a82c1757 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Fri, 8 Jun 2018 14:52:26 +0200 Subject: [PATCH 135/562] AthenaDBTestRec: coverity 112797, 112808, 114221 Fix coverity warnings: unchecked return values memory leak (Code here is a standalone binary that uses stdio rather than MsgStream.) Former-commit-id: c4cb6b8650eba866117f829acd11498d1b73e63f --- .../AthenaDBTestRec/src/app/TestCoolRecWriter.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/AtlasTest/DatabaseTest/AthenaDBTestRec/src/app/TestCoolRecWriter.cxx b/AtlasTest/DatabaseTest/AthenaDBTestRec/src/app/TestCoolRecWriter.cxx index 9a5e2c5dc3c1..d1fba1dcbd39 100644 --- a/AtlasTest/DatabaseTest/AthenaDBTestRec/src/app/TestCoolRecWriter.cxx +++ b/AtlasTest/DatabaseTest/AthenaDBTestRec/src/app/TestCoolRecWriter.cxx @@ -578,12 +578,18 @@ bool TestCoolRecWriter::setupPool() { policy.setWriteModeForNonExisting(pool::DatabaseConnectionPolicy::CREATE); policy.setWriteModeForExisting(pool::DatabaseConnectionPolicy::UPDATE); m_persistencySvc->session().setDefaultConnectionPolicy(policy); - m_persistencySvc->session().transaction().start(pool::ITransaction::UPDATE); + if (!m_persistencySvc->session().transaction().start(pool::ITransaction::UPDATE)) { + std::cout << "TestCollRecWriter::setupPool: start fails." << std::endl; + return false; + } return true; } bool TestCoolRecWriter::finalizePool() { - m_persistencySvc->session().transaction().commit(); + if (!m_persistencySvc->session().transaction().commit()) { + std::cout << "TestCollRecWriter::finalizePool: commit fails." << std::endl; + return false; + } m_persistencySvc->session().disconnectAll(); m_poolcat->commit(); m_poolcat->disconnect(); @@ -605,6 +611,7 @@ void TestCoolRecWriter::setPoolPayload(const FolderInfo* folderi, Token *tok = m_persistencySvc->registerForWrite(*(folderi->poolplace()), data, pool::DbReflex::forTypeInfo(typeid(TestCoolRecPoolData)) ); // set payload data for COOL to Pool object reference payload["PoolRef"].setValue<std::string>( tok->toString() ); + delete tok; } -- GitLab From 588b52b5423710eedac9deb70f6b8237a45c3d99 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Fri, 8 Jun 2018 14:54:06 +0200 Subject: [PATCH 136/562] JetRec: Add missing test reference files. Add missing test reference files. Former-commit-id: d33d4bb15f66fe306523ced708263c9670f53a8d --- Reconstruction/Jet/JetRec/share/ExtractorUnitTests.ref | 10 ++++++++++ Reconstruction/Jet/JetRec/share/TestTests.ref | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 Reconstruction/Jet/JetRec/share/ExtractorUnitTests.ref create mode 100644 Reconstruction/Jet/JetRec/share/TestTests.ref diff --git a/Reconstruction/Jet/JetRec/share/ExtractorUnitTests.ref b/Reconstruction/Jet/JetRec/share/ExtractorUnitTests.ref new file mode 100644 index 000000000000..ed9f8df82646 --- /dev/null +++ b/Reconstruction/Jet/JetRec/share/ExtractorUnitTests.ref @@ -0,0 +1,10 @@ +[==========] Running 1 test from 1 test case. +[----------] Global test environment set-up. +[----------] 1 test from ExtractorTest +[ RUN ] ExtractorTest.addJet +[ OK ] ExtractorTest.addJet (0 ms) +[----------] 1 test from ExtractorTest (1 ms total) + +[----------] Global test environment tear-down +[==========] 1 test from 1 test case ran. (1 ms total) +[ PASSED ] 1 test. diff --git a/Reconstruction/Jet/JetRec/share/TestTests.ref b/Reconstruction/Jet/JetRec/share/TestTests.ref new file mode 100644 index 000000000000..a3d707bd886f --- /dev/null +++ b/Reconstruction/Jet/JetRec/share/TestTests.ref @@ -0,0 +1,10 @@ +[==========] Running 1 test from 1 test case. +[----------] Global test environment set-up. +[----------] 1 test from TestTest +[ RUN ] TestTest.test +[ OK ] TestTest.test (0 ms) +[----------] 1 test from TestTest (0 ms total) + +[----------] Global test environment tear-down +[==========] 1 test from 1 test case ran. (0 ms total) +[ PASSED ] 1 test. -- GitLab From dcf0044d70479bf76b30a5c39e72c27b6a44d6f5 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Wed, 13 Jun 2018 16:29:35 +0200 Subject: [PATCH 137/562] TrigDecisionTool: Fix clang warning. clang warning: unused variable. Former-commit-id: 61435f560f68c3d1bc3ac9e9a60fc2a069489a45 --- Trigger/TrigAnalysis/TrigDecisionTool/Root/CacheGlobalMemory.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/Root/CacheGlobalMemory.cxx b/Trigger/TrigAnalysis/TrigDecisionTool/Root/CacheGlobalMemory.cxx index 3c91afc99a74..3ea04e520a93 100644 --- a/Trigger/TrigAnalysis/TrigDecisionTool/Root/CacheGlobalMemory.cxx +++ b/Trigger/TrigAnalysis/TrigDecisionTool/Root/CacheGlobalMemory.cxx @@ -174,7 +174,6 @@ void Trig::CacheGlobalMemory::update(const TrigConf::HLTChainList* confChains, // -- assume that the groups and streams have all changed!!! m_groups.clear(); m_streams.clear(); - std::vector<std::string>::iterator gpIt; for(auto ch : *m_confChains) { if (( ch->level() == "EF" || ch->level() == "HLT") && ch->streams().size()>0 ) { -- GitLab From f9c2fa2673a3a95c8bdc0711b6e6cdf4539135c5 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Wed, 13 Jun 2018 16:29:53 +0200 Subject: [PATCH 138/562] MCTruthClassifier: Fix clang warning. clang warning: unused variable. Former-commit-id: ec2a70726bfa2effbe6671a7d6b47ace74257b21 --- PhysicsAnalysis/MCTruthClassifier/Root/MCTruthClassifier.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/PhysicsAnalysis/MCTruthClassifier/Root/MCTruthClassifier.cxx b/PhysicsAnalysis/MCTruthClassifier/Root/MCTruthClassifier.cxx index 8cee72ac0817..0389a6850786 100644 --- a/PhysicsAnalysis/MCTruthClassifier/Root/MCTruthClassifier.cxx +++ b/PhysicsAnalysis/MCTruthClassifier/Root/MCTruthClassifier.cxx @@ -521,7 +521,6 @@ MCTruthClassifier::particleTruthClassifier(const xAOD::Jet* jet, bool DR, ParticleType tempparttype = UnknownJet; std::set<const xAOD::TruthParticle*> allJetMothers; std::set<const xAOD::TruthParticle*> constituents; - std::pair<ParticleType,ParticleOrigin> res; if(!jet){ return std::make_pair(parttype,partorig); -- GitLab From 9b9c9de13ced561d8876b96e40f72f73a17f622e Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Wed, 13 Jun 2018 16:30:09 +0200 Subject: [PATCH 139/562] TileConditions: Fix use-after-delete error in unit tests. Fix use-after-delete error in unit tests: IdDictParser was being deleted too early. Fixes crash seen on Fedora 28. Also make test reference files more unique. Former-commit-id: 337784637f21305b9007416b60f433893b014adc --- .../share/TileCablingService_UpgradeABC_test.ref | 7 ++++--- .../TileConditions/share/TileCablingService_test.ref | 7 ++++--- .../test/TileCablingService_UpgradeABC_test.cxx | 7 +++++-- .../TileConditions/test/TileCablingService_common_test.cxx | 7 ++++--- .../TileConditions/test/TileCablingService_test.cxx | 4 +++- 5 files changed, 20 insertions(+), 12 deletions(-) diff --git a/TileCalorimeter/TileConditions/share/TileCablingService_UpgradeABC_test.ref b/TileCalorimeter/TileConditions/share/TileCablingService_UpgradeABC_test.ref index 37d1a9cd1b44..a2a224a8acb4 100644 --- a/TileCalorimeter/TileConditions/share/TileCablingService_UpgradeABC_test.ref +++ b/TileCalorimeter/TileConditions/share/TileCablingService_UpgradeABC_test.ref @@ -5,11 +5,11 @@ JobOptionsSvc INFO Job options successfully read in from ./TileCablingSer ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99) - running on karma on Tue May 30 22:31:26 2017 + running on karma on Tue Jun 12 15:50:53 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : StoreGate ApplicationMgr INFO Application Manager Configured successfully -ClassIDSvc INFO getRegistryEntries: read 4060 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 4202 CLIDRegistry entries for module ALL StoreGateSvc DEBUG Property update for OutputLevel : new value = 2 StoreGateSvc DEBUG Service base class initialized successfully StoreGateSvc DEBUG trying to create store SGImplSvc/StoreGateSvc_Impl @@ -20,6 +20,7 @@ EventLoopMgr WARNING No events will be processed from external input. HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready +TileCablingService_UpgradeABC_test test1 TileHWID INFO initialize_from_dictionary AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 @@ -41,7 +42,7 @@ AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionar AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! AtlasDetectorID DEBUG Could not get value for label 'no_side' of field 'DetZside' in dictionary Calorimeter AtlasDetectorID::initialize_from_dictionary - OK -ClassIDSvc INFO getRegistryEntries: read 364 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 372 CLIDRegistry entries for module ALL SW MAX CELLS: 12224 SW MAX PMT: 23424 SW MAX ADC: 46336 diff --git a/TileCalorimeter/TileConditions/share/TileCablingService_test.ref b/TileCalorimeter/TileConditions/share/TileCablingService_test.ref index 0bd3aec7590c..f9d4b7b21eb8 100644 --- a/TileCalorimeter/TileConditions/share/TileCablingService_test.ref +++ b/TileCalorimeter/TileConditions/share/TileCablingService_test.ref @@ -5,11 +5,11 @@ JobOptionsSvc INFO Job options successfully read in from ./TileCablingSer ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99) - running on karma on Tue May 30 22:32:12 2017 + running on karma on Tue Jun 12 15:51:41 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : StoreGate ApplicationMgr INFO Application Manager Configured successfully -ClassIDSvc INFO getRegistryEntries: read 4060 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 4202 CLIDRegistry entries for module ALL StoreGateSvc DEBUG Property update for OutputLevel : new value = 2 StoreGateSvc DEBUG Service base class initialized successfully StoreGateSvc DEBUG trying to create store SGImplSvc/StoreGateSvc_Impl @@ -20,6 +20,7 @@ EventLoopMgr WARNING No events will be processed from external input. HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready +TileCablingService_test test1 TileHWID INFO initialize_from_dictionary AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 @@ -41,7 +42,7 @@ AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionar AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! AtlasDetectorID DEBUG Could not get value for label 'no_side' of field 'DetZside' in dictionary Calorimeter AtlasDetectorID::initialize_from_dictionary - OK -ClassIDSvc INFO getRegistryEntries: read 364 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 372 CLIDRegistry entries for module ALL SW MAX CELLS: 5184 SW MAX PMT: 9856 SW MAX ADC: 19712 diff --git a/TileCalorimeter/TileConditions/test/TileCablingService_UpgradeABC_test.cxx b/TileCalorimeter/TileConditions/test/TileCablingService_UpgradeABC_test.cxx index 14abd33876b4..0dfcf5d3541b 100644 --- a/TileCalorimeter/TileConditions/test/TileCablingService_UpgradeABC_test.cxx +++ b/TileCalorimeter/TileConditions/test/TileCablingService_UpgradeABC_test.cxx @@ -17,8 +17,10 @@ void test1() { std::cout << "test1\n"; - TileCablingSvc::init_idhelpers("IdDictTileCalorimeter-upgradeABC.xml", - TileCablingService::UpgradeABC); + IdDictParser parser; + TileCablingSvc::init_idhelpers (parser, + "IdDictTileCalorimeter-upgradeABC.xml", + TileCablingService::UpgradeABC); TileCablingService* cabling = TileCablingService::getInstance(); @@ -191,6 +193,7 @@ int main(int /*argc*/, char** argv) { Athena_test::setupStoreGate (argv[0]); + std::cout << "TileCablingService_UpgradeABC_test\n"; test1(); return 0; diff --git a/TileCalorimeter/TileConditions/test/TileCablingService_common_test.cxx b/TileCalorimeter/TileConditions/test/TileCablingService_common_test.cxx index 4b3eebd43ad5..31dce7430a10 100644 --- a/TileCalorimeter/TileConditions/test/TileCablingService_common_test.cxx +++ b/TileCalorimeter/TileConditions/test/TileCablingService_common_test.cxx @@ -33,15 +33,16 @@ class TileCablingSvc { public: - static void init_idhelpers(std::string idDictFile = "IdDictTileCalorimeter.xml", - TileCablingService::TileCablingType cablingType = TileCablingService::RUN2aCabling) { + static void init_idhelpers (IdDictParser& parser, + std::string idDictFile = "IdDictTileCalorimeter.xml", + TileCablingService::TileCablingType cablingType = TileCablingService::RUN2aCabling) + { TileHWID* tileHWID = new TileHWID(); TileID* tileID = new TileID(); TileTBID* tileTBID = new TileTBID(); tileID->set_do_neighbours (false); - IdDictParser parser; parser.register_external_entity ("TileCalorimeter", idDictFile); IdDictMgr& idd = parser.parse ("IdDictParser/ATLAS_IDS.xml"); assert (tileHWID->initialize_from_dictionary (idd) == 0); diff --git a/TileCalorimeter/TileConditions/test/TileCablingService_test.cxx b/TileCalorimeter/TileConditions/test/TileCablingService_test.cxx index 57286a35096c..51feb5f74161 100644 --- a/TileCalorimeter/TileConditions/test/TileCablingService_test.cxx +++ b/TileCalorimeter/TileConditions/test/TileCablingService_test.cxx @@ -15,7 +15,8 @@ void test1() { std::cout << "test1\n"; - TileCablingSvc::init_idhelpers(); + IdDictParser parser; + TileCablingSvc::init_idhelpers (parser); TileCablingService* cabling = TileCablingService::getInstance(); @@ -141,6 +142,7 @@ int main(int /*argc*/, char** argv) { Athena_test::setupStoreGate (argv[0]); + std::cout << "TileCablingService_test\n"; test1(); return 0; -- GitLab From 960c4b71c720ab7c5ee8135133423e8726a804fc Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Wed, 13 Jun 2018 16:31:21 +0200 Subject: [PATCH 140/562] IOVDbTestAlg: Remove unneeded printouts from post-test script. Remove unneeded printouts from post-test script. Former-commit-id: c83f25cc7e5a9a5b00f5ce5dcc4d86829b371334 --- .../IOVDbTestAlg/test/post_check_with_select.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/AtlasTest/DatabaseTest/IOVDbTestAlg/test/post_check_with_select.sh b/AtlasTest/DatabaseTest/IOVDbTestAlg/test/post_check_with_select.sh index b3ea00f45d69..71a81dd30fd2 100755 --- a/AtlasTest/DatabaseTest/IOVDbTestAlg/test/post_check_with_select.sh +++ b/AtlasTest/DatabaseTest/IOVDbTestAlg/test/post_check_with_select.sh @@ -21,7 +21,7 @@ select=$2 joblog=${test}.log # if [ "$status" = 0 ] # then - echo "[92;1m post.sh> OK: ${test} exited normally. Output is in $joblog [m" + #echo "[92;1m post.sh> OK: ${test} exited normally. Output is in $joblog [m" reflog=../share/${test}.ref # If we can't find the reference file, maybe it's located outside @@ -126,7 +126,8 @@ select=$2 echo "[97;101;1m post.sh> ERROR: $joblog and $reflog differ [m" exit 1 else - echo "[92;1m post.sh> OK: $joblog and $reflog identical [m" + true + #echo "[92;1m post.sh> OK: $joblog and $reflog identical [m" fi else tail $joblog @@ -143,7 +144,7 @@ select=$2 # Check output for ERROR/FATAL joblog=${test}.log -echo +#echo exit $status -- GitLab From adf04c0848ad9de488a2fa2c3f2702a09f75f334 Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Wed, 13 Jun 2018 20:21:33 +0000 Subject: [PATCH 141/562] Merge branch '21.0-InDetART-scripts' into '21.0' ART scripts for the InDETPerformanceRTT package now run Root to produce pngs from the output histogram file See merge request atlas/athena!11975 (cherry picked from commit 58942ca94a0d9c4dc8c9c3ee622a3981277de6d8 [formerly 821d062b1109b6dc31bb12bf3ae2d1f194ad7621]) 0eba0f58 ART scripts will now run Root to produce pngs from the output histogram file Former-commit-id: f8604b2e679e7c97c6437adbd8fd7c8d252776c3 --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../test/test_InDetPerformanceRTT_Ele100IDPRTT.sh | 6 ++++-- .../test/test_InDetPerformanceRTT_Ele1IDPRTT.sh | 4 ++++ .../test/test_InDetPerformanceRTT_MinBiasIDPRTT.sh | 4 ++++ .../test/test_InDetPerformanceRTT_Mu100IDPRTT.sh | 5 +++++ .../test/test_InDetPerformanceRTT_Pi100IDPRTT.sh | 4 ++++ .../test/test_InDetPerformanceRTT_Pi1IDPRTT.sh | 4 ++++ .../test/test_InDetPerformanceRTT_ZtomumuIDPRTT.sh | 4 ++++ .../test/test_InDetPerformanceRTT_ZtomumuPileupIDPRTT.sh | 4 ++++ .../test/test_InDetPerformanceRTT_mu1GeV.sh | 5 ++++- .../test/test_InDetPerformanceRTT_ttbar.sh | 4 ++++ 11 files changed, 41 insertions(+), 3 deletions(-) mode change 100755 => 100644 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100755 new mode 100644 diff --git a/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_Ele100IDPRTT.sh b/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_Ele100IDPRTT.sh index 0ab0015bfe69..8f79c32f6d78 100755 --- a/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_Ele100IDPRTT.sh +++ b/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_Ele100IDPRTT.sh @@ -8,6 +8,7 @@ # art-output: *.root # art-output: *.xml # art-output: dcube +# art-output: *.png fileList="['${ArtInFile//,/', '}']" echo "List of files = ", $fileList @@ -27,5 +28,6 @@ dcubeRef="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPerformanceRTT/ bash /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube $dcubeName InDetStandardPlots.root $dcubeXml $dcubeRef echo "art-result: $? plot" - - +plotmacro="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPerformanceRTT/scripts/makeplots.C" +root -b -q $plotmacro +echo "art-result: $? root" diff --git a/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_Ele1IDPRTT.sh b/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_Ele1IDPRTT.sh index 768c2455faf4..53a33fdd7ad0 100755 --- a/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_Ele1IDPRTT.sh +++ b/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_Ele1IDPRTT.sh @@ -8,6 +8,7 @@ # art-output: *.root # art-output: *.xml # art-output: dcube +# art-output: *.png fileList="['${ArtInFile//,/', '}']" echo "List of files = ", $fileList @@ -26,3 +27,6 @@ dcubeRef="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPerformanceRTT/ bash /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube $dcubeName InDetStandardPlots.root $dcubeXml $dcubeRef echo "art-result: $? plot" +plotmacro="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPerformanceRTT/scripts/makeplots.C" +root -b -q $plotmacro +echo "art-result: $? root" diff --git a/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_MinBiasIDPRTT.sh b/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_MinBiasIDPRTT.sh index 3c6021bd1a33..d08160d0a7fd 100755 --- a/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_MinBiasIDPRTT.sh +++ b/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_MinBiasIDPRTT.sh @@ -8,6 +8,7 @@ # art-output: *.root # art-output: *.xml # art-output: dcube +# art-output: *.png fileList="['${ArtInFile//,/', '}']" echo "List of files = ", $fileList @@ -27,3 +28,6 @@ dcubeRef="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPerformanceRTT/ bash /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube $dcubeName InDetStandardPlots.root $dcubeXml $dcubeRef echo "art-result: $? plot" +plotmacro="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPerformanceRTT/scripts/makeplots.C" +root -b -q $plotmacro +echo "art-result: $? root" diff --git a/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_Mu100IDPRTT.sh b/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_Mu100IDPRTT.sh index 9f6d0e350f6b..e70619c2b881 100755 --- a/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_Mu100IDPRTT.sh +++ b/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_Mu100IDPRTT.sh @@ -8,6 +8,7 @@ # art-output: *.root # art-output: *.xml # art-output: dcube +# art-output: *.png fileList="['${ArtInFile//,/', '}']" echo "List of files = ", $fileList @@ -27,3 +28,7 @@ dcubeRef="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPerformanceRTT/ bash /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube $dcubeName InDetStandardPlots.root $dcubeXml $dcubeRef echo "art-result: $? plot" +plotmacro="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPerformanceRTT/scripts/makeplots.C" +root -b -q $plotmacro +echo "art-result: $? root" + diff --git a/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_Pi100IDPRTT.sh b/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_Pi100IDPRTT.sh index c9be97010da1..6e9e30f1d89a 100755 --- a/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_Pi100IDPRTT.sh +++ b/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_Pi100IDPRTT.sh @@ -8,6 +8,7 @@ # art-output: *.root # art-output: *.xml # art-output: dcube +# art-output: *.png fileList="['${ArtInFile//,/', '}']" echo "List of files = ", $fileList @@ -28,3 +29,6 @@ dcubeRef="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPerformanceRTT/ bash /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube $dcubeName InDetStandardPlots.root $dcubeXml $dcubeRef echo "art-result: $? plot" +plotmacro="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPerformanceRTT/scripts/makeplots.C" +root -b -q $plotmacro +echo "art-result: $? root" diff --git a/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_Pi1IDPRTT.sh b/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_Pi1IDPRTT.sh index f82b39e2c827..35b7c5d0e6c1 100755 --- a/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_Pi1IDPRTT.sh +++ b/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_Pi1IDPRTT.sh @@ -8,6 +8,7 @@ # art-output: *.root # art-output: *.xml # art-output: dcube +# art-output: *.png fileList="['${ArtInFile//,/', '}']" echo "List of files = ", $fileList @@ -28,3 +29,6 @@ bash /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube $dcubeName InDetStanda bash /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube "Pi1" "InDetStandardPlots-SinglePi1000.root" echo "art-result: $? plot" +plotmacro="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPerformanceRTT/scripts/makeplots.C" +root -b -q $plotmacro +echo "art-result: $? root" diff --git a/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_ZtomumuIDPRTT.sh b/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_ZtomumuIDPRTT.sh index 54603f81dd81..9dabb109e464 100755 --- a/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_ZtomumuIDPRTT.sh +++ b/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_ZtomumuIDPRTT.sh @@ -8,6 +8,7 @@ # art-output: *.root # art-output: *.xml # art-output: dcube +# art-output: *.png fileList="['${ArtInFile//,/', '}']" echo "List of files = ", $fileList @@ -27,3 +28,6 @@ dcubeRef="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPerformanceRTT/ bash /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube $dcubeName InDetStandardPlots.root $dcubeXml $dcubeRef echo "art-result: $? plot" +plotmacro="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPerformanceRTT/scripts/makeplots.C" +root -b -q $plotmacro +echo "art-result: $? root" diff --git a/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_ZtomumuPileupIDPRTT.sh b/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_ZtomumuPileupIDPRTT.sh index 7c14af3db127..7ade0d78ccea 100755 --- a/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_ZtomumuPileupIDPRTT.sh +++ b/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_ZtomumuPileupIDPRTT.sh @@ -8,6 +8,7 @@ # art-output: *.root # art-output: *.xml # art-output: dcube +# art-output: *.png fileList="['${ArtInFile//,/', '}']" echo "List of files = ", $fileList @@ -27,3 +28,6 @@ dcubeRef="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPerformanceRTT/ bash /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube $dcubeName InDetStandardPlots.root $dcubeXml $dcubeRef echo "art-result: $? plot" +plotmacro="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPerformanceRTT/scripts/makeplots.C" +root -b -q $plotmacro +echo "art-result: $? root" diff --git a/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_mu1GeV.sh b/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_mu1GeV.sh index 347327d65cc7..d252506cc9f3 100755 --- a/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_mu1GeV.sh +++ b/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_mu1GeV.sh @@ -8,7 +8,7 @@ # art-output: *.root # art-output: *.xml # art-output: dcube - +# art-output: *.png fileList="['${ArtInFile//,/', '}']" echo "List of files = ", $fileList @@ -28,3 +28,6 @@ dcubeRef="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPerformanceRTT/ bash /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube $dcubeName InDetStandardPlots.root $dcubeXml $dcubeRef echo "art-result: $? plot" +plotmacro="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPerformanceRTT/scripts/makeplots.C" +root -b -q $plotmacro +echo "art-result: $? root" diff --git a/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_ttbar.sh b/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_ttbar.sh index aaa35f73a33e..993fcae9f748 100755 --- a/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_ttbar.sh +++ b/InnerDetector/InDetValidation/InDetPerformanceRTT/test/test_InDetPerformanceRTT_ttbar.sh @@ -8,6 +8,7 @@ # art-output: *.root # art-output: *.xml # art-output: dcube +# art-output: *.png fileList="['${ArtInFile//,/', '}']" echo "List of files = ", $fileList @@ -26,3 +27,6 @@ dcubeRef="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPerformanceRTT/ bash /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube $dcubeName InDetStandardPlots.root $dcubeXml $dcubeRef echo "art-result: $? plot" +plotmacro="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPerformanceRTT/scripts/makeplots.C" +root -b -q $plotmacro +echo "art-result: $? root" -- GitLab From c82982a4d53c405d93aa8ba998486e5dcc4ad6e1 Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Wed, 13 Jun 2018 20:11:56 +0000 Subject: [PATCH 142/562] Merge branch '21.0-trtmonhitrequpdate' into '21.0' Increasing minimum hit requirements of silicon and pixel as 3 and 1 respectively. See merge request atlas/athena!11866 (cherry picked from commit 5cbe56ab2c6dfb91d9265e68407129c3de250377 [formerly 45154d4c26f9b89c10dd60c3bac283cb48a05f32]) 00787e9c Increasing minimum hit requirements of silicon and pixel as 3 and 1 respectively. Former-commit-id: 221ac099645664c4ef792c5e7edf3817d991eb40 --- .../InDetRecExample/share/InDetMonitoringTRT.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringTRT.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringTRT.py index 99d9f4a99af8..293e278eb60c 100644 --- a/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringTRT.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringTRT.py @@ -19,7 +19,7 @@ if jobproperties.Beam.beamType() == "collisions": minTrkPtCut = 2.0 * Units.GeV ### at least one silicon detector must be on to require silicon hits if DetFlags.pixel_on() or DetFlags.SCT_on(): - minSiHitCut = 1 + minSiHitCut = 3 else: # both silicon detectors are off, we cannot require hits minSiHitCut = 0 else: # no track quality cuts for cosmics or single beams @@ -76,8 +76,8 @@ InDetTRT_Monitoring_Tool = TRT_Monitoring_Tool (name = " max_abs_eta = 2.5, MinTrackP = 0.0 * Units.GeV, min_pT = minTrkPtCut, # default = 0.5 GeV - min_si_hits = minSiHitCut, # default = 1 - min_pixel_hits = 0, + min_si_hits = minSiHitCut, # default = 3 + min_pixel_hits = 1, min_sct_hits = 0, min_trt_hits = 10 ) -- GitLab From 67a7fc7d8fe79e79b2ea559ee7447944b9610bfd Mon Sep 17 00:00:00 2001 From: Olga Igonkina <olga.igonkina@cern.ch> Date: Wed, 13 Jun 2018 18:49:03 +0000 Subject: [PATCH 143/562] Merge branch 'TrigP1Test_timeout' into '21.1' fix for timeout in TrigP1Test (ATR-18309) See merge request atlas/athena!12095 (cherry picked from commit 18be38a172029e2e5a70962fd869c95fedb96284 [formerly 8f04aa8525a79f6b48d9116cc0b87decee96bf27]) dfddb29c Update test_HLT_physicsV7_COS_2016IDCOSMICS_build.sh 43c808bd Update test_HLT_physicsV7_DataScouting_build.sh Former-commit-id: 730d71108eaf2d906ac74d61425e259a9b645947 --- .../test/test_HLT_physicsV7_COS_2016IDCOSMICS_build.sh | 2 +- .../TrigP1Test/test/test_HLT_physicsV7_DataScouting_build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_HLT_physicsV7_COS_2016IDCOSMICS_build.sh b/Trigger/TrigValidation/TrigP1Test/test/test_HLT_physicsV7_COS_2016IDCOSMICS_build.sh index 653f81a96971..3815fa114389 100755 --- a/Trigger/TrigValidation/TrigP1Test/test/test_HLT_physicsV7_COS_2016IDCOSMICS_build.sh +++ b/Trigger/TrigValidation/TrigP1Test/test/test_HLT_physicsV7_COS_2016IDCOSMICS_build.sh @@ -16,7 +16,7 @@ fi export NAME=HLT_physicsV7_COS_2016IDCOSMICS export JOB_LOG="${NAME}.log" -timeout 30m trigtest_ART.pl --cleardir --test ${NAME} --rundir ${NAME} --conf TrigP1Test_ART.conf | tee ${JOB_LOG} +timeout 100m trigtest_ART.pl --cleardir --test ${NAME} --rundir ${NAME} --conf TrigP1Test_ART.conf | tee ${JOB_LOG} ATH_RETURN=${PIPESTATUS[0]} echo "art-result: ${ATH_RETURN} ${NAME}" diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_HLT_physicsV7_DataScouting_build.sh b/Trigger/TrigValidation/TrigP1Test/test/test_HLT_physicsV7_DataScouting_build.sh index 9b89fbd63527..951fbd65cd21 100755 --- a/Trigger/TrigValidation/TrigP1Test/test/test_HLT_physicsV7_DataScouting_build.sh +++ b/Trigger/TrigValidation/TrigP1Test/test/test_HLT_physicsV7_DataScouting_build.sh @@ -16,7 +16,7 @@ fi export NAME=HLT_physicsV7_DataScouting export JOB_LOG="${NAME}.log" -timeout 20m trigtest_ART.pl --cleardir --test ${NAME} --rundir ${NAME} --conf TrigP1Test_ART.conf | tee ${JOB_LOG} +timeout 100m trigtest_ART.pl --cleardir --test ${NAME} --rundir ${NAME} --conf TrigP1Test_ART.conf | tee ${JOB_LOG} ATH_RETURN=${PIPESTATUS[0]} echo "art-result: ${ATH_RETURN} ${NAME}" -- GitLab From e17323a30a6d2c4d40c67b857d73f9bf4878d69f Mon Sep 17 00:00:00 2001 From: amorley <anthony.morley@cern.ch> Date: Thu, 14 Jun 2018 07:28:52 +0200 Subject: [PATCH 144/562] Remove MA27 and clean up private member variables Conflicts: Tracking/TrkAlignment/TrkAlgebraUtils/src/AlMat.cxx Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx Tracking/TrkAlignment/TrkAlgebraUtils/src/AlVec.cxx Tracking/TrkAlignment/TrkAlignGenTools/src/MatrixTool.cxx Former-commit-id: f35ef385678ab802293b580d4d4075a0b70cb06e --- .../TrkAlgebraUtils/CMakeLists.txt | 5 +- .../TrkAlgebraUtils/AlSpaMat.h | 2 +- .../TrkAlgebraUtils/src/AlSpaMat.cxx | 150 ++++++++---------- .../TrkAlgebraUtils/src/AlVec.cxx | 1 - .../TrkAlignGenTools/MatrixTool.h | 6 +- .../TrkAlignGenTools/src/MatrixTool.cxx | 24 +-- 6 files changed, 81 insertions(+), 107 deletions(-) diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/CMakeLists.txt b/Tracking/TrkAlignment/TrkAlgebraUtils/CMakeLists.txt index e280a0e1f104..ba679e0f1e15 100644 --- a/Tracking/TrkAlignment/TrkAlgebraUtils/CMakeLists.txt +++ b/Tracking/TrkAlignment/TrkAlgebraUtils/CMakeLists.txt @@ -12,6 +12,7 @@ atlas_depends_on_subdirs( PRIVATE # External dependencies: find_package( LAPACK ) +find_package( Eigen ) find_package( ROOT COMPONENTS Core Matrix Tree MathCore Hist RIO pthread ) # Component(s) in the package: @@ -19,6 +20,6 @@ atlas_add_library( TrkAlgebraUtils src/*.cxx ***REMOVED***/*.f PUBLIC_HEADERS TrkAlgebraUtils - PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${LAPACK_INCLUDE_DIRS} - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${LAPACK_LIBRARIES} GaudiKernel ) + PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${LAPACK_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} + PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${LAPACK_LIBRARIES} ${EIGEN_LIBRARIES} GaudiKernel ) diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlSpaMat.h b/Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlSpaMat.h index 7bd363d518eb..33643d30366a 100644 --- a/Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlSpaMat.h +++ b/Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlSpaMat.h @@ -50,7 +50,7 @@ class AlSpaMat : public AlSymMatBase { virtual AlSpaMat& operator*=(const double&); // ADVANCED: - int ***REMOVED***Solve(AlVec& RHS); + int SolveWithEigen(AlVec& RHS); virtual void RemoveModule( int); virtual void RemoveAlignPar(int, int); virtual void RemoveDoF( int, int nelem=1); diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx index 7a9dde91cce6..aded59fd3919 100644 --- a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx +++ b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx @@ -22,23 +22,9 @@ #include <TMatrixDSparse.h> -extern"C" { - void ma27id_(int ICNTL[],double CNTL[]); - void ma27ad_(int *N,int *NZ,int IRN[],int ICN[], - int IW[],int *LIW,int IKEEP[],int IW1p[], - int *NSTEPS,int *IFLAG,int ICNTL[],double CNTL[], - int INFO[],double *OPS); - - void ma27bd_(int *N,int *NZ,int IRN[],int ICN[], - double A[],int *LA,int IW[],int *LIW,int IKEEP[], - int *NSTEPS,int *MAXFRT, int IW1[],int ICNTL[], - double CNTL[], int INFO[]); - - void ma27cd_(int *N, double A[],int *LA,int IW[],int *LIW, - double W[],int *MAXFRT,double RHS[],int IW1[],int *NSTEPS, - int ICNTL[], int INFO[]); -} +#include <Eigen/Core> +#include <Eigen/IterativeLinearSolvers> namespace Trk { @@ -445,95 +431,83 @@ double AlSpaMat::determinant() return deter; } -//______________________________________________________________________________ -int AlSpaMat::***REMOVED***Solve(AlVec& RHS) -{ - int ICNTL[30]; - double CNTL[5]; - ma27id_(ICNTL,CNTL); - - double* ptr_data = new double[m_nele]; - m_ptr_row = new int[m_nele]; - m_ptr_col = new int[m_nele]; - - int Size(m_size); - int Nele(m_nele); - - //Convert Storage System +int AlSpaMat::SolveWithEigen(AlVec& RHS){ + + if(RHS.size() != size() ){ + std::cerr << "AlSpaMat::SolveWithEigen vector size is incorrect" << std::endl; + return 10; + } + + Eigen::VectorXd eigenBigVector( RHS.size() ); + for(int i(0); i< RHS.size(); ++i ){ + eigenBigVector[i] = RHS[i]; + } + Eigen::SparseMatrix<double> eigenBigMatrix( m_size, m_size ); + + typedef Eigen::Triplet<double> Triplet; + std::vector<Triplet> tripletList; + tripletList.reserve(m_nele); long int i, j; long int counter(0); mapiterator pos; for (pos = m_ptr_map.begin(); pos!=m_ptr_map.end(); pos++){ elem(pos->first, i, j); - *(ptr_data+counter)=pos->second; - *(m_ptr_row+counter)= i+1; - *(m_ptr_col+counter)= j+1; + tripletList.push_back(Triplet(i,j,pos->second)); + if(i!=j) tripletList.push_back(Triplet(j,i,pos->second)); counter++; } + eigenBigMatrix.setFromTriplets(tripletList.begin(), tripletList.end()); + std::cout << "AlSpaMat::SolveWithEigen: Matrix and vector created now solving" << std::endl; - int LIW =3/2*(2*Nele+3*Size+1); - int* IW = new int[LIW]; - int* IKEEP = new int[3*Size]; - int* IW1 = new int[2*Size]; - int NSTEPS; - int IFLAG = 0; - int INFO[20]; - double OPS; - - ma27ad_(&Size, &Nele,m_ptr_row,m_ptr_col, - IW,&LIW,IKEEP,IW1, - &NSTEPS,&IFLAG,ICNTL,CNTL, - INFO,&OPS); - - int MAXFRT; - int LA =2*INFO[4]; + // Eigen::CholmodSupernodalLLT is much much quicker (x50) so it would be great to move to that in the future + // requires an external package SuiteSparse + // BiCGSTAB was the fastest iterative solver in Eigen from a quick test + // SimplicialLDLT was the fastest direct solver in Eigen (x2 slower than BiCGSTAB ) - double* TempA = new double[Nele]; - for (int i=0; i<Nele ;i++) - *(TempA+i) = *(ptr_data+i); + Eigen::BiCGSTAB<Eigen::SparseMatrix<double> > solver; - delete [] ptr_data; - ptr_data = new double[LA]; - - for (int i=0; i<LA ;i++) - *(ptr_data+i)=0; - - for (int i=0; i<Nele ;i++) - *(ptr_data+i)= *(TempA+i); - - delete [] TempA; - - ma27bd_(&Size,&Nele,m_ptr_row,m_ptr_col, - ptr_data,&LA,IW,&LIW,IKEEP, - &NSTEPS,&MAXFRT,IW1,ICNTL, - CNTL,INFO); - - double* W =new double[MAXFRT]; + solver.compute(eigenBigMatrix); + if(solver.info()!=Eigen::Success) { + // decomposition failed + std::cout << "AlSpaMat::SolveWithEigen: failed to compute: -- is your matrix singular?" << std::endl; + return 1; + } else { + std::cout << "AlSpaMat::SolveWithEigen: Finished compute now solving" << std::endl; + } + Eigen::VectorXd x = solver.solve( eigenBigVector ); + if(solver.info()!=Eigen::Success) { + // solving failed + std::cout << "AlSpaMat::SolveWithEigen: Failed to solve: -- is your matrix singular? " << std::endl; + return 2; + }else { + std::cout << "AlSpaMat::SolveWithEigen: Finished solving" << std::endl; + } + + //Copy results into vector + for(int i(0); i< RHS.size(); ++i ){ + RHS[i] = x[i]; + } - double* RHStemp =new double[Size]; - for (int i=0; i<Size; i++) - RHStemp[i] = RHS[i]; + //Check accuracy + Eigen::VectorXd residual = eigenBigMatrix * x - eigenBigVector; + double sumresidual = 0; + for( int i=0; i<residual.size(); ++i){ + sumresidual += fabs(residual[i]); + } + + std::cout << "AlSpaMat::SolveWithEigen: residual of solution is " << sumresidual << std::endl; + if( sumresidual > 1e-10 ){ + std::cout << "AlSpaMat::SolveWithEigen: WARNING your solution is not very good!" << std::endl; + return 3; + } - ma27cd_(&Size, ptr_data,&LA,IW,&LIW, - W,&MAXFRT,RHStemp,IW1,&NSTEPS, - ICNTL,INFO); + return 0; - for (int i=0; i<Size; i++) - RHS[i] = RHStemp[i]; - delete [] RHStemp; - delete [] IW; - delete [] IKEEP; - delete [] IW1; - delete [] W; +} - delete [] ptr_data; ptr_data=NULL; - delete [] m_ptr_row; m_ptr_row=NULL; - delete [] m_ptr_col; m_ptr_col=NULL; - return INFO[0]; -} //______________________________________________________________________________ //jlove int AlSpaMat::diagonalize(char jobz, AlVec& w, AlMat& z) { diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlVec.cxx b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlVec.cxx index 4f6346721bdf..b42c147e8926 100644 --- a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlVec.cxx +++ b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlVec.cxx @@ -224,7 +224,6 @@ void AlVec::reSize(int Nnew) { m_ptr_data = new double[Nnew]; m_size = Nnew; int k = m_size <= size_old ? m_size : size_old; - p += k; double* q = m_ptr_data + k; while (q > m_ptr_data) *(--q) = *(--p); diff --git a/Tracking/TrkAlignment/TrkAlignGenTools/TrkAlignGenTools/MatrixTool.h b/Tracking/TrkAlignment/TrkAlignGenTools/TrkAlignGenTools/MatrixTool.h index f3e963d6abe9..ff84d8727a2a 100644 --- a/Tracking/TrkAlignment/TrkAlignGenTools/TrkAlignGenTools/MatrixTool.h +++ b/Tracking/TrkAlignment/TrkAlignGenTools/TrkAlignGenTools/MatrixTool.h @@ -58,9 +58,9 @@ namespace Trk { enum SolveOption { NONE = 0, //!< not solve in any case (to be used when ipc) SOLVE = 1, //!< solving after data accumulation (LAPACK) - SOLVE_FAST = 2, //!< Fast (***REMOVED*** method) solving after data accumulation + SOLVE_FAST = 2, //!< Fast (Eigen method) solving after data accumulation DIRECT_SOLVE = 3, //!< direct solving (LAPACK), already available matrix & vector - DIRECT_SOLVE_FAST = 4, //!< direct Fast (***REMOVED*** method) solving, already available matrix & vector + DIRECT_SOLVE_FAST = 4, //!< direct Fast (Eigen method) solving, already available matrix & vector DIRECT_SOLVE_CLUSTER = 5, //!< computation of alignment parameters from SCALAPAK already solved matrix SOLVE_ROOT = 6, //!< computation using ROOT SOLVE_CLHEP = 7 //!< computation using CLHEP @@ -128,7 +128,7 @@ namespace Trk { int solveROOT(); int solveCLHEP(); int solveLapack(); - int solve***REMOVED***(); + int solveSparseEigen(); int solveLocal(); StatusCode spuriousRemoval(); diff --git a/Tracking/TrkAlignment/TrkAlignGenTools/src/MatrixTool.cxx b/Tracking/TrkAlignment/TrkAlignGenTools/src/MatrixTool.cxx index ac3eff5ace29..b497e4b94f39 100644 --- a/Tracking/TrkAlignment/TrkAlignGenTools/src/MatrixTool.cxx +++ b/Tracking/TrkAlignment/TrkAlignGenTools/src/MatrixTool.cxx @@ -1555,7 +1555,7 @@ namespace Trk { case SOLVE_FAST: case DIRECT_SOLVE_FAST: - info = solve***REMOVED***(); + info = solveSparseEigen(); break; default: @@ -2276,13 +2276,13 @@ namespace Trk { } //________________________________________________________________________ - int MatrixTool::solve***REMOVED***() + int MatrixTool::solveSparseEigen() { - ATH_MSG_INFO("solving Global using ***REMOVED***"); + ATH_MSG_INFO("solving Global using SparseEigen"); if(m_logStream) { *m_logStream<<"*************************************************************"<<std::endl; *m_logStream<<"************** solving using Global method ****************"<<std::endl; - *m_logStream<<"************** using ***REMOVED*** ****************"<<std::endl; + *m_logStream<<"************** using SparseEigen ****************"<<std::endl; *m_logStream<<"*************************************************************"<<std::endl; } @@ -2334,17 +2334,17 @@ namespace Trk { ATH_MSG_DEBUG("running the solving"); // solve - int info = (*aBetterMat).***REMOVED***Solve(*aBetterVec); + int info = (*aBetterMat).SolveWithEigen(*aBetterVec); if(info == 0) { - ATH_MSG_INFO("***REMOVED*** solving OK"); + ATH_MSG_INFO("SolveWithEigen solving OK"); if(m_logStream) - *m_logStream<<"***REMOVED*** solving OK."<<std::endl; + *m_logStream<<"SolveWithEigen solving OK."<<std::endl; } else { - msg(MSG::ERROR)<<"***REMOVED*** error code (0 if OK) = "<<info<<endmsg; + ATH_MSG_ERROR( "SolveWithEigen error code (0 if OK) = "<<info ); if(m_logStream) - *m_logStream<<"***REMOVED*** error code (0 if OK) = "<<info<<std::endl; + *m_logStream<<"SolveWithEigen error code (0 if OK) = "<<info<<std::endl; } if( isCopy ) @@ -2354,11 +2354,11 @@ namespace Trk { // stop measuring time clock_t stoptime = clock(); double totaltime = (stoptime-starttime)/double(CLOCKS_PER_SEC); - ATH_MSG_INFO("Time spent in solve***REMOVED***: "<<totaltime<<" s"); + ATH_MSG_INFO("Time spent in SolveWithEigen: "<<totaltime<<" s"); ATH_MSG_DEBUG("Alignment constants:"); // compute alignment corrections (translations in mm and rotations in rad) - // for ***REMOVED*** variances are not calculated + // for solveSparseEigen variances are not calculated for(int i=0; i<m_aNDoF; i++) { double param = -(*aBetterVec)[i]; @@ -2402,7 +2402,7 @@ namespace Trk { delete aBetterVec; // need to do this since success return value from Lapack is 0 - // and from solve***REMOVED***() it is 1 + // and from SolveWithEigen() it is 1 if (info==0) info = 1; -- GitLab From 90f9e3efa69b5c0b9e9508cb4c9de8155242386f Mon Sep 17 00:00:00 2001 From: amorley <anthony.morley@cern.ch> Date: Thu, 14 Jun 2018 07:30:42 +0200 Subject: [PATCH 145/562] Remove all references to MA27 Conflicts: Tracking/TrkAlignment/TrkAlgebraUtils/MA27/MA27.f Former-commit-id: 9d84a4121cf2ca566e6bae488d9211c191e71cde --- .../CalibrationLoopScripts/Solve_trf.py | 4 ++-- .../InDetAlignExample/python/IteratorGridClasses.py | 4 ++-- .../InDetAlignExample/share/AlignmentATNSimple.py | 2 +- .../InDetAlignExample/share/InDetAlignAlgSetup_DBM.py | 4 ++-- .../InDetAlignExample/share/NewInDetAlignAlgSetup.py | 4 ++-- .../share/NewInDetAlignment_DBMRel17.py | 2 +- .../share/NewInDetAlignment_Run2Rel17.py | 2 +- .../share/NewInDetAlignment_Run2Rel19.py | 2 +- Tracking/TrkAlignment/TrkAlgebraUtils/CMakeLists.txt | 10 +++++++--- .../TrkAlignInterfaces/IDerivCalcTool.h | 4 ++-- 10 files changed, 21 insertions(+), 17 deletions(-) diff --git a/InnerDetector/InDetExample/InDetAlignExample/CalibrationLoopScripts/Solve_trf.py b/InnerDetector/InDetExample/InDetAlignExample/CalibrationLoopScripts/Solve_trf.py index bc2a3f944709..970f47027522 100644 --- a/InnerDetector/InDetExample/InDetAlignExample/CalibrationLoopScripts/Solve_trf.py +++ b/InnerDetector/InDetExample/InDetAlignExample/CalibrationLoopScripts/Solve_trf.py @@ -194,7 +194,7 @@ solvingOption = 1 ## solving options ## 0 - No global solving ## 1 - Lapack -## 2 - ***REMOVED*** +## 2 - Eigen ## 6 - ROOT ## 7 - CLHEP @@ -342,7 +342,7 @@ solvingOption = 1 ## solving options ## 0 - No global solving ## 1 - Lapack -## 2 - ***REMOVED*** +## 2 - Eigen ## 6 - ROOT ## 7 - CLHEP diff --git a/InnerDetector/InDetExample/InDetAlignExample/python/IteratorGridClasses.py b/InnerDetector/InDetExample/InDetAlignExample/python/IteratorGridClasses.py index c7e37a97b988..c4a8c776d306 100644 --- a/InnerDetector/InDetExample/InDetAlignExample/python/IteratorGridClasses.py +++ b/InnerDetector/InDetExample/InDetAlignExample/python/IteratorGridClasses.py @@ -418,7 +418,7 @@ class writeScriptGridForTFile : ("pixelAlignmentLevel" in self.AlignmentOptions and self.AlignmentOptions["pixelAlignmentLevel"] == 3) or ("pixelAlignmentLevelBarrel" in self.AlignmentOptions and self.AlignmentOptions["pixelAlignmentLevelBarrel"] == 3) or ("pixelAlignmentLevelEndcaps" in self.AlignmentOptions and self.AlignmentOptions["pixelAlignmentLevelEndcaps"] == 3) ) : - print "hmn, you are going to run L3 alignment, ***REMOVED*** is using, so no eigen informations!!! " + print "hmn, you are going to run L3 alignment, Eigen is being used, so no eigen value information!!! " else : @@ -1103,7 +1103,7 @@ class writeScriptGrid : ("pixelAlignmentLevel" in self.AlignmentOptions and self.AlignmentOptions["pixelAlignmentLevel"] == 3) or ("pixelAlignmentLevelBarrel" in self.AlignmentOptions and self.AlignmentOptions["pixelAlignmentLevelBarrel"] == 3) or ("pixelAlignmentLevelEndcaps" in self.AlignmentOptions and self.AlignmentOptions["pixelAlignmentLevelEndcaps"] == 3) ) : - print "hmn, you are going to run L3 alignment, ***REMOVED*** is using, so no eigen informations!!! " + print "hmn, you are going to run L3 alignment, Eigen is going to be used, so no eigen value information!!! " else : if ( "writeEigenMat" in self.GridOptions and self.GridOptions["writeEigenMat"] == True ) and ( self.AlignmentOptions["runLocal"] == False ): diff --git a/InnerDetector/InDetExample/InDetAlignExample/share/AlignmentATNSimple.py b/InnerDetector/InDetExample/InDetAlignExample/share/AlignmentATNSimple.py index 00b43b006df3..1ea6518dabdf 100644 --- a/InnerDetector/InDetExample/InDetAlignExample/share/AlignmentATNSimple.py +++ b/InnerDetector/InDetExample/InDetAlignExample/share/AlignmentATNSimple.py @@ -256,7 +256,7 @@ runLocal = False ## solving option ## 0 - No global solving ## 1 - Lapack -## 2 - ***REMOVED*** +## 2 - Eigen ## 6 - ROOT ## 7 - CLHEP solvingOption = 1 diff --git a/InnerDetector/InDetExample/InDetAlignExample/share/InDetAlignAlgSetup_DBM.py b/InnerDetector/InDetExample/InDetAlignExample/share/InDetAlignAlgSetup_DBM.py index 7a9ba8861b2e..74cd5bc82ebc 100644 --- a/InnerDetector/InDetExample/InDetAlignExample/share/InDetAlignAlgSetup_DBM.py +++ b/InnerDetector/InDetExample/InDetAlignExample/share/InDetAlignAlgSetup_DBM.py @@ -35,7 +35,7 @@ newInDetAlignAlg_Options = { ,"inputMatrixFiles" : [ "matrix.bin" ] # list of matrix files when solving only ,"inputVectorFiles" : [ "vector.bin" ] # list of vector files when solving only ,"inputTFiles" : ["AlignmentTFile.root"] # list of the Alignment TFiles, used only if WriteTFile is True - ,"solvingOption" : 3 # which global solver to run 0-none, 1-Lapack, 2-***REMOVED***, 6-ROOT, 7-CLHEP + ,"solvingOption" : 3 # which global solver to run 0-none, 1-Lapack, 2-Eigen, 6-ROOT, 7-CLHEP ,"solveLocal" : True # whether to run locaal solving ,"writeMatrixFile" : True # whether to write matrix to file before solving ,"writeMatrixFileTxt" : True # whether to write matrix to text file @@ -264,7 +264,7 @@ if not newInDetAlignAlg_Options["runLocal"]: ): matrixTool.WriteEigenMat = False matrixTool.UseSparse = True - matrixTool.SolveOption = 2 # run ***REMOVED*** for L3 by default + matrixTool.SolveOption = 2 # run Eigen for L3 by default matrixTool.WriteMatTxt = False matrixTool.WriteHitmapTxt = False matrixTool.CalculateFullCovariance = False diff --git a/InnerDetector/InDetExample/InDetAlignExample/share/NewInDetAlignAlgSetup.py b/InnerDetector/InDetExample/InDetAlignExample/share/NewInDetAlignAlgSetup.py index f021c34f418d..64ef5afcffc4 100644 --- a/InnerDetector/InDetExample/InDetAlignExample/share/NewInDetAlignAlgSetup.py +++ b/InnerDetector/InDetExample/InDetAlignExample/share/NewInDetAlignAlgSetup.py @@ -41,7 +41,7 @@ newInDetAlignAlg_Options = { ,"inputMatrixFiles" : [ "matrix.bin" ] # list of matrix files when solving only ,"inputVectorFiles" : [ "vector.bin" ] # list of vector files when solving only ,"inputTFiles" : ["AlignmentTFile.root"] # list of the Alignment TFiles, used only if WriteTFile is True - ,"solvingOption" : 3 # which global solver to run 0-none, 1-Lapack, 2-***REMOVED***, 6-ROOT, 7-CLHEP + ,"solvingOption" : 3 # which global solver to run 0-none, 1-Lapack, 2-Eigen, 6-ROOT, 7-CLHEP ,"solveLocal" : True # whether to run locaal solving ,"writeMatrixFile" : True # whether to write matrix to file before solving ,"writeMatrixFileTxt" : True # whether to write matrix to text file @@ -307,7 +307,7 @@ if not newInDetAlignAlg_Options["runLocal"]: ): matrixTool.WriteEigenMat = False matrixTool.UseSparse = True - matrixTool.SolveOption = 2 # run ***REMOVED*** for L3 by default + matrixTool.SolveOption = 2 # run Eigen for L3 by default matrixTool.WriteMatTxt = False matrixTool.WriteHitmapTxt = False matrixTool.CalculateFullCovariance = False diff --git a/InnerDetector/InDetExample/InDetAlignExample/share/NewInDetAlignment_DBMRel17.py b/InnerDetector/InDetExample/InDetAlignExample/share/NewInDetAlignment_DBMRel17.py index ec431f65f8f8..c5e33ca483e6 100644 --- a/InnerDetector/InDetExample/InDetAlignExample/share/NewInDetAlignment_DBMRel17.py +++ b/InnerDetector/InDetExample/InDetAlignExample/share/NewInDetAlignment_DBMRel17.py @@ -156,7 +156,7 @@ runLocal = True ## solving option ## 0 - No global solving ## 1 - Lapack -## 2 - ***REMOVED*** +## 2 - Eigen ## 6 - ROOT ## 7 - CLHEP solvingOption = 1 diff --git a/InnerDetector/InDetExample/InDetAlignExample/share/NewInDetAlignment_Run2Rel17.py b/InnerDetector/InDetExample/InDetAlignExample/share/NewInDetAlignment_Run2Rel17.py index 831d3df68a13..c8cfc8062fec 100644 --- a/InnerDetector/InDetExample/InDetAlignExample/share/NewInDetAlignment_Run2Rel17.py +++ b/InnerDetector/InDetExample/InDetAlignExample/share/NewInDetAlignment_Run2Rel17.py @@ -326,7 +326,7 @@ runLocal = False ## solving option ## 0 - No global solving ## 1 - Lapack -## 2 - ***REMOVED*** +## 2 - Eigen ## 6 - ROOT ## 7 - CLHEP solvingOption = 1 diff --git a/InnerDetector/InDetExample/InDetAlignExample/share/NewInDetAlignment_Run2Rel19.py b/InnerDetector/InDetExample/InDetAlignExample/share/NewInDetAlignment_Run2Rel19.py index 3ecb94b56736..dbca7a991c46 100644 --- a/InnerDetector/InDetExample/InDetAlignExample/share/NewInDetAlignment_Run2Rel19.py +++ b/InnerDetector/InDetExample/InDetAlignExample/share/NewInDetAlignment_Run2Rel19.py @@ -328,7 +328,7 @@ runLocal = True ## solving option ## 0 - No global solving ## 1 - Lapack -## 2 - ***REMOVED*** +## 2 - Eigen ## 6 - ROOT ## 7 - CLHEP solvingOption = 1 diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/CMakeLists.txt b/Tracking/TrkAlignment/TrkAlgebraUtils/CMakeLists.txt index ba679e0f1e15..6af9e05783d5 100644 --- a/Tracking/TrkAlignment/TrkAlgebraUtils/CMakeLists.txt +++ b/Tracking/TrkAlignment/TrkAlgebraUtils/CMakeLists.txt @@ -11,15 +11,19 @@ atlas_depends_on_subdirs( PRIVATE TestPolicy ) # External dependencies: +find_package( BLAS ) find_package( LAPACK ) find_package( Eigen ) find_package( ROOT COMPONENTS Core Matrix Tree MathCore Hist RIO pthread ) +enable_language (Fortran) + + # Component(s) in the package: atlas_add_library( TrkAlgebraUtils src/*.cxx - ***REMOVED***/*.f PUBLIC_HEADERS TrkAlgebraUtils - PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${LAPACK_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${LAPACK_LIBRARIES} ${EIGEN_LIBRARIES} GaudiKernel ) + PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${LAPACK_INCLUDE_DIRS} ${BLAS_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} + PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ${EIGEN_LIBRARIES} GaudiKernel gfortran) + diff --git a/Tracking/TrkAlignment/TrkAlignInterfaces/TrkAlignInterfaces/IDerivCalcTool.h b/Tracking/TrkAlignment/TrkAlignInterfaces/TrkAlignInterfaces/IDerivCalcTool.h index d5bb42b75811..5d80d02c73f0 100644 --- a/Tracking/TrkAlignment/TrkAlignInterfaces/TrkAlignInterfaces/IDerivCalcTool.h +++ b/Tracking/TrkAlignment/TrkAlignInterfaces/TrkAlignInterfaces/IDerivCalcTool.h @@ -41,9 +41,9 @@ namespace Trk { enum SolveOption { NONE = 0, //!< not solve in any case (to be used when ipc) SOLVE = 1, //!< solving after data accumulation (LAPACK) - SOLVE_FAST = 2, //!< Fast (***REMOVED*** method) solving after data accumulation + SOLVE_FAST = 2, //!< Fast (Eigen method) solving after data accumulation DIRECT_SOLVE = 3, //!< direct solving (LAPACK), already available matrix & vector - DIRECT_SOLVE_FAST = 4, //!< direct Fast (***REMOVED*** method) solving, already available matrix & vector + DIRECT_SOLVE_FAST = 4, //!< direct Fast (Eigen method) solving, already available matrix & vector DIRECT_SOLVE_CLUSTER = 5 //!< computation of alignment parameters from SCALAPAK already solved matrix }; // this is also defined in TrkGlobAlign class -- GitLab From 1ae5303e424cc8a384ff60facca1f0d7799f115c Mon Sep 17 00:00:00 2001 From: amorley <anthony.morley@cern.ch> Date: Thu, 17 May 2018 13:13:25 +0200 Subject: [PATCH 146/562] Update CMakeLists file Former-commit-id: c7fdad3d0097474352d2c9600fb9cc49495969f1 --- Tracking/TrkAlignment/TrkAlgebraUtils/CMakeLists.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/CMakeLists.txt b/Tracking/TrkAlignment/TrkAlgebraUtils/CMakeLists.txt index 6af9e05783d5..cb2f982db3fb 100644 --- a/Tracking/TrkAlignment/TrkAlgebraUtils/CMakeLists.txt +++ b/Tracking/TrkAlignment/TrkAlgebraUtils/CMakeLists.txt @@ -16,14 +16,11 @@ find_package( LAPACK ) find_package( Eigen ) find_package( ROOT COMPONENTS Core Matrix Tree MathCore Hist RIO pthread ) -enable_language (Fortran) - - # Component(s) in the package: atlas_add_library( TrkAlgebraUtils src/*.cxx PUBLIC_HEADERS TrkAlgebraUtils PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${LAPACK_INCLUDE_DIRS} ${BLAS_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ${EIGEN_LIBRARIES} GaudiKernel gfortran) + PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ${EIGEN_LIBRARIES} GaudiKernel ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}) -- GitLab From 44fa190b96daaeb5a6b59cda19d7894da46812d3 Mon Sep 17 00:00:00 2001 From: Anthony Morley <anthony.morley@cern.ch> Date: Mon, 4 Jun 2018 20:50:20 +0000 Subject: [PATCH 147/562] Change solver so something more suitable for the alignment like problems Former-commit-id: 82af76a28f4bcb111c7d5d382ea74fa926a96c6e --- Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx index aded59fd3919..1fb803cc20a1 100644 --- a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx +++ b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx @@ -25,6 +25,8 @@ #include <Eigen/Core> #include <Eigen/IterativeLinearSolvers> +#include <Eigen/SparseCholesky> + namespace Trk { @@ -465,7 +467,8 @@ int AlSpaMat::SolveWithEigen(AlVec& RHS){ // BiCGSTAB was the fastest iterative solver in Eigen from a quick test // SimplicialLDLT was the fastest direct solver in Eigen (x2 slower than BiCGSTAB ) - Eigen::BiCGSTAB<Eigen::SparseMatrix<double> > solver; + // Eigen::BiCGSTAB<Eigen::SparseMatrix<double> > solver; + Eigen::SimplicialLDLT<Eigen::SparseMatrix<double> > solver; solver.compute(eigenBigMatrix); if(solver.info()!=Eigen::Success) { @@ -495,6 +498,7 @@ int AlSpaMat::SolveWithEigen(AlVec& RHS){ for( int i=0; i<residual.size(); ++i){ sumresidual += fabs(residual[i]); } + sumresidual /= (double) residual.size(); std::cout << "AlSpaMat::SolveWithEigen: residual of solution is " << sumresidual << std::endl; if( sumresidual > 1e-10 ){ -- GitLab From f4a8d45ae794baf33ac5b7d53ea3f58f18faa8b6 Mon Sep 17 00:00:00 2001 From: amorley <anthony.morley@cern.ch> Date: Thu, 7 Jun 2018 15:54:34 +0200 Subject: [PATCH 148/562] code cleanup -> NULL to nullptr Former-commit-id: 55a51181799b84244bfd496837279b3c6058a54f --- .../TrkAlgebraUtils/src/AlMat.cxx | 2 +- .../TrkAlgebraUtils/src/AlSpaMat.cxx | 20 +++++++++---------- .../TrkAlgebraUtils/src/AlSymMat.cxx | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlMat.cxx b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlMat.cxx index 25fbb6a7dad9..47595af20259 100644 --- a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlMat.cxx +++ b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlMat.cxx @@ -49,7 +49,7 @@ AlMat::AlMat(const AlMat& m) { } AlMat::~AlMat() -{if( m_ptr_data != NULL) delete [] m_ptr_data;} +{if( m_ptr_data != nullptr ) delete [] m_ptr_data;} void AlMat::copy(const AlMat& m) { int nr = nrow(); diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx index 1fb803cc20a1..c768b2ec988f 100644 --- a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx +++ b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx @@ -36,8 +36,8 @@ AlSpaMat::AlSpaMat() m_matrix_type = 2; m_size = 0; m_nele = 0; - m_ptr_row = NULL; - m_ptr_col = NULL; // set pointer to null + m_ptr_row = nullptr; + m_ptr_col = nullptr; // set pointer to null } //______________________________________________________________________________ @@ -46,8 +46,8 @@ AlSpaMat::AlSpaMat(long int N) m_matrix_type = 2; m_size = N; m_nele = 0; - m_ptr_row = NULL; - m_ptr_col = NULL; // set pointer to null + m_ptr_row = nullptr; + m_ptr_col = nullptr; // set pointer to null } //______________________________________________________________________________ @@ -56,8 +56,8 @@ AlSpaMat::AlSpaMat(const AlSpaMat& m) { m_matrix_type = 2; m_size = m.size(); - m_ptr_row = NULL; - m_ptr_col = NULL; // set pointer to null + m_ptr_row = nullptr; + m_ptr_col = nullptr; // set pointer to null copy(m); } @@ -66,8 +66,8 @@ AlSpaMat::AlSpaMat(const AlSymMat& m) { m_matrix_type = 2; m_size = m.size(); - m_ptr_row = NULL; - m_ptr_col = NULL; // set pointer to null + m_ptr_row = nullptr; + m_ptr_col = nullptr; // set pointer to null copy(m); } @@ -75,8 +75,8 @@ AlSpaMat::AlSpaMat(const AlSymMat& m) AlSpaMat::~AlSpaMat() { m_ptr_map.clear(); - if( m_ptr_row != NULL ) delete [] m_ptr_row; - if( m_ptr_col != NULL ) delete [] m_ptr_col; + if( m_ptr_row != nullptr ) delete [] m_ptr_row; + if( m_ptr_col != nullptr ) delete [] m_ptr_col; } //______________________________________________________________________________ diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSymMat.cxx b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSymMat.cxx index 8b5c064dbd6f..23893c0e5e18 100644 --- a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSymMat.cxx +++ b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSymMat.cxx @@ -41,7 +41,7 @@ AlSymMat::AlSymMat() m_matrix_type = 1; m_size = 0; m_nele = 0; - m_ptr_data = NULL; // set pointer to null + m_ptr_data = nullptr; // set pointer to null m_pathbin="./"; m_pathtxt="./"; } @@ -105,7 +105,7 @@ AlSymMat& AlSymMat::operator=(const AlSpaMat& m) //______________________________________________________________________________ AlSymMat::~AlSymMat() { - if( m_ptr_data != NULL ) delete [] m_ptr_data; + if( m_ptr_data != nullptr ) delete [] m_ptr_data; //ptr_map.clear(); } -- GitLab From eec320a27f8e491e51710fbfa7dc2e9c8b863ad0 Mon Sep 17 00:00:00 2001 From: amorley <anthony.morley@cern.ch> Date: Thu, 14 Jun 2018 07:35:10 +0200 Subject: [PATCH 149/562] start removing cout/cerr Conflicts: Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx Former-commit-id: ae517a90033ef0cb3c7372dd4430b60ee91117c8 --- .../TrkAlgebraUtils/src/AlSpaMat.cxx | 124 +++++------------- .../TrkAlgebraUtils/src/AlSymMat.cxx | 42 ++---- 2 files changed, 50 insertions(+), 116 deletions(-) diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx index c768b2ec988f..e6b44061c29e 100644 --- a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx +++ b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx @@ -19,6 +19,7 @@ #include <math.h> #include <float.h> #include <stdint.h> +#include <stdexcept> #include <TMatrixDSparse.h> @@ -83,8 +84,7 @@ AlSpaMat::~AlSpaMat() void AlSpaMat::copy(const AlSpaMat& m) { if( size() != m.size()) { - std::cerr << "AlSpaMat::copy: size do not match!" << std::endl; - return; + throw std::length_error( "AlSpaMat::copy: size do not match!" ); } m_ptr_map.clear(); m_nele=m.m_nele; @@ -96,8 +96,7 @@ void AlSpaMat::copy(const AlSpaMat& m) void AlSpaMat::copy(const AlSymMat& m) { if( size() != m.size()) { - std::cerr << "AlSpaMat::copy: size do not match!" << std::endl; - return; + throw std::length_error( "AlSpaMat::copy: size do not match!" ); } m_ptr_map.clear(); m_nele=0; @@ -117,8 +116,7 @@ void AlSpaMat::copy(const AlSymMat& m) void AlSpaMat::copy(const AlMat& m) { if( size() != m.nrow() || size() != m.ncol() ) { - std::cerr << "AlSpaMat::copy: size do not match!" << std::endl; - return; + throw std::length_error( "AlSpaMat::copy: size do not match!" ); } // copy just the lower triangle: @@ -141,20 +139,16 @@ double& AlSpaMat::elemr(long int i,long int j) { #ifdef _DEBUG if( i<0 ) { - std::cerr << "AlSpaMat::elemr: Index 1 < zero! " << i << std::endl; - return m_ptr_map.begin()->second; + throw std::range_error( "AlSpaMat::elemr: Index 1 < zero! " ); } if( i>=size() ) { - std::cerr << "AlSpaMat::elemr: Index 1 too large! " << i << std::endl; - return m_ptr_map.begin()->second; + throw std::range_error( "AlSpaMat::elemr: Index 1 too large! " ); } if( j<0 ) { - std::cerr << "AlSpaMat::elemr: Index 2 < zero! " << j << std::endl; - return m_ptr_map.begin()->second; + throw std::range_error( "AlSpaMat::elemr: Index 2 < zero! " ); } if( j>=size() ) { - std::cerr << "AlSpaMat::elemr: Index 2 too large! " << j << std::endl; - return m_ptr_map.begin()->second; + throw std::range_error("AlSpaMat::elemr: Index 2 too large! " );; } #endif // try fast referencing: @@ -181,19 +175,19 @@ double AlSpaMat::elemc(long int i,long int j) const { #ifdef _DEBUG if( i<0 ) { - std::cerr << "AlSpaMat::elemc: Index 1 < zero! " << i << std::endl; + throw std::range_error( "AlSpaMat::elemc: Index 1 < zero! " ); return 0.0; } if( i>=size() ) { - std::cerr << "AlSpaMat::elemc: Index 1 too large! " << i << std::endl; + throw std::range_error( "AlSpaMat::elemc: Index 1 too large! " ); return 0.0; } if( j<0 ) { - std::cerr << "AlSpaMat::elemc: Index 2 < zero! " << j << std::endl; + throw std::range_error( "AlSpaMat::elemc: Index 2 < zero! " ); return 0.0; } if( j>=size() ) { - std::cerr << "AlSpaMat::elemc: Index 2 too large! " << j << std::endl; + throw std::range_error( "AlSpaMat::elemc: Index 2 too large! " ); return 0.0; } #endif @@ -216,20 +210,16 @@ indices AlSpaMat::elem(long int i,long int j) const // ATTENTION! the key value is returned: #ifdef _DEBUG if( i<0 ) { - std::cerr << "AlSpaMat::elem: Index 1 < zero! " << i << std::endl; - return std::make_pair(0,0); + throw std::range_error( "AlSpaMat::elem: Index 1 < zero! " ); } if( i>=size() ) { - std::cerr << "AlSpaMat::elem: Index 1 too large! " << i << std::endl; - return std::make_pair(0,0); + throw std::range_error( "AlSpaMat::elem: Index 1 too large! " ); } if( j<0 ) { - std::cerr << "AlSpaMat::elem: Index 2 < zero! " << j << std::endl; - return std::make_pair(0,0); + throw std::range_error( "AlSpaMat::elem: Index 2 < zero! " ); } if( j>=size() ) { - std::cerr << "AlSpaMat::elem: Index 2 too large! " << j << std::endl; - return std::make_pair(0,0); + throw std::range_error( "AlSpaMat::elem: Index 2 too large! " ); } #endif @@ -260,8 +250,7 @@ AlSpaMat& AlSpaMat::operator=(const AlSymMat& m) AlSpaMat& AlSpaMat::operator=(const AlMat& m) { if( m.nrow() != m.ncol() ) { - std::cerr << "AlSpaMat::=operator: allowed for square matrices only!" << std::endl; - return *this; + throw std::length_error( "AlSpaMat::=operator: allowed for square matrices only!" ); } m_size=m.nrow(); @@ -283,8 +272,7 @@ AlSpaMat& AlSpaMat::operator=(const double& d) AlSpaMat AlSpaMat::operator+(const AlSpaMat& m) const { if( size() != m.size()) { - std::cerr << "AlSpaMat::operator+: size do not match!" << std::endl; - return *this; + throw std::length_error( "AlSpaMat::operator+: size do not match!" ); } AlSpaMat b(m); @@ -300,8 +288,7 @@ AlSpaMat AlSpaMat::operator+(const AlSpaMat& m) const AlSpaMat& AlSpaMat::operator+=(const AlSpaMat& m) { if( size() != m.size()) { - std::cerr << "AlSpaMat::operator+=: size do not match!" << std::endl; - return *this; + throw std::length_error( "AlSpaMat::operator+=: size do not match!" ); } const_mapiterator pos; @@ -316,8 +303,7 @@ AlSpaMat& AlSpaMat::operator+=(const AlSpaMat& m) AlSpaMat AlSpaMat::operator-(const AlSpaMat& m) const { if( size() != m.size()) { - std::cerr << "AlSpaMat::operator-: size do not match!" << std::endl; - return *this; + throw std::length_error( "AlSpaMat::operator-: size do not match!" ); } AlSpaMat b(m); @@ -333,8 +319,7 @@ AlSpaMat AlSpaMat::operator-(const AlSpaMat& m) const AlSpaMat& AlSpaMat::operator-=(const AlSpaMat& m) { if( size() != m.size()) { - std::cerr << "AlSpaMat::operator-=: size do not match!" << std::endl; - return *this; + throw std::length_error( "AlSpaMat::operator-=: size do not match!" ); } const_mapiterator pos; @@ -349,9 +334,7 @@ AlSpaMat& AlSpaMat::operator-=(const AlSpaMat& m) AlMat AlSpaMat::operator*(const AlSymMatBase& m) const { if( size() != m.size() ) { - std::cerr << "AlSpaMat::operator*: size do not match!" << std::endl; - AlMat b( size(), m.size()); - return b; + throw std::length_error( "AlSpaMat::operator*: size do not match!" ); } long int isiz(size()); @@ -368,8 +351,7 @@ AlMat AlSpaMat::operator*(const AlSymMatBase& m) const //______________________________________________________________________________ AlMat AlSpaMat::operator*(const AlMat& m) const { if( size() != m.nrow() ) { - std::cerr << "AlSpaMat::operator*: size do not match!" << std::endl; - return m; + throw std::length_error( "AlSpaMat::operator*: size do not match!" ); } long int isiz(size()); @@ -388,8 +370,7 @@ AlMat AlSpaMat::operator*(const AlMat& m) const { AlVec AlSpaMat::operator*(const AlVec& v) const { if( size() != v.size() ) { - std::cerr << "AlSpaMat::operator*: size do not match! " << std::endl; - return v; + throw std::length_error( "AlSpaMat::operator*: size do not match! " ); } long int isiz(size()); @@ -426,18 +407,13 @@ AlSpaMat AlSpaMat::operator*(const double& d) const //______________________________________________________________________________ double AlSpaMat::determinant() { - double deter = 1.; - - std::cerr << "AlSpaMat::determinant: not implemented!" << std::endl; - - return deter; + throw std::invalid_argument( "AlSpaMat::determinant: not implemented!" ); } int AlSpaMat::SolveWithEigen(AlVec& RHS){ if(RHS.size() != size() ){ - std::cerr << "AlSpaMat::SolveWithEigen vector size is incorrect" << std::endl; - return 10; + throw std::length_error( "AlSpaMat::SolveWithEigen vector size is incorrect" ); } Eigen::VectorXd eigenBigVector( RHS.size() ); @@ -460,7 +436,6 @@ int AlSpaMat::SolveWithEigen(AlVec& RHS){ counter++; } eigenBigMatrix.setFromTriplets(tripletList.begin(), tripletList.end()); - std::cout << "AlSpaMat::SolveWithEigen: Matrix and vector created now solving" << std::endl; // Eigen::CholmodSupernodalLLT is much much quicker (x50) so it would be great to move to that in the future // requires an external package SuiteSparse @@ -473,18 +448,15 @@ int AlSpaMat::SolveWithEigen(AlVec& RHS){ solver.compute(eigenBigMatrix); if(solver.info()!=Eigen::Success) { // decomposition failed - std::cout << "AlSpaMat::SolveWithEigen: failed to compute: -- is your matrix singular?" << std::endl; + throw std::domain_error("AlSpaMat::SolveWithEigen: failed to compute: -- is the input matrix singular?" ); return 1; - } else { - std::cout << "AlSpaMat::SolveWithEigen: Finished compute now solving" << std::endl; } + Eigen::VectorXd x = solver.solve( eigenBigVector ); if(solver.info()!=Eigen::Success) { // solving failed - std::cout << "AlSpaMat::SolveWithEigen: Failed to solve: -- is your matrix singular? " << std::endl; + throw std::domain_error("AlSpaMat::SolveWithEigen: Failed to solve: -- is your matrix singular? "); return 2; - }else { - std::cout << "AlSpaMat::SolveWithEigen: Finished solving" << std::endl; } //Copy results into vector @@ -500,9 +472,8 @@ int AlSpaMat::SolveWithEigen(AlVec& RHS){ } sumresidual /= (double) residual.size(); - std::cout << "AlSpaMat::SolveWithEigen: residual of solution is " << sumresidual << std::endl; - if( sumresidual > 1e-10 ){ - std::cout << "AlSpaMat::SolveWithEigen: WARNING your solution is not very good!" << std::endl; + if( sumresidual > 1e-3 ){ + throw std::overflow_error( "AlSpaMat::SolveWithEigen: your solution is no good! "); return 3; } @@ -517,17 +488,13 @@ int AlSpaMat::SolveWithEigen(AlVec& RHS){ //jlove int AlSpaMat::diagonalize(char jobz, AlVec& w, AlMat& z) { int AlSpaMat::diagonalize(char, AlVec&, AlMat&) { - std::cerr << "AlSpaMat::diagonalize: not implemented!" << std::endl; - int ierr = -1; - return ierr; + throw std::invalid_argument( "AlSpaMat::diagonalize: not implemented!" ); } //______________________________________________________________________________ int AlSpaMat::invert() { - std::cerr << "AlSpaMat::invert: not implemented!" << std::endl; - int ierr = -1; - return ierr; + throw std::invalid_argument( "AlSpaMat::invert: not implemented!" ); } //______________________________________________________________________________ @@ -573,11 +540,10 @@ int AlSpaMat::RemoveCollsRows(std::vector<int> indices) { int n = indices.size(); if (n==0) { - std::cerr<<"Vector of indices to remove is empty."<<std::endl; return m_size; } if (n>m_size) { - std::cerr<<"Vector of indices larger than matrix size."<<std::endl; + throw std::invalid_argument( "AlSpaMat::RemoveCollsRows: Vector of indices larger than matrix size." ); return m_size; } @@ -594,8 +560,7 @@ int AlSpaMat::RemoveCollsRows(std::vector<int> indices) // remove rows and columns starting from largest indices for (int i=0;i<n;i++) { if (indices[i] > m_size-1) { - std::cerr<<"Index "<<indices[i]<<" goes beyond matrix (size "<<m_size<<")."<<std::endl; - continue; + throw std::invalid_argument( "AlSpaMat::RemoveCollsRows: Index goes beyond matrix." ); } RemoveDoF(indices[i]); } @@ -706,7 +671,7 @@ void AlSpaMat::SetPathTxt(const std::string &path) //jlove StatusCode AlSpaMat::Write(const std::string &filename, bool binary, // bool square, double scale, float version){ StatusCode AlSpaMat::Write(const std::string &filename, bool binary, - bool square, double, float version) + bool /*square*/, double, float version) { std::ofstream outmat; @@ -722,9 +687,6 @@ StatusCode AlSpaMat::Write(const std::string &filename, bool binary, outmat.write((char*)&msizz, sizeof (msizz)); outmat.write((char*)&version, sizeof (version)); outmat.write((char*)&nelem, sizeof (nelem)); - // std::cout << "AlSpaMat::Write: msizz = " << msizz << std::endl; - // std::cout << "AlSpaMat::Write: version = " << version << std::endl; - // std::cout << "AlSpaMat::Write: nelem = " << nelem << std::endl; } else { outmat.open((m_pathtxt+filename).c_str()); @@ -755,8 +717,6 @@ StatusCode AlSpaMat::Write(const std::string &filename, bool binary, outmat << std::setw(6) << i << std::setw(6) << j << std::setw(18) << melem << std::endl; } outmat.close(); - if(square) - std::cout << "AlSpaMat::Write: square flag has been ignored!" << std::endl; return StatusCode::SUCCESS; } @@ -783,8 +743,6 @@ StatusCode AlSpaMat::CheckMatVersion(const std::string filename, bool &StdUnits) inmat.close(); - // std::cout << "AlSpaMat::StdUnits: " << StdUnits << std::endl; - return StatusCode::SUCCESS; } @@ -795,8 +753,6 @@ StatusCode AlSpaMat::Read(const std::string &filename, int &dofs, bool &triang, if (StatusCode::SUCCESS != CheckMatVersion(m_pathbin+filename, stdUnits)) return StatusCode::FAILURE; - // std::cout << "AlSpaMat::StdUnits: " << stdUnits << std::endl; - std::ifstream inmat((m_pathbin+filename).c_str(), std::ios::binary); if(inmat.fail()) return StatusCode::FAILURE; @@ -814,7 +770,6 @@ StatusCode AlSpaMat::Read(const std::string &filename, int &dofs, bool &triang, if (stdUnits) inmat.read((char*)&version, sizeof (version)); - // std::cout << "AlSpaMat::Write: version = " << version << std::endl; double melem=0; int32_t i, j; @@ -823,7 +778,6 @@ StatusCode AlSpaMat::Read(const std::string &filename, int &dofs, bool &triang, triang=false; inmat.read((char*)&nelem, sizeof (nelem)); m_nele=nelem; - // std::cout << "AlSpaMat::Write: nelem = " << nelem << std::endl; for(int k=0; k<nelem; k++) { inmat.read((char*)&i, sizeof (i)); inmat.read((char*)&j, sizeof (j)); @@ -836,7 +790,6 @@ StatusCode AlSpaMat::Read(const std::string &filename, int &dofs, bool &triang, for(int32_t i=0; i<msiz; i++) { for(int32_t j=0; j<msiz; j++) { inmat.read((char*)&melem, sizeof (melem)); - // std::cout << "AlSpaMat::Write: nelem = " << nelem << std::endl; if( i>=j && melem!=0. ) m_ptr_map.insert(std::make_pair(std::make_pair(i,j), melem)); } @@ -845,7 +798,6 @@ StatusCode AlSpaMat::Read(const std::string &filename, int &dofs, bool &triang, else { // triangular format triang=true; msiz = (-1)*msiz; - // std::cout << "msiz=" << msiz << std::endl; for( int32_t i=0; i<msiz; i++) { for( int32_t j=0; j<=i; j++) { inmat.read((char*)&melem, sizeof (melem)); @@ -888,7 +840,6 @@ StatusCode AlSpaMat::ReadProjected(const std::string &filename, int &dofs, triang=false; inmat.read((char*)&nelem, sizeof (nelem)); m_nele=nelem; -// std::cout << "AlSpaMat::Write: nelem = " << nelem << std::endl; for(int k=0; k<nelem; k++) { inmat.read((char*)&i, sizeof (i)); inmat.read((char*)&j, sizeof (j)); @@ -909,7 +860,6 @@ StatusCode AlSpaMat::ReadProjected(const std::string &filename, int &dofs, else { // triangular format triang=true; msiz = (-1)*msiz; -// std::cout << "msiz=" << msiz << std::endl; for( int32_t i=0; i<msiz; i++) { for( int32_t j=0; j<=i; j++) { inmat.read((char*)&melem, sizeof (melem)); @@ -944,8 +894,6 @@ TMatrixDSparse* AlSpaMat::makeTMatrix() counter++; } - std::cout << counter << " " << nonZeroElements << " size " << m_size <<std::endl; - TMatrixDSparse* myTMatrix = new TMatrixDSparse(0,m_size-1,0,m_size-1); myTMatrix->SetMatrixArray(nonZeroElements,irow,icol,val); diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSymMat.cxx b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSymMat.cxx index 23893c0e5e18..95cf4c4e84c5 100644 --- a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSymMat.cxx +++ b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSymMat.cxx @@ -16,6 +16,7 @@ #include <math.h> #include <float.h> //for DBL_EPSILON #include <stdint.h> +#include <stdexcept> #include <TMatrixDSparse.h> @@ -114,8 +115,7 @@ void AlSymMat::copy(const AlSymMat& m) { // this one implements the fast copy alg. if( size() != m.size()) { - std::cerr << "AlSymMat::copy: size do not match!" << std::endl; - return; + throw std::range_error( "AlSymMat::copy: size do not match!" ); } double * p = m_ptr_data + m_nele; @@ -130,8 +130,7 @@ void AlSymMat::copy(const AlSpaMat& m) { // if( size() != m.size()) { - std::cerr << "AlSymMat::copy: size do not match!" << std::endl; - return; + throw std::range_error( "AlSymMat::copy: size do not match!" ); } (*this) = 0.; @@ -152,8 +151,7 @@ void AlSymMat::copy(const AlMat& m) // copy the lower triangle only! int si = size(); if( si != m.nrow() || si != m.ncol() ) { - std::cerr << "AlSymMat::copy: sizes do not match!" << std::endl; - return; + throw std::range_error("AlSymMat::copy: sizes do not match!" ); } for( int i=0; i<si; i++ ) @@ -178,8 +176,7 @@ AlSymMat& AlSymMat::operator=(const AlSymMat& m) AlSymMat& AlSymMat::operator=(const AlMat& m) { if( m.nrow() != m.ncol() ) { - std::cerr << "AlSymMat::operator=: a squared matrix is required!" << std::endl; - return *this; + throw std::range_error( "AlSymMat::operator=: a squared matrix is required!" ); } reSize(m.nrow()); @@ -201,8 +198,7 @@ AlSymMat& AlSymMat::operator=(const double& d) AlSymMat AlSymMat::operator+(const AlSymMat& m) const { if( size() != m.size()) { - std::cerr << "AlSymMat::operator+: size do not match!" << std::endl; - return *this; + throw std::range_error( "AlSymMat::operator+: size do not match!" ); } AlSymMat b(size()); @@ -218,8 +214,7 @@ AlSymMat AlSymMat::operator+(const AlSymMat& m) const AlSymMat& AlSymMat::operator+=(const AlSymMat& m) { if( size() != m.size()){ - std::cerr << "AlSymMat::operator+=: size do not match!" << std::endl; - return *this; + throw std::range_error( "AlSymMat::operator+=: size do not match!" ); } double * p = m_ptr_data + m_nele; @@ -233,8 +228,7 @@ AlSymMat& AlSymMat::operator+=(const AlSymMat& m) AlSymMat AlSymMat::operator-(const AlSymMat& m) const { if( size() != m.size()) { - std::cerr << "AlSymMat::operator-: size do not match!" << std::endl; - return *this; + throw std::range_error( "AlSymMat::operator-: size do not match!" ); } AlSymMat b(size()); @@ -250,8 +244,7 @@ AlSymMat AlSymMat::operator-(const AlSymMat& m) const AlSymMat& AlSymMat::operator-=(const AlSymMat& m) { if( size() != m.size()) { - std::cerr << "AlSymMat::operator-=: size do not match!" << std::endl; - return *this; + throw std::range_error( "AlSymMat::operator-=: size do not match!" ); } double * p = m_ptr_data + m_nele; @@ -265,9 +258,7 @@ AlSymMat& AlSymMat::operator-=(const AlSymMat& m) AlMat AlSymMat::operator*(const AlSymMat& m) const { if( size() != m.size() ) { - std::cerr << "AlSymMat::operator*: size do not match!" << std::endl; - AlMat b( size(), m.size()); - return b; + throw std::range_error( "AlSymMat::operator*: size do not match!" ); } AlMat b( size(), size()); @@ -305,8 +296,7 @@ AlMat AlSymMat::operator*(const AlSymMat& m) const AlMat AlSymMat::operator*(const AlMat& m) const { if( size() != m.nrow() ) { - std::cerr << "AlSymMat::operator*: size do not match!" << std::endl; - return m; + throw std::range_error("AlSymMat::operator*: size do not match!" ); } AlMat b( size(), m.ncol()); @@ -334,8 +324,7 @@ AlMat AlSymMat::operator*(const AlMat& m) const AlVec AlSymMat::operator*(const AlVec& v) const { if( size() != v.size() ) { - std::cerr << "AlSymMat::operator*: size do not match! " << std::endl; - return v; + throw std::range_error( "AlSymMat::operator*: size do not match! " ); } AlVec b(size()); @@ -512,12 +501,10 @@ int AlSymMat::RemoveCollsRows(std::vector<int> indices) { int n = indices.size(); if (n==0) { - std::cerr<<"Vector of indices to remove is empty."<<std::endl; return m_size; } if (n>m_size) { - std::cerr<<"Vector of indices larger than matrix size."<<std::endl; - return m_size; + throw std::range_error("Vector of indices larger than matrix size."); } // first sort the list of indices descending @@ -534,8 +521,7 @@ int AlSymMat::RemoveCollsRows(std::vector<int> indices) for (int i=0;i<n;i++) { int index = indices[i]; if (index > m_size-1) { - std::cerr<<"Index "<<index<<" goes beyond matrix (size "<<m_size<<")."<<std::endl; - continue; + throw std::range_error("AlSymMat::RemoveCollsRows: Index goes beyond matrix."); } for (int j=index; j<m_size-1; j++) -- GitLab From 2ef4155984f90782a4c38a40ac474d1bb455bb37 Mon Sep 17 00:00:00 2001 From: amorley <anthony.morley@cern.ch> Date: Thu, 14 Jun 2018 07:38:54 +0200 Subject: [PATCH 150/562] Remove the remaining cout/cerr calls Conflicts: Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlSymMat.h Tracking/TrkAlignment/TrkAlgebraUtils/src/AlVec.cxx Former-commit-id: 70ab976622b66800014d57215bf3acb05823260c --- .../TrkAlgebraUtils/TrkAlgebraUtils/AlMat.h | 5 +- .../TrkAlgebraUtils/AlSpaMat.h | 6 +- .../TrkAlgebraUtils/AlSymMat.h | 8 +- .../TrkAlgebraUtils/AlSymMatBase.h | 8 +- .../TrkAlgebraUtils/TrkAlgebraUtils/AlVec.h | 14 ++-- .../TrkAlgebraUtils/src/AlMat.cxx | 76 ++++++++++++------- .../TrkAlgebraUtils/src/AlSpaMat.cxx | 54 ++++++------- .../TrkAlgebraUtils/src/AlSymMat.cxx | 26 +++---- .../TrkAlgebraUtils/src/AlVec.cxx | 43 +++++------ .../TrkAlgebraUtils/src/IntVec.cxx | 28 +++---- 10 files changed, 126 insertions(+), 142 deletions(-) diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlMat.h b/Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlMat.h index a63f57d22f69..4aad5aeb0d23 100644 --- a/Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlMat.h +++ b/Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlMat.h @@ -7,6 +7,7 @@ #include <iostream> #include <string> +#include <exception> class StatusCode; @@ -129,14 +130,14 @@ inline AlMat::AlMat_row_const AlMat::operator[] (int r) const{ inline double &AlMat::AlMat_row::operator[](int c){ if(m_r<0||m_r>=m_a.nrow() || c<0||c>=m_a.ncol()) - std::cerr << "Range error in AlMat::operator[][]" << std::endl; + throw std::out_of_range( "Range error in AlMat::operator[][]" ); return *(m_a.m_ptr_data+m_r*m_a.ncol()+c); } inline const double & AlMat::AlMat_row_const::operator[](int c) const { if(m_r<0||m_r>=m_a.nrow() || c<0||c>=m_a.ncol()) - std::cerr << "Range error in AlMat::operator[][]" << std::endl; + throw std::out_of_range( "Range error in AlMat::operator[][]" ); return *(m_a.m_ptr_data+m_r*m_a.ncol()+c); } diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlSpaMat.h b/Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlSpaMat.h index 33643d30366a..6ae73cdfd775 100644 --- a/Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlSpaMat.h +++ b/Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlSpaMat.h @@ -7,7 +7,7 @@ #include "TrkAlgebraUtils/AlSymMatBase.h" -#include <iostream> +#include <exception> class StatusCode; template<class Element> class TMatrixTSparse; @@ -95,13 +95,13 @@ class AlSpaMat : public AlSymMatBase { inline void AlSpaMat::elem(const indices& key, long int& i, long int& j) const { i = key.first; j = key.second; - if(j>i) std::cerr << "AlSpaMat::elem: i<j ! " << std::endl; + if(j>i) throw std::out_of_range( "AlSpaMat::elem: i<j ! " ); return; } inline long int AlSpaMat::nele() { // first check for intrinsic consistency: - if( int(m_ptr_map.size()) != m_nele ) std::cerr << "AlSpaMat::m_nele has been corrupted!" << std::endl; + if( int(m_ptr_map.size()) != m_nele ) throw std::range_error( "AlSpaMat::m_nele has been corrupted!" ); m_nele = m_ptr_map.size(); return m_nele; } diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlSymMat.h b/Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlSymMat.h index 24c3a56a3481..7c3e717c85ec 100644 --- a/Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlSymMat.h +++ b/Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlSymMat.h @@ -94,10 +94,10 @@ class AlSymMat : public AlSymMatBase { inline long int AlSymMat::elem(long int i,long int j) const { #ifdef _DEBUG - if( i<0 ) { std::cerr << "AlSymMat::elem: Index 1 < zero! " << i << std::endl; return *(m_ptr_data); }; - if( i>=size() ) { std::cerr << "AlSymMat::elem: Index 1 too large! " << i << std::endl; return *(m_ptr_data); }; - if( j<0 ) { std::cerr << "AlSymMat::elem: Index 2 < zero! " << j << std::endl; return *(m_ptr_data); }; - if( j>=size() ) { std::cerr << "AlSymMat::elem: Index 2 too large! " << j << std::endl; return *(m_ptr_data); }; + if( i<0 ) { throw std::out_of_range( "AlSymMat::elem: Index 1 < zero! " ); }; + if( i>=size() ) { throw std::out_of_range( "AlSymMat::elem: Index 1 too large! " ); }; + if( j<0 ) { throw std::out_of_range( "AlSymMat::elem: Index 2 < zero! " ); }; + if( j>=size() ) { throw std::out_of_range( "AlSymMat::elem: Index 2 too large! " ); }; #endif if( j<=i ) { return ((i+1)*i/2+j); diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlSymMatBase.h b/Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlSymMatBase.h index 2350b8e72e58..47353fe1a655 100644 --- a/Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlSymMatBase.h +++ b/Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlSymMatBase.h @@ -9,7 +9,7 @@ // modified from SiGlobalChi2AlgebrUtils::AlSymMatBase, modified to make // pure virtual -#include <iostream> +#include <exception> #include <map> #include <vector> @@ -119,8 +119,7 @@ inline AlSymMatBase::AlSymMatBase_row_const AlSymMatBase::operator[] (long int r inline double & AlSymMatBase::AlSymMatBase_row::operator[](long int c) { if(m_r<0||m_r>=m_a.nrow() || c<0||c>=m_a.ncol()) { - std::cerr << "Range error in AlSymMatBase::operator[][]" << std::endl; - return m_a.elemr(0,0); + throw std::out_of_range( "Range error in AlSymMatBase::operator[][]" ); } else { return m_a.elemr(m_r,c); } @@ -128,8 +127,7 @@ inline double & AlSymMatBase::AlSymMatBase_row::operator[](long int c) { inline double AlSymMatBase::AlSymMatBase_row_const::operator[](long int c) const { if(m_r<0||m_r>=m_a.nrow() || c<0||c>=m_a.ncol()) { - std::cerr << "Range error in AlSymMatBase::operator[][]" << std::endl; - return m_a.elemc(0,0); + throw std::out_of_range( "Range error in AlSymMatBase::operator[][]" ); } else { return m_a.elemc(m_r,c); } diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlVec.h b/Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlVec.h index 8e2bf3c0df7e..e32c8ca5c359 100644 --- a/Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlVec.h +++ b/Tracking/TrkAlignment/TrkAlgebraUtils/TrkAlgebraUtils/AlVec.h @@ -7,7 +7,7 @@ // PBdR (17Apr2007) -#include <iostream> +#include <exception> #include <map> #include <vector> @@ -91,13 +91,11 @@ inline double* AlVec::ptrData() const { inline double& AlVec::operator[](int i) { if( i < 0 ) { - std::cerr << "AlVec: Index < zero! " << std::endl; - return m_ptr_data[0]; + throw std::out_of_range( "AlVec: Index < zero! " ); } if( i >= m_size ) { - std::cerr << "AlVec: Index too large! " << std::endl; - return m_ptr_data[0]; + throw std::out_of_range( "AlVec: Index too large! "); } return *(m_ptr_data+i); @@ -105,13 +103,11 @@ inline double& AlVec::operator[](int i) { inline const double& AlVec::operator[](int i) const { if( i < 0 ) { - std::cerr << "AlVec: Index < zero! " << std::endl; - return m_ptr_data[0]; + throw std::out_of_range( "AlVec: Index < zero! " ); } if( i >= m_size ) { - std::cerr << "AlVec: Index too large! " << std::endl; - return m_ptr_data[0]; + throw std::out_of_range( "AlVec: Index too large! " ); } return *(m_ptr_data+i); diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlMat.cxx b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlMat.cxx index 47595af20259..ec817d14ce15 100644 --- a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlMat.cxx +++ b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlMat.cxx @@ -14,6 +14,7 @@ #include <fstream> #include <sstream> #include <stdint.h> +#include <exception> namespace Trk { @@ -55,8 +56,8 @@ void AlMat::copy(const AlMat& m) { int nr = nrow(); int nc = ncol(); if( nr != m.nrow() || nc != m.ncol() ) { - std::cerr << "AlMat::copy: sizes do not match!" << std::endl; - return; } + throw std::range_error( "AlMat::copy: sizes do not match!" ); + } for( int i=0; i<nr; i++ ) { for( int j=0; j<nc; j++ ) { @@ -68,8 +69,8 @@ void AlMat::copy(const AlMat& m) { void AlMat::copy(const AlSymMatBase& m) { long int n = m.size(); if( nrow() != n || ncol() != n ) { - std::cerr << "AlMat::copy: sizes do not match!" << std::endl; - return; } + throw std::range_error( "AlMat::copy: sizes do not match!" ); + } for( int i=0; i<n; i++ ) { for( int j=0; j<n; j++ ) { @@ -80,10 +81,10 @@ void AlMat::copy(const AlSymMatBase& m) { double& AlMat::elemr(long int i,long int j) { #ifdef _DEBUG - if( i<0 ) { std::cerr << "AlMat::elemr: Index 1 < zero! " << i << std::endl; return *(m_ptr_data); }; - if( i>=size ) { std::cerr << "AlMat::elemr: Index 1 too large! " << i << std::endl; return *(m_ptr_data); }; - if( j<0 ) { std::cerr << "AlMat::elemr: Index 2 < zero! " << j << std::endl; return *(m_ptr_data); }; - if( j>=size ) { std::cerr << "AlMat::elemr: Index 2 too large! " << j << std::endl; return *(m_ptr_data); }; + if( i<0 ) { throw std::out_of_range( "AlMat::elemr: Index 1 < zero! " ); }; + if( i>=size ) { throw std::out_of_range( "AlMat::elemr: Index 1 too large!" ); }; + if( j<0 ) { throw std::out_of_range( "AlMat::elemr: Index 2 < zero! " ); }; + if( j>=size ) { throw std::out_of_range( "AlMat::elemr: Index 2 too large!" ); }; #endif if( m_transpose ) return *(m_ptr_data+j*m_ncol+i); @@ -92,10 +93,10 @@ double& AlMat::elemr(long int i,long int j) { double AlMat::elemc(long int i,long int j) const { #ifdef _DEBUG - if( i<0 ) { std::cerr << "AlMat::elemc: Index 1 < zero! " << i << std::endl; return *(m_ptr_data); }; - if( i>=size ) { std::cerr << "AlMat::elemc: Index 1 too large! " << i << std::endl; return *(m_ptr_data); }; - if( j<0 ) { std::cerr << "AlMat::elemc: Index 2 < zero! " << j << std::endl; return *(m_ptr_data); }; - if( j>=size ) { std::cerr << "AlMat::elemc: Index 2 too large! " << j << std::endl; return *(m_ptr_data); }; + if( i<0 ) { throw std::out_of_range( "AlMat::elemr: Index 1 < zero! " ); }; + if( i>=size ) { throw std::out_of_range( "AlMat::elemr: Index 1 too large!" ); }; + if( j<0 ) { throw std::out_of_range( "AlMat::elemr: Index 2 < zero! " ); }; + if( j>=size ) { throw std::out_of_range( "AlMat::elemr: Index 2 too large!" ); }; #endif if( m_transpose ) return *(m_ptr_data+j*m_ncol+i); @@ -104,10 +105,10 @@ double AlMat::elemc(long int i,long int j) const { long int AlMat::elem(long int i,long int j) const { #ifdef _DEBUG - if( i<0 ) { std::cerr << "AlMat::elem: Index 1 < zero! " << i << std::endl; return *(m_ptr_data); }; - if( i>=size ) { std::cerr << "AlMat::elem: Index 1 too large! " << i << std::endl; return *(m_ptr_data); }; - if( j<0 ) { std::cerr << "AlMat::elem: Index 2 < zero! " << j << std::endl; return *(m_ptr_data); }; - if( j>=size ) { std::cerr << "AlMat::elem: Index 2 too large! " << j << std::endl; return *(m_ptr_data); }; + if( i<0 ) { throw std::out_of_range( "AlMat::elemr: Index 1 < zero! " ); }; + if( i>=size ) { throw std::out_of_range( "AlMat::elemr: Index 1 too large!" ); }; + if( j<0 ) { throw std::out_of_range( "AlMat::elemr: Index 2 < zero! " ); }; + if( j>=size ) { throw std::out_of_range( "AlMat::elemr: Index 2 too large!" ); }; #endif if( m_transpose ) return (j*m_ncol+i); @@ -127,7 +128,9 @@ AlMat& AlMat::operator=(const AlMat& m) { if (this==&m) return *this; if(( m_nrow!=0 || m_ncol!=0) && (m_nrow != m.nrow() || m_ncol != m.ncol() )) - { std::cerr << "AlMat=AlMat Assignment: size do not match!" << std::endl; return *this; } + { + throw std::range_error( "AlMat=AlMat Assignment: size do not match!" ); + } if ( m_ptr_data != m.m_ptr_data ) { reSize(m.nrow(), m.ncol()); @@ -138,7 +141,9 @@ AlMat& AlMat::operator=(const AlMat& m) { AlMat& AlMat::operator=(const AlSymMat& m) { if( ( m_nrow!=0 || m_ncol!=0) && (m_nrow != m.size() || m_ncol != m.size() )) - { std::cerr << "AlMat=AlSymMatBase Assignment: size do not match!" << std::endl; return *this; } + { + throw std::range_error( "AlMat=AlSymMatBase Assignment: size do not match!" ); + } if ( m_ptr_data != m.ptrData() ) { reSize(m.size(), m.size()); @@ -149,7 +154,9 @@ AlMat& AlMat::operator=(const AlSymMat& m) { AlMat AlMat::operator+(const AlMat& m) const { if( m_nrow != m.m_nrow || m_ncol != m.m_ncol ) - { std::cerr << "AlMat: operator+: size do not match!" << std::endl; return *this; } + { + throw std::range_error( "AlMat: operator+: size do not match!" ); + } AlMat b( m_nrow, m_ncol ); @@ -164,7 +171,9 @@ AlMat AlMat::operator+(const AlMat& m) const { AlMat& AlMat::operator+=(const AlMat& m) { if( m_nrow != m.m_nrow || m_ncol != m.m_ncol ) - { std::cerr << "AlMat: operator+=: size do not match!" << std::endl; return *this; } + { + throw std::range_error( "AlMat: operator+=: size do not match!" ); + } double* p = m_ptr_data + m_nele; double* q = m.m_ptr_data + m_nele; @@ -175,7 +184,9 @@ AlMat& AlMat::operator+=(const AlMat& m) { AlMat AlMat::operator-(const AlMat& m) const { if( m_nrow != m.m_nrow || m_ncol != m.m_ncol ) - { std::cerr << "AlMat: operator-: size do not match!" << std::endl; return *this; } + { + throw std::range_error( "AlMat: operator-: size do not match!" ); + } AlMat b( m_nrow, m_ncol ); @@ -189,7 +200,9 @@ AlMat AlMat::operator-(const AlMat& m) const { AlMat& AlMat::operator-=(const AlMat& m) { if( m_nrow != m.m_nrow || m_ncol != m.m_ncol ) - { std::cerr << "AlMat: operator-=: size do not match!" << std::endl; return *this; } + { + throw std::range_error( "AlMat: operator-=: size do not match!"); + } double* p = m_ptr_data + m_nele; double* q = m.m_ptr_data + m_nele; @@ -199,8 +212,10 @@ AlMat& AlMat::operator-=(const AlMat& m) { } AlMat AlMat::operator*(const AlMat& m) const { - if( ncol() != m.nrow() ) { std::cerr << "AlMat: operator*: size do not match!" << std::endl; - return m; } + if( ncol() != m.nrow() ) + { + throw std::range_error( "AlMat: operator*: size do not match!" ); + } int k(nrow()); int l(m.ncol()); @@ -216,8 +231,10 @@ AlMat AlMat::operator*(const AlMat& m) const { } AlMat AlMat::operator*(const AlSymMatBase& m) const { - if( ncol() != m.size()) { std::cerr << "AlMat: operator*: size do not match!" << std::endl; - return *this; } + if( ncol() != m.size()) + { + throw std::range_error( "AlMat: operator*: size do not match!" ); + } int k(nrow()); int l(m.size()); @@ -234,7 +251,9 @@ AlMat AlMat::operator*(const AlSymMatBase& m) const { AlVec AlMat::operator*(const AlVec& v) const { if( ncol() != v.size() ) - { std::cerr << "AlMat: operator*: size do not match! " << std::endl; return v; } + { + throw std::range_error( "AlMat: operator*: size do not match! " ); + } int k(nrow()); int l(ncol()); @@ -290,8 +309,7 @@ AlMat& AlMat::Normal() { //invert sym matrix declared as non-symetric for convenience void AlMat::invertS(int& ierr, double Norm = 1.) { if(m_nrow!=m_ncol) { - std::cerr << "AlMat invertS: non-square matrix!" << std::endl; - return; + throw std::range_error( "AlMat invertS: non-square matrix!" ); } AlSymMat b(m_nrow); diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx index e6b44061c29e..a8a508c04619 100644 --- a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx +++ b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx @@ -84,7 +84,7 @@ AlSpaMat::~AlSpaMat() void AlSpaMat::copy(const AlSpaMat& m) { if( size() != m.size()) { - throw std::length_error( "AlSpaMat::copy: size do not match!" ); + throw std::range_error( "AlSpaMat::copy: size do not match!" ); } m_ptr_map.clear(); m_nele=m.m_nele; @@ -96,7 +96,7 @@ void AlSpaMat::copy(const AlSpaMat& m) void AlSpaMat::copy(const AlSymMat& m) { if( size() != m.size()) { - throw std::length_error( "AlSpaMat::copy: size do not match!" ); + throw std::range_error( "AlSpaMat::copy: size do not match!" ); } m_ptr_map.clear(); m_nele=0; @@ -116,7 +116,7 @@ void AlSpaMat::copy(const AlSymMat& m) void AlSpaMat::copy(const AlMat& m) { if( size() != m.nrow() || size() != m.ncol() ) { - throw std::length_error( "AlSpaMat::copy: size do not match!" ); + throw std::range_error( "AlSpaMat::copy: size do not match!" ); } // copy just the lower triangle: @@ -139,16 +139,16 @@ double& AlSpaMat::elemr(long int i,long int j) { #ifdef _DEBUG if( i<0 ) { - throw std::range_error( "AlSpaMat::elemr: Index 1 < zero! " ); + throw std::out_of_range( "AlSpaMat::elemr: Index 1 < zero! " ); } if( i>=size() ) { - throw std::range_error( "AlSpaMat::elemr: Index 1 too large! " ); + throw std::out_of_range( "AlSpaMat::elemr: Index 1 too large! " ); } if( j<0 ) { - throw std::range_error( "AlSpaMat::elemr: Index 2 < zero! " ); + throw std::out_of_range( "AlSpaMat::elemr: Index 2 < zero! " ); } if( j>=size() ) { - throw std::range_error("AlSpaMat::elemr: Index 2 too large! " );; + throw std::out_of_range("AlSpaMat::elemr: Index 2 too large! " );; } #endif // try fast referencing: @@ -175,20 +175,16 @@ double AlSpaMat::elemc(long int i,long int j) const { #ifdef _DEBUG if( i<0 ) { - throw std::range_error( "AlSpaMat::elemc: Index 1 < zero! " ); - return 0.0; + throw std::out_of_range( "AlSpaMat::elemc: Index 1 < zero! " ); } if( i>=size() ) { - throw std::range_error( "AlSpaMat::elemc: Index 1 too large! " ); - return 0.0; + throw std::out_of_range( "AlSpaMat::elemc: Index 1 too large! " ); } if( j<0 ) { - throw std::range_error( "AlSpaMat::elemc: Index 2 < zero! " ); - return 0.0; + throw std::out_of_range( "AlSpaMat::elemc: Index 2 < zero! " ); } if( j>=size() ) { - throw std::range_error( "AlSpaMat::elemc: Index 2 too large! " ); - return 0.0; + throw std::out_of_range( "AlSpaMat::elemc: Index 2 too large! " ); } #endif // try fast referencing: @@ -210,16 +206,16 @@ indices AlSpaMat::elem(long int i,long int j) const // ATTENTION! the key value is returned: #ifdef _DEBUG if( i<0 ) { - throw std::range_error( "AlSpaMat::elem: Index 1 < zero! " ); + throw std::out_of_range( "AlSpaMat::elem: Index 1 < zero! " ); } if( i>=size() ) { - throw std::range_error( "AlSpaMat::elem: Index 1 too large! " ); + throw std::out_of_range( "AlSpaMat::elem: Index 1 too large! " ); } if( j<0 ) { - throw std::range_error( "AlSpaMat::elem: Index 2 < zero! " ); + throw std::out_of_range( "AlSpaMat::elem: Index 2 < zero! " ); } if( j>=size() ) { - throw std::range_error( "AlSpaMat::elem: Index 2 too large! " ); + throw std::out_of_range( "AlSpaMat::elem: Index 2 too large! " ); } #endif @@ -250,7 +246,7 @@ AlSpaMat& AlSpaMat::operator=(const AlSymMat& m) AlSpaMat& AlSpaMat::operator=(const AlMat& m) { if( m.nrow() != m.ncol() ) { - throw std::length_error( "AlSpaMat::=operator: allowed for square matrices only!" ); + throw std::range_error( "AlSpaMat::=operator: allowed for square matrices only!" ); } m_size=m.nrow(); @@ -272,7 +268,7 @@ AlSpaMat& AlSpaMat::operator=(const double& d) AlSpaMat AlSpaMat::operator+(const AlSpaMat& m) const { if( size() != m.size()) { - throw std::length_error( "AlSpaMat::operator+: size do not match!" ); + throw std::range_error( "AlSpaMat::operator+: size do not match!" ); } AlSpaMat b(m); @@ -288,7 +284,7 @@ AlSpaMat AlSpaMat::operator+(const AlSpaMat& m) const AlSpaMat& AlSpaMat::operator+=(const AlSpaMat& m) { if( size() != m.size()) { - throw std::length_error( "AlSpaMat::operator+=: size do not match!" ); + throw std::range_error( "AlSpaMat::operator+=: size do not match!" ); } const_mapiterator pos; @@ -303,7 +299,7 @@ AlSpaMat& AlSpaMat::operator+=(const AlSpaMat& m) AlSpaMat AlSpaMat::operator-(const AlSpaMat& m) const { if( size() != m.size()) { - throw std::length_error( "AlSpaMat::operator-: size do not match!" ); + throw std::range_error( "AlSpaMat::operator-: size do not match!" ); } AlSpaMat b(m); @@ -319,7 +315,7 @@ AlSpaMat AlSpaMat::operator-(const AlSpaMat& m) const AlSpaMat& AlSpaMat::operator-=(const AlSpaMat& m) { if( size() != m.size()) { - throw std::length_error( "AlSpaMat::operator-=: size do not match!" ); + throw std::range_error( "AlSpaMat::operator-=: size do not match!" ); } const_mapiterator pos; @@ -334,7 +330,7 @@ AlSpaMat& AlSpaMat::operator-=(const AlSpaMat& m) AlMat AlSpaMat::operator*(const AlSymMatBase& m) const { if( size() != m.size() ) { - throw std::length_error( "AlSpaMat::operator*: size do not match!" ); + throw std::range_error( "AlSpaMat::operator*: size do not match!" ); } long int isiz(size()); @@ -351,7 +347,7 @@ AlMat AlSpaMat::operator*(const AlSymMatBase& m) const //______________________________________________________________________________ AlMat AlSpaMat::operator*(const AlMat& m) const { if( size() != m.nrow() ) { - throw std::length_error( "AlSpaMat::operator*: size do not match!" ); + throw std::range_error( "AlSpaMat::operator*: size do not match!" ); } long int isiz(size()); @@ -370,7 +366,7 @@ AlMat AlSpaMat::operator*(const AlMat& m) const { AlVec AlSpaMat::operator*(const AlVec& v) const { if( size() != v.size() ) { - throw std::length_error( "AlSpaMat::operator*: size do not match! " ); + throw std::range_error( "AlSpaMat::operator*: size do not match! " ); } long int isiz(size()); @@ -413,7 +409,7 @@ double AlSpaMat::determinant() int AlSpaMat::SolveWithEigen(AlVec& RHS){ if(RHS.size() != size() ){ - throw std::length_error( "AlSpaMat::SolveWithEigen vector size is incorrect" ); + throw std::range_error( "AlSpaMat::SolveWithEigen vector size is incorrect" ); } Eigen::VectorXd eigenBigVector( RHS.size() ); @@ -560,7 +556,7 @@ int AlSpaMat::RemoveCollsRows(std::vector<int> indices) // remove rows and columns starting from largest indices for (int i=0;i<n;i++) { if (indices[i] > m_size-1) { - throw std::invalid_argument( "AlSpaMat::RemoveCollsRows: Index goes beyond matrix." ); + throw std::out_of_range( "AlSpaMat::RemoveCollsRows: Index goes beyond matrix." ); } RemoveDoF(indices[i]); } diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSymMat.cxx b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSymMat.cxx index 95cf4c4e84c5..249be984baa9 100644 --- a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSymMat.cxx +++ b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSymMat.cxx @@ -521,7 +521,7 @@ int AlSymMat::RemoveCollsRows(std::vector<int> indices) for (int i=0;i<n;i++) { int index = indices[i]; if (index > m_size-1) { - throw std::range_error("AlSymMat::RemoveCollsRows: Index goes beyond matrix."); + throw std::out_of_range("AlSymMat::RemoveCollsRows: Index goes beyond matrix."); } for (int j=index; j<m_size-1; j++) @@ -797,20 +797,16 @@ double& AlSymMat::elemr(long int i,long int j) { #ifdef _DEBUG if( i<0 ) { - std::cerr << "AlSymMat::elemr: Index 1 < zero! " << i << std::endl; - return *(m_ptr_data); + throw std::underflow_error( "AlSymMat::elemr: Index 1 < zero!" ); } if( i>=size() ) { - std::cerr << "AlSymMat::elemr: Index 1 too large! " << i << std::endl; - return *(m_ptr_data); + throw std::overflow_error( "AlSymMat::elemr: Index 1 too large!" ); } if( j<0 ) { - std::cerr << "AlSymMat::elemr: Index 2 < zero! " << j << std::endl; - return *(m_ptr_data); + throw std::underflow_error( "AlSymMat::elemr: Index 2 < zero!" ); } if( j>=size() ) { - std::cerr << "AlSymMat::elemr: Index 2 too large! " << j << std::endl; - return *(m_ptr_data); + throw std::overflow_error( "AlSymMat::elemr: Index 2 too large!" ); } #endif if( j<=i ) @@ -824,20 +820,16 @@ double AlSymMat::elemc(long int i,long int j) const { #ifdef _DEBUG if( i<0 ) { - std::cerr << "AlSymMat::elemc: Index 1 < zero! " << i << std::endl; - return *(m_ptr_data); + throw std::underflow_error( "AlSymMat::elemc: Index 1 < zero!" ); } if( i>=size() ) { - std::cerr << "AlSymMat::elemc: Index 1 too large! " << i << std::endl; - return *(m_ptr_data); + throw std::overflow_error( "AlSymMat::elemc: Index 1 too large!" ); } if( j<0 ) { - std::cerr << "AlSymMat::elemc: Index 2 < zero! " << j << std::endl; - return *(m_ptr_data); + throw std::underflow_error( "AlSymMat::elemc: Index 2 < zero!" ); } if( j>=size() ) { - std::cerr << "AlSymMat::elemc: Index 2 too large! " << j << std::endl; - return *(m_ptr_data); + throw std::overflow_error( "AlSymMat::elemc: Index 2 too large!" ); } #endif if( j<=i ) diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlVec.cxx b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlVec.cxx index b42c147e8926..c8e003ee053e 100644 --- a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlVec.cxx +++ b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlVec.cxx @@ -12,6 +12,7 @@ #include <fstream> #include <stdint.h> #include <math.h> +#include <exception> namespace Trk { @@ -53,8 +54,7 @@ AlVec::~AlVec() //______________________________________________________________________________ void AlVec::copy(const AlVec& v) { if(m_size!=v.m_size) { - std::cerr << "AlVec Assignment: size does not match!" << std::endl; - return; + throw std::range_error( "AlVec Assignment: size does not match!" ); } double* p = m_ptr_data + m_size; @@ -76,8 +76,7 @@ AlVec& AlVec::operator=(const AlVec& v) { if (this==&v) return *this; if(m_size!=0 && m_size!=v.m_size) { - std::cerr << "AlVec Assignment: size does not match!" << std::endl; - return *this; + throw std::range_error( "AlVec Assignment: size does not match!" ); } if ( m_ptr_data != v.m_ptr_data ) copy(v); @@ -88,8 +87,7 @@ AlVec& AlVec::operator=(const AlVec& v) { //______________________________________________________________________________ AlVec AlVec::operator+(const AlVec& v) const { if( m_size != v.m_size ) { - std::cerr << "operator+: vectors size does not match!" << std::endl; - return *this; + throw std::range_error( "operator+: vectors size does not match!" ); } AlVec b(m_size); @@ -105,8 +103,7 @@ AlVec AlVec::operator+(const AlVec& v) const { //______________________________________________________________________________ AlVec& AlVec::operator+=(const AlVec& v) { if( m_size != v.m_size ) { - std::cerr << "operator+=: vectors size does not match!" << std::endl; - return *this; + throw std::range_error( "operator+=: vectors size does not match!" ); } double* p = m_ptr_data + m_size; @@ -119,8 +116,7 @@ AlVec& AlVec::operator+=(const AlVec& v) { //______________________________________________________________________________ AlVec AlVec::operator-(const AlVec& v) const { if( m_size != v.m_size ) { - std::cerr << "operator-: vectors size does not match!" << std::endl; - return *this; + throw std::range_error( "operator-: vectors size does not match!" ); } AlVec b(m_size); @@ -136,8 +132,7 @@ AlVec AlVec::operator-(const AlVec& v) const { //______________________________________________________________________________ AlVec& AlVec::operator-=(const AlVec& v) { if( m_size != v.m_size ) { - std::cerr << "operator+=: vectors size does not match!" << std::endl; - return *this; + throw std::range_error( "operator+=: vectors size does not match!" ); } double* p = m_ptr_data + m_size; @@ -151,8 +146,7 @@ AlVec& AlVec::operator-=(const AlVec& v) { double AlVec::operator*(const AlVec& v) const { double b=0.; if( m_size != v.m_size ) { - std::cerr << "scalar product: vectors size does not match!" << std::endl; - return b; + throw std::range_error( "scalar product: vectors size does not match!" ); } double* p = m_ptr_data + m_size; @@ -165,8 +159,7 @@ double AlVec::operator*(const AlVec& v) const { //______________________________________________________________________________ AlVec AlVec::operator*(const AlMat& m) const { if (m_size != m.nrow()) { - std::cerr << "Left hand vector-matrix multiplication: size does not match!" << std::endl; - return *this; + throw std::range_error( "Left hand vector-matrix multiplication: size does not match!" ); } AlVec b(m.ncol()); @@ -180,8 +173,7 @@ AlVec AlVec::operator*(const AlMat& m) const { //______________________________________________________________________________ AlVec AlVec::operator*(const AlSymMatBase& m) const { if (m_size != m.size()) { - std::cerr << "Left hand vector-matrix multiplication: size does not match!" << std::endl; - return *this; + throw std::range_error( "Left hand vector-matrix multiplication: size does not match!" ); } AlVec b(m_size); @@ -267,12 +259,10 @@ int AlVec::RemoveElements(std::vector<int> indices) { int n = indices.size(); if (n==0) { - std::cerr<<"Vector of indices to remove is empty."<<std::endl; return m_size; } if (n>m_size) { - std::cerr<<"Vector of indices larger than matrix size."<<std::endl; - return m_size; + throw std::range_error( "Vector of indices larger than matrix size." ); } // first sort the list of indices descending @@ -289,7 +279,7 @@ int AlVec::RemoveElements(std::vector<int> indices) for (int i=0;i<n;i++) { int index = indices[i]; if (index > m_size-1) { - std::cerr<<"Index "<<index<<" goes beyond matrix (size "<<m_size<<")."<<std::endl; + throw std::out_of_range( "AlVec::RemoveElements: Index goes beyond matrix " ); continue; } @@ -487,15 +477,15 @@ StatusCode AlVec::InitializeOutputVector(const std::string& filename, bool binar StatusCode AlVec::ReadPartial(const std::string &filename, double &scale, std::map<int,unsigned long long> &modmap, float &version) { - bool stdUnits = true; - if (StatusCode::SUCCESS != CheckVecVersion(m_pathbin+filename, stdUnits)) { - std::cout<<"CheckVecVersion failed"<<std::endl; + bool StdUnits = true; + if (StatusCode::SUCCESS != CheckVecVersion(m_pathbin+filename, StdUnits)) { + //std::cout<<"CheckVecVersion failed"<<std::endl; return StatusCode::FAILURE; } std::ifstream invec((m_pathbin+filename).c_str(), std::ios::binary); if(invec.fail()) { - std::cout<<"ifstream failed"<<std::endl; + //std::cout<<"ifstream failed"<<std::endl; return StatusCode::FAILURE; } @@ -568,6 +558,7 @@ StatusCode AlVec::Read(const std::string &filename, double &scale, bool stdUnits = true; if (StatusCode::SUCCESS != CheckVecVersion(m_pathbin+filename, stdUnits)) { std::cout<<"CheckVecVersion failed"<<std::endl; + //std::cout<<"CheckVecVersion failed"<<std::endl; return StatusCode::FAILURE; } diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/src/IntVec.cxx b/Tracking/TrkAlignment/TrkAlgebraUtils/src/IntVec.cxx index 69dce01ea023..b9dbfde12b1b 100644 --- a/Tracking/TrkAlignment/TrkAlgebraUtils/src/IntVec.cxx +++ b/Tracking/TrkAlignment/TrkAlgebraUtils/src/IntVec.cxx @@ -6,6 +6,7 @@ #include "TrkAlgebraUtils/IntVec.h" #include <iostream> #include <stdint.h> +#include <exception> namespace Trk { @@ -40,8 +41,7 @@ IntVec::~IntVec(){ IntVec& IntVec::operator=(const IntVec& v) { if(m_Nele!=0 && m_Nele!=v.m_Nele) { - std::cerr << "IntVec Assignment: size does not match!" << std::endl; - return *this; + throw std::range_error( "IntVec Assignment: size does not match!" ); } if ( m_ptr_data != v.m_ptr_data ) { @@ -55,12 +55,10 @@ IntVec& IntVec::operator=(const IntVec& v) { int& IntVec::operator[](int i) { if(i<0) { - std::cerr << "IntVec: Index < zero! " << std::endl; - return m_ptr_data[0]; + throw std::out_of_range( "IntVec: Index < zero! " ); } else if(i>=m_Nele) { - std::cerr << "IntVec: Index too large! " << std::endl; - return m_ptr_data[0]; + throw std::out_of_range( "IntVec: Index too large! " ); } return *(m_ptr_data+i); @@ -68,12 +66,10 @@ int& IntVec::operator[](int i) { const int& IntVec::operator[](int i) const { if(i<0) { - std::cerr << "IntVec: Index < zero! " << std::endl; - return m_ptr_data[0]; + throw std::out_of_range( "IntVec: Index < zero! " ); } else if(i>=m_Nele) { - std::cerr << "IntVec: Index too large! " << std::endl; - return m_ptr_data[0]; + throw std::out_of_range( "IntVec: Index too large! " ); } return *(m_ptr_data+i); @@ -81,8 +77,7 @@ const int& IntVec::operator[](int i) const { IntVec IntVec::operator+(const IntVec& v) { if( m_Nele != v.m_Nele ) { - std::cerr << "operator+: vectors size does not match!" << std::endl; - return *this; + throw std::range_error( "operator+: vectors size does not match!" ); } IntVec b(m_Nele); @@ -94,8 +89,7 @@ IntVec IntVec::operator+(const IntVec& v) { IntVec& IntVec::operator+=(const IntVec& v) { if( m_Nele != v.m_Nele ) { - std::cerr << "operator+=: vectors size does not match!" << std::endl; - return *this; + throw std::range_error( "operator+=: vectors size does not match!" ); } for (int i=0;i<m_Nele;i++) @@ -106,8 +100,7 @@ IntVec& IntVec::operator+=(const IntVec& v) { IntVec IntVec::operator-(const IntVec& v) { if( m_Nele != v.m_Nele ) { - std::cerr << "operator+: vectors size does not match!" << std::endl; - return *this; + throw std::range_error( "operator+: vectors size does not match!" ); } IntVec b(m_Nele); @@ -119,8 +112,7 @@ IntVec IntVec::operator-(const IntVec& v) { IntVec& IntVec::operator-=(const IntVec& v) { if( m_Nele != v.m_Nele ) { - std::cerr << "operator+=: vectors size does not match!" << std::endl; - return *this; + throw std::range_error( "operator+=: vectors size does not match!" ); } for (int i=0;i<m_Nele;i++) -- GitLab From 24fb6146f53e1f429a280a71ca414ee02f58189b Mon Sep 17 00:00:00 2001 From: amorley <anthony.morley@cern.ch> Date: Thu, 14 Jun 2018 07:42:42 +0200 Subject: [PATCH 151/562] Correct Cherry pick error Former-commit-id: ed0d41b70380272e88472910b3beeeff64addf54 --- Tracking/TrkAlignment/TrkAlgebraUtils/src/AlVec.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlVec.cxx b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlVec.cxx index c8e003ee053e..8e466e45825d 100644 --- a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlVec.cxx +++ b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlVec.cxx @@ -477,8 +477,8 @@ StatusCode AlVec::InitializeOutputVector(const std::string& filename, bool binar StatusCode AlVec::ReadPartial(const std::string &filename, double &scale, std::map<int,unsigned long long> &modmap, float &version) { - bool StdUnits = true; - if (StatusCode::SUCCESS != CheckVecVersion(m_pathbin+filename, StdUnits)) { + bool stdUnits = true; + if (StatusCode::SUCCESS != CheckVecVersion(m_pathbin+filename, stdUnits)) { //std::cout<<"CheckVecVersion failed"<<std::endl; return StatusCode::FAILURE; } -- GitLab From 83cda41e77b296da0cf5e453275179572f75e23b Mon Sep 17 00:00:00 2001 From: Roger Felipe Naranjo Garcia <roger.naranjo@cern.ch> Date: Thu, 14 Jun 2018 12:36:29 +0200 Subject: [PATCH 152/562] Initializing rootHistSvc pointer Former-commit-id: 6758bd6a7aeef2b6e1f3e13e7de003db06e7160e --- Reconstruction/egamma/egammaValidation/src/EgammaMonitoring.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Reconstruction/egamma/egammaValidation/src/EgammaMonitoring.h b/Reconstruction/egamma/egammaValidation/src/EgammaMonitoring.h index 187bb06aee7a..31263799a815 100644 --- a/Reconstruction/egamma/egammaValidation/src/EgammaMonitoring.h +++ b/Reconstruction/egamma/egammaValidation/src/EgammaMonitoring.h @@ -45,8 +45,8 @@ class EgammaMonitoring : public AthAlgorithm public: /// Tools and services /// - ITHistSvc* rootHistSvc; - + ITHistSvc* rootHistSvc = nullptr; + egammaMonitoring::EffIDPlots Eff_ID ; egammaMonitoring::EffRecPlots Eff_Reco; -- GitLab From d31ae9636bf97accaea81e41cf2d37e52088f552 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Thu, 14 Jun 2018 16:04:27 +0200 Subject: [PATCH 153/562] CaloRec: Remove old cmt workaround. Remove old workaround that disabled the pedestal correction if the AtlasTrigger cmt project wasn't available. Not needed (and doesn't work) with the cmake builds. (This was already fixed in r21 some time ago.) Former-commit-id: 14fe85a90a546b8635113d19b3ecf7ce89b41e1e --- Calorimeter/CaloRec/python/CaloCellGetter.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Calorimeter/CaloRec/python/CaloCellGetter.py b/Calorimeter/CaloRec/python/CaloCellGetter.py index ffeb7bb2398c..701f4d03b162 100644 --- a/Calorimeter/CaloRec/python/CaloCellGetter.py +++ b/Calorimeter/CaloRec/python/CaloCellGetter.py @@ -492,8 +492,7 @@ class CaloCellGetter (Configured) : doPedestalCorr = True mlog.info("Apply cell level pedestal shift correction") - import os - if doPedestalCorr and os.getenv("CMTPATH") and "AtlasTrigger" in os.getenv("CMTPATH"): + if doPedestalCorr: try: from CaloCellCorrection.CaloCellPedestalCorrDefault import CaloCellPedestalCorrDefault theCaloCellPedestalCorr = CaloCellPedestalCorrDefault() -- GitLab From 1f4fa385c3a8e97dc3ce54aa50866f03f8097835 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Thu, 14 Jun 2018 16:38:34 +0200 Subject: [PATCH 154/562] CaloCellCorrection: Change CaloCellRandomizer to use AthRNGSvc. Working to make interfaces const. Former-commit-id: b8c9a0a926f74ad2134ce4991b46f146e344d06e --- .../CaloCellCorrection/CaloCellRandomizer.h | 15 ++++-- .../src/CaloCellRandomizer.cxx | 48 +++++++++++-------- 2 files changed, 37 insertions(+), 26 deletions(-) diff --git a/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellRandomizer.h b/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellRandomizer.h index d18dadb47d48..6c9ee72b7826 100644 --- a/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellRandomizer.h +++ b/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellRandomizer.h @@ -8,7 +8,9 @@ #include "CaloUtils/CaloCellCorrection.h" #include "CaloInterface/ICalorimeterNoiseTool.h" +#include "AthenaKernel/IAthRNGSvc.h" #include "GaudiKernel/ToolHandle.h" +#include "GaudiKernel/ServiceHandle.h" //class CaloCell; //class ICalorimeterNoiseTool; @@ -20,14 +22,14 @@ class CaloCellRandomizer : public CaloCellCorrection public: CaloCellRandomizer(const std::string& type, - const std::string& name, - const IInterface* parent); + const std::string& name, + const IInterface* parent); virtual ~CaloCellRandomizer() {}; - virtual StatusCode initialize(); + virtual StatusCode initialize() override; - void MakeCorrection(CaloCell* theCell); + virtual void MakeCorrection (CaloCell* theCell) override; private: @@ -49,7 +51,10 @@ private: float m_shift_TileGap; float m_shift_TileExt; float m_shift_FCAL; - + + ServiceHandle<IAthRNGSvc> m_athRNGSvc; + std::string m_randomStream; + ATHRNG::RNGWrapper* m_randomEngine; }; #endif diff --git a/Calorimeter/CaloCellCorrection/src/CaloCellRandomizer.cxx b/Calorimeter/CaloCellCorrection/src/CaloCellRandomizer.cxx index 2701d790c204..f4d49f600c3b 100644 --- a/Calorimeter/CaloCellCorrection/src/CaloCellRandomizer.cxx +++ b/Calorimeter/CaloCellCorrection/src/CaloCellRandomizer.cxx @@ -10,17 +10,12 @@ // **************************************************************************************** #include "CaloCellCorrection/CaloCellRandomizer.h" - -#include "GaudiKernel/RndmGenerators.h" -#include "GaudiKernel/IRndmGenSvc.h" - - #include "CaloEvent/CaloCell.h" #include "CaloDetDescr/CaloDetDescrElement.h" -//#include "CaloUtils/ICaloNoiseTool.h" #include "CaloInterface/ICalorimeterNoiseTool.h" - -#include <CLHEP/Random/Randomize.h> +#include "AthenaKernel/RNGWrapper.h" +#include "GaudiKernel/ThreadLocalContext.h" +#include "CLHEP/Random/Randomize.h" using CLHEP::RandGauss; @@ -33,8 +28,9 @@ CaloCellRandomizer::CaloCellRandomizer( const std::string& name, const IInterface* parent) : CaloCellCorrection(type, name, parent), - m_noiseTool("undefined"), m_corrSampleMin(0),m_corrSampleMax(0),m_fractionSigma(1),m_GaussRand(false),m_GaussRandGroupedSamples(false),m_GaussRandShifted(false),m_GaussRandShifted_Custom(false), m_shift_EMB(1),m_shift_EMEC(1),m_shift_HEC(1),m_shift_TileBar(1),m_shift_TileGap(1),m_shift_TileExt(1),m_shift_FCAL(1) - + m_noiseTool("undefined"), m_corrSampleMin(0),m_corrSampleMax(0),m_fractionSigma(1),m_GaussRand(false),m_GaussRandGroupedSamples(false),m_GaussRandShifted(false),m_GaussRandShifted_Custom(false), m_shift_EMB(1),m_shift_EMEC(1),m_shift_HEC(1),m_shift_TileBar(1),m_shift_TileGap(1),m_shift_TileExt(1),m_shift_FCAL(1), + m_athRNGSvc ("AthRNGSvc", name), + m_randomEngine (nullptr) { declareInterface<CaloCellCorrection>(this); declareProperty("noiseTool",m_noiseTool,"Tool Handle for noise tool"); @@ -54,7 +50,8 @@ CaloCellRandomizer::CaloCellRandomizer( declareProperty("CustomShiftTileGap",m_shift_TileGap); declareProperty("CustomShiftTileExt",m_shift_TileExt); declareProperty("CustomShiftFCAL",m_shift_FCAL); - + declareProperty("AthRNGSvc", m_athRNGSvc); + declareProperty("RandomStream", m_randomStream = "CaloCellRandomizer"); } //======================================================== @@ -66,15 +63,23 @@ StatusCode CaloCellRandomizer::initialize() ATH_CHECK( m_noiseTool.retrieve() ); ATH_MSG_INFO( "Noise Tool retrieved" ); ATH_MSG_INFO( "CaloCellRandomizer initialize() end" ); + ATH_CHECK( m_athRNGSvc.retrieve() ); + m_randomEngine = m_athRNGSvc->getEngine (this, m_randomStream); + if (!m_randomEngine) { + ATH_MSG_ERROR("Could not get random number engine from AthRNGSvc. Abort."); + return StatusCode::FAILURE; + } return StatusCode::SUCCESS; } // ============================================================================ -void CaloCellRandomizer::MakeCorrection(CaloCell* theCell) +void CaloCellRandomizer::MakeCorrection (CaloCell* theCell) { - + const EventContext& ctx = Gaudi::Hive::currentContext(); + CLHEP::HepRandomEngine* engine = m_randomEngine->getEngine (ctx); + int sampl = 0; float Gauss = 0; float GaussShifted = 0; @@ -83,10 +88,11 @@ void CaloCellRandomizer::MakeCorrection(CaloCell* theCell) sampl=caloDDE->getSampling(); //CaloNoiseTool + // FIXME: CaloNoiseTool doesn't have const interfaces. double SigmaNoise = m_noiseTool->getNoise(theCell,ICalorimeterNoiseTool::ELECTRONICNOISE); - Gauss = RandGauss::shoot(0.,1.); + Gauss = RandGauss::shoot(engine, 0.,1.); GaussShifted = Gauss+m_fractionSigma; @@ -104,31 +110,31 @@ void CaloCellRandomizer::MakeCorrection(CaloCell* theCell) if(m_GaussRandShifted_Custom){//var if (sampl<4){ - GaussShifted = RandGauss::shoot(m_shift_EMB*SigmaNoise,SigmaNoise); + GaussShifted = RandGauss::shoot(engine, m_shift_EMB*SigmaNoise,SigmaNoise); setenergy(theCell,(GaussShifted)); } if (sampl>3 && sampl<8){ - GaussShifted = RandGauss::shoot(m_shift_EMEC*SigmaNoise,SigmaNoise); + GaussShifted = RandGauss::shoot(engine, m_shift_EMEC*SigmaNoise,SigmaNoise); setenergy(theCell,(GaussShifted)); } if (sampl>7 && sampl<12){ - GaussShifted = RandGauss::shoot(m_shift_HEC*SigmaNoise,SigmaNoise); + GaussShifted = RandGauss::shoot(engine, m_shift_HEC*SigmaNoise,SigmaNoise); setenergy(theCell,(GaussShifted)); } if (sampl>11 && sampl<15){ - GaussShifted = RandGauss::shoot(m_shift_TileBar*SigmaNoise,SigmaNoise); + GaussShifted = RandGauss::shoot(engine, m_shift_TileBar*SigmaNoise,SigmaNoise); setenergy(theCell,(GaussShifted)); } if (sampl>14 && sampl<18){ - GaussShifted = RandGauss::shoot(m_shift_TileGap*SigmaNoise,SigmaNoise); + GaussShifted = RandGauss::shoot(engine, m_shift_TileGap*SigmaNoise,SigmaNoise); setenergy(theCell,(GaussShifted)); } if (sampl>17 && sampl<21){ - GaussShifted = RandGauss::shoot(m_shift_TileExt*SigmaNoise,SigmaNoise); + GaussShifted = RandGauss::shoot(engine, m_shift_TileExt*SigmaNoise,SigmaNoise); setenergy(theCell,(GaussShifted)); } if (sampl>20 && sampl<24){ - GaussShifted = RandGauss::shoot(m_shift_FCAL*SigmaNoise,SigmaNoise); + GaussShifted = RandGauss::shoot(engine, m_shift_FCAL*SigmaNoise,SigmaNoise); setenergy(theCell,(GaussShifted)); } -- GitLab From 40fa59d9a75ce189c58ebc9ce06f100ac0f85c3a Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Thu, 14 Jun 2018 16:42:17 +0200 Subject: [PATCH 155/562] CaloCondPhysAlgs: Move headers to src. Headers in this package are not used from any other package. Move them to src. Also don't need to depend on LArRecUtils/LArHVCorrTool. Former-commit-id: 833da0551a89c2f26cf45c4e2be5b0b456ae9aaf --- Calorimeter/CaloCondPhysAlgs/CMakeLists.txt | 4 +--- .../src/CaloAddCellPedShift.cxx | 7 +------ .../CaloAddCellPedShift.h | 4 ++-- .../src/CaloCellCalcEnergyCorr.cxx | 2 +- .../CaloCellCalcEnergyCorr.h | 0 .../src/CaloCellEnergyCorr2Ntuple.cxx | 7 +------ .../CaloCellEnergyCorr2Ntuple.h | 0 .../CaloCondPhysAlgs/src/CaloCellNoiseAlg.cxx | 7 +------ .../CaloCellNoiseAlg.h | 4 ++-- .../src/CaloCellPosition2Ntuple.cxx | 2 +- .../CaloCellPosition2Ntuple.h | 4 ++-- .../src/CaloFillCellPositionShift.cxx | 4 +--- .../CaloFillCellPositionShift.h | 4 ++-- .../CaloCondPhysAlgs/src/CaloNoise2Ntuple.cxx | 7 +------ .../CaloNoise2Ntuple.h | 4 ++-- .../CaloCondPhysAlgs/src/CaloRescaleNoise.cxx | 7 +------ .../CaloRescaleNoise.h | 4 ++-- .../src/FCAL_HV_Energy_Rescale.cxx | 2 +- .../FCAL_HV_Energy_Rescale.h | 2 +- .../CaloCondPhysAlgs/src/LArMinBiasAlg.cxx | 4 +--- .../{CaloCondPhysAlgs => src}/LArMinBiasAlg.h | 0 .../components/CaloCondPhysAlgs_entries.cxx | 20 +++++++++---------- 22 files changed, 34 insertions(+), 65 deletions(-) rename Calorimeter/CaloCondPhysAlgs/{CaloCondPhysAlgs => src}/CaloAddCellPedShift.h (95%) rename Calorimeter/CaloCondPhysAlgs/{CaloCondPhysAlgs => src}/CaloCellCalcEnergyCorr.h (100%) rename Calorimeter/CaloCondPhysAlgs/{CaloCondPhysAlgs => src}/CaloCellEnergyCorr2Ntuple.h (100%) rename Calorimeter/CaloCondPhysAlgs/{CaloCondPhysAlgs => src}/CaloCellNoiseAlg.h (97%) rename Calorimeter/CaloCondPhysAlgs/{CaloCondPhysAlgs => src}/CaloCellPosition2Ntuple.h (93%) rename Calorimeter/CaloCondPhysAlgs/{CaloCondPhysAlgs => src}/CaloFillCellPositionShift.h (93%) rename Calorimeter/CaloCondPhysAlgs/{CaloCondPhysAlgs => src}/CaloNoise2Ntuple.h (95%) rename Calorimeter/CaloCondPhysAlgs/{CaloCondPhysAlgs => src}/CaloRescaleNoise.h (95%) rename Calorimeter/CaloCondPhysAlgs/{CaloCondPhysAlgs => src}/FCAL_HV_Energy_Rescale.h (96%) rename Calorimeter/CaloCondPhysAlgs/{CaloCondPhysAlgs => src}/LArMinBiasAlg.h (100%) diff --git a/Calorimeter/CaloCondPhysAlgs/CMakeLists.txt b/Calorimeter/CaloCondPhysAlgs/CMakeLists.txt index c4f92fbd6362..6ffbc0f566b7 100644 --- a/Calorimeter/CaloCondPhysAlgs/CMakeLists.txt +++ b/Calorimeter/CaloCondPhysAlgs/CMakeLists.txt @@ -19,7 +19,6 @@ atlas_depends_on_subdirs( PUBLIC LArCalorimeter/LArCabling LArCalorimeter/LArElecCalib LArCalorimeter/LArIdentifier - LArCalorimeter/LArRecUtils Trigger/TrigAnalysis/TrigDecisionTool PRIVATE Calorimeter/CaloConditions @@ -44,10 +43,9 @@ atlas_add_component( CaloCondPhysAlgs src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} ${COOL_LIBRARIES} ${CLHEP_LIBRARIES} CaloCondBlobObjs CaloDetDescrLib CaloGeoHelpers CaloIdentifier AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel LArCablingLib LArIdentifier LArRecUtilsLib TrigDecisionToolLib CaloConditions CaloEvent CaloUtilsLib AthenaPoolUtilities Identifier EventInfo xAODEventInfo LArHV LArReadoutGeometry LArSimEvent ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} ${COOL_LIBRARIES} ${CLHEP_LIBRARIES} CaloCondBlobObjs CaloDetDescrLib CaloGeoHelpers CaloIdentifier AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel LArCablingLib LArIdentifier TrigDecisionToolLib CaloConditions CaloEvent CaloUtilsLib AthenaPoolUtilities Identifier EventInfo xAODEventInfo LArHV LArReadoutGeometry LArSimEvent ) # Install files from the package: -atlas_install_headers( CaloCondPhysAlgs ) atlas_install_python_modules( python/*.py ) atlas_install_joboptions( share/*.py ) atlas_install_scripts( share/CaloRescaleNoiseHV.sh share/CaloNoise_fillDB.py share/CaloPedestalShift.sh share/CaloPedestal_fillDB.py ) diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloAddCellPedShift.cxx b/Calorimeter/CaloCondPhysAlgs/src/CaloAddCellPedShift.cxx index 5288170f80d4..a7131c74677f 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/CaloAddCellPedShift.cxx +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloAddCellPedShift.cxx @@ -2,12 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "CaloCondPhysAlgs/CaloAddCellPedShift.h" -#include "GaudiKernel/Property.h" -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/NTuple.h" -#include "GaudiKernel/ListItem.h" -#include "GaudiKernel/IToolSvc.h" +#include "CaloAddCellPedShift.h" #include "CaloIdentifier/CaloGain.h" #include "CaloEvent/CaloCell.h" #include "Identifier/Identifier.h" diff --git a/Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/CaloAddCellPedShift.h b/Calorimeter/CaloCondPhysAlgs/src/CaloAddCellPedShift.h similarity index 95% rename from Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/CaloAddCellPedShift.h rename to Calorimeter/CaloCondPhysAlgs/src/CaloAddCellPedShift.h index 0ef192384043..2b74ca932bb1 100644 --- a/Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/CaloAddCellPedShift.h +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloAddCellPedShift.h @@ -5,8 +5,8 @@ // CaloAddCellPedShift.h // -#ifndef _CaloCondPhysAlgs_CaloAddCellPedShift_H -#define _CaloCondPhysAlgs_CaloAddCellPedShift_H +#ifndef CALOCONDPHYSALGS_CALOADDCELLPEDSHIFT_H +#define CALOCONDPHYSALGS_CALOADDCELLPEDSHIFT_H #include <string> diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloCellCalcEnergyCorr.cxx b/Calorimeter/CaloCondPhysAlgs/src/CaloCellCalcEnergyCorr.cxx index d5fb733779b4..5ef8c309475d 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/CaloCellCalcEnergyCorr.cxx +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloCellCalcEnergyCorr.cxx @@ -9,7 +9,7 @@ /////////////////////////////////////////////////////////////////// // CaloCondPhysAlgs includes -#include "CaloCondPhysAlgs/CaloCellCalcEnergyCorr.h" +#include "CaloCellCalcEnergyCorr.h" #include "CaloIdentifier/CaloCell_ID.h" #include "AthenaKernel/errorcheck.h" #include "GaudiKernel/ToolHandle.h" diff --git a/Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/CaloCellCalcEnergyCorr.h b/Calorimeter/CaloCondPhysAlgs/src/CaloCellCalcEnergyCorr.h similarity index 100% rename from Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/CaloCellCalcEnergyCorr.h rename to Calorimeter/CaloCondPhysAlgs/src/CaloCellCalcEnergyCorr.h diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloCellEnergyCorr2Ntuple.cxx b/Calorimeter/CaloCondPhysAlgs/src/CaloCellEnergyCorr2Ntuple.cxx index f34ea9cb0877..318e2bb6c4e1 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/CaloCellEnergyCorr2Ntuple.cxx +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloCellEnergyCorr2Ntuple.cxx @@ -2,12 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "CaloCondPhysAlgs/CaloCellEnergyCorr2Ntuple.h" -#include "GaudiKernel/Property.h" -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/NTuple.h" -#include "GaudiKernel/ListItem.h" -#include "GaudiKernel/IToolSvc.h" +#include "CaloCellEnergyCorr2Ntuple.h" #include "CaloIdentifier/CaloGain.h" #include "CaloEvent/CaloCell.h" #include "Identifier/Identifier.h" diff --git a/Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/CaloCellEnergyCorr2Ntuple.h b/Calorimeter/CaloCondPhysAlgs/src/CaloCellEnergyCorr2Ntuple.h similarity index 100% rename from Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/CaloCellEnergyCorr2Ntuple.h rename to Calorimeter/CaloCondPhysAlgs/src/CaloCellEnergyCorr2Ntuple.h diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloCellNoiseAlg.cxx b/Calorimeter/CaloCondPhysAlgs/src/CaloCellNoiseAlg.cxx index e77d8355eb64..80562f4d8f50 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/CaloCellNoiseAlg.cxx +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloCellNoiseAlg.cxx @@ -2,12 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "CaloCondPhysAlgs/CaloCellNoiseAlg.h" -#include "GaudiKernel/Property.h" -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/NTuple.h" -#include "GaudiKernel/ListItem.h" -#include "GaudiKernel/IToolSvc.h" +#include "CaloCellNoiseAlg.h" #include "CaloIdentifier/CaloGain.h" #include "CaloEvent/CaloCell.h" #include "CaloEvent/CaloCellContainer.h" diff --git a/Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/CaloCellNoiseAlg.h b/Calorimeter/CaloCondPhysAlgs/src/CaloCellNoiseAlg.h similarity index 97% rename from Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/CaloCellNoiseAlg.h rename to Calorimeter/CaloCondPhysAlgs/src/CaloCellNoiseAlg.h index 1e2022a12e44..86e9f39b4c54 100644 --- a/Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/CaloCellNoiseAlg.h +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloCellNoiseAlg.h @@ -5,8 +5,8 @@ // TheCaloCellNoiseAlg.h // -#ifndef _CaloCondBlobAlgs_CaloCellNoiseAlg_H -#define _CaloCondBlobAlgs_CaloCellNoiseAlg_H +#ifndef CALOCONDPHYSALGS_CALOCELLNOISEALG_H +#define CALOCONDPHYSALGS_CALOCELLNOISEALG_H #include <string> diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloCellPosition2Ntuple.cxx b/Calorimeter/CaloCondPhysAlgs/src/CaloCellPosition2Ntuple.cxx index 1c27df98c740..7ab172f7eecc 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/CaloCellPosition2Ntuple.cxx +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloCellPosition2Ntuple.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "CaloCondPhysAlgs/CaloCellPosition2Ntuple.h" +#include "CaloCellPosition2Ntuple.h" #include "CaloIdentifier/CaloIdManager.h" #include "CaloDetDescr/CaloDetDescrManager.h" #include "CaloDetDescr/CaloDetDescrElement.h" diff --git a/Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/CaloCellPosition2Ntuple.h b/Calorimeter/CaloCondPhysAlgs/src/CaloCellPosition2Ntuple.h similarity index 93% rename from Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/CaloCellPosition2Ntuple.h rename to Calorimeter/CaloCondPhysAlgs/src/CaloCellPosition2Ntuple.h index 3b1e0da87903..2edca0543c55 100644 --- a/Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/CaloCellPosition2Ntuple.h +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloCellPosition2Ntuple.h @@ -5,8 +5,8 @@ // CaloCellPosition2Ntuple.h // -#ifndef _CaloCondPhysAlgs_CaloCellPosition2Ntuple_H -#define _CaloCondPhysAlgs_CaloCellPosition2Ntuple_H +#ifndef CALOCONDPHYSALGS_CALOCELLPOSITION2NTUPLE_H +#define CALOCONDPHYSALGS_CALOCELLPOSITION2NTUPLE_H #include <string> diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloFillCellPositionShift.cxx b/Calorimeter/CaloCondPhysAlgs/src/CaloFillCellPositionShift.cxx index bcbbb41aa635..fc3b2988ee2a 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/CaloFillCellPositionShift.cxx +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloFillCellPositionShift.cxx @@ -2,9 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "CaloCondPhysAlgs/CaloFillCellPositionShift.h" -#include "GaudiKernel/Property.h" -#include "GaudiKernel/MsgStream.h" +#include "CaloFillCellPositionShift.h" #include "CaloIdentifier/CaloIdManager.h" #include "CaloDetDescr/CaloDetDescrManager.h" diff --git a/Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/CaloFillCellPositionShift.h b/Calorimeter/CaloCondPhysAlgs/src/CaloFillCellPositionShift.h similarity index 93% rename from Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/CaloFillCellPositionShift.h rename to Calorimeter/CaloCondPhysAlgs/src/CaloFillCellPositionShift.h index ab6c21f46af6..2f0b054e117f 100644 --- a/Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/CaloFillCellPositionShift.h +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloFillCellPositionShift.h @@ -6,8 +6,8 @@ // // -#ifndef _CaloCondPhysAlgs_CaloFillCellPositionShift_H -#define _CaloCondPhysAlgs_CaloFillCellPositionShift_H +#ifndef CALOCONDPHYSALGS_CALOFILLCELLPOSITIONSHIFT_H +#define CALOCONDPHYSALGS_CALOFILLCELLPOSITIONSHIFT_H #include <string> diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloNoise2Ntuple.cxx b/Calorimeter/CaloCondPhysAlgs/src/CaloNoise2Ntuple.cxx index ec2572629333..5b1bc6b2a695 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/CaloNoise2Ntuple.cxx +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloNoise2Ntuple.cxx @@ -2,12 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "CaloCondPhysAlgs/CaloNoise2Ntuple.h" -#include "GaudiKernel/Property.h" -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/NTuple.h" -#include "GaudiKernel/ListItem.h" -#include "GaudiKernel/IToolSvc.h" +#include "CaloNoise2Ntuple.h" #include "CaloIdentifier/CaloGain.h" #include "CaloEvent/CaloCell.h" #include "Identifier/Identifier.h" diff --git a/Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/CaloNoise2Ntuple.h b/Calorimeter/CaloCondPhysAlgs/src/CaloNoise2Ntuple.h similarity index 95% rename from Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/CaloNoise2Ntuple.h rename to Calorimeter/CaloCondPhysAlgs/src/CaloNoise2Ntuple.h index aaad378b4d4e..263ee5b7ea3b 100644 --- a/Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/CaloNoise2Ntuple.h +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloNoise2Ntuple.h @@ -5,8 +5,8 @@ // CaloNoise2Ntuple.h // -#ifndef _CaloCondPhysAlgs_CaloNoise2Ntuple_H -#define _CaloCondPhysAlgs_CaloNoise2Ntuple_H +#ifndef CALOCONDPHYSALGS_CALONOISE2NTUPLE_H +#define CALOCONDPHYSALGS_CALONOISE2NTUPLE_H #include <string> diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloRescaleNoise.cxx b/Calorimeter/CaloCondPhysAlgs/src/CaloRescaleNoise.cxx index 540ba47b057e..aed5b266fed7 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/CaloRescaleNoise.cxx +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloRescaleNoise.cxx @@ -2,12 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "CaloCondPhysAlgs/CaloRescaleNoise.h" -#include "GaudiKernel/Property.h" -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/NTuple.h" -#include "GaudiKernel/ListItem.h" -#include "GaudiKernel/IToolSvc.h" +#include "CaloRescaleNoise.h" #include "CaloIdentifier/CaloGain.h" #include "CaloEvent/CaloCell.h" #include "Identifier/Identifier.h" diff --git a/Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/CaloRescaleNoise.h b/Calorimeter/CaloCondPhysAlgs/src/CaloRescaleNoise.h similarity index 95% rename from Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/CaloRescaleNoise.h rename to Calorimeter/CaloCondPhysAlgs/src/CaloRescaleNoise.h index 0554dc486001..0d39f15b69a9 100644 --- a/Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/CaloRescaleNoise.h +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloRescaleNoise.h @@ -5,8 +5,8 @@ // CaloRescaleNoise.h // -#ifndef _CaloCondPhysAlgs_CaloRescaleNoise_H -#define _CaloCondPhysAlgs_CaloRescaleNoise_H +#ifndef CALOCONDPHYSALGS_CALORESCALENOISE_H +#define CALOCONDPHYSALGS_CALORESCALENOISE_H #include <string> diff --git a/Calorimeter/CaloCondPhysAlgs/src/FCAL_HV_Energy_Rescale.cxx b/Calorimeter/CaloCondPhysAlgs/src/FCAL_HV_Energy_Rescale.cxx index 20cf2f02eaa7..50b7fdd82f74 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/FCAL_HV_Energy_Rescale.cxx +++ b/Calorimeter/CaloCondPhysAlgs/src/FCAL_HV_Energy_Rescale.cxx @@ -10,7 +10,7 @@ /////////////////////////////////////////////////////////////////// // CaloCondPhysAlgs includes -#include "CaloCondPhysAlgs/FCAL_HV_Energy_Rescale.h" +#include "FCAL_HV_Energy_Rescale.h" #include "CaloIdentifier/CaloCell_ID.h" #include "AthenaKernel/errorcheck.h" //#include "LArElecCalib/ILArHVCorrTool.h" diff --git a/Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/FCAL_HV_Energy_Rescale.h b/Calorimeter/CaloCondPhysAlgs/src/FCAL_HV_Energy_Rescale.h similarity index 96% rename from Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/FCAL_HV_Energy_Rescale.h rename to Calorimeter/CaloCondPhysAlgs/src/FCAL_HV_Energy_Rescale.h index ca2f53a51022..652ee80e6e27 100644 --- a/Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/FCAL_HV_Energy_Rescale.h +++ b/Calorimeter/CaloCondPhysAlgs/src/FCAL_HV_Energy_Rescale.h @@ -9,7 +9,7 @@ // FrameWork includes #include "AthenaBaseComps/AthAlgorithm.h" #include "GaudiKernel/ToolHandle.h" -#include "LArRecUtils/LArHVCorrTool.h" +#include "LArElecCalib/ILArHVCorrTool.h" class FCAL_HV_Energy_Rescale: public AthAlgorithm { diff --git a/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.cxx b/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.cxx index 3c9b3c36cf40..0789cbd1338c 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.cxx +++ b/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.cxx @@ -2,9 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "CaloCondPhysAlgs/LArMinBiasAlg.h" -#include "GaudiKernel/Property.h" -#include "GaudiKernel/MsgStream.h" +#include "LArMinBiasAlg.h" #include "EventInfo/EventID.h" #include "EventInfo/EventInfo.h" diff --git a/Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/LArMinBiasAlg.h b/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.h similarity index 100% rename from Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/LArMinBiasAlg.h rename to Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.h diff --git a/Calorimeter/CaloCondPhysAlgs/src/components/CaloCondPhysAlgs_entries.cxx b/Calorimeter/CaloCondPhysAlgs/src/components/CaloCondPhysAlgs_entries.cxx index 243022a612b8..d1c48bfe7856 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/components/CaloCondPhysAlgs_entries.cxx +++ b/Calorimeter/CaloCondPhysAlgs/src/components/CaloCondPhysAlgs_entries.cxx @@ -1,13 +1,13 @@ -#include "CaloCondPhysAlgs/CaloCellNoiseAlg.h" -#include "CaloCondPhysAlgs/CaloNoise2Ntuple.h" -#include "CaloCondPhysAlgs/CaloRescaleNoise.h" -#include "CaloCondPhysAlgs/CaloFillCellPositionShift.h" -#include "CaloCondPhysAlgs/CaloCellPosition2Ntuple.h" -#include "CaloCondPhysAlgs/CaloAddCellPedShift.h" -#include "CaloCondPhysAlgs/FCAL_HV_Energy_Rescale.h" -#include "CaloCondPhysAlgs/CaloCellCalcEnergyCorr.h" -#include "CaloCondPhysAlgs/CaloCellEnergyCorr2Ntuple.h" -#include "CaloCondPhysAlgs/LArMinBiasAlg.h" +#include "../CaloCellNoiseAlg.h" +#include "../CaloNoise2Ntuple.h" +#include "../CaloRescaleNoise.h" +#include "../CaloFillCellPositionShift.h" +#include "../CaloCellPosition2Ntuple.h" +#include "../CaloAddCellPedShift.h" +#include "../FCAL_HV_Energy_Rescale.h" +#include "../CaloCellCalcEnergyCorr.h" +#include "../CaloCellEnergyCorr2Ntuple.h" +#include "../LArMinBiasAlg.h" DECLARE_COMPONENT( CaloCellNoiseAlg ) DECLARE_COMPONENT( CaloNoise2Ntuple ) -- GitLab From d41d35613ea4a58fc4d8651b4a14f2299d59e669 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Thu, 14 Jun 2018 16:44:45 +0200 Subject: [PATCH 156/562] LArCafJobs: Remove explicit dependency on LArRecUtils. Don't need to depend on LArRecUtils/LArOFPeakRecoTool. Former-commit-id: 120ca464d305b9fe71aa57e96fbbceb7fd01b4b5 --- LArCalorimeter/LArCafJobs/CMakeLists.txt | 11 +++++------ LArCalorimeter/LArCafJobs/LArCafJobs/LArShapeDumper.h | 1 - 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/LArCalorimeter/LArCafJobs/CMakeLists.txt b/LArCalorimeter/LArCafJobs/CMakeLists.txt index 8eda3109556d..62367617a981 100644 --- a/LArCalorimeter/LArCafJobs/CMakeLists.txt +++ b/LArCalorimeter/LArCafJobs/CMakeLists.txt @@ -19,7 +19,6 @@ atlas_depends_on_subdirs( PUBLIC LArCalorimeter/LArIdentifier LArCalorimeter/LArRawConditions LArCalorimeter/LArRawEvent - LArCalorimeter/LArRecUtils LArCalorimeter/LArRecConditions LArCalorimeter/LArCabling LArCalorimeter/LArCabling @@ -76,29 +75,29 @@ atlas_add_library( LArCafJobsLib src/LArHECNoise.cxx PUBLIC_HEADERS LArCafJobs PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} - LINK_LIBRARIES CaloIdentifier AthenaBaseComps SGTools GaudiKernel LArIdentifier LArRawConditions LArRawEvent egammaEvent TrigSteeringEvent McParticleEvent StoreGateLib SGtests LArRecUtilsLib LArToolsLib TrigDecisionToolLib CaloDetDescrLib + LINK_LIBRARIES CaloIdentifier AthenaBaseComps SGTools GaudiKernel LArIdentifier LArRawConditions LArRawEvent egammaEvent TrigSteeringEvent McParticleEvent StoreGateLib SGtests LArToolsLib TrigDecisionToolLib CaloDetDescrLib PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} DataQualityUtils Identifier xAODEventInfo LArRecConditions TrigConfHLTData TrigT1Result ${HEPMC_LIBRARIES} ) atlas_add_component( LArCafJobs src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloIdentifier AthenaBaseComps SGTools StoreGateLib SGtests GaudiKernel LArIdentifier LArRawConditions LArRawEvent egammaEvent LArRecUtilsLib LArToolsLib TrigDecisionToolLib TrigSteeringEvent CaloDetDescrLib DataQualityUtils Identifier xAODEventInfo LArRecConditions TrigConfHLTData TrigT1Result LArCafJobsLib ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloIdentifier AthenaBaseComps SGTools StoreGateLib SGtests GaudiKernel LArIdentifier LArRawConditions LArRawEvent egammaEvent LArToolsLib TrigDecisionToolLib TrigSteeringEvent CaloDetDescrLib DataQualityUtils Identifier xAODEventInfo LArRecConditions TrigConfHLTData TrigT1Result LArCafJobsLib ) atlas_add_dictionary( LArCafJobsDict LArCafJobs/LArCafJobsDict.h LArCafJobs/selection.xml INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloIdentifier AthenaBaseComps SGTools StoreGateLib SGtests GaudiKernel LArIdentifier LArRawConditions LArRawEvent LArRecUtilsLib LArToolsLib TrigDecisionToolLib TrigSteeringEvent CaloDetDescrLib DataQualityUtils Identifier xAODEventInfo LArRecConditions TrigConfHLTData TrigT1Result LArCafJobsLib ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloIdentifier AthenaBaseComps SGTools StoreGateLib SGtests GaudiKernel LArIdentifier LArRawConditions LArRawEvent LArToolsLib TrigDecisionToolLib TrigSteeringEvent CaloDetDescrLib DataQualityUtils Identifier xAODEventInfo LArRecConditions TrigConfHLTData TrigT1Result LArCafJobsLib ) atlas_add_executable( LArQuickHistMerge src/LArQuickHistMerge.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloIdentifier AthenaBaseComps SGTools StoreGateLib SGtests GaudiKernel LArIdentifier LArRawConditions LArRawEvent LArRecUtilsLib LArToolsLib TrigDecisionToolLib TrigSteeringEvent CaloDetDescrLib DataQualityUtils Identifier xAODEventInfo LArRecConditions TrigConfHLTData TrigT1Result LArCafJobsLib ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloIdentifier AthenaBaseComps SGTools StoreGateLib SGtests GaudiKernel LArIdentifier LArRawConditions LArRawEvent LArToolsLib TrigDecisionToolLib TrigSteeringEvent CaloDetDescrLib DataQualityUtils Identifier xAODEventInfo LArRecConditions TrigConfHLTData TrigT1Result LArCafJobsLib ) atlas_add_executable( LArSamplesMerge src/LArSamplesMerge.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloIdentifier AthenaBaseComps SGTools StoreGateLib SGtests GaudiKernel LArIdentifier LArRawConditions LArRawEvent LArRecUtilsLib LArToolsLib TrigDecisionToolLib TrigSteeringEvent CaloDetDescrLib DataQualityUtils Identifier xAODEventInfo LArRecConditions TrigConfHLTData TrigT1Result LArCafJobsLib ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloIdentifier AthenaBaseComps SGTools StoreGateLib SGtests GaudiKernel LArIdentifier LArRawConditions LArRawEvent LArToolsLib TrigDecisionToolLib TrigSteeringEvent CaloDetDescrLib DataQualityUtils Identifier xAODEventInfo LArRecConditions TrigConfHLTData TrigT1Result LArCafJobsLib ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/LArCalorimeter/LArCafJobs/LArCafJobs/LArShapeDumper.h b/LArCalorimeter/LArCafJobs/LArCafJobs/LArShapeDumper.h index aa3a2e834107..810e432dd092 100755 --- a/LArCalorimeter/LArCafJobs/LArCafJobs/LArShapeDumper.h +++ b/LArCalorimeter/LArCafJobs/LArCafJobs/LArShapeDumper.h @@ -17,7 +17,6 @@ #include "LArRawEvent/LArRawChannelContainer.h" #include "LArCafJobs/DataStore.h" #include "LArRawConditions/LArPhysWaveContainer.h" -#include "LArRecUtils/LArOFPeakRecoTool.h" #include "LArCabling/LArCablingService.h" #include "CaloIdentifier/LArEM_ID.h" #include "CaloIdentifier/LArHEC_ID.h" -- GitLab From ad767d4f39b79b0e7ad2c1553ace98b909a7cdf6 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Thu, 14 Jun 2018 16:46:59 +0200 Subject: [PATCH 157/562] LArMonTools: Remove explicit dependency on LArRecUtils. Don't need to depend on LArRecUtils/LArHVCorrTool. Former-commit-id: bac6d305915e865530722406de2ff5de5c97d1b0 --- LArCalorimeter/LArMonTools/CMakeLists.txt | 4 +- .../LArMonTools/src/LArAffectedRegions.cxx | 19 ++++---- .../{LArMonTools => src}/LArAffectedRegions.h | 4 +- .../src/LArCollisionTimeMonTool.cxx | 21 ++++----- .../LArCollisionTimeMonTool.h | 4 +- .../LArMonTools/src/LArCosmicsMonTool.cxx | 8 +--- .../{LArMonTools => src}/LArCosmicsMonTool.h | 4 +- .../LArMonTools/src/LArCoverage.cxx | 19 +++----- .../{LArMonTools => src}/LArCoverage.h | 9 ++-- .../LArMonTools/src/LArCoverageFCALBins.cxx | 2 +- .../LArCoverageFCALBins.h | 4 +- .../LArMonTools/src/LArDigitMon.cxx | 23 +++++----- .../{LArMonTools => src}/LArDigitMon.h | 7 +-- LArCalorimeter/LArMonTools/src/LArFEBMon.cxx | 14 ++---- .../{LArMonTools => src}/LArFEBMon.h | 20 +++------ .../src/LArHVCorrectionMonTool.cxx | 18 +++----- .../LArHVCorrectionMonTool.h | 10 ++--- .../LArMonTools/src/LArNoisyROMon.cxx | 4 +- .../{LArMonTools => src}/LArNoisyROMon.h | 4 +- .../LArMonTools/src/LArOnlineIDStrHelper.cxx | 9 ++-- .../LArOnlineIDStrHelper.h | 4 +- .../LArOnlineIDStrHelper.icc | 0 .../LArMonTools/src/LArRODMonTool.cxx | 4 +- .../{LArMonTools => src}/LArRODMonTool.h | 4 +- .../LArMonTools/src/LArRawChannelMonTool.cxx | 45 ++++++++++--------- .../LArRawChannelMonTool.h | 21 ++++----- .../LArMonTools/src/LArRawChannelMonTools.cxx | 12 ++--- .../LArRawChannelMonTools.h | 14 +++--- .../LArMonTools/src/LWHistFactory.h | 6 +-- .../SelectAllLArRawChannels.h | 0 .../src/components/LArMonTools_entries.cxx | 22 ++++----- 31 files changed, 153 insertions(+), 186 deletions(-) rename LArCalorimeter/LArMonTools/{LArMonTools => src}/LArAffectedRegions.h (95%) rename LArCalorimeter/LArMonTools/{LArMonTools => src}/LArCollisionTimeMonTool.h (96%) rename LArCalorimeter/LArMonTools/{LArMonTools => src}/LArCosmicsMonTool.h (97%) rename LArCalorimeter/LArMonTools/{LArMonTools => src}/LArCoverage.h (96%) rename LArCalorimeter/LArMonTools/{LArMonTools => src}/LArCoverageFCALBins.h (94%) rename LArCalorimeter/LArMonTools/{LArMonTools => src}/LArDigitMon.h (98%) rename LArCalorimeter/LArMonTools/{LArMonTools => src}/LArFEBMon.h (93%) rename LArCalorimeter/LArMonTools/{LArMonTools => src}/LArHVCorrectionMonTool.h (93%) rename LArCalorimeter/LArMonTools/{LArMonTools => src}/LArNoisyROMon.h (98%) rename LArCalorimeter/LArMonTools/{LArMonTools => src}/LArOnlineIDStrHelper.h (98%) rename LArCalorimeter/LArMonTools/{LArMonTools => src}/LArOnlineIDStrHelper.icc (100%) rename LArCalorimeter/LArMonTools/{LArMonTools => src}/LArRODMonTool.h (99%) rename LArCalorimeter/LArMonTools/{LArMonTools => src}/LArRawChannelMonTool.h (98%) rename LArCalorimeter/LArMonTools/{LArMonTools => src}/LArRawChannelMonTools.h (99%) rename LArCalorimeter/LArMonTools/{LArMonTools => src}/SelectAllLArRawChannels.h (100%) diff --git a/LArCalorimeter/LArMonTools/CMakeLists.txt b/LArCalorimeter/LArMonTools/CMakeLists.txt index 4388811795af..a043566aef49 100644 --- a/LArCalorimeter/LArMonTools/CMakeLists.txt +++ b/LArCalorimeter/LArMonTools/CMakeLists.txt @@ -20,7 +20,6 @@ atlas_depends_on_subdirs( PUBLIC LArCalorimeter/LArIdentifier LArCalorimeter/LArRawEvent LArCalorimeter/LArRecConditions - LArCalorimeter/LArRecUtils LArCalorimeter/LArCabling Tools/LWHists Trigger/TrigAnalysis/TrigDecisionTool @@ -44,10 +43,9 @@ atlas_add_component( LArMonTools src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CaloDetDescrLib CaloGeoHelpers CaloIdentifier AthenaMonitoringLib StoreGateLib SGtests Identifier GaudiKernel LArIdentifier LArRawEvent LArRecConditions LArRecUtilsLib LArCablingLib LWHists TrigDecisionToolLib CaloConditions AthenaKernel AthenaPoolUtilities xAODEventInfo LArCOOLConditions LArRawConditions LArRecEvent ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CaloDetDescrLib CaloGeoHelpers CaloIdentifier AthenaMonitoringLib StoreGateLib SGtests Identifier GaudiKernel LArIdentifier LArRawEvent LArRecConditions LArCablingLib LWHists TrigDecisionToolLib CaloConditions AthenaKernel AthenaPoolUtilities xAODEventInfo LArCOOLConditions LArRawConditions LArRecEvent ) # Install files from the package: -atlas_install_headers( LArMonTools ) atlas_install_python_modules( python/*.py ) atlas_install_joboptions( share/*.txt share/*.py ) diff --git a/LArCalorimeter/LArMonTools/src/LArAffectedRegions.cxx b/LArCalorimeter/LArMonTools/src/LArAffectedRegions.cxx index ea82bd6057e8..2f4df703d971 100644 --- a/LArCalorimeter/LArMonTools/src/LArAffectedRegions.cxx +++ b/LArCalorimeter/LArMonTools/src/LArAffectedRegions.cxx @@ -13,9 +13,14 @@ // built from "Affected Region" metadata, stored in ESDs. // ******************************************************************** -#include "GaudiKernel/ISvcLocator.h" -#include "GaudiKernel/ITHistSvc.h" -#include "GaudiKernel/IToolSvc.h" +#include "LArAffectedRegions.h" + +#include "LWHists/TH2I_LW.h" +#include "LWHists/TProfile_LW.h" +#include "TMath.h" +#include "TString.h" + +#include "CaloConditions/CaloAffectedRegionInfoVec.h" #include <sstream> #include <iomanip> @@ -27,14 +32,6 @@ #include <map> #include <utility> -#include "LWHists/TH2I_LW.h" -#include "LWHists/TProfile_LW.h" -#include "TMath.h" -#include "TString.h" - -#include "CaloConditions/CaloAffectedRegionInfoVec.h" -#include "LArMonTools/LArAffectedRegions.h" - using namespace std; /*---------------------------------------------------------*/ diff --git a/LArCalorimeter/LArMonTools/LArMonTools/LArAffectedRegions.h b/LArCalorimeter/LArMonTools/src/LArAffectedRegions.h similarity index 95% rename from LArCalorimeter/LArMonTools/LArMonTools/LArAffectedRegions.h rename to LArCalorimeter/LArMonTools/src/LArAffectedRegions.h index 1a15aa740c3d..b309cf870147 100644 --- a/LArCalorimeter/LArMonTools/LArMonTools/LArAffectedRegions.h +++ b/LArCalorimeter/LArMonTools/src/LArAffectedRegions.h @@ -8,8 +8,8 @@ * */ -#ifndef LARAFFECTEDREGIONS_H -#define LARAFFECTEDREGIONS_H +#ifndef LARMONTOOLS_LARAFFECTEDREGIONS_H +#define LARMONTOOLS_LARAFFECTEDREGIONS_H #include "AthenaMonitoring/ManagedMonitorToolBase.h" #include "StoreGate/StoreGateSvc.h" diff --git a/LArCalorimeter/LArMonTools/src/LArCollisionTimeMonTool.cxx b/LArCalorimeter/LArMonTools/src/LArCollisionTimeMonTool.cxx index 2936265cc0a6..a9ec23252c01 100755 --- a/LArCalorimeter/LArMonTools/src/LArCollisionTimeMonTool.cxx +++ b/LArCalorimeter/LArMonTools/src/LArCollisionTimeMonTool.cxx @@ -15,6 +15,17 @@ // ******************************************************************** +#include "LArCollisionTimeMonTool.h" + +#include "LWHists/TH1F_LW.h" +#include "LWHists/TH2F_LW.h" + +#include "LArRecEvent/LArCollisionTime.h" + +#include "xAODEventInfo/EventInfo.h" + +#include "TrigAnalysisInterfaces/IBunchCrossingTool.h" + #include <sstream> #include <iomanip> #include <fstream> @@ -26,16 +37,6 @@ #include <utility> #include <algorithm> -#include "LWHists/TH1F_LW.h" -#include "LWHists/TH2F_LW.h" - -#include "LArMonTools/LArCollisionTimeMonTool.h" -#include "LArRecEvent/LArCollisionTime.h" - -#include "xAODEventInfo/EventInfo.h" - -#include "TrigAnalysisInterfaces/IBunchCrossingTool.h" - using namespace std; /*---------------------------------------------------------*/ diff --git a/LArCalorimeter/LArMonTools/LArMonTools/LArCollisionTimeMonTool.h b/LArCalorimeter/LArMonTools/src/LArCollisionTimeMonTool.h similarity index 96% rename from LArCalorimeter/LArMonTools/LArMonTools/LArCollisionTimeMonTool.h rename to LArCalorimeter/LArMonTools/src/LArCollisionTimeMonTool.h index 4cb0f7d9ba46..68d6391e2211 100755 --- a/LArCalorimeter/LArMonTools/LArMonTools/LArCollisionTimeMonTool.h +++ b/LArCalorimeter/LArMonTools/src/LArCollisionTimeMonTool.h @@ -8,8 +8,8 @@ * */ -#ifndef LAR_COLLISION_TIME_MON_TOOL_H -#define LAR_COLLISION_TIME_MON_TOOL_H +#ifndef LARMONTOOLS_LARCOLLISIONTIMEMONTOOL_H +#define LARMONTOOLS_LARCOLLISIONTIMEMONTOOL_H #include "AthenaMonitoring/ManagedMonitorToolBase.h" diff --git a/LArCalorimeter/LArMonTools/src/LArCosmicsMonTool.cxx b/LArCalorimeter/LArMonTools/src/LArCosmicsMonTool.cxx index 07d72079b51e..7a9431e26358 100755 --- a/LArCalorimeter/LArMonTools/src/LArCosmicsMonTool.cxx +++ b/LArCalorimeter/LArMonTools/src/LArCosmicsMonTool.cxx @@ -15,11 +15,7 @@ // // ******************************************************************** -//#include "GaudiKernel/MsgStream.h" -//#include "AthenaMonitoring/LogFileMsgStream.h" -//#include "GaudiKernel/ISvcLocator.h" -//#include "GaudiKernel/ITHistSvc.h" -//#include "GaudiKernel/IToolSvc.h" +#include "LArCosmicsMonTool.h" #include "Identifier/IdentifierHash.h" @@ -33,8 +29,6 @@ #include <map> #include <utility> -#include "LArMonTools/LArCosmicsMonTool.h" - using namespace std; // To create a map containing seeds and their energy diff --git a/LArCalorimeter/LArMonTools/LArMonTools/LArCosmicsMonTool.h b/LArCalorimeter/LArMonTools/src/LArCosmicsMonTool.h similarity index 97% rename from LArCalorimeter/LArMonTools/LArMonTools/LArCosmicsMonTool.h rename to LArCalorimeter/LArMonTools/src/LArCosmicsMonTool.h index 76f5e4744b6f..8403bfa4137a 100755 --- a/LArCalorimeter/LArMonTools/LArMonTools/LArCosmicsMonTool.h +++ b/LArCalorimeter/LArMonTools/src/LArCosmicsMonTool.h @@ -8,8 +8,8 @@ * */ -#ifndef LARCOSMICSMONTOOL_H -#define LARCOSMICSMONTOOL_H +#ifndef LARMONTOOLS_LARCOSMICSMONTOOL_H +#define LARMONTOOLS_LARCOSMICSMONTOOL_H #include "AthenaMonitoring/ManagedMonitorToolBase.h" #include "Identifier/HWIdentifier.h" diff --git a/LArCalorimeter/LArMonTools/src/LArCoverage.cxx b/LArCalorimeter/LArMonTools/src/LArCoverage.cxx index de0a65c39cf3..2d623571c3de 100755 --- a/LArCalorimeter/LArMonTools/src/LArCoverage.cxx +++ b/LArCalorimeter/LArMonTools/src/LArCoverage.cxx @@ -15,12 +15,16 @@ // Bad calibration at FEB level // ******************************************************************** -#include "GaudiKernel/ISvcLocator.h" -#include "GaudiKernel/ITHistSvc.h" -#include "GaudiKernel/IToolSvc.h" +#include "LArCoverage.h" +#include "LArCoverageFCALBins.h" #include "Identifier/IdentifierHash.h" +#include "LWHists/TH2I_LW.h" +#include "LWHists/TProfile_LW.h" +#include "TMath.h" +#include "xAODEventInfo/EventInfo.h" + #include <sstream> #include <iomanip> #include <fstream> @@ -31,15 +35,6 @@ #include <map> #include <utility> -#include "LWHists/TH2I_LW.h" -#include "LWHists/TProfile_LW.h" -#include "TMath.h" -#include "xAODEventInfo/EventInfo.h" - - -#include "LArMonTools/LArCoverage.h" -#include "LArMonTools/LArCoverageFCALBins.h" - using namespace std; /*---------------------------------------------------------*/ diff --git a/LArCalorimeter/LArMonTools/LArMonTools/LArCoverage.h b/LArCalorimeter/LArMonTools/src/LArCoverage.h similarity index 96% rename from LArCalorimeter/LArMonTools/LArMonTools/LArCoverage.h rename to LArCalorimeter/LArMonTools/src/LArCoverage.h index 84e8e49f61e5..42e364cf4acb 100644 --- a/LArCalorimeter/LArMonTools/LArMonTools/LArCoverage.h +++ b/LArCalorimeter/LArMonTools/src/LArCoverage.h @@ -8,8 +8,11 @@ * */ -#ifndef LARCOVERAGE_H -#define LARCOVERAGE_H +#ifndef LARMONTOOLS_LARCOVERAGE_H +#define LARMONTOOLS_LARCOVERAGE_H + +#include "SelectAllLArRawChannels.h" +#include "LArOnlineIDStrHelper.h" #include "AthenaMonitoring/ManagedMonitorToolBase.h" #include "CaloIdentifier/CaloGain.h" @@ -24,8 +27,6 @@ #include "Identifier/HWIdentifier.h" #include "LArIdentifier/LArOnlineID.h" -#include "LArMonTools/SelectAllLArRawChannels.h" -#include "LArMonTools/LArOnlineIDStrHelper.h" #include "LArRawEvent/LArRawChannel.h" #include "LArRawEvent/LArRawChannelContainer.h" #include "EventContainers/SelectAllObject.h" diff --git a/LArCalorimeter/LArMonTools/src/LArCoverageFCALBins.cxx b/LArCalorimeter/LArMonTools/src/LArCoverageFCALBins.cxx index 88ad25456d6d..ad03df06cbfb 100644 --- a/LArCalorimeter/LArMonTools/src/LArCoverageFCALBins.cxx +++ b/LArCalorimeter/LArMonTools/src/LArCoverageFCALBins.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArMonTools/LArCoverageFCALBins.h" +#include "LArCoverageFCALBins.h" int LArCoverageFCALBins::getXBins(int /*iSide*/, int iSamp) { static const int nbinsXFCAL[] = {240,216,200}; diff --git a/LArCalorimeter/LArMonTools/LArMonTools/LArCoverageFCALBins.h b/LArCalorimeter/LArMonTools/src/LArCoverageFCALBins.h similarity index 94% rename from LArCalorimeter/LArMonTools/LArMonTools/LArCoverageFCALBins.h rename to LArCalorimeter/LArMonTools/src/LArCoverageFCALBins.h index 16aa7cd4b11b..53f49a0ddb8b 100644 --- a/LArCalorimeter/LArMonTools/LArMonTools/LArCoverageFCALBins.h +++ b/LArCalorimeter/LArMonTools/src/LArCoverageFCALBins.h @@ -31,8 +31,8 @@ * */ -#ifndef LARCOVERAGEFCALBINS_H -#define LARCOVERAGEFCALBINS_H +#ifndef LARMONTOOLS_LARCOVERAGEFCALBINS_H +#define LARMONTOOLS_LARCOVERAGEFCALBINS_H class LArCoverageFCALBins { diff --git a/LArCalorimeter/LArMonTools/src/LArDigitMon.cxx b/LArCalorimeter/LArMonTools/src/LArDigitMon.cxx index 6c68b1724247..2c5958868f64 100755 --- a/LArCalorimeter/LArMonTools/src/LArDigitMon.cxx +++ b/LArCalorimeter/LArMonTools/src/LArDigitMon.cxx @@ -26,8 +26,10 @@ // c) ADCsature: lowest value to check if a Digit sample is in saturation. // ******************************************************************** +#include "LArDigitMon.h" +#include "LArOnlineIDStrHelper.h" + //Histograms -#include "GaudiKernel/ITHistSvc.h" #include "LWHists/TProfile2D_LW.h" #include "LWHists/TProfile_LW.h" @@ -36,16 +38,8 @@ #include "LWHists/TH1F_LW.h" #include "LWHists/TH2F_LW.h" -//STL: -#include <sstream> -#include <iomanip> -#include <cmath> -#include <vector> -#include <algorithm> - //LAr infos: #include "Identifier/HWIdentifier.h" -#include "LArMonTools/LArOnlineIDStrHelper.h" #include "LArCabling/LArCablingService.h" #include "LArIdentifier/LArOnlineID.h" #include "LArRawEvent/LArDigit.h" @@ -55,12 +49,15 @@ //Events infos: #include "xAODEventInfo/EventInfo.h" - -//Header: -#include "LArMonTools/LArDigitMon.h" - #include "LArTrigStreamMatching.h" +//STL: +#include <sstream> +#include <iomanip> +#include <cmath> +#include <vector> +#include <algorithm> + /*---------------------------------------------------------*/ LArDigitMon::LArDigitMon(const std::string& type, const std::string& name, diff --git a/LArCalorimeter/LArMonTools/LArMonTools/LArDigitMon.h b/LArCalorimeter/LArMonTools/src/LArDigitMon.h similarity index 98% rename from LArCalorimeter/LArMonTools/LArMonTools/LArDigitMon.h rename to LArCalorimeter/LArMonTools/src/LArDigitMon.h index 78cbad774d84..fa9c6bcce1b8 100755 --- a/LArCalorimeter/LArMonTools/LArMonTools/LArDigitMon.h +++ b/LArCalorimeter/LArMonTools/src/LArDigitMon.h @@ -8,8 +8,8 @@ * */ -#ifndef LARDIGITMON_H -#define LARDIGITMON_H +#ifndef LARMONTOOLS_LARDIGITMON_H +#define LARMONTOOLS_LARDIGITMON_H //inheritance: #include "AthenaMonitoring/ManagedMonitorToolBase.h" @@ -24,7 +24,7 @@ //STL: #include <string> -//class LArEM_ID; +class LArEM_ID; class LArOnlineID; class HWIdentifier; class LArOnlineIDStrHelper; @@ -33,6 +33,7 @@ class TProfile2D_LW; class TProfile_LW; class LWHist1D; +class LWHist2D; class TH1F_LW; class TH1I_LW; class TH2F_LW; diff --git a/LArCalorimeter/LArMonTools/src/LArFEBMon.cxx b/LArCalorimeter/LArMonTools/src/LArFEBMon.cxx index dafde3522f29..9c50a695e97a 100755 --- a/LArCalorimeter/LArMonTools/src/LArFEBMon.cxx +++ b/LArCalorimeter/LArMonTools/src/LArFEBMon.cxx @@ -12,10 +12,7 @@ // 2007- : Algorithm fully rewritten and optimized by B.Trocme // ******************************************************************** -//#include "GaudiKernel/SmartDataPtr.h" -//#include "GaudiKernel/IToolSvc.h" - -//#include "StoreGate/DataHandle.h" +#include "LArFEBMon.h" #include "LArRecEvent/LArEventBitInfo.h" #include "LArRawEvent/LArFebHeaderContainer.h" @@ -33,19 +30,14 @@ #include "LWHists/TProfile2D_LW.h" #include "LWHists/TProfile_LW.h" -#include "LArMonTools/LArFEBMon.h" +#include "xAODEventInfo/EventInfo.h" +#include "LArTrigStreamMatching.h" #include <stdint.h> #include <algorithm> #include <math.h> -//#include <functional> -//#include <set> - #include <sys/types.h> -#include "xAODEventInfo/EventInfo.h" -#include "LArTrigStreamMatching.h" - const unsigned nFEBnominal=1524; // ******************************************************************** diff --git a/LArCalorimeter/LArMonTools/LArMonTools/LArFEBMon.h b/LArCalorimeter/LArMonTools/src/LArFEBMon.h similarity index 93% rename from LArCalorimeter/LArMonTools/LArMonTools/LArFEBMon.h rename to LArCalorimeter/LArMonTools/src/LArFEBMon.h index bbdc9dd199e2..75010207c4a5 100755 --- a/LArCalorimeter/LArMonTools/LArMonTools/LArFEBMon.h +++ b/LArCalorimeter/LArMonTools/src/LArFEBMon.h @@ -2,31 +2,23 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef LARFEBMON_H -#define LARFEBMON_H +#ifndef LARMONTOOLS_LARFEBMON_H +#define LARMONTOOLS_LARFEBMON_H + +#include "LArOnlineIDStrHelper.h" -#include "GaudiKernel/Algorithm.h" -#include "GaudiKernel/ObjectVector.h" #include "AthenaMonitoring/ManagedMonitorToolBase.h" #include "LArIdentifier/LArOnlineID.h" #include "LArRecConditions/ILArBadChanTool.h" #include "Identifier/HWIdentifier.h" +#include "TrigDecisionTool/TrigDecisionTool.h" + #include <string> #include <vector> #include <bitset> -#include "LArMonTools/LArOnlineIDStrHelper.h" -#include "TrigDecisionTool/TrigDecisionTool.h" - -//#include "LWHists/TH1I_LW.h" -//#include "LWHists/TH2I_LW.h" -//#include "LWHists/TH1F_LW.h" -//#include "LWHists/TH2F_LW.h" -//#include "LWHists/TProfile2D_LW.h" -//#include "LWHists/TProfile_LW.h" - class TH1I_LW; class TH1F_LW; class TH2F_LW; diff --git a/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.cxx b/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.cxx index c02a482597e1..fc1d6af193c5 100644 --- a/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.cxx +++ b/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.cxx @@ -11,12 +11,16 @@ // Class for monitoring offline HV corrections based in DCS infos // ******************************************************************** -#include "GaudiKernel/ISvcLocator.h" -#include "GaudiKernel/ITHistSvc.h" -#include "GaudiKernel/IToolSvc.h" +#include "LArHVCorrectionMonTool.h" #include "Identifier/IdentifierHash.h" +#include "LWHists/TH2I_LW.h" +#include "LWHists/TProfile_LW.h" +#include "TMath.h" + +#include "xAODEventInfo/EventInfo.h" + #include <sstream> #include <iomanip> #include <fstream> @@ -27,14 +31,6 @@ #include <map> #include <utility> -#include "LWHists/TH2I_LW.h" -#include "LWHists/TProfile_LW.h" -#include "TMath.h" - - -#include "LArMonTools/LArHVCorrectionMonTool.h" -#include "xAODEventInfo/EventInfo.h" - using namespace std; /*---------------------------------------------------------*/ diff --git a/LArCalorimeter/LArMonTools/LArMonTools/LArHVCorrectionMonTool.h b/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.h similarity index 93% rename from LArCalorimeter/LArMonTools/LArMonTools/LArHVCorrectionMonTool.h rename to LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.h index 13e91bb256fa..420f530109ec 100644 --- a/LArCalorimeter/LArMonTools/LArMonTools/LArHVCorrectionMonTool.h +++ b/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.h @@ -8,8 +8,11 @@ * */ -#ifndef LARHVCORRECTIONMONTOOL_H -#define LARHVCORRECTIONMONTOOL_H +#ifndef LARMONTOOLS_LARHVCORRECTIONMONTOOL_H +#define LARMONTOOLS_LARHVCORRECTIONMONTOOL_H + +#include "SelectAllLArRawChannels.h" +#include "LArOnlineIDStrHelper.h" #include "AthenaMonitoring/ManagedMonitorToolBase.h" #include "CaloIdentifier/CaloIdManager.h" @@ -21,13 +24,10 @@ #include "Identifier/HWIdentifier.h" #include "LArIdentifier/LArOnlineID.h" -#include "LArMonTools/SelectAllLArRawChannels.h" -#include "LArMonTools/LArOnlineIDStrHelper.h" #include "LArRawEvent/LArRawChannel.h" #include "LArRawEvent/LArRawChannelContainer.h" #include "EventContainers/SelectAllObject.h" #include "LArCabling/LArCablingService.h" -#include "LArRecUtils/LArHVCorrTool.h" #include "LArElecCalib/ILArHVCorrTool.h" #include "LArElecCalib/ILArHVScaleCorr.h" diff --git a/LArCalorimeter/LArMonTools/src/LArNoisyROMon.cxx b/LArCalorimeter/LArMonTools/src/LArNoisyROMon.cxx index d3425a15c7c6..cb390faa4641 100644 --- a/LArCalorimeter/LArMonTools/src/LArNoisyROMon.cxx +++ b/LArCalorimeter/LArMonTools/src/LArNoisyROMon.cxx @@ -2,12 +2,12 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArMonTools/LArNoisyROMon.h" +#include "LArNoisyROMon.h" +#include "LArOnlineIDStrHelper.h" #include "LArRecEvent/LArEventBitInfo.h" #include "LArRecEvent/LArNoisyROSummary.h" #include "LArIdentifier/LArOnlineID.h" -#include "LArMonTools/LArOnlineIDStrHelper.h" #include "xAODEventInfo/EventInfo.h" #include "LWHists/TH1I_LW.h" diff --git a/LArCalorimeter/LArMonTools/LArMonTools/LArNoisyROMon.h b/LArCalorimeter/LArMonTools/src/LArNoisyROMon.h similarity index 98% rename from LArCalorimeter/LArMonTools/LArMonTools/LArNoisyROMon.h rename to LArCalorimeter/LArMonTools/src/LArNoisyROMon.h index b33bb5f35586..414e5dcfe60b 100644 --- a/LArCalorimeter/LArMonTools/LArMonTools/LArNoisyROMon.h +++ b/LArCalorimeter/LArMonTools/src/LArNoisyROMon.h @@ -8,8 +8,8 @@ * 2017 : major upgrade/rewriting by B.Trocme (LPSC Grenoble) */ -#ifndef LArNoisyROMon_h -#define LArNoisyROMon_h +#ifndef LARMONTOOLS_LARNOISYROMON_H +#define LARMONTOOLS_LARNOISYROMON_H #include "AthenaMonitoring/ManagedMonitorToolBase.h" #include "TrigDecisionTool/TrigDecisionTool.h" diff --git a/LArCalorimeter/LArMonTools/src/LArOnlineIDStrHelper.cxx b/LArCalorimeter/LArMonTools/src/LArOnlineIDStrHelper.cxx index 35dbb4b51565..48ad16fe4272 100755 --- a/LArCalorimeter/LArMonTools/src/LArOnlineIDStrHelper.cxx +++ b/LArCalorimeter/LArMonTools/src/LArOnlineIDStrHelper.cxx @@ -16,16 +16,17 @@ #include "Identifier/IdentifierHash.h" #include "LArIdentifier/LArOnlineID.h" -#include <iostream> -#include <iomanip> -#include <sstream> +#include "LArOnlineIDStrHelper.h" -#include "LArMonTools/LArOnlineIDStrHelper.h" #include "TAxis.h" #include "TH2.h" #include "boost/io/ios_state.hpp" +#include <iostream> +#include <iomanip> +#include <sstream> + /*---------------------------------------------------------*/ LArOnlineIDStrHelper::LArOnlineIDStrHelper(const LArOnlineID* pLArOnlineIDHelper, diff --git a/LArCalorimeter/LArMonTools/LArMonTools/LArOnlineIDStrHelper.h b/LArCalorimeter/LArMonTools/src/LArOnlineIDStrHelper.h similarity index 98% rename from LArCalorimeter/LArMonTools/LArMonTools/LArOnlineIDStrHelper.h rename to LArCalorimeter/LArMonTools/src/LArOnlineIDStrHelper.h index 96ec064acf95..67caed4aed62 100755 --- a/LArCalorimeter/LArMonTools/LArMonTools/LArOnlineIDStrHelper.h +++ b/LArCalorimeter/LArMonTools/src/LArOnlineIDStrHelper.h @@ -12,8 +12,8 @@ * cryostatEnd, feedthroug, feb, channel, partition names * Four different types of names are supported: see enum NameType below */ -#ifndef LARONLINEIDSTRHELPER_H -#define LARONLINEIDSTRHELPER_H +#ifndef LARMONTOOLS_LARONLINEIDSTRHELPER_H +#define LARMONTOOLS_LARONLINEIDSTRHELPER_H #include "Identifier/HWIdentifier.h" diff --git a/LArCalorimeter/LArMonTools/LArMonTools/LArOnlineIDStrHelper.icc b/LArCalorimeter/LArMonTools/src/LArOnlineIDStrHelper.icc similarity index 100% rename from LArCalorimeter/LArMonTools/LArMonTools/LArOnlineIDStrHelper.icc rename to LArCalorimeter/LArMonTools/src/LArOnlineIDStrHelper.icc diff --git a/LArCalorimeter/LArMonTools/src/LArRODMonTool.cxx b/LArCalorimeter/LArMonTools/src/LArRODMonTool.cxx index cb3a756eba32..b391601d30e1 100755 --- a/LArCalorimeter/LArMonTools/src/LArRODMonTool.cxx +++ b/LArCalorimeter/LArMonTools/src/LArRODMonTool.cxx @@ -13,7 +13,8 @@ // // ******************************************************************** -#include "LArMonTools/LArRODMonTool.h" +#include "LArRODMonTool.h" +#include "LArOnlineIDStrHelper.h" #include "Identifier/IdentifierHash.h" #include "LArIdentifier/LArOnlineID.h" @@ -31,7 +32,6 @@ #include "LArRawEvent/LArFebHeaderContainer.h" #include "LArRawEvent/LArFebHeader.h" -#include "LArMonTools/LArOnlineIDStrHelper.h" #include "CaloDetDescr/CaloDetDescrManager.h" #include "CaloDetDescr/CaloDetDescrElement.h" diff --git a/LArCalorimeter/LArMonTools/LArMonTools/LArRODMonTool.h b/LArCalorimeter/LArMonTools/src/LArRODMonTool.h similarity index 99% rename from LArCalorimeter/LArMonTools/LArMonTools/LArRODMonTool.h rename to LArCalorimeter/LArMonTools/src/LArRODMonTool.h index f9ade34cfa87..a617d4ef307b 100755 --- a/LArCalorimeter/LArMonTools/LArMonTools/LArRODMonTool.h +++ b/LArCalorimeter/LArMonTools/src/LArRODMonTool.h @@ -10,8 +10,8 @@ * */ -#ifndef LARRODMONTOOL_H -#define LARRODMONTOOL_H +#ifndef LARMONTOOLS_LARRODMONTOOL_H +#define LARMONTOOLS_LARRODMONTOOL_H #include "AthenaMonitoring/ManagedMonitorToolBase.h" #include "LArElecCalib/ILArPedestal.h" diff --git a/LArCalorimeter/LArMonTools/src/LArRawChannelMonTool.cxx b/LArCalorimeter/LArMonTools/src/LArRawChannelMonTool.cxx index 5d790ff53170..278826cf1afd 100755 --- a/LArCalorimeter/LArMonTools/src/LArRawChannelMonTool.cxx +++ b/LArCalorimeter/LArMonTools/src/LArRawChannelMonTool.cxx @@ -2,26 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArMonTools/LArRawChannelMonTool.h" - -// --- stl --- -#include <algorithm> -#include <cfloat> -#include <climits> -#include <cmath> -#include <deque> -#include <iostream> -#include <iomanip> -#include <iterator> -#include <stdexcept> -#include <typeinfo> -#include <utility> - -// --- boost --- -#include <boost/assign/list_of.hpp> -#include <boost/lexical_cast.hpp> -#include <boost/foreach.hpp> -#define foreach BOOST_FOREACH +#include "LArRawChannelMonTool.h" +#include "LArOnlineIDStrHelper.h" // --- athena --- #include "CaloDetDescr/CaloDetDescrManager.h" @@ -36,12 +18,10 @@ #include "Identifier/Range.h" #include "LArIdentifier/LArOnlineID.h" #include "LArIdentifier/LArOnlID_Exception.h" -#include "LArMonTools/LArOnlineIDStrHelper.h" #include "LArRawEvent/LArRawChannel.h" #include "LArRawEvent/LArRawChannelContainer.h" //#include "LArRecEvent/LArNoisyROSummary.h" #include "LArRecEvent/LArEventBitInfo.h" -#include "StoreGate/DataHandle.h" #include "AthenaKernel/Units.h" #include "LWHists/TH1F_LW.h" @@ -53,6 +33,27 @@ #include "LWHistFactory.h" +// --- boost --- +#include <boost/assign/list_of.hpp> +#include <boost/lexical_cast.hpp> +#include <boost/foreach.hpp> +#define foreach BOOST_FOREACH + + +// --- stl --- +#include <algorithm> +#include <cfloat> +#include <climits> +#include <cmath> +#include <deque> +#include <iostream> +#include <iomanip> +#include <iterator> +#include <stdexcept> +#include <typeinfo> +#include <utility> + + namespace Units = Athena::Units; using Units::nanosecond; using Units::picosecond; diff --git a/LArCalorimeter/LArMonTools/LArMonTools/LArRawChannelMonTool.h b/LArCalorimeter/LArMonTools/src/LArRawChannelMonTool.h similarity index 98% rename from LArCalorimeter/LArMonTools/LArMonTools/LArRawChannelMonTool.h rename to LArCalorimeter/LArMonTools/src/LArRawChannelMonTool.h index 3268a766a4e4..de287ede90df 100755 --- a/LArCalorimeter/LArMonTools/LArMonTools/LArRawChannelMonTool.h +++ b/LArCalorimeter/LArMonTools/src/LArRawChannelMonTool.h @@ -2,23 +2,17 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef LAR_RAW_CHANNEL_MON_TOOL_H -#define LAR_RAW_CHANNEL_MON_TOOL_H +#ifndef LARMONTOOLS_LARRAWCHANNELMONTOOL_H +#define LARMONTOOLS_LARRAWCHANNELMONTOOL_H /*! \class LArRawChannelMonTool \author Frank Berghaus <Frank.Olaf.Berghaus@cern.ch> */ -// --- stl --- -#include <string> -#include <vector> -#include <set> -// --- boost --- -#include <boost/shared_ptr.hpp> +#include "LArRawChannelMonTools.h" // --- athena --- #include "GaudiKernel/ToolHandle.h" -#include "GaudiKernel/StatusCode.h" #include "AthenaMonitoring/ManagedMonitorToolBase.h" #include "AthenaMonitoring/DQAtlasReadyFilterTool.h" //#include "AthenaMonitoring/IDQFilterTool.h" @@ -26,7 +20,14 @@ #include "CaloInterface/ICaloNoiseTool.h" #include "LArCabling/LArCablingService.h" #include "LArRecConditions/ILArBadChannelMasker.h" -#include "LArMonTools/LArRawChannelMonTools.h" + +// --- boost --- +#include <boost/shared_ptr.hpp> +// --- stl --- +#include <string> +#include <vector> +#include <set> + // --- forward declarations --- diff --git a/LArCalorimeter/LArMonTools/src/LArRawChannelMonTools.cxx b/LArCalorimeter/LArMonTools/src/LArRawChannelMonTools.cxx index 8b56c40d836e..65a2756cb5a0 100644 --- a/LArCalorimeter/LArMonTools/src/LArRawChannelMonTools.cxx +++ b/LArCalorimeter/LArMonTools/src/LArRawChannelMonTools.cxx @@ -2,16 +2,16 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArMonTools/LArRawChannelMonTools.h" +#include "LArRawChannelMonTools.h" -#include <stdexcept> -#include <cmath> -#include <cfloat> +#include "LArIdentifier/LArOnlineID.h" +#include "LArIdentifier/LArOnlID_Exception.h" #include <boost/foreach.hpp> -#include "LArIdentifier/LArOnlineID.h" -#include "LArIdentifier/LArOnlID_Exception.h" +#include <stdexcept> +#include <cmath> +#include <cfloat> #define foreach BOOST_FOREACH diff --git a/LArCalorimeter/LArMonTools/LArMonTools/LArRawChannelMonTools.h b/LArCalorimeter/LArMonTools/src/LArRawChannelMonTools.h similarity index 99% rename from LArCalorimeter/LArMonTools/LArMonTools/LArRawChannelMonTools.h rename to LArCalorimeter/LArMonTools/src/LArRawChannelMonTools.h index 47e94fc32818..0db146495d01 100644 --- a/LArCalorimeter/LArMonTools/LArMonTools/LArRawChannelMonTools.h +++ b/LArCalorimeter/LArMonTools/src/LArRawChannelMonTools.h @@ -2,13 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef LAR_RAW_CHANNEL_MON_TOOLS_H -#define LAR_RAW_CHANNEL_MON_TOOLS_H - -#include <deque> -#include <map> -#include <string> -#include <vector> +#ifndef LARMONTOOLS_LARRAWCHANNELMONTOOLS_H +#define LARMONTOOLS_LARRAWCHANNELMONTOOLS_H #include "CLHEP/Units/SystemOfUnits.h" @@ -21,6 +16,11 @@ #include "LWHists/TProfile2D_LW.h" #include "LArRawEvent/LArRawChannel.h" +#include <deque> +#include <map> +#include <string> +#include <vector> + class LArOnlineID; // --- Some tools to help with LAr Description --- diff --git a/LArCalorimeter/LArMonTools/src/LWHistFactory.h b/LArCalorimeter/LArMonTools/src/LWHistFactory.h index 47e1282d2775..812c9ddc2e1b 100644 --- a/LArCalorimeter/LArMonTools/src/LWHistFactory.h +++ b/LArCalorimeter/LArMonTools/src/LWHistFactory.h @@ -2,10 +2,10 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef LWHISTFACTORY_H -#define LWHISTFACTORY_H +#ifndef LARMONTOOLS_LWHISTFACTORY_H +#define LARMONTOOLS_LWHISTFACTORY_H -#include<string> +#include <string> #include "LWHists/LWHist.h" #include "LWHists/TProfile_LW.h" #include "LWHists/TProfile2D_LW.h" diff --git a/LArCalorimeter/LArMonTools/LArMonTools/SelectAllLArRawChannels.h b/LArCalorimeter/LArMonTools/src/SelectAllLArRawChannels.h similarity index 100% rename from LArCalorimeter/LArMonTools/LArMonTools/SelectAllLArRawChannels.h rename to LArCalorimeter/LArMonTools/src/SelectAllLArRawChannels.h diff --git a/LArCalorimeter/LArMonTools/src/components/LArMonTools_entries.cxx b/LArCalorimeter/LArMonTools/src/components/LArMonTools_entries.cxx index 6072ae41616e..63b710decd52 100644 --- a/LArCalorimeter/LArMonTools/src/components/LArMonTools_entries.cxx +++ b/LArCalorimeter/LArMonTools/src/components/LArMonTools_entries.cxx @@ -1,19 +1,19 @@ -#include "LArMonTools/LArFEBMon.h" -#include "LArMonTools/LArRawChannelMonTool.h" -#include "LArMonTools/LArCollisionTimeMonTool.h" -#include "LArMonTools/LArCosmicsMonTool.h" -#include "LArMonTools/LArCoverage.h" -#include "LArMonTools/LArDigitMon.h" -#include "LArMonTools/LArRODMonTool.h" -#include "LArMonTools/LArAffectedRegions.h" -#include "LArMonTools/LArHVCorrectionMonTool.h" -#include "LArMonTools/LArNoisyROMon.h" +#include "../LArFEBMon.h" +#include "../LArRawChannelMonTool.h" +#include "../LArCollisionTimeMonTool.h" +#include "../LArCosmicsMonTool.h" +#include "../LArCoverage.h" +#include "../LArDigitMon.h" +#include "../LArRODMonTool.h" +#include "../LArAffectedRegions.h" +#include "../LArHVCorrectionMonTool.h" +#include "../LArNoisyROMon.h" DECLARE_COMPONENT( LArFEBMon ) DECLARE_COMPONENT( LArRawChannelMonTool ) DECLARE_COMPONENT( LArCollisionTimeMonTool ) - DECLARE_COMPONENT( LArCosmicsMonTool ) +DECLARE_COMPONENT( LArCosmicsMonTool ) DECLARE_COMPONENT( LArCoverage ) DECLARE_COMPONENT( LArDigitMon ) DECLARE_COMPONENT( LArRODMonTool ) -- GitLab From 1695fa7e0d6674a60bee26ecb646df824d9ab8ca Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Mon, 11 Jun 2018 17:18:53 +0200 Subject: [PATCH 158/562] AthenaPoolMultiTest: Fix gcc8 warnings. gcc8 warnings: catching polymorphic exceptions by value. Former-commit-id: 45e2500ecbe20b8c07de4ced889aa3e07ef51991 --- .../DatabaseTest/AthenaPoolMultiTest/src/EventTagWriter.cxx | 6 +++--- .../AthenaPoolMultiTest/src/RunEventMetaWriter.cxx | 4 ++-- .../AthenaPoolMultiTest/src/RunEventTagWriter.cxx | 6 +++--- .../AthenaPoolMultiTest/src/TagEventTagWriter.cxx | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/EventTagWriter.cxx b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/EventTagWriter.cxx index 48078a2897a9..562aa717d00f 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/EventTagWriter.cxx +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/EventTagWriter.cxx @@ -221,7 +221,7 @@ StatusCode EventTagWriter::execute() { attribList = new AthenaAttributeList(*m_attribListSpec); } - catch (std::exception e) + catch (const std::exception& e) { ATH_MSG_ERROR( "Caught exception during creation of AthenaAttributeList object." << "Message: " << e.what() ); @@ -262,7 +262,7 @@ StatusCode EventTagWriter::execute() (*attribList)["TestDouble"].data<double>() = testDouble; (*attribList)["TestString"].data<std::string>() = testString; } - catch (std::exception e) + catch (const std::exception& e) { ATH_MSG_ERROR( "Caught exception from data() when setting type test " << "attributes; Message:" << e.what() ); @@ -306,7 +306,7 @@ StatusCode EventTagWriter::execute() nGlobal++; (*attribList)["NGlobal"].data<unsigned short>() = nGlobal; } - catch (std::exception e) + catch (const std::exception& e) { ATH_MSG_ERROR( "Caught exception from data() when setting AOD global " << "attributes; Message:" << e.what() ); diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/RunEventMetaWriter.cxx b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/RunEventMetaWriter.cxx index e84737524bdf..44005e9d50c9 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/RunEventMetaWriter.cxx +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/RunEventMetaWriter.cxx @@ -83,7 +83,7 @@ StatusCode RunEventMetaWriter::start() { attribList = new AthenaAttributeList(*m_attribListSpec); } - catch (std::exception e) + catch (const std::exception& e) { ATH_MSG_ERROR( "Caught exception during creation of AthenaAttributeList object." << "Message: " << e.what() ); @@ -102,7 +102,7 @@ StatusCode RunEventMetaWriter::start() (*attribList)["RunNumber"].data<unsigned int>() = 88; (*attribList)["EventNumber"].data<unsigned int>() = 99; } - catch (std::exception e) + catch (const std::exception& e) { ATH_MSG_ERROR( "Caught exception from data() when setting AOD global " << "attributes; Message: " << e.what() ); diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/RunEventTagWriter.cxx b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/RunEventTagWriter.cxx index 9073e42760c9..ea281f34f02a 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/RunEventTagWriter.cxx +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/RunEventTagWriter.cxx @@ -92,7 +92,7 @@ StatusCode RunEventTagWriter::execute() { attribList = new AthenaAttributeList(*m_attribListSpec); } - catch (std::exception e) + catch (const std::exception& e) { ATH_MSG_ERROR( "Caught exception during creation of AthenaAttributeList object." << "Message: " << e.what() ); @@ -148,7 +148,7 @@ StatusCode RunEventTagWriter::fillTag(const EventInfo* eInfo, AthenaAttributeLis (*attribList)["RunNumber"].data<unsigned int>() = runNumber; (*attribList)["EventNumber"].data<unsigned int>() = eventNumber; } - catch (std::exception e) + catch (const std::exception& e) { ATH_MSG_ERROR( "Caught exception from data() when setting AOD global " << "attributes; Message: " << e.what() ); @@ -177,7 +177,7 @@ StatusCode RunEventTagWriter::fillTag(const xAOD::EventInfo* eventInfo, AthenaAt (*attribList)["RunNumber"].data<unsigned int>() = runNumber; (*attribList)["EventNumber"].data<unsigned int>() = eventNumber; } - catch (std::exception e) + catch (const std::exception& e) { ATH_MSG_ERROR( "Caught exception from data() when setting AOD global " << "attributes; Message: " << e.what() ); diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/TagEventTagWriter.cxx b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/TagEventTagWriter.cxx index 82f6db2e83d8..e81e54bd3d79 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/TagEventTagWriter.cxx +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/TagEventTagWriter.cxx @@ -253,7 +253,7 @@ StatusCode TagEventTagWriter::execute() { attribList = new TagAthenaAttributeList(*m_attribListSpec); } - catch (std::exception e) + catch (const std::exception& e) { ATH_MSG_ERROR( "Caught exception during creation of TagAthenaAttributeList object." << "Message: " << e.what() ); @@ -294,7 +294,7 @@ StatusCode TagEventTagWriter::execute() (*attribList)["TestDouble"].data<double>() = testDouble; (*attribList)["TestString"].data<std::string>() = testString; } - catch (std::exception e) + catch (const std::exception& e) { ATH_MSG_ERROR( "Caught exception from data() when setting type test " << "attributes; Message:" << e.what() ); @@ -338,7 +338,7 @@ StatusCode TagEventTagWriter::execute() nGlobal++; (*attribList)["NGlobal"].data<unsigned short>() = nGlobal; } - catch (std::exception e) + catch (const std::exception& e) { ATH_MSG_ERROR( "Caught exception from data() when setting AOD global " << "attributes; Message:" << e.what() ); -- GitLab From b19c68f0250fa5c83aff2af11caf191be4c9ddb3 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Tue, 12 Jun 2018 15:47:07 +0200 Subject: [PATCH 159/562] TrigConfStorage: Comply with ATLAS naming conventions. Identifiers should not start with underscores. Former-commit-id: f3c5e477e932640b3db5c824f33a9af2ccc50203 --- .../TrigConfStorage/src/ConfigurationCheck.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Trigger/TrigConfiguration/TrigConfStorage/src/ConfigurationCheck.cxx b/Trigger/TrigConfiguration/TrigConfStorage/src/ConfigurationCheck.cxx index 8054e5ba561e..34db33b16ff7 100644 --- a/Trigger/TrigConfiguration/TrigConfStorage/src/ConfigurationCheck.cxx +++ b/Trigger/TrigConfiguration/TrigConfStorage/src/ConfigurationCheck.cxx @@ -187,12 +187,12 @@ public: virtual void execute(const Exc_t&) { if ( ! m_hlt ) return; - unsigned int _maxTElength = 100; + const unsigned int maxTElength = 100; for(const TrigConf::HLTSequence* seq : m_hlt->getHLTSequenceList()) { const std::string& tename = seq->outputTE()->name(); - if (tename.length() > _maxTElength ) + if (tename.length() > maxTElength ) m_offending += tename + ", "; } -- GitLab From d49a4b6c724a53d8c0e003bec911f62311a52bd0 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Thu, 14 Jun 2018 23:10:04 +0200 Subject: [PATCH 160/562] DataModelRunTests: Update test reference file. Update reference file for metadata change. Former-commit-id: 72bbf35874f1b11057e94e6671bb7bd052dc3576 --- .../share/ByteStreamTestRead.ref | 31 +++++++++---------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestRead.ref b/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestRead.ref index c7fd231bc74c..e2767cc23e36 100644 --- a/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestRead.ref +++ b/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestRead.ref @@ -1,19 +1,20 @@ -Fri Nov 3 18:38:36 CET 2017 +Thu Jun 14 19:44:00 CEST 2018 Preloading tcmalloc_minimal.so Py:Athena INFO including file "AthenaCommon/Preparation.py" -Py:Athena INFO using release [AthenaWorkDir-22.0.0] [x86_64-slc6-gcc62-opt] [atlas-work3/1de7b3f4e9] -- built on [2017-11-03T1432] +Py:Athena INFO using release [AthenaWorkDir-22.0.1] [x86_64-slc6-gcc62-opt] [atlas-work3/5e04217fa06] -- built on [2018-06-14T1530] Py:Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Py:Athena INFO executing ROOT6Setup Py:Athena INFO including file "AthenaCommon/Execution.py" Py:Athena INFO including file "DataModelRunTests/ByteStreamTestRead_jo.py" -[?1034hPy:ConfigurableDb INFO Read module info for 5424 configurables from 57 genConfDb files +[?1034hPy:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Py:Athena INFO including file "AthenaCommon/runbatch.py" ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 +ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v29r0) - running on lxplus045.cern.ch on Fri Nov 3 18:38:54 2017 + Welcome to ApplicationMgr (GaudiCoreSvc v30r2) + running on lxplus021.cern.ch on Thu Jun 14 19:44:16 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -21,7 +22,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 9865 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 10029 CLIDRegistry entries for module ALL ChronoStatSvc INFO Number of skipped events for MemStat-1 CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) @@ -46,27 +47,24 @@ PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.x 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-11-02T2259/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus045.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc INFO Setting up APR FileCatalog and Streams 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 -ClassIDSvc INFO getRegistryEntries: read 1854 CLIDRegistry entries for module ALL +MetaDataSvc.Byt... INFO Initializing MetaDataSvc.ByteStreamMetadataTool - package version ByteStreamCnvSvc-00-00-00 +ClassIDSvc INFO getRegistryEntries: read 1907 CLIDRegistry entries for module ALL TrigSerializeCn... INFO initialize() HistogramPersis...WARNING Histograms saving not required. -EventSelector INFO reinitialization... EventSelector INFO Initializing EventSelector - package version ByteStreamCnvSvc-00-00-00 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 -ToolSvc.ByteStr... INFO handle() FirstInputFile, filename = BSF:test.bs -ClassIDSvc INFO getRegistryEntries: read 108 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 124 CLIDRegistry entries for module ALL ByteStreamInputSvc INFO Picked valid file: test.bs -ToolSvc.ByteStr... INFO handle() BeginInputFile, filename = BSF:test.bs ApplicationMgr INFO Application Manager Started successfully EventPersistenc... INFO Added successfully Conversion service:ByteStreamCnvSvc EventInfoByteSt... INFO UserType : RawEvent @@ -86,7 +84,7 @@ Warning in <TClass::Init>: no dictionary for class MdtTrackSegmentCollection_p2 ToolSvc.TrigSer... INFO Initializing - Package version: TrigSerializeTP-00-00-00 APR:DbReflex:fo...WARNING doing GUID scan on ALL types for Class ID=10DE610D-5634-4D42-80D4-80B0A8C16452 Warning in <TClass::Init>: no dictionary for class coral::AttributeList is available -ClassIDSvc INFO getRegistryEntries: read 13214 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 13230 CLIDRegistry entries for module ALL APR:DbReflex:fo...WARNING doing GUID scan on ALL types for Class ID=2577D84A-BC0F-4CD2-9539-9F0A4EFC64AA ClassIDSvc INFO getRegistryEntries: read 70 CLIDRegistry entries for module ALL APR:DbReflex:fo...WARNING doing GUID scan on ALL types for Class ID=740C4020-F0A3-40B3-88E1-B15A8055DB64 @@ -1599,7 +1597,6 @@ Type of aux store: DMTest::CAuxContainer_v1 pvInt: [1590 1591 1592 1593 1594 1595 1596 1597 1598 ] pvFloat: [-0.390 -0.290 -0.190 -0.090 0.010 0.110 0.210 0.310 0.410 ] AthenaEventLoopMgr INFO ===>>> done processing event #19, run #0 20 events processed so far <<<=== -ToolSvc.ByteStr... INFO handle() LastInputFile, filename = stop Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] ApplicationMgr INFO Application Manager Stopped successfully IncidentProcAlg1 INFO Finalize @@ -1607,7 +1604,7 @@ IncidentProcAlg2 INFO Finalize EventInfoByteSt... INFO finalize AthDictLoaderSvc INFO in finalize... ToolSvc INFO Removing all tools created by ToolSvc -ToolSvc.ByteStr... INFO in finalize() +MetaDataSvc.Byt... INFO in finalize() ToolSvc.TrigTSe... INFO ToolSvc.TrigTSerializer no problems encountered ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully -- GitLab From ed5cadaf44a8c47ac99a7c001e62dafbbc529c60 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Thu, 14 Jun 2018 23:11:52 +0200 Subject: [PATCH 161/562] ByteStreamTest: Update test reference file. Update reference file for metadata changes. Former-commit-id: e37f1fd5835ac3b98bc4fc608016bd6c12ac2998 --- .../share/ByteStreamTestMetaWrite.ref | 122 +++++++++--------- 1 file changed, 62 insertions(+), 60 deletions(-) diff --git a/Event/ByteStreamTest/share/ByteStreamTestMetaWrite.ref b/Event/ByteStreamTest/share/ByteStreamTestMetaWrite.ref index d67967b88266..5fc7473fa66e 100644 --- a/Event/ByteStreamTest/share/ByteStreamTestMetaWrite.ref +++ b/Event/ByteStreamTest/share/ByteStreamTestMetaWrite.ref @@ -1,4 +1,5 @@ DecisionSvc INFO Inserting stream: StreamBSFileOutput with no Algs +StreamBSFileOut... INFO Initializing StreamBSFileOutput.DefaultNameTool - package version AthenaServices-00-00-00 ByteStreamEvent... INFO Initializing ByteStreamEventStorageOutputSvc - package version ByteStreamCnvSvc-00-00-00 ByteStreamAttLi... DEBUG Property update for OutputLevel : new value = 2 ByteStreamAttLi... DEBUG ByteStreamAttListMetadataSvc::initialize() @@ -13,20 +14,21 @@ ByteStreamInputSvc DEBUG Property update for OutputLevel : new value = 2 ByteStreamInputSvc INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00 EventSelector INFO reinitialization... AthenaEventLoopMgr INFO Setup EventSelector service EventSelector +MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector ByteStreamInputSvc DEBUG Recorded ByteStreamMetadata in InputMetadataStore ByteStreamInputSvc DEBUG run parameters = ByteStreamInputSvc DEBUG Number of Free meta data strings: 0 - flags: ( valid, UNLOCKED, reset) --- data: 0x13a968c0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1714224 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14b08000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19c12000 ByteStreamInputSvc DEBUG switched to next event in slot INVALID ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 1356 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x13a968c0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamAttLi... INFO ByteStreamAttListMetadataSvc::toBSMetadata ByteStreamAttLi... INFO Found RunEventTag in DetectorStore @@ -38,229 +40,229 @@ ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1540248 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14ade000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19be8000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 0 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 1146448 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x13a968c0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x14444710 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1554852 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14964000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19a6e000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 1 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 2099072 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x13a968c0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x14444710 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1619388 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x150e0000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1a1ea000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 2 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 3043540 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x13a968c0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x14444710 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1740484 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14cb4000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19dbe000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 3 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 3977460 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x13a968c0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x14444710 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1923876 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14508000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 4 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 5134216 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x13a968c0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x14444710 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1520872 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14508000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 5 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 6399740 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x13a968c0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x14444710 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1593544 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14508000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 6 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 7359760 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x13a968c0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x14444710 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1650748 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14508000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 7 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 8354964 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x13a968c0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x14444710 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1453240 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14508000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 8 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 9433940 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x13a968c0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x14444710 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1409484 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14508000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 9 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 10316932 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x13a968c0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x14444710 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1532924 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14508000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 10 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 11186924 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x13a968c0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x14444710 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1705592 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14508000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 11 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 12164472 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x13a968c0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x14444710 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1645572 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14508000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 12 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 13245580 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x13a968c0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x14444710 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1743172 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14508000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 13 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 14290592 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x13a968c0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x14444710 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1448008 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14508000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 14 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 15400828 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x13a968c0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x14444710 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1460724 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14508000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 15 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 16267644 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x13a968c0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x14444710 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1456472 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14508000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 16 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 17188928 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x13a968c0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x14444710 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1578776 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14508000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 17 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 18088228 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x13a968c0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x14444710 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1835008 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14508000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 18 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 19076112 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x13a968c0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x14444710 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG Calling ByteStreamInputSvc::stop() ByteStreamEvent... INFO number of events written: 20 -- GitLab From 6a33aadbae2c339b6dc3a83eb338ce0f77128cbf Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Thu, 14 Jun 2018 23:07:54 +0200 Subject: [PATCH 162/562] AthenaPoolExampleAlgorithms: Update test reference files. Update reference files for metadata changes. Former-commit-id: b3e288281f9ee1d2743137174630005469ee13a9 --- .../share/AthenaPoolExample_Filter.ref | 42 ++-- .../share/AthenaPoolExample_RCond.ref | 40 ++-- .../share/AthenaPoolExample_RFilter.ref | 30 ++- .../share/AthenaPoolExample_RMeta.ref | 54 +++-- .../share/AthenaPoolExample_ReWrite.ref | 46 ++-- .../share/AthenaPoolExample_ReWriteAgain.ref | 44 ++-- .../share/AthenaPoolExample_ReWriteNext.ref | 42 ++-- .../share/AthenaPoolExample_Read.ref | 198 +++++++++-------- .../share/AthenaPoolExample_ReadAgain.ref | 200 ++++++++++-------- .../share/AthenaPoolExample_ReadBN.ref | 198 +++++++++-------- .../share/AthenaPoolExample_ReadConcat.ref | 200 ++++++++++-------- .../share/AthenaPoolExample_ReadNoBN.ref | 200 ++++++++++-------- .../share/AthenaPoolExample_WCond.ref | 44 ++-- 13 files changed, 736 insertions(+), 602 deletions(-) diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Filter.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Filter.ref index 871f6a83db4b..4f34fca1014e 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Filter.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Filter.ref @@ -1,24 +1,19 @@ -Wed May 23 22:58:45 CEST 2018 +Thu Jun 14 20:33:11 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_FilterJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 47 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 47 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -TrackTools: DerivationFrameworkTileCal.DerivationFrameworkTileCalConf - ['TileD3PDMaker.TileD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! +Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus083.cern.ch on Wed May 23 22:59:06 2018 + running on lxplus021.cern.ch on Thu Jun 14 20:33:22 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -26,7 +21,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2322 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL ChronoStatSvc INFO Number of skipped events for MemStat-1 CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 @@ -39,8 +34,8 @@ PoolSvc DEBUG Property update for OutputLevel : new value = 2 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-05-22T2053/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus083.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -48,6 +43,9 @@ PoolSvc DEBUG POOL ReadCatalog is file:Catalog.xml PoolSvc INFO POOL WriteCatalog is file:Catalog1.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] +MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 +MetaDataSvc.IOV... DEBUG in initialize() +MetaDataSvc.IOV... DEBUG initialize(): need to modify folders EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 EventSelector.Q... DEBUG Property update for OutputLevel : new value = 2 @@ -129,6 +127,12 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies +MetaDataSvc.IOV... DEBUG handle() FirstInputFile for FID:???? +MetaDataSvc.IOV... DEBUG begin checkOverrideRunNumber +MetaDataSvc.IOV... DEBUG checkOverrideRunNumber: check if tag is set in jobOpts +MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name FID:???? +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 ReadData DEBUG input handles: 0 ReadData DEBUG output handles: 0 @@ -189,7 +193,9 @@ ApplicationMgr INFO Application Manager Started successfully MetaDataSvc DEBUG handle() BeginInputFile for FID:???? MetaDataSvc DEBUG initInputMetaDataStore: file name FID:???? MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for FID:???? +MetaDataSvc.IOV... DEBUG The first BeginInputFile incidence is fired along with the FirstInputFile incidence so we skip the processing of the Input File MetaData EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-00000006]. @@ -800,7 +806,7 @@ Stream1 INFO Records written: 11 Stream1 DEBUG Leaving handle RegStream1 DEBUG handle() incident type: MetaDataStop RegStream1.TagTool INFO Collection Events output: 10 -MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool Domain[ROOT_All] INFO -> Deaccess DbDatabase CREATE [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain UPDATE [ROOT_All] ApplicationMgr INFO Application Manager Stopped successfully @@ -820,11 +826,11 @@ EventSelector.Q... INFO in finalize() *****Chrono***** INFO **************************************************************************************************** commitOutput INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 11 cRep_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 32 -cRepR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 43 cObjR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 35 -fRep_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.625(+- 2.42)/ 0/ 10 [ms] #= 32 -cObj_ALL INFO Time User : Tot= 70 [ms] Ave/Min/Max= 2.12(+- 6.4)/ 0/ 30 [ms] #= 33 -ChronoStatSvc INFO Time User : Tot= 2.03 [s] #= 1 +cRepR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 43 +fRep_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.312(+- 1.74)/ 0/ 10 [ms] #= 32 +cObj_ALL INFO Time User : Tot= 30 [ms] Ave/Min/Max=0.909(+- 2.87)/ 0/ 10 [ms] #= 33 +ChronoStatSvc INFO Time User : Tot= 1.07 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RCond.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RCond.ref index 6a368627b5d9..95ffaa71d44c 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RCond.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RCond.ref @@ -1,24 +1,19 @@ -Thu May 24 04:07:55 CEST 2018 +Thu Jun 14 20:41:06 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_RCondJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 48 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 48 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -TrackTools: DerivationFrameworkTileCal.DerivationFrameworkTileCalConf - ['TileD3PDMaker.TileD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! +Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus028.cern.ch on Thu May 24 04:08:19 2018 + running on lxplus021.cern.ch on Thu Jun 14 20:41:17 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -26,7 +21,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2322 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL ChronoStatSvc INFO Number of skipped events for MemStat-1 CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 @@ -44,8 +39,8 @@ PoolSvc DEBUG Property update for OutputLevel : new value = 2 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-05-22T2101/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-dbg/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -54,6 +49,9 @@ PoolSvc DEBUG POOL ReadCatalog is file:Catalog1.xml PoolSvc INFO POOL WriteCatalog is file:Catalog2.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] +MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 +MetaDataSvc.IOV... DEBUG in initialize() +MetaDataSvc.IOV... DEBUG initialize(): need to modify folders EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 EventSelector INFO reinitialization... @@ -126,6 +124,12 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies +MetaDataSvc.IOV... DEBUG handle() FirstInputFile for FID:???? +MetaDataSvc.IOV... DEBUG begin checkOverrideRunNumber +MetaDataSvc.IOV... DEBUG checkOverrideRunNumber: check if tag is set in jobOpts +MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name FID:???? +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 CondProxyProvider DEBUG Property update for OutputLevel : new value = 2 CondProxyProvider INFO Initializing CondProxyProvider - package version EventSelectorAthenaPool-00-00-00 @@ -236,7 +240,9 @@ MetaDataHdr(Dat... DEBUG attributes# = 1 MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile1.root +MetaDataSvc.IOV... DEBUG The first BeginInputFile incidence is fired along with the FirstInputFile incidence so we skip the processing of the Input File MetaData EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 ClassIDSvc INFO getRegistryEntries: read 2687 CLIDRegistry entries for module ALL @@ -945,7 +951,7 @@ Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? MetaDataSvc DEBUG handle() EndInputFile for FID:???? MetaDataSvc DEBUG handle() LastInputFile for end AthenaEventLoopMgr INFO No more events in event selection -MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? ApplicationMgr INFO Application Manager Stopped successfully IncidentProcAlg1 INFO Finalize @@ -958,9 +964,9 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -cObjR_ALL INFO Time User : Tot= 40 [ms] Ave/Min/Max=0.571(+- 2.32)/ 0/ 10 [ms] #= 70 -cObj_ALL INFO Time User : Tot= 160 [ms] Ave/Min/Max= 2.46(+- 8.42)/ 0/ 50 [ms] #= 65 -ChronoStatSvc INFO Time User : Tot= 3.44 [s] #= 1 +cObjR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 70 +cObj_ALL INFO Time User : Tot= 40 [ms] Ave/Min/Max=0.615(+- 2.98)/ 0/ 20 [ms] #= 65 +ChronoStatSvc INFO Time User : Tot= 0.95 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RFilter.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RFilter.ref index 60bb67be32c6..88767de34a13 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RFilter.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RFilter.ref @@ -1,24 +1,19 @@ -Thu May 24 03:24:13 CEST 2018 +Thu Jun 14 20:33:26 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_RFilterJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 48 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 48 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -TrackTools: DerivationFrameworkTileCal.DerivationFrameworkTileCalConf - ['TileD3PDMaker.TileD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! +Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus028.cern.ch on Thu May 24 03:24:42 2018 + running on lxplus021.cern.ch on Thu Jun 14 20:33:37 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -26,7 +21,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2322 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL ChronoStatSvc INFO Number of skipped events for MemStat-1 CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 @@ -39,8 +34,8 @@ PoolSvc DEBUG Property update for OutputLevel : new value = 2 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-05-22T2101/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-dbg/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -49,6 +44,9 @@ PoolSvc DEBUG POOL ReadCatalog is file:Catalog1.xml PoolSvc INFO POOL WriteCatalog is file:Catalog2.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] +MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 +MetaDataSvc.IOV... DEBUG in initialize() +MetaDataSvc.IOV... DEBUG initialize(): need to modify folders EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 EventSelector INFO reinitialization... @@ -322,7 +320,7 @@ AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 10 events Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] AthenaEventLoopMgr INFO No more events in event selection -MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool ApplicationMgr INFO Application Manager Stopped successfully IncidentProcAlg1 INFO Finalize ReadData INFO in finalize() @@ -332,9 +330,9 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -cObjR_ALL INFO Time User : Tot= 420 [ms] Ave/Min/Max= 13.5(+- 70.6)/ 0/ 400 [ms] #= 31 -cObj_ALL INFO Time User : Tot= 0.55 [s] Ave/Min/Max=0.0183(+-0.0743)/ 0/ 0.41 [s] #= 30 -ChronoStatSvc INFO Time User : Tot= 3.48 [s] #= 1 +cObjR_ALL INFO Time User : Tot= 90 [ms] Ave/Min/Max= 2.9(+- 15.9)/ 0/ 90 [ms] #= 31 +cObj_ALL INFO Time User : Tot= 130 [ms] Ave/Min/Max= 4.33(+- 18.2)/ 0/ 100 [ms] #= 30 +ChronoStatSvc INFO Time User : Tot= 1.06 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RMeta.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RMeta.ref index 4ac3503cea53..a112a839ec7b 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RMeta.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RMeta.ref @@ -1,24 +1,19 @@ -Thu May 24 04:09:16 CEST 2018 +Thu Jun 14 20:53:58 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_RMetaJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 48 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 48 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -TrackTools: DerivationFrameworkTileCal.DerivationFrameworkTileCalConf - ['TileD3PDMaker.TileD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! +Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus028.cern.ch on Thu May 24 04:09:40 2018 + running on lxplus021.cern.ch on Thu Jun 14 20:54:09 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -26,7 +21,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2322 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL ChronoStatSvc INFO Number of skipped events for MemStat-1 CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 @@ -41,8 +36,8 @@ PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.x 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-05-22T2101/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-dbg/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -50,7 +45,11 @@ PoolSvc DEBUG POOL ReadCatalog is xmlcatalog_file:Catalog2.xml PoolSvc INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] -ToolSvc.AthPool... INFO in initialize() +MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 +MetaDataSvc.IOV... DEBUG in initialize() +MetaDataSvc.IOV... DEBUG initialize(): need to modify folders +MetaDataSvc.Ath... DEBUG Property update for OutputLevel : new value = 2 +MetaDataSvc.Ath... INFO in initialize() EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 EventSelector INFO reinitialization... @@ -125,6 +124,12 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies +MetaDataSvc.IOV... DEBUG handle() FirstInputFile for FID:???? +MetaDataSvc.IOV... DEBUG begin checkOverrideRunNumber +MetaDataSvc.IOV... DEBUG checkOverrideRunNumber: check if tag is set in jobOpts +MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name FID:???? +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 ReadData DEBUG input handles: 0 ReadData DEBUG output handles: 0 @@ -201,15 +206,20 @@ MetaDataHdr(Dat... DEBUG attributes# = 1 MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.AthPoolEx::ReadMeta +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.AthPoolEx::ReadMeta +MetaDataSvc.Ath... DEBUG saw BeginInputFile incident. SimplePoolFile5... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaData(ExampleHitContainer_p1/PedestalWriteData) MetaData(Exampl... DEBUG Opening MetaData(Exampl... DEBUG attributes# = 1 MetaData(Exampl... DEBUG Branch container 'ExampleHitContainer_p1_PedestalWriteData' MetaData(Exampl... DEBUG Opened container MetaData(ExampleHitContainer_p1/PedestalWriteData) of type ROOT_Tree ClassIDSvc INFO getRegistryEntries: read 2697 CLIDRegistry entries for module ALL -ToolSvc.AthPool... INFO Pedestal x = 193136 y = -5580.01 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> +MetaDataSvc.Ath... INFO Pedestal x = 193136 y = -5580.01 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile5.root +MetaDataSvc.IOV... DEBUG The first BeginInputFile incidence is fired along with the FirstInputFile incidence so we skip the processing of the Input File MetaData +MetaDataSvc.Ath... DEBUG handle() BeginInputFile +MetaDataSvc.Ath... DEBUG handle() BeginInputFile for SimplePoolFile5.root EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-00000000]. @@ -859,21 +869,21 @@ Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] MetaDataSvc DEBUG handle() EndInputFile for FID:???? MetaDataSvc DEBUG handle() LastInputFile for end AthenaEventLoopMgr INFO No more events in event selection -MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool -MetaDataSvc DEBUG calling metaDataStop for ToolSvc.AthPoolEx::ReadMeta +MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.AthPoolEx::ReadMeta ApplicationMgr INFO Application Manager Stopped successfully IncidentProcAlg1 INFO Finalize ReadData INFO in finalize() IncidentProcAlg2 INFO Finalize AthDictLoaderSvc INFO in finalize... ToolSvc INFO Removing all tools created by ToolSvc -ToolSvc.AthPool... INFO in finalize() +MetaDataSvc.Ath... INFO in finalize() *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -cObjR_ALL INFO Time User : Tot= 40 [ms] Ave/Min/Max=0.597(+- 2.37)/ 0/ 10 [ms] #= 67 -cObj_ALL INFO Time User : Tot= 140 [ms] Ave/Min/Max= 2.19(+- 7.8)/ 0/ 40 [ms] #= 64 -ChronoStatSvc INFO Time User : Tot= 3.41 [s] #= 1 +cObjR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 67 +cObj_ALL INFO Time User : Tot= 30 [ms] Ave/Min/Max=0.469(+- 2.76)/ 0/ 20 [ms] #= 64 +ChronoStatSvc INFO Time User : Tot= 1.04 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWrite.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWrite.ref index 545d0138e37c..86dd3973051f 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWrite.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWrite.ref @@ -1,24 +1,19 @@ -Wed May 23 21:38:04 CEST 2018 +Thu Jun 14 19:57:30 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_RWJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 47 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 47 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -TrackTools: DerivationFrameworkTileCal.DerivationFrameworkTileCalConf - ['TileD3PDMaker.TileD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! +Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus083.cern.ch on Wed May 23 21:38:30 2018 + running on lxplus021.cern.ch on Thu Jun 14 19:57:41 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -26,7 +21,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2322 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL ChronoStatSvc INFO Number of skipped events for MemStat-1 CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 @@ -40,8 +35,8 @@ PoolSvc DEBUG Property update for OutputLevel : new value = 2 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-05-22T2053/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus083.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -49,6 +44,9 @@ PoolSvc DEBUG POOL ReadCatalog is file:Catalog.xml PoolSvc INFO POOL WriteCatalog is file:Catalog1.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] +MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 +MetaDataSvc.IOV... DEBUG in initialize() +MetaDataSvc.IOV... DEBUG initialize(): need to modify folders EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 EventSelector INFO reinitialization... @@ -127,6 +125,12 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies +MetaDataSvc.IOV... DEBUG handle() FirstInputFile for FID:???? +MetaDataSvc.IOV... DEBUG begin checkOverrideRunNumber +MetaDataSvc.IOV... DEBUG checkOverrideRunNumber: check if tag is set in jobOpts +MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name FID:???? +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 ReadData DEBUG input handles: 0 ReadData DEBUG output handles: 0 @@ -193,7 +197,9 @@ ApplicationMgr INFO Application Manager Started successfully MetaDataSvc DEBUG handle() BeginInputFile for SimplePoolFile1.root MetaDataSvc DEBUG initInputMetaDataStore: file name SimplePoolFile1.root MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile1.root +MetaDataSvc.IOV... DEBUG The first BeginInputFile incidence is fired along with the FirstInputFile incidence so we skip the processing of the Input File MetaData EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-00000000]. @@ -1953,7 +1959,7 @@ Stream1 INFO Records written: 21 Stream1 DEBUG Leaving handle RegStream1 DEBUG handle() incident type: MetaDataStop RegStream1.TagTool INFO Collection Events output: 20 -MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool Domain[ROOT_All] INFO -> Deaccess DbDatabase CREATE [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain UPDATE [ROOT_All] ApplicationMgr INFO Application Manager Stopped successfully @@ -1973,13 +1979,13 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** +commitOutput INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 21 cRep_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 62 -commitOutput INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.476(+- 2.13)/ 0/ 10 [ms] #= 21 -cObjR_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.303(+- 1.71)/ 0/ 10 [ms] #= 66 -cRepR_ALL INFO Time User : Tot= 50 [ms] Ave/Min/Max=0.307(+- 2.58)/ 0/ 30 [ms] #=163 -fRep_ALL INFO Time User : Tot= 60 [ms] Ave/Min/Max=0.968(+- 4.29)/ 0/ 30 [ms] #= 62 -cObj_ALL INFO Time User : Tot= 80 [ms] Ave/Min/Max= 1.27(+- 5.49)/ 0/ 30 [ms] #= 63 -ChronoStatSvc INFO Time User : Tot= 2.11 [s] #= 1 +cObjR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 66 +fRep_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.323(+- 1.77)/ 0/ 10 [ms] #= 62 +cObj_ALL INFO Time User : Tot= 30 [ms] Ave/Min/Max=0.476(+- 2.78)/ 0/ 20 [ms] #= 63 +cRepR_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.123(+- 1.1)/ 0/ 10 [ms] #=163 +ChronoStatSvc INFO Time User : Tot= 1.05 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgain.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgain.ref index ea37924a2d62..fd10099b6d01 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgain.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgain.ref @@ -1,24 +1,19 @@ -Wed May 23 21:52:30 CEST 2018 +Thu Jun 14 20:32:41 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReWriteAgainJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 47 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 47 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -TrackTools: DerivationFrameworkTileCal.DerivationFrameworkTileCalConf - ['TileD3PDMaker.TileD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! +Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus083.cern.ch on Wed May 23 21:52:52 2018 + running on lxplus021.cern.ch on Thu Jun 14 20:32:53 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -26,7 +21,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2322 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL ChronoStatSvc INFO Number of skipped events for MemStat-1 CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 @@ -40,8 +35,8 @@ PoolSvc DEBUG Property update for OutputLevel : new value = 2 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-05-22T2053/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus083.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -49,6 +44,9 @@ PoolSvc DEBUG POOL ReadCatalog is file:Catalog.xml PoolSvc INFO POOL WriteCatalog is file:Catalog1.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] +MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 +MetaDataSvc.IOV... DEBUG in initialize() +MetaDataSvc.IOV... DEBUG initialize(): need to modify folders EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 EventSelector INFO reinitialization... @@ -121,6 +119,12 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies +MetaDataSvc.IOV... DEBUG handle() FirstInputFile for FID:???? +MetaDataSvc.IOV... DEBUG begin checkOverrideRunNumber +MetaDataSvc.IOV... DEBUG checkOverrideRunNumber: check if tag is set in jobOpts +MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name FID:???? +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 ReadData DEBUG input handles: 0 ReadData DEBUG output handles: 0 @@ -249,7 +253,9 @@ MetaDataHdr(Dat... DEBUG attributes# = 1 MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolReplica1.root +MetaDataSvc.IOV... DEBUG The first BeginInputFile incidence is fired along with the FirstInputFile incidence so we skip the processing of the Input File MetaData EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-00000000]. @@ -2009,7 +2015,7 @@ Stream1 DEBUG Leaving handle RegStream1 DEBUG handle() incident type: MetaDataStop RegStream1.TagTool INFO Collection Events output: 20 RegStream1.TagTool INFO Unable to register collection: PFN 'RootCollection||PFN:SimplePoolCollection3.root' already registered ( POOL : "registerPFN" from "FileCatalog" ) -MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool Domain[ROOT_All] INFO -> Deaccess DbDatabase CREATE [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain UPDATE [ROOT_All] ApplicationMgr INFO Application Manager Stopped successfully @@ -2031,11 +2037,11 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** commitOutput INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 21 cRep_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 62 -cRepR_ALL INFO Time User : Tot= 40 [ms] Ave/Min/Max=0.245(+- 1.9)/ 0/ 20 [ms] #=163 -fRep_ALL INFO Time User : Tot= 70 [ms] Ave/Min/Max= 1.13(+- 4.06)/ 0/ 20 [ms] #= 62 -cObjR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 65 -cObj_ALL INFO Time User : Tot= 40 [ms] Ave/Min/Max=0.635(+- 3.93)/ 0/ 30 [ms] #= 63 -ChronoStatSvc INFO Time User : Tot= 2.12 [s] #= 1 +cObjR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.154(+- 1.23)/ 0/ 10 [ms] #= 65 +cRepR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.0613(+-0.781)/ 0/ 10 [ms] #=163 +fRep_ALL INFO Time User : Tot= 30 [ms] Ave/Min/Max=0.484(+- 2.15)/ 0/ 10 [ms] #= 62 +cObj_ALL INFO Time User : Tot= 40 [ms] Ave/Min/Max=0.635(+- 3.51)/ 0/ 20 [ms] #= 63 +ChronoStatSvc INFO Time User : Tot= 1.05 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNext.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNext.ref index 86290cd86afd..b6ad0fbfeecd 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNext.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNext.ref @@ -1,24 +1,19 @@ -Wed May 23 22:58:04 CEST 2018 +Thu Jun 14 20:32:57 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReWriteNextJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 47 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 47 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -TrackTools: DerivationFrameworkTileCal.DerivationFrameworkTileCalConf - ['TileD3PDMaker.TileD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! +Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus083.cern.ch on Wed May 23 22:58:33 2018 + running on lxplus021.cern.ch on Thu Jun 14 20:33:08 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -26,7 +21,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2322 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL ChronoStatSvc INFO Number of skipped events for MemStat-1 CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 @@ -40,8 +35,8 @@ PoolSvc DEBUG Property update for OutputLevel : new value = 2 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-05-22T2053/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus083.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -49,6 +44,9 @@ PoolSvc DEBUG POOL ReadCatalog is file:Catalog.xml PoolSvc INFO POOL WriteCatalog is file:Catalog1.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] +MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 +MetaDataSvc.IOV... DEBUG in initialize() +MetaDataSvc.IOV... DEBUG initialize(): need to modify folders EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 EventSelector INFO reinitialization... @@ -127,6 +125,12 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies +MetaDataSvc.IOV... DEBUG handle() FirstInputFile for FID:???? +MetaDataSvc.IOV... DEBUG begin checkOverrideRunNumber +MetaDataSvc.IOV... DEBUG checkOverrideRunNumber: check if tag is set in jobOpts +MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name FID:???? +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 ReadData DEBUG input handles: 0 ReadData DEBUG output handles: 0 @@ -193,7 +197,9 @@ ApplicationMgr INFO Application Manager Started successfully MetaDataSvc DEBUG handle() BeginInputFile for SimplePoolFile3.root MetaDataSvc DEBUG initInputMetaDataStore: file name SimplePoolFile3.root MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile3.root +MetaDataSvc.IOV... DEBUG The first BeginInputFile incidence is fired along with the FirstInputFile incidence so we skip the processing of the Input File MetaData EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-00000000]. @@ -1351,7 +1357,7 @@ Stream1 INFO Records written: 21 Stream1 DEBUG Leaving handle RegStream1 DEBUG handle() incident type: MetaDataStop RegStream1.TagTool INFO Collection Events output: 20 -MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool Domain[ROOT_All] INFO -> Deaccess DbDatabase CREATE [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain UPDATE [ROOT_All] ApplicationMgr INFO Application Manager Stopped successfully @@ -1373,11 +1379,11 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** commitOutput INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 21 cRep_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 62 -fRep_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.323(+- 1.77)/ 0/ 10 [ms] #= 62 -cRepR_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.123(+- 1.1)/ 0/ 10 [ms] #=163 cObjR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.154(+- 1.23)/ 0/ 10 [ms] #= 65 -cObj_ALL INFO Time User : Tot= 50 [ms] Ave/Min/Max=0.794(+- 4.1)/ 0/ 30 [ms] #= 63 -ChronoStatSvc INFO Time User : Tot= 2.04 [s] #= 1 +fRep_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.161(+- 1.26)/ 0/ 10 [ms] #= 62 +cRepR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.0613(+-0.781)/ 0/ 10 [ms] #=163 +cObj_ALL INFO Time User : Tot= 40 [ms] Ave/Min/Max=0.635(+- 2.44)/ 0/ 10 [ms] #= 63 +ChronoStatSvc INFO Time User : Tot= 0.97 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref index af102007db5e..bd5b67e75fe7 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref @@ -1,24 +1,19 @@ -Wed May 23 21:51:16 CEST 2018 +Thu Jun 14 19:57:44 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 47 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 47 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -TrackTools: DerivationFrameworkTileCal.DerivationFrameworkTileCalConf - ['TileD3PDMaker.TileD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! +Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus083.cern.ch on Wed May 23 21:51:41 2018 + running on lxplus021.cern.ch on Thu Jun 14 19:57:54 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -26,7 +21,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2322 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL ChronoStatSvc INFO Number of skipped events for MemStat-1 CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 @@ -39,14 +34,17 @@ PoolSvc DEBUG Property update for OutputLevel : new value = 2 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-05-22T2053/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus083.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams PoolSvc INFO POOL WriteCatalog is file:Catalog1.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] +MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 +MetaDataSvc.IOV... DEBUG in initialize() +MetaDataSvc.IOV... DEBUG initialize(): need to modify folders EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 IoComponentMgr INFO IoComponent EventSelector has already had file EmptyPoolFile.root registered with i/o mode READ @@ -170,6 +168,12 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies +MetaDataSvc.IOV... DEBUG handle() FirstInputFile for FID:???? +MetaDataSvc.IOV... DEBUG begin checkOverrideRunNumber +MetaDataSvc.IOV... DEBUG checkOverrideRunNumber: check if tag is set in jobOpts +MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name FID:???? +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 ReadData DEBUG input handles: 0 ReadData DEBUG output handles: 0 @@ -230,7 +234,9 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for EmptyPoolFile.root +MetaDataSvc.IOV... DEBUG The first BeginInputFile incidence is fired along with the FirstInputFile incidence so we skip the processing of the Input File MetaData MetaDataSvc DEBUG handle() EndInputFile for eventless EmptyPoolFile.root Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? EventSelector DEBUG Try item: "SimplePoolFile1.root" from the collection list. @@ -245,7 +251,10 @@ PoolSvc INFO Database (SimplePoolFile1.root) attribute [TREE_CACHE_ MetaDataSvc DEBUG handle() BeginInputFile for SimplePoolFile1.root MetaDataSvc DEBUG initInputMetaDataStore: file name SimplePoolFile1.root MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile1.root +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile1.root +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data EventSelector INFO skipping event 1 EventSelector INFO skipping event 2 EventSelector INFO skipping event 3 @@ -317,7 +326,7 @@ ReadData INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = Dum ReadData INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector ReadData INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector ClassIDSvc INFO getRegistryEntries: read 10 CLIDRegistry entries for module ALL -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27941 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 1 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -350,7 +359,7 @@ ReadData INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du ReadData INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector ReadData INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector ReadData INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27941 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 2 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -383,7 +392,7 @@ ReadData INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du ReadData INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector ReadData INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector ReadData INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27941 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 3 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -416,7 +425,7 @@ ReadData INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du ReadData INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector ReadData INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector ReadData INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27941 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 4 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -449,7 +458,7 @@ ReadData INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du ReadData INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector ReadData INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector ReadData INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27941 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 5 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -482,7 +491,7 @@ ReadData INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du ReadData INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector ReadData INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector ReadData INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27941 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 6 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -515,7 +524,7 @@ ReadData INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du ReadData INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector ReadData INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector ReadData INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27941 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 7 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -548,7 +557,7 @@ ReadData INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du ReadData INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector ReadData INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector ReadData INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27941 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 8 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -581,7 +590,7 @@ ReadData INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du ReadData INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector ReadData INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector ReadData INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27941 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 9 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -614,7 +623,7 @@ ReadData INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du ReadData INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector ReadData INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector ReadData INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27941 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 10 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? @@ -675,7 +684,10 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for EmptyPoolFile.root +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name EmptyPoolFile.root +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data MetaDataSvc DEBUG handle() EndInputFile for eventless EmptyPoolFile.root Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] @@ -760,7 +772,10 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile2.root +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile2.root +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000005-00000000]. @@ -811,7 +826,7 @@ ReadData INFO EventInfo event: 0 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 11 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -839,7 +854,7 @@ ReadData INFO EventInfo event: 1 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 12 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -867,7 +882,7 @@ ReadData INFO EventInfo event: 2 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 13 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -895,7 +910,7 @@ ReadData INFO EventInfo event: 3 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 14 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -923,7 +938,7 @@ ReadData INFO EventInfo event: 4 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 15 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -951,7 +966,7 @@ ReadData INFO EventInfo event: 5 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 16 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -979,7 +994,7 @@ ReadData INFO EventInfo event: 6 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 17 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1007,7 +1022,7 @@ ReadData INFO EventInfo event: 7 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 18 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1035,7 +1050,7 @@ ReadData INFO EventInfo event: 8 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 19 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1063,7 +1078,7 @@ ReadData INFO EventInfo event: 9 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 20 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1091,7 +1106,7 @@ ReadData INFO EventInfo event: 10 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 21 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1119,7 +1134,7 @@ ReadData INFO EventInfo event: 11 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 22 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1147,7 +1162,7 @@ ReadData INFO EventInfo event: 12 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 23 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1175,7 +1190,7 @@ ReadData INFO EventInfo event: 13 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 24 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1203,7 +1218,7 @@ ReadData INFO EventInfo event: 14 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 25 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1231,7 +1246,7 @@ ReadData INFO EventInfo event: 15 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 26 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1259,7 +1274,7 @@ ReadData INFO EventInfo event: 16 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 27 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1287,7 +1302,7 @@ ReadData INFO EventInfo event: 17 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 28 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1315,7 +1330,7 @@ ReadData INFO EventInfo event: 18 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 29 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1343,7 +1358,7 @@ ReadData INFO EventInfo event: 19 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 30 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1372,7 +1387,7 @@ ReadData INFO EventInfo event: 20 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #20, run #2 31 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1400,7 +1415,7 @@ ReadData INFO EventInfo event: 21 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #21, run #2 32 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1428,7 +1443,7 @@ ReadData INFO EventInfo event: 22 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #22, run #2 33 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1456,7 +1471,7 @@ ReadData INFO EventInfo event: 23 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #23, run #2 34 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1484,7 +1499,7 @@ ReadData INFO EventInfo event: 24 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #24, run #2 35 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1512,7 +1527,7 @@ ReadData INFO EventInfo event: 25 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #25, run #2 36 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1540,7 +1555,7 @@ ReadData INFO EventInfo event: 26 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #26, run #2 37 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1568,7 +1583,7 @@ ReadData INFO EventInfo event: 27 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #27, run #2 38 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1596,7 +1611,7 @@ ReadData INFO EventInfo event: 28 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #28, run #2 39 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1624,7 +1639,7 @@ ReadData INFO EventInfo event: 29 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #29, run #2 40 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1652,7 +1667,7 @@ ReadData INFO EventInfo event: 30 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #30, run #2 41 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1680,7 +1695,7 @@ ReadData INFO EventInfo event: 31 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #31, run #2 42 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1708,7 +1723,7 @@ ReadData INFO EventInfo event: 32 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #32, run #2 43 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1736,7 +1751,7 @@ ReadData INFO EventInfo event: 33 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #33, run #2 44 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1764,7 +1779,7 @@ ReadData INFO EventInfo event: 34 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #34, run #2 45 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1792,7 +1807,7 @@ ReadData INFO EventInfo event: 35 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #35, run #2 46 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1820,7 +1835,7 @@ ReadData INFO EventInfo event: 36 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #36, run #2 47 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1848,7 +1863,7 @@ ReadData INFO EventInfo event: 37 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #37, run #2 48 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1876,7 +1891,7 @@ ReadData INFO EventInfo event: 38 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #38, run #2 49 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1904,7 +1919,7 @@ ReadData INFO EventInfo event: 39 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #39, run #2 50 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? @@ -1993,7 +2008,10 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile3.root +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile3.root +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-00000000]. @@ -2138,7 +2156,7 @@ ReadData INFO Hit x = 20.4945 y = 63.5816 z = 48.1358 detector = Dum ReadData INFO Hit x = 23.7045 y = 57.9027 z = 46.3159 detector = DummyHitDetector ReadData INFO Hit x = 26.9145 y = 52.2238 z = 44.9265 detector = DummyHitDetector ReadData INFO Hit x = 30.1245 y = 46.5449 z = 43.831 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 51 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2185,7 +2203,7 @@ ReadData INFO Hit x = 120.494 y = 63.5816 z = -51.8642 detector = Du ReadData INFO Hit x = 123.704 y = 57.9027 z = -53.6841 detector = DummyHitDetector ReadData INFO Hit x = 126.915 y = 52.2238 z = -55.0735 detector = DummyHitDetector ReadData INFO Hit x = 130.125 y = 46.5449 z = -56.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 52 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2232,7 +2250,7 @@ ReadData INFO Hit x = 220.494 y = 63.5816 z = -151.864 detector = Du ReadData INFO Hit x = 223.704 y = 57.9027 z = -153.684 detector = DummyHitDetector ReadData INFO Hit x = 226.915 y = 52.2238 z = -155.073 detector = DummyHitDetector ReadData INFO Hit x = 230.125 y = 46.5449 z = -156.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 53 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2279,7 +2297,7 @@ ReadData INFO Hit x = 320.495 y = 63.5816 z = -251.864 detector = Du ReadData INFO Hit x = 323.705 y = 57.9027 z = -253.684 detector = DummyHitDetector ReadData INFO Hit x = 326.915 y = 52.2238 z = -255.073 detector = DummyHitDetector ReadData INFO Hit x = 330.125 y = 46.5449 z = -256.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 54 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2326,7 +2344,7 @@ ReadData INFO Hit x = 420.495 y = 63.5816 z = -351.864 detector = Du ReadData INFO Hit x = 423.705 y = 57.9027 z = -353.684 detector = DummyHitDetector ReadData INFO Hit x = 426.915 y = 52.2238 z = -355.073 detector = DummyHitDetector ReadData INFO Hit x = 430.125 y = 46.5449 z = -356.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 55 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2373,7 +2391,7 @@ ReadData INFO Hit x = 520.495 y = 63.5816 z = -451.864 detector = Du ReadData INFO Hit x = 523.705 y = 57.9027 z = -453.684 detector = DummyHitDetector ReadData INFO Hit x = 526.914 y = 52.2238 z = -455.073 detector = DummyHitDetector ReadData INFO Hit x = 530.125 y = 46.5449 z = -456.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 56 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2420,7 +2438,7 @@ ReadData INFO Hit x = 620.495 y = 63.5816 z = -551.864 detector = Du ReadData INFO Hit x = 623.705 y = 57.9027 z = -553.684 detector = DummyHitDetector ReadData INFO Hit x = 626.914 y = 52.2238 z = -555.073 detector = DummyHitDetector ReadData INFO Hit x = 630.125 y = 46.5449 z = -556.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 57 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2467,7 +2485,7 @@ ReadData INFO Hit x = 720.495 y = 63.5816 z = -651.864 detector = Du ReadData INFO Hit x = 723.705 y = 57.9027 z = -653.684 detector = DummyHitDetector ReadData INFO Hit x = 726.914 y = 52.2238 z = -655.073 detector = DummyHitDetector ReadData INFO Hit x = 730.125 y = 46.5449 z = -656.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 58 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2514,7 +2532,7 @@ ReadData INFO Hit x = 820.495 y = 63.5816 z = -751.864 detector = Du ReadData INFO Hit x = 823.705 y = 57.9027 z = -753.684 detector = DummyHitDetector ReadData INFO Hit x = 826.914 y = 52.2238 z = -755.073 detector = DummyHitDetector ReadData INFO Hit x = 830.125 y = 46.5449 z = -756.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 59 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2561,7 +2579,7 @@ ReadData INFO Hit x = 920.495 y = 63.5816 z = -851.864 detector = Du ReadData INFO Hit x = 923.705 y = 57.9027 z = -853.684 detector = DummyHitDetector ReadData INFO Hit x = 926.914 y = 52.2238 z = -855.073 detector = DummyHitDetector ReadData INFO Hit x = 930.125 y = 46.5449 z = -856.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 60 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2608,7 +2626,7 @@ ReadData INFO Hit x = 1020.49 y = 63.5816 z = -951.864 detector = Du ReadData INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = DummyHitDetector ReadData INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector ReadData INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 61 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2655,7 +2673,7 @@ ReadData INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du ReadData INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector ReadData INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector ReadData INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 62 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2702,7 +2720,7 @@ ReadData INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du ReadData INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector ReadData INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector ReadData INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 63 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2749,7 +2767,7 @@ ReadData INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du ReadData INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector ReadData INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector ReadData INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 64 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2796,7 +2814,7 @@ ReadData INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du ReadData INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector ReadData INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector ReadData INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 65 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2843,7 +2861,7 @@ ReadData INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du ReadData INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector ReadData INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector ReadData INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 66 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2890,7 +2908,7 @@ ReadData INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du ReadData INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector ReadData INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector ReadData INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 67 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2937,7 +2955,7 @@ ReadData INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du ReadData INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector ReadData INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector ReadData INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 68 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2984,7 +3002,7 @@ ReadData INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du ReadData INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector ReadData INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector ReadData INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 69 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -3031,14 +3049,14 @@ ReadData INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du ReadData INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector ReadData INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector ReadData INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 70 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? MetaDataSvc DEBUG handle() LastInputFile for end AthenaEventLoopMgr INFO No more events in event selection -MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] ApplicationMgr INFO Application Manager Stopped successfully @@ -3051,8 +3069,8 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** cObjR_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.0735(+-0.854)/ 0/ 10 [ms] #=272 -cObj_ALL INFO Time User : Tot= 80 [ms] Ave/Min/Max=0.362(+- 2.67)/ 0/ 30 [ms] #=221 -ChronoStatSvc INFO Time User : Tot= 2.06 [s] #= 1 +cObj_ALL INFO Time User : Tot= 30 [ms] Ave/Min/Max=0.136(+- 1.16)/ 0/ 10 [ms] #=221 +ChronoStatSvc INFO Time User : Tot= 1.07 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref index ddf7e989612c..5898910726aa 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref @@ -1,24 +1,19 @@ -Thu May 24 03:24:57 CEST 2018 +Thu Jun 14 20:40:08 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadAgainJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 48 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 48 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -TrackTools: DerivationFrameworkTileCal.DerivationFrameworkTileCalConf - ['TileD3PDMaker.TileD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! +Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus028.cern.ch on Thu May 24 03:25:23 2018 + running on lxplus021.cern.ch on Thu Jun 14 20:40:19 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -26,7 +21,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2322 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL ChronoStatSvc INFO Number of skipped events for MemStat-1 CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 @@ -39,14 +34,17 @@ PoolSvc DEBUG Property update for OutputLevel : new value = 2 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-05-22T2101/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-dbg/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams PoolSvc INFO POOL WriteCatalog is file:Catalog1.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] +MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 +MetaDataSvc.IOV... DEBUG in initialize() +MetaDataSvc.IOV... DEBUG initialize(): need to modify folders EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 IoComponentMgr INFO IoComponent EventSelector has already had file EmptyPoolFile.root registered with i/o mode READ @@ -164,6 +162,12 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies +MetaDataSvc.IOV... DEBUG handle() FirstInputFile for FID:???? +MetaDataSvc.IOV... DEBUG begin checkOverrideRunNumber +MetaDataSvc.IOV... DEBUG checkOverrideRunNumber: check if tag is set in jobOpts +MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name FID:???? +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 ReadData DEBUG input handles: 0 ReadData DEBUG output handles: 0 @@ -228,7 +232,9 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for EmptyPoolFile.root +MetaDataSvc.IOV... DEBUG The first BeginInputFile incidence is fired along with the FirstInputFile incidence so we skip the processing of the Input File MetaData MetaDataSvc DEBUG handle() EndInputFile for eventless EmptyPoolFile.root Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] @@ -309,7 +315,10 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolReplica1.root +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolReplica1.root +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data EventSelector INFO skipping event 1 EventSelector INFO skipping event 2 EventSelector INFO skipping event 3 @@ -376,7 +385,7 @@ ReadData INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = Dum ReadData INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector ReadData INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector ClassIDSvc INFO getRegistryEntries: read 10 CLIDRegistry entries for module ALL -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27494 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27500 PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 1 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -409,7 +418,7 @@ ReadData INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du ReadData INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector ReadData INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector ReadData INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27494 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27500 PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 2 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -442,7 +451,7 @@ ReadData INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du ReadData INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector ReadData INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector ReadData INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27494 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27500 PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 3 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -475,7 +484,7 @@ ReadData INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du ReadData INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector ReadData INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector ReadData INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27494 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27500 PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 4 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -508,7 +517,7 @@ ReadData INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du ReadData INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector ReadData INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector ReadData INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27494 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27500 PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 5 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -541,7 +550,7 @@ ReadData INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du ReadData INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector ReadData INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector ReadData INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27494 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27500 PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 6 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -574,7 +583,7 @@ ReadData INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du ReadData INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector ReadData INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector ReadData INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27494 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27500 PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 7 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -607,7 +616,7 @@ ReadData INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du ReadData INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector ReadData INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector ReadData INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27494 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27500 PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 8 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -640,7 +649,7 @@ ReadData INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du ReadData INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector ReadData INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector ReadData INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27494 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27500 PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 9 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -673,7 +682,7 @@ ReadData INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du ReadData INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector ReadData INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector ReadData INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27494 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 27500 PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 10 events processed so far <<<=== Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? @@ -734,7 +743,10 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for EmptyPoolFile.root +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name EmptyPoolFile.root +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data MetaDataSvc DEBUG handle() EndInputFile for eventless EmptyPoolFile.root Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] @@ -819,7 +831,10 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile2.root +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile2.root +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 ClassIDSvc INFO getRegistryEntries: read 3 CLIDRegistry entries for module ALL @@ -871,7 +886,7 @@ ReadData INFO EventInfo event: 0 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 11 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -899,7 +914,7 @@ ReadData INFO EventInfo event: 1 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 12 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -927,7 +942,7 @@ ReadData INFO EventInfo event: 2 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 13 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -955,7 +970,7 @@ ReadData INFO EventInfo event: 3 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 14 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -983,7 +998,7 @@ ReadData INFO EventInfo event: 4 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 15 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1011,7 +1026,7 @@ ReadData INFO EventInfo event: 5 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 16 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1039,7 +1054,7 @@ ReadData INFO EventInfo event: 6 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 17 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1067,7 +1082,7 @@ ReadData INFO EventInfo event: 7 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 18 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1095,7 +1110,7 @@ ReadData INFO EventInfo event: 8 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 19 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1123,7 +1138,7 @@ ReadData INFO EventInfo event: 9 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 20 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1151,7 +1166,7 @@ ReadData INFO EventInfo event: 10 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 21 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1179,7 +1194,7 @@ ReadData INFO EventInfo event: 11 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 22 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1207,7 +1222,7 @@ ReadData INFO EventInfo event: 12 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 23 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1235,7 +1250,7 @@ ReadData INFO EventInfo event: 13 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 24 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1263,7 +1278,7 @@ ReadData INFO EventInfo event: 14 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 25 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1291,7 +1306,7 @@ ReadData INFO EventInfo event: 15 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 26 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1319,7 +1334,7 @@ ReadData INFO EventInfo event: 16 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 27 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1347,7 +1362,7 @@ ReadData INFO EventInfo event: 17 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 28 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1375,7 +1390,7 @@ ReadData INFO EventInfo event: 18 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 29 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1403,7 +1418,7 @@ ReadData INFO EventInfo event: 19 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 30 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1432,7 +1447,7 @@ ReadData INFO EventInfo event: 20 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #20, run #2 31 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1460,7 +1475,7 @@ ReadData INFO EventInfo event: 21 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #21, run #2 32 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1488,7 +1503,7 @@ ReadData INFO EventInfo event: 22 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #22, run #2 33 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1516,7 +1531,7 @@ ReadData INFO EventInfo event: 23 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #23, run #2 34 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1544,7 +1559,7 @@ ReadData INFO EventInfo event: 24 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #24, run #2 35 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1572,7 +1587,7 @@ ReadData INFO EventInfo event: 25 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #25, run #2 36 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1600,7 +1615,7 @@ ReadData INFO EventInfo event: 26 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #26, run #2 37 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1628,7 +1643,7 @@ ReadData INFO EventInfo event: 27 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #27, run #2 38 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1656,7 +1671,7 @@ ReadData INFO EventInfo event: 28 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #28, run #2 39 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1684,7 +1699,7 @@ ReadData INFO EventInfo event: 29 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #29, run #2 40 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1712,7 +1727,7 @@ ReadData INFO EventInfo event: 30 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #30, run #2 41 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1740,7 +1755,7 @@ ReadData INFO EventInfo event: 31 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #31, run #2 42 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1768,7 +1783,7 @@ ReadData INFO EventInfo event: 32 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #32, run #2 43 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1796,7 +1811,7 @@ ReadData INFO EventInfo event: 33 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #33, run #2 44 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1824,7 +1839,7 @@ ReadData INFO EventInfo event: 34 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #34, run #2 45 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1852,7 +1867,7 @@ ReadData INFO EventInfo event: 35 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #35, run #2 46 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1880,7 +1895,7 @@ ReadData INFO EventInfo event: 36 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #36, run #2 47 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1908,7 +1923,7 @@ ReadData INFO EventInfo event: 37 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #37, run #2 48 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1936,7 +1951,7 @@ ReadData INFO EventInfo event: 38 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #38, run #2 49 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1964,7 +1979,7 @@ ReadData INFO EventInfo event: 39 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #39, run #2 50 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? @@ -2053,7 +2068,10 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile4.root +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile4.root +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-00000000]. @@ -2255,7 +2273,7 @@ ReadData INFO Hit x = 20.4945 y = 63.5816 z = 48.1358 detector = Dum ReadData INFO Hit x = 23.7045 y = 57.9027 z = 46.3159 detector = DummyHitDetector ReadData INFO Hit x = 26.9145 y = 52.2238 z = 44.9265 detector = DummyHitDetector ReadData INFO Hit x = 30.1245 y = 46.5449 z = 43.831 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27332 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 51 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2302,7 +2320,7 @@ ReadData INFO Hit x = 120.494 y = 63.5816 z = -51.8642 detector = Du ReadData INFO Hit x = 123.704 y = 57.9027 z = -53.6841 detector = DummyHitDetector ReadData INFO Hit x = 126.915 y = 52.2238 z = -55.0735 detector = DummyHitDetector ReadData INFO Hit x = 130.125 y = 46.5449 z = -56.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27332 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 52 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2349,7 +2367,7 @@ ReadData INFO Hit x = 220.494 y = 63.5816 z = -151.864 detector = Du ReadData INFO Hit x = 223.704 y = 57.9027 z = -153.684 detector = DummyHitDetector ReadData INFO Hit x = 226.915 y = 52.2238 z = -155.073 detector = DummyHitDetector ReadData INFO Hit x = 230.125 y = 46.5449 z = -156.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27332 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 53 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2396,7 +2414,7 @@ ReadData INFO Hit x = 320.495 y = 63.5816 z = -251.864 detector = Du ReadData INFO Hit x = 323.705 y = 57.9027 z = -253.684 detector = DummyHitDetector ReadData INFO Hit x = 326.915 y = 52.2238 z = -255.073 detector = DummyHitDetector ReadData INFO Hit x = 330.125 y = 46.5449 z = -256.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27332 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 54 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2443,7 +2461,7 @@ ReadData INFO Hit x = 420.495 y = 63.5816 z = -351.864 detector = Du ReadData INFO Hit x = 423.705 y = 57.9027 z = -353.684 detector = DummyHitDetector ReadData INFO Hit x = 426.915 y = 52.2238 z = -355.073 detector = DummyHitDetector ReadData INFO Hit x = 430.125 y = 46.5449 z = -356.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27332 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 55 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2490,7 +2508,7 @@ ReadData INFO Hit x = 520.495 y = 63.5816 z = -451.864 detector = Du ReadData INFO Hit x = 523.705 y = 57.9027 z = -453.684 detector = DummyHitDetector ReadData INFO Hit x = 526.914 y = 52.2238 z = -455.073 detector = DummyHitDetector ReadData INFO Hit x = 530.125 y = 46.5449 z = -456.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27332 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 56 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2537,7 +2555,7 @@ ReadData INFO Hit x = 620.495 y = 63.5816 z = -551.864 detector = Du ReadData INFO Hit x = 623.705 y = 57.9027 z = -553.684 detector = DummyHitDetector ReadData INFO Hit x = 626.914 y = 52.2238 z = -555.073 detector = DummyHitDetector ReadData INFO Hit x = 630.125 y = 46.5449 z = -556.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27332 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 57 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2584,7 +2602,7 @@ ReadData INFO Hit x = 720.495 y = 63.5816 z = -651.864 detector = Du ReadData INFO Hit x = 723.705 y = 57.9027 z = -653.684 detector = DummyHitDetector ReadData INFO Hit x = 726.914 y = 52.2238 z = -655.073 detector = DummyHitDetector ReadData INFO Hit x = 730.125 y = 46.5449 z = -656.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27332 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 58 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2631,7 +2649,7 @@ ReadData INFO Hit x = 820.495 y = 63.5816 z = -751.864 detector = Du ReadData INFO Hit x = 823.705 y = 57.9027 z = -753.684 detector = DummyHitDetector ReadData INFO Hit x = 826.914 y = 52.2238 z = -755.073 detector = DummyHitDetector ReadData INFO Hit x = 830.125 y = 46.5449 z = -756.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27332 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 59 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2678,7 +2696,7 @@ ReadData INFO Hit x = 920.495 y = 63.5816 z = -851.864 detector = Du ReadData INFO Hit x = 923.705 y = 57.9027 z = -853.684 detector = DummyHitDetector ReadData INFO Hit x = 926.914 y = 52.2238 z = -855.073 detector = DummyHitDetector ReadData INFO Hit x = 930.125 y = 46.5449 z = -856.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27332 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 60 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2725,7 +2743,7 @@ ReadData INFO Hit x = 1020.49 y = 63.5816 z = -951.864 detector = Du ReadData INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = DummyHitDetector ReadData INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector ReadData INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27332 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 61 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2772,7 +2790,7 @@ ReadData INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du ReadData INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector ReadData INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector ReadData INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27332 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 62 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2819,7 +2837,7 @@ ReadData INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du ReadData INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector ReadData INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector ReadData INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27332 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 63 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2866,7 +2884,7 @@ ReadData INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du ReadData INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector ReadData INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector ReadData INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27332 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 64 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2913,7 +2931,7 @@ ReadData INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du ReadData INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector ReadData INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector ReadData INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27332 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 65 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2960,7 +2978,7 @@ ReadData INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du ReadData INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector ReadData INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector ReadData INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27332 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 66 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -3007,7 +3025,7 @@ ReadData INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du ReadData INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector ReadData INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector ReadData INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27332 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 67 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -3054,7 +3072,7 @@ ReadData INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du ReadData INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector ReadData INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector ReadData INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27332 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 68 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -3101,7 +3119,7 @@ ReadData INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du ReadData INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector ReadData INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector ReadData INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27332 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 69 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -3148,14 +3166,14 @@ ReadData INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du ReadData INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector ReadData INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector ReadData INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27332 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 70 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? MetaDataSvc DEBUG handle() LastInputFile for end AthenaEventLoopMgr INFO No more events in event selection -MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] @@ -3168,9 +3186,9 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -cObjR_ALL INFO Time User : Tot= 180 [ms] Ave/Min/Max=0.579(+- 2.47)/ 0/ 20 [ms] #=311 -cObj_ALL INFO Time User : Tot= 370 [ms] Ave/Min/Max= 1.54(+- 6.09)/ 0/ 50 [ms] #=241 -ChronoStatSvc INFO Time User : Tot= 4.1 [s] #= 1 +cObjR_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.0643(+-0.799)/ 0/ 10 [ms] #=311 +cObj_ALL INFO Time User : Tot= 50 [ms] Ave/Min/Max=0.207(+- 1.43)/ 0/ 10 [ms] #=241 +ChronoStatSvc INFO Time User : Tot= 1.16 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadBN.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadBN.ref index f206a5f8a300..6603e410719e 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadBN.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadBN.ref @@ -1,24 +1,19 @@ -Wed May 23 21:38:40 CEST 2018 +Thu Jun 14 19:57:44 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadBNJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 47 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 47 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -TrackTools: DerivationFrameworkTileCal.DerivationFrameworkTileCalConf - ['TileD3PDMaker.TileD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! +Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus083.cern.ch on Wed May 23 21:39:06 2018 + running on lxplus021.cern.ch on Thu Jun 14 19:57:54 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -26,7 +21,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2322 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL ChronoStatSvc INFO Number of skipped events for MemStat-1 CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 @@ -39,14 +34,17 @@ PoolSvc DEBUG Property update for OutputLevel : new value = 2 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-05-22T2053/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus083.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams PoolSvc INFO POOL WriteCatalog is file:Catalog1.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] +MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 +MetaDataSvc.IOV... DEBUG in initialize() +MetaDataSvc.IOV... DEBUG initialize(): need to modify folders EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 IoComponentMgr INFO IoComponent EventSelector has already had file EmptyPoolFile.root registered with i/o mode READ @@ -170,6 +168,12 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies +MetaDataSvc.IOV... DEBUG handle() FirstInputFile for FID:???? +MetaDataSvc.IOV... DEBUG begin checkOverrideRunNumber +MetaDataSvc.IOV... DEBUG checkOverrideRunNumber: check if tag is set in jobOpts +MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name FID:???? +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 AthenaPoolAddre... INFO BackNavigationScope for: ExampleHitContainer#MyHits :: Stream1 ReadData DEBUG input handles: 0 @@ -231,7 +235,9 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for EmptyPoolFile.root +MetaDataSvc.IOV... DEBUG The first BeginInputFile incidence is fired along with the FirstInputFile incidence so we skip the processing of the Input File MetaData MetaDataSvc DEBUG handle() EndInputFile for eventless EmptyPoolFile.root Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? EventSelector DEBUG Try item: "SimplePoolFile1.root" from the collection list. @@ -246,7 +252,10 @@ PoolSvc INFO Database (SimplePoolFile1.root) attribute [TREE_CACHE_ MetaDataSvc DEBUG handle() BeginInputFile for SimplePoolFile1.root MetaDataSvc DEBUG initInputMetaDataStore: file name SimplePoolFile1.root MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile1.root +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile1.root +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data EventSelector INFO skipping event 1 EventSelector INFO skipping event 2 EventSelector INFO skipping event 3 @@ -318,7 +327,7 @@ ReadData INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = Dum ReadData INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector ReadData INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector ClassIDSvc INFO getRegistryEntries: read 10 CLIDRegistry entries for module ALL -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27934 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 1 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -351,7 +360,7 @@ ReadData INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du ReadData INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector ReadData INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector ReadData INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27934 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 2 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -384,7 +393,7 @@ ReadData INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du ReadData INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector ReadData INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector ReadData INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27934 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 3 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -417,7 +426,7 @@ ReadData INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du ReadData INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector ReadData INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector ReadData INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27934 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 4 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -450,7 +459,7 @@ ReadData INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du ReadData INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector ReadData INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector ReadData INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27934 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 5 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -483,7 +492,7 @@ ReadData INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du ReadData INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector ReadData INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector ReadData INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27934 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 6 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -516,7 +525,7 @@ ReadData INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du ReadData INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector ReadData INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector ReadData INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27934 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 7 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -549,7 +558,7 @@ ReadData INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du ReadData INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector ReadData INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector ReadData INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27934 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 8 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -582,7 +591,7 @@ ReadData INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du ReadData INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector ReadData INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector ReadData INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27934 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 9 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -615,7 +624,7 @@ ReadData INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du ReadData INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector ReadData INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector ReadData INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27934 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 10 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? @@ -676,7 +685,10 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for EmptyPoolFile.root +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name EmptyPoolFile.root +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data MetaDataSvc DEBUG handle() EndInputFile for eventless EmptyPoolFile.root Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] @@ -761,7 +773,10 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile2.root +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile2.root +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000005-00000000]. @@ -812,7 +827,7 @@ ReadData INFO EventInfo event: 0 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26626 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 11 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -840,7 +855,7 @@ ReadData INFO EventInfo event: 1 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26626 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 12 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -868,7 +883,7 @@ ReadData INFO EventInfo event: 2 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26626 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 13 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -896,7 +911,7 @@ ReadData INFO EventInfo event: 3 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26626 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 14 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -924,7 +939,7 @@ ReadData INFO EventInfo event: 4 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26626 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 15 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -952,7 +967,7 @@ ReadData INFO EventInfo event: 5 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26626 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 16 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -980,7 +995,7 @@ ReadData INFO EventInfo event: 6 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26626 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 17 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1008,7 +1023,7 @@ ReadData INFO EventInfo event: 7 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26626 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 18 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1036,7 +1051,7 @@ ReadData INFO EventInfo event: 8 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26626 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 19 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1064,7 +1079,7 @@ ReadData INFO EventInfo event: 9 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26626 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 20 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1092,7 +1107,7 @@ ReadData INFO EventInfo event: 10 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26626 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 21 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1120,7 +1135,7 @@ ReadData INFO EventInfo event: 11 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26626 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 22 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1148,7 +1163,7 @@ ReadData INFO EventInfo event: 12 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26626 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 23 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1176,7 +1191,7 @@ ReadData INFO EventInfo event: 13 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26626 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 24 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1204,7 +1219,7 @@ ReadData INFO EventInfo event: 14 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26626 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 25 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1232,7 +1247,7 @@ ReadData INFO EventInfo event: 15 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26626 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 26 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1260,7 +1275,7 @@ ReadData INFO EventInfo event: 16 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26626 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 27 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1288,7 +1303,7 @@ ReadData INFO EventInfo event: 17 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26626 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 28 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1316,7 +1331,7 @@ ReadData INFO EventInfo event: 18 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26626 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 29 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1344,7 +1359,7 @@ ReadData INFO EventInfo event: 19 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26626 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 30 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1373,7 +1388,7 @@ ReadData INFO EventInfo event: 20 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #20, run #2 31 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1401,7 +1416,7 @@ ReadData INFO EventInfo event: 21 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #21, run #2 32 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1429,7 +1444,7 @@ ReadData INFO EventInfo event: 22 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #22, run #2 33 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1457,7 +1472,7 @@ ReadData INFO EventInfo event: 23 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #23, run #2 34 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1485,7 +1500,7 @@ ReadData INFO EventInfo event: 24 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #24, run #2 35 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1513,7 +1528,7 @@ ReadData INFO EventInfo event: 25 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #25, run #2 36 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1541,7 +1556,7 @@ ReadData INFO EventInfo event: 26 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #26, run #2 37 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1569,7 +1584,7 @@ ReadData INFO EventInfo event: 27 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #27, run #2 38 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1597,7 +1612,7 @@ ReadData INFO EventInfo event: 28 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #28, run #2 39 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1625,7 +1640,7 @@ ReadData INFO EventInfo event: 29 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #29, run #2 40 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1653,7 +1668,7 @@ ReadData INFO EventInfo event: 30 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #30, run #2 41 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1681,7 +1696,7 @@ ReadData INFO EventInfo event: 31 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #31, run #2 42 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1709,7 +1724,7 @@ ReadData INFO EventInfo event: 32 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #32, run #2 43 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1737,7 +1752,7 @@ ReadData INFO EventInfo event: 33 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #33, run #2 44 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1765,7 +1780,7 @@ ReadData INFO EventInfo event: 34 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #34, run #2 45 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1793,7 +1808,7 @@ ReadData INFO EventInfo event: 35 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #35, run #2 46 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1821,7 +1836,7 @@ ReadData INFO EventInfo event: 36 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #36, run #2 47 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1849,7 +1864,7 @@ ReadData INFO EventInfo event: 37 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #37, run #2 48 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1877,7 +1892,7 @@ ReadData INFO EventInfo event: 38 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #38, run #2 49 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1905,7 +1920,7 @@ ReadData INFO EventInfo event: 39 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #39, run #2 50 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? @@ -1994,7 +2009,10 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile3.root +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile3.root +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-00000000]. @@ -2139,7 +2157,7 @@ ReadData INFO Hit x = 20.4945 y = 63.5816 z = 48.1358 detector = Dum ReadData INFO Hit x = 23.7045 y = 57.9027 z = 46.3159 detector = DummyHitDetector ReadData INFO Hit x = 26.9145 y = 52.2238 z = 44.9265 detector = DummyHitDetector ReadData INFO Hit x = 30.1245 y = 46.5449 z = 43.831 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27286 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 51 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2186,7 +2204,7 @@ ReadData INFO Hit x = 120.494 y = 63.5816 z = -51.8642 detector = Du ReadData INFO Hit x = 123.704 y = 57.9027 z = -53.6841 detector = DummyHitDetector ReadData INFO Hit x = 126.915 y = 52.2238 z = -55.0735 detector = DummyHitDetector ReadData INFO Hit x = 130.125 y = 46.5449 z = -56.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27286 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 52 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2233,7 +2251,7 @@ ReadData INFO Hit x = 220.494 y = 63.5816 z = -151.864 detector = Du ReadData INFO Hit x = 223.704 y = 57.9027 z = -153.684 detector = DummyHitDetector ReadData INFO Hit x = 226.915 y = 52.2238 z = -155.073 detector = DummyHitDetector ReadData INFO Hit x = 230.125 y = 46.5449 z = -156.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27286 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 53 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2280,7 +2298,7 @@ ReadData INFO Hit x = 320.495 y = 63.5816 z = -251.864 detector = Du ReadData INFO Hit x = 323.705 y = 57.9027 z = -253.684 detector = DummyHitDetector ReadData INFO Hit x = 326.915 y = 52.2238 z = -255.073 detector = DummyHitDetector ReadData INFO Hit x = 330.125 y = 46.5449 z = -256.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27286 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 54 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2327,7 +2345,7 @@ ReadData INFO Hit x = 420.495 y = 63.5816 z = -351.864 detector = Du ReadData INFO Hit x = 423.705 y = 57.9027 z = -353.684 detector = DummyHitDetector ReadData INFO Hit x = 426.915 y = 52.2238 z = -355.073 detector = DummyHitDetector ReadData INFO Hit x = 430.125 y = 46.5449 z = -356.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27286 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 55 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2374,7 +2392,7 @@ ReadData INFO Hit x = 520.495 y = 63.5816 z = -451.864 detector = Du ReadData INFO Hit x = 523.705 y = 57.9027 z = -453.684 detector = DummyHitDetector ReadData INFO Hit x = 526.914 y = 52.2238 z = -455.073 detector = DummyHitDetector ReadData INFO Hit x = 530.125 y = 46.5449 z = -456.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27286 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 56 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2421,7 +2439,7 @@ ReadData INFO Hit x = 620.495 y = 63.5816 z = -551.864 detector = Du ReadData INFO Hit x = 623.705 y = 57.9027 z = -553.684 detector = DummyHitDetector ReadData INFO Hit x = 626.914 y = 52.2238 z = -555.073 detector = DummyHitDetector ReadData INFO Hit x = 630.125 y = 46.5449 z = -556.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27286 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 57 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2468,7 +2486,7 @@ ReadData INFO Hit x = 720.495 y = 63.5816 z = -651.864 detector = Du ReadData INFO Hit x = 723.705 y = 57.9027 z = -653.684 detector = DummyHitDetector ReadData INFO Hit x = 726.914 y = 52.2238 z = -655.073 detector = DummyHitDetector ReadData INFO Hit x = 730.125 y = 46.5449 z = -656.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27286 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 58 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2515,7 +2533,7 @@ ReadData INFO Hit x = 820.495 y = 63.5816 z = -751.864 detector = Du ReadData INFO Hit x = 823.705 y = 57.9027 z = -753.684 detector = DummyHitDetector ReadData INFO Hit x = 826.914 y = 52.2238 z = -755.073 detector = DummyHitDetector ReadData INFO Hit x = 830.125 y = 46.5449 z = -756.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27286 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 59 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2562,7 +2580,7 @@ ReadData INFO Hit x = 920.495 y = 63.5816 z = -851.864 detector = Du ReadData INFO Hit x = 923.705 y = 57.9027 z = -853.684 detector = DummyHitDetector ReadData INFO Hit x = 926.914 y = 52.2238 z = -855.073 detector = DummyHitDetector ReadData INFO Hit x = 930.125 y = 46.5449 z = -856.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27286 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 60 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2609,7 +2627,7 @@ ReadData INFO Hit x = 1020.49 y = 63.5816 z = -951.864 detector = Du ReadData INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = DummyHitDetector ReadData INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector ReadData INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27286 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 61 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2656,7 +2674,7 @@ ReadData INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du ReadData INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector ReadData INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector ReadData INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27286 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 62 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2703,7 +2721,7 @@ ReadData INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du ReadData INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector ReadData INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector ReadData INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27286 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 63 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2750,7 +2768,7 @@ ReadData INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du ReadData INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector ReadData INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector ReadData INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27286 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 64 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2797,7 +2815,7 @@ ReadData INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du ReadData INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector ReadData INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector ReadData INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27286 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 65 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2844,7 +2862,7 @@ ReadData INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du ReadData INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector ReadData INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector ReadData INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27286 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 66 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2891,7 +2909,7 @@ ReadData INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du ReadData INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector ReadData INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector ReadData INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27286 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 67 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2938,7 +2956,7 @@ ReadData INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du ReadData INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector ReadData INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector ReadData INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27286 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 68 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2985,7 +3003,7 @@ ReadData INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du ReadData INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector ReadData INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector ReadData INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27286 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 69 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -3032,14 +3050,14 @@ ReadData INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du ReadData INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector ReadData INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector ReadData INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27286 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 70 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? MetaDataSvc DEBUG handle() LastInputFile for end AthenaEventLoopMgr INFO No more events in event selection -MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] ApplicationMgr INFO Application Manager Stopped successfully @@ -3052,8 +3070,8 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** cObjR_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.0735(+-0.854)/ 0/ 10 [ms] #=272 -cObj_ALL INFO Time User : Tot= 100 [ms] Ave/Min/Max=0.452(+- 2.48)/ 0/ 20 [ms] #=221 -ChronoStatSvc INFO Time User : Tot= 2.1 [s] #= 1 +cObj_ALL INFO Time User : Tot= 50 [ms] Ave/Min/Max=0.226(+- 1.77)/ 0/ 20 [ms] #=221 +ChronoStatSvc INFO Time User : Tot= 1.01 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref index 41e4d3a7e748..7109a6dab166 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref @@ -1,24 +1,19 @@ -Thu May 24 03:26:24 CEST 2018 +Thu Jun 14 20:40:37 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 48 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 48 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -TrackTools: DerivationFrameworkTileCal.DerivationFrameworkTileCalConf - ['TileD3PDMaker.TileD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! +Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus028.cern.ch on Thu May 24 03:26:49 2018 + running on lxplus021.cern.ch on Thu Jun 14 20:40:48 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -26,7 +21,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2322 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL ChronoStatSvc INFO Number of skipped events for MemStat-1 CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 @@ -39,14 +34,17 @@ PoolSvc DEBUG Property update for OutputLevel : new value = 2 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-05-22T2101/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-dbg/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams PoolSvc INFO POOL WriteCatalog is file:Catalog1.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] +MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 +MetaDataSvc.IOV... DEBUG in initialize() +MetaDataSvc.IOV... DEBUG initialize(): need to modify folders EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 IoComponentMgr INFO IoComponent EventSelector has already had file EmptyPoolFile.root registered with i/o mode READ @@ -164,6 +162,12 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies +MetaDataSvc.IOV... DEBUG handle() FirstInputFile for FID:???? +MetaDataSvc.IOV... DEBUG begin checkOverrideRunNumber +MetaDataSvc.IOV... DEBUG checkOverrideRunNumber: check if tag is set in jobOpts +MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name FID:???? +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 ReadData DEBUG input handles: 0 ReadData DEBUG output handles: 0 @@ -228,7 +232,9 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for EmptyPoolFile.root +MetaDataSvc.IOV... DEBUG The first BeginInputFile incidence is fired along with the FirstInputFile incidence so we skip the processing of the Input File MetaData MetaDataSvc DEBUG handle() EndInputFile for eventless EmptyPoolFile.root Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] @@ -309,7 +315,10 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile1.root +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile1.root +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data EventSelector INFO skipping event 1 EventSelector INFO skipping event 2 EventSelector INFO skipping event 3 @@ -376,7 +385,7 @@ ReadData INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = Dum ReadData INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector ReadData INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector ClassIDSvc INFO getRegistryEntries: read 10 CLIDRegistry entries for module ALL -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27511 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27514 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 1 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -409,7 +418,7 @@ ReadData INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du ReadData INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector ReadData INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector ReadData INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27511 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27514 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 2 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -442,7 +451,7 @@ ReadData INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du ReadData INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector ReadData INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector ReadData INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27511 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27514 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 3 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -475,7 +484,7 @@ ReadData INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du ReadData INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector ReadData INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector ReadData INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27511 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27514 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 4 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -508,7 +517,7 @@ ReadData INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du ReadData INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector ReadData INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector ReadData INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27511 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27514 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 5 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -541,7 +550,7 @@ ReadData INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du ReadData INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector ReadData INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector ReadData INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27511 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27514 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 6 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -574,7 +583,7 @@ ReadData INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du ReadData INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector ReadData INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector ReadData INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27511 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27514 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 7 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -607,7 +616,7 @@ ReadData INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du ReadData INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector ReadData INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector ReadData INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27511 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27514 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 8 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -640,7 +649,7 @@ ReadData INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du ReadData INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector ReadData INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector ReadData INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27511 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27514 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 9 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -673,7 +682,7 @@ ReadData INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du ReadData INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector ReadData INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector ReadData INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27511 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27514 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 10 events processed so far <<<=== Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? @@ -734,7 +743,10 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for EmptyPoolFile.root +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name EmptyPoolFile.root +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data MetaDataSvc DEBUG handle() EndInputFile for eventless EmptyPoolFile.root Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] @@ -819,7 +831,10 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile2.root +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile2.root +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 ClassIDSvc INFO getRegistryEntries: read 3 CLIDRegistry entries for module ALL @@ -871,7 +886,7 @@ ReadData INFO EventInfo event: 0 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 11 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -899,7 +914,7 @@ ReadData INFO EventInfo event: 1 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 12 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -927,7 +942,7 @@ ReadData INFO EventInfo event: 2 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 13 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -955,7 +970,7 @@ ReadData INFO EventInfo event: 3 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 14 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -983,7 +998,7 @@ ReadData INFO EventInfo event: 4 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 15 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1011,7 +1026,7 @@ ReadData INFO EventInfo event: 5 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 16 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1039,7 +1054,7 @@ ReadData INFO EventInfo event: 6 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 17 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1067,7 +1082,7 @@ ReadData INFO EventInfo event: 7 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 18 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1095,7 +1110,7 @@ ReadData INFO EventInfo event: 8 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 19 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1123,7 +1138,7 @@ ReadData INFO EventInfo event: 9 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 20 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1151,7 +1166,7 @@ ReadData INFO EventInfo event: 10 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 21 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1179,7 +1194,7 @@ ReadData INFO EventInfo event: 11 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 22 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1207,7 +1222,7 @@ ReadData INFO EventInfo event: 12 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 23 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1235,7 +1250,7 @@ ReadData INFO EventInfo event: 13 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 24 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1263,7 +1278,7 @@ ReadData INFO EventInfo event: 14 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 25 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1291,7 +1306,7 @@ ReadData INFO EventInfo event: 15 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 26 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1319,7 +1334,7 @@ ReadData INFO EventInfo event: 16 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 27 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1347,7 +1362,7 @@ ReadData INFO EventInfo event: 17 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 28 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1375,7 +1390,7 @@ ReadData INFO EventInfo event: 18 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 29 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1403,7 +1418,7 @@ ReadData INFO EventInfo event: 19 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 30 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1432,7 +1447,7 @@ ReadData INFO EventInfo event: 20 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #20, run #2 31 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1460,7 +1475,7 @@ ReadData INFO EventInfo event: 21 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #21, run #2 32 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1488,7 +1503,7 @@ ReadData INFO EventInfo event: 22 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #22, run #2 33 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1516,7 +1531,7 @@ ReadData INFO EventInfo event: 23 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #23, run #2 34 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1544,7 +1559,7 @@ ReadData INFO EventInfo event: 24 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #24, run #2 35 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1572,7 +1587,7 @@ ReadData INFO EventInfo event: 25 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #25, run #2 36 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1600,7 +1615,7 @@ ReadData INFO EventInfo event: 26 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #26, run #2 37 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1628,7 +1643,7 @@ ReadData INFO EventInfo event: 27 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #27, run #2 38 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1656,7 +1671,7 @@ ReadData INFO EventInfo event: 28 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #28, run #2 39 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1684,7 +1699,7 @@ ReadData INFO EventInfo event: 29 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #29, run #2 40 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1712,7 +1727,7 @@ ReadData INFO EventInfo event: 30 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #30, run #2 41 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1740,7 +1755,7 @@ ReadData INFO EventInfo event: 31 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #31, run #2 42 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1768,7 +1783,7 @@ ReadData INFO EventInfo event: 32 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #32, run #2 43 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1796,7 +1811,7 @@ ReadData INFO EventInfo event: 33 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #33, run #2 44 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1824,7 +1839,7 @@ ReadData INFO EventInfo event: 34 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #34, run #2 45 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1852,7 +1867,7 @@ ReadData INFO EventInfo event: 35 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #35, run #2 46 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1880,7 +1895,7 @@ ReadData INFO EventInfo event: 36 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #36, run #2 47 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1908,7 +1923,7 @@ ReadData INFO EventInfo event: 37 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #37, run #2 48 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1936,7 +1951,7 @@ ReadData INFO EventInfo event: 38 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #38, run #2 49 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1964,7 +1979,7 @@ ReadData INFO EventInfo event: 39 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28241 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #39, run #2 50 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? @@ -2046,7 +2061,10 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile3.root +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile3.root +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-00000000]. @@ -2174,7 +2192,7 @@ ReadData INFO Hit x = 20.4945 y = 63.5816 z = 48.1358 detector = Dum ReadData INFO Hit x = 23.7045 y = 57.9027 z = 46.3159 detector = DummyHitDetector ReadData INFO Hit x = 26.9145 y = 52.2238 z = 44.9265 detector = DummyHitDetector ReadData INFO Hit x = 30.1245 y = 46.5449 z = 43.831 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 51 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2221,7 +2239,7 @@ ReadData INFO Hit x = 120.494 y = 63.5816 z = -51.8642 detector = Du ReadData INFO Hit x = 123.704 y = 57.9027 z = -53.6841 detector = DummyHitDetector ReadData INFO Hit x = 126.915 y = 52.2238 z = -55.0735 detector = DummyHitDetector ReadData INFO Hit x = 130.125 y = 46.5449 z = -56.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 52 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2268,7 +2286,7 @@ ReadData INFO Hit x = 220.494 y = 63.5816 z = -151.864 detector = Du ReadData INFO Hit x = 223.704 y = 57.9027 z = -153.684 detector = DummyHitDetector ReadData INFO Hit x = 226.915 y = 52.2238 z = -155.073 detector = DummyHitDetector ReadData INFO Hit x = 230.125 y = 46.5449 z = -156.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 53 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2315,7 +2333,7 @@ ReadData INFO Hit x = 320.495 y = 63.5816 z = -251.864 detector = Du ReadData INFO Hit x = 323.705 y = 57.9027 z = -253.684 detector = DummyHitDetector ReadData INFO Hit x = 326.915 y = 52.2238 z = -255.073 detector = DummyHitDetector ReadData INFO Hit x = 330.125 y = 46.5449 z = -256.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 54 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2362,7 +2380,7 @@ ReadData INFO Hit x = 420.495 y = 63.5816 z = -351.864 detector = Du ReadData INFO Hit x = 423.705 y = 57.9027 z = -353.684 detector = DummyHitDetector ReadData INFO Hit x = 426.915 y = 52.2238 z = -355.073 detector = DummyHitDetector ReadData INFO Hit x = 430.125 y = 46.5449 z = -356.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 55 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2409,7 +2427,7 @@ ReadData INFO Hit x = 520.495 y = 63.5816 z = -451.864 detector = Du ReadData INFO Hit x = 523.705 y = 57.9027 z = -453.684 detector = DummyHitDetector ReadData INFO Hit x = 526.914 y = 52.2238 z = -455.073 detector = DummyHitDetector ReadData INFO Hit x = 530.125 y = 46.5449 z = -456.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 56 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2456,7 +2474,7 @@ ReadData INFO Hit x = 620.495 y = 63.5816 z = -551.864 detector = Du ReadData INFO Hit x = 623.705 y = 57.9027 z = -553.684 detector = DummyHitDetector ReadData INFO Hit x = 626.914 y = 52.2238 z = -555.073 detector = DummyHitDetector ReadData INFO Hit x = 630.125 y = 46.5449 z = -556.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 57 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2503,7 +2521,7 @@ ReadData INFO Hit x = 720.495 y = 63.5816 z = -651.864 detector = Du ReadData INFO Hit x = 723.705 y = 57.9027 z = -653.684 detector = DummyHitDetector ReadData INFO Hit x = 726.914 y = 52.2238 z = -655.073 detector = DummyHitDetector ReadData INFO Hit x = 730.125 y = 46.5449 z = -656.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 58 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2550,7 +2568,7 @@ ReadData INFO Hit x = 820.495 y = 63.5816 z = -751.864 detector = Du ReadData INFO Hit x = 823.705 y = 57.9027 z = -753.684 detector = DummyHitDetector ReadData INFO Hit x = 826.914 y = 52.2238 z = -755.073 detector = DummyHitDetector ReadData INFO Hit x = 830.125 y = 46.5449 z = -756.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 59 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2597,7 +2615,7 @@ ReadData INFO Hit x = 920.495 y = 63.5816 z = -851.864 detector = Du ReadData INFO Hit x = 923.705 y = 57.9027 z = -853.684 detector = DummyHitDetector ReadData INFO Hit x = 926.914 y = 52.2238 z = -855.073 detector = DummyHitDetector ReadData INFO Hit x = 930.125 y = 46.5449 z = -856.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 60 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2644,7 +2662,7 @@ ReadData INFO Hit x = 1020.49 y = 63.5816 z = -951.864 detector = Du ReadData INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = DummyHitDetector ReadData INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector ReadData INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 61 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2691,7 +2709,7 @@ ReadData INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du ReadData INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector ReadData INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector ReadData INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 62 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2738,7 +2756,7 @@ ReadData INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du ReadData INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector ReadData INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector ReadData INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 63 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2785,7 +2803,7 @@ ReadData INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du ReadData INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector ReadData INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector ReadData INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 64 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2832,7 +2850,7 @@ ReadData INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du ReadData INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector ReadData INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector ReadData INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 65 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2879,7 +2897,7 @@ ReadData INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du ReadData INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector ReadData INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector ReadData INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 66 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2926,7 +2944,7 @@ ReadData INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du ReadData INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector ReadData INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector ReadData INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 67 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2973,7 +2991,7 @@ ReadData INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du ReadData INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector ReadData INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector ReadData INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 68 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -3020,7 +3038,7 @@ ReadData INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du ReadData INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector ReadData INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector ReadData INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 69 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -3067,14 +3085,14 @@ ReadData INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du ReadData INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector ReadData INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector ReadData INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 70 events processed so far <<<=== Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? MetaDataSvc DEBUG handle() EndInputFile for FID:???? MetaDataSvc DEBUG handle() LastInputFile for end AthenaEventLoopMgr INFO No more events in event selection -MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] ApplicationMgr INFO Application Manager Stopped successfully @@ -3086,9 +3104,9 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -cObjR_ALL INFO Time User : Tot= 170 [ms] Ave/Min/Max=0.625(+- 2.84)/ 0/ 30 [ms] #=272 -cObj_ALL INFO Time User : Tot= 310 [ms] Ave/Min/Max= 1.4(+- 5.81)/ 0/ 50 [ms] #=221 -ChronoStatSvc INFO Time User : Tot= 4.07 [s] #= 1 +cObjR_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.0735(+-0.854)/ 0/ 10 [ms] #=272 +cObj_ALL INFO Time User : Tot= 50 [ms] Ave/Min/Max=0.226(+- 1.77)/ 0/ 20 [ms] #=221 +ChronoStatSvc INFO Time User : Tot= 1.03 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadNoBN.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadNoBN.ref index 9655079124e9..4ca427358d9d 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadNoBN.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadNoBN.ref @@ -1,24 +1,19 @@ -Wed May 23 21:51:16 CEST 2018 +Thu Jun 14 19:57:44 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadNoBNJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 47 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 47 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -TrackTools: DerivationFrameworkTileCal.DerivationFrameworkTileCalConf - ['TileD3PDMaker.TileD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! +Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus083.cern.ch on Wed May 23 21:51:42 2018 + running on lxplus021.cern.ch on Thu Jun 14 19:57:54 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -26,7 +21,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2322 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL ChronoStatSvc INFO Number of skipped events for MemStat-1 CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 @@ -39,14 +34,17 @@ PoolSvc DEBUG Property update for OutputLevel : new value = 2 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-05-22T2053/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus083.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams PoolSvc INFO POOL WriteCatalog is file:Catalog1.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] +MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 +MetaDataSvc.IOV... DEBUG in initialize() +MetaDataSvc.IOV... DEBUG initialize(): need to modify folders EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 IoComponentMgr INFO IoComponent EventSelector has already had file EmptyPoolFile.root registered with i/o mode READ @@ -170,6 +168,12 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies +MetaDataSvc.IOV... DEBUG handle() FirstInputFile for FID:???? +MetaDataSvc.IOV... DEBUG begin checkOverrideRunNumber +MetaDataSvc.IOV... DEBUG checkOverrideRunNumber: check if tag is set in jobOpts +MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name FID:???? +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 ReadData DEBUG input handles: 0 ReadData DEBUG output handles: 0 @@ -230,7 +234,9 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for EmptyPoolFile.root +MetaDataSvc.IOV... DEBUG The first BeginInputFile incidence is fired along with the FirstInputFile incidence so we skip the processing of the Input File MetaData MetaDataSvc DEBUG handle() EndInputFile for eventless EmptyPoolFile.root Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? EventSelector DEBUG Try item: "SimplePoolFile1.root" from the collection list. @@ -245,7 +251,10 @@ PoolSvc INFO Database (SimplePoolFile1.root) attribute [TREE_CACHE_ MetaDataSvc DEBUG handle() BeginInputFile for SimplePoolFile1.root MetaDataSvc DEBUG initInputMetaDataStore: file name SimplePoolFile1.root MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile1.root +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile1.root +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data EventSelector INFO skipping event 1 EventSelector INFO skipping event 2 EventSelector INFO skipping event 3 @@ -317,7 +326,7 @@ ReadData INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = Dum ReadData INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector ReadData INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector ClassIDSvc INFO getRegistryEntries: read 10 CLIDRegistry entries for module ALL -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27941 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 1 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -350,7 +359,7 @@ ReadData INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du ReadData INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector ReadData INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector ReadData INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27941 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 2 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -383,7 +392,7 @@ ReadData INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du ReadData INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector ReadData INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector ReadData INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27941 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 3 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -416,7 +425,7 @@ ReadData INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du ReadData INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector ReadData INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector ReadData INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27941 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 4 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -449,7 +458,7 @@ ReadData INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du ReadData INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector ReadData INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector ReadData INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27941 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 5 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -482,7 +491,7 @@ ReadData INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du ReadData INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector ReadData INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector ReadData INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27941 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 6 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -515,7 +524,7 @@ ReadData INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du ReadData INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector ReadData INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector ReadData INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27941 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 7 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -548,7 +557,7 @@ ReadData INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du ReadData INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector ReadData INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector ReadData INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27941 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 8 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -581,7 +590,7 @@ ReadData INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du ReadData INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector ReadData INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector ReadData INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27941 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 9 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -614,7 +623,7 @@ ReadData INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du ReadData INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector ReadData INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector ReadData INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27941 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 10 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? @@ -675,7 +684,10 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for EmptyPoolFile.root +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name EmptyPoolFile.root +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data MetaDataSvc DEBUG handle() EndInputFile for eventless EmptyPoolFile.root Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] @@ -760,7 +772,10 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile2.root +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile2.root +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000005-00000000]. @@ -811,7 +826,7 @@ ReadData INFO EventInfo event: 0 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 11 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -839,7 +854,7 @@ ReadData INFO EventInfo event: 1 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 12 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -867,7 +882,7 @@ ReadData INFO EventInfo event: 2 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 13 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -895,7 +910,7 @@ ReadData INFO EventInfo event: 3 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 14 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -923,7 +938,7 @@ ReadData INFO EventInfo event: 4 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 15 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -951,7 +966,7 @@ ReadData INFO EventInfo event: 5 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 16 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -979,7 +994,7 @@ ReadData INFO EventInfo event: 6 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 17 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1007,7 +1022,7 @@ ReadData INFO EventInfo event: 7 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 18 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1035,7 +1050,7 @@ ReadData INFO EventInfo event: 8 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 19 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1063,7 +1078,7 @@ ReadData INFO EventInfo event: 9 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 20 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1091,7 +1106,7 @@ ReadData INFO EventInfo event: 10 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 21 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1119,7 +1134,7 @@ ReadData INFO EventInfo event: 11 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 22 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1147,7 +1162,7 @@ ReadData INFO EventInfo event: 12 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 23 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1175,7 +1190,7 @@ ReadData INFO EventInfo event: 13 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 24 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1203,7 +1218,7 @@ ReadData INFO EventInfo event: 14 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 25 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1231,7 +1246,7 @@ ReadData INFO EventInfo event: 15 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 26 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1259,7 +1274,7 @@ ReadData INFO EventInfo event: 16 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 27 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1287,7 +1302,7 @@ ReadData INFO EventInfo event: 17 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 28 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1315,7 +1330,7 @@ ReadData INFO EventInfo event: 18 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 29 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1343,7 +1358,7 @@ ReadData INFO EventInfo event: 19 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26627 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 30 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1372,7 +1387,7 @@ ReadData INFO EventInfo event: 20 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #20, run #2 31 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1400,7 +1415,7 @@ ReadData INFO EventInfo event: 21 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #21, run #2 32 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1428,7 +1443,7 @@ ReadData INFO EventInfo event: 22 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #22, run #2 33 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1456,7 +1471,7 @@ ReadData INFO EventInfo event: 23 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #23, run #2 34 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1484,7 +1499,7 @@ ReadData INFO EventInfo event: 24 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #24, run #2 35 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1512,7 +1527,7 @@ ReadData INFO EventInfo event: 25 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #25, run #2 36 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1540,7 +1555,7 @@ ReadData INFO EventInfo event: 26 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #26, run #2 37 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1568,7 +1583,7 @@ ReadData INFO EventInfo event: 27 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #27, run #2 38 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1596,7 +1611,7 @@ ReadData INFO EventInfo event: 28 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #28, run #2 39 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1624,7 +1639,7 @@ ReadData INFO EventInfo event: 29 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #29, run #2 40 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1652,7 +1667,7 @@ ReadData INFO EventInfo event: 30 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #30, run #2 41 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1680,7 +1695,7 @@ ReadData INFO EventInfo event: 31 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #31, run #2 42 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1708,7 +1723,7 @@ ReadData INFO EventInfo event: 32 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #32, run #2 43 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1736,7 +1751,7 @@ ReadData INFO EventInfo event: 33 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #33, run #2 44 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1764,7 +1779,7 @@ ReadData INFO EventInfo event: 34 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #34, run #2 45 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1792,7 +1807,7 @@ ReadData INFO EventInfo event: 35 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #35, run #2 46 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1820,7 +1835,7 @@ ReadData INFO EventInfo event: 36 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #36, run #2 47 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1848,7 +1863,7 @@ ReadData INFO EventInfo event: 37 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #37, run #2 48 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1876,7 +1891,7 @@ ReadData INFO EventInfo event: 38 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #38, run #2 49 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1904,7 +1919,7 @@ ReadData INFO EventInfo event: 39 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28239 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #39, run #2 50 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? @@ -1993,7 +2008,10 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile3.root +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile3.root +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-00000000]. @@ -2043,7 +2061,7 @@ ReadData INFO Track pt = 74.8928 eta = 3.1676 phi = 2.6161 detector DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 51 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2069,7 +2087,7 @@ ReadData INFO Track pt = 137.584 eta = -39.525 phi = 17.2679 detecto DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 52 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2095,7 +2113,7 @@ ReadData INFO Track pt = 228.154 eta = -6.2704 phi = 31.9197 detecto DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 53 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2121,7 +2139,7 @@ ReadData INFO Track pt = 324.306 eta = -15.8941 phi = 46.5715 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 54 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2147,7 +2165,7 @@ ReadData INFO Track pt = 422.255 eta = -13.279 phi = 61.2233 detecto DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 55 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2173,7 +2191,7 @@ ReadData INFO Track pt = 520.987 eta = -12.3511 phi = 75.8751 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 56 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2199,7 +2217,7 @@ ReadData INFO Track pt = 620.127 eta = -11.8468 phi = 90.5269 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 57 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2225,7 +2243,7 @@ ReadData INFO Track pt = 719.507 eta = -11.5247 phi = 105.179 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 58 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2251,7 +2269,7 @@ ReadData INFO Track pt = 819.038 eta = -11.2998 phi = 119.831 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 59 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2277,7 +2295,7 @@ ReadData INFO Track pt = 918.671 eta = -11.1334 phi = 134.482 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 60 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2303,7 +2321,7 @@ ReadData INFO Track pt = 1018.38 eta = -11.0052 phi = 149.134 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 61 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2329,7 +2347,7 @@ ReadData INFO Track pt = 1118.13 eta = -10.9031 phi = 163.786 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 62 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2355,7 +2373,7 @@ ReadData INFO Track pt = 1217.93 eta = -10.82 phi = 178.438 detector DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 63 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2381,7 +2399,7 @@ ReadData INFO Track pt = 1317.76 eta = -10.751 phi = 193.09 detector DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 64 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2407,7 +2425,7 @@ ReadData INFO Track pt = 1417.61 eta = -10.6927 phi = 207.741 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 65 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2433,7 +2451,7 @@ ReadData INFO Track pt = 1517.49 eta = -10.6429 phi = 222.393 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 66 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2459,7 +2477,7 @@ ReadData INFO Track pt = 1617.37 eta = -10.5997 phi = 237.045 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 67 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2485,7 +2503,7 @@ ReadData INFO Track pt = 1717.27 eta = -10.562 phi = 251.697 detecto DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 68 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2511,7 +2529,7 @@ ReadData INFO Track pt = 1817.19 eta = -10.5288 phi = 266.349 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 69 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2537,7 +2555,7 @@ ReadData INFO Track pt = 1917.11 eta = -10.4993 phi = 281 detector = DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27289 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 70 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? @@ -2545,7 +2563,7 @@ Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] MetaDataSvc DEBUG handle() LastInputFile for end AthenaEventLoopMgr INFO No more events in event selection -MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool ApplicationMgr INFO Application Manager Stopped successfully IncidentProcAlg1 INFO Finalize ReadData INFO in finalize() @@ -2555,9 +2573,9 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -cObjR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.0518(+-0.718)/ 0/ 10 [ms] #=193 -cObj_ALL INFO Time User : Tot= 110 [ms] Ave/Min/Max=0.608(+- 3.81)/ 0/ 40 [ms] #=181 -ChronoStatSvc INFO Time User : Tot= 2.09 [s] #= 1 +cObjR_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.104(+- 1.01)/ 0/ 10 [ms] #=193 +cObj_ALL INFO Time User : Tot= 50 [ms] Ave/Min/Max=0.276(+- 1.95)/ 0/ 20 [ms] #=181 +ChronoStatSvc INFO Time User : Tot= 1.03 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WCond.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WCond.ref index 7b63ad9b0293..34161a0475e0 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WCond.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WCond.ref @@ -1,24 +1,19 @@ -Thu May 24 04:07:13 CEST 2018 +Thu Jun 14 20:40:51 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_WCondJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 48 genConfDb files -Py:ConfigurableDb WARNING Found 1 duplicates among the 48 genConfDb files : -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -<component name>: <module> - [ <duplicates> ] -Py:ConfigurableDb WARNING -------------------------------------------------- -Py:ConfigurableDb WARNING -TrackTools: DerivationFrameworkTileCal.DerivationFrameworkTileCalConf - ['TileD3PDMaker.TileD3PDMakerConf'] -Py:ConfigurableDb WARNING Fix your cmt/requirements file !! +Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus028.cern.ch on Thu May 24 04:07:41 2018 + running on lxplus021.cern.ch on Thu Jun 14 20:41:02 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -26,7 +21,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2322 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL ChronoStatSvc INFO Number of skipped events for MemStat-1 CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 @@ -38,8 +33,8 @@ PoolSvc DEBUG Property update for OutputLevel : new value = 2 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-05-22T2101/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-dbg/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus028.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -53,6 +48,9 @@ ReadData DEBUG Property update for OutputLevel : new value = 2 ReadData INFO in initialize() MetaDataSvc DEBUG Property update for OutputLevel : new value = 2 MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 +MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 +MetaDataSvc.IOV... DEBUG in initialize() +MetaDataSvc.IOV... DEBUG initialize(): need to modify folders EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 EventSelector INFO reinitialization... @@ -125,6 +123,12 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies +MetaDataSvc.IOV... DEBUG handle() FirstInputFile for FID:???? +MetaDataSvc.IOV... DEBUG begin checkOverrideRunNumber +MetaDataSvc.IOV... DEBUG checkOverrideRunNumber: check if tag is set in jobOpts +MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector +MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name FID:???? +MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 ReadData DEBUG input handles: 0 ReadData DEBUG output handles: 0 @@ -206,7 +210,9 @@ MetaDataHdr(Dat... DEBUG attributes# = 1 MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile1.root +MetaDataSvc.IOV... DEBUG The first BeginInputFile incidence is fired along with the FirstInputFile incidence so we skip the processing of the Input File MetaData EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-00000000]. @@ -1099,7 +1105,7 @@ MetaDataSvc DEBUG handle() LastInputFile for end AthenaEventLoopMgr INFO No more events in event selection WriteCond INFO in finalize() WriteCond INFO Pedestal x = 193136 y = 14420 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> -MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool ApplicationMgr INFO Application Manager Stopped successfully IncidentProcAlg1 INFO Finalize Stream1 INFO Finalize: preparing to write conditions objects @@ -1176,11 +1182,11 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** commitOutput INFO Time User : Tot= 0 [us] #= 1 cRep_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 2 -fRep_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max= 10(+- 0)/ 10/ 10 [ms] #= 2 -cRepR_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max= 6.67(+- 4.71)/ 0/ 10 [ms] #= 3 -cObjR_ALL INFO Time User : Tot= 40 [ms] Ave/Min/Max=0.606(+- 2.39)/ 0/ 10 [ms] #= 66 -cObj_ALL INFO Time User : Tot= 120 [ms] Ave/Min/Max= 1.9(+- 7.74)/ 0/ 40 [ms] #= 63 -ChronoStatSvc INFO Time User : Tot= 3.66 [s] #= 1 +fRep_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 2 +cRepR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 3 +cObjR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 66 +cObj_ALL INFO Time User : Tot= 40 [ms] Ave/Min/Max=0.635(+- 2.44)/ 0/ 10 [ms] #= 63 +ChronoStatSvc INFO Time User : Tot= 0.93 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully -- GitLab From 43af72beb71820375707dac5f50d5978121d884f Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Fri, 15 Jun 2018 12:17:28 +0200 Subject: [PATCH 163/562] Solve coverity defects for this package Former-commit-id: 125bd48df3dd0add198becb7ee60bd89e2300f32 --- .../InDetEventAthenaPool/InDetRawDataCollection_p1.h | 1 + .../InDetEventAthenaPool/InDetRawData_p1.h | 2 +- .../InDetEventAthenaPool/InDetRawData_p2.h | 2 +- .../InDetEventAthenaPool/InDetSimData_p1.h | 2 +- .../InDetEventAthenaPool/InDetSimData_p2.h | 2 +- .../src/Pixel1RawDataContainerCnv_p1.cxx | 1 + .../InDetEventAthenaPool/src/PixelClusterContainerCnv_p0.h | 6 +++--- .../InDetEventAthenaPool/src/PixelRDO_ContainerCnv_p0.h | 2 +- 8 files changed, 10 insertions(+), 8 deletions(-) diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/InDetRawDataCollection_p1.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/InDetRawDataCollection_p1.h index dd78a82079ca..048b53ab6618 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/InDetRawDataCollection_p1.h +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/InDetRawDataCollection_p1.h @@ -18,6 +18,7 @@ public: InDetRawDataCollection_p1() : m_id(0), + m_hashId(0), m_begin(0), m_end(0) { } ; diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/InDetRawData_p1.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/InDetRawData_p1.h index b275cef0eb01..fc505e33d782 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/InDetRawData_p1.h +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/InDetRawData_p1.h @@ -9,7 +9,7 @@ class InDetRawData_p1 { public: - InDetRawData_p1() {}; + InDetRawData_p1():m_rdoId(0), m_word(0) {}; // List of Cnv classes that convert this into Rdo objects friend class TRT_LoLumRawDataCnv_p1; friend class SCT1_RawDataCnv_p1; diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/InDetRawData_p2.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/InDetRawData_p2.h index 8298c3499e33..5c721f03a259 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/InDetRawData_p2.h +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/InDetRawData_p2.h @@ -9,7 +9,7 @@ class InDetRawData_p2 { public: - InDetRawData_p2() {}; + InDetRawData_p2():m_rdoId(0),m_word(0) {}; // List of Cnv classes that convert this into Rdo objects friend class TRT_LoLumRawDataCnv_p2; friend class SCT1_RawDataCnv_p2; diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/InDetSimData_p1.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/InDetSimData_p1.h index 6412517c9509..44e535c96533 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/InDetSimData_p1.h +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/InDetSimData_p1.h @@ -10,7 +10,7 @@ class InDetSimData_p1 { public: - InDetSimData_p1() {}; + InDetSimData_p1():m_word(0),m_links{}, m_enDeposits{} {}; // List of Cnv classes that convert this into SimData objects friend class InDetSimDataCnv_p1; //private: diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/InDetSimData_p2.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/InDetSimData_p2.h index edd841edd9ae..1e036f48010c 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/InDetSimData_p2.h +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/InDetSimData_p2.h @@ -10,7 +10,7 @@ class InDetSimData_p2 { public: - InDetSimData_p2() {}; + InDetSimData_p2():m_word(0), m_links{}, m_enDeposits{} {}; // List of Cnv classes that convert this into SimData objects friend class InDetSimDataCnv_p2; private: diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/Pixel1RawDataContainerCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/Pixel1RawDataContainerCnv_p1.cxx index 496a13a8ce7b..10efb7f29e9e 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/Pixel1RawDataContainerCnv_p1.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/Pixel1RawDataContainerCnv_p1.cxx @@ -64,6 +64,7 @@ void Pixel1RawDataContainerCnv_p1::transToPers(const PixelRDO_Container* transCo for (unsigned int i = 0; i < collection.size(); ++i) { InDetRawData_p1* pchan = &(persCont->m_rawdata[i + chanBegin]); const Pixel1RawData* chan = dynamic_cast<const Pixel1RawData*>(collection[i]); + if (not chan) continue; chanCnv.transToPers(chan, pchan, log); } } diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv_p0.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv_p0.h index df3627c01c66..14cfc84cf1e4 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv_p0.h +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv_p0.h @@ -14,14 +14,14 @@ typedef DataVector<Trk::PrepRawDataCollection<InDet::PixelCluster> > PixelCluste class PixelID; namespace InDetDD{ -class PixelDetectorManager; + class PixelDetectorManager; } class MsgStream; class PixelClusterContainerCnv_p0 : public T_AthenaPoolTPCnvBase<InDet::PixelClusterContainer, PixelClusterContainer_p0> { private: - const PixelID* m_pixId; - const InDetDD::PixelDetectorManager* m_pixMgr; + const PixelID* m_pixId{nullptr}; + const InDetDD::PixelDetectorManager* m_pixMgr{nullptr}; public: virtual void persToTrans(const PixelClusterContainer_p0*, InDet::PixelClusterContainer*, MsgStream&) override { // everything is done in createTransient() diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelRDO_ContainerCnv_p0.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelRDO_ContainerCnv_p0.h index 4bdaf092fec7..c7bbf634259c 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelRDO_ContainerCnv_p0.h +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelRDO_ContainerCnv_p0.h @@ -17,7 +17,7 @@ typedef DataVector<InDetRawDataCollection< Pixel1RawData > > PixelRDO_Containe class MsgStream; class PixelRDO_ContainerCnv_p0 : public T_AthenaPoolTPCnvBase<PixelRDO_Container, PixelRDO_Container_p0> { - const PixelID* m_pixId; + const PixelID* m_pixId{nullptr}; public: virtual void persToTrans(const PixelRDO_Container_p0*, PixelRDO_Container*, MsgStream&) { // everything is done in createTransient() -- GitLab From a7e5ee9c772dfa4f9190f26394e590c24a2c8f05 Mon Sep 17 00:00:00 2001 From: Eric Buschmann <eric.buschmann@cern.ch> Date: Fri, 15 Jun 2018 11:09:16 +0200 Subject: [PATCH 164/562] Change "msg(MSG::DEBUG)" to "ATH_MSG_DEBUG", "msg(MSG::INFO)" to "ATH_MSG_INFO", "msg(MSG::WARNING)" to "ATH_MSG_WARNING", "msg(MSG::ERROR)" to "ATH_MSG_ERROR" and "msg(MSG::FATAL)" to "ATH_MSG_FATAL" Former-commit-id: 1c901fc452363c3924d0c65352a57dfe70a96b99 --- .../src/PixelRawDataProvider.cxx | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.cxx b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.cxx index 3de3fc12d1b3..29d39b0167c5 100644 --- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.cxx +++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.cxx @@ -47,34 +47,34 @@ PixelRawDataProvider::~PixelRawDataProvider(){ // Initialize StatusCode PixelRawDataProvider::initialize() { - msg(MSG::INFO) << "PixelRawDataProvider::initialize" << endmsg; + ATH_MSG_INFO("PixelRawDataProvider::initialize"); // Get ROBDataProviderSvc if (m_robDataProvider.retrieve().isFailure()) { - msg(MSG::FATAL) << "Failed to retrieve service " << m_robDataProvider << endmsg; + ATH_MSG_FATAL("Failed to retrieve service " << m_robDataProvider); return StatusCode::FAILURE; } else - msg(MSG::INFO) << "Retrieved service " << m_robDataProvider << endmsg; + ATH_MSG_INFO("Retrieved service " << m_robDataProvider); // Get PixelRawDataProviderTool if (m_rawDataTool.retrieve().isFailure()) { - msg(MSG::FATAL) << "Failed to retrieve tool " << m_rawDataTool << endmsg; + ATH_MSG_FATAL("Failed to retrieve tool " << m_rawDataTool); return StatusCode::FAILURE; } else - msg(MSG::INFO) << "Retrieved tool " << m_rawDataTool << endmsg; + ATH_MSG_INFO("Retrieved tool " << m_rawDataTool); if (detStore()->retrieve(m_pixel_id, "PixelID").isFailure()) { - msg(MSG::FATAL) << "Could not get Pixel ID helper" << endmsg; + ATH_MSG_FATAL("Could not get Pixel ID helper"); return StatusCode::FAILURE; } // Get the cabling service if (m_pixelCabling.retrieve().isFailure()) { - msg(MSG::FATAL) << "Failed to retrieve service " << m_pixelCabling << endmsg; + ATH_MSG_FATAL("Failed to retrieve service " << m_pixelCabling); return StatusCode::FAILURE; } else - msg(MSG::INFO) << "Retrieved tool " << m_pixelCabling << endmsg; + ATH_MSG_INFO("Retrieved tool " << m_pixelCabling); ATH_CHECK( m_rdoContainerKey.initialize() ); ATH_CHECK( m_rdoCacheKey.initialize(!m_rdoCacheKey.key().empty()) ); @@ -98,7 +98,7 @@ typedef EventContainers::IdentifiableContTemp<InDetRawDataCollection<PixelRDORaw StatusCode PixelRawDataProvider::execute() { #ifdef PIXEL_DEBUG - msg(MSG::DEBUG) << "Create Pixel RDO Container" << endmsg; + ATH_MSG_DEBUG("Create Pixel RDO Container"); #endif // now create the container and register the collections @@ -147,8 +147,8 @@ StatusCode PixelRawDataProvider::execute() { #ifdef PIXEL_DEBUG - msg(MSG::DEBUG) << "Number of ROB fragments " << listOfRobf.size() - << " (out of=" << listOfRobs.size() << " expected)" << endmsg; + ATH_MSG_DEBUG("Number of ROB fragments " << listOfRobf.size() + << " (out of=" << listOfRobs.size() << " expected)"); #endif std::unique_ptr<DummyPixelRDO> tempcont; @@ -158,11 +158,11 @@ StatusCode PixelRawDataProvider::execute() { static_cast< IPixelRDO_Container* >(rdoContainer.ptr()); // ask PixelRawDataProviderTool to decode it and to fill the IDC if (m_rawDataTool->convert(listOfRobf, containerInterface).isFailure()) - msg(MSG::ERROR) << "BS conversion into RDOs failed" << endmsg; + ATH_MSG_ERROR("BS conversion into RDOs failed"); if(tempcont) tempcont->MergeToRealContainer(rdoContainer.ptr()); #ifdef PIXEL_DEBUG - msg(MSG::DEBUG) << "Number of Collections in IDC " << rdoContainer->numberOfCollections() << endmsg; + ATH_MSG_DEBUG("Number of Collections in IDC " << rdoContainer->numberOfCollections()); #endif return StatusCode::SUCCESS; -- GitLab From 4f0ef7a08c4d78c690020b1bddd586b3af4590c4 Mon Sep 17 00:00:00 2001 From: Emmanuel Le Guirriec <emmanuel.le.guirriec@cern.ch> Date: Fri, 15 Jun 2018 13:39:06 +0200 Subject: [PATCH 165/562] Get rid off CoolHistSvc Former-commit-id: 57d0609e7861f0ad9b9873b14158efc8e2a6ce19 --- .../JetTagCalibration/CMakeLists.txt | 6 +- .../JetTagCalibration/CalibrationBroker.h | 12 +- .../src/CalibrationBroker.cxx | 342 ++++++++++++------ 3 files changed, 239 insertions(+), 121 deletions(-) diff --git a/PhysicsAnalysis/JetTagging/JetTagCalibration/CMakeLists.txt b/PhysicsAnalysis/JetTagging/JetTagCalibration/CMakeLists.txt index b5241bbe9035..a3323d66ab84 100644 --- a/PhysicsAnalysis/JetTagging/JetTagCalibration/CMakeLists.txt +++ b/PhysicsAnalysis/JetTagging/JetTagCalibration/CMakeLists.txt @@ -11,7 +11,9 @@ atlas_depends_on_subdirs( PUBLIC Control/StoreGate GaudiKernel PRIVATE + Database/APR/FileCatalog Database/AthenaPOOL/AthenaPoolUtilities + Database/AthenaPOOL/PoolSvc DetectorDescription/DetDescrCond/DetDescrCondTools ) # External dependencies: @@ -22,13 +24,13 @@ atlas_add_library( JetTagCalibrationLib src/*.cxx PUBLIC_HEADERS JetTagCalibration INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps GaudiKernel StoreGateLib SGtests + LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps GaudiKernel StoreGateLib SGtests FileCatalog PRIVATE_LINK_LIBRARIES AthenaPoolUtilities ) atlas_add_component( JetTagCalibration src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps StoreGateLib SGtests GaudiKernel AthenaPoolUtilities JetTagCalibrationLib ) + LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps StoreGateLib SGtests GaudiKernel FileCatalog AthenaPoolUtilities JetTagCalibrationLib ) # Install files from the package: atlas_install_joboptions( share/*.py ) diff --git a/PhysicsAnalysis/JetTagging/JetTagCalibration/JetTagCalibration/CalibrationBroker.h b/PhysicsAnalysis/JetTagging/JetTagCalibration/JetTagCalibration/CalibrationBroker.h index 07fca0345281..2d6b450d44b4 100755 --- a/PhysicsAnalysis/JetTagging/JetTagCalibration/JetTagCalibration/CalibrationBroker.h +++ b/PhysicsAnalysis/JetTagging/JetTagCalibration/JetTagCalibration/CalibrationBroker.h @@ -10,14 +10,15 @@ #include "StoreGate/DataHandle.h" #include "GaudiKernel/IIncidentListener.h" #include "GaudiKernel/Property.h" +#include "TFile.h" #include <map> #include <string> #include <utility> #include <set> -class ICoolHistSvc; class TH1; class TObject; +class IPoolSvc; namespace Analysis { @@ -112,11 +113,14 @@ public: private: - StatusCode createHistoMap( std::list<std::string> keys); + StatusCode createHistoMap(TFile* file); + StatusCode objectTDirExists(const std::string& histname, TFile* file); + StatusCode getTObject(const std::string& histname, TFile* file, TObject*& hist); std::vector<std::string> tokenize(std::string str, std::string delim); + TFile* getFile(const std::string& guid); - StoreGateSvc* p_detstore; - ICoolHistSvc* p_coolhistsvc; + //ServiceHandle<IIOVDbSvc> m_IOVDbSvc; + IPoolSvc* m_poolsvc; int m_nrefresh; bool m_callBackRegistered; static const unsigned int s_nmax_callbacks; diff --git a/PhysicsAnalysis/JetTagging/JetTagCalibration/src/CalibrationBroker.cxx b/PhysicsAnalysis/JetTagging/JetTagCalibration/src/CalibrationBroker.cxx index 56359404973b..762a95357d25 100755 --- a/PhysicsAnalysis/JetTagging/JetTagCalibration/src/CalibrationBroker.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagCalibration/src/CalibrationBroker.cxx @@ -7,7 +7,9 @@ #include "GaudiKernel/IToolSvc.h" #include "GaudiKernel/ISvcLocator.h" #include "AthenaPoolUtilities/CondAttrListCollection.h" -#include "DetDescrCondTools/ICoolHistSvc.h" +#include "AthenaPoolUtilities/CondMultChanCollection.h" +#include "PoolSvc/IPoolSvc.h" +#include "FileCatalog/IFileCatalog.h" #include "TH1.h" #include "TObject.h" #include "TTree.h" @@ -18,6 +20,7 @@ #include <algorithm> #include <sys/types.h> + namespace Analysis { /** @@ -34,8 +37,7 @@ namespace Analysis { CalibrationBroker::CalibrationBroker(const std::string& type, const std::string& name, const IInterface* parent) : AthAlgTool(type, name, parent), - p_detstore(0), - p_coolhistsvc(0), + m_poolsvc(0), m_nrefresh(0), m_callBackRegistered(false) { declareInterface<CalibrationBroker>(this); @@ -97,15 +99,10 @@ namespace Analysis { std::vector<std::string> hvect; m_taggersHists.push_back(hvect); } - // Detector store: - if(StatusCode::SUCCESS!=service("DetectorStore",p_detstore)) { - ATH_MSG_FATAL( "#BTAG# Detector store not found"); - return StatusCode::FAILURE; - } - // CoolHistSvc: - if(StatusCode::SUCCESS!=service("CoolHistSvc",p_coolhistsvc)) { - ATH_MSG_FATAL("#BTAG# Could not get CoolHistSvc" ); - return StatusCode::FAILURE; + // get PoolSvc + if (StatusCode::SUCCESS!=service("PoolSvc",m_poolsvc)) { + ATH_MSG_FATAL("Cannot get PoolSvc"); + return StatusCode::FAILURE; } // Register call back function: if(StatusCode::SUCCESS!=this->registerCallBack()) { @@ -124,7 +121,7 @@ namespace Analysis { const DataHandle<CondAttrListCollection> aptr; std::string folder(m_folderRoot); folder+=m_singleFolderName; ATH_MSG_DEBUG( "#BTAG# Registering IoV callback for single folder "<< folder); - if(StatusCode::SUCCESS==p_detstore->regFcn(&Analysis::CalibrationBroker::callBack, + if(StatusCode::SUCCESS==detStore()->regFcn(&Analysis::CalibrationBroker::callBack, this, aptr, folder)) { ATH_MSG_DEBUG( "#BTAG# Registered."); } else { @@ -202,7 +199,7 @@ namespace Analysis { std::string channelAlias = this->channelAlias(channel); ATH_MSG_DEBUG("#BTAG# retrieving " << hname << " (channel " << channel << " -> " << channelAlias << ") " - << " in tagger " << tagger ); + << " in tagger " << tagger ); std::string fname = this->fullHistoName(channelAlias,hname); if(status){ updateHistoStatusTaggerList(tagger, fname); @@ -275,106 +272,107 @@ namespace Analysis { m_folderTaggerUpdateAliases.erase(key); - } - - StatusCode CalibrationBroker::createHistoMap(std::list<std::string> keys ){ + + + StatusCode CalibrationBroker::createHistoMap(TFile* pfile ){ ATH_MSG_DEBUG("#BTAG# in createHistoMap" ); m_channels.clear(); m_channelAliasesMap.clear(); + std::vector< std::string > mappedAlias; for(unsigned int j=0; j<m_originalChannels.size(); ++j){ m_channels.push_back(m_originalChannels[j]); } - if(m_shadowFoldersAndChannels) { - std::string folder(m_folderRoot); folder+=m_singleFolderName; - // check all the keys, if we find the histogram folder, update the pointers - for(std::list<std::string>::const_iterator itr=keys.begin(); - itr!=keys.end();++itr) { - if((*itr)==folder) { - ATH_MSG_DEBUG( "#BTAG# Key and actual folder match: " << (*itr)); + std::string folder(m_folderRoot); folder+=m_singleFolderName; - for(uint i=0;i<m_taggers.size();++i) { - std::string tagger = m_taggers[i]; + for(uint i=0;i<m_taggers.size();++i) { + std::string tagger = m_taggers[i]; - for(unsigned int j=0; j<m_originalChannels.size(); ++j){ - - /// get all aliases - std::map<std::string, std::vector<std::string> >::iterator ialiaslist - = m_channelAliasesMultiMap.find(m_originalChannels[j]); - if(ialiaslist == m_channelAliasesMultiMap.end()){ - ATH_MSG_DEBUG( "#BTAG# no alias for original channel" << m_originalChannels[j] ); - if(!p_coolhistsvc->objectExists(folder, m_singleFolderName, tagger+"/"+m_originalChannels[j])){ - ATH_MSG_WARNING( "#BTAG# no calibration for jet collection " << m_originalChannels[j] - << " consider using aliases " ); - } - continue; - } - std::vector<std::string> aliaslist = ialiaslist->second; - if(aliaslist.size() == 1){ - if("none" == aliaslist[0]){ - ATH_MSG_DEBUG("#BTAG# no alias for original channel" << m_originalChannels[j]); + for(unsigned int j=0; j<m_originalChannels.size(); ++j){ + + /// get all aliases + std::map<std::string, std::vector<std::string> >::iterator ialiaslist + = m_channelAliasesMultiMap.find(m_originalChannels[j]); + if(ialiaslist == m_channelAliasesMultiMap.end()){ + ATH_MSG_DEBUG( "#BTAG# no alias for original channel" << m_originalChannels[j] ); + if(!objectTDirExists(tagger+"/"+m_originalChannels[j], pfile)){ + ATH_MSG_WARNING( "#BTAG# no calibration for jet collection " << m_originalChannels[j] + << " consider using aliases " ); + } + continue; + } + std::vector<std::string> aliaslist = ialiaslist->second; + if(aliaslist.size() == 1){ + if("none" == aliaslist[0]){ + ATH_MSG_DEBUG("#BTAG# no alias for original channel" << m_originalChannels[j]); - if(!p_coolhistsvc->objectExists(folder, m_singleFolderName, tagger+"/"+m_originalChannels[j])){ - ATH_MSG_WARNING( "#BTAG# no calibration for jet collection " << m_originalChannels[j] + if(objectTDirExists(tagger+"/"+m_originalChannels[j], pfile)){ + ATH_MSG_WARNING( "#BTAG# no calibration for jet collection " << m_originalChannels[j] << " consider using aliases " ); - } - continue; - } - } + } + continue; + } + } - bool foundalias=false; + bool foundalias=false; - for(unsigned int k=0; k<aliaslist.size(); ++k){ + for(unsigned int k=0; k<aliaslist.size(); ++k){ - std::string aliasentry = aliaslist[k]; - if("none" == aliasentry){ - ATH_MSG_DEBUG("#BTAG# first alias entry is none - replace with original channel" + std::string aliasentry = aliaslist[k]; + if("none" == aliasentry){ + ATH_MSG_DEBUG("#BTAG# first alias entry is none - replace with original channel" << m_originalChannels[j] ); - aliasentry= m_originalChannels[j]; - } - /// now see if the jet collection exists in db - std::string hFullName(tagger); - hFullName+="/"; hFullName+=aliasentry; - if(p_coolhistsvc->objectExists(folder, m_singleFolderName, hFullName)){ - ATH_MSG_INFO( "#BTAG# found alias entry " << aliasentry ); - ATH_MSG_INFO( "#BTAG# found alias entry folder " << folder<< " and " << m_singleFolderName); - if("none"!=aliaslist[k]){ - std::vector<std::string>::const_iterator pos = find(m_channels.begin(), - m_channels.end(), aliasentry); - if(pos==m_channels.end()) { - ATH_MSG_DEBUG("#BTAG# Alias is pointing to undefined channel: " << aliasentry + aliasentry= m_originalChannels[j]; + } + /// now see if the jet collection exists in db + std::string hFullName(tagger); + hFullName+="/"; hFullName+=aliasentry; + // Check if jet collection already in channel alias map + if (std::count(mappedAlias.begin(), mappedAlias.end(), aliasentry) > 0) { + ATH_MSG_INFO( "#BTAG# found alias entry in Map " << aliasentry ); + ATH_MSG_INFO( "#BTAG# found alias entry folder " << folder<< " and " << m_singleFolderName); + m_channelAliasesMap.insert(std::make_pair(m_originalChannels[j],aliasentry)); + foundalias=true; + break; + } + else { + if (objectTDirExists(hFullName, pfile)) { + ATH_MSG_INFO( "#BTAG# found alias entry in DB " << aliasentry ); + ATH_MSG_INFO( "#BTAG# found alias entry folder " << folder<< " and " << m_singleFolderName); + if("none"!=aliaslist[k]){ + std::vector<std::string>::const_iterator pos = find(m_channels.begin(), + m_channels.end(), aliasentry); + if(pos==m_channels.end()) { + ATH_MSG_DEBUG("#BTAG# Alias is pointing to undefined channel: " << aliasentry << ". Adding it to channel list."); - m_channels.push_back(aliasentry); - } - m_channelAliasesMap.insert(std::make_pair(m_originalChannels[j],aliasentry)); - } - foundalias=true; - break; - } - else{ - ATH_MSG_INFO( "#BTAG# no alias entry " << aliasentry - << " trying next alias "); - } - } - if(!foundalias){ - ATH_MSG_WARNING( "#BTAG# none of the aliases exist for jet collection " - << m_originalChannels[j]); + m_channels.push_back(aliasentry); + } + m_channelAliasesMap.insert(std::make_pair(m_originalChannels[j],aliasentry)); + mappedAlias.push_back(aliasentry); } - + foundalias=true; + break; + } + else{ + ATH_MSG_INFO( "#BTAG# no alias entry " << aliasentry + << " trying next alias "); } - break ; /// check alias for the first tagger. same jet collections for all taggers for now - } } + if(!foundalias){ + ATH_MSG_WARNING( "#BTAG# none of the aliases exist for jet collection " + << m_originalChannels[j]); + } + } - } else { - ATH_MSG_DEBUG( "#BTAG# The multiple folders DB schema has been deprecated in Run2. Contact Flavour Tagging software team if you get this message."); - } + break ; /// check alias for the first tagger. same jet collections for all taggers for now + + } ATH_MSG_INFO( "#BTAG# final registered channels " ); for(uint i=0;i<m_channels.size();++i) { @@ -416,30 +414,142 @@ namespace Analysis { } + StatusCode CalibrationBroker::objectTDirExists(const std::string& histname, TFile * pfile) { + + ATH_MSG_DEBUG("#BTAG# in objectTDirExists" ); + + // now read the histogram into memory + ATH_MSG_DEBUG("Getting object "+histname+" from file"); + TObject* hist; + pfile->GetObject(histname.c_str(),hist); + if (hist==0) { + ATH_MSG_DEBUG("#BTAG# Could not load TObject " << histname); + return StatusCode::FAILURE; + } + + return StatusCode::SUCCESS; + } + + StatusCode CalibrationBroker::getTObject(const std::string& histname, TFile * pfile, TObject*& hist) { + // now read the histogram into memory + ATH_MSG_DEBUG("Getting object "+histname+" from file"); + pfile->GetObject(histname.c_str(),hist); + if (hist==0) { + ATH_MSG_DEBUG("#BTAG# Could not load TObject " << histname); + return StatusCode::FAILURE; + } + else { + // make this histogram unassociated with the TFile, so file can be closed + // only for histogram objects, others do not get associated + // TTrees have special treatment + TH1* ihist=dynamic_cast<TH1*>(hist); + if (ihist!=0) ihist->SetDirectory(0); + // if it is a TDirectory, also need special treatment to unassociate parent + TDirectory* idir=dynamic_cast<TDirectory*>(hist); + if (idir!=0) { + TDirectory* mdir=idir->GetMotherDir(); + if (mdir!=0) { + ATH_MSG_DEBUG("Disconnecting TDirectory "+histname+" from parent"); + mdir->GetList()->Remove(idir); + idir->SetMother(0); + } else { + ATH_MSG_WARNING("Could not get MotherDir for TDirectory "+histname); + } + } + } + + return StatusCode::SUCCESS; + } + +TFile* CalibrationBroker::getFile(const std::string& sguid) { + ATH_MSG_DEBUG("getFile - lookup PFN for GUID "+sguid); + std::string pfname, tech; + m_poolsvc->catalog()->getFirstPFN( sguid, pfname, tech ); + if( !pfname.empty() ) { + // now try to open file + TFile* tfile; + try { + tfile=TFile::Open(pfname.c_str(),"READ"); + if (tfile==0 || !tfile->IsOpen()) { + delete tfile; + ATH_MSG_ERROR("Problems opening input file "+pfname); + return 0; + } + } + catch (std::exception& e) { + ATH_MSG_ERROR("Exception thrown when trying to open input file "+pfname); + return 0; + } + // check file has correct internal GUID + TObjString* fguid; + tfile->GetObject("fileGUID",fguid); + if (fguid==0) { + ATH_MSG_ERROR("Input file "+pfname+" has no fileGUID object"); + return 0; + } + std::string fguidstr=(fguid->GetString().Data()); + delete fguid; + ATH_MSG_DEBUG("GUID retrieved from file is "+fguidstr+ + " expecting "+sguid); + if (fguidstr!=sguid) { + // GUIDs do not match + ATH_MSG_ERROR("GUID retrieved from file "+fguidstr+ + " does not match that in catalogue "+sguid); + return 0; + } + // file is successfully opened - return ptr + return tfile; + } else { + ATH_MSG_ERROR("No PFN found in catalogue for GUID "+sguid); + return 0; + } +} + StatusCode CalibrationBroker::callBack( IOVSVC_CALLBACK_ARGS_P(/*I*/,keys) ) { // printout the list of keys invoked - will normally only be for our // histogram folder - ATH_MSG_DEBUG ( "#BTAG# CoolHistExample callback invoked for keys:"); + ATH_MSG_DEBUG ( "#BTAG# CalibrationBroker callback invoked for keys:"); - if(0 == m_nrefresh || m_recreateHistoMap){ - StatusCode sc = createHistoMap( keys ); - if(sc != StatusCode::SUCCESS){ - /// do nothing for the moment - } - } - m_nrefresh++; - for(std::list<std::string>::const_iterator itr=keys.begin(); - itr!=keys.end();++itr) ATH_MSG_DEBUG ( *itr ); if(m_shadowFoldersAndChannels) { std::string folder(m_folderRoot); folder+=m_singleFolderName; // check all the keys, if we find the histogram folder, update the pointers for(std::list<std::string>::const_iterator itr=keys.begin(); - itr!=keys.end();++itr) { - if((*itr)==folder) { - ATH_MSG_DEBUG("#BTAG# Key and actual folder match: " << (*itr)); - for(uint i=0;i<m_taggers.size();i++) { + itr!=keys.end();++itr) { + ATH_MSG_DEBUG( "#BTAG# Key : " << (*itr)); + if((*itr)==folder) { + ATH_MSG_DEBUG( "#BTAG# Key and actual folder match: " << (*itr)); + + // Get the GUID + const CondAttrListCollection* atrcol = 0; + if (StatusCode::SUCCESS!=detStore()->retrieve(atrcol,folder)) { + ATH_MSG_DEBUG("#BTAG# Cannot retrieve CondAttrListCollection for " << folder); + return StatusCode::FAILURE; + } + unsigned int channel=1; //Always 1 in old version with CoolHistSvc + CondAttrListCollection::const_iterator citr = atrcol->chanAttrListPair(channel); + if (citr==atrcol->end()) { + ATH_MSG_WARNING("#BTAG# Cannot find valid reference for " << folder << " channel " << channel); + return StatusCode::FAILURE; + } + + const std::string coolguid=citr->second["fileGUID"].data<std::string>(); + ATH_MSG_DEBUG("#BTAG# Folder key "+folder+" has current file GUID "+coolguid); + + // check if this file is already open + TFile* pfile=getFile(coolguid); + + if(0 == m_nrefresh || m_recreateHistoMap){ + StatusCode sc = createHistoMap(pfile); + if(sc != StatusCode::SUCCESS){ + /// do nothing for the moment + } + } + + m_nrefresh++; + // check all the keys, if we find the histogram folder, update the pointers + for(uint i=0;i<m_taggers.size();i++) { std::string tagger = m_taggers[i]; std::map<std::string, std::pair<TObject*, bool> >::iterator mI = m_histos[i].begin(); std::map<std::string, std::pair<TObject*, bool> >::iterator mE = m_histos[i].end(); @@ -453,9 +563,9 @@ namespace Analysis { hFullName+="/"; hFullName+=hname; ATH_MSG_DEBUG( "#BTAG# histo name in physical file= " << hFullName ); TObject* hPointer = 0; + if (getTObject(hFullName, pfile, hPointer)) { + - if(p_coolhistsvc->objectExists(folder, m_singleFolderName, hFullName)){ - if(p_coolhistsvc->getTObject(folder, m_singleFolderName, hFullName, hPointer).isSuccess()){ if(hPointer) { ATH_MSG_DEBUG( "#BTAG# Cached pointer to histogram: " << hPointer); const TString rootClassName=hPointer->ClassName(); @@ -469,20 +579,25 @@ namespace Analysis { } else { ATH_MSG_ERROR( "#BTAG# Could not cache pointer to histogram " << fname ); } - } else { - ATH_MSG_WARNING( "#BTAG# Problem getting histogram " << hFullName << " from COOL"); - } } else { ATH_MSG_WARNING("#BTAG# error: histogram "<<hFullName <<" does not exist - you are probably using an old database tag"); } } //end loop histos - } + } // end loop taggers + // close the file, catch exceptions just in case they have gone stale + try { + pfile->Close(); } - } - } else { - ATH_MSG_DEBUG( "#BTAG# The multiple folders DB schema has been deprecated in Run2. Contact Flavour Tagging software team if you get this message."); - } + catch (std::exception& e) { + ATH_MSG_ERROR("Exception closing histogram file:" << e.what()); + } + }// loop on keys + } + } + else { + ATH_MSG_DEBUG( "#BTAG# The multiple folders DB schema has been deprecated in Run2. Contact Flavour Tagging software team if you get this message."); + } return StatusCode::SUCCESS; } @@ -538,8 +653,5 @@ namespace Analysis { return tokens; } - - - } -- GitLab From 52459b05991924cc7869d039a411e0454a8de975 Mon Sep 17 00:00:00 2001 From: Eric Buschmann <eric.buschmann@cern.ch> Date: Fri, 15 Jun 2018 16:54:08 +0200 Subject: [PATCH 166/562] Use ATH_CHECK macro when possible Former-commit-id: d41d6d85b506e8b6dc8a31b7d00f84675c70543a --- .../src/PixelRawContByteStreamTool.cxx | 10 ++-------- .../src/PixelRawDataProvider.cxx | 6 +----- .../PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx | 10 ++-------- 3 files changed, 5 insertions(+), 21 deletions(-) diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamTool.cxx b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamTool.cxx index 9c7e204bcdbb..7d9636db244e 100644 --- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamTool.cxx +++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamTool.cxx @@ -62,15 +62,9 @@ StatusCode PixelRawContByteStreamTool::initialize() { } // Get PixelID - if (detStore()->retrieve(m_PixelID, "PixelID").isFailure()) { - msg(MSG::FATAL) << "Could not get Pixel ID helper" << endmsg; - return StatusCode::FAILURE; - } + ATH_CHECK(detStore()->retrieve(m_PixelID, "PixelID")); - if (detStore()->retrieve(m_pixelManager, "Pixel").isFailure()) { - msg(MSG::FATAL) << "Failed to get Pixel Manager" << endmsg; - return StatusCode::FAILURE; - } + ATH_CHECK(detStore()->retrieve(m_pixelManager, "Pixel")); return sc; } diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.cxx b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.cxx index 29d39b0167c5..9f04b218e143 100644 --- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.cxx +++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.cxx @@ -63,11 +63,7 @@ StatusCode PixelRawDataProvider::initialize() { } else ATH_MSG_INFO("Retrieved tool " << m_rawDataTool); - - if (detStore()->retrieve(m_pixel_id, "PixelID").isFailure()) { - ATH_MSG_FATAL("Could not get Pixel ID helper"); - return StatusCode::FAILURE; - } + ATH_CHECK(detStore()->retrieve(m_pixel_id, "PixelID")); // Get the cabling service if (m_pixelCabling.retrieve().isFailure()) { diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx index 06945a56f3ac..54c95b4d8d52 100644 --- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx +++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx @@ -82,17 +82,11 @@ StatusCode PixelRodDecoder::initialize() { } else ATH_MSG_INFO("Retrieved service " << m_pixelCabling); - if (detStore()->retrieve(m_pixel_id, "PixelID").isFailure()) { - ATH_MSG_FATAL( "Could not get Pixel ID helper" ); - return StatusCode::FAILURE; - } + ATH_CHECK(detStore()->retrieve(m_pixel_id, "PixelID")); const InDetDD::PixelDetectorManager* pixelManager; - if (detStore()->retrieve(pixelManager, "Pixel").isFailure()) { - ATH_MSG_FATAL("failed to get Pixel Manager"); - return StatusCode::FAILURE; - } + ATH_CHECK(detStore()->retrieve(pixelManager, "Pixel")); // check if the ibl layer is present or not (this is necessary for backward compatibility with non-IBL geometries) m_is_ibl_present = false; -- GitLab From 64049e46b662ad74888db52a6a1772b6e9bc9751 Mon Sep 17 00:00:00 2001 From: Jochen Meyer <Jochen.Meyer@cern.ch> Date: Fri, 15 Jun 2018 18:52:44 +0200 Subject: [PATCH 167/562] skip production of AGDD outputs of Amdcsimrec from DB For the comparison of the database content and what is produced from a local file in order to build a geometry the Amdcsimrec software is run. In the past the checks implemented in the package made much sense, but today the AGDD blob is built by MuonAGDD and the checks in Amdcsimrec are less reasonable. In the context of ATLASSIM-3636 this MR comments out these checks. In a separate one they will be removed (but just in master). Former-commit-id: a654855a5892d75010fdf3074f1ee6f3eec3736b --- .../AmdcDb/src/AmdcDbSvcMakerFromRDB.cxx | 2 +- .../Amdcsimrec/AmdcOracle/src/AmdcDumpOracle.cxx | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromRDB.cxx b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromRDB.cxx index c1ce99fc7d89..68744a66c842 100755 --- a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromRDB.cxx +++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromRDB.cxx @@ -1913,7 +1913,7 @@ void AmdcDbSvcMakerFromRDB::Set( m_detectorNode = detectorNode ; AMDC(pIRDBAccessSvc,pAmdcDbSvc); - AGDD(pIRDBAccessSvc,pAmdcDbSvc); + // AGDD(pIRDBAccessSvc,pAmdcDbSvc); ATYP(pIRDBAccessSvc,pAmdcDbSvc); ACUT(pIRDBAccessSvc,pAmdcDbSvc); diff --git a/MuonSpectrometer/Amdcsimrec/AmdcOracle/src/AmdcDumpOracle.cxx b/MuonSpectrometer/Amdcsimrec/AmdcOracle/src/AmdcDumpOracle.cxx index 8759909f271c..410560d1aa38 100755 --- a/MuonSpectrometer/Amdcsimrec/AmdcOracle/src/AmdcDumpOracle.cxx +++ b/MuonSpectrometer/Amdcsimrec/AmdcOracle/src/AmdcDumpOracle.cxx @@ -413,14 +413,14 @@ StatusCode AmdcDumpOracle::DoIt() << std::endl; // Check AGDD - Kwarn = 0 ; - Kchck = 0 ; - DumpAGDD((&*p_IRDBAccessSvcWithUpdate),KountCallsDoItASstring,Kwarn,Kchck); - KwarnTot = KwarnTot + Kwarn ; - KchckTot = KchckTot + Kchck ; - OutFile - << "AGDD: " << Kwarn << " Warnings " << " for " << Kchck << " tested elements " - << std::endl; +// Kwarn = 0 ; +// Kchck = 0 ; +// DumpAGDD((&*p_IRDBAccessSvcWithUpdate),KountCallsDoItASstring,Kwarn,Kchck); +// KwarnTot = KwarnTot + Kwarn ; +// KchckTot = KchckTot + Kchck ; +// OutFile +// << "AGDD: " << Kwarn << " Warnings " << " for " << Kchck << " tested elements " +// << std::endl; // Check AMDC Kwarn = 0 ; -- GitLab From 1882a8bfe226e5fe6bb9320ed5dff5323159cf59 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Fri, 15 Jun 2018 19:09:37 +0000 Subject: [PATCH 168/562] 22.0 coverity BCM_RawDataByteStreamCnv Former-commit-id: 16dd832368a092493c897270141ece36834aaecb --- .../BCM_RawDataByteStreamCnv/BCM_RodEncoder.h | 1 - .../src/BCM_RawContByteStreamCnv.cxx | 8 +++- .../src/BCM_RodDecoder.cxx | 47 +++++++++---------- .../src/BCM_RodEncoder.cxx | 3 +- 4 files changed, 29 insertions(+), 30 deletions(-) diff --git a/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/BCM_RawDataByteStreamCnv/BCM_RodEncoder.h b/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/BCM_RawDataByteStreamCnv/BCM_RodEncoder.h index a4387396ed3e..40daf7a483a9 100644 --- a/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/BCM_RawDataByteStreamCnv/BCM_RodEncoder.h +++ b/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/BCM_RawDataByteStreamCnv/BCM_RodEncoder.h @@ -6,7 +6,6 @@ // BCM_RodEncoder.h // Header file for class BCM_RodEncoder /////////////////////////////////////////////////////////////////// -// (c) ATLAS BCM Detector software /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// // Version 00-00-01 12/05/2008 Daniel Dobos diff --git a/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RawContByteStreamCnv.cxx b/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RawContByteStreamCnv.cxx index ce299d834195..24e0a1894178 100644 --- a/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RawContByteStreamCnv.cxx +++ b/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RawContByteStreamCnv.cxx @@ -6,7 +6,6 @@ // BCM_RawContByteStreamCnv.cxx // Implementation file for class BCM_RawContByteStreamCnv /////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software /////////////////////////////////////////////////////////////////// // classID() - returning BCM_RDO_Container ID // createRep() - convert BCM_RawData in the container into ByteStream @@ -27,7 +26,12 @@ //////////////////////// // constructor //////////////////////// -BCM_RawContByteStreamCnv::BCM_RawContByteStreamCnv(ISvcLocator* svcloc):Converter(ByteStream_StorageType, classID(),svcloc) { +BCM_RawContByteStreamCnv::BCM_RawContByteStreamCnv(ISvcLocator* svcloc):Converter(ByteStream_StorageType, classID(),svcloc), + m_BCMRawContBSTool{}, + m_ByteStreamEventAccess{}, + m_StoreGate{}, + m_ChronoStat{} { + //nop } //////////////////////// diff --git a/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RodDecoder.cxx b/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RodDecoder.cxx index f23123c54230..49f5ac37e3c7 100644 --- a/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RodDecoder.cxx +++ b/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RodDecoder.cxx @@ -6,7 +6,6 @@ // BCM_RodDecoder.cxx // Implementation file for class BCM_RodDecoder /////////////////////////////////////////////////////////////////// -// (c) ATLAS BCM Detector software /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// // Version 00-00-01 12/05/2008 Daniel Dobos @@ -46,7 +45,7 @@ BCM_RodDecoder::~BCM_RodDecoder() StatusCode BCM_RodDecoder::initialize() { #ifdef BCM_DEBUG - if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "in BCM_RodDecoder::initialize" << endmsg; + ATH_MSG_VERBOSE( "in BCM_RodDecoder::initialize" ); #endif StatusCode sc; @@ -66,12 +65,12 @@ StatusCode BCM_RodDecoder::initialize() StatusCode BCM_RodDecoder::finalize() { #ifdef BCM_DEBUG - if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "in BCM_RodDecoder::finalize" << endmsg; + ATH_MSG_VERBOSE( "in BCM_RodDecoder::finalize" ); #endif - if (msgLvl(MSG::INFO)) msg(MSG::INFO) << "Bytestream summary: " << m_fragment_number << " fragments found" << endmsg; - if (msgLvl(MSG::INFO)) msg(MSG::INFO) << "Bytestream summary: " << m_LVL1A_number << " LVL1As found" << endmsg; - if (msgLvl(MSG::INFO)) msg(MSG::INFO) << "Bytestream summary: " << m_hit_number << " hits found" << endmsg; + ATH_MSG_INFO( "Bytestream summary: " << m_fragment_number << " fragments found" ); + ATH_MSG_INFO( "Bytestream summary: " << m_LVL1A_number << " LVL1As found" ); + ATH_MSG_INFO( "Bytestream summary: " << m_hit_number << " hits found" ); return StatusCode::SUCCESS; } @@ -82,7 +81,7 @@ StatusCode BCM_RodDecoder::finalize() StatusCode BCM_RodDecoder::fillCollection(const ROBFragment *robFrag, BCM_RDO_Container* rdoCont, std::vector<unsigned int>* /*vecHash*/) { #ifdef BCM_DEBUG - if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "in BCM_RodDecoder::fillCollection" << endmsg; + ATH_MSG_INFO( "in BCM_RodDecoder::fillCollection" ); #endif StatusCode sc = StatusCode::SUCCESS; @@ -143,9 +142,9 @@ StatusCode BCM_RodDecoder::fillCollection(const ROBFragment *robFrag, BCM_RDO_Co Pulse2Width = ((rawDataWord & 0xc0000000) >> 30) | (rawDataWord_buffer << 2); #ifdef BCM_DEBUG if (Pulse1Width != 0 || Pulse2Width != 0) { - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "BCM-ISSUE L1ID: " << ROD_LVL1_ID << " Ch: " << Channel << " L1A: " << LVL1A << " BCID: " << BCID << " Hit: " << Pulse1Position << " " << Pulse1Width << " " << Pulse2Position << " " << Pulse2Width << endmsg; + ATH_MSG_ERROR( "BCM-ISSUE L1ID: " << ROD_LVL1_ID << " Ch: " << Channel << " L1A: " << LVL1A << " BCID: " << BCID << " Hit: " << Pulse1Position << " " << Pulse1Width << " " << Pulse2Position << " " << Pulse2Width ); } - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Decoded ROD 0x"<< std::hex<<ROD_source_ID<<std::dec <<" channel: "<< Channel <<" - BCID: "<< BCID <<" : "<< Pulse1Position <<"-"<< Pulse1Width <<" "<< Pulse2Position <<"-"<< Pulse2Width << endmsg; + ATH_MSG_DEBUG( "Decoded ROD 0x"<< std::hex<<ROD_source_ID<<std::dec <<" channel: "<< Channel <<" - BCID: "<< BCID <<" : "<< Pulse1Position <<"-"<< Pulse1Width <<" "<< Pulse2Position <<"-"<< Pulse2Width ); #endif coll->push_back(new RDO(Channel,Pulse1Position,Pulse1Width,Pulse2Position,Pulse2Width,LVL1A,BCID,ROD_LVL1_ID,Error)); m_hit_number++; @@ -157,9 +156,9 @@ StatusCode BCM_RodDecoder::fillCollection(const ROBFragment *robFrag, BCM_RDO_Co Pulse2Width = (rawDataWord & 0x00001f00) >> 8; #ifdef BCM_DEBUG if (Pulse1Width != 0 || Pulse2Width != 0) { - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "BCM-ISSUE L1ID: " << ROD_LVL1_ID << " Ch: " << Channel << " L1A: " << LVL1A << " BCID: " << BCID << " Hit: " << Pulse1Position << " " << Pulse1Width << " " << Pulse2Position << " " << Pulse2Width << endmsg; + ATH_MSG_ERROR( "BCM-ISSUE L1ID: " << ROD_LVL1_ID << " Ch: " << Channel << " L1A: " << LVL1A << " BCID: " << BCID << " Hit: " << Pulse1Position << " " << Pulse1Width << " " << Pulse2Position << " " << Pulse2Width ); } - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Decoded ROD 0x"<< std::hex<<ROD_source_ID<<std::dec <<" channel: "<< Channel <<" - BCID: "<< BCID <<" : "<< Pulse1Position <<"-"<< Pulse1Width <<" "<< Pulse2Position <<"-"<< Pulse2Width << endmsg; + ATH_MSG_DEBUG( "Decoded ROD 0x"<< std::hex<<ROD_source_ID<<std::dec <<" channel: "<< Channel <<" - BCID: "<< BCID <<" : "<< Pulse1Position <<"-"<< Pulse1Width <<" "<< Pulse2Position <<"-"<< Pulse2Width ); #endif coll->push_back(new RDO(Channel,Pulse1Position,Pulse1Width,Pulse2Position,Pulse2Width,LVL1A,BCID,ROD_LVL1_ID,Error)); m_hit_number++; @@ -174,9 +173,9 @@ StatusCode BCM_RodDecoder::fillCollection(const ROBFragment *robFrag, BCM_RDO_Co Pulse2Width = (rawDataWord & 0x007c0000) >> 18; #ifdef BCM_DEBUG if (Pulse1Width != 0 || Pulse2Width != 0) { - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "BCM-ISSUE L1ID: " << ROD_LVL1_ID << " Ch: " << Channel << " L1A: " << LVL1A << " BCID: " << BCID << " Hit: " << Pulse1Position << " " << Pulse1Width << " " << Pulse2Position << " " << Pulse2Width << endmsg; + ATH_MSG_ERROR( "BCM-ISSUE L1ID: " << ROD_LVL1_ID << " Ch: " << Channel << " L1A: " << LVL1A << " BCID: " << BCID << " Hit: " << Pulse1Position << " " << Pulse1Width << " " << Pulse2Position << " " << Pulse2Width ); } - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Decoded ROD 0x"<< std::hex<<ROD_source_ID<<std::dec <<" channel: "<< Channel <<" - BCID: "<< BCID <<" : "<< Pulse1Position <<"-"<< Pulse1Width <<" "<< Pulse2Position <<"-"<< Pulse2Width << endmsg; + ATH_MSG_DEBUG( "Decoded ROD 0x"<< std::hex<<ROD_source_ID<<std::dec <<" channel: "<< Channel <<" - BCID: "<< BCID <<" : "<< Pulse1Position <<"-"<< Pulse1Width <<" "<< Pulse2Position <<"-"<< Pulse2Width ); #endif coll->push_back(new RDO(Channel,Pulse1Position,Pulse1Width,Pulse2Position,Pulse2Width,LVL1A,BCID,ROD_LVL1_ID,Error)); m_hit_number++; @@ -191,9 +190,9 @@ StatusCode BCM_RodDecoder::fillCollection(const ROBFragment *robFrag, BCM_RDO_Co Pulse2Width = ((rawDataWord & 0xf0000000) >> 28) | (rawDataWord_buffer << 4); #ifdef BCM_DEBUG if (Pulse1Width != 0 || Pulse2Width != 0) { - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "BCM-ISSUE L1ID: " << ROD_LVL1_ID << " Ch: " << Channel << " L1A: " << LVL1A << " BCID: " << BCID << " Hit: " << Pulse1Position << " " << Pulse1Width << " " << Pulse2Position << " " << Pulse2Width << endmsg; + ATH_MSG_ERROR( "BCM-ISSUE L1ID: " << ROD_LVL1_ID << " Ch: " << Channel << " L1A: " << LVL1A << " BCID: " << BCID << " Hit: " << Pulse1Position << " " << Pulse1Width << " " << Pulse2Position << " " << Pulse2Width ); } - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Decoded ROD 0x"<< std::hex<<ROD_source_ID<<std::dec <<" channel: "<< Channel <<" - BCID: "<< BCID <<" : "<< Pulse1Position <<"-"<< Pulse1Width <<" "<< Pulse2Position <<"-"<< Pulse2Width << endmsg; + ATH_MSG_DEBUG( "Decoded ROD 0x"<< std::hex<<ROD_source_ID<<std::dec <<" channel: "<< Channel <<" - BCID: "<< BCID <<" : "<< Pulse1Position <<"-"<< Pulse1Width <<" "<< Pulse2Position <<"-"<< Pulse2Width ); #endif coll->push_back(new RDO(Channel,Pulse1Position,Pulse1Width,Pulse2Position,Pulse2Width,LVL1A,BCID,ROD_LVL1_ID,Error)); m_hit_number++; @@ -205,9 +204,9 @@ StatusCode BCM_RodDecoder::fillCollection(const ROBFragment *robFrag, BCM_RDO_Co Pulse2Width = (rawDataWord & 0x000007c0) >> 6; #ifdef BCM_DEBUG if (Pulse1Width != 0 || Pulse2Width != 0) { - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "BCM-ISSUE L1ID: " << ROD_LVL1_ID << " Ch: " << Channel << " L1A: " << LVL1A << " BCID: " << BCID << " Hit: " << Pulse1Position << " " << Pulse1Width << " " << Pulse2Position << " " << Pulse2Width << endmsg; + ATH_MSG_ERROR( "BCM-ISSUE L1ID: " << ROD_LVL1_ID << " Ch: " << Channel << " L1A: " << LVL1A << " BCID: " << BCID << " Hit: " << Pulse1Position << " " << Pulse1Width << " " << Pulse2Position << " " << Pulse2Width ); } - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Decoded ROD 0x"<< std::hex<<ROD_source_ID<<std::dec <<" channel: "<< Channel <<" - BCID: "<< BCID <<" : "<< Pulse1Position <<"-"<< Pulse1Width <<" "<< Pulse2Position <<"-"<< Pulse2Width << endmsg; + ATH_MSG_DEBUG( "Decoded ROD 0x"<< std::hex<<ROD_source_ID<<std::dec <<" channel: "<< Channel <<" - BCID: "<< BCID <<" : "<< Pulse1Position <<"-"<< Pulse1Width <<" "<< Pulse2Position <<"-"<< Pulse2Width); #endif coll->push_back(new RDO(Channel,Pulse1Position,Pulse1Width,Pulse2Position,Pulse2Width,LVL1A,BCID,ROD_LVL1_ID,Error)); m_hit_number++; @@ -221,9 +220,9 @@ StatusCode BCM_RodDecoder::fillCollection(const ROBFragment *robFrag, BCM_RDO_Co Pulse2Width = (rawDataWord & 0x001f0000) >> 16; #ifdef BCM_DEBUG if (Pulse1Width != 0 || Pulse2Width != 0) { - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "BCM-ISSUE L1ID: " << ROD_LVL1_ID << " Ch: " << Channel << " L1A: " << LVL1A << " BCID: " << BCID << " Hit: " << Pulse1Position << " " << Pulse1Width << " " << Pulse2Position << " " << Pulse2Width << endmsg; + ATH_MSG_ERROR( "BCM-ISSUE L1ID: " << ROD_LVL1_ID << " Ch: " << Channel << " L1A: " << LVL1A << " BCID: " << BCID << " Hit: " << Pulse1Position << " " << Pulse1Width << " " << Pulse2Position << " " << Pulse2Width); } - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Decoded ROD 0x"<< std::hex<<ROD_source_ID<<std::dec <<" channel: "<< Channel <<" - BCID: "<< BCID <<" : "<< Pulse1Position <<"-"<< Pulse1Width <<" "<< Pulse2Position <<"-"<< Pulse2Width << endmsg; + ATH_MSG_DEBUG( "Decoded ROD 0x"<< std::hex<<ROD_source_ID<<std::dec <<" channel: "<< Channel <<" - BCID: "<< BCID <<" : "<< Pulse1Position <<"-"<< Pulse1Width <<" "<< Pulse2Position <<"-"<< Pulse2Width ); #endif coll->push_back(new RDO(Channel,Pulse1Position,Pulse1Width,Pulse2Position,Pulse2Width,LVL1A,BCID,ROD_LVL1_ID,Error)); m_hit_number++; @@ -238,9 +237,9 @@ StatusCode BCM_RodDecoder::fillCollection(const ROBFragment *robFrag, BCM_RDO_Co Pulse2Width = (rawDataWord & 0x7c000000) >> 26; #ifdef BCM_DEBUG if (Pulse1Width != 0 || Pulse2Width != 0) { - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "BCM-ISSUE L1ID: " << ROD_LVL1_ID << " Ch: " << Channel << " L1A: " << LVL1A << " BCID: " << BCID << " Hit: " << Pulse1Position << " " << Pulse1Width << " " << Pulse2Position << " " << Pulse2Width << endmsg; + ATH_MSG_ERROR( "BCM-ISSUE L1ID: " << ROD_LVL1_ID << " Ch: " << Channel << " L1A: " << LVL1A << " BCID: " << BCID << " Hit: " << Pulse1Position << " " << Pulse1Width << " " << Pulse2Position << " " << Pulse2Width ); } - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Decoded ROD 0x"<< std::hex<<ROD_source_ID<<std::dec <<" channel: "<< Channel <<" - BCID: "<< BCID <<" : "<< Pulse1Position <<"-"<< Pulse1Width <<" "<< Pulse2Position <<"-"<< Pulse2Width << endmsg; + ATH_MSG_DEBUG( "Decoded ROD 0x"<< std::hex<<ROD_source_ID<<std::dec <<" channel: "<< Channel <<" - BCID: "<< BCID <<" : "<< Pulse1Position <<"-"<< Pulse1Width <<" "<< Pulse2Position <<"-"<< Pulse2Width ); #endif coll->push_back(new RDO(Channel,Pulse1Position,Pulse1Width,Pulse2Position,Pulse2Width,LVL1A,BCID,ROD_LVL1_ID,Error)); m_hit_number++; @@ -252,15 +251,13 @@ StatusCode BCM_RodDecoder::fillCollection(const ROBFragment *robFrag, BCM_RDO_Co Pulse2Width = (rawDataWord & 0x000001f0) >> 4; #ifdef BCM_DEBUG if (Pulse1Width != 0 || Pulse2Width != 0) { - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "BCM-ISSUE L1ID: " << ROD_LVL1_ID << " Ch: " << Channel << " L1A: " << LVL1A << " BCID: " << BCID << " Hit: " << Pulse1Position << " " << Pulse1Width << " " << Pulse2Position << " " << Pulse2Width << endmsg; + ATH_MSG_ERROR( "BCM-ISSUE L1ID: " << ROD_LVL1_ID << " Ch: " << Channel << " L1A: " << LVL1A << " BCID: " << BCID << " Hit: " << Pulse1Position << " " << Pulse1Width << " " << Pulse2Position << " " << Pulse2Width ); } - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Decoded ROD 0x"<< std::hex<<ROD_source_ID<<std::dec <<" channel: "<< Channel <<" - BCID: "<< BCID <<" : "<< Pulse1Position <<"-"<< Pulse1Width <<" "<< Pulse2Position <<"-"<< Pulse2Width << endmsg; + ATH_MSG_DEBUG( "Decoded ROD 0x"<< std::hex<<ROD_source_ID<<std::dec <<" channel: "<< Channel <<" - BCID: "<< BCID <<" : "<< Pulse1Position <<"-"<< Pulse1Width <<" "<< Pulse2Position <<"-"<< Pulse2Width ); #endif coll->push_back(new RDO(Channel,Pulse1Position,Pulse1Width,Pulse2Position,Pulse2Width,LVL1A,BCID,ROD_LVL1_ID,Error)); m_hit_number++; break; - default: - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "ROD data block decoding failed. Most probably due to wrong words per data block. " << endmsg; } } diff --git a/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RodEncoder.cxx b/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RodEncoder.cxx index 032a57d405a0..fdf8e5d9bbb3 100644 --- a/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RodEncoder.cxx +++ b/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RodEncoder.cxx @@ -6,7 +6,6 @@ // BCM_RodEncoder.cxx // Implementation file for class BCM_RodEncoder /////////////////////////////////////////////////////////////////// -// (c) ATLAS BCM Detector software /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// // Version 00-00-01 12/05/2008 Daniel Dobos @@ -17,7 +16,7 @@ //////////////////////// // constructor //////////////////////// -BCM_RodEncoder::BCM_RodEncoder() +BCM_RodEncoder::BCM_RodEncoder():m_RodBlockVersion{}, m_RDOs{} { } -- GitLab From 186c3aa52b55fd0c13054a9e61cd441eb21d3a9a Mon Sep 17 00:00:00 2001 From: Jochen Meyer <Jochen.Meyer@cern.ch> Date: Fri, 15 Jun 2018 21:49:28 +0200 Subject: [PATCH 169/562] cleaning up Amdcsimrec to remove obsolete code In the far past dead structures in the muon spectrometer were built by MuonGeoModel from dimensions stored in the Oracle tables ABRT, AECT, ECST, FEET, GENV, JDSH, JFSH, JTSH and MBAP. The tables were filled by Amdcsimrec. However, already before run-1 this mechanism was disabled and the structures were built using AGDD. Therefore Amdcsimrec can be cleaned as also MuonGeoModel got already cleaned a while ago. With the removal of Muonboy the AGDD mechanism became basically decoupled from Amdcsimrec. The main migration is discussed on ATLASSIM-3636 which links the MRs to fill the database directly with AGDD w/o using Amdcsimrec. Only the parsing is currently still part of Amdcsimrec, but could be decoupled any time. In any case the table writing can be removed from Amdcsimrec. Last but not least AgddXMLVariables can be removed as it's not clear if that was ever used anyway. Former-commit-id: 843c9514038da6c3375230d01858a043c7b47d36 --- .../AmdcDb/AmdcDb/AmdcDbSvcMakerFromAmdc.h | 1 - .../AmdcDb/AmdcDb/AmdcDbSvcMakerFromRDB.h | 13 - .../Amdcsimrec/AmdcDb/src/AmdcDb2Sql.cxx | 13 - .../AmdcDb/src/AmdcDbSvcMakerFromAmdc.cxx | 39 - .../AmdcDb/src/AmdcDbSvcMakerFromRDB.cxx | 1435 ----------------- .../AmdcOracle/AmdcOracle/AmdcDumpOracle.h | 12 - .../AmdcOracle/src/AmdcDumpOracle.cxx | 807 --------- 7 files changed, 2320 deletions(-) diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDbSvcMakerFromAmdc.h b/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDbSvcMakerFromAmdc.h index ab0501bdffcb..9e539b12d1fe 100755 --- a/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDbSvcMakerFromAmdc.h +++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDbSvcMakerFromAmdc.h @@ -54,7 +54,6 @@ private: int GetEpsAngle (std::string NameOfTheSet) ; void AMDC(Amdcsimrec* pAmdcsimrec,AmdcDbSvc* pAmdcDbSvc); - void AGDD(Amdcsimrec* pAmdcsimrec,AmdcDbSvc* pAmdcDbSvc); void ATYP(Amdcsimrec* pAmdcsimrec,AmdcDbSvc* pAmdcDbSvc); void ACUT(Amdcsimrec* pAmdcsimrec,AmdcDbSvc* pAmdcDbSvc); diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDbSvcMakerFromRDB.h b/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDbSvcMakerFromRDB.h index 339ccd239351..ede7a51dba4e 100755 --- a/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDbSvcMakerFromRDB.h +++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDbSvcMakerFromRDB.h @@ -62,7 +62,6 @@ private: int GetEpsAngle (std::string NameOfTheSet) ; void AMDC(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc); - void AGDD(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc); void ATYP(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc); void ACUT(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc); @@ -90,18 +89,6 @@ private: void ASZT(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc); void ISZT(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc); - void ABRT(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc); - void AECT(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc); - void ECST(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc); - void FEET(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc); - void GENV(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc); - void JDSH(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc); - void JFSH(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc); - void JTSH(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc); - void MBAP(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc); - - void AgddXMLVariables(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc); - void HwSwIdMapping(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc); void XtomoData(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc); diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb2Sql.cxx b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb2Sql.cxx index fe573f2f53c6..b40e6e76469a 100755 --- a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb2Sql.cxx +++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb2Sql.cxx @@ -26,7 +26,6 @@ void AmdcDb2Sql::SetUseKeysOn(int UseKeysOn){ m_UseKeysOn = UseKeysOn ;} void AmdcDb2Sql::DoIt(std::string TagFileName,std::string tag,IRDBAccessSvc* pIRDBAccessSvc){ DoSql(TagFileName,"AMDC",tag,pIRDBAccessSvc); -// DoSql(TagFileName,"AGDD",tag,pIRDBAccessSvc); DoSql(TagFileName,"ATYP",tag,pIRDBAccessSvc); DoSql(TagFileName,"ACUT",tag,pIRDBAccessSvc); DoSql(TagFileName,"WRPC",tag,pIRDBAccessSvc); @@ -51,18 +50,6 @@ void AmdcDb2Sql::DoIt(std::string TagFileName,std::string tag,IRDBAccessSvc* pIR DoSql(TagFileName,"ASZT",tag,pIRDBAccessSvc); DoSql(TagFileName,"ISZT",tag,pIRDBAccessSvc); -// DoSql(TagFileName,"ABRT",tag,pIRDBAccessSvc); -// DoSql(TagFileName,"AECT",tag,pIRDBAccessSvc); -// DoSql(TagFileName,"ECST",tag,pIRDBAccessSvc); -// DoSql(TagFileName,"FEET",tag,pIRDBAccessSvc); -// DoSql(TagFileName,"GENV",tag,pIRDBAccessSvc); -// DoSql(TagFileName,"JDSH",tag,pIRDBAccessSvc); -// DoSql(TagFileName,"JFSH",tag,pIRDBAccessSvc); -// DoSql(TagFileName,"JTSH",tag,pIRDBAccessSvc); -// DoSql(TagFileName,"MBAP",tag,pIRDBAccessSvc); - -// DoSql(TagFileName,"AgddXMLVariables",tag,pIRDBAccessSvc); - DoSql(TagFileName,"HwSwIdMapping",tag,pIRDBAccessSvc); DoSql(TagFileName,"XtomoData",tag,pIRDBAccessSvc); diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromAmdc.cxx b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromAmdc.cxx index 190742314235..8560430c50ca 100755 --- a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromAmdc.cxx +++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromAmdc.cxx @@ -40,7 +40,6 @@ void AmdcDbSvcMakerFromAmdc::SetEpsAngle (std::string NameOfTheSet, int EpsAng void AmdcDbSvcMakerFromAmdc::Set(Amdcsimrec* pAmdcsimrec,AmdcDbSvc* pAmdcDbSvc){ AMDC(pAmdcsimrec,pAmdcDbSvc); -// AGDD(pAmdcsimrec,pAmdcDbSvc); ATYP(pAmdcsimrec,pAmdcDbSvc); ACUT(pAmdcsimrec,pAmdcDbSvc); @@ -116,44 +115,6 @@ void AmdcDbSvcMakerFromAmdc::AMDC(Amdcsimrec* pAmdcsimrec,AmdcDbSvc* pAmdcDbSvc) } -void AmdcDbSvcMakerFromAmdc::AGDD(Amdcsimrec* pAmdcsimrec,AmdcDbSvc* pAmdcDbSvc){ - - std::string NameOfTheSet = "AGDD"; -// int LocalEpsLengthMM = GetEpsLengthMM(NameOfTheSet) ; -// int LocalEpsLengthCM = GetEpsLengthCM(NameOfTheSet) ; -// int LocalEpsAngle = GetEpsAngle (NameOfTheSet) ; - - std::string DbVar = ""; - std::string DbVarComment = ""; - int iDbVal = 0 ; -//double dDbVal = 0.; - std::string sDbVal = ""; - - AmdcDbRecordset* pAmdcDbRecordset = new AmdcDbRecordset(); - - m_UniversalIdKounter = m_UniversalIdKounter + 1; - AmdcDbRecord* pAmdcDbRecord = new AmdcDbRecord(m_UniversalIdKounter,NameOfTheSet); - - DbVar = "VERS" ; DbVarComment="VERSION" ; iDbVal = m_version ; pAmdcDbRecord->addInt(DbVar,DbVarComment,iDbVal); - - std::string TheAmdcName = pAmdcsimrec->AmdcName() ; - - DbVar = "VNAME" ; DbVarComment="NAME" ; sDbVal = TheAmdcName.substr(0,4) ; pAmdcDbRecord->addString(DbVar,DbVarComment,sDbVal); - - std::string TheBlob = pAmdcsimrec->GetAgddString() ; - - DbVar = "LENAGDD" ; DbVarComment="STRING LENGTH" ; iDbVal = TheBlob.size() ; pAmdcDbRecord->addInt(DbVar,DbVarComment,iDbVal); - - DbVar = "NLINE" ; DbVarComment="CHAR4 NUMBER" ; iDbVal = int ( (TheBlob.size()+2.)/4. ) ; pAmdcDbRecord->addInt(DbVar,DbVarComment,iDbVal); - - DbVar = "DATA" ; DbVarComment="(NLINE)-ASCII" ; sDbVal = TheBlob ; pAmdcDbRecord->addBlob(DbVar,DbVarComment,sDbVal); - - pAmdcDbRecordset->addIRDBRecord(pAmdcDbRecord); - - pAmdcDbSvc->addIRDBRecordset(NameOfTheSet,pAmdcDbRecordset); - -} - void AmdcDbSvcMakerFromAmdc::ATYP(Amdcsimrec* pAmdcsimrec,AmdcDbSvc* pAmdcDbSvc){ std::string NameOfTheSet = "ATYP"; diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromRDB.cxx b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromRDB.cxx index 68744a66c842..38578744d59a 100755 --- a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromRDB.cxx +++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromRDB.cxx @@ -97,15 +97,6 @@ VarDesc AMDC_Vars[] = { }; -VarDesc AGDD_Vars[] = { - {VarDesc::Int, "VERS", "VERSION"}, - {VarDesc::String, "VNAME", "NAME"}, - {VarDesc::Int, "LENAGDD", "STRING LENGTH"}, - {VarDesc::Int, "NLINE", "CHAR4 NUMBER"}, - {VarDesc::String, "DATA", "(NLINE)-ASCII"}, -}; - - VarDesc ATYP_Vars[] = { {VarDesc::Int, "VERS", "VERSION"}, {VarDesc::Int, "JTYP", "AMDB STATION TYPE"}, @@ -478,1353 +469,6 @@ VarDesc ISZT_Vars[] = { }; -VarDesc ABRT_Vars[] = { - {VarDesc::FloatCM, "CRYORMIN", "CRYORMIN "}, - {VarDesc::FloatCM, "CRYORMAX", "CRYORMAX "}, - {VarDesc::FloatCM, "CRYOZMAX", "CRYOZMAX "}, - {VarDesc::FloatCM, "CRYORCUR", "CRYORCUR "}, - {VarDesc::FloatCM, "CRYORADI", "RADIUS "}, - {VarDesc::FloatCM, "CRYORADT", "RADTHICK "}, - {VarDesc::FloatCM, "CRYATTD0", "CRYOATTDIAM0 "}, - {VarDesc::FloatCM, "CRYATTD1", "CRYOATTDIAM1 "}, - {VarDesc::FloatCM, "CRYATTAL", "CRYOATTALFA "}, - {VarDesc::FloatCM, "CRYATTXH", "CRYOATTXHIGH "}, - {VarDesc::FloatCM, "CRYATTTH", "CRYOATTTHICK "}, - {VarDesc::FloatCM, "CRYATTRX", "CRYOATTRMAX "}, - {VarDesc::FloatCM, "CRYATWIY", "CRYOATTWINGY "}, - {VarDesc::FloatCM, "CRYATWXP", "CRYOATTWINGXP "}, - {VarDesc::FloatCM, "CRYATWXN", "CRYOATTWINGXN "}, - {VarDesc::FloatCM, "CRYATWBO", "CRYOATTWINGBOSS "}, - {VarDesc::FloatCM, "CRYATWTH", "CRYOATTWINGTHIC "}, - {VarDesc::FloatCM, "CRYATWZE", "CRYOATTWINGZESP "}, - {VarDesc::FloatCM, "CRYATWRA", "CRYOATTWINGRAD "}, - {VarDesc::FloatCM, "CRYATWYC", "CRYOATTWINGYCUT "}, - {VarDesc::FloatCM, "CRYRIBYW", "CRYORIBYWID "}, - {VarDesc::FloatCM, "CRYRIBZL", "CRYORIBZLEN "}, - {VarDesc::FloatCM, "CRYRIBTH", "CRYORIBTHICK "}, - {VarDesc::FloatCM, "CRYRIWYP", "CRYORIBWINGYP "}, - {VarDesc::FloatCM, "CRYRIWYN", "CRYORIBWINGYN "}, - {VarDesc::FloatCM, "CRYRIWXP", "CRYORIBWINGXP "}, - {VarDesc::FloatCM, "CRYRIWXN", "CRYORIBWINGXN "}, - {VarDesc::FloatCM, "CRYRIWTH", "CRYORIBWINGTHIC "}, - {VarDesc::FloatCM, "CRYRNGRM", "CRYORINGRMED "}, - {VarDesc::FloatCM, "CRYRNGZM", "CRYORINGZMED "}, - {VarDesc::FloatCM, "CRYRNGRA", "CRYORINGRADIUS "}, - {VarDesc::FloatCM, "STRTRMAX", "STRTRMAX "}, - {VarDesc::FloatCM, "STRTRMIN", "STRTRMIN "}, - {VarDesc::FloatCM, "STRTYLEN", "STRTYLEN "}, - {VarDesc::FloatCM, "STRTZWID", "STRUTZWIDTH "}, - {VarDesc::FloatCM, "STRTRTHI", "STRUTRTHICK "}, - {VarDesc::FloatCM, "STRTZTHI", "STRUTZTHICK "}, - {VarDesc::FloatCM, "STRWRMAX", "STRUTWINGRMAX "}, - {VarDesc::FloatCM, "STRWYMAX", "STRUTWINGYMAX "}, - {VarDesc::FloatCM, "STRWRMIN", "STRUTWINGRMIN "}, - {VarDesc::FloatCM, "STRWYMIN", "STRUTWINGYMIN "}, - {VarDesc::FloatCM, "STRWZTHI", "STRUTWINGZTHICK "}, - {VarDesc::FloatCM, "STRWYTHI", "STRUTWINGYTHICK "}, - {VarDesc::FloatCM, "STRWZLEN", "STRUTWINGZLEN "}, - {VarDesc::FloatCM, "ZVOUSS_0", "ARRAY "}, - {VarDesc::FloatCM, "ZVOUSS_1", " "}, - {VarDesc::FloatCM, "ZVOUSS_2", " "}, - {VarDesc::FloatCM, "ZVOUSS_3", " "}, - {VarDesc::FloatCM, "ZVOUSS_4", " "}, - {VarDesc::FloatCM, "ZVOUSS_5", " "}, - {VarDesc::FloatCM, "ZVOUSS_6", " "}, - {VarDesc::FloatCM, "ZVOUSS_7", " "}, - {VarDesc::FloatCM, "ZRIB_0", "ARRAY "}, - {VarDesc::FloatCM, "ZRIB_1", " "}, - {VarDesc::FloatCM, "ZRIB_2", " "}, - {VarDesc::FloatCM, "ZRIB_3", " "}, - {VarDesc::FloatCM, "ZRIB_4", " "}, - {VarDesc::FloatCM, "ZRIB_5", " "}, - {VarDesc::FloatCM, "ZRIB_6", " "}, - {VarDesc::FloatCM, "CRYRIXHI", "CRYORIBXHIGH "}, - {VarDesc::FloatCM, "STRTRMOY", "STRTRMOY "}, - {VarDesc::FloatCM, "STRTYLNP", "STRUTYLENP "}, - {VarDesc::FloatCM, "CRYATTXS", "CRYOATTXSEC "}, - {VarDesc::FloatCM, "COMARMIN", "COLDMASSRMIN "}, - {VarDesc::FloatCM, "COMARMAX", "COLDMASSRMAX "}, - {VarDesc::FloatCM, "COMAZMAX", "COLDMASSZMAX "}, - {VarDesc::FloatCM, "COMARCUI", "COLDMASSRCURVI "}, - {VarDesc::FloatCM, "COMARTHI", "COLDMASSRTHICK "}, - {VarDesc::FloatCM, "COMAYTHI", "COLDMASSYTHICK "}, - {VarDesc::FloatCM, "COMARIBY", "COLDMASSRIBY "}, - {VarDesc::FloatCM, "COMARIBZ", "COLDMASSRIBZ "}, - {VarDesc::FloatCM, "COMABOSS", "COLDMASSBOSS "}, - {VarDesc::FloatCM, "COMARIBX", "COLDMASSRIBX "}, - {VarDesc::FloatCM, "BIELYHEI", "BIELLYHEIGHT "}, - {VarDesc::FloatCM, "BIELYSO1", "BIELLYSOLE1 "}, - {VarDesc::FloatCM, "BIELYSO2", "BIELLYSOLE2 "}, - {VarDesc::FloatCM, "BIELXSOL", "BIELLXSOLE "}, - {VarDesc::FloatCM, "BIELXTH1", "BIELLXTHICK1 "}, - {VarDesc::FloatCM, "BIELXTH2", "BIELLXTHICK2 "}, - {VarDesc::FloatCM, "BIELZTH1", "BIELLZTHICK1 "}, - {VarDesc::FloatCM, "BIELRHOL", "BIELLRADHOLE "}, - {VarDesc::FloatCM, "BIELYCHO", "BIELLYCENHOLE "}, - {VarDesc::FloatCM, "BIELATL1", "BIELLATTLENG1 "}, - {VarDesc::FloatCM, "BIELATL2", "BIELLATTLENG2 "}, - {VarDesc::FloatCM, "BIELATTH", "BIELLATTTHICK "}, - {VarDesc::FloatCM, "BIELATHE", "BIELLATTHEIGHT "}, - {VarDesc::FloatCM, "VOUSBLXH", "VOUSSBLOCKXHEIGHT "}, - {VarDesc::FloatCM, "VOUSPLIX", "VOUSSPLATEINNERXWID "}, - {VarDesc::FloatCM, "VOUSPLOX", "VOUSSPLATEOUTERXWID "}, - {VarDesc::FloatCM, "VOUSBLYW", "VOUSSBLOCKYWID "}, - {VarDesc::FloatCM, "VOUBLYWS", "VOUSSBLOCKYWIDSUB "}, - {VarDesc::FloatCM, "VOURCYWI", "VOUSSRECTCUTYWID "}, - {VarDesc::FloatCM, "VOURPYWI", "VOUSSREINFORCEPLATYWID "}, - {VarDesc::FloatCM, "VOUBLZLE", "VOUSSBLOCKZLEN "}, - {VarDesc::FloatCM, "VOUBLZLS", "VOUSSBLOCKZLENSUB "}, - {VarDesc::FloatCM, "VOUBZWTH", "VOUSSBLOCKZWALLTH "}, - {VarDesc::FloatCM, "VOUCUTZE", "VOUSSCUTZEXT "}, - {VarDesc::FloatCM, "VOURCUTR", "VOUSSROUNDCUTRAD "}, - {VarDesc::FloatCM, "VOURECSL", "VOUSSRECTCUTXYSLANT "}, - {VarDesc::FloatCM, "CNBCOYEX", "CONBOXCOREYEXTENSION "}, - {VarDesc::FloatCM, "CNBCOXEX", "CONBOXCOREXEXTENSION "}, - {VarDesc::FloatCM, "CNBCOXSU", "CONBOXCOREXSUP "}, - {VarDesc::FloatCM, "CNBCOXIN", "CONBOXCOREXINF "}, - {VarDesc::FloatCM, "CNBEAHEI", "CONBOXEARHEIGHT "}, - {VarDesc::FloatCM, "CNBEACXI", "CONBOXEARCUTXIN "}, - {VarDesc::FloatCM, "CNBEACTL", "CONBOXEARCUTPLATETHICKLOWOUT"}, - {VarDesc::FloatCM, "CNBEACTU", "CONBOXEARCUTPLATETHICKUP "}, - {VarDesc::FloatCM, "CNBEACZW", "CONBOXEARCUTZWALL "}, - {VarDesc::FloatCM, "CNBEACZE", "CONBOXEARCUTZEXTR "}, - {VarDesc::FloatCM, "CNBEACPL", "CONBOXINNEREARCUTPLATE "}, - {VarDesc::FloatCM, "CNBCADMA", "CONBOXCAVITYDMAX "}, - {VarDesc::FloatCM, "CNBCADMI", "CONBOXCAVITYDMIN "}, - {VarDesc::FloatCM, "CNBCAZEX", "CONBOXCAVITYZEXT "}, - {VarDesc::FloatCM, "CNBOXZEX", "CONBOXZEXTENSION "}, - {VarDesc::FloatCM, "VOUSMBRA", "VOUSSOIRMAINBLOCKRADIUS "}, - {VarDesc::FloatCM, "CNBXMBRA", "CONBOXMAINBLOCKRADIUS "}, - {VarDesc::FloatCM, "VOUCRCYR", "VOUSSCENTRRECTCUTYREACH "}, - {VarDesc::FloatCM, "VOUSRCXW", "VOUSSRECTCUTXWID "}, - {VarDesc::FloatCM, "VOUSCXOF", "VOUSSCUTXOFFSET "}, - {VarDesc::FloatCM, "VOUSCYPO", "VOUSSOIRCUTYPOS "}, - {VarDesc::FloatCM, "VOUSCZPO", "VOUSSOIRCUTZPOS "}, - {VarDesc::FloatCM, "CNBEAXTP", "CONBOXEARXTOP "}, - {VarDesc::FloatCM, "CNBEAYTP", "CONBOXEARYTOP "}, - {VarDesc::FloatCM, "CNBEAXBT", "CONBOXEARXBOT "}, - {VarDesc::FloatCM, "CNBEAYBT", "CONBOXEARYBOT "}, - {VarDesc::FloatCM, "CNBECXOL", "CONBOXEARCUTXOUTLOW "}, - {VarDesc::FloatCM, "CNBECYOL", "CONBOXEARCUTYOUTLOW "}, - {VarDesc::FloatCM, "CNBECYIL", "CONBOXEARCUTYINLOW "}, - {VarDesc::FloatCM, "CNBECOHE", "CONBOXEARCUTOUTHEIGHT "}, - {VarDesc::FloatCM, "CNBECXOU", "CONBOXEARCUTXOUTUP "}, - {VarDesc::FloatCM, "CNBECYOU", "CONBOXEARCUTYOUTUP "}, - {VarDesc::FloatCM, "CNBECYIU", "CONBOXEARCUTYINUP "}, - {VarDesc::FloatCM, "CNBECZPO", "CONBOXEARCUTZPOS "}, - {VarDesc::FloatCM, "CNBIECZP", "CONBOXINNEREARCUTZPOS "}, - {VarDesc::FloatCM, "CNBCAZIN", "CONBOXCAVITYZINTER "}, - {VarDesc::FloatCM, "VOUSSRAD", "VOUSSOIRRADIUS "}, - {VarDesc::FloatCM, "CNBOXRAD", "CONBOXRADIUS "}, -}; - - -VarDesc AECT_Vars[] = { - {VarDesc::FloatCM, "CRYOT1", "CRYOT1 "}, - {VarDesc::FloatCM, "CRYOT2", "CRYOT2 "}, - {VarDesc::FloatCM, "CRYOS1", "CRYOS1 "}, - {VarDesc::FloatCM, "CRYOS2", "CRYOS2 "}, - {VarDesc::FloatCM, "CRYOEDGE", "CRYOEDGE "}, - {VarDesc::FloatCM, "CRYOFLTY", "FLATY "}, - {VarDesc::FloatCM, "CRYOR0", "CRYOR0 "}, - {VarDesc::FloatCM, "CRYOZMIN", "CRYOZMIN "}, - {VarDesc::FloatCM, "CRYOZEXT", "CRYOZEXT "}, - {VarDesc::FloatCM, "CRYOTHI1", "THICK1 "}, - {VarDesc::FloatCM, "CRYOTHI2", "THICK2 "}, - {VarDesc::FloatCM, "CRYOTHI3", "THICK3 "}, - {VarDesc::FloatCM, "CRYOTTU0", "CRYOTTU0 "}, - {VarDesc::FloatCM, "CRYORTU0", "CRYORTU0 "}, - {VarDesc::FloatCM, "CRYORTU1", "CRYORTU1 "}, - {VarDesc::FloatCM, "CRYODPHT", "DPHITU "}, - {VarDesc::FloatCM, "CRYOSTL0", "CRYOSTOPLENGTH0 "}, - {VarDesc::FloatCM, "CRYOSTL1", "CRYOSTOPLENGTH1 "}, - {VarDesc::FloatCM, "CRYOSTH0", "CRYOSTOPHEIGHT0 "}, - {VarDesc::FloatCM, "CRYOSTW0", "CRYOSTOPWIDTH0 "}, - {VarDesc::FloatCM, "CRYOSTW1", "CRYOSTOPWIDTH1 "}, - {VarDesc::FloatCM, "CRYOSTTH", "CRYOSTOPTHICKNESS"}, - {VarDesc::FloatCM, "CRYOSTH1", "CRYOSTOPHEIGHT1 "}, - {VarDesc::FloatCM, "CRYOSTH2", "CRYOSTOPHEIGHT2 "}, - {VarDesc::FloatCM, "CRYOSTPZ", "CRYOSTOPPOSIZ "}, - {VarDesc::FloatCM, "CRYOSUPL", "CRYOSUPL "}, - {VarDesc::FloatCM, "CRYOSUPH", "CRYOSUPH "}, - {VarDesc::FloatCM, "CRYOSUPW", "CRYOSUPW "}, - {VarDesc::FloatCM, "CRYOSUPX", "CRYOSUPX "}, - {VarDesc::FloatCM, "CNBXZMOF", "CONDBOXZMINOFFSET"}, - {VarDesc::FloatCM, "CNBXZEXT", "CONDBOXZEXT "}, - {VarDesc::FloatCM, "CNBXTMIN", "CONDBOXTMIN "}, - {VarDesc::FloatCM, "CNBXTMAX", "CONDBOXTMAX "}, - {VarDesc::FloatCM, "CNBXTHIC", "CONDBOXTHICK "}, - {VarDesc::FloatCM, "CNBXEDGE", "CONDBOXEDGE "}, - {VarDesc::FloatCM, "SUPPLZOF", "SUPPLATZOFFSET "}, - {VarDesc::FloatCM, "SUPPLZEX", "SUPPLATZEXT "}, - {VarDesc::FloatCM, "SUPPLTMI", "SUPPLATTMIN "}, - {VarDesc::FloatCM, "SUPPLTMA", "SUPPLATTMAX "}, - {VarDesc::FloatCM, "SUPPLTHZ", "SUPPLATTHICKZ "}, - {VarDesc::FloatCM, "SUPPLTHT", "SUPPLATTHICKT "}, - {VarDesc::FloatCM, "SUPPLRHO", "SUPPLATRHOLE "}, - {VarDesc::FloatCM, "SRVTU1DZ", "SERVTUR1DZ "}, - {VarDesc::FloatCM, "SRVTU1HE", "SERVTUR1HEIGHT "}, - {VarDesc::FloatCM, "SRVTU1OW", "SERVTUR1OUTWIDTH "}, - {VarDesc::FloatCM, "SRVTU1IW", "SERVTUR1INNWIDTH "}, - {VarDesc::FloatCM, "SRVTU1ED", "SERVTUR1EDGE "}, - {VarDesc::FloatCM, "SRVTU2DZ", "SERVTUR2DZ "}, - {VarDesc::FloatCM, "SRVTU2HE", "SERVTUR2HEIGHT "}, - {VarDesc::FloatCM, "SRVTU2OR", "SERVTUR2OUTRAD "}, - {VarDesc::FloatCM, "SRVTU2IR", "SERVTUR2INNRAD "}, - {VarDesc::FloatCM, "SRVTU3DZ", "SERVTUR3DZ "}, - {VarDesc::FloatCM, "SRVTU3HE", "SERVTUR3HEIGHT "}, - {VarDesc::FloatCM, "SIFITU", "SIFITU "}, - {VarDesc::FloatCM, "COFITU", "COFITU "}, - {VarDesc::FloatCM, "CRYOZMAX", "CRYOZMAX "}, - {VarDesc::FloatCM, "CNBXZMIN", "CONDBOXZMIN "}, - {VarDesc::FloatCM, "CNBXZMAX", "CONDBOXZMAX "}, - {VarDesc::FloatCM, "SUPPLZMI", "SUPPLATZMIN "}, - {VarDesc::FloatCM, "SUPPLZMA", "SUPPLATZMAX "}, - {VarDesc::FloatCM, "CRYOZMOY", "CRYOZMOY "}, - {VarDesc::FloatCM, "CRYOALFA", "CRYOALFA "}, - {VarDesc::FloatCM, "CRYOBETA", "CRYOBETA "}, - {VarDesc::FloatCM, "CRYOT1P", "CRYOT1P "}, - {VarDesc::FloatCM, "CRYOT2P", "CRYOT2P "}, - {VarDesc::FloatCM, "CRYOS1P", "CRYOS1P "}, - {VarDesc::FloatCM, "CRYOS2P", "CRYOS2P "}, - {VarDesc::FloatCM, "CRYOFLYP", "FLATYP "}, - {VarDesc::FloatCM, "SUPPLZME", "SUPPLATZMOY "}, - {VarDesc::FloatCM, "XTEMP_0", "ARRAY "}, - {VarDesc::FloatCM, "XTEMP_1", " "}, - {VarDesc::FloatCM, "XTEMP_2", " "}, - {VarDesc::FloatCM, "YTEMP_0", "ARRAY "}, - {VarDesc::FloatCM, "YTEMP_1", " "}, - {VarDesc::FloatCM, "YTEMP_2", " "}, - {VarDesc::FloatCM, "DTEMP01", "DTEMP01 "}, - {VarDesc::FloatCM, "XTIMP_0", "ARRAY "}, - {VarDesc::FloatCM, "XTIMP_1", " "}, - {VarDesc::FloatCM, "XTIMP_2", " "}, - {VarDesc::FloatCM, "YTIMP_0", "ARRAY "}, - {VarDesc::FloatCM, "YTIMP_1", " "}, - {VarDesc::FloatCM, "YTIMP_2", " "}, - {VarDesc::FloatCM, "DTIMP01", "DTIMP01 "}, - {VarDesc::FloatCM, "UTEMP61", "UTEMP61 "}, - {VarDesc::FloatCM, "UTEMP62", "UTEMP62 "}, - {VarDesc::FloatCM, "UTIMP61", "UTIMP61 "}, - {VarDesc::FloatCM, "UTIMP62", "UTIMP62 "}, - {VarDesc::FloatCM, "DTEMP", "DTEMP "}, - {VarDesc::FloatCM, "SUPPLATY_0", "ARRAY "}, - {VarDesc::FloatCM, "SUPPLATY_1", " "}, - {VarDesc::FloatCM, "SUPPLATY_2", " "}, - {VarDesc::FloatCM, "SUPPLATY_3", " "}, - {VarDesc::FloatCM, "SUPPLATX_0", "ARRAY "}, - {VarDesc::FloatCM, "SUPPLATX_1", " "}, - {VarDesc::FloatCM, "SUPPLATX_2", " "}, - {VarDesc::FloatCM, "SUPPLATX_3", " "}, - {VarDesc::FloatCM, "X1TEMP", "X1TEMP "}, - {VarDesc::FloatCM, "X0TEMP", "X0TEMP "}, -}; - - -VarDesc ECST_Vars[] = { - {VarDesc::FloatCM, "STOTHIC1", "STOTHIC1 "}, - {VarDesc::FloatCM, "STOTHIC2", "STOTHIC2 "}, - {VarDesc::FloatCM, "STOTHIC3", "STOTHIC3 "}, - {VarDesc::FloatCM, "STOTHIC4", "STOTHIC4 "}, - {VarDesc::FloatCM, "STOLENGT", "STOLENGT "}, - {VarDesc::FloatCM, "STOLENGA", "STOLENGA "}, - {VarDesc::FloatCM, "STOXPREF", "STOXPREF "}, - {VarDesc::FloatCM, "STOYPREF", "STOYPREF "}, - {VarDesc::FloatCM, "STOHEIGH", "STOHEIGH "}, - {VarDesc::FloatCM, "STOHEIG1", "STOHEIG1 "}, - {VarDesc::FloatCM, "STOHEIG2", "STOHEIG2 "}, - {VarDesc::FloatCM, "STOHEIG3", "STOHEIG3 "}, - {VarDesc::FloatCM, "STOHEIG4", "STOHEIG4 "}, - {VarDesc::FloatCM, "STODZBOT", "STODZBOT "}, - {VarDesc::FloatCM, "STODZIN1", "STODZIN1 "}, - {VarDesc::FloatCM, "STODZIN2", "STODZIN2 "}, - {VarDesc::FloatCM, "STODZIN3", "STODZIN3 "}, - {VarDesc::FloatCM, "STODZIN4", "STODZIN4 "}, - {VarDesc::FloatCM, "STODZIN5", "STODZIN5 "}, - {VarDesc::FloatCM, "STODZTOP", "STODZTOP "}, - {VarDesc::FloatCM, "STOANGLE", "STOANGLE "}, - {VarDesc::FloatCM, "STOYPOS", "STOYPOS "}, - {VarDesc::FloatCM, "STOGECXZ", "STOGECXZ "}, - {VarDesc::FloatCM, "STOGECHE", "STOGECHE "}, - {VarDesc::FloatCM, "STOCLCZP", "STOCLCZP "}, - {VarDesc::FloatCM, "STOANGD2", "STOANGD2 "}, - {VarDesc::FloatCM, "STOANGD4", "STOANGD4 "}, - {VarDesc::FloatCM, "STOLENG1", "STOLENG1 "}, - {VarDesc::FloatCM, "STOFXPOS", "STOFXPOS "}, - {VarDesc::FloatCM, "STOZPOS", "STOZPOS "}, - {VarDesc::FloatCM, "STOUEYP", "STOUEYP "}, - {VarDesc::FloatCM, "STOTEYP", "STOTEYP "}, - {VarDesc::FloatCM, "STOTEZP", "STOTEZP "}, - {VarDesc::FloatCM, "STOFLXA", "STOFLXA "}, - {VarDesc::FloatCM, "STOFLYA", "STOFLYA "}, - {VarDesc::FloatCM, "STOFLXB", "STOFLXB "}, - {VarDesc::FloatCM, "STOFLYB", "STOFLYB "}, - {VarDesc::FloatCM, "STOFLXC", "STOFLXC "}, - {VarDesc::FloatCM, "STOFLYC", "STOFLYC "}, - {VarDesc::FloatCM, "STOFLXD", "STOFLXD "}, - {VarDesc::FloatCM, "STOFLYD", "STOFLYD "}, - {VarDesc::FloatCM, "STOFLXE", "STOFLXE "}, - {VarDesc::FloatCM, "STOFLYE", "STOFLYE "}, - {VarDesc::FloatCM, "STOFLXF", "STOFLXF "}, - {VarDesc::FloatCM, "STOFLYF", "STOFLYF "}, - {VarDesc::FloatCM, "STOFLXG", "STOFLXG "}, - {VarDesc::FloatCM, "STOFLYG", "STOFLYG "}, - {VarDesc::FloatCM, "STOFLXH", "STOFLXH "}, - {VarDesc::FloatCM, "STOFLYH", "STOFLYH "}, - {VarDesc::FloatCM, "STOFLXI", "STOFLXI "}, - {VarDesc::FloatCM, "STOFLYI", "STOFLYI "}, - {VarDesc::FloatCM, "STOCOXA", "STOCOXA "}, - {VarDesc::FloatCM, "STOCOYA", "STOCOYA "}, - {VarDesc::FloatCM, "STOCOXA1", "STOCOXA1 "}, - {VarDesc::FloatCM, "STOCOYA1", "STOCOYA1 "}, - {VarDesc::FloatCM, "STOCOXB", "STOCOXB "}, - {VarDesc::FloatCM, "STOCOYB", "STOCOYB "}, - {VarDesc::FloatCM, "STOCOXB1", "STOCOXB1 "}, - {VarDesc::FloatCM, "STOCOYB1", "STOCOYB1 "}, - {VarDesc::FloatCM, "STOCOXC", "STOCOXC "}, - {VarDesc::FloatCM, "STOCOYC", "STOCOYC "}, - {VarDesc::FloatCM, "STOCOXC1", "STOCOXC1 "}, - {VarDesc::FloatCM, "STOCOYC1", "STOCOYC1 "}, - {VarDesc::FloatCM, "STOCOXD", "STOCOXD "}, - {VarDesc::FloatCM, "STOCOYD", "STOCOYD "}, - {VarDesc::FloatCM, "STOCOXD1", "STOCOXD1 "}, - {VarDesc::FloatCM, "STOCOYD1", "STOCOYD1 "}, - {VarDesc::FloatCM, "STOCOXE", "STOCOXE "}, - {VarDesc::FloatCM, "STOCOYE", "STOCOYE "}, - {VarDesc::FloatCM, "STOCOXE1", "STOCOXE1 "}, - {VarDesc::FloatCM, "STOCOYE1", "STOCOYE1 "}, - {VarDesc::FloatCM, "STOCOXF", "STOCOXF "}, - {VarDesc::FloatCM, "STOCOYF", "STOCOYF "}, - {VarDesc::FloatCM, "STOCOXF1", "STOCOXF1 "}, - {VarDesc::FloatCM, "STOCOYF1", "STOCOYF1 "}, - {VarDesc::FloatCM, "STOCOXG", "STOCOXG "}, - {VarDesc::FloatCM, "STOCOYG", "STOCOYG "}, - {VarDesc::FloatCM, "STOCOXG1", "STOCOXG1 "}, - {VarDesc::FloatCM, "STOCOYG1", "STOCOYG1 "}, - {VarDesc::FloatCM, "STOCOXH", "STOCOXH "}, - {VarDesc::FloatCM, "STOCOYH", "STOCOYH "}, - {VarDesc::FloatCM, "STOCOXH1", "STOCOXH1 "}, - {VarDesc::FloatCM, "STOCOYH1", "STOCOYH1 "}, - {VarDesc::FloatCM, "STOCOXI", "STOCOXI "}, - {VarDesc::FloatCM, "STOCOYI", "STOCOYI "}, - {VarDesc::FloatCM, "STOCOXI1", "STOCOXI1 "}, - {VarDesc::FloatCM, "STOCOYI1", "STOCOYI1 "}, - {VarDesc::FloatCM, "STOCO3DX", "STOCO3DX "}, - {VarDesc::FloatCM, "STOCO3DY", "STOCO3DY "}, - {VarDesc::FloatCM, "STOCO3DZ", "STOCO3DZ "}, - {VarDesc::FloatCM, "STOCO3ZP", "STOCO3ZP "}, - {VarDesc::FloatCM, "STOCO3YP", "STOCO3YP "}, - {VarDesc::FloatCM, "STOUEXA", "STOUEXA "}, - {VarDesc::FloatCM, "STOUEYA", "STOUEYA "}, - {VarDesc::FloatCM, "STOUEXB", "STOUEXB "}, - {VarDesc::FloatCM, "STOUEYB", "STOUEYB "}, - {VarDesc::FloatCM, "STOUEXC", "STOUEXC "}, - {VarDesc::FloatCM, "STOUEYC", "STOUEYC "}, - {VarDesc::FloatCM, "STOUECXA", "STOUECXA "}, - {VarDesc::FloatCM, "STOUECYA", "STOUECYA "}, - {VarDesc::FloatCM, "STOUECXB", "STOUECXB "}, - {VarDesc::FloatCM, "STOUECYB", "STOUECYB "}, - {VarDesc::FloatCM, "STOUECZP", "STOUECZP "}, - {VarDesc::FloatCM, "STOUECYP", "STOUECYP "}, -}; - - -VarDesc FEET_Vars[] = { - {VarDesc::FloatCM, "MAINPLXO", "MAINPLATEXORIGIN "}, - {VarDesc::FloatCM, "MNPLGXWI", "MAINPLATE_GROUNDXWIDTH "}, - {VarDesc::FloatCM, "MNPLRCDX", "MAINPLATEROUNDCUTDX "}, - {VarDesc::FloatCM, "MNPLDXEX", "MAINPLATEDXEXTR "}, - {VarDesc::FloatCM, "MNPLUPDX", "MAINPLATEUPPERDX "}, - {VarDesc::FloatCM, "MNPLUPXW", "MAINPLATEUPPERXWIDTH "}, - {VarDesc::FloatCM, "MNPLMIDX", "MAINPLATEMIDDLEDX "}, - {VarDesc::FloatCM, "MAINPLYO", "MAINPLATEYORIGIN "}, - {VarDesc::FloatCM, "MAINPLHE", "MAINPLATEHEIGHT "}, - {VarDesc::FloatCM, "MAINPLH1", "MAINPLATEHEIGHT_INTERMEDIATE1 "}, - {VarDesc::FloatCM, "MNPLRCYP", "MAINPLATEROUNDCUT_Y "}, - {VarDesc::FloatCM, "MNPLSRCY", "MAINPLATESECONDARYROUNDCUT_Y "}, - {VarDesc::FloatCM, "MNPLUPDY", "MAINPLATEUPPERDY "}, - {VarDesc::FloatCM, "MNPLMIDY", "MAINPLATEMIDDLEDY "}, - {VarDesc::FloatCM, "MNPLPEHE", "MAINPLATE_PEDESTALHEIGHT "}, - {VarDesc::FloatCM, "MAINPLDZ", "MAINPLATEDZ "}, - {VarDesc::FloatCM, "MNPLZSEP", "MAINPLATEZSEP "}, - {VarDesc::FloatCM, "MNPLRCRA", "MAINPLATEROUNDCUT_R "}, - {VarDesc::FloatCM, "MNPLSRCR", "MAINPLATESECONDARYROUNDCUT_R "}, - {VarDesc::FloatCM, "MINCPLXW", "MINICONNPLATE_XWIDTH "}, - {VarDesc::FloatCM, "MINCPLYH", "MINICONNPLATE_YHEIGHT "}, - {VarDesc::FloatCM, "MINCPLTZ", "MINICONNPLATE_THETAZ "}, - {VarDesc::FloatCM, "MINCPLZL", "MINICONNPLATE_ZLENGTH "}, - {VarDesc::FloatCM, "SLACPLXW", "SLANTEDCONNPLATE_XWIDTH "}, - {VarDesc::FloatCM, "SLACPLYH", "SLANTEDCONNPLATE_YHEIGHT "}, - {VarDesc::FloatCM, "SLACPLTZ", "SLANTEDCONNPLATE_THETAZ "}, - {VarDesc::FloatCM, "SLACPLZL", "SLANTEDCONNPLATE_ZLENGTH "}, - {VarDesc::FloatCM, "GRNDPLZL", "GROUNDPLATE_ZLENGTH "}, - {VarDesc::FloatCM, "VCNPLXWI", "VERTICALCONNPLATE_XWIDTH "}, - {VarDesc::FloatCM, "VCNPLYHE", "VERTICALCONNPLATE_YHEIGHT "}, - {VarDesc::FloatCM, "VCNPLDXE", "VERTICALCONNPLATE_DX "}, - {VarDesc::FloatCM, "VCNPLDYE", "VERTICALCONNPLATE_DY "}, - {VarDesc::FloatCM, "UCNPLXWI", "UPPERCONNPLATE_XWIDTH "}, - {VarDesc::FloatCM, "UCNPLYHE", "UPPERCONNPLATE_YHEIGHT "}, - {VarDesc::FloatCM, "XWIDTH", "XWIDTH "}, - {VarDesc::FloatCM, "UPPERHEY", "RAILSUPPORTUPPER_YHEIGHT "}, - {VarDesc::FloatCM, "UPPERLEZ", "RAILSUPPORTUPPER_ZLENGTH "}, - {VarDesc::FloatCM, "LOWERHEY", "RAILSUPPORTLOWER_YHEIGHT "}, - {VarDesc::FloatCM, "LOWERLEZ", "RAILSUPPORTLOWER_ZLENGTH "}, - {VarDesc::FloatCM, "TOTALHEY", "RAILSUPPORTTOTAL_YHEIGHT "}, - {VarDesc::FloatCM, "CENTRLEZ", "RAILSUPPORTCENTRAL_ZLENGTH "}, - {VarDesc::FloatCM, "CENTRXTH", "RAILSUPPORTCENTRAL_XTHICK "}, - {VarDesc::FloatCM, "MIDLLYTH", "RAILSUPPORTMIDDLE_YTHICK "}, - {VarDesc::FloatCM, "VERTIZTH", "RAILSUPPORTVERTICAL_ZTHICK "}, - {VarDesc::FloatCM, "MIDLLYPO", "RAILSUPPORTMIDDLE_YPOS "}, - {VarDesc::FloatCM, "EXTREHEY", "RAILSUPPORTEXTR_YHEIGHT "}, - {VarDesc::FloatCM, "EXTRELEZ", "RAILSUPPORTEXTR_ZLENGTH "}, - {VarDesc::FloatCM, "CENTRHEY", "RAILSUPPORTCENTRAL_YHEIGHT "}, - {VarDesc::FloatCM, "CNFEVOXW", "CONNFEETVOUSS_XWIDTH "}, - {VarDesc::FloatCM, "CNFEVOYH", "CONNFEETVOUSS_YHEIGHT "}, - {VarDesc::FloatCM, "CNFEVOZL", "CONNFEETVOUSS_ZLENGTH "}, - {VarDesc::FloatCM, "CNFEVOXT", "CONNFEETVOUSS_XTHICK "}, - {VarDesc::FloatCM, "CNFEVOYT", "CONNFEETVOUSS_YTHICK "}, - {VarDesc::FloatCM, "CNFEVOZT", "CONNFEETVOUSS_ZTHICK "}, - {VarDesc::FloatCM, "G12LPXWT", "GIRDER12_LATERALPLATE_XWIDTH_TOTAL "}, - {VarDesc::FloatCM, "G12IPSXO", "GIRDER12_INNERPLATESMALLOFFSET_XDIST "}, - {VarDesc::FloatCM, "G12IPSLX", "GIRDER12_INNERPLATESMALL2LARGE_XDIST "}, - {VarDesc::FloatCM, "G12IPLLX", "GIRDER12_INNERPLATELARGE2LARGE_XDIST "}, - {VarDesc::FloatCM, "G12IPLSX", "GIRDER12_INNERPLATELARGE2SMALL_XDIST "}, - {VarDesc::FloatCM, "G12RPXWI", "GIRDER12_REINFORCEMENTPLATE_XWIDTH "}, - {VarDesc::FloatCM, "G12LPXW1", "GIRDER12_LATERALPLATE_XWIDTH_INTER1 "}, - {VarDesc::FloatCM, "G12LPX12", "GIRDER12_LATERALPLATE_XWIDTH_INTER1INTER"}, - {VarDesc::FloatCM, "G12IPXWI", "GIRDER12_INNERPLATE_XWIDTH "}, - {VarDesc::FloatCM, "G12UMPWI", "GIRDER12_UPPERMINIPLATE_XWIDTH "}, - {VarDesc::FloatCM, "G12SMPWI", "GIRDER12_SIDEMINIPLATE_XWIDTH "}, - {VarDesc::FloatCM, "G12YORIG", "GIRDER12_YORIGIN "}, - {VarDesc::FloatCM, "G12LPYHT", "GIRDER12_LATERALPLATE_YHEIGHT_TOTAL "}, - {VarDesc::FloatCM, "G12LPYH1", "GIRDER12_LATERALPLATE_YHEIGHT_INTER1 "}, - {VarDesc::FloatCM, "G12LPYH2", "GIRDER12_LATERALPLATE_YHEIGHT_INTER2 "}, - {VarDesc::FloatCM, "G12LPYTH", "GIRDER12_LOWERPLATE_YTHICK "}, - {VarDesc::FloatCM, "G12UPYTH", "GIRDER12_UPPERPLATE_YTHICK "}, - {VarDesc::FloatCM, "G12RPYDI", "GIRDER12_REINFORCEMENTPLATE_YDIST "}, - {VarDesc::FloatCM, "G12UMPYH", "GIRDER12_UPPERMINIPLATE_YHEIGHT "}, - {VarDesc::FloatCM, "G12UPZLE", "GIRDER12_UPPERPLATE_ZLENGTH "}, - {VarDesc::FloatCM, "G12UMPZL", "GIRDER12_UPPERMINIPLATE_ZLENGTH "}, - {VarDesc::FloatCM, "G12BPZLE", "GIRDER12_BOTTOMPLATE_ZLENGTH "}, - {VarDesc::FloatCM, "G12LPZLE", "GIRDER12_LATERALPLATE_ZLENGTH "}, - {VarDesc::FloatCM, "G12RPZLE", "GIRDER12_REINFORCEMENTPLATE_ZLENGTH "}, - {VarDesc::FloatCM, "G12SMPZL", "GIRDER12_SIDEMINIPLATE_ZLENGTH "}, - {VarDesc::FloatCM, "G23LPXWT", "GIRDER23_LATERALPLATE_XWIDTH_TOTAL "}, - {VarDesc::FloatCM, "G23IPSXO", "GIRDER23_INNERPLATESMALLOFFSET_XDIST "}, - {VarDesc::FloatCM, "G23IPSLX", "GIRDER23_INNERPLATESMALL2LARGE_XDIST "}, - {VarDesc::FloatCM, "G23IPLLX", "GIRDER23_INNERPLATELARGE2LARGE_XDIST "}, - {VarDesc::FloatCM, "G23IPLSX", "GIRDER23_INNERPLATELARGE2SMALL_XDIST "}, - {VarDesc::FloatCM, "G23RPXWI", "GIRDER23_REINFORCEMENTPLATE_XWIDTH "}, - {VarDesc::FloatCM, "G23LPXW1", "GIRDER23_LATERALPLATE_XWIDTH_INTER1 "}, - {VarDesc::FloatCM, "G23LPX12", "GIRDER23_LATERALPLATE_XWIDTH_INTER1INTER"}, - {VarDesc::FloatCM, "G23IPXWI", "GIRDER23_INNERPLATE_XWIDTH "}, - {VarDesc::FloatCM, "G23UMPWI", "GIRDER23_UPPERMINIPLATE_XWIDTH "}, - {VarDesc::FloatCM, "G23SMPWI", "GIRDER23_SIDEMINIPLATE_XWIDTH "}, - {VarDesc::FloatCM, "G34LPXWT", "GIRDER34_LATERALPLATE_XWIDTH_TOTAL "}, - {VarDesc::FloatCM, "G34IPSXO", "GIRDER34_INNERPLATESMALLOFFSET_XDIST "}, - {VarDesc::FloatCM, "G34IPSLX", "GIRDER34_INNERPLATESMALL2LARGE_XDIST "}, - {VarDesc::FloatCM, "G34IPLLX", "GIRDER34_INNERPLATELARGE2LARGE_XDIST "}, - {VarDesc::FloatCM, "G34IPLSX", "GIRDER34_INNERPLATELARGE2SMALL_XDIST "}, - {VarDesc::FloatCM, "G34RPXWI", "GIRDER34_REINFORCEMENTPLATE_XWIDTH "}, - {VarDesc::FloatCM, "G34LPXW1", "GIRDER34_LATERALPLATE_XWIDTH_INTER1 "}, - {VarDesc::FloatCM, "G34LPX12", "GIRDER34_LATERALPLATE_XWIDTH_INTER1INTER"}, - {VarDesc::FloatCM, "G34IPXWI", "GIRDER34_INNERPLATE_XWIDTH "}, - {VarDesc::FloatCM, "G34UMPWI", "GIRDER34_UPPERMINIPLATE_XWIDTH "}, - {VarDesc::FloatCM, "G34SMPWI", "GIRDER34_SIDEMINIPLATE_XWIDTH "}, - {VarDesc::FloatCM, "EXMPHEIG", "EXTREMITYMAINPLATE_HEIGHT "}, - {VarDesc::FloatCM, "EXMPRCRA", "EXTREMITYMAINPLATEROUNDCUT_R "}, - {VarDesc::FloatCM, "EXMPRCDX", "EXTREMITYMAINPLATEROUNDCUT_DX "}, - {VarDesc::FloatCM, "EXMPRCYP", "EXTREMITYMAINPLATEROUNDCUT_Y "}, - {VarDesc::FloatCM, "EXMCPYHE", "EXTREMITYMINICONNPLATE_YHEIGHT "}, - {VarDesc::FloatCM, "EXMCPZLE", "EXTREMITYMINICONNPLATE_ZLENGTH "}, - {VarDesc::FloatCM, "EXGPZLEN", "EXTREMITYGROUNDPLATE_ZLENGTH "}, - {VarDesc::FloatCM, "EXSCPZLE", "EXTREMITYSLANTEDCONNPLATE_ZLENGTH "}, - {VarDesc::FloatCM, "EXRSZOFF", "EXTREMITYRAILSUPPORT_ZOFFSET "}, - {VarDesc::FloatCM, "EXMPHEI1", "EXTREMITYMAINPLATE_HEIGHT_INTERMEDIATE1 "}, - {VarDesc::FloatCM, "EXMPHEI2", "EXTREMITYMAINPLATE_HEIGHT_INTERMEDIATE2 "}, - {VarDesc::FloatCM, "EXMPXWID", "EXTREMITYMAINPLATE_XWIDTH "}, - {VarDesc::FloatCM, "EXMPXWI1", "EXTREMITYMAINPLATE_XWIDTH_INTER1 "}, - {VarDesc::FloatCM, "EXMPXWI2", "EXTREMITYMAINPLATE_XWIDTH_INTER2 "}, - {VarDesc::FloatCM, "EXMPYHI1", "EXTREMITYMAINPLATE_YHEIGHT_INTER1 "}, - {VarDesc::FloatCM, "EXMPYHI2", "EXTREMITYMAINPLATE_YHEIGHT_INTER2 "}, - {VarDesc::FloatCM, "EXMPYHI3", "EXTREMITYMAINPLATE_YHEIGHT_INTER3 "}, - {VarDesc::FloatCM, "EXMPYHI4", "EXTREMITYMAINPLATE_YHEIGHT_INTER4 "}, - {VarDesc::FloatCM, "EXMPXDI1", "EXTREMITYMAINPLATE_XDIST_INTER1 "}, - {VarDesc::FloatCM, "EXMPXDI2", "EXTREMITYMAINPLATE_XDIST_INTER2 "}, - {VarDesc::FloatCM, "EXMPYDI2", "EXTREMITYMAINPLATE_YDIST_INTER1 "}, - {VarDesc::FloatCM, "EXVCPLDX", "EXTREMITYVERTICALCONNPLATE_DX "}, - {VarDesc::FloatCM, "EXVCPLDY", "EXTREMITYVERTICALCONNPLATE_DY "}, - {VarDesc::FloatCM, "EXMPZSEP", "EXTREMITYMAINPLATE_ZSEP "}, - {VarDesc::FloatCM, "EXSPRCRA", "EXTREMITYSLANTEDCONNPLATEROUNDCUT_RADIUS"}, - {VarDesc::FloatCM, "EXSPRCOF", "EXTREMITYSLANTEDCONNPLATEROUNDCUT_OFFSET"}, - {VarDesc::FloatCM, "EXVCPTHI", "EXTREMITYVERTICALCONNPLATE_THICKNESS "}, - {VarDesc::FloatCM, "EXVCPXEX", "EXTREMITYVERTICALCONNPLATE_XEXT "}, - {VarDesc::FloatCM, "EXVCPHEI", "EXTREMITYVERTICALCONNPLATE_HEIGHT "}, - {VarDesc::FloatCM, "EXVCPYCU", "EXTREMITYVERTICALCONNPLATE_CUTY "}, - {VarDesc::FloatCM, "EXVCPXCU", "EXTREMITYVERTICALCONNPLATE_CUTX "}, - {VarDesc::FloatCM, "EXCFVXWI", "EXTREMITYCONNFEETVOUSS_XWIDTH "}, - {VarDesc::FloatCM, "EXCFVYHE", "EXTREMITYCONNFEETVOUSS_YHEIGHT "}, - {VarDesc::FloatCM, "EXCFVZLE", "EXTREMITYCONNFEETVOUSS_ZLENGTH "}, - {VarDesc::FloatCM, "EXRSUZLE", "EXTREMITYRAILSUPPORTUPPER_ZLENGTH "}, - {VarDesc::FloatCM, "EXRSLDZL", "EXTREMITYRAILSUPPORTLOWER_DZLENGTH "}, - {VarDesc::FloatCM, "EXRSTYHE", "EXTREMITYRAILSUPPORTTOTAL_YHEIGHT "}, - {VarDesc::FloatCM, "EXRSLYHE", "EXTREMITYRAILSUPPORTLOWER_YHEIGHT "}, - {VarDesc::FloatCM, "EXRSEYHE", "EXTREMITYRAILSUPPORTEXTR_YHEIGHT "}, - {VarDesc::FloatCM, "EXRSCYHE", "EXTREMITYRAILSUPPORTCENTRAL_YHEIGHT "}, - {VarDesc::FloatCM, "EXRSCZLE", "EXTREMITYRAILSUPPORTCENTRAL_ZLENGTH "}, - {VarDesc::FloatCM, "EXRSMZLE", "EXTREMITYRAILSUPPORTMIDDLE_ZLENGTH "}, - {VarDesc::FloatCM, "EXRSCXWI", "EXTREMITYRAILSUPPORTCENTRAL_XWIDTH "}, - {VarDesc::FloatCM, "EXRSMXWI", "EXTREMITYRAILSUPPORTMIDDLE_XWIDTH "}, - {VarDesc::FloatCM, "EXRSVXWI", "EXTREMITYRAILSUPPORTVERTICAL_XWIDTH "}, - {VarDesc::FloatCM, "EXRSVZI1", "EXTREMITYRAILSUPPORTVERTICAL_ZPOS_INTER1"}, - {VarDesc::FloatCM, "EXRSEZLE", "EXTREMITYRAILSUPPORTEXTR_ZLENGTH "}, - {VarDesc::FloatCM, "EXRSEZOF", "EXTREMITYRAILSUPPORTEXTR_ZOFFSET "}, - {VarDesc::FloatCM, "EXRSC1DE", "EXTREMITYRAILSUPPORTCUT1_DEPTH "}, - {VarDesc::FloatCM, "EXRSC1WI", "EXTREMITYRAILSUPPORTCUT1_WIDTH "}, - {VarDesc::FloatCM, "EXRSC1XE", "EXTREMITYRAILSUPPORTCUT1_DUMXEXT "}, - {VarDesc::FloatCM, "EXRSC2XE", "EXTREMITYRAILSUPPORTCUT2_DUMXEXT "}, - {VarDesc::FloatCM, "EXRSC2Z1", "EXTREMITYRAILSUPPORTCUT1_ZOFFSET1 "}, - {VarDesc::FloatCM, "EXRSC2Z2", "EXTREMITYRAILSUPPORTCUT1_ZOFFSET2 "}, - {VarDesc::FloatCM, "EXRSMCDE", "EXTREMITYRAILSUPPORTMIDDLECUT_DEPTH "}, - {VarDesc::FloatCM, "EXRSMCWI", "EXTREMITYRAILSUPPORTMIDDLECUT_WIDTH "}, - {VarDesc::FloatCM, "EXRSMCZO", "EXTREMITYRAILSUPPORTMIDDLECUT_ZOFFSET "}, - {VarDesc::FloatCM, "EXRSMCY1", "EXTREMITYRAILSUPPORTMIDDLECUT_DUMY1 "}, - {VarDesc::FloatCM, "EXRSMCY2", "EXTREMITYRAILSUPPORTMIDDLECUT_DUMY2 "}, - {VarDesc::FloatCM, "STDFOOXP", "STANDARDFOOT_XPOS "}, - {VarDesc::FloatCM, "STDFOOYP", "STANDARDFOOT_YPOS "}, - {VarDesc::FloatCM, "ZPOSFEE1", "ZPOSFEE1 "}, - {VarDesc::FloatCM, "ZPOSFEE2", "ZPOSFEE2 "}, - {VarDesc::FloatCM, "ZPOSFEE3", "ZPOSFEE3 "}, - {VarDesc::FloatCM, "ZPOSFEE4", "ZPOSFEE4 "}, - {VarDesc::FloatCM, "ZPOSFEE5", "ZPOSFEE5 "}, - {VarDesc::FloatCM, "GIRDYHEI", "YHEIGHTGIRDER "}, - {VarDesc::FloatCM, "GIRDXPOS", "XPOSGIRDER "}, - {VarDesc::FloatCM, "MPLAHCEC", "FEETMAINPLATE_HCEC "}, - {VarDesc::FloatCM, "DUMZ", "DUMZ "}, - {VarDesc::FloatCM, "DUMPHI", "DUMPHI "}, - {VarDesc::FloatCM, "MAINPLXA", "MAINPLXA "}, - {VarDesc::FloatCM, "MAINPLYA", "MAINPLYA "}, - {VarDesc::FloatCM, "MAINPLXB", "MAINPLXB "}, - {VarDesc::FloatCM, "MAINPLYB", "MAINPLYB "}, - {VarDesc::FloatCM, "MAINPLXC", "MAINPLXC "}, - {VarDesc::FloatCM, "MAINPLYC", "MAINPLYC "}, - {VarDesc::FloatCM, "MAPLRCXC", "MAINPLATEROUNDCUT_XC "}, - {VarDesc::FloatCM, "MAPLRCYC", "MAINPLATEROUNDCUT_YC "}, - {VarDesc::FloatCM, "MAIPLXC3", "MAIPLXC3 "}, - {VarDesc::FloatCM, "MAIPLYC3", "MAIPLYC3 "}, - {VarDesc::FloatCM, "MPLXEXTR", "FEETMAINPLATE_XEXTR "}, - {VarDesc::FloatCM, "MPLYEXTR", "FEETMAINPLATE_YEXTR "}, - {VarDesc::FloatCM, "MPLREXTR", "FEETMAINPLATE_REXTR "}, - {VarDesc::FloatCM, "MAIPLXC2", "MAIPLXC2 "}, - {VarDesc::FloatCM, "MAIPLYC2", "MAIPLYC2 "}, - {VarDesc::FloatCM, "MPLXCEC1", "MPLXCEC1 "}, - {VarDesc::FloatCM, "MPLYCEC1", "MPLYCEC1 "}, - {VarDesc::FloatCM, "MPLXCEC2", "MPLXCEC2 "}, - {VarDesc::FloatCM, "MPLYCEC2", "MPLYCEC2 "}, - {VarDesc::FloatCM, "A", "A "}, - {VarDesc::FloatCM, "B", "B "}, - {VarDesc::FloatCM, "APRIME", "APRIME "}, - {VarDesc::FloatCM, "BPRIME", "BPRIME "}, - {VarDesc::FloatCM, "ASECONDE", "ASECONDE "}, - {VarDesc::FloatCM, "BSECONDE", "BSECONDE "}, - {VarDesc::FloatCM, "MAINPLXD", "MAINPLXD "}, - {VarDesc::FloatCM, "MAINPLYD", "MAINPLYD "}, - {VarDesc::FloatCM, "MAINPLXE", "MAINPLXE "}, - {VarDesc::FloatCM, "MAINPLYE", "MAINPLYE "}, - {VarDesc::FloatCM, "MAIPLXC1", "MAIPLXC1 "}, - {VarDesc::FloatCM, "MAIPLYC1", "MAIPLYC1 "}, - {VarDesc::FloatCM, "MAINPLXF", "MAINPLXF "}, - {VarDesc::FloatCM, "MAINPLYF", "MAINPLYF "}, - {VarDesc::FloatCM, "MAINPLXG", "MAINPLXG "}, - {VarDesc::FloatCM, "MAINPLYG", "MAINPLYG "}, - {VarDesc::FloatCM, "MAINPLXH", "MAINPLXH "}, - {VarDesc::FloatCM, "MAINPLYH", "MAINPLYH "}, - {VarDesc::FloatCM, "MAINPLXI", "MAINPLXI "}, - {VarDesc::FloatCM, "MAINPLYI", "MAINPLYI "}, - {VarDesc::FloatCM, "MAINPLXJ", "MAINPLXJ "}, - {VarDesc::FloatCM, "MAINPLYJ", "MAINPLYJ "}, - {VarDesc::FloatCM, "ALPHA1", "ALPHA1 "}, - {VarDesc::FloatCM, "COAL1", "COAL1 "}, - {VarDesc::FloatCM, "SIAL1", "SIAL1 "}, - {VarDesc::FloatCM, "MICPDIAG", "MINICONNPLATE_DIAG "}, - {VarDesc::FloatCM, "MICPXPOS", "MINICONNPLATE_X "}, - {VarDesc::FloatCM, "MICPYPOS", "MINICONNPLATE_Y "}, - {VarDesc::FloatCM, "ALPHA2", "ALPHA2 "}, - {VarDesc::FloatCM, "COAL2", "COAL2 "}, - {VarDesc::FloatCM, "SIAL2", "SIAL2 "}, - {VarDesc::FloatCM, "SLCPDIAG", "SLANTEDCONNPLATE_DIAG "}, - {VarDesc::FloatCM, "SLCPXPOS", "SLANTEDCONNPLATE_X "}, - {VarDesc::FloatCM, "SLCPYPOS", "SLANTEDCONNPLATE_Y "}, - {VarDesc::FloatCM, "GRNPXWID", "GROUNDPLATE_XWIDTH "}, - {VarDesc::FloatCM, "GRNPYHEI", "GROUNDPLATE_YHEIGHT "}, - {VarDesc::FloatCM, "GRNPXPOS", "GROUNDPLATE_X "}, - {VarDesc::FloatCM, "GRNPYPOS", "GROUNDPLATE_Y "}, - {VarDesc::FloatCM, "VECPXPOS", "VERTICALCONNPLATE_X "}, - {VarDesc::FloatCM, "VECPYPOS", "VERTICALCONNPLATE_Y "}, - {VarDesc::FloatCM, "VECPZLEN", "VERTICALCONNPLATE_ZLENGTH "}, - {VarDesc::FloatCM, "UPCPXPOS", "UPPERCONNPLATE_X "}, - {VarDesc::FloatCM, "UPCPYPOS", "UPPERCONNPLATE_Y "}, - {VarDesc::FloatCM, "UPCPZLEN", "UPPERCONNPLATE_ZLENGTH "}, - {VarDesc::FloatCM, "MIDYPOSI", "RAILSUPPORTMIDDLE_Y "}, - {VarDesc::FloatCM, "POSX", "POSX "}, - {VarDesc::FloatCM, "POSY", "POSY "}, - {VarDesc::FloatCM, "CNFEVOXP", "CONNFEETVOUSS_X "}, - {VarDesc::FloatCM, "CNFEVOYP", "CONNFEETVOUSS_Y "}, - {VarDesc::FloatCM, "G12BOPXA", "GIRDER12_BOTTOMPLATE_XA "}, - {VarDesc::FloatCM, "G12BOPXB", "GIRDER12_BOTTOMPLATE_XB "}, - {VarDesc::FloatCM, "G12BOPXC", "GIRDER12_BOTTOMPLATE_XC "}, - {VarDesc::FloatCM, "G12BOPXD", "GIRDER12_BOTTOMPLATE_XD "}, - {VarDesc::FloatCM, "G12BOPXE", "GIRDER12_BOTTOMPLATE_XE "}, - {VarDesc::FloatCM, "G12BOPXF", "GIRDER12_BOTTOMPLATE_XF "}, - {VarDesc::FloatCM, "G12BOPYA", "GIRDER12_BOTTOMPLATE_YA "}, - {VarDesc::FloatCM, "G12BOPYB", "GIRDER12_BOTTOMPLATE_YB "}, - {VarDesc::FloatCM, "G12BOPYC", "GIRDER12_BOTTOMPLATE_YC "}, - {VarDesc::FloatCM, "G12BOPYD", "GIRDER12_BOTTOMPLATE_YD "}, - {VarDesc::FloatCM, "G12BOPYE", "GIRDER12_BOTTOMPLATE_YE "}, - {VarDesc::FloatCM, "G12BOPYF", "GIRDER12_BOTTOMPLATE_YF "}, - {VarDesc::FloatCM, "G12IPZLE", "GIRDER12_INNERPLATE_ZLENGTH "}, - {VarDesc::FloatCM, "G12IPLYH", "GIRDER12_INNERPLATELARGE_YHEIGHT "}, - {VarDesc::FloatCM, "G12IPLYP", "GIRDER12_INNERPLATELARGE_YPOS "}, - {VarDesc::FloatCM, "G12IPSYH", "GIRDER12_INNERPLATESMALL_YHEIGHT "}, - {VarDesc::FloatCM, "G12IPSYP", "GIRDER12_INNERPLATESMALL_YPOS "}, - {VarDesc::FloatCM, "G12IPSX1", "GIRDER12_INNERPLATESMALL1_XPOS "}, - {VarDesc::FloatCM, "G12IPLX1", "GIRDER12_INNERPLATELARGE1_XPOS "}, - {VarDesc::FloatCM, "G12IPLX2", "GIRDER12_INNERPLATELARGE2_XPOS "}, - {VarDesc::FloatCM, "G12IPSX2", "GIRDER12_INNERPLATESMALL2_XPOS "}, - {VarDesc::FloatCM, "G12UPXWI", "GIRDER12_UPPERPLATE_XWIDTH "}, - {VarDesc::FloatCM, "G12UPYHE", "GIRDER12_UPPERPLATE_YHEIGHT "}, - {VarDesc::FloatCM, "G12UPYPO", "GIRDER12_UPPERPLATE_YPOS "}, - {VarDesc::FloatCM, "G12REPXA", "GIRDER12_REINFORCEMENTPLATE_XA "}, - {VarDesc::FloatCM, "G12REPXB", "GIRDER12_REINFORCEMENTPLATE_XB "}, - {VarDesc::FloatCM, "G12REPXC", "GIRDER12_REINFORCEMENTPLATE_XC "}, - {VarDesc::FloatCM, "G12REPXD", "GIRDER12_REINFORCEMENTPLATE_XD "}, - {VarDesc::FloatCM, "G12REPYA", "GIRDER12_REINFORCEMENTPLATE_YA "}, - {VarDesc::FloatCM, "G12REPYB", "GIRDER12_REINFORCEMENTPLATE_YB "}, - {VarDesc::FloatCM, "G12REPYC", "GIRDER12_REINFORCEMENTPLATE_YC "}, - {VarDesc::FloatCM, "G12REPYD", "GIRDER12_REINFORCEMENTPLATE_YD "}, - {VarDesc::FloatCM, "G12REPZP", "GIRDER12_REINFORCEMENTPLATE_ZPOS "}, - {VarDesc::FloatCM, "G12UMPYP", "GIRDER12_UPPERMINIPLATE_YPOS "}, - {VarDesc::FloatCM, "G12UMPXP", "GIRDER12_UPPERMINIPLATE_XPOS "}, - {VarDesc::FloatCM, "G12SMPYH", "GIRDER12_SIDEMINIPLATE_YHEIGHT "}, - {VarDesc::FloatCM, "G12SMPYP", "GIRDER12_SIDEMINIPLATE_YPOS "}, - {VarDesc::FloatCM, "G12SMPXP", "GIRDER12_SIDEMINIPLATE_XPOS "}, - {VarDesc::FloatCM, "G12SMPZP", "GIRDER12_SIDEMINIPLATE_ZPOS "}, - {VarDesc::FloatCM, "G23BOPXA", "GIRDER23_BOTTOMPLATE_XA "}, - {VarDesc::FloatCM, "G23BOPXB", "GIRDER23_BOTTOMPLATE_XB "}, - {VarDesc::FloatCM, "G23BOPXC", "GIRDER23_BOTTOMPLATE_XC "}, - {VarDesc::FloatCM, "G23BOPXD", "GIRDER23_BOTTOMPLATE_XD "}, - {VarDesc::FloatCM, "G23BOPXE", "GIRDER23_BOTTOMPLATE_XE "}, - {VarDesc::FloatCM, "G23BOPXF", "GIRDER23_BOTTOMPLATE_XF "}, - {VarDesc::FloatCM, "G23IPSX1", "GIRDER23_INNERPLATESMALL1_XPOS "}, - {VarDesc::FloatCM, "G23IPLX1", "GIRDER23_INNERPLATELARGE1_XPOS "}, - {VarDesc::FloatCM, "G23IPLX2", "GIRDER23_INNERPLATELARGE2_XPOS "}, - {VarDesc::FloatCM, "G23IPSX2", "GIRDER23_INNERPLATESMALL2_XPOS "}, - {VarDesc::FloatCM, "G23UPXWI", "GIRDER23_UPPERPLATE_XWIDTH "}, - {VarDesc::FloatCM, "G23UPYHE", "GIRDER23_UPPERPLATE_YHEIGHT "}, - {VarDesc::FloatCM, "G23REPXA", "GIRDER23_REINFORCEMENTPLATE_XA "}, - {VarDesc::FloatCM, "G23REPXB", "GIRDER23_REINFORCEMENTPLATE_XB "}, - {VarDesc::FloatCM, "G23REPXC", "GIRDER23_REINFORCEMENTPLATE_XC "}, - {VarDesc::FloatCM, "G23REPXD", "GIRDER23_REINFORCEMENTPLATE_XD "}, - {VarDesc::FloatCM, "G23REPYA", "GIRDER23_REINFORCEMENTPLATE_YA "}, - {VarDesc::FloatCM, "G23REPYB", "GIRDER23_REINFORCEMENTPLATE_YB "}, - {VarDesc::FloatCM, "G23REPYC", "GIRDER23_REINFORCEMENTPLATE_YC "}, - {VarDesc::FloatCM, "G23REPYD", "GIRDER23_REINFORCEMENTPLATE_YD "}, - {VarDesc::FloatCM, "G23UMPXP", "GIRDER23_UPPERMINIPLATE_XPOS "}, - {VarDesc::FloatCM, "G23SMPXP", "GIRDER23_SIDEMINIPLATE_XPOS "}, - {VarDesc::FloatCM, "G34BOPXA", "GIRDER34_BOTTOMPLATE_XA "}, - {VarDesc::FloatCM, "G34BOPXB", "GIRDER34_BOTTOMPLATE_XB "}, - {VarDesc::FloatCM, "G34BOPXC", "GIRDER34_BOTTOMPLATE_XC "}, - {VarDesc::FloatCM, "G34BOPXD", "GIRDER34_BOTTOMPLATE_XD "}, - {VarDesc::FloatCM, "G34BOPXE", "GIRDER34_BOTTOMPLATE_XE "}, - {VarDesc::FloatCM, "G34BOPXF", "GIRDER34_BOTTOMPLATE_XF "}, - {VarDesc::FloatCM, "G34IPSX1", "GIRDER34_INNERPLATESMALL1_XPOS "}, - {VarDesc::FloatCM, "G34IPLX1", "GIRDER34_INNERPLATELARGE1_XPOS "}, - {VarDesc::FloatCM, "G34IPLX2", "GIRDER34_INNERPLATELARGE2_XPOS "}, - {VarDesc::FloatCM, "G34IPSX2", "GIRDER34_INNERPLATESMALL2_XPOS "}, - {VarDesc::FloatCM, "G34UPXWI", "GIRDER34_UPPERPLATE_XWIDTH "}, - {VarDesc::FloatCM, "G34UPYHE", "GIRDER34_UPPERPLATE_YHEIGHT "}, - {VarDesc::FloatCM, "G34REPXA", "GIRDER34_REINFORCEMENTPLATE_XA "}, - {VarDesc::FloatCM, "G34REPXB", "GIRDER34_REINFORCEMENTPLATE_XB "}, - {VarDesc::FloatCM, "G34REPXC", "GIRDER34_REINFORCEMENTPLATE_XC "}, - {VarDesc::FloatCM, "G34REPXD", "GIRDER34_REINFORCEMENTPLATE_XD "}, - {VarDesc::FloatCM, "G34REPYA", "GIRDER34_REINFORCEMENTPLATE_YA "}, - {VarDesc::FloatCM, "G34REPYB", "GIRDER34_REINFORCEMENTPLATE_YB "}, - {VarDesc::FloatCM, "G34REPYC", "GIRDER34_REINFORCEMENTPLATE_YC "}, - {VarDesc::FloatCM, "G34REPYD", "GIRDER34_REINFORCEMENTPLATE_YD "}, - {VarDesc::FloatCM, "G34UMPXP", "GIRDER34_UPPERMINIPLATE_XPOS "}, - {VarDesc::FloatCM, "G34SMPXP", "GIRDER34_SIDEMINIPLATE_XPOS "}, - {VarDesc::FloatCM, "STDFVOYP", "STANDARDFOOTVOUSSOIR_YPOS "}, - {VarDesc::FloatCM, "EXMPRCXC", "EXTREMITYMAINPLATEROUNDCUT_XC "}, - {VarDesc::FloatCM, "EXMPRCYC", "EXTREMITYMAINPLATEROUNDCUT_YC "}, - {VarDesc::FloatCM, "EXMPLXC3", "EXTREMITYMAINPLATE_XC3 "}, - {VarDesc::FloatCM, "EXMPLYC3", "EXTREMITYMAINPLATE_YC3 "}, - {VarDesc::FloatCM, "EXMPLXC4", "EXTREMITYMAINPLATE_XC4 "}, - {VarDesc::FloatCM, "EXMPLYC4", "EXTREMITYMAINPLATE_YC4 "}, - {VarDesc::FloatCM, "EXMPLXC5", "EXTREMITYMAINPLATE_XC5 "}, - {VarDesc::FloatCM, "EXMPLYC5", "EXTREMITYMAINPLATE_YC5 "}, - {VarDesc::FloatCM, "A2", "A2 "}, - {VarDesc::FloatCM, "B2", "B2 "}, - {VarDesc::FloatCM, "A2PRIME", "A2PRIME "}, - {VarDesc::FloatCM, "B2PRIME", "B2PRIME "}, - {VarDesc::FloatCM, "EXMPLAXD", "EXTREMITYMAINPLATE_XD "}, - {VarDesc::FloatCM, "EXMPLAYD", "EXTREMITYMAINPLATE_YD "}, - {VarDesc::FloatCM, "EXMPC2C1", "EXTREMITYMAINPLATE_LENGTHC2C1 "}, - {VarDesc::FloatCM, "EXMPLXC1", "EXTREMITYMAINPLATE_XC1 "}, - {VarDesc::FloatCM, "EXMPLYC1", "EXTREMITYMAINPLATE_YC1 "}, - {VarDesc::FloatCM, "EXMPYC1A", "EXTREMITYMAINPLATE_YC1A "}, - {VarDesc::FloatCM, "EXMPXC1A", "EXTREMITYMAINPLATE_XC1A "}, - {VarDesc::FloatCM, "EXMPXC1B", "EXTREMITYMAINPLATE_XC1B "}, - {VarDesc::FloatCM, "EXMPYC1B", "EXTREMITYMAINPLATE_YC1B "}, - {VarDesc::FloatCM, "ALPHA3", "ALPHA3 "}, - {VarDesc::FloatCM, "COAL3", "COAL3 "}, - {VarDesc::FloatCM, "SIAL3", "SIAL3 "}, - {VarDesc::FloatCM, "EXMCPDIA", "EXTREMITYMINICONNPLATE_DIAG "}, - {VarDesc::FloatCM, "EXMCPXPO", "EXTREMITYMINICONNPLATE_X "}, - {VarDesc::FloatCM, "EXMCPYPO", "EXTREMITYMINICONNPLATE_Y "}, - {VarDesc::FloatCM, "EXMPLAXF", "EXTREMITYMAINPLATE_XF "}, - {VarDesc::FloatCM, "EXMPLAYF", "EXTREMITYMAINPLATE_YF "}, - {VarDesc::FloatCM, "EXMPLXF1", "EXTREMITYMAINPLATE_XF1 "}, - {VarDesc::FloatCM, "EXMPLYF1", "EXTREMITYMAINPLATE_YF1 "}, - {VarDesc::FloatCM, "EXMPLXF2", "EXTREMITYMAINPLATE_XF2 "}, - {VarDesc::FloatCM, "EXMPLYF2", "EXTREMITYMAINPLATE_YF2 "}, - {VarDesc::FloatCM, "EXMPLYF3", "EXTREMITYMAINPLATE_YF3 "}, - {VarDesc::FloatCM, "EXMPLXF3", "EXTREMITYMAINPLATE_XF3 "}, - {VarDesc::FloatCM, "EXMPLXF4", "EXTREMITYMAINPLATE_XF4 "}, - {VarDesc::FloatCM, "EXMPLYF4", "EXTREMITYMAINPLATE_YF4 "}, - {VarDesc::FloatCM, "EXMPLXF5", "EXTREMITYMAINPLATE_XF5 "}, - {VarDesc::FloatCM, "EXMPLYF5", "EXTREMITYMAINPLATE_YF5 "}, - {VarDesc::FloatCM, "EXMPLXF6", "EXTREMITYMAINPLATE_XF6 "}, - {VarDesc::FloatCM, "EXMPLYF6", "EXTREMITYMAINPLATE_YF6 "}, - {VarDesc::FloatCM, "EXMPLXF7", "EXTREMITYMAINPLATE_XF7 "}, - {VarDesc::FloatCM, "EXMPLYF7", "EXTREMITYMAINPLATE_YF7 "}, - {VarDesc::FloatCM, "EXMPLAXI", "EXTREMITYMAINPLATE_XI "}, - {VarDesc::FloatCM, "EXMPLAXH", "EXTREMITYMAINPLATE_XH "}, - {VarDesc::FloatCM, "EXMPLAYH", "EXTREMITYMAINPLATE_YH "}, - {VarDesc::FloatCM, "EXUCPXPO", "EXTREMITYUPPERCONNPLATE_X "}, - {VarDesc::FloatCM, "EXUCPZLE", "EXTREMITYUPPERCONNPLATE_ZLENGTH "}, - {VarDesc::FloatCM, "EXVCPZLE", "EXTREMITYVERTICALCONNPLATE_ZLENGTH "}, - {VarDesc::FloatCM, "EXVCPLXA", "EXTREMITYVERTICALCONNPLATE_XA "}, - {VarDesc::FloatCM, "EXVCPLYA", "EXTREMITYVERTICALCONNPLATE_YA "}, - {VarDesc::FloatCM, "EXVCPLXB", "EXTREMITYVERTICALCONNPLATE_XB "}, - {VarDesc::FloatCM, "EXVCPLYB", "EXTREMITYVERTICALCONNPLATE_YB "}, - {VarDesc::FloatCM, "EXVCPLXC", "EXTREMITYVERTICALCONNPLATE_XC "}, - {VarDesc::FloatCM, "EXVCPLYC", "EXTREMITYVERTICALCONNPLATE_YC "}, - {VarDesc::FloatCM, "EXVCPLXD", "EXTREMITYVERTICALCONNPLATE_XD "}, - {VarDesc::FloatCM, "EXVCPLYD", "EXTREMITYVERTICALCONNPLATE_YD "}, - {VarDesc::FloatCM, "EXVCPLXE", "EXTREMITYVERTICALCONNPLATE_XE "}, - {VarDesc::FloatCM, "EXVCPLYE", "EXTREMITYVERTICALCONNPLATE_YE "}, - {VarDesc::FloatCM, "EXVCPLXF", "EXTREMITYVERTICALCONNPLATE_XF "}, - {VarDesc::FloatCM, "EXVCPLYF", "EXTREMITYVERTICALCONNPLATE_YF "}, - {VarDesc::FloatCM, "EXVCPLXP", "EXTREMITYVERTICALCONNPLATE_XPOS "}, - {VarDesc::FloatCM, "EXVCPLYP", "EXTREMITYVERTICALCONNPLATE_YPOS "}, - {VarDesc::FloatCM, "EXVCPLAX", "EXTREMITYVERTICALCONNPLATE_X "}, - {VarDesc::FloatCM, "EXVCPLAY", "EXTREMITYVERTICALCONNPLATE_Y "}, - {VarDesc::FloatCM, "EXCNFEVX", "EXTREMITYCONNFEETVOUSS_X "}, - {VarDesc::FloatCM, "EXCNFEVY", "EXTREMITYCONNFEETVOUSS_Y "}, - {VarDesc::FloatCM, "EXRSLZLE", "EXTREMITYRAILSUPPORTLOWER_ZLENGTH "}, - {VarDesc::FloatCM, "EXRSVYHE", "EXTREMITYRAILSUPPORTVERTICAL_YHEIGHT "}, - {VarDesc::FloatCM, "EXRSMXPO", "EXTREMITYRAILSUPPORTMIDDLE_XPOS "}, - {VarDesc::FloatCM, "EXRSVXPO", "EXTREMITYRAILSUPPORTVERTICAL_XPOS "}, - {VarDesc::FloatCM, "EXRSEYPO", "EXTREMITYRAILSUPPORTEXTR_Y "}, - {VarDesc::FloatCM, "EXRSUYPO", "EXTREMITYRAILSUPPORTUPPER_Y "}, - {VarDesc::FloatCM, "EXRSLYPO", "EXTREMITYRAILSUPPORTLOWER_Y "}, - {VarDesc::FloatCM, "EXRSCYPO", "EXTREMITYRAILSUPPORTCENTRAL_Y "}, - {VarDesc::FloatCM, "EXRSVYPO", "EXTREMITYRAILSUPPORTVERTICAL_Y "}, - {VarDesc::FloatCM, "EXRSVZP1", "EXTREMITYRAILSUPPORTVERTICAL1_ZPOS "}, - {VarDesc::FloatCM, "EXRSVZP2", "EXTREMITYRAILSUPPORTVERTICAL2_ZPOS "}, - {VarDesc::FloatCM, "EXRSMZPO", "EXTREMITYRAILSUPPORTMIDDLE_ZPOS "}, - {VarDesc::FloatCM, "EXRSEZPO", "EXTREMITYRAILSUPPORTEXTR_ZPOS "}, - {VarDesc::FloatCM, "EXRSC1YE", "EXTREMITYRAILSUPPORTCUT1_YEXT "}, - {VarDesc::FloatCM, "EXRSC2YE", "EXTREMITYRAILSUPPORTCUT2_YEXT "}, - {VarDesc::FloatCM, "EXRSC1XP", "EXTREMITYRAILSUPPORTCUT1_XPOS "}, - {VarDesc::FloatCM, "EXRSC2XP", "EXTREMITYRAILSUPPORTCUT2_XPOS "}, - {VarDesc::FloatCM, "EXRSC1ZP", "EXTREMITYRAILSUPPORTCUT1_ZPOS "}, - {VarDesc::FloatCM, "EXRSC3XP", "EXTREMITYRAILSUPPORTCUT3_XPOS "}, - {VarDesc::FloatCM, "EXRSC3ZP", "EXTREMITYRAILSUPPORTCUT3_ZPOS "}, - {VarDesc::FloatCM, "EXRSC4Z1", "EXRSC4Z1 "}, - {VarDesc::FloatCM, "EXRSC4ZP", "EXTREMITYRAILSUPPORTCUT4_ZPOS "}, - {VarDesc::FloatCM, "EXRSMCXA", "EXTREMITYRAILSUPPORTMIDDLECUT_XA "}, - {VarDesc::FloatCM, "EXRSMCYA", "EXTREMITYRAILSUPPORTMIDDLECUT_YA "}, - {VarDesc::FloatCM, "EXRSMCXB", "EXTREMITYRAILSUPPORTMIDDLECUT_XB "}, - {VarDesc::FloatCM, "EXRSMCYB", "EXTREMITYRAILSUPPORTMIDDLECUT_YB "}, - {VarDesc::FloatCM, "EXRSMCXC", "EXTREMITYRAILSUPPORTMIDDLECUT_XC "}, - {VarDesc::FloatCM, "EXRSMCYC", "EXTREMITYRAILSUPPORTMIDDLECUT_YC "}, - {VarDesc::FloatCM, "EXRSMCXP", "EXTREMITYRAILSUPPORTMIDDLE_CUT_XPOS "}, - {VarDesc::FloatCM, "EXRSMCZ1", "EXRSMCZ1 "}, - {VarDesc::FloatCM, "EXRSMCZP", "EXTREMITYRAILSUPPORTMIDDLE_CUT_ZPOS "}, - {VarDesc::FloatCM, "EXRSPOSX", "EXTREMITYRAILSUPPORT_X "}, - {VarDesc::FloatCM, "EXRSPOSY", "EXTREMITYRAILSUPPORT_Y "}, - {VarDesc::FloatCM, "EXRSPOSZ", "EXTREMITYRAILSUPPORT_Z "}, - {VarDesc::FloatCM, "EXRSPXAP", "EXTREMITYRAILSUPPORT_ASSEMBLED_PLUS_X "}, - {VarDesc::FloatCM, "EXRSPXAM", "EXTREMITYRAILSUPPORT_ASSEMBLED_MINUS_X "}, - {VarDesc::FloatCM, "EXRSPYAS", "EXTREMITYRAILSUPPORT_ASSEMBLED_Y "}, - {VarDesc::FloatCM, "GIR12ZPO", "GIR12ZPO "}, - {VarDesc::FloatCM, "GIR12YPO", "GIR12YPO "}, - {VarDesc::FloatCM, "GIR23ZPO", "GIR23ZPO "}, - {VarDesc::FloatCM, "GIR34ZPO", "GIR34ZPO "}, - }; - - -VarDesc GENV_Vars[] = { - {VarDesc::FloatCM, "PI", "PI "}, - {VarDesc::FloatCM, "EPS", "EPS "}, - {VarDesc::FloatCM, "PIS180", "PIS180 "}, - {VarDesc::FloatCM, "SI5", "SI5 "}, - {VarDesc::FloatCM, "CO5", "CO5 "}, - {VarDesc::FloatCM, "TA15", "TA15 "}, - {VarDesc::FloatCM, "TA20", "TA20 "}, - {VarDesc::FloatCM, "SI225", "SI225 "}, - {VarDesc::FloatCM, "CO225", "CO225 "}, - {VarDesc::FloatCM, "TA225", "TA225 "}, - {VarDesc::FloatCM, "TA375", "TA375 "}, - {VarDesc::FloatCM, "SI45", "SI45 "}, - {VarDesc::FloatCM, "CO45", "CO45 "}, - {VarDesc::FloatCM, "TA45", "TA45 "}, - {VarDesc::FloatCM, "SI525", "SI525 "}, - {VarDesc::FloatCM, "CO525", "CO525 "}, - {VarDesc::FloatCM, "TA55", "TA55 "}, - {VarDesc::FloatCM, "SI675", "SI675 "}, - {VarDesc::FloatCM, "CO675", "CO675 "}, - {VarDesc::FloatCM, "TA675", "TA675 "}, - {VarDesc::FloatCM, "TA77", "TA77 "}, -}; - -VarDesc JDSH_Vars[] = { - {VarDesc::FloatCM, "XYZREFPT", "XYZREFERENCEPOINT "}, - {VarDesc::FloatCM, "ROTA180D", "180DEGROTATION "}, - {VarDesc::FloatCM, "NOMIZPOS", "NOMINAL_ZPOS "}, - {VarDesc::FloatCM, "FDINNRAD", "FRONTDISK_INNERRADIUS "}, - {VarDesc::FloatCM, "FDOUTRAD", "FRONTDISK_OUTERRADIUS "}, - {VarDesc::FloatCM, "FDTHICKN", "FRONTDISK_THICKNESS "}, - {VarDesc::FloatCM, "BDINNRAD", "BACKDISK_INNERRADIUS "}, - {VarDesc::FloatCM, "BDOUTRAD", "BACKDISK_OUTERRADIUS "}, - {VarDesc::FloatCM, "BDTHICKN", "BACKDISK_THICKNESS "}, - {VarDesc::FloatCM, "CABCINRA", "BRASSCONE_INNERRADIUS "}, - {VarDesc::FloatCM, "CABCOURA", "BRASSCONE_OUTERRADIUS "}, - {VarDesc::FloatCM, "CABCTHI1", "BRASSCONE_THICKNESS_INTER1"}, - {VarDesc::FloatCM, "CABCTHIC", "BRASSCONE_THICKNESS "}, - {VarDesc::FloatCM, "CABCSLAN", "BRASSCONE_SLOPEANGLE "}, - {VarDesc::FloatCM, "CABCSLLE", "BRASSCONE_SLOPELENGTH "}, - {VarDesc::FloatCM, "CALCTHIC", "LEADCONE_THICKNESS "}, - {VarDesc::FloatCM, "CALCLENG", "LEADCONE_LENGTH "}, - {VarDesc::FloatCM, "CALCWIDT", "LEADCONE_WIDTH "}, - {VarDesc::FloatCM, "CAPCTHIC", "POLYCONE_THICKNESS "}, - {VarDesc::FloatCM, "CAPCLENG", "POLYCONE_LENGTH "}, - {VarDesc::FloatCM, "CAPCWIDT", "POLYCONE_WIDTH "}, - {VarDesc::FloatCM, "CACOPRAN", "CONE_PROJECTIVEANGLE "}, - {VarDesc::FloatCM, "CACOANGZ_0", "ARRAY "}, - {VarDesc::FloatCM, "CACOANGZ_1", " "}, - {VarDesc::FloatCM, "CACOANGZ_2", " "}, - {VarDesc::FloatCM, "CACOANGZ_3", " "}, - {VarDesc::FloatCM, "CACOANGZ_4", " "}, - {VarDesc::FloatCM, "CACOANGZ_5", " "}, - {VarDesc::FloatCM, "CACOANGZ_6", " "}, - {VarDesc::FloatCM, "CACOANGZ_7", " "}, - {VarDesc::FloatCM, "CACOANGZ_8", " "}, - {VarDesc::FloatCM, "CACOANGZ_9", " "}, - {VarDesc::FloatCM, "CACOANGZ_10", " "}, - {VarDesc::FloatCM, "CACOANGZ_11", " "}, - {VarDesc::FloatCM, "CACOANGZ_12", " "}, - {VarDesc::FloatCM, "CACOANGZ_13", " "}, - {VarDesc::FloatCM, "CACOANGZ_14", " "}, - {VarDesc::FloatCM, "CACOANGZ_15", " "}, - {VarDesc::FloatCM, "CACOANGX", "CONEASSEMBLY_ANGX "}, - {VarDesc::FloatCM, "TUBEINRA", "TUBE_INNERRADIUS "}, - {VarDesc::FloatCM, "TUBEOUR1", "TUBE_OUTERRADIUS1 "}, - {VarDesc::FloatCM, "TUBEOUR2", "TUBE_OUTERRADIUS2 "}, - {VarDesc::FloatCM, "TUBESLEN", "TUBE_SHORTLENGTH "}, - {VarDesc::FloatCM, "TUBELENG", "TUBE_LENGTH "}, - {VarDesc::FloatCM, "PLUGINR1", "PLUG_INNERRADIUS1 "}, - {VarDesc::FloatCM, "PLUGOURA", "PLUG_OUTERRADIUS "}, - {VarDesc::FloatCM, "PLUGLENG", "PLUG_LENGTH "}, - {VarDesc::FloatCM, "PLUGTIAN", "PLUG_TILTANGLE "}, - {VarDesc::FloatCM, "SWHINNRA", "SMALLWHEELHUB_INNERRADIUS "}, - {VarDesc::FloatCM, "SWHOUTR1", "SMALLWHEELHUB_OUTERRADIUS1"}, - {VarDesc::FloatCM, "SWHOUTR2", "SMALLWHEELHUB_OUTERRADIUS2"}, - {VarDesc::FloatCM, "SWHLENGT", "SMALLWHEELHUB_LENGTH "}, - {VarDesc::FloatCM, "FDZPOSIT", "FRONTDISK_Z "}, - {VarDesc::FloatCM, "BDZPOSIT", "BACKDISK_Z "}, - {VarDesc::FloatCM, "CAZPOSIT", "CONEASSEMBLY_Z "}, - {VarDesc::FloatCM, "TUBEZPOS", "TUBE_Z "}, - {VarDesc::FloatCM, "PLUGZPOS", "PLUG_Z "}, - {VarDesc::FloatCM, "SWHZPOSI", "SMALLWHEELHUB_Z "}, - {VarDesc::FloatCM, "CABCOUR1", "BRASSCONE_OUTERRADIUS1 "}, - {VarDesc::FloatCM, "CABCTHI2", "BRASSCONE_THICKNESS2 "}, - {VarDesc::FloatCM, "CABCOUR2", "BRASSCONE_OUTERRADIUS2 "}, - {VarDesc::FloatCM, "LCAXBPOS", "LEADCONEASSEMBLY_XB "}, - {VarDesc::FloatCM, "LCAYBPOS", "LEADCONEASSEMBLY_YB "}, - {VarDesc::FloatCM, "LCAXAPOS", "LEADCONEASSEMBLY_XA "}, - {VarDesc::FloatCM, "LCAYAPOS", "LEADCONEASSEMBLY_YA "}, - {VarDesc::FloatCM, "PCAXBPOS", "POLYCONEASSEMBLY_XB "}, - {VarDesc::FloatCM, "PCAYBPOS", "POLYCONEASSEMBLY_YB "}, - {VarDesc::FloatCM, "PCAXAPOS", "POLYCONEASSEMBLY_XA "}, - {VarDesc::FloatCM, "PCAYAPOS", "POLYCONEASSEMBLY_YA "}, - {VarDesc::FloatCM, "CALCRADI", "LEADCONE_RADIUS "}, - {VarDesc::FloatCM, "CALCPOSZ", "LEADCONE_POSZ "}, - {VarDesc::FloatCM, "CAPCRADI", "POLYCONE_RADIUS "}, - {VarDesc::FloatCM, "CAPCPOSZ", "POLYCONE_POSZ "}, - {VarDesc::FloatCM, "I1", "I1 "}, - {VarDesc::FloatCM, "LCAPX_0", "ARRAY "}, - {VarDesc::FloatCM, "LCAPX_1", " "}, - {VarDesc::FloatCM, "LCAPX_2", " "}, - {VarDesc::FloatCM, "LCAPX_3", " "}, - {VarDesc::FloatCM, "LCAPX_4", " "}, - {VarDesc::FloatCM, "LCAPX_5", " "}, - {VarDesc::FloatCM, "LCAPX_6", " "}, - {VarDesc::FloatCM, "LCAPX_7", " "}, - {VarDesc::FloatCM, "LCAPX_8", " "}, - {VarDesc::FloatCM, "LCAPX_9", " "}, - {VarDesc::FloatCM, "LCAPX_10", " "}, - {VarDesc::FloatCM, "LCAPX_11", " "}, - {VarDesc::FloatCM, "LCAPX_12", " "}, - {VarDesc::FloatCM, "LCAPX_13", " "}, - {VarDesc::FloatCM, "LCAPX_14", " "}, - {VarDesc::FloatCM, "LCAPX_15", " "}, - {VarDesc::FloatCM, "LCAPY_0", "ARRAY "}, - {VarDesc::FloatCM, "LCAPY_1", " "}, - {VarDesc::FloatCM, "LCAPY_2", " "}, - {VarDesc::FloatCM, "LCAPY_3", " "}, - {VarDesc::FloatCM, "LCAPY_4", " "}, - {VarDesc::FloatCM, "LCAPY_5", " "}, - {VarDesc::FloatCM, "LCAPY_6", " "}, - {VarDesc::FloatCM, "LCAPY_7", " "}, - {VarDesc::FloatCM, "LCAPY_8", " "}, - {VarDesc::FloatCM, "LCAPY_9", " "}, - {VarDesc::FloatCM, "LCAPY_10", " "}, - {VarDesc::FloatCM, "LCAPY_11", " "}, - {VarDesc::FloatCM, "LCAPY_12", " "}, - {VarDesc::FloatCM, "LCAPY_13", " "}, - {VarDesc::FloatCM, "LCAPY_14", " "}, - {VarDesc::FloatCM, "LCAPY_15", " "}, - {VarDesc::FloatCM, "I2", "I2 "}, - {VarDesc::FloatCM, "PCAPX_0", "ARRAY "}, - {VarDesc::FloatCM, "PCAPX_1", " "}, - {VarDesc::FloatCM, "PCAPX_2", " "}, - {VarDesc::FloatCM, "PCAPX_3", " "}, - {VarDesc::FloatCM, "PCAPX_4", " "}, - {VarDesc::FloatCM, "PCAPX_5", " "}, - {VarDesc::FloatCM, "PCAPX_6", " "}, - {VarDesc::FloatCM, "PCAPX_7", " "}, - {VarDesc::FloatCM, "PCAPX_8", " "}, - {VarDesc::FloatCM, "PCAPX_9", " "}, - {VarDesc::FloatCM, "PCAPX_10", " "}, - {VarDesc::FloatCM, "PCAPX_11", " "}, - {VarDesc::FloatCM, "PCAPX_12", " "}, - {VarDesc::FloatCM, "PCAPX_13", " "}, - {VarDesc::FloatCM, "PCAPX_14", " "}, - {VarDesc::FloatCM, "PCAPX_15", " "}, - {VarDesc::FloatCM, "PCAPY_0", "ARRAY "}, - {VarDesc::FloatCM, "PCAPY_1", " "}, - {VarDesc::FloatCM, "PCAPY_2", " "}, - {VarDesc::FloatCM, "PCAPY_3", " "}, - {VarDesc::FloatCM, "PCAPY_4", " "}, - {VarDesc::FloatCM, "PCAPY_5", " "}, - {VarDesc::FloatCM, "PCAPY_6", " "}, - {VarDesc::FloatCM, "PCAPY_7", " "}, - {VarDesc::FloatCM, "PCAPY_8", " "}, - {VarDesc::FloatCM, "PCAPY_9", " "}, - {VarDesc::FloatCM, "PCAPY_10", " "}, - {VarDesc::FloatCM, "PCAPY_11", " "}, - {VarDesc::FloatCM, "PCAPY_12", " "}, - {VarDesc::FloatCM, "PCAPY_13", " "}, - {VarDesc::FloatCM, "PCAPY_14", " "}, - {VarDesc::FloatCM, "PCAPY_15", " "}, - {VarDesc::FloatCM, "PLUGINR2", "PLUG_INNERRADIUS2 "}, -}; - - -VarDesc JFSH_Vars[] = { - {VarDesc::FloatCM, "XYZREF", "XYZREF "}, - {VarDesc::FloatCM, "ROT180", "ROT180 "}, - {VarDesc::FloatCM, "AFBBLENG", "AFRAME_BOTTOMBAR_LENGTH "}, - {VarDesc::FloatCM, "AFBHEIGH", "AFRAME_BAR_HEIGHT "}, - {VarDesc::FloatCM, "AFRWIDTH", "AFRAME_WIDTH "}, - {VarDesc::FloatCM, "AFBTHIC1", "AFRAME_BAR_THICKNESS1 "}, - {VarDesc::FloatCM, "AFBTHIC2", "AFRAME_BAR_THICKNESS2 "}, - {VarDesc::FloatCM, "AFLANGLE", "AFRAME_LEG_ANGLE "}, - {VarDesc::FloatCM, "AFSLENGT", "AFRAME_SPACER_LENGTH "}, - {VarDesc::FloatCM, "AFSHEIGH", "AFRAME_SPACER_HEIGHT "}, - {VarDesc::FloatCM, "AFWEBBX1", "AFRAME_WEB_ELEMENT_BOTTOMBAR_X1 "}, - {VarDesc::FloatCM, "AFWEBBX2", "AFRAME_WEB_ELEMENT_BOTTOMBAR_X2 "}, - {VarDesc::FloatCM, "AFWELENG", "AFRAME_WEB_ELEMENT_LENGTH "}, - {VarDesc::FloatCM, "AFWEBLX1", "AFRAME_WEB_ELEMENT_LEG_DX1 "}, - {VarDesc::FloatCM, "AFWEBLX2", "AFRAME_WEB_ELEMENT_LEG_DX2 "}, - {VarDesc::FloatCM, "AFFTHICK", "AFRAME_FLANGE_THICKNESS "}, - {VarDesc::FloatCM, "AFFLENGT", "AFRAME_FLANGE_LENGTH "}, - {VarDesc::FloatCM, "AFTPLENG", "AFRAME_TOPPLATE_LENGTH "}, - {VarDesc::FloatCM, "AFTPHEIG", "AFRAME_TOPPLATE_HEIGHT "}, - {VarDesc::FloatCM, "AFWHEIGH", "AFRAME_WEDGE_HEIGHT "}, - {VarDesc::FloatCM, "AFWEXTEN", "AFRAME_WEDGE_EXTENSION "}, - {VarDesc::FloatCM, "AFWTHICK", "AFRAME_WEDGE_THICKNESS "}, - {VarDesc::FloatCM, "AFWZOFFS", "AFRAME_WEDGE_ZOFFSET "}, - {VarDesc::FloatCM, "AFFEELEN", "AFRAME_FEET_LENGTH "}, - {VarDesc::FloatCM, "AFFEETHI", "AFRAME_FEET_THICKNESS "}, - {VarDesc::FloatCM, "AFFEESLE", "AFRAME_FEET_SHORTLENGTH "}, - {VarDesc::FloatCM, "AFFEEHEI", "AFRAME_FEET_HEIGHT "}, - {VarDesc::FloatCM, "AFFEEEXT", "AFRAME_FEET_X_EXTENSION "}, - {VarDesc::FloatCM, "AFTOTHEI", "AFRAME_TOTAL_HEIGHT "}, - {VarDesc::FloatCM, "AFECTCLE", "CLEARANCE_ECT_AFRAME "}, - {VarDesc::FloatCM, "ECTNOMIZ", "ECT_NOMINAL_ZPOS "}, - {VarDesc::FloatCM, "AFYPOSIT", "AFRAME_YPOS "}, - {VarDesc::FloatCM, "AFZPOSIT", "AFRAME_ZPOS "}, - {VarDesc::FloatCM, "AFBLHPXA", "AFBLHPXA "}, - {VarDesc::FloatCM, "AFBLHPYA", "AFBLHPYA "}, - {VarDesc::FloatCM, "AFBLHPYB", "AFBLHPYB "}, - {VarDesc::FloatCM, "AFBLHPXB", "AFBLHPXB "}, - {VarDesc::FloatCM, "AFBBVPXA", "AFBBVPXA "}, - {VarDesc::FloatCM, "AFBBVPYA", "AFBBVPYA "}, - {VarDesc::FloatCM, "AFBBVPYB", "AFBBVPYB "}, - {VarDesc::FloatCM, "AFBBVPXB", "AFBBVPXB "}, - {VarDesc::FloatCM, "AFBUHPXA", "AFBUHPXA "}, - {VarDesc::FloatCM, "AFBUHPYA", "AFBUHPYA "}, - {VarDesc::FloatCM, "AFBUHPYB", "AFBUHPYB "}, - {VarDesc::FloatCM, "AFBUHPXB", "AFBUHPXB "}, - {VarDesc::FloatCM, "AFLLHPXA", "AFLLHPXA "}, - {VarDesc::FloatCM, "AFLLHPYA", "AFLLHPYA "}, - {VarDesc::FloatCM, "AFLLHPXB", "AFLLHPXB "}, - {VarDesc::FloatCM, "AFLLHPYB", "AFLLHPYB "}, - {VarDesc::FloatCM, "AFLLHPXC", "AFLLHPXC "}, - {VarDesc::FloatCM, "AFLLHPYC", "AFLLHPYC "}, - {VarDesc::FloatCM, "AFLLHPXD", "AFLLHPXD "}, - {VarDesc::FloatCM, "AFLLHPYD", "AFLLHPYD "}, - {VarDesc::FloatCM, "AFLVPXA", "AFLVPXA "}, - {VarDesc::FloatCM, "AFLVPYA", "AFLVPYA "}, - {VarDesc::FloatCM, "AFLVPXB", "AFLVPXB "}, - {VarDesc::FloatCM, "AFLVPYB", "AFLVPYB "}, - {VarDesc::FloatCM, "AFLVPXC", "AFLVPXC "}, - {VarDesc::FloatCM, "AFLVPYC", "AFLVPYC "}, - {VarDesc::FloatCM, "AFLVPXE", "AFLVPXE "}, - {VarDesc::FloatCM, "AFLVPYE", "AFLVPYE "}, - {VarDesc::FloatCM, "AFLVPYD", "AFLVPYD "}, - {VarDesc::FloatCM, "AFLVPXD", "AFLVPXD "}, - {VarDesc::FloatCM, "AFLUHPXA", "AFLUHPXA "}, - {VarDesc::FloatCM, "AFLUHPYA", "AFLUHPYA "}, - {VarDesc::FloatCM, "AFLUHPXB", "AFLUHPXB "}, - {VarDesc::FloatCM, "AFLUHPYB", "AFLUHPYB "}, - {VarDesc::FloatCM, "AFLUHPXC", "AFLUHPXC "}, - {VarDesc::FloatCM, "AFLUHPYC", "AFLUHPYC "}, - {VarDesc::FloatCM, "AFLUHPXD", "AFLUHPXD "}, - {VarDesc::FloatCM, "AFLUHPYD", "AFLUHPYD "}, - {VarDesc::FloatCM, "AFTPLAXA", "AFTPLAXA "}, - {VarDesc::FloatCM, "AFTPLAYA", "AFTPLAYA "}, - {VarDesc::FloatCM, "AFTPLAXB", "AFTPLAXB "}, - {VarDesc::FloatCM, "AFTPLAYB", "AFTPLAYB "}, - {VarDesc::FloatCM, "AFSPACXA", "AFSPACXA "}, - {VarDesc::FloatCM, "AFSPACYA", "AFSPACYA "}, - {VarDesc::FloatCM, "AFSPACXB", "AFSPACXB "}, - {VarDesc::FloatCM, "AFSPACYB", "AFSPACYB "}, - {VarDesc::FloatCM, "AFWEBWID", "AFRAME_WEB_ELEMENT_WIDTH "}, - {VarDesc::FloatCM, "AFWEBHEI", "AFRAME_WEB_ELEMENT_HEIGHT "}, - {VarDesc::FloatCM, "AFWEBBBY", "AFRAME_WEB_ELEMENT_BOTTOMBAR_Y "}, - {VarDesc::FloatCM, "AFWEBZPO", "AFRAME_WEB_ELEMENT_Z "}, - {VarDesc::FloatCM, "AFWELXI1", "AFWELXI1 "}, - {VarDesc::FloatCM, "AFWELYI1", "AFWELYI1 "}, - {VarDesc::FloatCM, "AFWELXP1", "AFWELXP1 "}, - {VarDesc::FloatCM, "AFWELYP1", "AFWELYP1 "}, - {VarDesc::FloatCM, "AFWELXI2", "AFWELXI2 "}, - {VarDesc::FloatCM, "AFWELYI2", "AFWELYI2 "}, - {VarDesc::FloatCM, "AFWELXP2", "AFWELXP2 "}, - {VarDesc::FloatCM, "AFWELYP2", "AFWELYP2 "}, - {VarDesc::FloatCM, "AFWELXI3", "AFWELXI3 "}, - {VarDesc::FloatCM, "AFWELYI3", "AFWELYI3 "}, - {VarDesc::FloatCM, "AFWELXP3", "AFWELXP3 "}, - {VarDesc::FloatCM, "AFWELYP3", "AFWELYP3 "}, - {VarDesc::FloatCM, "AFFWIDTH", "AFRAME_FLANGE_WIDTH "}, - {VarDesc::FloatCM, "AFFZPOSI", "AFRAME_FLANGE_Z "}, - {VarDesc::FloatCM, "AFFPOSX1", "AFRAME_FLANGE_X1 "}, - {VarDesc::FloatCM, "AFFPOSY1", "AFRAME_FLANGE_Y1 "}, - {VarDesc::FloatCM, "AFFPOSX2", "AFRAME_FLANGE_X2 "}, - {VarDesc::FloatCM, "AFFPOSY2", "AFRAME_FLANGE_Y2 "}, - {VarDesc::FloatCM, "AFWPOSXA", "AFRAME_WEDGE_XA "}, - {VarDesc::FloatCM, "AFWPOSYA", "AFRAME_WEDGE_YA "}, - {VarDesc::FloatCM, "AFWPOSXB", "AFRAME_WEDGE_XB "}, - {VarDesc::FloatCM, "AFWPOSYB", "AFRAME_WEDGE_YB "}, - {VarDesc::FloatCM, "AFWPOSXC", "AFRAME_WEDGE_XC "}, - {VarDesc::FloatCM, "AFWPOSYC", "AFRAME_WEDGE_YC "}, - {VarDesc::FloatCM, "AFWPOSXD", "AFRAME_WEDGE_XD "}, - {VarDesc::FloatCM, "AFWPOSYD", "AFRAME_WEDGE_YD "}, - {VarDesc::FloatCM, "AFWPOSX0", "AFRAME_WEDGE_X0 "}, - {VarDesc::FloatCM, "AFWPOSY0", "AFRAME_WEDGE_Y0 "}, - {VarDesc::FloatCM, "AFWPOSIX", "AFRAME_WEDGE_X "}, - {VarDesc::FloatCM, "AFWPOSIY", "AFRAME_WEDGE_Y "}, - {VarDesc::FloatCM, "AFWPOSIZ", "AFRAME_WEDGE_Z "}, - {VarDesc::FloatCM, "AFFEETXA", "AFRAME_FEET_XA "}, - {VarDesc::FloatCM, "AFFEETYA", "AFRAME_FEET_YA "}, - {VarDesc::FloatCM, "AFFEETXB", "AFRAME_FEET_XB "}, - {VarDesc::FloatCM, "AFFEETYB", "AFRAME_FEET_YB "}, - {VarDesc::FloatCM, "AFFEETXC", "AFRAME_FEET_XC "}, - {VarDesc::FloatCM, "AFFEETYC", "AFRAME_FEET_YC "}, - {VarDesc::FloatCM, "AFFEETXD", "AFRAME_FEET_XD "}, - {VarDesc::FloatCM, "AFFEETYD", "AFRAME_FEET_YD "}, - {VarDesc::FloatCM, "AFFEETXE", "AFRAME_FEET_XE "}, - {VarDesc::FloatCM, "AFFEETYE", "AFRAME_FEET_YE "}, - {VarDesc::FloatCM, "AFFEETXF", "AFRAME_FEET_XF "}, - {VarDesc::FloatCM, "AFFEETYF", "AFRAME_FEET_YF "}, - {VarDesc::FloatCM, "AFFEETPX", "AFRAME_FEET_X "}, - {VarDesc::FloatCM, "AFASPOSY", "AFRAME_ASSEMBLY_Y "}, - {VarDesc::FloatCM, "AFASPOSZ", "AFRAME_ASSEMBLY_Z "}, - {VarDesc::FloatCM, "JFCMCLEN", "JFCMAINCYLINDER_LENGTH "}, - {VarDesc::FloatCM, "JFCMCIR1", "JFCMAINCYLINDER_INNERRADIUS1 "}, - {VarDesc::FloatCM, "JFCMCOUR", "JFCMAINCYLINDER_OUTERRADIUS "}, - {VarDesc::FloatCM, "JFCMCHSL", "JFCMAINCYLINDER_HOLESLOPE "}, - {VarDesc::FloatCM, "JFCMCZOF", "JFCMAINCYLINDER_ZOFFSET "}, - {VarDesc::FloatCM, "PLUGLENG", "PLUG_LENGTH "}, - {VarDesc::FloatCM, "PLUGINRA", "PLUG_INNERRADIUS "}, - {VarDesc::FloatCM, "PLUGOURA", "PLUG_OUTERRADIUS "}, - {VarDesc::FloatCM, "JFSOCMRA", "JFSOCTOGON_MAINRADIUS "}, - {VarDesc::FloatCM, "JFSOCLEN", "JFSOCTOGON_LENGTH "}, - {VarDesc::FloatCM, "JFSOCZOF", "JFSOCTOGON_ZOFFSET "}, - {VarDesc::FloatCM, "AFOCONLE", "AFRAME_TO_JFSOCTOGON_CONNECTION_LENGTH "}, - {VarDesc::FloatCM, "AFOCONWI", "AFRAME_TO_JFSOCTOGON_CONNECTION_WIDTH "}, - {VarDesc::FloatCM, "AFOCONHE", "AFRAME_TO_JFSOCTOGON_CONNECTION_HEIGHT "}, - {VarDesc::FloatCM, "TX1E1ORA", "TX1E1ORA "}, - {VarDesc::FloatCM, "TX1E1IRA", "TX1E1IRA "}, - {VarDesc::FloatCM, "TX1E1ILE", "TX1E1ILE "}, - {VarDesc::FloatCM, "TX1E2ORA", "TX1E2ORA "}, - {VarDesc::FloatCM, "TX1E2IRA", "TX1E2IRA "}, - {VarDesc::FloatCM, "TX1E2ILE", "TX1E2ILE "}, - {VarDesc::FloatCM, "TX1STZOF", "TX1STZOF "}, - {VarDesc::FloatCM, "JFCMCIR2", "JFCMAINCYLINDER_INNERRADIUS2 "}, - {VarDesc::FloatCM, "JFCMCZPO", "JFCMAINCYLINDER_Z "}, - {VarDesc::FloatCM, "JFSOCZPO", "JFSOCTOGON_Z "}, - {VarDesc::FloatCM, "TX1E1ZPO", "TX1STM_ELEMENT1_Z "}, - {VarDesc::FloatCM, "TX1E2ZPO", "TX1STM_ELEMENT2_Z "}, - {VarDesc::FloatCM, "PLUGZPOS", "PLUG_POSZ "}, - {VarDesc::FloatCM, "AFMCCONY", "AFRAME_TO_JFCMAINCYLINDER_CONNECTION_Y "}, - {VarDesc::FloatCM, "AFMCCONZ", "AFRAME_TO_JFCMAINCYLINDER_CONNECTION_Z "}, - {VarDesc::FloatCM, "JFSOCTXA", "JFSOCTOGON_XA "}, - {VarDesc::FloatCM, "JFSOCTYA", "JFSOCTOGON_YA "}, - {VarDesc::FloatCM, "JFSOCTXB", "JFSOCTOGON_XB "}, - {VarDesc::FloatCM, "JFSOCTYB", "JFSOCTOGON_YB "}, -}; - - -VarDesc JTSH_Vars[] = { - {VarDesc::FloatCM, "OPLENGTH", "OUTERPLUGS_LENGTH "}, - {VarDesc::FloatCM, "OPINNRAD", "OUTERPLUGS_INNERRADIUS "}, - {VarDesc::FloatCM, "OPOUTRAD", "OUTERPLUGS_OUTERRADIUS "}, - {VarDesc::FloatCM, "IPLENGTH", "INNERPLUGS_LENGTH "}, - {VarDesc::FloatCM, "IPINNRA1", "INNERPLUGS_INNERRADIUS1 "}, - {VarDesc::FloatCM, "IPOUTRAD", "INNERPLUGS_OUTERRADIUS "}, - {VarDesc::FloatCM, "IPTILTAN", "INNERPLUGS_TILTANGLE "}, - {VarDesc::FloatCM, "IPZOFFSE", "INNERPLUGS_ZOFFSET "}, - {VarDesc::FloatCM, "PRLENGTH", "POLYRINGS_LENGTH "}, - {VarDesc::FloatCM, "PRINNRAD", "POLYRINGS_INNERRADIUS "}, - {VarDesc::FloatCM, "PROUTRAD", "POLYRINGS_OUTERRADIUS "}, - {VarDesc::FloatCM, "PREXTTAN", "POLYRINGS_EXTENSION_TILTANGLE"}, - {VarDesc::FloatCM, "PRIPEXLE", "POLYRINGS_IPEXTENSION_LENGTH "}, - {VarDesc::FloatCM, "ZPOSITIO", "SHIELD_Z "}, - {VarDesc::FloatCM, "YROTATIO", "SHIELD_ROTY "}, - {VarDesc::FloatCM, "IPINNRA2", "INNERPLUGS_INNERRADIUS2 "}, - {VarDesc::FloatCM, "PREXTZPO", "POLYRINGS_EXTENSION_Z "}, - {VarDesc::FloatCM, "OPZPOSI1", "OUTERPLUGS_Z1 "}, - {VarDesc::FloatCM, "OPZPOSI2", "OUTERPLUGS_Z2 "}, - {VarDesc::FloatCM, "IPZPOSI1", "INNERPLUGS_Z1 "}, - {VarDesc::FloatCM, "IPZPOSI2", "INNERPLUGS_Z2 "}, - {VarDesc::FloatCM, "PRZPOSI1", "POLYRINGS_Z1 "}, - {VarDesc::FloatCM, "PRZPOSI2", "POLYRINGS_Z2 "}, - {VarDesc::FloatCM, "PRZPOSI3", "POLYRINGS_Z3 "}, -}; - - -VarDesc MBAP_Vars[] = { - {VarDesc::FloatCM, "P12S1DZ1", "1353 P12S1DZ1 "}, - {VarDesc::FloatCM, "P12S1DZ2", "1354 P12S1DZ2 "}, - {VarDesc::FloatCM, "P23S1DZ1", "1355 P23S1DZ1 "}, - {VarDesc::FloatCM, "P23S1DZ2", "1356 P23S1DZ2 "}, - {VarDesc::FloatCM, "P34S1DZ1", "1357 P34S1DZ1 "}, - {VarDesc::FloatCM, "P34S1DZ2", "1358 P34S1DZ2 "}, - {VarDesc::FloatCM, "P14S3DZ", "1359 P14S3DZ "}, - {VarDesc::FloatCM, "P14S3DX", "1360 P14S3DX "}, - {VarDesc::FloatCM, "PLAS1DX1", "1361 PLAS1DX1 "}, - {VarDesc::FloatCM, "PLAS1DX2", "1362 PLAS1DX2 "}, - {VarDesc::FloatCM, "PFLHE", "1363 PFLHE "}, - {VarDesc::FloatCM, "PS01POSX", "1364 PS01POSX "}, - {VarDesc::FloatCM, "PS01POSY", "1365 PS01POSY "}, - {VarDesc::FloatCM, "PS11POSX", "1366 PS11POSX "}, - {VarDesc::FloatCM, "PS11POSY", "1367 PS11POSY "}, - {VarDesc::FloatCM, "PS14POSX", "1368 PS14POSX "}, - {VarDesc::FloatCM, "PS14POSY", "1369 PS14POSY "}, - {VarDesc::FloatCM, "PS14ANGZ", "1370 PS14ANGZ "}, - {VarDesc::FloatCM, "P12POSZ", "1371 P12POSZ "}, - {VarDesc::FloatCM, "P23POSZ", "1372 P23POSZ "}, - {VarDesc::FloatCM, "P34POSZ", "1373 P34POSZ "}, - {VarDesc::FloatCM, "XYZREF", "1374 XYZREF "}, - {VarDesc::FloatCM, "PFL12XA", "1375 PFL12XA "}, - {VarDesc::FloatCM, "PFL23XA", "1376 PFL23XA "}, - {VarDesc::FloatCM, "PFL34XA", "1377 PFL34XA "}, - {VarDesc::FloatCM, "PFLYA", "1378 PFLYA "}, - {VarDesc::FloatCM, "PFL12XB", "1379 PFL12XB "}, - {VarDesc::FloatCM, "PFL23XB", "1380 PFL23XB "}, - {VarDesc::FloatCM, "PFL34XB", "1381 PFL34XB "}, - {VarDesc::FloatCM, "PFLYB", "1382 PFLYB "}, - {VarDesc::FloatCM, "PFL12XC", "1383 PFL12XC "}, - {VarDesc::FloatCM, "PFL23XC", "1384 PFL23XC "}, - {VarDesc::FloatCM, "PFL34XC", "1385 PFL34XC "}, - {VarDesc::FloatCM, "PFLYC", "1386 PFLYC "}, - {VarDesc::FloatCM, "PFL12XD", "1387 PFL12XD "}, - {VarDesc::FloatCM, "PFL23XD", "1388 PFL23XD "}, - {VarDesc::FloatCM, "PFL34XD", "1389 PFL34XD "}, - {VarDesc::FloatCM, "PFLYD", "1390 PFLYD "}, - {VarDesc::FloatCM, "PLATRARO", "1391 PLATRARO "}, - {VarDesc::FloatCM, "PLATRARI", "1392 PLATRARI "}, - {VarDesc::FloatCM, "PLATRAHE", "1393 PLATRAHE "}, - {VarDesc::FloatCM, "PL12RAZE", "1394 PL12RAZE "}, - {VarDesc::FloatCM, "PL23RAZE", "1395 PL23RAZE "}, - {VarDesc::FloatCM, "PL34RAZE", "1396 PL34RAZE "}, - {VarDesc::FloatCM, "PLATRHYP", "1397 PLATRHYP "}, - {VarDesc::FloatCM, "PLATBTLE", "1398 PLATBTLE "}, - {VarDesc::FloatCM, "PRLS01DX", "1399 PRLS01DX "}, - {VarDesc::FloatCM, "PRLS11DX", "1400 PRLS11DX "}, - {VarDesc::FloatCM, "PRLS01DY", "1401 PRLS01DY "}, - {VarDesc::FloatCM, "PRLS11DY", "1402 PRLS11DY "}, - {VarDesc::FloatCM, "PSSS3DY1", "1403 PSSS3DY1 "}, - {VarDesc::FloatCM, "PSSS3DY2", "1404 PSSS3DY2 "}, - {VarDesc::FloatCM, "PSSS3DX1", "1405 PSSS3DX1 "}, - {VarDesc::FloatCM, "PSSS3DX2", "1406 PSSS3DX2 "}, - {VarDesc::FloatCM, "PSSS3DX3", "1407 PSSS3DX3 "}, - {VarDesc::FloatCM, "PSSS3AN", "1408 PSSS3AN "}, - {VarDesc::FloatCM, "PSSS3ZP1", "1409 PSSS3ZP1 "}, - {VarDesc::FloatCM, "PSSS3ZP2", "1410 PSSS3ZP2 "}, - {VarDesc::FloatCM, "PSSS3ZP3", "1411 PSSS3ZP3 "}, - {VarDesc::FloatCM, "PSSS3ZP4", "1412 PSSS3ZP4 "}, - {VarDesc::FloatCM, "PSSS3ZP5", "1413 PSSS3ZP5 "}, - {VarDesc::FloatCM, "PSSS3ZP6", "1414 PSSS3ZP6 "}, - {VarDesc::FloatCM, "PLATRAZ1", "1415 PLATRAZ1 "}, - {VarDesc::FloatCM, "PLATRAY1", "1416 PLATRAY1 "}, - {VarDesc::FloatCM, "PLATRAZ2", "1417 PLATRAZ2 "}, - {VarDesc::FloatCM, "PLATRAY2", "1418 PLATRAY2 "}, - {VarDesc::FloatCM, "PL12RAZ3", "1419 PL12RAZ3 "}, - {VarDesc::FloatCM, "PL23RAZ3", "1420 PL23RAZ3 "}, - {VarDesc::FloatCM, "PL34RAZ3", "1421 PL34RAZ3 "}, - {VarDesc::FloatCM, "PLATRAY3", "1422 PLATRAY3 "}, - {VarDesc::FloatCM, "PL12RAZ4", "1423 PL12RAZ4 "}, - {VarDesc::FloatCM, "PL23RAZ4", "1424 PL23RAZ4 "}, - {VarDesc::FloatCM, "PL34RAZ4", "1425 PL34RAZ4 "}, - {VarDesc::FloatCM, "PLATRAY4", "1426 PLATRAY4 "}, - {VarDesc::FloatCM, "PL12RAZ0", "1427 PL12RAZ0 "}, - {VarDesc::FloatCM, "PL23RAZ0", "1428 PL23RAZ0 "}, - {VarDesc::FloatCM, "PL34RAZ0", "1429 PL34RAZ0 "}, - {VarDesc::FloatCM, "PLATRAY0", "1430 PLATRAY0 "}, - {VarDesc::FloatCM, "PL12RHZP", "1431 PL12RHZP "}, - {VarDesc::FloatCM, "PL23RHZP", "1432 PL23RHZP "}, - {VarDesc::FloatCM, "PL34RHZP", "1433 PL34RHZP "}, - {VarDesc::FloatCM, "PLATRVZE", "1434 PLATRVZE "}, - {VarDesc::FloatCM, "PLATRVYP", "1435 PLATRVYP "}, - {VarDesc::FloatCM, "PLATCRYP", "1436 PLATCRYP "}, - {VarDesc::FloatCM, "PL12CRZ1", "1437 PL12CRZ1 "}, - {VarDesc::FloatCM, "PL12CRZ2", "1438 PL12CRZ2 "}, - {VarDesc::FloatCM, "PL23CRZ1", "1439 PL23CRZ1 "}, - {VarDesc::FloatCM, "PL23CRZ2", "1440 PL23CRZ2 "}, - {VarDesc::FloatCM, "PL34CRZ1", "1441 PL34CRZ1 "}, - {VarDesc::FloatCM, "PL34CRZ2", "1442 PL34CRZ2 "}, - {VarDesc::FloatCM, "PL12CRAN", "1443 PL12CRAN "}, - {VarDesc::FloatCM, "PL23CRAN", "1444 PL23CRAN "}, - {VarDesc::FloatCM, "PL34CRAN", "1445 PL34CRAN "}, - {VarDesc::FloatCM, "PL12CRLE", "1446 PL12CRLE "}, - {VarDesc::FloatCM, "PL23CRLE", "1447 PL23CRLE "}, - {VarDesc::FloatCM, "PL34CRLE", "1448 PL34CRLE "}, - {VarDesc::FloatCM, "PLAT2RAX", "1449 PLAT2RAX "}, - {VarDesc::FloatCM, "PL12BTZ1", "1450 PL12BTZ1 "}, - {VarDesc::FloatCM, "PL23BTZ1", "1451 PL23BTZ1 "}, - {VarDesc::FloatCM, "PL34BTZ1", "1452 PL34BTZ1 "}, - {VarDesc::FloatCM, "PL12BTZ2", "1453 PL12BTZ2 "}, - {VarDesc::FloatCM, "PL23BTZ2", "1454 PL23BTZ2 "}, - {VarDesc::FloatCM, "PL34BTZ2", "1455 PL34BTZ2 "}, - {VarDesc::FloatCM, "PLATBTXP", "1456 PLATBTXP "}, - {VarDesc::FloatCM, "PRLS01XP", "1457 PRLS01XP "}, - {VarDesc::FloatCM, "PRLS11XP", "1458 PRLS11XP "}, - {VarDesc::FloatCM, "PRLS01YP", "1459 PRLS01YP "}, - {VarDesc::FloatCM, "PRLS11YP", "1460 PRLS11YP "}, - {VarDesc::FloatCM, "PL12RLZ1", "1461 PL12RLZ1 "}, - {VarDesc::FloatCM, "PL23RLZ1", "1462 PL23RLZ1 "}, - {VarDesc::FloatCM, "PL34RLZ1", "1463 PL34RLZ1 "}, - {VarDesc::FloatCM, "PL12RLZ2", "1464 PL12RLZ2 "}, - {VarDesc::FloatCM, "PL23RLZ2", "1465 PL23RLZ2 "}, - {VarDesc::FloatCM, "PL34RLZ2", "1466 PL34RLZ2 "}, - {VarDesc::FloatCM, "PRLS01AN", "1467 PRLS01AN "}, - {VarDesc::FloatCM, "PRLS11AN", "1468 PRLS11AN "}, - {VarDesc::FloatCM, "PRLS01LE", "1469 PRLS01LE "}, - {VarDesc::FloatCM, "PRLS11LE", "1470 PRLS11LE "}, - {VarDesc::FloatCM, "PLATBSXP", "1471 PLATBSXP "}, - {VarDesc::FloatCM, "PLATBTLS", "1472 PLATBTLS "}, - {VarDesc::FloatCM, "PL12FRZP", "1473 PL12FRZP "}, - {VarDesc::FloatCM, "PL23FRZP", "1474 PL23FRZP "}, - {VarDesc::FloatCM, "PL34FRZP", "1475 PL34FRZP "}, - {VarDesc::FloatCM, "PLATFRYP", "1476 PLATFRYP "}, - {VarDesc::FloatCM, "PLATFRXP", "1477 PLATFRXP "}, - {VarDesc::FloatCM, "PSSS3DYT", "1478 PSSS3DYT "}, - {VarDesc::FloatCM, "PSSS3DXT", "1479 PSSS3DXT "}, - {VarDesc::FloatCM, "PSSS3X0", "1480 PSSS3X0 "}, - {VarDesc::FloatCM, "PSSS3Y0", "1481 PSSS3Y0 "}, - {VarDesc::FloatCM, "PSSS3X1", "1482 PSSS3X1 "}, - {VarDesc::FloatCM, "PSSS3Y1", "1483 PSSS3Y1 "}, - {VarDesc::FloatCM, "PSSS3X2", "1484 PSSS3X2 "}, - {VarDesc::FloatCM, "PSSS3Y2", "1485 PSSS3Y2 "}, - {VarDesc::FloatCM, "PSSS3X3", "1486 PSSS3X3 "}, - {VarDesc::FloatCM, "PSSS3Y3", "1487 PSSS3Y3 "}, - {VarDesc::FloatCM, "PSSS3X4", "1488 PSSS3X4 "}, - {VarDesc::FloatCM, "PSSS3Y4", "1489 PSSS3Y4 "}, - {VarDesc::FloatCM, "PSSS3X5", "1490 PSSS3X5 "}, - {VarDesc::FloatCM, "PSSS3Y5", "1491 PSSS3Y5 "}, - {VarDesc::FloatCM, "PSSS3X6", "1492 PSSS3X6 "}, - {VarDesc::FloatCM, "PSSS3Y6", "1493 PSSS3Y6 "}, - {VarDesc::FloatCM, "PSSRAXP", "1494 PSSRAXP "}, - {VarDesc::FloatCM, "PSSRAYP", "1495 PSSRAYP "}, - {VarDesc::FloatCM, "PSSZRP1", "1496 PSSZRP1 "}, - {VarDesc::FloatCM, "PSSZRP2", "1497 PSSZRP2 "}, - {VarDesc::FloatCM, "PSSZRP3", "1498 PSSZRP3 "}, - {VarDesc::FloatCM, "PSSZRP4", "1499 PSSZRP4 "}, - {VarDesc::FloatCM, "PSSZRP5", "1500 PSSZRP5 "}, - {VarDesc::FloatCM, "PSSZRP6", "1501 PSSZRP6 "}, - {VarDesc::FloatCM, "PRHS3ZP1", "1502 PRHS3ZP1 "}, - {VarDesc::FloatCM, "PRHS3ZP2", "1503 PRHS3ZP2 "}, - {VarDesc::FloatCM, "PRHS3ZP3", "1504 PRHS3ZP3 "}, - {VarDesc::FloatCM, "PRHS3ZP4", "1505 PRHS3ZP4 "}, - {VarDesc::FloatCM, "PRHS3ZP5", "1506 PRHS3ZP5 "}, - {VarDesc::FloatCM, "PRHS3ZP6", "1507 PRHS3ZP6 "}, - {VarDesc::FloatCM, "PRHS3ZP7", "1508 PRHS3ZP7 "}, - {VarDesc::FloatCM, "PL14RAZE", "1509 PL14RAZE "}, - {VarDesc::FloatCM, "PL14RAZP", "1510 PL14RAZP "}, - {VarDesc::FloatCM, "PL14RAY1", "1511 PL14RAY1 "}, - {VarDesc::FloatCM, "PL14RAY2", "1512 PL14RAY2 "}, - {VarDesc::FloatCM, "PL14RVZE", "1513 PL14RVZE "}, - {VarDesc::FloatCM, "PL14RVYP", "1514 PL14RVYP "}, - {VarDesc::FloatCM, "PL14CRY1", "1515 PL14CRY1 "}, - {VarDesc::FloatCM, "PL14CRY2", "1516 PL14CRY2 "}, - {VarDesc::FloatCM, "P12S3CRA", "1517 P12S3CRA "}, - {VarDesc::FloatCM, "P12S3CRL", "1518 P12S3CRL "}, - {VarDesc::FloatCM, "P23S3CRA", "1519 P23S3CRA "}, - {VarDesc::FloatCM, "P23S3CRL", "1520 P23S3CRL "}, - {VarDesc::FloatCM, "P34S3CRA", "1521 P34S3CRA "}, - {VarDesc::FloatCM, "P34S3CRL", "1522 P34S3CRL "}, - {VarDesc::FloatCM, "PL14CRZ1", "1523 PL14CRZ1 "}, - {VarDesc::FloatCM, "PL14CRZ2", "1524 PL14CRZ2 "}, - {VarDesc::FloatCM, "PL14CRZ3", "1525 PL14CRZ3 "}, - {VarDesc::FloatCM, "PL14CRZ4", "1526 PL14CRZ4 "}, - {VarDesc::FloatCM, "PL14CRZ5", "1527 PL14CRZ5 "}, - {VarDesc::FloatCM, "PL14CRZ6", "1528 PL14CRZ6 "}, - {VarDesc::FloatCM, "PL14CRZ7", "1529 PL14CRZ7 "}, - {VarDesc::FloatCM, "PL14CRZ8", "1530 PL14CRZ8 "}, - {VarDesc::FloatCM, "PL14CRZ9", "1531 PL14CRZ9 "}, - {VarDesc::FloatCM, "PL14CRZA", "1532 PL14CRZA "}, - {VarDesc::FloatCM, "P14S3BFL", "1533 P14S3BFL "}, - {VarDesc::FloatCM, "P14S3BFA", "1534 P14S3BFA "}, - {VarDesc::FloatCM, "P14S3BFX", "1535 P14S3BFX "}, - {VarDesc::FloatCM, "P14S3BFY", "1536 P14S3BFY "}, - {VarDesc::FloatCM, "P14S3FLA", "1537 P14S3FLA "}, - {VarDesc::FloatCM, "P14S3FLX", "1538 P14S3FLX "}, - {VarDesc::FloatCM, "P14S3FLY", "1539 P14S3FLY "}, - {VarDesc::FloatCM, "P14S3FLZ", "1540 P14S3FLZ "}, -}; - - -VarDesc AgddXML_Vars[] = { - {VarDesc::String, "NameOfVariable", "Name Of Variable"}, - {VarDesc::FloatCM, "ValueOfVariable", "Value Of Variable"}, -}; - - VarDesc HwSwId_Vars[] = { {VarDesc::String, "HARDNAME", "Hard name"}, {VarDesc::String, "SOFTNAME", "Soft name"}, @@ -1913,7 +557,6 @@ void AmdcDbSvcMakerFromRDB::Set( m_detectorNode = detectorNode ; AMDC(pIRDBAccessSvc,pAmdcDbSvc); - // AGDD(pIRDBAccessSvc,pAmdcDbSvc); ATYP(pIRDBAccessSvc,pAmdcDbSvc); ACUT(pIRDBAccessSvc,pAmdcDbSvc); @@ -1941,18 +584,6 @@ void AmdcDbSvcMakerFromRDB::Set( ASZT(pIRDBAccessSvc,pAmdcDbSvc); ISZT(pIRDBAccessSvc,pAmdcDbSvc); -// ABRT(pIRDBAccessSvc,pAmdcDbSvc); -// AECT(pIRDBAccessSvc,pAmdcDbSvc); -// ECST(pIRDBAccessSvc,pAmdcDbSvc); -// FEET(pIRDBAccessSvc,pAmdcDbSvc); -// GENV(pIRDBAccessSvc,pAmdcDbSvc); -// JDSH(pIRDBAccessSvc,pAmdcDbSvc); -// JFSH(pIRDBAccessSvc,pAmdcDbSvc); -// JTSH(pIRDBAccessSvc,pAmdcDbSvc); -// MBAP(pIRDBAccessSvc,pAmdcDbSvc); - -// AgddXMLVariables(pIRDBAccessSvc,pAmdcDbSvc); - HwSwIdMapping(pIRDBAccessSvc,pAmdcDbSvc); XtomoData(pIRDBAccessSvc,pAmdcDbSvc); @@ -1970,12 +601,6 @@ void AmdcDbSvcMakerFromRDB::AMDC(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcD } -void AmdcDbSvcMakerFromRDB::AGDD(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc) -{ - addVars ("AGDD", RANGE(AGDD_Vars), pIRDBAccessSvc, pAmdcDbSvc); -} - - void AmdcDbSvcMakerFromRDB::ATYP(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc) { addVars ("ATYP", RANGE(ATYP_Vars), pIRDBAccessSvc, pAmdcDbSvc); @@ -2273,66 +898,6 @@ void AmdcDbSvcMakerFromRDB::ISZT(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcD } -void AmdcDbSvcMakerFromRDB::ABRT(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc) -{ - addVars ("ABRT", RANGE(ABRT_Vars), pIRDBAccessSvc, pAmdcDbSvc); -} - - -void AmdcDbSvcMakerFromRDB::AECT(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc) -{ - addVars ("AECT", RANGE(AECT_Vars), pIRDBAccessSvc, pAmdcDbSvc); -} - - -void AmdcDbSvcMakerFromRDB::ECST(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc) -{ - addVars ("ECST", RANGE(ECST_Vars), pIRDBAccessSvc, pAmdcDbSvc); -} - - -void AmdcDbSvcMakerFromRDB::FEET(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc) -{ - addVars ("FEET", RANGE(FEET_Vars), pIRDBAccessSvc, pAmdcDbSvc); -} - - -void AmdcDbSvcMakerFromRDB::GENV(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc) -{ - addVars ("GENV", RANGE(GENV_Vars), pIRDBAccessSvc, pAmdcDbSvc); -} - - -void AmdcDbSvcMakerFromRDB::JDSH(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc) -{ - addVars ("JDSH", RANGE(JDSH_Vars), pIRDBAccessSvc, pAmdcDbSvc); -} - - -void AmdcDbSvcMakerFromRDB::JFSH(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc) -{ - addVars ("JFSH", RANGE(JFSH_Vars), pIRDBAccessSvc, pAmdcDbSvc); -} - - -void AmdcDbSvcMakerFromRDB::JTSH(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc) -{ - addVars ("JTSH", RANGE(JTSH_Vars), pIRDBAccessSvc, pAmdcDbSvc); -} - - -void AmdcDbSvcMakerFromRDB::MBAP(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc) -{ - addVars ("MBAP", RANGE(MBAP_Vars), pIRDBAccessSvc, pAmdcDbSvc); -} - - -void AmdcDbSvcMakerFromRDB::AgddXMLVariables(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc) -{ - addVars ("AgddXMLVariables", RANGE(AgddXML_Vars), pIRDBAccessSvc, pAmdcDbSvc); -} - - void AmdcDbSvcMakerFromRDB::HwSwIdMapping(IRDBAccessSvc* pIRDBAccessSvc,AmdcDbSvc* pAmdcDbSvc) { addVars ("HwSwIdMapping", RANGE(HwSwId_Vars), pIRDBAccessSvc, pAmdcDbSvc); diff --git a/MuonSpectrometer/Amdcsimrec/AmdcOracle/AmdcOracle/AmdcDumpOracle.h b/MuonSpectrometer/Amdcsimrec/AmdcOracle/AmdcOracle/AmdcDumpOracle.h index 9a2f41a48716..5c80801b797b 100755 --- a/MuonSpectrometer/Amdcsimrec/AmdcOracle/AmdcOracle/AmdcDumpOracle.h +++ b/MuonSpectrometer/Amdcsimrec/AmdcOracle/AmdcOracle/AmdcDumpOracle.h @@ -63,19 +63,7 @@ private: void DumpWRPC( IRDBAccessSvc* pIRDBAccessSvc , std::string TagAdd , int& Kwarn, int& Kchck ); void DumpACUT( IRDBAccessSvc* pIRDBAccessSvc , std::string TagAdd , int& Kwarn, int& Kchck ); void DumpATYP( IRDBAccessSvc* pIRDBAccessSvc , std::string TagAdd , int& Kwarn, int& Kchck ); - void DumpAGDD( IRDBAccessSvc* pIRDBAccessSvc , std::string TagAdd , int& Kwarn, int& Kchck ); void DumpAMDC( IRDBAccessSvc* pIRDBAccessSvc , std::string TagAdd , int& Kwarn, int& Kchck ); - void DumpABRT( IRDBAccessSvc* pIRDBAccessSvc , std::string TagAdd , int& Kwarn, int& Kchck ); - void DumpAECT( IRDBAccessSvc* pIRDBAccessSvc , std::string TagAdd , int& Kwarn, int& Kchck ); - void DumpECST( IRDBAccessSvc* pIRDBAccessSvc , std::string TagAdd , int& Kwarn, int& Kchck ); - void DumpFEET( IRDBAccessSvc* pIRDBAccessSvc , std::string TagAdd , int& Kwarn, int& Kchck ); - void DumpGENV( IRDBAccessSvc* pIRDBAccessSvc , std::string TagAdd , int& Kwarn, int& Kchck ); - void DumpJDSH( IRDBAccessSvc* pIRDBAccessSvc , std::string TagAdd , int& Kwarn, int& Kchck ); - void DumpJFSH( IRDBAccessSvc* pIRDBAccessSvc , std::string TagAdd , int& Kwarn, int& Kchck ); - void DumpJTSH( IRDBAccessSvc* pIRDBAccessSvc , std::string TagAdd , int& Kwarn, int& Kchck ); - void DumpMBAP( IRDBAccessSvc* pIRDBAccessSvc , std::string TagAdd , int& Kwarn, int& Kchck ); - - void DumpAgddXMLVariables( IRDBAccessSvc* pIRDBAccessSvc , std::string TagAdd ,int& Kwarn, int& Kchck ); void DumpHwSwIdMapping( IRDBAccessSvc* pIRDBAccessSvc , std::string TagAdd ,int& Kwarn, int& Kchck ); diff --git a/MuonSpectrometer/Amdcsimrec/AmdcOracle/src/AmdcDumpOracle.cxx b/MuonSpectrometer/Amdcsimrec/AmdcOracle/src/AmdcDumpOracle.cxx index 410560d1aa38..61f445ee19bd 100755 --- a/MuonSpectrometer/Amdcsimrec/AmdcOracle/src/AmdcDumpOracle.cxx +++ b/MuonSpectrometer/Amdcsimrec/AmdcOracle/src/AmdcDumpOracle.cxx @@ -412,16 +412,6 @@ StatusCode AmdcDumpOracle::DoIt() << "ATYP: " << Kwarn << " Warnings " << " for " << Kchck << " tested elements " << std::endl; -// Check AGDD -// Kwarn = 0 ; -// Kchck = 0 ; -// DumpAGDD((&*p_IRDBAccessSvcWithUpdate),KountCallsDoItASstring,Kwarn,Kchck); -// KwarnTot = KwarnTot + Kwarn ; -// KchckTot = KchckTot + Kchck ; -// OutFile -// << "AGDD: " << Kwarn << " Warnings " << " for " << Kchck << " tested elements " -// << std::endl; - // Check AMDC Kwarn = 0 ; Kchck = 0 ; @@ -432,107 +422,6 @@ StatusCode AmdcDumpOracle::DoIt() << "AMDC: " << Kwarn << " Warnings " << " for " << Kchck << " tested elements " << std::endl; -// // Check ABRT -// Kwarn = 0 ; -// Kchck = 0 ; -// DumpABRT((&*p_IRDBAccessSvcWithUpdate),KountCallsDoItASstring,Kwarn,Kchck); -// KwarnTot = KwarnTot + Kwarn ; -// KchckTot = KchckTot + Kchck ; -// OutFile -// << "ABRT: " << Kwarn << " Warnings " << " for " << Kchck << " tested elements " -// << std::endl; -// -// // Check AECT -// Kwarn = 0 ; -// Kchck = 0 ; -// DumpAECT((&*p_IRDBAccessSvcWithUpdate),KountCallsDoItASstring,Kwarn,Kchck); -// KwarnTot = KwarnTot + Kwarn ; -// KchckTot = KchckTot + Kchck ; -// OutFile -// << "AECT: " << Kwarn << " Warnings " << " for " << Kchck << " tested elements " -// << std::endl; -// -// // Check ECST -// Kwarn = 0 ; -// Kchck = 0 ; -// DumpECST((&*p_IRDBAccessSvcWithUpdate),KountCallsDoItASstring,Kwarn,Kchck); -// KwarnTot = KwarnTot + Kwarn ; -// KchckTot = KchckTot + Kchck ; -// OutFile -// << "ECST: " << Kwarn << " Warnings " << " for " << Kchck << " tested elements " -// << std::endl; -// -// // Check FEET -// Kwarn = 0 ; -// Kchck = 0 ; -// DumpFEET((&*p_IRDBAccessSvcWithUpdate),KountCallsDoItASstring,Kwarn,Kchck); -// KwarnTot = KwarnTot + Kwarn ; -// KchckTot = KchckTot + Kchck ; -// OutFile -// << "FEET: " << Kwarn << " Warnings " << " for " << Kchck << " tested elements " -// << std::endl; -// -// // Check GENV -// Kwarn = 0 ; -// Kchck = 0 ; -// DumpGENV((&*p_IRDBAccessSvcWithUpdate),KountCallsDoItASstring,Kwarn,Kchck); -// KwarnTot = KwarnTot + Kwarn ; -// KchckTot = KchckTot + Kchck ; -// OutFile -// << "GENV: " << Kwarn << " Warnings " << " for " << Kchck << " tested elements " -// << std::endl; -// -// // Check JDSH -// Kwarn = 0 ; -// Kchck = 0 ; -// DumpJDSH((&*p_IRDBAccessSvcWithUpdate),KountCallsDoItASstring,Kwarn,Kchck); -// KwarnTot = KwarnTot + Kwarn ; -// KchckTot = KchckTot + Kchck ; -// OutFile -// << "JDSH: " << Kwarn << " Warnings " << " for " << Kchck << " tested elements " -// << std::endl; -// -// // Check JFSH -// Kwarn = 0 ; -// Kchck = 0 ; -// DumpJFSH((&*p_IRDBAccessSvcWithUpdate),KountCallsDoItASstring,Kwarn,Kchck); -// KwarnTot = KwarnTot + Kwarn ; -// KchckTot = KchckTot + Kchck ; -// OutFile -// << "JFSH: " << Kwarn << " Warnings " << " for " << Kchck << " tested elements " -// << std::endl; -// -// // Check JTSH -// Kwarn = 0 ; -// Kchck = 0 ; -// DumpJTSH((&*p_IRDBAccessSvcWithUpdate),KountCallsDoItASstring,Kwarn,Kchck); -// KwarnTot = KwarnTot + Kwarn ; -// KchckTot = KchckTot + Kchck ; -// OutFile -// << "JTSH: " << Kwarn << " Warnings " << " for " << Kchck << " tested elements " -// << std::endl; -// -// // Check MBAP -// Kwarn = 0 ; -// Kchck = 0 ; -// DumpMBAP((&*p_IRDBAccessSvcWithUpdate),KountCallsDoItASstring,Kwarn,Kchck); -// KwarnTot = KwarnTot + Kwarn ; -// KchckTot = KchckTot + Kchck ; -// OutFile -// << "MBAP: " << Kwarn << " Warnings " << " for " << Kchck << " tested elements " -// << std::endl; - -// // Check AgddXMLVariables -// Kwarn = 0 ; -// Kchck = 0 ; -// DumpAgddXMLVariables((&*p_IRDBAccessSvcWithUpdate),KountCallsDoItASstring,Kwarn,Kchck); -// KwarnTot = KwarnTot + Kwarn ; -// KchckTot = KchckTot + Kchck ; -// OutFile -// << "AgddXMLVariables: " << Kwarn << " Warnings " << " for " << Kchck << " tested elements " -// << std::endl; - - // Check HwSwIdMapping Kwarn = 0 ; Kchck = 0 ; @@ -2054,69 +1943,6 @@ void AmdcDumpOracle::DumpATYP( IRDBAccessSvc* pIRDBAccessSvc, std::string TagAdd } -void AmdcDumpOracle::DumpAGDD( IRDBAccessSvc* pIRDBAccessSvc, std::string TagAdd, int& Kwarn,int& Kchck){ - - std::string NameOfTheSet = "AGDD"; - - std::ofstream OutFile; - std::string FileName = "Out.AmdcOracle."+ TagAdd + NameOfTheSet; - OutFile.open(FileName.c_str()); - OutFile << setiosflags(std::ios::fixed); - OutFile << "Checking " << NameOfTheSet << " content started" << std::endl; - Kwarn = -1 ; - Kchck = 0 ; - - IRDBRecordset_ptr pIRDBRecordsetFromRDB = pIRDBAccessSvc->getRecordsetPtr(NameOfTheSet,"RDB"); - if (pIRDBRecordsetFromRDB->size() == 0){ - OutFile << "No " << NameOfTheSet << " in RDB " << std::endl; - return; - } - - IRDBRecordset_ptr pIRDBRecordsetFromAmdc = pIRDBAccessSvc->getRecordsetPtr(NameOfTheSet,"Amdc"); - if (pIRDBRecordsetFromAmdc->size() == 0){ - OutFile << "No " << NameOfTheSet << " in Amdc " << std::endl; - return; - } - - Kwarn = 0 ; - - std::vector<IRDBRecord*>::const_iterator itFromRDB = pIRDBRecordsetFromRDB->begin(); - for ( ; itFromRDB<pIRDBRecordsetFromRDB->end(); itFromRDB++){ - const AmdcDbRecord* pAmdcDbRecordFromRDB = dynamic_cast<const AmdcDbRecord*>((*itFromRDB)); - if (pAmdcDbRecordFromRDB == 0){ - OutFile << "No way to cast pAmdcDbRecordFromRDB for " << NameOfTheSet << std::endl; - return; - } - int Ifound = 0 ; - std::vector<IRDBRecord*>::const_iterator itFromAmdc = pIRDBRecordsetFromAmdc->begin(); - for ( ; itFromAmdc<pIRDBRecordsetFromAmdc->end(); itFromAmdc++){ - if (Ifound==1) continue; - - Ifound = 1; - - const AmdcDbRecord* pAmdcDbRecordFromAmdc = dynamic_cast<const AmdcDbRecord*>((*itFromAmdc)); - if (pAmdcDbRecordFromAmdc == 0){ - OutFile << "No way to cast pAmdcDbRecordFromAmdc for " << NameOfTheSet << std::endl; - return; - } - - if (Ifound == 1) pAmdcDbRecordFromAmdc->doIMatch(m_WarningLevel,Kwarn,Kchck,OutFile,pAmdcDbRecordFromRDB); - - } - - if (Ifound!=1){ - Kwarn = Kwarn + 1; - OutFile << "WARNING: No way to check " << pAmdcDbRecordFromRDB->getUniversalId() << std::endl; - } - - } - - OutFile << "Checking " << NameOfTheSet << " content ended" << std::endl; - - OutFile.close(); - -} - void AmdcDumpOracle::DumpAMDC( IRDBAccessSvc* pIRDBAccessSvc, std::string TagAdd, int& Kwarn,int& Kchck){ std::string NameOfTheSet = "AMDC"; @@ -2180,639 +2006,6 @@ void AmdcDumpOracle::DumpAMDC( IRDBAccessSvc* pIRDBAccessSvc, std::string TagAdd } -void AmdcDumpOracle::DumpABRT( IRDBAccessSvc* pIRDBAccessSvc, std::string TagAdd, int& Kwarn,int& Kchck){ - - std::string NameOfTheSet = "ABRT"; - - std::ofstream OutFile; - std::string FileName = "Out.AmdcOracle."+ TagAdd + NameOfTheSet; - OutFile.open(FileName.c_str()); - OutFile << setiosflags(std::ios::fixed); - OutFile << "Checking " << NameOfTheSet << " content started" << std::endl; - Kwarn = -1 ; - Kchck = 0 ; - - IRDBRecordset_ptr pIRDBRecordsetFromRDB = pIRDBAccessSvc->getRecordsetPtr(NameOfTheSet,"RDB"); - if (pIRDBRecordsetFromRDB->size() == 0){ - OutFile << "No " << NameOfTheSet << " in RDB " << std::endl; - return; - } - - IRDBRecordset_ptr pIRDBRecordsetFromAmdc = pIRDBAccessSvc->getRecordsetPtr(NameOfTheSet,"Amdc"); - if (pIRDBRecordsetFromAmdc->size() == 0){ - OutFile << "No " << NameOfTheSet << " in Amdc " << std::endl; - return; - } - - Kwarn = 0 ; - - std::vector<IRDBRecord*>::const_iterator itFromRDB = pIRDBRecordsetFromRDB->begin(); - for ( ; itFromRDB<pIRDBRecordsetFromRDB->end(); itFromRDB++){ - const AmdcDbRecord* pAmdcDbRecordFromRDB = dynamic_cast<const AmdcDbRecord*>((*itFromRDB)); - if (pAmdcDbRecordFromRDB == 0){ - OutFile << "No way to cast pAmdcDbRecordFromRDB for " << NameOfTheSet << std::endl; - return; - } - int Ifound = 0 ; - std::vector<IRDBRecord*>::const_iterator itFromAmdc = pIRDBRecordsetFromAmdc->begin(); - for ( ; itFromAmdc<pIRDBRecordsetFromAmdc->end(); itFromAmdc++){ - if (Ifound==1) continue; - - Ifound = 1; - - const AmdcDbRecord* pAmdcDbRecordFromAmdc = dynamic_cast<const AmdcDbRecord*>((*itFromAmdc)); - if (pAmdcDbRecordFromAmdc == 0){ - OutFile << "No way to cast pAmdcDbRecordFromAmdc for " << NameOfTheSet << std::endl; - return; - } - - if (Ifound == 1) pAmdcDbRecordFromAmdc->doIMatch(m_WarningLevel,Kwarn,Kchck,OutFile,pAmdcDbRecordFromRDB); - - } - - if (Ifound!=1){ - Kwarn = Kwarn + 1; - OutFile << "WARNING: No way to check " << pAmdcDbRecordFromRDB->getUniversalId() << std::endl; - } - - } - - OutFile << "Checking " << NameOfTheSet << " content ended" << std::endl; - - OutFile.close(); - -} - -void AmdcDumpOracle::DumpAECT( IRDBAccessSvc* pIRDBAccessSvc, std::string TagAdd, int& Kwarn,int& Kchck){ - - std::string NameOfTheSet = "AECT"; - - std::ofstream OutFile; - std::string FileName = "Out.AmdcOracle."+ TagAdd + NameOfTheSet; - OutFile.open(FileName.c_str()); - OutFile << setiosflags(std::ios::fixed); - OutFile << "Checking " << NameOfTheSet << " content started" << std::endl; - Kwarn = -1 ; - Kchck = 0 ; - - IRDBRecordset_ptr pIRDBRecordsetFromRDB = pIRDBAccessSvc->getRecordsetPtr(NameOfTheSet,"RDB"); - if (pIRDBRecordsetFromRDB->size() == 0){ - OutFile << "No " << NameOfTheSet << " in RDB " << std::endl; - return; - } - - IRDBRecordset_ptr pIRDBRecordsetFromAmdc = pIRDBAccessSvc->getRecordsetPtr(NameOfTheSet,"Amdc"); - if (pIRDBRecordsetFromAmdc->size() == 0){ - OutFile << "No " << NameOfTheSet << " in Amdc " << std::endl; - return; - } - - Kwarn = 0 ; - - std::vector<IRDBRecord*>::const_iterator itFromRDB = pIRDBRecordsetFromRDB->begin(); - for ( ; itFromRDB<pIRDBRecordsetFromRDB->end(); itFromRDB++){ - const AmdcDbRecord* pAmdcDbRecordFromRDB = dynamic_cast<const AmdcDbRecord*>((*itFromRDB)); - if (pAmdcDbRecordFromRDB == 0){ - OutFile << "No way to cast pAmdcDbRecordFromRDB for " << NameOfTheSet << std::endl; - return; - } - int Ifound = 0 ; - std::vector<IRDBRecord*>::const_iterator itFromAmdc = pIRDBRecordsetFromAmdc->begin(); - for ( ; itFromAmdc<pIRDBRecordsetFromAmdc->end(); itFromAmdc++){ - if (Ifound==1) continue; - - Ifound = 1; - - const AmdcDbRecord* pAmdcDbRecordFromAmdc = dynamic_cast<const AmdcDbRecord*>((*itFromAmdc)); - if (pAmdcDbRecordFromAmdc == 0){ - OutFile << "No way to cast pAmdcDbRecordFromAmdc for " << NameOfTheSet << std::endl; - return; - } - - if (Ifound == 1) pAmdcDbRecordFromAmdc->doIMatch(m_WarningLevel,Kwarn,Kchck,OutFile,pAmdcDbRecordFromRDB); - - } - - if (Ifound!=1){ - Kwarn = Kwarn + 1; - OutFile << "WARNING: No way to check " << pAmdcDbRecordFromRDB->getUniversalId() << std::endl; - } - - } - - OutFile << "Checking " << NameOfTheSet << " content ended" << std::endl; - - OutFile.close(); - -} - -void AmdcDumpOracle::DumpECST( IRDBAccessSvc* pIRDBAccessSvc, std::string TagAdd, int& Kwarn,int& Kchck){ - - std::string NameOfTheSet = "ECST"; - - std::ofstream OutFile; - std::string FileName = "Out.AmdcOracle."+ TagAdd + NameOfTheSet; - OutFile.open(FileName.c_str()); - OutFile << setiosflags(std::ios::fixed); - OutFile << "Checking " << NameOfTheSet << " content started" << std::endl; - Kwarn = -1 ; - Kchck = 0 ; - - IRDBRecordset_ptr pIRDBRecordsetFromRDB = pIRDBAccessSvc->getRecordsetPtr(NameOfTheSet,"RDB"); - if (pIRDBRecordsetFromRDB->size() == 0){ - OutFile << "No " << NameOfTheSet << " in RDB " << std::endl; - return; - } - - IRDBRecordset_ptr pIRDBRecordsetFromAmdc = pIRDBAccessSvc->getRecordsetPtr(NameOfTheSet,"Amdc"); - if (pIRDBRecordsetFromAmdc->size() == 0){ - OutFile << "No " << NameOfTheSet << " in Amdc " << std::endl; - return; - } - - Kwarn = 0 ; - - std::vector<IRDBRecord*>::const_iterator itFromRDB = pIRDBRecordsetFromRDB->begin(); - for ( ; itFromRDB<pIRDBRecordsetFromRDB->end(); itFromRDB++){ - const AmdcDbRecord* pAmdcDbRecordFromRDB = dynamic_cast<const AmdcDbRecord*>((*itFromRDB)); - if (pAmdcDbRecordFromRDB == 0){ - OutFile << "No way to cast pAmdcDbRecordFromRDB for " << NameOfTheSet << std::endl; - return; - } - int Ifound = 0 ; - std::vector<IRDBRecord*>::const_iterator itFromAmdc = pIRDBRecordsetFromAmdc->begin(); - for ( ; itFromAmdc<pIRDBRecordsetFromAmdc->end(); itFromAmdc++){ - if (Ifound==1) continue; - - Ifound = 1; - - const AmdcDbRecord* pAmdcDbRecordFromAmdc = dynamic_cast<const AmdcDbRecord*>((*itFromAmdc)); - if (pAmdcDbRecordFromAmdc == 0){ - OutFile << "No way to cast pAmdcDbRecordFromAmdc for " << NameOfTheSet << std::endl; - return; - } - - if (Ifound == 1) pAmdcDbRecordFromAmdc->doIMatch(m_WarningLevel,Kwarn,Kchck,OutFile,pAmdcDbRecordFromRDB); - - } - - if (Ifound!=1){ - Kwarn = Kwarn + 1; - OutFile << "WARNING: No way to check " << pAmdcDbRecordFromRDB->getUniversalId() << std::endl; - } - - } - - OutFile << "Checking " << NameOfTheSet << " content ended" << std::endl; - - OutFile.close(); - -} - -void AmdcDumpOracle::DumpFEET( IRDBAccessSvc* pIRDBAccessSvc, std::string TagAdd, int& Kwarn,int& Kchck){ - - std::string NameOfTheSet = "FEET"; - - std::ofstream OutFile; - std::string FileName = "Out.AmdcOracle."+ TagAdd + NameOfTheSet; - OutFile.open(FileName.c_str()); - OutFile << setiosflags(std::ios::fixed); - OutFile << "Checking " << NameOfTheSet << " content started" << std::endl; - Kwarn = -1 ; - Kchck = 0 ; - - IRDBRecordset_ptr pIRDBRecordsetFromRDB = pIRDBAccessSvc->getRecordsetPtr(NameOfTheSet,"RDB"); - if (pIRDBRecordsetFromRDB->size() == 0){ - OutFile << "No " << NameOfTheSet << " in RDB " << std::endl; - return; - } - - IRDBRecordset_ptr pIRDBRecordsetFromAmdc = pIRDBAccessSvc->getRecordsetPtr(NameOfTheSet,"Amdc"); - if (pIRDBRecordsetFromAmdc->size() == 0){ - OutFile << "No " << NameOfTheSet << " in Amdc " << std::endl; - return; - } - - Kwarn = 0 ; - - std::vector<IRDBRecord*>::const_iterator itFromRDB = pIRDBRecordsetFromRDB->begin(); - for ( ; itFromRDB<pIRDBRecordsetFromRDB->end(); itFromRDB++){ - const AmdcDbRecord* pAmdcDbRecordFromRDB = dynamic_cast<const AmdcDbRecord*>((*itFromRDB)); - if (pAmdcDbRecordFromRDB == 0){ - OutFile << "No way to cast pAmdcDbRecordFromRDB for " << NameOfTheSet << std::endl; - return; - } - int Ifound = 0 ; - std::vector<IRDBRecord*>::const_iterator itFromAmdc = pIRDBRecordsetFromAmdc->begin(); - for ( ; itFromAmdc<pIRDBRecordsetFromAmdc->end(); itFromAmdc++){ - if (Ifound==1) continue; - - Ifound = 1; - - const AmdcDbRecord* pAmdcDbRecordFromAmdc = dynamic_cast<const AmdcDbRecord*>((*itFromAmdc)); - if (pAmdcDbRecordFromAmdc == 0){ - OutFile << "No way to cast pAmdcDbRecordFromAmdc for " << NameOfTheSet << std::endl; - return; - } - - if (Ifound == 1) pAmdcDbRecordFromAmdc->doIMatch(m_WarningLevel,Kwarn,Kchck,OutFile,pAmdcDbRecordFromRDB); - - } - - if (Ifound!=1){ - Kwarn = Kwarn + 1; - OutFile << "WARNING: No way to check " << pAmdcDbRecordFromRDB->getUniversalId() << std::endl; - } - - } - - OutFile << "Checking " << NameOfTheSet << " content ended" << std::endl; - - OutFile.close(); - -} - -void AmdcDumpOracle::DumpGENV( IRDBAccessSvc* pIRDBAccessSvc, std::string TagAdd, int& Kwarn,int& Kchck){ - - std::string NameOfTheSet = "GENV"; - - std::ofstream OutFile; - std::string FileName = "Out.AmdcOracle."+ TagAdd + NameOfTheSet; - OutFile.open(FileName.c_str()); - OutFile << setiosflags(std::ios::fixed); - OutFile << "Checking " << NameOfTheSet << " content started" << std::endl; - Kwarn = -1 ; - Kchck = 0 ; - - IRDBRecordset_ptr pIRDBRecordsetFromRDB = pIRDBAccessSvc->getRecordsetPtr(NameOfTheSet,"RDB"); - if (pIRDBRecordsetFromRDB->size() == 0){ - OutFile << "No " << NameOfTheSet << " in RDB " << std::endl; - return; - } - - IRDBRecordset_ptr pIRDBRecordsetFromAmdc = pIRDBAccessSvc->getRecordsetPtr(NameOfTheSet,"Amdc"); - if (pIRDBRecordsetFromAmdc->size() == 0){ - OutFile << "No " << NameOfTheSet << " in Amdc " << std::endl; - return; - } - - Kwarn = 0 ; - - std::vector<IRDBRecord*>::const_iterator itFromRDB = pIRDBRecordsetFromRDB->begin(); - for ( ; itFromRDB<pIRDBRecordsetFromRDB->end(); itFromRDB++){ - const AmdcDbRecord* pAmdcDbRecordFromRDB = dynamic_cast<const AmdcDbRecord*>((*itFromRDB)); - if (pAmdcDbRecordFromRDB == 0){ - OutFile << "No way to cast pAmdcDbRecordFromRDB for " << NameOfTheSet << std::endl; - return; - } - int Ifound = 0 ; - std::vector<IRDBRecord*>::const_iterator itFromAmdc = pIRDBRecordsetFromAmdc->begin(); - for ( ; itFromAmdc<pIRDBRecordsetFromAmdc->end(); itFromAmdc++){ - if (Ifound==1) continue; - - Ifound = 1; - - const AmdcDbRecord* pAmdcDbRecordFromAmdc = dynamic_cast<const AmdcDbRecord*>((*itFromAmdc)); - if (pAmdcDbRecordFromAmdc == 0){ - OutFile << "No way to cast pAmdcDbRecordFromAmdc for " << NameOfTheSet << std::endl; - return; - } - - if (Ifound == 1) pAmdcDbRecordFromAmdc->doIMatch(m_WarningLevel,Kwarn,Kchck,OutFile,pAmdcDbRecordFromRDB); - - } - - if (Ifound!=1){ - Kwarn = Kwarn + 1; - OutFile << "WARNING: No way to check " << pAmdcDbRecordFromRDB->getUniversalId() << std::endl; - } - - } - - OutFile << "Checking " << NameOfTheSet << " content ended" << std::endl; - - OutFile.close(); - -} - - -void AmdcDumpOracle::DumpJDSH( IRDBAccessSvc* pIRDBAccessSvc, std::string TagAdd, int& Kwarn,int& Kchck){ - - std::string NameOfTheSet = "JDSH"; - - std::ofstream OutFile; - std::string FileName = "Out.AmdcOracle."+ TagAdd + NameOfTheSet; - OutFile.open(FileName.c_str()); - OutFile << setiosflags(std::ios::fixed); - OutFile << "Checking " << NameOfTheSet << " content started" << std::endl; - Kwarn = -1 ; - Kchck = 0 ; - - IRDBRecordset_ptr pIRDBRecordsetFromRDB = pIRDBAccessSvc->getRecordsetPtr(NameOfTheSet,"RDB"); - if (pIRDBRecordsetFromRDB->size() == 0){ - OutFile << "No " << NameOfTheSet << " in RDB " << std::endl; - return; - } - - IRDBRecordset_ptr pIRDBRecordsetFromAmdc = pIRDBAccessSvc->getRecordsetPtr(NameOfTheSet,"Amdc"); - if (pIRDBRecordsetFromAmdc->size() == 0){ - OutFile << "No " << NameOfTheSet << " in Amdc " << std::endl; - return; - } - - Kwarn = 0 ; - - std::vector<IRDBRecord*>::const_iterator itFromRDB = pIRDBRecordsetFromRDB->begin(); - for ( ; itFromRDB<pIRDBRecordsetFromRDB->end(); itFromRDB++){ - const AmdcDbRecord* pAmdcDbRecordFromRDB = dynamic_cast<const AmdcDbRecord*>((*itFromRDB)); - if (pAmdcDbRecordFromRDB == 0){ - OutFile << "No way to cast pAmdcDbRecordFromRDB for " << NameOfTheSet << std::endl; - return; - } - int Ifound = 0 ; - std::vector<IRDBRecord*>::const_iterator itFromAmdc = pIRDBRecordsetFromAmdc->begin(); - for ( ; itFromAmdc<pIRDBRecordsetFromAmdc->end(); itFromAmdc++){ - if (Ifound==1) continue; - - Ifound = 1; - - const AmdcDbRecord* pAmdcDbRecordFromAmdc = dynamic_cast<const AmdcDbRecord*>((*itFromAmdc)); - if (pAmdcDbRecordFromAmdc == 0){ - OutFile << "No way to cast pAmdcDbRecordFromAmdc for " << NameOfTheSet << std::endl; - return; - } - - if (Ifound == 1) pAmdcDbRecordFromAmdc->doIMatch(m_WarningLevel,Kwarn,Kchck,OutFile,pAmdcDbRecordFromRDB); - - } - - if (Ifound!=1){ - Kwarn = Kwarn + 1; - OutFile << "WARNING: No way to check " << pAmdcDbRecordFromRDB->getUniversalId() << std::endl; - } - - } - - OutFile << "Checking " << NameOfTheSet << " content ended" << std::endl; - - OutFile.close(); - -} - -void AmdcDumpOracle::DumpJFSH( IRDBAccessSvc* pIRDBAccessSvc, std::string TagAdd, int& Kwarn,int& Kchck){ - - std::string NameOfTheSet = "JFSH"; - - std::ofstream OutFile; - std::string FileName = "Out.AmdcOracle."+ TagAdd + NameOfTheSet; - OutFile.open(FileName.c_str()); - OutFile << setiosflags(std::ios::fixed); - OutFile << "Checking " << NameOfTheSet << " content started" << std::endl; - Kwarn = -1 ; - Kchck = 0 ; - - IRDBRecordset_ptr pIRDBRecordsetFromRDB = pIRDBAccessSvc->getRecordsetPtr(NameOfTheSet,"RDB"); - if (pIRDBRecordsetFromRDB->size() == 0){ - OutFile << "No " << NameOfTheSet << " in RDB " << std::endl; - return; - } - - IRDBRecordset_ptr pIRDBRecordsetFromAmdc = pIRDBAccessSvc->getRecordsetPtr(NameOfTheSet,"Amdc"); - if (pIRDBRecordsetFromAmdc->size() == 0){ - OutFile << "No " << NameOfTheSet << " in Amdc " << std::endl; - return; - } - - Kwarn = 0 ; - - std::vector<IRDBRecord*>::const_iterator itFromRDB = pIRDBRecordsetFromRDB->begin(); - for ( ; itFromRDB<pIRDBRecordsetFromRDB->end(); itFromRDB++){ - const AmdcDbRecord* pAmdcDbRecordFromRDB = dynamic_cast<const AmdcDbRecord*>((*itFromRDB)); - if (pAmdcDbRecordFromRDB == 0){ - OutFile << "No way to cast pAmdcDbRecordFromRDB for " << NameOfTheSet << std::endl; - return; - } - int Ifound = 0 ; - std::vector<IRDBRecord*>::const_iterator itFromAmdc = pIRDBRecordsetFromAmdc->begin(); - for ( ; itFromAmdc<pIRDBRecordsetFromAmdc->end(); itFromAmdc++){ - if (Ifound==1) continue; - - Ifound = 1; - - const AmdcDbRecord* pAmdcDbRecordFromAmdc = dynamic_cast<const AmdcDbRecord*>((*itFromAmdc)); - if (pAmdcDbRecordFromAmdc == 0){ - OutFile << "No way to cast pAmdcDbRecordFromAmdc for " << NameOfTheSet << std::endl; - return; - } - - if (Ifound == 1) pAmdcDbRecordFromAmdc->doIMatch(m_WarningLevel,Kwarn,Kchck,OutFile,pAmdcDbRecordFromRDB); - - } - - if (Ifound!=1){ - Kwarn = Kwarn + 1; - OutFile << "WARNING: No way to check " << pAmdcDbRecordFromRDB->getUniversalId() << std::endl; - } - - } - - OutFile << "Checking " << NameOfTheSet << " content ended" << std::endl; - - OutFile.close(); - -} - -void AmdcDumpOracle::DumpJTSH( IRDBAccessSvc* pIRDBAccessSvc, std::string TagAdd, int& Kwarn,int& Kchck){ - - std::string NameOfTheSet = "JTSH"; - - std::ofstream OutFile; - std::string FileName = "Out.AmdcOracle."+ TagAdd + NameOfTheSet; - OutFile.open(FileName.c_str()); - OutFile << setiosflags(std::ios::fixed); - OutFile << "Checking " << NameOfTheSet << " content started" << std::endl; - Kwarn = -1 ; - Kchck = 0 ; - - IRDBRecordset_ptr pIRDBRecordsetFromRDB = pIRDBAccessSvc->getRecordsetPtr(NameOfTheSet,"RDB"); - if (pIRDBRecordsetFromRDB->size() == 0){ - OutFile << "No " << NameOfTheSet << " in RDB " << std::endl; - return; - } - - IRDBRecordset_ptr pIRDBRecordsetFromAmdc = pIRDBAccessSvc->getRecordsetPtr(NameOfTheSet,"Amdc"); - if (pIRDBRecordsetFromAmdc->size() == 0){ - OutFile << "No " << NameOfTheSet << " in Amdc " << std::endl; - return; - } - - Kwarn = 0 ; - - std::vector<IRDBRecord*>::const_iterator itFromRDB = pIRDBRecordsetFromRDB->begin(); - for ( ; itFromRDB<pIRDBRecordsetFromRDB->end(); itFromRDB++){ - const AmdcDbRecord* pAmdcDbRecordFromRDB = dynamic_cast<const AmdcDbRecord*>((*itFromRDB)); - if (pAmdcDbRecordFromRDB == 0){ - OutFile << "No way to cast pAmdcDbRecordFromRDB for " << NameOfTheSet << std::endl; - return; - } - int Ifound = 0 ; - std::vector<IRDBRecord*>::const_iterator itFromAmdc = pIRDBRecordsetFromAmdc->begin(); - for ( ; itFromAmdc<pIRDBRecordsetFromAmdc->end(); itFromAmdc++){ - if (Ifound==1) continue; - - Ifound = 1; - - const AmdcDbRecord* pAmdcDbRecordFromAmdc = dynamic_cast<const AmdcDbRecord*>((*itFromAmdc)); - if (pAmdcDbRecordFromAmdc == 0){ - OutFile << "No way to cast pAmdcDbRecordFromAmdc for " << NameOfTheSet << std::endl; - return; - } - - if (Ifound == 1) pAmdcDbRecordFromAmdc->doIMatch(m_WarningLevel,Kwarn,Kchck,OutFile,pAmdcDbRecordFromRDB); - - } - - if (Ifound!=1){ - Kwarn = Kwarn + 1; - OutFile << "WARNING: No way to check " << pAmdcDbRecordFromRDB->getUniversalId() << std::endl; - } - - } - - OutFile << "Checking " << NameOfTheSet << " content ended" << std::endl; - - OutFile.close(); - -} - -void AmdcDumpOracle::DumpMBAP( IRDBAccessSvc* pIRDBAccessSvc, std::string TagAdd, int& Kwarn,int& Kchck){ - - std::string NameOfTheSet = "MBAP"; - - std::ofstream OutFile; - std::string FileName = "Out.AmdcOracle."+ TagAdd + NameOfTheSet; - OutFile.open(FileName.c_str()); - OutFile << setiosflags(std::ios::fixed); - OutFile << "Checking " << NameOfTheSet << " content started" << std::endl; - Kwarn = -1 ; - Kchck = 0 ; - - IRDBRecordset_ptr pIRDBRecordsetFromRDB = pIRDBAccessSvc->getRecordsetPtr(NameOfTheSet,"RDB"); - if (pIRDBRecordsetFromRDB->size() == 0){ - OutFile << "No " << NameOfTheSet << " in RDB " << std::endl; - return; - } - - IRDBRecordset_ptr pIRDBRecordsetFromAmdc = pIRDBAccessSvc->getRecordsetPtr(NameOfTheSet,"Amdc"); - if (pIRDBRecordsetFromAmdc->size() == 0){ - OutFile << "No " << NameOfTheSet << " in Amdc " << std::endl; - return; - } - - Kwarn = 0 ; - - std::vector<IRDBRecord*>::const_iterator itFromRDB = pIRDBRecordsetFromRDB->begin(); - for ( ; itFromRDB<pIRDBRecordsetFromRDB->end(); itFromRDB++){ - const AmdcDbRecord* pAmdcDbRecordFromRDB = dynamic_cast<const AmdcDbRecord*>((*itFromRDB)); - if (pAmdcDbRecordFromRDB == 0){ - OutFile << "No way to cast pAmdcDbRecordFromRDB for " << NameOfTheSet << std::endl; - return; - } - int Ifound = 0 ; - std::vector<IRDBRecord*>::const_iterator itFromAmdc = pIRDBRecordsetFromAmdc->begin(); - for ( ; itFromAmdc<pIRDBRecordsetFromAmdc->end(); itFromAmdc++){ - if (Ifound==1) continue; - - Ifound = 1; - - const AmdcDbRecord* pAmdcDbRecordFromAmdc = dynamic_cast<const AmdcDbRecord*>((*itFromAmdc)); - if (pAmdcDbRecordFromAmdc == 0){ - OutFile << "No way to cast pAmdcDbRecordFromAmdc for " << NameOfTheSet << std::endl; - return; - } - - if (Ifound == 1) pAmdcDbRecordFromAmdc->doIMatch(m_WarningLevel,Kwarn,Kchck,OutFile,pAmdcDbRecordFromRDB); - - } - - if (Ifound!=1){ - Kwarn = Kwarn + 1; - OutFile << "WARNING: No way to check " << pAmdcDbRecordFromRDB->getUniversalId() << std::endl; - } - - } - - OutFile << "Checking " << NameOfTheSet << " content ended" << std::endl; - - OutFile.close(); - -} - -void AmdcDumpOracle::DumpAgddXMLVariables( IRDBAccessSvc* pIRDBAccessSvc, std::string TagAdd, int& Kwarn,int& Kchck){ - - std::string NameOfTheSet = "AgddXMLVariables"; - - std::ofstream OutFile; - std::string FileName = "Out.AmdcOracle."+ TagAdd + NameOfTheSet; - OutFile.open(FileName.c_str()); - OutFile << setiosflags(std::ios::fixed); - OutFile << "Checking " << NameOfTheSet << " content started" << std::endl; - Kwarn = -1 ; - Kchck = 0 ; - - IRDBRecordset_ptr pIRDBRecordsetFromRDB = pIRDBAccessSvc->getRecordsetPtr(NameOfTheSet,"RDB"); - if (pIRDBRecordsetFromRDB->size() == 0){ - OutFile << "No " << NameOfTheSet << " in RDB " << std::endl; - return; - } - - IRDBRecordset_ptr pIRDBRecordsetFromAmdc = pIRDBAccessSvc->getRecordsetPtr(NameOfTheSet,"Amdc"); - if (pIRDBRecordsetFromAmdc->size() == 0){ - OutFile << "No " << NameOfTheSet << " in Amdc " << std::endl; - return; - } - - Kwarn = 0 ; - - std::vector<IRDBRecord*>::const_iterator itFromRDB = pIRDBRecordsetFromRDB->begin(); - for ( ; itFromRDB<pIRDBRecordsetFromRDB->end(); itFromRDB++){ - const AmdcDbRecord* pAmdcDbRecordFromRDB = dynamic_cast<const AmdcDbRecord*>((*itFromRDB)); - if (pAmdcDbRecordFromRDB == 0){ - OutFile << "No way to cast pAmdcDbRecordFromRDB for " << NameOfTheSet << std::endl; - return; - } - int Ifound = 0 ; - std::vector<IRDBRecord*>::const_iterator itFromAmdc = pIRDBRecordsetFromAmdc->begin(); - for ( ; itFromAmdc<pIRDBRecordsetFromAmdc->end(); itFromAmdc++){ - if (Ifound==1) continue; - - Ifound = 1; - - const AmdcDbRecord* pAmdcDbRecordFromAmdc = dynamic_cast<const AmdcDbRecord*>((*itFromAmdc)); - if (pAmdcDbRecordFromAmdc == 0){ - OutFile << "No way to cast pAmdcDbRecordFromAmdc for " << NameOfTheSet << std::endl; - return; - } - - if (Ifound == 1) Ifound = pAmdcDbRecordFromAmdc->doWeMatchForThisVariable("NameOfVariable",pAmdcDbRecordFromRDB); - - if (Ifound == 1) pAmdcDbRecordFromAmdc->doIMatch(m_WarningLevel,Kwarn,Kchck,OutFile,pAmdcDbRecordFromRDB); - - } - - if (Ifound!=1){ - Kwarn = Kwarn + 1; - OutFile << "WARNING: No way to check " << pAmdcDbRecordFromRDB->getUniversalId() << std::endl; - } - - } - - OutFile << "Checking " << NameOfTheSet << " content ended" << std::endl; - - OutFile.close(); - -} - void AmdcDumpOracle::DumpHwSwIdMapping( IRDBAccessSvc* pIRDBAccessSvc, std::string TagAdd, int& Kwarn,int& Kchck){ std::string NameOfTheSet = "HwSwIdMapping"; -- GitLab From 04a201848150d2cc170833275741d2e57a14e79b Mon Sep 17 00:00:00 2001 From: Vakho Tsulaia <vakhtang.tsulaia@cern.ch> Date: Sat, 16 Jun 2018 01:07:07 +0200 Subject: [PATCH 170/562] Fixed segmentation fault in the job that generates SQL files for Muon geometry DB Also tidied up the AmdcDb code a little bit Former-commit-id: 618257e1540b51238b719426aaa8671a21562f25 --- .../Amdcsimrec/AmdcDb/AmdcDb/AmdcDb.h | 105 ++++++++---------- .../Amdcsimrec/AmdcDb/src/AmdcDb.cxx | 80 ++++++------- 2 files changed, 77 insertions(+), 108 deletions(-) diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDb.h b/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDb.h index 039bf29f42a3..539f5e9a4ada 100755 --- a/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDb.h +++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDb.h @@ -8,76 +8,62 @@ #include "AthenaBaseComps/AthService.h" #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" - -class StoreGateSvc; - #include "AthenaKernel/IOVSvcDefs.h" - -///////////////////////////////////////////////////////////////////////////// #include "AmdcDb/AmdcDbMisc.h" - #include "AmdcDb/IRDBAccessSvcWithUpdate.h" +#include "RDBAccessSvc/IRDBAccessSvc.h" +#include "RDBAccessSvc/IRDBQuery.h" +#include <memory> +class StoreGateSvc; class AmdcsimrecAthenaSvc; - class AmdcDbSvc; -class AmdcDbRecordset; -class IRDBRecordset; -#include "RDBAccessSvc/IRDBQuery.h" -#include <memory> template <class TYPE> class SvcFactory; - /** - @class AmdcDb - - This class is an implementation of the class IRDBAccessSvc - - @author samusog@cern.ch - - */ - -class AmdcDb : public AthService, virtual public IRDBAccessSvcWithUpdate { -public: -/////////////////////////////////// - +/** + * @class AmdcDb + * + * This class is an implementation of the class IRDBAccessSvc + * + * @author samusog@cern.ch + * + */ + +class AmdcDb final : public AthService, virtual public IRDBAccessSvcWithUpdate { + public: static const InterfaceID& interfaceID() { return IID_IRDBAccessSvc; } - virtual StatusCode initialize(); - virtual StatusCode finalize(); + virtual StatusCode initialize() override; + virtual StatusCode finalize() override; - virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface ); + virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface ) override; - virtual bool InitializedSvc(); - virtual bool UsableSvc(); - virtual StatusCode UpdatedSvc(IOVSVC_CALLBACK_ARGS); + virtual bool InitializedSvc() override; + virtual bool UsableSvc() override; + virtual StatusCode UpdatedSvc(IOVSVC_CALLBACK_ARGS) override; - virtual StatusCode AmdcsimrecAthenaSvcUpdatedSvc(IOVSVC_CALLBACK_ARGS); + StatusCode AmdcsimrecAthenaSvcUpdatedSvc(IOVSVC_CALLBACK_ARGS); - virtual const IRDBRecordset* getRecordset(const std::string& node, - const std::string& tag, - const std::string& tag2node="", - const std::string& connName="ATLASDD"); - -//Functions -// of IRDBAccessSvc Not implemented - virtual bool connect (const std::string& connName); - virtual bool disconnect(const std::string& connName); - virtual bool shutdown( const std::string& connName); + virtual IRDBRecordset_ptr getRecordsetPtr(const std::string& node, + const std::string& tag, + const std::string& tag2node , + const std::string& connName) override; + + //Functions of IRDBAccessSvc Not implemented + virtual bool connect (const std::string& connName) override; + virtual bool disconnect(const std::string& connName) override; + virtual bool shutdown( const std::string& connName) override; virtual std::string getChildTag(const std::string& childNode, const std::string& parentTag, const std::string& parentNode, - const std::string& connName); + const std::string& connName) override; std::unique_ptr<IRDBQuery> getQuery(const std::string& node, const std::string& tag, const std::string& tag2node, - const std::string& connName); - virtual IRDBRecordset_ptr getRecordsetPtr(const std::string& node, - const std::string& tag, - const std::string& tag2node , - const std::string& connName); + const std::string& connName) override; virtual RDBTagDetails getTagDetails(const std::string& tag, - const std::string& connName = "ATLASDD") ; + const std::string& connName = "ATLASDD") override; friend class SvcFactory<AmdcDb>; // Standard Constructor @@ -86,13 +72,11 @@ public: // Standard Destructor virtual ~AmdcDb(); -private: -/////////////////////////////////// - + private: bool m_IsUsable ; //!< Tell usuability state - + bool m_IsInitialized ; //!< Tell initialisation state - + StoreGateSvc* p_detStore ; //!< Pointer On detector store AmdcDbSvc* p_AmdcDbSvcFromAmdc ; //!< Pointer on AmdcDbSvc @@ -123,18 +107,17 @@ private: std::vector<int> m_ValFromRDBEpsLengthCM ; //!< Control precision printing std::vector<int> m_ValFromRDBEpsAngle ; //!< Control precision printing - AmdcDbRecordset* p_AmdcDbRecordsetEmptyOne ; //!< Pointer on an empty AmdcDbRecordset + IRDBRecordset_ptr m_emptyRecordset ; //!< Pointer on an empty Recordset ServiceHandle<AmdcsimrecAthenaSvc> p_AmdcsimrecAthenaSvc; //!< Pointer On AmdcsimrecAthenaSvc -//Db Keys - std::string m_detectorKey ; - std::string m_detectorNode ; - - virtual StatusCode regFcnAmdcsimrecAthenaSvcUpdatedSvc(); - StatusCode DoUpdatedSvc(); - int m_AmdcsimrecAthenaSvcUpdatedSvcDONE ; + //Db Keys + std::string m_detectorKey ; + std::string m_detectorNode ; + StatusCode regFcnAmdcsimrecAthenaSvcUpdatedSvc(); + StatusCode DoUpdatedSvc(); + int m_AmdcsimrecAthenaSvcUpdatedSvcDONE ; }; #endif diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb.cxx b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb.cxx index fc5dc78afb48..d42b79c92b22 100755 --- a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb.cxx +++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb.cxx @@ -8,31 +8,22 @@ #include "GaudiKernel/SmartDataPtr.h" #include "GaudiKernel/IDataProviderSvc.h" -//----------------------------------------------------------------// - #include "RDBAccessSvc/IRDBRecord.h" #include "RDBAccessSvc/IRDBRecordset.h" -///////////////////////////////////////////////////////// -#include "AmdcDb/AmdcDb.h" - -//----------------------------------------------------------------// #include "AmdcAth/AmdcsimrecAthenaSvc.h" - +#include "AmdcDb/AmdcDb.h" #include "AmdcDb/AmdcDbSvc.h" #include "AmdcDb/AmdcDbRecordset.h" #include "AmdcDb/AmdcDbSvcMakerFromRDB.h" #include "AmdcDb/AmdcDbSvcMakerFromAmdc.h" /// Standard Constructor -AmdcDb::AmdcDb(const std::string& name,ISvcLocator* svc): - AthService(name,svc) , -p_AmdcsimrecAthenaSvc ( "AmdcsimrecAthenaSvc",name ) +AmdcDb::AmdcDb(const std::string& name,ISvcLocator* svc) + : AthService(name,svc) + , m_emptyRecordset(new AmdcDbRecordset()) + , p_AmdcsimrecAthenaSvc ( "AmdcsimrecAthenaSvc",name ) { - - p_AmdcDbRecordsetEmptyOne = 0 ; - -//Set Default values p_AmdcDbSvcFromAmdc = 0 ; p_AmdcDbSvcFromRDB = 0 ; @@ -67,8 +58,7 @@ p_AmdcsimrecAthenaSvc ( "AmdcsimrecAthenaSvc",name ) m_ValFromRDBEpsLengthCM.push_back(DummyInt) ; m_ValFromRDBEpsLengthCM.clear () ; m_ValFromRDBEpsAngle.push_back(DummyInt) ; m_ValFromRDBEpsAngle.clear () ; - -//Declare the properties + //Declare the properties declareProperty("AMDBtag", m_AMDBtag) ; declareProperty("UglyCodeOn", m_UglyCodeOn) ; @@ -97,7 +87,6 @@ p_AmdcsimrecAthenaSvc ( "AmdcsimrecAthenaSvc",name ) declareProperty("AmdcsimrecAthenaSvc", p_AmdcsimrecAthenaSvc); p_detStore = 0 ; - } /// Standard Destructor @@ -109,7 +98,7 @@ AmdcDb::~AmdcDb() { /// Service initialisation StatusCode AmdcDb::initialize() { - ATH_MSG_INFO( "Initialisation started " ) ; + ATH_MSG_INFO( "Initialisation started" ) ; StatusCode sc=AthService::initialize(); if (sc.isFailure()) { @@ -216,6 +205,7 @@ StatusCode AmdcDb::regFcnAmdcsimrecAthenaSvcUpdatedSvc() return StatusCode::SUCCESS; } + StatusCode AmdcDb::AmdcsimrecAthenaSvcUpdatedSvc(IOVSVC_CALLBACK_ARGS) { ATH_MSG_INFO( "AmdcsimrecAthenaSvcUpdatedSvc called " ) ; @@ -238,6 +228,7 @@ StatusCode AmdcDb::AmdcsimrecAthenaSvcUpdatedSvc(IOVSVC_CALLBACK_ARGS) return StatusCode::SUCCESS; } + StatusCode AmdcDb::DoUpdatedSvc() { if ( !m_AmdcsimrecAthenaSvcUpdatedSvcDONE ){ @@ -310,51 +301,46 @@ StatusCode AmdcDb::queryInterface(const InterfaceID& riid, void** ppvInterface) addRef(); return StatusCode::SUCCESS; } - -const IRDBRecordset* AmdcDb::getRecordset(const std::string& node, - const std::string& tag, - const std::string& /*tag2node*/ , - const std::string& /*connName*/) + +IRDBRecordset_ptr AmdcDb::getRecordsetPtr(const std::string& node, + const std::string& tag, + const std::string& /*tag2node*/ , + const std::string& /*connName*/) { - if ( p_AmdcDbRecordsetEmptyOne == 0 ) p_AmdcDbRecordsetEmptyOne = new AmdcDbRecordset(); - if ( tag=="RDB" ) { - const IRDBRecordset* pIRDBRecordset = p_AmdcDbSvcFromRDB->getRecordset(node); - if (pIRDBRecordset == 0) return p_AmdcDbRecordsetEmptyOne; - return pIRDBRecordset; - } - if ( tag=="Amdc" ) { - const IRDBRecordset* pIRDBRecordset = p_AmdcDbSvcFromAmdc->getRecordset(node); - if (pIRDBRecordset == 0) return p_AmdcDbRecordsetEmptyOne; - return pIRDBRecordset; - } - return p_AmdcDbRecordsetEmptyOne; + const IRDBRecordset* pIRDBRecordset{nullptr}; + if(tag=="RDB") { + pIRDBRecordset = p_AmdcDbSvcFromRDB->getRecordset(node); + } + else if(tag=="Amdc") { + pIRDBRecordset = p_AmdcDbSvcFromAmdc->getRecordset(node); + } + + if(pIRDBRecordset) + return IRDBRecordset_ptr(const_cast<IRDBRecordset*>(pIRDBRecordset)); + else + return m_emptyRecordset; } -//Functions -// of IRDBAccessSvc Not implemented +// Functions of IRDBAccessSvc Not implemented bool AmdcDb::connect (const std::string& /*connName*/ ) { std::cout << " AmdcDb::connect Not implemented " << std::endl ; return true; } + bool AmdcDb::disconnect(const std::string& /*connName*/ ) { std::cout << " AmdcDb::disconnect Not implemented " << std::endl ; return true; } + bool AmdcDb::shutdown (const std::string& /*connName*/ ) { std::cout << " AmdcDb::shutdown Not implemented " << std::endl ; return true; } + std::string AmdcDb::getChildTag(const std::string& /*childNode*/ , const std::string& /*parentTag*/ , const std::string& /*parentNode*/ , const std::string& /*connName*/ ) { std::cout << " AmdcDb::getChildTag Not implemented " << std::endl ; std::string ToBeReturned = "Not Implemented"; return ToBeReturned; } + std::unique_ptr<IRDBQuery> AmdcDb::getQuery(const std::string& /*node*/ , const std::string& /*tag*/ , const std::string& /*tag2node*/ , const std::string& /*connName*/ ){ std::cout << " AmdcDb::getQuery Not implemented " << std::endl ; return 0; } -IRDBRecordset_ptr AmdcDb::getRecordsetPtr(const std::string& node, - const std::string& /*tag*/, - const std::string& /*tag2node*/ , - const std::string& /*connName*/) -{ - IRDBRecordset* c_ptr = const_cast<IRDBRecordset*>((this)->getRecordset(node,"Amdc")); - IRDBRecordset_ptr rec = IRDBRecordset_ptr(c_ptr); - return rec; -} + RDBTagDetails AmdcDb::getTagDetails(const std::string& /*tag*/, - const std::string& /*connName*/ ) + const std::string& /*connName*/ ) { RDBTagDetails tagDetails; return tagDetails; -- GitLab From 95f8770b489c486ece0e4d2bedb4853b0803fc8d Mon Sep 17 00:00:00 2001 From: Susumu Oda <susumu.oda@cern.ch> Date: Fri, 15 Jun 2018 23:29:58 +0000 Subject: [PATCH 171/562] Removal of SiLorentzAngleTool stuff from SCT(_SLHC)_GeoModel and InDetReadoutGeometry (ATLASRECTS-4486) Former-commit-id: b3cd35d6c5af4d71fc725cefad03d37b02e63c31 --- .../InDetCondServices/ISiLorentzAngleTool.h | 3 -- .../share/testCalibChipRead.py | 4 --- .../share/testCalibRead.py | 4 --- .../share/testConfig.py | 1 - .../share/testDCSConditions.py | 1 - .../share/testMajority.py | 1 - .../share/testModuleVeto.py | 1 - .../share/testMonRead.py | 1 - .../share/testParameters.py | 1 - .../share/testReadout.py | 1 - .../share/testRodVeto.py | 1 - .../share/testSensors.py | 1 - .../share/testSilicon.py | 1 - .../share/testStripVeto.py | 1 - .../share/testSummary.py | 1 - .../share/testTdaqEnabled.py | 1 - .../src/SCTSiLorentzAngleCondAlg.cxx | 1 - .../src/SiLorentzAngleTool.cxx | 16 +---------- .../src/SiLorentzAngleTool.h | 3 -- .../InDetReadoutGeometry/SiCommonItems.h | 4 --- .../src/SiCommonItems.cxx | 16 +---------- .../src/SiDetectorElement.cxx | 5 ---- .../InDetDetDescr/SCT_GeoModel/CMakeLists.txt | 5 ++-- .../SCT_GeoModel/SCT_DetectorTool.h | 5 ---- .../SCT_GeoModel/SCT_GeoModelAthenaComps.h | 7 +---- .../SCT_GeoModel/python/SCT_GeoModelConfig.py | 10 ------- .../SCT_GeoModel/src/SCT_DetectorFactory.cxx | 1 - .../SCT_GeoModel/src/SCT_DetectorTool.cxx | 28 ------------------- .../src/SCT_GeoModelAthenaComps.cxx | 16 +---------- .../SCT_GeoModelAthenaComps.h | 5 ---- .../SCT_SLHC_GeoModel/SCT_SLHC_DetectorTool.h | 5 ---- .../src/SCT_DetectorFactory.cxx | 1 - .../src/SCT_GeoModelAthenaComps.cxx | 14 ---------- .../src/SCT_SLHC_DetectorTool.cxx | 26 ----------------- 34 files changed, 6 insertions(+), 186 deletions(-) diff --git a/InnerDetector/InDetConditions/InDetCondServices/InDetCondServices/ISiLorentzAngleTool.h b/InnerDetector/InDetConditions/InDetCondServices/InDetCondServices/ISiLorentzAngleTool.h index 54ff794c01f7..e41648dafbe4 100644 --- a/InnerDetector/InDetConditions/InDetCondServices/InDetCondServices/ISiLorentzAngleTool.h +++ b/InnerDetector/InDetConditions/InDetCondServices/InDetCondServices/ISiLorentzAngleTool.h @@ -70,9 +70,6 @@ public: /** Get depletion voltage */ virtual double getDepletionVoltage(const IdentifierHash& elementHash) const = 0; - - /** Retrieve detector manager */ - virtual StatusCode retrieveDetectorManager() = 0; }; #endif // ISiLorentzAngleTool_h diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testCalibChipRead.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testCalibChipRead.py index 19411dddb74e..755b8d61fba9 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testCalibChipRead.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testCalibChipRead.py @@ -90,10 +90,6 @@ DetFlags.writeRIOPool.all_setOff() import AtlasGeoModel.SetGeometryVersion import AtlasGeoModel.GeoModelInit -# Disable SiLorentzAngleSvc to remove -# ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service -ServiceMgr.GeoModelSvc.DetectorTools['SCT_DetectorTool'].LorentzAngleTool="" - #-------------------------------------------------------------- # Load ReadCalibData Alg and Service #-------------------------------------------------------------- diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testCalibRead.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testCalibRead.py index 78d88f9c4721..179f04e6e8bb 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testCalibRead.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testCalibRead.py @@ -84,10 +84,6 @@ DetFlags.writeRIOPool.all_setOff() import AtlasGeoModel.SetGeometryVersion import AtlasGeoModel.GeoModelInit -# Disable SiLorentzAngleSvc to remove -# ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service -ServiceMgr.GeoModelSvc.DetectorTools['SCT_DetectorTool'].LorentzAngleTool="" - #-------------------------------------------------------------- # Load ReadCalibData Alg and Service #-------------------------------------------------------------- diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testConfig.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testConfig.py index f4e7ebf10d88..11db021654b8 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testConfig.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testConfig.py @@ -61,7 +61,6 @@ import AtlasGeoModel.GeoModelInit # Disable SiLorentzAngleSvc to remove # ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc="" -ServiceMgr.GeoModelSvc.DetectorTools['SCT_DetectorTool'].LorentzAngleTool="" from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testDCSConditions.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testDCSConditions.py index 745fb33e30c9..fa51c726235f 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testDCSConditions.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testDCSConditions.py @@ -73,7 +73,6 @@ import AtlasGeoModel.GeoModelInit # Disable SiLorentzAngleSvc to remove # ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc="" -ServiceMgr.GeoModelSvc.DetectorTools['SCT_DetectorTool'].LorentzAngleTool="" #-------------------------------------------------------------- # Load DCSConditions Alg and Service diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testMajority.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testMajority.py index 9d23d725c408..171fc883d164 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testMajority.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testMajority.py @@ -61,7 +61,6 @@ import AtlasGeoModel.GeoModelInit # Disable SiLorentzAngleSvc to remove # ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc="" -ServiceMgr.GeoModelSvc.DetectorTools['SCT_DetectorTool'].LorentzAngleTool="" #-------------------------------------------------------------- # Load conditions services and alg diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testModuleVeto.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testModuleVeto.py index 3c5012f35f0a..3468eb5dd1d9 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testModuleVeto.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testModuleVeto.py @@ -62,7 +62,6 @@ import AtlasGeoModel.GeoModelInit # Disable SiLorentzAngleSvc to remove # ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc="" -ServiceMgr.GeoModelSvc.DetectorTools['SCT_DetectorTool'].LorentzAngleTool="" from AthenaCommon.AlgSequence import AlgSequence diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testMonRead.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testMonRead.py index b8e4bb62fc14..1afff782494b 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testMonRead.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testMonRead.py @@ -63,7 +63,6 @@ import AtlasGeoModel.GeoModelInit # Disable SiLorentzAngleSvc to remove # ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc="" -ServiceMgr.GeoModelSvc.DetectorTools['SCT_DetectorTool'].LorentzAngleTool="" #------------------------------------------------------------ diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testParameters.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testParameters.py index b767e6e9bfe7..80f81f43279b 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testParameters.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testParameters.py @@ -76,7 +76,6 @@ import AtlasGeoModel.GeoModelInit # Disable SiLorentzAngleSvc to remove # ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc="" -ServiceMgr.GeoModelSvc.DetectorTools['SCT_DetectorTool'].LorentzAngleTool="" #-------------------------------------------------------------- # Event selector settings. Use McEventSelector diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testReadout.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testReadout.py index e56ca9507c3c..c241d578fc7c 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testReadout.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testReadout.py @@ -61,7 +61,6 @@ import AtlasGeoModel.GeoModelInit # Disable SiLorentzAngleSvc to remove # ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc="" -ServiceMgr.GeoModelSvc.DetectorTools['SCT_DetectorTool'].LorentzAngleTool="" from AthenaCommon.AlgSequence import AlgSequence diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testRodVeto.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testRodVeto.py index e42c908d012d..f5b8129e9ef0 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testRodVeto.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testRodVeto.py @@ -64,7 +64,6 @@ import AtlasGeoModel.GeoModelInit # Disable SiLorentzAngleSvc to remove # ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc="" -ServiceMgr.GeoModelSvc.DetectorTools['SCT_DetectorTool'].LorentzAngleTool="" from AthenaCommon.AlgSequence import AlgSequence diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSensors.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSensors.py index 261da0530509..a90691c1e67a 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSensors.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSensors.py @@ -78,7 +78,6 @@ import AtlasGeoModel.GeoModelInit # Disable SiLorentzAngleSvc to remove # ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc="" -ServiceMgr.GeoModelSvc.DetectorTools['SCT_DetectorTool'].LorentzAngleTool="" from SCT_ConditionsTools.SCT_SensorsToolSetup import SCT_SensorsToolSetup sct_SensorsToolSetup = SCT_SensorsToolSetup() diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSilicon.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSilicon.py index 4b3c8ea34585..bb19885d9cf5 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSilicon.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSilicon.py @@ -63,7 +63,6 @@ import AtlasGeoModel.GeoModelInit # Disable SiLorentzAngleSvc to remove # ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc="" -ServiceMgr.GeoModelSvc.DetectorTools['SCT_DetectorTool'].LorentzAngleTool="" from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testStripVeto.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testStripVeto.py index 408fcea50736..d1a6741a6685 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testStripVeto.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testStripVeto.py @@ -62,7 +62,6 @@ import AtlasGeoModel.GeoModelInit # Disable SiLorentzAngleSvc to remove # ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc="" -ServiceMgr.GeoModelSvc.DetectorTools['SCT_DetectorTool'].LorentzAngleTool="" from AthenaCommon.AlgSequence import AlgSequence diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSummary.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSummary.py index c18f7d9c828e..047c7d56bdcf 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSummary.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSummary.py @@ -51,7 +51,6 @@ import AtlasGeoModel.GeoModelInit # Disable SiLorentzAngleSvc to remove # ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc="" -ServiceMgr.GeoModelSvc.DetectorTools['SCT_DetectorTool'].LorentzAngleTool="" from AthenaCommon.AlgSequence import AlgSequence diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testTdaqEnabled.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testTdaqEnabled.py index 85fbff4239ae..ada81fd016c8 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testTdaqEnabled.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testTdaqEnabled.py @@ -75,7 +75,6 @@ import AtlasGeoModel.GeoModelInit # Disable SiLorentzAngleSvc to remove # ERROR ServiceLocatorHelper::createService: wrong interface id IID_665279653 for service ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc="" -ServiceMgr.GeoModelSvc.DetectorTools['SCT_DetectorTool'].LorentzAngleTool="" from IOVSvc.IOVSvcConf import CondSvc ServiceMgr += CondSvc() diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleCondAlg.cxx b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleCondAlg.cxx index 7170f3c43e74..75ea5fa055dc 100644 --- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleCondAlg.cxx +++ b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleCondAlg.cxx @@ -221,7 +221,6 @@ StatusCode SCTSiLorentzAngleCondAlg::execute() // the detector is not fully depleted and we need to take this into account. // We take absolute values just in case voltages are signed. const InDetDD::SiDetectorElement* element{m_detManager->getDetectorElement(elementHash)}; - element->invalidateConditions(); // Invalidate cache of conditions which keep Lorentz angle of SiDetectorElement double depletionDepth{element->thickness()}; if (deplVoltage==0.0) { ATH_MSG_WARNING("Depletion voltage in "<<__FILE__<<" is zero, which might be a bug."); diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleTool.cxx b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleTool.cxx index 1e70bec1dead..e6c0e5cff1c1 100644 --- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleTool.cxx +++ b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleTool.cxx @@ -50,12 +50,7 @@ StatusCode SiLorentzAngleTool::initialize() { ATH_CHECK(m_condData.initialize()); // Get the detector manager - if (detStore()->contains<InDetDD::SiDetectorManager>(m_detectorName)) { - ATH_CHECK(detStore()->retrieve(m_detManager, m_detectorName)); - } else { - ATH_MSG_INFO("InDetDD::SiDetectorManager " << m_detectorName << " is not available yet."); - ATH_MSG_INFO("SiLorentzAngleTool::retrieveDetectorManager() has to be called later."); - } + ATH_CHECK(detStore()->retrieve(m_detManager, m_detectorName)); // MagneticFieldSvc handles updates itself if (not m_useMagFieldSvc) { @@ -254,13 +249,4 @@ const SiLorentzAngleCondData* SiLorentzAngleTool::getCondData() const { return nullptr; } -StatusCode SiLorentzAngleTool::retrieveDetectorManager() { - // If m_detManager is not retrieved yet, it is retrieved. - if (!m_detManager) { - ATH_CHECK(detStore()->retrieve(m_detManager, m_detectorName)); - ATH_MSG_INFO("SiLorentzAngleTool::retrieveDetectorManager() is called now."); - } - return StatusCode::SUCCESS; -} - const double SiLorentzAngleTool::s_invalidValue{std::numeric_limits<double>::quiet_NaN()}; diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleTool.h b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleTool.h index 35a1a3fc183e..088f02e163b5 100644 --- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleTool.h +++ b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleTool.h @@ -83,9 +83,6 @@ public: /** Get depletion voltage */ virtual double getDepletionVoltage(const IdentifierHash& elementHash) const override; - /** Retrieve detector manager */ - virtual StatusCode retrieveDetectorManager() override; - private: enum Variable {LorentzShift, LorentzShiftEta, TanLorentzAngle, TanLorentzAngleEta}; diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiCommonItems.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiCommonItems.h index da6b5ebcb43a..b5c4defb1369 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiCommonItems.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiCommonItems.h @@ -19,7 +19,6 @@ class AtlasDetectorID; #include "CLHEP/Geometry/Transform3D.h" #include "GeoModelKernel/RCBase.h" #include "InDetCondServices/ISiLorentzAngleSvc.h" -#include "InDetCondServices/ISiLorentzAngleTool.h" namespace InDetDD { @@ -45,9 +44,7 @@ namespace InDetDD { const HepGeom::Transform3D & solenoidFrame() const; void setSolenoidFrame(const HepGeom::Transform3D & transform) const; void setLorentzAngleSvc(const ServiceHandle<ISiLorentzAngleSvc> & lorentzAngleSvc); - void setLorentzAngleTool(const ISiLorentzAngleTool* lorentzAngleTool); ISiLorentzAngleSvc * lorentzAngleSvc() const; - const ISiLorentzAngleTool* lorentzAngleTool() const; //Declaring the Message method for further use MsgStream& msg (MSG::Level lvl) const { return m_msg.get() << lvl; } @@ -65,7 +62,6 @@ namespace InDetDD { ServiceHandle<ISiLorentzAngleSvc> m_lorentzAngleSvcHandle; mutable ISiLorentzAngleSvc * m_lorentzAngleSvc; mutable bool m_lorentzAngleSvcInit; - const ISiLorentzAngleTool* m_lorentzAngleTool; }; diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiCommonItems.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiCommonItems.cxx index 7e002c5179de..876450522703 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiCommonItems.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiCommonItems.cxx @@ -13,8 +13,7 @@ SiCommonItems::SiCommonItems(const AtlasDetectorID* const idHelper) m_idHelper(idHelper), m_lorentzAngleSvcHandle("", "SiDetectorElement"), m_lorentzAngleSvc(0), - m_lorentzAngleSvcInit(false), - m_lorentzAngleTool(nullptr) + m_lorentzAngleSvcInit(false) {} void @@ -29,12 +28,6 @@ SiCommonItems::setLorentzAngleSvc(const ServiceHandle<ISiLorentzAngleSvc> & lore m_lorentzAngleSvcHandle = lorentzAngleSvc; } -void -SiCommonItems::setLorentzAngleTool(const ISiLorentzAngleTool* lorentzAngleTool) -{ - m_lorentzAngleTool = lorentzAngleTool; -} - ISiLorentzAngleSvc * SiCommonItems::lorentzAngleSvc() const { @@ -50,11 +43,4 @@ SiCommonItems::lorentzAngleSvc() const } return m_lorentzAngleSvc; } - -const ISiLorentzAngleTool* -SiCommonItems::lorentzAngleTool() const -{ - return m_lorentzAngleTool; -} - } // End namespace InDetDD diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx index d738df74ca75..9200e00d3b86 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx @@ -35,7 +35,6 @@ #include "TrkSurfaces/SurfaceBounds.h" #include "InDetCondServices/ISiLorentzAngleSvc.h" -#include "InDetCondServices/ISiLorentzAngleTool.h" #include <cmath> #include <cassert> #include <limits> @@ -379,10 +378,6 @@ SiDetectorElement::updateConditionsCache() const m_tanLorentzAnglePhi = m_commonItems->lorentzAngleSvc()->getTanLorentzAngle(m_idHash); m_tanLorentzAngleEta = m_commonItems->lorentzAngleSvc()->getTanLorentzAngleEta(m_idHash); m_lorentzCorrection = m_commonItems->lorentzAngleSvc()->getLorentzShift(m_idHash); - } else if (isSCT() and m_commonItems->lorentzAngleTool()) { - m_tanLorentzAnglePhi = m_commonItems->lorentzAngleTool()->getTanLorentzAngle(m_idHash); - m_tanLorentzAngleEta = m_commonItems->lorentzAngleTool()->getTanLorentzAngleEta(m_idHash); - m_lorentzCorrection = m_commonItems->lorentzAngleTool()->getLorentzShift(m_idHash); } else { // Set to zero m_tanLorentzAnglePhi = 0.; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/CMakeLists.txt b/InnerDetector/InDetDetDescr/SCT_GeoModel/CMakeLists.txt index 29405be03be4..a79aa338ca4f 100644 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/CMakeLists.txt @@ -23,7 +23,6 @@ atlas_depends_on_subdirs( PUBLIC DetectorDescription/GeoModel/GeoModelInterfaces DetectorDescription/GeometryDBSvc DetectorDescription/Identifier - InnerDetector/InDetConditions/InDetCondServices InnerDetector/InDetDetDescr/InDetIdentifier ) # External dependencies: @@ -38,12 +37,12 @@ atlas_add_library( SCT_GeoModelLib INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel GeoModelKernel GeoModelUtilities GaudiKernel InDetGeoModelUtils InDetReadoutGeometry StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES SGTools AthenaPoolUtilities DetDescrConditions Identifier InDetCondServices InDetIdentifier ) + PRIVATE_LINK_LIBRARIES SGTools AthenaPoolUtilities DetDescrConditions Identifier InDetIdentifier ) atlas_add_component( SCT_GeoModel src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel GeoModelKernel GeoModelUtilities GaudiKernel InDetGeoModelUtils InDetReadoutGeometry SGTools StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions Identifier InDetCondServices InDetIdentifier SCT_GeoModelLib ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel GeoModelKernel GeoModelUtilities GaudiKernel InDetGeoModelUtils InDetReadoutGeometry SGTools StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions Identifier InDetIdentifier SCT_GeoModelLib ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorTool.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorTool.h index bd7b35f80325..4343f85d0717 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorTool.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorTool.h @@ -7,8 +7,6 @@ #include "GeoModelUtilities/GeoModelTool.h" #include "GaudiKernel/ServiceHandle.h" -#include "GaudiKernel/ToolHandle.h" -#include "InDetCondServices/ISiLorentzAngleTool.h" #include "SCT_GeoModel/SCT_GeoModelAthenaComps.h" #include <string> @@ -33,8 +31,6 @@ public: virtual StatusCode create() override final; virtual StatusCode clear() override final; - virtual StatusCode initialize() override final; - // Register callback function on ConDB object virtual StatusCode registerCallback() override final; @@ -54,7 +50,6 @@ private: ServiceHandle< IGeoDbTagSvc > m_geoDbTagSvc; ServiceHandle< IRDBAccessSvc > m_rdbAccessSvc; ServiceHandle< IGeometryDBSvc > m_geometryDBSvc; - ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool{this, "LorentzAngleTool", "SCTLorentzAngleTool", "Tool to retreive Lorentz angle"}; std::string m_run1Folder; std::string m_run2L1Folder; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_GeoModelAthenaComps.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_GeoModelAthenaComps.h index 60e16f6ed179..c502df38471f 100644 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_GeoModelAthenaComps.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_GeoModelAthenaComps.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GeoModel_SCT_GeoModelAthenaComps_H @@ -7,7 +7,6 @@ #include "InDetGeoModelUtils/InDetDDAthenaComps.h" -class ISiLorentzAngleTool; class SCT_ID; @@ -18,15 +17,11 @@ public: SCT_GeoModelAthenaComps(); - void setLorentzAngleTool(const ISiLorentzAngleTool*); void setIdHelper(const SCT_ID* idHelper); - const ISiLorentzAngleTool* lorentzAngleTool() const; const SCT_ID* getIdHelper() const; private: - // Lorentz angle tool - const ISiLorentzAngleTool* m_lorentzAngleTool; const SCT_ID* m_idHelper; }; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/python/SCT_GeoModelConfig.py b/InnerDetector/InDetDetDescr/SCT_GeoModel/python/SCT_GeoModelConfig.py index 35491fc3bdec..4f4b751a3c76 100644 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/python/SCT_GeoModelConfig.py +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/python/SCT_GeoModelConfig.py @@ -10,14 +10,4 @@ def getSCT_DetectorTool(name="SCT_DetectorTool", **kwargs): kwargs.setdefault("GeometryDBSvc", "InDetGeometryDBSvc"); kwargs.setdefault("GeoDbTagSvc", "GeoDbTagSvc"); from AthenaCommon.DetFlags import DetFlags - if DetFlags.digitize.SCT_on() or DetFlags.haveRDO.SCT_on() or DetFlags.haveRIO.SCT_on(): - # SCTLorentzAngleTool needed for digi and reco - from AthenaCommon.AppMgr import ToolSvc - if not hasattr(ToolSvc, "SCTLorentzAngleTool"): - from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup - sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() - kwargs.setdefault("LorentzAngleTool", ToolSvc.SCTLorentzAngleTool) - else: - # SCTLorentzAngleTool not needed for simulation - kwargs.setdefault("LorentzAngleTool", "") return CfgMgr.SCT_DetectorTool(name, **kwargs) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx index 72204fbf6b63..fe020da69b85 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx @@ -82,7 +82,6 @@ SCT_DetectorFactory::SCT_DetectorFactory(const SCT_GeoModelAthenaComps * athenaC // Create SiCommonItems. These are items that are shared by all elements SiCommonItems * commonItems = new SiCommonItems(athenaComps->getIdHelper()); - commonItems->setLorentzAngleTool(athenaComps->lorentzAngleTool()); m_geometryManager->setCommonItems(commonItems); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorTool.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorTool.cxx index 8cc0264cad96..67537d2d5218 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorTool.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorTool.cxx @@ -65,22 +65,6 @@ SCT_DetectorTool::~SCT_DetectorTool() { } -// -// Initialize -// -StatusCode -SCT_DetectorTool::initialize() -{ - // LorentzAngleTool - if (not m_lorentzAngleTool.empty()) { - ATH_CHECK(m_lorentzAngleTool.retrieve()); - } else { - m_lorentzAngleTool.disable(); - } - - return StatusCode::SUCCESS; -} - // // Create the Geometry via the factory corresponding to this tool // @@ -162,16 +146,10 @@ SCT_DetectorTool::create() m_athenaComps.setGeoDbTagSvc(&*m_geoDbTagSvc); m_athenaComps.setGeometryDBSvc(&*m_geometryDBSvc); m_athenaComps.setRDBAccessSvc(&*m_rdbAccessSvc); - m_athenaComps.setLorentzAngleTool(m_lorentzAngleTool.get()); const SCT_ID* idHelper{nullptr}; ATH_CHECK(detStore()->retrieve(idHelper, "SCT_ID")); m_athenaComps.setIdHelper(idHelper); - // - // LorentzAngleTool - // - ATH_MSG_DEBUG("Lorentz angle service passed to InDetReadoutGeometry with name: " << m_lorentzAngleTool.name()); - // // This strange way of casting is to avoid an // utterly brain damaged compiler warning. @@ -199,12 +177,6 @@ SCT_DetectorTool::create() // Create a symLink to the SiDetectorManager base class const SiDetectorManager* siDetManager{m_manager}; ATH_CHECK(detStore()->symLink(m_manager, siDetManager)); - - // LorentzAngleTool - if (m_lorentzAngleTool.get()) { - // SCT_DetectorManager is not available at initialize of m_lorentzAngleTool - ATH_CHECK(m_lorentzAngleTool->retrieveDetectorManager()); - } } // Delete unneeded singleton objects diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeoModelAthenaComps.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeoModelAthenaComps.cxx index bb3720c7a51b..0067266c1aaf 100644 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeoModelAthenaComps.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeoModelAthenaComps.cxx @@ -1,34 +1,20 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_GeoModelAthenaComps.h" -#include "InDetCondServices/ISiLorentzAngleSvc.h" SCT_GeoModelAthenaComps::SCT_GeoModelAthenaComps() : InDetDD::AthenaComps("SCT_GeoModel"), - m_lorentzAngleTool(nullptr), m_idHelper(0) {} -void -SCT_GeoModelAthenaComps::setLorentzAngleTool(const ISiLorentzAngleTool* lorentzAngleTool) -{ - m_lorentzAngleTool = lorentzAngleTool; -} - void SCT_GeoModelAthenaComps::setIdHelper(const SCT_ID* idHelper) { m_idHelper = idHelper; } -const ISiLorentzAngleTool* -SCT_GeoModelAthenaComps::lorentzAngleTool() const -{ - return m_lorentzAngleTool; -} - const SCT_ID* SCT_GeoModelAthenaComps::getIdHelper() const { diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_GeoModelAthenaComps.h b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_GeoModelAthenaComps.h index 8ee36eacc0db..ab15814c4bc2 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_GeoModelAthenaComps.h +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_GeoModelAthenaComps.h @@ -7,7 +7,6 @@ #include "InDetGeoModelUtils/InDetDDAthenaComps.h" -class ISiLorentzAngleTool; class SCT_ID; class IInDetServMatBuilderTool; @@ -20,19 +19,15 @@ public: SCT_GeoModelAthenaComps(); - void setLorentzAngleTool(const ISiLorentzAngleTool*); void setIdHelper(const SCT_ID* idHelper); //Add Builder Tool void setServiceBuilderTool(IInDetServMatBuilderTool * serviceBuilderTool); IInDetServMatBuilderTool *serviceBuilderTool() const; - const ISiLorentzAngleTool* lorentzAngleTool() const; const SCT_ID* getIdHelper() const; private: - // Lorentz angle service - const ISiLorentzAngleTool* m_lorentzAngleTool; IInDetServMatBuilderTool * m_serviceBuilderTool; const SCT_ID* m_idHelper; diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_SLHC_DetectorTool.h b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_SLHC_DetectorTool.h index 580b34c0adca..a6e6712e8523 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_SLHC_DetectorTool.h +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_SLHC_DetectorTool.h @@ -8,11 +8,9 @@ #include "GeoModelUtilities/GeoModelTool.h" #include "GaudiKernel/ServiceHandle.h" #include "GaudiKernel/ToolHandle.h" -#include "InDetCondServices/ISiLorentzAngleTool.h" #include <string> -class ISiLorentzAngleSvc; class IGeoDbTagSvc; class IRDBAccessSvc; class IGeometryDBSvc; @@ -37,8 +35,6 @@ public: // Standard Destructor virtual ~SCT_SLHC_DetectorTool() override final; - virtual StatusCode initialize() override final; - virtual StatusCode create() override final; virtual StatusCode clear() override final; @@ -55,7 +51,6 @@ private: ServiceHandle< IGeoDbTagSvc > m_geoDbTagSvc; ServiceHandle< IRDBAccessSvc > m_rdbAccessSvc; ServiceHandle< IGeometryDBSvc > m_geometryDBSvc; - ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool{this, "LorentzAngleTool", "SCTLorentzAngleTool", "Tool to retreive Lorentz angle"}; }; #endif // SCT_SLHC_GeoModel_SCT_DETECTORTOOL_H diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_DetectorFactory.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_DetectorFactory.cxx index 0dc4be21f25a..553563c259e3 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_DetectorFactory.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_DetectorFactory.cxx @@ -72,7 +72,6 @@ SCT_DetectorFactory::SCT_DetectorFactory(const SCT_GeoModelAthenaComps * athenaC // Create SiCommonItems. These are items that are shared by all elements SiCommonItems * commonItems = new SiCommonItems(athenaComps->getIdHelper()); - commonItems->setLorentzAngleTool(athenaComps->lorentzAngleTool()); m_geometryManager->setCommonItems(commonItems); diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_GeoModelAthenaComps.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_GeoModelAthenaComps.cxx index a42bf5fda159..4890750874af 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_GeoModelAthenaComps.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_GeoModelAthenaComps.cxx @@ -3,22 +3,14 @@ */ #include "SCT_SLHC_GeoModel/SCT_GeoModelAthenaComps.h" -#include "InDetCondServices/ISiLorentzAngleTool.h" namespace InDetDDSLHC { SCT_GeoModelAthenaComps::SCT_GeoModelAthenaComps() : InDetDD::AthenaComps("SCT_SLHC_GeoModel"), - m_lorentzAngleTool(nullptr), m_serviceBuilderTool(0), m_idHelper(0) {} - -void -SCT_GeoModelAthenaComps::setLorentzAngleTool(const ISiLorentzAngleTool* lorentzAngleTool) -{ - m_lorentzAngleTool = lorentzAngleTool; -} void SCT_GeoModelAthenaComps::setServiceBuilderTool(IInDetServMatBuilderTool * serviceBuilderTool) @@ -38,12 +30,6 @@ SCT_GeoModelAthenaComps::setIdHelper(const SCT_ID* idHelper) m_idHelper = idHelper; } -const ISiLorentzAngleTool* -SCT_GeoModelAthenaComps::lorentzAngleTool() const -{ - return m_lorentzAngleTool; -} - const SCT_ID* SCT_GeoModelAthenaComps::getIdHelper() const { diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_SLHC_DetectorTool.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_SLHC_DetectorTool.cxx index b1751ad19944..e24a356e8165 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_SLHC_DetectorTool.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_SLHC_DetectorTool.cxx @@ -8,7 +8,6 @@ #include "SCT_SLHC_GeoModel/SCT_Options.h" #include "SCT_SLHC_GeoModel/SCT_GeoModelAthenaComps.h" #include "InDetReadoutGeometry/SCT_DetectorManager.h" -#include "InDetCondServices/ISiLorentzAngleSvc.h" #include "GeoModelUtilities/GeoModelExperiment.h" #include "GeoModelInterfaces/IGeoDbTagSvc.h" #include "GeoModelUtilities/DecodeVersionKey.h" @@ -55,18 +54,6 @@ SCT_SLHC_DetectorTool::~SCT_SLHC_DetectorTool() delete m_athenaComps; } -// Initialize -StatusCode SCT_SLHC_DetectorTool::initialize(){ - // LorentzAngleTool - if (not m_lorentzAngleTool.empty()) { - ATH_CHECK(m_lorentzAngleTool.retrieve()); - } else { - m_lorentzAngleTool.disable(); - } - - return StatusCode::SUCCESS; -} - // Create the Geometry via the factory corresponding to this tool StatusCode SCT_SLHC_DetectorTool::create(){ @@ -146,17 +133,10 @@ StatusCode SCT_SLHC_DetectorTool::create(){ m_athenaComps->setGeoDbTagSvc(&*m_geoDbTagSvc); m_athenaComps->setGeometryDBSvc(&*m_geometryDBSvc); m_athenaComps->setRDBAccessSvc(&*m_rdbAccessSvc); - m_athenaComps->setLorentzAngleTool(m_lorentzAngleTool.get()); const SCT_ID* idHelper = nullptr; ATH_CHECK(detStore()->retrieve(idHelper, "SCT_ID")); m_athenaComps->setIdHelper(idHelper); - - // - // LorentzAngleService - // - ATH_MSG_DEBUG("Lorentz angle tool passed to InDetReadoutGeometry with name: " << m_lorentzAngleTool.name()); - // Service builder tool if (!m_serviceBuilderTool.empty()) { @@ -196,12 +176,6 @@ StatusCode SCT_SLHC_DetectorTool::create(){ // Create a symLink to the SiDetectorManager base class const SiDetectorManager * siDetManager = m_manager; ATH_CHECK(detStore()->symLink(m_manager, siDetManager)); - - // LorentzAngleTool - if (m_lorentzAngleTool.get()) { - // SCT_DetectorManager is not available at initialize of m_lorentzAngleTool - ATH_CHECK(m_lorentzAngleTool->retrieveDetectorManager()); - } } } return StatusCode::SUCCESS; -- GitLab From b0a9d76cf14dab8f3c9733e3f6e9c182740518a1 Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Fri, 15 Jun 2018 17:36:46 +0000 Subject: [PATCH 172/562] Merge branch '21.0-fix-for-Archive_tf' into '21.0' This branch fixes a bug in Archive_tf See merge request atlas/athena!12104 (cherry picked from commit cb1a0482e72171f68ed6974bfb811193ef1d28ad [formerly 72300cd8c6499c46d4196a7bcc64c1b64699fe5d]) 305abfc5 This branch fixes a bug in Archive_tf Former-commit-id: c3172f65261a565c26fda6a1b8a6e9efde79652a --- Event/EventContainers/test/ID_ContainerTest.h | 0 Tools/PyJobTransforms/python/trfExe.py | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) mode change 100755 => 100644 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100755 new mode 100644 diff --git a/Tools/PyJobTransforms/python/trfExe.py b/Tools/PyJobTransforms/python/trfExe.py index f00a61dfff6a..89af61faa18f 100755 --- a/Tools/PyJobTransforms/python/trfExe.py +++ b/Tools/PyJobTransforms/python/trfExe.py @@ -1806,8 +1806,7 @@ class bsMergeExecutor(scriptExecutor): raise trfExceptions.TransformExecutionException(trfExit.nameToCode('TRF_OUTPUT_FILE_ERROR'), 'Exception raised when renaming {0} to {1}: {2}'.format(self._outputFilename, self.conf.dataDictionary[self._outputBS].value[0], e)) super(bsMergeExecutor, self).postExecute() - - + class tagMergeExecutor(scriptExecutor): @@ -1865,7 +1864,6 @@ class archiveExecutor(scriptExecutor): if self._exe == 'tar': self._cmd = [self._exe, '-c', '-v',] - self._cmd.extend(['-f', self.conf.argdict['outputArchFile'].value[0]]) if 'compressionType' in self.conf.argdict: if self.conf.argdict['compressionType'] == 'gzip': self._cmd.append('-z') @@ -1873,6 +1871,8 @@ class archiveExecutor(scriptExecutor): self._cmd.append('-j') elif self.conf.argdict['compressionType'] == 'none': pass + self._cmd.extend(['-f', self.conf.argdict['outputArchFile'].value[0]]) + self._cmd.extend(self.conf.argdict['inputDataFile'].value) elif self._exe == 'zip': self._cmd = ['python'] try: @@ -1892,5 +1892,5 @@ class archiveExecutor(scriptExecutor): raise trfExceptions.TransformExecutionException(trfExit.nameToCode('TRF_EXEC_SETUP_WRAPPER'), errMsg ) - self._cmd.append('zip_wrapper.py') + self._cmd.append('zip_wrapper.py') super(archiveExecutor, self).preExecute(input=input, output=output) -- GitLab From 3c6628dd45d83661c7bd3c4bd4bd8a2724224c3f Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Fri, 15 Jun 2018 17:24:02 +0000 Subject: [PATCH 173/562] Merge branch 'my-reco' into '21.0' remove memleak tests See merge request atlas/athena!12027 (cherry picked from commit 0848a9975b9565ec1ee8ba9f42a7e63ed2e8b1e2 [formerly e0e8120c1da1a4c09d2bb2a723c34782c7024b7a]) c663ba4d remove memleak tests Former-commit-id: 2c1fdb46661c9de7648c068df50981031a256e58 --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../test/test_data17_13tev_memleak.sh | 9 --------- .../RecJobTransformTests/test/test_mc16_memleak.sh | 9 --------- 3 files changed, 18 deletions(-) mode change 100755 => 100644 Event/EventContainers/test/ID_ContainerTest.h delete mode 100755 Reconstruction/RecExample/RecJobTransformTests/test/test_data17_13tev_memleak.sh delete mode 100755 Reconstruction/RecExample/RecJobTransformTests/test/test_mc16_memleak.sh diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100755 new mode 100644 diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_data17_13tev_memleak.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_data17_13tev_memleak.sh deleted file mode 100755 index 84aca715c57c..000000000000 --- a/Reconstruction/RecExample/RecJobTransformTests/test/test_data17_13tev_memleak.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# -# art-description: Reco_tf runs on 13TeV collision data with Hephaestos for checking for memory leaks 2017 -# art-type: grid - -export LD_PRELOAD=$LCG_RELEASE_BASE/libunwind/5c2cade-76996/$LCG_PLATFORM/lib/libunwind.so; Reco_tf.py --inputBSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/data17_13TeV.00324910.physics_Main.daq.RAW._lb0713._SFO-6._0001.data --maxEvents 10 --autoConfiguration everything --conditionsTag="CONDBR2-BLKPA-2017-08" --preExec 'rec.doTrigger=False' --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputTAGFile myTAG.pool.root --athenaopts '--stdcmalloc --leak-check-execute' - -echo "art-result: $?" - diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_mc16_memleak.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_mc16_memleak.sh deleted file mode 100755 index 344c99648df4..000000000000 --- a/Reconstruction/RecExample/RecJobTransformTests/test/test_mc16_memleak.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# -# art-description: Reco_tf runs on mc16 with Hephaestos for memory leak checking -# art-type: grid - -export LD_PRELOAD=$LCG_RELEASE_BASE/libunwind/5c2cade-76996/$LCG_PLATFORM/lib/libunwind.so; Reco_tf.py --inputRDOFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc16_13TeV.410501.PowhegPythia8EvtGen_A14_ttbar_hdamp258p75_nonallhad.merge.RDO.e5458_s3126_d1437/RDO.11426804._000001.pool.root.1 --conditionsTag=default:OFLCOND-MC16-SDR-16 --geometryVersion=default:ATLAS-R2-2016-01-00-01 --runNumber=410501 --maxEvents 10 --outputESDFile myESD.pool.root --athenaopts '--stdcmalloc --leak-check-execute' - -echo "art-result: $?" - -- GitLab From 7049abb4f693975e5b36ef9f5083a4c7071585d1 Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Fri, 15 Jun 2018 17:34:31 +0000 Subject: [PATCH 174/562] Merge branch '21.0-ATLASJT-384-Fix-AMI-UnitTest' into '21.0' ATLASJT-384: Fix failing unit test "test_trfAMI" See merge request atlas/athena!12028 (cherry picked from commit 9a604b57d83388c1d12a164360a5df91bae62e87 [formerly 67262842c28c8220e3be133f4cd652f85bacb952]) 75d920cd ATLASJT-384: Fix failing unit test "test_trfAMI" Former-commit-id: 15c3960a674bb320426b2c91a77bada078601167 --- Event/EventContainers/test/ID_ContainerTest.h | 0 Tools/PyJobTransforms/test/test_trfAMI.py | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) mode change 100755 => 100644 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100755 new mode 100644 diff --git a/Tools/PyJobTransforms/test/test_trfAMI.py b/Tools/PyJobTransforms/test/test_trfAMI.py index 9d7e5aa38914..88fcd1d6e328 100755 --- a/Tools/PyJobTransforms/test/test_trfAMI.py +++ b/Tools/PyJobTransforms/test/test_trfAMI.py @@ -56,14 +56,14 @@ class trfAMIUnitTests(unittest.TestCase): # test a new transform tag from AMI def test_info_q220(self): self.maxDiff = None - physics = {'conditionsTag': {'all': 'CONDBR2-BLKPA-2015-02'}, + physics = {'conditionsTag': {'all': 'CONDBR2-BLKPA-2018-03'}, 'beamType': 'cosmics', 'ignoreErrors': False, 'autoConfiguration': ['everything'], 'maxEvents': '25', 'AMITag': 'q220', 'preExec': {'all': ['from CaloRec.CaloCellFlags import jobproperties;jobproperties.CaloCellFlags.doLArHVCorr=False;jobproperties.CaloCellFlags.doPileupOffsetBCIDCorr.set_Value_and_Lock(False);from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doInnerDetectorCommissioning.set_Value_and_Lock(True);InDetFlags.useBroadClusterErrors.set_Value_and_Lock(False);DQMonFlags.doStreamAwareMon=False;DQMonFlags.enableLumiAccess=False;from JetRec.JetRecFlags import jetFlags;jetFlags.useTracks=False;DQMonFlags.doCTPMon=False;']}, - 'geometryVersion': {'all': 'ATLAS-R2-2015-03-01-00'}} + 'geometryVersion': {'all': 'ATLAS-R2-2016-01-00-01'}} tag = TagInfo("q220") self.assertTrue(isinstance(tag.trfs[0], TrfConfig)) -- GitLab From 45484129d4e1849e10641c263840e2bfb3c9bf68 Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Fri, 15 Jun 2018 17:16:20 +0000 Subject: [PATCH 175/562] Merge branch '21.0-normalizeCaloBaseline' into '21.0' CaloBaseline : sum normalization See merge request atlas/athena!11899 (cherry picked from commit 149bf99648dc505743879bd5a71c70a9790ca019 [formerly 2ce81d081f1c075d5137c37168d30de79baf0125]) f6529611 Sum normalization Former-commit-id: 7583fb9faf5c2df52c7ac54302747c8d1b4db895 --- .../CaloMonitoring/src/CaloBaselineMon.cxx | 17 +++++++++++------ Event/EventContainers/test/ID_ContainerTest.h | 0 2 files changed, 11 insertions(+), 6 deletions(-) mode change 100755 => 100644 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Calorimeter/CaloMonitoring/src/CaloBaselineMon.cxx b/Calorimeter/CaloMonitoring/src/CaloBaselineMon.cxx index a2e98e457626..c36a77647165 100644 --- a/Calorimeter/CaloMonitoring/src/CaloBaselineMon.cxx +++ b/Calorimeter/CaloMonitoring/src/CaloBaselineMon.cxx @@ -169,7 +169,7 @@ void CaloBaselineMon::bookPartitionHistos(partitionHistos& partition, uint partN hTitle = "Pedestal baseline ( "+str_auxTitle+") - "+m_partNames[partNumber]+" - " + str_eta0 +" < eta < " + str_eta1; partition.hProf_pedestalMon_vs_EtaBCID[iEta] = TProfile_LW::create(hName.c_str(), hTitle.c_str(),m_BCID0_nbins,m_BCID0_min,m_BCID0_max); partition.hProf_pedestalMon_vs_EtaBCID[iEta]->GetXaxis()->SetTitle("BCID"); - partition.hProf_pedestalMon_vs_EtaBCID[iEta]->GetYaxis()->SetTitle(""); + partition.hProf_pedestalMon_vs_EtaBCID[iEta]->GetYaxis()->SetTitle("E_T/(#Delta#eta.#Delta#phi.#mu)[MeV]"); group.regHist(partition.hProf_pedestalMon_vs_EtaBCID[iEta]).ignore(); } @@ -177,13 +177,13 @@ void CaloBaselineMon::bookPartitionHistos(partitionHistos& partition, uint partN hTitle = "Pedestal baseline ( "+str_auxTitle+") - "+m_partNames[partNumber]; partition.hProf_pedestalMon_vs_Eta = TProfile_LW::create(hName.c_str(), hTitle.c_str(),m_nbOfEtaBins[partNumber],m_etaMin[partNumber],m_etaMax[partNumber]); partition.hProf_pedestalMon_vs_Eta->GetXaxis()->SetTitle("Eta"); - partition.hProf_pedestalMon_vs_Eta->GetYaxis()->SetTitle("Average over BCID"); + partition.hProf_pedestalMon_vs_Eta->GetYaxis()->SetTitle("E_T/(#Delta#eta.#Delta#phi.#mu)[MeV]"); group.regHist(partition.hProf_pedestalMon_vs_Eta).ignore(); hName = "hprof1d_pedestalMon_"+m_partNames[partNumber]+"_LB"; partition.hProf_pedestalMon_vs_LB = TProfile_LW::create(hName.c_str(), hTitle.c_str(),lb_nbins,0,(float) lb_nbins); partition.hProf_pedestalMon_vs_LB->GetXaxis()->SetTitle("Luminosity block"); - partition.hProf_pedestalMon_vs_LB->GetYaxis()->SetTitle("Average over BCID and eta"); + partition.hProf_pedestalMon_vs_LB->GetYaxis()->SetTitle("E_T/(#Delta#eta.#Delta#phi.#mu)[MeV]"); group.regHist(partition.hProf_pedestalMon_vs_LB).ignore(); } @@ -201,7 +201,7 @@ void CaloBaselineMon::bookPartitionHistos(partitionHistos& partition, uint partN hTitle = "BCIDtool baseline ( "+str_auxTitle+")-"+m_partNames[partNumber]+" - " + str_eta0 +" < eta < " + str_eta1; partition.hProf_bcidtoolMon_vs_EtaBCID[iEta] = TProfile_LW::create(hName.c_str(), hTitle.c_str(),BCID_nbins,BCID_min,BCID_max); partition.hProf_bcidtoolMon_vs_EtaBCID[iEta]->GetXaxis()->SetTitle("BCID"); - partition.hProf_bcidtoolMon_vs_EtaBCID[iEta]->GetYaxis()->SetTitle(""); + partition.hProf_bcidtoolMon_vs_EtaBCID[iEta]->GetYaxis()->SetTitle("E_T/(#Delta#eta.#Delta#phi.#mu)[MeV]"); group.regHist(partition.hProf_bcidtoolMon_vs_EtaBCID[iEta]).ignore(); } @@ -210,13 +210,13 @@ void CaloBaselineMon::bookPartitionHistos(partitionHistos& partition, uint partN hTitle = "BCIDtool baseline ( "+str_auxTitle+") - "+m_partNames[partNumber]; partition.hProf_bcidtoolMon_vs_Eta = TProfile_LW::create(hName.c_str(), hTitle.c_str(),m_nbOfEtaBins[partNumber],m_etaMin[partNumber],m_etaMax[partNumber]); partition.hProf_bcidtoolMon_vs_Eta->GetXaxis()->SetTitle("Eta"); - partition.hProf_bcidtoolMon_vs_Eta->GetYaxis()->SetTitle("Average over BCID"); + partition.hProf_bcidtoolMon_vs_Eta->GetYaxis()->SetTitle("E_T/(#Delta#eta.#Delta#phi.#mu)[MeV]"); group.regHist(partition.hProf_bcidtoolMon_vs_Eta).ignore(); hName = "hprof1d_bcidtoolMon"+m_partNames[partNumber]+"_LB"; partition.hProf_bcidtoolMon_vs_LB = TProfile_LW::create(hName.c_str(), hTitle.c_str(),lb_nbins,0,(float) lb_nbins); partition.hProf_bcidtoolMon_vs_LB->GetXaxis()->SetTitle("Luminosity block"); - partition.hProf_bcidtoolMon_vs_LB->GetYaxis()->SetTitle("Average over BCID and eta"); + partition.hProf_bcidtoolMon_vs_LB->GetYaxis()->SetTitle("E_T/(#Delta#eta.#Delta#phi.#mu)[MeV]"); group.regHist(partition.hProf_bcidtoolMon_vs_LB).ignore(); } @@ -288,11 +288,14 @@ StatusCode CaloBaselineMon::fillHistograms() { m_sum_partition_eta[partThisAlgo][etaBin] += energy; } // cell iter loop + // Loop on cells is over. Now fill histograms with sum per eta. if (thisEvent_bool_pedestalMon ) { m_h1_BCID_pedestalMon->Fill(bcid); for (uint iPart = 0;iPart < m_partNames.size();iPart++){ for (uint iEta = 0; iEta < m_nbOfEtaBins[iPart]; iEta ++){ + // Normalize the sum by the \delta\eta.\delta\phi.\mu + m_sum_partition_eta[iPart][iEta] = m_sum_partition_eta[iPart][iEta]*(m_inv_etaBinWidth[iPart])/(2*M_PI)/lbAverageInteractionsPerCrossing(); float etaToBeFilled = ((float) iEta)*m_etaBinWidth[iPart] + m_etaMin[iPart]; m_partHistos[iPart].hProf_pedestalMon_vs_Eta->Fill(etaToBeFilled,m_sum_partition_eta[iPart][iEta]); m_partHistos[iPart].hProf_pedestalMon_vs_EtaBCID[iEta]->Fill(bcid,m_sum_partition_eta[iPart][iEta]); @@ -305,6 +308,8 @@ StatusCode CaloBaselineMon::fillHistograms() { m_h1_BCID_bcidtoolMon->Fill(bcid); for (uint iPart = 0;iPart < m_partNames.size();iPart++){ for (uint iEta = 0; iEta < m_nbOfEtaBins[iPart]; iEta ++){ + // Normalize the sum by the \delta\eta.\delta\phi.\mu + m_sum_partition_eta[iPart][iEta] = m_sum_partition_eta[iPart][iEta]*(m_inv_etaBinWidth[iPart])/(2*M_PI)/lbAverageInteractionsPerCrossing(); float etaToBeFilled = ((float) iEta)*m_etaBinWidth[iPart] + m_etaMin[iPart]; m_partHistos[iPart].hProf_bcidtoolMon_vs_Eta->Fill(etaToBeFilled,m_sum_partition_eta[iPart][iEta]); m_partHistos[iPart].hProf_bcidtoolMon_vs_EtaBCID[iEta]->Fill(m_bunchCrossingTool->distanceFromFront(bcid)/25,m_sum_partition_eta[iPart][iEta]); diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100755 new mode 100644 -- GitLab From b925215dcde8a667643def740b6c6f564e01c339 Mon Sep 17 00:00:00 2001 From: Olga Igonkina <olga.igonkina@cern.ch> Date: Fri, 15 Jun 2018 09:54:52 +0000 Subject: [PATCH 176/562] Merge branch 'Modify-TotalTracks-Histograms' into '21.1' ATONLBS-21: Edited TotalTracks and TotalTracksPass Histograms for BeamSpot Monitoring See merge request atlas/athena!12140 (cherry picked from commit 867ad363c2d62908a9b091453c647fcd0122bf5a [formerly 24dd1cfe84a82f24df071cda28cc0b72f01a8e5b]) 800213b1 Title: Edited TotalTracks and TotalTracksPass Histograms for BeamSpot Monitoring Former-commit-id: 51ad6986e0a0ea5e8af381f8512c9a45131f65d9 --- .../TrigT2BeamSpot/python/T2VertexBeamSpotMonitoring.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Trigger/TrigAlgorithms/TrigT2BeamSpot/python/T2VertexBeamSpotMonitoring.py b/Trigger/TrigAlgorithms/TrigT2BeamSpot/python/T2VertexBeamSpotMonitoring.py index 052005c2bd49..38f93eb895c0 100644 --- a/Trigger/TrigAlgorithms/TrigT2BeamSpot/python/T2VertexBeamSpotMonitoring.py +++ b/Trigger/TrigAlgorithms/TrigT2BeamSpot/python/T2VertexBeamSpotMonitoring.py @@ -35,13 +35,13 @@ class T2VertexBeamSpotOnlineMonitoring(TrigGenericMonitoringToolConfig): #--------------------------------------- # Number of tracks per event - # Total number of bins: 400 + # Total number of bins: 600 self.Histograms += [ defineHistogram('TotalTracks', type='TH1F', title="TotalTracks; N tracks per event; Number of events", - xbins=200, xmin=0.0, xmax=200.0) ] + xbins=300, xmin=0.0, xmax=600.0) ] self.Histograms += [ defineHistogram('TotalTracksPass', type='TH1F', title="TotalTracksPass; N accepted tracks per event; Number of events", - xbins=200, xmin=0.0, xmax=200.0) ] + xbins=300, xmin=0.0, xmax=500.0) ] # Track Z position # Total number of Bins: 200 -- GitLab From ab64c0ec6cfa896efb2ae78bff9f20a62080391c Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Fri, 15 Jun 2018 16:24:09 +0200 Subject: [PATCH 177/562] AthAllocators: Fix clang warning. clang warning: unused private class member. Former-commit-id: 71fe76f02bc5cd8dba82e5219b6a8ba918801d97 --- Control/AthAllocators/test/ArenaBase_test.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Control/AthAllocators/test/ArenaBase_test.cxx b/Control/AthAllocators/test/ArenaBase_test.cxx index 9602dc2d1cc7..bebabf986b10 100644 --- a/Control/AthAllocators/test/ArenaBase_test.cxx +++ b/Control/AthAllocators/test/ArenaBase_test.cxx @@ -117,19 +117,17 @@ public: private: - int m_iworker; SG::ArenaBase& m_b; size_t m_ialloc1; size_t m_ialloc2; }; -TestThread::TestThread (int iworker, +TestThread::TestThread (int /*iworker*/, SG::ArenaBase& b, size_t ialloc1, size_t ialloc2) - : m_iworker (iworker), - m_b (b), + : m_b (b), m_ialloc1 (ialloc1), m_ialloc2 (ialloc2) { -- GitLab From 624552a36c980196b75ced78d5993bcc5a6ea3ba Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Fri, 15 Jun 2018 16:21:48 +0200 Subject: [PATCH 178/562] TrigCaloHypo: Clean up dependency on LArCellRec. Remove unneeded direct dependency on LArCellRec/LArNoisyROTool. Former-commit-id: 9d559bd2d16da020437a283311aeade7ace16619 --- Trigger/TrigHypothesis/TrigCaloHypo/CMakeLists.txt | 1 - Trigger/TrigHypothesis/TrigCaloHypo/src/TrigEFCaloHypoNoise.cxx | 1 - 2 files changed, 2 deletions(-) diff --git a/Trigger/TrigHypothesis/TrigCaloHypo/CMakeLists.txt b/Trigger/TrigHypothesis/TrigCaloHypo/CMakeLists.txt index 20f3b69254bd..e7c8c917abba 100644 --- a/Trigger/TrigHypothesis/TrigCaloHypo/CMakeLists.txt +++ b/Trigger/TrigHypothesis/TrigCaloHypo/CMakeLists.txt @@ -21,7 +21,6 @@ atlas_depends_on_subdirs( PUBLIC Event/FourMomUtils Event/xAOD/xAODCaloEvent Event/xAOD/xAODEventInfo - LArCalorimeter/LArCellRec LArCalorimeter/LArRecEvent Reconstruction/Jet/JetUtils ) diff --git a/Trigger/TrigHypothesis/TrigCaloHypo/src/TrigEFCaloHypoNoise.cxx b/Trigger/TrigHypothesis/TrigCaloHypo/src/TrigEFCaloHypoNoise.cxx index ae688576eabd..dc565443ced4 100755 --- a/Trigger/TrigHypothesis/TrigCaloHypo/src/TrigEFCaloHypoNoise.cxx +++ b/Trigger/TrigHypothesis/TrigCaloHypo/src/TrigEFCaloHypoNoise.cxx @@ -21,7 +21,6 @@ #include "GaudiKernel/StatusCode.h" #include "GaudiKernel/ListItem.h" #include "xAODEventInfo/EventInfo.h" -#include "LArCellRec/LArNoisyROTool.h" #include "LArRecEvent/LArNoisyROSummary.h" #include "TrigSteeringEvent/TrigRoiDescriptor.h" -- GitLab From 0111570bdbce4c2a2a51e2c6b93b7c765d5aea15 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Fri, 15 Jun 2018 16:22:07 +0200 Subject: [PATCH 179/562] TrigT1CaloCalibTools: Remove explicit dependency on LArRecUtils. Don't need to depend on LArRecUtils/LArHVCorrTool. Former-commit-id: 5524c074e1d1235de080087c59b0c99340f7fd44 --- Trigger/TrigT1/TrigT1CaloCalibTools/CMakeLists.txt | 6 +++--- .../TrigT1CaloCalibTools/L1CaloOfflineTriggerTowerTools.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/CMakeLists.txt b/Trigger/TrigT1/TrigT1CaloCalibTools/CMakeLists.txt index af70ebe62dc3..df48e218f223 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibTools/CMakeLists.txt +++ b/Trigger/TrigT1/TrigT1CaloCalibTools/CMakeLists.txt @@ -18,7 +18,7 @@ atlas_depends_on_subdirs( PUBLIC GaudiKernel LArCalorimeter/LArIdentifier LArCalorimeter/LArRecConditions - LArCalorimeter/LArRecUtils + LArCalorimeter/LArElecCalib PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces TileCalorimeter/TileConditions TileCalorimeter/TileEvent @@ -49,13 +49,13 @@ atlas_add_library( TrigT1CaloCalibToolsLib src/*.cxx PUBLIC_HEADERS TrigT1CaloCalibTools INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} AsgTools AthenaBaseComps AthenaKernel AthenaPoolUtilities Identifier xAODTrigL1Calo GaudiKernel LArIdentifier LArRecConditions TileEvent TrigT1CaloCalibConditions TrigT1CaloCalibToolInterfaces TrigT1CaloToolInterfaces CaloDetDescrLib StoreGateLib SGtests LArRecUtilsLib TileConditionsLib TrigT1CaloMonitoringToolsLib TrigT1CaloUtilsLib CaloTriggerToolLib AthenaMonitoringLib LArCablingLib TrigT1CaloEventLib TrigT1CaloCondSvcLib + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} AsgTools AthenaBaseComps AthenaKernel AthenaPoolUtilities Identifier xAODTrigL1Calo GaudiKernel LArIdentifier LArRecConditions TileEvent TrigT1CaloCalibConditions TrigT1CaloCalibToolInterfaces TrigT1CaloToolInterfaces CaloDetDescrLib StoreGateLib SGtests TileConditionsLib TrigT1CaloMonitoringToolsLib TrigT1CaloUtilsLib CaloTriggerToolLib AthenaMonitoringLib LArCablingLib TrigT1CaloEventLib TrigT1CaloCondSvcLib PRIVATE_LINK_LIBRARIES CaloEvent CaloIdentifier EventInfo LArRawEvent LWHists TrigT1Interfaces ) atlas_add_component( TrigT1CaloCalibTools src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} CaloDetDescrLib AsgTools AthenaBaseComps AthenaKernel StoreGateLib SGtests AthenaPoolUtilities Identifier xAODTrigL1Calo GaudiKernel LArIdentifier LArRecConditions LArRecUtilsLib TileConditionsLib TileEvent TrigT1CaloCalibConditions TrigT1CaloCalibToolInterfaces TrigT1CaloMonitoringToolsLib TrigT1CaloToolInterfaces TrigT1CaloUtilsLib CaloEvent CaloIdentifier CaloTriggerToolLib AthenaMonitoringLib EventInfo LArRawEvent LArCablingLib LWHists TrigT1CaloEventLib TrigT1Interfaces TrigT1CaloCalibToolsLib ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} CaloDetDescrLib AsgTools AthenaBaseComps AthenaKernel StoreGateLib SGtests AthenaPoolUtilities Identifier xAODTrigL1Calo GaudiKernel LArIdentifier LArRecConditions TileConditionsLib TileEvent TrigT1CaloCalibConditions TrigT1CaloCalibToolInterfaces TrigT1CaloMonitoringToolsLib TrigT1CaloToolInterfaces TrigT1CaloUtilsLib CaloEvent CaloIdentifier CaloTriggerToolLib AthenaMonitoringLib EventInfo LArRawEvent LArCablingLib LWHists TrigT1CaloEventLib TrigT1Interfaces TrigT1CaloCalibToolsLib ) # Install files from the package: diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloOfflineTriggerTowerTools.h b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloOfflineTriggerTowerTools.h index 26f251ae4789..4e4274d7bd10 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloOfflineTriggerTowerTools.h +++ b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloOfflineTriggerTowerTools.h @@ -53,7 +53,7 @@ // LAr includes #include "LArRawEvent/LArDigitContainer.h" #include "LArIdentifier/LArOnlineID.h" -#include "LArRecUtils/LArHVCorrTool.h" +#include "LArElecCalib/ILArHVCorrTool.h" // Tile includes #include "TileEvent/TileDigitsContainer.h" -- GitLab From 71ffeb70189303b3ec5a1f6bf7e5b328135efeb7 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Fri, 15 Jun 2018 16:22:29 +0200 Subject: [PATCH 180/562] TrigT1CaloCalibUtils: Remove explicit dependency on LArRecUtils. Don't need to depend on LArRecUtils/LArHVCorrTool. Former-commit-id: 184977c62c1d7411310052eefd56ef90e7809dce --- Trigger/TrigT1/TrigT1CaloCalibUtils/CMakeLists.txt | 6 +++--- .../TrigT1CaloCalibUtils/src/L1CaloHVCorrectionsForDB.cxx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/CMakeLists.txt b/Trigger/TrigT1/TrigT1CaloCalibUtils/CMakeLists.txt index 06ff27f3c219..9df9443acd9b 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibUtils/CMakeLists.txt +++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/CMakeLists.txt @@ -9,6 +9,7 @@ atlas_subdir( TrigT1CaloCalibUtils ) atlas_depends_on_subdirs( PUBLIC Calorimeter/CaloIdentifier Calorimeter/CaloTriggerTool + LArCalorimeter/LArElecCalib Control/AthenaBaseComps Control/AthenaKernel Database/AthenaPOOL/AthenaPoolUtilities @@ -33,7 +34,6 @@ atlas_depends_on_subdirs( PUBLIC Control/CxxUtils Control/StoreGate Event/xAOD/xAODEventInfo - LArCalorimeter/LArRecUtils Trigger/TrigT1/TrigT1CaloToolInterfaces Trigger/TrigT1/TrigT1Interfaces ) @@ -50,13 +50,13 @@ atlas_add_library( TrigT1CaloCalibUtilsLib INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} CaloIdentifier AthenaBaseComps AthenaKernel AthenaPoolUtilities Identifier EventInfo xAODTrigL1Calo GaudiKernel TrigConfHLTData TrigConfL1Data TrigSteeringEvent TrigT1CaloCalibConditions TrigT1CaloCalibToolInterfaces CaloTriggerToolLib TrigT1CaloCalibToolsLib TrigT1CaloEventLib TrigT1CaloMonitoringToolsLib TrigT1CaloUtilsLib CaloDetDescrLib StoreGateLib SGtests LArRecUtilsLib + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} CaloIdentifier AthenaBaseComps AthenaKernel AthenaPoolUtilities Identifier EventInfo xAODTrigL1Calo GaudiKernel TrigConfHLTData TrigConfL1Data TrigSteeringEvent TrigT1CaloCalibConditions TrigT1CaloCalibToolInterfaces CaloTriggerToolLib TrigT1CaloCalibToolsLib TrigT1CaloEventLib TrigT1CaloMonitoringToolsLib TrigT1CaloUtilsLib CaloDetDescrLib StoreGateLib SGtests PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} CaloEvent CxxUtils xAODEventInfo TrigT1CaloToolInterfaces TrigT1Interfaces ) atlas_add_component( TrigT1CaloCalibUtils src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} CaloIdentifier CaloTriggerToolLib AthenaBaseComps AthenaKernel AthenaPoolUtilities Identifier EventInfo xAODTrigL1Calo GaudiKernel TrigConfHLTData TrigConfL1Data TrigSteeringEvent TrigT1CaloCalibConditions TrigT1CaloCalibToolInterfaces TrigT1CaloCalibToolsLib TrigT1CaloEventLib TrigT1CaloMonitoringToolsLib TrigT1CaloUtilsLib CaloDetDescrLib CaloEvent CxxUtils StoreGateLib SGtests xAODEventInfo LArRecUtilsLib TrigT1CaloToolInterfaces TrigT1Interfaces TrigT1CaloCalibUtilsLib ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} CaloIdentifier CaloTriggerToolLib AthenaBaseComps AthenaKernel AthenaPoolUtilities Identifier EventInfo xAODTrigL1Calo GaudiKernel TrigConfHLTData TrigConfL1Data TrigSteeringEvent TrigT1CaloCalibConditions TrigT1CaloCalibToolInterfaces TrigT1CaloCalibToolsLib TrigT1CaloEventLib TrigT1CaloMonitoringToolsLib TrigT1CaloUtilsLib CaloDetDescrLib CaloEvent CxxUtils StoreGateLib SGtests xAODEventInfo TrigT1CaloToolInterfaces TrigT1Interfaces TrigT1CaloCalibUtilsLib ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloHVCorrectionsForDB.cxx b/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloHVCorrectionsForDB.cxx index 592cfd19d940..0f211d0d6fdc 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloHVCorrectionsForDB.cxx +++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloHVCorrectionsForDB.cxx @@ -16,7 +16,7 @@ #include "TrigT1CaloToolInterfaces/IL1TriggerTowerTool.h" #include "TrigT1CaloEvent/TriggerTowerCollection.h" #include "CaloEvent/CaloCellContainer.h" -#include "LArRecUtils/LArHVCorrTool.h" +#include "LArElecCalib/ILArHVCorrTool.h" L1CaloHVCorrectionsForDB::L1CaloHVCorrectionsForDB(const std::string& name, ISvcLocator *pSvcLocator) : AthAlgorithm(name, pSvcLocator), -- GitLab From 9421e7d0b5be3f4c5bb84e700c0e2db41a0d837d Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Fri, 15 Jun 2018 16:22:55 +0200 Subject: [PATCH 181/562] TrigT1Monitoring: Remove explicit dependency on LArRecUtils. Don't need to depend on LArRecUtils/LArHVCorrTool. Former-commit-id: f8ef9ad0b368b4fb9f653061e8d90c0cd18e85d0 --- Trigger/TrigT1/TrigT1Monitoring/CMakeLists.txt | 4 ++-- Trigger/TrigT1/TrigT1Monitoring/src/L1CaloHVScalesMon.cxx | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Trigger/TrigT1/TrigT1Monitoring/CMakeLists.txt b/Trigger/TrigT1/TrigT1Monitoring/CMakeLists.txt index 90cab624c251..0dadc5f174d7 100644 --- a/Trigger/TrigT1/TrigT1Monitoring/CMakeLists.txt +++ b/Trigger/TrigT1/TrigT1Monitoring/CMakeLists.txt @@ -16,11 +16,11 @@ atlas_depends_on_subdirs( PRIVATE DetectorDescription/Identifier Event/xAOD/xAODTrigL1Calo GaudiKernel - LArCalorimeter/LArRecUtils TileCalorimeter/TileCalib/TileCalibBlobObjs TileCalorimeter/TileConditions TileCalorimeter/TileEvent TileCalorimeter/TileIdentifier + LArCalorimeter/LArElecCalib Tools/LWHists Trigger/TrigConfiguration/TrigConfInterfaces @@ -39,7 +39,7 @@ atlas_depends_on_subdirs( PRIVATE atlas_add_component( TrigT1Monitoring src/*.cxx src/components/*.cxx - LINK_LIBRARIES CaloDetDescrLib CaloEvent CaloIdentifier CaloTriggerToolLib AthenaMonitoringLib DataModel Identifier xAODTrigL1Calo GaudiKernel LArRecUtilsLib TileCalibBlobObjs TileConditionsLib TileEvent TileIdentifier LWHists TrigConfL1Data L1TopoRDO TrigT1CaloCalibConditions TrigT1CaloCalibToolInterfaces TrigT1CaloEventLib TrigT1CaloMonitoringToolsLib TrigT1CaloToolInterfaces TrigT1Interfaces TrigT1Result TrigT1CaloCondSvcLib ) + LINK_LIBRARIES CaloDetDescrLib CaloEvent CaloIdentifier CaloTriggerToolLib AthenaMonitoringLib DataModel Identifier xAODTrigL1Calo GaudiKernel TileCalibBlobObjs TileConditionsLib TileEvent TileIdentifier LWHists TrigConfL1Data L1TopoRDO TrigT1CaloCalibConditions TrigT1CaloCalibToolInterfaces TrigT1CaloEventLib TrigT1CaloMonitoringToolsLib TrigT1CaloToolInterfaces TrigT1Interfaces TrigT1Result TrigT1CaloCondSvcLib ) # Install files from the package: atlas_install_headers( TrigT1Monitoring ) diff --git a/Trigger/TrigT1/TrigT1Monitoring/src/L1CaloHVScalesMon.cxx b/Trigger/TrigT1/TrigT1Monitoring/src/L1CaloHVScalesMon.cxx index 24e8734d41be..1e978bba2805 100644 --- a/Trigger/TrigT1/TrigT1Monitoring/src/L1CaloHVScalesMon.cxx +++ b/Trigger/TrigT1/TrigT1Monitoring/src/L1CaloHVScalesMon.cxx @@ -27,8 +27,6 @@ #include "CaloIdentifier/CaloLVL1_ID.h" #include "CaloTriggerTool/CaloTriggerTowerService.h" -#include "LArRecUtils/LArHVCorrTool.h" - #include "Identifier/Identifier.h" #include "Identifier/IdentifierHash.h" #include "Identifier/HWIdentifier.h" @@ -50,6 +48,7 @@ #include "TrigT1CaloMonitoringTools/ITrigT1CaloMonErrorTool.h" #include "TrigT1CaloMonitoringTools/TrigT1CaloLWHistogramTool.h" #include "TrigT1Interfaces/TrigT1CaloDefs.h" +#include "LArElecCalib/ILArHVCorrTool.h" #include "L1CaloHVScalesMon.h" // ============================================================================ -- GitLab From 7c758506ab79d5f0463a706cbb19a53d321d264f Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Thu, 14 Jun 2018 23:14:38 +0200 Subject: [PATCH 182/562] ByteStreamCnvSvc: Fix configuration for metadata changes. Fix configuration for IOVDbMetaDataTool and ByteStreamMetaDataTool changing from public to private tools. Former-commit-id: 28b2fe8f23fe97c3729922a606bcbac701d4f4b8 --- Event/ByteStreamCnvSvc/python/ByteStreamConfig.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py b/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py index 4da7c633c0f6..ba2f8f51f92c 100644 --- a/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py +++ b/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py @@ -46,11 +46,9 @@ def TrigBSReadCfg( inputFlags ): from IOVDbMetaDataTools.IOVDbMetaDataToolsConf import IOVDbMetaDataTool iovMetaDataTool = IOVDbMetaDataTool() - acc.addPublicTool( iovMetaDataTool ) from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamMetadataTool bsMetaDataTool = ByteStreamMetadataTool() - acc.addPublicTool( bsMetaDataTool ) from StoreGate.StoreGateConf import ProxyProviderSvc, StoreGateSvc metaDataStore = StoreGateSvc("MetaDataStore") -- GitLab From 9e8e13204c309f32f8af6db1ae55f0b8f7cca13d Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Sun, 17 Jun 2018 20:08:55 +0200 Subject: [PATCH 183/562] Fixing the key Former-commit-id: 4138b66b546f53ca69bdcd4a5764648027eeb171 --- Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py index fd1ac1f18978..29c6d190dfdc 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py @@ -178,6 +178,7 @@ from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2ElectronHypoAlgMT from TrigEgammaHypo.TrigL2ElectronHypoTool import TrigL2ElectronHypoToolFromName theElectronHypo = TrigL2ElectronHypoAlgMT() theElectronHypo.RunInView=True +theElectronHypo.HypoInputDecisions = caloHypoDecisions theElectronHypo.Electrons = theElectronFex.ElectronsName theElectronHypo.OutputLevel = VERBOSE -- GitLab From 36b2fe58566ec57d9305587d20a3f01f7d529da5 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Mon, 18 Jun 2018 12:18:41 +0200 Subject: [PATCH 184/562] Fixed the input output keys Former-commit-id: 41987defa8a4046919c542179f51783105d50d28 --- .../TrigEgammaHypo/src/TrigL2ElectronHypoAlgMT.cxx | 2 +- .../TrigValidation/TrigUpgradeTest/share/egamma.withViews.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlgMT.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlgMT.cxx index 1b155906f3e9..08d7e03f12b3 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlgMT.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlgMT.cxx @@ -75,7 +75,7 @@ StatusCode TrigL2ElectronHypoAlgMT::execute_r( const EventContext& context ) con auto viewEL = previousDecision->objectLink< ViewContainer >( "view" ); CHECK( viewEL.isValid() ); const SG::View* view_const = *viewEL; - SG::View* view = const_cast<SG::View*>(view_const); // CHECK THIS! + SG::View* view = const_cast<SG::View*>(view_const); // CHECK THIS! (checked with Scott in the past, will be fixed but low prio) // get electron from that view: size_t electronCounter = 0; diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py index 29c6d190dfdc..4e01219b2480 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py @@ -178,7 +178,8 @@ from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2ElectronHypoAlgMT from TrigEgammaHypo.TrigL2ElectronHypoTool import TrigL2ElectronHypoToolFromName theElectronHypo = TrigL2ElectronHypoAlgMT() theElectronHypo.RunInView=True -theElectronHypo.HypoInputDecisions = caloHypoDecisions +theElectronHypo.HypoInputDecisions = "L2ElectronLinks" +theElectronHypo.HypoOutputDecisions = "ElectronL2Decisions" theElectronHypo.Electrons = theElectronFex.ElectronsName theElectronHypo.OutputLevel = VERBOSE -- GitLab From 42c29d3efcf08f7c269b6f72b9e74337bc26f034 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Mon, 18 Jun 2018 13:42:21 +0200 Subject: [PATCH 185/562] Solve coverity 12735 Former-commit-id: 5d1b320d1887183b571fbf5a741fb1da5bcc6095 --- .../InDetEventTPCnv/InDetLowBetaInfo/InDetLowBetaCandidate_p1.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/InDetEventTPCnv/InDetLowBetaInfo/InDetLowBetaCandidate_p1.h b/InnerDetector/InDetEventCnv/InDetEventTPCnv/InDetEventTPCnv/InDetLowBetaInfo/InDetLowBetaCandidate_p1.h index 5a2b97347c66..362d74db3218 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/InDetEventTPCnv/InDetLowBetaInfo/InDetLowBetaCandidate_p1.h +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/InDetEventTPCnv/InDetLowBetaInfo/InDetLowBetaCandidate_p1.h @@ -14,7 +14,7 @@ //private: std::vector<float> m_data; - int m_TRTNLastBits; + int m_TRTNLastBits{}; }; -- GitLab From 5ca108e5dd3d8458ca85562fce014b3fc0f96384 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Mon, 18 Jun 2018 15:29:33 +0200 Subject: [PATCH 186/562] AthenaBaseComps: Implement AthReentrantAlgorithm::getContext(). Override getContext() for AthReentrantAlgorithm --- the version in Algorithm is wrong for a reentrant algorithm. (We generally shouldn't be using this in the first place for reentrant algorithms, but just in case.) Former-commit-id: aad578bf31c63d47268285fc7ddcbe133e4e192b --- .../AthenaBaseComps/AthReentrantAlgorithm.h | 13 +++++++++++-- .../AthenaBaseComps/src/AthReentrantAlgorithm.cxx | 15 +++++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/Control/AthenaBaseComps/AthenaBaseComps/AthReentrantAlgorithm.h b/Control/AthenaBaseComps/AthenaBaseComps/AthReentrantAlgorithm.h index e66e532e93f4..7ba3aa35ed35 100644 --- a/Control/AthenaBaseComps/AthenaBaseComps/AthReentrantAlgorithm.h +++ b/Control/AthenaBaseComps/AthenaBaseComps/AthReentrantAlgorithm.h @@ -180,11 +180,20 @@ class AthReentrantAlgorithm /** Cardinality (Maximum number of clones that can exist) * special value 0 means that algorithm is reentrant * - * Override this to return 0 for reentrant algorithms. - */ + * Override this to return 0 for reentrant algorithms. */ virtual unsigned int cardinality() const override; + /** + * @brief Return the current event context. + * + * Override this because the base class version won't work correctly + * for reentrant algorithms. (We shouldn't really be using this + * for reentrant algorithms, but just in case.). + */ + virtual const EventContext& getContext() const override; + + private: // to keep track of VarHandleKeyArrays for data dep registration diff --git a/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx b/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx index 73bccbd4488a..a7c5bb5d5ad8 100644 --- a/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx +++ b/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx @@ -15,9 +15,7 @@ // Framework includes #include "GaudiKernel/Property.h" -#ifndef REENTRANT_GAUDI #include "GaudiKernel/ThreadLocalContext.h" -#endif #include "./VHKASupport.h" @@ -169,6 +167,19 @@ unsigned int AthReentrantAlgorithm::cardinality() const } +/** + * @brief Return the current event context. + * + * Override this because the base class version won't work correctly + * for reentrant algorithms. (We shouldn't really be using this + * for reentrant algorithms, but just in case.). + */ +const EventContext& AthReentrantAlgorithm::getContext() const +{ + return Gaudi::Hive::currentContext(); +} + + /** * @brief Perform system initialization for an algorithm. * -- GitLab From b5006e46dbf410d43ad7ba6250f2c951018b6b68 Mon Sep 17 00:00:00 2001 From: Yi Liu <yi.liu@cern.ch> Date: Mon, 18 Jun 2018 17:39:50 +0200 Subject: [PATCH 187/562] GsfSmoother: fix issue of resource leakage Former-commit-id: f4db59dd1305f2111a18a050d1c40fd4406ec98a --- Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfSmoother.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfSmoother.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfSmoother.cxx index 34ada9043af1..9b7099607bd7 100644 --- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfSmoother.cxx +++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfSmoother.cxx @@ -478,7 +478,8 @@ const Trk::MultiComponentState* Trk::GsfSmoother::combine (const Trk::MultiCompo if ( !smootherMeasuredCov && !forwardMeasuredCov ){ ATH_MSG_WARNING("Cannot combine two components both without associated errors... returning 0"); - return 0; + delete combinedMultiState; + return nullptr; } if ( !forwardMeasuredCov ){ -- GitLab From 14fc8b0aef80f4427aad3c333b2c59b90dacb346 Mon Sep 17 00:00:00 2001 From: Shota Hayashida <hayashida@hepl.phys.nagoya-u.ac.jp> Date: Mon, 18 Jun 2018 19:24:36 +0200 Subject: [PATCH 188/562] Service/ToolHandle migration at MuFastDataPreparator file Former-commit-id: 25ae2bdf2b4f62254eb1a3ca09b768c40e39b9b7 --- .../TrigL2MuonSA/MuFastDataPreparator.h | 8 ++-- .../TrigL2MuonSA/src/MuFastDataPreparator.cxx | 47 +++++++------------ 2 files changed, 20 insertions(+), 35 deletions(-) diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastDataPreparator.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastDataPreparator.h index 4393399ab767..b859368df56c 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastDataPreparator.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastDataPreparator.h @@ -100,19 +100,19 @@ class MuFastDataPreparator: public AthAlgTool protected: // Services - ServiceHandle<LVL1RPC::RPCRecRoiSvc> m_recRPCRoiSvc; + ServiceHandle<LVL1RPC::RPCRecRoiSvc> m_recRPCRoiSvc { + this, "RPCRecRoiSvc", "LVL1RPC::RPCRecRoiSvc", "Reconstruction of RPC RoI"}; private: TrigL2MuonSA::MuFastDataPreparatorOptions m_options; - IRegSelSvc* m_regionSelector; + ServiceHandle<IRegSelSvc> m_regionSelector; const MdtIdHelper* m_mdtIdHelper; private: - const TrigL2MuonSA::PtEndcapLUTSvc* m_ptEndcapLUTSvc; - //ServiceHandle<PtEndcapLUTSvc> m_ptEndcapLUTSvc; + //const TrigL2MuonSA::PtEndcapLUTSvc* m_ptEndcapLUTSvc; // Tools ToolHandle<RpcDataPreparator> m_rpcDataPreparator; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx index bb0b18423ad5..adad2eea194e 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx @@ -32,6 +32,7 @@ TrigL2MuonSA::MuFastDataPreparator::MuFastDataPreparator(const std::string& type AthAlgTool(type,name,parent), m_recRPCRoiSvc("LVL1RPC::RPCRecRoiSvc",""), m_options(), + m_regionSelector("RegSelSvc", this->name()), m_rpcDataPreparator("TrigL2MuonSA::RpcDataPreparator"), m_tgcDataPreparator("TrigL2MuonSA::TgcDataPreparator"), m_mdtDataPreparator("TrigL2MuonSA::MdtDataPreparator"), @@ -41,7 +42,6 @@ TrigL2MuonSA::MuFastDataPreparator::MuFastDataPreparator(const std::string& type m_rpcPatFinder("TrigL2MuonSA::RpcPatFinder") { declareInterface<TrigL2MuonSA::MuFastDataPreparator>(this); - declareProperty("RPCRecRoiSvc", m_recRPCRoiSvc, "Reconstruction of RPC RoI"); } // -------------------------------------------------------------------------------- @@ -70,26 +70,16 @@ StatusCode TrigL2MuonSA::MuFastDataPreparator::initialize() ATH_MSG_INFO("Retrieved Service " << m_recRPCRoiSvc); // retrieve the ID helper and the region selector - StoreGateSvc* detStore(0); - const MuonGM::MuonDetectorManager* muonMgr; - sc = serviceLocator()->service("DetectorStore", detStore); - if (sc.isFailure()) { - ATH_MSG_ERROR("Could not retrieve DetectorStore."); - return sc; - } + ServiceHandle<StoreGateSvc> detStore("DetectorStore", name()); + ATH_CHECK(detStore.retrieve()); ATH_MSG_DEBUG("Retrieved DetectorStore."); - - sc = detStore->retrieve( muonMgr,"Muon" ); - if (sc.isFailure()) return sc; + + const MuonGM::MuonDetectorManager* muonMgr; + ATH_CHECK( detStore->retrieve( muonMgr,"Muon" ) ); ATH_MSG_DEBUG("Retrieved GeoModel from DetectorStore."); m_mdtIdHelper = muonMgr->mdtIdHelper(); - - // Locate RegionSelector - sc = service("RegSelSvc", m_regionSelector); - if(sc.isFailure()) { - ATH_MSG_ERROR("Could not retrieve the regionselector service"); - return sc; - } + + ATH_CHECK( m_regionSelector.retrieve() ); ATH_MSG_DEBUG("Retrieved the RegionSelector service "); if (m_use_rpc) { @@ -116,8 +106,8 @@ StatusCode TrigL2MuonSA::MuFastDataPreparator::initialize() ATH_MSG_DEBUG("Retrieved service " << m_rpcPatFinder); // set the geometry tools - m_rpcRoadDefiner->setMdtGeometry(m_regionSelector,m_mdtIdHelper); - m_tgcRoadDefiner->setMdtGeometry(m_regionSelector,m_mdtIdHelper); + m_rpcRoadDefiner->setMdtGeometry(&*m_regionSelector,m_mdtIdHelper); + m_tgcRoadDefiner->setMdtGeometry(&*m_regionSelector,m_mdtIdHelper); // return StatusCode::SUCCESS; @@ -140,20 +130,15 @@ StatusCode TrigL2MuonSA::MuFastDataPreparator::setMCFlag(BooleanProperty use_mcL { m_use_mcLUT = use_mcLUT; - StatusCode sc = StatusCode::SUCCESS; - if (m_use_mcLUT) { - sc = serviceLocator()->service("PtEndcapLUTSvc_MC", m_ptEndcapLUTSvc); - //ATH_CHECK( serviceLocator()->service("PtEndcapLUTSvc_MC", m_ptEndcapLUTSvc) ); + ServiceHandle<TrigL2MuonSA::PtEndcapLUTSvc> ptEndcapLUTSvc("PtEndcapLUTSvc_MC", name()); + ATH_CHECK( ptEndcapLUTSvc.retrieve() ); + m_tgcRoadDefiner->setPtLUT(&*ptEndcapLUTSvc); } else { - sc = serviceLocator()->service("PtEndcapLUTSvc", m_ptEndcapLUTSvc); + ServiceHandle<TrigL2MuonSA::PtEndcapLUTSvc> ptEndcapLUTSvc("PtEndcapLUTSvc", name()); + ATH_CHECK( ptEndcapLUTSvc.retrieve() ); + m_tgcRoadDefiner->setPtLUT(&*ptEndcapLUTSvc); } - if (!sc.isSuccess()) { - ATH_MSG_ERROR("Could not find PtEndcapLUTSvc"); - return sc; - } - - m_tgcRoadDefiner->setPtLUT(m_ptEndcapLUTSvc); return StatusCode::SUCCESS; } -- GitLab From b4d41abebead51a716cc3dfe5d46ba4fbfdda6f0 Mon Sep 17 00:00:00 2001 From: Olga Igonkina <olga.igonkina@cern.ch> Date: Mon, 18 Jun 2018 15:04:45 +0000 Subject: [PATCH 189/562] Merge branch 'cherry-pick-0848a9975b [formerly e0e8120c1d]-21.1' into '21.1' Sweeping !12027 from 21.0 to 21.1. remove memleak tests See merge request atlas/athena!12167 (cherry picked from commit d0baf1b3dc3a61ec1c681e3a366b45d6091287ec [formerly 8a455dbbcfe9cefe1279b21a1d2ec693d0747d2e]) da284c95 Merge branch 'my-reco' into '21.0' Former-commit-id: 221f239efeef3b5e2b7c93ff05e1988b757b1974 --- .../test/test_data17_13tev_memleak.sh | 9 --------- .../RecJobTransformTests/test/test_mc16_memleak.sh | 9 --------- 2 files changed, 18 deletions(-) delete mode 100755 Reconstruction/RecExample/RecJobTransformTests/test/test_data17_13tev_memleak.sh delete mode 100755 Reconstruction/RecExample/RecJobTransformTests/test/test_mc16_memleak.sh diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_data17_13tev_memleak.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_data17_13tev_memleak.sh deleted file mode 100755 index 84aca715c57c..000000000000 --- a/Reconstruction/RecExample/RecJobTransformTests/test/test_data17_13tev_memleak.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# -# art-description: Reco_tf runs on 13TeV collision data with Hephaestos for checking for memory leaks 2017 -# art-type: grid - -export LD_PRELOAD=$LCG_RELEASE_BASE/libunwind/5c2cade-76996/$LCG_PLATFORM/lib/libunwind.so; Reco_tf.py --inputBSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/data17_13TeV.00324910.physics_Main.daq.RAW._lb0713._SFO-6._0001.data --maxEvents 10 --autoConfiguration everything --conditionsTag="CONDBR2-BLKPA-2017-08" --preExec 'rec.doTrigger=False' --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputTAGFile myTAG.pool.root --athenaopts '--stdcmalloc --leak-check-execute' - -echo "art-result: $?" - diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_mc16_memleak.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_mc16_memleak.sh deleted file mode 100755 index 344c99648df4..000000000000 --- a/Reconstruction/RecExample/RecJobTransformTests/test/test_mc16_memleak.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# -# art-description: Reco_tf runs on mc16 with Hephaestos for memory leak checking -# art-type: grid - -export LD_PRELOAD=$LCG_RELEASE_BASE/libunwind/5c2cade-76996/$LCG_PLATFORM/lib/libunwind.so; Reco_tf.py --inputRDOFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc16_13TeV.410501.PowhegPythia8EvtGen_A14_ttbar_hdamp258p75_nonallhad.merge.RDO.e5458_s3126_d1437/RDO.11426804._000001.pool.root.1 --conditionsTag=default:OFLCOND-MC16-SDR-16 --geometryVersion=default:ATLAS-R2-2016-01-00-01 --runNumber=410501 --maxEvents 10 --outputESDFile myESD.pool.root --athenaopts '--stdcmalloc --leak-check-execute' - -echo "art-result: $?" - -- GitLab From 8a463d7131e4623c776ccaa4cf0a2854a3f028d4 Mon Sep 17 00:00:00 2001 From: "Vincent R. Pascuzzi" <vpascuzz@cern.ch> Date: Tue, 19 Jun 2018 00:54:19 -0400 Subject: [PATCH 190/562] Update SimHitCreatorMS.cxx: Coverity defect (114469) Fix uninitialised variables. ATLASSIM-3736 Former-commit-id: 4398aca285e040eec515184b60792e5f4bea8354 --- .../ISF_Fatras/ISF_FatrasToolsMS/src/SimHitCreatorMS.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/src/SimHitCreatorMS.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/src/SimHitCreatorMS.cxx index 109db9213c7c..cb1680e2b73e 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/src/SimHitCreatorMS.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/src/SimHitCreatorMS.cxx @@ -53,6 +53,12 @@ iFatras::SimHitCreatorMS::SimHitCreatorMS(const std::string& t, m_cscCollectionName("CSC_Hits"), m_mmCollectionName("MM_Hits"), m_stgcCollectionName("sTGC_Hits"), + m_mdtSimHitCollection(0), + m_rpcSimHitCollection(0), + m_tgcSimHitCollection(0), + m_cscSimHitCollection(0), + m_mmSimHitCollection(0), + m_stgcSimHitCollection(0), m_randomSvc("AtDSFMTGenSvc", n), m_randomEngineName("FatrasRnd"), m_randomEngine(0), -- GitLab From 97e3c744e45276c39bc31b77245c30b3944d3f4c Mon Sep 17 00:00:00 2001 From: Simon George <s.george@rhul.ac.uk> Date: Tue, 19 Jun 2018 07:01:46 +0000 Subject: [PATCH 191/562] replace recursivelyFindFeature with TrigCompositeUtils::findLink in TrigL2ElectronHypoAlgMT and TestHypoAlg Former-commit-id: adc069180de4df6bf8676f27fe39dc8574b0f9ad --- .../src/TrigL2ElectronHypoAlgMT.cxx | 18 ++++------------- .../src/TrigL2ElectronHypoAlgMT.h | 2 -- .../TrigUpgradeTest/src/TestHypoAlg.cxx | 20 ++----------------- .../TrigUpgradeTest/src/TestHypoAlg.h | 1 - 4 files changed, 6 insertions(+), 35 deletions(-) diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlgMT.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlgMT.cxx index 1b155906f3e9..f9ad97a05df2 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlgMT.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlgMT.cxx @@ -58,8 +58,10 @@ StatusCode TrigL2ElectronHypoAlgMT::execute_r( const EventContext& context ) con std::map<const xAOD::TrigEMCluster*, size_t> clusterToIndexMap; size_t clusterCounter = 0; for ( auto previousDecision : *previousDecisionsHandle){ - ElementLink<xAOD::TrigEMClusterContainer> clusterLink; - recursivelyFindFeature(previousDecision, clusterLink); + TrigCompositeUtils::LinkInfo<xAOD::TrigEMClusterContainer> linkInfo = + TrigCompositeUtils::findLink<xAOD::TrigEMClusterContainer>(previousDecision, "feature"); + ElementLink<xAOD::TrigEMClusterContainer> clusterLink = linkInfo.link; + ATH_CHECK( clusterLink.isValid() ); const xAOD::TrigEMCluster* cluster = *clusterLink; clusterToIndexMap.insert( std::make_pair( cluster, clusterCounter ) ); @@ -132,18 +134,6 @@ StatusCode TrigL2ElectronHypoAlgMT::execute_r( const EventContext& context ) con return StatusCode::SUCCESS; } -bool TrigL2ElectronHypoAlgMT::recursivelyFindFeature( const TrigCompositeUtils::Decision* start, ElementLink<xAOD::TrigEMClusterContainer>& clusterlink) const{ - //recursively find in the seeds - if ( start->hasObjectLink( "feature" ) ) { - clusterlink=start->objectLink<xAOD::TrigEMClusterContainer>( "feature" ); - return true; - } - if (TrigCompositeUtils::hasLinkToPrevious(start) ){ - auto thelinkToPrevious =TrigCompositeUtils::linkToPrevious( start); - return recursivelyFindFeature( *thelinkToPrevious, clusterlink); - } - return false; - } diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlgMT.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlgMT.h index 6d2e04dfcc0e..de5c9354cfb0 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlgMT.h +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlgMT.h @@ -43,8 +43,6 @@ class TrigL2ElectronHypoAlgMT : public ::HypoBase SG::ReadHandleKey< xAOD::TrigElectronContainer > m_electronsKey {this, "Electrons", "L2ElectronContainer", "Input"}; - bool recursivelyFindFeature( const TrigCompositeUtils::Decision* d, ElementLink<xAOD::TrigEMClusterContainer>& clusterlink) const; - }; diff --git a/Trigger/TrigValidation/TrigUpgradeTest/src/TestHypoAlg.cxx b/Trigger/TrigValidation/TrigUpgradeTest/src/TestHypoAlg.cxx index 2bb4e3dae6d2..90a0057e7d5d 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/src/TestHypoAlg.cxx +++ b/Trigger/TrigValidation/TrigUpgradeTest/src/TestHypoAlg.cxx @@ -47,8 +47,8 @@ namespace HLTTest { // find features: std::vector<const FeatureOBJ*> featureFromDecision; for ( auto previousDecision: *previousDecisionsHandle ) { - ElementLink<FeatureContainer> featureLink; - recursivelyFindFeature(previousDecision, featureLink); + TrigCompositeUtils::LinkInfo<FeatureContainer> linkInfo = TrigCompositeUtils::findLink<FeatureContainer>(previousDecision, m_linkName.value()); + ElementLink<FeatureContainer> featureLink = linkInfo.link; //auto featureLink = (previousDecision)->objectLink<FeatureContainer>( m_linkName.value() ); CHECK( featureLink.isValid() ); const FeatureOBJ* feature = *featureLink; @@ -121,21 +121,5 @@ namespace HLTTest { return StatusCode::SUCCESS; } - -bool TestHypoAlg::recursivelyFindFeature( const TrigCompositeUtils::Decision* start, ElementLink<FeatureContainer>& featurelink) const{ - //recursively find in the seeds - if ( start->hasObjectLink( m_linkName.value() ) ) { - featurelink=start->objectLink<FeatureContainer>( m_linkName.value() ); - return true; - } - if (TrigCompositeUtils::hasLinkToPrevious(start) ){ - auto thelinkToPrevious =TrigCompositeUtils::linkToPrevious( start); - return recursivelyFindFeature( *thelinkToPrevious, featurelink); - } - return false; - } - - - } //> end namespace HLTTest diff --git a/Trigger/TrigValidation/TrigUpgradeTest/src/TestHypoAlg.h b/Trigger/TrigValidation/TrigUpgradeTest/src/TestHypoAlg.h index 5018731d2a59..17f3acd6bf34 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/src/TestHypoAlg.h +++ b/Trigger/TrigValidation/TrigUpgradeTest/src/TestHypoAlg.h @@ -44,7 +44,6 @@ namespace HLTTest { SG::ReadHandleKey<xAOD::TrigCompositeContainer> m_recoInput { this, "Input", "Input", "Key for reco input"}; StringProperty m_linkName {this, "LinkName", "initialRoI", "name of the link to the features in the decision, e.g. 'feature', 'initialRoI'"}; - bool recursivelyFindFeature( const TrigCompositeUtils::Decision* d, ElementLink<FeatureContainer>& featurelink) const; }; } //> end namespace HLTTest -- GitLab From cc63cd1520dda413c40671bde31225e9b1a3fdf3 Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <frank.winklmeier@cern.ch> Date: Tue, 19 Jun 2018 10:02:09 +0200 Subject: [PATCH 192/562] muCombMT: Use initializer syntax for monitoring tool property Use the initializer syntax to declare an empty monitoring tool. This is the preferred way. Add a comment to GenericMonitoringTool that explains this. Former-commit-id: 958913b2dbb97786c9b47bd1b63b5ac805816aa7 --- .../AthenaMonitoring/GenericMonitoringTool.h | 6 ++++++ Trigger/TrigAlgorithms/TrigmuComb/TrigmuComb/muCombMT.h | 2 +- Trigger/TrigAlgorithms/TrigmuComb/src/muCombMT.cxx | 3 +-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Control/AthenaMonitoring/AthenaMonitoring/GenericMonitoringTool.h b/Control/AthenaMonitoring/AthenaMonitoring/GenericMonitoringTool.h index a171d70d5948..26205ba86261 100644 --- a/Control/AthenaMonitoring/AthenaMonitoring/GenericMonitoringTool.h +++ b/Control/AthenaMonitoring/AthenaMonitoring/GenericMonitoringTool.h @@ -88,6 +88,12 @@ private: /* * Helper class to declare an empty monitoring ToolHandle + * + * This can be used in case an empty monitoring tool needs to be declared in the constructor: + * declareProperty("MonTool", m_monTool=VoidMonitoringTool(this), "Monitoring tool"); + * + * It is however preferred to instead use the initializer syntax in the header file: + * ToolHandle<GenericMonitoringTool> m_monTool{this,"MonTool","","Monitoring tool"}; */ class VoidMonitoringTool : public ToolHandle<GenericMonitoringTool> { public: diff --git a/Trigger/TrigAlgorithms/TrigmuComb/TrigmuComb/muCombMT.h b/Trigger/TrigAlgorithms/TrigmuComb/TrigmuComb/muCombMT.h index dfb85aa23f4c..1cb386fbdf8c 100644 --- a/Trigger/TrigAlgorithms/TrigmuComb/TrigmuComb/muCombMT.h +++ b/Trigger/TrigAlgorithms/TrigmuComb/TrigmuComb/muCombMT.h @@ -77,7 +77,7 @@ class muCombMT : public AthAlgorithm "MuonL2CBInfo", // default value of StoreGate key "output CB Muon container name"}; - ToolHandle<GenericMonitoringTool> m_monTool; + ToolHandle<GenericMonitoringTool> m_monTool{this,"MonTool","","Monitoring tool"}; /** Handle to the G4 backExtrapolator tool */ //ToolHandle<Trk::IExtrapolator> m_backExtrapolatorG4; diff --git a/Trigger/TrigAlgorithms/TrigmuComb/src/muCombMT.cxx b/Trigger/TrigAlgorithms/TrigmuComb/src/muCombMT.cxx index 29a0986c4f4a..8f4604b5e777 100755 --- a/Trigger/TrigAlgorithms/TrigmuComb/src/muCombMT.cxx +++ b/Trigger/TrigAlgorithms/TrigmuComb/src/muCombMT.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ // ******************************************************************** @@ -33,7 +33,6 @@ muCombMT::muCombMT(const std::string& name, ISvcLocator* pSvcLocator): AthAlgorithm(name, pSvcLocator), m_MagFieldSvc(0) { - declareProperty("MonTool", m_monTool=VoidMonitoringTool(this), "Monitoring tool"); } StatusCode muCombMT::initialize() -- GitLab From 2a0804d14f3f0c22620a7a1a086a064125ca2b7e Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Mon, 18 Jun 2018 15:43:46 +0200 Subject: [PATCH 193/562] AthenaServices: Add DelayedConditionsCleanerSvc. Add service to do garbage collection of conditions containers. Former-commit-id: 57f67ca1397649a9f117522965ec7e8c0c3d4b1e --- Control/AthenaServices/CMakeLists.txt | 6 + .../DelayedConditionsCleanerSvc_test.ref | 56 ++ .../DelayedConditionsCleanerSvc_test.txt | 12 + .../src/DelayedConditionsCleanerSvc.cxx | 451 ++++++++++++ .../src/DelayedConditionsCleanerSvc.h | 256 +++++++ .../src/components/AthenaServices_entries.cxx | 2 + .../test/DelayedConditionsCleanerSvc_test.cxx | 668 ++++++++++++++++++ 7 files changed, 1451 insertions(+) create mode 100644 Control/AthenaServices/share/DelayedConditionsCleanerSvc_test.ref create mode 100644 Control/AthenaServices/share/DelayedConditionsCleanerSvc_test.txt create mode 100644 Control/AthenaServices/src/DelayedConditionsCleanerSvc.cxx create mode 100644 Control/AthenaServices/src/DelayedConditionsCleanerSvc.h create mode 100644 Control/AthenaServices/test/DelayedConditionsCleanerSvc_test.cxx diff --git a/Control/AthenaServices/CMakeLists.txt b/Control/AthenaServices/CMakeLists.txt index 6eed102d9974..cab445c986d8 100644 --- a/Control/AthenaServices/CMakeLists.txt +++ b/Control/AthenaServices/CMakeLists.txt @@ -80,6 +80,12 @@ atlas_add_test( RCUSvc_test EXTRA_PATTERNS "^JobOptionsSvc +INFO|^//GP:=" ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" ) +atlas_add_test( DelayedConditionsCleanerSvc_test + SOURCES test/DelayedConditionsCleanerSvc_test.cxx + LINK_LIBRARIES TestTools AsgTools AthenaKernel GaudiKernel EventInfo AthenaBaseComps + EXTRA_PATTERNS "^JobOptionsSvc +INFO|^//GP:=" + ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" ) + atlas_add_test( TestStopRun SCRIPT test/TestStopRun.sh EXTRA_PATTERNS "SGAudSvc +INFO Finalizing|SGAudSvc +INFO Initializing|^Py:Athena +INFO executing ROOT6Setup|No duplicates have been found|duplicate entry.*ignored|^Py:ConfigurableDb WARNING|Read module info for|^ToolSvc.* INFO( finalize:)? Removing all tools|^CoreDumpSvc *INFO Handling signals|types added|including file|^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)|local .* libGaudiKernelDict.so|^Number of My|^Py:Athena +INFO using release|^StoreGateSvc +INFO Start|^Py:AthenaDsoDb +INFO could not install alias|Bindings.py:660newobj = object.__new__|Updating ROOT::Reflex::PluginService::SetDebug|^ApplicationMgr +INFO|^StoreGateSvc +INFO" diff --git a/Control/AthenaServices/share/DelayedConditionsCleanerSvc_test.ref b/Control/AthenaServices/share/DelayedConditionsCleanerSvc_test.ref new file mode 100644 index 000000000000..19f78a5f5575 --- /dev/null +++ b/Control/AthenaServices/share/DelayedConditionsCleanerSvc_test.ref @@ -0,0 +1,56 @@ +DelayedConditionsCleanerSvc_test + + +Initializing Gaudi ApplicationMgr using job opts ../share/DelayedConditionsCleanerSvc_test.txt +JobOptionsSvc INFO # =======> /home/sss/atlas/dvtest/build/../tests/../share/DelayedConditionsCleanerSvc_test.txt +JobOptionsSvc INFO # (3,1): MessageSvc.OutputLevel = 2 +JobOptionsSvc INFO # (5,1): TestConditionsCleanerSvc.RingSize = 5 +JobOptionsSvc INFO # (6,1): TestConditionsCleanerSvc.CleanDelay = 100 +JobOptionsSvc INFO # (7,1): TestConditionsCleanerSvc.LookAhead = 10 +JobOptionsSvc INFO # (9,1): Athena::ConditionsCleanerSvc.CleanerSvc = "Athena::DelayedConditionsCleanerSvc" +JobOptionsSvc INFO # (11,1): Athena::RCUSvc.HiveWhiteBoardSvc = "DummyWhiteBoardSvc" +JobOptionsSvc INFO # (12,1): Athena::RCUSvc.IncidentSvc = "DummyIncidentSvc" +JobOptionsSvc INFO Job options successfully read in from ../share/DelayedConditionsCleanerSvc_test.txt +MessageSvc DEBUG Service base class initialized successfully +ApplicationMgr DEBUG Getting my own properties +ApplicationMgr SUCCESS +==================================================================================================================================== + Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99) + running on karma on Wed May 30 09:00:24 2018 +==================================================================================================================================== +ApplicationMgr INFO Application Manager Configured successfully +ServiceManager DEBUG Initializing service AppMgrRunable +AppMgrRunable DEBUG Service base class initialized successfully +ServiceManager DEBUG Initializing service EventLoopMgr +EventLoopMgr DEBUG Service base class initialized successfully +IncidentSvc DEBUG Service base class initialized successfully +IncidentSvc DEBUG Adding [AbortEvent] listener '<unknown>' with priority 0 +EventDataSvc DEBUG Service base class initialized successfully +EventPersistenc... DEBUG Service base class initialized successfully +AlgExecStateSvc DEBUG Service base class initialized successfully +EventLoopMgr WARNING Unable to locate service "EventSelector" +EventLoopMgr WARNING No events will be processed from external input. +HistogramDataSvc DEBUG Service base class initialized successfully +HistogramPersis... DEBUG Service base class initialized successfully +HistogramPersis...WARNING Histograms saving not required. +ApplicationMgr INFO Application Manager Initialized successfully +ApplicationMgr Ready +DummyWhiteBoardSvc DEBUG Service base class initialized successfully +DummyIncidentSvc DEBUG Service base class initialized successfully +test1 +threaded_test +ClassIDSvc DEBUG Service base class initialized successfully +IncidentSvc DEBUG Adding [ModuleLoaded] listener 'ClassIDSvc' with priority 100 +ClassIDSvc INFO getRegistryEntries: read 2827 CLIDRegistry entries for module ALL +ClassIDSvc DEBUG processCLIDDB: read 597 entries from CLIDDB file: /home/sss/atlas/dvtest/build/share/clid.db +Athena::Delayed... INFO Conditions container statistics +Athena::Delayed... INFO Work q: Max size: 28 (581 queries) +Athena::Delayed... INFO Avg size: 23.19 / Avg removed: 3.76 +Athena::Delayed... INFO lbn1 nInserts 100 maxSize 4 +Athena::Delayed... INFO nClean 100 avgRemoved 0.98 0/1/2+ 15/72/13 +Athena::Delayed... INFO lbn2 nInserts 1000 maxSize 16 +Athena::Delayed... INFO nClean 581 avgRemoved 1.70 0/1/2+ 59/189/333 +Athena::Delayed... INFO ts1 nInserts 100 maxSize 4 +Athena::Delayed... INFO nClean 100 avgRemoved 0.98 0/1/2+ 15/72/13 +Athena::Delayed... INFO ts2 nInserts 1000 maxSize 16 +Athena::Delayed... INFO nClean 581 avgRemoved 1.70 0/1/2+ 59/189/333 diff --git a/Control/AthenaServices/share/DelayedConditionsCleanerSvc_test.txt b/Control/AthenaServices/share/DelayedConditionsCleanerSvc_test.txt new file mode 100644 index 000000000000..542177bffc84 --- /dev/null +++ b/Control/AthenaServices/share/DelayedConditionsCleanerSvc_test.txt @@ -0,0 +1,12 @@ +// job opts for DelayedConditionsCleanerSvc unit test + +MessageSvc.OutputLevel = 2; + +TestConditionsCleanerSvc.RingSize = 5; +TestConditionsCleanerSvc.CleanDelay = 100; +TestConditionsCleanerSvc.LookAhead = 10; + +Athena::ConditionsCleanerSvc.CleanerSvc = "Athena::DelayedConditionsCleanerSvc"; + +Athena::RCUSvc.HiveWhiteBoardSvc = "DummyWhiteBoardSvc"; +Athena::RCUSvc.IncidentSvc = "DummyIncidentSvc"; diff --git a/Control/AthenaServices/src/DelayedConditionsCleanerSvc.cxx b/Control/AthenaServices/src/DelayedConditionsCleanerSvc.cxx new file mode 100644 index 000000000000..c709b8c86599 --- /dev/null +++ b/Control/AthenaServices/src/DelayedConditionsCleanerSvc.cxx @@ -0,0 +1,451 @@ +/* + * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration. + */ +/** + * @file AthenaServices/src/DelayedConditionsCleanerSvc.cxx + * @author scott snyder <snyder@bnl.gov> + * @date May, 2018 + * @brief Clean conditions containers after a delay. + */ + + +#include "DelayedConditionsCleanerSvc.h" +#include "AthenaBaseComps/AthProperties.h" +#include "AthenaKernel/CondCont.h" +#include "AthenaKernel/IRCUSvc.h" +#include "CxxUtils/StrFormat.h" +#include "GaudiKernel/EventContext.h" +#include "GaudiKernel/ServiceHandle.h" +#include "tbb/task.h" +#include <algorithm> + + +// We wanted to try to allow cleaning to run as asynchronous tasks, +// but there are some race conditions that appear to be difficult +// to resolve. These stem from the fact that conditions are only +// written from CondInputLoader. If we clean after that, and don't +// have the full set of IOV keys for all executing events, then we can +// clean an item which the slot won't be able to recover. +// Leave the code commented-out for now while we think about this further. +#define USE_ASYNC_TASK 0 + + +namespace Athena { + + +class DelayedConditionsCleanerSvcProps + : public AthProperties<DelayedConditionsCleanerSvc> +{ +public: + DelayedConditionsCleanerSvcProps (DelayedConditionsCleanerSvc* parent) + : AthProperties<DelayedConditionsCleanerSvc>(parent) {} + + /// Property: Number of previous events for which to remember IOV history. + Gaudi::Property<size_t> m_ringSize + { parent(), "RingSize", 100, + "Number of previous events for which to remember IOV history." }; + + /// Property: Number of events after adding a conditions object + /// we try to clean its container. + Gaudi::Property<size_t> m_cleanDelay + { parent(), "CleanDelay", 100, + "Number of events after adding a conditions object we try to clean its container." }; + + /// Property: Maximum number of events to consolodate together when cleaning. + Gaudi::Property<size_t> m_lookAhead + { parent(), "LookAhead", 10, + "Maximum number of events to consolodate together when cleaning." }; + + + /// Property: If true, run cleaning asynchronously in an MT job. +#if USE_ASYNC_TASK + Gaudi::Property<bool> m_async + { parent(), "Async", false, + "If true, run cleaning asynchronously in an MT job." }; +#else + bool m_async = false; +#endif + + /// Property: RCU Service. + ServiceHandle<Athena::IRCUSvc> m_rcu + { parent(), "RCUSvc", "Athena::RCUSvc", + "The RCU service." }; +}; + + +#if USE_ASYNC_TASK +/** + * @brief TBB task for running cleaning asynchronously. + */ +class DelayedConditionsCleanerTask + : public tbb::task +{ +public: + /** + * @brief A TBB task to run cleaning asynchronously. + * @param cleaner The parent service instance. + * @param cis List of conditions containers to clean. + * @param keyType Run+LBN or timestamp keys? + * @param keys Set of IOV keys for recent events. + */ + DelayedConditionsCleanerTask (DelayedConditionsCleanerSvc& cleaner, + std::vector<DelayedConditionsCleanerSvc::CondContInfo*>&& cis, + DelayedConditionsCleanerSvc::KeyType keyType, + std::vector<DelayedConditionsCleanerSvc::key_type>&& keys); + + + /** + * @brief Run asynchonous cleaning. + */ + tbb::task* execute() override; + + +private: + /// The parent service instance. + DelayedConditionsCleanerSvc& m_cleaner; + + /// List of conditions containers to clean. + std::vector<DelayedConditionsCleanerSvc::CondContInfo*> m_cis; + + /// Run+LBN or timestamp keys? + DelayedConditionsCleanerSvc::KeyType m_keyType; + + /// Set of IOV keys for recent events. + std::vector<DelayedConditionsCleanerSvc::key_type> m_keys; +}; + + +/** + * @brief A TBB task to run cleaning asynchronously. + * @param cleaner The parent service instance. + * @param cis List of conditions containers to clean. + * @param keyType Run+LBN or timestamp keys? + * @param keys Set of IOV keys for recent events. + */ +DelayedConditionsCleanerTask::DelayedConditionsCleanerTask + (DelayedConditionsCleanerSvc& cleaner, + std::vector<DelayedConditionsCleanerSvc::CondContInfo*>&& cis, + DelayedConditionsCleanerSvc::KeyType keyType, + std::vector<DelayedConditionsCleanerSvc::key_type>&& keys) + : m_cleaner (cleaner), + m_cis (cis), + m_keyType (keyType), + m_keys (keys) +{ +} + + +/** + * @brief Run asynchonous cleaning. + */ +tbb::task* DelayedConditionsCleanerTask::execute() +{ + // Do the cleaning. + m_cleaner.cleanContainers (std::move (m_cis), m_keyType, std::move (m_keys)); + + // This task is terminating. + --m_cleaner.m_cleanTasks; + return nullptr; +} +#endif // USE_ASYNC_TASK + + +/** + * @brief Standard Gaudi constructor. + * @param name Service name. + * @param svc Service locator. + */ +DelayedConditionsCleanerSvc::DelayedConditionsCleanerSvc (const std::string& name, + ISvcLocator* svc) + : base_class (name, svc), + m_props (std::make_unique<DelayedConditionsCleanerSvcProps> (this)) +{ +} + + +/** + * @brief Standard Gaudi initialize method. + */ +StatusCode DelayedConditionsCleanerSvc::initialize() +{ + // Set the ring buffer sizes. + m_runlbn.reset (m_props->m_ringSize); + m_timestamp.reset (m_props->m_ringSize); + + ATH_CHECK( m_props->m_rcu.retrieve() ); + size_t nslots = m_props->m_rcu->getNumSlots(); + m_slotLBN.resize (nslots); + m_slotTimestamp.resize (nslots); + + return StatusCode::SUCCESS; +} + + +/** + * @brief Called at the start of each event. + * @param ctx The current event context. + * @param allowAsync If true, then cleaning may be run + * in an asynchronous TBB task. + */ +StatusCode +DelayedConditionsCleanerSvc::event (const EventContext& ctx, bool allowAsync) +{ + // Push the IOV key for the current event into the ring buffers. + // Also save in the per-slot arrays. + key_type key_lbn = CondContBase::keyFromRunLBN (ctx.eventID()); + key_type key_ts = CondContBase::keyFromTimestamp (ctx.eventID()); + m_runlbn.push (key_lbn); + m_timestamp.push (key_ts); + EventContext::ContextID_t slot = ctx.slot(); + if (slot != EventContext::INVALID_CONTEXT_ID) { + m_slotLBN[slot] = key_lbn; + m_slotTimestamp[slot] = key_ts; + } + + // Return now if an asynchronous cleaning task is still running --- + // we don't want to start a new one yet. We'll check pending work + // on the next call. + if (m_cleanTasks > 0) { + return StatusCode::SUCCESS; + } + + // Collect conditions containers in need of cleaning. + // Separate lists for those using timestamps and those using run+LBN. + std::vector<CondContInfo*> ci_runlbn; + std::vector<CondContInfo*> ci_timestamp; + { + lock_t lock (m_workMutex); + // Is it time to clean the container at the top of the work queue? + if (!m_work.empty() && m_work.top().m_evt <= ctx.evt()) { + ++m_nEvents; + size_t sz = m_work.size(); + m_queueSum += sz; + m_maxQueue = std::max (m_maxQueue, sz); + + // Yes. Put it on the correct list. Also look ahead in the queue + // a bit; if there are other containers that we want to clean soon, + // go ahead and do them now. + do { + CondContInfo* ci = m_work.top().m_ci; + if (ci->m_cc.entriesRunLBN() > 0) { + ci_runlbn.push_back (ci); + } + if (ci->m_cc.entriesTimestamp() > 0) { + ci_timestamp.push_back (ci); + } + m_work.pop(); + ++m_workRemoved; + } while (!m_work.empty() && m_work.top().m_evt <= ctx.evt() + m_props->m_lookAhead); + } + } + + // Clean the containers. + if (!ci_runlbn.empty()) { + scheduleClean (std::move (ci_runlbn), m_runlbn, m_slotLBN, + KeyType::RUN_LBN, allowAsync); + } + if (!ci_timestamp.empty()) { + scheduleClean (std::move (ci_timestamp), m_timestamp, m_slotTimestamp, + KeyType::TIMESTAMP, allowAsync); + } + + return StatusCode::SUCCESS; +} + + +/** + * @brief Called after a conditions object has been added. + * @param ctx The current event context. + * @param cc The container to which the object was added. + */ +StatusCode DelayedConditionsCleanerSvc::condObjAdded (const EventContext& ctx, + CondContBase& cc) +{ + // Add this container to the priority queue. + lock_t lock (m_workMutex); + CCInfoMap_t::iterator it = m_ccinfo.find (&cc); + if (it == m_ccinfo.end()) { + it = m_ccinfo.emplace (&cc, CondContInfo (cc)).first; + } + + EventContext::ContextEvt_t evt = ctx.evt(); + m_work.emplace (evt + m_props->m_cleanDelay, it->second); + return StatusCode::SUCCESS; +} + + +/** + * @brief Print some statistics about the garbage collection. + * Would generally be called in finalize(), but broken out + * as a separate interface for testing/debugging purposes. + */ +StatusCode DelayedConditionsCleanerSvc::printStats() const +{ + // Suppress output if we didn't actually do anything. + if (m_nEvents == 0) { + return StatusCode::SUCCESS; + } + + ATH_MSG_INFO( "Conditions container statistics" ); + ATH_MSG_INFO( CxxUtils::strformat (" Work q: Max size: %zu (%zu queries) ", + m_maxQueue, m_nEvents) ); + size_t den = std::max (m_nEvents, 1lu); + ATH_MSG_INFO( CxxUtils::strformat (" Avg size: %.2f / Avg removed: %.2f", + static_cast<float>(m_queueSum)/den, + static_cast<float>(m_workRemoved)/den) ); + + std::vector<const CondContInfo*> infos; + for (const auto& p : m_ccinfo) { + infos.push_back (&p.second); + } + std::sort (infos.begin(), infos.end(), + [](const CondContInfo* a, const CondContInfo* b) + { return a->m_cc.id().key() < b->m_cc.id().key(); }); + + for (const CondContInfo* ci : infos) { + ATH_MSG_INFO( CxxUtils::strformat (" %-20s nInserts %6zu maxSize %3zu", + ci->m_cc.id().key().c_str(), + ci->m_cc.nInserts(), + ci->m_cc.maxSize()) ); + den = std::max (ci->m_nClean, 1lu); + ATH_MSG_INFO( CxxUtils::strformat (" nClean %zu avgRemoved %.2f 0/1/2+ %zu/%zu/%zu", + ci->m_nClean, + static_cast<float> (ci->m_nRemoved) / den, + ci->m_removed0, + ci->m_removed1, + ci->m_removed2plus) ); + } + + return StatusCode::SUCCESS; +} + + +/** + * @brief Do cleaning for a set of containers. + * @param cis Set of containers to clean. + * @param ring Ring buffer with recent IOV keys. + * @param slotKeys Vector of current keys for all slots. + * @param keyType Run+LBN or timestamp keys? + * @param allowAsync Can this task run asynchronously? + * + * This will either run cleaning directly, or submit it as a TBB task. + */ +void +DelayedConditionsCleanerSvc::scheduleClean (std::vector<CondContInfo*>&& cis, + Ring& ring, + const std::vector<key_type>& slotKeys, + KeyType keyType, + bool allowAsync) +{ + // Remove any duplicates from the list of containers. + std::sort (cis.begin(), cis.end()); + auto pos = std::unique (cis.begin(), cis.end()); + cis.resize (pos - cis.begin()); + + // Get a copy of the contents of the ring buffer. + std::vector<key_type> keys = ring.getKeysDedup(); + + // Add in the keys for the currently-executing slots. + // These are very likely to already be in the ring, but that's + // not absolutely guaranteed. + // FIXME: This probably does another memory allocation, due to + // growing the buffer. Would be nice to avoid that. + keys.insert (keys.end(), slotKeys.begin(), slotKeys.end()); + + if (allowAsync && m_props->m_async) { +#if USE_ASYNC_TASK + // Queue cleaning as a TBB task. + // Count that we have another executing task. + ++m_cleanTasks; + + // Create the TBB task and queue it. + // TBB will delete the task object after it completes. + tbb::task* t = new (tbb::task::allocate_root()) + DelayedConditionsCleanerTask (*this, std::move (cis), + keyType, std::move (keys)); + tbb::task::enqueue (*t); +#endif + } + else + { + // Call cleaning directly. + cleanContainers (std::move (cis), keyType, std::move (keys)); + } +} + + +/** + * @brief Clean a set of containers. + * @param cis Set of containers to clean. + * @param keyType Run+LBN or timestamp keys? + * @param keys Set of IOV keys for recent events. + */ +void +DelayedConditionsCleanerSvc::cleanContainers (std::vector<CondContInfo*>&& cis, + KeyType keyType, + std::vector<key_type>&& keys) +{ + /// Sort the key array and remove duplicates. + /// We expect that the key array is probably `almost' sorted. + /// std::sort, at least in the gcc implementation, is designed + /// to perform well in such cases. + std::sort (keys.begin(), keys.end()); + auto end = std::unique (keys.begin(), keys.end()); + keys.resize (end - keys.begin()); + for (CondContInfo* ci : cis) { + cleanContainer (ci, keyType, keys); + } +} + + +/** + * @brief Clean a single container. + * @param ci The container to clean. + * @param keyType Run+LBN or timestamp keys? + * @param keys Set of IOV keys for recent events. + */ +void +DelayedConditionsCleanerSvc::cleanContainer (CondContInfo* ci, + KeyType keyType, + const std::vector<key_type>& keys) +{ + size_t n; + switch (keyType) { + case KeyType::RUN_LBN: + n = ci->m_cc.trimRunLBN (keys); + break; + + case KeyType::TIMESTAMP: + n = ci->m_cc.trimTimestamp (keys); + break; + + default: + std::abort(); + } + + ++ci->m_nClean; + ci->m_nRemoved += n; + switch (n) { + case 0: + ++ci->m_removed0; + break; + case 1: + ++ci->m_removed1; + break; + default: + ++ci->m_removed2plus; + } +} + + +/** + * @brief Standard Gaudi finalize method. + */ +StatusCode DelayedConditionsCleanerSvc::finalize() +{ + ATH_CHECK( printStats() ); + return StatusCode::SUCCESS; +} + + +} // namespace Athena diff --git a/Control/AthenaServices/src/DelayedConditionsCleanerSvc.h b/Control/AthenaServices/src/DelayedConditionsCleanerSvc.h new file mode 100644 index 000000000000..86c8ae92635e --- /dev/null +++ b/Control/AthenaServices/src/DelayedConditionsCleanerSvc.h @@ -0,0 +1,256 @@ +// This file's extension implies that it's C, but it's really -*- C++ -*-. +/* + * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration. + */ +/** + * @file AthenaServices/src/DelayedConditionsCleanerSvc.h + * @author scott snyder <snyder@bnl.gov> + * @date May, 2018 + * @brief Clean conditions containers after a delay. + */ + + +#ifndef ATHENASERVICES_DELAYEDCONDITIONSCLEANERTOOLSVC_H +#define ATHENASERVICES_DELAYEDCONDITIONSCLEANERTOOLSVC_H + + +#include "AthenaBaseComps/AthService.h" +#include "AthenaKernel/IConditionsCleanerSvc.h" +#include "CxxUtils/Ring.h" +#include <queue> +#include <mutex> +#include <cstdint> +#include <atomic> +#include <unordered_map> + + +namespace Athena { + + +class DelayedConditionsCleanerTask; +class DelayedConditionsCleanerSvcProps; + + +/** + * @brief Clean conditions containers after a delay. + * + * This is an implementation of IConditionsCleanerSvc, for doing + * garbage collection of conditions objects. + * + * Briefly, it works like this. + * + * When a conditions object is added (@c condObjAdded interface), + * we put an entry in a priority queue, saying that we want to + * clean this container CleanDelay events later. + * + * On each event (@c event interface) we put the current IOV keys + * (run+LBN and timestamp) into ring buffers (of size RingSize). + * If the topmost entry of the priority queue has come due, then we + * pull of that entry and other entries due up to LookAhead events later. + * We then do a trim operation on each of the conditions containers, + * removing conditions objects from the oldest first that do not + * match any of the IOV keys in the ring buffer. + * + * The cleaning can optionally be done as an asynchronous TBB job if + * Async is true and allowAsync=true is passed to @c event. + */ +class DelayedConditionsCleanerSvc + : public extends<AthService, IConditionsCleanerSvc> +{ +public: + /// Packed key type. + typedef CondContBase::key_type key_type; + + + /** + * @brief Standard Gaudi constructor. + * @param name Service name. + * @param svc Service locator. + */ + DelayedConditionsCleanerSvc (const std::string& name, ISvcLocator* svc); + + + /** + * @brief Standard Gaudi initialize method. + */ + virtual StatusCode initialize() override; + + + /** + * @brief Standard Gaudi finalize method. + */ + virtual StatusCode finalize() override; + + + /** + * @brief Called at the start of each event. + * @param ctx The current event context. + * @param allowAsync If true, then cleaning may be run + * in an asynchronous TBB task. + */ + virtual StatusCode event (const EventContext& ctx, bool allowAsync) override; + + + /** + * @brief Called after a conditions object has been added. + * @param ctx The current event context. + * @param cc The container to which the object was added. + */ + virtual StatusCode condObjAdded (const EventContext& ctx, + CondContBase& cc) override; + + + /** + * @brief Print some statistics about the garbage collection. + * Would generally be called in finalize(), but broken out + * as a separate interface for testing/debugging purposes. + */ + virtual StatusCode printStats() const override; + + + +private: + friend class DelayedConditionsCleanerTask; + + + /// Ring buffer holding most recent IOV keys of a given type. + typedef CxxUtils::Ring<key_type> Ring; + + + /// Run+LBN or timestamp key? + enum class KeyType + { + RUN_LBN, + TIMESTAMP + }; + + + /// Information that we maintain about each conditions container. + class CondContInfo + { + public: + CondContInfo (CondContBase& cc) : m_cc (cc) {} + + /// The conditions container. Strictly redundant with the key field + /// of the map, but we want a non-const version. + CondContBase& m_cc; + + /// Number of times cleaning was attempted. + size_t m_nClean = 0; + + /// Total number of objects removed by cleaning. + size_t m_nRemoved = 0; + + /// Number of times exactly 0 objects were removed. + size_t m_removed0 = 0; + + /// Number of times exactly 1 object was removed. + size_t m_removed1 = 0; + + /// Number of times two or more objects were removed. + size_t m_removed2plus = 0; + }; + + + /** + * @brief Do cleaning for a set of containers. + * @param cis Set of containers to clean. + * @param ring Ring buffer with recent IOV keys. + * @param slotKeys Vector of current keys for all slots. + * @param keyType Run+LBN or timestamp keys? + * @param allowAsync Can this task run asynchronously? + * + * This will either run cleaning directly, or submit it as a TBB task. + */ + void scheduleClean (std::vector<CondContInfo*>&& cis, + Ring& ring, + const std::vector<key_type>& slotKeys, + KeyType keyType, + bool allowAsync); + + + /** + * @brief Clean a set of containers. + * @param cis Set of containers to clean. + * @param keyType Run+LBN or timestamp keys? + * @param keys Set of IOV keys for recent events. + */ + void cleanContainers (std::vector<CondContInfo*>&& cis, + KeyType keytype, + std::vector<key_type>&& keys); + + + /** + * @brief Clean a single container. + * @param ci The container to clean. + * @param keyType Run+LBN or timestamp keys? + * @param keys Set of IOV keys for recent events. + */ + void cleanContainer (CondContInfo* ci, + KeyType keyType, + const std::vector<key_type>& keys); + + + + /// Two ring buffers for recent IOV keys, one for run+LBN and one for + /// timestamp. We only access these from event(), which is called + /// from the event loop, so no locking is needed. + Ring m_runlbn; + Ring m_timestamp; + + /// IOV keys currently in use for each slot. + std::vector<key_type> m_slotLBN; + std::vector<key_type> m_slotTimestamp; + + + /// Map of information, indexed by the conditions container. + typedef std::unordered_map<CondContBase*, CondContInfo> CCInfoMap_t; + CCInfoMap_t m_ccinfo; + + + /// Item in the work queue. + /// This is a priority queue, so these should be comparable. + struct QueueItem + { + QueueItem (EventContext::ContextEvt_t evt, CondContInfo& ci) + : m_evt (evt), m_ci (&ci) + {} + + EventContext::ContextEvt_t m_evt; + CondContInfo* m_ci; + + bool operator< (const QueueItem& other) const + { + // Reversed, since we want the lowest to come first. + return m_evt > other.m_evt; + } + }; + + /// Priority queue of pending cleaning requests. + std::priority_queue<QueueItem> m_work; + + /// Serialize access to m_ccinfo and m_work. + typedef std::mutex mutex_t; + typedef std::lock_guard<mutex_t> lock_t; + mutex_t m_workMutex; + + + /// Priority queue statistics. + size_t m_nEvents = 0; // Number of times queue was examined. + size_t m_queueSum = 0; // Running sum of queue size. + size_t m_workRemoved = 0; // Count of items removed from the queue. + size_t m_maxQueue = 0; // Maximum queue size. + + + /// Number of active asynchronous cleaning tasks. + std::atomic<int> m_cleanTasks; + + /// Component properties. + std::unique_ptr<DelayedConditionsCleanerSvcProps> m_props; +}; + + +} // namespace Athena + + +#endif // not ATHENASERVICES_DELAYEDCONDITIONSCLEANERTOOLSVC_H diff --git a/Control/AthenaServices/src/components/AthenaServices_entries.cxx b/Control/AthenaServices/src/components/AthenaServices_entries.cxx index 1e9cf75395b8..532c89025e0b 100644 --- a/Control/AthenaServices/src/components/AthenaServices_entries.cxx +++ b/Control/AthenaServices/src/components/AthenaServices_entries.cxx @@ -33,6 +33,7 @@ #include "../ToyNextPassFilterAlg.h" #include "../ToyNextPassFilterTool.h" #include "../ConditionsCleanerSvc.h" +#include "../DelayedConditionsCleanerSvc.h" DECLARE_COMPONENT( AthenaOutputStream ) DECLARE_COMPONENT( AthenaConditionStream ) @@ -69,3 +70,4 @@ DECLARE_COMPONENT( AthIncFirerAlg ) DECLARE_COMPONENT( ToyNextPassFilterAlg ) DECLARE_COMPONENT( ToyNextPassFilterTool ) DECLARE_COMPONENT( Athena::ConditionsCleanerSvc ) +DECLARE_COMPONENT( Athena::DelayedConditionsCleanerSvc ) diff --git a/Control/AthenaServices/test/DelayedConditionsCleanerSvc_test.cxx b/Control/AthenaServices/test/DelayedConditionsCleanerSvc_test.cxx new file mode 100644 index 000000000000..ddc2525b8528 --- /dev/null +++ b/Control/AthenaServices/test/DelayedConditionsCleanerSvc_test.cxx @@ -0,0 +1,668 @@ +/* + * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration. + */ +/** + * @file AthenaServices/test/DelayedConditionsCleanerSvc_test.cxx + * @author scott snyder + * @date May 2018 + * @brief Regression test for DelayedConditionsCleanerSvc. + */ + + +#undef NDEBUG +#include "AthenaBaseComps/AthService.h" +#include "AthenaKernel/errorcheck.h" +#include "AthenaKernel/IConditionsCleanerSvc.h" +#include "AthenaKernel/IRCUSvc.h" +#include "AthenaKernel/CondCont.h" +#include "AthenaKernel/CLASS_DEF.h" +#include "TestTools/initGaudi.h" +#include "TestTools/random.h" +#include "GaudiKernel/ServiceHandle.h" +#include "GaudiKernel/EventContext.h" +#include "GaudiKernel/IHiveWhiteBoard.h" +#include "GaudiKernel/IIncidentSvc.h" +#include "GaudiKernel/IIncidentListener.h" +#include "GaudiKernel/Service.h" +#include "tbb/task_scheduler_init.h" +#include "tbb/concurrent_queue.h" +#include "tbb/task.h" +#include <list> +#include <algorithm> +#include <iostream> +#include <cassert> + + +class RCUTest + : public Athena::IRCUSvc +{ +public: + virtual void add (Athena::IRCUObject*) override { std::abort(); } + virtual StatusCode remove (Athena::IRCUObject*) override { std::abort(); } + virtual size_t getNumSlots() const override { std::abort(); } + virtual unsigned long addRef()override { std::abort(); } + virtual unsigned long release() override { std::abort(); } + virtual StatusCode queryInterface( const InterfaceID&, void** ) override { std::abort(); } + +}; + + +class CondContTest + : public CondContBase +{ +public: + CondContTest (int nlbn, int nts) + : CondContBase (m_rcu, 123, m_id, nullptr), + m_nlbn(nlbn), m_nts (nts) + {} + + virtual const DataObjID& id() const override { std::abort(); } + virtual SG::DataProxy* proxy() override { std::abort(); } + virtual void setProxy(SG::DataProxy*) override { std::abort(); } + virtual void list (std::ostream&) const override { std::abort(); } + virtual size_t entries() const override { std::abort(); } + virtual std::vector<EventIDRange> ranges() const override { std::abort(); } + virtual StatusCode typelessInsert (const EventIDRange&, + void*, + const EventContext& = Gaudi::Hive::currentContext()) override { std::abort(); } + virtual bool valid( const EventIDBase&) const override { std::abort(); } + virtual bool range (const EventIDBase&, EventIDRange&) const override { std::abort(); } + virtual void erase (const EventIDBase&, + const EventContext& = Gaudi::Hive::currentContext()) override { std::abort(); } + virtual void quiescent (const EventContext& = Gaudi::Hive::currentContext()) override { std::abort(); } + virtual const void* findByCLID (CLID, + const EventIDBase&, + EventIDRange const**) const override { std::abort(); } + + virtual size_t nInserts() const override { return 0; } + virtual size_t maxSize() const override { return 0; } + + + virtual size_t entriesRunLBN() const override + { + return m_nlbn; + } + + virtual size_t entriesTimestamp() const override + { + return m_nts; + } + + virtual size_t trimRunLBN (const std::vector<key_type>& keys) override + { + m_keysRunLBN.push_back (keys); + return 1; + } + + virtual size_t trimTimestamp (const std::vector<key_type>& keys) override + { + m_keysTimestamp.push_back (keys); + return 1; + } + + + size_t nkeysRunLBN() const { return m_keysRunLBN.size(); } + size_t nkeysTimestamp() const { return m_keysTimestamp.size(); } + std::vector<key_type> keysRunLBN() + { + std::vector<key_type> v = m_keysRunLBN.front(); + m_keysRunLBN.pop_front(); + return v; + } + std::vector<key_type> keysTimestamp() + { + std::vector<key_type> v = m_keysTimestamp.front(); + m_keysTimestamp.pop_front(); + return v; + } + + +private: + RCUTest m_rcu; + DataObjID m_id; + int m_nlbn; + int m_nts; + std::list<std::vector<key_type> > m_keysRunLBN; + std::list<std::vector<key_type> > m_keysTimestamp; +}; + + +EventContext makeCtx (EventContext::ContextEvt_t evt, + EventIDBase::event_number_t evnum = EventIDBase::UNDEFEVT, + EventContext::ContextID_t slot = EventContext::INVALID_CONTEXT_ID) +{ + if (evnum == EventIDBase::UNDEFEVT) { + evnum = evt; + } + EventContext ctx (evt, slot); + EventIDBase eid (0, // run_number + evnum, // event_number + 0, // time_stamp + evnum+2000, // ns_offset + evnum+1000); // lumi_block + ctx.setEventID (eid); + return ctx; +} + + +void test1 (Athena::IConditionsCleanerSvc& svc) +{ + typedef CondContBase::key_type key_type; + + std::cout << "test1\n"; + CondContTest cc1 (10, 0); + CondContTest cc2 (0, 10); + + assert( svc.event (makeCtx(0), false).isSuccess() ); + assert( svc.event (makeCtx(1), false).isSuccess() ); + assert( svc.event (makeCtx(1), false).isSuccess() ); + + assert( svc.condObjAdded (makeCtx(200), cc1).isSuccess() ); + assert( svc.condObjAdded (makeCtx(100), cc2).isSuccess() ); + + assert( svc.event (makeCtx(4), false).isSuccess() ); + assert( svc.event (makeCtx(3), false).isSuccess() ); + + assert (cc1.nkeysRunLBN() == 0); + assert (cc2.nkeysRunLBN() == 0); + assert (cc1.nkeysTimestamp() == 0); + assert (cc2.nkeysTimestamp() == 0); + + assert( svc.event (makeCtx(201), false).isSuccess() ); + // 1 1 4 3 201 + assert (cc1.nkeysRunLBN() == 0); + assert (cc2.nkeysRunLBN() == 0); + assert (cc1.nkeysTimestamp() == 0); + assert (cc2.nkeysTimestamp() == 1); + //for (key_type k : cc2.keysTimestamp()) std::cout << k << " "; + //std::cout << "\n"; + assert (cc2.keysTimestamp() == (std::vector<key_type> { 0, 2001, 2003, 2004, 2201 })); + + assert( svc.event (makeCtx(301), false).isSuccess() ); + // 1 4 3 201 301 + assert (cc1.nkeysRunLBN() == 1); + assert (cc2.nkeysRunLBN() == 0); + assert (cc1.nkeysTimestamp() == 0); + assert (cc2.nkeysTimestamp() == 0); + assert (cc1.keysRunLBN() == (std::vector<key_type> { 0, 1001, 1003, 1004, 1201, 1301 })); + + CondContTest cc3 (10, 0); + CondContTest cc4 (0, 10); + + assert( svc.condObjAdded (makeCtx(300), cc1).isSuccess() ); + assert( svc.condObjAdded (makeCtx(303), cc2).isSuccess() ); + assert( svc.condObjAdded (makeCtx(305), cc3).isSuccess() ); + assert( svc.condObjAdded (makeCtx(320), cc4).isSuccess() ); + + assert( svc.event (makeCtx(401), false).isSuccess() ); + // 4 3 201 301 401 + assert (cc1.nkeysRunLBN() == 1); + assert (cc2.nkeysRunLBN() == 0); + assert (cc3.nkeysRunLBN() == 1); + assert (cc4.nkeysRunLBN() == 0); + assert (cc1.nkeysTimestamp() == 0); + assert (cc2.nkeysTimestamp() == 1); + assert (cc3.nkeysTimestamp() == 0); + assert (cc4.nkeysTimestamp() == 0); + assert (cc1.keysRunLBN() == (std::vector<key_type> { 0, 1003, 1004, 1201, 1301, 1401 })); + assert (cc2.keysTimestamp() == (std::vector<key_type> { 0, 2003, 2004, 2201, 2301, 2401 })); + assert (cc3.keysRunLBN() == (std::vector<key_type> { 0, 1003, 1004, 1201, 1301, 1401 })); + + assert( svc.event (makeCtx(430), false).isSuccess() ); + // 3 201 301 401 430 + assert (cc1.nkeysRunLBN() == 0); + assert (cc2.nkeysRunLBN() == 0); + assert (cc3.nkeysRunLBN() == 0); + assert (cc4.nkeysRunLBN() == 0); + assert (cc1.nkeysTimestamp() == 0); + assert (cc2.nkeysTimestamp() == 0); + assert (cc3.nkeysTimestamp() == 0); + assert (cc4.nkeysTimestamp() == 1); + assert (cc4.keysTimestamp() == (std::vector<key_type> { 0, 2003, 2201, 2301, 2401, 2430 })); +} + + +//**************************************************************************** +// multi-threaded test. +// + + +const size_t nthreads = 4; +const size_t nevt = 10000; + + +class DummyWhiteBoardSvc + : public extends<AthService, IHiveWhiteBoard> +{ +public: + using extends::extends; + + virtual StatusCode selectStore( size_t ) override { std::abort(); } + virtual StatusCode clearStore( size_t ) override { std::abort(); } + virtual StatusCode setNumberOfStores( size_t ) override { std::abort(); } + virtual void addNewDataObjects( DataObjIDColl& ) override { std::abort(); } + virtual DataObjIDColl getNewDataObjects() override { std::abort(); } + virtual bool exists( const DataObjID& ) override { std::abort(); } + virtual size_t allocateStore( int ) override { std::abort(); } + virtual StatusCode freeStore( size_t ) override { std::abort(); } + virtual size_t getPartitionNumber( int ) const override { std::abort(); } + virtual size_t freeSlots() override { std::abort(); } + + virtual size_t getNumberOfStores() const override + { return nthreads; } +}; +DECLARE_COMPONENT( DummyWhiteBoardSvc ) + + +class DummyIncidentSvc + : public extends<AthService, IIncidentSvc> +{ +public: + using extends::extends; + + + virtual void removeListener( IIncidentListener*, const std::string& = "" ) override { std::abort(); } + virtual void getListeners( std::vector<IIncidentListener*>&, const std::string& = "" ) const override { std::abort(); } + virtual void fireIncident( const Incident& ) override { std::abort(); } + virtual IIncidentSvc::IncidentPack getIncidents( const EventContext* ) override { std::abort(); } + virtual void fireIncident( std::unique_ptr<Incident> ) override { std::abort(); } + + + virtual void addListener( IIncidentListener*, const std::string& = "", long = 0, + bool = false, bool = false ) override + { + } +}; +DECLARE_COMPONENT( DummyIncidentSvc ) + + +typedef tbb::concurrent_bounded_queue<size_t> work_queue_t; + + +CLASS_DEF(CondCont<int>, 1234, 0) + + +class CondContWrapper +{ +public: + enum class KeyType + { + RUN_LBN, + TIMESTAMP + }; + + CondContWrapper (Athena::IRCUSvc& rcu, + KeyType keyType, + size_t m_iovsize, + const std::string& name); + void load (const EventContext& ctx); + void check (const EventContext& ctx) const; + void checkFin (bool threaded) const; + + std::unique_ptr<int> makeObj (const EventContext& ctx, + EventIDRange& r); + EventIDBase::number_type getKey (const EventIDBase& eid) const; + EventIDBase setKey (EventIDBase::number_type k, const EventIDBase& eid_in); + + + //private: + DataObjID m_id; + KeyType m_keyType; + size_t m_iovsize; + CondCont<int> m_cc; + + typedef std::mutex mutex_t; + typedef std::lock_guard<mutex_t> lock_t; + std::mutex m_mutex; +}; + + + +CondContWrapper::CondContWrapper (Athena::IRCUSvc& rcu, + KeyType keyType, + size_t iovsize, + const std::string& name) + + : m_id (1234, name), + m_keyType (keyType), + m_iovsize (iovsize), + m_cc (rcu, m_id) +{ +} + + +EventIDBase::number_type +CondContWrapper::getKey (const EventIDBase& eid) const +{ + if (m_keyType == KeyType::RUN_LBN) { + return eid.lumi_block(); + } + else { + return eid.time_stamp_ns_offset(); + } +} + + +EventIDBase CondContWrapper::setKey (EventIDBase::number_type k, + const EventIDBase& eid_in) +{ + EventIDBase eid; + if (m_keyType == KeyType::RUN_LBN) { + eid.set_run_number (eid_in.run_number()); + eid.set_lumi_block (k); + } + else { + eid.set_time_stamp (eid_in.time_stamp()); + eid.set_time_stamp_ns_offset (k); + } + return eid; +} + + +std::unique_ptr<int> +CondContWrapper::makeObj (const EventContext& ctx, + EventIDRange& r) +{ + EventIDBase::number_type key = getKey (ctx.eventID()); + EventIDBase::number_type key_start = (key / m_iovsize) * m_iovsize; + EventIDBase::number_type key_stop = key_start + m_iovsize; + + EventIDBase start = setKey (key_start, ctx.eventID()); + EventIDBase stop = setKey (key_stop, ctx.eventID()); + r = EventIDRange (start, stop); + return std::make_unique<int> (key_start); +} + + +void CondContWrapper::load (const EventContext& ctx) +{ + const int* p; + if (m_cc.find (ctx.eventID(), p)) return; + + lock_t lock (m_mutex); + if (m_cc.find (ctx.eventID(), p)) return; + + EventIDRange r; + std::unique_ptr<int> o = makeObj (ctx, r); + assert( m_cc.insert (r, std::move (o), ctx).isSuccess() ); +} + + +void CondContWrapper::check (const EventContext& ctx) const +{ + const int* p; + const EventIDRange* r; + + assert (m_cc.find (ctx.eventID(), p, &r)); + assert (static_cast<int>(getKey (r->start())) == *p); +} + + +void CondContWrapper::checkFin (bool threaded) const +{ + assert ( std::abs (static_cast<int>(m_cc.nInserts() * m_iovsize) - + static_cast<int> (nevt)) + < static_cast<int> (m_iovsize) ); + + // If the test is threaded, then we cannot make any guarantees on the + // the maximum queue size. A thread using the oldest item in the + // conditions container could stall while other threads proceed. + // The queue will grow until the stalled thread makes progress. + // This was observed running the threaded test when there is other + // load on the system. + if (!threaded) { + if (m_iovsize >= 100) { + assert (m_cc.maxSize() < 10); + } + else { + assert (m_cc.maxSize() < 40); + } + } +} + + +struct CCS +{ + CCS (Athena::IRCUSvc& rcu); + CondContWrapper m_cc_lbn1; + CondContWrapper m_cc_lbn2; + CondContWrapper m_cc_ts1; + CondContWrapper m_cc_ts2; + + void load (const EventContext& ctx); + void check (const EventContext& ctx) const; + void checkFin (bool threaded) const; +}; + + +CCS::CCS (Athena::IRCUSvc& rcu) + : m_cc_lbn1 (rcu, CondContWrapper::KeyType::RUN_LBN, 100, "lbn1"), + m_cc_lbn2 (rcu, CondContWrapper::KeyType::RUN_LBN, 10, "lbn2"), + m_cc_ts1 (rcu, CondContWrapper::KeyType::TIMESTAMP, 100, "ts1"), + m_cc_ts2 (rcu, CondContWrapper::KeyType::TIMESTAMP, 10, "ts2") +{ +} + + +void CCS::load (const EventContext& ctx) +{ + m_cc_lbn1.load (ctx); + m_cc_lbn2.load (ctx); + m_cc_ts1.load (ctx); + m_cc_ts2.load (ctx); +} + + +void CCS::check (const EventContext& ctx) const +{ + m_cc_lbn1.check (ctx); + m_cc_lbn2.check (ctx); + m_cc_ts1.check (ctx); + m_cc_ts2.check (ctx); +} + + +void CCS::checkFin (bool threaded) const +{ + m_cc_lbn1.checkFin (threaded); + m_cc_lbn2.checkFin (threaded); + m_cc_ts1.checkFin (threaded); + m_cc_ts2.checkFin (threaded); +} + + +class EventTask + : public tbb::task +{ +public: + EventTask (const EventContext& ctx, + CCS& ccs, + Athena::IRCUSvc& rcu, + work_queue_t& wqueue); + + tbb::task* execute() override; + + +private: + EventContext m_ctx; + CCS& m_ccs; + IIncidentListener& m_rcu; + work_queue_t& m_wqueue; +}; + + +EventTask::EventTask (const EventContext& ctx, + CCS& ccs, + Athena::IRCUSvc& rcu, + work_queue_t& wqueue) + : m_ctx (ctx), + m_ccs (ccs), + m_rcu (dynamic_cast<IIncidentListener&>(rcu)), + m_wqueue (wqueue) +{ +} + + +tbb::task* EventTask::execute() +{ + m_ccs.load (m_ctx); + m_ccs.check (m_ctx); + + Incident inc ("test", IncidentType::EndEvent, m_ctx); + m_rcu.handle (inc); + m_wqueue.push (m_ctx.slot()); + return nullptr; +} + + +void shuffle (uint32_t& seed, std::vector<size_t>& v) +{ + size_t sz = v.size(); + size_t maxdist = std::min (sz-1, static_cast<size_t>(10)); + for (size_t i = 0; i < sz/2; i++) { + size_t dist = Athena_test::randi_seed (seed, maxdist); + size_t pos = Athena_test::randi_seed (seed, sz-1-dist); + std::swap (v[pos], v[pos+dist]); + } +} + + +class Tester +{ +public: + Tester (Athena::IConditionsCleanerSvc& cleaner, + Athena::IRCUSvc& rcu, + bool allowAsync); + void nonthreaded_event_loop (CCS& ccs, const std::vector<size_t>& evnums); + void event_loop (CCS& ccs, const std::vector<size_t>& evnums); + + +private: + Athena::IConditionsCleanerSvc& m_cleaner; + Athena::IRCUSvc& m_rcu; + bool m_allowAsync; + work_queue_t m_ready; +}; + + + +Tester::Tester (Athena::IConditionsCleanerSvc& cleaner, + Athena::IRCUSvc& rcu, + bool allowAsync) + : m_cleaner (cleaner), + m_rcu (rcu), + m_allowAsync (allowAsync) +{ +} + + + +void Tester::nonthreaded_event_loop (CCS& ccs, + const std::vector<size_t>& evnums) +{ + size_t nev = evnums.size(); + for (size_t ievt=0; ievt < nev; ievt++) { + EventContext ctx = makeCtx (ievt, evnums[ievt], 0); + + assert (m_cleaner.event (ctx, false).isSuccess() ); + + ccs.load (ctx); + ccs.check (ctx); + } + + ccs.checkFin (false); +} + + +void Tester::event_loop (CCS& ccs, const std::vector<size_t>& evnums) +{ + for (size_t i=0; i<nthreads; i++) { + m_ready.push (i); + } + + size_t nev = evnums.size(); + for (size_t ievt=0; ievt < nev; ievt++) { + size_t slot; + m_ready.pop (slot); + + EventContext ctx = makeCtx (ievt, evnums[ievt], slot); + + assert (m_cleaner.event (ctx, m_allowAsync).isSuccess() ); + + tbb::task* t = new (tbb::task::allocate_root()) + EventTask (ctx, ccs, m_rcu, m_ready); + tbb::task::enqueue (*t); + } + + // Wait for all tasks to complete. + for (size_t i=0; i<nthreads; i++) { + size_t slot; + m_ready.pop (slot); + } + + ccs.checkFin (true); +} + + +void threaded_test (Athena::IConditionsCleanerSvc& cleaner, + Athena::IRCUSvc& rcu) +{ + std::vector<size_t> evnums (nevt); + for (size_t i = 0; i < nevt; i++) { + evnums[i] = i; + } + uint32_t seed = 34563; + shuffle (seed, evnums); + + std::cout << "threaded_test\n"; + tbb::task_scheduler_init sched (nthreads + 1); + + { + Tester test (cleaner, rcu, false); + CCS ccs_nt (rcu); + test.nonthreaded_event_loop (ccs_nt, evnums); + assert( cleaner.printStats().isSuccess() ); + CCS ccs_mt (rcu); + test.event_loop (ccs_mt, evnums); + } +} + + +int main() +{ + errorcheck::ReportMessage::hideErrorLocus(); + std::cout << "DelayedConditionsCleanerSvc_test\n"; + ISvcLocator* svcloc = 0; + if (!Athena_test::initGaudi("DelayedConditionsCleanerSvc_test.txt", svcloc)) { + std::cerr << "This test can not be run" << std::endl; + return 1; + } + assert(svcloc); + + ServiceHandle<Athena::IConditionsCleanerSvc> svc + ("Athena::DelayedConditionsCleanerSvc/TestConditionsCleanerSvc", "test"); + if (svc.retrieve().isFailure()) { + std::cerr << "Can't retrieve service." << std::endl; + return 1; + } + + test1 (*svc); + + ServiceHandle<Athena::IConditionsCleanerSvc> facadeSvc + ("Athena::ConditionsCleanerSvc", "test"); + if (facadeSvc.retrieve().isFailure()) { + std::cerr << "Can't retrieve service." << std::endl; + return 1; + } + + ServiceHandle<Athena::IRCUSvc> rcuSvc + ("Athena::RCUSvc", "test"); + if (rcuSvc.retrieve().isFailure()) { + std::cerr << "Can't retrieve RCU service." << std::endl; + return 1; + } + + threaded_test (*facadeSvc, *rcuSvc); + return 0; +} + -- GitLab From f8cbda1c5104b52f20ccf125f9eed4f0d901a106 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Mon, 11 Jun 2018 17:19:56 +0200 Subject: [PATCH 194/562] BeamPipeGeoModel: CLIDSvc -> AthenaKernel. Remove references to obsolete package CLIDSvc. Former-commit-id: a08d7fe6e33413cf7ca8a86c331c4703717240be --- .../BeamPipeGeoModel/BeamPipeGeoModel/BeamPipeDetectorManager.h | 2 +- AtlasGeometryCommon/BeamPipeGeoModel/CMakeLists.txt | 1 - .../BeamPipeGeoModel/src/BeamPipeDetectorTool.cxx | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/AtlasGeometryCommon/BeamPipeGeoModel/BeamPipeGeoModel/BeamPipeDetectorManager.h b/AtlasGeometryCommon/BeamPipeGeoModel/BeamPipeGeoModel/BeamPipeDetectorManager.h index 540975ccc95e..4cd26f718cf0 100755 --- a/AtlasGeometryCommon/BeamPipeGeoModel/BeamPipeGeoModel/BeamPipeDetectorManager.h +++ b/AtlasGeometryCommon/BeamPipeGeoModel/BeamPipeGeoModel/BeamPipeDetectorManager.h @@ -39,7 +39,7 @@ class BeamPipeDetectorManager : public GeoVDetectorManager }; #ifndef GAUDI_NEUTRAL -#include "CLIDSvc/CLASS_DEF.h" +#include "AthenaKernel/CLASS_DEF.h" CLASS_DEF(BeamPipeDetectorManager, 119561103, 1) #endif diff --git a/AtlasGeometryCommon/BeamPipeGeoModel/CMakeLists.txt b/AtlasGeometryCommon/BeamPipeGeoModel/CMakeLists.txt index 60964ae54c07..87f8b8aa5b4f 100644 --- a/AtlasGeometryCommon/BeamPipeGeoModel/CMakeLists.txt +++ b/AtlasGeometryCommon/BeamPipeGeoModel/CMakeLists.txt @@ -11,7 +11,6 @@ atlas_depends_on_subdirs( PUBLIC DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoModelUtilities PRIVATE - Control/CLIDSvc Control/SGTools Control/StoreGate Control/AthenaKernel diff --git a/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorTool.cxx b/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorTool.cxx index c9c8d9e3376c..a43f42349b47 100755 --- a/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorTool.cxx +++ b/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorTool.cxx @@ -15,7 +15,7 @@ #include "StoreGate/StoreGateSvc.h" #include "RDBAccessSvc/IRDBAccessSvc.h" -#include "CLIDSvc/tools/ClassID_traits.h" +#include "AthenaKernel/ClassID_traits.h" #include "SGTools/DataProxy.h" BeamPipeDetectorTool::BeamPipeDetectorTool( const std::string& type, -- GitLab From 1293a70382f26de3bf66c4670cffcbb8cb1c48ca Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Mon, 18 Jun 2018 16:18:53 +0200 Subject: [PATCH 195/562] PixelMonitoring: Fix clang warnings. Classes with virtual functions should also have virtual destructors. Former-commit-id: bf10dfcbc5812094fb44ac7498d1d976e58a4ea1 --- .../PixelMonitoring/HolderTemplate.h | 2 ++ .../PixelMonitoring/PixelMonModules.h | 1 + .../PixelMonitoring/src/Clusters.cxx | 28 +++++++++---------- .../PixelMonitoring/src/Errors.cxx | 20 ++++++------- .../PixelMonitoring/src/Hits.cxx | 16 +++++------ .../PixelMonitoring/src/Status.cxx | 8 +++--- .../PixelMonitoring/src/Track.cxx | 14 +++++----- 7 files changed, 46 insertions(+), 43 deletions(-) diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/HolderTemplate.h b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/HolderTemplate.h index 4e1394613b74..06f70b6493aa 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/HolderTemplate.h +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/HolderTemplate.h @@ -62,6 +62,8 @@ class HolderTemplate { m_copy2DFEval{copy2DFEval}, m_doIBL{true} {} + virtual ~HolderTemplate() {} + //! Function for histogram formatting. To be reimplemented in derived classes. virtual void formatHist() = 0; diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMonModules.h b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMonModules.h index 3cd88602a369..6078ee7357f4 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMonModules.h +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMonModules.h @@ -24,6 +24,7 @@ class StatusCode; class PixelMonModules { public: // PixelMonModules(); + virtual ~PixelMonModules() {} virtual void formatHist(std::string) = 0; // pass the bin labels here if needed virtual void reset() = 0; virtual StatusCode regHist(ManagedMonitorToolBase* thisptr, std::string path, ManagedMonitorToolBase::Interval_t Run) = 0; diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Clusters.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Clusters.cxx index 45a5da18cf42..d9df53ffa47e 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Clusters.cxx +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Clusters.cxx @@ -225,64 +225,64 @@ StatusCode PixelMainMon::bookClustersMon(void) { if (m_do2DMaps) { tmp = "Cluster_Occupancy"; tmp2 = "Cluster occupancy"; - m_cluster_occupancy = std::make_unique<PixelMon2DMapsLW>(PixelMon2DMapsLW(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D)); + m_cluster_occupancy = std::make_unique<PixelMon2DMapsLW>(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D); sc = m_cluster_occupancy->regHist(clusterShift); tmp = "Cluster_LVL1A_Mod"; tmp2 = "Average cluster Level 1 Accept"; - m_cluster_LVL1A_mod = std::make_unique<PixelMon2DProfilesLW>(PixelMon2DProfilesLW(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D)); + m_cluster_LVL1A_mod = std::make_unique<PixelMon2DProfilesLW>(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D); sc = m_cluster_LVL1A_mod->regHist(timeShift); tmp = "Clus_Occ_SizeCut"; tmp2 = "Size>1 Cluster occupancy"; - m_clusocc_sizenot1 = std::make_unique<PixelMon2DMapsLW>(PixelMon2DMapsLW(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D)); + m_clusocc_sizenot1 = std::make_unique<PixelMon2DMapsLW>(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D); sc = m_clusocc_sizenot1->regHist(clusterShift); tmp = "Clus_LVL1A_SizeCut"; tmp2 = "Average Size>1 Cluster Level 1 Accept"; - m_clus_LVL1A_sizenot1 = std::make_unique<PixelMon2DProfilesLW>(PixelMon2DProfilesLW(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D)); + m_clus_LVL1A_sizenot1 = std::make_unique<PixelMon2DProfilesLW>(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D); sc = m_clus_LVL1A_sizenot1->regHist(timeShift); if (m_doOnline) { tmp = "ClusterMap_Mon"; tmp2 = "Cluster map for monitoring"; - m_clustermap_mon = std::make_unique<PixelMon2DMapsLW>(PixelMon2DMapsLW(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D)); + m_clustermap_mon = std::make_unique<PixelMon2DMapsLW>(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D); sc = m_clustermap_mon->regHist(clusterShift); tmp = "ClusterMap_tmp"; tmp2 = "Cluster map for monitoring"; - m_clustermap_tmp = std::make_unique<PixelMon2DMapsLW>(PixelMon2DMapsLW(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D)); + m_clustermap_tmp = std::make_unique<PixelMon2DMapsLW>(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D); sc = m_clustermap_tmp->regHist(clusterShift); } if (!m_doOnline) { tmp = "Cluster_Size_Map"; tmp2 = "Average cluster size map"; - m_clussize_map = std::make_unique<PixelMon2DProfilesLW>(PixelMon2DProfilesLW(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D)); + m_clussize_map = std::make_unique<PixelMon2DProfilesLW>(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D); sc = m_clussize_map->regHist(clusterExpert); tmp = "Cluster_Charge_Map"; tmp2 = "Average cluster charge map"; - m_cluscharge_map = std::make_unique<PixelMon2DProfilesLW>(PixelMon2DProfilesLW(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D)); + m_cluscharge_map = std::make_unique<PixelMon2DProfilesLW>(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D); sc = m_cluscharge_map->regHist(clusterExpert); tmp = "Cluster_ToT_Map"; tmp2 = "Average cluster ToT map"; - m_clusToT_map = std::make_unique<PixelMon2DProfilesLW>(PixelMon2DProfilesLW(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D)); + m_clusToT_map = std::make_unique<PixelMon2DProfilesLW>(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D); sc = m_clusToT_map->regHist(clusterExpert); } } if (m_doModules && m_doOnTrack) { - m_cluseff_mod = std::make_unique<PixelMonModulesProf>(PixelMonModulesProf("Clus_track_eff", ("Proportion of clusters on track vs t in module" + m_histTitleExt).c_str(), 2500, -0.5, 2499.5)); + m_cluseff_mod = std::make_unique<PixelMonModulesProf>("Clus_track_eff", ("Proportion of clusters on track vs t in module" + m_histTitleExt).c_str(), 2500, -0.5, 2499.5); sc = m_cluseff_mod->regHist(this, (path + "/Modules_Cluseff").c_str(), run); - m_cluster_size_mod = std::make_unique<PixelMonModules1D>(PixelMonModules1D("Cluster_size", ("Cluster size in Module" + m_histTitleExt).c_str(), 20, -0.5, 19.5)); + m_cluster_size_mod = std::make_unique<PixelMonModules1D>("Cluster_size", ("Cluster size in Module" + m_histTitleExt).c_str(), 20, -0.5, 19.5); sc = m_cluster_size_mod->regHist(this, (path + "/Modules_ClusterSize").c_str(), run); - m_cluster_num_mod = std::make_unique<PixelMonModules1D>(PixelMonModules1D("Cluster_num", ("Number of clusters per event in module" + m_histTitleExt).c_str(), 30, -0.5, 29.5)); + m_cluster_num_mod = std::make_unique<PixelMonModules1D>("Cluster_num", ("Number of clusters per event in module" + m_histTitleExt).c_str(), 30, -0.5, 29.5); sc = m_cluster_num_mod->regHist(this, (path + "/Modules_NumberOfClusters").c_str(), run); - m_cluster_ToT_mod = std::make_unique<PixelMonModules1D>(PixelMonModules1D("Cluster_ToT", ("Cluster ToT in Module" + m_histTitleExt).c_str(), 200, 0., 200.)); + m_cluster_ToT_mod = std::make_unique<PixelMonModules1D>("Cluster_ToT", ("Cluster ToT in Module" + m_histTitleExt).c_str(), 200, 0., 200.); sc = m_cluster_ToT_mod->regHist(this, (path + "/Modules_ClusToT").c_str(), run); } if (m_doOnline) { @@ -382,7 +382,7 @@ StatusCode PixelMainMon::bookClustersLumiBlockMon(void) { sc = lumiBlockHist.regHist(m_cluster_ToT_LB = TH1F_LW::create("Cluster_ToT_LB", ("Cluster Time over Threshold" + m_histTitleExt + ";ToT;# clusters").c_str(), 300, -0.5, 299.5)); if (m_do2DMaps) { - m_cluster_occupancy_LB = std::make_unique<PixelMon2DMapsLW>(PixelMon2DMapsLW("Cluster_Occupancy_LB", ("Cluster Occupancy" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D)); + m_cluster_occupancy_LB = std::make_unique<PixelMon2DMapsLW>("Cluster_Occupancy_LB", ("Cluster Occupancy" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D); sc = m_cluster_occupancy_LB->regHist(lumiBlockHist); } if (m_doLowOccupancy || m_doHighOccupancy) { diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Errors.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Errors.cxx index 52655bbb1ff9..5f0ff8696142 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Errors.cxx +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Errors.cxx @@ -220,21 +220,21 @@ StatusCode PixelMainMon::bookRODErrorMon(void) { if (m_do2DMaps && !m_doOnline) { for (int i = 0; i < ErrorCategoryMODROD::COUNT - 3; i++) { - m_errhist_errtype_map[i] = std::make_unique<PixelMon2DMapsLW>(PixelMon2DMapsLW(error_type_labels[i].first, ("Total " + error_type_labels[i].second + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D, true)); + m_errhist_errtype_map[i] = std::make_unique<PixelMon2DMapsLW>(error_type_labels[i].first, ("Total " + error_type_labels[i].second + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D, true); sc = m_errhist_errtype_map[i]->regHist(rodHistos); } for (int i = 0; i < ErrorCategory::COUNT; i++) { - m_errhist_errcat_map[i] = std::make_unique<PixelMon2DMapsLW>(PixelMon2DMapsLW(error_cat_labels[i].first, ("Total " + error_cat_labels[i].second + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D, true)); + m_errhist_errcat_map[i] = std::make_unique<PixelMon2DMapsLW>(error_cat_labels[i].first, ("Total " + error_cat_labels[i].second + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D, true); sc = m_errhist_errcat_map[i]->regHist(rodHistos); } } if (m_do2DMaps) { - m_errhist_femcc_errwords_map = std::make_unique<PixelMon2DProfilesLW>(PixelMon2DProfilesLW("femcc_errorwords", ("Average FE/MCC Error Words" + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D)); + m_errhist_femcc_errwords_map = std::make_unique<PixelMon2DProfilesLW>("femcc_errorwords", ("Average FE/MCC Error Words" + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D); sc = m_errhist_femcc_errwords_map->regHist(rodHistos); - m_errhist_bitstr_occ_errors = std::make_unique<PixelMon2DProfilesLW>(PixelMon2DProfilesLW("Bitstr_Occ_Errors", ("Average Bit-Stream Occupancy (FE/MCC Errors, at 100k L1)" + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL, true)); + m_errhist_bitstr_occ_errors = std::make_unique<PixelMon2DProfilesLW>("Bitstr_Occ_Errors", ("Average Bit-Stream Occupancy (FE/MCC Errors, at 100k L1)" + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL, true); sc = m_errhist_bitstr_occ_errors->regHist(rodHistos); - m_errhist_bitstr_occ_tot = std::make_unique<PixelMon2DProfilesLW>(PixelMon2DProfilesLW("Bitstr_Occ_Tot", ("Average Bit-Stream Occupancy (at 100k L1)" + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL, true)); + m_errhist_bitstr_occ_tot = std::make_unique<PixelMon2DProfilesLW>("Bitstr_Occ_Tot", ("Average Bit-Stream Occupancy (at 100k L1)" + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL, true); sc = m_errhist_bitstr_occ_tot->regHist(rodHistos); } @@ -256,7 +256,7 @@ StatusCode PixelMainMon::bookRODErrorMon(void) { } hname = makeHistname((error_state_labels[j].first + "_Map"), false); htitles = makeHisttitle((error_state_labels[j].second + " per event per LB"), "", false); - m_errhist_expert_maps[j] = std::make_unique<PixelMon2DMapsLW>(PixelMon2DMapsLW(hname.c_str(), htitles.c_str(), PixMon::HistConf::kPix, true)); + m_errhist_expert_maps[j] = std::make_unique<PixelMon2DMapsLW>(hname.c_str(), htitles.c_str(), PixMon::HistConf::kPix, true); sc = m_errhist_expert_maps[j]->regHist(rodExpert); } @@ -271,7 +271,7 @@ StatusCode PixelMainMon::bookRODErrorMon(void) { for (int j = kNumErrorStates; j < kNumErrorStates + kNumErrorStatesIBL; j++) { hname = makeHistname((error_state_labelsIBL[j - kNumErrorStates].first + "_Map"), false); htitles = makeHisttitle((error_state_labelsIBL[j - kNumErrorStates].second + " per event per LB"), "", false); - m_errhist_expert_maps[j] = std::make_unique<PixelMon2DMapsLW>(PixelMon2DMapsLW(hname.c_str(), htitles.c_str(), PixMon::HistConf::kDBMIBL, m_doIBL)); + m_errhist_expert_maps[j] = std::make_unique<PixelMon2DMapsLW>(hname.c_str(), htitles.c_str(), PixMon::HistConf::kDBMIBL, m_doIBL); sc = m_errhist_expert_maps[j]->regHist(rodExpert); } @@ -318,13 +318,13 @@ StatusCode PixelMainMon::bookRODErrorLumiBlockMon(void) { StatusCode sc; if (m_do2DMaps && !m_doOnline) { - m_errors_LB = std::make_unique<PixelMon2DMapsLW>(PixelMon2DMapsLW("Errors_LB", ("Errors" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D, true)); + m_errors_LB = std::make_unique<PixelMon2DMapsLW>("Errors_LB", ("Errors" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D, true); sc = m_errors_LB->regHist(lumiBlockHist); - m_errors_RODSync_mod = std::make_unique<PixelMon2DMapsLW>(PixelMon2DMapsLW("Errors_RODSync_LB", ("Errors_RODSync" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D, true)); + m_errors_RODSync_mod = std::make_unique<PixelMon2DMapsLW>("Errors_RODSync_LB", ("Errors_RODSync" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D, true); sc = m_errors_RODSync_mod->regHist(lumiBlockHist); - m_errors_ModSync_mod = std::make_unique<PixelMon2DMapsLW>(PixelMon2DMapsLW("Errors_ModSync_LB", ("Errors_ModSync" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D, true)); + m_errors_ModSync_mod = std::make_unique<PixelMon2DMapsLW>("Errors_ModSync_LB", ("Errors_ModSync" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D, true); sc = m_errors_ModSync_mod->regHist(lumiBlockHist); } diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Hits.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Hits.cxx index e698949c738a..b5f34e37687d 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Hits.cxx +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Hits.cxx @@ -160,7 +160,7 @@ StatusCode PixelMainMon::bookHitsMon(void) { } } - m_hitmap_tmp = std::make_unique<PixelMon2DMapsLW>(PixelMon2DMapsLW("HitMap_tmp", ("Hit map for monitoring" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D)); + m_hitmap_tmp = std::make_unique<PixelMon2DMapsLW>("HitMap_tmp", ("Hit map for monitoring" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D); sc = m_hitmap_tmp->regHist(rdoShift); for (int i = 0; i < PixLayer::COUNT; i++) { @@ -170,7 +170,7 @@ StatusCode PixelMainMon::bookHitsMon(void) { } if (m_doOnline) { - m_hitmap_mon = std::make_unique<PixelMon2DMapsLW>(PixelMon2DMapsLW("HitMap_Mon", ("Hit map for monitoring" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D)); + m_hitmap_mon = std::make_unique<PixelMon2DMapsLW>("HitMap_Mon", ("Hit map for monitoring" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D); sc = m_hitmap_mon->regHist(rdoShift); for (int i = 0; i < PixLayer::COUNT - 1 + (int)(m_doIBL); i++) { @@ -252,19 +252,19 @@ StatusCode PixelMainMon::bookHitsMon(void) { } if (m_do2DMaps) { - m_occupancy = std::make_unique<PixelMon2DMapsLW>(PixelMon2DMapsLW("Occupancy", ("hit map" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D)); + m_occupancy = std::make_unique<PixelMon2DMapsLW>("Occupancy", ("hit map" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D); sc = m_occupancy->regHist(rdoShift); - m_average_pixocc = std::make_unique<PixelMon2DMapsLW>(PixelMon2DMapsLW("Occupancy_per_pixel", ("#hits / pixel" + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL, false)); + m_average_pixocc = std::make_unique<PixelMon2DMapsLW>("Occupancy_per_pixel", ("#hits / pixel" + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL, false); sc = m_average_pixocc->regHist(rdoShift); - m_occupancy_pix_evt = std::make_unique<PixelMon2DProfilesLW>(PixelMon2DProfilesLW("Occupancy_per_pixel_event", ("#hits / pixel / event" + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D)); + m_occupancy_pix_evt = std::make_unique<PixelMon2DProfilesLW>("Occupancy_per_pixel_event", ("#hits / pixel / event" + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D); sc = m_occupancy_pix_evt->regHist(rdoShift); - m_Lvl1ID_diff_mod_ATLAS_per_LB = std::make_unique<PixelMon2DLumiProfiles>(PixelMon2DLumiProfiles("Lvl1ID_diff_ATLAS_mod_per_LB", ("ATLAS_{Level 1 ID} - Module_{Level 1 ID} per LB" + m_histTitleExt).c_str(), "#Delta Level 1 ID", PixMon::HistConf::kPixIBL)); + m_Lvl1ID_diff_mod_ATLAS_per_LB = std::make_unique<PixelMon2DLumiProfiles>("Lvl1ID_diff_ATLAS_mod_per_LB", ("ATLAS_{Level 1 ID} - Module_{Level 1 ID} per LB" + m_histTitleExt).c_str(), "#Delta Level 1 ID", PixMon::HistConf::kPixIBL); sc = m_Lvl1ID_diff_mod_ATLAS_per_LB->regHist(timeExpert); - m_Lvl1ID_absdiff_mod_ATLAS_per_LB = std::make_unique<PixelMon2DLumiProfiles>(PixelMon2DLumiProfiles("Lvl1ID_absdiff_ATLAS_mod_per_LB", ("ATLAS_{Level 1 ID} - Module_{Level 1 ID} per LB" + m_histTitleExt).c_str(), "#Delta Level 1 ID", PixMon::HistConf::kPixIBL)); + m_Lvl1ID_absdiff_mod_ATLAS_per_LB = std::make_unique<PixelMon2DLumiProfiles>("Lvl1ID_absdiff_ATLAS_mod_per_LB", ("ATLAS_{Level 1 ID} - Module_{Level 1 ID} per LB" + m_histTitleExt).c_str(), "#Delta Level 1 ID", PixMon::HistConf::kPixIBL); sc = m_Lvl1ID_absdiff_mod_ATLAS_per_LB->regHist(timeExpert); } @@ -380,7 +380,7 @@ StatusCode PixelMainMon::bookHitsLumiBlockMon(void) { sc = lumiBlockHist.regHist(m_Lvl1A_10min_mod[i] = TH1F_LW::create(hname.c_str(), htitles.c_str(), 14, -1.5, 12.5)); } - m_occupancy_10min = std::make_unique<PixelMon2DMapsLW>(PixelMon2DMapsLW("Occupancy_10min", ("hit occupancy" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D)); + m_occupancy_10min = std::make_unique<PixelMon2DMapsLW>("Occupancy_10min", ("hit occupancy" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D); sc = m_occupancy_10min->regHist(lumiBlockHist); if (sc.isFailure()) ATH_MSG_WARNING("Problems with booking Hit histograms per LB (low stat)"); diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Status.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Status.cxx index 742f255aa39e..bac360fc1043 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Status.cxx +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Status.cxx @@ -40,17 +40,17 @@ StatusCode PixelMainMon::bookStatusMon(void) { StatusCode sc; - m_status = std::make_unique<PixelMon2DProfilesLW>(PixelMon2DProfilesLW("Map_Of_Modules_Status", ("Modules Status (0=Active+Good, 1=Active+Bad, 2=Inactive)" + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D, true)); + m_status = std::make_unique<PixelMon2DProfilesLW>("Map_Of_Modules_Status", ("Modules Status (0=Active+Good, 1=Active+Bad, 2=Inactive)" + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D, true); sc = m_status->regHist(statusHistos); m_status->setMaxValue(2.0); - m_status_mon = std::make_unique<PixelMon2DProfilesLW>(PixelMon2DProfilesLW("Map_Of_Modules_Status_Mon", ("Modules Status (0=Active+Good, 1=Active+Bad, 2=Inactive) for monitoring" + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D, true)); + m_status_mon = std::make_unique<PixelMon2DProfilesLW>("Map_Of_Modules_Status_Mon", ("Modules Status (0=Active+Good, 1=Active+Bad, 2=Inactive) for monitoring" + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D, true); sc = m_status_mon->regHist(statusHistos); m_status_mon->setMaxValue(2.0); if (!m_doOnTrack) { // skip the rest if (m_doOffline) { - m_dqStatus = std::make_unique<PixelMon2DMapsLW>(PixelMon2DMapsLW("Ok_modules", ("module problems, empty bin means dead module not listed in status database" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D)); + m_dqStatus = std::make_unique<PixelMon2DMapsLW>("Ok_modules", ("module problems, empty bin means dead module not listed in status database" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D); sc = m_dqStatus->regHist(statusHistos); } @@ -98,7 +98,7 @@ StatusCode PixelMainMon::bookStatusLumiBlockMon(void) { if (m_doOnTrack) path.replace(path.begin(), path.end(), "Pixel/LumiBlockOnTrack"); MonGroup lumiBlockHist(this, path.c_str(), lowStat, ATTRIB_MANAGED); - m_status_LB = std::make_unique<PixelMon2DProfilesLW>(PixelMon2DProfilesLW("Map_Of_Modules_Status_LB", ("Module Status (0=Active+Good, 1=Active+Bad, 2=Inactive)" + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D, true)); + m_status_LB = std::make_unique<PixelMon2DProfilesLW>("Map_Of_Modules_Status_LB", ("Module Status (0=Active+Good, 1=Active+Bad, 2=Inactive)" + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D, true); StatusCode sc = m_status_LB->regHist(lumiBlockHist); m_status_LB->setMaxValue(2.0); diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Track.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Track.cxx index fa013e1938d1..f5b09c323a5d 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Track.cxx +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Track.cxx @@ -71,23 +71,23 @@ StatusCode PixelMainMon::bookTrackMon(void) { sc = trackHistos.regHist(m_tracksPerEvt_per_lumi = TProfile_LW::create("tracksPerEvt_per_lumi", ("Number of tracks per event per LB" + m_histTitleExt + ";lumi block;tracks/event").c_str(), nbins_LB, min_LB, max_LB)); if (m_do2DMaps && !m_doOnline) { - m_tsos_hitmap = std::make_unique<PixelMon2DMapsLW>(PixelMon2DMapsLW("TSOS_Measurement", ("TSOS of type Measurement" + m_histTitleExt), PixMon::HistConf::kPixDBMIBL2D3D, true)); + m_tsos_hitmap = std::make_unique<PixelMon2DMapsLW>("TSOS_Measurement", ("TSOS of type Measurement" + m_histTitleExt), PixMon::HistConf::kPixDBMIBL2D3D, true); sc = m_tsos_hitmap->regHist(trackHistos); - m_tsos_holemap = std::make_unique<PixelMon2DMapsLW>(PixelMon2DMapsLW("TSOS_Hole", ("TSOS of type Hole" + m_histTitleExt), PixMon::HistConf::kPixDBMIBL2D3D, true)); + m_tsos_holemap = std::make_unique<PixelMon2DMapsLW>("TSOS_Hole", ("TSOS of type Hole" + m_histTitleExt), PixMon::HistConf::kPixDBMIBL2D3D, true); sc = m_tsos_holemap->regHist(trackHistos); - m_tsos_outliermap = std::make_unique<PixelMon2DMapsLW>(PixelMon2DMapsLW("TSOS_Outlier", ("TSOS of type Outlier" + m_histTitleExt), PixMon::HistConf::kPixDBMIBL2D3D, true)); + m_tsos_outliermap = std::make_unique<PixelMon2DMapsLW>("TSOS_Outlier", ("TSOS of type Outlier" + m_histTitleExt), PixMon::HistConf::kPixDBMIBL2D3D, true); sc = m_tsos_outliermap->regHist(trackHistos); } - m_tsos_holeratio_tmp = std::make_unique<PixelMon2DProfilesLW>(PixelMon2DProfilesLW("HolesRatio", ("Holes per track" + m_histTitleExt), PixMon::HistConf::kPixIBL2D3D, true)); + m_tsos_holeratio_tmp = std::make_unique<PixelMon2DProfilesLW>("HolesRatio", ("Holes per track" + m_histTitleExt), PixMon::HistConf::kPixIBL2D3D, true); sc = m_tsos_holeratio_tmp->regHist(trackHistos); - m_misshits_ratio_tmp = std::make_unique<PixelMon2DProfilesLW>(PixelMon2DProfilesLW("MissHitsRatio", ("Hole+Outlier per track" + m_histTitleExt), PixMon::HistConf::kPixIBL2D3D, true)); + m_misshits_ratio_tmp = std::make_unique<PixelMon2DProfilesLW>("MissHitsRatio", ("Hole+Outlier per track" + m_histTitleExt), PixMon::HistConf::kPixIBL2D3D, true); sc = m_misshits_ratio_tmp->regHist(trackHistos); if (m_doOnline) { - m_tsos_holeratio_mon = std::make_unique<PixelMon2DProfilesLW>(PixelMon2DProfilesLW("HolesRatio_mon", ("Holes per track reset every 5 min" + m_histTitleExt), PixMon::HistConf::kPixIBL2D3D, true)); + m_tsos_holeratio_mon = std::make_unique<PixelMon2DProfilesLW>("HolesRatio_mon", ("Holes per track reset every 5 min" + m_histTitleExt), PixMon::HistConf::kPixIBL2D3D, true); sc = m_tsos_holeratio_mon->regHist(trackHistos); - m_misshits_ratio_mon = std::make_unique<PixelMon2DProfilesLW>(PixelMon2DProfilesLW("MissHitsRatio_mon", ("Hole+Outlier per track reset every 5 min" + m_histTitleExt), PixMon::HistConf::kPixIBL2D3D, true)); + m_misshits_ratio_mon = std::make_unique<PixelMon2DProfilesLW>("MissHitsRatio_mon", ("Hole+Outlier per track reset every 5 min" + m_histTitleExt), PixMon::HistConf::kPixIBL2D3D, true); sc = m_misshits_ratio_mon->regHist(trackHistos); } -- GitLab From 981edccf727761cae83e6f6d15a8377a0f5e016a Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Mon, 18 Jun 2018 16:20:07 +0200 Subject: [PATCH 196/562] xAODJiveXML: Fix clang warnings. clang warnings: unused variables. Former-commit-id: b7cda07d82e04cd06002984714b58bb7bd26dd91 --- .../xAODJiveXML/src/xAODCaloClusterRetriever.cxx | 2 +- .../xAODJiveXML/src/xAODElectronRetriever.cxx | 2 +- .../AnalysisEventDisplay/xAODJiveXML/src/xAODJetRetriever.cxx | 2 +- .../xAODJiveXML/src/xAODMissingETRetriever.cxx | 2 +- .../AnalysisEventDisplay/xAODJiveXML/src/xAODMuonRetriever.cxx | 2 +- .../xAODJiveXML/src/xAODPhotonRetriever.cxx | 2 +- .../xAODJiveXML/src/xAODTrackParticleRetriever.cxx | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODCaloClusterRetriever.cxx b/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODCaloClusterRetriever.cxx index d80d0033373f..ee69a94b386d 100755 --- a/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODCaloClusterRetriever.cxx +++ b/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODCaloClusterRetriever.cxx @@ -82,7 +82,7 @@ namespace JiveXML { } }else { //obtain all collections with the given keys - std::vector<std::string>::const_iterator keyIter,endIter; + std::vector<std::string>::const_iterator keyIter; for ( keyIter=m_otherKeys.begin(); keyIter!=m_otherKeys.end(); ++keyIter ){ StatusCode sc = evtStore()->retrieve( ccc, (*keyIter) ); if (!sc.isFailure()) { diff --git a/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODElectronRetriever.cxx b/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODElectronRetriever.cxx index 97ba29f2b5c5..ebb890a13a94 100755 --- a/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODElectronRetriever.cxx +++ b/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODElectronRetriever.cxx @@ -84,7 +84,7 @@ namespace JiveXML { } }else { //obtain all collections with the given keys - std::vector<std::string>::const_iterator keyIter,endIter; + std::vector<std::string>::const_iterator keyIter; for ( keyIter=m_otherKeys.begin(); keyIter!=m_otherKeys.end(); ++keyIter ){ StatusCode sc = evtStore()->retrieve( electrons, (*keyIter) ); if (!sc.isFailure()) { diff --git a/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODJetRetriever.cxx b/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODJetRetriever.cxx index 8bd2ed460524..d01966b3f9b2 100755 --- a/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODJetRetriever.cxx +++ b/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODJetRetriever.cxx @@ -106,7 +106,7 @@ namespace JiveXML { } }else { //obtain all collections with the given keys - std::vector<std::string>::const_iterator keyIter,endIter; + std::vector<std::string>::const_iterator keyIter; for ( keyIter=m_otherKeys.begin(); keyIter!=m_otherKeys.end(); ++keyIter ){ if ( !evtStore()->contains<xAOD::JetContainer>( (*keyIter) ) ){ continue; } // skip if not in SG StatusCode sc = evtStore()->retrieve( Jets, (*keyIter) ); diff --git a/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODMissingETRetriever.cxx b/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODMissingETRetriever.cxx index 67c2c7dffbf0..d60515a9f93f 100755 --- a/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODMissingETRetriever.cxx +++ b/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODMissingETRetriever.cxx @@ -83,7 +83,7 @@ namespace JiveXML { } }else { //obtain all collections with the given keys - std::vector<std::string>::const_iterator keyIter,endIter; + std::vector<std::string>::const_iterator keyIter; for ( keyIter=m_otherKeys.begin(); keyIter!=m_otherKeys.end(); ++keyIter ){ if ( !evtStore()->contains<xAOD::MissingETContainer>( (*keyIter) ) ){ continue; } // skip if not in SG StatusCode sc = evtStore()->retrieve( MissingETs, (*keyIter) ); diff --git a/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODMuonRetriever.cxx b/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODMuonRetriever.cxx index 81d4c50f1439..a4f0bbcca505 100755 --- a/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODMuonRetriever.cxx +++ b/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODMuonRetriever.cxx @@ -88,7 +88,7 @@ namespace JiveXML { } }else { //obtain all collections with the given keys - std::vector<std::string>::const_iterator keyIter,endIter; + std::vector<std::string>::const_iterator keyIter; for ( keyIter=m_otherKeys.begin(); keyIter!=m_otherKeys.end(); ++keyIter ){ StatusCode sc = evtStore()->retrieve( muons, (*keyIter) ); if (!sc.isFailure()) { diff --git a/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODPhotonRetriever.cxx b/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODPhotonRetriever.cxx index eab4ebb151e7..274e0ef7fc37 100755 --- a/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODPhotonRetriever.cxx +++ b/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODPhotonRetriever.cxx @@ -88,7 +88,7 @@ namespace JiveXML { } }else { //obtain all collections with the given keys - std::vector<std::string>::const_iterator keyIter,endIter; + std::vector<std::string>::const_iterator keyIter; for ( keyIter=m_otherKeys.begin(); keyIter!=m_otherKeys.end(); ++keyIter ){ StatusCode sc = evtStore()->retrieve( photons, (*keyIter) ); if (!sc.isFailure()) { diff --git a/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODTrackParticleRetriever.cxx b/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODTrackParticleRetriever.cxx index 8071aeb36db9..b914c95954b6 100755 --- a/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODTrackParticleRetriever.cxx +++ b/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODTrackParticleRetriever.cxx @@ -87,7 +87,7 @@ namespace JiveXML { } }else { //obtain all collections with the given keys - std::vector<std::string>::const_iterator keyIter,endIter; + std::vector<std::string>::const_iterator keyIter; for ( keyIter=m_otherKeys.begin(); keyIter!=m_otherKeys.end(); ++keyIter ){ if ( !evtStore()->contains<xAOD::TrackParticleContainer>( (*keyIter) ) ){ continue; } // skip if not in SG StatusCode sc = evtStore()->retrieve( TrackParticles, (*keyIter) ); -- GitLab From 3fb65697fb211862d1830fb1ea99034e664aa215 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Mon, 18 Jun 2018 16:23:44 +0200 Subject: [PATCH 197/562] TrackD3PDMaker: Fix clang warnings. clang warnings: unused variables. Former-commit-id: 34d39d109dde9325021a26c9c86bd17eaa812d05 --- .../TrackD3PDMaker/src/PixelClusterPixelRDOAssociationTool.cxx | 1 - .../TrackD3PDMaker/src/SCTClusterSCTRDOAssociationTool.cxx | 1 - .../src/TrackParticleToPixelClusterAssociationTool.cxx | 1 - .../src/TrackParticleToSCTClusterAssociationTool.cxx | 1 - 4 files changed, 4 deletions(-) diff --git a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/PixelClusterPixelRDOAssociationTool.cxx b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/PixelClusterPixelRDOAssociationTool.cxx index a6c74a1a62ee..363c72eaccb2 100644 --- a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/PixelClusterPixelRDOAssociationTool.cxx +++ b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/PixelClusterPixelRDOAssociationTool.cxx @@ -84,7 +84,6 @@ StatusCode PixelClusterPixelRDOAssociationTool::reset (const InDet::PixelCluste if ( sc.isFailure() ) REPORT_MESSAGE (MSG::ERROR)<< "Failed to calculate the tempID."; std::vector< Identifier> pixelClusterIdentifier; - std::vector<Identifier>::iterator posItr; const std::vector<Identifier>& rdoList = p.rdoList(); pixelClusterIdentifier.insert(pixelClusterIdentifier.end(),rdoList.begin(),rdoList.end()); diff --git a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/SCTClusterSCTRDOAssociationTool.cxx b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/SCTClusterSCTRDOAssociationTool.cxx index 59095f546f48..c0090b946de2 100644 --- a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/SCTClusterSCTRDOAssociationTool.cxx +++ b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/SCTClusterSCTRDOAssociationTool.cxx @@ -84,7 +84,6 @@ StatusCode SCTClusterSCTRDOAssociationTool::reset (const InDet::SCT_Cluster& p) if ( sc.isFailure() ) REPORT_MESSAGE (MSG::ERROR)<< "Failed to calculate the tempID."; std::vector< Identifier> sctClusterIdentifier; - std::vector<Identifier>::iterator posItr; const std::vector<Identifier>& rdoList = p.rdoList(); sctClusterIdentifier.insert(sctClusterIdentifier.end(),rdoList.begin(),rdoList.end()); diff --git a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/TrackParticleToPixelClusterAssociationTool.cxx b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/TrackParticleToPixelClusterAssociationTool.cxx index 54bde18a4994..b7ca8e013083 100644 --- a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/TrackParticleToPixelClusterAssociationTool.cxx +++ b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/TrackParticleToPixelClusterAssociationTool.cxx @@ -176,7 +176,6 @@ StatusCode TrackParticleToPixelClusterAssociationTool::reset (const Rec::TrackP std::vector< Identifier> pixelClusterIdentifier; - std::vector<Identifier>::iterator posItr; const DataVector<const Trk::TrackStateOnSurface>* trackHits = track->trackStateOnSurfaces(); diff --git a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/TrackParticleToSCTClusterAssociationTool.cxx b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/TrackParticleToSCTClusterAssociationTool.cxx index cf82e6efa3be..5d9b5042b988 100644 --- a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/TrackParticleToSCTClusterAssociationTool.cxx +++ b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/TrackParticleToSCTClusterAssociationTool.cxx @@ -169,7 +169,6 @@ StatusCode TrackParticleToSCTClusterAssociationTool::reset (const Rec::TrackPar std::vector< Identifier> sctClusterIdentifier; - std::vector<Identifier>::iterator posItr; const DataVector<const Trk::TrackStateOnSurface>* trackHits = track->trackStateOnSurfaces(); -- GitLab From 9f5f3dfeec31049cb5a7f2ddab3ffbb58214494e Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Thu, 14 Jun 2018 23:14:38 +0200 Subject: [PATCH 198/562] ByteStreamCnvSvc: Fix configuration for metadata changes. Fix configuration for IOVDbMetaDataTool and ByteStreamMetaDataTool changing from public to private tools. Former-commit-id: 24c835454f74a71e91d5ed93e51f0eff100e8870 --- Event/ByteStreamCnvSvc/python/ByteStreamConfig.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py b/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py index 4da7c633c0f6..ba2f8f51f92c 100644 --- a/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py +++ b/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py @@ -46,11 +46,9 @@ def TrigBSReadCfg( inputFlags ): from IOVDbMetaDataTools.IOVDbMetaDataToolsConf import IOVDbMetaDataTool iovMetaDataTool = IOVDbMetaDataTool() - acc.addPublicTool( iovMetaDataTool ) from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamMetadataTool bsMetaDataTool = ByteStreamMetadataTool() - acc.addPublicTool( bsMetaDataTool ) from StoreGate.StoreGateConf import ProxyProviderSvc, StoreGateSvc metaDataStore = StoreGateSvc("MetaDataStore") -- GitLab From b49dd74939a33c644bfc8f10f16415312acc96e4 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Mon, 18 Jun 2018 15:53:16 +0200 Subject: [PATCH 199/562] CaloUtils: Make CaloCellCorrection methods const. Change CaloCellCorrection::execute and CaloCellCorrection::MakeCorrection to be const, giving them an additional EventContext argument. Adjust use in CaloCellWeightCorrection. Former-commit-id: 9bce806fe053bdcdc11bded4835b69c346b266a7 --- .../CaloUtils/CaloUtils/CaloCellCorrection.h | 21 +++++++----- .../CaloUtils/CaloCellWeightCorrection.h | 10 +++--- .../CaloUtils/src/CaloCellCorrection.cxx | 17 ++++------ .../src/CaloCellWeightCorrection.cxx | 33 ++++++------------- 4 files changed, 35 insertions(+), 46 deletions(-) diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloCellCorrection.h b/Calorimeter/CaloUtils/CaloUtils/CaloCellCorrection.h index 6198a22f2c78..179abc8009dc 100644 --- a/Calorimeter/CaloUtils/CaloUtils/CaloCellCorrection.h +++ b/Calorimeter/CaloUtils/CaloUtils/CaloCellCorrection.h @@ -36,6 +36,7 @@ Update : June 2004 David Rousseau class CaloCell; class CaloCellContainer; +class EventContext; // Includes for Gaudi @@ -49,28 +50,30 @@ static const InterfaceID IID_CaloCellCorrection("CaloCellCorrection", 1 , 0); class CaloCellCorrection : public AthAlgTool { - public: +public: + static const InterfaceID& interfaceID() { return IID_CaloCellCorrection;} CaloCellCorrection(const std::string& type, const std::string& name, - const IInterface* parent); + const IInterface* parent); virtual ~CaloCellCorrection(); // Main access method: Correct cells in cellCollection: - StatusCode execute(CaloCellContainer* cellCollection); + virtual StatusCode execute (CaloCellContainer* cellCollection, + const EventContext& ctx) const; - // All derived class must implement the following method: - virtual void MakeCorrection(CaloCell*) = 0 ; - static const InterfaceID& interfaceID() { return IID_CaloCellCorrection;} + // All derived class must implement the following method: + virtual void MakeCorrection (CaloCell* cellCollection, + const EventContext& ctx) const = 0; protected: // All derived classes can call the following to correct CaloCell object: - void setenergy(CaloCell* lar_cell, float energy); + void setenergy(CaloCell* lar_cell, float energy) const; - void addenergy(CaloCell* lar_cell, float energy); + void addenergy(CaloCell* lar_cell, float energy) const; - void scaleenergy(CaloCell* lar_cell, float scale); + void scaleenergy(CaloCell* lar_cell, float scale) const; }; diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloCellWeightCorrection.h b/Calorimeter/CaloUtils/CaloUtils/CaloCellWeightCorrection.h index 29203f612572..7023069a254d 100644 --- a/Calorimeter/CaloUtils/CaloUtils/CaloCellWeightCorrection.h +++ b/Calorimeter/CaloUtils/CaloUtils/CaloCellWeightCorrection.h @@ -32,14 +32,16 @@ class CaloCellWeightCorrection : public CaloCellCorrection CaloCellWeightCorrection(const std::string& type, const std::string& name, const IInterface* parent); - virtual ~CaloCellWeightCorrection(); + virtual ~CaloCellWeightCorrection() override; // Main access method: Correct cells in cellCollection: - StatusCode initialize() ; - StatusCode execute(CaloCellContainer* cellCollection); + virtual StatusCode initialize() override; + virtual StatusCode execute (CaloCellContainer* cellCollection, + const EventContext& ctx) const override; // All derived class must implement the following method: - virtual void MakeCorrection(CaloCell*); + virtual void MakeCorrection (CaloCell*, + const EventContext& ctx) const override; protected: diff --git a/Calorimeter/CaloUtils/src/CaloCellCorrection.cxx b/Calorimeter/CaloUtils/src/CaloCellCorrection.cxx index a6243320b4bd..b78f99e9a20d 100644 --- a/Calorimeter/CaloUtils/src/CaloCellCorrection.cxx +++ b/Calorimeter/CaloUtils/src/CaloCellCorrection.cxx @@ -55,7 +55,8 @@ CaloCellCorrection::~CaloCellCorrection() // EXECUTE method: Correct cells in input cell container ////////////////////////////////////////////////////////////// -StatusCode CaloCellCorrection::execute(CaloCellContainer* cellCollection) +StatusCode CaloCellCorrection::execute (CaloCellContainer* cellCollection, + const EventContext& ctx) const { ATH_MSG_DEBUG("Executing CaloCellCorrection"); @@ -69,12 +70,8 @@ StatusCode CaloCellCorrection::execute(CaloCellContainer* cellCollection) // Note that this is the base class of all the concrete correction // classes which implement a Make Correction method. - CaloCellContainer::iterator cellIter = cellCollection->begin(); - CaloCellContainer::iterator cellIterEnd = cellCollection->end(); - - for (; cellIter != cellIterEnd; ++cellIter) - { - MakeCorrection( *cellIter ); + for (CaloCell* cell : *cellCollection) { + MakeCorrection ( cell, ctx ); } // Done, Return success @@ -89,17 +86,17 @@ StatusCode CaloCellCorrection::execute(CaloCellContainer* cellCollection) ////////////////////////////////////////////////////////////// -void CaloCellCorrection::setenergy(CaloCell* theCell, float energy) +void CaloCellCorrection::setenergy(CaloCell* theCell, float energy) const { theCell->setEnergy( energy ); } -void CaloCellCorrection::addenergy(CaloCell* theCell, float energy) +void CaloCellCorrection::addenergy(CaloCell* theCell, float energy) const { theCell->addEnergy( energy ); } -void CaloCellCorrection::scaleenergy(CaloCell* theCell, float scale) +void CaloCellCorrection::scaleenergy(CaloCell* theCell, float scale) const { theCell->scaleEnergy( scale ); } diff --git a/Calorimeter/CaloUtils/src/CaloCellWeightCorrection.cxx b/Calorimeter/CaloUtils/src/CaloCellWeightCorrection.cxx index b696f15699f2..d1d0bab1eea5 100644 --- a/Calorimeter/CaloUtils/src/CaloCellWeightCorrection.cxx +++ b/Calorimeter/CaloUtils/src/CaloCellWeightCorrection.cxx @@ -87,7 +87,9 @@ StatusCode CaloCellWeightCorrection::initialize() { // EXECUTE method: Correct cells in input cell container ////////////////////////////////////////////////////////////// -StatusCode CaloCellWeightCorrection::execute(CaloCellContainer* cellCollection) +StatusCode +CaloCellWeightCorrection::execute (CaloCellContainer* cellCollection, + const EventContext& ctx) const { ATH_MSG_DEBUG( "Executing CaloCellWeightCorrection" ); @@ -101,12 +103,8 @@ StatusCode CaloCellWeightCorrection::execute(CaloCellContainer* cellCollection) // Note that this is the base class of all the concrete correction // classes which implement a Make Correction method. - CaloCellContainer::iterator cellIter = cellCollection->begin(); - CaloCellContainer::iterator cellIterEnd = cellCollection->end(); - - for (; cellIter != cellIterEnd; ++cellIter) - { - MakeCorrection( *cellIter ); + for (CaloCell* cell : *cellCollection) { + MakeCorrection ( cell, ctx ); } // Done, Return success @@ -115,26 +113,15 @@ StatusCode CaloCellWeightCorrection::execute(CaloCellContainer* cellCollection) } -void CaloCellWeightCorrection::MakeCorrection( CaloCell* theCell ) +void +CaloCellWeightCorrection::MakeCorrection ( CaloCell* theCell, + const EventContext& /*ctx*/) const { - - double weight = 1.0; - - std::vector<ICellWeightTool*>::iterator toolIter=m_cellWeightTools.begin(); - std::vector<ICellWeightTool*>::iterator toolIterEnd=m_cellWeightTools.end(); - - ICellWeightTool* theTool; - - for (; toolIter != toolIterEnd; toolIter++){ - theTool = *toolIter; - + for (const ICellWeightTool* tool : m_cellWeightTools) { // need to be able to initialize tool (i.e. set container) - weight *= theTool->wtCell( theCell ); + weight *= tool->wtCell( theCell ); } theCell->scaleEnergy( weight ); - } - - -- GitLab From d8a9f63eccbcd335437c891dc4e528b9e232cff9 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Mon, 18 Jun 2018 15:51:22 +0200 Subject: [PATCH 200/562] LArCellRec: Make CaloCellCorrection methods const. Change CaloCellCorrection::MakeCorrection and execute to be const, and to take an EventContext argument. Working to make more of the calorimeter reconstruction reentrant. Former-commit-id: 630f57bdb5cdb29a1c344e2207cc2b01a8bedf2f --- .../LArCellRec/LArCellRec/LArCellEmMiscalib.h | 7 ++++--- .../LArCellRec/LArCellRec/LArCellHVCorr.h | 11 ++++++++--- .../LArCellRec/LArCellRec/LArCellRecalibration.h | 5 +++-- .../LArCellRec/LArCellRec/LArCellRescaler.h | 7 ++++--- LArCalorimeter/LArCellRec/LArCellRec/LArG3Escale.h | 14 ++++++++------ .../LArCellRec/LArCellRec/LArG3Escale_TDR.h | 11 ++++++----- .../LArCellRec/LArCellRec/LArNonLinearity.h | 7 ++++--- .../LArCellRec/src/LArCellEmMiscalib.cxx | 3 ++- LArCalorimeter/LArCellRec/src/LArCellHVCorr.cxx | 13 +++++++++---- .../LArCellRec/src/LArCellRecalibration.cxx | 5 +++-- LArCalorimeter/LArCellRec/src/LArCellRescaler.cxx | 4 +++- LArCalorimeter/LArCellRec/src/LArG3Escale.cxx | 11 ++++++----- LArCalorimeter/LArCellRec/src/LArG3Escale_TDR.cxx | 8 ++++---- LArCalorimeter/LArCellRec/src/LArNonLinearity.cxx | 3 ++- 14 files changed, 66 insertions(+), 43 deletions(-) diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArCellEmMiscalib.h b/LArCalorimeter/LArCellRec/LArCellRec/LArCellEmMiscalib.h index 913f40d942a0..b92ff7245fd3 100755 --- a/LArCalorimeter/LArCellRec/LArCellRec/LArCellEmMiscalib.h +++ b/LArCalorimeter/LArCellRec/LArCellRec/LArCellEmMiscalib.h @@ -9,7 +9,7 @@ * * @brief Apply miscalibration in EM calorimeter at cell level * - * \ G.Unal (based on other similar tools rom K.Voss) + * \ G.Unal (based on other similar tools from K.Voss) * * \date October 25, 2006 */ @@ -44,9 +44,10 @@ class LArCellEmMiscalib : public CaloCellCorrection virtual ~LArCellEmMiscalib() {}; /*! Constructor */ - virtual StatusCode initialize() ; + virtual StatusCode initialize() override; - void MakeCorrection(CaloCell* theCell); + virtual void MakeCorrection (CaloCell* theCell, + const EventContext& ctx) const override; private: diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArCellHVCorr.h b/LArCalorimeter/LArCellRec/LArCellRec/LArCellHVCorr.h index 7e7cfa462453..091e88ccb2d1 100755 --- a/LArCalorimeter/LArCellRec/LArCellRec/LArCellHVCorr.h +++ b/LArCalorimeter/LArCellRec/LArCellRec/LArCellHVCorr.h @@ -35,17 +35,22 @@ public: const IInterface* parent); ~LArCellHVCorr(); - virtual StatusCode initialize(); + virtual StatusCode initialize() override; - void MakeCorrection(CaloCell* theCell); //Implements the CaloCellCorrection interface - float getCorrection(const Identifier id); //Implements the ILArCellHVCorrTool interface + //Implements the CaloCellCorrection interface + virtual void MakeCorrection (CaloCell* theCell, + const EventContext& ctx) const override; + + //Implements the ILArCellHVCorrTool interface + virtual float getCorrection(const Identifier id) override; StatusCode LoadCalibration(IOVSVC_CALLBACK_ARGS); bool updateOnLastCallback() {return m_updateOnLastCallback;} private: + float getCorrection(const Identifier id) const; ToolHandle<ILArHVCorrTool> m_hvCorrTool; std::string m_keyHVScaleCorr; diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArCellRecalibration.h b/LArCalorimeter/LArCellRec/LArCellRec/LArCellRecalibration.h index 3fe97e89ac6c..50f3c93ef247 100755 --- a/LArCalorimeter/LArCellRec/LArCellRec/LArCellRecalibration.h +++ b/LArCalorimeter/LArCellRec/LArCellRec/LArCellRecalibration.h @@ -29,9 +29,10 @@ public: const IInterface* parent); ~LArCellRecalibration(); - virtual StatusCode initialize(); + virtual StatusCode initialize() override; - void MakeCorrection(CaloCell* theCell); + virtual void MakeCorrection (CaloCell* theCell, + const EventContext& ctx) const override; private: diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArCellRescaler.h b/LArCalorimeter/LArCellRec/LArCellRec/LArCellRescaler.h index 65412b1ea0fa..9ef555c8b6f4 100755 --- a/LArCalorimeter/LArCellRec/LArCellRec/LArCellRescaler.h +++ b/LArCalorimeter/LArCellRec/LArCellRec/LArCellRescaler.h @@ -35,10 +35,11 @@ public: LArCellRescaler (const std::string& type, const std::string& name, const IInterface* parent); - ~LArCellRescaler(); - virtual StatusCode initialize(); + virtual ~LArCellRescaler(); + virtual StatusCode initialize() override; - void MakeCorrection(CaloCell* theCell); + virtual void MakeCorrection (CaloCell* theCell, + const EventContext& ctx) const override; private: const DataHandle<CaloRec::CaloCellFactor> m_factors; diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArG3Escale.h b/LArCalorimeter/LArCellRec/LArCellRec/LArG3Escale.h index db104d4336c6..fa4d911509d6 100755 --- a/LArCalorimeter/LArCellRec/LArCellRec/LArG3Escale.h +++ b/LArCalorimeter/LArCellRec/LArCellRec/LArG3Escale.h @@ -44,16 +44,18 @@ class LArG3Escale : public CaloCellCorrection const IInterface* parent); virtual ~LArG3Escale(); - virtual StatusCode initialize(); + virtual StatusCode initialize() override; - void MakeCorrection(CaloCell* theCell); - double correction(const CaloDetDescrElement* theCaloDDE) ; + virtual void MakeCorrection (CaloCell* theCell, + const EventContext& ctx) const override; + + double correction(const CaloDetDescrElement* theCaloDDE) const; private: - double scalee(double eta); - double GetWgt(int table, double eta); - double LArScale(int bar_ec, double abseta); + double scalee(double eta) const; + double GetWgt(int table, double eta) const; + double LArScale(int bar_ec, double abseta) const; static const double s_gap0; static const double s_ecdg_scale; diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArG3Escale_TDR.h b/LArCalorimeter/LArCellRec/LArCellRec/LArG3Escale_TDR.h index 43474f2ab47d..a7b849196e93 100755 --- a/LArCalorimeter/LArCellRec/LArCellRec/LArG3Escale_TDR.h +++ b/LArCalorimeter/LArCellRec/LArCellRec/LArG3Escale_TDR.h @@ -38,15 +38,16 @@ class LArG3Escale_TDR : public CaloCellCorrection LArG3Escale_TDR(const std::string& type, const std::string& name, const IInterface* parent); - ~LArG3Escale_TDR(); - virtual StatusCode initialize(); + virtual ~LArG3Escale_TDR(); + virtual StatusCode initialize() override; - void MakeCorrection(CaloCell* theCell); + virtual void MakeCorrection (CaloCell* theCell, + const EventContext& ctx) const override; private: - double scaleb(double eta); - double scalee(double eta); + double scaleb(double eta) const; + double scalee(double eta) const; static const double s_gap0; static const double s_etacr; diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArNonLinearity.h b/LArCalorimeter/LArCellRec/LArCellRec/LArNonLinearity.h index 82b1b7294ff1..54f929f3ded3 100755 --- a/LArCalorimeter/LArCellRec/LArCellRec/LArNonLinearity.h +++ b/LArCalorimeter/LArCellRec/LArCellRec/LArNonLinearity.h @@ -36,10 +36,11 @@ class LArNonLinearity : public CaloCellCorrection LArNonLinearity(const std::string& type, const std::string& name, const IInterface* parent); - ~LArNonLinearity(); - virtual StatusCode initialize(); + virtual ~LArNonLinearity(); + virtual StatusCode initialize() override; - void MakeCorrection(CaloCell* theCell); + virtual void MakeCorrection (CaloCell* theCell, + const EventContext& ctx) const override; private: diff --git a/LArCalorimeter/LArCellRec/src/LArCellEmMiscalib.cxx b/LArCalorimeter/LArCellRec/src/LArCellEmMiscalib.cxx index 64497f3ab3ef..90e3fcc15aab 100755 --- a/LArCalorimeter/LArCellRec/src/LArCellEmMiscalib.cxx +++ b/LArCalorimeter/LArCellRec/src/LArCellEmMiscalib.cxx @@ -205,7 +205,8 @@ int LArCellEmMiscalib::region(int barrelec, double eta, double phi) ///////////////////////////////////////////////////////////////////// -void LArCellEmMiscalib::MakeCorrection(CaloCell * theCell ) +void LArCellEmMiscalib::MakeCorrection (CaloCell * theCell, + const EventContext& /*ctx*/) const { diff --git a/LArCalorimeter/LArCellRec/src/LArCellHVCorr.cxx b/LArCalorimeter/LArCellRec/src/LArCellHVCorr.cxx index cd5297c6db88..bd221f2ea8a1 100755 --- a/LArCalorimeter/LArCellRec/src/LArCellHVCorr.cxx +++ b/LArCalorimeter/LArCellRec/src/LArCellHVCorr.cxx @@ -80,8 +80,13 @@ StatusCode LArCellHVCorr::LoadCalibration(IOVSVC_CALLBACK_ARGS) { return StatusCode::SUCCESS; } -float LArCellHVCorr::getCorrection(const Identifier id) { +float LArCellHVCorr::getCorrection(const Identifier id) +{ + return const_cast<const LArCellHVCorr*>(this)->getCorrection (id); +} +float LArCellHVCorr::getCorrection(const Identifier id) const +{ float hvcorr = m_hvCorrTool->Scale(id); if (m_undoHVonline) { @@ -102,11 +107,11 @@ float LArCellHVCorr::getCorrection(const Identifier id) { } -void LArCellHVCorr::MakeCorrection(CaloCell* theCell) { - +void LArCellHVCorr::MakeCorrection (CaloCell* theCell, + const EventContext& /*ctx*/) const +{ const float hvcorr=getCorrection(theCell->ID()); theCell->setEnergy(theCell->energy()*hvcorr); - } /* diff --git a/LArCalorimeter/LArCellRec/src/LArCellRecalibration.cxx b/LArCalorimeter/LArCellRec/src/LArCellRecalibration.cxx index fccfe8427073..aafe7d5fd5be 100755 --- a/LArCalorimeter/LArCellRec/src/LArCellRecalibration.cxx +++ b/LArCalorimeter/LArCellRec/src/LArCellRecalibration.cxx @@ -37,8 +37,9 @@ StatusCode LArCellRecalibration::initialize() { } -void LArCellRecalibration::MakeCorrection(CaloCell* theCell) { - +void LArCellRecalibration::MakeCorrection (CaloCell* theCell, + const EventContext& /*ctx*/) const +{ Identifier id = theCell->ID(); CaloGain::CaloGain gain = theCell->gain(); float newEnergy=theCell->energy(); diff --git a/LArCalorimeter/LArCellRec/src/LArCellRescaler.cxx b/LArCalorimeter/LArCellRec/src/LArCellRescaler.cxx index e338bfaa2969..d4ad94ab41b1 100755 --- a/LArCalorimeter/LArCellRec/src/LArCellRescaler.cxx +++ b/LArCalorimeter/LArCellRec/src/LArCellRescaler.cxx @@ -58,7 +58,9 @@ StatusCode LArCellRescaler::checkConstants(IOVSVC_CALLBACK_ARGS) { -void LArCellRescaler::MakeCorrection(CaloCell* theCell) { +void LArCellRescaler::MakeCorrection (CaloCell* theCell, + const EventContext& /*ctx*/) const +{ const IdentifierHash& hash_id=theCell->caloDDE()->calo_hash(); if (m_factors.isValid() && hash_id<m_factors->size()) theCell->setEnergy(theCell->energy()*(*m_factors)[hash_id]); diff --git a/LArCalorimeter/LArCellRec/src/LArG3Escale.cxx b/LArCalorimeter/LArCellRec/src/LArG3Escale.cxx index 1dccb8cf1c61..a5704ed28e71 100755 --- a/LArCalorimeter/LArCellRec/src/LArG3Escale.cxx +++ b/LArCalorimeter/LArCellRec/src/LArG3Escale.cxx @@ -211,7 +211,8 @@ LArG3Escale::~LArG3Escale() // MakeCorrection: This is called with a pointer to the Cell Object. -void LArG3Escale::MakeCorrection(CaloCell* theCell) +void LArG3Escale::MakeCorrection (CaloCell* theCell, + const EventContext& /*ctx*/) const { double energy = theCell->energy(); double scale = this->correction(theCell->caloDDE()); @@ -221,7 +222,7 @@ void LArG3Escale::MakeCorrection(CaloCell* theCell) // MakeCorrection: This is called with a pointer to the Cell Object. -double LArG3Escale::correction(const CaloDetDescrElement* theCaloDDE) +double LArG3Escale::correction(const CaloDetDescrElement* theCaloDDE) const { float eta = theCaloDDE->eta(); @@ -304,7 +305,7 @@ double LArG3Escale::correction(const CaloDetDescrElement* theCaloDDE) // larscale returns the scale factor for barrel and endcap //////////////////////////////////////////////////////////////////// -double LArG3Escale::LArScale(int bar_ec, double abseta) +double LArG3Escale::LArScale(int bar_ec, double abseta) const { double scale = 0; @@ -337,7 +338,7 @@ double LArG3Escale::LArScale(int bar_ec, double abseta) // scalee returns the scale factor for the Inner Wheel of em calo /////////////////////////////////////////////////////////////////// -double LArG3Escale::scalee(double abseta) +double LArG3Escale::scalee(double abseta) const { double scale; double corr; @@ -383,7 +384,7 @@ energy is added at the cluster level in LArGapCorrection. */ -double LArG3Escale::GetWgt(int layer,double aeta) +double LArG3Escale::GetWgt(int layer,double aeta) const { if (aeta > s_etamax || aeta < s_etamin) return 1.; diff --git a/LArCalorimeter/LArCellRec/src/LArG3Escale_TDR.cxx b/LArCalorimeter/LArCellRec/src/LArG3Escale_TDR.cxx index 674c3d1784a6..d9a5d6a83a61 100755 --- a/LArCalorimeter/LArCellRec/src/LArG3Escale_TDR.cxx +++ b/LArCalorimeter/LArCellRec/src/LArG3Escale_TDR.cxx @@ -79,9 +79,9 @@ LArG3Escale_TDR::~LArG3Escale_TDR() // MakeCorrection: This is called with a pointer to the Cell Object. -void LArG3Escale_TDR::MakeCorrection(CaloCell* theCell) +void LArG3Escale_TDR::MakeCorrection (CaloCell* theCell, + const EventContext& /*ctx*/) const { - float eta = theCell->eta(); Identifier id = theCell->ID(); @@ -193,7 +193,7 @@ void LArG3Escale_TDR::MakeCorrection(CaloCell* theCell) // scaleb returns the scale factor for the EM barrel calorimeter (NOT PS): -double LArG3Escale_TDR::scaleb(double abseta) +double LArG3Escale_TDR::scaleb(double abseta) const { double scale ; @@ -214,7 +214,7 @@ double LArG3Escale_TDR::scaleb(double abseta) // scalee returns the scale factor for the EM endcap calorimeter (NOT PS): -double LArG3Escale_TDR::scalee(double abseta) +double LArG3Escale_TDR::scalee(double abseta) const { double scale; double corr; diff --git a/LArCalorimeter/LArCellRec/src/LArNonLinearity.cxx b/LArCalorimeter/LArCellRec/src/LArNonLinearity.cxx index febeb54ea024..915c1b581030 100755 --- a/LArCalorimeter/LArCellRec/src/LArNonLinearity.cxx +++ b/LArCalorimeter/LArCellRec/src/LArNonLinearity.cxx @@ -105,7 +105,8 @@ LArNonLinearity::~LArNonLinearity() // MakeCorrection: This is called with a pointer to the Cell Object. -void LArNonLinearity::MakeCorrection(CaloCell* theCell) +void LArNonLinearity::MakeCorrection (CaloCell* theCell, + const EventContext& /*ctx*/) const { float eta = theCell->eta(); Identifier id = theCell->ID(); -- GitLab From b850ef98a1d72874c4ab9a543bce50ab883b1098 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Mon, 18 Jun 2018 15:54:36 +0200 Subject: [PATCH 201/562] CaloRec: CaloCellCorrection methods are const. CaloCellCorrection::MakeCorrection is now const, with an EventContext argument. Adjust the call to it. Working to make more of the calorimeter reconstruction reentrant. Former-commit-id: b62f4db905ba0b88ede0217b401ee842c1cd0cb0 --- .../src/CaloCellContainerCorrectorTool.cxx | 28 ++++++------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/Calorimeter/CaloRec/src/CaloCellContainerCorrectorTool.cxx b/Calorimeter/CaloRec/src/CaloCellContainerCorrectorTool.cxx index 2f0455e3d24a..aa5f2b5a0ed5 100644 --- a/Calorimeter/CaloRec/src/CaloCellContainerCorrectorTool.cxx +++ b/Calorimeter/CaloRec/src/CaloCellContainerCorrectorTool.cxx @@ -15,18 +15,11 @@ PURPOSE: Apply cell correction to CaloCellContainer ********************************************************************/ #include "CaloCellContainerCorrectorTool.h" - -#include "GaudiKernel/Service.h" -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/Property.h" -#include "GaudiKernel/ListItem.h" - -#include "StoreGate/StoreGateSvc.h" - - #include "CaloEvent/CaloCellContainer.h" #include "CaloEvent/CaloCell.h" #include "CaloIdentifier/CaloCell_ID.h" +#include "GaudiKernel/ThreadLocalContext.h" + ///////////////////////////////////////////////////////////////////// // CONSTRUCTOR: @@ -140,31 +133,26 @@ StatusCode CaloCellContainerCorrectorTool::process(CaloCellContainer * theCont ) StatusCode CaloCellContainerCorrectorTool::processOnCellIterators(const CaloCellContainer::iterator & itrCellBeg, const CaloCellContainer::iterator & itrCellEnd ) { - // not clear what s the best way to do the loop - - CellCorrectionToolIterator itrToolBeg = m_cellCorrectionTools.begin(); - CellCorrectionToolIterator itrToolEnd = m_cellCorrectionTools.end(); - CellCorrectionToolIterator itrTool ; - + const EventContext& ctx = Gaudi::Hive::currentContext(); + // not clear what s the best way to do the loop CaloCellContainer::iterator itrCell; //if only one tool do not iterate (optimisation) if (m_cellCorrectionTools.size()==1) { + const ToolHandle<CaloCellCorrection>& tool = *m_cellCorrectionTools.begin(); for (itrCell=itrCellBeg;itrCell!=itrCellEnd;++itrCell) { - (*itrToolBeg)->MakeCorrection(*itrCell); + tool->MakeCorrection (*itrCell, ctx); } }else { for (itrCell=itrCellBeg;itrCell!=itrCellEnd;++itrCell) { - for (itrTool=itrToolBeg;itrTool!=itrToolEnd;++itrTool) { - (*itrTool)->MakeCorrection(*itrCell); + for (const ToolHandle<CaloCellCorrection>& tool : m_cellCorrectionTools) { + tool->MakeCorrection (*itrCell, ctx); } } } return StatusCode::SUCCESS; - - } -- GitLab From 8bec5c85ed601629fc50402e7edb033be2ac4a10 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Mon, 18 Jun 2018 15:49:37 +0200 Subject: [PATCH 202/562] LArRecUtils: CaloCellCorrection methods are const. CaloCellCorrection::MakeCorrection is now const, with an EventContext argument. Adjust the call to it. Working to make more of the calorimeter reconstruction reentrant. Former-commit-id: 607d797e8e3921b362c2162d46f805a718792080 --- .../LArRecUtils/MakeLArCellFromRaw.h | 3 ++- .../LArRecUtils/src/MakeLArCellFromRaw.cxx | 21 ++++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/LArCalorimeter/LArRecUtils/LArRecUtils/MakeLArCellFromRaw.h b/LArCalorimeter/LArRecUtils/LArRecUtils/MakeLArCellFromRaw.h index 7a8a5af51ada..d2a2457cd380 100755 --- a/LArCalorimeter/LArRecUtils/LArRecUtils/MakeLArCellFromRaw.h +++ b/LArCalorimeter/LArRecUtils/LArRecUtils/MakeLArCellFromRaw.h @@ -79,7 +79,8 @@ private: // Find correction factor for this LArCell double getCorrection(LArCell* cell, - const std::vector<CaloCellCorrection*>& vCorr ); + const std::vector<CaloCellCorrection*>& vCorr, + const EventContext& ctx) const; // cells in a FEB stored in a vector typedef std::vector<CellInfo> CELL_VEC ; diff --git a/LArCalorimeter/LArRecUtils/src/MakeLArCellFromRaw.cxx b/LArCalorimeter/LArRecUtils/src/MakeLArCellFromRaw.cxx index 86e7307b4095..5f259df6bc3d 100755 --- a/LArCalorimeter/LArRecUtils/src/MakeLArCellFromRaw.cxx +++ b/LArCalorimeter/LArRecUtils/src/MakeLArCellFromRaw.cxx @@ -20,6 +20,7 @@ #include "GaudiKernel/Bootstrap.h" #include "GaudiKernel/ISvcLocator.h" #include "GaudiKernel/IToolSvc.h" +#include "GaudiKernel/ThreadLocalContext.h" #include "StoreGate/StoreGateSvc.h" @@ -47,7 +48,7 @@ MakeLArCellFromRaw::~MakeLArCellFromRaw() void MakeLArCellFromRaw::initialize( const LArRoI_Map* roiMap , const std::vector<CaloCellCorrection*>* pCorr, unsigned int poolMaxSize ) { - + const EventContext& ctx = Gaudi::Hive::currentContext(); ISvcLocator* svcLoc = Gaudi::svcLocator( ); @@ -182,7 +183,7 @@ void MakeLArCellFromRaw::initialize( const LArRoI_Map* roiMap , if(pCorr) { // make a fake LArCell, and get the correction factor. LArCell larCell(caloDDE,en,time,qu,g); - cell.eCorr = getCorrection(&larCell, *pCorr) ; + cell.eCorr = getCorrection(&larCell, *pCorr, ctx); } } catch (LArID_Exception& ex){ ++n_em_err; @@ -224,7 +225,7 @@ void MakeLArCellFromRaw::initialize( const LArRoI_Map* roiMap , if(pCorr) { // make a fake LArCell, and get the correction factor. LArCell larCell(caloDDE,en,time,qu,g); - cell.eCorr = getCorrection(&larCell, *pCorr) ; + cell.eCorr = getCorrection(&larCell, *pCorr, ctx); } ++n_hec; } catch (LArID_Exception& ex){ @@ -265,7 +266,7 @@ void MakeLArCellFromRaw::initialize( const LArRoI_Map* roiMap , if(pCorr) { // make a fake LArCell, and get the correction factor. LArCell larCell(caloDDE,en,time,qu,g); - cell.eCorr = getCorrection(&larCell, *pCorr) ; + cell.eCorr = getCorrection(&larCell, *pCorr, ctx); } ++n_fcal; } catch (LArID_Exception& ex){ @@ -355,19 +356,19 @@ LArCell* MakeLArCellFromRaw::getLArCell(unsigned int feb, unsigned int chan , } -double MakeLArCellFromRaw::getCorrection (LArCell* cell, - const std::vector<CaloCellCorrection*>& vCorr ) +double +MakeLArCellFromRaw::getCorrection(LArCell* cell, + const std::vector<CaloCellCorrection*>& vCorr, + const EventContext& ctx) const { // LArCell was made with energy = 50. double en= 50. * GeV ; // cell->setEnergy(en); // apply corrections. - std::vector<CaloCellCorrection*>::const_iterator it= - vCorr.begin(); - for(; it!=vCorr.end(); ++it) + for (const CaloCellCorrection* corr : vCorr) { - (*it)->MakeCorrection(cell); + corr->MakeCorrection (cell, ctx); } double c= cell->energy()/en; -- GitLab From b7deadf9060ea1efa566b38c6df265818656cf33 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Mon, 18 Jun 2018 15:56:01 +0200 Subject: [PATCH 203/562] CaloCellCorrection: Make CaloCellCorrection methods const. Change CaloCellCorrection::MakeCorrection and execute to be const, and to take an EventContext argument. Working to make more of the calorimeter reconstruction reentrant. Former-commit-id: 34592eea16125f086c580c7af847d2f89b13013f --- .../CaloCellMBAverageCorr.h | 5 ++-- .../CaloCellCorrection/CaloCellPedestalCorr.h | 10 ++++---- .../CaloCellCorrection/CaloCellRandomizer.h | 3 ++- .../CaloCellCorrection/CaloCellRescaler.h | 5 ++-- .../CaloCellCorrection/CaloCellTimeCorrTool.h | 5 ++-- .../python/CaloCellPedestalCorrDefault.py | 4 ++++ .../src/CaloCellMBAverageCorr.cxx | 3 ++- .../src/CaloCellPedestalCorr.cxx | 24 ++++++++++--------- .../src/CaloCellRandomizer.cxx | 4 ++-- .../src/CaloCellRescaler.cxx | 5 ++-- .../src/CaloCellTimeCorrTool.cxx | 4 +++- 11 files changed, 44 insertions(+), 28 deletions(-) diff --git a/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellMBAverageCorr.h b/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellMBAverageCorr.h index 96745584839d..13b738e13067 100755 --- a/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellMBAverageCorr.h +++ b/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellMBAverageCorr.h @@ -24,9 +24,10 @@ public: virtual ~CaloCellMBAverageCorr() {}; - virtual StatusCode initialize(); + virtual StatusCode initialize() override; - void MakeCorrection(CaloCell* theCell); + void MakeCorrection (CaloCell* theCell, + const EventContext& ctx) const override; private: diff --git a/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellPedestalCorr.h b/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellPedestalCorr.h index c7dff91fe1be..c77eedecb3a7 100755 --- a/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellPedestalCorr.h +++ b/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellPedestalCorr.h @@ -13,6 +13,7 @@ #include "CaloInterface/ICaloLumiBCIDTool.h" #include "AthenaPoolUtilities/CondAttrListCollection.h" #include "GaudiKernel/ToolHandle.h" +#include <unordered_map> class CaloCondBlobFlt; class CaloCell; @@ -30,9 +31,10 @@ public: virtual ~CaloCellPedestalCorr() {}; - virtual StatusCode initialize(); + virtual StatusCode initialize() override; - void MakeCorrection(CaloCell* theCell); + void MakeCorrection (CaloCell* theCell, + const EventContext& ctx) const override; private: @@ -42,8 +44,8 @@ private: virtual StatusCode updateMap(IOVSVC_CALLBACK_ARGS); //=== blob storage const DataHandle<CondAttrListCollection> m_noiseAttrListColl; - std::map<unsigned int, const CaloCondBlobFlt*> m_noiseBlobMap; - std::map<unsigned int, const CaloCondBlobFlt*>::const_iterator m_lastIt; + typedef std::unordered_map<unsigned int, const CaloCondBlobFlt*> NoiseBlobMap_t; + NoiseBlobMap_t m_noiseBlobMap; ToolHandle<ICaloCoolIdTool> m_caloCoolIdTool; float m_lumi0; diff --git a/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellRandomizer.h b/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellRandomizer.h index 6c9ee72b7826..36e0541c8de4 100644 --- a/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellRandomizer.h +++ b/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellRandomizer.h @@ -29,7 +29,8 @@ public: virtual StatusCode initialize() override; - virtual void MakeCorrection (CaloCell* theCell) override; + virtual void MakeCorrection (CaloCell* theCell, + const EventContext& ctx) const override; private: diff --git a/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellRescaler.h b/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellRescaler.h index a8e1ab8b536a..2daaeeca2649 100755 --- a/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellRescaler.h +++ b/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellRescaler.h @@ -35,9 +35,10 @@ public: const IInterface* parent); ~CaloCellRescaler(); - virtual StatusCode initialize(); + virtual StatusCode initialize() override; - void MakeCorrection(CaloCell* theCell); + virtual void MakeCorrection (CaloCell* theCell, + const EventContext& ctx) const override; private: diff --git a/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellTimeCorrTool.h b/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellTimeCorrTool.h index 197b69fd84d0..c5f762067935 100644 --- a/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellTimeCorrTool.h +++ b/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellTimeCorrTool.h @@ -27,9 +27,10 @@ public: const IInterface* parent); ~CaloCellTimeCorrTool(); - virtual StatusCode initialize(); + virtual StatusCode initialize() override; - void MakeCorrection(CaloCell* theCell); + virtual void MakeCorrection (CaloCell* theCell, + const EventContext& ctx) const override; private: /// IOV callback method diff --git a/Calorimeter/CaloCellCorrection/python/CaloCellPedestalCorrDefault.py b/Calorimeter/CaloCellCorrection/python/CaloCellPedestalCorrDefault.py index 77f6f90e9db9..3d8fdd134687 100644 --- a/Calorimeter/CaloCellCorrection/python/CaloCellPedestalCorrDefault.py +++ b/Calorimeter/CaloCellCorrection/python/CaloCellPedestalCorrDefault.py @@ -49,6 +49,10 @@ def CaloCellPedestalCorrDefault(name='CaloCellPedestalCorr'): theCaloCellPedestalCorr.LumiFolderName = lumiFolder if jobproperties.CaloCellFlags.doPileupOffsetBCIDCorr() and (not athenaCommonFlags.isOnline()): + import AthenaCommon.ConcurrencyFlags + if jobproperties.ConcurrencyFlags.NumThreads() >= 1: + mlog.error ("FIXME: CaloLumiBCIDTool does not work in MT") + raise RunTimeError ("FIXME: CaloLumiBCIDTool does not work in MT") from CaloTools.CaloLumiBCIDToolDefault import CaloLumiBCIDToolDefault theCaloLumiBCIDTool = CaloLumiBCIDToolDefault() ToolSvc += theCaloLumiBCIDTool diff --git a/Calorimeter/CaloCellCorrection/src/CaloCellMBAverageCorr.cxx b/Calorimeter/CaloCellCorrection/src/CaloCellMBAverageCorr.cxx index 2155d9a6c8d3..9b0f43fd0f95 100755 --- a/Calorimeter/CaloCellCorrection/src/CaloCellMBAverageCorr.cxx +++ b/Calorimeter/CaloCellCorrection/src/CaloCellMBAverageCorr.cxx @@ -44,7 +44,8 @@ StatusCode CaloCellMBAverageCorr::initialize() // ============================================================================ -void CaloCellMBAverageCorr::MakeCorrection(CaloCell* theCell) +void CaloCellMBAverageCorr::MakeCorrection (CaloCell* theCell, + const EventContext& /*ctx*/) const { float pedestal = m_caloMBAverageTool->average(theCell); theCell->addEnergy(-pedestal); diff --git a/Calorimeter/CaloCellCorrection/src/CaloCellPedestalCorr.cxx b/Calorimeter/CaloCellCorrection/src/CaloCellPedestalCorr.cxx index fb7500c582d2..32de6d8292c3 100755 --- a/Calorimeter/CaloCellCorrection/src/CaloCellPedestalCorr.cxx +++ b/Calorimeter/CaloCellCorrection/src/CaloCellPedestalCorr.cxx @@ -49,7 +49,6 @@ CaloCellPedestalCorr::CaloCellPedestalCorr( declareProperty("LumiFolderName",m_lumiFolderName="/TRIGGER/LUMI/LBLESTONL"); declareProperty("LumiBCIDTool",m_caloLumiBCIDTool,"Tool for BCID pileup offset average correction"); declareProperty("isMC",m_isMC,"Data/MC flag"); - m_lastIt=m_noiseBlobMap.begin(); } //======================================================== @@ -147,7 +146,7 @@ StatusCode CaloCellPedestalCorr::updateMap(IOVSVC_CALLBACK_ARGS_K(keys) ) unsigned int sysId = static_cast<unsigned int>(iColl->first); //=== delete old CaloCondBlobFlt (which does not own the blob) - std::map<unsigned int, const CaloCondBlobFlt*>::iterator iOld = m_noiseBlobMap.find(sysId); + NoiseBlobMap_t::iterator iOld = m_noiseBlobMap.find(sysId); if(iOld != m_noiseBlobMap.end()){ delete iOld->second; } @@ -160,13 +159,13 @@ StatusCode CaloCellPedestalCorr::updateMap(IOVSVC_CALLBACK_ARGS_K(keys) ) m_noiseBlobMap[sysId] = flt; }//end iColl - m_lastIt=m_noiseBlobMap.begin(); return StatusCode::SUCCESS; } // ============================================================================ -void CaloCellPedestalCorr::MakeCorrection(CaloCell* theCell) +void CaloCellPedestalCorr::MakeCorrection (CaloCell* theCell, + const EventContext& ctx) const { float pedestal=0.; @@ -176,19 +175,22 @@ void CaloCellPedestalCorr::MakeCorrection(CaloCell* theCell) unsigned int subHash; const unsigned int iCool = m_caloCoolIdTool->getCoolChannelId(cellHash,subHash); //std::cout << "Got iCool=" << iCool << " subhash=" << subHash << std::endl; - if (m_lastIt->first!=iCool) { - m_lastIt=m_noiseBlobMap.find(iCool); - } - //The following checks would make sense but were obmitted to speed up execution: - //1. m_lastIt!=m_noiseBlobMap.end() eg, if iCool exists + NoiseBlobMap_t::const_iterator it = m_noiseBlobMap.find (iCool); + //The following checks would make sense but were omitted to speed up execution: + //1. it!=m_noiseBlobMap.end() eg, if iCool exists //2. subHash < flt->getNChans() - const CaloCondBlobFlt* const flt = m_lastIt->second; + const CaloCondBlobFlt* const flt = it->second; const unsigned int dbGain = CaloCondUtils::getDbCaloGain(theCell->gain()); pedestal = flt->getCalib(subHash, dbGain, m_lumi0); } if (!m_caloLumiBCIDTool.empty() ) { - pedestal = pedestal + m_caloLumiBCIDTool->average(theCell,0); + // FIXME: CaloLumiBCIDTool has threading issues. + // Refuse to proceed if we're running with multiple threads. + if (ctx.slot() > 1) { + std::abort(); + } + pedestal = pedestal + m_caloLumiBCIDTool->average(theCell,0); } theCell->addEnergy(-pedestal); diff --git a/Calorimeter/CaloCellCorrection/src/CaloCellRandomizer.cxx b/Calorimeter/CaloCellCorrection/src/CaloCellRandomizer.cxx index f4d49f600c3b..80355e2805a8 100644 --- a/Calorimeter/CaloCellCorrection/src/CaloCellRandomizer.cxx +++ b/Calorimeter/CaloCellCorrection/src/CaloCellRandomizer.cxx @@ -75,9 +75,9 @@ StatusCode CaloCellRandomizer::initialize() // ============================================================================ -void CaloCellRandomizer::MakeCorrection (CaloCell* theCell) +void CaloCellRandomizer::MakeCorrection (CaloCell* theCell, + const EventContext& ctx) const { - const EventContext& ctx = Gaudi::Hive::currentContext(); CLHEP::HepRandomEngine* engine = m_randomEngine->getEngine (ctx); int sampl = 0; diff --git a/Calorimeter/CaloCellCorrection/src/CaloCellRescaler.cxx b/Calorimeter/CaloCellCorrection/src/CaloCellRescaler.cxx index f378a92feb3f..588babd92936 100755 --- a/Calorimeter/CaloCellCorrection/src/CaloCellRescaler.cxx +++ b/Calorimeter/CaloCellCorrection/src/CaloCellRescaler.cxx @@ -49,8 +49,9 @@ StatusCode CaloCellRescaler::initialize() { } -void CaloCellRescaler::MakeCorrection(CaloCell* theCell) { - +void CaloCellRescaler::MakeCorrection (CaloCell* theCell, + const EventContext& /*ctx*/) const +{ const CaloDetDescrElement* caloDDE = theCell->caloDDE(); if (caloDDE) { theCell->scaleEnergy( m_factorToCells[caloDDE->getSampling()] ); diff --git a/Calorimeter/CaloCellCorrection/src/CaloCellTimeCorrTool.cxx b/Calorimeter/CaloCellCorrection/src/CaloCellTimeCorrTool.cxx index c90c10c5af73..fee98be0c191 100644 --- a/Calorimeter/CaloCellCorrection/src/CaloCellTimeCorrTool.cxx +++ b/Calorimeter/CaloCellCorrection/src/CaloCellTimeCorrTool.cxx @@ -51,7 +51,9 @@ StatusCode CaloCellTimeCorrTool::load(IOVSVC_CALLBACK_ARGS) { } -void CaloCellTimeCorrTool::MakeCorrection(CaloCell* theCell) { +void CaloCellTimeCorrTool::MakeCorrection (CaloCell* theCell, + const EventContext& /*ctx*/) const +{ if (m_corrValues) { const IdentifierHash& hash_id=theCell->caloDDE()->calo_hash(); if (hash_id<m_corrValues->getNChans()) { -- GitLab From a007ea9021b98ece89daf042680bd1e257876ae3 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Mon, 18 Jun 2018 15:46:49 +0200 Subject: [PATCH 204/562] TBRec: CaloCellCorrection methods are const. CaloCellCorrection::MakeCorrection is now const, with an EventContext argument. Adjust uses of it. Working to make more of the calorimeter reconstruction reentrant. Former-commit-id: c4b71645249e6961f975b9f5742d5ee776053b78 --- TestBeam/TBRec/TBRec/TBCellNoiseCorrection.h | 11 ++++++----- TestBeam/TBRec/TBRec/TBEMECCellEtaCorrection.h | 7 ++++--- TestBeam/TBRec/TBRec/TBEMECXTalkToyModel.h | 12 ++++-------- TestBeam/TBRec/src/TBCellNoiseCorrection.cxx | 3 ++- TestBeam/TBRec/src/TBEMECCellEtaCorrection.cxx | 4 +++- TestBeam/TBRec/src/TBEMECXTalkToyModel.cxx | 4 ---- 6 files changed, 19 insertions(+), 22 deletions(-) diff --git a/TestBeam/TBRec/TBRec/TBCellNoiseCorrection.h b/TestBeam/TBRec/TBRec/TBCellNoiseCorrection.h index cf0c185412e9..8c650eb42781 100644 --- a/TestBeam/TBRec/TBRec/TBCellNoiseCorrection.h +++ b/TestBeam/TBRec/TBRec/TBCellNoiseCorrection.h @@ -31,12 +31,13 @@ class TBCellNoiseCorrection : public CaloCellCorrection, virtual public IInciden TBCellNoiseCorrection (const std::string& type, const std::string& name, const IInterface* parent); - ~TBCellNoiseCorrection(); - virtual StatusCode initialize(); - virtual StatusCode finalize(); + virtual ~TBCellNoiseCorrection(); + virtual StatusCode initialize() override; + virtual StatusCode finalize() override; - void MakeCorrection(CaloCell* theCell); - void handle(const Incident&); + void MakeCorrection (CaloCell* theCell, + const EventContext& ctx) const override; + virtual void handle(const Incident&) override; private: diff --git a/TestBeam/TBRec/TBRec/TBEMECCellEtaCorrection.h b/TestBeam/TBRec/TBRec/TBEMECCellEtaCorrection.h index 600de6433ad2..6bfd7589ed39 100644 --- a/TestBeam/TBRec/TBRec/TBEMECCellEtaCorrection.h +++ b/TestBeam/TBRec/TBRec/TBEMECCellEtaCorrection.h @@ -33,10 +33,11 @@ class TBEMECCellEtaCorrection : public CaloCellCorrection TBEMECCellEtaCorrection (const std::string& type, const std::string& name, const IInterface* parent); - ~TBEMECCellEtaCorrection(); - virtual StatusCode initialize(); + virtual ~TBEMECCellEtaCorrection(); + virtual StatusCode initialize() override; - void MakeCorrection(CaloCell* theCell); + virtual void MakeCorrection (CaloCell* theCell, + const EventContext& ctx) const override; private: diff --git a/TestBeam/TBRec/TBRec/TBEMECXTalkToyModel.h b/TestBeam/TBRec/TBRec/TBEMECXTalkToyModel.h index 61d2b8c23ba6..f4713b0031bb 100755 --- a/TestBeam/TBRec/TBRec/TBEMECXTalkToyModel.h +++ b/TestBeam/TBRec/TBRec/TBEMECXTalkToyModel.h @@ -9,7 +9,6 @@ class StoreGateSvc; #include "AthenaBaseComps/AthAlgTool.h" #include "CaloInterface/ICaloCellMakerTool.h" #include "CaloEvent/CaloCellContainer.h" -#include "CaloUtils/CaloCellCorrection.h" #include "GaudiKernel/ToolHandle.h" #include "CaloIdentifier/CaloCell_ID.h" @@ -23,15 +22,12 @@ class TBEMECXTalkToyModel: public AthAlgTool, { public: TBEMECXTalkToyModel(const std::string& type, - const std::string& name, - const IInterface* parent) ; + const std::string& name, + const IInterface* parent) ; - typedef ToolHandleArray<CaloCellCorrection> ::iterator - CellCorrectionToolIterator; - - virtual StatusCode initialize() ; + virtual StatusCode initialize() override; // update theCellContainer - virtual StatusCode process( CaloCellContainer * theCellContainer) ; + virtual StatusCode process( CaloCellContainer * theCellContainer) override; private: diff --git a/TestBeam/TBRec/src/TBCellNoiseCorrection.cxx b/TestBeam/TBRec/src/TBCellNoiseCorrection.cxx index 6644ac25b5d3..4d1ad9683f43 100644 --- a/TestBeam/TBRec/src/TBCellNoiseCorrection.cxx +++ b/TestBeam/TBRec/src/TBCellNoiseCorrection.cxx @@ -150,7 +150,8 @@ StatusCode TBCellNoiseCorrection::finalize() } // MakeCorrection: This is called with a pointer to the Cell Object. -void TBCellNoiseCorrection::MakeCorrection(CaloCell* theCell) +void TBCellNoiseCorrection::MakeCorrection (CaloCell* theCell, + const EventContext& /*ctx*/) const { // const CaloDetDescrElement* elt = theCell->caloDDE(); diff --git a/TestBeam/TBRec/src/TBEMECCellEtaCorrection.cxx b/TestBeam/TBRec/src/TBEMECCellEtaCorrection.cxx index ebe2cfd83270..ffe7d5934120 100644 --- a/TestBeam/TBRec/src/TBEMECCellEtaCorrection.cxx +++ b/TestBeam/TBRec/src/TBEMECCellEtaCorrection.cxx @@ -90,7 +90,9 @@ TBEMECCellEtaCorrection::~TBEMECCellEtaCorrection() // MakeCorrection: This is called with a pointer to the Cell Object. -void TBEMECCellEtaCorrection::MakeCorrection(CaloCell* theCell) +void +TBEMECCellEtaCorrection::MakeCorrection (CaloCell* theCell, + const EventContext& /*ctx*/) const { MsgStream log(msgSvc(), name()); diff --git a/TestBeam/TBRec/src/TBEMECXTalkToyModel.cxx b/TestBeam/TBRec/src/TBEMECXTalkToyModel.cxx index 55f3305614b7..7c06f6e901ed 100755 --- a/TestBeam/TBRec/src/TBEMECXTalkToyModel.cxx +++ b/TestBeam/TBRec/src/TBEMECXTalkToyModel.cxx @@ -18,10 +18,6 @@ PURPOSE: A simple toy model to simulate longitudinal cross-talk #include "TBRec/TBEMECXTalkToyModel.h" -#include "GaudiKernel/Service.h" -#include "GaudiKernel/Property.h" -#include "GaudiKernel/ListItem.h" - #include "StoreGate/StoreGateSvc.h" -- GitLab From 934cf639ab340322d774ac3d857ed404c96c4f1a Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Wed, 20 Jun 2018 07:58:33 +0000 Subject: [PATCH 205/562] 22.0 coverity InDetAlignmentMonitoring Former-commit-id: 1b5a65206fa5570621c3b4d225d877db5dc6032f --- .../src/IDAlignMonEfficiencies.cxx | 260 +-------- .../src/IDAlignMonEfficiencies.h | 13 +- .../src/IDAlignMonGenericTracks.cxx | 53 +- .../src/IDAlignMonResiduals.cxx | 2 +- .../src/IDAlignMonResiduals.h | 501 +++++++++--------- .../src/IDAlignMonTrackSegments.cxx | 32 +- .../src/IDAlignMonTruthComparison.cxx | 27 +- .../src/IDAlignMonTruthComparison.h | 175 +++--- 8 files changed, 406 insertions(+), 657 deletions(-) diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonEfficiencies.cxx b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonEfficiencies.cxx index f8ef813a53c9..9af40a4a8ef3 100755 --- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonEfficiencies.cxx +++ b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonEfficiencies.cxx @@ -6,11 +6,8 @@ // IDAlignMonEfficiencies.cxx // AUTHORS: Beate Heinemann, Tobias Golling, John Alison, Lauren Tompkins // ********************************************************************** -#include <sstream> -#include <math.h> #include "xAODEventInfo/EventInfo.h" -//#include "EventInfo/EventID.h" #include "GaudiKernel/IJobOptionsSvc.h" #include "GaudiKernel/MsgStream.h" @@ -19,6 +16,7 @@ #include "TH1.h" #include "TH2.h" +#include "TH3.h" #include "TProfile.h" #include "TProfile2D.h" #include "TMath.h" @@ -37,27 +35,16 @@ #include "InDetRIO_OnTrack/SiClusterOnTrack.h" #include "InDetPrepRawData/SiCluster.h" -//#include "Particle/TrackParticleContainer.h" -//#include "Particle/TrackParticle.h" - #include "TrkEventPrimitives/FitQuality.h" #include "TrkEventPrimitives/LocalParameters.h" #include "TrkTrackSummary/TrackSummary.h" -// #include "VxVertex/VxContainer.h" -// #include "VxVertex/VxCandidate.h" -// #include "VxVertex/RecVertex.h" -// #include "VxVertex/Vertex.h" -// #include "VxVertex/VxTrackAtVertex.h" - -//#include "AthenaMonitoring/AthenaMonManager.h" -//#include "InDetAlignmentMonitoring/IDAlignMonEfficiencies.h" + #include "IDAlignMonEfficiencies.h" #include "InDetReadoutGeometry/SiDetectorElement.h" #include "InDetReadoutGeometry/SiDetectorElementCollection.h" -//#include "TrkTrackSummary/TrackSummary.h" -//#include "TrkExInterfaces/IExtrapolator.h" + #include "TrkToolInterfaces/ITrackHoleSearchTool.h" #include "InDetAlignGenTools/IInDetAlignHitQualSelTool.h" #include "TrackSelectionTool.h" @@ -127,8 +114,6 @@ struct IDAlignMonEfficiencies::TRTBarrelHistograms{ outliers_eff_vs_phiSector[lay] = 0; hits_eff_vs_phiSector[lay] = 0; tubeHits_eff_vs_phiSector[lay] = 0; - - } @@ -446,8 +431,6 @@ StatusCode IDAlignMonEfficiencies::bookHistograms() - //if ( newLowStatFlag() ) { } - //if ( newLumiBlockFlag() ) { } if ( newRunFlag() ) { //if user environment specified we don't want to book new histograms at every run boundary @@ -691,9 +674,7 @@ StatusCode IDAlignMonEfficiencies::bookHistograms() /** Convert from an int to a string */ std::string IDAlignMonEfficiencies::intToString(int input){ - std::ostringstream stm; - stm << input; - return stm.str(); + return std::to_string(input); } /** Make Histograms */ @@ -793,7 +774,6 @@ void IDAlignMonEfficiencies::RegisterHisto(MonGroup& mon, TH2* histo) { void IDAlignMonEfficiencies::RegisterHisto(MonGroup& mon, TProfile2D* histo) { - //histo->Sumw2(); StatusCode sc = mon.regHist(histo); if (sc.isFailure() ) { if(msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Cannot book TProfile2D Histogram:" << endmsg; @@ -834,49 +814,20 @@ StatusCode IDAlignMonEfficiencies::fillHistograms() DataVector<Trk::Track>::const_iterator trksItrE = trks->end(); for (; trksItr != trksItrE; ++trksItr) { - //float trkd0 = -999; - //float trkz0 = -999; - //float trkphi = -999; - //float trktheta = -999; - //float trketa = -999; + float qOverP = -999; float trkpt = -999; float charge = 0; float abs_trkpt = -999; //charge*trkpt - // get fit quality and chi2 probability of track - // chi2Prob = TMath::Prob(chi2,DoF) ROOT function - //const Trk::Perigee* startPerigee = (*trksItr)->perigeeParameters(); - //const Trk::MeasuredPerigee* measPer = dynamic_cast<const Trk::MeasuredPerigee*>( startPerigee ); - //if (measPer==0) { - // if(msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "No measured perigee parameters assigned to the track" << endmsg; - //} - //else{ - // CLHEP::HepVector perigeeParams = measPer->parameters(); - // trkd0 = perigeeParams[Trk::d0]; - // trkz0 = perigeeParams[Trk::z0]; - // trkphi = perigeeParams[Trk::phi0]; - // trktheta = perigeeParams[Trk::theta]; - // trketa = measPer->eta(); - // qOverP = perigeeParams[Trk::qOverP]*1000.; - // trkpt = measPer->pT()/1000.; - // if (qOverP<0) charge=-1; - // else charge=+1; - // abs_trkpt = charge*trkpt; - //} - const Trk::Perigee* measPer = (*trksItr)->perigeeParameters(); const AmgSymMatrix(5)* covariance = measPer ? measPer->covariance() : NULL; if (measPer && covariance) { AmgVector(5) perigeeParams = measPer->parameters(); - //trkd0 = perigeeParams(Trk::d0); - //trkz0 = perigeeParams(Trk::z0); - //trkphi = perigeeParams(Trk::phi0); - //trktheta = perigeeParams(Trk::theta); - //trketa = measPer->eta(); + qOverP = perigeeParams(Trk::qOverP)*1000.; trkpt = measPer->pT()/1000.; if (qOverP<0) charge=-1; @@ -887,19 +838,6 @@ StatusCode IDAlignMonEfficiencies::fillHistograms() { if(msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "No measured perigee parameters assigned to the track" << endmsg; } - //if (trkphi<0) trkphi+=2*m_Pi; - -// //some good quality requirements (will need to refine them later) -// bool good=(fabs(trketa<2.5)&&fabs(trkz0)<150 && trkpt>1); - -// if (!good) continue; - - - // holes + outliers + measurements + etc. - // these two are identical in the ID: - ////const Trk::Track* trackWithHoles = m_holeSearchTool->getTrackWithHoles(**trksItr); - //const Trk::Track* trackWithHoles = m_holeSearchTool->getTrackWithHolesAndOutliers(**trksItr); - ////if (trackWithHoles!=NULL) TSOS = trackWithHoles->trackStateOnSurfaces(); // loop over all hits on track const DataVector<const Trk::TrackStateOnSurface>* TSOS; @@ -1113,7 +1051,6 @@ StatusCode IDAlignMonEfficiencies::fillHistograms() } // end of PIX barrel else if (barrelEC == 2){ - //msg(MSG::WARNING) <<"Pix eca, layer_disk=" << m_pixelID->layer_disk(surfaceID) << ", eta=" << m_pixelID->eta_module(surfaceID) << ", phi=" << m_pixelID->phi_module(surfaceID) <<endmsg; if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE)<<"found pixel eca hit"<<endmsg; m_measurements_vs_layer_eca -> Fill(layerDisk); m_noholes_vs_layer_eca -> Fill(layerDisk); @@ -1134,7 +1071,6 @@ StatusCode IDAlignMonEfficiencies::fillHistograms() } // ECA else if (barrelEC == -2){ - //msg(MSG::WARNING) <<"Pix ecc, layer_disk=" << layerDisk << ", eta=" << m_pixelID->eta_module(surfaceID) << ", phi=" << m_pixelID->phi_module(surfaceID) <<endmsg; if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE)<<"found pixel ecc hit"<<endmsg; m_measurements_vs_layer_ecc -> Fill(layerDisk); m_noholes_vs_layer_ecc -> Fill(layerDisk); @@ -1187,7 +1123,6 @@ StatusCode IDAlignMonEfficiencies::fillHistograms() }//barrel else if (barrelEC == 2){ - //msg(MSG::WARNING) <<"SCT eca, layer_disk=" << m_sctID->layer_disk(surfaceID) << ", eta=" << m_sctID->eta_module(surfaceID) << ", phi=" << m_sctID->phi_module(surfaceID) << ", side=" << m_sctID->side(surfaceID) <<endmsg; if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE)<<"found sct eca hit"<<endmsg; m_measurements_vs_layer_eca -> Fill(3 + 2*layerDisk + sctSide); m_noholes_vs_layer_eca -> Fill(3 + 2*layerDisk + sctSide); @@ -1212,7 +1147,6 @@ StatusCode IDAlignMonEfficiencies::fillHistograms() }//ECA else if (barrelEC == -2){ - //msg(MSG::WARNING) <<"SCT ecc, layer_disk=" << layerDisk << ", eta=" << m_sctID->eta_module(surfaceID) << ", phi=" << m_sctID->phi_module(surfaceID) << ", side=" << sctSide <<endmsg; if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE)<<"found sct ecc hit"<<endmsg; m_measurements_vs_layer_ecc -> Fill(3 + 2*layerDisk + sctSide); m_noholes_vs_layer_ecc -> Fill(3 + 2*layerDisk + sctSide); @@ -1249,7 +1183,6 @@ StatusCode IDAlignMonEfficiencies::fillHistograms() // --- pixel if (detType==0){ if (barrelEC == 0){ - // msg(MSG::WARNING) << " ** OULIER FOUND ** Pix barrel layer_disk=" << layerDisk << ", eta=" << modEta << ", phi=" << modPhi <<endmsg; m_outliers_vs_layer_barrel -> Fill(layerDisk); m_noholes_vs_layer_barrel -> Fill(layerDisk); m_outliers_vs_Eta_Phi_pix_b[layerDisk] -> Fill(modEta, modPhi); @@ -1278,7 +1211,6 @@ StatusCode IDAlignMonEfficiencies::fillHistograms() // --- sct -- outliers in SCT else if (detType==1){ if (barrelEC == 0){ - //msg(MSG::WARNING) <<"SCT barrel outlier, layer_disk=" << layerDisk << ", eta=" << m_sctID->eta_module(surfaceID) << ", phi=" << m_sctID->phi_module(surfaceID) << ", side=" << sctSide <<endmsg; m_outliers_vs_layer_barrel -> Fill(m_NPixLayers + 2*layerDisk + sctSide); m_noholes_vs_layer_barrel -> Fill(m_NPixLayers + 2*layerDisk + sctSide); @@ -1311,6 +1243,7 @@ StatusCode IDAlignMonEfficiencies::fillHistograms() const Trk::TrackSummary* summary = m_trackSumTool->createSummary(**trksItr); if( !summary->get(Trk::numberOfPixelHits) && !summary->get(Trk::numberOfSCTHits) && (summary->get(Trk::numberOfPixelHoles)==0) && (summary->get(Trk::numberOfSCTHoles)==0) && (m_doHoleSearch)){ if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "No Pixel or SCT hits skip hole search" << endmsg; + delete summary; continue; } delete summary; @@ -1420,7 +1353,6 @@ StatusCode IDAlignMonEfficiencies::fillHistograms() else if (detType==1){ if (barrelEC == 0) { - //msg(MSG::WARNING) <<"SCT barrel hole, layer_disk=" << m_sctID->layer_disk(surfaceID) << ", eta=" << m_sctID->eta_module(surfaceID) << ", phi=" << modPhi << ", side=" << m_sctID->side(surfaceID) << endmsg; m_hits_vs_layer_barrel -> Fill(m_NPixLayers + 2*layerDisk + sctSide); @@ -1440,7 +1372,6 @@ StatusCode IDAlignMonEfficiencies::fillHistograms() } else if (barrelEC == -2){ m_hits_vs_layer_ecc -> Fill(3 + 2*layerDisk + sctSide); - //if(layerDisk == 0) ???? (PF: why this is here?) m_hits_vs_Phi_sct_ecc[layerDisk] -> Fill(modPhi); m_hits_vs_Eta_Phi_sct_ecc -> Fill(layerDisk, modPhi); } @@ -1646,7 +1577,6 @@ void IDAlignMonEfficiencies::makeEffHisto(TH1F_LW* h_num, TH1F_LW* h_denom, TPro int Nfail = int(h_denom->GetBinContent(bin+1)) - Npass; float binSize = (h_denom->getXMax() - h_denom->getXMin())/h_denom->GetNbinsX(); - //double x = h_denom->GetBinCenter(bin+1); double x = h_denom->getXMin() + binSize * bin + binSize/2; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Npass is " << Npass << endmsg; for (int pass=0; pass<Npass; ++pass) { @@ -1735,12 +1665,10 @@ void IDAlignMonEfficiencies::makeEffHisto(TH2F* h_num, TH2F* h_denom, TH2F* h_ef if (NExpected > 10) doComputeEff = true; if (NSeenHits > 5) doComputeEff = true; if (doComputeEff) { - myEff = NSeenHits / NExpected; - if (myEff < 0.01) myEff = 0.01; //trick to distinguish between few entries and not working modules or too low statistics (doComputeEff = false --> Eff = 0 % ) - h_eff->SetBinContent(bin+1,binY+1, myEff); + myEff = NSeenHits / NExpected; + if (myEff < 0.01) myEff = 0.01; //trick to distinguish between few entries and not working modules or too low statistics (doComputeEff = false --> Eff = 0 % ) + h_eff->SetBinContent(bin+1,binY+1, myEff); } - // std::cout << " -- SALVA -- eff for module ( " << bin << ", " << binY << ") Nseen= " << NSeenHits << " NExpected= " << NExpected; - // std::cout << " ComputeEff= " << doComputeEff; if (doComputeEff) std::cout << " Eff= " << myEff; std::cout << std::endl; } @@ -1757,7 +1685,6 @@ void IDAlignMonEfficiencies::makeEffHistoWithCut(TH2F* h_num, TH2F* h_denom, TPr int Nbins = h_num->GetNbinsX(); int NbinsY = h_num->GetNbinsY(); float NSeenHits, NExpected; - float myEff = 0.; // default is 0% bool doComputeEff = false; for (int bin=0; bin!=Nbins; ++bin) { @@ -1768,24 +1695,15 @@ void IDAlignMonEfficiencies::makeEffHistoWithCut(TH2F* h_num, TH2F* h_denom, TPr if (NExpected > 10) doComputeEff = true; if (NSeenHits > 3) doComputeEff = true; if (doComputeEff) { - myEff = NSeenHits / NExpected; - if (myEff < 0.01) myEff = 0.01; // trick to distinguish between few entries and not working modules (dead modules). - // h_eff->SetBinContent(bin+1,binY+1, myEff); - float this_x = h_denom->GetXaxis()->GetBinCenter(bin+1); - float this_y = h_denom->GetYaxis()->GetBinCenter(binY+1); - - for (int i=0; i<NExpected; i++) { - if (i < NSeenHits) { - h_eff->Fill(this_x, this_y, 1.); - } - else { - h_eff->Fill(this_x, this_y, 0.); - } - } + float this_x = h_denom->GetXaxis()->GetBinCenter(bin+1); + float this_y = h_denom->GetYaxis()->GetBinCenter(binY+1); + for (int i=0; i<NExpected; i++) { + const float fillValue = (i < NSeenHits) ? 1. : 0.; + h_eff->Fill(this_x, this_y, fillValue); + } } std::cout << " -- SALVA -- eff for module ( " << bin << ", " << binY << ") Nseen= " << NSeenHits << " NExpected= " << NExpected; std::cout << " ComputeEff= " << doComputeEff; - // if (doComputeEff) std::cout << " Eff= " << myEff; if (doComputeEff) std::cout << " Eff= " << h_eff->GetBinContent(bin, binY); std::cout << std::endl; } @@ -1797,8 +1715,6 @@ void IDAlignMonEfficiencies::makeEffHistoWithCut(TH2F* h_num, TH2F* h_denom, TPr StatusCode IDAlignMonEfficiencies::procHistograms() { if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "In procHistograms" << endmsg; - //if( endOfLowStatFlag() ) { } - //if( endOfLumiBlockFlag() ) { } if( endOfRunFlag() || ( ( AthenaMonManager::environment() == AthenaMonManager::online ) && endOfLumiBlockFlag() ) ) { // ----------------------------------------------------------------------- // @@ -2007,134 +1923,7 @@ StatusCode IDAlignMonEfficiencies::procHistograms() if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Done TRT Processing" << endmsg; //======================== - - -// // normalize: divide outliers by number of hits -// for (int i=1;i<=m_hits_vs_Eta_Phi_pix_b0->GetNbinsX();i++){ -// for (int j=1;j<=m_hits_vs_Eta_Phi_pix_b0->GetNbinsY();j++){ -// float measurements=m_measurements_vs_Eta_Phi_pix_b0->GetBinContent(i,j); -// float outliers=m_outliers_vs_Eta_Phi_pix_b0->GetBinContent(i,j); -// float holes=m_holes_vs_Eta_Phi_pix_b0->GetBinContent(i,j); -// float hits=m_hits_vs_Eta_Phi_pix_b0->GetBinContent(i,j); -// if(hits > 0){ -// m_measurements_vs_Eta_Phi_pix_b0->SetBinContent(i,j,measurements / hits); -// m_outliers_vs_Eta_Phi_pix_b0->SetBinContent(i,j,outliers / hits); -// m_holes_vs_Eta_Phi_pix_b0->SetBinContent(i,j,holes / hits); -// } else { -// m_measurements_vs_Eta_Phi_pix_b0->SetBinContent(i,j,0.); -// m_outliers_vs_Eta_Phi_pix_b0->SetBinContent(i,j,0.); -// m_holes_vs_Eta_Phi_pix_b0->SetBinContent(i,j,0.); -// } -// } -// } - -// for (int i=1;i<=m_hits_vs_Eta_Phi_pix_b1->GetNbinsX();i++){ -// for (int j=1;j<=m_hits_vs_Eta_Phi_pix_b1->GetNbinsY();j++){ -// float measurements=m_measurements_vs_Eta_Phi_pix_b1->GetBinContent(i,j); -// float outliers=m_outliers_vs_Eta_Phi_pix_b1->GetBinContent(i,j); -// float holes=m_holes_vs_Eta_Phi_pix_b1->GetBinContent(i,j); -// float hits=m_hits_vs_Eta_Phi_pix_b1->GetBinContent(i,j); -// if(hits > 0){ -// m_measurements_vs_Eta_Phi_pix_b1->SetBinContent(i,j,measurements / hits); -// m_outliers_vs_Eta_Phi_pix_b1->SetBinContent(i,j,outliers / hits); -// m_holes_vs_Eta_Phi_pix_b1->SetBinContent(i,j,holes / hits); -// } else { -// m_measurements_vs_Eta_Phi_pix_b1->SetBinContent(i,j,0.); -// m_outliers_vs_Eta_Phi_pix_b1->SetBinContent(i,j,0.); -// m_holes_vs_Eta_Phi_pix_b1->SetBinContent(i,j,0.); -// } -// } -// } - -// for (int i=1;i<=m_hits_vs_Eta_Phi_pix_b2->GetNbinsX();i++){ -// for (int j=1;j<=m_hits_vs_Eta_Phi_pix_b2->GetNbinsY();j++){ -// float measurements=m_measurements_vs_Eta_Phi_pix_b2->GetBinContent(i,j); -// float outliers=m_outliers_vs_Eta_Phi_pix_b2->GetBinContent(i,j); -// float holes=m_holes_vs_Eta_Phi_pix_b2->GetBinContent(i,j); -// float hits=m_hits_vs_Eta_Phi_pix_b2->GetBinContent(i,j); -// if(hits > 0){ -// m_measurements_vs_Eta_Phi_pix_b2->SetBinContent(i,j,measurements / hits); -// m_outliers_vs_Eta_Phi_pix_b2->SetBinContent(i,j,outliers / hits); -// m_holes_vs_Eta_Phi_pix_b2->SetBinContent(i,j,holes / hits); -// } else { -// m_measurements_vs_Eta_Phi_pix_b2->SetBinContent(i,j,0.); -// m_outliers_vs_Eta_Phi_pix_b2->SetBinContent(i,j,0.); -// m_holes_vs_Eta_Phi_pix_b2->SetBinContent(i,j,0.); -// } -// } -// } - -// for (int i=1;i<=m_hits_vs_Eta_Phi_sct_b0->GetNbinsX();i++){ -// for (int j=1;j<=m_hits_vs_Eta_Phi_sct_b0->GetNbinsY();j++){ -// float measurements=m_measurements_vs_Eta_Phi_sct_b0->GetBinContent(i,j); -// float outliers=m_outliers_vs_Eta_Phi_sct_b0->GetBinContent(i,j); -// float holes=m_holes_vs_Eta_Phi_sct_b0->GetBinContent(i,j); -// float hits=m_hits_vs_Eta_Phi_sct_b0->GetBinContent(i,j); -// if(hits > 0){ -// m_measurements_vs_Eta_Phi_sct_b0->SetBinContent(i,j,measurements / hits); -// m_outliers_vs_Eta_Phi_sct_b0->SetBinContent(i,j,outliers / hits); -// m_holes_vs_Eta_Phi_sct_b0->SetBinContent(i,j,holes / hits); -// } else { -// m_measurements_vs_Eta_Phi_sct_b0->SetBinContent(i,j,0.); -// m_outliers_vs_Eta_Phi_sct_b0->SetBinContent(i,j,0.); -// m_holes_vs_Eta_Phi_sct_b0->SetBinContent(i,j,0.); -// } -// } -// } - -// for (int i=1;i<=m_hits_vs_Eta_Phi_sct_b1->GetNbinsX();i++){ -// for (int j=1;j<=m_hits_vs_Eta_Phi_sct_b1->GetNbinsY();j++){ -// float measurements=m_measurements_vs_Eta_Phi_sct_b1->GetBinContent(i,j); -// float outliers=m_outliers_vs_Eta_Phi_sct_b1->GetBinContent(i,j); -// float holes=m_holes_vs_Eta_Phi_sct_b1->GetBinContent(i,j); -// float hits=m_hits_vs_Eta_Phi_sct_b1->GetBinContent(i,j); -// if(hits > 0){ -// m_measurements_vs_Eta_Phi_sct_b1->SetBinContent(i,j,measurements / hits); -// m_outliers_vs_Eta_Phi_sct_b1->SetBinContent(i,j,outliers / hits); -// m_holes_vs_Eta_Phi_sct_b1->SetBinContent(i,j,holes / hits); -// } else { -// m_measurements_vs_Eta_Phi_sct_b1->SetBinContent(i,j,0.); -// m_outliers_vs_Eta_Phi_sct_b1->SetBinContent(i,j,0.); -// m_holes_vs_Eta_Phi_sct_b1->SetBinContent(i,j,0.); -// } -// } -// } - -// for (int i=1;i<=m_hits_vs_Eta_Phi_sct_b2->GetNbinsX();i++){ -// for (int j=1;j<=m_hits_vs_Eta_Phi_sct_b2->GetNbinsY();j++){ -// float measurements=m_measurements_vs_Eta_Phi_sct_b2->GetBinContent(i,j); -// float outliers=m_outliers_vs_Eta_Phi_sct_b2->GetBinContent(i,j); -// float holes=m_holes_vs_Eta_Phi_sct_b2->GetBinContent(i,j); -// float hits=m_hits_vs_Eta_Phi_sct_b2->GetBinContent(i,j); -// if(hits > 0){ -// m_measurements_vs_Eta_Phi_sct_b2->SetBinContent(i,j,measurements / hits); -// m_outliers_vs_Eta_Phi_sct_b2->SetBinContent(i,j,outliers / hits); -// m_holes_vs_Eta_Phi_sct_b2->SetBinContent(i,j,holes / hits); -// } else { -// m_measurements_vs_Eta_Phi_sct_b2->SetBinContent(i,j,0.); -// m_outliers_vs_Eta_Phi_sct_b2->SetBinContent(i,j,0.); -// m_holes_vs_Eta_Phi_sct_b2->SetBinContent(i,j,0.); -// } -// } -// } - -// for (int i=1;i<=m_hits_vs_Eta_Phi_sct_b3->GetNbinsX();i++){ -// for (int j=1;j<=m_hits_vs_Eta_Phi_sct_b3->GetNbinsY();j++){ -// float measurements=m_measurements_vs_Eta_Phi_sct_b3->GetBinContent(i,j); -// float outliers=m_outliers_vs_Eta_Phi_sct_b3->GetBinContent(i,j); -// float holes=m_holes_vs_Eta_Phi_sct_b3->GetBinContent(i,j); -// float hits=m_hits_vs_Eta_Phi_sct_b3->GetBinContent(i,j); -// if(hits > 0){ -// m_measurements_vs_Eta_Phi_sct_b3->SetBinContent(i,j,measurements / hits); -// m_outliers_vs_Eta_Phi_sct_b3->SetBinContent(i,j,outliers / hits); -// m_holes_vs_Eta_Phi_sct_b3->SetBinContent(i,j,holes / hits); -// } else { -// m_measurements_vs_Eta_Phi_sct_b3->SetBinContent(i,j,0.); -// m_outliers_vs_Eta_Phi_sct_b3->SetBinContent(i,j,0.); -// m_holes_vs_Eta_Phi_sct_b3->SetBinContent(i,j,0.); -// } -// } -// } + } @@ -2309,8 +2098,6 @@ std::pair<const Trk::TrackStateOnSurface*, const Trk::TrackStateOnSurface*> IDAl } } - //const Trk::TrackParameters* trackParameter = tsos2->trackParameters(); - //const Trk::MeasuredTrackParameters* measuredTrackParameter = dynamic_cast<const Trk::MeasuredTrackParameters*>(trackParameter); const Trk::TrackParameters* TrackParameters = tsos2->trackParameters(); if (!TrackParameters) @@ -2376,9 +2163,7 @@ std::pair<const Trk::TrackStateOnSurface*, const Trk::TrackStateOnSurface*> IDAl } if(close){ //end add by TG if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "***** identified local X overlap" << endmsg; - // if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "original module radius = " << radius << endmsg; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "original module phi, eta = " << modEta <<", "<<modPhi<< endmsg; - //if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "overlap module radius = " << radius2 << endmsg; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "second module phi, eta = " << modEta2 <<", "<<modPhi2<< endmsg; xOverlap = (tsos2); } //added by LT @@ -2387,8 +2172,6 @@ std::pair<const Trk::TrackStateOnSurface*, const Trk::TrackStateOnSurface*> IDAl if(modEta-modEta2 == 1 && modPhi==modPhi2){ if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "***** identified local Y overlap" << endmsg; - //if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "original module radius = " << radius << endmsg; - //if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "overlap module radius = " << radius2 << endmsg; yOverlap = (tsos2); } if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "modEta2 = " << modEta2 << endmsg; @@ -2658,11 +2441,7 @@ void IDAlignMonEfficiencies::makePIXEndCapsHistograms(MonGroup& al_mon){ //efficiencies for endcaps m_measurements_eff_vs_Phi_pix_eca.push_back(new TProfile(("measurements_eff_vs_Phi_pix_eca"+intToString(iWheel)).c_str(),("measurements per possible hits vs. Phi-ID in Pixel eca layer "+intToString(iWheel)).c_str(),maxPhiModulesPerRing,-0.5,maxPhiModulesPerRing-0.5, 0., 1.)); RegisterHisto(al_mon,m_measurements_eff_vs_Phi_pix_eca[iWheel]) ; - - - - - + } if (iSide<0) { @@ -2744,8 +2523,6 @@ void IDAlignMonEfficiencies::makeSCTBarrelHistograms(MonGroup &al_mon){ //ATH_MSG_INFO("iEta= " << iEta); } float EtaModules= m_SCT_Mgr->numerology().endEtaModuleForLayer(iLayer) - m_SCT_Mgr->numerology().beginEtaModuleForLayer(iLayer); //(i put float in order to divide by 2. I am not skipping the empty layer. It might be nice to see the separation) - //m_measurements_eff_vs_Eta_Phi_sct_b.push_back(new TProfile2D(("measurements_eff_vs_Eta_Phi_sct_b"+intToString(iLayer)).c_str(),("hit eff. vs. Eta-Phi-ID in Sct barrel layer"+intToString(iLayer)).c_str(),EtaModules,-EtaModules/2.,EtaModules/2.,maxPhiModulesPerLayer,-0.5,maxPhiModulesPerLayer-0.5,0.,1.)); - //RegisterHisto(al_mon,m_measurements_eff_vs_Eta_Phi_sct_b[iLayer]); m_measurements_eff_vs_Eta_Phi_sct_b.push_back(new TProfile2D(("measurements_eff_vs_Eta_Phi_sct_b"+intToString(iLayer)).c_str(),("hit eff. vs. Eta-Phi-ID in Sct barrel layer "+intToString(iLayer)).c_str(),EtaModules,-EtaModules/2.,EtaModules/2.,maxPhiModulesPerLayer,-0.5,maxPhiModulesPerLayer,0.,1.)); RegisterHisto(al_mon,m_measurements_eff_vs_Eta_Phi_sct_b[iLayer]); //all hits @@ -2770,7 +2547,6 @@ void IDAlignMonEfficiencies::makeSCTBarrelHistograms(MonGroup &al_mon){ for (int side=0; side < 2; side++) { - // std::cout << " -- Salva -- hit map of SCT BAR layer " << iLayer << " side: " << side << " Name: " << ("measurements_vs_Eta_Phi_sct_b"+intToString(iLayer)+"_s"+intToString(side)).c_str() << std::endl; if (side == 0) { // posible hits m_hits_vs_Eta_Phi_sct_s0_b.push_back(new TH2F(("expectedHits_vs_Eta_Phi_sct_b"+intToString(iLayer)+"_s"+intToString(side)).c_str(),("measurements per possible hits vs. Eta-Phi-ID in SCT barrel layer "+intToString(iLayer)+" side "+intToString(side)).c_str(),EtaModules,-EtaModules/2.,EtaModules/2.,maxPhiModulesPerLayer,-0.5,maxPhiModulesPerLayer-0.5)); diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonEfficiencies.h b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonEfficiencies.h index 7c075e7e36cc..9b2588691a59 100755 --- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonEfficiencies.h +++ b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonEfficiencies.h @@ -18,7 +18,6 @@ #include "GaudiKernel/ToolHandle.h" #include "TrkToolInterfaces/ITrackSummaryTool.h" #include "EventPrimitives/EventPrimitives.h" -#include "TH3F.h" //forward declaration class TH1F; @@ -351,15 +350,15 @@ class IDAlignMonEfficiencies : public ManagedMonitorToolBase std::vector<TH1F*> m_measurements_vs_LB_pix_ecc; - TProfile* m_measurements_eff_vs_LB_sct_eca; - TH1F* m_hits_vs_LB_sct_eca; - TH1F* m_measurements_vs_LB_sct_eca; + TProfile* m_measurements_eff_vs_LB_sct_eca{}; + TH1F* m_hits_vs_LB_sct_eca{}; + TH1F* m_measurements_vs_LB_sct_eca{}; - TProfile* m_measurements_eff_vs_LB_sct_ecc; - TH1F* m_hits_vs_LB_sct_ecc; - TH1F* m_measurements_vs_LB_sct_ecc; + TProfile* m_measurements_eff_vs_LB_sct_ecc{}; + TH1F* m_hits_vs_LB_sct_ecc{}; + TH1F* m_measurements_vs_LB_sct_ecc{}; std::vector<TProfile*> m_overlapX_eff_vs_Phi_pix_b; diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonGenericTracks.cxx b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonGenericTracks.cxx index 3331d74d57e7..58f6f9bdf3a1 100644 --- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonGenericTracks.cxx +++ b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonGenericTracks.cxx @@ -7,8 +7,7 @@ // AUTHORS: Beate Heinemann, Tobias Golling // ********************************************************************** -#include <sstream> -#include <math.h> +#include <cmath> #include "TH1.h" #include "TH2.h" #include "TProfile.h" @@ -29,7 +28,6 @@ #include "InDetPrepRawData/SiCluster.h" -//#include "Particle/TrackParticleContainer.h" #include "Particle/TrackParticle.h" #include "TrkParticleBase/LinkToTrackParticleBase.h" @@ -40,7 +38,6 @@ #include "xAODEventInfo/EventInfo.h" -//#include "AthenaMonitoring/AthenaMonManager.h" #include "IDAlignMonGenericTracks.h" #include "CLHEP/GenericFunctions/CumulativeChiSquare.hh" @@ -2141,8 +2138,8 @@ StatusCode IDAlignMonGenericTracks::fillHistograms() if(charge>0) m_pT_p -> Fill(trkpt, hweight); if(charge<0) m_pT_n -> Fill(trkpt, hweight); - m_pTRes -> Fill(fabs(Err_qOverP/qOverP) , hweight); - m_pTResOverP -> Fill(fabs(Err_qOverP/qOverP*qOverP), hweight); + m_pTRes -> Fill(std::fabs(Err_qOverP/qOverP) , hweight); + m_pTResOverP -> Fill(std::fabs(Err_qOverP/qOverP*qOverP), hweight); @@ -2184,42 +2181,42 @@ StatusCode IDAlignMonGenericTracks::fillHistograms() m_trk_TRTHitsvEta -> Fill( trketa , nhtrt , hweight); m_trk_chi2oDoF_Phi -> Fill( trkphi , chi2oDoF, hweight); m_trk_chi2oDoF_Pt -> Fill( charge*trkpt , chi2oDoF, hweight); - m_trk_chi2oDoF_P -> Fill( charge*fabs(trkP), chi2oDoF, hweight); + m_trk_chi2oDoF_P -> Fill( charge*std::fabs(trkP), chi2oDoF, hweight); m_trk_chi2ProbDist -> Fill( chi2Prob , hweight); m_errCotTheta -> Fill( Err_cottheta , hweight); m_errCotThetaVsD0BS-> Fill( d0bscorr , Err_cottheta, hweight); - m_errCotThetaVsPt -> Fill( fabs(trkpt) , Err_cottheta, hweight); - m_errCotThetaVsP -> Fill( fabs(trkP) , Err_cottheta, hweight); + m_errCotThetaVsPt -> Fill( std::fabs(trkpt) , Err_cottheta, hweight); + m_errCotThetaVsP -> Fill( std::fabs(trkP) , Err_cottheta, hweight); m_errCotThetaVsPhi -> Fill( trkphi , Err_cottheta, hweight); m_errCotThetaVsEta -> Fill( trketa , Err_cottheta, hweight); m_errTheta -> Fill( Err_theta , hweight); m_errThetaVsD0BS -> Fill( d0bscorr , Err_theta, hweight); - m_errThetaVsPt -> Fill( fabs(trkpt) , Err_theta, hweight); - m_errThetaVsP -> Fill( fabs(trkP) , Err_theta, hweight); + m_errThetaVsPt -> Fill( std::fabs(trkpt) , Err_theta, hweight); + m_errThetaVsP -> Fill( std::fabs(trkP) , Err_theta, hweight); m_errThetaVsPhi -> Fill( trkphi , Err_theta, hweight); m_errThetaVsEta -> Fill( trketa , Err_theta, hweight); m_errD0 -> Fill( Err_d0 , hweight); m_errD0VsD0BS -> Fill( d0bscorr , Err_d0 , hweight); - m_errD0VsPt -> Fill( fabs(trkpt) , Err_d0 , hweight); - m_errD0VsP -> Fill( fabs(trkP) , Err_d0 , hweight); + m_errD0VsPt -> Fill( std::fabs(trkpt) , Err_d0 , hweight); + m_errD0VsP -> Fill( std::fabs(trkP) , Err_d0 , hweight); m_errD0VsPhi -> Fill( trkphi , Err_d0 , hweight); m_errD0VsEta -> Fill( trketa , Err_d0 , hweight); m_errPhi0 -> Fill( Err_phi , hweight); m_errPhi0VsD0BS -> Fill( d0bscorr , Err_phi , hweight); - m_errPhi0VsPt -> Fill( fabs(trkpt) , Err_phi , hweight); - m_errPhi0VsP -> Fill( fabs(trkP) , Err_phi , hweight); + m_errPhi0VsPt -> Fill( std::fabs(trkpt) , Err_phi , hweight); + m_errPhi0VsP -> Fill( std::fabs(trkP) , Err_phi , hweight); m_errPhi0VsPhi0 -> Fill( trkphi , Err_phi , hweight); m_errPhi0VsEta -> Fill( trketa , Err_phi , hweight); m_errZ0 -> Fill( Err_z0 , hweight); //m_errZ0VsD0BS -> Fill( d0bscorr , Err_z0 , hweight); - m_errZ0VsPt -> Fill( fabs(trkpt) , Err_z0 , hweight); - m_errZ0VsP -> Fill( fabs(trkP) , Err_z0 , hweight); + m_errZ0VsPt -> Fill( std::fabs(trkpt) , Err_z0 , hweight); + m_errZ0VsP -> Fill( std::fabs(trkP) , Err_z0 , hweight); m_errZ0VsPhi0 -> Fill( trkphi , Err_z0 , hweight); m_errZ0VsEta -> Fill( trketa , Err_z0 , hweight); m_errPt -> Fill( Err_Pt , hweight); m_errPtVsD0BS -> Fill( d0bscorr , Err_Pt , hweight); m_errPtVsPt -> Fill( trkpt , Err_Pt , hweight); - m_errPtVsP -> Fill( fabs(trkP) , Err_Pt , hweight); + m_errPtVsP -> Fill( std::fabs(trkP) , Err_Pt , hweight); m_errPt_Pt2 -> Fill( Err_Pt/(trkpt*trkpt) , hweight); m_errPt_Pt2VsPt -> Fill( trkpt , Err_Pt/(trkpt*trkpt), hweight); m_errPt_Pt2VsEta -> Fill( trketa, Err_Pt/(trkpt*trkpt), hweight); @@ -2356,7 +2353,7 @@ StatusCode IDAlignMonGenericTracks::fillHistograms() } if(trkpt > ptlast){ - z_E[0] = fabs(trkpt / sin(trktheta)); + z_E[0] = std::fabs(trkpt / sin(trktheta)); z_pz[0] = trkpt / tan(trktheta); z_px[0] = trkpt * sin(trkphi); z_py[0] = trkpt * cos(trkphi); @@ -2369,7 +2366,8 @@ StatusCode IDAlignMonGenericTracks::fillHistograms() // - + delete myIPandSigma; + myIPandSigma=nullptr; } // end of loop on trks if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Number of good tracks from TrackCollection: "<< ngTracks<< endmsg; @@ -2412,7 +2410,7 @@ StatusCode IDAlignMonGenericTracks::fillHistograms() else charge = 1; } if(trkpt > ptlast && trkpt < ptfirst && chargefirst*charge < 0 && trkpt > 20){ - z_E[1] = fabs(trkpt / sin(trktheta)); + z_E[1] = std::fabs(trkpt / sin(trktheta)); z_pz[1] = trkpt / tan(trktheta); z_px[1] = trkpt * sin(trkphi); z_py[1] = trkpt * cos(trkphi); @@ -2425,12 +2423,11 @@ StatusCode IDAlignMonGenericTracks::fillHistograms() if(z_true){ // build invariant mass of two highest pT tracks - // M = sqrt(E1*E2 - px1*px2 - py1*py2 - pz1*pz2); float M = (z_E[0]+z_E[1])*(z_E[0]+z_E[1]) - (z_px[0]+z_px[1])*(z_px[0]+z_px[1]) - (z_py[0]+z_py[1])*(z_py[0]+z_py[1]) - (z_pz[0]+z_pz[1])*(z_pz[0]+z_pz[1]); if( M <= 0 ) M =0; else - M = sqrt(M); + M = std::sqrt(M); m_Zmumu -> Fill(M, hweight); @@ -2443,15 +2440,15 @@ StatusCode IDAlignMonGenericTracks::fillHistograms() m_ZpT_n -> Fill(-z_pT[0], hweight); } - if(fabs(z_eta[0]) < m_barrelEta && fabs(z_eta[1]) < m_barrelEta) m_Zmumu_barrel-> Fill(M, hweight); + if(std::fabs(z_eta[0]) < m_barrelEta && std::fabs(z_eta[1]) < m_barrelEta) m_Zmumu_barrel-> Fill(M, hweight); if(z_eta[0] >= m_barrelEta && z_eta[1] >= m_barrelEta) m_Zmumu_eca -> Fill(M, hweight); if(z_eta[0] <= -m_barrelEta && z_eta[1] <= -m_barrelEta) m_Zmumu_ecc -> Fill(M, hweight); - if((fabs(z_eta[0]) < m_barrelEta && z_eta[1] >= m_barrelEta) || - (z_eta[0] >= m_barrelEta && fabs(z_eta[1]) < m_barrelEta)) m_Zmumu_barrel_eca -> Fill(M, hweight); + if((std::fabs(z_eta[0]) < m_barrelEta && z_eta[1] >= m_barrelEta) || + (z_eta[0] >= m_barrelEta && std::fabs(z_eta[1]) < m_barrelEta)) m_Zmumu_barrel_eca -> Fill(M, hweight); - if((fabs(z_eta[0]) < m_barrelEta && z_eta[1] <= -m_barrelEta) || - (z_eta[0] <= -m_barrelEta && fabs(z_eta[1]) < m_barrelEta)) m_Zmumu_barrel_ecc -> Fill(M, hweight); + if((std::fabs(z_eta[0]) < m_barrelEta && z_eta[1] <= -m_barrelEta) || + (z_eta[0] <= -m_barrelEta && std::fabs(z_eta[1]) < m_barrelEta)) m_Zmumu_barrel_ecc -> Fill(M, hweight); } diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.cxx b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.cxx index b95083612d5f..d61087d7d832 100755 --- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.cxx +++ b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.cxx @@ -196,7 +196,6 @@ IDAlignMonResiduals::IDAlignMonResiduals( const std::string & type, const std::s m_trtcaldbSvc("TRT_CalDbSvc",name), m_hWeightInFile(0), m_etapTWeight(0) - { m_iUpdator = ToolHandle<Trk::IUpdator>("Trk::KalmanUpdator"); m_propagator = ToolHandle<Trk::IPropagator>("Trk::RungeKuttaPropagator"); @@ -206,6 +205,7 @@ IDAlignMonResiduals::IDAlignMonResiduals( const std::string & type, const std::s m_hitQualityTool = ToolHandle<IInDetAlignHitQualSelTool>(""); m_trt_b_hist = new TRTBarrelHistograms(); m_trt_ec_hist = new TRTEndcapHistograms(); + m_tracksName = "ExtendedTracks"; m_triggerChainName = "NoTriggerSelection"; m_z_fix = 366.5; // IBL Stave fixing screw position [mm] diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.h b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.h index 53fa1f9553b1..36ee79e555dc 100755 --- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.h +++ b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.h @@ -142,12 +142,12 @@ class IDAlignMonResiduals : public ManagedMonitorToolBase void SetMinWindow(TProfile* hProf, float min, float max); void SetMinWindow(TH1* h1, float min, float max); - std::string m_stream; - std::string m_tracksName; - std::string m_triggerChainName; - std::string m_Pixel_Manager; - std::string m_SCT_Manager; - std::string m_TRT_Manager; + std::string m_stream{}; + std::string m_tracksName{}; + std::string m_triggerChainName{}; + std::string m_Pixel_Manager{}; + std::string m_SCT_Manager{}; + std::string m_TRT_Manager{}; //Layer/Disk/Ring Gap for modified module histograms int m_gap_pix; @@ -200,19 +200,18 @@ class IDAlignMonResiduals : public ManagedMonitorToolBase float m_maxPtEC; // threshold for low-pt EC distributions //tools - const AtlasDetectorID* m_idHelper; - const InDetDD::PixelDetectorManager* m_PIX_Mgr; - const InDetDD::SCT_DetectorManager* m_SCT_Mgr; - const PixelID* m_pixelID; - const SCT_ID* m_sctID; - const TRT_ID* m_trtID; + const AtlasDetectorID* m_idHelper{}; + const InDetDD::PixelDetectorManager* m_PIX_Mgr{}; + const InDetDD::SCT_DetectorManager* m_SCT_Mgr{}; + const PixelID* m_pixelID{}; + const SCT_ID* m_sctID{}; + const TRT_ID* m_trtID{}; ToolHandle<Trk::IUpdator> m_iUpdator; ToolHandle<Trk::IPropagator> m_propagator; ToolHandle<InDetAlignMon::TrackSelectionTool> m_trackSelection; ToolHandle<Trk::IResidualPullCalculator> m_residualPullCalculator; //!< The residual and pull calculator tool handle ToolHandle<IInDetAlignHitQualSelTool> m_hitQualityTool; - //ToolHandle<InDet::IInDetTrackSelectionTool> m_idtrackSelection; //histograms @@ -421,7 +420,7 @@ class IDAlignMonResiduals : public ManagedMonitorToolBase - TH1F* m_mu_perEvent; + TH1F* m_mu_perEvent{}; float m_mu; bool m_hasBeenCalledThisEvent; int m_nBinsMuRange; @@ -433,45 +432,45 @@ class IDAlignMonResiduals : public ManagedMonitorToolBase int m_nIBLHitsPerLB; - int m_lumiblock; - - TProfile2D* m_pix_b0_resXvsetaLumiBlock; - TProfile2D* m_pix_b0_resXvsetaLumiBlock_planars; - - TH3F* m_pix_b0_resXvsetaLumiBlock_3d; - TH3F* m_pix_b0_resXvsetaLumiBlock_planars_3d; - TH3F* m_pix_b0_resXvsetaLumiBlock_stave0; - TH3F* m_pix_b0_resXvsetaLumiBlock_stave1; - TH3F* m_pix_b0_resXvsetaLumiBlock_stave2; - TH3F* m_pix_b0_resXvsetaLumiBlock_stave3; - TH3F* m_pix_b0_resXvsetaLumiBlock_stave4; - TH3F* m_pix_b0_resXvsetaLumiBlock_stave5; - TH3F* m_pix_b0_resXvsetaLumiBlock_stave6; - TH3F* m_pix_b0_resXvsetaLumiBlock_stave7; - TH3F* m_pix_b0_resXvsetaLumiBlock_stave8; - TH3F* m_pix_b0_resXvsetaLumiBlock_stave9; - TH3F* m_pix_b0_resXvsetaLumiBlock_stave10; - TH3F* m_pix_b0_resXvsetaLumiBlock_stave11; - TH3F* m_pix_b0_resXvsetaLumiBlock_stave12; - TH3F* m_pix_b0_resXvsetaLumiBlock_stave13; + int m_lumiblock{}; + + TProfile2D* m_pix_b0_resXvsetaLumiBlock{}; + TProfile2D* m_pix_b0_resXvsetaLumiBlock_planars{}; + + TH3F* m_pix_b0_resXvsetaLumiBlock_3d{}; + TH3F* m_pix_b0_resXvsetaLumiBlock_planars_3d{}; + TH3F* m_pix_b0_resXvsetaLumiBlock_stave0{}; + TH3F* m_pix_b0_resXvsetaLumiBlock_stave1{}; + TH3F* m_pix_b0_resXvsetaLumiBlock_stave2{}; + TH3F* m_pix_b0_resXvsetaLumiBlock_stave3{}; + TH3F* m_pix_b0_resXvsetaLumiBlock_stave4{}; + TH3F* m_pix_b0_resXvsetaLumiBlock_stave5{}; + TH3F* m_pix_b0_resXvsetaLumiBlock_stave6{}; + TH3F* m_pix_b0_resXvsetaLumiBlock_stave7{}; + TH3F* m_pix_b0_resXvsetaLumiBlock_stave8{}; + TH3F* m_pix_b0_resXvsetaLumiBlock_stave9{}; + TH3F* m_pix_b0_resXvsetaLumiBlock_stave10{}; + TH3F* m_pix_b0_resXvsetaLumiBlock_stave11{}; + TH3F* m_pix_b0_resXvsetaLumiBlock_stave12{}; + TH3F* m_pix_b0_resXvsetaLumiBlock_stave13{}; //IBL fit magnitude and baseline as a function of LumiBlock - TH1F* m_mag_vs_LB; - TH1F* m_base_vs_LB; + TH1F* m_mag_vs_LB{}; + TH1F* m_base_vs_LB{}; - TH1F* m_mag_vs_LB_planars; - TH1F* m_base_vs_LB_planars; + TH1F* m_mag_vs_LB_planars{}; + TH1F* m_base_vs_LB_planars{}; // SCT - TH2F* m_sct_b_pullx_pt; + TH2F* m_sct_b_pullx_pt{}; std::vector<TH2F*> m_sct_b_pullsx_pt; - TH2F* m_sct_eca_pullx_pt; - TH2F* m_sct_ecc_pullx_pt; + TH2F* m_sct_eca_pullx_pt{}; + TH2F* m_sct_ecc_pullx_pt{}; std::vector<TH2F*> m_sct_eca_pullsx_pt; @@ -487,59 +486,59 @@ class IDAlignMonResiduals : public ManagedMonitorToolBase std::vector<TH2F*> m_sct_eca_residualsx_qoverp2; std::vector<TH2F*> m_sct_ecc_residualsx_qoverp2; - TH3F* m_sct_b0_xresvsmodetaphi_3d; - TH3F* m_sct_b1_xresvsmodetaphi_3d; - TH3F* m_sct_b2_xresvsmodetaphi_3d; - TH3F* m_sct_b3_xresvsmodetaphi_3d; - - TH1F* m_si_residualx; - TH1F* m_si_b_residualx; - - TH1F* m_si_barrel_resX_mean; - TH1F* m_si_eca_resX_mean; - TH1F* m_si_ecc_resX_mean; - TH1F* m_si_barrel_resY_mean; - TH1F* m_si_eca_resY_mean; - TH1F* m_si_ecc_resY_mean; - - TProfile* m_si_barrel_resX_mean_profile; - TProfile* m_si_barrel_resY_mean_profile; - - - TH1F* m_si_barrel_resX_rms; - TH1F* m_si_eca_resX_rms; - TH1F* m_si_ecc_resX_rms; - TH1F* m_si_barrel_resY_rms; - TH1F* m_si_eca_resY_rms; - TH1F* m_si_ecc_resY_rms; - - TH2F* m_si_barrel_pullX; - TH2F* m_si_eca_pullX; - TH2F* m_si_ecc_pullX; - TH2F* m_si_barrel_pullY; - TH2F* m_si_eca_pullY; - TH2F* m_si_ecc_pullY; - - TH2F* m_si_barrel_resX; - TH2F* m_si_eca_resX; - TH2F* m_si_ecc_resX; - TH2F* m_si_barrel_resY; - TH2F* m_si_eca_resY; - TH2F* m_si_ecc_resY; - - TH1F* m_si_barrel_pullX_width; - TH1F* m_si_eca_pullX_width; - TH1F* m_si_ecc_pullX_width; - TH1F* m_si_barrel_pullY_width; - TH1F* m_si_eca_pullY_width; - TH1F* m_si_ecc_pullY_width; - - TH1F* m_si_barrel_pullX_mean; - TH1F* m_si_eca_pullX_mean; - TH1F* m_si_ecc_pullX_mean; - TH1F* m_si_barrel_pullY_mean; - TH1F* m_si_eca_pullY_mean; - TH1F* m_si_ecc_pullY_mean; + TH3F* m_sct_b0_xresvsmodetaphi_3d{}; + TH3F* m_sct_b1_xresvsmodetaphi_3d{}; + TH3F* m_sct_b2_xresvsmodetaphi_3d{}; + TH3F* m_sct_b3_xresvsmodetaphi_3d{}; + + TH1F* m_si_residualx{}; + TH1F* m_si_b_residualx{}; + + TH1F* m_si_barrel_resX_mean{}; + TH1F* m_si_eca_resX_mean{}; + TH1F* m_si_ecc_resX_mean{}; + TH1F* m_si_barrel_resY_mean{}; + TH1F* m_si_eca_resY_mean{}; + TH1F* m_si_ecc_resY_mean{}; + + TProfile* m_si_barrel_resX_mean_profile{}; + TProfile* m_si_barrel_resY_mean_profile{}; + + + TH1F* m_si_barrel_resX_rms{}; + TH1F* m_si_eca_resX_rms{}; + TH1F* m_si_ecc_resX_rms{}; + TH1F* m_si_barrel_resY_rms{}; + TH1F* m_si_eca_resY_rms{}; + TH1F* m_si_ecc_resY_rms{}; + + TH2F* m_si_barrel_pullX{}; + TH2F* m_si_eca_pullX{}; + TH2F* m_si_ecc_pullX{}; + TH2F* m_si_barrel_pullY{}; + TH2F* m_si_eca_pullY{}; + TH2F* m_si_ecc_pullY{}; + + TH2F* m_si_barrel_resX{}; + TH2F* m_si_eca_resX{}; + TH2F* m_si_ecc_resX{}; + TH2F* m_si_barrel_resY{}; + TH2F* m_si_eca_resY{}; + TH2F* m_si_ecc_resY{}; + + TH1F* m_si_barrel_pullX_width{}; + TH1F* m_si_eca_pullX_width{}; + TH1F* m_si_ecc_pullX_width{}; + TH1F* m_si_barrel_pullY_width{}; + TH1F* m_si_eca_pullY_width{}; + TH1F* m_si_ecc_pullY_width{}; + + TH1F* m_si_barrel_pullX_mean{}; + TH1F* m_si_eca_pullX_mean{}; + TH1F* m_si_ecc_pullX_mean{}; + TH1F* m_si_barrel_pullY_mean{}; + TH1F* m_si_eca_pullY_mean{}; + TH1F* m_si_ecc_pullY_mean{}; //Pixel Histograms @@ -588,63 +587,63 @@ class IDAlignMonResiduals : public ManagedMonitorToolBase //Pixel Histograms - TH1F* m_pix_b_residualx; - TH1F* m_pix_b_residualy; - TH1F* m_pix_b_residualx_fine; - TH1F* m_pix_b_residualy_fine; - TH1F* m_pix_b_biased_residualx; - TH1F* m_pix_b_biased_residualy; - TH1F* m_pix_eca_residualx; - TH1F* m_pix_eca_residualy; - TH1F* m_pix_ecc_residualx; - TH1F* m_pix_ecc_residualy; - TH1F* m_pix_eca_residualx_fine; - TH1F* m_pix_eca_residualy_fine; - TH1F* m_pix_ecc_residualx_fine; - TH1F* m_pix_ecc_residualy_fine; + TH1F* m_pix_b_residualx{}; + TH1F* m_pix_b_residualy{}; + TH1F* m_pix_b_residualx_fine{}; + TH1F* m_pix_b_residualy_fine{}; + TH1F* m_pix_b_biased_residualx{}; + TH1F* m_pix_b_biased_residualy{}; + TH1F* m_pix_eca_residualx{}; + TH1F* m_pix_eca_residualy{}; + TH1F* m_pix_ecc_residualx{}; + TH1F* m_pix_ecc_residualy{}; + TH1F* m_pix_eca_residualx_fine{}; + TH1F* m_pix_eca_residualy_fine{}; + TH1F* m_pix_ecc_residualx_fine{}; + TH1F* m_pix_ecc_residualy_fine{}; - TH1F* m_pix_eca_pullx; - TH1F* m_pix_eca_pully; - TH1F* m_pix_ecc_pullx; - TH1F* m_pix_ecc_pully; + TH1F* m_pix_eca_pullx{}; + TH1F* m_pix_eca_pully{}; + TH1F* m_pix_ecc_pullx{}; + TH1F* m_pix_ecc_pully{}; - TProfile* m_pix_bec_Oxresx_mean; - TProfile* m_pix_bec_Oyresx_mean; - TProfile* m_pix_bec_Oxresy_mean; - TProfile* m_pix_bec_Oyresy_mean; - TProfile* m_pix_bec_Oxresx_rms; - TProfile* m_pix_bec_Oyresx_rms; - TProfile* m_pix_bec_Oxresy_rms; - TProfile* m_pix_bec_Oyresy_rms; + TProfile* m_pix_bec_Oxresx_mean{}; + TProfile* m_pix_bec_Oyresx_mean{}; + TProfile* m_pix_bec_Oxresy_mean{}; + TProfile* m_pix_bec_Oyresy_mean{}; + TProfile* m_pix_bec_Oxresx_rms{}; + TProfile* m_pix_bec_Oyresx_rms{}; + TProfile* m_pix_bec_Oxresy_rms{}; + TProfile* m_pix_bec_Oyresy_rms{}; - TH1F* m_pix_b_xresvsmodeta; - TH1F* m_pix_b_xresvsmodphi; - TH1F* m_pix_b_yresvsmodeta; - TH1F* m_pix_b_yresvsmodphi; - TH1F* m_pix_eca_xresvsmodphi; - TH1F* m_pix_ecc_xresvsmodphi; - TH1F* m_pix_eca_yresvsmodphi; - TH1F* m_pix_ecc_yresvsmodphi; + TH1F* m_pix_b_xresvsmodeta{}; + TH1F* m_pix_b_xresvsmodphi{}; + TH1F* m_pix_b_yresvsmodeta{}; + TH1F* m_pix_b_yresvsmodphi{}; + TH1F* m_pix_eca_xresvsmodphi{}; + TH1F* m_pix_ecc_xresvsmodphi{}; + TH1F* m_pix_eca_yresvsmodphi{}; + TH1F* m_pix_ecc_yresvsmodphi{}; - TH2F* m_pix_b_biased_residualx_pt; - TH2F* m_pix_b_biased_residualy_pt ; - TH1F* m_pix_eca_biased_residualx ; - TH1F* m_pix_eca_biased_residualy ; - TH2F* m_pix_eca_biased_residualx_pt; - TH2F* m_pix_eca_biased_residualy_pt; - TH1F* m_pix_ecc_biased_residualx ; - TH1F* m_pix_ecc_biased_residualy ; - TH2F* m_pix_ecc_biased_residualx_pt; - TH2F* m_pix_ecc_biased_residualy_pt; + TH2F* m_pix_b_biased_residualx_pt{}; + TH2F* m_pix_b_biased_residualy_pt{} ; + TH1F* m_pix_eca_biased_residualx{} ; + TH1F* m_pix_eca_biased_residualy{} ; + TH2F* m_pix_eca_biased_residualx_pt{}; + TH2F* m_pix_eca_biased_residualy_pt{}; + TH1F* m_pix_ecc_biased_residualx{} ; + TH1F* m_pix_ecc_biased_residualy{} ; + TH2F* m_pix_ecc_biased_residualx_pt{}; + TH2F* m_pix_ecc_biased_residualy_pt{}; @@ -660,28 +659,28 @@ class IDAlignMonResiduals : public ManagedMonitorToolBase - TH2F* m_pix_eca_xresvsmodphi_2d; - TH2F* m_pix_ecc_xresvsmodphi_2d; - TH2F* m_pix_eca_yresvsmodphi_2d; - TH2F* m_pix_ecc_yresvsmodphi_2d; + TH2F* m_pix_eca_xresvsmodphi_2d{}; + TH2F* m_pix_ecc_xresvsmodphi_2d{}; + TH2F* m_pix_eca_yresvsmodphi_2d{}; + TH2F* m_pix_ecc_yresvsmodphi_2d{}; - TProfile* m_pix_b_Oxresxvsmodeta; - TProfile* m_pix_b_Oxresxvsmodphi; - TProfile* m_pix_b_Oyresyvsmodeta; - TProfile* m_pix_b_Oyresyvsmodphi; - TProfile* m_pix_eca_Oxresxvsmodphi; - TProfile* m_pix_ecc_Oxresxvsmodphi; - TProfile* m_pix_eca_Oyresyvsmodphi; - TProfile* m_pix_ecc_Oyresyvsmodphi; + TProfile* m_pix_b_Oxresxvsmodeta{}; + TProfile* m_pix_b_Oxresxvsmodphi{}; + TProfile* m_pix_b_Oyresyvsmodeta{}; + TProfile* m_pix_b_Oyresyvsmodphi{}; + TProfile* m_pix_eca_Oxresxvsmodphi{}; + TProfile* m_pix_ecc_Oxresxvsmodphi{}; + TProfile* m_pix_eca_Oyresyvsmodphi{}; + TProfile* m_pix_ecc_Oyresyvsmodphi{}; std::vector<TProfile*> m_pix_eca_unbiased_xresvsmodphi_disks; std::vector<TProfile*> m_pix_eca_unbiased_yresvsmodphi_disks; std::vector<TProfile*> m_pix_ecc_unbiased_xresvsmodphi_disks; std::vector<TProfile*> m_pix_ecc_unbiased_yresvsmodphi_disks; - TProfile* m_pix_eca_unbiased_xresvsmodphi; - TProfile* m_pix_eca_unbiased_yresvsmodphi; - TProfile* m_pix_ecc_unbiased_xresvsmodphi; - TProfile* m_pix_ecc_unbiased_yresvsmodphi; + TProfile* m_pix_eca_unbiased_xresvsmodphi{}; + TProfile* m_pix_eca_unbiased_yresvsmodphi{}; + TProfile* m_pix_ecc_unbiased_xresvsmodphi{}; + TProfile* m_pix_ecc_unbiased_yresvsmodphi{}; std::vector<TH1F*> m_pix_b_biasedresidualsx; std::vector<TH1F*> m_pix_b_biasedresidualsy; @@ -719,39 +718,39 @@ class IDAlignMonResiduals : public ManagedMonitorToolBase std::vector<TH2F*> m_pix_ecc_biased_yresvsmodphi_2ds; //SCT histograms - TH1F* m_sct_b_residualx; - TH1F* m_sct_b_residualx_fine; - TH1F* m_sct_b_biasedresidualx; - TH1F* m_sct_eca_residualx; - TH1F* m_sct_ecc_residualx; - TH1F* m_sct_eca_residualx_fine; - TH1F* m_sct_ecc_residualx_fine; + TH1F* m_sct_b_residualx{}; + TH1F* m_sct_b_residualx_fine{}; + TH1F* m_sct_b_biasedresidualx{}; + TH1F* m_sct_eca_residualx{}; + TH1F* m_sct_ecc_residualx{}; + TH1F* m_sct_eca_residualx_fine{}; + TH1F* m_sct_ecc_residualx_fine{}; - TH1F* m_sct_eca_pullx; - TH1F* m_sct_ecc_pullx; + TH1F* m_sct_eca_pullx{}; + TH1F* m_sct_ecc_pullx{}; - TProfile* m_sct_bec_Oxresx_mean; - TProfile* m_sct_bec_Oyresx_mean; - TProfile* m_sct_bec_Oxresx_rms; - TProfile* m_sct_bec_Oyresx_rms; + TProfile* m_sct_bec_Oxresx_mean{}; + TProfile* m_sct_bec_Oyresx_mean{}; + TProfile* m_sct_bec_Oxresx_rms{}; + TProfile* m_sct_bec_Oyresx_rms{}; - TH2F* m_sct_eca_xresvsmodphi_2d; - TH2F* m_sct_ecc_xresvsmodphi_2d; + TH2F* m_sct_eca_xresvsmodphi_2d{}; + TH2F* m_sct_ecc_xresvsmodphi_2d{}; - TH1F* m_sct_b_xresvsmodeta; - TH1F* m_sct_b_xresvsmodphi; - TH1F* m_sct_eca_xresvsmodphi; - TH1F* m_sct_ecc_xresvsmodphi; + TH1F* m_sct_b_xresvsmodeta{}; + TH1F* m_sct_b_xresvsmodphi{}; + TH1F* m_sct_eca_xresvsmodphi{}; + TH1F* m_sct_ecc_xresvsmodphi{}; - TProfile* m_sct_b_Oxresxvsmodeta; - TProfile* m_sct_b_Oxresxvsmodphi; - TProfile* m_sct_b_Oyresxvsmodeta; - TProfile* m_sct_b_Oyresxvsmodphi; - TProfile* m_sct_eca_Oxresxvsmodphi; - TProfile* m_sct_ecc_Oxresxvsmodphi; + TProfile* m_sct_b_Oxresxvsmodeta{}; + TProfile* m_sct_b_Oxresxvsmodphi{}; + TProfile* m_sct_b_Oyresxvsmodeta{}; + TProfile* m_sct_b_Oyresxvsmodphi{}; + TProfile* m_sct_eca_Oxresxvsmodphi{}; + TProfile* m_sct_ecc_Oxresxvsmodphi{}; @@ -760,105 +759,105 @@ class IDAlignMonResiduals : public ManagedMonitorToolBase // Pixel unbiased residuals vs pt - TH2F* m_pix_b_residualx_pt; - TH2F* m_pix_b_residualy_pt; - TH2F* m_pix_eca_residualx_pt; - TH2F* m_pix_eca_residualy_pt; - TH2F* m_pix_ecc_residualx_pt; - TH2F* m_pix_ecc_residualy_pt; + TH2F* m_pix_b_residualx_pt{}; + TH2F* m_pix_b_residualy_pt{}; + TH2F* m_pix_eca_residualx_pt{}; + TH2F* m_pix_eca_residualy_pt{}; + TH2F* m_pix_ecc_residualx_pt{}; + TH2F* m_pix_ecc_residualy_pt{}; - TH1F* m_sct_b_biased_residualx; + TH1F* m_sct_b_biased_residualx{}; - TH2F* m_sct_b_biased_residualx_pt; + TH2F* m_sct_b_biased_residualx_pt{}; - TH2F* m_sct_b_residualx_pt; + TH2F* m_sct_b_residualx_pt{}; - TH2F* m_sct_b_biased_residualx_qoverp2; + TH2F* m_sct_b_biased_residualx_qoverp2{}; - TH2F* m_sct_b_unbiased_residualx_qoverp2; + TH2F* m_sct_b_unbiased_residualx_qoverp2{}; - TH1F* m_sct_eca_biased_residualx; - TH1F* m_sct_eca_biased_residualy; - TH1F* m_sct_ecc_biased_residualx; - TH1F* m_sct_ecc_biased_residualy; + TH1F* m_sct_eca_biased_residualx{}; + TH1F* m_sct_eca_biased_residualy{}; + TH1F* m_sct_ecc_biased_residualx{}; + TH1F* m_sct_ecc_biased_residualy{}; - TH2F* m_sct_eca_biased_residualx_pt; - TH2F* m_sct_ecc_biased_residualx_pt; + TH2F* m_sct_eca_biased_residualx_pt{}; + TH2F* m_sct_ecc_biased_residualx_pt{}; - TH2F* m_sct_eca_residualx_pt; - TH2F* m_sct_ecc_residualx_pt; + TH2F* m_sct_eca_residualx_pt{}; + TH2F* m_sct_ecc_residualx_pt{}; - TH2F* m_sct_eca_biased_residualx_qoverp2; - TH2F* m_sct_ecc_biased_residualx_qoverp2; + TH2F* m_sct_eca_biased_residualx_qoverp2{}; + TH2F* m_sct_ecc_biased_residualx_qoverp2{}; - TH2F* m_sct_eca_unbiased_residualx_qoverp2; - TH2F* m_sct_ecc_unbiased_residualx_qoverp2; + TH2F* m_sct_eca_unbiased_residualx_qoverp2{}; + TH2F* m_sct_ecc_unbiased_residualx_qoverp2{}; // Local positions (extrapolated) - TH1F* m_pix_b_extrapolated_localx; - TH1F* m_pix_b_extrapolated_localy; - TH1F* m_sct_b_extrapolated_st_localx; - TH1F* m_sct_b_extrapolated_st_localy; - TH1F* m_sct_b_extrapolated_nst_localx; - TH1F* m_sct_b_extrapolated_nst_localy; + TH1F* m_pix_b_extrapolated_localx{}; + TH1F* m_pix_b_extrapolated_localy{}; + TH1F* m_sct_b_extrapolated_st_localx{}; + TH1F* m_sct_b_extrapolated_st_localy{}; + TH1F* m_sct_b_extrapolated_nst_localx{}; + TH1F* m_sct_b_extrapolated_nst_localy{}; // Local positions (mesasured) - TH1F* m_pix_b_measured_localx; - TH1F* m_pix_b_measured_localy; - TH1F* m_sct_b_measured_st_localx; - TH1F* m_sct_b_measured_st_localy; - TH1F* m_sct_b_measured_nst_localx; - TH1F* m_sct_b_measured_nst_localy; + TH1F* m_pix_b_measured_localx{}; + TH1F* m_pix_b_measured_localy{}; + TH1F* m_sct_b_measured_st_localx{}; + TH1F* m_sct_b_measured_st_localy{}; + TH1F* m_sct_b_measured_nst_localx{}; + TH1F* m_sct_b_measured_nst_localy{}; // Hit errors - TH1F* m_hiterror_sct_b; - TH1F* m_hiterror_sct_ec; - TH1F* m_hiterror_sct_b_WideRange; - TH1F* m_hiterror_sct_ec_WideRange; + TH1F* m_hiterror_sct_b{}; + TH1F* m_hiterror_sct_ec{}; + TH1F* m_hiterror_sct_b_WideRange{}; + TH1F* m_hiterror_sct_ec_WideRange{}; - TH1F* m_hiterror_x_pix_b; - TH1F* m_hiterror_x_pix_ec; - TH1F* m_hiterror_y_pix_b; - TH1F* m_hiterror_y_pix_ec; + TH1F* m_hiterror_x_pix_b{}; + TH1F* m_hiterror_x_pix_ec{}; + TH1F* m_hiterror_y_pix_b{}; + TH1F* m_hiterror_y_pix_ec{}; - TH1F* m_hiterror_x_pix_b_WideRange; - TH1F* m_hiterror_x_pix_ec_WideRange; - TH1F* m_hiterror_y_pix_b_WideRange; - TH1F* m_hiterror_y_pix_ec_WideRange; + TH1F* m_hiterror_x_pix_b_WideRange{}; + TH1F* m_hiterror_x_pix_ec_WideRange{}; + TH1F* m_hiterror_y_pix_b_WideRange{}; + TH1F* m_hiterror_y_pix_ec_WideRange{}; - TH1F* m_hiterror_x_ibl_b; - TH1F* m_hiterror_x_ibl_ec; - TH1F* m_hiterror_y_ibl_b; - TH1F* m_hiterror_y_ibl_ec; + TH1F* m_hiterror_x_ibl_b{}; + TH1F* m_hiterror_x_ibl_ec{}; + TH1F* m_hiterror_y_ibl_b{}; + TH1F* m_hiterror_y_ibl_ec{}; - TH1F* m_hiterror_x_ibl_b_WideRange; - TH1F* m_hiterror_x_ibl_ec_WideRange; - TH1F* m_hiterror_y_ibl_b_WideRange; - TH1F* m_hiterror_y_ibl_ec_WideRange; + TH1F* m_hiterror_x_ibl_b_WideRange{}; + TH1F* m_hiterror_x_ibl_ec_WideRange{}; + TH1F* m_hiterror_y_ibl_b_WideRange{}; + TH1F* m_hiterror_y_ibl_ec_WideRange{}; // Pulls vs pt // Pixel - TH2F* m_pix_b_pullx_pt; - TH2F* m_pix_b_pully_pt; - TH2F* m_pix_eca_pullx_pt; - TH2F* m_pix_eca_pully_pt; - TH2F* m_pix_ecc_pullx_pt; - TH2F* m_pix_ecc_pully_pt; + TH2F* m_pix_b_pullx_pt{}; + TH2F* m_pix_b_pully_pt{}; + TH2F* m_pix_eca_pullx_pt{}; + TH2F* m_pix_eca_pully_pt{}; + TH2F* m_pix_ecc_pullx_pt{}; + TH2F* m_pix_ecc_pully_pt{}; @@ -869,26 +868,26 @@ class IDAlignMonResiduals : public ManagedMonitorToolBase /* Barrel //======================= */ struct TRTBarrelHistograms; - TRTBarrelHistograms* m_trt_b_hist; + TRTBarrelHistograms* m_trt_b_hist{}; /** TRT EndCap //======================= */ struct TRTEndcapHistograms; - TRTEndcapHistograms* m_trt_ec_hist; + TRTEndcapHistograms* m_trt_ec_hist{}; // Weight for histograms - bool m_applyHistWeight; - std::string m_hWeightInFileName; - TFile* m_hWeightInFile; - TH2F* m_etapTWeight; - std::string m_hWeightHistName; + bool m_applyHistWeight{}; + std::string m_hWeightInFileName{}; + TFile* m_hWeightInFile{}; + TH2F* m_etapTWeight{}; + std::string m_hWeightHistName{}; //I don't like an itialisation here. float m_z_axis[20] = {-322.8975, -301.7925, -280.6875,-259.5825,-228.2775,-186.7725,-145.2675,-103.7625,-62.2575,-20.7525,20.7525,62.2575,103.7625,145.2675,186.7725,228.2775,259.5825,280.6875,301.7925,322.8975}; - float m_z_fix; - int m_minIBLhits; - bool m_doIBLLBPlots; + float m_z_fix{}; + int m_minIBLhits{}; + bool m_doIBLLBPlots{}; }; #endif diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonTrackSegments.cxx b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonTrackSegments.cxx index e9ba58f8be48..82f2e6209f97 100644 --- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonTrackSegments.cxx +++ b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonTrackSegments.cxx @@ -18,7 +18,6 @@ #include "IDAlignMonTrackSegments.h" #include "TrkTrackSummary/TrackSummary.h" #include "TrkTrack/TrackCollection.h" -//#include "TrkToolInterfaces/ITrackSummaryTool.h" #include "InDetTrackSplitterTool/IInDetTrackSplitterTool.h" #include "TrackSelectionTool.h" #include <iostream> @@ -133,6 +132,7 @@ IDAlignMonTrackSegments::IDAlignMonTrackSegments( const std::string & type, cons declareProperty("trackSumTool", m_trackSumTool); m_histosBooked = 0; + m_events=0; } //--------------------------------------------------------------------------------------- @@ -607,26 +607,26 @@ StatusCode IDAlignMonTrackSegments::fillHistograms() if(!evtStore()->contains<TrackCollection>(m_upperTracksName)){ if(m_events == 1) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Unable to get " << m_upperTracksName << " TrackCollections" << endmsg; - }else if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Unable to get " << m_upperTracksName << " TrackCollections" << endmsg; + ATH_MSG_WARNING( "Unable to get " << m_upperTracksName << " TrackCollections" ); + }else ATH_MSG_DEBUG( "Unable to get " << m_upperTracksName << " TrackCollections" ); return StatusCode::SUCCESS; } if (!evtStore()->contains<TrackCollection>(m_lowerTracksName)){ if(m_events == 1) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Unable to get " << m_lowerTracksName << " TrackCollections" << endmsg; - }else if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Unable to get " << m_lowerTracksName << " TrackCollections" << endmsg; + ATH_MSG_WARNING( "Unable to get " << m_lowerTracksName << " TrackCollections" ); + }else ATH_MSG_DEBUG( "Unable to get " << m_lowerTracksName << " TrackCollections" ); return StatusCode::SUCCESS; } tracksUpper = m_trackSelectionUpper->selectTracks(m_upperTracksName); if (!tracksUpper) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "TrackCollection with name "<<m_upperTracksName<<" is NULL" << endmsg; + ATH_MSG_DEBUG( "TrackCollection with name "<<m_upperTracksName<<" is NULL" ); } tracksLower = m_trackSelectionLower->selectTracks(m_lowerTracksName); if (!tracksLower) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "TrackCollection with name "<<m_lowerTracksName<<" is NULL" << endmsg; + ATH_MSG_DEBUG( "TrackCollection with name "<<m_lowerTracksName<<" is NULL" ); } }else{ @@ -634,8 +634,8 @@ StatusCode IDAlignMonTrackSegments::fillHistograms() //We only need the inputTracks if we're splitting them ourselves if (!evtStore()->contains<TrackCollection>(m_inputTracksName)){ if(m_events == 1){ - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Unable to get " << m_inputTracksName << " TrackCollections" << endmsg; - }else if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Unable to get " << m_inputTracksName << " TrackCollections" << endmsg; + ATH_MSG_WARNING( "Unable to get " << m_inputTracksName << " TrackCollections" ); + }else ATH_MSG_DEBUG( "Unable to get " << m_inputTracksName << " TrackCollections"); return StatusCode::SUCCESS; } @@ -664,14 +664,14 @@ StatusCode IDAlignMonTrackSegments::fillHistograms() //Get the Upper Tracks tracksUpper = m_trackSelectionUpper->selectTracks(m_upperTracksName); if (!tracksUpper) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "TrackCollection with name "<<m_upperTracksName<<" is NULL" << endmsg; + ATH_MSG_INFO( "TrackCollection with name "<<m_upperTracksName<<" is NULL" ); } //Get the Lower Tracks tracksLower = m_trackSelectionLower->selectTracks(m_lowerTracksName); if (!tracksLower) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "TrackCollection with name "<<m_lowerTracksName<<" is NULL" << endmsg; + ATH_MSG_INFO( "TrackCollection with name "<<m_lowerTracksName<<" is NULL" ); } @@ -683,9 +683,13 @@ StatusCode IDAlignMonTrackSegments::fillHistograms() // << " lower track collection = "<< m_lowerTracksName << " size: " << tracksLower->size() // << std::endl; //} - - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Retrieved "<< tracksUpper->size() <<" Upper Tracks." << endmsg; - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Retrieved "<< tracksLower->size() <<" Lower Tracks from Track from StoreGate" << endmsg; + //at this point, tracksUpper and tracksLower must have sensible values + if ((not tracksUpper) or (not tracksLower)){ + ATH_MSG_ERROR("Upper or Lower tracks pointer is null, must terminate!"); + return StatusCode::FAILURE; + } + ATH_MSG_DEBUG( "Retrieved "<< tracksUpper->size() <<" Upper Tracks." ); + ATH_MSG_DEBUG( "Retrieved "<< tracksLower->size() <<" Lower Tracks from Track from StoreGate" ); //=============================================================== // Filling the upper and lower tracks and their differences diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonTruthComparison.cxx b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonTruthComparison.cxx index df33fee34d9a..63ee2b785ccd 100755 --- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonTruthComparison.cxx +++ b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonTruthComparison.cxx @@ -8,7 +8,7 @@ // ********************************************************************** #include <sstream> -#include <math.h> +#include <cmath> #include "TH1.h" #include "TH2.h" #include "TProfile.h" @@ -18,17 +18,8 @@ #include "GaudiKernel/IJobOptionsSvc.h" #include "GaudiKernel/MsgStream.h" -//#include "HepPDT/ParticleData.hh" #include "HepMC/GenParticle.h" -//#include "IdDictDetDescr/IdDictManager.h" -// #include "InDetIdentifier/PixelID.h" -// #include "InDetIdentifier/SCT_ID.h" -// #include "InDetIdentifier/TRT_ID.h" -// #include "InDetReadoutGeometry/PixelDetectorManager.h" -// #include "InDetReadoutGeometry/SCT_DetectorManager.h" -// #include "InDetReadoutGeometry/TRT_DetectorManager.h" - #include "TrkTrack/TrackCollection.h" #include "TrkTruthData/TrackTruth.h" #include "TrkTruthData/TrackTruthCollection.h" @@ -36,22 +27,11 @@ #include "InDetPrepRawData/SiCluster.h" -//#include "Particle/TrackParticleContainer.h" -//#include "Particle/TrackParticle.h" - #include "TrkEventPrimitives/FitQuality.h" #include "TrkEventPrimitives/LocalParameters.h" -// #include "VxVertex/VxContainer.h" -// #include "VxVertex/VxCandidate.h" -// #include "VxVertex/RecVertex.h" -// #include "VxVertex/Vertex.h" -// #include "VxVertex/VxTrackAtVertex.h" - -//#include "AthenaMonitoring/AthenaMonManager.h" #include "IDAlignMonTruthComparison.h" -//#include "TrkTruthToTrack/TruthToTrack.h" #include "TrkToolInterfaces/ITruthToTrack.h" #include "TrackSelectionTool.h" @@ -119,8 +99,6 @@ StatusCode IDAlignMonTruthComparison::bookHistograms() std::string outputDirName = "IDAlignMon/" + m_tracksName + "_NoTriggerSelection/TruthComparison"; MonGroup al_mon ( this, outputDirName, run ); - //if ( newLowStatFlag() ) { } - //if ( newLumiBlockFlag() ) { } if( newRunFlag() ) { // increase d0 and z0 range for cosmics @@ -457,9 +435,6 @@ StatusCode IDAlignMonTruthComparison::fillHistograms() if(genparptr->pdg_id() == 0){ msg(MSG::WARNING) <<" Particle with PDG ID = 0! Status "<<endmsg; - //msg(MSG::WARNING) <<" Particle with PDG ID = 0! Status "<<genparptr->status()<<" mass "<< genparptr->momentum().m() <<" pt "<<genparptr->momentum().et()<<" eta " - // <<genparptr->momentum().eta()<<" phi "<<genparptr->momentum().phi()<<" Gen Vertex barcode "<<genparptr->production_vertex()->barcode()<<"Gen Vertex Position x" - // <<genparptr->production_vertex()->position().x()<< " y "<<genparptr->production_vertex()->position().y()<<" z "<<genparptr->production_vertex()->position().z()<<endmsg; }else{ const Trk::TrackParameters* generatedTrackPerigee = m_truthToTrack->makePerigeeParameters(genparptr); diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonTruthComparison.h b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonTruthComparison.h index cfbc44c2fc47..943267007c10 100755 --- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonTruthComparison.h +++ b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonTruthComparison.h @@ -10,7 +10,6 @@ // AUTHORS: Beate Heinemann, Tobias Golling // ********************************************************************** -#include <vector> #include "GaudiKernel/StatusCode.h" #include "AthenaMonitoring/AthenaMonManager.h" @@ -49,101 +48,101 @@ public: protected: - TH1F* m_truthpT; - TH1F* m_truthphi; - TH1F* m_trutheta; - - TH1F* m_dqopt_barrel; - TH1F* m_deta_barrel; - TH1F* m_dphi_barrel; - TProfile* m_dphi_barrel_vs_phi; - TH1F* m_dz0_barrel; - TH1F* m_dd0_barrel; - - TH1F* m_dqopt_eca; - TH1F* m_deta_eca; - TH1F* m_dphi_eca; - TH1F* m_dz0_eca; - TH1F* m_dd0_eca; - - TH1F* m_dqopt_ecc; - TH1F* m_deta_ecc; - TH1F* m_dphi_ecc; - TH1F* m_dz0_ecc; - TH1F* m_dd0_ecc; - - TH2F* m_Deta_vs_eta; - TProfile* m_dphi_vs_eta; - TH1F* m_deta_vs_eta_1; - TH1F* m_deta_vs_eta_2; - TH1F* m_deta_vs_eta_chi2; - - TProfile* m_dpt_vs_truthpt_barrel; - TH2F* m_Dqopt_vs_pt_barrel; - TH1F* m_dqopt_vs_pt_barrel_1; - TH1F* m_dqopt_vs_pt_barrel_2; - TH1F* m_dqopt_vs_pt_barrel_chi2; - - TProfile* m_dpt_vs_truthpt_eca; - TH2F* m_Dqopt_vs_pt_eca; - TH1F* m_dqopt_vs_pt_eca_1; - TH1F* m_dqopt_vs_pt_eca_2; - TH1F* m_dqopt_vs_pt_eca_chi2; - - TProfile* m_dpt_vs_truthpt_ecc; - TH2F* m_Dqopt_vs_pt_ecc; - TH1F* m_dqopt_vs_pt_ecc_1; - TH1F* m_dqopt_vs_pt_ecc_2; - TH1F* m_dqopt_vs_pt_ecc_chi2; - - TH2F* m_Dqopt_vs_eta_highpt; - TH1F* m_dqopt_vs_eta_highpt_1; - TH1F* m_dqopt_vs_eta_highpt_2; - TH1F* m_dqopt_vs_eta_highpt_chi2; - - TH2F* m_Dqopt_vs_eta_lowpt; - TH1F* m_dqopt_vs_eta_lowpt_1; - TH1F* m_dqopt_vs_eta_lowpt_2; + TH1F* m_truthpT{}; + TH1F* m_truthphi{}; + TH1F* m_trutheta{}; + + TH1F* m_dqopt_barrel{}; + TH1F* m_deta_barrel{}; + TH1F* m_dphi_barrel{}; + TProfile* m_dphi_barrel_vs_phi{}; + TH1F* m_dz0_barrel{}; + TH1F* m_dd0_barrel{}; + + TH1F* m_dqopt_eca{}; + TH1F* m_deta_eca{}; + TH1F* m_dphi_eca{}; + TH1F* m_dz0_eca{}; + TH1F* m_dd0_eca{}; + + TH1F* m_dqopt_ecc{}; + TH1F* m_deta_ecc{}; + TH1F* m_dphi_ecc{}; + TH1F* m_dz0_ecc{}; + TH1F* m_dd0_ecc{}; + + TH2F* m_Deta_vs_eta{}; + TProfile* m_dphi_vs_eta{}; + TH1F* m_deta_vs_eta_1{}; + TH1F* m_deta_vs_eta_2{}; + TH1F* m_deta_vs_eta_chi2{}; + + TProfile* m_dpt_vs_truthpt_barrel{}; + TH2F* m_Dqopt_vs_pt_barrel{}; + TH1F* m_dqopt_vs_pt_barrel_1{}; + TH1F* m_dqopt_vs_pt_barrel_2{}; + TH1F* m_dqopt_vs_pt_barrel_chi2{}; + + TProfile* m_dpt_vs_truthpt_eca{}; + TH2F* m_Dqopt_vs_pt_eca{}; + TH1F* m_dqopt_vs_pt_eca_1{}; + TH1F* m_dqopt_vs_pt_eca_2{}; + TH1F* m_dqopt_vs_pt_eca_chi2{}; + + TProfile* m_dpt_vs_truthpt_ecc{}; + TH2F* m_Dqopt_vs_pt_ecc{}; + TH1F* m_dqopt_vs_pt_ecc_1{}; + TH1F* m_dqopt_vs_pt_ecc_2{}; + TH1F* m_dqopt_vs_pt_ecc_chi2{}; + + TH2F* m_Dqopt_vs_eta_highpt{}; + TH1F* m_dqopt_vs_eta_highpt_1{}; + TH1F* m_dqopt_vs_eta_highpt_2{}; + TH1F* m_dqopt_vs_eta_highpt_chi2{}; + + TH2F* m_Dqopt_vs_eta_lowpt{}; + TH1F* m_dqopt_vs_eta_lowpt_1{}; + TH1F* m_dqopt_vs_eta_lowpt_2{}; TH1F* m_dqopt_vs_eta_lowpt_chi2; - TH2F* m_Dqopt_vs_phi_highpt_barrel; - TH1F* m_dqopt_vs_phi_highpt_barrel_1; - TH1F* m_dqopt_vs_phi_highpt_barrel_2; - TH1F* m_dqopt_vs_phi_highpt_barrel_chi2; + TH2F* m_Dqopt_vs_phi_highpt_barrel{}; + TH1F* m_dqopt_vs_phi_highpt_barrel_1{}; + TH1F* m_dqopt_vs_phi_highpt_barrel_2{}; + TH1F* m_dqopt_vs_phi_highpt_barrel_chi2{}; TH2F* m_Dqopt_vs_phi_highpt_eca; TH1F* m_dqopt_vs_phi_highpt_eca_1; TH1F* m_dqopt_vs_phi_highpt_eca_2; TH1F* m_dqopt_vs_phi_highpt_eca_chi2; - TH2F* m_Dqopt_vs_phi_highpt_ecc; - TH1F* m_dqopt_vs_phi_highpt_ecc_1; - TH1F* m_dqopt_vs_phi_highpt_ecc_2; - TH1F* m_dqopt_vs_phi_highpt_ecc_chi2; - - TH2F* m_Dqopt_vs_phi_lowpt_barrel; - TH1F* m_dqopt_vs_phi_lowpt_barrel_1; - TH1F* m_dqopt_vs_phi_lowpt_barrel_2; - TH1F* m_dqopt_vs_phi_lowpt_barrel_chi2; - - TH2F* m_Dqopt_vs_phi_lowpt_eca; - TH1F* m_dqopt_vs_phi_lowpt_eca_1; - TH1F* m_dqopt_vs_phi_lowpt_eca_2; - TH1F* m_dqopt_vs_phi_lowpt_eca_chi2; - - TH2F* m_Dqopt_vs_phi_lowpt_ecc; - TH1F* m_dqopt_vs_phi_lowpt_ecc_1; - TH1F* m_dqopt_vs_phi_lowpt_ecc_2; - TH1F* m_dqopt_vs_phi_lowpt_ecc_chi2; - - TH1F* m_Zmumu; - TH1F* m_Zmumu_truth; - TH1F* m_dZmumu; - TH1F* m_dZmumu_barrel; - TH1F* m_dZmumu_barrel_eca; - TH1F* m_dZmumu_barrel_ecc; - TH1F* m_dZmumu_ecc; - TH1F* m_dZmumu_eca; + TH2F* m_Dqopt_vs_phi_highpt_ecc{}; + TH1F* m_dqopt_vs_phi_highpt_ecc_1{}; + TH1F* m_dqopt_vs_phi_highpt_ecc_2{}; + TH1F* m_dqopt_vs_phi_highpt_ecc_chi2{}; + + TH2F* m_Dqopt_vs_phi_lowpt_barrel{}; + TH1F* m_dqopt_vs_phi_lowpt_barrel_1{}; + TH1F* m_dqopt_vs_phi_lowpt_barrel_2{}; + TH1F* m_dqopt_vs_phi_lowpt_barrel_chi2{}; + + TH2F* m_Dqopt_vs_phi_lowpt_eca{}; + TH1F* m_dqopt_vs_phi_lowpt_eca_1{}; + TH1F* m_dqopt_vs_phi_lowpt_eca_2{}; + TH1F* m_dqopt_vs_phi_lowpt_eca_chi2{}; + + TH2F* m_Dqopt_vs_phi_lowpt_ecc{}; + TH1F* m_dqopt_vs_phi_lowpt_ecc_1{}; + TH1F* m_dqopt_vs_phi_lowpt_ecc_2{}; + TH1F* m_dqopt_vs_phi_lowpt_ecc_chi2{}; + + TH1F* m_Zmumu{}; + TH1F* m_Zmumu_truth{}; + TH1F* m_dZmumu{}; + TH1F* m_dZmumu_barrel{}; + TH1F* m_dZmumu_barrel_eca{}; + TH1F* m_dZmumu_barrel_ecc{}; + TH1F* m_dZmumu_ecc{}; + TH1F* m_dZmumu_eca{}; private: -- GitLab From bd7ba8cf2764f1119c3c936e4161196e57100f01 Mon Sep 17 00:00:00 2001 From: schaffer <R.D.Schaffer@cern.ch> Date: Wed, 20 Jun 2018 10:16:01 +0200 Subject: [PATCH 206/562] making new branch elid_add_readhandles and adding changes to use read handles for electron LH and isem tools Former-commit-id: 2dee0318f4bcb7cb0e4fbc5e256b17980ac5aad8 --- .../AsgElectronLikelihoodTool.h | 10 ++++- .../AsgForwardElectronIsEMSelector.h | 7 +++ .../Root/AsgElectronLikelihoodTool.cxx | 45 +++++++------------ .../Root/AsgForwardElectronIsEMSelector.cxx | 27 +++++------ 4 files changed, 43 insertions(+), 46 deletions(-) diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/AsgElectronLikelihoodTool.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/AsgElectronLikelihoodTool.h index 19348e040d35..8dff480ae658 100644 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/AsgElectronLikelihoodTool.h +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/AsgElectronLikelihoodTool.h @@ -13,6 +13,9 @@ #include "EgammaAnalysisInterfaces/IAsgElectronLikelihoodTool.h" #include "xAODEgamma/ElectronFwd.h" #include "PATCore/AcceptData.h" +#include "StoreGate/ReadHandleKey.h" +#include "xAODTracking/VertexContainer.h" +#include "xAODHIEvent/HIEventShapeContainer.h" namespace Root{ class TElectronLikelihoodTool; @@ -138,7 +141,12 @@ private: /// Flag for calo only LH bool m_caloOnly; - + /// read handle key to heavy ion container + SG::ReadHandleKey<xAOD::HIEventShapeContainer> m_HIESContKey; + + /// read handle key to primary vertex container + SG::ReadHandleKey<xAOD::VertexContainer> m_primVtxContKey; + }; // End: class definition diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/AsgForwardElectronIsEMSelector.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/AsgForwardElectronIsEMSelector.h index 8936ddd65398..71cceb0b7b22 100644 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/AsgForwardElectronIsEMSelector.h +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/ElectronPhotonSelectorTools/AsgForwardElectronIsEMSelector.h @@ -26,6 +26,9 @@ // Include the interfaces #include "EgammaAnalysisInterfaces/IAsgForwardElectronIsEMSelector.h" +#include "xAODTracking/VertexContainer.h" +#include "StoreGate/ReadHandleKey.h" + #include <string> namespace Root{ @@ -99,6 +102,7 @@ private: /** Pointer to the underlying ROOT based tool */ Root::TForwardElectronIsEMSelector* m_rootForwardTool; + /// Whether to use the PV (not available for trigger) bool m_usePVCont; // defualt nPV (when not using PVCont) @@ -107,6 +111,9 @@ private: // The primary vertex container name std::string m_primVtxContName; + /// read handle key to primary vertex container + SG::ReadHandleKey<xAOD::VertexContainer> m_primVtxContKey; + }; // End: class definition diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronLikelihoodTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronLikelihoodTool.cxx index 3aa416781311..6365e9a0e22a 100644 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronLikelihoodTool.cxx +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronLikelihoodTool.cxx @@ -28,9 +28,7 @@ //EDM includes #include "xAODEgamma/Electron.h" #include "xAODTracking/Vertex.h" -#include "xAODTracking/VertexContainer.h" #include "xAODCaloEvent/CaloCluster.h" -#include "xAODHIEvent/HIEventShapeContainer.h" #include "TEnv.h" #include "PathResolver/PathResolver.h" @@ -199,6 +197,10 @@ StatusCode AsgElectronLikelihoodTool::initialize() return StatusCode::FAILURE; } + // Setup primary vertex key handle + m_primVtxContKey = m_primVtxContName; + ATH_CHECK( m_primVtxContKey.initialize(m_usePVCont) ); + m_rootTool->m_variableNames = env.GetValue("VariableNames",""); m_rootTool->m_cutLikelihood = AsgConfigHelper::HelperDouble("CutLikelihood",env); m_rootTool->m_cutLikelihoodPileupCorrection = AsgConfigHelper::HelperDouble("CutLikelihoodPileupCorrection", env); @@ -250,6 +252,11 @@ StatusCode AsgElectronLikelihoodTool::initialize() m_rootTool->m_pileupMaxForPileupTransform = env.GetValue("PileupMaxForPileupTransform", 50); + // Setup HI container key handle (must come after init from env) + m_HIESContKey = m_CaloSumsContName; + bool doCentralityTransform = m_rootTool->m_doCentralityTransform; + ATH_CHECK( m_HIESContKey.initialize(doCentralityTransform) ); + } else{ //Error if it cant find the conf ATH_MSG_ERROR("Could not find configuration file"); return StatusCode::FAILURE; @@ -919,22 +926,11 @@ double AsgElectronLikelihoodTool::calculate(const xAOD::IParticle* part) const //============================================================================= unsigned int AsgElectronLikelihoodTool::getNPrimVertices() const { - static bool PVExists = true; unsigned int nVtx(0); - const xAOD::VertexContainer* vxContainer(0); - if(PVExists) - { - if ( StatusCode::SUCCESS != evtStore()->retrieve( vxContainer, m_primVtxContName ) ) - { - ATH_MSG_WARNING ( "Vertex container not found with name: " << m_primVtxContName ); - PVExists = false; // if retrieve failed, don't try to retrieve again - return nVtx; - } - for ( unsigned int i=0; i<vxContainer->size(); i++ ) - { - const xAOD::Vertex* vxcand = vxContainer->at(i); + SG::ReadHandle<xAOD::VertexContainer> vtxCont (m_primVtxContKey); + for ( unsigned int i = 0; i < vtxCont->size(); i++ ) { + const xAOD::Vertex* vxcand = vtxCont->at(i); if ( vxcand->nTrackParticles() >= 2 ) nVtx++; - } } return nVtx; } @@ -944,23 +940,14 @@ unsigned int AsgElectronLikelihoodTool::getNPrimVertices() const //============================================================================= double AsgElectronLikelihoodTool::getFcalEt() const { - static bool CaloSumsExists = true; double fcalEt(0.); - const xAOD::HIEventShapeContainer* HIESContainer(0); - if(CaloSumsExists){ - if ( StatusCode::SUCCESS != evtStore()->retrieve( HIESContainer, m_CaloSumsContName ) ) - { - ATH_MSG_WARNING ( "CaloSums container not found with name: " << m_CaloSumsContName ); - CaloSumsExists = false; // if retrieve failed, don't try to retrieve again - return fcalEt; - } - xAOD::HIEventShapeContainer::const_iterator es_itr = HIESContainer->begin(); - xAOD::HIEventShapeContainer::const_iterator es_end = HIESContainer->end(); - for (; es_itr != es_end; es_itr++){ + SG::ReadHandle<xAOD::HIEventShapeContainer> HIESCont (m_HIESContKey); + xAOD::HIEventShapeContainer::const_iterator es_itr = HIESCont->begin(); + xAOD::HIEventShapeContainer::const_iterator es_end = HIESCont->end(); + for (; es_itr != es_end; es_itr++){ double et = (*es_itr)->et(); const std::string name = (*es_itr)->auxdataConst<std::string>("Summary"); if (name == "FCal") fcalEt = et*1.e-6; - } } return fcalEt; } diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgForwardElectronIsEMSelector.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgForwardElectronIsEMSelector.cxx index 07f6cfb9a5bf..e48279fa02f2 100644 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgForwardElectronIsEMSelector.cxx +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgForwardElectronIsEMSelector.cxx @@ -21,6 +21,7 @@ #include "xAODEgamma/Electron.h" #include "xAODEgamma/Photon.h" #include "xAODCaloEvent/CaloCluster.h" +#include "xAODTracking/Vertex.h" #include "PathResolver/PathResolver.h" #include "TEnv.h" #include <cstdint> @@ -102,6 +103,11 @@ StatusCode AsgForwardElectronIsEMSelector::initialize() ATH_MSG_DEBUG("Configfile to use " << m_configFile ); TEnv env(filename.c_str()); + // Setup primary vertex key handle + m_primVtxContKey = m_primVtxContName; + ATH_CHECK( m_primVtxContKey.initialize(m_usePVCont) ); + + ///------- Read in the TEnv config ------/// //Override the mask via the config only if it is not set @@ -325,22 +331,11 @@ unsigned int AsgForwardElectronIsEMSelector::calocuts_electrons(const xAOD::Egam ////============================================================================= unsigned int AsgForwardElectronIsEMSelector::getNPrimVertices() const { - static bool PVExists = true; unsigned int nVtx(0); - const xAOD::VertexContainer* vxContainer(0); - if(PVExists) - { - if ( StatusCode::SUCCESS != evtStore()->retrieve( vxContainer, m_primVtxContName ) ) - { - ATH_MSG_WARNING ( "Vertex container not found with name: " << m_primVtxContName ); - PVExists = false; // if retrieve failed, don't try to retrieve again - return nVtx; - } - for ( unsigned int i=0; i<vxContainer->size(); i++ ) - { - const xAOD::Vertex* vxcand = vxContainer->at(i); - if ( vxcand->nTrackParticles() >= 3 ) nVtx++; - } - } + SG::ReadHandle<xAOD::VertexContainer> vtxCont (m_primVtxContKey); + for ( unsigned int i = 0; i < vtxCont->size(); i++ ) { + const xAOD::Vertex* vtxcand = vtxCont->at(i); + if ( vtxcand->nTrackParticles() >= 3 ) nVtx++; + } return nVtx; } -- GitLab From 5c823fe3f9fd31a33620c19448f63c60845ca739 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Wed, 20 Jun 2018 11:05:49 +0200 Subject: [PATCH 207/562] The first version of the counting ComboHypo algortithm Former-commit-id: 9c0fe904721b4f81dbd2b863f9d6855e2ed44ada --- .../DecisionHandling/src/ComboHypo.cxx | 106 ++++++++++++++++++ .../DecisionHandling/src/ComboHypo.h | 44 ++++++++ .../components/DecisionHandling_entries.cxx | 2 + 3 files changed, 152 insertions(+) create mode 100644 Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx create mode 100644 Trigger/TrigSteer/DecisionHandling/src/ComboHypo.h diff --git a/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx b/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx new file mode 100644 index 000000000000..942e68367759 --- /dev/null +++ b/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx @@ -0,0 +1,106 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "ComboHypo.h" +#include "DecisionHandling/TrigCompositeUtils.h" +#include "DecisionHandling/HLTIdentifier.h" + +using namespace TrigCompositeUtils; +ComboHypo::ComboHypo(const std::string& name, ISvcLocator* pSvcLocator) + : InputMakerBase(name, pSvcLocator) +{} + +ComboHypo::~ComboHypo() +{} + +StatusCode ComboHypo::initialize() { + //ATH_MSG_DEBUG("Use macros for logging!"); + for ( auto m: m_multiplicitiesMap ) { + // check if all is correctly configured, the same multiplicity everywhere + } + return StatusCode::SUCCESS; +} + +StatusCode ComboHypo::finalize() { + return StatusCode::SUCCESS; +} + + +StatusCode ComboHypo::copyDecisions( const DecisionIDContainer& passing ) const { + for ( size_t input_counter = 0; input_counter < decisionInputs().size(); ++input_counter ) { + + auto outDecisions = std::make_unique<DecisionContainer>(); + auto outDecAux = std::make_unique<DecisionAuxContainer>(); + outDecisions->setStore( outDecAux.get() ); + + + auto inputHandle = SG::makeHandle( decisionInputs()[input_counter] ); + const DecisionContainer* inputs = inputHandle.cptr(); + const size_t sz = inputs->size(); + + for ( size_t i = 0; i < sz; ++i ) { + const Decision *inputDecision = inputs->at(i); + DecisionIDContainer inputDecisionIDs; + decisionIDs( inputDecision, inputDecisionIDs ); + + // from all poitive decision in the input only the ones that survived counting are passed over + DecisionIDContainer common; + std::set_intersection( inputDecisionIDs.begin(), inputDecisionIDs.end(), passing.begin(), passing.end(), + std::inserter( common, common.end() ) ); + + Decision* newDec = newDecisionIn( outDecisions.get() ); + linkToPrevious( newDec, inputHandle.key(), i ); + + for ( auto id: common ) { + addDecisionID( id, newDec ); + } + } + auto handle = SG::makeHandle( decisionOutputs()[input_counter] ); + ATH_CHECK( handle.record( std::move( outDecisions ), std::move( outDecAux ) ) ); + } + return StatusCode::SUCCESS; +} + +void ComboHypo::fillDecisionsMap( std::vector< MultiplicityMap >& dmap) const { + for ( size_t i = 0; i < decisionInputs().size(); ++i ) { + auto inputHandle = SG::makeHandle( decisionInputs().at(i) ); + MultiplicityMap& thisInputDmap = dmap[i]; + for ( const Decision* decision : *inputHandle.cptr() ) { + for ( DecisionID id: decisionIDs( decision ) ) { + thisInputDmap[id] ++; + } + } + } +} + +StatusCode ComboHypo::execute_r(const EventContext& ) const { + DecisionIDContainer passing; + // this map is filled with the count of positive decisions from each input + std::vector< MultiplicityMap > dmap( decisionInputs().size() ); + fillDecisionsMap( dmap ); + + for ( auto m: m_multiplicitiesMap ) { + const DecisionID requiredDecisionID = HLT::Identifier( m.first ).numeric(); + bool overallDecision = true; + + for ( size_t inputContainerIndex = 0; inputContainerIndex < m.second.size(); ++inputContainerIndex ) { + const int requiredMultiplicity = m.second[ inputContainerIndex ]; + const int observedMultiplicity = dmap[ inputContainerIndex ][ requiredDecisionID ]; + ATH_MSG_DEBUG( "Required multiplicity " << requiredMultiplicity << " observed multiplicity " << observedMultiplicity << " in container " << inputContainerIndex << " for chain " << m.first ); + if ( observedMultiplicity < requiredMultiplicity ) { + overallDecision = false; + break; + } + } + ATH_MSG_DEBUG( "Chain " << m.first << ( overallDecision ? "is accepted" : "is rejected") ); + if ( overallDecision == true ) { + passing.insert( requiredDecisionID ); + } + } + + ATH_CHECK( copyDecisions( passing ) ); + + return StatusCode::SUCCESS; +} + diff --git a/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.h b/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.h new file mode 100644 index 000000000000..b5a075dbd629 --- /dev/null +++ b/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.h @@ -0,0 +1,44 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ +#ifndef DECISIONHANDLING_COMBOHYPO_H +#define DECISIONHANDLING_COMBOHYPO_H + +// Framework includes +#include "DecisionHandling/InputMakerBase.h" +#include "DecisionHandling/TrigCompositeUtils.h" + +// STL includes +#include <string> + +/** + * @class ComboHypo for combined hypotheses required only counting (multiplicity requirements) + * @warning while configuring it the order of specified multiplicities has to mach order of input decision containers + * i.e. if feed with: + * electronDecisions + * muonDecisions + * jetDecisions + * the multiplicity specification like this: + * "HLT_4e10_2mu7_j100" : [ 4, 2, 1 ] will apply respectively requirement of 4, 2, 1 positive decisions in electron, muon and jet inputs + **/ +class ComboHypo : public InputMakerBase { +public: + ComboHypo(const std::string& name, ISvcLocator* pSvcLocator); + virtual ~ComboHypo() override; + + virtual StatusCode initialize() override; + virtual StatusCode execute_r(const EventContext& context) const override; + virtual StatusCode finalize() override; + +private: + Gaudi::Property< std::map<std::string, std::vector<int>>> m_multiplicitiesMap{this, "MultiplicitiesMap", {}, "Map from the chain name to implicities required at each input"}; + + //!< iterates over the inputs and for every object (no filtering) crates output object linked to input moving the decisions that are mentioned in the passing set + StatusCode copyDecisions( const TrigCompositeUtils::DecisionIDContainer& passing ) const; + + //!< iterates over all inputs filling the multiplicity map for each input collection + typedef std::map<TrigCompositeUtils::DecisionID, int> MultiplicityMap; + void fillDecisionsMap( std::vector< MultiplicityMap >& dmap) const; +}; + +#endif // DECISIONHANDLING_COMBOHYPO_H diff --git a/Trigger/TrigSteer/DecisionHandling/src/components/DecisionHandling_entries.cxx b/Trigger/TrigSteer/DecisionHandling/src/components/DecisionHandling_entries.cxx index f862b0d68ad4..88560b3ebe5d 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/components/DecisionHandling_entries.cxx +++ b/Trigger/TrigSteer/DecisionHandling/src/components/DecisionHandling_entries.cxx @@ -1,7 +1,9 @@ #include "../DumpDecisions.h" #include "../RoRSeqFilter.h" #include "../TriggerSummaryAlg.h" +#include "../ComboHypo.h" DECLARE_COMPONENT( DumpDecisions ) DECLARE_COMPONENT( RoRSeqFilter ) DECLARE_COMPONENT( TriggerSummaryAlg ) +DECLARE_COMPONENT( ComboHypo ) -- GitLab From 0b8852ac9d0239c8f8bcdb1e218f3ad06c42ccdf Mon Sep 17 00:00:00 2001 From: Shota Hayashida <hayashida@hepl.phys.nagoya-u.ac.jp> Date: Wed, 20 Jun 2018 12:23:25 +0200 Subject: [PATCH 208/562] Update TrigMuonHypo for menu migration Former-commit-id: 06e56efc36f5c9bc10449b08036b3850d769ecea --- .../TrigMuonHypo/TrigMufastHypoTool.h | 12 +- .../TrigMuonHypo/TrigmuCombHypoAlg.h | 16 +- .../TrigMuonHypo/TrigmuCombHypoTool.h | 17 +- .../python/testTrigMuonHypoConfig.py | 73 ++++---- .../TrigMuonHypo/src/TrigMufastHypoAlg.cxx | 2 +- .../TrigMuonHypo/src/TrigMufastHypoTool.cxx | 6 +- .../TrigMuonHypo/src/TrigmuCombHypoAlg.cxx | 174 +++++++++--------- .../TrigMuonHypo/src/TrigmuCombHypoTool.cxx | 6 +- .../TrigUpgradeTest/python/MenuHypoTools.py | 14 +- .../TrigUpgradeTest/share/mu.withViews.py | 21 +-- 10 files changed, 182 insertions(+), 159 deletions(-) diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMufastHypoTool.h b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMufastHypoTool.h index 6f0d9a00da5b..5a8292f8ffd8 100644 --- a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMufastHypoTool.h +++ b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMufastHypoTool.h @@ -41,18 +41,20 @@ class TrigMufastHypoTool: public ::AthAlgTool { virtual ~TrigMufastHypoTool(); struct MuonClusterInfo { - MuonClusterInfo( TrigCompositeUtils::Decision* d, const TrigRoiDescriptor* r, const xAOD::L2StandAloneMuon* c, + MuonClusterInfo( TrigCompositeUtils::Decision* d, + const TrigRoiDescriptor* r, + const xAOD::L2StandAloneMuon* f, const TrigCompositeUtils::Decision* previousDecision ) : decision( d ), roi( r ), - cluster( c ), - previousDecisionIDs(TrigCompositeUtils::decisionIDs( previousDecision ).begin(), - TrigCompositeUtils::decisionIDs( previousDecision ).end() ) + muFast( f ), + previousDecisionIDs( TrigCompositeUtils::decisionIDs( previousDecision ).begin(), + TrigCompositeUtils::decisionIDs( previousDecision ).end() ) {} TrigCompositeUtils::Decision* decision; const TrigRoiDescriptor* roi; - const xAOD::L2StandAloneMuon* cluster; + const xAOD::L2StandAloneMuon* muFast; const TrigCompositeUtils::DecisionIDContainer previousDecisionIDs; }; diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigmuCombHypoAlg.h b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigmuCombHypoAlg.h index 6c9450a151e5..3cd7ad743d15 100644 --- a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigmuCombHypoAlg.h +++ b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigmuCombHypoAlg.h @@ -7,7 +7,7 @@ #include <string> -#include "AthenaBaseComps/AthReentrantAlgorithm.h" +//#include "AthenaBaseComps/AthReentrantAlgorithm.h" #include "StoreGate/ReadHandleKey.h" #include "StoreGate/WriteHandleKey.h" @@ -16,6 +16,7 @@ #include "AthViews/View.h" #include "TrigMuonHypo/TrigmuCombHypoTool.h" +#include "DecisionHandling/HypoBase.h" class StoreGateSvc; class TriggerElement; @@ -24,7 +25,7 @@ class TriggerElement; // -------------------------------------------------------------------------------- class TrigmuCombHypoAlg - : public ::AthReentrantAlgorithm + : public ::HypoBase { public: @@ -41,16 +42,7 @@ class TrigmuCombHypoAlg TrigmuCombHypoAlg(); ToolHandleArray<TrigmuCombHypoTool> m_hypoTools {this, "HypoTools", {}, "Tools to perform selection"}; - SG::WriteHandleKey<TrigCompositeUtils::DecisionContainer> m_decisionsKey{ - this, "Decisions", "MuonL2CBDecisions", "Name of the decision objects produced by TrigmuCombHypo"}; - - SG::ReadHandleKey<TrigCompositeUtils::DecisionContainer> m_muonDecisionsKey{ - this, "L2MuonFastDecisions", "L2MuonFastDecisions", "Name of the decisions objects to input from TrigMufastHypo"}; - - SG::ReadHandleKey< ViewContainer > m_viewsKey{ - this, "ViewRoIs", "MUTrkViewRoIs", "Name of the views produced by EVCA"}; - - SG::ReadHandleKey<xAOD::L2CombinedMuonContainer> m_combinedKey{ + SG::ReadHandleKey<xAOD::L2CombinedMuonContainer> m_muCombKey { this, "MuonL2CBInfoFromMuCombAlg", "MuonL2CBInfo", "Name of the input data produced by muCombMT"}; }; diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigmuCombHypoTool.h b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigmuCombHypoTool.h index d135e76be3b1..f3c2d6b1688e 100644 --- a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigmuCombHypoTool.h +++ b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigmuCombHypoTool.h @@ -40,9 +40,20 @@ class TrigmuCombHypoTool: public ::AthAlgTool { const IInterface* parent ); struct CombinedMuonInfo { - TrigCompositeUtils::Decision* decision; - const xAOD::L2CombinedMuon* cluster; - const xAOD::L2StandAloneMuon* muon; + CombinedMuonInfo( TrigCompositeUtils::Decision* d, + const xAOD::L2CombinedMuon* c, + const xAOD::L2StandAloneMuon* f, + const TrigCompositeUtils::Decision* previousDecision ) + : decision( d ), + muComb( c ), + muFast( f ), + previousDecisionIDs( TrigCompositeUtils::decisionIDs( previousDecision ).begin(), + TrigCompositeUtils::decisionIDs( previousDecision ).end() ) + {} + + TrigCompositeUtils::Decision* decision; + const xAOD::L2CombinedMuon* muComb; + const xAOD::L2StandAloneMuon* muFast; const TrigCompositeUtils::DecisionIDContainer previousDecisionIDs; }; diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/python/testTrigMuonHypoConfig.py b/Trigger/TrigHypothesis/TrigMuonHypo/python/testTrigMuonHypoConfig.py index 4b2f376f583d..27c00c200511 100755 --- a/Trigger/TrigHypothesis/TrigMuonHypo/python/testTrigMuonHypoConfig.py +++ b/Trigger/TrigHypothesis/TrigMuonHypo/python/testTrigMuonHypoConfig.py @@ -413,6 +413,32 @@ def TrigMufastHypoToolFromName( thresholdHLT ): return tool +def TrigmuCombHypoToolFromName( thresholdHLT ): + + name = "TrigmuCombHypoTool" + config = TrigmuCombHypoConfig() + + # Separete HLT_NmuX to bname[0]=HLT and bname[1]=NmuX + bname = thresholdHLT.split('_') + threshold = bname[1] + thresholds = config.decodeThreshold( threshold ) + print "TrigmuCombHypoConfig: Decoded ", thresholdHLT, " to ", thresholds + + tool=config.ConfigurationHypoTool( thresholdHLT, thresholds ) + + # Setup MonTool for monitored variables in AthenaMonitoring package + TriggerFlags.enableMonitoring = ["Validation"] + + try: + if 'Validation' in TriggerFlags.enableMonitoring() or 'Online' in TriggerFlags.enableMonitoring() or 'Cosmic' in TriggerFlags.enableMonitoring(): + tool.MonTool = TrigmuCombHypoMonitoring( name + "Monitoring_" + thresholdHLT ) + except AttributeError: + tool.MonTool = "" + print name, ' Monitoring Tool failed' + + return tool + + class TrigMufastHypoConfig(): def decodeThreshold( self, threshold ): @@ -484,44 +510,25 @@ class TrigMufastHypoConfig(): -# This class is copied from MucombHypoConfig. -class TrigmuCombHypoConfig(TrigmuCombHypoAlg): - - __slots__ = [] - - # thresholdHLT: name threshold, for example HLT_mu6 etc - def TrigmuCombHypoToolFromName( self, name, thresholdHLT ): - - from AthenaCommon.Constants import DEBUG - tool = TrigmuCombHypoTool( thresholdHLT ) - tool.OutputLevel = DEBUG - - # Separete HLT_NmuX to bname[0]=HLT and bname[1]=NmuX - bname = thresholdHLT.split('_') - - threshold = bname[1] - thresholds = TrigMufastHypoConfig().decodeThreshold( threshold ) - tight = False - - TrigmuCombHypoConfig().ConfigrationHypoTool( name, thresholdHLT, thresholds, tight ) - print """ Configration SUCCESS: Configure threshold """, threshold, """ at TrigmuCombHypoTool """ - - # Setup MonTool for monitored variables in AthenaMonitoring package - TriggerFlags.enableMonitoring = ["Validation"] +class TrigmuCombHypoConfig(): - try: - if 'Validation' in TriggerFlags.enableMonitoring() or 'Online' in TriggerFlags.enableMonitoring() or 'Cosmic' in TriggerFlags.enableMonitoring(): - tool.MonTool = TrigmuCombHypoMonitoring( name + "Monitoring_" + thresholdHLT ) - except AttributeError: - tool.MonTool = "" - print name, ' Monitoring Tool failed' + def decodeThreshold( self, threshold ): + """ decodes the thresholds of the form mu6, 2mu6, ... """ + print "decoding ", threshold - return tool + if threshold[0].isdigit(): # If the form is NmuX, return as list [X,X,X...N times...] + assert threshold[1:3] == "mu", "Two digit multiplicity not supported" + return [ threshold[3:] ] * int( threshold[0] ) + + if threshold.count('mu') > 1: # If theform is muXmuY, return as [X,Y] + return threshold.strip('mu').split('mu') + + # If the form is muX(inclusive), return as 1 element list + return [ threshold[2:] ] def ConfigrationHypoTool( self, name, thresholdHLT, thresholds, tight ): tool = TrigmuCombHypoTool( thresholdHLT ) - print 'MucombHypoConfig configured for threshold: ',thresholds datayear = "2017" @@ -556,7 +563,7 @@ class TrigmuCombHypoConfig(TrigmuCombHypoAlg): tool.MaxPtToApplyPik = 25. tool.MaxChi2IDPik = 3.5 - return thvaluename + return tool class MufastHypoConfig(MufastHypo) : diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoAlg.cxx b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoAlg.cxx index 2d99a0b40932..b4f56f611037 100755 --- a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoAlg.cxx +++ b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoAlg.cxx @@ -115,7 +115,7 @@ StatusCode TrigMufastHypoAlg::execute_r( const EventContext& context ) const ATH_MSG_DEBUG("REGTEST: " << m_muFastKey.key() << " eta/phi = " << (*muonEL)->eta() << "/" << (*muonEL)->phi()); ATH_MSG_DEBUG("REGTEST: View = " << (*viewEL)); ATH_MSG_DEBUG("REGTEST: RoI = eta/phi = " << (*roiEL)->eta() << "/" << (*roiEL)->phi()); - ATH_MSG_DEBUG("Added view, roi, cluster, previous decision to new decision "<<counter <<" for view "<<view->name() ); + ATH_MSG_DEBUG("Added view, roi, feature, previous decision to new decision "<<counter <<" for view "<<view->name() ); counter++; } diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoTool.cxx b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoTool.cxx index f1f9c3f91916..f40605c07101 100755 --- a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoTool.cxx +++ b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMufastHypoTool.cxx @@ -120,7 +120,7 @@ bool TrigMufastHypoTool::decideOnSingleObject(TrigMufastHypoTool::MuonClusterInf } // Get xAOD::L2StandAloneMuon: - auto pMuon = input.cluster; + auto pMuon = input.muFast; if(!pMuon){ result = false; @@ -341,7 +341,7 @@ StatusCode TrigMufastHypoTool::multiplicitySelection(std::vector<TrigMufastHypoT auto notFromSameRoI = [&]( const HLT::Index1DVec& comb ) { std::set<const xAOD::L2StandAloneMuon*> setOfClusters; for ( auto index: comb ) { - setOfClusters.insert( toolInput[index].cluster ); + setOfClusters.insert( toolInput[index].muFast ); } return setOfClusters.size() == comb.size(); }; @@ -359,7 +359,7 @@ StatusCode TrigMufastHypoTool::multiplicitySelection(std::vector<TrigMufastHypoT for ( auto idx: passingIndices ) { ATH_MSG_DEBUG("Muon event[" << idx << "] passes through Chain/ID " << m_decisionId - << " with pT = " << toolInput[idx].cluster->pt() << "GeV" ); + << " with pT = " << toolInput[idx].muFast->pt() << "GeV" ); TrigCompositeUtils::addDecisionID( m_decisionId.numeric(), toolInput[idx].decision ); } diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigmuCombHypoAlg.cxx b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigmuCombHypoAlg.cxx index 2ac3137ad566..00a3f09e0087 100644 --- a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigmuCombHypoAlg.cxx +++ b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigmuCombHypoAlg.cxx @@ -1,11 +1,12 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #include <math.h> #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/StatusCode.h" +#include "AthLinks/ElementLink.h" #include "DecisionHandling/TrigCompositeUtils.h" #include "xAODTrigMuon/L2StandAloneMuonContainer.h" @@ -19,10 +20,8 @@ using namespace TrigCompositeUtils; TrigmuCombHypoAlg::TrigmuCombHypoAlg( const std::string& name, ISvcLocator* pSvcLocator ) : - ::AthReentrantAlgorithm( name, pSvcLocator ) -{ - -} + ::HypoBase( name, pSvcLocator ) +{} TrigmuCombHypoAlg::~TrigmuCombHypoAlg() {} @@ -35,14 +34,8 @@ StatusCode TrigmuCombHypoAlg::initialize() ATH_MSG_INFO ( "Initializing " << name() << "..." ); ATH_CHECK(m_hypoTools.retrieve()); - ATH_CHECK(m_decisionsKey.initialize()); - - ATH_CHECK(m_muonDecisionsKey.initialize()); - - ATH_CHECK(m_viewsKey.initialize()); - - renounce(m_combinedKey); - ATH_CHECK(m_combinedKey.initialize()); + renounce(m_muCombKey); + ATH_CHECK(m_muCombKey.initialize()); ATH_MSG_INFO( "Initialization completed successfully" ); return StatusCode::SUCCESS; @@ -64,92 +57,99 @@ StatusCode TrigmuCombHypoAlg::finalize() StatusCode TrigmuCombHypoAlg::execute_r(const EventContext& context) const { + // common for all Hypos, to move in the base class ATH_MSG_DEBUG("StatusCode TrigmuCombHypoAlg::execute_r start"); + auto previousDecisionsHandle = SG::makeHandle( decisionInput(), context); + if ( not previousDecisionsHandle.isValid() ) {//implicit + ATH_MSG_DEBUG( "No implicit ReadHandles for previous decisions " << decisionInput().key() << ": is this expected?"); + return StatusCode::SUCCESS; + } + ATH_MSG_DEBUG( "Running with " << previousDecisionsHandle->size() << " implicit ReadHandles for previous decisions"); - // prepare decisions container auto decisions = std::make_unique<DecisionContainer>(); auto aux = std::make_unique<DecisionAuxContainer>(); decisions->setStore(aux.get()); - - // extract mapping of cluster pointer to an index in the cluster decision collection - auto clusterDecisionsHandle= SG::makeHandle( m_muonDecisionsKey, context ); - std::map<const xAOD::L2StandAloneMuon*, size_t> clusterToIndexMap; - - size_t clusterCounter = 0; - for (auto cluIter = clusterDecisionsHandle->begin(); cluIter != clusterDecisionsHandle->end(); ++cluIter) { - ATH_CHECK((*cluIter)->hasObjectLink("feature")); - const xAOD::L2StandAloneMuon* cluster = (*cluIter)->object<xAOD::L2StandAloneMuon>("feature"); - clusterToIndexMap.insert(std::make_pair(cluster, clusterCounter)); - - ++clusterCounter; + // end of common + + std::vector<TrigmuCombHypoTool::CombinedMuonInfo> toolInput; + // loop over previous decisions + size_t counter = 0; + + for ( auto previousDecision: *previousDecisionsHandle ) { + // get L2MuonSA Feature + //ATH_CHECK( previousDecision->hasObjectLink("feature") ); + //auto muFastEL = previousDecision->objectLink<xAOD::L2StandAloneMuonContainer>("feature"); + //ATH_CHECK( muFastEL.isValid() ); + //const xAOD::L2StandAloneMuon* muFast = *muFastEL; + + TrigCompositeUtils::LinkInfo<xAOD::L2StandAloneMuonContainer> linkInfo = + TrigCompositeUtils::findLink<xAOD::L2StandAloneMuonContainer>(previousDecision, "feature"); + ElementLink<xAOD::L2StandAloneMuonContainer> muFastLink = linkInfo.link; + ATH_CHECK( muFastLink.isValid() ); + const xAOD::L2StandAloneMuon* muFast = *muFastLink; + + + // get View + ATH_CHECK( previousDecision->hasObjectLink("view") ); + auto viewEL = previousDecision->objectLink<ViewContainer>("view"); + ATH_CHECK( viewEL.isValid() ); + const SG::View* view_const = *viewEL; + SG::View* view = const_cast<SG::View*>(view_const); // CHECK THIS! + ATH_MSG_INFO("DEBUG: view name = " << view->name() ); + + // get info + auto muCombHandle = SG::makeHandle( m_muCombKey, context ); + ATH_CHECK( muCombHandle.setProxyDict(view) ); + //ATH_CHECK( muCombHandle.isValid() ); + ATH_MSG_DEBUG( "Muinfo handle size: " << muCombHandle->size() << "..."); + + //auto muCombEL = ElementLink<xAOD::L2CombinedMuonContainer> ( view->name()+"_"+m_muCombKey.key(), counter); + auto muCombEL = ElementLink<xAOD::L2CombinedMuonContainer> ( view->name()+"_"+m_muCombKey.key(), 0 ); + ATH_CHECK( muCombEL.isValid() ); + const xAOD::L2CombinedMuon* muComb = *muCombEL; + + // create new decisions + auto newd = newDecisionIn( decisions.get() ); + + toolInput.emplace_back( TrigmuCombHypoTool::CombinedMuonInfo{ newd, muComb, muFast, previousDecision} ); + + // set objectLink + newd->setObjectLink( "feature", muCombEL ); + //newd->setObjectLink( "", muFast ); + TrigCompositeUtils::linkToPrevious( newd, decisionInput().key(), counter); + + // DEBUG + auto muFastInfo = (*muCombEL)->muSATrack(); + ATH_MSG_DEBUG("REGTEST: muSATrack pt in " << m_muCombKey.key() << " = " << muFastInfo->pt() << " GeV"); + ATH_MSG_DEBUG("REGTEST: muSATrack eta/phi in " << m_muCombKey.key() << " = " << muFastInfo->eta() << "/" << muFastInfo->phi()); + + ATH_MSG_DEBUG("REGTEST: muCBTrack pt in " << m_muCombKey.key() << " = " << (*muCombEL)->pt() << " GeV"); + ATH_MSG_DEBUG("REGTEST: muCBTrack eta/phi in " << m_muCombKey.key() << " = " << (*muCombEL)->eta() << "/" << (*muCombEL)->phi()); + ATH_MSG_DEBUG("Added view, features, previous decision to new decision "<<counter <<" for view "<<view->name() ); + + counter++; } - ATH_MSG_DEBUG( "Cluster ptr to decision map has size " << clusterToIndexMap.size() ); - - // prepare imput for tools - std::vector<TrigmuCombHypoTool::CombinedMuonInfo> hypoToolInput; - // retrieve views created on l2muCombViewsCreator - auto viewsHandle = SG::makeHandle(m_viewsKey, context); - if (!viewsHandle.isValid()) { - ATH_MSG_ERROR("ReadHandle for ViewContainer key:" << m_viewsKey.key() << " is failed"); - return StatusCode::FAILURE; + for ( auto & tool: m_hypoTools ) { + ATH_MSG_DEBUG("Go to " << tool); + ATH_CHECK( tool->decide( toolInput ) ); } - for (auto view: *viewsHandle) { - size_t muonCounter = 0; - - // retrieve xAOD::CombinedMuonContaier created on muComb algorithm - auto muonHandle = SG::makeHandle(m_combinedKey, context); - ATH_CHECK(muonHandle.setProxyDict(view)); - if(!muonHandle.isValid()) { - ATH_MSG_ERROR("ReadHandle for xAOD::L2CombinedMuonContainer key:" << m_combinedKey.key() << " is failed"); - return StatusCode::FAILURE; + {// make output handle and debug, in the base class + auto outputHandle = SG::makeHandle( decisionOutput(), context ); + ATH_CHECK( outputHandle.record( std::move( decisions ), std::move( aux ) ) ); + ATH_MSG_DEBUG( "Exit with " << outputHandle->size() << " decisions"); + TrigCompositeUtils::DecisionIDContainer allPassingIDs; + if ( outputHandle.isValid() ) { + for ( auto decisionObject: *outputHandle ) { + TrigCompositeUtils::decisionIDs ( decisionObject, allPassingIDs ); + } + for ( TrigCompositeUtils::DecisionID id: allPassingIDs ) { + ATH_MSG_DEBUG( " +++ " << HLT::Identifier( id ) ); + } } - - xAOD::L2CombinedMuonContainer::const_iterator muIter; - for (muIter = muonHandle->begin(); muIter != muonHandle->end(); ++muIter) { - auto d = newDecisionIn(decisions.get()); - auto element = ElementLink<xAOD::L2CombinedMuonContainer>(view->name()+"_"+m_combinedKey.key(), muonCounter); - d->setObjectLink("feature", element); - - // get muSATracks from xAOD::CombinedMuonContainer - auto clusterPtr = (*muIter)->muSATrack(); - ATH_CHECK(clusterPtr != nullptr); - - ATH_MSG_DEBUG("REGTEST: muSATrack pt in " << m_combinedKey.key() << " = " << clusterPtr->pt() << " GeV"); - ATH_MSG_DEBUG("REGTEST: muSATrack eta/phi in " << m_combinedKey.key() << " = " << clusterPtr->eta() << "/" << clusterPtr->phi()); - - ATH_MSG_DEBUG("REGTEST: muCBTrack pt in " << m_combinedKey.key() << " = " << (*muIter)->pt() << " GeV"); - ATH_MSG_DEBUG("REGTEST: muCBTrack eta/phi in " << m_combinedKey.key() << " = " << (*muIter)->eta() << "/" << (*muIter)->phi()); - - // now find matching cluster could use geometric matching - // but in fact the cluster owned by the decision object and the cluster owned by the electron should be the same - // since we have a map made in advance we can make use of the index lookup w/o the need for additional loop - auto origCluster = clusterToIndexMap.find(clusterPtr); - ATH_CHECK(origCluster != clusterToIndexMap.end()); - linkToPrevious(d, m_muonDecisionsKey.key(), origCluster->second); - - // now we have DecisionObject ready to be passed to hypo tool. - // it has link to electron, and decisions on clusters - // we shall avoid calling the tools for chains which were already rejected on certain cluster, but this is left to hypo tools - DecisionIDContainer clusterDecisionIDs; - decisionIDs(clusterDecisionsHandle->at(origCluster->second), clusterDecisionIDs); - - auto el = TrigmuCombHypoTool::CombinedMuonInfo{d, *muIter, origCluster->first, clusterDecisionIDs}; - hypoToolInput.emplace_back(el); - } - ++muonCounter; - } - - // hypo tools - for ( auto & tool: m_hypoTools ) { - ATH_MSG_DEBUG("Go to " << tool); - ATH_CHECK( tool->decide( hypoToolInput ) ); } - // recorded decision objects on TrigmuCombHypo - auto handle = SG::makeHandle( m_decisionsKey, context ); - ATH_CHECK( handle.record( std::move( decisions ), std::move( aux ) ) ); ATH_MSG_DEBUG("StatusCode TrigmuCombHypoAlg::execute_r success"); return StatusCode::SUCCESS; diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigmuCombHypoTool.cxx b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigmuCombHypoTool.cxx index b14eee2b91cd..325125a3740f 100644 --- a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigmuCombHypoTool.cxx +++ b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigmuCombHypoTool.cxx @@ -104,7 +104,7 @@ bool TrigmuCombHypoTool::decideOnSingleObject(TrigmuCombHypoTool::CombinedMuonIn //Retrieve combined muon //xAOD::L2CombinedMuon - auto pMuon = input.cluster; + auto pMuon = input.muComb; if (!pMuon) { result = false; ATH_MSG_ERROR("Retrieval of xAOD::L2CombinedMuon from vector failed"); @@ -280,7 +280,7 @@ StatusCode TrigmuCombHypoTool::multiplicitySelection(std::vector<TrigmuCombHypoT auto notFromSameRoI = [&]( const HLT::Index1DVec& comb ) { std::set<const xAOD::L2CombinedMuon*> setOfClusters; for ( auto index: comb ) { - setOfClusters.insert( input[index].cluster ); + setOfClusters.insert( input[index].muComb ); } return setOfClusters.size() == comb.size(); }; @@ -298,7 +298,7 @@ StatusCode TrigmuCombHypoTool::multiplicitySelection(std::vector<TrigmuCombHypoT for ( auto idx: passingIndices ) { ATH_MSG_DEBUG("Muon event[" << idx << "] passes through Chain/ID " << m_decisionId - << " with pT = " << input[idx].cluster->pt() << "GeV" ); + << " with pT = " << input[idx].muComb->pt() << "GeV" ); TrigCompositeUtils::addDecisionID( m_decisionId.numeric(), input[idx].decision ); } diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/MenuHypoTools.py b/Trigger/TrigValidation/TrigUpgradeTest/python/MenuHypoTools.py index 2481a465d5cf..435dff4af31c 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/MenuHypoTools.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/MenuHypoTools.py @@ -2,7 +2,7 @@ from TrigUpgradeTest.HLTSignatureConfig import TestHypoTool, MuTestHypoTool, ElTestHypoTool from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2CaloHypoToolInc, TrigL2CaloHypoToolMult, TrigL2ElectronHypoTool #from TrigEgammaHypo.TrigL2CaloHypoTool import * -from TrigMuonHypo.TrigMuonHypoConf import TrigMufastHypoTool +from TrigMuonHypo.TrigMuonHypoConf import TrigMufastHypoTool, TrigmuCombHypoTool def createHypoTool(hypoToolClassName, hypoToolName): try: @@ -37,3 +37,15 @@ def TrigMufastHypoToolConf(name): #hypotool= TrigMufastHypoConfig.TrigMufastHypoToolFromName(name) hypotool.OutputLevel = DEBUG return hypotool + +def TrigmuCombHypoToolConf(name): + from AthenaCommon.Constants import DEBUG + from TrigMuonHypo.testTrigMuonHypoConfig import TrigMufastHypoToolFromName + print "in TrigMufastHypoToolConf" + #TrigMufastHypoToolFromName + hypotool= TrigMufastHypoToolFromName(name) + #hypotool= TrigMufastHypoConfig.TrigMufastHypoToolFromName(name) + hypotool.OutputLevel = DEBUG + return hypotool + + diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py index 4e607cd9b059..e4e9756255a3 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py @@ -424,16 +424,15 @@ if TriggerFlags.doMuon: ### set up muCombHypo algorithm ### from TrigMuonHypo.TrigMuonHypoConfig import TrigmuCombHypoConfig trigmuCombHypo = TrigmuCombHypoConfig("L2muCombHypoAlg") - trigmuCombHypo.OutputLevel = DEBUG - - trigmuCombHypo.Decisions = "MuonL2CBDecisions" - trigmuCombHypo.L2MuonFastDecisions = trigMufastHypo.HypoOutputDecisions - trigmuCombHypo.ViewRoIs = l2muCombViewsMaker.Views + trigmuCombHypo.OutputLevel = DEBUG + trigmuCombHypo.HypoOutputDecisions = "MuonL2CBDecisions" + #trigmuCombHypo.HypoInputDecisions = trigMufastHypo.HypoOutputDecisions + trigmuCombHypo.HypoInputDecisions = l2muCombViewsMaker.InputMakerOutputDecisions[0] trigmuCombHypo.MuonL2CBInfoFromMuCombAlg = muCombAlg.L2CombinedMuonContainerName - trigmuCombHypo.HypoTools = [ trigmuCombHypo.TrigmuCombHypoToolFromName( "L2muCombHypoTool", c ) for c in testChains ] - muCombDecisionsDumper = DumpDecisions("muCombDecisionsDumper", OutputLevel=DEBUG, Decisions = trigmuCombHypo.Decisions ) + # set the dumper + muCombDecisionsDumper = DumpDecisions("muCombDecisionsDumper", OutputLevel=DEBUG, Decisions = trigmuCombHypo.HypoOutputDecisions ) ### Define a Sequence to run for muComb ### l2muCombSequence = seqAND("l2muCombSequence", eventAlgs + [l2muCombViewsMaker, l2muCombViewNode, trigmuCombHypo ] ) @@ -447,8 +446,8 @@ if TriggerFlags.doMuon: if doEFSA: ### RoRSeqFilter step2 ### filterEFSAAlg = RoRSeqFilter("filterEFSAAlg") - filterEFSAAlg.Input = [trigmuCombHypo.Decisions] - filterEFSAAlg.Output = ["Filtered"+trigmuCombHypo.Decisions] + filterEFSAAlg.Input = [trigmuCombHypo.HypoOutputDecisions] + filterEFSAAlg.Output = ["Filtered"+trigmuCombHypo.HypoOutputDecisions] filterEFSAAlg.Chains = testChains filterEFSAAlg.OutputLevel = DEBUG @@ -605,7 +604,7 @@ if TriggerFlags.doMuon==True and TriggerFlags.doID==True: from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) summary.InputDecision = "HLTChains" - summary.FinalDecisions = [ trigmuCombHypo.Decisions ] + summary.FinalDecisions = [ trigmuCombHypo.HypoOutputDecisions ] summary.OutputLevel = DEBUG step0 = parOR("step0", [ muFastStep ] ) step1 = parOR("step1", [ muCombStep ] ) @@ -613,7 +612,7 @@ if TriggerFlags.doMuon==True and TriggerFlags.doID==True: mon = TriggerSummaryAlg( "TriggerMonitoringAlg" ) mon.InputDecision = "HLTChains" - mon.FinalDecisions = [ trigmuCombHypo.Decisions, "WhateverElse" ] + mon.FinalDecisions = [ trigmuCombHypo.HypoOutputDecisions, "WhateverElse" ] mon.HLTSummary = "MonitoringSummary" mon.OutputLevel = DEBUG hltTop = seqOR( "hltTop", [ HLTsteps, mon] ) -- GitLab From 398a58951001ded2628ba2e1691511bad14210ba Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Wed, 20 Jun 2018 13:28:20 +0200 Subject: [PATCH 209/562] Solve coverity 118580 Former-commit-id: fecb4a9cf01e574d95c3d8c0158dde14f3a3f6be --- .../InDetRawAlgs/InDetOverlay/src/InDetOverlay.cxx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/src/InDetOverlay.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/src/InDetOverlay.cxx index a2067b989014..c3cae7235a3d 100755 --- a/InnerDetector/InDetRawAlgs/InDetOverlay/src/InDetOverlay.cxx +++ b/InnerDetector/InDetRawAlgs/InDetOverlay/src/InDetOverlay.cxx @@ -26,7 +26,6 @@ #include "InDetRawData/TRT_RDORawData.h" #include "InDetRawData/TRT_LoLumRawData.h" #include "InDetRawData/SCT3_RawData.h" -//#include "InDetRawData/Pixel1RawData.h" #include "InDetIdentifier/SCT_ID.h" #include "InDetIdentifier/TRT_ID.h" @@ -193,15 +192,12 @@ namespace Overlay { if (source==InDetOverlay::MCSource) { // MC rdo = mc.begin(); rdoEnd = mc.end(); - } else if (source==InDetOverlay::DataSource) { // Data + } else { // Data rdo = data.begin(); rdoEnd = data.end(); - } else { - parent->msg(MSG::WARNING) << "Invalid source " << source << " in mergeCollectionsNew for SCT" << endmsg; - continue; - } + } // Loop over all RDOs in the wafer - for (; rdo!=rdoEnd; rdo++) { + for (; rdo!=rdoEnd; ++rdo) { const SCT3_RawData* rdo3 = dynamic_cast<const SCT3_RawData*>(*rdo); if (!rdo3) { std::ostringstream os; -- GitLab From e257138cd8fc10efcec7f1668fd95a587dc47af8 Mon Sep 17 00:00:00 2001 From: Shota Hayashida <hayashida@hepl.phys.nagoya-u.ac.jp> Date: Wed, 20 Jun 2018 13:56:31 +0200 Subject: [PATCH 210/562] Add TrigmuCombHypo in mu.menu.py Former-commit-id: 8c6b7a844b2d4dc789dcbd07d75ecc33f919ca65 --- .../python/testTrigMuonHypoConfig.py | 5 +- .../TrigUpgradeTest/python/MenuHypoTools.py | 10 +- .../TrigUpgradeTest/python/muMenuDefs.py | 303 +++++++++--------- .../TrigUpgradeTest/share/mu.menu.py | 10 +- 4 files changed, 173 insertions(+), 155 deletions(-) diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/python/testTrigMuonHypoConfig.py b/Trigger/TrigHypothesis/TrigMuonHypo/python/testTrigMuonHypoConfig.py index 27c00c200511..5af5cd4343e1 100755 --- a/Trigger/TrigHypothesis/TrigMuonHypo/python/testTrigMuonHypoConfig.py +++ b/Trigger/TrigHypothesis/TrigMuonHypo/python/testTrigMuonHypoConfig.py @@ -424,7 +424,8 @@ def TrigmuCombHypoToolFromName( thresholdHLT ): thresholds = config.decodeThreshold( threshold ) print "TrigmuCombHypoConfig: Decoded ", thresholdHLT, " to ", thresholds - tool=config.ConfigurationHypoTool( thresholdHLT, thresholds ) + tight = False + tool=config.ConfigurationHypoTool( thresholdHLT, thresholds, tight ) # Setup MonTool for monitored variables in AthenaMonitoring package TriggerFlags.enableMonitoring = ["Validation"] @@ -526,7 +527,7 @@ class TrigmuCombHypoConfig(): # If the form is muX(inclusive), return as 1 element list return [ threshold[2:] ] - def ConfigrationHypoTool( self, name, thresholdHLT, thresholds, tight ): + def ConfigurationHypoTool( self, thresholdHLT, thresholds, tight ): tool = TrigmuCombHypoTool( thresholdHLT ) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/MenuHypoTools.py b/Trigger/TrigValidation/TrigUpgradeTest/python/MenuHypoTools.py index 435dff4af31c..9cc43091c700 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/MenuHypoTools.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/MenuHypoTools.py @@ -40,11 +40,11 @@ def TrigMufastHypoToolConf(name): def TrigmuCombHypoToolConf(name): from AthenaCommon.Constants import DEBUG - from TrigMuonHypo.testTrigMuonHypoConfig import TrigMufastHypoToolFromName - print "in TrigMufastHypoToolConf" - #TrigMufastHypoToolFromName - hypotool= TrigMufastHypoToolFromName(name) - #hypotool= TrigMufastHypoConfig.TrigMufastHypoToolFromName(name) + from TrigMuonHypo.testTrigMuonHypoConfig import TrigmuCombHypoToolFromName + print "in TrigmuCombHypoToolConf" + #TrigmuCombHypoToolFromName + hypotool= TrigmuCombHypoToolFromName(name) + #hypotool= TrigmuCombHypoConfig.TrigmuCombHypoToolFromName(name) hypotool.OutputLevel = DEBUG return hypotool diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py b/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py index e42bb300df71..137a1c7c4e76 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py @@ -44,9 +44,9 @@ from AthenaCommon.CFElements import parOR, seqAND, seqOR, stepSeq doL2SA=True -doL2CB=False +doL2CB=True doEFSA=False -TriggerFlags.doID=False +#TriggerFlags.doID=False # =============================================================================================== # Setup PrepData @@ -99,6 +99,7 @@ if TriggerFlags.doMuon: l2MuViewsMaker.Views = "MUViewRoIs" l2MuViewsMaker.ViewNodeName = l2MuViewNode.name() + ### It cannot be used because it has not yet been migrated for muon menu ### if doEFSA: efMuViewNode = AthSequencer("efMuViewNode", Sequential=False, ModeOR=False, StopOverride=False) efMuViewsMaker = EventViewCreatorAlgorithm("efMuViewsMaker", OutputLevel=DEBUG) @@ -295,15 +296,15 @@ if TriggerFlags.doMuon: ### muon thresholds ### - testChains = ["HLT_mu6", "HLT_2mu6"] + #testChains = ["HLT_mu6", "HLT_2mu6"] ### set up L1RoIsFilter ### - from DecisionHandling.DecisionHandlingConf import RoRSeqFilter, DumpDecisions - filterL1RoIsAlg = RoRSeqFilter("filterL1RoIsAlg") - filterL1RoIsAlg.Input = ["MURoIDecisions"] - filterL1RoIsAlg.Output = ["FilteredMURoIDecisions"] - filterL1RoIsAlg.Chains = testChains - filterL1RoIsAlg.OutputLevel = DEBUG + #from DecisionHandling.DecisionHandlingConf import RoRSeqFilter, DumpDecisions + #filterL1RoIsAlg = RoRSeqFilter("filterL1RoIsAlg") + #filterL1RoIsAlg.Input = ["MURoIDecisions"] + #filterL1RoIsAlg.Output = ["FilteredMURoIDecisions"] + #filterL1RoIsAlg.Chains = testChains + #filterL1RoIsAlg.OutputLevel = DEBUG # =============================================================================================== @@ -336,7 +337,7 @@ if TriggerFlags.doMuon: l2muFast_HLTSequence = HLTRecoSequence("l2muFast_HLTSequence", Sequence=l2muFastSequence, - Maker=l2MuViewsMaker, + Maker=l2MuViewsMaker, Seed="L1MU") muFastStep = MenuSequence("muFastStep", @@ -351,23 +352,32 @@ if TriggerFlags.doMuon: if doL2CB: ### RoRSeqFilter step2 ### - filterL2SAAlg = RoRSeqFilter("filterL2SAAlg") - filterL2SAAlg.Input = [trigMufastHypo.Decisions] - filterL2SAAlg.Output = ["Filtered"+trigMufastHypo.Decisions] - filterL2SAAlg.Chains = testChains - filterL2SAAlg.OutputLevel = DEBUG - - l2muCombViewNode = AthSequencer("l2muCombViewNode", Sequential=False, ModeOR=False, StopOverride=False) + #filterL2SAAlg = RoRSeqFilter("filterL2SAAlg") + #filterL2SAAlg.Input = [trigMufastHypo.Decisions] + #filterL2SAAlg.Output = ["Filtered"+trigMufastHypo.Decisions] + #filterL2SAAlg.Chains = testChains + #filterL2SAAlg.OutputLevel = DEBUG + + #l2muCombViewNode = AthSequencer("l2muCombViewNode", Sequential=False, ModeOR=False, StopOverride=False) + #l2muCombViewsMaker = EventViewCreatorAlgorithm("l2muCombViewsMaker", OutputLevel=DEBUG) + #l2muCombViewsMaker.ViewFallThrough = True + + #l2muCombViewsMaker.InputMakerInputDecisions = [ filterL2SAAlg.Output[0] ] # Output of TrigMufastHypo + #l2muCombViewsMaker.InputMakerOutputDecisions = [ filterL2SAAlg.Output[0]+"Comb" ] # Output of TrigMufastHypo + #l2muCombViewsMaker.RoIsLink = "roi" # -||- + #l2muCombViewsMaker.InViewRoIs = "MUTrkRoIs" # contract with the consumer + #l2muCombViewsMaker.Views = "MUTrkViewRoIs" + #l2muCombViewsMaker.ViewNodeName = l2muCombViewNode.name() + + l2muCombViewNode = seqAND("l2muCombViewNode") l2muCombViewsMaker = EventViewCreatorAlgorithm("l2muCombViewsMaker", OutputLevel=DEBUG) l2muCombViewsMaker.ViewFallThrough = True - - l2muCombViewsMaker.InputMakerInputDecisions = [ filterL2SAAlg.Output[0] ] # Output of TrigMufastHypo - l2muCombViewsMaker.InputMakerOutputDecisions = [ filterL2SAAlg.Output[0]+"Comb" ] # Output of TrigMufastHypo l2muCombViewsMaker.RoIsLink = "roi" # -||- l2muCombViewsMaker.InViewRoIs = "MUTrkRoIs" # contract with the consumer l2muCombViewsMaker.Views = "MUTrkViewRoIs" l2muCombViewsMaker.ViewNodeName = l2muCombViewNode.name() + ### Define input data of Inner Detector algorithms ### ### and Define EventViewNodes to run the algprithms ### TrackParticlesName = "" @@ -396,139 +406,142 @@ if TriggerFlags.doMuon: from TrigMuonHypo.TrigMuonHypoConfig import TrigmuCombHypoConfig trigmuCombHypo = TrigmuCombHypoConfig("L2muCombHypoAlg") trigmuCombHypo.OutputLevel = DEBUG - - trigmuCombHypo.Decisions = "MuonL2CBDecisions" - trigmuCombHypo.L2MuonFastDecisions = trigMufastHypo.Decisions - trigmuCombHypo.ViewRoIs = l2muCombViewsMaker.Views trigmuCombHypo.MuonL2CBInfoFromMuCombAlg = muCombAlg.L2CombinedMuonContainerName - trigmuCombHypo.HypoTools = [ trigmuCombHypo.TrigmuCombHypoToolFromName( "L2muCombHypoTool", c ) for c in testChains ] - - muCombDecisionsDumper = DumpDecisions("muCombDecisionsDumper", OutputLevel=DEBUG, Decisions = trigmuCombHypo.Decisions ) - - ### Define a Sequence to run for muComb ### - l2muCombSequence = seqAND("l2muCombSequence", eventAlgs + [l2muCombViewsMaker, l2muCombViewNode, trigmuCombHypo ] ) - muCombStep = stepSeq("muCombStep", filterL2SAAlg, [ l2muCombSequence, muCombDecisionsDumper ] ) - - -# =============================================================================================== -# Setup EFMuonSA -# =============================================================================================== - - if doEFSA: - ### RoRSeqFilter step2 ### - filterEFSAAlg = RoRSeqFilter("filterEFSAAlg") - filterEFSAAlg.Input = [trigmuCombHypo.Decisions] - filterEFSAAlg.Output = ["Filtered"+trigmuCombHypo.Decisions] - filterEFSAAlg.Chains = testChains - filterEFSAAlg.OutputLevel = DEBUG - - from TrkDetDescrSvc.TrkDetDescrSvcConf import Trk__TrackingVolumesSvc - ServiceMgr += Trk__TrackingVolumesSvc("TrackingVolumesSvc",BuildVolumesFromTagInfo = False) - - theSegmentFinder = CfgGetter.getPublicToolClone("MuonSegmentFinder","MooSegmentFinder") - theSegmentFinder.DoSummary=True - CfgGetter.getPublicTool("MuonLayerHoughTool").DoTruth=False - theSegmentFinderAlg=CfgMgr.MooSegmentFinderAlg( "MuonSegmentMaker", - SegmentFinder=theSegmentFinder, - MuonSegmentOutputLocation = "MooreSegments", - UseCSC = muonRecFlags.doCSCs(), - UseMDT = muonRecFlags.doMDTs(), - UseRPC = muonRecFlags.doRPCs(), - UseTGC = muonRecFlags.doTGCs(), - doClusterTruth=False, - UseTGCPriorBC = False, - UseTGCNextBC = False, - doTGCClust = muonRecFlags.doTGCClusterSegmentFinding(), - doRPCClust = muonRecFlags.doRPCClusterSegmentFinding(), OutputLevel=DEBUG ) - - - - theNCBSegmentFinderAlg=CfgMgr.MooSegmentFinderAlg( "MuonSegmentMaker_NCB", - SegmentFinder = getPublicToolClone("MooSegmentFinder_NCB","MuonSegmentFinder", - DoSummary=False, - Csc2dSegmentMaker = getPublicToolClone("Csc2dSegmentMaker_NCB","Csc2dSegmentMaker", - segmentTool = getPublicToolClone("CscSegmentUtilTool_NCB", - "CscSegmentUtilTool", - TightenChi2 = False, - IPconstraint=False)), - Csc4dSegmentMaker = getPublicToolClone("Csc4dSegmentMaker_NCB","Csc4dSegmentMaker", - segmentTool = getPublicTool("CscSegmentUtilTool_NCB")), - DoMdtSegments=False,DoSegmentCombinations=False,DoSegmentCombinationCleaning=False), - MuonPatternCombinationLocation = "NCB_MuonHoughPatternCombinations", - MuonSegmentOutputLocation = "NCB_MuonSegments", - MuonSegmentCombinationOutputLocation = "NCB_MooreSegmentCombinations", - UseCSC = muonRecFlags.doCSCs(), - UseMDT = False, - UseRPC = False, - UseTGC = False, - UseTGCPriorBC = False, - UseTGCNextBC = False, - doTGCClust = False, - doRPCClust = False) - - from MuonRecExample.MuonStandalone import MuonTrackSteering - MuonTrackSteering.DoSummary=True - MuonTrackSteering.DoSummary=DEBUG - TrackBuilder = CfgMgr.MuPatTrackBuilder("MuPatTrackBuilder" ) - TrackBuilder.TrackSteering=CfgGetter.getPublicToolClone("MuonTrackSteering", "MuonTrackSteering") - - from AthenaCommon.Include import include - include("InDetBeamSpotService/BeamCondSvc.py" ) - from xAODTrackingCnv.xAODTrackingCnvConf import xAODMaker__TrackParticleCnvAlg, xAODMaker__TrackCollectionCnvTool, xAODMaker__RecTrackParticleContainerCnvTool - - muonParticleCreatorTool = getPublicTool("MuonParticleCreatorTool") - - muonTrackCollectionCnvTool = xAODMaker__TrackCollectionCnvTool( name = "MuonTrackCollectionCnvTool", TrackParticleCreator = muonParticleCreatorTool ) - - muonRecTrackParticleContainerCnvTool = xAODMaker__RecTrackParticleContainerCnvTool(name = "MuonRecTrackParticleContainerCnvTool", TrackParticleCreator = muonParticleCreatorTool ) - - xAODTrackParticleCnvAlg = xAODMaker__TrackParticleCnvAlg( name = "MuonStandaloneTrackParticleCnvAlg", - TrackParticleCreator = muonParticleCreatorTool, - TrackCollectionCnvTool=muonTrackCollectionCnvTool, - RecTrackParticleContainerCnvTool = muonRecTrackParticleContainerCnvTool, - TrackContainerName = "MuonSpectrometerTracks", - xAODTrackParticlesFromTracksContainerName = "MuonSpectrometerTrackParticles", - ConvertTrackParticles = False, - ConvertTracks = True) - - - thetrkbuilder = getPublicToolClone("CombinedMuonTrackBuilder_SA", "CombinedMuonTrackBuilder", MuonHoleRecovery="", CaloMaterialProvider='TMEF_TrkMaterialProviderTool') + l2muCombSequence = seqAND("l2muCombSequence", eventAlgs + [l2muCombViewsMaker, l2muCombViewNode ] ) - theCandidateTool = getPublicToolClone("MuonCandidateTool_SA", "MuonCandidateTool", TrackBuilder=thetrkbuilder) - theMuonCandidateAlg=CfgMgr.MuonCombinedMuonCandidateAlg("MuonCandidateAlg",MuonCandidateTool=theCandidateTool) + l2muComb_HLTSequence = HLTRecoSequence("l2muFast_HLTSequence", + Sequence=l2muCombSequence, + Maker=l2MuViewsMaker, + Seed="L1MU") - thecreatortool= getPublicToolClone("MuonCreatorTool_SA", "MuonCreatorTool", ScatteringAngleTool="", CaloMaterialProvider='TMEF_TrkMaterialProviderTool', MuonSelectionTool="", FillTimingInformation=False, OutputLevel=DEBUG) - - themuoncreatoralg = CfgMgr.MuonCreatorAlg("MuonCreatorAlg") - themuoncreatoralg.MuonCreatorTool=thecreatortool - themuoncreatoralg.CreateSAmuons=True - themuoncreatoralg.ClusterContainerName="" - - #Algorithms to views - efMuViewNode += theSegmentFinderAlg -# efMuViewNode += theNCBSegmentFinderAlg #The configuration still needs some sorting out for this so disabled for now. - efMuViewNode += TrackBuilder - efMuViewNode += xAODTrackParticleCnvAlg - efMuViewNode += theMuonCandidateAlg - efMuViewNode += themuoncreatoralg - - #Setup MS-only hypo - from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFMSonlyHypoConfig - trigMuonEFSAHypo = TrigMuonEFMSonlyHypoConfig("MuonEFSAHypoAlg") - trigMuonEFSAHypo.OutputLevel = DEBUG + muCombStep = MenuSequence("muCombStep", + recoSeqList=[l2muComb_HLTSequence], + Hypo=trigmuCombHypo, + HypoToolClassName="TrigmuCombHypoToolConf") - trigMuonEFSAHypo.ViewRoIs = efMuViewsMaker.Views - trigMuonEFSAHypo.MuonDecisions = "Muons" - trigMuonEFSAHypo.RoIs = efMuViewsMaker.InViewRoIs - trigMuonEFSAHypo.Decisions = "EFMuonSADecisions" - trigMuonEFSAHypo.L1Decisions = efMuViewsMaker.InputMakerInputDecisions[0] - trigMuonEFSAHypo.HypoTools = [ trigMuonEFSAHypo.TrigMuonEFMSonlyHypoToolFromName( "TrigMuonEFMSonlyHypoTool", c ) for c in testChains ] +# =============================================================================================== +# Setup EFMuonSA +# =============================================================================================== - muonEFSADecisionsDumper = DumpDecisions("muonEFSADecisionsDumper", OutputLevel=DEBUG, Decisions = trigMuonEFSAHypo.Decisions ) - muonEFSAStep = seqAND("muonEFSAStep", [filterEFSAAlg, efMuViewsMaker, efMuViewNode, trigMuonEFSAHypo, muonEFSADecisionsDumper]) + ### It cannot be used because it has not yet been migrated for muon menu ### + +# if doEFSA: +# ### RoRSeqFilter step2 ### +# filterEFSAAlg = RoRSeqFilter("filterEFSAAlg") +# filterEFSAAlg.Input = [trigmuCombHypo.Decisions] +# filterEFSAAlg.Output = ["Filtered"+trigmuCombHypo.Decisions] +# filterEFSAAlg.Chains = testChains +# filterEFSAAlg.OutputLevel = DEBUG +# +# from TrkDetDescrSvc.TrkDetDescrSvcConf import Trk__TrackingVolumesSvc +# ServiceMgr += Trk__TrackingVolumesSvc("TrackingVolumesSvc",BuildVolumesFromTagInfo = False) +# +# theSegmentFinder = CfgGetter.getPublicToolClone("MuonSegmentFinder","MooSegmentFinder") +# theSegmentFinder.DoSummary=True +# CfgGetter.getPublicTool("MuonLayerHoughTool").DoTruth=False +# theSegmentFinderAlg=CfgMgr.MooSegmentFinderAlg( "MuonSegmentMaker", +# SegmentFinder=theSegmentFinder, +# MuonSegmentOutputLocation = "MooreSegments", +# UseCSC = muonRecFlags.doCSCs(), +# UseMDT = muonRecFlags.doMDTs(), +# UseRPC = muonRecFlags.doRPCs(), +# UseTGC = muonRecFlags.doTGCs(), +# doClusterTruth=False, +# UseTGCPriorBC = False, +# UseTGCNextBC = False, +# doTGCClust = muonRecFlags.doTGCClusterSegmentFinding(), +# doRPCClust = muonRecFlags.doRPCClusterSegmentFinding(), OutputLevel=DEBUG ) +# +# +# +# theNCBSegmentFinderAlg=CfgMgr.MooSegmentFinderAlg( "MuonSegmentMaker_NCB", +# SegmentFinder = getPublicToolClone("MooSegmentFinder_NCB","MuonSegmentFinder", +# DoSummary=False, +# Csc2dSegmentMaker = getPublicToolClone("Csc2dSegmentMaker_NCB","Csc2dSegmentMaker", +# segmentTool = getPublicToolClone("CscSegmentUtilTool_NCB", +# "CscSegmentUtilTool", +# TightenChi2 = False, +# IPconstraint=False)), +# Csc4dSegmentMaker = getPublicToolClone("Csc4dSegmentMaker_NCB","Csc4dSegmentMaker", +# segmentTool = getPublicTool("CscSegmentUtilTool_NCB")), +# DoMdtSegments=False,DoSegmentCombinations=False,DoSegmentCombinationCleaning=False), +# MuonPatternCombinationLocation = "NCB_MuonHoughPatternCombinations", +# MuonSegmentOutputLocation = "NCB_MuonSegments", +# MuonSegmentCombinationOutputLocation = "NCB_MooreSegmentCombinations", +# UseCSC = muonRecFlags.doCSCs(), +# UseMDT = False, +# UseRPC = False, +# UseTGC = False, +# UseTGCPriorBC = False, +# UseTGCNextBC = False, +# doTGCClust = False, +# doRPCClust = False) +# +# from MuonRecExample.MuonStandalone import MuonTrackSteering +# MuonTrackSteering.DoSummary=True +# MuonTrackSteering.DoSummary=DEBUG +# TrackBuilder = CfgMgr.MuPatTrackBuilder("MuPatTrackBuilder" ) +# TrackBuilder.TrackSteering=CfgGetter.getPublicToolClone("MuonTrackSteering", "MuonTrackSteering") +# +# from AthenaCommon.Include import include +# include("InDetBeamSpotService/BeamCondSvc.py" ) +# from xAODTrackingCnv.xAODTrackingCnvConf import xAODMaker__TrackParticleCnvAlg, xAODMaker__TrackCollectionCnvTool, xAODMaker__RecTrackParticleContainerCnvTool +# +# muonParticleCreatorTool = getPublicTool("MuonParticleCreatorTool") +# +# muonTrackCollectionCnvTool = xAODMaker__TrackCollectionCnvTool( name = "MuonTrackCollectionCnvTool", TrackParticleCreator = muonParticleCreatorTool ) +# +# muonRecTrackParticleContainerCnvTool = xAODMaker__RecTrackParticleContainerCnvTool(name = "MuonRecTrackParticleContainerCnvTool", TrackParticleCreator = muonParticleCreatorTool ) +# +# xAODTrackParticleCnvAlg = xAODMaker__TrackParticleCnvAlg( name = "MuonStandaloneTrackParticleCnvAlg", +# TrackParticleCreator = muonParticleCreatorTool, +# TrackCollectionCnvTool=muonTrackCollectionCnvTool, +# RecTrackParticleContainerCnvTool = muonRecTrackParticleContainerCnvTool, +# TrackContainerName = "MuonSpectrometerTracks", +# xAODTrackParticlesFromTracksContainerName = "MuonSpectrometerTrackParticles", +# ConvertTrackParticles = False, +# ConvertTracks = True) +# +# +# thetrkbuilder = getPublicToolClone("CombinedMuonTrackBuilder_SA", "CombinedMuonTrackBuilder", MuonHoleRecovery="", CaloMaterialProvider='TMEF_TrkMaterialProviderTool') +# +# theCandidateTool = getPublicToolClone("MuonCandidateTool_SA", "MuonCandidateTool", TrackBuilder=thetrkbuilder) +# theMuonCandidateAlg=CfgMgr.MuonCombinedMuonCandidateAlg("MuonCandidateAlg",MuonCandidateTool=theCandidateTool) +# +# +# thecreatortool= getPublicToolClone("MuonCreatorTool_SA", "MuonCreatorTool", ScatteringAngleTool="", CaloMaterialProvider='TMEF_TrkMaterialProviderTool', MuonSelectionTool="", FillTimingInformation=False, OutputLevel=DEBUG) +# +# themuoncreatoralg = CfgMgr.MuonCreatorAlg("MuonCreatorAlg") +# themuoncreatoralg.MuonCreatorTool=thecreatortool +# themuoncreatoralg.CreateSAmuons=True +# themuoncreatoralg.ClusterContainerName="" +# +# #Algorithms to views +# efMuViewNode += theSegmentFinderAlg +## efMuViewNode += theNCBSegmentFinderAlg #The configuration still needs some sorting out for this so disabled for now. +# efMuViewNode += TrackBuilder +# efMuViewNode += xAODTrackParticleCnvAlg +# efMuViewNode += theMuonCandidateAlg +# efMuViewNode += themuoncreatoralg +# +# #Setup MS-only hypo +# from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFMSonlyHypoConfig +# trigMuonEFSAHypo = TrigMuonEFMSonlyHypoConfig("MuonEFSAHypoAlg") +# trigMuonEFSAHypo.OutputLevel = DEBUG +# +# trigMuonEFSAHypo.ViewRoIs = efMuViewsMaker.Views +# trigMuonEFSAHypo.MuonDecisions = "Muons" +# trigMuonEFSAHypo.RoIs = efMuViewsMaker.InViewRoIs +# trigMuonEFSAHypo.Decisions = "EFMuonSADecisions" +# trigMuonEFSAHypo.L1Decisions = efMuViewsMaker.InputMakerInputDecisions[0] +# +# trigMuonEFSAHypo.HypoTools = [ trigMuonEFSAHypo.TrigMuonEFMSonlyHypoToolFromName( "TrigMuonEFMSonlyHypoTool", c ) for c in testChains ] +# +# muonEFSADecisionsDumper = DumpDecisions("muonEFSADecisionsDumper", OutputLevel=DEBUG, Decisions = trigMuonEFSAHypo.Decisions ) +# muonEFSAStep = seqAND("muonEFSAStep", [filterEFSAAlg, efMuViewsMaker, efMuViewNode, trigMuonEFSAHypo, muonEFSADecisionsDumper]) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py index a4309746227e..bdee5716aa6a 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py @@ -83,7 +83,7 @@ if TriggerFlags.doMuon==True: # menu from TrigUpgradeTest.MenuComponents import Chain, ChainStep - from TrigUpgradeTest.muMenuDefs import muFastStep, doL2SA, doL2CB, doEFSA + from TrigUpgradeTest.muMenuDefs import muFastStep, muCombStep, doL2SA, doL2CB, doEFSA MenuChains = [] @@ -96,9 +96,13 @@ if TriggerFlags.doMuon==True: MenuChains += [Chain(name='HLT_mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]) ])] elif TriggerFlags.doID==True: if doL2SA==True and doL2CB==True and doEFSA==False: - MenuChains += [Chain(name='HLT_mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]) ])] + MenuChains += [Chain(name='HLT_mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]), + ChainStep("Step2_muComb", [muCombStep]) ])] + #MenuChains += [Chain(name='HLT_2mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]), + # ChainStep("Step2_muComb", [muCombStep]) ])] if doL2SA==True and doEFSA==True and doL2CB==True: - MenuChains += [Chain(name='HLT_mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]) ])] + MenuChains += [Chain(name='HLT_mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]), + ChainStep("Step2_muComb", [muCombStep]) ])] -- GitLab From a8cd13ca7cc10cf0bba35b1ec0a60b1da01649fe Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Wed, 20 Jun 2018 14:41:36 +0200 Subject: [PATCH 211/562] Extended L1 Jet RoIs unpacking to create the FS RoI object in addition to many RoIs created per every L1 J candidate Former-commit-id: c04838a2fa938f402bdecfa404b6e1e342fcfec4 --- .../L1Decoder/src/JRoIsUnpackingTool.cxx | 26 +++++++++++++++++++ .../L1Decoder/src/JRoIsUnpackingTool.h | 13 ++++++++-- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.cxx b/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.cxx index ce6f7cee0358..e119c362a45b 100644 --- a/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.cxx +++ b/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.cxx @@ -19,6 +19,7 @@ StatusCode JRoIsUnpackingTool::initialize() { ATH_CHECK( RoIsUnpackingToolBase::initialize() ); ATH_CHECK( m_configSvc.retrieve() ); ATH_CHECK( m_trigRoIsKey.initialize() ); + ATH_CHECK( m_trigFSRoIsKey.initialize() ); ATH_CHECK( m_recRoIsKey.initialize() ); return StatusCode::SUCCESS; @@ -46,6 +47,22 @@ StatusCode JRoIsUnpackingTool::unpack( const EventContext& ctx, auto recRoIs = std::make_unique< DataVector<LVL1::RecJetRoI> >(); + // Additional FS RoI tagged with the decisions of all chains + auto trigFSRoIs = std::make_unique< TrigRoiDescriptorCollection >(); + trigFSRoIs->push_back( new TrigRoiDescriptor() ); // the argument-less c'tor is crating the FS RoI + auto fsDecisionOutput = std::make_unique<DecisionContainer>(); + auto fsDecisionAux = std::make_unique<DecisionAuxContainer>(); + fsDecisionOutput->setStore( fsDecisionAux.get() ); + Decision* fsDecision = newDecisionIn( fsDecisionOutput.get() ); + fsDecision->setObjectLink( "initialRoI", ElementLink<TrigRoiDescriptorCollection>( m_trigFSRoIsKey.key(), 0 ) ); + for ( auto thresholdChainsPair: m_thresholdToChainMapping ) + for ( auto chain: thresholdChainsPair.second ) + addChainsToDecision( chain, fsDecision, activeChains ); + + for ( const auto id: decisionIDs( fsDecision ) ) { // it is suboptimal to make this loop if we are not in debug mode, fixme + ATH_MSG_DEBUG( "FS Jet RoI tagged with decision " << HLT::Identifier( id ) ); + } + // RoIBResult contains vector of TAU fragments for ( auto& jetFragment : roib.jetEnergyResult() ) { for ( auto& roi : jetFragment.roIVec() ) { @@ -111,6 +128,15 @@ StatusCode JRoIsUnpackingTool::unpack( const EventContext& ctx, auto handle = SG::makeHandle( m_decisionsKey, ctx ); ATH_CHECK ( handle.record( std::move( decisionOutput ), std::move( decisionAux ) ) ); } + { + auto handle = SG::makeHandle( m_trigFSRoIsKey, ctx ); + ATH_CHECK( handle.record ( std::move( trigFSRoIs ) ) ); + } + { + auto handle = SG::makeHandle( m_fsDecisions, ctx ); + ATH_CHECK( handle.record ( std::move( fsDecisionOutput ), std::move( fsDecisionAux ) ) ); + } + return StatusCode::SUCCESS; // what else } diff --git a/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.h b/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.h index 4daeed4f1ff4..aff039ae857d 100644 --- a/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.h +++ b/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.h @@ -12,7 +12,7 @@ #include "TrigSteeringEvent/TrigRoiDescriptorCollection.h" #include "AthenaMonitoring/GenericMonitoringTool.h" #include "GaudiKernel/ServiceHandle.h" - +#include "DecisionHandling/TrigCompositeUtils.h" #include "RoIsUnpackingToolBase.h" @@ -35,10 +35,19 @@ private: SG::WriteHandleKey<TrigRoiDescriptorCollection> m_trigRoIsKey{ this, "OutputTrigRoIs", "JETRoIs", "Name of the RoIs object produced by the unpacker"}; + SG::WriteHandleKey<TrigRoiDescriptorCollection> m_trigFSRoIsKey{ + this, "OutputFSTrigRoIs", "FSJETRoIs", "Name of the RoIs object containing the single FS RoI tagged with all jet chains produced by the unpacker"}; + + SG::WriteHandleKey< DataVector<LVL1::RecJetRoI> > m_recRoIsKey{ this, "OutputRecRoIs", "RecJETRoIs", "Name of the RoIs object produced by the unpacker"}; - Gaudi::Property<float> m_roIWidth{this, "RoIWidth", 0.4, "Size of RoI in eta/ phi"}; + SG::WriteHandleKey< TrigCompositeUtils::DecisionContainer > m_fsDecisions{ + this, "FSDecisions", "FSJetDecisions", "Decisions for the single FS RoI" + }; + + Gaudi::Property<float> m_roIWidth{ + this, "RoIWidth", 0.4, "Size of RoI in eta/ phi"}; ///@} ServiceHandle<TrigConf::ILVL1ConfigSvc> m_configSvc; -- GitLab From dd2c2e5034a345753c8a605689b9e52d2e49b70f Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Wed, 20 Jun 2018 15:47:17 +0200 Subject: [PATCH 212/562] Cleared scope Former-commit-id: ad506fee33a03a27474e49c9f5bed6070589e8e9 --- Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.cxx b/Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.cxx index db7ae18342ec..cc64f4bb74ab 100644 --- a/Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.cxx +++ b/Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.cxx @@ -55,8 +55,9 @@ void RoIsUnpackingToolBase::addChainsToDecision( HLT::Identifier thresholdId, TrigCompositeUtils::Decision* d, const HLT::IDSet& activeChains ) const { auto chains = m_thresholdToChainMapping.find( thresholdId ); - if ( chains == m_thresholdToChainMapping.end() ) + if ( chains == m_thresholdToChainMapping.end() ) { return; + } for ( auto chainId: chains->second ) { if ( activeChains.find(chainId) != activeChains.end() ) TrigCompositeUtils::addDecisionID( chainId.numeric(), d ); -- GitLab From e3309d44f6087916c0692486b54cbc13ce76bee1 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Wed, 20 Jun 2018 15:47:43 +0200 Subject: [PATCH 213/562] Fixed FS RoI decisions tagging Former-commit-id: 5306a32a039620cbdb8d3c0a38e43410d687f2dd --- .../L1Decoder/src/JRoIsUnpackingTool.cxx | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.cxx b/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.cxx index e119c362a45b..8e2456caad5c 100644 --- a/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.cxx +++ b/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.cxx @@ -21,7 +21,8 @@ StatusCode JRoIsUnpackingTool::initialize() { ATH_CHECK( m_trigRoIsKey.initialize() ); ATH_CHECK( m_trigFSRoIsKey.initialize() ); ATH_CHECK( m_recRoIsKey.initialize() ); - + ATH_CHECK( m_trigFSRoIsKey.initialize() ) ; + ATH_CHECK( m_fsDecisions.initialize() ); return StatusCode::SUCCESS; } @@ -55,14 +56,17 @@ StatusCode JRoIsUnpackingTool::unpack( const EventContext& ctx, fsDecisionOutput->setStore( fsDecisionAux.get() ); Decision* fsDecision = newDecisionIn( fsDecisionOutput.get() ); fsDecision->setObjectLink( "initialRoI", ElementLink<TrigRoiDescriptorCollection>( m_trigFSRoIsKey.key(), 0 ) ); - for ( auto thresholdChainsPair: m_thresholdToChainMapping ) - for ( auto chain: thresholdChainsPair.second ) - addChainsToDecision( chain, fsDecision, activeChains ); - - for ( const auto id: decisionIDs( fsDecision ) ) { // it is suboptimal to make this loop if we are not in debug mode, fixme - ATH_MSG_DEBUG( "FS Jet RoI tagged with decision " << HLT::Identifier( id ) ); - } - + + // here we attempt to add all jet chains to FS RoI, it will be trimmed by the set of active chains + for ( auto thresholdChainsPair: m_thresholdToChainMapping ) { + addChainsToDecision( thresholdChainsPair.first, fsDecision, activeChains ); + } + ATH_MSG_DEBUG( "Stored " << decisionIDs( fsDecision ).size() << " decision in FS RoI" ); + for ( auto chain : decisionIDs( fsDecision ) ) { + ATH_MSG_DEBUG( "Chain decision stored for FS RoI " << HLT::Identifier( chain ) ); + } + + // RoIBResult contains vector of TAU fragments for ( auto& jetFragment : roib.jetEnergyResult() ) { for ( auto& roi : jetFragment.roIVec() ) { -- GitLab From 3c52a2a372270a338b87049548a5cc5cc5f15023 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Wed, 20 Jun 2018 15:48:22 +0200 Subject: [PATCH 214/562] Added Jet decoding Former-commit-id: e4a7485c577ec9e0ea785ab9f2b0271dbba2e51d --- Trigger/TrigValidation/TrigUpgradeTest/python/TestUtils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/TestUtils.py b/Trigger/TrigValidation/TrigUpgradeTest/python/TestUtils.py index 5e1031f1fbaa..1f22f2cc5130 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/TestUtils.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/TestUtils.py @@ -25,6 +25,8 @@ class MenuTest: "68:HLT_xe10", # the item is L1_XE10 "152:HLT_xs20", "50:HLT_te15", # the seed is L1_TE15.0ETA24 + "93:HLT_j85", + "93:HLT_j60", ] EMThresholdToChainMapping = ["EM3 : HLT_e3_etcut", @@ -38,8 +40,8 @@ class MenuTest: TAUThresholdToChainMapping = ["HA8 : HLT_tau10"] - JThresholdToChainMapping = ["J20 : HLT_j30", - "J25 : HLT_j30"] + JThresholdToChainMapping = ["J20 : HLT_j85", + "J20 : HLT_j60"] MUThresholdToChainMapping = ["MU6 : HLT_mu6", "MU6 : HLT_mu6idperf", -- GitLab From 2411887001933e3f530643ab71970b64ff51aa34 Mon Sep 17 00:00:00 2001 From: Shota Hayashida <hayashida@hepl.phys.nagoya-u.ac.jp> Date: Wed, 20 Jun 2018 17:25:58 +0200 Subject: [PATCH 215/562] Rename trigmuCombHypoAlg to avoid to have "Comb" string Former-commit-id: f88dc51bb6bf5488258a550ad054ab1ff39bf64c --- Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py b/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py index 137a1c7c4e76..40df487b1b00 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py @@ -403,8 +403,9 @@ if TriggerFlags.doMuon: l2muCombViewNode += muCombAlg ### set up muCombHypo algorithm ### - from TrigMuonHypo.TrigMuonHypoConfig import TrigmuCombHypoConfig - trigmuCombHypo = TrigmuCombHypoConfig("L2muCombHypoAlg") + from TrigMuonHypo.TrigMuonHypoConf import TrigmuCombHypoAlg + #trigmuCombHypo = TrigmuCombHypoAlg("L2muCombHypoAlg") # avoid to have "Comb" string in the name due to HLTCFConfig.py. + trigmuCombHypo = TrigmuCombHypoAlg("L2muHypoAlg") trigmuCombHypo.OutputLevel = DEBUG trigmuCombHypo.MuonL2CBInfoFromMuCombAlg = muCombAlg.L2CombinedMuonContainerName -- GitLab From 4104ebe74ea07331272f4c9fc2d5c58f6931a22e Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Wed, 20 Jun 2018 18:07:41 +0000 Subject: [PATCH 216/562] Merge branch '21.0-digiFlag' into '21.0' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that Pixel Radiation Damage Digitizer is available in 21.0, use existing… See merge request atlas/athena!12045 (cherry picked from commit 797b5c4288a1cfbe7cbccd3e86ce0abf03639c8d [formerly be20518f5f3f20f9690da5a927f40fcfba75e421]) 168dbcca Now that Pixel Radiation Damage Digitizer is available in 21.0, use existing… Former-commit-id: 6f5145618d2418f43698c901c7c10fc62117daf8 --- Event/EventContainers/test/ID_ContainerTest.h | 0 Simulation/Digitization/python/DigiAlgConfig.py | 2 ++ 2 files changed, 2 insertions(+) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 diff --git a/Simulation/Digitization/python/DigiAlgConfig.py b/Simulation/Digitization/python/DigiAlgConfig.py index 80b16aff41d9..8d63a9d93138 100644 --- a/Simulation/Digitization/python/DigiAlgConfig.py +++ b/Simulation/Digitization/python/DigiAlgConfig.py @@ -85,6 +85,8 @@ def getStandardInDetPileUpTools(): PileUpToolsList += [ "PixelLightDigitizationTool" ] elif 'doSmearedPixelDigi' in digitizationFlags.experimentalDigi(): PileUpToolsList += [ "PixelSmearedDigitizationTool" ] + elif digitizationFlags.doRadiationDamage(): + PileUpToolsList += [ "PixelRadDamDigitizationTool" ] else: PileUpToolsList += [ "PixelDigitizationTool" ] if DetFlags.digitize.SCT_on(): -- GitLab From 0e9b6edcd5342e6231ef3ab2a668b3fdb29336e0 Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Wed, 20 Jun 2018 18:06:50 +0000 Subject: [PATCH 217/562] Merge branch 'ART_TESTS_v4' into '21.0' Removed whitespace on FastChain jobs and did some minor cosmetic cleanups See merge request atlas/athena!12158 (cherry picked from commit 79323265db6742361b864a5ac903d7a1dfe5022d [formerly 1e700abaa53aaf27fce20dfd5f8bbaff63ae36f5]) 39aad760 Removed whitespace on FastChain jobs and did some minor cosmetic cleanups Former-commit-id: 5c655c670a672e712604fc0346f281afd668357a --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../test/test_stdReco_fastSim_fullDigi.sh | 24 ++++++++- .../test/test_stdReco_fullSim_fullDigi.sh | 31 +++++++++--- .../test/test_ttFC_fastSim_fastDigi.sh | 25 ++++++++-- .../test/test_ttFC_fastSim_fullDigi.sh | 31 +++++++++--- .../test/test_ttFC_fullHS_fastPU_simDigi.sh | 36 ++++++++++---- .../test/test_ttFC_fullSim_fullDigi.sh | 26 +++++++--- .../test_ttFC_reco_Split_fastSim_fastDigi.sh | 11 +++-- .../test_ttFC_reco_Split_fastSim_fullDigi.sh | 8 +-- ...t_ttFC_reco_Split_fullHS_fastPU_simDigi.sh | 12 ++--- ...co_newTracking_PseudoT_fastSim_fastDigi.sh | 44 ++++++++++++----- ...co_newTracking_PseudoT_fastSim_fullDigi.sh | 37 ++++++++++---- ...co_newTracking_PseudoT_fullSim_fullDigi.sh | 40 +++++++++++---- ...C_reco_noSplit_PseudoT_fastSim_fastDigi.sh | 39 ++++++++++++--- ...C_reco_noSplit_PseudoT_fastSim_fullDigi.sh | 43 +++++++++++----- ...C_reco_noSplit_PseudoT_fullSim_fullDigi.sh | 32 +++++++++--- ...reco_noSplit_noPseudoT_fastSim_fastDigi.sh | 39 +++++++++++---- ...reco_noSplit_noPseudoT_fastSim_fullDigi.sh | 43 +++++++++++----- ...reco_noSplit_noPseudoT_fullSim_fullDigi.sh | 37 +++++++++++--- ...C_reco_noSplit_noPseudoT_stdFullSimDigi.sh | 49 +++++++++++++++---- 20 files changed, 464 insertions(+), 143 deletions(-) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_stdReco_fastSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_stdReco_fastSim_fullDigi.sh index b2449653f708..584ccae9ea84 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_stdReco_fastSim_fullDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_stdReco_fastSim_fullDigi.sh @@ -8,11 +8,31 @@ # Also include temporary branch 21.3-hmpl # art-include: 21.3-hmpl/Athena -FastChain_tf.py --simulator ATLFASTIIF_PileUp --digiSteeringConf "SplitNoMerge" --useISF True --randomSeed 123 --enableLooperKiller True --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root --outputRDOFile RDO_pileup_fastsim_fulldigi.pool.root --maxEvents 100 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' --preSimInclude FastChainPileup/FastPileup.py --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' --DataRunNumber '284500' --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' +FastChain_tf.py --simulator ATLFASTIIF_PileUp \ + --digiSteeringConf "SplitNoMerge" \ + --useISF True \ + --randomSeed 123 \ + --enableLooperKiller True \ + --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root \ + --outputRDOFile RDO_pileup_fastsim_fulldigi.pool.root \ + --maxEvents 100 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \ + --preSimInclude FastChainPileup/FastPileup.py \ + --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \ + --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \ + --DataRunNumber '284500' \ + --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' echo "art-result: $? RDO step" -Reco_tf.py --inputRDOFile='RDO_pileup_fastsim_fulldigi.pool.root' --outputAODFile=AOD_fastSim_fullDigi.pool.root --autoConfiguration=everything --maxEvents=500 --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True)" +Reco_tf.py --inputRDOFile='RDO_pileup_fastsim_fulldigi.pool.root'\ + --outputAODFile=AOD_fastSim_fullDigi.pool.root \ + --autoConfiguration=everything \ + --maxEvents=500 \ + --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True)" echo "art-result: $? ESD step" diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_stdReco_fullSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_stdReco_fullSim_fullDigi.sh index 1a654beb343d..e74a0fc0f070 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_stdReco_fullSim_fullDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_stdReco_fullSim_fullDigi.sh @@ -4,15 +4,34 @@ # art-type: grid # specify branches of athena that are being targeted: -# art-include: 21.0/Athena -# art-include: 21.3/Athena -# Also include temporary branch 21.3-hmpl -# art-include: 21.3-hmpl/Athena -FastChain_tf.py --simulator ATLFASTII --digiSteeringConf "SplitNoMerge" --useISF True --randomSeed 123 --enableLooperKiller True --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root --outputRDOFile RDO_pileup_fullsim_fulldigi.pool.root --maxEvents 50 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest.py,DigitizationTests/postInclude.RDO_Plots.py' --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' --DataRunNumber '284500' +# art-include: 21.0/Athena +# art-include: 21.3/Athena +# Also include temporary branch 21.3-hmpl + +# art-include: 21.3-hmpl/Athena +FastChain_tf.py --simulator ATLFASTII \ + --digiSteeringConf "SplitNoMerge" \ + --useISF True \ + --randomSeed 123 \ + --enableLooperKiller True \ + --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root \ + --outputRDOFile RDO_pileup_fullsim_fulldigi.pool.root \ + --maxEvents 50 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \ + --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest.py,DigitizationTests/postInclude.RDO_Plots.py' \ + --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \ + --DataRunNumber '284500' echo "art-result: $? RDO step" -Reco_tf.py --inputRDOFile=RDO_pileup_fullsim_fulldigi.pool.root --outputAODFile=AOD_fullSim_fullDigi.pool.root --autoConfiguration=everything --maxEvents=500 --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True)" +Reco_tf.py --inputRDOFile=RDO_pileup_fullsim_fulldigi.pool.root \ + --outputAODFile=AOD_fullSim_fullDigi.pool.root \ + --autoConfiguration=everything \ + --maxEvents=500 \ + --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True)" echo "art-result: $? ESD step" #add an additional payload from the job (corollary file). diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fastSim_fastDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fastSim_fastDigi.sh index 967bdbb31100..e511e626049d 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fastSim_fastDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fastSim_fastDigi.sh @@ -3,11 +3,28 @@ # art-type: grid # specify branches of athena that are being targeted: -# art-include: 21.0/Athena -# art-include: 21.3/Athena +# art-include: 21.0/Athena + +# art-include: 21.3/Athena # Also include temporary branch 21.3-hmpl -# art-include: 21.3-hmpl/Athena -FastChain_tf.py --simulator ATLFASTIIF_PileUp --digiSteeringConf "SplitNoMergeFF" --useISF True --randomSeed 123 --enableLooperKiller True --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root --outputRDOFile RDO_pileup_fastsim_fastdigi.pool.root --maxEvents 100 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' --preSimInclude FastChainPileup/FastPileup.py --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' --DataRunNumber '284500' --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py" +# art-include: 21.3-hmpl/Athena +FastChain_tf.py --simulator ATLFASTIIF_PileUp \ + --digiSteeringConf "SplitNoMergeFF" \ + --useISF True \ + --randomSeed 123 \ + --enableLooperKiller True \ + --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root \ + --outputRDOFile RDO_pileup_fastsim_fastdigi.pool.root \ + --maxEvents 100 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' --preSimInclude FastChainPileup/FastPileup.py \ + --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \ + --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \ + --DataRunNumber '284500' \ + --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' \ + --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py" echo "art-result: $? evgen to RDO step" ArtPackage=$1 diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fastSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fastSim_fullDigi.sh index c8e6a4d94af8..ad28b1bba058 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fastSim_fullDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fastSim_fullDigi.sh @@ -2,13 +2,30 @@ # art-description: test for job configuration ttFC_fastSim_fulldigi (Sim/Digi job) # art-type: grid # -# specify branches of athena that are being targeted: -# art-include: 21.0/Athena -# art-include: 21.3/Athena -# Also include temporary branch 21.3-hmpl -# art-include: 21.3-hmpl/Athena +# specify branches of athena that are being targeted: +# +# art-include: 21.0/Athena +# art-include: 21.3/Athena +# +# Also include temporary branch 21.3-hmpl +# art-include: 21.3-hmpl/Athena -FastChain_tf.py --simulator ATLFASTIIF_PileUp --digiSteeringConf "SplitNoMerge" --useISF True --randomSeed 123 --enableLooperKiller True --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root --outputRDOFile RDO_pileup_fastsim_fulldigi.pool.root --maxEvents 100 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' --preSimInclude FastChainPileup/FastPileup.py --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' --DataRunNumber '284500' --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' +FastChain_tf.py --simulator ATLFASTIIF_PileUp \ + --digiSteeringConf "SplitNoMerge" \ + --useISF True \ + --randomSeed 123 \ + --enableLooperKiller True \ + --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root --outputRDOFile RDO_pileup_fastsim_fulldigi.pool.root \ + --maxEvents 100 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \ + --preSimInclude FastChainPileup/FastPileup.py \ + --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \ + --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \ + --DataRunNumber '284500' \ + --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' echo "art-result: $? evgen step" @@ -17,7 +34,7 @@ ArtJobName=$2 art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" #add an additional payload from the job (corollary file). -# art-output: InDetStandardPlots.root +# art-output: InDetStandardPlots.root /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_fastSim_fullDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/dcube_indetplots_no_pseudotracks.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fullHS_fastPU_simDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fullHS_fastPU_simDigi.sh index 8de372dc339e..d3239c098aa2 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fullHS_fastPU_simDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fullHS_fastPU_simDigi.sh @@ -1,17 +1,35 @@ #!/usr/bin/env bash - +# # art-description: ttFC_fullHS_fastPU_simDigi # art-type: grid - +# # Run FastChain 'Fast PU, Full HS' and tests: G4HS_FastPileup sim (G4 for HS, Pythia on the fly + FastCaloSim for PU) + fast digi PU/full digi HS + Split reco (truth tracking PU, full HS) +# +# specify branches of athena that are being targeted: +# art-include: 21.0/Athena +# art-include: 21.3/Athena +# +# Also include temporary branch 21.3-hmpl +# art-include: 21.3-hmpl/Athena -# specify branches of athena that are being targeted: -# art-include: 21.0/Athena -# art-include: 21.3/Athena -# Also include temporary branch 21.3-hmpl -# art-include: 21.3-hmpl/Athena - -FastChain_tf.py --simulator G4HS_FastPileup --digiSteeringConf "SplitNoMergeSF" --useISF True --randomSeed 123 --enableLooperKiller True --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root --outputRDOFile RDO_fullHS_fastPU_simdigi.pool.root --maxEvents 10 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' --preSimInclude FastChainPileup/FastPileup.py --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' --DataRunNumber '284500' --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py" +FastChain_tf.py --simulator G4HS_FastPileup \ + --digiSteeringConf "SplitNoMergeSF" \ + --useISF True \ + --randomSeed 123 \ + --enableLooperKiller True \ + --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root \ + --outputRDOFile RDO_fullHS_fastPU_simdigi.pool.root \ + --maxEvents 10 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \ + --preSimInclude FastChainPileup/FastPileup.py \ + --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \ + --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \ + --DataRunNumber '284500' \ + --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' \ + --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py" echo "art-result: $? Job" ArtPackage=$1 diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fullSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fullSim_fullDigi.sh index 08d7e6c488b1..6875e501cdd4 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fullSim_fullDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_fullSim_fullDigi.sh @@ -2,13 +2,27 @@ # art-type: grid # art-description: test job ttFC_fullSim_fullDigi -# specify branches of athena that are being targeted: -# art-include: 21.0/Athena -# art-include: 21.3/Athena -# Also include temporary branch 21.3-hmpl -# art-include: 21.3-hmpl/Athena +# specify branches of athena that are being targeted: + +# art-include: 21.0/Athena +# art-include: 21.3/Athena +# Also include temporary branch 21.3-hmpl +# art-include: 21.3-hmpl/Athena -FastChain_tf.py --simulator ATLFASTII --digiSteeringConf "SplitNoMerge" --useISF True --randomSeed 123 --enableLooperKiller True --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root --outputRDOFile RDO_pileup_fullsim_fulldigi.pool.root --maxEvents 50 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest.py,DigitizationTests/postInclude.RDO_Plots.py' --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' --DataRunNumber '284500' +FastChain_tf.py --simulator ATLFASTII \ + --digiSteeringConf "SplitNoMerge" \ + --useISF True --randomSeed 123 \ + --enableLooperKiller True \ + --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root \ + --outputRDOFile RDO_pileup_fullsim_fulldigi.pool.root \ + --maxEvents 50 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \ + --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest.py,DigitizationTests/postInclude.RDO_Plots.py' \ + --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \ + --DataRunNumber '284500' echo "art-result: $? evgen step" diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fastSim_fastDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fastSim_fastDigi.sh index a9193e46af0f..7df926ae17cf 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fastSim_fastDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fastSim_fastDigi.sh @@ -2,11 +2,12 @@ # art-description: test ttFC_fastSim_fastDigi + ttFC_reco_Split_fastSim_fastDigi # art-type: grid -# specify branches of athena that are being targeted: -# art-include: 21.0/Athena -# art-include: 21.3/Athena -# Also include temporary branch 21.3-hmpl -# art-include: 21.3-hmpl/Athena +# specify branches of athena that are being targeted: +# art-include: 21.0/Athena +# art-include: 21.3/Athena +# Also include temporary branch 21.3-hmpl + +# art-include: 21.3-hmpl/Athena FastChain_tf.py --simulator ATLFASTIIF_PileUp --digiSteeringConf "SplitNoMergeFF" --useISF True --randomSeed 123 --enableLooperKiller True --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root --outputRDOFile RDO_pileup_fastsim_fastdigi.pool.root --maxEvents 50 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' --preSimInclude FastChainPileup/FastPileup.py --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' --DataRunNumber '284500' --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py" diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fastSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fastSim_fullDigi.sh index 88e77797509f..78e7b0173e33 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fastSim_fullDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fastSim_fullDigi.sh @@ -2,10 +2,10 @@ # art-description: test for job configuration ttFC_fastSim_fulldigi + ttFC_reco_Split_fastSim_fullDigi # art-type: grid # -# specify branches of athena that are being targeted: -# art-include: 21.0/Athena -# art-include: 21.3/Athena -# Also include temporary branch 21.3-hmpl +# specify branches of athena that are being targeted: +# art-include: 21.0/Athena +# art-include: 21.3/Athena +# Also include temporary branch 21.3-hmpl # art-include: 21.3-hmpl/Athena FastChain_tf.py --simulator ATLFASTIIF_PileUp --digiSteeringConf "SplitNoMerge" --useISF True --randomSeed 123 --enableLooperKiller True --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root --outputRDOFile RDO_pileup_fastsim_fulldigi.pool.root --maxEvents 100 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' --preSimInclude FastChainPileup/FastPileup.py --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' --DataRunNumber '284500' --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fullHS_fastPU_simDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fullHS_fastPU_simDigi.sh index 4e03f7802c34..e1e1f39202e6 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fullHS_fastPU_simDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_Split_fullHS_fastPU_simDigi.sh @@ -2,12 +2,12 @@ # art-description: ttFC_fullHS_fastPU_simDigi # art-type: grid -# specify branches of athena that are being targeted: -# art-include: 21.0/Athena -# art-include: 21.3/Athena -# Also include temporary branch 21.3-hmpl -# art-include: 21.3-hmpl/Athena - +# specify branches of athena that are being targeted: +# art-include: 21.0/Athena +# art-include: 21.3/Athena +# Also include temporary branch 21.3-hmpl + +# art-include: 21.3-hmpl/Athena # Run FastChain 'Fast PU, Full HS' and tests: G4HS_FastPileup sim (G4 for HS, Pythia on the fly + FastCaloSim for PU) + fast digi PU/full digi HS + Split reco (truth tracking PU, full HS) FastChain_tf.py --simulator G4HS_FastPileup --digiSteeringConf "SplitNoMergeSF" --useISF True --randomSeed 123 --enableLooperKiller True --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root --outputRDOFile RDO_fullHS_fastPU_simdigi.pool.root --maxEvents 10 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' --preSimInclude FastChainPileup/FastPileup.py --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' --DataRunNumber '284500' --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py" diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fastSim_fastDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fastSim_fastDigi.sh index fc39512e388a..f2b41e408288 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fastSim_fastDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fastSim_fastDigi.sh @@ -1,18 +1,41 @@ #!/usr/bin/env bash # art-description: test ttFC_fastSim_fastDigi + ttFC_reco_newTracking_PseudoT_fastSim_fastDigi # art-type: grid -# specify branches of athena that are being targeted: -# art-include: 21.0/Athena -# art-include: 21.3/Athena -# Also include temporary branch 21.3-hmpl -# art-include: 21.3-hmpl/Athena - - -FastChain_tf.py --simulator ATLFASTIIF_PileUp --digiSteeringConf "SplitNoMergeFF" --useISF True --randomSeed 123 --enableLooperKiller True --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root --outputRDOFile RDO_pileup_fastsim_fastdigi.pool.root --maxEvents 100 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' --preSimInclude FastChainPileup/FastPileup.py --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' --DataRunNumber '284500' --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py" +# specify branches of athena that are being targeted: +# art-include: 21.0/Athena +# art-include: 21.3/Athena +# Also include temporary branch 21.3-hmpl +# art-include: 21.3-hmpl/Athena + + +FastChain_tf.py --simulator ATLFASTIIF_PileUp \ + --digiSteeringConf "SplitNoMergeFF" \ + --useISF True \ + --randomSeed 123 \ + --enableLooperKiller True \ + --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root \ + --outputRDOFile RDO_pileup_fastsim_fastdigi.pool.root \ + --maxEvents 100 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \ + --preSimInclude FastChainPileup/FastPileup.py \ + --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \ + --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \ + --DataRunNumber '284500' \ + --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' \ + --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py" echo "art-result: $? RDO step" -FastChain_tf.py --maxEvents 500 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --inputRDOFile 'RDO_pileup_fastsim_fastdigi.pool.root' --outputAODFile AOD_newTracking_pseudoTracking_fastSim_fastDigi.pool.root --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.pixelClusterSplittingType.set_Value_and_Lock(\"AnalogClus\");InDetFlags.doTIDE_Ambi.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True);InDetFlags.doPseudoTracking.set_Value_and_Lock(True);InDetFlags.doNewTracking.set_Value_and_Lock(True);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True);" +FastChain_tf.py --maxEvents 500 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --inputRDOFile 'RDO_pileup_fastsim_fastdigi.pool.root' \ + --outputAODFile AOD_newTracking_pseudoTracking_fastSim_fastDigi.pool.root \ + --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.pixelClusterSplittingType.set_Value_and_Lock(\"AnalogClus\");InDetFlags.doTIDE_Ambi.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True);InDetFlags.doPseudoTracking.set_Value_and_Lock(True);InDetFlags.doNewTracking.set_Value_and_Lock(True);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True);" echo "art-result: $? AOD step" @@ -23,13 +46,12 @@ art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" #add an additional payload from the job (corollary file). -# art-output: InDetStandardPlots.root +# art-output: InDetStandardPlots.root /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_newTracking_PseudoT_fastSim_fastDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/dcube_indetplots.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root -# InDetStandardPlots.root -l dcube.log -p -r -x dcube.xml -s /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ # art-output: dcube/dcube.xml # art-output: dcube/dcube.log diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fastSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fastSim_fullDigi.sh index aa6ca528f1af..8a695ae4b790 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fastSim_fullDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fastSim_fullDigi.sh @@ -3,17 +3,38 @@ # art-type: grid # # specify branches of athena that are being targeted: -# art-include: 21.0/Athena -# art-include: 21.3/Athena +# art-include: 21.0/Athena +# art-include: 21.3/Athena # Also include temporary branch 21.3-hmpl -# art-include: 21.3-hmpl/Athena - -FastChain_tf.py --simulator ATLFASTIIF_PileUp --digiSteeringConf "SplitNoMerge" --useISF True --randomSeed 123 --enableLooperKiller True --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root --outputRDOFile RDO_pileup_fastsim_fulldigi.pool.root --maxEvents 100 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' --preSimInclude FastChainPileup/FastPileup.py --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' --DataRunNumber '284500' --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' +# art-include: 21.3-hmpl/Athena +FastChain_tf.py --simulator ATLFASTIIF_PileUp \ + --digiSteeringConf "SplitNoMerge" \ + --useISF True \ + --randomSeed 123 \ + --enableLooperKiller True \ + --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root \ + --outputRDOFile RDO_pileup_fastsim_fulldigi.pool.root \ + --maxEvents 100 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \ + --preSimInclude FastChainPileup/FastPileup.py \ + --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \ + --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \ + --DataRunNumber '284500' \ + --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' echo "art-result: $? RDO step" -FastChain_tf.py --maxEvents 500 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --inputRDOFile 'RDO_pileup_fastsim_fulldigi.pool.root' --outputAODFile AOD_newTracking_pseudoTracking_fastSim_fullDigi.pool.root --preExec "RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doPseudoTracking.set_Value_and_Lock(True);InDetFlags.doNewTracking.set_Value_and_Lock(True);rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True);" "InDetFlags.doStandardPlots.set_Value_and_Lock(True)" +FastChain_tf.py --maxEvents 500 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --inputRDOFile 'RDO_pileup_fastsim_fulldigi.pool.root' \ + --outputAODFile AOD_newTracking_pseudoTracking_fastSim_fullDigi.pool.root \ + --preExec "RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doPseudoTracking.set_Value_and_Lock(True);InDetFlags.doNewTracking.set_Value_and_Lock(True);rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True);" "InDetFlags.doStandardPlots.set_Value_and_Lock(True)" echo "art-result: $? AOD step" ArtPackage=$1 @@ -22,14 +43,12 @@ art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" #add an additional payload from the job (corollary file). -# art-output: InDetStandardPlots.root +# art-output: InDetStandardPlots.root /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_newTracking_PseudoT_fastSim_fullDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube/config/dcube_indetplots.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root -# InDetStandardPlots.root -l dcube.log -p -r -x dcube.xml -s /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ - # art-output: dcube/dcube.xml # art-output: dcube/dcube.log # art-output: dcube/dcubelog.xml diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fullSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fullSim_fullDigi.sh index eea65b01e7f7..6d907a432857 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fullSim_fullDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_newTracking_PseudoT_fullSim_fullDigi.sh @@ -2,18 +2,38 @@ # art-type: grid # art-description: test job ttFC_fullSim_fullDigi + ttFC_reco_newTracking_PseudoT_fullSim_fullDigi -# specify branches of athena that are being targeted: -# art-include: 21.0/Athena -# art-include: 21.3/Athena -# Also include temporary branch 21.3-hmpl -# art-include: 21.3-hmpl/Athena - - -FastChain_tf.py --simulator ATLFASTII --digiSteeringConf "SplitNoMerge" --useISF True --randomSeed 123 --enableLooperKiller True --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root --outputRDOFile RDO_pileup_fullsim_fulldigi.pool.root --maxEvents 50 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest.py,DigitizationTests/postInclude.RDO_Plots.py' --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' --DataRunNumber '284500' +# specify branches of athena that are being targeted: +# art-include: 21.0/Athena +# art-include: 21.3/Athena +# Also include temporary branch 21.3-hmpl +# art-include: 21.3-hmpl/Athena + + +FastChain_tf.py --simulator ATLFASTII \ + --digiSteeringConf "SplitNoMerge" \ + --useISF True \ + --randomSeed 123 \ + --enableLooperKiller True \ + --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root \ + --outputRDOFile RDO_pileup_fullsim_fulldigi.pool.root \ + --maxEvents 50 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \ + --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest.py,DigitizationTests/postInclude.RDO_Plots.py' \ + --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \ + --DataRunNumber '284500' echo "art-result: $? RDO step" -FastChain_tf.py --maxEvents 500 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --inputRDOFile RDO_pileup_fullsim_fulldigi.pool.root --outputAODFile AOD_newTracking_pseudoTracking_fullSim_fullDigi.pool.root --preExec "RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doPseudoTracking.set_Value_and_Lock(True);InDetFlags.doNewTracking.set_Value_and_Lock(True);rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True);" "InDetFlags.doStandardPlots.set_Value_and_Lock(True)" +FastChain_tf.py --maxEvents 500 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --inputRDOFile RDO_pileup_fullsim_fulldigi.pool.root \ + --outputAODFile AOD_newTracking_pseudoTracking_fullSim_fullDigi.pool.root \ + --preExec "RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doPseudoTracking.set_Value_and_Lock(True);InDetFlags.doNewTracking.set_Value_and_Lock(True);rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True);" "InDetFlags.doStandardPlots.set_Value_and_Lock(True)" echo "art-result: $? AOD step" @@ -22,7 +42,7 @@ ArtJobName=$2 #art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" #add an additional payload from the job (corollary file). -# art-output: InDetStandardPlots.root +# art-output: InDetStandardPlots.root /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_noSplit_noPseudoT_stdFullSimDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/dcube_indetplots.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fastSim_fastDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fastSim_fastDigi.sh index 1d573421525d..7d91810c4707 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fastSim_fastDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fastSim_fastDigi.sh @@ -2,17 +2,40 @@ # art-description: test ttFC_fastSim_fastDigi + ttFC_reco_noSplit_PseudoT_fastSim_fastDigi # art-type: grid -# specify branches of athena that are being targeted: -# art-include: 21.0/Athena -# art-include: 21.3/Athena -# Also include temporary branch 21.3-hmpl -# art-include: 21.3-hmpl/Athena +# specify branches of athena that are being targeted: +# art-include: 21.0/Athena +# art-include: 21.3/Athena +# Also include temporary branch 21.3-hmpl +# art-include: 21.3-hmpl/Athena -FastChain_tf.py --simulator ATLFASTIIF_PileUp --digiSteeringConf "SplitNoMergeFF" --useISF True --randomSeed 123 --enableLooperKiller True --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root --outputRDOFile RDO_pileup_fastsim_fastdigi.pool.root --maxEvents 100 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' --preSimInclude FastChainPileup/FastPileup.py --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' --DataRunNumber '284500' --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py" +FastChain_tf.py --simulator ATLFASTIIF_PileUp \ + --digiSteeringConf "SplitNoMergeFF" \ + --useISF True \ + --randomSeed 123 \ + --enableLooperKiller True \ + --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root \ + --outputRDOFile RDO_pileup_fastsim_fastdigi.pool.root \ + --maxEvents 100 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \ + --preSimInclude FastChainPileup/FastPileup.py \ + --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \ + --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \ + --DataRunNumber '284500' \ + --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' \ + --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py" echo "art-result: $? RDO step" -FastChain_tf.py --maxEvents 500 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --inputRDOFile 'RDO_pileup_fastsim_fastdigi.pool.root' --outputAODFile AOD_noSplit_pseudoTracking_fastSim_fastDigi.pool.root --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.pixelClusterSplittingType.set_Value_and_Lock(\"AnalogClus\");InDetFlags.doTIDE_Ambi.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True);InDetFlags.doPseudoTracking.set_Value_and_Lock(True);" +FastChain_tf.py --maxEvents 500 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --inputRDOFile 'RDO_pileup_fastsim_fastdigi.pool.root' \ + --outputAODFile AOD_noSplit_pseudoTracking_fastSim_fastDigi.pool.root \ + --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.pixelClusterSplittingType.set_Value_and_Lock(\"AnalogClus\");InDetFlags.doTIDE_Ambi.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True);InDetFlags.doPseudoTracking.set_Value_and_Lock(True);" echo "art-result: $? AOD step" ArtPackage=$1 @@ -20,7 +43,7 @@ ArtJobName=$2 art.py compare grid --entries 10 echo "art-result: $? regression" #add an additional payload from the job (corollary file). -# art-output: InDetStandardPlots.root +# art-output: InDetStandardPlots.root /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_noSplit_PseudoT_fastSim_fastDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/dcube_indetplots.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fastSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fastSim_fullDigi.sh index 9c7ecc2c9fdf..db72b4c4fb43 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fastSim_fullDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fastSim_fullDigi.sh @@ -2,34 +2,53 @@ # art-description: test for job configuration ttFC_fastSim_fulldigi followed by reco job ttFC_reco_noSplit_PseudoT_fastSim_fullDigi # art-type: grid # -# specify branches of athena that are being targeted: -# art-include: 21.0/Athena -# art-include: 21.3/Athena -# Also include temporary branch 21.3-hmpl -# art-include: 21.3-hmpl/Athena - +# specify branches of athena that are being targeted: +# art-include: 21.0/Athena +# art-include: 21.3/Athena +# Also include temporary branch 21.3-hmpl +# art-include: 21.3-hmpl/Athena # Sim/Digi job -FastChain_tf.py --simulator ATLFASTIIF_PileUp --digiSteeringConf "SplitNoMerge" --useISF True --randomSeed 123 --enableLooperKiller True --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root --outputRDOFile RDO_pileup_fastsim_fulldigi.pool.root --maxEvents 100 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' --preSimInclude FastChainPileup/FastPileup.py --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' --DataRunNumber '284500' --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' +FastChain_tf.py --simulator ATLFASTIIF_PileUp \ + --digiSteeringConf "SplitNoMerge" \ + --useISF True \ + --randomSeed 123 \ + --enableLooperKiller True \ + --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root \ + --outputRDOFile RDO_pileup_fastsim_fulldigi.pool.root \ + --maxEvents 100 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \ + --preSimInclude FastChainPileup/FastPileup.py \ + --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \ + --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \ + --DataRunNumber '284500' \ + --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' echo "art-result: $? RDO step" -FastChain_tf.py --maxEvents 500 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --inputRDOFile 'RDO_pileup_fastsim_fulldigi.pool.root' --outputAODFile AOD_noSplit_pseudoTracking_fastSim_fullDigi.pool.root --preExec "RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doPseudoTracking.set_Value_and_Lock(True);rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True);" "InDetFlags.doStandardPlots.set_Value_and_Lock(True)" +FastChain_tf.py --maxEvents 500 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --inputRDOFile 'RDO_pileup_fastsim_fulldigi.pool.root' \ + --outputAODFile AOD_noSplit_pseudoTracking_fastSim_fullDigi.pool.root \ + --preExec "RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doPseudoTracking.set_Value_and_Lock(True);rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True);" "InDetFlags.doStandardPlots.set_Value_and_Lock(True)" echo "art-result: $? AOD step" ArtPackage=$1 ArtJobName=$2 art.py compare grid --entries 10 echo "art-result: $? regression" -#add an additional payload from the job (corollary file). -# art-output: InDetStandardPlots.root +# add an additional payload from the job (corollary file). +# art-output: InDetStandardPlots.root /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_noSplit_PseudoT_fastSim_fullDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/dcube_indetplots.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root -# InDetStandardPlots.root -l dcube.log -p -r -x dcube.xml -s /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ - # art-output: dcube/dcube.xml # art-output: dcube/dcube.log # art-output: dcube/dcubelog.xml diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fullSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fullSim_fullDigi.sh index 8758222bf66d..d67dd0b17aad 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fullSim_fullDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_PseudoT_fullSim_fullDigi.sh @@ -2,18 +2,38 @@ # art-type: grid # art-description: test job ttFC_fullSim_fullDigi + ttFC_reco_noSplit_PseudoT_fullSim_fullDigi -# specify branches of athena that are being targeted: -# art-include: 21.0/Athena -# art-include: 21.3/Athena -# Also include temporary branch 21.3-hmpl +# specify branches of athena that are being targeted: +# art-include: 21.0/Athena +# art-include: 21.3/Athena +# Also include temporary branch 21.3-hmpl # art-include: 21.3-hmpl/Athena -FastChain_tf.py --simulator ATLFASTII --digiSteeringConf "SplitNoMerge" --useISF True --randomSeed 123 --enableLooperKiller True --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root --outputRDOFile RDO_pileup_fullsim_fulldigi.pool.root --maxEvents 50 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest.py,DigitizationTests/postInclude.RDO_Plots.py' --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' --DataRunNumber '284500' +FastChain_tf.py --simulator ATLFASTII \ + --digiSteeringConf "SplitNoMerge" \ + --useISF True \ + --randomSeed 123 \ + --enableLooperKiller True \ + --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root \ + --outputRDOFile RDO_pileup_fullsim_fulldigi.pool.root \ + --maxEvents 50 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \ + --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest.py,DigitizationTests/postInclude.RDO_Plots.py' \ + --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \ + --DataRunNumber '284500' echo "art-result: $? RDO step" -FastChain_tf.py --maxEvents 500 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --inputRDOFile RDO_pileup_fullsim_fulldigi.pool.root --outputAODFile AOD_noSplit_pseudoTracking_fullSim_fullDigi.pool.root --preExec "RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doPseudoTracking.set_Value_and_Lock(True);rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True);" "InDetFlags.doStandardPlots.set_Value_and_Lock(True)" +FastChain_tf.py --maxEvents 500 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --inputRDOFile RDO_pileup_fullsim_fulldigi.pool.root \ + --outputAODFile AOD_noSplit_pseudoTracking_fullSim_fullDigi.pool.root \ + --preExec "RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doPseudoTracking.set_Value_and_Lock(True);rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.doTrackSegmentsTRT.set_Value_and_Lock(True);" "InDetFlags.doStandardPlots.set_Value_and_Lock(True)" echo "art-result: $? RDO step" diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fastSim_fastDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fastSim_fastDigi.sh index f513c2bf601f..6418e8f5d7fc 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fastSim_fastDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fastSim_fastDigi.sh @@ -2,18 +2,39 @@ # art-description: test ttFC_fastSim_fastDigi + ttFC_reco_noSplit_noPseudoT_fastSim_fastDigi # art-type: grid -# specify branches of athena that are being targeted: -# art-include: 21.0/Athena -# art-include: 21.3/Athena -# Also include temporary branch 21.3-hmpl -# art-include: 21.3-hmpl/Athena - -FastChain_tf.py --simulator ATLFASTIIF_PileUp --digiSteeringConf "SplitNoMergeFF" --useISF True --randomSeed 123 --enableLooperKiller True --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root --outputRDOFile RDO_pileup_fastsim_fastdigi.pool.root --maxEvents 100 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' --preSimInclude FastChainPileup/FastPileup.py --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' --DataRunNumber '284500' --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py" +# specify branches of athena that are being targeted: +# art-include: 21.0/Athena +# art-include: 21.3/Athena +# Also include temporary branch 21.3-hmpl +# art-include: 21.3-hmpl/Athena +FastChain_tf.py --simulator ATLFASTIIF_PileUp \ + --digiSteeringConf "SplitNoMergeFF" \ + --useISF True \ + --randomSeed 123 \ + --enableLooperKiller True \ + --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root --outputRDOFile RDO_pileup_fastsim_fastdigi.pool.root \ + --maxEvents 100 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \ + --preSimInclude FastChainPileup/FastPileup.py \ + --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \ + --postExec 'RAWtoESD:from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \ + --DataRunNumber '284500' \ + --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' \ + --preDigiInclude="FastTRT_Digitization/preInclude.FastTRT_Digi.Validation.py" \ echo "art-result: $? RDO step" -FastChain_tf.py --maxEvents 500 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --inputRDOFile 'RDO_pileup_fastsim_fastdigi.pool.root' --outputAODFile AOD_noSplit_noPseudoT_fastSim_fastDigi.pool.root --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.pixelClusterSplittingType.set_Value_and_Lock(\"AnalogClus\");InDetFlags.doTIDE_Ambi.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True)" +FastChain_tf.py --maxEvents 500 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --inputRDOFile 'RDO_pileup_fastsim_fastdigi.pool.root' \ + --outputAODFile AOD_noSplit_noPseudoT_fastSim_fastDigi.pool.root \ + --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);InDetFlags.pixelClusterSplittingType.set_Value_and_Lock(\"AnalogClus\");InDetFlags.doTIDE_Ambi.set_Value_and_Lock(False);InDetFlags.doStandardPlots.set_Value_and_Lock(True)" echo "art-result: $? AOD step" @@ -22,7 +43,7 @@ ArtJobName=$2 art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" #add an additional payload from the job (corollary file). -# art-output: InDetStandardPlots.root +# art-output: InDetStandardPlots.root /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_noSplit_noPseudoT_fastSim_fastDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/dcube_indetplots_no_pseudotracks.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fastSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fastSim_fullDigi.sh index 02578e75102e..ead961200795 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fastSim_fullDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fastSim_fullDigi.sh @@ -2,18 +2,40 @@ # art-description: test for job configuration ttFC_fastSim_fulldigi _ttFC_reco_noSplit_noPseudoT_fastSim_fullDigi # art-type: grid # -# specify branches of athena that are being targeted: -# art-include: 21.0/Athena -# art-include: 21.3/Athena -# Also include temporary branch 21.3-hmpl -# art-include: 21.3-hmpl/Athena - -FastChain_tf.py --simulator ATLFASTIIF_PileUp --digiSteeringConf "SplitNoMerge" --useISF True --randomSeed 123 --enableLooperKiller True --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root --outputRDOFile RDO_pileup_fastsim_fulldigi.pool.root --maxEvents 100 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' --preSimInclude FastChainPileup/FastPileup.py --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' --DataRunNumber '284500' --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' +# specify branches of athena that are being targeted: +# art-include: 21.0/Athena +# art-include: 21.3/Athena +# Also include temporary branch 21.3-hmpl +# art-include: 21.3-hmpl/Athena + +FastChain_tf.py --simulator ATLFASTIIF_PileUp \ + --digiSteeringConf "SplitNoMerge" \ + --useISF True \ + --randomSeed 123 \ + --enableLooperKiller True \ + --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root \ + --outputRDOFile RDO_pileup_fastsim_fulldigi.pool.root \ + --maxEvents 100 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \ + --preSimInclude FastChainPileup/FastPileup.py \ + --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest_FCpileup.py,DigitizationTests/postInclude.RDO_Plots.py' \ + --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \ + --DataRunNumber '284500' \ + --postSimExec='genSeq.Pythia8.NCollPerEvent=10;' echo "art-result: $? RDO step" -FastChain_tf.py --maxEvents 500 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --inputRDOFile 'RDO_pileup_fastsim_fulldigi.pool.root' --outputAODFile AOD_noSplit_noPseudoT_fastSim_fullDigi.pool.root --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);" "InDetFlags.doStandardPlots.set_Value_and_Lock(True)" +FastChain_tf.py --maxEvents 500 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --inputRDOFile 'RDO_pileup_fastsim_fulldigi.pool.root' \ + --outputAODFile AOD_noSplit_noPseudoT_fastSim_fullDigi.pool.root \ + --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);" "InDetFlags.doStandardPlots.set_Value_and_Lock(True)" echo "art-result: $? RDO step" ArtPackage=$1 @@ -21,14 +43,11 @@ ArtJobName=$2 art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} echo "art-result: $? regression" #add an additional payload from the job (corollary file). -# art-output: InDetStandardPlots.root +# art-output: InDetStandardPlots.root /cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube TEST_ttFC_reco_noSplit_noPseudoT_fastSim_fullDigi InDetStandardPlots.root /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/dcube_configs/config/dcube_indetplots_no_pseudotracks.xml /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/InDetStandardPlots_TEST.root - -# InDetStandardPlots.root -l dcube.log -p -r -x dcube.xml -s /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ - # art-output: dcube/dcube.xml # art-output: dcube/dcube.log # art-output: dcube/dcubelog.xml diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fullSim_fullDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fullSim_fullDigi.sh index 3192e536499f..38cbee461b3e 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fullSim_fullDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_fullSim_fullDigi.sh @@ -2,17 +2,38 @@ # # art-description: test job ttFC_fullSim_fullDigi + ttFC_reco_noSplit_noPseudoT_fullSim_fullDigi # art-type: grid -# specify branches of athena that are being targeted: -# art-include: 21.0/Athena -# art-include: 21.3/Athena -# Also include temporary branch 21.3-hmpl -# art-include: 21.3-hmpl/Athena - -FastChain_tf.py --simulator ATLFASTII --digiSteeringConf "SplitNoMerge" --useISF True --randomSeed 123 --enableLooperKiller True --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root --outputRDOFile RDO_pileup_fullsim_fulldigi.pool.root --maxEvents 50 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest.py,DigitizationTests/postInclude.RDO_Plots.py' --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' --DataRunNumber '284500' +# specify branches of athena that are being targeted: + +# art-include: 21.0/Athena +# art-include: 21.3/Athena +# Also include temporary branch 21.3-hmpl +# art-include: 21.3-hmpl/Athena + +FastChain_tf.py --simulator ATLFASTII \ + --digiSteeringConf "SplitNoMerge" \ + --useISF True \ + --randomSeed 123 \ + --enableLooperKiller True \ + --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/ttbar_muplusjets-pythia6-7000.evgen.pool.root \ + --outputRDOFile RDO_pileup_fullsim_fulldigi.pool.root \ + --maxEvents 50 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --preSimExec 'from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags;TrkDetFlags.TRT_BuildStrawLayers=True' \ + --postInclude='PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest.py,DigitizationTests/postInclude.RDO_Plots.py' \ + --postExec 'from AthenaCommon.ConfigurationShelve import saveToAscii;saveToAscii("config.txt")' \ + --DataRunNumber '284500' echo "art-result: $? RDO step" -FastChain_tf.py --maxEvents 500 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --inputRDOFile RDO_pileup_fullsim_fulldigi.pool.root --outputAODFile AOD_noSplit_noPseudoT_fullSim_fullDigi.pool.root --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);" "InDetFlags.doStandardPlots.set_Value_and_Lock(True)" +FastChain_tf.py --maxEvents 500 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --inputRDOFile RDO_pileup_fullsim_fulldigi.pool.root \ + --outputAODFile AOD_noSplit_noPseudoT_fullSim_fullDigi.pool.root \ + --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);" "InDetFlags.doStandardPlots.set_Value_and_Lock(True)" echo "art-result: $? AOD step" diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_stdFullSimDigi.sh b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_stdFullSimDigi.sh index 06f8a7de60cc..fb40887ff850 100755 --- a/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_stdFullSimDigi.sh +++ b/Simulation/FastSimulation/FastChainPileup/test/test_ttFC_reco_noSplit_noPseudoT_stdFullSimDigi.sh @@ -3,28 +3,59 @@ # art-type: grid # -# specify branches of athena that are being targeted: -# art-include: 21.0/Athena -# art-include: 21.3/Athena -# Also include temporary branch 21.3-hmpl -# art-include: 21.3-hmpl/Athena +# specify branches of athena that are being targeted: +# art-include: 21.0/Athena +# art-include: 21.3/Athena +# Also include temporary branch 21.3-hmpl +# art-include: 21.3-hmpl/Athena # job 1: Simulation from evgen -Sim_tf.py --conditionsTag 'default:OFLCOND-RUN12-SDR-19' --physicsList 'FTFP_BERT' --truthStrategy 'MC15aPlus' --simulator 'FullG4' --postInclude 'default:RecJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest.py' --preInclude 'EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py,SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py' --DataRunNumber '222525' --geometryVersion 'default:ATLAS-R2-2015-03-01-00_VALIDATION' --inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/mc12_valid.110401.PowhegPythia_P2012_ttbar_nonallhad.evgen.EVNT.e3099.01517252._000001.pool.root.1" --outputHITSFile "Hits.pool.root" --maxEvents 50 + +Sim_tf.py --conditionsTag 'default:OFLCOND-RUN12-SDR-19' \ + --physicsList 'FTFP_BERT' \ + --truthStrategy 'MC15aPlus' \ + --simulator 'FullG4' \ + --postInclude 'default:RecJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest.py' \ + --preInclude 'EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py,SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py' \ + --DataRunNumber '222525' \ + --geometryVersion 'default:ATLAS-R2-2015-03-01-00_VALIDATION' \ + --inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/mc12_valid.110401.PowhegPythia_P2012_ttbar_nonallhad.evgen.EVNT.e3099.01517252._000001.pool.root.1" \ + --outputHITSFile "Hits.pool.root" \ + --maxEvents 50 echo "art-result: $? evgen step" #merging of hits file -HITSMerge_tf.py --inputHITSFile='Hits.pool.root' --outputHITS_MRGFile='Merge.pool.root' --maxEvents=50 --skipEvents='0' --geometryVersion 'ATLAS-R2-2015-03-01-00' --conditionsTag 'OFLCOND-RUN12-SDR-19' +HITSMerge_tf.py --inputHITSFile='Hits.pool.root' \ + --outputHITS_MRGFile='Merge.pool.root' \ + --maxEvents=50 \ + --skipEvents='0' \ + --geometryVersion 'ATLAS-R2-2015-03-01-00' \ + --conditionsTag 'OFLCOND-RUN12-SDR-19' echo "art-result: $? Merge step" #digi -Digi_tf.py --inputHITSFile 'Merge.pool.root' --outputRDOFile 'RDO.pool.root' --maxEvents '50' --skipEvents '0' --geometryVersion 'ATLAS-R2-2015-03-01-00' --digiSeedOffset1 '123456' --digiSeedOffset2 '2345678' --postInclude 'PyJobTransforms/UseFrontier.py' --AddCaloDigi 'False' --conditionsTag 'OFLCOND-RUN12-SDR-31' +Digi_tf.py --inputHITSFile 'Merge.pool.root' \ + --outputRDOFile 'RDO.pool.root' \ + --maxEvents '50' \ + --skipEvents '0' \ + --geometryVersion 'ATLAS-R2-2015-03-01-00' \ + --digiSeedOffset1 '123456' \ + --digiSeedOffset2 '2345678' \ + --postInclude 'PyJobTransforms/UseFrontier.py' \ + --AddCaloDigi 'False' \ + --conditionsTag 'OFLCOND-RUN12-SDR-31' echo "art-result: $? Digi step" -FastChain_tf.py --maxEvents 50 --skipEvents 0 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag OFLCOND-RUN12-SDR-31 --inputRDOFile RDO.pool.root --outputAODFile AOD_Split_stdFullSimDigi.pool.root --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doStandardPlots.set_Value_and_Lock(True);" +FastChain_tf.py --maxEvents 50 \ + --skipEvents 0 \ + --geometryVersion ATLAS-R2-2015-03-01-00 \ + --conditionsTag OFLCOND-RUN12-SDR-31 \ + --inputRDOFile RDO.pool.root \ + --outputAODFile AOD_Split_stdFullSimDigi.pool.root \ + --preExec "RAWtoESD:rec.doTrigger.set_Value_and_Lock(False);recAlgs.doTrigger.set_Value_and_Lock(False);from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doStandardPlots.set_Value_and_Lock(True);" #end of job echo "art-result: $? AOD step" #add an additional payload from the job (corollary file). -- GitLab From 21d2e24c1a3793fe0409a15d7a0f2f6081612aaf Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Wed, 20 Jun 2018 18:10:39 +0000 Subject: [PATCH 218/562] Merge branch '21.0-directIO-art-adding-recotf-with-raw' into '21.0' Adding Reco_tf.py tests with RAW input See merge request atlas/athena!12066 (cherry picked from commit e4db2f5ed02ca36e6d02483610d59c2ae47fbfc9 [formerly 18169e2be1c9cdc5b481877b36be1963c96d8f76]) 0f5edfa2 Adding Reco_tf.py test for 21.0/Athena(MP) running on RAW input files Former-commit-id: 4c75183e9fc23f0e3c8dd3644a15bb0d88d0fab4 --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../test_directioart_athena_recotf_with_raw_davs.sh | 12 ++++++++++++ ...test_directioart_athena_recotf_with_raw_https.sh | 12 ++++++++++++ .../test_directioart_athena_recotf_with_raw_root.sh | 12 ++++++++++++ ...est_directioart_athenamp_recotf_with_raw_davs.sh | 13 +++++++++++++ ...st_directioart_athenamp_recotf_with_raw_https.sh | 13 +++++++++++++ ...est_directioart_athenamp_recotf_with_raw_root.sh | 13 +++++++++++++ 7 files changed, 75 insertions(+) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h create mode 100755 Tools/DirectIOART/test/test_directioart_athena_recotf_with_raw_davs.sh create mode 100755 Tools/DirectIOART/test/test_directioart_athena_recotf_with_raw_https.sh create mode 100755 Tools/DirectIOART/test/test_directioart_athena_recotf_with_raw_root.sh create mode 100755 Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_davs.sh create mode 100755 Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_https.sh create mode 100755 Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_root.sh diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 diff --git a/Tools/DirectIOART/test/test_directioart_athena_recotf_with_raw_davs.sh b/Tools/DirectIOART/test/test_directioart_athena_recotf_with_raw_davs.sh new file mode 100755 index 000000000000..3a79ded14240 --- /dev/null +++ b/Tools/DirectIOART/test/test_directioart_athena_recotf_with_raw_davs.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# art-description: DirectIOART Athena Reco_tf.py inputFile:RAW protocol=DAVS +# art-type: grid +# art-output: *.pool.root +# art-include: 21.0/Athena + +set -e + +Reco_tf.py --AMI q431 --inputBSFile davs://lcg-lrz-http.grid.lrz.de:443/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/data15_13TeV/71/42/data15_13TeV.00284285.physics_Main.daq.RAW._lb0856._SFO-1._0003.data --outputESDFile art.pool.root + +echo "art-result: $? DirectIOART_Athena_RecoTF_inputBS_protocol_DAVS" \ No newline at end of file diff --git a/Tools/DirectIOART/test/test_directioart_athena_recotf_with_raw_https.sh b/Tools/DirectIOART/test/test_directioart_athena_recotf_with_raw_https.sh new file mode 100755 index 000000000000..481c61f7f695 --- /dev/null +++ b/Tools/DirectIOART/test/test_directioart_athena_recotf_with_raw_https.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# art-description: DirectIOART Athena Reco_tf.py inputFile:RAW protocol=HTTPS +# art-type: grid +# art-output: *.pool.root +# art-include: 21.0/Athena + +set -e + +Reco_tf.py --AMI q431 --inputBSFile https://lcg-lrz-http.grid.lrz.de:443/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/data15_13TeV/71/42/data15_13TeV.00284285.physics_Main.daq.RAW._lb0856._SFO-1._0003.data --outputESDFile art.pool.root + +echo "art-result: $? DirectIOART_Athena_RecoTF_inputBS_protocol_HTTPS" \ No newline at end of file diff --git a/Tools/DirectIOART/test/test_directioart_athena_recotf_with_raw_root.sh b/Tools/DirectIOART/test/test_directioart_athena_recotf_with_raw_root.sh new file mode 100755 index 000000000000..d69547239685 --- /dev/null +++ b/Tools/DirectIOART/test/test_directioart_athena_recotf_with_raw_root.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# art-description: DirectIOART Athena Reco_tf.py inputFile:RAW protocol=ROOT +# art-type: grid +# art-output: *.pool.root +# art-include: 21.0/Athena + +set -e + +Reco_tf.py --AMI q431 --inputBSFile root://lcg-lrz-rootd.grid.lrz.de:1094/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/data15_13TeV/71/42/data15_13TeV.00284285.physics_Main.daq.RAW._lb0856._SFO-1._0003.data --outputESDFile art.pool.root + +echo "art-result: $? DirectIOART_Athena_RecoTF_inputBS_protocol_ROOT" \ No newline at end of file diff --git a/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_davs.sh b/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_davs.sh new file mode 100755 index 000000000000..6e0e7d82728c --- /dev/null +++ b/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_davs.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# art-description: DirectIOART AthenaMP Reco_tf.py inputFile:RAW protocol=DAVS +# art-type: grid +# art-output: *.pool.root +# art-include: 21.0/Athena + +set -e + +export ATHENA_PROC_NUMBER=2 +Reco_tf.py --AMI q431 --inputBSFile davs://lcg-lrz-http.grid.lrz.de:443/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/data15_13TeV/71/42/data15_13TeV.00284285.physics_Main.daq.RAW._lb0856._SFO-1._0003.data --outputESDFile art.pool.root + +echo "art-result: $? DirectIOART_AthenaMP_RecoTF_inputBS_protocol_DAVS" \ No newline at end of file diff --git a/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_https.sh b/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_https.sh new file mode 100755 index 000000000000..ae565d9212cb --- /dev/null +++ b/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_https.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# art-description: DirectIOART AthenaMP Reco_tf.py inputFile:RAW protocol=HTTPS +# art-type: grid +# art-output: *.pool.root +# art-include: 21.0/Athena + +set -e + +export ATHENA_PROC_NUMBER=2 +Reco_tf.py --AMI q431 --inputBSFile https://lcg-lrz-http.grid.lrz.de:443/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/data15_13TeV/71/42/data15_13TeV.00284285.physics_Main.daq.RAW._lb0856._SFO-1._0003.data --outputESDFile art.pool.root + +echo "art-result: $? DirectIOART_AthenaMP_RecoTF_inputBS_protocol_HTTPS" \ No newline at end of file diff --git a/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_root.sh b/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_root.sh new file mode 100755 index 000000000000..d978d2b0270c --- /dev/null +++ b/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_root.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# art-description: DirectIOART AthenaMP Reco_tf.py inputFile:RAW protocol=ROOT +# art-type: grid +# art-output: *.pool.root +# art-include: 21.0/Athena + +set -e + +export ATHENA_PROC_NUMBER=2 +Reco_tf.py --AMI q431 --inputBSFile root://lcg-lrz-rootd.grid.lrz.de:1094/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/data15_13TeV/71/42/data15_13TeV.00284285.physics_Main.daq.RAW._lb0856._SFO-1._0003.data --outputESDFile art.pool.root + +echo "art-result: $? DirectIOART_AthenaMP_RecoTF_inputBS_protocol_ROOT" \ No newline at end of file -- GitLab From 6874d4bbdd0f225e0f46ec7cb96117dda6d50f8e Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Wed, 20 Jun 2018 18:11:47 +0000 Subject: [PATCH 219/562] Merge branch '21.0-directIO-art-updating-and-fixing-art-tests' into '21.0' Updating generateARTtests.py See merge request atlas/athena!12067 (cherry picked from commit 8317b8868edaad130807d89f3f05d6cd846bbd30 [formerly c728abcab4805495cd4212a4feec0f29d0c13526]) 24c35555 Updating generatingARTtests.py with latest test samples and typo fixing Former-commit-id: afb40c70570c642709177f0cde0e750b61eb4d2d --- Event/EventContainers/test/ID_ContainerTest.h | 0 Tools/DirectIOART/generateARTtests.py | 44 ++++++++++++++++--- 2 files changed, 39 insertions(+), 5 deletions(-) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 diff --git a/Tools/DirectIOART/generateARTtests.py b/Tools/DirectIOART/generateARTtests.py index b160ed0d631d..fcf07f297ea5 100755 --- a/Tools/DirectIOART/generateARTtests.py +++ b/Tools/DirectIOART/generateARTtests.py @@ -2,6 +2,7 @@ import os +RAW_FILE = "data15_13TeV:data15_13TeV.00284285.physics_Main.daq.RAW" RDO_FILE = "mc16_13TeV:mc16_13TeV.361108.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Ztautau.recon.RDO.e3601_s3126_r9546" HAMMERCLOUD_FILE = "mc15_13TeV.423202.Pythia8B_A14_CTEQ6L1_Jpsie3e13.merge.AOD.e3869_s2608_s2183_r6630_r6264" #NOTE: needs update to mc16(?) PROJECTS = ["AthAnalysis", "AthDerivation", "AthSimulation", "Athena", "AnalysisBase"] @@ -13,9 +14,9 @@ RECO_TF_TURLS = { {"HTTPS" : "https://lcg-lrz-http.grid.lrz.de:443/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/mc16_13TeV/90/96/RDO.11373415._000001.pool.root.1" }, # LRZ-LMU ), "RAW" : ( - {"ROOT" : "" }, # LRZ-LMU - {"DAVS" : "" }, # LRZ-LMU - {"HTTPS" : "" }, # LRZ-LMU + {"ROOT" : "root://lcg-lrz-rootd.grid.lrz.de:1094/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/data15_13TeV/71/42/data15_13TeV.00284285.physics_Main.daq.RAW._lb0856._SFO-1._0003.data" }, # LRZ-LMU + {"DAVS" : "davs://lcg-lrz-http.grid.lrz.de:443/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/data15_13TeV/71/42/data15_13TeV.00284285.physics_Main.daq.RAW._lb0856._SFO-1._0003.data" }, # LRZ-LMU + {"HTTPS" : "https://lcg-lrz-http.grid.lrz.de:443/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/data15_13TeV/71/42/data15_13TeV.00284285.physics_Main.daq.RAW._lb0856._SFO-1._0003.data" }, # LRZ-LMU ), } @@ -47,7 +48,7 @@ TFILE_OPEN_TURLs = [ "https://grid-dav.rzg.mpg.de:2880/atlas/dq2/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1", # MPPMU "https://dcache-atlas-webdav.desy.de:2880/dq2/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1", # DESY-Hamburg "https://lcg-se0.ifh.de:2880/pnfs/ifh.de/data/atlas/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1", # DESY-Zeuthen - "https ://atlaswebdav-kit.gridka.de:2880/pnfs/gridka.de/atlas/disk-only/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1", # Karlsruhe + "https://atlaswebdav-kit.gridka.de:2880/pnfs/gridka.de/atlas/disk-only/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1", # Karlsruhe "https://webdav.bfg.uni-freiburg.de:2880/pnfs/bfg.uni-freiburg.de/data/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1", # Freiburg "https://se-goegrid.gwdg.de:2880/pnfs/gwdg.de/data/atlas/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1", # Goettingen "https://grid-se.physik.uni-wuppertal.de:2881/pnfs/physik.uni-wuppertal.de/data/atlas/atlasdatadisk/rucio/mc15_13TeV/ed/68/AOD.05536542._000001.pool.root.1", # Wuppertal @@ -95,7 +96,40 @@ echo \"art-result: $? DirectIOART_AthenaMP_RecoTF_inputRDO_protocol_{protocol}\" os.system("chmod +x " + name) # loop over turl list if RAW input files - # TODO + for item in RECO_TF_TURLS["RAW"]: + name = os.path.join("test", "test_directioart_athena_recotf_with_raw_" + item.keys()[0].lower() + ".sh") + print "\tGenerating ...",name + outfile = open(name,'w') + # generate test scripts + outstring = """#!/bin/bash\n +# art-description: DirectIOART Athena Reco_tf.py inputFile:RAW protocol={protocol} +# art-type: grid +# art-output: *.pool.root +# art-include: 21.0/Athena\n +set -e\n +Reco_tf.py --AMI q431 --inputBSFile {turl} --outputESDFile art.pool.root\n +echo \"art-result: $? DirectIOART_Athena_RecoTF_inputBS_protocol_{protocol}\"""".format(turl=item.values()[0], protocol=item.keys()[0]) + outfile.write(outstring) + outfile.close() + os.system("chmod +x " + name) + # if AthenaMP + if opts.mp: + name = os.path.join("test", "test_directioart_athenamp_recotf_with_raw_" + item.keys()[0].lower() + ".sh") + print "\tGenerating ...",name + outfile = open(name,'w') + # generate test scripts + outstring = """#!/bin/bash\n +# art-description: DirectIOART AthenaMP Reco_tf.py inputFile:RAW protocol={protocol} +# art-type: grid +# art-output: *.pool.root +# art-include: 21.0/Athena\n +set -e\n +export ATHENA_PROC_NUMBER=2 +Reco_tf.py --AMI q431 --inputBSFile {turl} --outputESDFile art.pool.root\n +echo \"art-result: $? DirectIOART_AthenaMP_RecoTF_inputBS_protocol_{protocol}\"""".format(turl=item.values()[0], protocol=item.keys()[0]) + outfile.write(outstring) + outfile.close() + os.system("chmod +x " + name) # in case of "AthDerivation" if "AthDerivation" in opts.athena_project: -- GitLab From f3d5004a20c0aea68abc4517de1bbdaa8674c8a8 Mon Sep 17 00:00:00 2001 From: John Derek Chapman <chapman@hep.phy.cam.ac.uk> Date: Wed, 20 Jun 2018 18:27:47 +0000 Subject: [PATCH 220/562] Merge branch '21p3-coverity_118522-fix' into '21.3' Coverity defect fix in ISF_FatrasTools (ATLASSIM-3687) See merge request atlas/athena!12214 (cherry picked from commit 962e6fffa5e02b6fcdda5fb0515d1249642515b6 [formerly 5467ca90a951bfb84c66cb404ceb2fb69409c7c2]) 25a97255 Update McMaterialEffectsUpdator.cxx: use nullptr not "0" d2d55f0f Update McMaterialEffectsUpdator.cxx: Coverity defect (118522) Former-commit-id: 2550968fcff7c57fc45163f291c3d5f319582e97 --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../src/McMaterialEffectsUpdator.cxx | 25 +++++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsUpdator.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsUpdator.cxx index 09e7dca42348..75a407a4be1b 100755 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsUpdator.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsUpdator.cxx @@ -473,7 +473,7 @@ const Trk::TrackParameters* iFatras::McMaterialEffectsUpdator::updateInLay(const // ------------------------------------------------------------------------------- // prepare material collection - const Trk::MaterialProperties* extMatProp = 0; + const Trk::MaterialProperties* extMatProp = nullptr; double dInL0 = 0.; if (m_matProp) { extMatProp = dynamic_cast<const Trk::MaterialProperties*>(m_matProp); @@ -605,10 +605,25 @@ const Trk::TrackParameters* iFatras::McMaterialEffectsUpdator::updateInLay(const } if ( iStatus==1 || iStatus==2 ) { // interaction - - ISF::ISFParticleVector childs = iStatus==1 ? interactLay(isp,timeLim.time,*parm,particle,pathLim.process) : - m_hadIntProcessor->doHadIntOnLayer(isp, timeLim.time, parm->position(), parm->momentum(), - ( extMatProp ? &extMatProp->material() : 0), particle); + ISF::ISFParticleVector childs; + + if (iStatus == 1) + { + childs = interactLay(isp,timeLim.time,*parm,particle,pathLim.process); + } + else + { + if (extMatProp) + { + childs = + m_hadIntProcessor->doHadIntOnLayer(isp,timeLim.time,parm->position(),parm->momentum(),&extMatProp->material(),particle); + } + else + { + childs = + m_hadIntProcessor->doHadIntOnLayer(isp,timeLim.time,parm->position(),parm->momentum(),0,particle); + } + } // save info for locally created particles if (m_validationMode && childs.size()>0 && isp!=m_isp) { -- GitLab From bd5ae7c51f62f854edce13756a226fe5d9af2b59 Mon Sep 17 00:00:00 2001 From: Yi Liu <yi.liu@cern.ch> Date: Thu, 21 Jun 2018 11:34:12 +0200 Subject: [PATCH 221/562] coverity fix: move assignment operator of MagneticFieldProperties Former-commit-id: f0f1f98d332d115b92d9da9aaad694037897e7c7 --- .../TrkGeometry/TrkGeometry/MagneticFieldProperties.h | 3 +++ .../TrkGeometry/src/MagneticFieldProperties.cxx | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/MagneticFieldProperties.h b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/MagneticFieldProperties.h index 76ca21aac867..aae349405b2a 100755 --- a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/MagneticFieldProperties.h +++ b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/MagneticFieldProperties.h @@ -45,6 +45,9 @@ namespace Trk { /**Assignment operator */ MagneticFieldProperties& operator=(const MagneticFieldProperties& matprop); + + /**Move assignment operator */ + MagneticFieldProperties& operator=(MagneticFieldProperties && matprop); /**Cast operator*/ operator MagneticFieldMode () const; diff --git a/Tracking/TrkDetDescr/TrkGeometry/src/MagneticFieldProperties.cxx b/Tracking/TrkDetDescr/TrkGeometry/src/MagneticFieldProperties.cxx index 8d735773a8b2..7cab9328413c 100755 --- a/Tracking/TrkDetDescr/TrkGeometry/src/MagneticFieldProperties.cxx +++ b/Tracking/TrkDetDescr/TrkGeometry/src/MagneticFieldProperties.cxx @@ -34,8 +34,15 @@ Trk::MagneticFieldProperties& Trk::MagneticFieldProperties::operator=(const Trk: return(*this); } +Trk::MagneticFieldProperties& Trk::MagneticFieldProperties::operator=(Trk::MagneticFieldProperties&& magprop) +{ + if (this != &magprop){ + m_magneticFieldMode = magprop.m_magneticFieldMode; + m_magneticField = std::move(magprop.m_magneticField); + } + return(*this); +} - /**Overload of << operator for both, MsgStream and std::ostream for debug output*/ MsgStream& Trk::operator<<( MsgStream& sl, const Trk::MagneticFieldProperties& mprop) { -- GitLab From 726a34c06520cb781422613d153fdb7b1a387c76 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Wed, 20 Jun 2018 17:11:02 +0200 Subject: [PATCH 222/562] CaloUtils: Remove obsolete forwarding header. Remove obsolete (and unused) forwarding header ICaloCellMakerTool.h. Former-commit-id: 75ebcc929946789d62677f98755e7926504bc4a3 --- Calorimeter/CaloUtils/CaloUtils/ICaloCellMakerTool.h | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 Calorimeter/CaloUtils/CaloUtils/ICaloCellMakerTool.h diff --git a/Calorimeter/CaloUtils/CaloUtils/ICaloCellMakerTool.h b/Calorimeter/CaloUtils/CaloUtils/ICaloCellMakerTool.h deleted file mode 100644 index 8c031e32a096..000000000000 --- a/Calorimeter/CaloUtils/CaloUtils/ICaloCellMakerTool.h +++ /dev/null @@ -1,11 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef CALOUTILS_ICALOCELLMAKERTOOL_H -#define CALOUTILS_ICALOCELLMAKERTOOL_H - -#warning "obsolete header file: Use CaloInterface/ICaloCellMakerTool.h instead of CaloUtils/ICaloCellMakerTool.h " -#include "CaloInterface/ICaloCellMakerTool.h" - -#endif -- GitLab From ba746aa097278a0301f2833fc8fd976dbcdaccef Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Thu, 21 Jun 2018 06:05:03 +0200 Subject: [PATCH 223/562] CaloTools: Add some locking for CaloNoiseToolDB. This is a stop-gap solution to get this to work in MT jobs until this tool is rewritten properly. This will work for MC jobs in which the conditions do not actually change during the run, but it will likely fail in MT if conditions can change. Former-commit-id: cf174e6654897f61ff3cc5f0a3acdafca0297642 --- Calorimeter/CaloTools/CaloTools/CaloNoiseToolDB.h | 8 +++++++- Calorimeter/CaloTools/src/CaloNoiseToolDB.cxx | 14 +++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/Calorimeter/CaloTools/CaloTools/CaloNoiseToolDB.h b/Calorimeter/CaloTools/CaloTools/CaloNoiseToolDB.h index c0723cc5e7e2..ac6c35cd5b6e 100644 --- a/Calorimeter/CaloTools/CaloTools/CaloNoiseToolDB.h +++ b/Calorimeter/CaloTools/CaloTools/CaloNoiseToolDB.h @@ -30,6 +30,8 @@ #include <boost/multi_array.hpp> #include "GaudiKernel/ToolHandle.h" #include "LArElecCalib/ILArCellHVCorrTool.h" +#include <mutex> +#include <atomic> #define sqrt2 1.4142135623730950 #define invsqrt2 0.707106781186547524 @@ -298,7 +300,7 @@ private: std::vector<DataHandle<CondAttrListCollection> > m_noiseAttrListColl; std::map<SYSTEM, const CaloCondBlobFlt*> m_noiseBlobMap; - bool m_cacheValid; + std::atomic<bool> m_cacheValid; std::string m_ReturnNoiseName; @@ -320,6 +322,10 @@ private: bool m_rescaleForHV; unsigned m_cacheUpdateCounter; + + typedef std::mutex mutex_t; + typedef std::lock_guard<mutex_t> lock_t; + mutex_t m_mutex; }; #endif diff --git a/Calorimeter/CaloTools/src/CaloNoiseToolDB.cxx b/Calorimeter/CaloTools/src/CaloNoiseToolDB.cxx index 2eec234ffb26..9e08b69a0bda 100644 --- a/Calorimeter/CaloTools/src/CaloNoiseToolDB.cxx +++ b/Calorimeter/CaloTools/src/CaloNoiseToolDB.cxx @@ -254,6 +254,14 @@ CaloNoiseToolDB::updateCache() // the different COOL channels are also up to date. // { + // FIXME: The locking logic here works as long as we only need to run + // update once. It will likely fail in a MT job if conditions change + // during a run. What's here is probably sufficient for running on MC, + // but this tool needs a rewrite to properly handle running on real + // data in MC. + lock_t lock (m_mutex); + if (m_cacheValid) return; + ATH_MSG_INFO( " in update Cache " ); if (m_noiseBlobMap.size()!=7) { @@ -602,8 +610,6 @@ CaloNoiseToolDB::getNoise(const CaloDetDescrElement* caloDDE, CalorimeterNoiseTy float CaloNoiseToolDB::getNoise(const CaloCell* caloCell, CalorimeterNoiseType type) { - - if (!m_cacheValid) this->updateCache(); const CaloDetDescrElement* caloDDE = caloCell->caloDDE(); float Nminbias=-1; if( m_Nminbias>0 ) @@ -663,8 +669,6 @@ CaloNoiseToolDB::getNoise(const CaloCell* caloCell, CalorimeterNoiseType type) float CaloNoiseToolDB::getNoise(const CaloCell* caloCell, float energy, CalorimeterNoiseType type) { - - if (!m_cacheValid) this->updateCache(); const CaloDetDescrElement* caloDDE = caloCell->caloDDE(); float Nminbias=-1; if( m_Nminbias>0 ) @@ -1017,7 +1021,6 @@ CaloNoiseToolDB::totalNoiseRMS(const CaloDetDescrElement* caloDDE, const float energy, const int /*step*/) { // std::cout << "totalNoiseRMS e " << energy << " gain " << gain << std::endl; - if (!m_cacheValid) this->updateCache(); int i = (int)(caloDDE->calo_hash()); if (i>m_ncell) return -1; float lumi = (Nminbias>0) ? Nminbias*lumiPerNMinbias : m_lumi0; @@ -1026,6 +1029,7 @@ CaloNoiseToolDB::totalNoiseRMS(const CaloDetDescrElement* caloDDE, ICaloNoiseToolStep::CELLS); //Includes HV correction is applicable float b = this->getB(i,gain); + if (!m_cacheValid) this->updateCache(); int objver = m_noiseBlobMap[TILE]->getObjVersion(); if(objver==1){ //=== Total noise parameterized as -- GitLab From 962f748f6b16e0ebde124c2b925a942d8ac2d2db Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Fri, 8 Jun 2018 14:55:34 +0200 Subject: [PATCH 224/562] JetRec: Fix placement of using declarations. Using declarations should not be in the global namespace in headers. Former-commit-id: 0ffa717433b16058cce35af014f67563552a59a6 --- .../JetRec/MuonSegmentPseudoJetGetter.h | 3 +- .../Jet/JetRec/JetRec/PseudoJetGetter.h | 10 ++--- .../Root/MuonSegmentPseudoJetGetter.cxx | 1 + .../Jet/JetRec/Root/PseudoJetGetter.cxx | 1 + .../test/PseudoJetContainerOfflineTest.cxx | 6 +-- .../test/PseudoJetContainerTriggerTest.cxx | 5 ++- Reconstruction/Jet/JetRec/test/testHelpers.h | 42 +++++++------------ 7 files changed, 28 insertions(+), 40 deletions(-) diff --git a/Reconstruction/Jet/JetRec/JetRec/MuonSegmentPseudoJetGetter.h b/Reconstruction/Jet/JetRec/JetRec/MuonSegmentPseudoJetGetter.h index 4930ba7d1550..45b19c0667ee 100644 --- a/Reconstruction/Jet/JetRec/JetRec/MuonSegmentPseudoJetGetter.h +++ b/Reconstruction/Jet/JetRec/JetRec/MuonSegmentPseudoJetGetter.h @@ -37,7 +37,6 @@ #include "JetEDM/PseudoJetVector.h" #include "JetRec/PseudoJetContainer.h" -using fastjet::PseudoJet; class MuonSegmentPseudoJetGetter : public asg::AsgTool, @@ -84,7 +83,7 @@ protected: //data private: - std::vector<PseudoJet> + std::vector<fastjet::PseudoJet> createPseudoJets(const xAOD::MuonSegmentContainer*) const; }; diff --git a/Reconstruction/Jet/JetRec/JetRec/PseudoJetGetter.h b/Reconstruction/Jet/JetRec/JetRec/PseudoJetGetter.h index e0923a2178af..b0c5ff6c586c 100644 --- a/Reconstruction/Jet/JetRec/JetRec/PseudoJetGetter.h +++ b/Reconstruction/Jet/JetRec/JetRec/PseudoJetGetter.h @@ -40,8 +40,6 @@ #include "JetEDM/PseudoJetVector.h" -using fastjet::PseudoJet; - class PseudoJetGetter : public asg::AsgTool, virtual public IPseudoJetGetter { @@ -119,16 +117,16 @@ private: const PseudoJetContainer* getC() const; - std::vector<PseudoJet> + std::vector<fastjet::PseudoJet> createPseudoJets(const xAOD::IParticleContainer* ) const; - std::vector<PseudoJet> + std::vector<fastjet::PseudoJet> IParticlesToPJs(const xAOD::IParticleContainer*) const; - std::vector<PseudoJet> + std::vector<fastjet::PseudoJet> EMToposToPJs(const xAOD::IParticleContainer*) const; - std::vector<PseudoJet> + std::vector<fastjet::PseudoJet> PFlowsToPJs(const xAOD::IParticleContainer*) const; }; diff --git a/Reconstruction/Jet/JetRec/Root/MuonSegmentPseudoJetGetter.cxx b/Reconstruction/Jet/JetRec/Root/MuonSegmentPseudoJetGetter.cxx index 61a2caaabac0..0b54c3c7b68c 100644 --- a/Reconstruction/Jet/JetRec/Root/MuonSegmentPseudoJetGetter.cxx +++ b/Reconstruction/Jet/JetRec/Root/MuonSegmentPseudoJetGetter.cxx @@ -17,6 +17,7 @@ using std::string; using jet::PseudoJetVector; +using fastjet::PseudoJet; //********************************************************************** diff --git a/Reconstruction/Jet/JetRec/Root/PseudoJetGetter.cxx b/Reconstruction/Jet/JetRec/Root/PseudoJetGetter.cxx index fe6bbc52e903..433db76e4fa9 100644 --- a/Reconstruction/Jet/JetRec/Root/PseudoJetGetter.cxx +++ b/Reconstruction/Jet/JetRec/Root/PseudoJetGetter.cxx @@ -17,6 +17,7 @@ using std::string; using jet::PseudoJetVector; +using fastjet::PseudoJet; //********************************************************************** diff --git a/Reconstruction/Jet/JetRec/test/PseudoJetContainerOfflineTest.cxx b/Reconstruction/Jet/JetRec/test/PseudoJetContainerOfflineTest.cxx index 30e0834f55e8..8618c30a8aec 100644 --- a/Reconstruction/Jet/JetRec/test/PseudoJetContainerOfflineTest.cxx +++ b/Reconstruction/Jet/JetRec/test/PseudoJetContainerOfflineTest.cxx @@ -18,6 +18,9 @@ #include <iostream> #include <sstream> +#include "./testHelpers.h" + + using ::testing::Return; using ::testing::_; using ::testing::SetArgReferee; @@ -31,9 +34,6 @@ using xAOD::Jet; using xAOD::JetFourMom_t; -#include "./testHelpers.h" - - class PseudoJetContainerOfflineTest: public ::testing::Test { public: virtual void SetUp() { diff --git a/Reconstruction/Jet/JetRec/test/PseudoJetContainerTriggerTest.cxx b/Reconstruction/Jet/JetRec/test/PseudoJetContainerTriggerTest.cxx index 82105c77cbc4..17119ffe7482 100644 --- a/Reconstruction/Jet/JetRec/test/PseudoJetContainerTriggerTest.cxx +++ b/Reconstruction/Jet/JetRec/test/PseudoJetContainerTriggerTest.cxx @@ -17,6 +17,8 @@ #include <iostream> #include <sstream> +#include "./testHelpers.h" + using ::testing::Return; using ::testing::_; using ::testing::SetArgReferee; @@ -30,8 +32,7 @@ using xAOD::Jet; using xAOD::JetFourMom_t; -#include "./testHelpers.h" - + // Trigger tests for the PseudoJetContainer provide // the jet container with a JetTrigAuxContainer. // This allows adding consitituents, but not associated particles diff --git a/Reconstruction/Jet/JetRec/test/testHelpers.h b/Reconstruction/Jet/JetRec/test/testHelpers.h index 478e2ad172e0..c20a6097f12f 100644 --- a/Reconstruction/Jet/JetRec/test/testHelpers.h +++ b/Reconstruction/Jet/JetRec/test/testHelpers.h @@ -18,32 +18,20 @@ #include <iostream> #include <sstream> -using ::testing::Return; -using ::testing::_; -using ::testing::SetArgReferee; - - -using fastjet::PseudoJet; -using xAOD::IParticleContainer; -using xAOD::IParticle; -using xAOD::JetContainer; -using xAOD::Jet; -using xAOD::JetFourMom_t; - int JetContainerIndex (0); -JetContainer* store(JetContainer* jc) { +xAOD::JetContainer* store(xAOD::JetContainer* jc) { std::ostringstream os; os << "JetCont"<<JetContainerIndex++; SGTest::store.record(jc, os.str()); return jc; } -JetContainer* makeJetContainer_(const std::vector<JetFourMom_t>& v, - bool isTrigger= false, - bool storeIt=true) { - JetContainer* jc = new JetContainer; +xAOD::JetContainer* makeJetContainer_(const std::vector<xAOD::JetFourMom_t>& v, + bool isTrigger= false, + bool storeIt=true) { + xAOD::JetContainer* jc = new xAOD::JetContainer; if (isTrigger){ jc->setStore(new xAOD::JetTrigAuxContainer); } else { @@ -51,7 +39,7 @@ JetContainer* makeJetContainer_(const std::vector<JetFourMom_t>& v, } for (const auto& m : v){ - Jet* j = new Jet; + xAOD::Jet* j = new xAOD::Jet; jc->push_back(j); j->setJetP4(m); } @@ -59,16 +47,16 @@ JetContainer* makeJetContainer_(const std::vector<JetFourMom_t>& v, } -JetContainer* makeJetContainer_(bool isTrigger=false, bool storeIt = true) { - std::vector<JetFourMom_t> inMomenta; - inMomenta.push_back(JetFourMom_t(50., 0., 0., 0.)); //pt, eta, phi, m - inMomenta.push_back(JetFourMom_t(60., 0., 0., 0.)); //pt, eta, phi, m +xAOD::JetContainer* makeJetContainer_(bool isTrigger=false, bool storeIt = true) { + std::vector<xAOD::JetFourMom_t> inMomenta; + inMomenta.push_back(xAOD::JetFourMom_t(50., 0., 0., 0.)); //pt, eta, phi, m + inMomenta.push_back(xAOD::JetFourMom_t(60., 0., 0., 0.)); //pt, eta, phi, m return makeJetContainer_(inMomenta, isTrigger, storeIt); } -void typeAdjust(JetContainer* c){ - // Adjust Jet conatainer to allow it +void typeAdjust(xAOD::JetContainer* c){ + // Adjust Jet container to allow it // to be treated as an IParticle container by the test store // - full StoreGate does not need this. SG::DataProxy* proxy = SGTest::store.proxy(c); @@ -81,14 +69,14 @@ void typeAdjust(JetContainer* c){ struct IPtoPSConverter{ std::size_t ind{0}; - PseudoJet operator()(IParticle* ip){ - PseudoJet psj(ip->p4()); + fastjet::PseudoJet operator()(xAOD::IParticle* ip){ + fastjet::PseudoJet psj(ip->p4()); psj.set_user_index(ind++); return psj; } }; -IParticleExtractor* makeExtractor(const IParticleContainer* iparticles, +IParticleExtractor* makeExtractor(const xAOD::IParticleContainer* iparticles, bool isGhost, bool isTrigger=false){ // Create an Extractor -- GitLab From 6837158555a8b4e1807c3e89e4c838cad286f083 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Fri, 8 Jun 2018 14:55:44 +0200 Subject: [PATCH 225/562] JetSimTools: Fix placement of using declarations. Using declarations should not be in the global namespace in headers. Former-commit-id: af82bb3861068c1a2bed84dfc5f99ba3a214caf3 --- Reconstruction/Jet/JetSimTools/Root/TruthPseudoJetGetter.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Reconstruction/Jet/JetSimTools/Root/TruthPseudoJetGetter.cxx b/Reconstruction/Jet/JetSimTools/Root/TruthPseudoJetGetter.cxx index c90c48ad55c5..f2fb070dc166 100644 --- a/Reconstruction/Jet/JetSimTools/Root/TruthPseudoJetGetter.cxx +++ b/Reconstruction/Jet/JetSimTools/Root/TruthPseudoJetGetter.cxx @@ -6,6 +6,9 @@ #include "JetSimTools/TruthParticleExtractor.h" +using fastjet::PseudoJet; + + //********************************************************************** TruthPseudoJetGetter::TruthPseudoJetGetter(const std::string &name) -- GitLab From 13922831b48ee6166dd3bccf3995babefd9277e6 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Fri, 8 Jun 2018 14:55:55 +0200 Subject: [PATCH 226/562] JetRecTools: Fix placement of using declarations. Using declarations should not be in the global namespace in headers. Former-commit-id: e30308d4e67e7b50a03d5a263a36e58f7dd1b0be --- .../Jet/JetRecTools/JetRecTools/TrackPseudoJetGetter.h | 2 +- Reconstruction/Jet/JetRecTools/Root/TrackPseudoJetGetter.cxx | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Reconstruction/Jet/JetRecTools/JetRecTools/TrackPseudoJetGetter.h b/Reconstruction/Jet/JetRecTools/JetRecTools/TrackPseudoJetGetter.h index 6294b7620815..7fe5a598eff4 100644 --- a/Reconstruction/Jet/JetRecTools/JetRecTools/TrackPseudoJetGetter.h +++ b/Reconstruction/Jet/JetRecTools/JetRecTools/TrackPseudoJetGetter.h @@ -41,7 +41,7 @@ protected: private: - std::vector<PseudoJet> + std::vector<fastjet::PseudoJet> createPseudoJets(const xAOD::TrackParticleContainer*) const; const PseudoJetContainer* getC() const; diff --git a/Reconstruction/Jet/JetRecTools/Root/TrackPseudoJetGetter.cxx b/Reconstruction/Jet/JetRecTools/Root/TrackPseudoJetGetter.cxx index a3b6e641b04c..a4d3254dd284 100644 --- a/Reconstruction/Jet/JetRecTools/Root/TrackPseudoJetGetter.cxx +++ b/Reconstruction/Jet/JetRecTools/Root/TrackPseudoJetGetter.cxx @@ -14,6 +14,10 @@ #include "xAODTracking/TrackParticle.h" #include "xAODTracking/TrackParticleContainer.h" + +using fastjet::PseudoJet; + + TrackPseudoJetGetter::TrackPseudoJetGetter(const std::string &name) : PseudoJetGetter(name) , m_inTVA("JetTrackVtxAssoc") { declareProperty("TrackVertexAssociation", m_inTVA, "SG key for the TrackVertexAssociation object"); -- GitLab From dc446d9ed8b50b3b086125e5ba5fdf0fc2c6cb23 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Wed, 20 Jun 2018 17:14:02 +0200 Subject: [PATCH 227/562] EventUtils: Fix clang warning. clang warning: unused lambda capture. Former-commit-id: 69c9de65e879741ab86205906584f548b4d94bda --- .../AnalysisCommon/EventUtils/src/ParticleCombinerTool.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleCombinerTool.cxx b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleCombinerTool.cxx index a231dd86f468..872bf525912e 100644 --- a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleCombinerTool.cxx +++ b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleCombinerTool.cxx @@ -555,7 +555,7 @@ StatusCode ParticleCombinerTool::buildComposite( xAOD::CompositeParticleContaine // Sort the constituents in decending pt order, if requested if ( m_sortConstit.value() ) { std::sort( anIPartLinkList.begin(), anIPartLinkList.end(), - [this](const xAOD::IParticleLink& a, const xAOD::IParticleLink& b) { + [](const xAOD::IParticleLink& a, const xAOD::IParticleLink& b) { return CxxUtils::fpcompare::greater( (*a)->pt(), (*b)->pt() ); } ); } -- GitLab From 98fc247e4d7679f28d6729dd478ce7c136903b27 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Wed, 20 Jun 2018 17:14:16 +0200 Subject: [PATCH 228/562] AnalysisExamples: Fix clang warning. clang warning: unused variable. Former-commit-id: ccdd42c199428043243761725090c5c9047bddf1 --- .../AnalysisCommon/AnalysisExamples/src/JetTagAna.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/src/JetTagAna.cxx b/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/src/JetTagAna.cxx index a05259cd9803..cc8d663c6464 100644 --- a/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/src/JetTagAna.cxx +++ b/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/src/JetTagAna.cxx @@ -1046,8 +1046,6 @@ StatusCode JetTagAna::execute() { const LVL1_ROI* lvl1RoI = 0; sc = evtStore()->retrieve(lvl1RoI); - LVL1_ROI::jets_type::const_iterator itrL1; - if (sc.isFailure() || !lvl1RoI) { ATH_MSG_WARNING ( "No L1RoI found in TDS" ); return StatusCode::SUCCESS; -- GitLab From c3c9e5816a319b5f5da04b099335b5769471459e Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Thu, 21 Jun 2018 16:26:13 +0200 Subject: [PATCH 229/562] Solve coverity 118509 Former-commit-id: fa74a5f6ebcc9b5608c49c337822a4561b75d681 --- .../CaloClusterROI_Selector.h | 5 ++--- .../src/CaloClusterROI_Selector.cxx | 16 +++++----------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/InnerDetector/InDetRecAlgs/InDetCaloClusterROISelector/InDetCaloClusterROISelector/CaloClusterROI_Selector.h b/InnerDetector/InDetRecAlgs/InDetCaloClusterROISelector/InDetCaloClusterROISelector/CaloClusterROI_Selector.h index eeac3bdef557..c173c5121cff 100755 --- a/InnerDetector/InDetRecAlgs/InDetCaloClusterROISelector/InDetCaloClusterROISelector/CaloClusterROI_Selector.h +++ b/InnerDetector/InDetRecAlgs/InDetCaloClusterROISelector/InDetCaloClusterROISelector/CaloClusterROI_Selector.h @@ -11,7 +11,6 @@ */ // INCLUDE HEADER FILES: -#include <vector> #include "AthenaBaseComps/AthReentrantAlgorithm.h" #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/IChronoStatSvc.h" @@ -77,8 +76,8 @@ class CaloClusterROI_Selector : public AthReentrantAlgorithm // // All booleans // - bool m_CheckHadronicEnergy; - bool m_CheckReta; + bool m_CheckHadronicEnergy{}; + bool m_CheckReta{}; // // Other properties. // diff --git a/InnerDetector/InDetRecAlgs/InDetCaloClusterROISelector/src/CaloClusterROI_Selector.cxx b/InnerDetector/InDetRecAlgs/InDetCaloClusterROISelector/src/CaloClusterROI_Selector.cxx index e0bd2d7c4e76..6e7918e300d0 100755 --- a/InnerDetector/InDetRecAlgs/InDetCaloClusterROISelector/src/CaloClusterROI_Selector.cxx +++ b/InnerDetector/InDetRecAlgs/InDetCaloClusterROISelector/src/CaloClusterROI_Selector.cxx @@ -37,7 +37,7 @@ PURPOSE: For each cluster create a new CaloClusterROI object and fills it then #include "GaudiKernel/MsgStream.h" #include <algorithm> -#include <math.h> +#include <cmath> // END OF HEADER FILES INCLUDE @@ -81,11 +81,6 @@ InDet::CaloClusterROI_Selector::CaloClusterROI_Selector(const std::string& name, // declareProperty("CaloClusterROIBuilder", m_caloClusterROI_Builder,"Handle of the CaloClusterROI_Builder Tool"); // - // Other properties. - // - // declareProperty("CheckEMSamples", m_CheckEMsamples =true); - // declareProperty("CheckHadronicEnergy", m_CheckHadronicEnergy=true); - // declareProperty("HadRatioCut", m_HadRatioCut =0.12, " Cut on Hadronic Leakage"); declareProperty("RetaCut", m_RetaCut =0.65, " Cut on Reta"); @@ -164,7 +159,6 @@ StatusCode InDet::CaloClusterROI_Selector::execute_r(const EventContext& ctx) co // athena execute method // - //bool do_trackMatch = true; ATH_MSG_DEBUG("Executing CaloClusterROI_Selector"); // Chrono name for each Tool @@ -234,13 +228,13 @@ bool InDet::CaloClusterROI_Selector::PassClusterSelection(const xAOD::CaloCluste } // transverse energy in calorimeter (using eta position in second sampling) - double eta2 = fabs(cluster->etaBE(2)); + double eta2 = std::fabs(cluster->etaBE(2)); if (eta2>2.47 || eta2<0.) { ATH_MSG_DEBUG("Cluster failed acceptance test: dont make ROI"); return false; } - double et = cosh(eta2)!=0. ? cluster->e()/cosh(eta2) : 0.; + double et = std::cosh(eta2)!=0. ? cluster->e()/std::cosh(eta2) : 0.; if ( et < m_ClusterEtCut ){ ATH_MSG_DEBUG("Cluster failed Energy Cut: dont make ROI"); @@ -283,8 +277,8 @@ bool InDet::CaloClusterROI_Selector::PassClusterSelection(const xAOD::CaloCluste delete HADccl; double ethad1 = info.ethad1; double ethad = info.ethad; - double raphad1 = fabs(et) > 0. ? ethad1/et : 0.; - double raphad = fabs(et) > 0. ? ethad/et : 0.; + double raphad1 = std::fabs(et) > 0. ? ethad1/et : 0.; + double raphad = std::fabs(et) > 0. ? ethad/et : 0.; if (eta2 >= 0.8 && eta2 < 1.37){ if (raphad >m_HadRatioCut){ ATH_MSG_DEBUG("Cluster failed Hadronic Leakage test: dont make ROI"); -- GitLab From aa6e39318c55a9af5b6c045ada59cbaca6c0a879 Mon Sep 17 00:00:00 2001 From: Shota Hayashida <hayashida@hepl.phys.nagoya-u.ac.jp> Date: Thu, 21 Jun 2018 16:38:18 +0200 Subject: [PATCH 230/562] Update Former-commit-id: 30a3ef9ecb00aed8422e31b63b11c77abfc40483 --- .../TrigMuonHypo/src/TrigmuCombHypoAlg.cxx | 14 +----- .../TrigUpgradeTest/python/muMenuDefs.py | 48 +++++++------------ .../TrigUpgradeTest/share/mu.menu.py | 2 - 3 files changed, 17 insertions(+), 47 deletions(-) diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigmuCombHypoAlg.cxx b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigmuCombHypoAlg.cxx index 00a3f09e0087..4f53a7f536fa 100644 --- a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigmuCombHypoAlg.cxx +++ b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigmuCombHypoAlg.cxx @@ -56,7 +56,6 @@ StatusCode TrigmuCombHypoAlg::finalize() StatusCode TrigmuCombHypoAlg::execute_r(const EventContext& context) const { - // common for all Hypos, to move in the base class ATH_MSG_DEBUG("StatusCode TrigmuCombHypoAlg::execute_r start"); auto previousDecisionsHandle = SG::makeHandle( decisionInput(), context); @@ -77,18 +76,12 @@ StatusCode TrigmuCombHypoAlg::execute_r(const EventContext& context) const for ( auto previousDecision: *previousDecisionsHandle ) { // get L2MuonSA Feature - //ATH_CHECK( previousDecision->hasObjectLink("feature") ); - //auto muFastEL = previousDecision->objectLink<xAOD::L2StandAloneMuonContainer>("feature"); - //ATH_CHECK( muFastEL.isValid() ); - //const xAOD::L2StandAloneMuon* muFast = *muFastEL; - TrigCompositeUtils::LinkInfo<xAOD::L2StandAloneMuonContainer> linkInfo = TrigCompositeUtils::findLink<xAOD::L2StandAloneMuonContainer>(previousDecision, "feature"); ElementLink<xAOD::L2StandAloneMuonContainer> muFastLink = linkInfo.link; ATH_CHECK( muFastLink.isValid() ); const xAOD::L2StandAloneMuon* muFast = *muFastLink; - // get View ATH_CHECK( previousDecision->hasObjectLink("view") ); auto viewEL = previousDecision->objectLink<ViewContainer>("view"); @@ -100,10 +93,9 @@ StatusCode TrigmuCombHypoAlg::execute_r(const EventContext& context) const // get info auto muCombHandle = SG::makeHandle( m_muCombKey, context ); ATH_CHECK( muCombHandle.setProxyDict(view) ); - //ATH_CHECK( muCombHandle.isValid() ); + ATH_CHECK( muCombHandle.isValid() ); ATH_MSG_DEBUG( "Muinfo handle size: " << muCombHandle->size() << "..."); - //auto muCombEL = ElementLink<xAOD::L2CombinedMuonContainer> ( view->name()+"_"+m_muCombKey.key(), counter); auto muCombEL = ElementLink<xAOD::L2CombinedMuonContainer> ( view->name()+"_"+m_muCombKey.key(), 0 ); ATH_CHECK( muCombEL.isValid() ); const xAOD::L2CombinedMuon* muComb = *muCombEL; @@ -115,7 +107,6 @@ StatusCode TrigmuCombHypoAlg::execute_r(const EventContext& context) const // set objectLink newd->setObjectLink( "feature", muCombEL ); - //newd->setObjectLink( "", muFast ); TrigCompositeUtils::linkToPrevious( newd, decisionInput().key(), counter); // DEBUG @@ -129,12 +120,10 @@ StatusCode TrigmuCombHypoAlg::execute_r(const EventContext& context) const counter++; } - for ( auto & tool: m_hypoTools ) { ATH_MSG_DEBUG("Go to " << tool); ATH_CHECK( tool->decide( toolInput ) ); } - {// make output handle and debug, in the base class auto outputHandle = SG::makeHandle( decisionOutput(), context ); ATH_CHECK( outputHandle.record( std::move( decisions ), std::move( aux ) ) ); @@ -150,7 +139,6 @@ StatusCode TrigmuCombHypoAlg::execute_r(const EventContext& context) const } } - ATH_MSG_DEBUG("StatusCode TrigmuCombHypoAlg::execute_r success"); return StatusCode::SUCCESS; } diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py b/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py index 40df487b1b00..340308d0741d 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py @@ -46,12 +46,11 @@ from AthenaCommon.CFElements import parOR, seqAND, seqOR, stepSeq doL2SA=True doL2CB=True doEFSA=False -#TriggerFlags.doID=False +TriggerFlags.doID=True -# =============================================================================================== -# Setup PrepData -# =============================================================================================== - +# =========================================== +# SET PREPARATOR DATA +# =========================================== ### Used the algorithms as Step2 "muComb step" ### if TriggerFlags.doID: @@ -113,7 +112,7 @@ if TriggerFlags.doMuon: efMuViewsMaker.ViewNodeName = efMuViewNode.name() if doEFSA or doL2SA: - ### ==================== Data prepartion needed for the EF and L2 SA #######################333 + ### ==================== Data prepartion needed for the EF and L2 SA ==================== ### ### CSC RDO data ### if muonRecFlags.doCSCs(): from MuonCSC_CnvTools.MuonCSC_CnvToolsConf import Muon__CscROD_Decoder @@ -307,10 +306,9 @@ if TriggerFlags.doMuon: #filterL1RoIsAlg.OutputLevel = DEBUG -# =============================================================================================== -# Setup L2MuonSA -# =============================================================================================== - +# =========================================== +# SET L2MUONSA +# =========================================== if doL2SA: ### set up MuFastSteering ### from TrigL2MuonSA.TrigL2MuonSAConfig import TrigL2MuonSAMTConfig @@ -328,7 +326,7 @@ if TriggerFlags.doMuon: muFastAlg.forID = "forID" muFastAlg.forMS = "forMS" - # set up MuFastHypo + ### set up MuFastHypo ### from TrigMuonHypo.TrigMuonHypoConf import TrigMufastHypoAlg trigMufastHypo = TrigMufastHypoAlg("L2MufastHypoAlg") trigMufastHypo.OutputLevel = DEBUG @@ -345,11 +343,9 @@ if TriggerFlags.doMuon: Hypo=trigMufastHypo, HypoToolClassName="TrigMufastHypoToolConf") - -# =============================================================================================== -# Setup muComb -# =============================================================================================== - +# =========================================== +# SET L2MUCOMB +# =========================================== if doL2CB: ### RoRSeqFilter step2 ### #filterL2SAAlg = RoRSeqFilter("filterL2SAAlg") @@ -358,17 +354,6 @@ if TriggerFlags.doMuon: #filterL2SAAlg.Chains = testChains #filterL2SAAlg.OutputLevel = DEBUG - #l2muCombViewNode = AthSequencer("l2muCombViewNode", Sequential=False, ModeOR=False, StopOverride=False) - #l2muCombViewsMaker = EventViewCreatorAlgorithm("l2muCombViewsMaker", OutputLevel=DEBUG) - #l2muCombViewsMaker.ViewFallThrough = True - - #l2muCombViewsMaker.InputMakerInputDecisions = [ filterL2SAAlg.Output[0] ] # Output of TrigMufastHypo - #l2muCombViewsMaker.InputMakerOutputDecisions = [ filterL2SAAlg.Output[0]+"Comb" ] # Output of TrigMufastHypo - #l2muCombViewsMaker.RoIsLink = "roi" # -||- - #l2muCombViewsMaker.InViewRoIs = "MUTrkRoIs" # contract with the consumer - #l2muCombViewsMaker.Views = "MUTrkViewRoIs" - #l2muCombViewsMaker.ViewNodeName = l2muCombViewNode.name() - l2muCombViewNode = seqAND("l2muCombViewNode") l2muCombViewsMaker = EventViewCreatorAlgorithm("l2muCombViewsMaker", OutputLevel=DEBUG) l2muCombViewsMaker.ViewFallThrough = True @@ -412,7 +397,7 @@ if TriggerFlags.doMuon: l2muCombSequence = seqAND("l2muCombSequence", eventAlgs + [l2muCombViewsMaker, l2muCombViewNode ] ) - l2muComb_HLTSequence = HLTRecoSequence("l2muFast_HLTSequence", + l2muComb_HLTSequence = HLTRecoSequence("l2muComb_HLTSequence", Sequence=l2muCombSequence, Maker=l2MuViewsMaker, Seed="L1MU") @@ -423,10 +408,9 @@ if TriggerFlags.doMuon: HypoToolClassName="TrigmuCombHypoToolConf") -# =============================================================================================== -# Setup EFMuonSA -# =============================================================================================== - +# =========================================== +# SET EFMUON +# =========================================== ### It cannot be used because it has not yet been migrated for muon menu ### # if doEFSA: diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py index bdee5716aa6a..d3aaf194ab6f 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py @@ -98,8 +98,6 @@ if TriggerFlags.doMuon==True: if doL2SA==True and doL2CB==True and doEFSA==False: MenuChains += [Chain(name='HLT_mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]), ChainStep("Step2_muComb", [muCombStep]) ])] - #MenuChains += [Chain(name='HLT_2mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]), - # ChainStep("Step2_muComb", [muCombStep]) ])] if doL2SA==True and doEFSA==True and doL2CB==True: MenuChains += [Chain(name='HLT_mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]), ChainStep("Step2_muComb", [muCombStep]) ])] -- GitLab From 698d0990a325ca03f8703e6094dc15e39d30ca70 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Thu, 21 Jun 2018 06:03:59 +0200 Subject: [PATCH 231/562] dqm_algorithms: Comply with ATLAS naming conventions. Private data members should start with m_. Former-commit-id: 79b99259093a1d0b548e0ff0de7a08b890c342bc --- .../dqm_algorithms/BinHeightThreshold.h | 4 +- .../dqm_algorithms/src/BinHeightThreshold.cxx | 42 +++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/DataQuality/dqm_algorithms/dqm_algorithms/BinHeightThreshold.h b/DataQuality/dqm_algorithms/dqm_algorithms/BinHeightThreshold.h index 19025fb2a2c2..ffd748cfd4d2 100644 --- a/DataQuality/dqm_algorithms/dqm_algorithms/BinHeightThreshold.h +++ b/DataQuality/dqm_algorithms/dqm_algorithms/BinHeightThreshold.h @@ -30,8 +30,8 @@ namespace dqm_algorithms void printDescription(std::ostream& out); private: - std::string name_; - double precision_; + std::string m_name; + double m_precision; }; } diff --git a/DataQuality/dqm_algorithms/src/BinHeightThreshold.cxx b/DataQuality/dqm_algorithms/src/BinHeightThreshold.cxx index b1e3401bd868..1c4b33d6a22c 100644 --- a/DataQuality/dqm_algorithms/src/BinHeightThreshold.cxx +++ b/DataQuality/dqm_algorithms/src/BinHeightThreshold.cxx @@ -32,16 +32,16 @@ namespace } dqm_algorithms::BinHeightThreshold::BinHeightThreshold( const std::string & name ) - : name_( name ) + : m_name( name ) { - precision_=1e-4; + m_precision=1e-4; dqm_core::AlgorithmManager::instance().registerAlgorithm("BinHeight_"+name+"_Threshold", this); } dqm_algorithms::BinHeightThreshold * dqm_algorithms::BinHeightThreshold::clone() { - return new BinHeightThreshold(name_); + return new BinHeightThreshold(m_name); } @@ -92,17 +92,17 @@ dqm_algorithms::BinHeightThreshold::execute( const std::string & name, grayValue.second=-1; } try { - precision_ = dqm_algorithms::tools::GetFirstFromMap( "EqualityPrecision", config.getParameters(),1e-4); + m_precision = dqm_algorithms::tools::GetFirstFromMap( "EqualityPrecision", config.getParameters(),1e-4); } catch ( dqm_core::Exception & ex ) { - precision_=1e-4; + m_precision=1e-4; } //check if the provided parameter values make sense - if(precision_<0) { + if(m_precision<0) { ERS_INFO("'EqualityPrecision cannot be negative: it will be re-set to its absolute value."); - precision_=fabs(precision_); + m_precision=fabs(m_precision); } if(window_size<=0) { ERS_INFO("You set search window size (WindowSize) <= 0: I will search the whole histogram."); @@ -117,8 +117,8 @@ dqm_algorithms::BinHeightThreshold::execute( const std::string & name, ERS_INFO("You set the minimum number of bins for throwing error/warning (NBins) <= 0: in this way the algorithm would always return error. Setting NBins=1 (default value)."); n_bins=1; } - CheckThresholds(name_,gthreshold,rthreshold); - grayValue.first=checkUndefinedStatusValue(name_,gthreshold,rthreshold,grayValue); + CheckThresholds(m_name,gthreshold,rthreshold); + grayValue.first=checkUndefinedStatusValue(m_name,gthreshold,rthreshold,grayValue); dqm_core::Result* result = new dqm_core::Result(); TH1* resulthisto; @@ -160,7 +160,7 @@ dqm_algorithms::BinHeightThreshold::execute( const std::string & name, while(iLB>=1 && (window_size<0 || (i_currentLB-iLB)<window_size)) { double content=histogram->GetBinContent(iLB); - dqm_algorithms::BinHeightThreshold::binStatus LBstatus=CompareBinHeightThreshold(name_,content, gthreshold , rthreshold,grayValue); + dqm_algorithms::BinHeightThreshold::binStatus LBstatus=CompareBinHeightThreshold(m_name,content, gthreshold , rthreshold,grayValue); if(LBstatus==dqm_algorithms::BinHeightThreshold::binStatus::aYellowBin) { countYellow++; @@ -340,10 +340,10 @@ dqm_algorithms::BinHeightThreshold::equalWithinPrecision(double a,double b) else if (a == 0 || b == 0 || diff < DBL_MIN) { // a or b is zero or both are extremely close to it // relative error is less meaningful here - return diff < (precision_ * DBL_MIN); + return diff < (m_precision * DBL_MIN); } else { // use relative error - return (diff / std::min((absA + absB), DBL_MAX)) < precision_; + return (diff / std::min((absA + absB), DBL_MAX)) < m_precision; } } @@ -351,29 +351,29 @@ void dqm_algorithms::BinHeightThreshold::printDescription(std::ostream& out) { TString redCond,yellowCond; - if(name_=="redEqual_yellowGreaterThan" || name_=="redEqual_yellowLessThan" || name_=="Equal") + if(m_name=="redEqual_yellowGreaterThan" || m_name=="redEqual_yellowLessThan" || m_name=="Equal") { redCond="bin_content==redThreshold"; - if(name_=="Equal") + if(m_name=="Equal") yellowCond="bin_content==yellowThreshold && bin_content!=redThreshold"; - else if(name_=="redEqual_yellowGreaterThan") + else if(m_name=="redEqual_yellowGreaterThan") yellowCond="bin_content>yellowThreshold && bin_content!=redThreshold"; else yellowCond="bin_content<yellowThreshold && bin_content!=redThreshold"; } else { - if(name_=="GreaterThan") + if(m_name=="GreaterThan") { redCond="bin_content>redThreshold"; yellowCond="redThreshold>=bin_content>yellowThreshold"; } - else if(name_=="LessThan") + else if(m_name=="LessThan") { redCond="bin_content<redThreshold"; yellowCond="redThreshold<=bin_content<yellowThreshold"; } - else if(name_=="GreaterThanEqual") + else if(m_name=="GreaterThanEqual") { redCond="bin_content>=redThreshold"; yellowCond="redThreshold>bin_content>=yellowThreshold"; @@ -384,9 +384,9 @@ dqm_algorithms::BinHeightThreshold::printDescription(std::ostream& out) yellowCond="redThreshold<bin_content<=yellowThreshold"; } } - out << "BinHeight_" << name_ << "_Threshold checks the bin height of a TH1. Ideally, a quantity as a function of LB. LB is expected to be on x axis, the quantity of interest is the bin content." << std::endl; - out << "BinHeight_" << name_ << "_Threshold defines 'red' and 'yellow' bins depending on the value of the bin content:\n \t-if " << redCond << ": the bin is 'red'.\n \t-if " << yellowCond << ": the bin is 'yellow'.\n \t-if (OPTIONAL) an 'UndefinedStatus' value is set and bin_content==UndefinedStatus, the bin is 'gray'."; - if(name_!="GreaterThan" && name_!="LessThan") + out << "BinHeight_" << m_name << "_Threshold checks the bin height of a TH1. Ideally, a quantity as a function of LB. LB is expected to be on x axis, the quantity of interest is the bin content." << std::endl; + out << "BinHeight_" << m_name << "_Threshold defines 'red' and 'yellow' bins depending on the value of the bin content:\n \t-if " << redCond << ": the bin is 'red'.\n \t-if " << yellowCond << ": the bin is 'yellow'.\n \t-if (OPTIONAL) an 'UndefinedStatus' value is set and bin_content==UndefinedStatus, the bin is 'gray'."; + if(m_name!="GreaterThan" && m_name!="LessThan") out << " Note that if 'UndefinedStatus' is equal to 'redThreshold' or 'yellowThreshold', the bin will be 'red'/'yellow' rather than 'gray'."; out << "\n \t-otherwise the bin is 'green'" << std::endl; out << "The algorithm checks all the bins in a window of size 'WindowSize', starting from:\n \t a) the last but X bin.\n \t b) the last non-zero bin.\n Oprion a) or b) is chosen by the parameter 'StartFromLast': if('StartFromLast'>=0), (a) holds and X is equal to 'StartFromLast', while (b) holds if 'StartFromLast'<0." << std::endl; -- GitLab From 47d25034744f6eaff038c68e41e2506dee9a6c89 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Thu, 21 Jun 2018 16:49:31 +0200 Subject: [PATCH 232/562] Modified base class, added configuration sanity checks Former-commit-id: 2ff5ddf19187c72e3e7b56b9adc6e7bdc68a45c6 --- .../DecisionHandling/src/ComboHypo.cxx | 41 ++++++++++++++----- .../DecisionHandling/src/ComboHypo.h | 12 ++++-- 2 files changed, 39 insertions(+), 14 deletions(-) diff --git a/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx b/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx index 942e68367759..7b6ae17c7ead 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx +++ b/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx @@ -8,7 +8,7 @@ using namespace TrigCompositeUtils; ComboHypo::ComboHypo(const std::string& name, ISvcLocator* pSvcLocator) - : InputMakerBase(name, pSvcLocator) + : ::AthReentrantAlgorithm(name, pSvcLocator) {} ComboHypo::~ComboHypo() @@ -16,10 +16,29 @@ ComboHypo::~ComboHypo() StatusCode ComboHypo::initialize() { //ATH_MSG_DEBUG("Use macros for logging!"); - for ( auto m: m_multiplicitiesMap ) { - // check if all is correctly configured, the same multiplicity everywhere + ATH_CHECK( m_outputs.initialize() ); + ATH_CHECK( m_inputs.initialize() ); + ATH_CHECK( m_inputs.size() == m_outputs.size() ); + + + ATH_CHECK( m_multiplicitiesReqMap.size() != 0 ); + + // find max inputs size + auto maxMultEl = std::max_element( m_multiplicitiesReqMap.begin(), m_multiplicitiesReqMap.end(), + []( MultiplicityReqMap::value_type a, MultiplicityReqMap::value_type b ){ + return a.second.size() < b.second.size(); } ); + + const size_t maxMult = maxMultEl->second.size(); + + bool errorOccured = false; + for ( auto m: m_multiplicitiesReqMap ) { + if ( m.second.size() != maxMult ) { + errorOccured = true; + ATH_MSG_ERROR( "Chain " << m.first << " configured with input multiplicity " << m.second.size() << " like this: " << m.second << " which is lower than for this chain " << maxMultEl->first << " " << maxMult); + } } - return StatusCode::SUCCESS; + + return ( errorOccured ? StatusCode::FAILURE : StatusCode::SUCCESS ); } StatusCode ComboHypo::finalize() { @@ -28,14 +47,14 @@ StatusCode ComboHypo::finalize() { StatusCode ComboHypo::copyDecisions( const DecisionIDContainer& passing ) const { - for ( size_t input_counter = 0; input_counter < decisionInputs().size(); ++input_counter ) { + for ( size_t input_counter = 0; input_counter < m_inputs.size(); ++input_counter ) { auto outDecisions = std::make_unique<DecisionContainer>(); auto outDecAux = std::make_unique<DecisionAuxContainer>(); outDecisions->setStore( outDecAux.get() ); - auto inputHandle = SG::makeHandle( decisionInputs()[input_counter] ); + auto inputHandle = SG::makeHandle( m_inputs[input_counter] ); const DecisionContainer* inputs = inputHandle.cptr(); const size_t sz = inputs->size(); @@ -56,15 +75,15 @@ StatusCode ComboHypo::copyDecisions( const DecisionIDContainer& passing ) const addDecisionID( id, newDec ); } } - auto handle = SG::makeHandle( decisionOutputs()[input_counter] ); + auto handle = SG::makeHandle( m_outputs[input_counter] ); ATH_CHECK( handle.record( std::move( outDecisions ), std::move( outDecAux ) ) ); } return StatusCode::SUCCESS; } void ComboHypo::fillDecisionsMap( std::vector< MultiplicityMap >& dmap) const { - for ( size_t i = 0; i < decisionInputs().size(); ++i ) { - auto inputHandle = SG::makeHandle( decisionInputs().at(i) ); + for ( size_t i = 0; i < m_inputs.size(); ++i ) { + auto inputHandle = SG::makeHandle( m_inputs.at(i) ); MultiplicityMap& thisInputDmap = dmap[i]; for ( const Decision* decision : *inputHandle.cptr() ) { for ( DecisionID id: decisionIDs( decision ) ) { @@ -77,10 +96,10 @@ void ComboHypo::fillDecisionsMap( std::vector< MultiplicityMap >& dmap) const { StatusCode ComboHypo::execute_r(const EventContext& ) const { DecisionIDContainer passing; // this map is filled with the count of positive decisions from each input - std::vector< MultiplicityMap > dmap( decisionInputs().size() ); + std::vector< MultiplicityMap > dmap( m_inputs.size() ); fillDecisionsMap( dmap ); - for ( auto m: m_multiplicitiesMap ) { + for ( auto m: m_multiplicitiesReqMap ) { const DecisionID requiredDecisionID = HLT::Identifier( m.first ).numeric(); bool overallDecision = true; diff --git a/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.h b/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.h index b5a075dbd629..e1ab800f76af 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.h +++ b/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.h @@ -5,7 +5,7 @@ #define DECISIONHANDLING_COMBOHYPO_H // Framework includes -#include "DecisionHandling/InputMakerBase.h" +#include "AthenaBaseComps/AthReentrantAlgorithm.h" #include "DecisionHandling/TrigCompositeUtils.h" // STL includes @@ -21,7 +21,7 @@ * the multiplicity specification like this: * "HLT_4e10_2mu7_j100" : [ 4, 2, 1 ] will apply respectively requirement of 4, 2, 1 positive decisions in electron, muon and jet inputs **/ -class ComboHypo : public InputMakerBase { +class ComboHypo : public ::AthReentrantAlgorithm { public: ComboHypo(const std::string& name, ISvcLocator* pSvcLocator); virtual ~ComboHypo() override; @@ -31,7 +31,13 @@ public: virtual StatusCode finalize() override; private: - Gaudi::Property< std::map<std::string, std::vector<int>>> m_multiplicitiesMap{this, "MultiplicitiesMap", {}, "Map from the chain name to implicities required at each input"}; + SG::ReadHandleKeyArray<TrigCompositeUtils::DecisionContainer> m_inputs { this, "HypoInputDecisions", {}, "Input Decisions" }; + /// output decisions + SG::WriteHandleKeyArray<TrigCompositeUtils::DecisionContainer> m_outputs { this, "HypoOutputDecisions", {}, "Ouput Decisions" }; + + + typedef std::map<std::string, std::vector<int>> MultiplicityReqMap; + Gaudi::Property< MultiplicityReqMap > m_multiplicitiesReqMap{this, "MultiplicitiesMap", {}, "Map from the chain name to implicities required at each input"}; //!< iterates over the inputs and for every object (no filtering) crates output object linked to input moving the decisions that are mentioned in the passing set StatusCode copyDecisions( const TrigCompositeUtils::DecisionIDContainer& passing ) const; -- GitLab From 43d94d22f665c132b0a47a1d202ca26ae71c1a9b Mon Sep 17 00:00:00 2001 From: "Vincent R. Pascuzzi" <vpascuzz@cern.ch> Date: Thu, 21 Jun 2018 11:16:25 -0400 Subject: [PATCH 233/562] Update G4HadIntProcessor.h: Coverity defect (ATLASSIM-2975) Two member pointers uninitialised. Since they are not used anywhere in the code, they have been removed altogether. Former-commit-id: 92da4277a916730bf2308bc7a98b96071ea59405 --- .../ISF_FatrasToolsG4/ISF_FatrasToolsG4/G4HadIntProcessor.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsG4/ISF_FatrasToolsG4/G4HadIntProcessor.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsG4/ISF_FatrasToolsG4/G4HadIntProcessor.h index 2a3f4f6818dd..4a955ec1e527 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsG4/ISF_FatrasToolsG4/G4HadIntProcessor.h +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsG4/ISF_FatrasToolsG4/G4HadIntProcessor.h @@ -134,8 +134,6 @@ namespace iFatras { mutable G4RunManager* m_g4runManager; G4VUserPhysicsList* m_g4physicsList; G4LayerDetectorConstruction* m_g4detector; - G4LayerPrimaryGeneratorAction* m_g4generatorAction; - G4LayerTrackingAction* m_g4trackingAction; //!< Geant4 processes <PDGcode, process> TODO : fission, capture mutable std::map<int, G4VProcess*> m_g4HadrInelasticProcesses; -- GitLab From b969347e2a1d4f9dfa05460ad35ec3466d4c89ee Mon Sep 17 00:00:00 2001 From: Shota Hayashida <hayashida@hepl.phys.nagoya-u.ac.jp> Date: Thu, 21 Jun 2018 18:07:30 +0200 Subject: [PATCH 234/562] Fix a mistake Former-commit-id: 4ae274cb60238f7a2acb2dc95f41d3f277ed528d --- Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py | 2 +- Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py b/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py index 340308d0741d..f43c272b39eb 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py @@ -399,7 +399,7 @@ if TriggerFlags.doMuon: l2muComb_HLTSequence = HLTRecoSequence("l2muComb_HLTSequence", Sequence=l2muCombSequence, - Maker=l2MuViewsMaker, + Maker=l2muCombViewsMaker, Seed="L1MU") muCombStep = MenuSequence("muCombStep", diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py index e4e9756255a3..2b46bca8a237 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py @@ -426,7 +426,6 @@ if TriggerFlags.doMuon: trigmuCombHypo = TrigmuCombHypoConfig("L2muCombHypoAlg") trigmuCombHypo.OutputLevel = DEBUG trigmuCombHypo.HypoOutputDecisions = "MuonL2CBDecisions" - #trigmuCombHypo.HypoInputDecisions = trigMufastHypo.HypoOutputDecisions trigmuCombHypo.HypoInputDecisions = l2muCombViewsMaker.InputMakerOutputDecisions[0] trigmuCombHypo.MuonL2CBInfoFromMuCombAlg = muCombAlg.L2CombinedMuonContainerName trigmuCombHypo.HypoTools = [ trigmuCombHypo.TrigmuCombHypoToolFromName( "L2muCombHypoTool", c ) for c in testChains ] -- GitLab From 421c5c3934b5620f0c9d250800eeec70cd703658 Mon Sep 17 00:00:00 2001 From: Shota Hayashida <hayashida@hepl.phys.nagoya-u.ac.jp> Date: Thu, 21 Jun 2018 20:40:57 +0200 Subject: [PATCH 235/562] Added muonComb step with muMenu test Former-commit-id: b3cbe06343a079c4ae8a99c71db341e4e0a359e0 --- .../TrigUpgradeTest/python/muMenuDefs.py | 24 +++---------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py b/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py index f43c272b39eb..3d25695574c8 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py @@ -90,7 +90,7 @@ if TriggerFlags.doMuon: from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm if doL2SA: - l2MuViewNode = seqAND("l2MuViewNode") + l2MuViewNode = parOR("l2MuViewNode") l2MuViewsMaker = EventViewCreatorAlgorithm("l2MuViewsMaker", OutputLevel=DEBUG) l2MuViewsMaker.ViewFallThrough = True l2MuViewsMaker.RoIsLink = "initialRoI" # -||- @@ -294,18 +294,6 @@ if TriggerFlags.doMuon: efMuViewNode += MuonClusterAlg - ### muon thresholds ### - #testChains = ["HLT_mu6", "HLT_2mu6"] - - ### set up L1RoIsFilter ### - #from DecisionHandling.DecisionHandlingConf import RoRSeqFilter, DumpDecisions - #filterL1RoIsAlg = RoRSeqFilter("filterL1RoIsAlg") - #filterL1RoIsAlg.Input = ["MURoIDecisions"] - #filterL1RoIsAlg.Output = ["FilteredMURoIDecisions"] - #filterL1RoIsAlg.Chains = testChains - #filterL1RoIsAlg.OutputLevel = DEBUG - - # =========================================== # SET L2MUONSA # =========================================== @@ -347,14 +335,8 @@ if TriggerFlags.doMuon: # SET L2MUCOMB # =========================================== if doL2CB: - ### RoRSeqFilter step2 ### - #filterL2SAAlg = RoRSeqFilter("filterL2SAAlg") - #filterL2SAAlg.Input = [trigMufastHypo.Decisions] - #filterL2SAAlg.Output = ["Filtered"+trigMufastHypo.Decisions] - #filterL2SAAlg.Chains = testChains - #filterL2SAAlg.OutputLevel = DEBUG - - l2muCombViewNode = seqAND("l2muCombViewNode") + ### set up step2 ### + l2muCombViewNode = parOR("l2muCombViewNode") l2muCombViewsMaker = EventViewCreatorAlgorithm("l2muCombViewsMaker", OutputLevel=DEBUG) l2muCombViewsMaker.ViewFallThrough = True l2muCombViewsMaker.RoIsLink = "roi" # -||- -- GitLab From 8200dad17990ef32a596837aa7169b093ee196e8 Mon Sep 17 00:00:00 2001 From: charles leggett <leggett@cern.ch> Date: Mon, 18 Jun 2018 11:45:58 -0700 Subject: [PATCH 236/562] update Gaudi to tip of master (335782654f236f3188b8ef378c7c3455b9fa3931) on 2018.06.18, using atlas tag v30r2.004 Former-commit-id: 67bf80be13fa58761bac6b4dacbd9c882cf9ef30 --- Control/AthenaBaseComps/test/AthAlgorithmDHUpdate_test.cxx | 2 -- Control/StoreGate/test/WriteDecorHandleKey_test.cxx | 2 -- Projects/AthSimulation/externals.txt | 2 +- Projects/Athena/externals.txt | 2 +- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Control/AthenaBaseComps/test/AthAlgorithmDHUpdate_test.cxx b/Control/AthenaBaseComps/test/AthAlgorithmDHUpdate_test.cxx index 3f36b07896cf..045de175fac6 100644 --- a/Control/AthenaBaseComps/test/AthAlgorithmDHUpdate_test.cxx +++ b/Control/AthenaBaseComps/test/AthAlgorithmDHUpdate_test.cxx @@ -50,8 +50,6 @@ public: { std::abort(); } virtual void acceptDHVisitor(IDataHandleVisitor*) const override { std::abort(); } - virtual void commitHandles() override - { std::abort(); } virtual const DataObjIDColl& inputDataObjs() const override { std::abort(); } virtual void addDependency(const DataObjID&, const Gaudi::DataHandle::Mode&) override diff --git a/Control/StoreGate/test/WriteDecorHandleKey_test.cxx b/Control/StoreGate/test/WriteDecorHandleKey_test.cxx index d5803cb36986..f74d92271f7f 100644 --- a/Control/StoreGate/test/WriteDecorHandleKey_test.cxx +++ b/Control/StoreGate/test/WriteDecorHandleKey_test.cxx @@ -41,8 +41,6 @@ public: virtual void acceptDHVisitor(IDataHandleVisitor*) const override { std::abort(); } - virtual void commitHandles() override { std::abort(); } - virtual const DataObjIDColl& inputDataObjs() const override { std::abort(); } virtual const DataObjIDColl& outputDataObjs() const override { std::abort(); } diff --git a/Projects/AthSimulation/externals.txt b/Projects/AthSimulation/externals.txt index 80e19b3c1c09..56c37541c1b4 100644 --- a/Projects/AthSimulation/externals.txt +++ b/Projects/AthSimulation/externals.txt @@ -9,4 +9,4 @@ AthSimulationExternalsVersion = 2.0.6 # The version of atlas/Gaudi to use: -GaudiVersion = v30r2.003 +GaudiVersion = v30r2.004 diff --git a/Projects/Athena/externals.txt b/Projects/Athena/externals.txt index 2f4b37529d6b..33618bf0ab94 100644 --- a/Projects/Athena/externals.txt +++ b/Projects/Athena/externals.txt @@ -9,4 +9,4 @@ AthenaExternalsVersion = 2.0.6 # The version of atlas/Gaudi to use: -GaudiVersion = v30r2.003 +GaudiVersion = v30r2.004 -- GitLab From 0a7b3f528d48d247ddd82f16a6435f9c4d3c4789 Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Thu, 21 Jun 2018 16:31:12 +0000 Subject: [PATCH 237/562] Merge branch 'revert-ab24e77f' into '21.0' Revert "Merge branch 'revert-b719f0af' into '21.0'" See merge request atlas/athena!12286 (cherry picked from commit edf959a7db485d132f21d988fd41cf48a538c666 [formerly 5e5746aa9c916ccea619312082e592e175a5cb81]) c79f608b Revert "Merge branch 'revert-b719f0af' into '21.0'" Former-commit-id: 1bf77dfd678af386c7e0ef642178aefeaf52e037 --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../PrimaryDPDMaker/share/DRAW_ZMUMU.py | 35 ++++++++++++++++--- 2 files changed, 30 insertions(+), 5 deletions(-) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_ZMUMU.py b/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_ZMUMU.py index c354a14cb046..89c79087f83d 100644 --- a/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_ZMUMU.py +++ b/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_ZMUMU.py @@ -4,6 +4,10 @@ ### derivation framework / event selection #################################################### +# needed for dynamic determination of lowest-unprescaled single-muon and dimuon triggers +from TriggerMenu.api.TriggerAPI import TriggerAPI +from TriggerMenu.api.TriggerEnums import TriggerPeriod, TriggerType + # Sequence from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() @@ -14,7 +18,7 @@ sel_muon1 = 'Muons.pt > 25*GeV && Muons.ptcone40/Muons.pt < 0.3' sel_muon2 = 'Muons.pt > 20*GeV && Muons.ptcone40/Muons.pt < 0.3' # Event selection string -draw_zmumu = '( count ( DRZmumuMass > 70*GeV && DRZmumuMass < 110*GeV ) >= 1 )' +dimuonMassString = '( count ( DRZmumuMass > 70*GeV && DRZmumuMass < 110*GeV ) >= 1 )' # Invariant masses in various configurations from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__InvariantMassTool @@ -26,12 +30,33 @@ DRZmumuMassTool = DerivationFramework__InvariantMassTool(name = "DRZmumuMassTool SecondMassHypothesis = 105.66, StoreGateEntryName = "DRZmumuMass") ToolSvc += DRZmumuMassTool - -# Event selection tool from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool -DRAW_ZMUMU_SkimmingTool = DerivationFramework__xAODStringSkimmingTool(name = "DRAW_ZMUMU_SkimmingTool", - expression = draw_zmumu) +dimuonMassSkimmingTool = DerivationFramework__xAODStringSkimmingTool(name = "DRAW_ZMUMU_DiMuonMass_SkimmingTool", + expression = dimuonMassString) +ToolSvc += dimuonMassSkimmingTool +# Tightening by requiring at least one good (i.e. preselected) muon and either a single-muon or dimuon trigger to have passed +from DerivationFrameworkMuons.MuonsCommon import * +goodMuonString = 'count((Muons.DFCommonGoodMuon) && (Muons.pt > 20*GeV)) >= 1' +goodMuonSkimmingTool = DerivationFramework__xAODStringSkimmingTool(name = "DRAW_ZMUMU_GoodMuon_SkimmingTool", + expression = goodMuonString) +ToolSvc += goodMuonSkimmingTool + +periods = TriggerPeriod.future | TriggerPeriod.y2015 | TriggerPeriod.y2016 | TriggerPeriod.y2017 +allUnprescaledTriggers = TriggerAPI.getLowestUnprescaledAnyPeriod(periods, TriggerType.mu) +print "DRAW_ZMUMU: will skim on an OR of the following muon triggers (list provided at run-time by the TriggerAPI):" +print allUnprescaledTriggers +from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool +triggerSkimmingTool = DerivationFramework__TriggerSkimmingTool(name = "DRAWZMUMUTriggerSkimmingTool", + TriggerListOR = allUnprescaledTriggers) +ToolSvc += triggerSkimmingTool + +# Event selection tool +from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__FilterCombinationAND +DRAW_ZMUMU_SkimmingTool = DerivationFramework__FilterCombinationAND( name = "DRAW_ZMUMU_FinalFilter", + FilterList=[dimuonMassSkimmingTool, + goodMuonSkimmingTool, + triggerSkimmingTool] ) ToolSvc += DRAW_ZMUMU_SkimmingTool print DRAW_ZMUMU_SkimmingTool -- GitLab From b15e3264215349aa06c5f17c74f8079e9a5c8161 Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Thu, 21 Jun 2018 15:36:17 +0000 Subject: [PATCH 238/562] Merge branch 'patch-43' into '21.0' Update test_dqconfig.sh to include ART key See merge request atlas/athena!12275 (cherry picked from commit f8cbca3d0327ef5698374eec8badb10491e08027 [formerly 63b6be4665a925c7bc9f4b91cffdbda32812b1bc]) 1b4f67b3 Update test_dqconfig.sh to include ART key Former-commit-id: 9cca7a2d9f203ad35c1015617a0b5bba7058ccae --- Event/EventContainers/test/ID_ContainerTest.h | 0 Tools/AthDataQuality/test/test_dqconfig.sh | 1 + 2 files changed, 1 insertion(+) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 diff --git a/Tools/AthDataQuality/test/test_dqconfig.sh b/Tools/AthDataQuality/test/test_dqconfig.sh index aab6a0f28ae9..c0b57d28f608 100755 --- a/Tools/AthDataQuality/test/test_dqconfig.sh +++ b/Tools/AthDataQuality/test/test_dqconfig.sh @@ -3,6 +3,7 @@ # art-description: Test hcfg file for top level hists, git hash # art-type: build # art-ci: 21.0 +# art-include: 21.0/AthDataQuality #Check the hcfg file for git hash check_hcfg_hash() -- GitLab From cf887d08ddf5d2aeeee98d68fc52fdff81d006fe Mon Sep 17 00:00:00 2001 From: Yi Liu <yiliu@salix.cern.ch> Date: Fri, 22 Jun 2018 13:19:36 +0200 Subject: [PATCH 239/562] GsfSmoother: resource handled by uniqure_ptr Former-commit-id: 30e679c9898de13e7839126b6e4200494433473e --- .../TrkGaussianSumFilter/src/GsfSmoother.cxx | 94 ++++++------------- 1 file changed, 30 insertions(+), 64 deletions(-) diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfSmoother.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfSmoother.cxx index 9b7099607bd7..a3dca84eb909 100644 --- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfSmoother.cxx +++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfSmoother.cxx @@ -45,22 +45,13 @@ StatusCode Trk::GsfSmoother::initialize() m_outputlevel = msg().level()-MSG::DEBUG; // save the threshold for debug printout in private member - // Retrieve an instance of the component merger - if ( m_merger.retrieve().isFailure() ){ - ATH_MSG_FATAL("Could not retrieve the component merger tool... Exiting!"); - return StatusCode::FAILURE; - } + ATH_CHECK(m_merger.retrieve()); - // Request an instance of the state combiner - if ( m_combiner.retrieve().isFailure() ){ - ATH_MSG_FATAL("Could not retrieve an instance of the multi component state combiner... Exiting!"); - return StatusCode::FAILURE; - } + ATH_CHECK(m_combiner.retrieve()); ATH_MSG_INFO("Initialisation of " << name() << " was successful"); return StatusCode::SUCCESS; - } StatusCode Trk::GsfSmoother::finalize() @@ -94,18 +85,18 @@ Trk::SmoothedTrajectory* Trk::GsfSmoother::fit (const ForwardTrajectory& forward // Check that extrapolator and updator are instansiated if (!m_updator) { ATH_MSG_ERROR("The measurement updator is not configured... Exiting!"); - return 0; + return nullptr; } if (!m_extrapolator) { ATH_MSG_ERROR("The extrapolator is not configured... Exiting!"); - return 0; + return nullptr; } // Check that the forward trajectory is filled if ( forwardTrajectory.empty() ){ ATH_MSG_ERROR("Attempting to smooth an empty forward trajectory... Exiting!"); - return 0; + return nullptr; } if (m_outputlevel<0){ @@ -158,7 +149,7 @@ Trk::SmoothedTrajectory* Trk::GsfSmoother::fit (const ForwardTrajectory& forward if ( !firstSmootherMeasurementOnTrack ){ ATH_MSG_WARNING("Initial state on surface in smoother does not have an associated MeasurementBase object... returning 0"); - return 0; + return nullptr; } std::unique_ptr<Trk::FitQualityOnSurface> fitQuality; @@ -171,7 +162,7 @@ Trk::SmoothedTrajectory* Trk::GsfSmoother::fit (const ForwardTrajectory& forward delete smootherPredictionMultiState; ATH_MSG_DEBUG("First GSF smoothing update failed... Exiting!"); - return 0; + return nullptr; } // ======================== @@ -206,7 +197,7 @@ Trk::SmoothedTrajectory* Trk::GsfSmoother::fit (const ForwardTrajectory& forward if ( !firstSmoothedState->isMeasured() ){ ATH_MSG_WARNING("Updated state is not measured. Rejecting smoothed state... returning 0"); - return 0; + return nullptr; } // Generate a large prediction for extrapolation. This way there is no dependance on error of prediction @@ -217,7 +208,7 @@ Trk::SmoothedTrajectory* Trk::GsfSmoother::fit (const ForwardTrajectory& forward if ( !smoothedStateWithScaledError ){ ATH_MSG_WARNING("Covariance scaling could not be performed... returning 0"); - return 0; + return nullptr; } // Perform a measurement update on this new state @@ -226,7 +217,7 @@ Trk::SmoothedTrajectory* Trk::GsfSmoother::fit (const ForwardTrajectory& forward if ( !updatedState ){ ATH_MSG_WARNING("Smoother prediction could not be determined... returning 0"); - return 0; + return nullptr; } // Clear rioOnTrack pointer @@ -291,7 +282,7 @@ Trk::SmoothedTrajectory* Trk::GsfSmoother::fit (const ForwardTrajectory& forward if (!extrapolatedState) { ATH_MSG_DEBUG( "Extrapolation to measurement surface failed... rejecting track!"); - return 0; + return nullptr; } if (m_outputlevel<=0){ @@ -333,7 +324,7 @@ Trk::SmoothedTrajectory* Trk::GsfSmoother::fit (const ForwardTrajectory& forward if (!updatedState) { ATH_MSG_WARNING("Could not update the multi-component state... rejecting track!"); - return 0; + return nullptr; } if (m_outputlevel<=0){ @@ -390,7 +381,7 @@ Trk::SmoothedTrajectory* Trk::GsfSmoother::fit (const ForwardTrajectory& forward // delete updatedState; // delete measurement; // delete smoothedTrajectory; - return 0; + return nullptr; } const Trk::FitQualityOnSurface* combinedFitQuality = m_updator->fitQuality( *combinedState2, *measurement ); @@ -449,18 +440,14 @@ Trk::SmoothedTrajectory* Trk::GsfSmoother::fit (const ForwardTrajectory& forward const Trk::MultiComponentState* Trk::GsfSmoother::combine (const Trk::MultiComponentState& forwardsMultiState, const Trk::MultiComponentState& smootherMultiState) const { - Trk::MultiComponentState* combinedMultiState = new MultiComponentState(); - + std::unique_ptr<Trk::MultiComponentState> combinedMultiState = std::make_unique<MultiComponentState>(); /* ================================================ Loop over all components in forwards multi-state ================================================ */ - Trk::MultiComponentState::const_iterator forwardsComponent = forwardsMultiState.begin(); - - for ( ; forwardsComponent != forwardsMultiState.end(); ++forwardsComponent ) { - + for ( auto& forwardsComponent : forwardsMultiState ) { // Need to check that all components have associated weight matricies - const AmgSymMatrix(5)* forwardMeasuredCov = forwardsComponent->first->covariance(); + const AmgSymMatrix(5)* forwardMeasuredCov = forwardsComponent.first->covariance(); if ( !forwardMeasuredCov ) ATH_MSG_DEBUG("No measurement associated with forwards component... continuing for now"); @@ -469,23 +456,19 @@ const Trk::MultiComponentState* Trk::GsfSmoother::combine (const Trk::MultiCompo Loop over all components in the smoother multi-state ==================================================== */ - Trk::MultiComponentState::const_iterator smootherComponent = smootherMultiState.begin(); - - for ( ; smootherComponent != smootherMultiState.end(); ++smootherComponent ) { - + for ( auto& smootherComponent: smootherMultiState ) { // Need to check that all components have associated weight matricies - const AmgSymMatrix(5)* smootherMeasuredCov = smootherComponent->first->covariance(); + const AmgSymMatrix(5)* smootherMeasuredCov = smootherComponent.first->covariance(); if ( !smootherMeasuredCov && !forwardMeasuredCov ){ ATH_MSG_WARNING("Cannot combine two components both without associated errors... returning 0"); - delete combinedMultiState; return nullptr; } if ( !forwardMeasuredCov ){ if (m_outputlevel<=0) ATH_MSG_DEBUG("Forwards state without error matrix... using smoother state only"); - Trk::ComponentParameters smootherComponentOnly( smootherComponent->first->clone(), smootherComponent->second ); + Trk::ComponentParameters smootherComponentOnly( smootherComponent.first->clone(), smootherComponent.second ); combinedMultiState->push_back( smootherComponentOnly ); continue; } @@ -493,7 +476,7 @@ const Trk::MultiComponentState* Trk::GsfSmoother::combine (const Trk::MultiCompo if ( !smootherMeasuredCov ){ if (m_outputlevel<=0) ATH_MSG_DEBUG("Smoother state withour error matrix... using forwards state only"); - Trk::ComponentParameters forwardComponentOnly( forwardsComponent->first->clone(), forwardsComponent->second ); + Trk::ComponentParameters forwardComponentOnly( forwardsComponent.first->clone(), forwardsComponent.second ); combinedMultiState->push_back( forwardComponentOnly ); continue; } @@ -502,38 +485,25 @@ const Trk::MultiComponentState* Trk::GsfSmoother::combine (const Trk::MultiCompo const AmgSymMatrix(5) K = *forwardMeasuredCov * summedCovariance.inverse(); - //if (matrixInversionError) { - // ATH_MSG_WARNING("Matrix inversion failed... Exiting!"); - // return 0; - //} + const Amg::VectorX newParameters = forwardsComponent.first->parameters() + K * ( smootherComponent.first->parameters() - forwardsComponent.first->parameters() ); - const Amg::VectorX newParameters = forwardsComponent->first->parameters() + K * ( smootherComponent->first->parameters() - forwardsComponent->first->parameters() ); - - const Amg::VectorX parametersDiff = forwardsComponent->first->parameters() - smootherComponent->first->parameters(); + const Amg::VectorX parametersDiff = forwardsComponent.first->parameters() - smootherComponent.first->parameters(); AmgSymMatrix(5)* covarianceOfNewParameters = new AmgSymMatrix(5)(K * *smootherMeasuredCov); - const Trk::TrackParameters* combinedTrackParameters = (forwardsComponent->first)->associatedSurface().createTrackParameters( newParameters[Trk::loc1],newParameters[Trk::loc2],newParameters[Trk::phi],newParameters[Trk::theta],newParameters[Trk::qOverP], covarianceOfNewParameters ); + const Trk::TrackParameters* combinedTrackParameters = (forwardsComponent.first)->associatedSurface().createTrackParameters( newParameters[Trk::loc1],newParameters[Trk::loc2],newParameters[Trk::phi],newParameters[Trk::theta],newParameters[Trk::qOverP], covarianceOfNewParameters ); // Covariance matrix object now owned by TrackParameters object. Reset pointer to prevent delete covarianceOfNewParameters = 0; - // Determine weighting exponential term for the baysian smoother - //matrixInversionError = 0; - const AmgSymMatrix(5) invertedSummedCovariance = summedCovariance.inverse(); - //if ( matrixInversionError ){ - // ATH_MSG_WARNING("Matrix inversion failed... exiting"); - // return 0; - //} - // Determine the scaling factor for the new weighting. Determined from the PDF of the many-dimensional gaussian double exponent = parametersDiff.transpose() * invertedSummedCovariance * parametersDiff; double weightScalingFactor = exp( -0.5 * exponent ); - double combinedWeight = smootherComponent->second * forwardsComponent->second * weightScalingFactor; + double combinedWeight = smootherComponent.second * forwardsComponent.second * weightScalingFactor; const Trk::ComponentParameters combinedComponent(combinedTrackParameters, combinedWeight); @@ -544,16 +514,12 @@ const Trk::MultiComponentState* Trk::GsfSmoother::combine (const Trk::MultiCompo } // Component reduction on the combined state - const Trk::MultiComponentState* mergedState = m_merger->merge(*combinedMultiState); - - if ( mergedState != combinedMultiState ) - delete combinedMultiState; + std::unique_ptr<const Trk::MultiComponentState> mergedState( m_merger->merge(*combinedMultiState) ); + assert( mergedState.get() != combinedMultiState.get()); // Before return the weights of the states need to be renormalised to one. const Trk::MultiComponentState* renormalisedMergedState = mergedState->clonedRenormalisedState(); - - if ( renormalisedMergedState != mergedState ) - delete mergedState; + assert( renormalisedMergedState != mergedState.get()); if (m_outputlevel<0) ATH_MSG_VERBOSE("Size of combined state from smoother: " << renormalisedMergedState->size()); @@ -596,7 +562,7 @@ const Trk::MultiComponentState* Trk::GsfSmoother::addCCOT( const Trk::TrackState // Extrapolation Failed continue if( !extrapolatedState || extrapolatedState == currentMultiComponentState ){ ATH_MSG_DEBUG("Extrapolation to the CCOT failed .. now not being taken in account"); - return 0; + return nullptr; } // Update newly extrapolated state with MeasurementBase measurement @@ -607,7 +573,7 @@ const Trk::MultiComponentState* Trk::GsfSmoother::addCCOT( const Trk::TrackState if( !updatedState || updatedState == extrapolatedState){ ATH_MSG_DEBUG("Update of extrapolated state with CCOT failed .. now not being taken in account"); delete extrapolatedState; - return 0; + return nullptr; } //std::cout << "\n After Extrapolarion update -- Weight "<<(extrapolatedState->front().second) << "\n" << *(extrapolatedState->front().first) <<std::endl; @@ -637,7 +603,7 @@ const Trk::MultiComponentState* Trk::GsfSmoother::addCCOT( const Trk::TrackState if (!extrapolatedState || extrapolatedState == updatedState){ ATH_MSG_DEBUG("Extrapolation from CCOT to 1st measurement failed .. now not being taken in account"); delete updatedMCSOS; - return 0; + return nullptr; } //std::cout << "\nBefore Addition -- Weight "<<(currentMultiComponentState->front().second) << "\n" << *(currentMultiComponentState->front().first) <<std::endl; -- GitLab From 36c6d3616684a982f696ccf72aa6a48d989e5d6f Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Fri, 22 Jun 2018 13:36:56 +0200 Subject: [PATCH 240/562] Solve coverity 114706 in ConversionFinder Former-commit-id: b1c799ee1a56822d98e9862363f3312d310d9f6a --- .../InDetConversionFinder/ConversionFinder.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/InnerDetector/InDetRecAlgs/InDetConversionFinder/InDetConversionFinder/ConversionFinder.h b/InnerDetector/InDetRecAlgs/InDetConversionFinder/InDetConversionFinder/ConversionFinder.h index 0b517a8578d2..55bfd7af208f 100644 --- a/InnerDetector/InDetRecAlgs/InDetConversionFinder/InDetConversionFinder/ConversionFinder.h +++ b/InnerDetector/InDetRecAlgs/InDetConversionFinder/InDetConversionFinder/ConversionFinder.h @@ -46,15 +46,15 @@ namespace InDet{ bool m_doExtrapolation; /** Statistics */ - long m_events_processed; //!< Number of events processed - long m_Gamma_stored; //!< Number of conversion vertices stored - long m_Double_Conversions; //!< Number of two-track conversions - long m_Single_Conversions; //!< Number of single-track conversions - long m_SiSi_Conversions; //!< Number of Si-Si track conversions - long m_SiTrt_Conversions; //!< Number of Si-TRT track conversions - long m_TrtTrt_Conversions; //!< Number of TRT-TRT track conversions - long m_Si_Conversions; //!< Number of Si single-track conversions - long m_Trt_Conversions; //!< Number of TRT single-track conversions + long m_events_processed{}; //!< Number of events processed + long m_Gamma_stored{}; //!< Number of conversion vertices stored + long m_Double_Conversions{}; //!< Number of two-track conversions + long m_Single_Conversions{}; //!< Number of single-track conversions + long m_SiSi_Conversions{}; //!< Number of Si-Si track conversions + long m_SiTrt_Conversions{}; //!< Number of Si-TRT track conversions + long m_TrtTrt_Conversions{}; //!< Number of TRT-TRT track conversions + long m_Si_Conversions{}; //!< Number of Si single-track conversions + long m_Trt_Conversions{}; //!< Number of TRT single-track conversions }; } -- GitLab From 0a6217994347d47c97c7a41b80403bb1fdebc7a1 Mon Sep 17 00:00:00 2001 From: Soshi Tsuno <Soshi.Tsuno@cern.ch> Date: Fri, 22 Jun 2018 14:12:05 +0200 Subject: [PATCH 241/562] Conditions migration for athenaMT (ATLASRECTS-4045). This update contains - DCS migration - SiPropertiesSvc => SiPropertiesTool Former-commit-id: c2c9b694012571fe59f1a731abd0add340ef4520 --- .../src/PixelDCSCondHVAlg.cxx | 37 +-- .../src/PixelDCSCondHVAlg.h | 15 +- .../src/PixelDCSCondStateAlg.cxx | 118 +++++--- .../src/PixelDCSCondStateAlg.h | 17 +- .../src/PixelDCSCondTempAlg.cxx | 42 +-- .../src/PixelDCSCondTempAlg.h | 15 +- .../src/PixelSiliconConditionsTestAlg.cxx | 13 +- .../src/PixelSiliconConditionsTestAlg.h | 11 +- .../PixelConditionsData/PixelCalibData.h | 9 +- .../PixelConditionsData/PixelCalibDataColl.h | 34 +-- .../PixelChargeInterpolationParameters.h | 286 +++++++++--------- .../PixelClusterErrorData.h | 164 +++++----- .../PixelClusterOnTrackErrorData.h | 260 ++++++++-------- .../PixelConditionsData/PixelDCSCondData.h | 44 --- .../PixelDCSConditionsData.h | 35 +++ .../PixelConditionsData/PixelDCSData.h | 115 +++---- .../PixelOfflineCalibData.h | 260 ++++++++-------- .../PixelConditionsData/SpecialPixelMap.h | 2 +- .../src/PixelCalibData.cxx | 2 +- .../PixelChargeInterpolationParameters.cxx | 2 +- .../src/PixelClusterErrorData.cxx | 2 +- .../src/PixelClusterOnTrackErrorData.cxx | 2 +- .../src/PixelDCSCondData.cxx | 59 ---- .../src/PixelDCSConditionsData.cxx | 43 +++ .../PixelConditionsData/src/PixelDCSData.cxx | 2 +- .../src/PixelOfflineCalibData.cxx | 2 +- .../src/SpecialPixelMap.cxx | 2 +- .../PixelConditionsTools/IPixelDCSCondTool.h | 47 --- .../IPixelDCSConditionsTool.h | 32 ++ ...etup.py => PixelDCSConditionsToolSetup.py} | 71 +++-- .../python/PixelSiliconConditionsToolSetup.py | 81 ----- .../src/PixelDCSCondTool.cxx | 197 ------------ .../src/PixelDCSCondTool.h | 61 ---- .../src/PixelDCSConditionsTool.cxx | 153 ++++++++++ .../src/PixelDCSConditionsTool.h | 63 ++++ .../src/PixelSiliconConditionsTool.cxx | 98 ------ .../src/PixelSiliconConditionsTool.h | 51 ---- .../PixelConditionsTools_entries.cxx | 6 +- .../python/LorentzAngleSvcSetup.py | 14 +- .../src/SiLorentzAngleSvc.cxx | 2 +- .../SiPropertiesSvc/CMakeLists.txt | 6 +- .../python/PixelSiPropertiesToolSetup.py | 61 ++++ .../src/PixelSiPropertiesCondAlg.cxx | 122 ++++++++ .../src/PixelSiPropertiesCondAlg.h | 40 +++ .../components/SiPropertiesSvc_entries.cxx | 3 + .../PixelDigitization/src/SensorSim3DTool.cxx | 6 +- .../src/SensorSimPlanarTool.cxx | 4 +- .../PixelDigitization/src/SensorSimTool.h | 13 +- .../share/InDetRecConditionsAccess.py | 1 - 49 files changed, 1279 insertions(+), 1446 deletions(-) delete mode 100644 InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelDCSCondData.h create mode 100644 InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelDCSConditionsData.h delete mode 100644 InnerDetector/InDetConditions/PixelConditionsData/src/PixelDCSCondData.cxx create mode 100644 InnerDetector/InDetConditions/PixelConditionsData/src/PixelDCSConditionsData.cxx delete mode 100644 InnerDetector/InDetConditions/PixelConditionsTools/PixelConditionsTools/IPixelDCSCondTool.h create mode 100644 InnerDetector/InDetConditions/PixelConditionsTools/PixelConditionsTools/IPixelDCSConditionsTool.h rename InnerDetector/InDetConditions/PixelConditionsTools/python/{PixelDCSCondToolSetup.py => PixelDCSConditionsToolSetup.py} (56%) delete mode 100644 InnerDetector/InDetConditions/PixelConditionsTools/python/PixelSiliconConditionsToolSetup.py delete mode 100644 InnerDetector/InDetConditions/PixelConditionsTools/src/PixelDCSCondTool.cxx delete mode 100644 InnerDetector/InDetConditions/PixelConditionsTools/src/PixelDCSCondTool.h create mode 100644 InnerDetector/InDetConditions/PixelConditionsTools/src/PixelDCSConditionsTool.cxx create mode 100644 InnerDetector/InDetConditions/PixelConditionsTools/src/PixelDCSConditionsTool.h delete mode 100644 InnerDetector/InDetConditions/PixelConditionsTools/src/PixelSiliconConditionsTool.cxx delete mode 100644 InnerDetector/InDetConditions/PixelConditionsTools/src/PixelSiliconConditionsTool.h create mode 100644 InnerDetector/InDetConditions/SiPropertiesSvc/python/PixelSiPropertiesToolSetup.py create mode 100644 InnerDetector/InDetConditions/SiPropertiesSvc/src/PixelSiPropertiesCondAlg.cxx create mode 100644 InnerDetector/InDetConditions/SiPropertiesSvc/src/PixelSiPropertiesCondAlg.h diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDCSCondHVAlg.cxx b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDCSCondHVAlg.cxx index a7a2fed0b950..0540ac10c399 100644 --- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDCSCondHVAlg.cxx +++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDCSCondHVAlg.cxx @@ -3,21 +3,14 @@ */ #include "PixelDCSCondHVAlg.h" - #include "Identifier/IdentifierHash.h" #include "GaudiKernel/EventIDRange.h" #include <memory> PixelDCSCondHVAlg::PixelDCSCondHVAlg(const std::string& name, ISvcLocator* pSvcLocator): ::AthAlgorithm(name, pSvcLocator), - m_readKey("/PIXEL/DCS/HV"), - m_writeKey("PixelDCSHVCondData"), - m_condSvc("CondSvc", name), - m_returnHVTemp(true) + m_condSvc("CondSvc", name) { - declareProperty("ReturnHVTemp", m_returnHVTemp); - declareProperty("ReadKey", m_readKey, "Key of input (raw) HV conditions folder"); - declareProperty("WriteKey", m_writeKey, "Key of output (derived) HV conditions folder"); } StatusCode PixelDCSCondHVAlg::initialize() { @@ -25,13 +18,11 @@ StatusCode PixelDCSCondHVAlg::initialize() { ATH_CHECK(m_condSvc.retrieve()); - if (m_returnHVTemp) { - ATH_CHECK(m_readKey.initialize()); - ATH_CHECK(m_writeKey.initialize()); - if (m_condSvc->regHandle(this,m_writeKey).isFailure()) { - ATH_MSG_FATAL("unable to register WriteCondHandle " << m_writeKey.fullKey() << " with CondSvc"); - return StatusCode::FAILURE; - } + ATH_CHECK(m_readKey.initialize()); + ATH_CHECK(m_writeKey.initialize()); + if (m_condSvc->regHandle(this,m_writeKey).isFailure()) { + ATH_MSG_FATAL("unable to register WriteCondHandle " << m_writeKey.fullKey() << " with CondSvc"); + return StatusCode::FAILURE; } return StatusCode::SUCCESS; } @@ -39,9 +30,7 @@ StatusCode PixelDCSCondHVAlg::initialize() { StatusCode PixelDCSCondHVAlg::execute() { ATH_MSG_INFO("PixelDCSCondHVAlg::execute()"); - if (not m_returnHVTemp) { return StatusCode::SUCCESS; } - - SG::WriteCondHandle<PixelDCSCondData> writeHandle(m_writeKey); + SG::WriteCondHandle<PixelDCSConditionsData> writeHandle(m_writeKey); if (writeHandle.isValid()) { ATH_MSG_DEBUG("CondHandle " << writeHandle.fullKey() << " is already valid.. In theory this should not be called, but may happen if multiple concurrent events are being processed out of order."); return StatusCode::SUCCESS; @@ -63,7 +52,7 @@ StatusCode PixelDCSCondHVAlg::execute() { ATH_MSG_INFO("Range of input is " << rangeW); // Construct the output Cond Object and fill it in - std::unique_ptr<PixelDCSCondData> writeCdo(std::make_unique<PixelDCSCondData>()); + std::unique_ptr<PixelDCSConditionsData> writeCdo(std::make_unique<PixelDCSConditionsData>()); // Read HV info std::string param("HV"); @@ -71,19 +60,17 @@ StatusCode PixelDCSCondHVAlg::execute() { CondAttrListCollection::ChanNum channelNumber = attrList->first; CondAttrListCollection::AttributeList payload = attrList->second; if (payload.exists(param) and not payload[param].isNull()) { - float val(payload[param].data<float>()); - -// STSTST std::cout << "STSTST HV " << rangeW << " " << channelNumber << " " << val << std::endl; - - writeCdo->setValue(channelNumber, val); + float val = payload[param].data<float>(); + writeCdo -> setValue(channelNumber, val); } else { ATH_MSG_WARNING(param << " does not exist for ChanNum " << channelNumber); + writeCdo -> setValue(channelNumber, 9999.0); } } if (writeHandle.record(rangeW, std::move(writeCdo)).isFailure()) { - ATH_MSG_FATAL("Could not record PixelDCSCondData " << writeHandle.key() << " with EventRange " << rangeW << " into Conditions Store"); + ATH_MSG_FATAL("Could not record PixelDCSConditionsData " << writeHandle.key() << " with EventRange " << rangeW << " into Conditions Store"); return StatusCode::FAILURE; } ATH_MSG_INFO("recorded new CDO " << writeHandle.key() << " with range " << rangeW << " into Conditions Store"); diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDCSCondHVAlg.h b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDCSCondHVAlg.h index 040544324f24..fd061f2eb6b6 100644 --- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDCSCondHVAlg.h +++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDCSCondHVAlg.h @@ -11,7 +11,7 @@ #include "AthenaPoolUtilities/CondAttrListCollection.h" #include "StoreGate/WriteCondHandleKey.h" -#include "PixelConditionsData/PixelDCSCondData.h" +#include "PixelConditionsData/PixelDCSConditionsData.h" #include "GaudiKernel/ICondSvc.h" #include "GaudiKernel/Property.h" @@ -20,17 +20,16 @@ class PixelDCSCondHVAlg : public AthAlgorithm { public: PixelDCSCondHVAlg(const std::string& name, ISvcLocator* pSvcLocator); virtual ~PixelDCSCondHVAlg() = default; - StatusCode initialize() override; - StatusCode execute() override; - StatusCode finalize() override; + + virtual StatusCode initialize() override; + virtual StatusCode execute() override; + virtual StatusCode finalize() override; private: - SG::ReadCondHandleKey<CondAttrListCollection> m_readKey; - SG::WriteCondHandleKey<PixelDCSCondData> m_writeKey; + SG::ReadCondHandleKey<CondAttrListCollection> m_readKey{this, "ReadKey", "/PIXEL/DCS/HV", "Key of input (raw) HV conditions folder"}; + SG::WriteCondHandleKey<PixelDCSConditionsData> m_writeKey{this, "WriteKey", "PixelDCSHVCondData", "Key of output (derived) HV conditions data"}; ServiceHandle<ICondSvc> m_condSvc; - - BooleanProperty m_returnHVTemp; }; #endif // PIXELDCSCONDHVALG diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDCSCondStateAlg.cxx b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDCSCondStateAlg.cxx index c6734c7ce389..467ca9462c38 100644 --- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDCSCondStateAlg.cxx +++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDCSCondStateAlg.cxx @@ -5,19 +5,12 @@ #include "PixelDCSCondStateAlg.h" #include "Identifier/IdentifierHash.h" #include "GaudiKernel/EventIDRange.h" - #include <memory> PixelDCSCondStateAlg::PixelDCSCondStateAlg(const std::string& name, ISvcLocator* pSvcLocator): ::AthAlgorithm(name, pSvcLocator), - m_readKeyState("/PIXEL/DCS/FSMSTATUS"), - m_writeKeyState("PixelDCSStateCondData"), - m_condSvc("CondSvc", name), - m_readAllDBFolders(true) + m_condSvc("CondSvc", name) { - declareProperty("ReadAllDBFolders", m_readAllDBFolders); - declareProperty("ReadKeyState", m_readKeyState, "Key of input (raw) State conditions folder"); - declareProperty("WriteKeyState", m_writeKeyState, "Key of output (derived) State conditions folder"); } StatusCode PixelDCSCondStateAlg::initialize() { @@ -25,31 +18,33 @@ StatusCode PixelDCSCondStateAlg::initialize() { ATH_CHECK(m_condSvc.retrieve()); - if (m_readAllDBFolders) { - ATH_CHECK(m_readKeyState.initialize()); - ATH_CHECK(m_writeKeyState.initialize()); - if (m_condSvc->regHandle(this, m_writeKeyState).isFailure()) { - ATH_MSG_FATAL("unable to register WriteCondHandle " << m_writeKeyState.fullKey() << " with CondSvc"); - return StatusCode::FAILURE; - } + ATH_CHECK(m_readKeyState.initialize()); + ATH_CHECK(m_readKeyStatus.initialize()); + ATH_CHECK(m_writeKeyState.initialize()); + ATH_CHECK(m_writeKeyStatus.initialize()); + if (m_condSvc->regHandle(this, m_writeKeyState).isFailure()) { + ATH_MSG_FATAL("unable to register WriteCondHandle " << m_writeKeyState.fullKey() << " with CondSvc"); + return StatusCode::FAILURE; } + if (m_condSvc->regHandle(this, m_writeKeyStatus).isFailure()) { + ATH_MSG_FATAL("unable to register WriteCondHandle " << m_writeKeyStatus.fullKey() << " with CondSvc"); + return StatusCode::FAILURE; + } + return StatusCode::SUCCESS; } StatusCode PixelDCSCondStateAlg::execute() { ATH_MSG_INFO("PixelDCSCondStateAlg::execute()"); - if (not m_readAllDBFolders) { return StatusCode::SUCCESS; } - - // Write Cond Handle (state) - SG::WriteCondHandle<PixelDCSCondData> writeHandle{m_writeKeyState}; - // Do we have a valid Write Cond Handle for current time? - if (writeHandle.isValid()) { - ATH_MSG_DEBUG("CondHandle " << writeHandle.fullKey() << " is already valid.. In theory this should not be called, but may happen if multiple concurrent events are being processed out of order."); + //=========== + // FSM_STATE + //=========== + SG::WriteCondHandle<PixelDCSConditionsData> writeHandleState(m_writeKeyState); + if (writeHandleState.isValid()) { + ATH_MSG_DEBUG("CondHandle " << writeHandleState.fullKey() << " is already valid.. In theory this should not be called, but may happen if multiple concurrent events are being processed out of order."); return StatusCode::SUCCESS; } - - // Read Cond Handle (state) SG::ReadCondHandle<CondAttrListCollection> readHandleState(m_readKeyState); const CondAttrListCollection* readCdoState(*readHandleState); if (readCdoState==nullptr) { @@ -66,36 +61,75 @@ StatusCode PixelDCSCondStateAlg::execute() { ATH_MSG_INFO("Range of state input is " << rangeState); // Construct the output Cond Object and fill it in - std::unique_ptr<PixelDCSCondData> writeCdoState(std::make_unique<PixelDCSCondData>()); + std::unique_ptr<PixelDCSConditionsData> writeCdoState(std::make_unique<PixelDCSConditionsData>()); // Read state info - std::string paramState("FSM_status"); - CondAttrListCollection::const_iterator attrListState(readCdoState->begin()); - CondAttrListCollection::const_iterator endState(readCdoState->end()); - // CondAttrListCollection doesn't support C++11 type loops, no generic 'begin' - for (; attrListState!=endState; ++attrListState) { - // A CondAttrListCollection is a map of ChanNum and AttributeList - CondAttrListCollection::ChanNum channelNumber(attrListState->first); - CondAttrListCollection::AttributeList payload(attrListState->second); + std::string paramState = "FSM_state"; + for (CondAttrListCollection::const_iterator attrListState=readCdoState->begin(); attrListState!=readCdoState->end(); ++attrListState) { + CondAttrListCollection::ChanNum channelNumber = attrListState->first; + CondAttrListCollection::AttributeList payload = attrListState->second; if (payload.exists(paramState.c_str()) and not payload[paramState.c_str()].isNull()) { -// unsigned int val(payload[paramState.c_str()].data<unsigned int>()); - std::string val(payload[paramState.c_str()].data<std::string>()); + std::string val = payload[paramState.c_str()].data<std::string>(); + writeCdoState -> setValue(channelNumber, val); + } + else { + ATH_MSG_WARNING(paramState << " does not exist for ChanNum " << channelNumber); + writeCdoState -> setValue(channelNumber, "NO_DATA"); + } + } -// STSTST std::cout << "STSTST FSMState " << val << std::endl; + if (writeHandleState.record(rangeState, std::move(writeCdoState)).isFailure()) { + ATH_MSG_FATAL("Could not record PixelDCSConditionsData " << writeHandleState.key() << " with EventRange " << rangeState << " into Conditions Store"); + return StatusCode::FAILURE; + } + ATH_MSG_INFO("recorded new CDO " << writeHandleState.key() << " with range " << rangeState << " into Conditions Store"); + + //============ + // FSM_STATUS + //============ + SG::WriteCondHandle<PixelDCSConditionsData> writeHandleStatus(m_writeKeyStatus); + if (writeHandleStatus.isValid()) { + ATH_MSG_DEBUG("CondHandle " << writeHandleStatus.fullKey() << " is already valid.. In theory this should not be called, but may happen if multiple concurrent events are being processed out of order."); + return StatusCode::SUCCESS; + } + SG::ReadCondHandle<CondAttrListCollection> readHandleStatus(m_readKeyStatus); + const CondAttrListCollection* readCdoStatus(*readHandleStatus); + if (readCdoStatus==nullptr) { + ATH_MSG_FATAL("Null pointer to the read conditions object (state)"); + return StatusCode::FAILURE; + } + // Get the validitiy range (state) + EventIDRange rangeStatus; + if (not readHandleStatus.range(rangeStatus)) { + ATH_MSG_FATAL("Failed to retrieve validity range for " << readHandleStatus.key()); + return StatusCode::FAILURE; + } + ATH_MSG_INFO("Size of CondAttrListCollection " << readHandleStatus.fullKey() << " readCdo->size()= " << readCdoStatus->size()); + ATH_MSG_INFO("Range of state input is " << rangeStatus); + + // Construct the output Cond Object and fill it in + std::unique_ptr<PixelDCSConditionsData> writeCdoStatus(std::make_unique<PixelDCSConditionsData>()); -// writeCdoState->fill(channelNumber, paramState); + // Read state info + std::string paramStatus = "FSM_status"; + for (CondAttrListCollection::const_iterator attrListStatus=readCdoStatus->begin(); attrListStatus!=readCdoStatus->end(); ++attrListStatus) { + CondAttrListCollection::ChanNum channelNumber = attrListStatus->first; + CondAttrListCollection::AttributeList payload = attrListStatus->second; + if (payload.exists(paramStatus.c_str()) and not payload[paramStatus.c_str()].isNull()) { + std::string val = payload[paramStatus.c_str()].data<std::string>(); + writeCdoStatus -> setValue(channelNumber, val); } else { - ATH_MSG_WARNING(paramState << " does not exist for ChanNum " << channelNumber); + ATH_MSG_WARNING(paramStatus << " does not exist for ChanNum " << channelNumber); + writeCdoStatus -> setValue(channelNumber, "NO_DATA"); } } - // Record the output cond object - if (writeHandle.record(rangeState, std::move(writeCdoState)).isFailure()) { - ATH_MSG_FATAL("Could not record PixelDCSCondData " << writeHandle.key() << " with EventRange " << rangeState << " into Conditions Store"); + if (writeHandleStatus.record(rangeStatus, std::move(writeCdoStatus)).isFailure()) { + ATH_MSG_FATAL("Could not record PixelDCSConditionsData " << writeHandleStatus.key() << " with EventRange " << rangeStatus << " into Conditions Store"); return StatusCode::FAILURE; } - ATH_MSG_INFO("recorded new CDO " << writeHandle.key() << " with range " << rangeState << " into Conditions Store"); + ATH_MSG_INFO("recorded new CDO " << writeHandleStatus.key() << " with range " << rangeStatus << " into Conditions Store"); return StatusCode::SUCCESS; } diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDCSCondStateAlg.h b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDCSCondStateAlg.h index cec1b71364a0..92be61b01c2a 100644 --- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDCSCondStateAlg.h +++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDCSCondStateAlg.h @@ -11,7 +11,7 @@ #include "AthenaPoolUtilities/CondAttrListCollection.h" #include "StoreGate/WriteCondHandleKey.h" -#include "PixelConditionsData/PixelDCSCondData.h" +#include "PixelConditionsData/PixelDCSConditionsData.h" #include "GaudiKernel/ICondSvc.h" #include "GaudiKernel/Property.h" @@ -20,17 +20,18 @@ class PixelDCSCondStateAlg : public AthAlgorithm { public: PixelDCSCondStateAlg(const std::string& name, ISvcLocator* pSvcLocator); virtual ~PixelDCSCondStateAlg() = default; - StatusCode initialize() override; - StatusCode execute() override; - StatusCode finalize() override; + + virtual StatusCode initialize() override; + virtual StatusCode execute() override; + virtual StatusCode finalize() override; private: - SG::ReadCondHandleKey<CondAttrListCollection> m_readKeyState; - SG::WriteCondHandleKey<PixelDCSCondData> m_writeKeyState; + SG::ReadCondHandleKey<CondAttrListCollection> m_readKeyState {this, "ReadKeyState", "/PIXEL/DCS/FSMSTATE", "Key of input (raw) State conditions folder"}; + SG::ReadCondHandleKey<CondAttrListCollection> m_readKeyStatus {this, "ReadKeyStatus", "/PIXEL/DCS/FSMSTATUS", "Key of input (raw) Status conditions folder"}; + SG::WriteCondHandleKey<PixelDCSConditionsData> m_writeKeyState {this, "WriteKeyState", "PixelDCSStateCondData", "Key of output (derived) State conditions folder"}; + SG::WriteCondHandleKey<PixelDCSConditionsData> m_writeKeyStatus{this, "WriteKeyStatus", "PixelDCSStatusCondData", "Key of output (derived) Status conditions folder"}; ServiceHandle<ICondSvc> m_condSvc; - - BooleanProperty m_readAllDBFolders; }; #endif // PIXELDCSCONDSTATEALG diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDCSCondTempAlg.cxx b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDCSCondTempAlg.cxx index 918256ece9ac..1fbae54caabd 100644 --- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDCSCondTempAlg.cxx +++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDCSCondTempAlg.cxx @@ -10,14 +10,8 @@ PixelDCSCondTempAlg::PixelDCSCondTempAlg(const std::string& name, ISvcLocator* pSvcLocator): ::AthAlgorithm(name, pSvcLocator), - m_readKey("/PIXEL/DCS/TEMPERATURE"), - m_writeKey("PixelDCSTemp0CondData"), - m_condSvc("CondSvc", name), - m_returnHVTemp(true) + m_condSvc("CondSvc", name) { - declareProperty("ReturnHVTemp", m_returnHVTemp); - declareProperty("ReadKey", m_readKey, "Key of input (raw) temperature conditions folder"); - declareProperty("WriteKey", m_writeKey, "Key of output (derived) temperature conditions folder"); } StatusCode PixelDCSCondTempAlg::initialize() { @@ -25,23 +19,20 @@ StatusCode PixelDCSCondTempAlg::initialize() { ATH_CHECK(m_condSvc.retrieve()); - if (m_returnHVTemp) { - ATH_CHECK(m_readKey.initialize()); - ATH_CHECK(m_writeKey.initialize()); - if (m_condSvc->regHandle(this, m_writeKey).isFailure()) { - ATH_MSG_FATAL("unable to register WriteCondHandle " << m_writeKey.fullKey() << " with CondSvc"); - return StatusCode::FAILURE; - } + ATH_CHECK(m_readKey.initialize()); + ATH_CHECK(m_writeKey.initialize()); + if (m_condSvc->regHandle(this, m_writeKey).isFailure()) { + ATH_MSG_FATAL("unable to register WriteCondHandle " << m_writeKey.fullKey() << " with CondSvc"); + return StatusCode::FAILURE; } + return StatusCode::SUCCESS; } StatusCode PixelDCSCondTempAlg::execute() { ATH_MSG_INFO("PixelDCSCondTempAlg::execute()"); - if (not m_returnHVTemp) { return StatusCode::SUCCESS; } - - SG::WriteCondHandle<PixelDCSCondData> writeHandle(m_writeKey); + SG::WriteCondHandle<PixelDCSConditionsData> writeHandle(m_writeKey); // Do we have a valid Write Cond Handle for current time? if (writeHandle.isValid()) { ATH_MSG_DEBUG("CondHandle " << writeHandle.fullKey() << " is already valid.. In theory this should not be called, but may happen if multiple concurrent events are being processed out of order."); @@ -65,32 +56,25 @@ StatusCode PixelDCSCondTempAlg::execute() { ATH_MSG_INFO("Range of input is " << rangeW); // Construct the output Cond Object and fill it in - std::unique_ptr<PixelDCSCondData> writeCdo(std::make_unique<PixelDCSCondData>()); + std::unique_ptr<PixelDCSConditionsData> writeCdo(std::make_unique<PixelDCSConditionsData>()); // Read temperature info std::string param{"temperature"}; - CondAttrListCollection::const_iterator attrList(readCdo->begin()); - CondAttrListCollection::const_iterator end(readCdo->end()); - // CondAttrListCollection doesn't support C++11 type loops, no generic 'begin' - for (; attrList!=end; ++attrList) { - // A CondAttrListCollection is a map of ChanNum and AttributeList + for (CondAttrListCollection::const_iterator attrList=readCdo->begin(); attrList!=readCdo->end(); ++attrList) { CondAttrListCollection::ChanNum channelNumber{attrList->first}; CondAttrListCollection::AttributeList payload{attrList->second}; if (payload.exists(param) and not payload[param].isNull()) { - float val(payload[param].data<float>()); - -// STSTST std::cout << "STSTST temperature " << val << std::endl; - + float val = payload[param].data<float>(); writeCdo->setValue(channelNumber, val); } else { ATH_MSG_WARNING(param << " does not exist for ChanNum " << channelNumber); + writeCdo->setValue(channelNumber, -88.0); } } - // Record the output cond object if (writeHandle.record(rangeW, std::move(writeCdo)).isFailure()) { - ATH_MSG_FATAL("Could not record PixelDCSCondData " << writeHandle.key() << " with EventRange " << rangeW << " into Conditions Store"); + ATH_MSG_FATAL("Could not record PixelDCSConditionsData " << writeHandle.key() << " with EventRange " << rangeW << " into Conditions Store"); return StatusCode::FAILURE; } ATH_MSG_INFO("recorded new CDO " << writeHandle.key() << " with range " << rangeW << " into Conditions Store"); diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDCSCondTempAlg.h b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDCSCondTempAlg.h index 284e231e6912..f36cbd12d46f 100644 --- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDCSCondTempAlg.h +++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDCSCondTempAlg.h @@ -11,7 +11,7 @@ #include "AthenaPoolUtilities/CondAttrListCollection.h" #include "StoreGate/WriteCondHandleKey.h" -#include "PixelConditionsData/PixelDCSCondData.h" +#include "PixelConditionsData/PixelDCSConditionsData.h" #include "GaudiKernel/ICondSvc.h" #include "GaudiKernel/Property.h" @@ -20,17 +20,16 @@ class PixelDCSCondTempAlg : public AthAlgorithm { public: PixelDCSCondTempAlg(const std::string& name, ISvcLocator* pSvcLocator); virtual ~PixelDCSCondTempAlg() = default; - StatusCode initialize() override; - StatusCode execute() override; - StatusCode finalize() override; + + virtual StatusCode initialize() override; + virtual StatusCode execute() override; + virtual StatusCode finalize() override; private: - SG::ReadCondHandleKey<CondAttrListCollection> m_readKey; - SG::WriteCondHandleKey<PixelDCSCondData> m_writeKey; + SG::ReadCondHandleKey<CondAttrListCollection> m_readKey{this, "ReadKey", "/PIXEL/DCS/TEMPERATURE", "Key of input (raw) temperature conditions folder"}; + SG::WriteCondHandleKey<PixelDCSConditionsData> m_writeKey{this, "WriteKey", "PixelDCSTempCondData", "Key of output (derived) temperature conditions folder"}; ServiceHandle<ICondSvc> m_condSvc; - - BooleanProperty m_returnHVTemp; }; #endif // PIXELDCSCONDTEMPALG diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelSiliconConditionsTestAlg.cxx b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelSiliconConditionsTestAlg.cxx index 882ea0b5a6f3..14a6a4d838c6 100644 --- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelSiliconConditionsTestAlg.cxx +++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelSiliconConditionsTestAlg.cxx @@ -4,40 +4,33 @@ #include "PixelSiliconConditionsTestAlg.h" -//Athena includes #include "Identifier/Identifier.h" #include "Identifier/IdentifierHash.h" PixelSiliconConditionsTestAlg::PixelSiliconConditionsTestAlg( const std::string& name, ISvcLocator* pSvcLocator ) : AthAlgorithm( name, pSvcLocator ) { - //nop } -//Initialize StatusCode PixelSiliconConditionsTestAlg::initialize() { ATH_MSG_INFO("Calling initialize"); - if (m_siliconTool.retrieve().isFailure()) { - ATH_MSG_ERROR("Could not retrieve the summary service"); - } + + ATH_CHECK(m_siliconTool.retrieve()); return StatusCode::SUCCESS; } -//Execute StatusCode PixelSiliconConditionsTestAlg::execute(){ //This method is only used to test the summary service, and only used within this package, // so the INFO level messages have no impact on performance of these services when used by clients for (int i=0; i<2048; i++) { - std::cout << "Bias Voltage = " << m_siliconTool->biasVoltage(IdentifierHash(i)) << " Temperature = " << m_siliconTool->temperature(IdentifierHash(i)) << " Depletion V = " << m_siliconTool->depletionVoltage(IdentifierHash(i)) << std::endl; + std::cout << "Hash ID=" << IdentifierHash(i) << " Bias Voltage=" << m_siliconTool->biasVoltage(IdentifierHash(i)) << " Temperature=" << m_siliconTool->temperature(IdentifierHash(i)) << " Depletion V=" << m_siliconTool->depletionVoltage(IdentifierHash(i)) << " FSM state=" << m_siliconTool->PixelFSMState(IdentifierHash(i)) << " FSM status=" << m_siliconTool->PixelFSMStatus(IdentifierHash(i)) << std::endl; } return StatusCode::SUCCESS; } - -//Finalize StatusCode PixelSiliconConditionsTestAlg::finalize(){ ATH_MSG_INFO("Calling finalize"); return StatusCode::SUCCESS; diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelSiliconConditionsTestAlg.h b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelSiliconConditionsTestAlg.h index 1da1e5b76d6d..900a8f73261c 100644 --- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelSiliconConditionsTestAlg.h +++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelSiliconConditionsTestAlg.h @@ -9,20 +9,19 @@ #include "AthenaBaseComps/AthAlgorithm.h" #include "GaudiKernel/ToolHandle.h" -#include "InDetConditionsSummaryService/ISiliconConditionsTool.h" +#include "PixelConditionsTools/IPixelDCSConditionsTool.h" class PixelSiliconConditionsTestAlg : public AthAlgorithm { public: PixelSiliconConditionsTestAlg(const std::string &name,ISvcLocator *pSvcLocator) ; virtual ~PixelSiliconConditionsTestAlg() = default; - StatusCode initialize() override; - StatusCode execute() override; - StatusCode finalize() override; + virtual StatusCode initialize() override; + virtual StatusCode execute() override; + virtual StatusCode finalize() override; private: - ToolHandle<ISiliconConditionsTool> m_siliconTool{this, "PixelSiliconConditionsTool", "PixelSiliconConditionsTool", "Tool to retrieve Pixel information"}; -// ToolHandle<ISiliconConditionsTool> m_siliconTool{this, "SCT_SiliconConditionsTool", "SCT_SiliconConditionsTool", "Tool to retrieve SCT silicon information"}; + ToolHandle<IPixelDCSConditionsTool> m_siliconTool{this, "PixelDCSConditionsTool", "PixelDCSConditionsTool", "Tool to retrieve Pixel information"}; }; #endif // PIXELSILICONcONDITIONSTESTALG_H diff --git a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelCalibData.h b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelCalibData.h index d11cebf23e39..0f79866c020e 100755 --- a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelCalibData.h +++ b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelCalibData.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -86,10 +86,3 @@ inline const Identifier& PixelCalibData::getModuleID() const { return m_id;} } #endif - - - - - - - diff --git a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelCalibDataColl.h b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelCalibDataColl.h index a20703c4aeb2..10610a915460 100755 --- a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelCalibDataColl.h +++ b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelCalibDataColl.h @@ -1,20 +1,20 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#ifndef PIXELCALIBDATACOLL_H -#define PIXELCALIBDATACOLL_H -#include "AthContainers/DataVector.h" -#include "PixelConditionsData/PixelCalibData.h" -#include "AthenaKernel/CLASS_DEF.h" - -/** This typedef represents a collection of PixelCalibData objects. -It is a DataVector. It can be saved -to storegate and persistified using POOL */ - -typedef DataVector<PixelCalib::PixelCalibData> PixelCalibDataColl; - -CLASS_DEF(PixelCalibDataColl, 146316417, 1 ) - -#endif // PIXELCALIBDATACOLL_H - +#ifndef PIXELCALIBDATACOLL_H +#define PIXELCALIBDATACOLL_H +#include "AthContainers/DataVector.h" +#include "PixelConditionsData/PixelCalibData.h" +#include "AthenaKernel/CLASS_DEF.h" + +/** This typedef represents a collection of PixelCalibData objects. +It is a DataVector. It can be saved +to storegate and persistified using POOL */ + +typedef DataVector<PixelCalib::PixelCalibData> PixelCalibDataColl; + +CLASS_DEF(PixelCalibDataColl, 146316417, 1 ) + +#endif // PIXELCALIBDATACOLL_H + diff --git a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelChargeInterpolationParameters.h b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelChargeInterpolationParameters.h index fdf8f4f15d6c..0a3153f58396 100644 --- a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelChargeInterpolationParameters.h +++ b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelChargeInterpolationParameters.h @@ -1,146 +1,146 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -/////////////////////////////////////////////////////////////////// -// PixelOfflineCalibData.h, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#ifndef PIXELCHARGEINTERPOLATIONPARAMETERS_H -#define PIXELCHARGEINTERPOLATIONPARAMETERS_H - -#include "AthenaKernel/CLASS_DEF.h" -#include <string> -#include <vector> - -/** @class PixelChargeInterpolationParameters - It holds the charge interpolation parameters used in PixelClusterOnTrackTool - - @author Tommaso Lari <lari@mi.infn.it> - Incorporating IBL as layer 00, exiting barrel as 1,2,3 - No IBL, layer will set to 1 as default -**/ - -namespace PixelCalib { - -class PixelChargeInterpolationParameters { - - public: - PixelChargeInterpolationParameters(); - ~PixelChargeInterpolationParameters(){}; - - // get/set version number - int getVersion() const; - void setVersion(int version); - - - /** Methods to access the calibration data as a function of - the cluster size, angle/pseudorapidity, layer number */ - - float getDeltaXbarrel(int nRows, float angle, int ilayer=0) const; - float getDeltaYbarrel(int nCol, float eta, int ilayer=0) const; - float getDeltaXIBL(int nRows, float angle) const; - float getDeltaYIBL(int nCol, float eta) const; - - float getDeltaXendcap() const; - float getDeltaYendcap() const; - - /** methods to get/set the calibration data as a function of - the bin index for the various variables separately */ - float getDeltaX(int iangle, int iclustersize, int ilayer) const; - float getDeltaY(int ieta, int iclustersize, int ilayer) const; - int setDeltaX(int iangle, int iclustersize, int ilayer, float value); - int setDeltaY(int ieta, int iclustersize, int ilayer, float value); - - /** methods to get/set the calibration data as a function of - the bin index for the various variables separately */ - float getErrDeltaX(int iangle, int iclustersize, int ilayer) const; - float getErrDeltaY(int ieta, int iclustersize, int ilayer) const; - int setErrDeltaX(int iangle, int iclustersize, int ilayer, float value); - int setErrDeltaY(int ieta, int iclustersize, int ilayer, float value); - - /** methods to get/set the calibration data as a function of - the global bin index (the one used i the internal vector - rapresentation as well as in the database, combining the various - variables */ - float getDeltaX(int i) const; - float getDeltaY(int i) const; - int setDeltaX(int i, float value); - int setDeltaY(int i, float value); - - /** methods to get/set the calibration data errors as a function of - the global bin index (the one used i the internal vector - rapresentation as well as in the database, combining the various - variables */ - float getErrDeltaX(int i) const; - float getErrDeltaY(int i) const; - int setErrDeltaX(int i, float value); - int setErrDeltaY(int i, float value); - - int getNumberOfXbins() const; - int getNumberOfYbins() const; - - const std::vector<float> getEtaBins() const{return m_etabins;} - const std::vector<float> getAngleBins() const{return m_phibins;} - const std::vector<float> getClusterSizeXBins() const{return m_csx;} - const std::vector<float> getClusterSizeYBins() const{return m_csy;} - - void setParameters(const int ncsx, const int ncsy, const int neta, - const int nalpha, int offset, const float* constants); - - void Print(std::string filename) const; - void Load(std::string filename); - - // IBL - const std::vector<float> getIBLEtaBins() const{return m_ibletabins;} - const std::vector<float> getIBLAngleBins() const{return m_iblphibins;} - int getIBLcsxbins() const {return m_csxbinsibl;} - int getIBLcsybins() const {return m_csybinsibl;} - int getIBLetabins() const {return m_etaibl;} - int getIBLphibins() const {return m_alphaibl;} - void setIBLcsxbins(int icsx){m_csxbinsibl = icsx;} - void setIBLcsybins(int icsy){m_csybinsibl = icsy;} - void setIBLetabins(int ieta){m_etaibl = ieta;} - void setIBLphibins(int ialpha){m_alphaibl = ialpha;} - // - - private: - - /** Get the global bin index as a function of the value of the - variables of the parametrization */ - int getBarrelBinX(int iclustersize, float angle, int ilayer) const; - int getBarrelBinY(int iclustersize, float eta, int ilayer) const; - - - /** Get global bin index as a function of the separate bin index - for each variable of the parametrization */ - int getBarrelBinX(int iclustersize, int iangle, int ilayer) const; - int getBarrelBinY(int iclustersize, int ieta, int ilayer) const; - - - // Parametrization bins - int m_version; - int m_nlayerbins; // number of layers - std::vector<float> m_etabins; - std::vector<float> m_phibins; - std::vector<float> m_csx; - std::vector<float> m_csy; - // parametrization values - std::vector<float> m_deltax; - std::vector<float> m_deltay; - // error on parametrization values - std::vector<float> m_errdeltax; - std::vector<float> m_errdeltay; - // IBL - int m_csxbinsibl; // IBL csx bins - int m_csybinsibl; // IBL csy bins - int m_etaibl; // IBL eta bins - int m_alphaibl; // IBL phi bins - std::vector<float> m_ibletabins; - std::vector<float> m_iblphibins; - -}; - -} - -#endif +/////////////////////////////////////////////////////////////////// +// PixelOfflineCalibData.h, (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + +#ifndef PIXELCHARGEINTERPOLATIONPARAMETERS_H +#define PIXELCHARGEINTERPOLATIONPARAMETERS_H + +#include "AthenaKernel/CLASS_DEF.h" +#include <string> +#include <vector> + +/** @class PixelChargeInterpolationParameters + It holds the charge interpolation parameters used in PixelClusterOnTrackTool + + @author Tommaso Lari <lari@mi.infn.it> + Incorporating IBL as layer 00, exiting barrel as 1,2,3 + No IBL, layer will set to 1 as default +**/ + +namespace PixelCalib { + +class PixelChargeInterpolationParameters { + + public: + PixelChargeInterpolationParameters(); + ~PixelChargeInterpolationParameters(){}; + + // get/set version number + int getVersion() const; + void setVersion(int version); + + + /** Methods to access the calibration data as a function of + the cluster size, angle/pseudorapidity, layer number */ + + float getDeltaXbarrel(int nRows, float angle, int ilayer=0) const; + float getDeltaYbarrel(int nCol, float eta, int ilayer=0) const; + float getDeltaXIBL(int nRows, float angle) const; + float getDeltaYIBL(int nCol, float eta) const; + + float getDeltaXendcap() const; + float getDeltaYendcap() const; + + /** methods to get/set the calibration data as a function of + the bin index for the various variables separately */ + float getDeltaX(int iangle, int iclustersize, int ilayer) const; + float getDeltaY(int ieta, int iclustersize, int ilayer) const; + int setDeltaX(int iangle, int iclustersize, int ilayer, float value); + int setDeltaY(int ieta, int iclustersize, int ilayer, float value); + + /** methods to get/set the calibration data as a function of + the bin index for the various variables separately */ + float getErrDeltaX(int iangle, int iclustersize, int ilayer) const; + float getErrDeltaY(int ieta, int iclustersize, int ilayer) const; + int setErrDeltaX(int iangle, int iclustersize, int ilayer, float value); + int setErrDeltaY(int ieta, int iclustersize, int ilayer, float value); + + /** methods to get/set the calibration data as a function of + the global bin index (the one used i the internal vector + rapresentation as well as in the database, combining the various + variables */ + float getDeltaX(int i) const; + float getDeltaY(int i) const; + int setDeltaX(int i, float value); + int setDeltaY(int i, float value); + + /** methods to get/set the calibration data errors as a function of + the global bin index (the one used i the internal vector + rapresentation as well as in the database, combining the various + variables */ + float getErrDeltaX(int i) const; + float getErrDeltaY(int i) const; + int setErrDeltaX(int i, float value); + int setErrDeltaY(int i, float value); + + int getNumberOfXbins() const; + int getNumberOfYbins() const; + + const std::vector<float> getEtaBins() const{return m_etabins;} + const std::vector<float> getAngleBins() const{return m_phibins;} + const std::vector<float> getClusterSizeXBins() const{return m_csx;} + const std::vector<float> getClusterSizeYBins() const{return m_csy;} + + void setParameters(const int ncsx, const int ncsy, const int neta, + const int nalpha, int offset, const float* constants); + + void Print(std::string filename) const; + void Load(std::string filename); + + // IBL + const std::vector<float> getIBLEtaBins() const{return m_ibletabins;} + const std::vector<float> getIBLAngleBins() const{return m_iblphibins;} + int getIBLcsxbins() const {return m_csxbinsibl;} + int getIBLcsybins() const {return m_csybinsibl;} + int getIBLetabins() const {return m_etaibl;} + int getIBLphibins() const {return m_alphaibl;} + void setIBLcsxbins(int icsx){m_csxbinsibl = icsx;} + void setIBLcsybins(int icsy){m_csybinsibl = icsy;} + void setIBLetabins(int ieta){m_etaibl = ieta;} + void setIBLphibins(int ialpha){m_alphaibl = ialpha;} + // + + private: + + /** Get the global bin index as a function of the value of the + variables of the parametrization */ + int getBarrelBinX(int iclustersize, float angle, int ilayer) const; + int getBarrelBinY(int iclustersize, float eta, int ilayer) const; + + + /** Get global bin index as a function of the separate bin index + for each variable of the parametrization */ + int getBarrelBinX(int iclustersize, int iangle, int ilayer) const; + int getBarrelBinY(int iclustersize, int ieta, int ilayer) const; + + + // Parametrization bins + int m_version; + int m_nlayerbins; // number of layers + std::vector<float> m_etabins; + std::vector<float> m_phibins; + std::vector<float> m_csx; + std::vector<float> m_csy; + // parametrization values + std::vector<float> m_deltax; + std::vector<float> m_deltay; + // error on parametrization values + std::vector<float> m_errdeltax; + std::vector<float> m_errdeltay; + // IBL + int m_csxbinsibl; // IBL csx bins + int m_csybinsibl; // IBL csy bins + int m_etaibl; // IBL eta bins + int m_alphaibl; // IBL phi bins + std::vector<float> m_ibletabins; + std::vector<float> m_iblphibins; + +}; + +} + +#endif diff --git a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelClusterErrorData.h b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelClusterErrorData.h index 1487f328daa8..bedc624931f1 100644 --- a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelClusterErrorData.h +++ b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelClusterErrorData.h @@ -1,85 +1,85 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -/////////////////////////////////////////////////////////////////// -// PixelOfflineCalibData.h, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#ifndef PIXELCLUSTERERRORDATA_H -#define PIXELCLUSTERERRORDATA_H - -#include "AthenaKernel/CLASS_DEF.h" -#include <string> -#include <vector> - -/** @class PixelOfflineCalibData - It manages the parametrizations of the uncertainty on the - position of pixel clusters - - @author Tommaso Lari <lari@mi.infn.it> - Incorporating IBL plannar and 3D Clustering dependent -- wm yao (2/11/2013) with a special version number (-2) ? - -**/ - -namespace PixelCalib { - -class PixelClusterErrorData { - - public: - PixelClusterErrorData(){ Initialize(); } - ~PixelClusterErrorData(){}; - - /** Methods to access the calibration data */ - - // get/set version number - int getVersion() const; - void setVersion(int version); - - float getPixelBarrelPhiError(int ibin) const; - float getPixelBarrelEtaError(int ibin) const; - float getPixelEndcapPhiError(int ibin) const; - float getPixelEndcapRError(int ibin) const; - float getPixelIBLPhiError(int ibin) const; - float getPixelIBLEtaError(int ibin) const; - - // returns an error code (wether ibin is in parametrization range) - int setPixelBarrelPhiError(int ibin, float error); - int setPixelBarrelEtaError(int ibin, float error); - int setPixelEndcapPhiError(int ibin, float error); - int setPixelEndcapRError(int ibin, float error); - int setPixelIBLPhiError(int ibin, float error); - int setPixelIBLEtaError(int ibin, float error); - - // get the parametrization bin - int getEndcapBin(int etaClusterSize, int phiClusterSize) const; - int getBarrelBin(double eta, int etaClusterSize, int phiClusterSize) const; - - // assuming phi and eta parametrizations have the same number of bins... - int getNumberOfBarrelBins(){ return m_barrelphierror.size(); } - int getNumberOfEndcapBins(){ return m_endcapphierror.size(); } - - void Print(std::string file) const; - void Load(std::string file); - - private: - void Initialize(); - // parametrization of errors - std::vector<float> m_barrelphierror; - std::vector<float> m_barreletaerror; - std::vector<float> m_endcapphierror; - std::vector<float> m_endcapetaerror; - std::vector<float> m_iblphierror; - std::vector<float> m_ibletaerror; - - // number of bins of parametrization (details) - int m_nPhi; - int m_nZ; - int m_version; - // eta values of parametrization - std::vector<float> m_etaref; -}; - -} - -#endif +/////////////////////////////////////////////////////////////////// +// PixelOfflineCalibData.h, (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + +#ifndef PIXELCLUSTERERRORDATA_H +#define PIXELCLUSTERERRORDATA_H + +#include "AthenaKernel/CLASS_DEF.h" +#include <string> +#include <vector> + +/** @class PixelOfflineCalibData + It manages the parametrizations of the uncertainty on the + position of pixel clusters + + @author Tommaso Lari <lari@mi.infn.it> + Incorporating IBL plannar and 3D Clustering dependent -- wm yao (2/11/2013) with a special version number (-2) ? + +**/ + +namespace PixelCalib { + +class PixelClusterErrorData { + + public: + PixelClusterErrorData(){ Initialize(); } + ~PixelClusterErrorData(){}; + + /** Methods to access the calibration data */ + + // get/set version number + int getVersion() const; + void setVersion(int version); + + float getPixelBarrelPhiError(int ibin) const; + float getPixelBarrelEtaError(int ibin) const; + float getPixelEndcapPhiError(int ibin) const; + float getPixelEndcapRError(int ibin) const; + float getPixelIBLPhiError(int ibin) const; + float getPixelIBLEtaError(int ibin) const; + + // returns an error code (wether ibin is in parametrization range) + int setPixelBarrelPhiError(int ibin, float error); + int setPixelBarrelEtaError(int ibin, float error); + int setPixelEndcapPhiError(int ibin, float error); + int setPixelEndcapRError(int ibin, float error); + int setPixelIBLPhiError(int ibin, float error); + int setPixelIBLEtaError(int ibin, float error); + + // get the parametrization bin + int getEndcapBin(int etaClusterSize, int phiClusterSize) const; + int getBarrelBin(double eta, int etaClusterSize, int phiClusterSize) const; + + // assuming phi and eta parametrizations have the same number of bins... + int getNumberOfBarrelBins(){ return m_barrelphierror.size(); } + int getNumberOfEndcapBins(){ return m_endcapphierror.size(); } + + void Print(std::string file) const; + void Load(std::string file); + + private: + void Initialize(); + // parametrization of errors + std::vector<float> m_barrelphierror; + std::vector<float> m_barreletaerror; + std::vector<float> m_endcapphierror; + std::vector<float> m_endcapetaerror; + std::vector<float> m_iblphierror; + std::vector<float> m_ibletaerror; + + // number of bins of parametrization (details) + int m_nPhi; + int m_nZ; + int m_version; + // eta values of parametrization + std::vector<float> m_etaref; +}; + +} + +#endif diff --git a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelClusterOnTrackErrorData.h b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelClusterOnTrackErrorData.h index db1850922a81..b7e23c279f1a 100644 --- a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelClusterOnTrackErrorData.h +++ b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelClusterOnTrackErrorData.h @@ -1,133 +1,133 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -/////////////////////////////////////////////////////////////////// -// PixelOfflineCalibData.h, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#ifndef PIXELCLUSTERONTRACKERRORDATA_H -#define PIXELCLUSTERONTRACKERRORDATA_H - -#include "AthenaKernel/CLASS_DEF.h" -#include <string> -#include <vector> - -/** @class PixelClusterOnTrackErrorData - It holds the parametrizations of the uncertainty on the - position of pixel clusters when track candidate is available - - @author Tommaso Lari <lari@mi.infn.it> -**/ - -namespace PixelCalib { - -class PixelClusterOnTrackErrorData { - - public: - - PixelClusterOnTrackErrorData(); - ~PixelClusterOnTrackErrorData(); - - /** Methods to access the calibration data */ - - // get/set version number - int getVersion() const; - void setVersion(int version); - - // get the number of bins - int getNumberOfPhiBarrelBins() const; - int getNumberOfEtaBarrelBins() const; - // IBL - int getNumberOfPhiIBLBins() const; - int getNumberOfEtaIBLBins() const; - - - // get parametrizations - const std::vector<float> getClusterSizeBinsX(){return m_csx;} - const std::vector<float> getClusterSizeBinsY(){return m_csy;} - const std::vector<float> getEtaBins(){return m_etaref;} - const std::vector<float> getIncidenceAngleBins(){return m_phibins;} - // IBL - const std::vector<float> getEtaIBLBins(){return m_ibletaref;} - const std::vector<float> getIncidenceAngleIBLBins(){return m_iblphibins;} - - - // old parametrization (analytical formula) - double getPixelBarrelPhiError(double ang, int phiClusterSize); - - // new parametrization (read from DB) - float getPixelBarrelEtaError(int ibin); - float getPixelBarrelPhiError(int ibin); - // IBL - float getPixelIBLEtaError(int ibin); - float getPixelIBLPhiError(int ibin); - - - void setParameters(const int ncsx, const int ncsy, const int neta, const int nalpha, - int offset, const float* constants); - void setPixelBarrelPhiError(int ibin, double error){ - m_barrelphierror[ibin] = error; } - void setPixelBarrelEtaError(int ibin, double error){ - m_barreletaerror[ibin] = error; } - // IBL - void setPixelIBLPhiError(int ibin, double error){ - m_iblphierror[ibin] = error; } - void setPixelIBLEtaError(int ibin, double error){ - m_ibletaerror[ibin] = error; } - - - int getBarrelBinPhi(double angle, int phiClusterSize); - - int getBarrelBinEta(double eta, int etaClusterSize, - int phiClusterSize); - // IBL - int getIBLBinPhi(double angle, int phiClusterSize); - int getIBLBinEta(double eta, int etaClusterSize); - - // save constants on text file - void Print(std::string file) const; - // load constants from text file - void Load(std::string file); - // IBL - - int getIBLcsxbins() const {return m_csxbinsibl;} - int getIBLcsybins() const {return m_csybinsibl;} - int getIBLetabins() const {return m_etabinsibl;} - int getIBLphibins() const {return m_phibinsibl;} - - void setIBLcsxbins(int icsx){m_csxbinsibl = icsx;} - void setIBLcsybins(int icsy){m_csybinsibl = icsy;} - void setIBLetabins(int ieta){m_etabinsibl = ieta;} - void setIBLphibins(int iphi){m_phibinsibl = iphi;} - - private: - void Initialize(); - - int m_version; - // parametrization of errors - std::vector<float> m_barrelphierror; - std::vector<float> m_barreletaerror; - std::vector<float> m_endcapphierror; - std::vector<float> m_endcapetaerror; - - // The bins of parametrization - std::vector<float> m_csx; // x cluster size - std::vector<float> m_csy; // y cluster size - std::vector<float> m_etaref; // eta values - std::vector<float> m_phibins; // Incidence angle values - // IBL - int m_csxbinsibl; // IBL csx bins - int m_csybinsibl; // IBL csy bins - int m_etabinsibl; // IBL eta bins - int m_phibinsibl; // IBL phi bins - std::vector<float> m_ibletaref; // eta values of IBL - std::vector<float> m_iblphibins; // Incidence angle values of IBL - std::vector<float> m_iblphierror; - std::vector<float> m_ibletaerror; - -}; - -} - -#endif +/////////////////////////////////////////////////////////////////// +// PixelOfflineCalibData.h, (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + +#ifndef PIXELCLUSTERONTRACKERRORDATA_H +#define PIXELCLUSTERONTRACKERRORDATA_H + +#include "AthenaKernel/CLASS_DEF.h" +#include <string> +#include <vector> + +/** @class PixelClusterOnTrackErrorData + It holds the parametrizations of the uncertainty on the + position of pixel clusters when track candidate is available + + @author Tommaso Lari <lari@mi.infn.it> +**/ + +namespace PixelCalib { + +class PixelClusterOnTrackErrorData { + + public: + + PixelClusterOnTrackErrorData(); + ~PixelClusterOnTrackErrorData(); + + /** Methods to access the calibration data */ + + // get/set version number + int getVersion() const; + void setVersion(int version); + + // get the number of bins + int getNumberOfPhiBarrelBins() const; + int getNumberOfEtaBarrelBins() const; + // IBL + int getNumberOfPhiIBLBins() const; + int getNumberOfEtaIBLBins() const; + + + // get parametrizations + const std::vector<float> getClusterSizeBinsX(){return m_csx;} + const std::vector<float> getClusterSizeBinsY(){return m_csy;} + const std::vector<float> getEtaBins(){return m_etaref;} + const std::vector<float> getIncidenceAngleBins(){return m_phibins;} + // IBL + const std::vector<float> getEtaIBLBins(){return m_ibletaref;} + const std::vector<float> getIncidenceAngleIBLBins(){return m_iblphibins;} + + + // old parametrization (analytical formula) + double getPixelBarrelPhiError(double ang, int phiClusterSize); + + // new parametrization (read from DB) + float getPixelBarrelEtaError(int ibin); + float getPixelBarrelPhiError(int ibin); + // IBL + float getPixelIBLEtaError(int ibin); + float getPixelIBLPhiError(int ibin); + + + void setParameters(const int ncsx, const int ncsy, const int neta, const int nalpha, + int offset, const float* constants); + void setPixelBarrelPhiError(int ibin, double error){ + m_barrelphierror[ibin] = error; } + void setPixelBarrelEtaError(int ibin, double error){ + m_barreletaerror[ibin] = error; } + // IBL + void setPixelIBLPhiError(int ibin, double error){ + m_iblphierror[ibin] = error; } + void setPixelIBLEtaError(int ibin, double error){ + m_ibletaerror[ibin] = error; } + + + int getBarrelBinPhi(double angle, int phiClusterSize); + + int getBarrelBinEta(double eta, int etaClusterSize, + int phiClusterSize); + // IBL + int getIBLBinPhi(double angle, int phiClusterSize); + int getIBLBinEta(double eta, int etaClusterSize); + + // save constants on text file + void Print(std::string file) const; + // load constants from text file + void Load(std::string file); + // IBL + + int getIBLcsxbins() const {return m_csxbinsibl;} + int getIBLcsybins() const {return m_csybinsibl;} + int getIBLetabins() const {return m_etabinsibl;} + int getIBLphibins() const {return m_phibinsibl;} + + void setIBLcsxbins(int icsx){m_csxbinsibl = icsx;} + void setIBLcsybins(int icsy){m_csybinsibl = icsy;} + void setIBLetabins(int ieta){m_etabinsibl = ieta;} + void setIBLphibins(int iphi){m_phibinsibl = iphi;} + + private: + void Initialize(); + + int m_version; + // parametrization of errors + std::vector<float> m_barrelphierror; + std::vector<float> m_barreletaerror; + std::vector<float> m_endcapphierror; + std::vector<float> m_endcapetaerror; + + // The bins of parametrization + std::vector<float> m_csx; // x cluster size + std::vector<float> m_csy; // y cluster size + std::vector<float> m_etaref; // eta values + std::vector<float> m_phibins; // Incidence angle values + // IBL + int m_csxbinsibl; // IBL csx bins + int m_csybinsibl; // IBL csy bins + int m_etabinsibl; // IBL eta bins + int m_phibinsibl; // IBL phi bins + std::vector<float> m_ibletaref; // eta values of IBL + std::vector<float> m_iblphibins; // Incidence angle values of IBL + std::vector<float> m_iblphierror; + std::vector<float> m_ibletaerror; + +}; + +} + +#endif diff --git a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelDCSCondData.h b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelDCSCondData.h deleted file mode 100644 index 359832147f5c..000000000000 --- a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelDCSCondData.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef PIXELDCSCONDDATA_H -#define PIXELDCSCONDDATA_H - -#include "AthenaKernel/CLASS_DEF.h" -#include "AthenaPoolUtilities/CondAttrListCollection.h" -#include <map> - -class PixelDCSCondData { - public: - //constructor - PixelDCSCondData(); - - //destructor - virtual ~PixelDCSCondData(); - //@name main methods - //@{ - /// set a float value for a channel - void setValue(const CondAttrListCollection::ChanNum& chanNum, const float value); - /// get the float value for a channel - bool getValue(const CondAttrListCollection::ChanNum& chanNum, float& value) const; - /// clear the m_channelValues - void clear(); - - void fill(const CondAttrListCollection::ChanNum& chanNum, const std::string param); - int output(const CondAttrListCollection::ChanNum & chanNum) const; - //@} - - private: - typedef std::map<CondAttrListCollection::ChanNum, float> FloatConditions; - typedef std::map<CondAttrListCollection::ChanNum, std::vector<std::string> > DCSConditions; - FloatConditions m_channelValues; - DCSConditions m_bad_channels; -}; - -CLASS_DEF( PixelDCSCondData , 345532772 , 1 ) - -#include "AthenaKernel/CondCont.h" -CONDCONT_DEF( PixelDCSCondData, 578786392 ); - -#endif // PIXELDCSCONDDATA_H diff --git a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelDCSConditionsData.h b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelDCSConditionsData.h new file mode 100644 index 000000000000..e8781680debc --- /dev/null +++ b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelDCSConditionsData.h @@ -0,0 +1,35 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef PIXELDCSCONDDATA_H +#define PIXELDCSCONDDATA_H + +#include "AthenaKernel/CLASS_DEF.h" +#include "AthenaPoolUtilities/CondAttrListCollection.h" +#include <map> + +class PixelDCSConditionsData { + public: + PixelDCSConditionsData(); + virtual ~PixelDCSConditionsData(); + + void setValue(const CondAttrListCollection::ChanNum& chanNum, const float value); + void setValue(const CondAttrListCollection::ChanNum& chanNum, const std::string value); + bool getValue(const CondAttrListCollection::ChanNum& chanNum, float& value) const; + bool getValue(const CondAttrListCollection::ChanNum& chanNum, std::string& value) const; + void clear(); + + private: + typedef std::map<CondAttrListCollection::ChanNum, float> FloatConditions; + typedef std::map<CondAttrListCollection::ChanNum, std::string> StringConditions; + FloatConditions m_channelValues; + StringConditions m_channelStrings; +}; + +CLASS_DEF( PixelDCSConditionsData , 345532773 , 1 ) + +#include "AthenaKernel/CondCont.h" +CONDCONT_DEF( PixelDCSConditionsData, 578786393 ); + +#endif // PIXELDCSCONDDATA_H diff --git a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelDCSData.h b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelDCSData.h index 4bfb2db340f9..05219809d55b 100644 --- a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelDCSData.h +++ b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelDCSData.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ //**************************************************************************** @@ -13,122 +13,77 @@ // //**************************************************************************** - - #ifndef PIXEL_DSC_DATA_H #define PIXEL_DSC_DATA_H - #include <string> #include <iostream> #include "AthContainers/DataVector.h" #include "AthenaKernel/CLASS_DEF.h" #include "Identifier/Identifier.h" - - class PixelModuleDCSData; std::ostream& operator<<(std::ostream& out, const PixelModuleDCSData&); typedef DataVector<PixelModuleDCSData> PixelDCSData; -class PixelModuleDCSData{ - - public: +class PixelModuleDCSData { - PixelModuleDCSData(); - explicit PixelModuleDCSData(const Identifier& ident); - explicit PixelModuleDCSData(Identifier& ident); + public: + PixelModuleDCSData(); + explicit PixelModuleDCSData(const Identifier& ident); + explicit PixelModuleDCSData(Identifier& ident); + ~PixelModuleDCSData(){}; - ~PixelModuleDCSData(){}; + void setModuleID(const Identifier& ident); + void setModuleID(Identifier& ident); + const Identifier& getModuleID() const; - void setModuleID(const Identifier& ident); - void setModuleID(Identifier& ident); - const Identifier& getModuleID() const; + void setTemperature(float temp); + float getTemperature() const; - void setTemperature(float temp); - float getTemperature() const; + void setHV(float hv); + float getHV() const; - void setHV(float hv); - float getHV() const; + void setFSMStatus(std::string fsms); + std::string getFSMStatus() const; - void setFSMStatus(std::string fsms); - std::string getFSMStatus() const; + void setFSMState(std::string fsms); + std::string getFSMState() const; - void setFSMState(std::string fsms); - std::string getFSMState() const; - - - private: - - Identifier m_ident; - - float m_temperature; - float m_hightVoltage; - std::string m_fsmStatus; - std::string m_fsmState; + private: + Identifier m_ident; + float m_temperature; + float m_hightVoltage; + std::string m_fsmStatus; + std::string m_fsmState; }; -inline void PixelModuleDCSData::setModuleID(const Identifier& ident) -{ - m_ident = ident; -} - -inline void PixelModuleDCSData::setModuleID(Identifier& ident) -{ - m_ident = ident; -} - +inline void PixelModuleDCSData::setModuleID(const Identifier& ident) { m_ident = ident; } -inline const Identifier& PixelModuleDCSData::getModuleID() const -{ - return m_ident; -} +inline void PixelModuleDCSData::setModuleID(Identifier& ident) { m_ident = ident; } -inline void PixelModuleDCSData::setTemperature(float temp) -{ - m_temperature = temp; -} +inline const Identifier& PixelModuleDCSData::getModuleID() const { return m_ident; } -inline float PixelModuleDCSData::getTemperature() const -{ - return m_temperature; -} +inline void PixelModuleDCSData::setTemperature(float temp) { m_temperature = temp; } -inline void PixelModuleDCSData::setHV(float hv) -{ - m_hightVoltage = hv; -} +inline float PixelModuleDCSData::getTemperature() const { return m_temperature; } -inline float PixelModuleDCSData::getHV() const -{ - return m_hightVoltage; -} +inline void PixelModuleDCSData::setHV(float hv) { m_hightVoltage = hv; } -inline void PixelModuleDCSData::setFSMStatus(std::string fsms) -{ - m_fsmStatus = fsms; -} +inline float PixelModuleDCSData::getHV() const { return m_hightVoltage; } -inline std::string PixelModuleDCSData::getFSMStatus() const -{ - return m_fsmStatus; -} +inline void PixelModuleDCSData::setFSMStatus(std::string fsms) { m_fsmStatus = fsms; } +inline std::string PixelModuleDCSData::getFSMStatus() const { return m_fsmStatus; } -inline void PixelModuleDCSData::setFSMState(std::string fsms) -{ - m_fsmState = fsms; -} +inline void PixelModuleDCSData::setFSMState(std::string fsms) { m_fsmState = fsms; } -inline std::string PixelModuleDCSData::getFSMState() const -{ - return m_fsmState; -} +inline std::string PixelModuleDCSData::getFSMState() const { return m_fsmState; } CLASS_DEF(PixelModuleDCSData, 88201164, 1) CLASS_DEF(PixelDCSData, 21396826, 1) diff --git a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelOfflineCalibData.h b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelOfflineCalibData.h index 04fb259ebfd8..4425407a8f1a 100644 --- a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelOfflineCalibData.h +++ b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelOfflineCalibData.h @@ -1,146 +1,138 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -/////////////////////////////////////////////////////////////////// -// PixelOfflineCalibData.h, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#ifndef PIXELOFFLINECALIBDATA_H -#define PIXELOFFLINECALIBDATA_H - -#include "AthenaKernel/CLASS_DEF.h" -#include "PixelConditionsData/PixelClusterErrorData.h" -#include "PixelConditionsData/PixelClusterOnTrackErrorData.h" -#include "PixelConditionsData/PixelChargeInterpolationParameters.h" +/////////////////////////////////////////////////////////////////// +// PixelOfflineCalibData.h, (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + +#ifndef PIXELOFFLINECALIBDATA_H +#define PIXELOFFLINECALIBDATA_H + +#include "AthenaKernel/CLASS_DEF.h" +#include "PixelConditionsData/PixelClusterErrorData.h" +#include "PixelConditionsData/PixelClusterOnTrackErrorData.h" +#include "PixelConditionsData/PixelChargeInterpolationParameters.h" #include "AthenaKernel/CondCont.h" - - -/** @class PixelOfflineCalibData - - The PixelOfflineCalibData is a class that designed to hold the - data used by pixel offline algorithms. This includes - Pixel Cluster error parametrizations, and other stuff will follow - - The details can be found at - https://twiki.cern.ch/twiki/bin/view/Atlas/AWikiPageNotExistingYet - - @author Tommaso Lari <lari@mi.infn.it> -*/ - -namespace PixelCalib { - -class PixelOfflineCalibData{ - - public: - /** Constructor:*/ - PixelOfflineCalibData(); - PixelOfflineCalibData(const PixelOfflineCalibData& rhs); - PixelOfflineCalibData& operator=(const PixelOfflineCalibData& rhs); - // PixelOfflineCalibData(const Identifier & ident); - // PixelOfflineCalibData(Identifier & ident); - - /** default destructor */ - ~PixelOfflineCalibData (); - - bool update(const PixelClusterErrorData& idat); - bool update(const PixelChargeInterpolationParameters& idat); - bool update(const PixelClusterOnTrackErrorData& idat); - - int size() const; - - // get the pointer to pixel cluster error data - PixelClusterErrorData* getPixelClusterErrorData() const; - PixelChargeInterpolationParameters* getPixelChargeInterpolationParameters() const; - PixelClusterOnTrackErrorData* getPixelClusterOnTrackErrorData() const; - - // Get/Set the numerical constants - int GetNumberOfConstants() const; - float* GetConstants() const; - void SetConstants(const float* constants); - - void Dump(); - - private: - // Identifier m_ident; - PixelClusterErrorData* m_clustererrordata; - PixelChargeInterpolationParameters* m_chargeinterpolationparameters; - PixelClusterOnTrackErrorData* m_clusterontrackerrordata; -}; - -//CLASS_DEF(PixelOfflineCalibData, 27089939, 1) - -inline PixelOfflineCalibData::PixelOfflineCalibData() { - m_clustererrordata = new PixelClusterErrorData(); - m_clusterontrackerrordata = new PixelClusterOnTrackErrorData(); - m_chargeinterpolationparameters = new PixelChargeInterpolationParameters(); -} - -inline PixelOfflineCalibData::PixelOfflineCalibData(const PixelOfflineCalibData& rhs){ - m_clustererrordata = rhs.m_clustererrordata; - m_clusterontrackerrordata = rhs.m_clusterontrackerrordata; - m_chargeinterpolationparameters = rhs.m_chargeinterpolationparameters; -} - -inline PixelOfflineCalibData& PixelOfflineCalibData::operator=(const PixelOfflineCalibData& rhs){ - if(this != &rhs){ - m_clustererrordata = rhs.m_clustererrordata; - m_clusterontrackerrordata = rhs.m_clusterontrackerrordata; - m_chargeinterpolationparameters = rhs.m_chargeinterpolationparameters; - } - return (*this); -} - -inline bool PixelOfflineCalibData::update(const PixelClusterErrorData& idat){ - *m_clustererrordata = idat; - return true; -} - -inline bool PixelOfflineCalibData::update( - const PixelChargeInterpolationParameters& idat){ - *m_chargeinterpolationparameters = idat; - return true; -} - -inline bool PixelOfflineCalibData::update(const PixelClusterOnTrackErrorData& idat){ - *m_clusterontrackerrordata = idat; - return true; -} - -inline PixelClusterErrorData* PixelOfflineCalibData::getPixelClusterErrorData() const { - return m_clustererrordata; -} - -inline PixelChargeInterpolationParameters* PixelOfflineCalibData::getPixelChargeInterpolationParameters() const { - return m_chargeinterpolationparameters; -} - -inline PixelClusterOnTrackErrorData* - PixelOfflineCalibData::getPixelClusterOnTrackErrorData() const { - return m_clusterontrackerrordata; -} - - -//================ Destructor ================================================= -inline PixelOfflineCalibData::~PixelOfflineCalibData(){ -delete m_clustererrordata; -delete m_chargeinterpolationparameters; -delete m_clusterontrackerrordata; -} + + +/** @class PixelOfflineCalibData + + The PixelOfflineCalibData is a class that designed to hold the + data used by pixel offline algorithms. This includes + Pixel Cluster error parametrizations, and other stuff will follow + + The details can be found at + https://twiki.cern.ch/twiki/bin/view/Atlas/AWikiPageNotExistingYet + + @author Tommaso Lari <lari@mi.infn.it> +*/ + +namespace PixelCalib { + +class PixelOfflineCalibData{ + + public: + /** Constructor:*/ + PixelOfflineCalibData(); + PixelOfflineCalibData(const PixelOfflineCalibData& rhs); + PixelOfflineCalibData& operator=(const PixelOfflineCalibData& rhs); + // PixelOfflineCalibData(const Identifier & ident); + // PixelOfflineCalibData(Identifier & ident); + + /** default destructor */ + ~PixelOfflineCalibData (); + + bool update(const PixelClusterErrorData& idat); + bool update(const PixelChargeInterpolationParameters& idat); + bool update(const PixelClusterOnTrackErrorData& idat); + + int size() const; + + // get the pointer to pixel cluster error data + PixelClusterErrorData* getPixelClusterErrorData() const; + PixelChargeInterpolationParameters* getPixelChargeInterpolationParameters() const; + PixelClusterOnTrackErrorData* getPixelClusterOnTrackErrorData() const; + + // Get/Set the numerical constants + int GetNumberOfConstants() const; + float* GetConstants() const; + void SetConstants(const float* constants); + + void Dump(); + + private: + // Identifier m_ident; + PixelClusterErrorData* m_clustererrordata; + PixelChargeInterpolationParameters* m_chargeinterpolationparameters; + PixelClusterOnTrackErrorData* m_clusterontrackerrordata; +}; + +//CLASS_DEF(PixelOfflineCalibData, 27089939, 1) + +inline PixelOfflineCalibData::PixelOfflineCalibData() { + m_clustererrordata = new PixelClusterErrorData(); + m_clusterontrackerrordata = new PixelClusterOnTrackErrorData(); + m_chargeinterpolationparameters = new PixelChargeInterpolationParameters(); +} + +inline PixelOfflineCalibData::PixelOfflineCalibData(const PixelOfflineCalibData& rhs){ + m_clustererrordata = rhs.m_clustererrordata; + m_clusterontrackerrordata = rhs.m_clusterontrackerrordata; + m_chargeinterpolationparameters = rhs.m_chargeinterpolationparameters; +} + +inline PixelOfflineCalibData& PixelOfflineCalibData::operator=(const PixelOfflineCalibData& rhs){ + if(this != &rhs){ + m_clustererrordata = rhs.m_clustererrordata; + m_clusterontrackerrordata = rhs.m_clusterontrackerrordata; + m_chargeinterpolationparameters = rhs.m_chargeinterpolationparameters; + } + return (*this); +} + +inline bool PixelOfflineCalibData::update(const PixelClusterErrorData& idat){ + *m_clustererrordata = idat; + return true; +} + +inline bool PixelOfflineCalibData::update( + const PixelChargeInterpolationParameters& idat){ + *m_chargeinterpolationparameters = idat; + return true; +} + +inline bool PixelOfflineCalibData::update(const PixelClusterOnTrackErrorData& idat){ + *m_clusterontrackerrordata = idat; + return true; +} + +inline PixelClusterErrorData* PixelOfflineCalibData::getPixelClusterErrorData() const { + return m_clustererrordata; +} + +inline PixelChargeInterpolationParameters* PixelOfflineCalibData::getPixelChargeInterpolationParameters() const { + return m_chargeinterpolationparameters; +} + +inline PixelClusterOnTrackErrorData* + PixelOfflineCalibData::getPixelClusterOnTrackErrorData() const { + return m_clusterontrackerrordata; +} + + +//================ Destructor ================================================= +inline PixelOfflineCalibData::~PixelOfflineCalibData(){ +delete m_clustererrordata; +delete m_chargeinterpolationparameters; +delete m_clusterontrackerrordata; +} } CLASS_DEF(PixelCalib::PixelOfflineCalibData, 209342487, 1) CLASS_DEF(CondCont<PixelCalib::PixelOfflineCalibData> , 213651723 , 1) +#endif -#endif - - - - - - - - diff --git a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/SpecialPixelMap.h b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/SpecialPixelMap.h index d684a1109702..d186d2546eb6 100755 --- a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/SpecialPixelMap.h +++ b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/SpecialPixelMap.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #ifndef PIXELCONDITIONSDATA_SPECIALPIXELMAP_H diff --git a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelCalibData.cxx b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelCalibData.cxx index 074335f2a7cb..9c81c7716a27 100755 --- a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelCalibData.cxx +++ b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelCalibData.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// diff --git a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelChargeInterpolationParameters.cxx b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelChargeInterpolationParameters.cxx index 48bd764dd347..30e507cf00f6 100644 --- a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelChargeInterpolationParameters.cxx +++ b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelChargeInterpolationParameters.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// diff --git a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelClusterErrorData.cxx b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelClusterErrorData.cxx index 84c3cdb6c04c..91bb2fd77539 100644 --- a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelClusterErrorData.cxx +++ b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelClusterErrorData.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #include "PixelConditionsData/PixelClusterErrorData.h" diff --git a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelClusterOnTrackErrorData.cxx b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelClusterOnTrackErrorData.cxx index 58cf27ec4763..a739bf9f6bda 100644 --- a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelClusterOnTrackErrorData.cxx +++ b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelClusterOnTrackErrorData.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #include "PixelConditionsData/PixelClusterOnTrackErrorData.h" diff --git a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelDCSCondData.cxx b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelDCSCondData.cxx deleted file mode 100644 index 4223a647c5af..000000000000 --- a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelDCSCondData.cxx +++ /dev/null @@ -1,59 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "PixelConditionsData/PixelDCSCondData.h" - -PixelDCSCondData::PixelDCSCondData(): - m_channelValues() -{ -} - -PixelDCSCondData::~PixelDCSCondData() { } - -void PixelDCSCondData::setValue(const CondAttrListCollection::ChanNum& chanNum, const float value) { - m_channelValues[chanNum] = value; -} - -bool PixelDCSCondData::getValue(const CondAttrListCollection::ChanNum& chanNum, float& value) const { - auto itr{m_channelValues.find(chanNum)}; - if (itr!=m_channelValues.end()) { - value = itr->second; - return true; - } - return false; -} - -void PixelDCSCondData::clear() { - m_channelValues.clear(); -} - -void PixelDCSCondData::fill(const CondAttrListCollection::ChanNum& chanNum, const std::string param) { - if (m_bad_channels.find(chanNum)!=m_bad_channels.end()) { - // chan num has an entry already - //get the parameter list for this chan num - std::vector<std::string> par((*m_bad_channels.find(chanNum)).second); - std::vector<std::string>::iterator par_itr(find(par.begin(), par.end(), param)); - if (par_itr==par.end()) { - // if this parameter (hv, chanstat etc) doesn't exist in the list add it to the param vector - par.push_back(param); - //don't insert! not a new map entry, just update the vector - (*m_bad_channels.find(chanNum)).second = par; - } - } - else { - // no entry yet for this chan num, so start fresh - std::vector<std::string> par; - par.push_back(param); - std::pair<std::map<CondAttrListCollection::ChanNum, std::vector<std::string>>::iterator, bool> successfulInsert(m_bad_channels.insert(std::make_pair(chanNum, par))); - if (not successfulInsert.second) { - std::cout << "map insert failed" << std::endl; - } - } -} - -int PixelDCSCondData::output(const CondAttrListCollection::ChanNum& chanNum) const { - DCSConditions::const_iterator pPair(m_bad_channels.find(chanNum)); - return (pPair!=m_bad_channels.end()) ? (pPair->second.size()) : 0; -} - diff --git a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelDCSConditionsData.cxx b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelDCSConditionsData.cxx new file mode 100644 index 000000000000..af7f59903dfd --- /dev/null +++ b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelDCSConditionsData.cxx @@ -0,0 +1,43 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "PixelConditionsData/PixelDCSConditionsData.h" + +PixelDCSConditionsData::PixelDCSConditionsData(): + m_channelValues() +{ +} + +PixelDCSConditionsData::~PixelDCSConditionsData() { } + +void PixelDCSConditionsData::setValue(const CondAttrListCollection::ChanNum& chanNum, const float value) { + m_channelValues[chanNum] = value; +} + +void PixelDCSConditionsData::setValue(const CondAttrListCollection::ChanNum& chanNum, const std::string value) { + m_channelStrings[chanNum] = value; +} + +bool PixelDCSConditionsData::getValue(const CondAttrListCollection::ChanNum& chanNum, float& value) const { + auto itr = m_channelValues.find(chanNum); + if (itr!=m_channelValues.end()) { + value = itr->second; + return true; + } + return false; +} + +bool PixelDCSConditionsData::getValue(const CondAttrListCollection::ChanNum& chanNum, std::string& value) const { + auto itr = m_channelStrings.find(chanNum); + if (itr!=m_channelStrings.end()) { + value = itr->second; + return true; + } + return false; +} + +void PixelDCSConditionsData::clear() { + m_channelValues.clear(); +} + diff --git a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelDCSData.cxx b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelDCSData.cxx index 209b8cc5bf8c..56e2702fcf21 100644 --- a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelDCSData.cxx +++ b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelDCSData.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #include <iostream> diff --git a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelOfflineCalibData.cxx b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelOfflineCalibData.cxx index d8f2e5b89add..fbecafa1aaf4 100644 --- a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelOfflineCalibData.cxx +++ b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelOfflineCalibData.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// diff --git a/InnerDetector/InDetConditions/PixelConditionsData/src/SpecialPixelMap.cxx b/InnerDetector/InDetConditions/PixelConditionsData/src/SpecialPixelMap.cxx index e9c1d88b0590..51aa639ac91e 100755 --- a/InnerDetector/InDetConditions/PixelConditionsData/src/SpecialPixelMap.cxx +++ b/InnerDetector/InDetConditions/PixelConditionsData/src/SpecialPixelMap.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #include "PixelConditionsData/SpecialPixelMap.h" diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/PixelConditionsTools/IPixelDCSCondTool.h b/InnerDetector/InDetConditions/PixelConditionsTools/PixelConditionsTools/IPixelDCSCondTool.h deleted file mode 100644 index cfc2651d3ee4..000000000000 --- a/InnerDetector/InDetConditions/PixelConditionsTools/PixelConditionsTools/IPixelDCSCondTool.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef IPIXELDCSCONDTOOL_H -#define IPIXELDCSCONDTOOL_H - -#include "GaudiKernel/IAlgTool.h" -#include "InDetConditionsSummaryService/InDetHierarchy.h" - -#include "Identifier/Identifier.h" -#include "Identifier/IdentifierHash.h" - -class IPixelDCSCondTool: virtual public IAlgTool { - - public: - - virtual ~IPixelDCSCondTool() = default; - - DeclareInterfaceID(IPixelDCSCondTool, 1, 0); - - virtual bool canReportAbout(InDetConditions::Hierarchy h) const =0; - virtual float getHV(const Identifier& elementId) const =0; - virtual float getHV(const IdentifierHash& hashId) const =0; - virtual float getTemperature(const Identifier& elementId) const =0; - virtual float getTemperature(const IdentifierHash& hashId) const =0; - - virtual bool isGood(const Identifier& elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const =0; - virtual bool isGood(const IdentifierHash& hashId) const =0; - -/* - virtual double getTemperature(const Identifier& module_id) const = 0; - virtual double getHV(const Identifier& module_id) const = 0; - virtual std::string getFSMStatus(const Identifier& module_id) const = 0; - virtual std::string getFSMState(const Identifier& module_id) const = 0; - - virtual double getTemperature(const IdentifierHash& id_hash) const = 0; - virtual double getHV(const IdentifierHash& id_hash) const = 0; - virtual std::string getFSMStatus(const IdentifierHash& id_hash) const = 0; - virtual std::string getFSMState(const IdentifierHash& id_hash) const = 0; - - virtual StatusCode printData() const = 0; -*/ - -}; - -#endif // IPIXELDCSCONDTOOL_H diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/PixelConditionsTools/IPixelDCSConditionsTool.h b/InnerDetector/InDetConditions/PixelConditionsTools/PixelConditionsTools/IPixelDCSConditionsTool.h new file mode 100644 index 000000000000..a7e5f7f0068b --- /dev/null +++ b/InnerDetector/InDetConditions/PixelConditionsTools/PixelConditionsTools/IPixelDCSConditionsTool.h @@ -0,0 +1,32 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef IPIXELDCSCONDITIONSTOOL_H +#define IPIXELDCSCONDITIONSTOOL_H + +#include "GaudiKernel/IAlgTool.h" +#include "InDetConditionsSummaryService/ISiliconConditionsTool.h" + +#include "Identifier/Identifier.h" +#include "Identifier/IdentifierHash.h" + +class IPixelDCSConditionsTool: virtual public ISiliconConditionsTool { + public: + virtual ~IPixelDCSConditionsTool() = default; + + DeclareInterfaceID(IPixelDCSConditionsTool, 1, 0); + + virtual std::string PixelFSMState(const Identifier& elementId) const = 0; + virtual std::string PixelFSMState(const IdentifierHash& elementHash) const = 0; + + virtual std::string PixelFSMStatus(const Identifier& elementId) const = 0; + virtual std::string PixelFSMStatus(const IdentifierHash& elementHash) const = 0; + + +// virtual bool isGood(const Identifier& elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const =0; +// virtual bool isGood(const IdentifierHash& hashId) const =0; + +}; + +#endif // IPIXELDCSCONDITIONSTOOL_H diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/python/PixelDCSCondToolSetup.py b/InnerDetector/InDetConditions/PixelConditionsTools/python/PixelDCSConditionsToolSetup.py similarity index 56% rename from InnerDetector/InDetConditions/PixelConditionsTools/python/PixelDCSCondToolSetup.py rename to InnerDetector/InDetConditions/PixelConditionsTools/python/PixelDCSConditionsToolSetup.py index 18bddbdabb9b..576c451db6f0 100644 --- a/InnerDetector/InDetConditions/PixelConditionsTools/python/PixelDCSCondToolSetup.py +++ b/InnerDetector/InDetConditions/PixelConditionsTools/python/PixelDCSConditionsToolSetup.py @@ -1,16 +1,16 @@ # Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -class PixelDCSCondToolSetup: - "Class to simplify setup of PixelDCSCondTool and required conditions algorithms" +class PixelDCSConditionsToolSetup: + "Class to simplify setup of PixelDCSConditionsTool and required conditions algorithms" def __init__(self): - self.stateFolder = "/PIXEL/DCS/FSMSTATUS" + self.stateFolder = "/PIXEL/DCS/FSMSTATE" + self.statusFolder = "/PIXEL/DCS/FSMSTATUS" self.hvFolder = "/PIXEL/DCS/HV" self.tempFolder = "/PIXEL/DCS/TEMPERATURE" self.dbInstance = "DCS_OFL" - self.readAllDBFolders = True - self.returnHVTemp = True + self.useDB = True self.stateAlgName = "PixelDCSCondStateAlg" self.hvAlgName = "PixelDCSCondHVAlg" @@ -26,6 +26,9 @@ class PixelDCSCondToolSetup: def getStateFolder(self): return self.stateFolder + def getStatusFolder(self): + return self.statusFolder + def getHVFolder(self): return self.hvFolder @@ -35,6 +38,9 @@ class PixelDCSCondToolSetup: def setStateFolder(self, stateFolder): self.stateFolder = stateFolder + def setStatusFolder(self, statusFolder): + self.statusFolder = statusFolder + def setHVFolder(self, hvFolder): self.hvFolder = hvFolder @@ -47,17 +53,11 @@ class PixelDCSCondToolSetup: def setDbInstance(self, dbInstance): self.dbInstance = dbInstance - def getReadAllDBFolders(self): - return self.readAllDBFolders - - def setReadAllDBFolders(self, readAllDBFolders): - self.readAllDBFolders = readAllDBFolders - - def getReturnHVTemp(self): - return self.returnHVTemp + def getUseDB(self): + return self.useDB - def setReturnHVTemp(self, returnHVTemp): - self.returnHVTemp = returnHVTemp + def setUseDB(self, useDB): + self.useDB = useDB def getStateAlgName(self): return self.stateAlgName @@ -89,11 +89,11 @@ class PixelDCSCondToolSetup: def setFolders(self): from IOVDbSvc.CondDB import conddb - if ((self.readAllDBFolders and self.returnHVTemp) or (not self.readAllDBFolders and not self.returnHVTemp)): + if (self.useDB): if not conddb.folderRequested(self.stateFolder): conddb.addFolder(self.dbInstance, self.stateFolder, className="CondAttrListCollection") - - if ((self.readAllDBFolders and self.returnHVTemp) or self.returnHVTemp): + if not conddb.folderRequested(self.statusFolder): + conddb.addFolder(self.dbInstance, self.statusFolder, className="CondAttrListCollection") if not conddb.folderRequested(self.hvFolder): conddb.addFolder(self.dbInstance, self.hvFolder, className="CondAttrListCollection") if not conddb.folderRequested(self.tempFolder): @@ -103,28 +103,27 @@ class PixelDCSCondToolSetup: from AthenaCommon.AlgSequence import AthSequencer condSeq = AthSequencer("AthCondSeq") - if ((self.readAllDBFolders and self.returnHVTemp) or (not self.readAllDBFolders and not self.returnHVTemp)): - if not hasattr(condSeq, self.stateAlgName): - from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDCSCondStateAlg - condSeq += PixelDCSCondStateAlg(name = self.stateAlgName, ReadKeyState = self.stateFolder) - self.stateAlg = getattr(condSeq, self.stateAlgName) - - if ((self.readAllDBFolders and self.returnHVTemp) or self.returnHVTemp): - if not hasattr(condSeq, self.hvAlgName): - from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDCSCondHVAlg - condSeq += PixelDCSCondHVAlg(name = self.hvAlgName, ReadKey = self.hvFolder) - self.hvAlg = getattr(condSeq, self.hvAlgName) - - if not hasattr(condSeq, self.tempAlgName): - from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDCSCondTempAlg - condSeq += PixelDCSCondTempAlg(name = self.tempAlgName, ReadKey = self.tempFolder) - self.tempAlg = getattr(condSeq, self.tempAlgName) + if not hasattr(condSeq, self.stateAlgName): + from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDCSCondStateAlg + condSeq += PixelDCSCondStateAlg(name = self.stateAlgName) + self.stateAlg = getattr(condSeq, self.stateAlgName) + + if not hasattr(condSeq, self.hvAlgName): + from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDCSCondHVAlg + condSeq += PixelDCSCondHVAlg(name = self.hvAlgName, ReadKey = self.hvFolder) + self.hvAlg = getattr(condSeq, self.hvAlgName) + + if not hasattr(condSeq, self.tempAlgName): + from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDCSCondTempAlg + condSeq += PixelDCSCondTempAlg(name = self.tempAlgName, ReadKey = self.tempFolder) + self.tempAlg = getattr(condSeq, self.tempAlgName) def setTool(self): from AthenaCommon.AppMgr import ToolSvc if not hasattr(ToolSvc, self.toolName): - from PixelConditionsTools.PixelConditionsToolsConf import PixelDCSCondTool - ToolSvc += PixelDCSCondTool(name = self.toolName, ReadAllDBFolders = self.readAllDBFolders, ReturnHVTemp = self.returnHVTemp) + from PixelConditionsTools.PixelConditionsToolsConf import PixelDCSConditionsTool + ToolSvc += PixelDCSConditionsTool(name = self.toolName, UseDB = self.useDB) +# ToolSvc += PixelDCSConditionsTool(name = self.toolName, ReadAllDBFolders = self.readAllDBFolders, ReturnHVTemp = self.returnHVTemp) self.tool = getattr(ToolSvc, self.toolName) def setup(self): diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/python/PixelSiliconConditionsToolSetup.py b/InnerDetector/InDetConditions/PixelConditionsTools/python/PixelSiliconConditionsToolSetup.py deleted file mode 100644 index 17c828004a11..000000000000 --- a/InnerDetector/InDetConditions/PixelConditionsTools/python/PixelSiliconConditionsToolSetup.py +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration - -class PixelSiliconConditionsToolSetup: - "Class to simplify setup of PixelSiliconConditionsTool and required conditions algorithms" - - def __init__(self): - self.hvAlgName = "PixelDCSCondHVAlg" - self.tempAlgName = "PixelDCSCondTempAlg" - - self.hvAlg = None - self.tempAlg = None - - self.toolName = "PixelSiliconConditionsTool" - self.tool = None - - self.dcsTool = None - - self.useDB = True - - def getHVAlgName(self): - return self.hvAlgName - - def getTempAlgName(self): - return self.tempAlgName - - def getHVAlg(self): - return self.hvAlg - - def getTempAlg(self): - return self.tempAlg - - def getToolName(self): - return self.toolName - - def setToolName(self, toolName): - self.toolName = toolName - - def getTool(self): - return self.tool - - def setDcsTool(self, dcsTool): - self.dcsTool = dcsTool - - def getUseDB(self): - return self.useDB - - def setAlgs(self): - from AthenaCommon.AlgSequence import AthSequencer - condSeq = AthSequencer("AthCondSeq") - - if not hasattr(condSeq, self.hvAlgName): - from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDCSCondHVAlg - if self.dcsTool is None: - condSeq += PixelDCSCondHVAlg(name = self.hvAlgName) - else: - condSeq += PixelDCSCondHVAlg(name = self.hvAlgName, UseState = self.dcsTool.ReadAllDBFolders, DCSConditionsTool = self.dcsTool) - self.hvAlg = getattr(condSeq, self.hvAlgName) - - if not hasattr(condSeq, self.tempAlgName): - from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDCSCondTempAlg - if self.dcsTool is None: - condSeq += PixelDCSCondTempAlg(name = self.tempAlgName) - else: - condSeq += PixelDCSCondTempAlg(name = self.tempAlgName, UseState = self.dcsTool.ReadAllDBFolders, DCSConditionsTool = self.dcsTool) - self.tempAlg = getattr(condSeq, self.tempAlgName) - - def setTool(self): - from AthenaCommon.AppMgr import ToolSvc - if not hasattr(ToolSvc, self.toolName): - from PixelConditionsTools.PixelConditionsToolsConf import PixelSiliconConditionsTool - ToolSvc += PixelSiliconConditionsTool(name = self.toolName, UseDB = self.useDB) - self.tool = getattr(ToolSvc, self.toolName) - - def setUseDB(self, useDB): - self.useDB = useDB - - def setup(self): - if self.useDB: - self.setAlgs() - self.setTool() - self.tool.UseDB = self.useDB diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelDCSCondTool.cxx b/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelDCSCondTool.cxx deleted file mode 100644 index bb601c0b862a..000000000000 --- a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelDCSCondTool.cxx +++ /dev/null @@ -1,197 +0,0 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef SIMULATIONBASE -#include "PixelDCSCondTool.h" - -#include "GaudiKernel/ThreadLocalContext.h" - -//const Identifier SCT_DCSConditionsTool::s_invalidId; -const float PixelDCSCondTool::s_defaultHV(150.0); -const float PixelDCSCondTool::s_defaultTemperature(-20.0); - -PixelDCSCondTool::PixelDCSCondTool(const std::string& type, const std::string& name, const IInterface* parent): - base_class(type, name, parent), - m_readAllDBFolders(true), - m_returnHVTemp(true), - m_mutex(), - m_cacheState(), - m_cacheHV(), - m_cacheTemp0(), - m_pBadModules(), - m_pModulesHV(), - m_pModulesTemp0(), - m_condKeyState("PixelDCSStatCondData"), - m_condKeyHV("PixelDCSHVCondData"), - m_condKeyTemp0("PixelDCSTemp0CondData"), - m_pHelper{nullptr} -{ - declareProperty("ReadAllDBFolders", m_readAllDBFolders); - declareProperty("ReturnHVTemp", m_returnHVTemp); -} - -StatusCode PixelDCSCondTool::initialize() { - ATH_MSG_INFO("PixelDCSCondTool::initialize()"); - - CHECK(detStore()->retrieve(m_pHelper,"PixelID")); - - // Read Cond Handle Keys - if ((m_readAllDBFolders and m_returnHVTemp) or m_returnHVTemp) { - ATH_CHECK(m_condKeyHV.initialize()); - ATH_CHECK(m_condKeyTemp0.initialize()); - } - if ((m_readAllDBFolders and m_returnHVTemp) or (not m_readAllDBFolders and not m_returnHVTemp)) { - ATH_CHECK(m_condKeyState.initialize()); - } - - return StatusCode::SUCCESS; -} - -StatusCode PixelDCSCondTool::finalize() { - ATH_MSG_INFO("PixelDCSCondTool::finalize()"); - return StatusCode::SUCCESS; -} - -//Can report about the module as a whole or the wafer -bool PixelDCSCondTool::canReportAbout(InDetConditions::Hierarchy h) const { - return (h==InDetConditions::PIXEL_MODULE or h==InDetConditions::PIXEL_CHIP); -} - -//Returns if element Id is good or bad -bool PixelDCSCondTool::isGood(const Identifier& elementId, InDetConditions::Hierarchy /*h*/) const { - Identifier moduleId = m_pHelper->wafer_id(elementId); - if (not moduleId.is_valid()) { return true; } - - if ((m_readAllDBFolders and m_returnHVTemp) or (not m_readAllDBFolders and not m_returnHVTemp)) { - const EventContext& ctx(Gaudi::Hive::currentContext()); - const PixelDCSCondData* condDataState(getCondDataState(ctx)); - if (!condDataState) { - return false; // no cond data - } - else if (condDataState->output((unsigned int)moduleId.get_identifier32().get_compact())==0) { - return true; //No params are listed as bad - } - else { - return false; - } - } - else { - return true; - } -} - -//Does the same for hashIds -bool PixelDCSCondTool::isGood(const IdentifierHash& hashId) const { - Identifier waferId = m_pHelper->wafer_id(hashId); - return isGood(waferId, InDetConditions::PIXEL_MODULE); -} - -// returns HV (s_defaultHV(-30) if there is no information) -float PixelDCSCondTool::getHV(const Identifier& elementId) const { - Identifier moduleId = m_pHelper->wafer_id(elementId); - if (not moduleId.is_valid()) { return s_defaultHV; } - - const EventContext& ctx = Gaudi::Hive::currentContext(); - const PixelDCSCondData* condDataHV = getCondDataHV(ctx); - if (!condDataHV) { return s_defaultHV; } - - float hvval = s_defaultHV; - if (condDataHV->getValue((unsigned int)moduleId.get_identifier32().get_compact(), hvval)) { - return hvval; - } - return s_defaultHV; //didn't find the module, return default -} - -//Does the same for hashIds -float PixelDCSCondTool::getHV(const IdentifierHash& hashId) const { - const EventContext& ctx = Gaudi::Hive::currentContext(); - const PixelDCSCondData* condDataHV = getCondDataHV(ctx); - if (!condDataHV) { return s_defaultHV; } - - float hvval = s_defaultHV; - if (condDataHV->getValue((unsigned int)hashId,hvval)) { - return hvval; - } - return s_defaultHV; -} - -//Returns temp0 (s_defaultTemperature(-40) if there is no information) -float PixelDCSCondTool::getTemperature(const Identifier& elementId) const { - Identifier moduleId = m_pHelper->wafer_id(elementId); - if (not moduleId.is_valid()) { return s_defaultTemperature; } // not canreportabout - - const EventContext& ctx(Gaudi::Hive::currentContext()); - const PixelDCSCondData* condDataTemp0(getCondDataTemp0(ctx)); - if (!condDataTemp0) { return s_defaultTemperature; } // no cond data - - float temperature = s_defaultTemperature; - if (condDataTemp0->getValue((unsigned int)moduleId.get_identifier32().get_compact(), temperature)) { - return temperature; - } - return s_defaultTemperature; //didn't find the module, return default -} - -//Does the same for hashIds -float PixelDCSCondTool::getTemperature(const IdentifierHash& hashId) const { - Identifier waferId = m_pHelper->wafer_id(hashId); - return getTemperature(waferId); -} - -const PixelDCSCondData* PixelDCSCondTool::getCondDataState(const EventContext& ctx) const { - static const EventContext::ContextEvt_t invalidValue(EventContext::INVALID_CONTEXT_EVT); - EventContext::ContextID_t slot(ctx.slot()); - EventContext::ContextEvt_t evt(ctx.evt()); - std::lock_guard<std::mutex> lock(m_mutex); - if (slot>=m_cacheState.size()) { - m_cacheState.resize(slot+1, invalidValue); // Store invalid values in order to go to the next IF statement. - } - if (m_cacheState[slot]!=evt) { - SG::ReadCondHandle<PixelDCSCondData> condData(m_condKeyState); - if (not condData.isValid()) { - ATH_MSG_ERROR("Failed to get " << m_condKeyState.key()); - } - m_pBadModules.set(*condData); - m_cacheState[slot] = evt; - } - return m_pBadModules.get(); -} - -const PixelDCSCondData* PixelDCSCondTool::getCondDataHV(const EventContext& ctx) const { - static const EventContext::ContextEvt_t invalidValue(EventContext::INVALID_CONTEXT_EVT); - EventContext::ContextID_t slot(ctx.slot()); - EventContext::ContextEvt_t evt(ctx.evt()); - std::lock_guard<std::mutex> lock(m_mutex); - if (slot>=m_cacheHV.size()) { - m_cacheHV.resize(slot+1, invalidValue); // Store invalid values in order to go to the next IF statement. - } - if (m_cacheHV[slot]!=evt) { - SG::ReadCondHandle<PixelDCSCondData> condData(m_condKeyHV); - if (not condData.isValid()) { - ATH_MSG_ERROR("Failed to get " << m_condKeyHV.key()); - } - m_pModulesHV.set(*condData); - m_cacheHV[slot] = evt; - } - return m_pModulesHV.get(); -} - -const PixelDCSCondData* PixelDCSCondTool::getCondDataTemp0(const EventContext& ctx) const { - static const EventContext::ContextEvt_t invalidValue(EventContext::INVALID_CONTEXT_EVT); - EventContext::ContextID_t slot(ctx.slot()); - EventContext::ContextEvt_t evt(ctx.evt()); - std::lock_guard<std::mutex> lock(m_mutex); - if (slot>=m_cacheTemp0.size()) { - m_cacheTemp0.resize(slot+1, invalidValue); // Store invalid values in order to go to the next IF statement. - } - if (m_cacheTemp0[slot]!=evt) { - SG::ReadCondHandle<PixelDCSCondData> condData{m_condKeyTemp0}; - if (not condData.isValid()) { - ATH_MSG_ERROR("Failed to get " << m_condKeyTemp0.key()); - } - m_pModulesTemp0.set(*condData); - m_cacheTemp0[slot] = evt; - } - return m_pModulesTemp0.get(); -} -#endif // not SIMULATIONBASE diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelDCSCondTool.h b/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelDCSCondTool.h deleted file mode 100644 index c5f6191c2df9..000000000000 --- a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelDCSCondTool.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef PIXELDCSCONDTOOL_H -#define PIXELDCSCONDTOOL_H - -#include "AthenaBaseComps/AthAlgTool.h" -#include "GaudiKernel/Property.h" -#include "GaudiKernel/EventContext.h" -#include "GaudiKernel/ContextSpecificPtr.h" -#include "InDetConditionsSummaryService/InDetHierarchy.h" -#include "PixelConditionsTools/IPixelDCSCondTool.h" -#include "Identifier/Identifier.h" -#include "Identifier/IdentifierHash.h" -#include "InDetIdentifier/PixelID.h" -#include "PixelConditionsData/PixelDCSCondData.h" -#include <list> -#include <string> -#include <map> -#include <mutex> - -class PixelDCSCondTool: public extends<AthAlgTool, IPixelDCSCondTool> { - - public: - PixelDCSCondTool(const std::string& type, const std::string& name, const IInterface* parent); - virtual ~PixelDCSCondTool() = default; - virtual StatusCode initialize() override; - virtual StatusCode finalize() override; - - virtual bool canReportAbout(InDetConditions::Hierarchy h) const override; - virtual bool isGood(const Identifier& elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override; - virtual bool isGood(const IdentifierHash& hashId) const override; - - virtual float getHV(const Identifier& elementId) const override; - virtual float getHV(const IdentifierHash& hashId) const override; - virtual float getTemperature(const Identifier& elementId) const override; - virtual float getTemperature(const IdentifierHash& hashId) const override; - - private: - BooleanProperty m_readAllDBFolders; - BooleanProperty m_returnHVTemp; - mutable std::mutex m_mutex; - mutable std::vector<EventContext::ContextEvt_t> m_cacheState; - mutable std::vector<EventContext::ContextEvt_t> m_cacheHV; - mutable std::vector<EventContext::ContextEvt_t> m_cacheTemp0; - mutable Gaudi::Hive::ContextSpecificPtr<const PixelDCSCondData> m_pBadModules; - mutable Gaudi::Hive::ContextSpecificPtr<const PixelDCSCondData> m_pModulesHV; - mutable Gaudi::Hive::ContextSpecificPtr<const PixelDCSCondData> m_pModulesTemp0; - SG::ReadCondHandleKey<PixelDCSCondData> m_condKeyState; - SG::ReadCondHandleKey<PixelDCSCondData> m_condKeyHV; - SG::ReadCondHandleKey<PixelDCSCondData> m_condKeyTemp0; - const PixelID* m_pHelper; - static const float s_defaultHV; - static const float s_defaultTemperature; - const PixelDCSCondData* getCondDataState(const EventContext& ctx) const; - const PixelDCSCondData* getCondDataHV(const EventContext& ctx) const; - const PixelDCSCondData* getCondDataTemp0(const EventContext& ctx) const; -}; - -#endif // PIXELDCSCONDTOOL_H diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelDCSConditionsTool.cxx b/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelDCSConditionsTool.cxx new file mode 100644 index 000000000000..6d4afae060f1 --- /dev/null +++ b/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelDCSConditionsTool.cxx @@ -0,0 +1,153 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef SIMULATIONBASE +#include "PixelDCSConditionsTool.h" + +PixelDCSConditionsTool::PixelDCSConditionsTool(const std::string& type, const std::string& name, const IInterface* parent): + base_class(type, name, parent), + m_pixid(nullptr), + m_useDB(true), + m_defaultTemperature(-5.0), + m_defaultBiasVoltage(150.0), + m_defaultDepletionVoltage(40.0) +{ + declareProperty("UseDB", m_useDB); + declareProperty("Temperature", m_defaultTemperature, "Default temperature in Celcius."); + declareProperty("BiasVoltage", m_defaultBiasVoltage, "Default bias voltage in Volt." ); + declareProperty("DepletionVoltage", m_defaultDepletionVoltage, "Default depletion voltage in Volt."); +} + +StatusCode PixelDCSConditionsTool::initialize() { + ATH_MSG_INFO("PixelDCSConditionsTool::initialize()"); + + if (m_useDB) { + ATH_CHECK(m_condKeyHV.initialize()); + ATH_CHECK(m_condKeyTemp.initialize()); + ATH_CHECK(m_condKeyState.initialize()); + ATH_CHECK(m_condKeyStatus.initialize()); + ATH_CHECK(detStore()->retrieve(m_pixid,"PixelID")); + } + + return StatusCode::SUCCESS; +} + +StatusCode PixelDCSConditionsTool::finalize() { + ATH_MSG_INFO("PixelDCSConditionsTool::finalize()"); + return StatusCode::SUCCESS; +} + +float PixelDCSConditionsTool::temperature(const Identifier& elementId) const { + const IdentifierHash elementHash = m_pixid->wafer_hash(elementId); + return temperature(elementHash); +} + +float PixelDCSConditionsTool::biasVoltage(const Identifier& elementId) const { + const IdentifierHash elementHash = m_pixid->wafer_hash(elementId); + return biasVoltage(elementHash); +} + +float PixelDCSConditionsTool::depletionVoltage(const Identifier& /*elementId*/) const { + return m_defaultDepletionVoltage; +} + +std::string PixelDCSConditionsTool::PixelFSMState(const Identifier& elementId) const { + const IdentifierHash elementHash = m_pixid->wafer_hash(elementId); + return PixelFSMState(elementHash); +} + +std::string PixelDCSConditionsTool::PixelFSMStatus(const Identifier& elementId) const { + const IdentifierHash elementHash = m_pixid->wafer_hash(elementId); + return PixelFSMStatus(elementHash); +} + +float PixelDCSConditionsTool::temperature(const IdentifierHash& elementHash) const { + if (m_useDB) { + const PixelDCSConditionsData* data(getCondDataTemp()); + if (data==nullptr) { return m_defaultTemperature; } + float temperature = m_defaultTemperature; + if (not data->getValue(elementHash, temperature)) { return m_defaultTemperature; } + if (temperature>100.0 or temperature<-80.0) { temperature = m_defaultTemperature; } + return temperature; + } + return m_defaultTemperature; +} + +float PixelDCSConditionsTool::biasVoltage(const IdentifierHash& elementHash) const { + if (m_useDB) { + const PixelDCSConditionsData* data(getCondDataHV()); + if (data==nullptr) { return m_defaultBiasVoltage; } + float hv = m_defaultBiasVoltage; + if (not data->getValue(elementHash, hv)) { return m_defaultBiasVoltage; } + if (hv>1000.0 or hv<-1000.0) { hv = m_defaultBiasVoltage; } + return hv; + } + return m_defaultBiasVoltage; +} + +float PixelDCSConditionsTool::depletionVoltage(const IdentifierHash& /*elementHash*/) const { + return m_defaultDepletionVoltage; +} + +std::string PixelDCSConditionsTool::PixelFSMState(const IdentifierHash& elementHash) const { + std::string defaultState = "READY"; + if (m_useDB) { + const PixelDCSConditionsData* data(getCondDataState()); + if (data==nullptr) { return defaultState; } + std::string fsmstate = defaultState; + if (not data->getValue(elementHash, fsmstate)) { return defaultState; } + return fsmstate; + } + return defaultState; +} + +std::string PixelDCSConditionsTool::PixelFSMStatus(const IdentifierHash& elementHash) const { + std::string defaultStatus = "OK"; + if (m_useDB) { + const PixelDCSConditionsData* data(getCondDataStatus()); + if (data==nullptr) { return defaultStatus; } + std::string fsmstatus = defaultStatus; + if (not data->getValue(elementHash, fsmstatus)) { return defaultStatus; } + return fsmstatus; + } + return defaultStatus; +} + +const PixelDCSConditionsData* PixelDCSConditionsTool::getCondDataHV() const { + SG::ReadCondHandle<PixelDCSConditionsData> condData(m_condKeyHV); + if (not condData.isValid()) { + ATH_MSG_ERROR("Failed to get " << m_condKeyHV.key()); + return nullptr; + } + return *condData; +} + +const PixelDCSConditionsData* PixelDCSConditionsTool::getCondDataTemp() const { + SG::ReadCondHandle<PixelDCSConditionsData> condData(m_condKeyTemp); + if (not condData.isValid()) { + ATH_MSG_ERROR("Failed to get " << m_condKeyTemp.key()); + return nullptr; + } + return *condData; +} + +const PixelDCSConditionsData* PixelDCSConditionsTool::getCondDataState() const { + SG::ReadCondHandle<PixelDCSConditionsData> condData(m_condKeyState); + if (not condData.isValid()) { + ATH_MSG_ERROR("Failed to get " << m_condKeyState.key()); + return nullptr; + } + return *condData; +} + +const PixelDCSConditionsData* PixelDCSConditionsTool::getCondDataStatus() const { + SG::ReadCondHandle<PixelDCSConditionsData> condData(m_condKeyStatus); + if (not condData.isValid()) { + ATH_MSG_ERROR("Failed to get " << m_condKeyStatus.key()); + return nullptr; + } + return *condData; +} + +#endif // not SIMULATIONBASE diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelDCSConditionsTool.h b/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelDCSConditionsTool.h new file mode 100644 index 000000000000..b87216943cfe --- /dev/null +++ b/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelDCSConditionsTool.h @@ -0,0 +1,63 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef PIXELSILICONCONDITIONStOOL_H +#define PIXELSILICONCONDITIONStOOL_H + +#include "AthenaBaseComps/AthAlgTool.h" +#include "GaudiKernel/ServiceHandle.h" + +#include "PixelConditionsTools/IPixelDCSConditionsTool.h" +#include "PixelConditionsData/PixelDCSConditionsData.h" +#include "StoreGate/ReadCondHandleKey.h" + +#include "InDetIdentifier/PixelID.h" +#include "InDetReadoutGeometry/PixelDetectorManager.h" + +class PixelDCSConditionsTool: public extends<AthAlgTool, IPixelDCSConditionsTool> { + public: + + PixelDCSConditionsTool(const std::string& type, const std::string& name, const IInterface* parent); + virtual ~PixelDCSConditionsTool() = default; + + virtual StatusCode initialize() override; + virtual StatusCode finalize() override; + + virtual float temperature(const Identifier& elementId) const override; + virtual float biasVoltage(const Identifier& elementId) const override; + virtual float depletionVoltage(const Identifier& elementId) const override; + + virtual float temperature(const IdentifierHash& elementHash) const override; + virtual float biasVoltage(const IdentifierHash& elementHash) const override; + virtual float depletionVoltage(const IdentifierHash& elementHash) const override; + + virtual std::string PixelFSMState(const Identifier& elementId) const override; + virtual std::string PixelFSMState(const IdentifierHash& elementHash) const override; + + virtual std::string PixelFSMStatus(const Identifier& elementId) const override; + virtual std::string PixelFSMStatus(const IdentifierHash& elementHash) const override; + + private: + const InDetDD::PixelDetectorManager* m_pixman; + const PixelID* m_pixid; + + bool m_useDB; + float m_defaultTemperature; + float m_defaultBiasVoltage; + float m_defaultDepletionVoltage; + + SG::ReadCondHandleKey<PixelDCSConditionsData> m_condKeyHV{this, "CondKeyHV", "PixelDCSHVCondData", "Pixel bias voltage"}; + SG::ReadCondHandleKey<PixelDCSConditionsData> m_condKeyTemp{this, "CondKeyTemp", "PixelDCSTempCondData", "Pixel temperature"}; + + SG::ReadCondHandleKey<PixelDCSConditionsData> m_condKeyState{this, "CondKeyState", "PixelDCSStateCondData", "Pixel FSM state"}; + SG::ReadCondHandleKey<PixelDCSConditionsData> m_condKeyStatus{this, "CondKeyStatus", "PixelDCSStatusCondData", "Pixel FSM status"}; + + const PixelDCSConditionsData* getCondDataHV() const; + const PixelDCSConditionsData* getCondDataTemp() const; + + const PixelDCSConditionsData* getCondDataState() const; + const PixelDCSConditionsData* getCondDataStatus() const; +}; + +#endif // PIXELSILICONCONDITIONStOOL_H diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelSiliconConditionsTool.cxx b/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelSiliconConditionsTool.cxx deleted file mode 100644 index c2b507d74e59..000000000000 --- a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelSiliconConditionsTool.cxx +++ /dev/null @@ -1,98 +0,0 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef SIMULATIONBASE -#include "PixelSiliconConditionsTool.h" - -PixelSiliconConditionsTool::PixelSiliconConditionsTool(const std::string& type, const std::string& name, const IInterface* parent): - base_class(type, name, parent), - m_pixid(0), - m_useDB(true), - m_defaultTemperature(-5.0), - m_defaultBiasVoltage(150.0), - m_defaultDepletionVoltage(80.0), - m_condKeyHV("PixelDCSHVCondData"), - m_condKeyTemp("PixelDCSTemp0CondData") -{ - declareProperty("UseDB", m_useDB); - declareProperty("Temperature", m_defaultTemperature, "Default temperature in Celcius."); - declareProperty("BiasVoltage", m_defaultBiasVoltage, "Default bias voltage in Volt." ); - declareProperty("DepletionVoltage", m_defaultDepletionVoltage, "Default depletion voltage in Volt."); -} - -StatusCode PixelSiliconConditionsTool::initialize() { - ATH_MSG_INFO("PixelSiliconConditionsTool::initialize()"); - - if (m_useDB) { - ATH_CHECK(m_condKeyHV.initialize()); - ATH_CHECK(m_condKeyTemp.initialize()); - ATH_CHECK(detStore()->retrieve(m_pixid,"PixelID")); - } - - return StatusCode::SUCCESS; -} - -StatusCode PixelSiliconConditionsTool::finalize() { - ATH_MSG_INFO("PixelSiliconConditionsTool::finalize()"); - return StatusCode::SUCCESS; -} - -float PixelSiliconConditionsTool::temperature(const Identifier& elementId) const { - const IdentifierHash elementHash = m_pixid->wafer_hash(elementId); - return temperature(elementHash); -} - -float PixelSiliconConditionsTool::biasVoltage(const Identifier& elementId) const { - const IdentifierHash elementHash = m_pixid->wafer_hash(elementId); - return biasVoltage(elementHash); -} - -float PixelSiliconConditionsTool::depletionVoltage(const Identifier& /*elementId*/) const { - return m_defaultDepletionVoltage; -} - -float PixelSiliconConditionsTool::temperature(const IdentifierHash& elementHash) const { - if (m_useDB) { - const PixelDCSCondData* data(getCondDataTemp()); - if (data==nullptr) { return m_defaultTemperature; } - float temperature = m_defaultTemperature; - if (not data->getValue(elementHash, temperature)) { return m_defaultTemperature; } - return temperature; - } - return m_defaultTemperature; -} - -float PixelSiliconConditionsTool::biasVoltage(const IdentifierHash& elementHash) const { - if (m_useDB) { - const PixelDCSCondData* data(getCondDataHV()); - if (data==nullptr) { return m_defaultBiasVoltage; } - float hv = m_defaultBiasVoltage; - if (not data->getValue(elementHash, hv)) { return m_defaultBiasVoltage; } - return hv; - } - return m_defaultBiasVoltage; -} - -float PixelSiliconConditionsTool::depletionVoltage(const IdentifierHash& /*elementHash*/) const { - return m_defaultDepletionVoltage; -} - -const PixelDCSCondData* PixelSiliconConditionsTool::getCondDataHV() const { - SG::ReadCondHandle<PixelDCSCondData> condData(m_condKeyHV); - if (not condData.isValid()) { - ATH_MSG_ERROR("Failed to get " << m_condKeyHV.key()); - return nullptr; - } - return *condData; -} - -const PixelDCSCondData* PixelSiliconConditionsTool::getCondDataTemp() const { - SG::ReadCondHandle<PixelDCSCondData> condData(m_condKeyTemp); - if (not condData.isValid()) { - ATH_MSG_ERROR("Failed to get " << m_condKeyTemp.key()); - return nullptr; - } - return *condData; -} -#endif // not SIMULATIONBASE diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelSiliconConditionsTool.h b/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelSiliconConditionsTool.h deleted file mode 100644 index a0122aff1f46..000000000000 --- a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelSiliconConditionsTool.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef PIXELSILICONCONDITIONStOOL_H -#define PIXELSILICONCONDITIONStOOL_H - -#include "AthenaBaseComps/AthAlgTool.h" -#include "GaudiKernel/ServiceHandle.h" -#include "InDetConditionsSummaryService/ISiliconConditionsTool.h" - -#include "PixelConditionsData/PixelDCSCondData.h" -#include "StoreGate/ReadCondHandleKey.h" - -#include "InDetIdentifier/PixelID.h" -#include "InDetReadoutGeometry/PixelDetectorManager.h" - -class PixelSiliconConditionsTool: public extends<AthAlgTool, ISiliconConditionsTool> { - public: - - PixelSiliconConditionsTool(const std::string& type, const std::string& name, const IInterface* parent); - virtual ~PixelSiliconConditionsTool() = default; - - virtual StatusCode initialize() override; - virtual StatusCode finalize() override; - - virtual float temperature(const Identifier& elementId) const override; - virtual float biasVoltage(const Identifier& elementId) const override; - virtual float depletionVoltage(const Identifier& elementId) const override; - - virtual float temperature(const IdentifierHash& elementHash) const override; - virtual float biasVoltage(const IdentifierHash& elementHash) const override; - virtual float depletionVoltage(const IdentifierHash& elementHash) const override; - - private: - const InDetDD::PixelDetectorManager* m_pixman; - const PixelID* m_pixid; - - bool m_useDB; - float m_defaultTemperature; - float m_defaultBiasVoltage; - float m_defaultDepletionVoltage; - - SG::ReadCondHandleKey<PixelDCSCondData> m_condKeyHV; - SG::ReadCondHandleKey<PixelDCSCondData> m_condKeyTemp; - - const PixelDCSCondData* getCondDataHV() const; - const PixelDCSCondData* getCondDataTemp() const; -}; - -#endif // PIXELSILICONCONDITIONStOOL_H diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/src/components/PixelConditionsTools_entries.cxx b/InnerDetector/InDetConditions/PixelConditionsTools/src/components/PixelConditionsTools_entries.cxx index c744d1243bd2..9b687ed46d3c 100644 --- a/InnerDetector/InDetConditions/PixelConditionsTools/src/components/PixelConditionsTools_entries.cxx +++ b/InnerDetector/InDetConditions/PixelConditionsTools/src/components/PixelConditionsTools_entries.cxx @@ -3,8 +3,7 @@ #include "src/PixelDistortionsTool.h" #ifndef SIMULATIONBASE #include "src/PixelConditionsSummaryTool.h" -#include "src/PixelDCSCondTool.h" -#include "src/PixelSiliconConditionsTool.h" +#include "src/PixelDCSConditionsTool.h" #endif DECLARE_COMPONENT( PixelRecoDbTool ) @@ -12,6 +11,5 @@ DECLARE_COMPONENT( PixelCalibDbTool ) DECLARE_COMPONENT( PixelDistortionsTool ) #ifndef SIMULATIONBASE DECLARE_COMPONENT( PixelConditionsSummaryTool ) -DECLARE_COMPONENT( PixelDCSCondTool ) -DECLARE_COMPONENT( PixelSiliconConditionsTool ) +DECLARE_COMPONENT( PixelDCSConditionsTool ) #endif diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/LorentzAngleSvcSetup.py b/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/LorentzAngleSvcSetup.py index 091f64abe60c..fcaec7cf942e 100644 --- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/LorentzAngleSvcSetup.py +++ b/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/LorentzAngleSvcSetup.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # Usage: # @@ -85,10 +85,6 @@ class LorentzAngleSvcSetup: if ( DetFlags.detdescr.SCT_on() ): self.sctForceUseDB() -# def pixelForceUseDB(self) : -# "Force usage of conditions DB for Pixel" -# self.PixelSiliconConditionsSvc.CheckGeoModel = False - def sctForceUseDB(self) : "Force usage of conditions DB for SCT" self.SCT_SiliconConditionsTool.CheckGeoModel = False @@ -98,17 +94,9 @@ class LorentzAngleSvcSetup: def forceUseGeoModel(self) : "Force usage of GeoModel defaults" from AthenaCommon.DetFlags import DetFlags -# if ( DetFlags.detdescr.pixel_on() ): -# self.pixelForceUseGeoModel() - if ( DetFlags.detdescr.SCT_on() ): self.sctForceUseGeoModel() - -# def pixelForceUseGeoModel(self) : -# "Force usage of GeoModel defaults for Pixel" -# self.PixelSiliconConditionsSvc.ForceUseGeoModel = True - def sctForceUseGeoModel(self) : "Force usage of GeoModel defaults for SCT" self.SCT_SiliconConditionsTool.ForceUseGeoModel = True diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleSvc.cxx b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleSvc.cxx index 9b55ad8290c4..1b3721b2fbc9 100644 --- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleSvc.cxx +++ b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleSvc.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #include "SiLorentzAngleSvc/SiLorentzAngleSvc.h" diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/CMakeLists.txt b/InnerDetector/InDetConditions/SiPropertiesSvc/CMakeLists.txt index 99d62adbd11b..6bdc7d470254 100644 --- a/InnerDetector/InDetConditions/SiPropertiesSvc/CMakeLists.txt +++ b/InnerDetector/InDetConditions/SiPropertiesSvc/CMakeLists.txt @@ -16,6 +16,8 @@ atlas_depends_on_subdirs( PUBLIC DetectorDescription/Identifier InnerDetector/InDetConditions/InDetConditionsSummaryService InnerDetector/InDetDetDescr/InDetIdentifier + InnerDetector/InDetConditions/PixelConditionsData + InnerDetector/InDetConditions/PixelConditionsTools InnerDetector/InDetConditions/SCT_ConditionsData ) # External dependencies: @@ -27,13 +29,13 @@ atlas_add_library( SiPropertiesSvcLib PUBLIC_HEADERS SiPropertiesSvc PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES AthenaBaseComps AthenaKernel GaudiKernel InDetReadoutGeometry SCT_ConditionsData StoreGateLib SGtests + LINK_LIBRARIES AthenaBaseComps AthenaKernel GaudiKernel InDetReadoutGeometry PixelConditionsData SCT_ConditionsData StoreGateLib SGtests PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} Identifier InDetIdentifier ) atlas_add_component( SiPropertiesSvc src/components/*.cxx INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel GaudiKernel InDetReadoutGeometry SCT_ConditionsData StoreGateLib SGtests Identifier InDetIdentifier SiPropertiesSvcLib ) + LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel GaudiKernel InDetReadoutGeometry PixelConditionsData SCT_ConditionsData StoreGateLib SGtests Identifier InDetIdentifier SiPropertiesSvcLib ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/python/PixelSiPropertiesToolSetup.py b/InnerDetector/InDetConditions/SiPropertiesSvc/python/PixelSiPropertiesToolSetup.py new file mode 100644 index 000000000000..7d1f116f0e9f --- /dev/null +++ b/InnerDetector/InDetConditions/SiPropertiesSvc/python/PixelSiPropertiesToolSetup.py @@ -0,0 +1,61 @@ +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + +class PixelSiPropertiesToolSetup: + "Class to simplify setup of PixelSiPropertiesTool and required conditions algorithm" + + def __init__(self): + self.algName = "PixelSiPropertiesCondAlg" + self.alg = None + self.toolName = "PixelSiPropertiesTool" + self.tool = None + self.siliconTool = None + + def getAlgName(self): + return self.algName + + def setAlgName(self, algName): + self.algName = algName + + def getAlg(self): + return self.alg + + def getToolName(self): + return self.toolName + + def setToolName(self, toolName): + self.toolName = toolName + + def getTool(self): + return self.tool + + def setSiliconTool(self, siliconTool): + self.siliconTool = siliconTool + + def setAlg(self): + from AthenaCommon.AlgSequence import AthSequencer + condSeq = AthSequencer("AthCondSeq") + + if not hasattr(condSeq, self.algName): + from SiPropertiesSvc.SiPropertiesSvcConf import PixelSiPropertiesCondAlg + condSeq += PixelSiPropertiesCondAlg(name = self.algName) + +# if self.siliconTool is None: +# condSeq += PixelSiPropertiesCondAlg(name = self.algName) +# else: +# condSeq += PixelSiPropertiesCondAlg(name = self.algName, +# SiConditionsTool = self.siliconTool) + + self.alg = getattr(condSeq, self.algName) + + def setTool(self): + from AthenaCommon.AppMgr import ToolSvc + if not hasattr(ToolSvc, self.toolName): + from SiPropertiesSvc.SiPropertiesSvcConf import SiPropertiesTool + ToolSvc += SiPropertiesTool(name = self.toolName, + DetectorName = "Pixel", + ReadKey = "PixelSiliconPropertiesVector") + self.tool = getattr(ToolSvc, self.toolName) + + def setup(self): + self.setAlg() + self.setTool() diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/src/PixelSiPropertiesCondAlg.cxx b/InnerDetector/InDetConditions/SiPropertiesSvc/src/PixelSiPropertiesCondAlg.cxx new file mode 100644 index 000000000000..3420d27caffc --- /dev/null +++ b/InnerDetector/InDetConditions/SiPropertiesSvc/src/PixelSiPropertiesCondAlg.cxx @@ -0,0 +1,122 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "PixelSiPropertiesCondAlg.h" + +#include <cmath> +#include <memory> + +#include "GaudiKernel/EventIDRange.h" +#include "InDetReadoutGeometry/SiDetectorElement.h" + +PixelSiPropertiesCondAlg::PixelSiPropertiesCondAlg(const std::string& name, ISvcLocator* pSvcLocator): + ::AthAlgorithm(name, pSvcLocator), + m_pixid(nullptr), + m_detManager(nullptr), + m_condSvc("CondSvc", name) +{ +} + +StatusCode PixelSiPropertiesCondAlg::initialize() { + ATH_MSG_INFO("PixelSiPropertiesCondAlg::initialize()"); + + ATH_CHECK(detStore()->retrieve(m_detManager,"Pixel")); + ATH_CHECK(detStore()->retrieve(m_pixid,"PixelID")); + ATH_CHECK(m_condSvc.retrieve()); + + ATH_CHECK(m_readKeyTemp.initialize()); + ATH_CHECK(m_readKeyHV.initialize()); + ATH_CHECK(m_writeKey.initialize()); + if (m_condSvc->regHandle(this, m_writeKey).isFailure()) { + ATH_MSG_FATAL("unable to register WriteCondHandle " << m_writeKey.fullKey() << " with CondSvc"); + return StatusCode::FAILURE; + } + + ATH_CHECK(m_DCSConditionsTool.retrieve()); + + return StatusCode::SUCCESS; +} + +StatusCode PixelSiPropertiesCondAlg::execute() { + ATH_MSG_INFO("PixelSiPropertiesCondAlg::execute()"); + + SG::WriteCondHandle<InDet::SiliconPropertiesVector> writeHandle(m_writeKey); + if (writeHandle.isValid()) { + ATH_MSG_DEBUG("CondHandle " << writeHandle.fullKey() << " is already valid." << " In theory this should not be called, but may happen" << " if multiple concurrent events are being processed out of order."); + return StatusCode::SUCCESS; + } + + // Read Cond Handle (temperature) + SG::ReadCondHandle<PixelDCSConditionsData> readHandleTemp(m_readKeyTemp); + const PixelDCSConditionsData* readCdoTemp(*readHandleTemp); + if (readCdoTemp==nullptr) { + ATH_MSG_FATAL("Null pointer to the read conditions object"); + return StatusCode::FAILURE; + } + EventIDRange rangeTemp; + if (not readHandleTemp.range(rangeTemp)) { + ATH_MSG_FATAL("Failed to retrieve validity range for " << readHandleTemp.key()); + return StatusCode::FAILURE; + } + ATH_MSG_INFO("Input is " << readHandleTemp.fullKey() << " with the range of " << rangeTemp); + + // Read Cond Handle (HV) + SG::ReadCondHandle<PixelDCSConditionsData> readHandleHV(m_readKeyHV); + const PixelDCSConditionsData* readCdoHV(*readHandleHV); + if (readCdoHV==nullptr) { + ATH_MSG_FATAL("Null pointer to the read conditions object"); + return StatusCode::FAILURE; + } + EventIDRange rangeHV; + if (not readHandleHV.range(rangeHV)) { + ATH_MSG_FATAL("Failed to retrieve validity range for " << readHandleHV.key()); + return StatusCode::FAILURE; + } + ATH_MSG_INFO("Input is " << readHandleHV.fullKey() << " with the range of " << rangeHV); + + // Combined the validity ranges of temp and HV + EventIDRange rangeW = EventIDRange::intersect(rangeTemp, rangeHV); + if (rangeW.start()>rangeW.stop()) { + ATH_MSG_FATAL("Invalid intersection range: " << rangeW); + return StatusCode::FAILURE; + } + + // Construct the output Cond Object and fill it in + std::unique_ptr<InDet::SiliconPropertiesVector> writeCdo(std::make_unique<InDet::SiliconPropertiesVector>()); + const PixelID::size_type wafer_hash_max = m_pixid->wafer_hash_max(); + writeCdo->resize(wafer_hash_max); + for (PixelID::size_type hash=0; hash<wafer_hash_max; hash++) { + const IdentifierHash elementHash = static_cast<IdentifierHash::value_type>(hash); + + double temperature = m_DCSConditionsTool->temperature(elementHash)+273.15; + double deplVoltage = m_DCSConditionsTool->depletionVoltage(elementHash)*CLHEP::volt; + double biasVoltage = m_DCSConditionsTool->biasVoltage(elementHash)*CLHEP::volt; + + const InDetDD::SiDetectorElement* element = m_detManager->getDetectorElement(elementHash); + double depletionDepth = element->thickness(); + if (std::abs(biasVoltage) < std::abs(deplVoltage)) { + depletionDepth *= sqrt(std::abs(biasVoltage/deplVoltage)); + } + + double meanElectricField = 0; + if (depletionDepth) { meanElectricField = biasVoltage/depletionDepth; } + + writeCdo->setConditions(hash, temperature, meanElectricField); + } + + // Record the output cond object + if (writeHandle.record(rangeW, std::move(writeCdo)).isFailure()) { + ATH_MSG_FATAL("Could not record PixelSiliconPropertiesVector " << writeHandle.key() << " with EventRange " << rangeW << " into Conditions Store"); + return StatusCode::FAILURE; + } + ATH_MSG_INFO("recorded new CDO " << writeHandle.key() << " with range " << rangeW << " into Conditions Store"); + + return StatusCode::SUCCESS; +} + +StatusCode PixelSiPropertiesCondAlg::finalize() { + ATH_MSG_INFO("PixelSiPropertiesCondAlg::finalize()"); + return StatusCode::SUCCESS; +} + diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/src/PixelSiPropertiesCondAlg.h b/InnerDetector/InDetConditions/SiPropertiesSvc/src/PixelSiPropertiesCondAlg.h new file mode 100644 index 000000000000..6efbbcf2c1db --- /dev/null +++ b/InnerDetector/InDetConditions/SiPropertiesSvc/src/PixelSiPropertiesCondAlg.h @@ -0,0 +1,40 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef PIXELSIPROPERTIESCONDALG +#define PIXELSIPROPERTIESCONDALG + +#include "AthenaBaseComps/AthAlgorithm.h" + +#include "StoreGate/ReadCondHandleKey.h" +#include "StoreGate/WriteCondHandleKey.h" +#include "PixelConditionsData/PixelDCSConditionsData.h" +#include "PixelConditionsTools/IPixelDCSConditionsTool.h" +#include "GaudiKernel/ICondSvc.h" + +#include "SiPropertiesSvc/SiliconPropertiesVector.h" +#include "InDetIdentifier/PixelID.h" +#include "InDetReadoutGeometry/PixelDetectorManager.h" + +class PixelSiPropertiesCondAlg : public AthAlgorithm { + public: + PixelSiPropertiesCondAlg(const std::string& name, ISvcLocator* pSvcLocator); + virtual ~PixelSiPropertiesCondAlg() = default; + virtual StatusCode initialize() override; + virtual StatusCode execute() override; + virtual StatusCode finalize() override; + + private: + const PixelID* m_pixid; + const InDetDD::SiDetectorManager * m_detManager; + + ServiceHandle<ICondSvc> m_condSvc; + SG::ReadCondHandleKey<PixelDCSConditionsData> m_readKeyTemp {this, "ReadKeyeTemp", "PixelDCSTempCondData", "Key of input sensor temperature conditions folder"}; + SG::ReadCondHandleKey<PixelDCSConditionsData> m_readKeyHV {this, "ReadKeyHV", "PixelDCSHVCondData", "Key of input bias voltage conditions folder"}; + SG::WriteCondHandleKey<InDet::SiliconPropertiesVector> m_writeKey{this, "WriteKey", "PixelSiliconPropertiesVector", "Key of output silicon properties conditions folder"}; + + ToolHandle<IPixelDCSConditionsTool> m_DCSConditionsTool{this, "PixelDCSConditionsTool", "PixelDCSConditionsTool", "Tool to retrieve Pixel information"}; +}; + +#endif // PIXELSIPROPERTIESCONDALG diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/src/components/SiPropertiesSvc_entries.cxx b/InnerDetector/InDetConditions/SiPropertiesSvc/src/components/SiPropertiesSvc_entries.cxx index 0fe9ffd8c01a..8ef1b35e3188 100644 --- a/InnerDetector/InDetConditions/SiPropertiesSvc/src/components/SiPropertiesSvc_entries.cxx +++ b/InnerDetector/InDetConditions/SiPropertiesSvc/src/components/SiPropertiesSvc_entries.cxx @@ -2,8 +2,11 @@ #include "../SiPropertiesCHSvc.h" #include "../SiPropertiesTool.h" #include "../SCTSiPropertiesCondAlg.h" +#include "../PixelSiPropertiesCondAlg.h" DECLARE_COMPONENT( SiPropertiesSvc ) DECLARE_COMPONENT( SiPropertiesCHSvc ) DECLARE_COMPONENT( SiPropertiesTool ) DECLARE_COMPONENT( SCTSiPropertiesCondAlg ) +DECLARE_COMPONENT( PixelSiPropertiesCondAlg ) + diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSim3DTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSim3DTool.cxx index 6b0b79772f07..e27462ee0eaf 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSim3DTool.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSim3DTool.cxx @@ -49,10 +49,10 @@ SensorSim3DTool::~SensorSim3DTool() { } // I N I T I A L I Z E //=============================================== StatusCode SensorSim3DTool::initialize() { - CHECK(SensorSimTool::initialize()); + ATH_CHECK(SensorSimTool::initialize()); // -- Get ChargeCollProb Service - CHECK(m_chargeCollSvc.retrieve()); + ATH_CHECK(m_chargeCollSvc.retrieve()); ATH_MSG_DEBUG("SensorSim3DTool::initialize()"); return StatusCode::SUCCESS; @@ -93,7 +93,7 @@ StatusCode SensorSim3DTool::induceCharge(const TimedHitPtr<SiHit> &phit, SiCharg ATH_MSG_VERBOSE("Applying 3D sensor simulation."); double sensorThickness = Module.design().thickness(); - const InDet::SiliconProperties & siProperties = m_siPropertiesSvc->getSiProperties(Module.identifyHash()); + const InDet::SiliconProperties & siProperties = m_siPropertiesTool->getSiProperties(Module.identifyHash()); double eleholePairEnergy = siProperties.electronHolePairsPerEnergy(); // Charge Collection Probability Map bin size diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimPlanarTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimPlanarTool.cxx index 5ffa13d52255..ef20da8de7e9 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimPlanarTool.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimPlanarTool.cxx @@ -50,7 +50,7 @@ SensorSimPlanarTool::~SensorSimPlanarTool() { } // I N I T I A L I Z E //=============================================== StatusCode SensorSimPlanarTool::initialize() { - CHECK(SensorSimTool::initialize()); + ATH_CHECK(SensorSimTool::initialize()); ATH_MSG_DEBUG ( "SensorSimPlanarTool::initialize()"); return StatusCode::SUCCESS; } @@ -87,7 +87,7 @@ StatusCode SensorSimPlanarTool::induceCharge(const TimedHitPtr<SiHit> &phit, SiC //Set up physical detector properties, switch on detector material ATH_MSG_DEBUG("Applying planar sensor simulation"); double sensorThickness = Module.design().thickness(); - const InDet::SiliconProperties & siProperties = m_siPropertiesSvc->getSiProperties(Module.identifyHash()); + const InDet::SiliconProperties & siProperties = m_siPropertiesTool->getSiProperties(Module.identifyHash()); double eleholePairEnergy = 0; double smearRand = 0; diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimTool.h b/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimTool.h index bc5841effd3b..4c3e9154d40d 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimTool.h +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimTool.h @@ -20,11 +20,10 @@ #include "HitManagement/TimedHitPtr.h" #include "SiDigitization/SiChargedDiodeCollection.h" -#include "SiPropertiesSvc/ISiPropertiesSvc.h" #include "InDetReadoutGeometry/SiDetectorElement.h" #include "SiDigitization/SiChargedDiodeCollection.h" #include "InDetReadoutGeometry/PixelModuleDesign.h" -#include "SiPropertiesSvc/ISiPropertiesSvc.h" +#include "SiPropertiesSvc/ISiPropertiesTool.h" static const InterfaceID IID_ISensorSimTool("SensorSimTool", 1, 0); @@ -33,13 +32,11 @@ class SensorSimTool:public AthAlgTool,virtual public IAlgTool { public: SensorSimTool( const std::string& type, const std::string& name,const IInterface* parent) : AthAlgTool(type,name,parent), - m_siPropertiesSvc("PixelSiPropertiesSvc",name), m_rndmSvc("AtDSFMTGenSvc",name), m_rndmEngineName("PixelDigitization"), m_rndmEngine(nullptr) { declareInterface<SensorSimTool>(this); - declareProperty("SiPropertiesSvc", m_siPropertiesSvc, "SiPropertiesSvc"); declareProperty("RndmSvc", m_rndmSvc, "Random Number Service used in SCT & Pixel digitization"); declareProperty("RndmEngine", m_rndmEngineName, "Random engine name"); } @@ -47,11 +44,11 @@ class SensorSimTool:public AthAlgTool,virtual public IAlgTool { static const InterfaceID& interfaceID() { return IID_ISensorSimTool; } virtual StatusCode initialize() { - CHECK(AthAlgTool::initialize()); + ATH_CHECK(AthAlgTool::initialize()); - CHECK(m_siPropertiesSvc.retrieve()); + ATH_CHECK(m_siPropertiesTool.retrieve()); - CHECK(m_rndmSvc.retrieve()); + ATH_CHECK(m_rndmSvc.retrieve()); m_rndmEngine = m_rndmSvc->GetEngine(m_rndmEngineName); if (!m_rndmEngine) { @@ -73,7 +70,7 @@ class SensorSimTool:public AthAlgTool,virtual public IAlgTool { SensorSimTool(); protected: - ServiceHandle<ISiPropertiesSvc> m_siPropertiesSvc; + ToolHandle<ISiPropertiesTool> m_siPropertiesTool{this, "SiPropertiesTool", "SiPropertiesTool", "Tool to retrieve SiProperties"}; ServiceHandle<IAtRndmGenSvc> m_rndmSvc; std::string m_rndmEngineName; CLHEP::HepRandomEngine *m_rndmEngine; diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py index edf3c4924053..a7e0ddb58d51 100644 --- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py @@ -32,7 +32,6 @@ if DetFlags.haveRIO.pixel_on(): InDetPixelConditionsSummarySvc = PixelConditionsSummarySvc() #Tool version for athenaMT -# from PixelConditionsServices.PixelConditionsServicesConf import PixelConditionsSummaryTool from PixelConditionsTools.PixelConditionsToolsConf import PixelConditionsSummaryTool InDetPixelConditionsSummaryTool = PixelConditionsSummaryTool() -- GitLab From f1cdb9cca74ad5dd4c2b5399e6e790f2b7a40984 Mon Sep 17 00:00:00 2001 From: Jovan Mitrevski <Jovan.Mitrevski@cern.ch> Date: Fri, 22 Jun 2018 16:21:50 +0200 Subject: [PATCH 242/562] Developing new egammaMVASvc to replace shared tool; work in progress Former-commit-id: 62a381835d02987e76fbd9a89a4768946d433414 --- .../egammaInterfaces/IegammaMVACalibTool.h | 20 ++ .../egammaInterfaces/IegammaMVASvc.h | 31 ++ .../IelectronSuperClusterBuilder.h | 38 --- .../IphotonSuperClusterBuilder.h | 31 -- .../egammaInterfaces/egammaInterfacesDict.h | 3 +- .../egammaInterfaces/selection.xml | 3 +- .../egamma/egammaMVACalib/CMakeLists.txt | 3 +- .../egammaMVACalib/egammaMVATree.h | 203 +------------ .../egammaMVACalib/egammaMVATreeHelpers.h | 237 +++++++++++++++ .../src/components/egammaMVACalib_entries.cxx | 4 + .../egammaMVACalib/src/egammaMVACalibTool.cxx | 181 ++++++++++++ .../egammaMVACalib/src/egammaMVACalibTool.h | 89 ++++++ .../egammaMVACalib/src/egammaMVASvc.cxx | 269 ++++++++++++++++++ .../egamma/egammaMVACalib/src/egammaMVASvc.h | 59 ++++ 14 files changed, 896 insertions(+), 275 deletions(-) create mode 100644 Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVACalibTool.h create mode 100644 Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVASvc.h delete mode 100644 Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IelectronSuperClusterBuilder.h delete mode 100644 Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IphotonSuperClusterBuilder.h create mode 100644 Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVATreeHelpers.h create mode 100644 Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx create mode 100644 Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h create mode 100644 Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx create mode 100644 Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h diff --git a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVACalibTool.h b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVACalibTool.h new file mode 100644 index 000000000000..221356d114fe --- /dev/null +++ b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVACalibTool.h @@ -0,0 +1,20 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ +#ifndef EGAMMAINTERFACES_iEGAMMAMVACALIBTOOL_H +#define EGAMMAINTERFACES_iEGAMMAMVACALIBTOOL_H + +#include "GaudiKernel/IAlgTool.h" + +/** + * @class IegammaMVACalibTool + * @brief A tool used by the egammaMVASvc to help manage the MVAs. + **/ +class IegammaMVACalibTool : virtual public IAlgTool { +public: + DeclareInterfaceID(IegammaMVACalibTool, 1, 0); + + virtual ~IegammaMVACalibTool() override {}; +}; + +#endif diff --git a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVASvc.h b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVASvc.h new file mode 100644 index 000000000000..e3ff4a184d37 --- /dev/null +++ b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVASvc.h @@ -0,0 +1,31 @@ +// Dear Emacs, this is -*- C++ -*- + +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + + +#ifndef EGAMMAINTERFACES_IEGAMMAMVASVC_H +#define EGAMMAINTERFACES_IEGAMMAMVASVC_H + +#include "GaudiKernel/IService.h" + +// EDM includes +#include "xAODEgamma/EgammaFwd.h" +#include "xAODEgamma/EgammaEnums.h" +#include "xAODCaloEvent/CaloClusterFwd.h" + + +class IegammaMVASvc : virtual public IService { +public: + DeclareInterfaceID(IegammaMVASvc, 1, 0); + + virtual ~IegammaMVASvc() override {}; + + virtual StatusCode execute(xAOD::CaloCluster* cluster,const xAOD::Egamma* eg)=0; + virtual StatusCode execute(xAOD::CaloCluster* cluster,const xAOD::EgammaParameters::EgammaType egType)=0; + virtual StatusCode hltexecute(xAOD::CaloCluster* cluster, const std::string& egType)=0; + +}; + +#endif diff --git a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IelectronSuperClusterBuilder.h b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IelectronSuperClusterBuilder.h deleted file mode 100644 index 66d93590d31a..000000000000 --- a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IelectronSuperClusterBuilder.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef EGAMMAINTERFACES_IELECTRONSUPERCLUSTERBUILDER_H -#define EGAMMAINTERFACES_IELECTRONSUPERCLUSTERBUILDER_H - -/** @class IELECTRONSUPERCLUSTERBULDER - Interface for the tool Reconstruction/egamma/egammaTools/electronSuperClusterBuilder - @author David Di Valentino david.di.valentino@cern.ch -CREATED : 21/12/2013 -MODIFIED : -*/ -// INCLUDE HEADER FILES: -#include "GaudiKernel/IAlgTool.h" - -static const InterfaceID IID_IelectronSuperClusterBuilder("IelectronSuperClusterBuilder", 1, 0); - -class IelectronSuperClusterBuilder : virtual public IAlgTool -{ - - public: - /** @brief Virtual destructor*/ - virtual ~IelectronSuperClusterBuilder() {}; - /** @brief AlgTool interface methods */ - static const InterfaceID& interfaceID(); - /** @brief initialize method*/ - virtual StatusCode initialize() = 0; - virtual StatusCode finalize() = 0; - virtual StatusCode execute() = 0; -}; - -inline const InterfaceID& IelectronSuperClusterBuilder::interfaceID() -{ - return IID_IelectronSuperClusterBuilder; -} - -#endif diff --git a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IphotonSuperClusterBuilder.h b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IphotonSuperClusterBuilder.h deleted file mode 100644 index 67ed47ef6296..000000000000 --- a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IphotonSuperClusterBuilder.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef EGAMMAINTERFACES_IPHOTONSUPERCLUSTERBUILDER_H -#define EGAMMAINTERFACES_IPHOTONSUPERCLUSTERBUILDER_H - -#include "GaudiKernel/IAlgTool.h" - -static const InterfaceID IID_IphotonSuperClusterBuilder("IphotonSuperClusterBuilder", 1, 0); - -class IphotonSuperClusterBuilder : virtual public IAlgTool -{ - - public: - /** @brief Virtual destructor*/ - virtual ~IphotonSuperClusterBuilder() {}; - /** @brief AlgTool interface methods */ - static const InterfaceID& interfaceID(); - /** @brief initialize method*/ - virtual StatusCode initialize() = 0; - virtual StatusCode finalize() = 0; - virtual StatusCode execute() = 0; -}; - -inline const InterfaceID& IphotonSuperClusterBuilder::interfaceID() -{ - return IID_IphotonSuperClusterBuilder; -} - -#endif diff --git a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/egammaInterfacesDict.h b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/egammaInterfacesDict.h index 37ab5e39b5ee..fa02a1a3eb53 100644 --- a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/egammaInterfacesDict.h +++ b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/egammaInterfacesDict.h @@ -38,6 +38,5 @@ #include "egammaInterfaces/IegammaTrkRefitterTool.h" #include "egammaInterfaces/Iegammaqweta1c.h" #include "egammaInterfaces/Iegammaqweta2c.h" -#include "egammaInterfaces/IelectronSuperClusterBuilder.h" -#include "egammaInterfaces/IphotonSuperClusterBuilder.h" +#include "egammaInterfaces/IegammaMVASvc.h" #endif // EGAMMAINTERFACES_EGAMMAINTERFACESDICT_H diff --git a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/selection.xml b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/selection.xml index 790e3a3a4887..d31c2df10d60 100644 --- a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/selection.xml +++ b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/selection.xml @@ -19,7 +19,6 @@ <class name="IegammaTrkRefitterTool" /> <class name="Iegammaqweta1c" /> <class name="Iegammaqweta2c" /> - <class name="IelectronSuperClusterBuilder" /> - <class name="IphotonSuperClusterBuilder" /> + <class name="IegammaMVASvc" /> </lcgdict> diff --git a/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt b/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt index 0af29ebf67d5..343bdc607fa6 100644 --- a/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt +++ b/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt @@ -27,6 +27,7 @@ atlas_depends_on_subdirs( Reconstruction/MVAUtils Control/CxxUtils Tools/PathResolver + Reconstruction/egamma/egammaInterfaces ${extra_dep} ) # External dependencies: @@ -44,7 +45,7 @@ atlas_add_library( egammaMVACalibLib if( NOT XAOD_STANDALONE ) atlas_add_component( egammaMVACalib - src/components/*.cxx + src/*.cxx src/components/*.cxx LINK_LIBRARIES GaudiKernel egammaMVACalibLib ) endif() diff --git a/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVATree.h b/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVATree.h index 939b4cc43e46..cc124f57dd43 100644 --- a/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVATree.h +++ b/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVATree.h @@ -27,7 +27,8 @@ #include <AsgTools/AsgMessaging.h> -#include <egammaMVACalib/egammaMVALayerDepth.h> +#include "egammaMVACalib/egammaMVALayerDepth.h" +#include "egammaMVACalib/egammaMVATreeHelpers.h" @@ -154,8 +155,6 @@ public: template<> const float* egammaMVATreeEgamma::get_ptr<float>(const std::string&) const; template<> const int* egammaMVATreeEgamma::get_ptr<int>(const std::string&) const; -namespace egammaMVATreeHelpers { struct ConversionHelper; } - class egammaMVATreePhoton : public egammaMVATreeEgamma { public: @@ -227,203 +226,5 @@ public: template<> const float* egammaMVATreePhoton::get_ptr<float>(const std::string&) const; template<> const int* egammaMVATreePhoton::get_ptr<int>(const std::string&) const; -/** inline functions to compute quantities **/ -namespace egammaMVATreeHelpers -{ - // inline functions to avoid duplicates problem during linking (and performance) - // cluster functions - // REMEMBER to add the functions using corrected layer energies - inline float compute_cl_eta(const xAOD::CaloCluster& cluster) { return cluster.eta(); } - inline float compute_cl_phi(const xAOD::CaloCluster& cluster) { return cluster.phi(); } - inline float compute_cl_e(const xAOD::CaloCluster& cluster) { return cluster.e(); } - inline float compute_cl_etaCalo(const xAOD::CaloCluster& cluster) { - double tmp = 0.; - if(! (cluster.retrieveMoment(xAOD::CaloCluster::ETACALOFRAME, tmp))) { - throw std::runtime_error("etaCalo not found in CaloCluster object"); - } - return tmp; - } - inline float compute_cl_phiCalo(const xAOD::CaloCluster& cluster) { - double tmp = 0.; - if(! (cluster.retrieveMoment(xAOD::CaloCluster::PHICALOFRAME, tmp))) { - throw std::runtime_error("phiCalo not found in CaloCluster object"); - } - return tmp; - } - inline float compute_cl_etas1(const xAOD::CaloCluster& cluster) { return cluster.etaBE(1); } - inline float compute_cl_etas2(const xAOD::CaloCluster& cluster) { return cluster.etaBE(2); } - inline float compute_rawcl_Es0(const xAOD::CaloCluster& cl) { return cl.energyBE(0); } - /*inline std::function<float(const xAOD::CaloCluster&)> compute_rawcl_Es0_auto(bool use_corrected) - { - if (use_corrected) return [](const xAOD::CaloCluster& cl) { return cl.energyBE(0); }; - else return [](const xAOD::CaloCluster& cl) { return cl.energyBE(0); }; - }*/ - inline float compute_rawcl_Es1(const xAOD::CaloCluster& cl) { return cl.energyBE(1); } - inline float compute_rawcl_Es2(const xAOD::CaloCluster& cl) { return cl.energyBE(2); } - inline float compute_rawcl_Es3(const xAOD::CaloCluster& cl) { return cl.energyBE(3); } - - inline float compute_correctedcl_Es0(const xAOD::CaloCluster& cl) { return cl.isAvailable<double>("correctedcl_Es0") ? cl.auxdataConst<double>("correctedcl_Es0") : cl.energyBE(0); } - inline float compute_correctedcl_Es1(const xAOD::CaloCluster& cl) { return cl.isAvailable<double>("correctedcl_Es1") ? cl.auxdataConst<double>("correctedcl_Es1") : cl.energyBE(1); } - inline float compute_correctedcl_Es2(const xAOD::CaloCluster& cl) { return cl.isAvailable<double>("correctedcl_Es2") ? cl.auxdataConst<double>("correctedcl_Es2") : cl.energyBE(2); } - inline float compute_correctedcl_Es3(const xAOD::CaloCluster& cl) { return cl.isAvailable<double>("correctedcl_Es3") ? cl.auxdataConst<double>("correctedcl_Es3") : cl.energyBE(3); } - - inline float compute_rawcl_Eacc(const xAOD::CaloCluster& cl) { return cl.energyBE(1) + cl.energyBE(2) + cl.energyBE(3); } - inline float compute_rawcl_f0(const xAOD::CaloCluster& cl) { return cl.energyBE(0) / (cl.energyBE(1) + cl.energyBE(2) + cl.energyBE(3)); } - - inline float compute_correctedcl_Eacc(const xAOD::CaloCluster& cl) { return compute_correctedcl_Es1(cl) + compute_correctedcl_Es2(cl) + compute_correctedcl_Es3(cl); } - inline float compute_correctedcl_f0(const xAOD::CaloCluster& cl) { return compute_correctedcl_Es0(cl) / (compute_correctedcl_Eacc(cl)); } - - - inline float compute_calibHitsShowerDepth(const std::array<float, 4>& cl, float eta) - { - const std::array<float, 4> radius(get_MVAradius(eta)); - - // loop unrolling - const float denominator = cl[0] + cl[1] + cl[2] + cl[3]; - if (denominator == 0) return 0.; - - return (radius[0] * cl[0] - + radius[1] * cl[1] - + radius[2] * cl[2] - + radius[3] * cl[3]) / denominator; - } - - inline float compute_rawcl_calibHitsShowerDepth(const xAOD::CaloCluster& cl) - { - const std::array<float, 4> cluster_array {{ compute_rawcl_Es0(cl), - compute_rawcl_Es1(cl), - compute_rawcl_Es2(cl), - compute_rawcl_Es3(cl) }}; - return compute_calibHitsShowerDepth(cluster_array, compute_cl_eta(cl)); - } - - inline float compute_correctedcl_calibHitsShowerDepth(const xAOD::CaloCluster& cl) { - const std::array<float, 4> cluster_array {{ compute_correctedcl_Es0(cl), - compute_correctedcl_Es1(cl), - compute_correctedcl_Es2(cl), - compute_correctedcl_Es3(cl) }}; - return compute_calibHitsShowerDepth(cluster_array, compute_cl_eta(cl)); - } - - - - - // electron functions - inline float compute_el_charge(const xAOD::Electron& el) { return el.charge(); } - inline float compute_el_tracketa(const xAOD::Electron& el) { return el.trackParticle()->eta(); } - inline float compute_el_trackpt(const xAOD::Electron& el) { return el.trackParticle()->pt(); } - inline float compute_el_trackz0(const xAOD::Electron& el) { return el.trackParticle()->z0(); } - inline float compute_el_refittedTrack_qoverp(const xAOD::Electron& el) { return el.trackParticle()->qOverP(); } - inline int compute_el_author(const xAOD::Electron& el) { return el.auxdata<unsigned short int>("author"); } - - - // photon functions - inline int compute_ph_convFlag(const xAOD::Photon& ph) { - const auto original = xAOD::EgammaHelpers::conversionType(&ph); - if (original == 3) return 2; - else if (original != 0) return 1; - else return original; - } - - struct ConversionHelper - { - ConversionHelper(const xAOD::Photon* ph) - : m_vertex(ph ? ph->vertex() : nullptr), - m_tp0(m_vertex ? m_vertex->trackParticle(0) : nullptr), - m_tp1(m_vertex ? m_vertex->trackParticle(1) : nullptr), - m_pt1conv(0.), m_pt2conv(0.) - { - static asg::AsgMessaging static_msg("ConversionHelper"); - static_msg.msg(MSG::DEBUG) << "init conversion helper"; - if (!m_vertex) return; - - static SG::AuxElement::Accessor<float> accPt1("pt1"); - static SG::AuxElement::Accessor<float> accPt2("pt2"); - if (accPt1.isAvailable(*m_vertex) && accPt2.isAvailable(*m_vertex)) - { - m_pt1conv = accPt1(*m_vertex); - m_pt2conv = accPt2(*m_vertex); - } - else - { - static_msg.msg(MSG::WARNING) << "pt1/pt2 not available, will approximate from first measurements"; - m_pt1conv = getPtAtFirstMeasurement(m_tp0); - m_pt2conv = getPtAtFirstMeasurement(m_tp1); - } - } - - ConversionHelper(const xAOD::Photon& ph) - : ConversionHelper(&ph) { } // delegating constr - - inline float ph_Rconv() const { return m_vertex ? hypot(m_vertex->position().x(), m_vertex->position().y()) : 0; } - inline float ph_zconv() const { return m_vertex ? m_vertex->position().z() : 0.; } - inline int ph_convtrk1nPixHits() const { - if (!m_tp0) { return 0; } - uint8_t hits = 0; - if (m_tp0->summaryValue(hits, xAOD::numberOfPixelHits)) { return hits; } - else { - static asg::AsgMessaging static_msg("ConversionHelper"); - static_msg.msg(MSG::WARNING) << "cannot read xAOD::numberOfPixelHits"; - return 0; - } - } - inline int ph_convtrk2nPixHits() const { - if (!m_tp1) return 0; - uint8_t hits; - if (m_tp1->summaryValue(hits, xAOD::numberOfPixelHits)) { return hits; } - else { - static asg::AsgMessaging static_msg("ConversionHelper"); - static_msg.msg(MSG::WARNING) << "cannot read xAOD::numberOfPixelHits"; - return 0; - } - } - inline int ph_convtrk1nSCTHits() const { - if (!m_tp0) { return 0; } - uint8_t hits; - if (m_tp0->summaryValue(hits, xAOD::numberOfSCTHits)) { return hits; } - else { - static asg::AsgMessaging static_msg("ConversionHelper"); - static_msg.msg(MSG::WARNING) << "cannot read xAOD::numberOfSCTHits"; - return 0; - } - } - inline int ph_convtrk2nSCTHits() const { - if (!m_tp1) { return 0; } - uint8_t hits; - if (m_tp1->summaryValue(hits, xAOD::numberOfSCTHits)) { return hits; } - else { - static asg::AsgMessaging static_msg("ConversionHelper"); - static_msg.msg(MSG::WARNING) << "cannot read xAOD::numberOfSCTHits"; - return 0; - } - } - inline float ph_pt1conv() const { return m_pt1conv; } - inline float ph_pt2conv() const { return m_pt2conv; } - inline float ph_ptconv() const { - // TODO: evaluate if move to this new definition, by now keep the previous one - // to be consistent with the training - // return m_vertex ? xAOD::EgammaHelpers::momentumAtVertex(*m_vertex).perp() : 0.; - TLorentzVector sum; - if (m_tp0) sum += m_tp0->p4(); - if (m_tp1) sum += m_tp1->p4(); - return sum.Perp(); - } - private: - float getPtAtFirstMeasurement(const xAOD::TrackParticle* tp) const - { - if (!tp) return 0; - for (unsigned int i = 0; i < tp->numberOfParameters(); ++i) - if (tp->parameterPosition(i) == xAOD::FirstMeasurement) - return hypot(tp->parameterPX(i), tp->parameterPY(i)); - static asg::AsgMessaging static_msg("ConversionHelper"); - static_msg.msg(MSG::WARNING) << "Could not find first parameter, return pt at perigee"; - return tp->pt(); - } - const xAOD::Vertex* m_vertex; - const xAOD::TrackParticle* m_tp0; - const xAOD::TrackParticle* m_tp1; - float m_pt1conv, m_pt2conv; - }; -} #endif diff --git a/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVATreeHelpers.h b/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVATreeHelpers.h new file mode 100644 index 000000000000..ff064f0188d7 --- /dev/null +++ b/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVATreeHelpers.h @@ -0,0 +1,237 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef EGAMMAMVACALIB_EGAMMAMVATREEHELPERS +#define EGAMMAMVACALIB_EGAMMAMVATREEHELPERS + +#include <functional> +#include <string> +#include <map> +#include <array> +#include <vector> +#include <tuple> +#include <cmath> +#include <set> +#include <cstdint> +#include <numeric> + +#include "xAODEgamma/Egamma.h" +#include "xAODEgamma/Electron.h" +#include "xAODEgamma/Photon.h" +#include "xAODEgamma/EgammaxAODHelpers.h" +#include "xAODCaloEvent/CaloCluster.h" + +#include <TTree.h> +#include <TLorentzVector.h> + +#include <AsgTools/AsgMessaging.h> + +#include <egammaMVACalib/egammaMVALayerDepth.h> + + + +/** + * These functions are for calculating variables used by the + * MVA calibration + **/ + +namespace egammaMVATreeHelpers +{ + // inline functions to avoid duplicates problem during linking (and performance) + // cluster functions + // REMEMBER to add the functions using corrected layer energies + inline float compute_cl_eta(const xAOD::CaloCluster& cluster) { return cluster.eta(); } + inline float compute_cl_phi(const xAOD::CaloCluster& cluster) { return cluster.phi(); } + inline float compute_cl_e(const xAOD::CaloCluster& cluster) { return cluster.e(); } + inline float compute_cl_etaCalo(const xAOD::CaloCluster& cluster) { + double tmp = 0.; + if(! (cluster.retrieveMoment(xAOD::CaloCluster::ETACALOFRAME, tmp))) { + throw std::runtime_error("etaCalo not found in CaloCluster object"); + } + return tmp; + } + inline float compute_cl_phiCalo(const xAOD::CaloCluster& cluster) { + double tmp = 0.; + if(! (cluster.retrieveMoment(xAOD::CaloCluster::PHICALOFRAME, tmp))) { + throw std::runtime_error("phiCalo not found in CaloCluster object"); + } + return tmp; + } + inline float compute_cl_etas1(const xAOD::CaloCluster& cluster) { return cluster.etaBE(1); } + inline float compute_cl_etas2(const xAOD::CaloCluster& cluster) { return cluster.etaBE(2); } + inline float compute_rawcl_Es0(const xAOD::CaloCluster& cl) { return cl.energyBE(0); } + /*inline std::function<float(const xAOD::CaloCluster&)> compute_rawcl_Es0_auto(bool use_corrected) + { + if (use_corrected) return [](const xAOD::CaloCluster& cl) { return cl.energyBE(0); }; + else return [](const xAOD::CaloCluster& cl) { return cl.energyBE(0); }; + }*/ + inline float compute_rawcl_Es1(const xAOD::CaloCluster& cl) { return cl.energyBE(1); } + inline float compute_rawcl_Es2(const xAOD::CaloCluster& cl) { return cl.energyBE(2); } + inline float compute_rawcl_Es3(const xAOD::CaloCluster& cl) { return cl.energyBE(3); } + + inline float compute_correctedcl_Es0(const xAOD::CaloCluster& cl) { return cl.isAvailable<double>("correctedcl_Es0") ? cl.auxdataConst<double>("correctedcl_Es0") : cl.energyBE(0); } + inline float compute_correctedcl_Es1(const xAOD::CaloCluster& cl) { return cl.isAvailable<double>("correctedcl_Es1") ? cl.auxdataConst<double>("correctedcl_Es1") : cl.energyBE(1); } + inline float compute_correctedcl_Es2(const xAOD::CaloCluster& cl) { return cl.isAvailable<double>("correctedcl_Es2") ? cl.auxdataConst<double>("correctedcl_Es2") : cl.energyBE(2); } + inline float compute_correctedcl_Es3(const xAOD::CaloCluster& cl) { return cl.isAvailable<double>("correctedcl_Es3") ? cl.auxdataConst<double>("correctedcl_Es3") : cl.energyBE(3); } + + inline float compute_rawcl_Eacc(const xAOD::CaloCluster& cl) { return cl.energyBE(1) + cl.energyBE(2) + cl.energyBE(3); } + inline float compute_rawcl_f0(const xAOD::CaloCluster& cl) { return cl.energyBE(0) / (cl.energyBE(1) + cl.energyBE(2) + cl.energyBE(3)); } + + inline float compute_correctedcl_Eacc(const xAOD::CaloCluster& cl) { return compute_correctedcl_Es1(cl) + compute_correctedcl_Es2(cl) + compute_correctedcl_Es3(cl); } + inline float compute_correctedcl_f0(const xAOD::CaloCluster& cl) { return compute_correctedcl_Es0(cl) / (compute_correctedcl_Eacc(cl)); } + + + inline float compute_calibHitsShowerDepth(const std::array<float, 4>& cl, float eta) + { + const std::array<float, 4> radius(get_MVAradius(eta)); + + // loop unrolling + const float denominator = cl[0] + cl[1] + cl[2] + cl[3]; + if (denominator == 0) return 0.; + + return (radius[0] * cl[0] + + radius[1] * cl[1] + + radius[2] * cl[2] + + radius[3] * cl[3]) / denominator; + } + + inline float compute_rawcl_calibHitsShowerDepth(const xAOD::CaloCluster& cl) + { + const std::array<float, 4> cluster_array {{ compute_rawcl_Es0(cl), + compute_rawcl_Es1(cl), + compute_rawcl_Es2(cl), + compute_rawcl_Es3(cl) }}; + return compute_calibHitsShowerDepth(cluster_array, compute_cl_eta(cl)); + } + + inline float compute_correctedcl_calibHitsShowerDepth(const xAOD::CaloCluster& cl) { + const std::array<float, 4> cluster_array {{ compute_correctedcl_Es0(cl), + compute_correctedcl_Es1(cl), + compute_correctedcl_Es2(cl), + compute_correctedcl_Es3(cl) }}; + return compute_calibHitsShowerDepth(cluster_array, compute_cl_eta(cl)); + } + + + + + // electron functions + inline float compute_el_charge(const xAOD::Electron& el) { return el.charge(); } + inline float compute_el_tracketa(const xAOD::Electron& el) { return el.trackParticle()->eta(); } + inline float compute_el_trackpt(const xAOD::Electron& el) { return el.trackParticle()->pt(); } + inline float compute_el_trackz0(const xAOD::Electron& el) { return el.trackParticle()->z0(); } + inline float compute_el_refittedTrack_qoverp(const xAOD::Electron& el) { return el.trackParticle()->qOverP(); } + inline int compute_el_author(const xAOD::Electron& el) { return el.auxdata<unsigned short int>("author"); } + + + // photon functions + inline int compute_ph_convFlag(const xAOD::Photon& ph) { + const auto original = xAOD::EgammaHelpers::conversionType(&ph); + if (original == 3) return 2; + else if (original != 0) return 1; + else return original; + } + + struct ConversionHelper + { + ConversionHelper(const xAOD::Photon* ph) + : m_vertex(ph ? ph->vertex() : nullptr), + m_tp0(m_vertex ? m_vertex->trackParticle(0) : nullptr), + m_tp1(m_vertex ? m_vertex->trackParticle(1) : nullptr), + m_pt1conv(0.), m_pt2conv(0.) + { + static asg::AsgMessaging static_msg("ConversionHelper"); + static_msg.msg(MSG::DEBUG) << "init conversion helper"; + if (!m_vertex) return; + + static SG::AuxElement::Accessor<float> accPt1("pt1"); + static SG::AuxElement::Accessor<float> accPt2("pt2"); + if (accPt1.isAvailable(*m_vertex) && accPt2.isAvailable(*m_vertex)) + { + m_pt1conv = accPt1(*m_vertex); + m_pt2conv = accPt2(*m_vertex); + } + else + { + static_msg.msg(MSG::WARNING) << "pt1/pt2 not available, will approximate from first measurements"; + m_pt1conv = getPtAtFirstMeasurement(m_tp0); + m_pt2conv = getPtAtFirstMeasurement(m_tp1); + } + } + + ConversionHelper(const xAOD::Photon& ph) + : ConversionHelper(&ph) { } // delegating constr + + inline float ph_Rconv() const { return m_vertex ? hypot(m_vertex->position().x(), m_vertex->position().y()) : 0; } + inline float ph_zconv() const { return m_vertex ? m_vertex->position().z() : 0.; } + inline int ph_convtrk1nPixHits() const { + if (!m_tp0) { return 0; } + uint8_t hits = 0; + if (m_tp0->summaryValue(hits, xAOD::numberOfPixelHits)) { return hits; } + else { + static asg::AsgMessaging static_msg("ConversionHelper"); + static_msg.msg(MSG::WARNING) << "cannot read xAOD::numberOfPixelHits"; + return 0; + } + } + inline int ph_convtrk2nPixHits() const { + if (!m_tp1) return 0; + uint8_t hits; + if (m_tp1->summaryValue(hits, xAOD::numberOfPixelHits)) { return hits; } + else { + static asg::AsgMessaging static_msg("ConversionHelper"); + static_msg.msg(MSG::WARNING) << "cannot read xAOD::numberOfPixelHits"; + return 0; + } + } + inline int ph_convtrk1nSCTHits() const { + if (!m_tp0) { return 0; } + uint8_t hits; + if (m_tp0->summaryValue(hits, xAOD::numberOfSCTHits)) { return hits; } + else { + static asg::AsgMessaging static_msg("ConversionHelper"); + static_msg.msg(MSG::WARNING) << "cannot read xAOD::numberOfSCTHits"; + return 0; + } + } + inline int ph_convtrk2nSCTHits() const { + if (!m_tp1) { return 0; } + uint8_t hits; + if (m_tp1->summaryValue(hits, xAOD::numberOfSCTHits)) { return hits; } + else { + static asg::AsgMessaging static_msg("ConversionHelper"); + static_msg.msg(MSG::WARNING) << "cannot read xAOD::numberOfSCTHits"; + return 0; + } + } + inline float ph_pt1conv() const { return m_pt1conv; } + inline float ph_pt2conv() const { return m_pt2conv; } + inline float ph_ptconv() const { + // TODO: evaluate if move to this new definition, by now keep the previous one + // to be consistent with the training + // return m_vertex ? xAOD::EgammaHelpers::momentumAtVertex(*m_vertex).perp() : 0.; + TLorentzVector sum; + if (m_tp0) sum += m_tp0->p4(); + if (m_tp1) sum += m_tp1->p4(); + return sum.Perp(); + } + private: + float getPtAtFirstMeasurement(const xAOD::TrackParticle* tp) const + { + if (!tp) return 0; + for (unsigned int i = 0; i < tp->numberOfParameters(); ++i) + if (tp->parameterPosition(i) == xAOD::FirstMeasurement) + return hypot(tp->parameterPX(i), tp->parameterPY(i)); + static asg::AsgMessaging static_msg("ConversionHelper"); + static_msg.msg(MSG::WARNING) << "Could not find first parameter, return pt at perigee"; + return tp->pt(); + } + const xAOD::Vertex* m_vertex; + const xAOD::TrackParticle* m_tp0; + const xAOD::TrackParticle* m_tp1; + float m_pt1conv, m_pt2conv; + }; +} + +#endif diff --git a/Reconstruction/egamma/egammaMVACalib/src/components/egammaMVACalib_entries.cxx b/Reconstruction/egamma/egammaMVACalib/src/components/egammaMVACalib_entries.cxx index 37a5a6fa8cfb..c9ef57c023ee 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/components/egammaMVACalib_entries.cxx +++ b/Reconstruction/egamma/egammaMVACalib/src/components/egammaMVACalib_entries.cxx @@ -1,4 +1,8 @@ #include "egammaMVACalib/egammaMVATool.h" +#include "../egammaMVASvc.h" +#include "../egammaMVACalibTool.h" DECLARE_COMPONENT( egammaMVATool ) +DECLARE_COMPONENT( egammaMVASvc ) +DECLARE_COMPONENT( egammaMVACalibTool ) diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx new file mode 100644 index 000000000000..cc856a39c643 --- /dev/null +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx @@ -0,0 +1,181 @@ + /* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "egammaMVACalibTool.h" + +#include "egammaMVACalib/egammaMVALayerDepth.h" +#include "egammaMVACalib/egammaMVATreeHelper.h" +#include "MVAUtils/BDT.h" +#include "PathResolver/PathResolver.h" + +#include "TFile.h" + + +egammaMVACalibTool::egammaMVACalibTool(const std::string& type, const std::string& name, const IInterface* parent) : + base_class(type, name, parent) +{ +} + +egammaMVACalibTool::~egammaMVACalibTool() +{ +} + +StatusCode egammaMVACalibTool::initialize() +{ + + // get the BDTs + ATH_MSG_DEBUG("get BDTs in folder: " << m_folder); + switch (m_particleType) { + case xAOD::EgammaParameters::electron: + ATH_CHECK(initializeElectronFuncs()); + ATH_CHECK(setupBDT(PathResolverFindCalibFile(folder + "/MVACalib_electron.weights.root"))); + break; + case xAOD::EgammaParameters::uncovertedPhoton: + ATH_CHECK(initializeUnconvertedPhotonFuncs()); + ATH_CHECK(setupBDT(PathResolverFindCalibFile(folder + "/MVACalib_unconvertedPhoton.weights.root"))); + break; + case xAOD::EgammaParameters::covertedPhoton: + ATH_CHECK(initializeConvertedPhotonFuncs()); + ATH_CHECK(setupBDT(PathResolverFindCalibFile(folder + "/MVACalib_convertedPhoton.weights.root"))); + break; + default: + ATH_MSG_FATAL("Particle type not set properly: " << m_particleType); + return StatusCode::FAILURE; + } + + return StatusCode::SUCCESS; +} + +StatusCode egammaMVACalibTool::finalize() +{ + return StatusCode::SUCCESS; +} + +StatusCode egammmMVACalibTool::setupBDT(std::string fileName) +{ + std::unique_ptr<TFile> f(TFile::Open(fileName)); + if (!f || f->IsZombie() ) { + ATH_MSG_FATAL("Could not open file: " << fileName); + return StatusCode::FAILURE; + } + + // Load hPoly + TH2Poly *hPoly = nullPtr; + f->GetObject("hPoly", hPoly); + if (!hPoly) { + ATH_MSG_FATAL("Could not find hPoly"); + return StatusCode::FAILURE; + } + + m_hPoly = hPoly->Clone(); + m_hPoly->SetDirectory(0); + + // Load formulae + TObjArray *formulaeTmp = nullPtr; + f->GetObject("formulae", formulaeTmp); + if (!formulaeTmp) { + ATH_MSG_FATAL("Could not find formulae"); + return StatusCode::FAILURE; + } + auto formulae = std::unique_ptr<TObjArray>(formulaeTmp); + formulae->SetOwner(); // to delete the objects when d-tor is called + + // Load variables + TObjArray *variablesTmp = nullPtr; + f->GetObject("variables", variablesTmp); + if (!variablesTmp) { + ATH_MSG_FATAL("Could not find variables"); + return StatusCode::FAILURE; + } + auto variables = std::unique_ptr<TObjArray>(variablesTmp); + variables->SetOwner(); // to delete the objects when d-tor is called + + // Load shifts + TObjArray *shiftsTmp = nullPtr; + f->GetObject("shifts", shiftsTmp); + if (!shiftsTmp) { + ATH_MSG_FATAL("Could not find shifts"); + return StatusCode::FAILURE; + } + auto shifts = std::unique_ptr<TObjArray>(shiftsTmp); + shifts->SetOwner(); // to delete the objects when d-tor is called + + // Load trees + TObjArray *treesTmp = nullPtr; + std::unique_ptr<TObjArray> trees; + f->GetObject("trees", treesTmp); + if (treesTmp) { + trees = std::unique_ptr<TObjArray>(treesTmp); + trees->SetOwner(); // to delete the objects when d-tor is called + ATH_MSG_DEBUG("setupBDT " << "BDTs read from TObjArray"); + } else { + ATH_MSG_DEBUG("setupBDT " << "Reading trees individually"); + trees = std::make_unique<TObjArray>(); + trees->SetOwner(); // to delete the objects when d-tor is called + for (int i = 0; i < variables->GetEntries(); ++i) + { + TTree *tree = nullptr; + f->GetObject(Form("BDT%d", i), tree); + if (tree) tree->SetCacheSize(0); + trees->AddAtAndExpand(tree, i); + } + } + + // Ensure the objects have (the same number of) entries + if (!trees->GetEntries() || !(trees->GetEntries() == variables->GetEntries())) { + ATH_MSG_FATAL("Tree has size " << trees->GetEntries() + << " while variables has size " << variables->GetEntries()); + return StatusCode::FAILURE; + } + + // (pre) define formulae + TNamed *formula; + TIter nextFormula(formulae.get()); + while ((formula = (TNamed*) nextFormula())){ + predefineFormula(formula->GetName(), formula->GetTitle(), "variable"); + } + + // Loop simultaneously over trees, variables and shifts + // Define the BDTs, the list of variables and the shift for each BDT + TObjString *str2, *shift; + TTree *tree; + TIter nextTree(trees.get()); + TIter nextVariables(variables.get()); + TIter nextShift(shifts.get()); + for (int i=0; (tree = (TTree*) nextTree()) && ((TObjString*) nextVariables()); ++i) + { + key.bin = i+1; // bin has an offset + BDT *bdt = new BDT(tree); + m_BDTs[key] = bdt; + std::vector<float*> pointers; + + // Loop over variables, which are separated by comma + char separator_var = ';'; + if (getString(variables->At(i)).Index(";") < 1) separator_var = ','; // old versions + std::unique_ptr<TObjArray> tokens(getString(variables->At(i)).Tokenize(separator_var)); + TIter nextVar(tokens.get()); + while ((str2 = (TObjString*) nextVar())) + { + TString varName = getString(str2); + if (!varName.Length()) continue; + std::map< TString, VarFormula >::iterator it = m_formulae.find(varName); + if (it == m_formulae.end()) + { + ATH_MSG_FATAL("egammaMVACalib::setupBDT Variable not defined: "<< varName.Data()); + throw std::runtime_error("Variable not defined"); + } + pointers.push_back(&(it->second.variable)); + } + bdt->SetPointers(pointers); + shift = (TObjString*) nextShift(); + if (shift) m_additional_infos[key]["Mean10"] = getString(shift); + } + return StatusCode::SUCCESS; + +} + +StatusCode egammmMVACalibTool::initializeElectronFuncs() +{ + return StatusCode::SUCCESS; +} diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h new file mode 100644 index 000000000000..4511399fa915 --- /dev/null +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h @@ -0,0 +1,89 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ +#ifndef EGAMMAMVACALIB_EGAMMAMVACALIBTOOL_H +#define EGAMMAMVACALIB_EGAMMAMVACALIBTOOL_H + +// Package includes +#include "egammaInterfaces/IegammaMVACalibTool.h" +#include "xAODEgamma/EgammaDefs.h" +#include "xAODEgamma/Electron.h" +#include "xAODEgamma/Photon.h" +#include "xAODCaloEvent/CaloCluster.h" + +// Framework includes +#include "AthenaBaseComps/AthAlgTool.h" +#include "TH2Poly.h" + +// STL includes +#include <string> +#include <memory> +#include <functional> + + +/** + * @class egammaMVACalibTool + * @brief A tool used by the egammaMVASvc to help manage the MVAs. + **/ +class egammaMVACalibTool : public extends<AthAlgTool, IegammaMVACalibTool> { +public: + egammaMVACalibTool(const std::string& type, const std::string& name, const IInterface* parent); + virtual ~egammaMVACalibTool() override; + + virtual StatusCode initialize() override; + virtual StatusCode finalize() override; + + enum CalibrationType {correctEcluster, correctEaccordion, + fullCalibration, NCalibrationTypes }; + + enum ShiftType {NOSHIFT=0, PEAKTOTRUE, MEANTOTRUE, MEDIANTOTRUE, + MEAN10TOTRUE, MEAN20TOTRUE, MEDIAN10TOTRUE, MEDIAN20TOTRUE, + NSHIFTCORRECTIONS}; + +private: + Gaudi::Property<int> m_particleType {this, + "ParticleType", xAOD::EgammaParameters::electron, + "What type of particle do we use"}; + + Gaudi::Property<int> m_shiftType {this, + "ShiftType", MEAN10TOTRUE, + "Shift corrections to apply to value"}; + + Gaudi::Property<int> m_calibrationType {this, + "CalibrationType", correctEaccordion, + "What type of calibration to apply"}; + + Gaudi::Property<bool> m_clusterEif0 {this, + "useClusterIf0", true, + "Use cluster energy if MVA response is 0"}; + + /// string with folder for weight files + Gaudi::Property<std::string> m_folder {this, + "folder", "egammaMVACalib/offline/v3", + "string with folder for weight files"}; + + Gaudi::Property<bool> m_use_layer_corrected {this, + "use_layer_corrected", true, + "whether to use layer corrections"}; + + std::unique_ptr<TH2Poly> m_hPoly; + + std::vector<MVAUtils::BDT> m_BDTs; + + /// map of variable string to function (taking calo cluster) + std::map<std::string, std::functional<float(const xAOD::CaloCluster&)> m_clusterFuncs; + /// map of variable string to function (taking electron) + std::map<std::string, std::functional<float(const xAOD::Electron&)> m_ElectronFuncs; + /// map of variable string to function (taking photon) + std::map<std::string, std::functional<float(const xAOD::Photon&)> m_PhotonFuncs; + + /// initialize the functions needed for electrons + StatusCode initializeElectronFuncs(); + /// initialize the functions needed for unconverted photons + StatusCode initializeUnconvertedPhotonFuncs(); + /// initialize the functions needed for converted photons + StatusCode initializeConvertedPhotonFuncs(); + +}; + +#endif diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx new file mode 100644 index 000000000000..8bc770c4c185 --- /dev/null +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx @@ -0,0 +1,269 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include <memory> + +#include "egammaMVASvc.h" +#include "xAODEgamma/Egamma.h" +#include "xAODEgamma/EgammaDefs.h" +#include "xAODEgamma/Electron.h" +#include "xAODEgamma/Photon.h" +#include "xAODCaloEvent/CaloCluster.h" +#include "xAODEgamma/EgammaxAODHelpers.h" +#include "xAODTracking/Vertex.h" +#include "xAODTracking/TrackParticle.h" +#include "xAODTracking/TrackingPrimitives.h" +#include "PathResolver/PathResolver.h" + +egammaMVASvc::egammaMVASvc(const std::string& name, ISvcLocator* svc) : + base_class( name, svc ) +{ +} + +StatusCode egammaMVASvc::initialize() +{ + ATH_MSG_DEBUG("In initialize of " << name() << "..." ); + + ATH_CHECK(m_mvaElectron.retrieve()); + ATH_CHECK(m_mvaUnconvertedPhoton.retrieve()); + ATH_CHECK(m_mvaConvertedPhoton.retrieve()); + + // ATH_MSG_DEBUG("initializing egammaMVACalib for electrons"); + // m_mvaElectron = std::make_unique<egammaMVACalib>(egammaMVACalib::egELECTRON, // particle type + // true, // use new BDT (not TMVA) + // m_folder, // folder with weight files + // "BDTG", // method + // 1, // Full Calib + // false, // not debugging + // "", // that + // "", + // "", + // "", // file pattern of xml files + // true // ignore spectators + // ); + // m_mvaElectron->msg().setLevel(this->msg().level()); + // ATH_MSG_INFO(std::string(m_use_layer_corrected ? "U" : "Not u") + "sing layer correction"); // j4f + // { + // const std::string filename = PathResolverFindCalibFile(m_folder + "/MVACalib_electron.weights.root"); + // ATH_MSG_DEBUG("configuration does not contain list of variables, try to guess:"); // TODO: because it is not implemented + // std::set<std::string> el_variables = guess_variables(filename); + // el_variables.insert({"el_cl_E", "el_cl_eta", "el_rawcl_Es0", "el_rawcl_Es1", "el_rawcl_Es2", "el_rawcl_Es3"}); // used for binning + // for (const auto var : el_variables) { ATH_MSG_DEBUG(" " << var); } + // ATH_MSG_INFO(el_variables.size() << " variables for electrons"); + + // m_MVATreeElectron = std::make_unique<egammaMVATreeElectron>("MVATreeElectron", el_variables, m_use_layer_corrected); + // m_MVATreeElectron->msg().setLevel(this->msg().level()); + // m_mvaElectron->InitTree(m_MVATreeElectron.get()); + // } + + // ATH_MSG_DEBUG("initializing egammaMVACalib for photons"); + // m_mvaPhoton = std::make_unique<egammaMVACalib>(egammaMVACalib::egPHOTON, // particle type + // true, // use new BDT (not TMVA) + // m_folder, // folder with weight files + // "BDTG", // method + // 1 , // Full Calib + // false, // not debugging + // "", // that + // "", + // "", + // "", // file pattern of xml files + // true // ignore spectators + // ); + // m_mvaPhoton->msg().setLevel(this->msg().level()); + // { + // const std::string filename_unconv = PathResolverFindCalibFile(m_folder + "/MVACalib_unconvertedPhoton.weights.root"); + // const std::string filename_conv = PathResolverFindCalibFile(m_folder + "/MVACalib_convertedPhoton.weights.root"); + // ATH_MSG_INFO("configuration does not contain list of variables, try to guess:"); // TODO: because it is not implemented + // const std::set<std::string> ph_unconv_variables = guess_variables(filename_unconv); + // const std::set<std::string> ph_conv_variables = guess_variables(filename_conv); + // std::set<std::string> ph_variables = ph_unconv_variables; + // ph_variables.insert(ph_conv_variables.begin(), ph_conv_variables.end()); + // ph_variables.insert({"ph_cl_E", "ph_cl_eta", "ph_rawcl_Es0", "ph_rawcl_Es1", "ph_rawcl_Es2", "ph_rawcl_Es3"}); // used for binning + // ATH_MSG_INFO(ph_variables.size() << " variables for photons"); + // for (const auto var : ph_variables) { ATH_MSG_INFO(" " << var); } + + // m_MVATreePhoton = CxxUtils::make_unique<egammaMVATreePhoton>("MVATreePhoton", ph_variables, m_use_layer_corrected, true); + // m_MVATreePhoton->msg().setLevel(this->msg().level()); + // m_mvaPhoton->InitTree(m_MVATreePhoton.get()); + // } + + return StatusCode::SUCCESS; +} + +std::set<std::string> egammaMVASvc::guess_variables(const std::string& filename) +{ + TFile f(filename.c_str()); + std::unique_ptr<TObjArray> formulae(dynamic_cast<TObjArray*>(f.Get("formulae"))); + formulae->SetOwner(true); // by default TObjArray doesn't own elements + if (not formulae) { ATH_MSG_FATAL("cannot find formulae in " << filename); } + + // TODO: use regex parsing (regex supported only in gcc 4.9, TPRegexp sucks) + const std::vector<std::string> all_possible_variables = { + "el_cl_E", "el_cl_eta", "el_cl_phi", "el_charge", "el_author", + "el_rawcl_Es0", "el_rawcl_Es1", "el_rawcl_Es2", "el_rawcl_Es3", "el_cl_E_TileGap3", + "el_cl_etaCalo", "el_cl_phiCalo", "el_rawcl_calibHitsShowerDepth", "el_wtots1", + "ph_cl_E", "ph_cl_eta", "ph_cl_phi", "ph_author", + "ph_rawcl_Es0", "ph_rawcl_Es1", "ph_rawcl_Es2", "ph_rawcl_Es3", "ph_cl_E_TileGap3", "ph_wtots1", + "ph_cl_etaCalo", "ph_cl_phiCalo", "ph_rawcl_calibHitsShowerDepth", + "el_charge", "el_tracketa", "el_trackpt", "el_trackz0", "el_refittedTrack_qoverp", "el_author", + "ph_Rconv", "ph_zconv", "ph_pt1conv", "ph_pt2conv", "ph_ptconv", "ph_convtrk1nPixHits", "ph_convtrk2nPixHits", "ph_convtrk1nSCTHits", "ph_convtrk2nSCTHits", + }; + + std::set<std::string> variables_found; + TIter iter(formulae.get()); + while (TNamed* obj = dynamic_cast<TNamed*>(iter())) { + const std::string expression = obj->GetTitle(); + ATH_MSG_DEBUG("searching variables in " << expression); + for (const auto var : all_possible_variables) { + const auto pos = expression.find(var); + if (pos != std::string::npos) { + if (pos + var.size() < expression.size()) { + const char next_char = expression[pos + var.size()]; + if (isalnum(next_char) or next_char == '_') continue; + } + ATH_MSG_DEBUG("found variable '" << var << "' in '" << expression << "'"); + variables_found.insert(var); + } + } + } + return variables_found; +} + +StatusCode egammaMVASvc::finalize(){ + ATH_MSG_DEBUG( "in finalize" ); + return StatusCode::SUCCESS; +} + +StatusCode egammaMVASvc::execute(xAOD::CaloCluster* cluster,const xAOD::Egamma* eg){ + if (!eg || !cluster) { + ATH_MSG_ERROR("Invalid Pointer to egamma or cluster object"); + return StatusCode::FAILURE; + } + double mvaE = getEnergy(cluster, eg); + ATH_MSG_DEBUG( "Calculated MVA calibrated energy = " << mvaE ); + if (mvaE > eg->m()) { + cluster->setCalE(mvaE); + } + else { + ATH_MSG_DEBUG("MVA energy (" << mvaE << ") < particle mass (" + << eg->m() << "), setting e = cluster energy (" << cluster->e() << ")"); + cluster->setCalE(cluster->e()); + } + return StatusCode::SUCCESS; +} + +StatusCode egammaMVASvc::execute(xAOD::CaloCluster* cluster, const xAOD::EgammaParameters::EgammaType egType){ + if (!cluster) { + ATH_MSG_ERROR("Invalid Pointer to egamma or cluster object"); + return StatusCode::FAILURE; + } + double mvaE = getEnergy(cluster, egType); + ATH_MSG_DEBUG( "Calculated MVA calibrated energy = " << mvaE ); + if (mvaE > 0) { + cluster->setCalE(mvaE); + } + else { + cluster->setCalE(cluster->e()); + } + return StatusCode::SUCCESS; +} + +StatusCode egammaMVASvc::hltexecute(xAOD::CaloCluster* cluster, const std::string& egType) { + if(!cluster){ + ATH_MSG_ERROR("Invalid Pointer to cluster object"); + return StatusCode::FAILURE; + } + double mvaE = getEnergy(cluster, egType); + ATH_MSG_DEBUG( "Calculated MVA calibrated energy = " << mvaE ); + if(mvaE > 0){ + cluster->setCalE(mvaE); + } + else{ + cluster->setCalE(cluster->e()); + } + return StatusCode::SUCCESS; +} + +float egammaMVASvc::getEnergy(const xAOD::CaloCluster* cluster, + const xAOD::Egamma* eg){ + ATH_MSG_DEBUG("In execute..."); + // Check for errors... + if ( !eg ){ + ATH_MSG_WARNING("no xAOD::Egamma object provided"); + return 0; + } + if( eg->type() == xAOD::Type::Electron ){ + ATH_MSG_DEBUG("Processing for electron"); + return getEnergy(cluster, static_cast<const xAOD::Electron*>(eg)); + } + else if (eg->type() == xAOD::Type::Photon ){ + ATH_MSG_DEBUG("Processing for photon"); + // this is because topo seeded electron (author == 128) have cluster in + // another collection, which is not decorated with etaCalo, m_cl_phiCalo + // needed by the MVA calibration + // TODO: make more general: no input -> no MVA + if (eg->author() == 128) { return cluster->e(); } + + return getEnergy(cluster, static_cast<const xAOD::Photon*>(eg)); + } + else{ + ATH_MSG_INFO("Unknown Type"); + } + return 0; +} + + +float egammaMVASvc::getEnergy(const xAOD::CaloCluster* cluster, + const std::string& egType){ + // Check for errors... + if ( !cluster ){ + ATH_MSG_WARNING("no xAOD::CaloCluster object provided"); + return 0; + } + if (egType == "Electron") { + ATH_MSG_DEBUG("Processing for type electron"); + m_MVATreeElectron->update(nullptr, cluster); + return m_mvaElectron->getMVAEnergy(); + } + else if(egType == "Photon"){ + ATH_MSG_DEBUG("Processing for type photon"); + m_MVATreePhoton->update(nullptr, cluster); + return m_mvaPhoton->getMVAEnergy(); + } + else { + ATH_MSG_WARNING("Unknown particle type"); + } + return 0; +} + +float egammaMVASvc::getEnergy(const xAOD::CaloCluster* cluster, + const xAOD::EgammaParameters::EgammaType egType){ + return ( (egType==xAOD::EgammaParameters::electron) ? + getEnergy(cluster, "Electron") : + getEnergy(cluster, "Photon")); +} + + +float egammaMVASvc::getEnergy(const xAOD::CaloCluster* cluster, + const xAOD::Electron* el){ + if(!el){ + ATH_MSG_ERROR("No electron passed"); + return 0; + } + ATH_MSG_DEBUG("updating variables electron"); + m_MVATreeElectron->update(el, cluster); + return m_mvaElectron->getMVAEnergy(); +} + +float egammaMVASvc::getEnergy(const xAOD::CaloCluster* cluster, + const xAOD::Photon* ph){ + if(!ph){ + ATH_MSG_ERROR("No photon passed"); + return 0; + } + ATH_MSG_DEBUG("updating variables photon"); + m_MVATreePhoton->update(ph, cluster); + return m_mvaPhoton->getMVAEnergy(); +} + diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h new file mode 100644 index 000000000000..7d4c6d2cf087 --- /dev/null +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h @@ -0,0 +1,59 @@ +// Dear Emacs, this is -*- C++ -*- + +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + + +#ifndef EGAMMAMVACALIB_EGAMMAMVASVC_H +#define EGAMMAMVACALIB_EGAMMAMVASVC_H + +#include <string> +#include <set> + +#include "egammaInterfaces/IegammaMVASvc.h" +#include "egammaInterfaces/IegammaMVACalibTool.h" +#include "AthenaBaseComps/AthService.h" + +class egammaMVASvc : public extends1<AthService, IegammaMVASvc> +{ +public: + /** Constructor */ + egammaMVASvc( const std::string& name, ISvcLocator* svc ); + + virtual ~egammaMVASvc() override {}; + + /** @brief initialize method*/ + virtual StatusCode initialize() override; + + /** @brief finalize method*/ + virtual StatusCode finalize() override;; + + /** Main execute. We need to calibrate the cluster. + Use full egamma object instead of Type + As we employ further variables than the ones present in the cluster + This method needs to be valid also for reconstruction + */ + + StatusCode execute(xAOD::CaloCluster* cluster,const xAOD::Egamma* eg) override; + StatusCode execute(xAOD::CaloCluster* cluster, const xAOD::EgammaParameters::EgammaType egType) override; + StatusCode hltexecute(xAOD::CaloCluster* cluster, const std::string& egType) override; + +private: + std::set<std::string> guess_variables(const std::string& filename); + + /// MVA tool for electron + ToolHandle<IegammaMVACalibTool> m_mvaElectron {this, + "MVAElectronTool", "", "Tool to handle MVA trees for electrons"}; + + /// MVA tool for uncovnerted photon + ToolHandle<IegammaMVACalibTool> m_mvaUnconvertedPhoton {this, + "MVAElectronTool", "", "Tool to handle MVA trees for unconverted photons"}; + + /// MVA tool for converted photon + ToolHandle<IegammaMVACalibTool> m_mvaConvertedPhoton {this, + "MVAElectronTool", "", "Tool to handle MVA trees for converted photons"}; + +}; + +#endif -- GitLab From 61df09fc9afbcb79a9c495965c36ad2a4d9c8195 Mon Sep 17 00:00:00 2001 From: Emmanuel Le Guirriec <emmanuel.le.guirriec@cern.ch> Date: Fri, 22 Jun 2018 16:33:08 +0200 Subject: [PATCH 243/562] Simplify the callback method: Open, read and close the file Former-commit-id: 7eeed823f782c7580873095f7b42838980e965e4 --- .../JetTagCalibration/CalibrationBroker.h | 1 - .../src/CalibrationBroker.cxx | 80 +++++-------------- 2 files changed, 20 insertions(+), 61 deletions(-) diff --git a/PhysicsAnalysis/JetTagging/JetTagCalibration/JetTagCalibration/CalibrationBroker.h b/PhysicsAnalysis/JetTagging/JetTagCalibration/JetTagCalibration/CalibrationBroker.h index 2d6b450d44b4..7c9b6251bcfb 100755 --- a/PhysicsAnalysis/JetTagging/JetTagCalibration/JetTagCalibration/CalibrationBroker.h +++ b/PhysicsAnalysis/JetTagging/JetTagCalibration/JetTagCalibration/CalibrationBroker.h @@ -117,7 +117,6 @@ private: StatusCode objectTDirExists(const std::string& histname, TFile* file); StatusCode getTObject(const std::string& histname, TFile* file, TObject*& hist); std::vector<std::string> tokenize(std::string str, std::string delim); - TFile* getFile(const std::string& guid); //ServiceHandle<IIOVDbSvc> m_IOVDbSvc; IPoolSvc* m_poolsvc; diff --git a/PhysicsAnalysis/JetTagging/JetTagCalibration/src/CalibrationBroker.cxx b/PhysicsAnalysis/JetTagging/JetTagCalibration/src/CalibrationBroker.cxx index 762a95357d25..0fa3af08e210 100755 --- a/PhysicsAnalysis/JetTagging/JetTagCalibration/src/CalibrationBroker.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagCalibration/src/CalibrationBroker.cxx @@ -7,7 +7,6 @@ #include "GaudiKernel/IToolSvc.h" #include "GaudiKernel/ISvcLocator.h" #include "AthenaPoolUtilities/CondAttrListCollection.h" -#include "AthenaPoolUtilities/CondMultChanCollection.h" #include "PoolSvc/IPoolSvc.h" #include "FileCatalog/IFileCatalog.h" #include "TH1.h" @@ -461,50 +460,6 @@ namespace Analysis { return StatusCode::SUCCESS; } -TFile* CalibrationBroker::getFile(const std::string& sguid) { - ATH_MSG_DEBUG("getFile - lookup PFN for GUID "+sguid); - std::string pfname, tech; - m_poolsvc->catalog()->getFirstPFN( sguid, pfname, tech ); - if( !pfname.empty() ) { - // now try to open file - TFile* tfile; - try { - tfile=TFile::Open(pfname.c_str(),"READ"); - if (tfile==0 || !tfile->IsOpen()) { - delete tfile; - ATH_MSG_ERROR("Problems opening input file "+pfname); - return 0; - } - } - catch (std::exception& e) { - ATH_MSG_ERROR("Exception thrown when trying to open input file "+pfname); - return 0; - } - // check file has correct internal GUID - TObjString* fguid; - tfile->GetObject("fileGUID",fguid); - if (fguid==0) { - ATH_MSG_ERROR("Input file "+pfname+" has no fileGUID object"); - return 0; - } - std::string fguidstr=(fguid->GetString().Data()); - delete fguid; - ATH_MSG_DEBUG("GUID retrieved from file is "+fguidstr+ - " expecting "+sguid); - if (fguidstr!=sguid) { - // GUIDs do not match - ATH_MSG_ERROR("GUID retrieved from file "+fguidstr+ - " does not match that in catalogue "+sguid); - return 0; - } - // file is successfully opened - return ptr - return tfile; - } else { - ATH_MSG_ERROR("No PFN found in catalogue for GUID "+sguid); - return 0; - } -} - StatusCode CalibrationBroker::callBack( IOVSVC_CALLBACK_ARGS_P(/*I*/,keys) ) { // printout the list of keys invoked - will normally only be for our @@ -537,8 +492,15 @@ TFile* CalibrationBroker::getFile(const std::string& sguid) { const std::string coolguid=citr->second["fileGUID"].data<std::string>(); ATH_MSG_DEBUG("#BTAG# Folder key "+folder+" has current file GUID "+coolguid); - // check if this file is already open - TFile* pfile=getFile(coolguid); + // Open the file + std::string pfname, tech; + m_poolsvc->catalog()->getFirstPFN(coolguid, pfname, tech ); + TFile* pfile = TFile::Open(pfname.c_str(),"READ"); + if (pfile==0 || !pfile->IsOpen()) { + delete pfile; + ATH_MSG_WARNING("Problems opening input file "+pfname); + return StatusCode::FAILURE; + } if(0 == m_nrefresh || m_recreateHistoMap){ StatusCode sc = createHistoMap(pfile); @@ -585,19 +547,17 @@ TFile* CalibrationBroker::getFile(const std::string& sguid) { } } //end loop histos } // end loop taggers - // close the file, catch exceptions just in case they have gone stale - try { - pfile->Close(); - } - catch (std::exception& e) { - ATH_MSG_ERROR("Exception closing histogram file:" << e.what()); - } - }// loop on keys - } - } - else { - ATH_MSG_DEBUG( "#BTAG# The multiple folders DB schema has been deprecated in Run2. Contact Flavour Tagging software team if you get this message."); - } + + // close the file + pfile->Close(); + delete pfile; + + }// loop on keys + } + } + else { + ATH_MSG_DEBUG( "#BTAG# The multiple folders DB schema has been deprecated in Run2. Contact Flavour Tagging software team if you get this message."); + } return StatusCode::SUCCESS; } -- GitLab From 78db76a720463b9c5c218324de77be84fe959bb3 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Fri, 22 Jun 2018 17:34:10 +0000 Subject: [PATCH 244/562] 22.0 coverity PixelMonitoring Former-commit-id: 3ad659c786aa78ba6128d4f154983542e2e5a04e --- .../PixelMonitoring/PixelMonitoring/PixelMainMon.h | 14 +++++++------- .../PixelMonitoring/src/PixelMainMon.cxx | 3 --- .../InDetMonitoring/PixelMonitoring/src/Track.cxx | 3 ++- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMainMon.h b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMainMon.h index ca712266bb70..6b24df4850dc 100755 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMainMon.h +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMainMon.h @@ -6,8 +6,8 @@ #define PIXMAINMON_H_ #include <stdint.h> -#include <string.h> -#include <time.h> +#include <string> +#include <ctime> #include <map> #include <vector> #include "AthenaMonitoring/ManagedMonitorToolBase.h" @@ -398,8 +398,8 @@ class PixelMainMon : public ManagedMonitorToolBase { TProfile* m_hiteff_lastXlb_mod[PixLayer::COUNT]; // npixhits/track/lumi - TH2F_LW* m_npixhits_per_track_lumi; - TH2F* m_npixhits_per_track_lastXlb; + TH2F_LW* m_npixhits_per_track_lumi{}; + TH2F* m_npixhits_per_track_lastXlb{}; // cluster size TH1F_LW* m_clusize_ontrack_mod[PixLayerIBL2D3D::COUNT]; @@ -478,8 +478,8 @@ class PixelMainMon : public ManagedMonitorToolBase { std::unique_ptr<PixelMon2DProfilesLW> m_errhist_femcc_errwords_map; std::unique_ptr<PixelMon2DProfilesLW> m_errhist_bitstr_occ_errors; std::unique_ptr<PixelMon2DProfilesLW> m_errhist_bitstr_occ_tot; - TProfile_LW* m_errhist_bitstr_occ_errors_avg[PixLayerIBL2D3D::COUNT]; - TProfile_LW* m_errhist_bitstr_occ_tot_avg[PixLayerIBL2D3D::COUNT]; + TProfile_LW* m_errhist_bitstr_occ_errors_avg[PixLayerIBL2D3D::COUNT]{}; + TProfile_LW* m_errhist_bitstr_occ_tot_avg[PixLayerIBL2D3D::COUNT] {}; // Histograms in 'ErrorsExpert' folder std::unique_ptr<PixelMon2DMapsLW> m_errhist_expert_maps[kNumErrorStates + kNumErrorStatesIBL]; @@ -580,7 +580,7 @@ class PixelMainMon : public ManagedMonitorToolBase { TProfile2D_LW* m_hist_LB_staveID_thermalFigureMerit; std::vector<std::string> m_atrcollist; - int m_currentLumiBlockNumber; + int m_currentLumiBlockNumber{}; class dcsDataHolder { public: diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMainMon.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMainMon.cxx index 99efd9d28b22..b36fde626548 100755 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMainMon.cxx +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMainMon.cxx @@ -27,12 +27,9 @@ #include "TrkSpacePoint/SpacePointContainer.h" #include "TrkTrack/TrackCollection.h" -#include <stdint.h> #include <cstdlib> #include <fstream> -#include <map> #include <sstream> -#include <vector> #include "GaudiKernel/StatusCode.h" #include "InDetIdentifier/PixelID.h" diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Track.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Track.cxx index fa013e1938d1..2b5565be5a0a 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Track.cxx +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Track.cxx @@ -209,7 +209,8 @@ StatusCode PixelMainMon::fillTrackMon(void) { continue; // working only with real hits (not outliers or holes) from now on } - + //need the mesb to be sensible before dereferencing it + if (not mesb) continue; const InDetDD::SiDetectorElement *side = dynamic_cast<const InDetDD::SiDetectorElement *>(mesb->associatedSurface().associatedDetectorElement()); const InDet::SiClusterOnTrack *clus = dynamic_cast<const InDet::SiClusterOnTrack *>(mesb); if (!side || !clus) continue; -- GitLab From 747a5803a7db49dc273d5ada966604756261810a Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Sat, 23 Jun 2018 00:00:06 +0200 Subject: [PATCH 245/562] xAODPFlow: Work around ROOT schema evolution bug. ROOT has a bug that can lead to random memory writes if a data member is changed from non-static to static. Work around by renaming the member. Former-commit-id: d23d081302656477dfeb9bb911dc2222fd048970 --- Event/xAOD/xAODPFlow/Root/PFO_v1.cxx | 4 ++-- Event/xAOD/xAODPFlow/xAODPFlow/versions/PFO_v1.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Event/xAOD/xAODPFlow/Root/PFO_v1.cxx b/Event/xAOD/xAODPFlow/Root/PFO_v1.cxx index a542a4e84f20..ca6cfca0b5d5 100644 --- a/Event/xAOD/xAODPFlow/Root/PFO_v1.cxx +++ b/Event/xAOD/xAODPFlow/Root/PFO_v1.cxx @@ -272,7 +272,7 @@ namespace xAOD { template<> void PFO_v1::setAttribute(PFODetails::PFOAttributes AttributeType, const float& anAttribute) { if (this->isJetETMissFloatForCompression(AttributeType)){ - float dummy = anAttribute*m_floatCompressionFactor; + float dummy = anAttribute*s_floatCompressionFactor; const static int maxIntSize = 1000000000; int internalAttribute = maxIntSize; if (dummy < 0) internalAttribute *= -1;//if we had a large -ve energy, then we should set the max size to a -ve value @@ -290,7 +290,7 @@ namespace xAOD { if (this->isJetETMissFloatForCompression(AttributeType)){ int internalAttribute; isValid = attribute<int>(AttributeType,internalAttribute); - if (true == isValid && 0 != internalAttribute) anAttribute = static_cast<float>(internalAttribute)/m_floatCompressionFactor; + if (true == isValid && 0 != internalAttribute) anAttribute = static_cast<float>(internalAttribute)/s_floatCompressionFactor; else anAttribute = 0.0; return isValid; } diff --git a/Event/xAOD/xAODPFlow/xAODPFlow/versions/PFO_v1.h b/Event/xAOD/xAODPFlow/xAODPFlow/versions/PFO_v1.h index 865042b53d88..84c325ee5df0 100644 --- a/Event/xAOD/xAODPFlow/xAODPFlow/versions/PFO_v1.h +++ b/Event/xAOD/xAODPFlow/xAODPFlow/versions/PFO_v1.h @@ -193,7 +193,7 @@ namespace xAOD { bool isJetETMissFloatForCompression(xAOD::PFODetails::PFOAttributes AttributeType) const; /** this defines the factor to compress floats by */ - const static int m_floatCompressionFactor = 1000; + const static int s_floatCompressionFactor = 1000; }; // class PFO -- GitLab From ab2a631cbec9aebfee939816ff98d8afffc9212f Mon Sep 17 00:00:00 2001 From: John Derek Chapman <chapman@hep.phy.cam.ac.uk> Date: Fri, 22 Jun 2018 20:53:43 +0000 Subject: [PATCH 246/562] Merge branch 'MTGforNSWin213' into '21.3' adjustment of MuonTrackingGeometry to properly build NSW See merge request atlas/athena!11912 (cherry picked from commit 1d046bb2e7dfa4a01d1a9025368f7c2afa1ba013 [formerly 7749f9702c6f9586dd11d3baa4d782187b94efb4]) d95c188a adjustment of MuonTrackingGeometry to properly build NSW Former-commit-id: 2b43c4e7183af73a4a960637c26c641386eecd8a --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../MuonInertMaterialBuilder.h | 1 + .../MuonTrackingGeometry/MuonStationBuilder.h | 2 +- .../src/MuonInertMaterialBuilder.cxx | 29 +++++-- .../src/MuonStationBuilder.cxx | 84 ++++++++++--------- .../src/MuonStationTypeBuilder.cxx | 70 +++++++++++----- 6 files changed, 118 insertions(+), 68 deletions(-) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 diff --git a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/MuonTrackingGeometry/MuonInertMaterialBuilder.h b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/MuonTrackingGeometry/MuonInertMaterialBuilder.h index 5bc1780fa9da..499ba224c6ee 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/MuonTrackingGeometry/MuonInertMaterialBuilder.h +++ b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/MuonTrackingGeometry/MuonInertMaterialBuilder.h @@ -106,6 +106,7 @@ namespace Muon { int m_buildRails; // build rails bool m_buildShields; // build shieldings bool m_buildSupports; // build other + bool m_buildNSWInert; // build NSW inert material double m_blendLimit; // volume limit for blending (except shields) mutable Trk::Material m_muonMaterial; //!< the material //mw diff --git a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/MuonTrackingGeometry/MuonStationBuilder.h b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/MuonTrackingGeometry/MuonStationBuilder.h index c6eb83a44a31..cbd6d74d47b7 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/MuonTrackingGeometry/MuonStationBuilder.h +++ b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/MuonTrackingGeometry/MuonStationBuilder.h @@ -79,7 +79,7 @@ namespace Muon { void encloseLayers( const Trk::DetachedTrackingVolume* ) const; void identifyLayers(const Trk::DetachedTrackingVolume*, int, int ) const; void identifyPrototype(const Trk::TrackingVolume*, int, int, Amg::Transform3D ) const; - void getObjsForTranslation(const GeoVPhysVol* pv, std::string name, Amg::Transform3D , std::vector<std::pair<std::pair<const GeoLogVol*,Trk::MaterialProperties*>,std::vector<Amg::Transform3D> > >& vols, std::vector<std::string>& volNames ) const; + void getNSWStationsForTranslation(const GeoVPhysVol* pv, std::string name, Amg::Transform3D , std::vector<std::pair<std::pair<const GeoLogVol*,Trk::MaterialProperties*>,std::vector<Amg::Transform3D> > >& vols, std::vector<std::string>& volNames ) const; const MuonGM::MuonDetectorManager* m_muonMgr; //!< the MuonDetectorManager const MdtIdHelper* m_mdtIdHelper; //!< diff --git a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonInertMaterialBuilder.cxx b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonInertMaterialBuilder.cxx index 82fa57daf47c..18e24450ecff 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonInertMaterialBuilder.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonInertMaterialBuilder.cxx @@ -87,6 +87,7 @@ Muon::MuonInertMaterialBuilder::MuonInertMaterialBuilder(const std::string& t, c m_buildRails(1), m_buildShields(true), m_buildSupports(true), + m_buildNSWInert(true), m_blendLimit(3e+09), m_materialConverter(0), m_geoShapeConverter(0), @@ -232,9 +233,11 @@ const std::vector<std::pair<const Trk::DetachedTrackingVolume*,std::vector<Amg:: const GeoLogVol* clv = cv->getLogVol(); std::string vname = clv->getName(); - if ( vname.size()<8 && vname.substr(0,3)=="NSW" ) { // do nothing, probably NSW station - } else if ( vname.size()>=8 && vname.substr(0,8)=="NewSmall" ) { // do nothing, probably NSW station - } else if ( vname.size()>7 && vname.substr(vname.size()-7,7) =="Station") { // do nothing, active station +// if ( vname.size()<8 && vname.substr(0,3)=="NSW" && vname.substr(1,4)=="sTGC" ) { // do nothing NSW sTGC station +// } else if ( vname.size()<8 && vname.substr(0,3)=="NSW" && vname.substr(1,2)=="MM" ) { // do nothing NSW MM station +// } else if ( vname.size()>=8 && vname.substr(0,8)=="NewSmall" && vname.substr(1,4)=="sTGC" ) { // do nothing, probably NSW station +// } else if ( vname.size()>=8 && vname.substr(0,8)=="NewSmall" && vname.substr(1,2)=="MM" ) { // do nothing, probably NSW station + if ( vname.size()>7 && vname.substr(vname.size()-7,7) =="Station") { // do nothing, active station } else { //std::cout << " INERT muon object found:" << vname << std::endl; @@ -246,8 +249,14 @@ const std::vector<std::pair<const Trk::DetachedTrackingVolume*,std::vector<Amg:: else if ( vname.substr(0,4)=="Feet" || ( vname.size()>7 && (vname.substr(3,4)=="Feet" || vname.substr(4,4)=="Feet" ) ) ) accepted = m_buildFeets ? true : false; else if ( vname.substr(0,4)=="Rail" ) accepted = m_buildRails>0 ? true : false; - else if ( vname.substr(0,1)!="J" ) accepted = m_buildSupports>0 ? true : false; - else if ( vname.substr(0,1)=="J" ) accepted = m_buildShields>0 ? true : false; + else if ( vname.substr(0,1)=="J" ) accepted = m_buildShields>0 ? true : false; + // NSW build inertmaterial for spacer frame, aluminium HUB, NJD disk and A plate + else if ( vname.substr(0,3)=="NSW" && vname.substr(1,6)=="Spacer") accepted = m_buildNSWInert ? true : false; + else if ( vname.substr(0,3)=="NSW" && vname.substr(1,2)=="Al") accepted = m_buildNSWInert ? true : false; + else if ( vname.substr(0,3)=="NJD") accepted = m_buildNSWInert ? true : false; + else if ( vname.substr(0,1)=="A" && vname.substr(1,5)=="Plate") accepted = m_buildNSWInert ? true : false; + // strange NSW will be anyway build + else if ( vname.substr(0,1)!="J" ) accepted = m_buildSupports>0 ? true : false; //if ( vname=="EdgeBTVoussoir" && accepted && m_simplify ) accepted = false; @@ -281,6 +290,10 @@ const std::vector<std::pair<const Trk::DetachedTrackingVolume*,std::vector<Amg:: std::string protoName = vname; if (!simpleTree) protoName = vname+(vols[ish].first->getName()); + std::string pName = vols[ish].first->getName(); + ATH_MSG_VERBOSE(" check in pName " << pName << ", made of "<<vols[ish].first->getMaterial()->getName()<< " x0 " << vols[ish].first->getMaterial()->getRadLength() <<","<<vols[ish].first->getShape()->type()); + // if(pName.substr(0,6)=="sTGC_1") continue; + // if(pName.substr(0,4)=="MM_1") continue; bool found = false; for (unsigned int ip=0; ip<objs.size();ip++) { @@ -565,7 +578,7 @@ void Muon::MuonInertMaterialBuilder::getObjsForTranslation(const GeoVPhysVol* pv { // subcomponents unsigned int nc = pv->getNChildVols(); - //std::cout << "getObjsForTranslation from:"<< pv->getLogVol()->getName()<<","<<pv->getLogVol()->getMaterial()->getName()<<", looping over "<< nc << " children" << std::endl; + ATH_MSG_VERBOSE( " INERT getObjsForTranslation from:"<< pv->getLogVol()->getName()<<","<<pv->getLogVol()->getMaterial()->getName()<<", looping over "<< nc << " children" ); for (unsigned int ic=0; ic<nc; ic++) { Amg::Transform3D transf = Amg::CLHEPTransformToEigen(pv->getXToChildVol(ic)); const GeoVPhysVol* cv = &(*(pv->getChildVol(ic))); @@ -583,8 +596,8 @@ void Muon::MuonInertMaterialBuilder::getObjsForTranslation(const GeoVPhysVol* pv std::vector<Amg::Transform3D > volTr; volTr.push_back(transform*transf); vols.push_back(std::pair<const GeoLogVol*,std::vector<Amg::Transform3D> > (clv,volTr) ); -// std::cout << "new volume added:"<< clv->getName() <<","<<clv->getMaterial()->getName()<<std::endl; -// printInfo(cv); + ATH_MSG_VERBOSE( "INERT new volume added:"<< clv->getName() <<","<<clv->getMaterial()->getName() ); + if( msg().level() <= MSG::VERBOSE ) printInfo(cv); } } else { getObjsForTranslation(cv, transform*transf, vols); diff --git a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonStationBuilder.cxx b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonStationBuilder.cxx index a56859e0ff1d..85ed4948eb56 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonStationBuilder.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonStationBuilder.cxx @@ -192,11 +192,13 @@ const std::vector<const Trk::DetachedTrackingVolume*>* Muon::MuonStationBuilder: volNames.push_back(vname); simpleTree = true; } else { - getObjsForTranslation(cv,"",Amg::Transform3D(Trk::s_idTransform),vols,volNames ); + getNSWStationsForTranslation(cv,"",Amg::Transform3D(Trk::s_idTransform),vols,volNames ); } input_shapes.resize(vols.size()); for (unsigned int i=0;i<vols.size();i++) input_shapes[i]=vols[i].first.first->getShape(); + ATH_MSG_DEBUG( vname <<" processing NSW " << " nr of selected volumes " << vols.size()); + // initial solution // Large/Small sector envelope englobing (4+4+1+4+4)x 4(rings) = 68 layers identified with simId (station type,ring,phi,sector,multi,layer) // @@ -216,6 +218,10 @@ const std::vector<const Trk::DetachedTrackingVolume*>* Muon::MuonStationBuilder: std::string protoName = vname; if (!simpleTree) protoName = vname+"_"+volNames[ish]; + // Got to mothervolume of sTGC_Sensitive/sTGC_Frame and MM_Sensitive/MM_Frame: TGCGas ArCo2 + ATH_MSG_DEBUG( " ish " << ish << " protoName14 "<< protoName.substr(1,4) << " volName04 " << volNames[ish].substr(0,4)); + if(volNames[ish].substr(0,4)!="sTGC" && volNames[ish].substr(0,2)!="MM") continue; + std::string oName = protoName.substr(protoName.find("-")+1); Identifier nswId = m_muonStationTypeBuilder->identifyNSW(oName, vols[ish].second[0]); @@ -292,7 +298,7 @@ const std::vector<const Trk::DetachedTrackingVolume*>* Muon::MuonStationBuilder: // create active layer // change of boundary type ( VP1 problems with rotated trapezoid ) //Trk::RotatedTrapezoidBounds* tbounds = new Trk::RotatedTrapezoidBounds(*rtrd); - Trk::TrapezoidBounds* tbounds = new Trk::TrapezoidBounds(rtrd->minHalflengthY(),rtrd->maxHalflengthY(),rtrd->halflengthX()); + Trk::RotatedTrapezoidBounds* tbounds = new Trk::RotatedTrapezoidBounds(rtrd->halflengthX(),rtrd->minHalflengthY(),rtrd->maxHalflengthY()); Trk::SharedObject<const Trk::SurfaceBounds> bounds(tbounds); Trk::OverlapDescriptor* od=0; double thickness=(mat.fullMaterial(layTransf.translation()))->thickness(); @@ -306,8 +312,10 @@ const std::vector<const Trk::DetachedTrackingVolume*>* Muon::MuonStationBuilder: if (isLargeSector) sectorL.push_back(layer); else sectorS.push_back(layer); - if(isLargeSector) ATH_MSG_INFO( "new prototype build for Large sector: " << protoName <<","<<vols[ish].second.size() ); - if(!isLargeSector) ATH_MSG_INFO( "new prototype build for Small sector: " << protoName <<","<<vols[ish].second.size() ); + if(isLargeSector) ATH_MSG_INFO( "new NSW prototype build for Large sector: " << protoName <<", "<<vols[ish].second.size() << " x0 " << mat.fullMaterial(layTransf.translation())->x0() << " thickness " << (mat.fullMaterial(layTransf.translation()))->thickness() ); + if(!isLargeSector) ATH_MSG_INFO( "new NSW prototype build for Large sector: " << protoName <<", "<<vols[ish].second.size() << " x0 " << mat.fullMaterial(layTransf.translation())->x0()<< " thickness " << (mat.fullMaterial(layTransf.translation()))->thickness() ); + } else { + ATH_MSG_DEBUG( " NO layer build for: " << protoName); } } // end new object @@ -412,7 +420,7 @@ const std::vector<const Trk::DetachedTrackingVolume*>* Muon::MuonStationBuilder: // clone station from prototype :: CHECK z<0 side, probably turns in wrong direction Amg::Transform3D ntransf(Amg::AngleAxis3D(it*0.25*M_PI,Amg::Vector3D(0.,0.,1.))); const Trk::DetachedTrackingVolume* newStat = mtypeL->clone("NSWL",ntransf); - ATH_MSG_DEBUG( "cloned 3 NSWL station:"<<newStat->trackingVolume()->center() ); + ATH_MSG_DEBUG( "cloned NSWL station:"<<newStat->trackingVolume()->center() ); // recalculate identifiers const std::vector<const Trk::Layer*>* lays=newStat->trackingVolume()->confinedArbitraryLayers(); for (unsigned int il=0; il<lays->size(); il++) { @@ -458,7 +466,7 @@ const std::vector<const Trk::DetachedTrackingVolume*>* Muon::MuonStationBuilder: // clone station from prototype Amg::Transform3D ntransf(Amg::AngleAxis3D(it*0.25*M_PI,Amg::Vector3D(0.,0.,1.))); const Trk::DetachedTrackingVolume* newStat = typeS->clone("NSWS",ntransf); - ATH_MSG_DEBUG( "cloned 1 NSWS station:"<<newStat->trackingVolume()->center() ); + ATH_MSG_DEBUG( "cloned NSWS station:"<<newStat->trackingVolume()->center() ); // recalculate identifiers const std::vector<const Trk::Layer*>* lays=newStat->trackingVolume()->confinedArbitraryLayers(); for (unsigned int il=0; il<lays->size(); il++) { @@ -502,7 +510,7 @@ const std::vector<const Trk::DetachedTrackingVolume*>* Muon::MuonStationBuilder: Amg::AngleAxis3D(+M_PI,Amg::Vector3D(1.,0.,0.))* Amg::AngleAxis3D(-phiS,Amg::Vector3D(0.,0.,1.))); const Trk::DetachedTrackingVolume* mtypeS = typeS->clone("NSWL",ntransf); - ATH_MSG_DEBUG( "cloned 2 NSWS station:"<<mtypeS->trackingVolume()->center() ); + ATH_MSG_DEBUG( "cloned NSWS station:"<<mtypeS->trackingVolume()->center() ); // recalculate identifiers const std::vector<const Trk::Layer*>* lays=mtypeS->trackingVolume()->confinedArbitraryLayers(); for (unsigned int il=0; il<lays->size(); il++) { @@ -541,7 +549,7 @@ const std::vector<const Trk::DetachedTrackingVolume*>* Muon::MuonStationBuilder: // clone station from prototype :: CHECK z<0 side, probably turns in wrong direction Amg::Transform3D ntransf( Amg::AngleAxis3D(it*0.25*M_PI, Amg::Vector3D(0.,0.,1.))); const Trk::DetachedTrackingVolume* newStat = mtypeS->clone("NSWL",ntransf); - ATH_MSG_DEBUG( "cloned 3 NSWS station:"<<newStat->trackingVolume()->center() ); + ATH_MSG_DEBUG( "cloned NSWS station:"<<newStat->trackingVolume()->center() ); // recalculate identifiers const std::vector<const Trk::Layer*>* lays=newStat->trackingVolume()->confinedArbitraryLayers(); for (unsigned int il=0; il<lays->size(); il++) { @@ -1405,42 +1413,30 @@ void Muon::MuonStationBuilder::identifyPrototype(const Trk::TrackingVolume* stat } -void Muon::MuonStationBuilder::getObjsForTranslation(const GeoVPhysVol* pv, std::string name, Amg::Transform3D transform, std::vector<std::pair<std::pair<const GeoLogVol*,Trk::MaterialProperties*> , std::vector<Amg::Transform3D> > >& vols, std::vector< std::string >& volNames ) const +void Muon::MuonStationBuilder::getNSWStationsForTranslation(const GeoVPhysVol* pv, std::string name, Amg::Transform3D transform, std::vector<std::pair<std::pair<const GeoLogVol*,Trk::MaterialProperties*> , std::vector<Amg::Transform3D> > >& vols, std::vector< std::string >& volNames ) const { + // special code to get the Sensitive volume of the sTGC and MM (so the gas volume) throught the Frame + // subcomponents unsigned int nc = pv->getNChildVols(); - double thick = 2*m_muonStationTypeBuilder->get_x_size(pv); - double vol = m_muonStationTypeBuilder->getVolume(pv->getLogVol()->getShape()); - Trk::MaterialProperties matComb = m_muonStationTypeBuilder->getAveragedLayerMaterial(pv,vol,thick); - ATH_MSG_VERBOSE("getObjsForTranslation from:"<< pv->getLogVol()->getName()<<","<<pv->getLogVol()->getMaterial()->getName()<<", looping over "<< nc << " children" << " thick " << thick ); - //if (matComb) std::cout << "thickness, averaged x0:"<< matComb->thickness()<<","<< matComb->x0()<< std::endl; - //double dInX0 = matComb->thickness()/matComb->x0(); + ATH_MSG_DEBUG("getNSWStationsForTranslation from:"<< pv->getLogVol()->getName()<<","<<pv->getLogVol()->getMaterial()->getName()<<", looping over "<< nc << " children"); + for (unsigned int ic=0; ic<nc; ic++) { Amg::Transform3D transf = Amg::CLHEPTransformToEigen( pv->getXToChildVol(ic)); const GeoVPhysVol* cv = &(*(pv->getChildVol(ic))); const GeoLogVol* clv = cv->getLogVol(); std::string childName = clv->getName(); - bool matMode = false; + ATH_MSG_DEBUG("getNSWStationsForTranslation child " << childName); + if (childName=="") childName="Spacer"; - ATH_MSG_VERBOSE("Inside child:" << childName << " " << 2*m_muonStationTypeBuilder->get_x_size(cv)<<" vol "<<vol); if (childName.size()>9 && childName.substr(childName.size()-9,9)=="Sensitive") { std::stringstream st; st << ic; childName=childName+st.str(); - matMode = true; - ATH_MSG_VERBOSE(" keep material from mother volume "); - } - if (!matMode ) { //don't take material from mother volume - thick = 2*m_muonStationTypeBuilder->get_x_size(cv); - vol = m_muonStationTypeBuilder->getVolume(cv->getLogVol()->getShape()); - ATH_MSG_VERBOSE("collecting material from child volume:" << cv->getLogVol()->getName() << " " <<thick<<" vol "<<vol); - matComb = m_muonStationTypeBuilder->getAveragedLayerMaterial(cv,vol,thick); - //if(matComb) std::cout << "thickness, averaged x0:"<< matComb->thickness()<<","<< matComb->x0()<< std::endl; - //dInX0 = matComb->thickness()/matComb->x0(); } std::string cName = childName.substr(0,3)=="NSW" || childName.substr(0,8)=="NewSmall"? name : name+childName; - ATH_MSG_VERBOSE("child number,name,position:"<< ic<<":"<<clv->getName() <<":"<< (transform*transf).translation().perp() <<","<<(transform*transf).translation().z()<<","<<(transform*transf).translation().phi()); + ATH_MSG_VERBOSE( "child number,name,position:"<< ic<<":"<<clv->getName() <<":"<< (transform*transf).translation().perp() <<","<<(transform*transf).translation().z()<<","<<(transform*transf).translation().phi() ); if (!cv->getNChildVols()) { bool found = false; @@ -1453,7 +1449,7 @@ void Muon::MuonStationBuilder::getObjsForTranslation(const GeoVPhysVol* pv, std: if ( phiTr>-0.001 && phiTr<0.4 ) { vols[is].second.insert(vols[is].second.begin(),transform*transf); } else vols[is].second.push_back(transform*transf); - ATH_MSG_VERBOSE(" volume found " << clv->getName() <<" R "<<(transform*transf).translation().perp()<<" z "<<(transform*transf).translation().z()<<","<<phiTr << " thicknessInX0() " << vols[is].first.second->thicknessInX0()); + ATH_MSG_VERBOSE( "clone?" << clv->getName() <<","<<(transform*transf).translation().perp()<<","<<(transform*transf).translation().z()<<","<<phiTr ); break; } @@ -1464,26 +1460,34 @@ void Muon::MuonStationBuilder::getObjsForTranslation(const GeoVPhysVol* pv, std: volTr.push_back(transform*transf); // divide mother material ? seems strange - check ! //double scale = 1.; // 1./nc; - Trk::MaterialProperties* nMat=new Trk::MaterialProperties(matComb); - - std::pair<const GeoLogVol*,Trk::MaterialProperties*> cpair(clv,nMat); - vols.push_back(std::pair<std::pair<const GeoLogVol*,Trk::MaterialProperties*>,std::vector<Amg::Transform3D> > (cpair,volTr) ); - volNames.push_back(cName); - ATH_MSG_VERBOSE("new volume added:"<< cName <<","<<clv->getMaterial()->getName()<< " R " << volTr.back().translation().perp() <<" z "<< volTr.back().translation().z()<<" phi "<<volTr.back().translation().phi()<<" matComb thicknessInXn :"<<nMat->thicknessInX0()); - //printInfo(cv) + double thick = 2*m_muonStationTypeBuilder->get_x_size(pv); + if(pv->getLogVol()->getMaterial()->getName()!="Ether" && (childName=="MM_Frame" || childName=="sTGC_Frame")) { + Trk::MaterialProperties matComb(0.,10.e10,10.e10,13.,26.,0.); + Trk::Material newMat= m_materialConverter->convert( pv->getLogVol()->getMaterial() ); + matComb.addMaterial(newMat,thick/newMat.x0()); + ATH_MSG_VERBOSE(" use mother volume thickness, x0: "<< matComb.thickness()<<", "<< matComb.x0()<<" mat: "<<matComb.thicknessInX0()); + Trk::MaterialProperties* nMat=new Trk::MaterialProperties(matComb); + // store mother volume (and not child = Frame) + std::pair<const GeoLogVol*,Trk::MaterialProperties*> cpair(pv->getLogVol(), nMat); + vols.push_back(std::pair<std::pair<const GeoLogVol*, Trk::MaterialProperties*>, std::vector<Amg::Transform3D> > (cpair, volTr) ); + // store extensive name + volNames.push_back(cName); + ATH_MSG_VERBOSE("new NSW station volume added:"<< cName <<", "<<clv->getMaterial()->getName()<<", "<< volTr.back().translation().z()<<", "<<volTr.back().translation().phi()<<" mat: "<<matComb.thicknessInX0()); + } + //printInfo(cv); } } else { - getObjsForTranslation(cv, cName, transform*transf, vols, volNames); + getNSWStationsForTranslation(cv, cName, transform*transf, vols, volNames); } } } /* -void Muon::MuonStationBuilder::getObjsForTranslation(const GeoVPhysVol* pv, std::string name, HepGeom::Transform3D transform, std::vector<std::pair<const GeoLogVol*, std::vector<HepGeom::Transform3D> > >& vols, std::vector< std::string >& volNames ) const +void Muon::MuonStationBuilder::getNSWStationsForTranslation(const GeoVPhysVol* pv, std::string name, HepGeom::Transform3D transform, std::vector<std::pair<const GeoLogVol*, std::vector<HepGeom::Transform3D> > >& vols, std::vector< std::string >& volNames ) const { // subcomponents unsigned int nc = pv->getNChildVols(); - std::cout << "getObjsForTranslation from:"<< pv->getLogVol()->getName()<<","<<pv->getLogVol()->getMaterial()->getName()<<", looping over "<< nc << " children" << std::endl; + std::cout << "getNSWStationsForTranslation from:"<< pv->getLogVol()->getName()<<","<<pv->getLogVol()->getMaterial()->getName()<<", looping over "<< nc << " children" << std::endl; for (unsigned int ic=0; ic<nc; ic++) { HepGeom::Transform3D transf = pv->getXToChildVol(ic); const GeoVPhysVol* cv = &(*(pv->getChildVol(ic))); @@ -1522,7 +1526,7 @@ void Muon::MuonStationBuilder::getObjsForTranslation(const GeoVPhysVol* pv, std: //printInfo(cv); } //} else { - // getObjsForTranslation(cv, cName, transform*transf, vols, volNames); + // getNSWStationsForTranslation(cv, cName, transform*transf, vols, volNames); // } } } diff --git a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonStationTypeBuilder.cxx b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonStationTypeBuilder.cxx index 73547d82782a..de1b40e0abd8 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonStationTypeBuilder.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonStationTypeBuilder.cxx @@ -2749,6 +2749,13 @@ const Trk::Layer* Muon::MuonStationTypeBuilder::createLayer(const Trk::TrackingV const Trk::CuboidVolumeBounds* cubBounds= dynamic_cast<const Trk::CuboidVolumeBounds*> (&(trVol->volumeBounds())); const Trk::TrapezoidVolumeBounds* trdBounds= dynamic_cast<const Trk::TrapezoidVolumeBounds*> (&(trVol->volumeBounds())); const Trk::DoubleTrapezoidVolumeBounds* dtrdBounds= dynamic_cast<const Trk::DoubleTrapezoidVolumeBounds*> (&(trVol->volumeBounds())); + const Trk::SimplePolygonBrepVolumeBounds* pbBounds = dynamic_cast<const Trk::SimplePolygonBrepVolumeBounds*> (&(trVol->volumeBounds())); + + if(cubBounds) ATH_MSG_VERBOSE( "before loop -- cubBounds " ); + else if(trdBounds) ATH_MSG_VERBOSE("before loop -- trdBounds " ); + else if(dtrdBounds) ATH_MSG_VERBOSE("before loop -- dtrdBounds " ); + else if(pbBounds) ATH_MSG_VERBOSE("before loop -- pbBounds " ); + else ATH_MSG_VERBOSE("before loop -- no Bounds " ); Amg::Transform3D subt(Trk::s_idTransform); @@ -2756,24 +2763,40 @@ const Trk::Layer* Muon::MuonStationTypeBuilder::createLayer(const Trk::TrackingV if (subBounds) { subt *= Amg::AngleAxis3D(0.5*M_PI,Amg::Vector3D(0.,1.,0.))* Amg::AngleAxis3D(0.5*M_PI,Amg::Vector3D(0.,0.,1.)); while (subBounds) { - //std::cout << "looping over subtracted volume bounds:outer,inner position:"<< subBounds->outer()->center()<<"," << subBounds->inner()->center() << std::endl; - cubBounds= dynamic_cast<const Trk::CuboidVolumeBounds*> (&(subBounds->outer()->volumeBounds())); - trdBounds= dynamic_cast<const Trk::TrapezoidVolumeBounds*> (&(subBounds->outer()->volumeBounds())); - dtrdBounds= dynamic_cast<const Trk::DoubleTrapezoidVolumeBounds*> (&(subBounds->outer()->volumeBounds())); + ATH_MSG_VERBOSE( "looping over subtracted volume bounds:outer,inner position:"<< subBounds->outer()->center()<<"," << subBounds->inner()->center() ); + const Trk::CuboidVolumeBounds* ocubBounds = dynamic_cast<const Trk::CuboidVolumeBounds*> (&(subBounds->outer()->volumeBounds())); + const Trk::TrapezoidVolumeBounds* otrdBounds = dynamic_cast<const Trk::TrapezoidVolumeBounds*> (&(subBounds->outer()->volumeBounds())); + const Trk::DoubleTrapezoidVolumeBounds* odtrdBounds= dynamic_cast<const Trk::DoubleTrapezoidVolumeBounds*> (&(subBounds->outer()->volumeBounds())); + const Trk::SimplePolygonBrepVolumeBounds* opbBounds = dynamic_cast<const Trk::SimplePolygonBrepVolumeBounds*> (&(subBounds->outer()->volumeBounds())); + ATH_MSG_VERBOSE( "outer volume:box,trd,dtrd,spb,subtr:" <<ocubBounds<<"," << otrdBounds<<"," <<odtrdBounds << "," << opbBounds <<","<< subBounds ); + if(ocubBounds) cubBounds = ocubBounds; + if(otrdBounds) trdBounds = otrdBounds; + if(odtrdBounds) dtrdBounds = odtrdBounds; + if(opbBounds) pbBounds = opbBounds; + +// if (&(subBounds->inner()->volumeBounds()) ) { +// const Trk::CuboidVolumeBounds* icubBounds= dynamic_cast<const Trk::CuboidVolumeBounds*> (&(subBounds->inner()->volumeBounds())); +// const Trk::TrapezoidVolumeBounds* itrdBounds= dynamic_cast<const Trk::TrapezoidVolumeBounds*> (&(subBounds->inner()->volumeBounds())); +// const Trk::DoubleTrapezoidVolumeBounds* idtrdBounds= dynamic_cast<const Trk::DoubleTrapezoidVolumeBounds*> (&(subBounds->inner()->volumeBounds())); +// const Trk::SubtractedVolumeBounds* isubBounds= dynamic_cast<const Trk::SubtractedVolumeBounds*> (&(subBounds->inner()->volumeBounds())); +// std::cout << "inner volume:box,trd,dtrd,subtr:" <<icubBounds<<"," << itrdBounds<<"," <<idtrdBounds << ","<< isubBounds << std::endl; +// if(icubBounds&&!cubBounds) cubBounds = icubBounds; +// if(itrdBounds&&!trdBounds) trdBounds = itrdBounds; +// if(idtrdBounds&&!dtrdBounds) dtrdBounds = idtrdBounds; +// } subBounds= dynamic_cast<const Trk::SubtractedVolumeBounds*> (&(subBounds->outer()->volumeBounds())); - - /* - if (&(subBounds->inner()->volumeBounds()) ) { - const Trk::CuboidVolumeBounds* icubBounds= dynamic_cast<const Trk::CuboidVolumeBounds*> (&(subBounds->inner()->volumeBounds())); - //const Trk::TrapezoidVolumeBounds* itrdBounds= dynamic_cast<const Trk::TrapezoidVolumeBounds*> (&(subBounds->inner()->volumeBounds())); - //const Trk::DoubleTrapezoidVolumeBounds* idtrdBounds= dynamic_cast<const Trk::DoubleTrapezoidVolumeBounds*> (&(subBounds->inner()->volumeBounds())); - //const Trk::SubtractedVolumeBounds* isubBounds= dynamic_cast<const Trk::SubtractedVolumeBounds*> (&(subBounds->inner()->volumeBounds())); - //std::cout << "inner volume:box,trd,subtr:" <<icubBounds<<"," << itrdBounds<<"," << isubBounds << std::endl; - } - */ } } + if(cubBounds) ATH_MSG_VERBOSE( "after loop -- cubBounds " ); + else if(trdBounds) ATH_MSG_VERBOSE("after loop -- trdBounds " ); + else if(dtrdBounds) ATH_MSG_VERBOSE("after loop -- dtrdBounds " ); + else if(pbBounds) ATH_MSG_VERBOSE("after loop -- pbBounds " ); + else { + ATH_MSG_VERBOSE("after loop -- no Bounds "); + return layRepr; + } + const Trk::PlaneLayer* layer = 0; if (cubBounds) { @@ -2838,6 +2861,9 @@ const Trk::Layer* Muon::MuonStationTypeBuilder::createLayer(const Trk::TrackingV layer = new Trk::PlaneLayer(new Amg::Transform3D(trVol->transform()), bounds, mat, thickness, od, 1 ); delete surfs; + } else if (pbBounds) { + ATH_MSG_WARNING( " no implementatiom for SimplePolygonBrepBounds " ); + return layRepr; } //std::cout << "station:"<<trVol->volumeName()<<",thickness:"<<layer->thickness()<<std::endl; @@ -2881,7 +2907,7 @@ Trk::MaterialProperties Muon::MuonStationTypeBuilder::collectStationMaterial(con double scale = rect ? 4*rect->halflengthX()*rect->halflengthY()/sf : 2*(trap->minHalflengthX()+trap->maxHalflengthX())*trap->halflengthY()/sf; // protect nan - if (mLay && lays[il]->thickness()>0 && mLay->material().x0()>0.) { + if (lays[il]->thickness()>0 && mLay->material().x0()>0.) { layMat.addMaterial(mLay->material(),scale*lays[il]->thickness()/mLay->material().x0()); ATH_MSG_VERBOSE(" collectStationMaterial after add confined sub lay " << layMat ); } @@ -2896,8 +2922,11 @@ Trk::MaterialProperties Muon::MuonStationTypeBuilder::collectStationMaterial(con const std::vector<const Trk::Layer*> lays = subVols[iv]->confinedLayers()->arrayObjects(); for (unsigned il=0; il<lays.size(); il++) { const Trk::MaterialProperties* mLay = lays[il]->layerMaterialProperties()->fullMaterial(lays[il]->surfaceRepresentation().center()); - if (mLay) layMat.addMaterial(mLay->material(),lays[il]->thickness()/mLay->material().x0()); - if (mLay) ATH_MSG_VERBOSE(" collectStationMaterial after add confined vol " << layMat ); + // protect nan + if (mLay && lays[il]->thickness()>0 && mLay->material().x0()>0.) { + layMat.addMaterial(mLay->material(),lays[il]->thickness()/mLay->material().x0()); + ATH_MSG_VERBOSE(" collectStationMaterial after add confined vol " << layMat ); + } } } if (subVols[iv]->confinedArbitraryLayers()){ @@ -2910,8 +2939,11 @@ Trk::MaterialProperties Muon::MuonStationTypeBuilder::collectStationMaterial(con if ((rect || trap) && mLay) { double scale = rect ? 4*rect->halflengthX()*rect->halflengthY()/sf : 2*(trap->minHalflengthX()+trap->maxHalflengthX())*trap->halflengthY()/sf; - layMat.addMaterial(mLay->material(),scale*lays[il]->thickness()/mLay->material().x0()); - ATH_MSG_VERBOSE(" collectStationMaterial after add sub vols " << layMat ); + // protect nan + if (lays[il]->thickness()>0 && mLay->material().x0()>0.) { + layMat.addMaterial(mLay->material(),scale*lays[il]->thickness()/mLay->material().x0()); + ATH_MSG_VERBOSE(" collectStationMaterial after add sub vols " << layMat ); + } } } } -- GitLab From 01a16d2c98ec4c020918a89690ecbfcf5c214504 Mon Sep 17 00:00:00 2001 From: John Derek Chapman <chapman@hep.phy.cam.ac.uk> Date: Fri, 22 Jun 2018 20:52:49 +0000 Subject: [PATCH 247/562] Merge branch 'MuGirlForNSW_213_20180619' into '21.3' no Hough seeded segment finding to make MuGirl run for NSW See merge request atlas/athena!12223 (cherry picked from commit 62eaa8d32720b6a88be5f54f93be53cea26e971d [formerly 2f4cd4f423945516d3b0c9d6eb916e74df4a08e8]) 55aaabeb no Hough seeded segment finding to make MuGirl run for NSW Former-commit-id: d4a3f722400094e6fddc22cd82185ed76c9b735d --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../src/MuonPRDSelectionTool.cxx | 10 ++++ .../src/MuonSystemExtensionTool.cxx | 10 ++-- .../src/MuonLayerSegmentFinderTool.cxx | 48 +++++++++++++++++-- .../src/MuonLayerSegmentFinderTool.h | 3 ++ 5 files changed, 64 insertions(+), 7 deletions(-) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 diff --git a/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonPRDSelectionTool.cxx b/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonPRDSelectionTool.cxx index 1e29ba7fc1c1..66240d99d61b 100644 --- a/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonPRDSelectionTool.cxx +++ b/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonPRDSelectionTool.cxx @@ -89,6 +89,16 @@ namespace Muon { calibrateAndSelectCluster(intersection,*col,layerROTs); } + // loop over STGC collections + for( auto col : layerPrepRawData.stgcs ){ + calibrateAndSelectCluster(intersection,*col,layerROTs); + } + + // loop over MM collections + for( auto col : layerPrepRawData.mms ){ + calibrateAndSelectCluster(intersection,*col,layerROTs); + } + return true; } diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTGRecTools/src/MuonSystemExtensionTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTGRecTools/src/MuonSystemExtensionTool.cxx index 5cd8ca623379..7ebc1dfbe4e1 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTGRecTools/src/MuonSystemExtensionTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTGRecTools/src/MuonSystemExtensionTool.cxx @@ -116,7 +116,8 @@ namespace Muon { << " lpos3d " << lpos3d.x() << " " << lpos3d.y() << " " << lpos3d.z() << " lpos " << lpos[Trk::loc1] << " " << lpos[Trk::loc2] << " center " << surface->center().z() - << " normal: theta " << surface->normal().phi() << " phi " << surface->normal().theta() ); + << " normal: phi " << surface->normal().phi() << " theta " << surface->normal().theta() + << " normal: x " << surface->normal().x() << " y " << surface->normal().y() << " z " << surface->normal().z() ); globalPosition[0] += 100; } } @@ -165,7 +166,8 @@ namespace Muon { ATH_MSG_VERBOSE(" sector " << sector << " layer " << MuonStationIndex::layerName(layer) << " phi " << sectorPhi << " ref theta " << globalPosition.theta() << " phi " << globalPosition.phi() << " r " << globalPosition.perp() << " pos " << globalPosition.x() << " " << globalPosition.y() << " " << globalPosition.z() - << " lpos3d " << lpos3d.x() << " " << lpos3d.y() << " " << lpos3d.z() ); + << " lpos3d " << lpos3d.x() << " " << lpos3d.y() << " " << lpos3d.z() + << " normal: x " << surface->normal().x() << " y " << surface->normal().y() << " z " << surface->normal().z() ); // << " lpos " << lpos[Trk::loc1] << " " << lpos[Trk::loc2] // << " ref theta2 " << globalPosition2.theta() << " phi " << globalPosition2.phi() << " r " << globalPosition2.perp() // << " lpos3d2 " << lpos3d2.x() << " " << lpos3d2.y() << " " << lpos3d2.z() @@ -206,8 +208,8 @@ namespace Muon { // extrapolate to next layer const Trk::Surface& surface = *it->surfacePtr; if( msgLvl(MSG::VERBOSE) ){ - msg(MSG::VERBOSE) << " startPars: phi " << currentPars->position().phi() - << " r " << currentPars->position().perp() << " z " << currentPars->position().z() + msg(MSG::VERBOSE) << " startPars: phi pos " << currentPars->position().phi() << " direction phi " << currentPars->momentum().phi() << " theta pos " << currentPars->position().theta() << " theta " << currentPars->momentum().theta() + << " r " << currentPars->position().perp() << " z " << currentPars->position().z() << " momentum " << currentPars->momentum().mag() << " local " << currentPars->parameters()[Trk::locX] << " " << currentPars->parameters()[Trk::locY]; if( currentPars->covariance() ) msg(MSG::VERBOSE) << " err " << Amg::error(*currentPars->covariance(),Trk::locX) << " " << Amg::error(*currentPars->covariance(),Trk::locY); msg(MSG::VERBOSE) << " destination: sector " << it->sector << " " << MuonStationIndex::regionName(it->regionIndex) diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonLayerSegmentMakerTools/src/MuonLayerSegmentFinderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonLayerSegmentMakerTools/src/MuonLayerSegmentFinderTool.cxx index 9e90f7a735a7..c513872412b7 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonLayerSegmentMakerTools/src/MuonLayerSegmentFinderTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonLayerSegmentMakerTools/src/MuonLayerSegmentFinderTool.cxx @@ -30,6 +30,7 @@ namespace Muon { m_csc2dSegmentFinder("Csc2dSegmentMaker/Csc2dSegmentMaker"), m_csc4dSegmentFinder("Csc4dSegmentMaker/Csc4dSegmentMaker"), m_clusterSegmentFinder("Muon::MuonClusterSegmentFinder/MuonClusterSegmentFinder"), + m_clusterSegMakerNSW("Muon::MuonClusterSegmentFinderTool/MuonClusterSegmentFinderTool"), m_layerHoughTool("Muon::MuonLayerHoughTool/MuonLayerHoughTool"), m_recoValidationTool("") // ("Muon::MuonRecoValidationTool/MuonRecoValidationTool") @@ -62,6 +63,7 @@ namespace Muon { ATH_CHECK(m_csc2dSegmentFinder.retrieve()); ATH_CHECK(m_csc4dSegmentFinder.retrieve()); ATH_CHECK(m_clusterSegmentFinder.retrieve()); + ATH_CHECK(m_clusterSegMakerNSW.retrieve()); ATH_CHECK(m_layerHoughTool.retrieve()); if( !m_recoValidationTool.empty() ) ATH_CHECK(m_recoValidationTool.retrieve()); @@ -80,10 +82,12 @@ namespace Muon { // run cluster hit based segment finding on PRDs findClusterSegments(intersection,layerPrepRawData,segments); + ATH_MSG_VERBOSE(" findClusterSegments " << segments.size() ); // run standard MDT/Trigger hit segment finding either from Hough or hits - if( !m_layerHoughTool.empty() ) findMdtSegmentsFromHough(intersection,layerPrepRawData,segments); - else findMdtSegments(intersection,layerPrepRawData,segments); + // if( !m_layerHoughTool.empty() ) findMdtSegmentsFromHough(intersection,layerPrepRawData,segments); + // else findMdtSegments(intersection,layerPrepRawData,segments); + findMdtSegments(intersection,layerPrepRawData,segments); } @@ -277,7 +281,7 @@ namespace Muon { } } - void MuonLayerSegmentFinderTool::findClusterSegments( const MuonSystemExtension::Intersection& /*intersection*/, + void MuonLayerSegmentFinderTool::findClusterSegments( const MuonSystemExtension::Intersection& intersection, const MuonLayerPrepRawData& layerPrepRawData, std::vector< std::shared_ptr<const Muon::MuonSegment> >& segments ) const { @@ -288,6 +292,44 @@ namespace Muon { //if( !layerPrepRawData.tgcs.empty() && intersection.layerSurface.layerIndex == MuonStationIndex::Middle ) { // m_clusterSegmentFinder->findSegments(layerPrepRawData.tgcs,segments); //} + + if( layerPrepRawData.stgcs.empty() && layerPrepRawData.mms.empty() ) return; + + // NSW segment finding + MuonLayerROTs layerROTs; + if( !m_muonPRDSelectionTool->calibrateAndSelect( intersection, layerPrepRawData, layerROTs ) ){ + ATH_MSG_WARNING("Failed to calibrate and select layer data"); + return; + } + + ATH_MSG_DEBUG( " MM prds " << layerPrepRawData.mms.size() << " STGC prds " << layerPrepRawData.stgcs.size()); + + // get STGC and MM clusters + const std::vector<const MuonClusterOnTrack*>& clustersSTGC = layerROTs.getClusters(MuonStationIndex::STGC); + const std::vector<const MuonClusterOnTrack*>& clustersMM = layerROTs.getClusters(MuonStationIndex::MM); + + std::vector<const MuonClusterOnTrack*> clusters; + if( clustersSTGC.size()>0 ) { + ATH_MSG_DEBUG( " STGC clusters " << clustersSTGC.size()); + for( auto cl : clustersSTGC ){ + clusters.push_back(cl); + } + } + if( clustersMM.size()>0 ) { + ATH_MSG_DEBUG( " MM clusters " << clustersMM.size()); + for( auto cl : clustersMM ){ + clusters.push_back(cl); + } + } + + std::unique_ptr< std::vector<const MuonSegment*> > foundSegments ( m_clusterSegMakerNSW->find(clusters) ); + if( foundSegments ) { + for( auto seg : *foundSegments ){ + ATH_MSG_DEBUG( " NSW segment " << m_printer->print(*seg) ); + segments.push_back( std::shared_ptr<const MuonSegment>(seg) ); + ATH_MSG_DEBUG( " total segments " << segments.size() ); + } + } } void MuonLayerSegmentFinderTool::findCscSegments( const MuonLayerPrepRawData& layerPrepRawData, std::vector< std::shared_ptr<const Muon::MuonSegment> >& segments ) const { diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonLayerSegmentMakerTools/src/MuonLayerSegmentFinderTool.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonLayerSegmentMakerTools/src/MuonLayerSegmentFinderTool.h index c7769fb77a0d..43a860fd113a 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonLayerSegmentMakerTools/src/MuonLayerSegmentFinderTool.h +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonLayerSegmentMakerTools/src/MuonLayerSegmentFinderTool.h @@ -5,6 +5,7 @@ #ifndef MUON_MUONLAYERSEGMENTFINDERTOOL_H #define MUON_MUONLAYERSEGMENTFINDERTOOL_H +#include "MuonSegmentMakerToolInterfaces/IMuonClusterSegmentFinderTool.h" #include "MuonSegmentMakerToolInterfaces/IMuonLayerSegmentFinderTool.h" #include <vector> @@ -26,6 +27,7 @@ namespace Muon { class IMuonPRDSelectionTool; class IMuonSegmentMaker; class IMuonClusterSegmentFinder; + class IMuonClusterSegmentFinderTool; class IMuonRecoValidationTool; class MuonLayerHoughTool; class MdtDriftCircleOnTrack; @@ -72,6 +74,7 @@ namespace Muon { ToolHandle<ICscSegmentFinder> m_csc2dSegmentFinder; ToolHandle<ICscSegmentFinder> m_csc4dSegmentFinder; ToolHandle<IMuonClusterSegmentFinder> m_clusterSegmentFinder; + ToolHandle<IMuonClusterSegmentFinderTool> m_clusterSegMakerNSW; ToolHandle<MuonLayerHoughTool> m_layerHoughTool; mutable ToolHandle<IMuonRecoValidationTool> m_recoValidationTool; MuonSectorMapping m_muonSectorMapping; -- GitLab From 808e4f8782a1abb96d4dd929b581a351fd4130e9 Mon Sep 17 00:00:00 2001 From: John Derek Chapman <chapman@hep.phy.cam.ac.uk> Date: Fri, 22 Jun 2018 20:53:33 +0000 Subject: [PATCH 248/562] Merge branch 'AEOTBug_21.0_20180210' into '21.3' fix mis-match of translation/rotation deviation (ATLASRECTS-4363) See merge request atlas/athena!12069 (cherry picked from commit 08ff073caa22077a0a0d344160f994242c625787 [formerly e487b6122b7559f5eadf4148be997f9152b7914a]) 0f9d4c15 attempt to fix mis-match of translation/rotation deviation b3a336cd fix for irreproducibility and moving hash creation to base class Former-commit-id: e593e5e418a0b57253bcc616fc653869f670fc68 --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../MuonAlignErrorBase/AlignmentDeviation.h | 40 ++++++++++++++++++- .../AlignmentRotationDeviation.h | 6 --- .../AlignmentTranslationDeviation.h | 6 --- .../src/AlignmentRotationDeviation.cxx | 12 +++--- .../src/AlignmentTranslationDeviation.cxx | 10 ++--- .../src/AlignmentErrorTool.cxx | 10 ++++- .../src/MuonRefitTool.cxx | 14 ++++++- 8 files changed, 69 insertions(+), 29 deletions(-) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 diff --git a/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/MuonAlignErrorBase/AlignmentDeviation.h b/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/MuonAlignErrorBase/AlignmentDeviation.h index 9d302140cf86..a80d88af2ef8 100644 --- a/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/MuonAlignErrorBase/AlignmentDeviation.h +++ b/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/MuonAlignErrorBase/AlignmentDeviation.h @@ -41,13 +41,51 @@ namespace Trk { /** * Return the list of hits the transform should be applied to. */ - virtual void getListOfHits(std::vector<const Trk::RIO_OnTrack*>& hits) const = 0; + void getListOfHits(std::vector<const Trk::RIO_OnTrack*>& hits) const; + + /** + * Return hash built out of associated hits for fast comparison if deviations have same content + */ + std::size_t getHashOfHits() const; + + /** + * Set hash built out of associated hits - cannot be calculated in constructor because of dependencies + */ + void setHashOfHits(std::size_t hash); + + /** + * Return if the hash created form associated hits is set + */ + bool hasValidHashOfHits() const; /** * Verbose */ virtual void print(std::ostream& out) const = 0; + + protected: + std::vector<const Trk::RIO_OnTrack*> m_hits; // not owned + std::size_t m_hitshash; + bool m_hitshashdone; }; + + inline void AlignmentDeviation::getListOfHits (std::vector<const Trk::RIO_OnTrack*>& hits) const { + hits = m_hits; + } + + inline std::size_t AlignmentDeviation::getHashOfHits () const { + return m_hitshash; + } + + inline void AlignmentDeviation::setHashOfHits (std::size_t hash) { + m_hitshash = hash; + m_hitshashdone = true; + } + + inline bool AlignmentDeviation::hasValidHashOfHits () const { + return m_hitshashdone; + } + } #endif diff --git a/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/MuonAlignErrorBase/AlignmentRotationDeviation.h b/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/MuonAlignErrorBase/AlignmentRotationDeviation.h index 914ac0e9f604..96a7c6c2da5b 100644 --- a/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/MuonAlignErrorBase/AlignmentRotationDeviation.h +++ b/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/MuonAlignErrorBase/AlignmentRotationDeviation.h @@ -32,11 +32,6 @@ namespace MuonAlign { */ virtual Amg::Transform3D getTransform(const std::vector<double>& parameters) const; - /** - * Return the list of hits the transform should be applied to. - */ - virtual void getListOfHits(std::vector<const Trk::RIO_OnTrack*>& hits) const; - /** * Verbose */ @@ -46,7 +41,6 @@ namespace MuonAlign { Amg::Vector3D m_center; Amg::Vector3D m_axis; double m_sigma; - std::vector<const Trk::RIO_OnTrack*> m_hits; // not owned }; } diff --git a/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/MuonAlignErrorBase/AlignmentTranslationDeviation.h b/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/MuonAlignErrorBase/AlignmentTranslationDeviation.h index b5e79d929b92..18048d2c3d06 100644 --- a/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/MuonAlignErrorBase/AlignmentTranslationDeviation.h +++ b/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/MuonAlignErrorBase/AlignmentTranslationDeviation.h @@ -32,11 +32,6 @@ namespace MuonAlign { */ virtual Amg::Transform3D getTransform(const std::vector<double>& parameters) const; - /** - * Return the list of hits the transform should be applied to. - */ - virtual void getListOfHits(std::vector<const Trk::RIO_OnTrack*>& hits) const; - /** * Verbose */ @@ -45,7 +40,6 @@ namespace MuonAlign { private: Amg::Vector3D m_u; // unit vector double m_sigma; - std::vector<const Trk::RIO_OnTrack*> m_hits; // not owned }; } diff --git a/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/src/AlignmentRotationDeviation.cxx b/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/src/AlignmentRotationDeviation.cxx index 40f7a58bc205..4b1b1a65cd4f 100644 --- a/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/src/AlignmentRotationDeviation.cxx +++ b/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/src/AlignmentRotationDeviation.cxx @@ -3,17 +3,19 @@ */ #include "MuonAlignErrorBase/AlignmentRotationDeviation.h" - #include <iostream> + using namespace MuonAlign; using namespace std; AlignmentRotationDeviation::AlignmentRotationDeviation (Amg::Vector3D center, Amg::Vector3D axis, double sigma, const std::vector<const Trk::RIO_OnTrack*>& hits) : m_center(center), m_axis(axis), - m_sigma(sigma), - m_hits(hits) + m_sigma(sigma) { + m_hits = hits; + m_hitshash = 0; + m_hitshashdone = false; } AlignmentRotationDeviation::~AlignmentRotationDeviation () { @@ -37,10 +39,6 @@ Amg::Transform3D AlignmentRotationDeviation::getTransform (const std::vector<dou return t; } -void AlignmentRotationDeviation::getListOfHits (std::vector<const Trk::RIO_OnTrack*>& hits) const { - hits = m_hits; -} - void AlignmentRotationDeviation::print (std::ostream& out) const { out << "A rotation around center = (" << m_center.x() << ", " << m_center.y() << ", " << m_center.z() << ") and axis = (" << m_axis.x() << ", " << m_axis.y() << ", " << m_axis.z() << ") with sigma=" << m_sigma << " mrad applied to " << m_hits.size() << " hits" << endl; } diff --git a/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/src/AlignmentTranslationDeviation.cxx b/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/src/AlignmentTranslationDeviation.cxx index 98be066a66a7..6dd139d686b1 100644 --- a/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/src/AlignmentTranslationDeviation.cxx +++ b/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorBase/src/AlignmentTranslationDeviation.cxx @@ -10,9 +10,11 @@ using namespace std; AlignmentTranslationDeviation::AlignmentTranslationDeviation (Amg::Vector3D u, double sigma, const std::vector<const Trk::RIO_OnTrack*>& hits) : m_u(u.unit()), - m_sigma(sigma), - m_hits(hits) + m_sigma(sigma) { + m_hits = hits; + m_hitshash = 0; + m_hitshashdone = false; } AlignmentTranslationDeviation::~AlignmentTranslationDeviation () { @@ -31,10 +33,6 @@ Amg::Transform3D AlignmentTranslationDeviation::getTransform (const std::vector< return t; } -void AlignmentTranslationDeviation::getListOfHits (std::vector<const Trk::RIO_OnTrack*>& hits) const { - hits = m_hits; -} - void AlignmentTranslationDeviation::print (std::ostream& out) const { out << "A translation along (" << m_u.x() << ", " << m_u.y() << ", " << m_u.z() << ") with sigma=" << m_sigma << " mm applied to " << m_hits.size() << " hits" << endl; } diff --git a/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorTool/src/AlignmentErrorTool.cxx b/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorTool/src/AlignmentErrorTool.cxx index 6cdd44805da5..375332ab446a 100644 --- a/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorTool/src/AlignmentErrorTool.cxx +++ b/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorTool/src/AlignmentErrorTool.cxx @@ -26,6 +26,7 @@ #include <fstream> #include <sstream> +#include <boost/functional/hash.hpp> using namespace MuonAlign; @@ -324,13 +325,20 @@ void AlignmentErrorTool::makeAlignmentDeviations (const Trk::Track& track, std:: if ( traslation >= 0.001*Gaudi::Units::mm ) { + std::size_t hitshash = 0; + for(auto it : new_deviationsVec[iDev]->hits ) boost::hash_combine( hitshash , (it->identify()).get_compact() ); deviations.push_back(new AlignmentTranslationDeviation(sumU.cross(sumV), traslation*Gaudi::Units::mm, new_deviationsVec[iDev]->hits)); + deviations.back()->setHashOfHits(hitshash); ATH_MSG_DEBUG("A translation along (" << sumU.x() << ", " << sumU.y() << ", " << sumU.z() << ") with sigma=" << traslation*Gaudi::Units::mm << " mm was applied to " << new_deviationsVec[iDev]->hits.size() << " hits matching the station: " << new_deviationsVec[iDev]->stationName.str() << " and the multilayer " << new_deviationsVec[iDev]->multilayer.str()); - } if ( rotation >= 0.000001*Gaudi::Units::rad ) { + } + if ( rotation >= 0.000001*Gaudi::Units::rad ) { + std::size_t hitshash = 0; + for(auto it : new_deviationsVec[iDev]->hits ) boost::hash_combine( hitshash , (it->identify()).get_compact() ); deviations.push_back(new AlignmentRotationDeviation(sumP, sumV, rotation*Gaudi::Units::rad, new_deviationsVec[iDev]->hits)); + deviations.back()->setHashOfHits(hitshash); ATH_MSG_DEBUG("A rotation around the center = (" << sumP.x() << ", " << sumP.y() << ", " << sumP.z() << ") and axis = (" << sumV.x() << ", " << sumV.y() << ", " << sumV.z() << ") with sigma=" << rotation/Gaudi::Units::mrad << " mrad was applied to " << new_deviationsVec[iDev]->hits.size() << " hits matching the station " << new_deviationsVec[iDev]->stationName.str() << " and the multilayer " << new_deviationsVec[iDev]->multilayer.str()); diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonRefitTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonRefitTool.cxx index 56d982ae56ee..e66e4e78e558 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonRefitTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonRefitTool.cxx @@ -433,7 +433,16 @@ namespace Muon { for(auto itRot : align_deviations){ iRot++; if( dynamic_cast<MuonAlign::AlignmentRotationDeviation*>(itRot) ) { - std::vector<Identifier> hitidsRot; + if( itRot->hasValidHashOfHits() && it->hasValidHashOfHits() ) { + if( itRot->getHashOfHits() == it->getHashOfHits() ){ + angleError = sqrt(itRot->getCovariance(0,0)); + matchFound = true; + usedRotations.push_back(iRot); + } + } else { + ATH_MSG_ERROR("One of the alignment deviations has an invalid hash created from the hits."); + } + /* std::vector<Identifier> hitidsRot; itRot->getListOfHits(vec_riowithdev); for(auto riowithdev : vec_riowithdev){ Identifier id_riowithdev = riowithdev->identify(); @@ -444,7 +453,7 @@ namespace Muon { break; } } - if(matchFound) usedRotations.push_back(iRot); + if(matchFound) usedRotations.push_back(iRot); */ } if(matchFound) break; } @@ -480,6 +489,7 @@ namespace Muon { if(iRot == usedRotations[i]) used = true; } if(used) continue; + ATH_MSG_ERROR("This following code should not be reached anymore!"); std::vector<const Trk::RIO_OnTrack*> vec_riowithdev; itRot->getListOfHits(vec_riowithdev); -- GitLab From b3d1a715f32ddff33e2fd1f816deb874cba2a967 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Thu, 21 Jun 2018 17:32:10 +0200 Subject: [PATCH 249/562] DataQualityTools: Fix clang warnings. clang warnings: unused variables. Former-commit-id: c60209d379fc0b447d0e8c88a8a4afcf987c4448 --- DataQuality/DataQualityTools/src/DQTNonCollBkg_ZDC.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/DataQuality/DataQualityTools/src/DQTNonCollBkg_ZDC.cxx b/DataQuality/DataQualityTools/src/DQTNonCollBkg_ZDC.cxx index 3408fabbe332..d61fb27f0070 100644 --- a/DataQuality/DataQualityTools/src/DQTNonCollBkg_ZDC.cxx +++ b/DataQuality/DataQualityTools/src/DQTNonCollBkg_ZDC.cxx @@ -229,7 +229,6 @@ StatusCode DQTNonCollBkg_ZDC::fillHistograms() std::vector<std::vector<int> > wfm; std::vector<std::vector<int> >::iterator vit; - std::vector<int>::iterator it; Identifier id; @@ -445,7 +444,6 @@ int DQTNonCollBkg_ZDC::getEnergyAndTimeByModule(const Identifier& id, ZdcSignalSinc* zdcSignalSinc; std::vector<std::vector<int> >::const_iterator vit; - std::vector<int>::const_iterator it; std::vector<int> y; Identifier32::value_type x; -- GitLab From 120a8c01356952a2e61c4dbe33b1a76a4352182e Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Thu, 21 Jun 2018 17:34:00 +0200 Subject: [PATCH 250/562] TrigMuonMonitoring: Fix clang warning. clang warning: unused variable. Former-commit-id: 81b483e6b66ef04bbaa72741058835ba9abcd46b --- Trigger/TrigMonitoring/TrigMuonMonitoring/src/MuZTPMon.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/Trigger/TrigMonitoring/TrigMuonMonitoring/src/MuZTPMon.cxx b/Trigger/TrigMonitoring/TrigMuonMonitoring/src/MuZTPMon.cxx index 16e9860d9559..fdf18a10d64c 100644 --- a/Trigger/TrigMonitoring/TrigMuonMonitoring/src/MuZTPMon.cxx +++ b/Trigger/TrigMonitoring/TrigMuonMonitoring/src/MuZTPMon.cxx @@ -405,7 +405,6 @@ StatusCode HLTMuonMonTool::fillMuZTPDQA() Trig::FeatureContainer fL1 = getTDT()->features(m_ztp_l1map[itmap->first]); Trig::FeatureContainer fHLT = getTDT()->features(itmap->first,TrigDefs::alsoDeactivateTEs); - std::vector<Trig::Combination>::const_iterator jL1; std::vector<Trig::Combination>::const_iterator jL2; std::vector<Trig::Combination>::const_iterator jEF; -- GitLab From 07afa316a3594108fff957b2e609c712c327c27c Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Thu, 21 Jun 2018 17:34:18 +0200 Subject: [PATCH 251/562] TrigFTKSim: Fix clang warning. clang warning: unused variable. Former-commit-id: 2f2e1158cad00aa14482e2eaec339c1495b24f11 --- Trigger/TrigFTK/TrigFTKSim/src/atlClustering.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/Trigger/TrigFTK/TrigFTKSim/src/atlClustering.cxx b/Trigger/TrigFTK/TrigFTKSim/src/atlClustering.cxx index 14e4fa009977..fac21728ebd9 100644 --- a/Trigger/TrigFTK/TrigFTKSim/src/atlClustering.cxx +++ b/Trigger/TrigFTK/TrigFTKSim/src/atlClustering.cxx @@ -799,7 +799,6 @@ int buildUpCluster(hitVector *currentHits, cluster &clu) { /* Now we have a non empty cluster */ bool newHitsAdded = false; int distanceis = clu.hitlist.size(); - hitVector::iterator hitCluP; // hits in cluster //for (hitCluP=clu.hitlist.begin(); hitCluP!=clu.hitlist.end(); ++hitCluP) { // loop over hits in cluster for(int i = 0; i < distanceis; i++) { FTKRawHit* hit = clu.hitlist.at(i); -- GitLab From fc311e3d9594bf500d47ce943c7bd7c8e232d41e Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Thu, 21 Jun 2018 17:34:52 +0200 Subject: [PATCH 252/562] TrigHLTJetRec: Fix clang warnings. clang warnings: - unused private class data members. - polymorphic classes without virtual destructors. Former-commit-id: 8892dbaa1c1529a56b68fb1745bd413784de24bb --- .../TrigHLTJetRec/src/PseudoJetCreatorFunctions.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/PseudoJetCreatorFunctions.cxx b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/PseudoJetCreatorFunctions.cxx index 90b576c07e43..3512be270206 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/PseudoJetCreatorFunctions.cxx +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/PseudoJetCreatorFunctions.cxx @@ -13,6 +13,7 @@ namespace PseudoJetCreatorFunctions{ class IRejecter{ public: + virtual ~IRejecter() {} virtual bool operator()(const xAOD::IParticle*) = 0; }; @@ -118,6 +119,7 @@ namespace PseudoJetCreatorFunctions{ class IMomentumGetter { public: + virtual ~IMomentumGetter() {} virtual xAOD::IParticle::FourMom_t operator()(const xAOD::IParticle*) const = 0; }; -- GitLab From f47b6b3f470c768395e3196db6a7df0deb7c7279 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Thu, 21 Jun 2018 18:02:22 +0200 Subject: [PATCH 253/562] TrigT1CaloTools: Fix clang warning. clang warning: unused variable. Former-commit-id: b140d85e804fffb94410a55dad7da05fc2620bce --- Trigger/TrigT1/TrigT1CaloTools/src/L1JetCMXTools.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/Trigger/TrigT1/TrigT1CaloTools/src/L1JetCMXTools.cxx b/Trigger/TrigT1/TrigT1CaloTools/src/L1JetCMXTools.cxx index 8c4c087fbd34..83df47965475 100644 --- a/Trigger/TrigT1/TrigT1CaloTools/src/L1JetCMXTools.cxx +++ b/Trigger/TrigT1/TrigT1CaloTools/src/L1JetCMXTools.cxx @@ -359,8 +359,6 @@ void L1JetCMXTools::getHits(const xAOD::CMXJetTob *tob, HitsVector &hit10, std::vector<TrigConf::TriggerThreshold *> thresholds = m_configSvc->ctpConfig()->menu().thresholdVector(); - std::vector<TriggerThreshold *>::const_iterator it; - //std::vector<TriggerThreshold *>::const_iterator itE = thresholds.end(); for (int slice = 0; slice < timeslices; ++slice) { if (err.get(LVL1::DataError::Overflow)) { hit10[slice] = 0x7fff; -- GitLab From 144e8f6225d8336957d414e9d91967aa8e928b33 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Sat, 23 Jun 2018 06:54:36 +0200 Subject: [PATCH 254/562] Remove MT checking in thread-unsafe algorithms. It spoils some exisiting workflows such as CaloHiveEx. Former-commit-id: cfa712d3400a0b9bd28e5215e89171cb62d336c0 --- .../python/CaloCellPedestalCorrDefault.py | 4 ---- .../CaloCellCorrection/src/CaloCellPedestalCorr.cxx | 7 +------ 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/Calorimeter/CaloCellCorrection/python/CaloCellPedestalCorrDefault.py b/Calorimeter/CaloCellCorrection/python/CaloCellPedestalCorrDefault.py index 3d8fdd134687..77f6f90e9db9 100644 --- a/Calorimeter/CaloCellCorrection/python/CaloCellPedestalCorrDefault.py +++ b/Calorimeter/CaloCellCorrection/python/CaloCellPedestalCorrDefault.py @@ -49,10 +49,6 @@ def CaloCellPedestalCorrDefault(name='CaloCellPedestalCorr'): theCaloCellPedestalCorr.LumiFolderName = lumiFolder if jobproperties.CaloCellFlags.doPileupOffsetBCIDCorr() and (not athenaCommonFlags.isOnline()): - import AthenaCommon.ConcurrencyFlags - if jobproperties.ConcurrencyFlags.NumThreads() >= 1: - mlog.error ("FIXME: CaloLumiBCIDTool does not work in MT") - raise RunTimeError ("FIXME: CaloLumiBCIDTool does not work in MT") from CaloTools.CaloLumiBCIDToolDefault import CaloLumiBCIDToolDefault theCaloLumiBCIDTool = CaloLumiBCIDToolDefault() ToolSvc += theCaloLumiBCIDTool diff --git a/Calorimeter/CaloCellCorrection/src/CaloCellPedestalCorr.cxx b/Calorimeter/CaloCellCorrection/src/CaloCellPedestalCorr.cxx index 32de6d8292c3..d3208ad3fd91 100755 --- a/Calorimeter/CaloCellCorrection/src/CaloCellPedestalCorr.cxx +++ b/Calorimeter/CaloCellCorrection/src/CaloCellPedestalCorr.cxx @@ -165,7 +165,7 @@ StatusCode CaloCellPedestalCorr::updateMap(IOVSVC_CALLBACK_ARGS_K(keys) ) // ============================================================================ void CaloCellPedestalCorr::MakeCorrection (CaloCell* theCell, - const EventContext& ctx) const + const EventContext& /*ctx*/) const { float pedestal=0.; @@ -185,11 +185,6 @@ void CaloCellPedestalCorr::MakeCorrection (CaloCell* theCell, } if (!m_caloLumiBCIDTool.empty() ) { - // FIXME: CaloLumiBCIDTool has threading issues. - // Refuse to proceed if we're running with multiple threads. - if (ctx.slot() > 1) { - std::abort(); - } pedestal = pedestal + m_caloLumiBCIDTool->average(theCell,0); } -- GitLab From d48e5f246a28c148237f66b0d9862b69ee3886c8 Mon Sep 17 00:00:00 2001 From: Hass AbouZeid <hass.abouzeid@cern.ch> Date: Sun, 24 Jun 2018 15:22:22 +0200 Subject: [PATCH 255/562] Hide storegate accesses for MCTruthSimAlgs For the MT Digi migration, we have needed to hide all the direct storegate accesses before being able to then do the subevent accesses in a thread safe way. This has been done for all the other subsystem digitizations, and this implementation takes advantage of previous extensions to the pileup merge service. Former-commit-id: eb110d5c9cc9159a2bb7af834990aa73ed7d097d --- .../MCTruthSimAlgs/src/MergeCalibHitsTool.cxx | 16 ++-- .../src/MergeGenericMuonSimHitCollTool.cxx | 15 ++-- .../src/MergeHijingParsTool.cxx | 74 +++++++++---------- .../src/MergeMcEventCollTool.cxx | 11 ++- .../src/MergeRecoTimingObjTool.cxx | 13 ++-- .../src/MergeTrackRecordCollTool.cxx | 27 +++---- .../MCTruthSimAlgs/src/MergeTruthJetsTool.cxx | 8 +- 7 files changed, 76 insertions(+), 88 deletions(-) diff --git a/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeCalibHitsTool.cxx b/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeCalibHitsTool.cxx index 321751e74633..55f73b931aef 100644 --- a/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeCalibHitsTool.cxx +++ b/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeCalibHitsTool.cxx @@ -77,21 +77,17 @@ StatusCode MergeCalibHitsTool::processBunchXing(int bunchXing, ++iEvt; continue; } - StoreGateSvc& seStore(*iEvt->ptr()->evtStore()); + // loop over containers for (unsigned int iHitContainer=0;iHitContainer<m_CalibrationHitContainer.size();++iHitContainer) { ATH_MSG_VERBOSE ( " Bunch Crossing: " <<bunchXing << ". Process CalibrationHit container " << m_CalibrationHitContainer[iHitContainer] ); const CaloCalibrationHitContainer* hitCont; - // if container not there, do nothing - if (seStore.contains<CaloCalibrationHitContainer>(m_CalibrationHitContainer[iHitContainer])) { - if( !seStore.retrieve(hitCont, m_CalibrationHitContainer[iHitContainer]).isSuccess()) { - ATH_MSG_ERROR ( " Failed to retrieve CalibrationHitContainer called " << m_CalibrationHitContainer[iHitContainer] ); - } - } - else { - ATH_MSG_VERBOSE ( " Cannot find CalibrationHitContainer called " << m_CalibrationHitContainer[iHitContainer] ); - continue; + if (!m_pMergeSvc->retrieveSingleSubEvtData(m_CalibrationHitContainer[iHitContainer], hitCont, + bunchXing, iEvt).isSuccess()){ + ATH_MSG_ERROR("CaloCalibrationHitContainer not found for event key " << m_CalibrationHitContainer[iHitContainer]); + return StatusCode::FAILURE; } + //if this is the first SubEvent for this Event then create the hitContainers; if(m_firstSubEvent) { m_outputContainers[iHitContainer] = new CaloCalibrationHitContainer(m_CalibrationHitContainer[iHitContainer]); diff --git a/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeGenericMuonSimHitCollTool.cxx b/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeGenericMuonSimHitCollTool.cxx index fbf752c08008..e8ea7f7d5ab4 100644 --- a/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeGenericMuonSimHitCollTool.cxx +++ b/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeGenericMuonSimHitCollTool.cxx @@ -52,21 +52,16 @@ StatusCode MergeGenericMuonSimHitCollTool::processBunchXing(int bunchXing, ATH_MSG_VERBOSE ( "processBunchXing()" ); SubEventIterator iEvt(bSubEvents); while (iEvt != eSubEvents) { - StoreGateSvc& seStore(*iEvt->ptr()->evtStore()); // loop over containers for (unsigned int iHitContainer=0;iHitContainer<m_SimHitContainerNames.size();++iHitContainer) { ATH_MSG_VERBOSE ( " Bunch Crossing: " <<bunchXing << ". Process GenericMuonSimHitCollection " << m_SimHitContainerNames[iHitContainer] ); const GenericMuonSimHitCollection* hitCont; - // if container not there, do nothing - if (seStore.contains<GenericMuonSimHitCollection>(m_SimHitContainerNames[iHitContainer])) { - if( !seStore.retrieve(hitCont, m_SimHitContainerNames[iHitContainer]).isSuccess()) { - ATH_MSG_ERROR ( " Failed to retrieve GenericMuonSimHitCollection called " << m_SimHitContainerNames[iHitContainer] ); - } - } - else { - ATH_MSG_VERBOSE ( " Cannot find GenericMuonSimHitCollection called " << m_SimHitContainerNames[iHitContainer] ); - continue; + if (!m_pMergeSvc->retrieveSingleSubEvtData(m_SimHitContainerNames[iHitContainer], hitCont, + bunchXing, iEvt).isSuccess()){ + ATH_MSG_ERROR("GenericMuonSimHitCollection not found for event key " << m_SimHitContainerNames[iHitContainer]); + return StatusCode::FAILURE; } + //if this is the first SubEvent for this Event then create the hitContainers; if(m_firstSubEvent) { m_outputContainers[iHitContainer] = new GenericMuonSimHitCollection(m_SimHitContainerNames[iHitContainer]); diff --git a/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeHijingParsTool.cxx b/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeHijingParsTool.cxx index fc8719dd8856..2a14429a165a 100644 --- a/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeHijingParsTool.cxx +++ b/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeHijingParsTool.cxx @@ -26,7 +26,7 @@ StatusCode MergeHijingParsTool::prepareEvent(unsigned int nInputEvents) { return StatusCode::SUCCESS; } -StatusCode MergeHijingParsTool::processBunchXing(int, +StatusCode MergeHijingParsTool::processBunchXing(int bunchXing, SubEventIterator bSubEvents, SubEventIterator eSubEvents) { @@ -39,44 +39,44 @@ StatusCode MergeHijingParsTool::processBunchXing(int, SubEventIterator iEvt = bSubEvents; for (; iEvt!=eSubEvents; iEvt++) { - StoreGateSvc& seStore(*bSubEvents->ptr()->evtStore()); - if (seStore.contains<HijingEventParams>(m_outputObject.name())) - { - const HijingEventParams *hijing_pars(nullptr); - ATH_CHECK(seStore.retrieve(hijing_pars, m_outputObject.name())); - // create new container for overlayed event - m_outputObject = CxxUtils::make_unique<HijingEventParams>(hijing_pars->get_np(), - hijing_pars->get_nt(), - hijing_pars->get_n0(), - hijing_pars->get_n01(), - hijing_pars->get_n10(), - hijing_pars->get_n11(), - hijing_pars->get_natt(), - hijing_pars->get_jatt(), - hijing_pars->get_b(), - hijing_pars->get_bphi()); - // FIXME Why is there no copy constructor for this class?! - // add in setting Psi angles manually. - for(int n=1;n<7;++n) - { - m_outputObject->set_psi(n,hijing_pars->get_psi(n)); - } + const HijingEventParams *hijing_pars(nullptr); + if (m_pMergeSvc->retrieveSingleSubEvtData(m_outputObject.name(), hijing_pars, + bunchXing, iEvt).isSuccess()){ + + + m_outputObject = CxxUtils::make_unique<HijingEventParams>(hijing_pars->get_np(), + hijing_pars->get_nt(), + hijing_pars->get_n0(), + hijing_pars->get_n01(), + hijing_pars->get_n10(), + hijing_pars->get_n11(), + hijing_pars->get_natt(), + hijing_pars->get_jatt(), + hijing_pars->get_b(), + hijing_pars->get_bphi()); + // FIXME Why is there no copy constructor for this class?! + // add in setting Psi angles manually. + for(int n=1;n<7;++n) + { + m_outputObject->set_psi(n,hijing_pars->get_psi(n)); + } + + if(m_firstSubEvent) + { + ATH_MSG_DEBUG( "processBunchXing: copied original event HijingEventParams" ); + } + else + { + ATH_MSG_DEBUG( "processBunchXing: copied background event HijingEventParams" ); + } + return StatusCode::SUCCESS; + } - if(m_firstSubEvent) - { - ATH_MSG_DEBUG( "processBunchXing: copied original event HijingEventParams" ); - } - else - { - ATH_MSG_DEBUG( "processBunchXing: copied background event HijingEventParams" ); - } - return StatusCode::SUCCESS; - } if(m_firstSubEvent) - { - ATH_MSG_VERBOSE("processBunchXing: No HijingEventParams found in the signal eventStore." ); - m_firstSubEvent=false; - } + { + ATH_MSG_VERBOSE("processBunchXing: No HijingEventParams found in the signal eventStore." ); + m_firstSubEvent=false; + } } return StatusCode::SUCCESS; } diff --git a/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeMcEventCollTool.cxx b/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeMcEventCollTool.cxx index 138a6bec92db..2f3150cfce8f 100644 --- a/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeMcEventCollTool.cxx +++ b/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeMcEventCollTool.cxx @@ -272,7 +272,7 @@ StatusCode MergeMcEventCollTool::processAllSubEvents() { return StatusCode::SUCCESS; } -StatusCode MergeMcEventCollTool::processBunchXing(int /*bunchXing*/, +StatusCode MergeMcEventCollTool::processBunchXing(int bunchXing, SubEventIterator bSubEvents, SubEventIterator eSubEvents) { @@ -280,14 +280,13 @@ StatusCode MergeMcEventCollTool::processBunchXing(int /*bunchXing*/, SubEventIterator iEvt(bSubEvents); //loop over the McEventCollections (each one assumed to containing exactly one GenEvent) of the various input events while (iEvt != eSubEvents) { - StoreGateSvc& seStore(*iEvt->ptr()->evtStore()); const McEventCollection *pMEC(NULL); - //FIXME Should I be using m_truthCollKey in the retrieve method? - if (!seStore.retrieve(pMEC, m_truthCollKey.value()).isSuccess()) { - ATH_MSG_ERROR ("processBunchXing: SubEvt McEventCollection NOT FOUND in StoreGate " << seStore.name() ); + if (!m_pMergeSvc->retrieveSingleSubEvtData(m_truthCollKey.value(), pMEC, + bunchXing, iEvt).isSuccess()){ + ATH_MSG_ERROR("McEventCollection not found for event key " << m_truthCollKey.value()); return StatusCode::FAILURE; } - ATH_MSG_DEBUG ("processBunchXing: SubEvt McEventCollection from StoreGate " << seStore.name() ); + if (!processEvent(pMEC,iEvt->time(),iEvt->index()).isSuccess()) { ATH_MSG_ERROR ("processBunchXing: Failed to process McEventCollection." ); return StatusCode::FAILURE; diff --git a/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeRecoTimingObjTool.cxx b/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeRecoTimingObjTool.cxx index 0f65f160719a..70781b11eff6 100644 --- a/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeRecoTimingObjTool.cxx +++ b/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeRecoTimingObjTool.cxx @@ -37,13 +37,12 @@ StatusCode MergeRecoTimingObjTool::processBunchXing(int bunchXing, { if (bSubEvents != eSubEvents) { - StoreGateSvc& seStore(*bSubEvents->ptr()->evtStore()); - if(seStore.contains<RecoTimingObj>(m_recTimingObjKey.value())) - { - const RecoTimingObj *oldColl(0); - CHECK(seStore.retrieve(oldColl, m_recTimingObjKey.value())); - CHECK(processRecoTimingObj(oldColl)); - } + const RecoTimingObj *oldColl(0); + if (m_pMergeSvc->retrieveSingleSubEvtData(m_recTimingObjKey.value(), oldColl, + bunchXing, bSubEvents).isSuccess()) + { + CHECK(processRecoTimingObj(oldColl)); + } else { ATH_MSG_DEBUG ( "processBunchXing: No RecoTimingObj found." ); diff --git a/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeTrackRecordCollTool.cxx b/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeTrackRecordCollTool.cxx index e23468924bdd..5e32c46ebf43 100644 --- a/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeTrackRecordCollTool.cxx +++ b/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeTrackRecordCollTool.cxx @@ -37,19 +37,19 @@ StatusCode MergeTrackRecordCollTool::processBunchXing(int bunchXing, { if (bSubEvents != eSubEvents) { - StoreGateSvc& seStore(*bSubEvents->ptr()->evtStore()); const TrackRecordCollection* oldColl(0); - if (seStore.retrieve(oldColl, m_trRecCollKey.value()).isSuccess()) - { - TrackRecordCollection* newColl = new TrackRecordCollection(); - for(auto trcit : *oldColl) - { - newColl->push_back( TrackRecord(trcit) ); - } - CHECK(evtStore()->record(newColl, m_trRecCollKey)); - ATH_MSG_DEBUG( "processBunchXing: copied original event TrackRecordCollection" ); - m_firstSubEvent=false; - } + if (m_pMergeSvc->retrieveSingleSubEvtData(m_trRecCollKey.value(), oldColl, + bunchXing, bSubEvents).isSuccess()) + { + TrackRecordCollection* newColl = new TrackRecordCollection(); + for(auto trcit : *oldColl) + { + newColl->push_back( TrackRecord(trcit) ); + } + CHECK(evtStore()->record(newColl, m_trRecCollKey)); + ATH_MSG_DEBUG( "processBunchXing: copied original event TrackRecordCollection" ); + m_firstSubEvent=false; + } else { ATH_MSG_ERROR ( "processBunchXing: TimedTruthList is empty" ); @@ -60,9 +60,10 @@ StatusCode MergeTrackRecordCollTool::processBunchXing(int bunchXing, ATH_MSG_ERROR ( "processBunchXing: Can not find TimedTruthList" ); } } - + return StatusCode::SUCCESS; } + StatusCode MergeTrackRecordCollTool::mergeEvent() { //Nothing to do here; diff --git a/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeTruthJetsTool.cxx b/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeTruthJetsTool.cxx index 2a4e56cebbb4..a0dcbd754f4b 100644 --- a/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeTruthJetsTool.cxx +++ b/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeTruthJetsTool.cxx @@ -64,13 +64,11 @@ StatusCode MergeTruthJetsTool::processBunchXing(int bunchXing, SubEventIterator iEvt(bSubEvents); while (iEvt != eSubEvents) { - StoreGateSvc& seStore(*iEvt->ptr()->evtStore()); const xAOD::JetContainer* inputJetContainer = 0; - if (seStore.contains<xAOD::JetContainer>(m_inputJetCollKey)) - { + if (m_pMergeSvc->retrieveSingleSubEvtData(m_inputJetCollKey, inputJetContainer, + bunchXing, bSubEvents).isSuccess()) + { ATH_MSG_VERBOSE("Found an xAOD::JetContainer in storeGate."); - inputJetContainer = seStore.retrieve<const xAOD::JetContainer>(m_inputJetCollKey); - //Back-compatibility with inputs which contain old JetCollections if ( inputJetContainer==0 ) { ATH_MSG_ERROR("Unable to retrieve input jet container: " << m_inputJetCollKey); -- GitLab From dec0b2c8364537dc469ba1807126654eda57c275 Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Sun, 24 Jun 2018 19:47:45 +0000 Subject: [PATCH 256/562] Merge branch '21.0-tile-rec-mf-mon-fork1' into '21.0' Fix Tile Matched filter and r2e:fork1 monitoring (ATLASDQ-519) See merge request atlas/athena!12205 (cherry picked from commit 54a0cb1baaf7f7c592d94212f0ff5750f53485c0 [formerly a2119da37d578ebb6786314c3da37c9210af2638]) fe006bf9 Fix Tile Matched filter and r2e:fork1 monitoring (ATLASDQ-519) Former-commit-id: 82ecbd116996f5170e848bd18ace4907e51c6fa7 --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../TileMonitoring/src/TileDQFragLWMonTool.cxx | 6 ++++++ .../TileRecUtils/python/TileRawChannelGetter.py | 12 +++++++----- 3 files changed, 13 insertions(+), 5 deletions(-) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 diff --git a/TileCalorimeter/TileMonitoring/src/TileDQFragLWMonTool.cxx b/TileCalorimeter/TileMonitoring/src/TileDQFragLWMonTool.cxx index 8578fe51a871..81d2914fedfb 100644 --- a/TileCalorimeter/TileMonitoring/src/TileDQFragLWMonTool.cxx +++ b/TileCalorimeter/TileMonitoring/src/TileDQFragLWMonTool.cxx @@ -350,6 +350,12 @@ StatusCode TileDQFragLWMonTool::fillHistograms() { m_isFirstEvent = false; } + if (m_manager->forkedProcess()) { + fillMasking(); + m_nEvents = 1; + m_nEventsWithAllDigits = 0; + } + if (getL1info() == 0x82) { ++m_nEventsWithAllDigits; } diff --git a/TileCalorimeter/TileRecUtils/python/TileRawChannelGetter.py b/TileCalorimeter/TileRecUtils/python/TileRawChannelGetter.py index b6e0d18c2406..8480a5932087 100644 --- a/TileCalorimeter/TileRecUtils/python/TileRawChannelGetter.py +++ b/TileCalorimeter/TileRecUtils/python/TileRawChannelGetter.py @@ -140,15 +140,17 @@ class TileRawChannelGetter ( Configured) : TilePulseTypes = {0 : 'PHY', 1 : 'PHY', 2 : 'LAS', 4 : 'PHY', 8 : 'CIS'} TilePulse = TilePulseTypes[jobproperties.TileRecFlags.TileRunType()] - if (jobproperties.TileRecFlags.doTileFitCool() + if (jobproperties.TileRecFlags.doTileMF() or (not jobproperties.TileRecFlags.OfcFromCOOL() - and (jobproperties.TileRecFlags.doTileMF() - or jobproperties.TileRecFlags.doTileOF1() + and (jobproperties.TileRecFlags.doTileOF1() or jobproperties.TileRecFlags.doTileOpt2() or jobproperties.TileRecFlags.doTileOptATLAS()))): - tileInfoConfigurator.setupCOOLPULSE(type = TilePulse) - tileInfoConfigurator.setupCOOLAutoCr() + tileInfoConfigurator.setupCOOLPULSE(type = TilePulse) + tileInfoConfigurator.setupCOOLAutoCr() + + elif jobproperties.TileRecFlags.doTileFitCool(): + tileInfoConfigurator.setupCOOLPULSE(type = TilePulse) if jobproperties.TileRecFlags.OfcFromCOOL(): if (jobproperties.TileRecFlags.doTileMF() -- GitLab From 0eb279acac2d17213200916c3819beb63d94b8c9 Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Sun, 24 Jun 2018 19:49:03 +0000 Subject: [PATCH 257/562] Merge branch 'b21-fix-copies' into '21.0' Avoid copying elements when performing loops in tau EDM See merge request atlas/athena!12239 (cherry picked from commit 5d6583d9204790b2e8f6f8b195b858b4a17b9df4 [formerly c7e97f41b642a1258b98950c78ff3069a34fa5ff]) fdea2993 avoid copying elements when performing loops in tau EDM Former-commit-id: d4883bba6dd97307ac818bc0c3e226eafa8cf890 --- Event/EventContainers/test/ID_ContainerTest.h | 0 Event/xAOD/xAODTau/Root/TauJet_v3.cxx | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 diff --git a/Event/xAOD/xAODTau/Root/TauJet_v3.cxx b/Event/xAOD/xAODTau/Root/TauJet_v3.cxx index 51448da90a7f..ef85767143f1 100644 --- a/Event/xAOD/xAODTau/Root/TauJet_v3.cxx +++ b/Event/xAOD/xAODTau/Root/TauJet_v3.cxx @@ -465,7 +465,7 @@ namespace xAOD { const TauJet_v3::TauTrackLinks_t TauJet_v3::tauTrackLinksWithMask(unsigned int mask) const{ TauJet_v3::TauTrackLinks_t links; - for(const ElementLink< xAOD::TauTrackContainer > link : tauTrackAcc(*this) ){ + for(const ElementLink< xAOD::TauTrackContainer >& link : tauTrackAcc(*this) ){ if( (*link)->flagWithMask(mask)) links.push_back(link); } @@ -485,7 +485,7 @@ namespace xAOD { const TauTrack* TauJet_v3::trackWithMask( size_t i, unsigned int mask, int* container_index ) const { uint tracks_pass_mask=0; - for(const ElementLink< xAOD::TauTrackContainer > link : tauTrackAcc(*this) ){ + for(const ElementLink< xAOD::TauTrackContainer >& link : tauTrackAcc(*this) ){ const TauTrack* trk = *link; if(trk->flagWithMask(mask)){ if(tracks_pass_mask==i) { @@ -552,7 +552,7 @@ namespace xAOD { /// Get the v<pointer> to all tracks associated with this tau, regardless of classification std::vector<TauTrack*> TauJet_v3::allTracks() { std::vector<TauTrack*> trks; - for(ElementLink< xAOD::TauTrackContainer > link : tauTrackAcc(*this) ){ + for(ElementLink< xAOD::TauTrackContainer >& link : tauTrackAcc(*this) ){ const TauTrack* c_trk = *link; xAOD::TauTrackContainer* tauTrackContainer = link.getDataNonConstPtr(); TauTrack* trk=tauTrackContainer->at(link.index()); @@ -582,7 +582,7 @@ namespace xAOD { //number of tracks with a given classification size_t TauJet_v3::nTracksWithMask(unsigned int flags) const{ size_t n(0); - for(const ElementLink< xAOD::TauTrackContainer > link : tauTrackAcc(*this) ){ + for(const ElementLink< xAOD::TauTrackContainer >& link : tauTrackAcc(*this) ){ const TauTrack* trk = *link; if(trk->flagWithMask(flags)) n++; } -- GitLab From 05b57f7a3250d48e67c7cb59486cf14c5bd3aea2 Mon Sep 17 00:00:00 2001 From: Yi Liu <yi.liu@cern.ch> Date: Fri, 22 Jun 2018 15:41:36 +0200 Subject: [PATCH 258/562] coverity fix: explicitly use defualt move/copy constructors of MagneticFieldProperties Former-commit-id: 76a70bb7634235cb7ad45b6c7edd129ffd30b506 --- .../src/MagneticFieldProperties.cxx | 24 +++---------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/Tracking/TrkDetDescr/TrkGeometry/src/MagneticFieldProperties.cxx b/Tracking/TrkDetDescr/TrkGeometry/src/MagneticFieldProperties.cxx index 7cab9328413c..deed7bcc4c15 100755 --- a/Tracking/TrkDetDescr/TrkGeometry/src/MagneticFieldProperties.cxx +++ b/Tracking/TrkDetDescr/TrkGeometry/src/MagneticFieldProperties.cxx @@ -19,29 +19,11 @@ Trk::MagneticFieldProperties::MagneticFieldProperties(const Amg::Vector3D& field m_magneticField(field) {} +Trk::MagneticFieldProperties::MagneticFieldProperties(const MagneticFieldProperties& matprop) = default; -Trk::MagneticFieldProperties::MagneticFieldProperties(const Trk::MagneticFieldProperties& magprop) : - m_magneticFieldMode(magprop.m_magneticFieldMode), - m_magneticField(magprop.m_magneticField) -{} +Trk::MagneticFieldProperties& Trk::MagneticFieldProperties::operator=(const MagneticFieldProperties& matprop) = default; -Trk::MagneticFieldProperties& Trk::MagneticFieldProperties::operator=(const Trk::MagneticFieldProperties& magprop) -{ - if (this != &magprop){ - m_magneticFieldMode = magprop.m_magneticFieldMode; - m_magneticField = magprop.m_magneticField; - } - return(*this); -} - -Trk::MagneticFieldProperties& Trk::MagneticFieldProperties::operator=(Trk::MagneticFieldProperties&& magprop) -{ - if (this != &magprop){ - m_magneticFieldMode = magprop.m_magneticFieldMode; - m_magneticField = std::move(magprop.m_magneticField); - } - return(*this); -} +Trk::MagneticFieldProperties& Trk::MagneticFieldProperties::operator=(MagneticFieldProperties && matprop) = default; /**Overload of << operator for both, MsgStream and std::ostream for debug output*/ MsgStream& Trk::operator<<( MsgStream& sl, const Trk::MagneticFieldProperties& mprop) -- GitLab From d548f424a73b7b671169eee45e69eddfd08d6d22 Mon Sep 17 00:00:00 2001 From: Walter Lampl <Walter.Lampl@cern.ch> Date: Tue, 26 Jun 2018 15:56:58 +0200 Subject: [PATCH 259/562] switch external version to 2.0.7 Former-commit-id: afde486e602433351d46f7003f24fa449f51a25e --- Projects/AnalysisBase/externals.txt | 2 +- Projects/AnalysisTop/externals.txt | 2 +- Projects/AthDataQuality/externals.txt | 2 +- Projects/AthSimulation/externals.txt | 2 +- Projects/Athena/externals.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Projects/AnalysisBase/externals.txt b/Projects/AnalysisBase/externals.txt index 9da9bf8a3314..a82f2ab07d51 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.6 +AnalysisBaseExternalsVersion = 2.0.7 diff --git a/Projects/AnalysisTop/externals.txt b/Projects/AnalysisTop/externals.txt index fd2435cf6953..166c5895ebf6 100644 --- a/Projects/AnalysisTop/externals.txt +++ b/Projects/AnalysisTop/externals.txt @@ -1,4 +1,4 @@ # Versions of the various externals to build before starting the build of # this project, when doing a full stack nightly build. -AnalysisBaseExternalsVersion = 2.0.6 +AnalysisBaseExternalsVersion = 2.0.7 diff --git a/Projects/AthDataQuality/externals.txt b/Projects/AthDataQuality/externals.txt index 7616245f3e7f..ca518d06a4e7 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.6 +AtlasExternalsVersion = 2.0.7 diff --git a/Projects/AthSimulation/externals.txt b/Projects/AthSimulation/externals.txt index 80e19b3c1c09..7d921838fab1 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.6 +AthSimulationExternalsVersion = 2.0.7 # The version of atlas/Gaudi to use: GaudiVersion = v30r2.003 diff --git a/Projects/Athena/externals.txt b/Projects/Athena/externals.txt index 2f4b37529d6b..c89b130d1de0 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.6 +AthenaExternalsVersion = 2.0.7 # The version of atlas/Gaudi to use: GaudiVersion = v30r2.003 -- GitLab From 62784fd0ab50e4ad774c0d434becd892d32b97e0 Mon Sep 17 00:00:00 2001 From: Emmanuel Le Guirriec <emmanuel.le.guirriec@cern.ch> Date: Tue, 26 Jun 2018 16:04:54 +0200 Subject: [PATCH 260/562] Use nullptr instead of 0 or NULL. Make objectTDirExists() and getTObject() const Former-commit-id: 6a16b60b1c04f300505b25ef367ea2b6cde253c3 --- .../JetTagCalibration/CalibrationBroker.h | 5 ++-- .../src/CalibrationBroker.cxx | 26 +++++++++---------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/PhysicsAnalysis/JetTagging/JetTagCalibration/JetTagCalibration/CalibrationBroker.h b/PhysicsAnalysis/JetTagging/JetTagCalibration/JetTagCalibration/CalibrationBroker.h index 7c9b6251bcfb..b433a1838607 100755 --- a/PhysicsAnalysis/JetTagging/JetTagCalibration/JetTagCalibration/CalibrationBroker.h +++ b/PhysicsAnalysis/JetTagging/JetTagCalibration/JetTagCalibration/CalibrationBroker.h @@ -114,11 +114,10 @@ public: private: StatusCode createHistoMap(TFile* file); - StatusCode objectTDirExists(const std::string& histname, TFile* file); - StatusCode getTObject(const std::string& histname, TFile* file, TObject*& hist); + StatusCode objectTDirExists(const std::string& histname, TFile* file) const; + StatusCode getTObject(const std::string& histname, TFile* file, TObject*& hist) const; std::vector<std::string> tokenize(std::string str, std::string delim); - //ServiceHandle<IIOVDbSvc> m_IOVDbSvc; IPoolSvc* m_poolsvc; int m_nrefresh; bool m_callBackRegistered; diff --git a/PhysicsAnalysis/JetTagging/JetTagCalibration/src/CalibrationBroker.cxx b/PhysicsAnalysis/JetTagging/JetTagCalibration/src/CalibrationBroker.cxx index 0fa3af08e210..fca43d48f948 100755 --- a/PhysicsAnalysis/JetTagging/JetTagCalibration/src/CalibrationBroker.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagCalibration/src/CalibrationBroker.cxx @@ -36,7 +36,7 @@ namespace Analysis { CalibrationBroker::CalibrationBroker(const std::string& type, const std::string& name, const IInterface* parent) : AthAlgTool(type, name, parent), - m_poolsvc(0), + m_poolsvc(nullptr), m_nrefresh(0), m_callBackRegistered(false) { declareInterface<CalibrationBroker>(this); @@ -399,7 +399,7 @@ namespace Analysis { for(uint j=0;j<m_channels.size();j++) { if(this->channelAlias(m_channels[j])==m_channels[j]) { // skip aliased channels std::string fname = this->fullHistoName(m_channels[j],hname); - TObject* dummy = 0; + TObject* dummy = nullptr; m_histos[i].insert(std::make_pair(fname, std::make_pair(dummy, false))); } else { ATH_MSG_DEBUG( "#BTAG# " << m_channels[j] << " is aliased to " << this->channelAlias(m_channels[j]) @@ -413,15 +413,15 @@ namespace Analysis { } - StatusCode CalibrationBroker::objectTDirExists(const std::string& histname, TFile * pfile) { + StatusCode CalibrationBroker::objectTDirExists(const std::string& histname, TFile * pfile) const { ATH_MSG_DEBUG("#BTAG# in objectTDirExists" ); // now read the histogram into memory ATH_MSG_DEBUG("Getting object "+histname+" from file"); - TObject* hist; + TObject* hist = nullptr; pfile->GetObject(histname.c_str(),hist); - if (hist==0) { + if (hist==nullptr) { ATH_MSG_DEBUG("#BTAG# Could not load TObject " << histname); return StatusCode::FAILURE; } @@ -429,11 +429,11 @@ namespace Analysis { return StatusCode::SUCCESS; } - StatusCode CalibrationBroker::getTObject(const std::string& histname, TFile * pfile, TObject*& hist) { + StatusCode CalibrationBroker::getTObject(const std::string& histname, TFile * pfile, TObject*& hist) const { // now read the histogram into memory ATH_MSG_DEBUG("Getting object "+histname+" from file"); pfile->GetObject(histname.c_str(),hist); - if (hist==0) { + if (hist==nullptr) { ATH_MSG_DEBUG("#BTAG# Could not load TObject " << histname); return StatusCode::FAILURE; } @@ -442,12 +442,12 @@ namespace Analysis { // only for histogram objects, others do not get associated // TTrees have special treatment TH1* ihist=dynamic_cast<TH1*>(hist); - if (ihist!=0) ihist->SetDirectory(0); + if (ihist!=nullptr) ihist->SetDirectory(0); // if it is a TDirectory, also need special treatment to unassociate parent TDirectory* idir=dynamic_cast<TDirectory*>(hist); - if (idir!=0) { + if (idir!=nullptr) { TDirectory* mdir=idir->GetMotherDir(); - if (mdir!=0) { + if (mdir!=nullptr) { ATH_MSG_DEBUG("Disconnecting TDirectory "+histname+" from parent"); mdir->GetList()->Remove(idir); idir->SetMother(0); @@ -477,7 +477,7 @@ namespace Analysis { ATH_MSG_DEBUG( "#BTAG# Key and actual folder match: " << (*itr)); // Get the GUID - const CondAttrListCollection* atrcol = 0; + const CondAttrListCollection* atrcol = nullptr; if (StatusCode::SUCCESS!=detStore()->retrieve(atrcol,folder)) { ATH_MSG_DEBUG("#BTAG# Cannot retrieve CondAttrListCollection for " << folder); return StatusCode::FAILURE; @@ -496,7 +496,7 @@ namespace Analysis { std::string pfname, tech; m_poolsvc->catalog()->getFirstPFN(coolguid, pfname, tech ); TFile* pfile = TFile::Open(pfname.c_str(),"READ"); - if (pfile==0 || !pfile->IsOpen()) { + if (pfile==nullptr || !pfile->IsOpen()) { delete pfile; ATH_MSG_WARNING("Problems opening input file "+pfname); return StatusCode::FAILURE; @@ -524,7 +524,7 @@ namespace Analysis { hFullName+="/"; hFullName+=channel; hFullName+="/"; hFullName+=hname; ATH_MSG_DEBUG( "#BTAG# histo name in physical file= " << hFullName ); - TObject* hPointer = 0; + TObject* hPointer = nullptr; if (getTObject(hFullName, pfile, hPointer)) { -- GitLab From 19a7ff60f1d102bfc16edb0a46033bcb4dd5bd16 Mon Sep 17 00:00:00 2001 From: Walter Lampl <walter.lampl@cern.ch> Date: Tue, 26 Jun 2018 15:05:04 +0000 Subject: [PATCH 261/562] Update README.md Former-commit-id: 50ea05d7a03bd5a042177a6e2e7180976c97cf0f --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 86bd579349c7..0546664e9031 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ Branch | Purpose [21.1-dev](https://gitlab.cern.ch/atlas/athena/tree/21.1-dev) | HLT and P1 Run 2 Developments | AthenaP1, No production releases [21.2](https://gitlab.cern.ch/atlas/athena/tree/21.2) | Derivations and Analysis | AthDerivations + (Ath)AnalysisBase, 21.2.X [21.3](https://gitlab.cern.ch/atlas/athena/tree/21.3) | MC18 Simulation | Athena + AthSimulation, 21.3.X +[21.6](https://gitlab.cern.ch/atlas/athena/tree/21.6) | Event Generation | AthGenerators, 21.6.X [21.9](https://gitlab.cern.ch/atlas/athena/tree/21.9) | Upgrade Phase-2 developments | Athena + AthSimulation, 21.9.X [master](https://gitlab.cern.ch/atlas/athena/tree/master) | AthenaMT development | Athena, 22.0.X -- GitLab From e755a121a6fe4343e24b7551cf5699bbf416124b Mon Sep 17 00:00:00 2001 From: Peter Hansen <hansenph@lxplus054.cern.ch> Date: Tue, 26 Jun 2018 20:32:38 +0200 Subject: [PATCH 262/562] Remove beginRun incidents and IOVCALLBACKs Former-commit-id: fbc96a81e5df5648132a2707cdfdb412df746054 --- .../TRT_CalibAlgs/share/CollisionTemplate.py | 4 +- .../TRT_CalibAlgs/share/ESDCalibTemplate.py | 3 +- .../TRT_CalibAlgs/share/ESDTemplate.py | 3 +- .../TRT_CalibAlgs/share/joboptionsFullReco.py | 8 + .../share/joboptionsRefitting.py | 3 +- .../share/InDetDxAOD.py | 7 + .../share/ConfiguredInDetPreProcessingTRT.py | 12 +- .../share/InDetMonitoringTRT.py | 6 + .../share/InDetRecConditionsAccess.py | 5 +- .../share/InDetRecLoadTools.py | 10 + .../python/InDetTrigCommonTools.py | 21 +- .../python/InDetTrigConfigConditions.py | 9 +- .../ITRT_DriftFunctionTool.h | 4 +- .../TRT_DriftFunctionTool.h | 31 +- .../src/TRT_DriftFunctionTool.cxx | 296 +++++++----------- .../python/EMBremCollectionBuilder.py | 12 +- 16 files changed, 210 insertions(+), 224 deletions(-) diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CollisionTemplate.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CollisionTemplate.py index 9ecf0a2894b3..e8687aaa9007 100644 --- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CollisionTemplate.py +++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CollisionTemplate.py @@ -222,9 +222,11 @@ from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_CalDbSvc TRTCalibDBSvc=TRT_CalDbSvc() ServiceMgr += TRTCalibDBSvc + from TRT_DriftFunctionTool.TRT_DriftFunctionToolConf import TRT_DriftFunctionTool InDetTRT_DriftFunctionTool = TRT_DriftFunctionTool(name = "InDetTRT_DriftFunctionTool", - TRTCalDbTool=TRTCalibDBSvc ) + TRTCalDbTool=TRTCalibDBSvc, + IsMC=(globalflags.DataSource == 'geant4')) ToolSvc += InDetTRT_DriftFunctionTool print InDetTRT_DriftFunctionTool diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/ESDCalibTemplate.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/ESDCalibTemplate.py index 0f6b04163ff3..dba6aed353bd 100644 --- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/ESDCalibTemplate.py +++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/ESDCalibTemplate.py @@ -241,7 +241,8 @@ from TRT_DriftFunctionTool.TRT_DriftFunctionToolConf import TRT_DriftFunctionToo InDetTRT_DriftFunctionTool = TRT_DriftFunctionTool(name = "InDetTRT_DriftFunctionTool", AllowDataMCOverride = True, TRTCalDbTool=TRTCalSvc, - ForceData = True) + ForceData = True, + IsMC=(globalflags.DataSource == 'geant4')) ToolSvc += InDetTRT_DriftFunctionTool print InDetTRT_DriftFunctionTool diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/ESDTemplate.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/ESDTemplate.py index 1c77bf70406e..e31436751c90 100644 --- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/ESDTemplate.py +++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/ESDTemplate.py @@ -296,7 +296,8 @@ from TRT_DriftFunctionTool.TRT_DriftFunctionToolConf import TRT_DriftFunctionToo InDetTRT_DriftFunctionTool = TRT_DriftFunctionTool(name = "InDetTRT_DriftFunctionTool", AllowDataMCOverride = True, TRTCalDbTool=TRTCalSvc, - ForceData = True) + ForceData = True, + IsMC=(globalflags.DataSource == 'geant4')) ToolSvc += InDetTRT_DriftFunctionTool print InDetTRT_DriftFunctionTool diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/joboptionsFullReco.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/joboptionsFullReco.py index fa7162ef2103..f47740da2928 100755 --- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/joboptionsFullReco.py +++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/joboptionsFullReco.py @@ -234,6 +234,14 @@ FillAlignTrkInfo = FillAlignTrkInfo ( name = 'FillAlignTrkInfo', ToolSvc += FillAlignTrkInfo print FillAlignTrkInfo +from TRT_DriftFunctionTool.TRT_DriftFunctionToolConf import TRT_DriftFunctionTool +InDetTRT_DriftFunctionTool = TRT_DriftFunctionTool(name = "InDetTRT_DriftFunctionTool", + TRTCalDbTool=TRTCalibDBSvc, + IsMC=(globalflags.DataSource == 'geant4')) + +ToolSvc += InDetTRT_DriftFunctionTool +print InDetTRT_DriftFunctionTool + from TRT_CalibTools.TRT_CalibToolsConf import FillAlignTRTHits FillAlignTRTHits = FillAlignTRTHits ( name = 'FillAlignTRTHits', minTimebinsOverThreshold=0, diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/joboptionsRefitting.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/joboptionsRefitting.py index 4de2facdd7df..b6727028a5e5 100644 --- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/joboptionsRefitting.py +++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/joboptionsRefitting.py @@ -208,7 +208,8 @@ ServiceMgr += TRTCalibDBSvc from TRT_DriftFunctionTool.TRT_DriftFunctionToolConf import TRT_DriftFunctionTool InDetTRT_DriftFunctionTool = TRT_DriftFunctionTool(name = "InDetTRT_DriftFunctionTool", - TRTCalDbTool=TRTCalibDBSvc ) + TRTCalDbTool=TRTCalibDBSvc, + IsMC=(globalflags.DataSource == 'geant4')) ToolSvc += InDetTRT_DriftFunctionTool print InDetTRT_DriftFunctionTool diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/share/InDetDxAOD.py b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/share/InDetDxAOD.py index 58b7eceedce5..2b65c65247df 100644 --- a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/share/InDetDxAOD.py +++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/share/InDetDxAOD.py @@ -341,9 +341,16 @@ if DRAWZSel: ################# if dumpTrtInfo: + + from TRT_DriftFunctionTool.TRT_DriftFunctionToolConf import TRT_DriftFunctionTool + InDetTRT_DriftFunctionTool = TRT_DriftFunctionTool(name = "InDetTRT_DriftFunctionTool", + IsMC = isIdTrkDxAODSimulation) + from InDetPrepRawDataToxAOD.InDetPrepRawDataToxAODConf import TRT_PrepDataToxAOD xAOD_TRT_PrepDataToxAOD = TRT_PrepDataToxAOD( name = "xAOD_TRT_PrepDataToxAOD") + ## Content steering Properties (default value shown as comment) + xAOD_TRT_PrepDataToxAOD.TRTDriftFunctionTool = InDetTRT_DriftFunctionTool xAOD_TRT_PrepDataToxAOD.OutputLevel=INFO xAOD_TRT_PrepDataToxAOD.UseTruthInfo = dumpTruthInfo #xAOD_TRT_PrepDataToxAOD.WriteSDOs = True diff --git a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredInDetPreProcessingTRT.py b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredInDetPreProcessingTRT.py index bd2b994de896..48146a3c5386 100644 --- a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredInDetPreProcessingTRT.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredInDetPreProcessingTRT.py @@ -40,6 +40,8 @@ class ConfiguredInDetPreProcessingTRT: # # --- TRT_DriftFunctionTool # + + from TRT_DriftFunctionTool.TRT_DriftFunctionToolConf import TRT_DriftFunctionTool InDetTRT_DriftFunctionTool = TRT_DriftFunctionTool(name = prefix+"DriftFunctionTool", TRTCalDbTool = InDetTRTCalDbSvc) @@ -47,6 +49,13 @@ class ConfiguredInDetPreProcessingTRT: if (not useTimeInfo) or InDetFlags.noTRTTiming(): InDetTRT_DriftFunctionTool.DummyMode = True InDetTRT_DriftFunctionTool.UniversalError = 1.15 + + # --- set Data/MC flag + if(globalflags.DataSource != 'geant4') : + InDetTRT_DriftFunctionTool.IsMC = False + else : + InDetTRT_DriftFunctionTool.IsMC = True + # --- overwrite for calibration of MC if usePhase and jobproperties.Beam.beamType()=='cosmics' and globalflags.DataSource == "geant4": InDetTRT_DriftFunctionTool.AllowDigiVersionOverride = True @@ -154,7 +163,8 @@ class ConfiguredInDetPreProcessingTRT: if InDetFlags.doTRTGlobalOccupancy(): from TRT_ElectronPidTools.TRT_ElectronPidToolsConf import InDet__TRT_LocalOccupancy InDetTRT_LocalOccupancy = InDet__TRT_LocalOccupancy( name = "InDet_TRT_LocalOccupancy", - isTrigger = False + isTrigger = False, + TRTDriftFunctionTool = InDetTRT_DriftFunctionTool ) ToolSvc += InDetTRT_LocalOccupancy diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringTRT.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringTRT.py index 293e278eb60c..d76b4f72ba65 100644 --- a/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringTRT.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringTRT.py @@ -3,6 +3,7 @@ #-------------------------------------------------------------- from AthenaMonitoring.DQMonFlags import DQMonFlags from AthenaCommon.AthenaCommonFlags import athenaCommonFlags +from AthenaCommon.GlobalFlags import globalflags from AthenaCommon.AppMgr import ServiceMgr as svcMgr from AthenaCommon.BeamFlags import jobproperties from AthenaCommon.DetFlags import DetFlags @@ -29,11 +30,16 @@ else: # no track quality cuts for cosmics or single beams #------------------------------------------------------------- # Barrel Monitoring #------------------------------------------------------------- +from TRT_DriftFunctionTool.TRT_DriftFunctionToolConf import TRT_DriftFunctionTool +InDetTRT_DriftFunctionTool = TRT_DriftFunctionTool(name = "InDetTRT_DriftFunctionTool", + IsMC = (globalflags.DataSource == 'geant4')) + from TRT_Monitoring.TRT_MonitoringConf import TRT_Monitoring_Tool InDetTRT_Monitoring_Tool = TRT_Monitoring_Tool (name = "TRT_Monitoring_Tool", TRTRawDataObjectName = InDetKeys.TRT_RDOs(), NumberOfEvents = -1, TRTTracksObjectName = InDetKeys.UnslimmedTracks(), + DriftFunctionTool = InDetTRT_DriftFunctionTool, TrkSummaryTool = InDetTrackSummaryTool, Map_Path = "../maps/", # obsolete LE_TimeWindow_MIN = 0, # can be 0,1,or 2 diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py index edf3c4924053..3cb69cd91345 100644 --- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py @@ -404,10 +404,11 @@ if DetFlags.haveRIO.TRT_on(): TRTSlopesFolder = conddb.addFolderSplitOnline ("TRT","/TRT/Onl/Calib/slopes","/TRT/Calib/slopes",className='TRTCond::RtRelationMultChanContainer') if not conddb.folderRequested('/TRT/Calib/ToTCalib'): - conddb.addFolderSplitOnline("TRT","/TRT/Onl/Calib/ToTCalib","/TRT/Calib/ToTCalib") + conddb.addFolderSplitOnline("TRT","/TRT/Onl/Calib/ToTCalib","/TRT/Calib/ToTCalib",className='CondAttrListCollection') if not conddb.folderRequested('/TRT/Calib/HTCalib'): - conddb.addFolderSplitOnline("TRT","/TRT/Onl/Calib/HTCalib","/TRT/Calib/HTCalib") + conddb.addFolderSplitOnline("TRT","/TRT/Onl/Calib/HTCalib","/TRT/Calib/HTCalib",className='CondAttrListCollection') + # Calibration DB Service from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_CalDbSvc diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py index 79407bab96e5..7b4aab95c851 100755 --- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py @@ -902,9 +902,19 @@ if InDetFlags.loadSummaryTool(): if DetFlags.haveRIO.TRT_on() and not InDetFlags.doSLHC() and not InDetFlags.doHighPileup() \ and not InDetFlags.useExistingTracksAsInput(): # TRT_RDOs (used byt the TRT_LocalOccupancy tool) are not present in ESD + isMC = False + if globalflags.DataSource == "geant4" : + isMC = True + + from TRT_DriftFunctionTool.TRT_DriftFunctionToolConf import TRT_DriftFunctionTool + InDetTRT_DriftFunctionTool = TRT_DriftFunctionTool( name = "InDetTRT_DriftFunctionTool", + IsMC = isMC ) + ToolSvc += InDetTRT_DriftFunctionTool + from TRT_ElectronPidTools.TRT_ElectronPidToolsConf import InDet__TRT_LocalOccupancy InDetTRT_LocalOccupancy = InDet__TRT_LocalOccupancy( name ="InDet_TRT_LocalOccupancy", isTrigger = False, + TRTDriftFunctionTool = InDetTRT_DriftFunctionTool ) ToolSvc += InDetTRT_LocalOccupancy if (InDetFlags.doPrintConfigurables()): diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigCommonTools.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigCommonTools.py index de73afab5a89..ef65af23e240 100644 --- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigCommonTools.py +++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigCommonTools.py @@ -11,23 +11,30 @@ ___version___ = "$Id: $" from InDetTrigRecExample.InDetTrigConditionsAccess import TRT_ConditionsSetup from AthenaCommon.AppMgr import ToolSvc +from AthenaCommon.GlobalFlags import globalflags + +# TRT_DriftFunctionTool +isMC = False +if globalflags.DataSource == "geant4" : + isMC = True from TRT_DriftFunctionTool.TRT_DriftFunctionToolConf import TRT_DriftFunctionTool + InDetTrigTRT_DriftFunctionTool = TRT_DriftFunctionTool(name = "InDetTrigTRT_DriftFunctionTool", AllowDataMCOverride = True, - ForceData = True ) + ForceData = True, + IsMC = isMC, + TRTCalDbTool = "TRT_CalDbSvc/TRT_CalDbSvc" ) -# +ToolSvc += InDetTrigTRT_DriftFunctionTool + +# TRT_RodDecoder from TRT_RawDataByteStreamCnv.TRT_RawDataByteStreamCnvConf import TRT_RodDecoder -from AthenaCommon.GlobalFlags import globalflags + InDetTrigTRTRodDecoder = TRT_RodDecoder(name = "InDetTrigTRTRodDecoder", LoadCompressTableDB = (globalflags.DataSource() != 'geant4')) ToolSvc += InDetTrigTRTRodDecoder -#InDetTrigTRT_DriftFunctionTool.TRTCalDbTool='TRT_CalDbSvc/'+TRT_ConditionsSetup.instanceName("TRT_CalDbSvc") -InDetTrigTRT_DriftFunctionTool.TRTCalDbTool='TRT_CalDbSvc/TRT_CalDbSvc' -ToolSvc += InDetTrigTRT_DriftFunctionTool - # TRT_DriftCircleTool from TRT_DriftCircleTool.TRT_DriftCircleToolConf import InDet__TRT_DriftCircleTool #these settings offline keeps for MC diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py index 27271e0e57b3..979617ef7738 100644 --- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py +++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py @@ -551,11 +551,12 @@ class TRTConditionsServicesSetup: conddb.addFolderSplitOnline ("TRT","/TRT/Onl/Calib/errors","/TRT/Calib/errors",className='TRTCond::RtRelationMultChanContainer') # not needed anymore conddb.addOverride('/TRT/Onl/Calib/errors','TrtCalibErrorsOnl-ErrorVal-00-00') - if not (conddb.folderRequested('/TRT/Calib/ToTCalib') or conddb.folderRequested('/TRT/Onl/Calib/ToTCalib')): - conddb.addFolderSplitOnline("TRT","/TRT/Onl/Calib/ToTCalib","/TRT/Calib/ToTCalib") + if not conddb.folderRequested('/TRT/Calib/ToTCalib'): + conddb.addFolderSplitOnline("TRT","/TRT/Onl/Calib/ToTCalib","/TRT/Calib/ToTCalib",className='CondAttrListCollection') + + if not conddb.folderRequested('/TRT/Calib/HTCalib'): + conddb.addFolderSplitOnline("TRT","/TRT/Onl/Calib/HTCalib","/TRT/Calib/HTCalib",className='CondAttrListCollection') - if not (conddb.folderRequested('/TRT/Calib/HTCalib') or conddb.folderRequested('/TRT/Onl/Calib/HTCalib')): - conddb.addFolderSplitOnline("TRT","/TRT/Onl/Calib/HTCalib","/TRT/Calib/HTCalib") # Calibration DB Service from AthenaCommon.AppMgr import ServiceMgr diff --git a/InnerDetector/InDetRecTools/TRT_DriftFunctionTool/TRT_DriftFunctionTool/ITRT_DriftFunctionTool.h b/InnerDetector/InDetRecTools/TRT_DriftFunctionTool/TRT_DriftFunctionTool/ITRT_DriftFunctionTool.h index 5fa1d42faacf..00a8e0f702fc 100755 --- a/InnerDetector/InDetRecTools/TRT_DriftFunctionTool/TRT_DriftFunctionTool/ITRT_DriftFunctionTool.h +++ b/InnerDetector/InDetRecTools/TRT_DriftFunctionTool/TRT_DriftFunctionTool/ITRT_DriftFunctionTool.h @@ -37,9 +37,9 @@ class ITRT_DriftFunctionTool : virtual public IAlgTool { virtual double errorOfDriftRadius(double drifttime, Identifier id, float mu = -10, unsigned int word=0) const = 0; - virtual double driftTimeToTCorrection(double tot, Identifier id) const = 0; + virtual double driftTimeToTCorrection(double tot, Identifier id) = 0; - virtual double driftTimeHTCorrection(Identifier id) const = 0; + virtual double driftTimeHTCorrection(Identifier id) = 0; }; diff --git a/InnerDetector/InDetRecTools/TRT_DriftFunctionTool/TRT_DriftFunctionTool/TRT_DriftFunctionTool.h b/InnerDetector/InDetRecTools/TRT_DriftFunctionTool/TRT_DriftFunctionTool/TRT_DriftFunctionTool.h index 3befff3330d6..63b147108851 100755 --- a/InnerDetector/InDetRecTools/TRT_DriftFunctionTool/TRT_DriftFunctionTool/TRT_DriftFunctionTool.h +++ b/InnerDetector/InDetRecTools/TRT_DriftFunctionTool/TRT_DriftFunctionTool/TRT_DriftFunctionTool.h @@ -21,11 +21,18 @@ class ITRT_CalDbSvc; class TRT_ID; -class IIncidentSvc; + #include "InDetReadoutGeometry/TRT_DetectorManager.h" -#include "GaudiKernel/IIncidentListener.h" #include "GaudiKernel/ServiceHandle.h" +#include "GaudiKernel/ICondSvc.h" +#include "StoreGate/ReadCondHandleKey.h" +#include "StoreGate/DataHandle.h" +// AttributeList +#include "CoralBase/Attribute.h" +#include "CoralBase/AttributeListSpecification.h" +#include "AthenaPoolUtilities/AthenaAttributeList.h" +#include "AthenaPoolUtilities/CondAttrListCollection.h" /** @class TRT_DriftFunctionTool @@ -34,8 +41,7 @@ class IIncidentSvc; */ class TRT_DriftFunctionTool: public AthAlgTool, - virtual public ITRT_DriftFunctionTool, - virtual public IIncidentListener { + virtual public ITRT_DriftFunctionTool{ public: /** Constructor */ @@ -82,34 +88,34 @@ public: double errorOfDriftRadius(double drifttime, Identifier id, float mu = -10, unsigned int word=0) const; /** Returns time over threshold correction to the drift time (ns) */ - double driftTimeToTCorrection(double tot, Identifier id) const; + double driftTimeToTCorrection(double tot, Identifier id); /** Returns high threshold correction to the drift time (ns) */ - double driftTimeHTCorrection(Identifier id) const; + double driftTimeHTCorrection(Identifier id); /** Initialise Rt relation in data */ void setupRtRelationData(); /** Initialise Rt relation in MC */ void setupRtRelationMC(); - /** handle BeginRun incidents */ - void handle(const Incident& inc); private: - // Update of database entries. - StatusCode update( IOVSVC_CALLBACK_ARGS ); /** Tool to fetch data from database */ ServiceHandle< ITRT_CalDbSvc > m_TRTCalDbSvc; ServiceHandle< ITRT_CalDbSvc > m_TRTCalDbSvc2; - /** Service to report incidents (begin run, begin event) */ - ServiceHandle< IIncidentSvc > m_IncidentSvc; /** DetectorManager and helper */ const InDetDD::TRT_DetectorManager* m_manager; const TRT_ID* m_trtid; + bool m_setupToT; //!< true at first call + bool m_setupHT; //!< true at first call + // ReadHandle keys + SG::ReadCondHandleKey<CondAttrListCollection> m_ToTkey{this,"ToTKeyName","/TRT/Calib/ToTCalib","ToTCalib in-key"}; + SG::ReadCondHandleKey<CondAttrListCollection> m_HTkey{this,"HTKeyName","/TRT/Calib/HTCalib","HTCalib in-key"}; + double m_drifttimeperbin; //!< 3.125ns double m_error; //!< universal error @@ -145,6 +151,7 @@ private: double m_t0_shift; //!< digiversion dependent t0 shift float m_tot_corrections[2][20]; //!< ToT corrections for 20 ToT bins in barrel and endcap double m_ht_corrections[2]; //!< HT corrections for barrel and endcap + mutable std::mutex m_cacheMutex; }; inline bool TRT_DriftFunctionTool::isValidTime(double drifttime) const diff --git a/InnerDetector/InDetRecTools/TRT_DriftFunctionTool/src/TRT_DriftFunctionTool.cxx b/InnerDetector/InDetRecTools/TRT_DriftFunctionTool/src/TRT_DriftFunctionTool.cxx index 102121dd4d5e..3f21e7761500 100755 --- a/InnerDetector/InDetRecTools/TRT_DriftFunctionTool/src/TRT_DriftFunctionTool.cxx +++ b/InnerDetector/InDetRecTools/TRT_DriftFunctionTool/src/TRT_DriftFunctionTool.cxx @@ -14,19 +14,15 @@ #include "TRT_DriftFunctionTool/TRT_DriftFunctionTool.h" +#include "StoreGate/StoreGateSvc.h" +#include "GaudiKernel/IToolSvc.h" #include "GeoModelInterfaces/IGeoModelSvc.h" #include "GeoModelUtilities/DecodeVersionKey.h" #include "InDetIdentifier/TRT_ID.h" #include "InDetReadoutGeometry/TRT_DetectorManager.h" #include "InDetReadoutGeometry/TRT_Numerology.h" #include "InDetReadoutGeometry/Version.h" - - -#include "GaudiKernel/IIncidentSvc.h" -#include "EventInfo/EventIncident.h" -#include "EventInfo/EventInfo.h" -#include "EventInfo/EventType.h" - +#include "StoreGate/ReadCondHandle.h" #include "TRT_ConditionsServices/ITRT_CalDbSvc.h" #include "CLHEP/Units/SystemOfUnits.h" @@ -41,10 +37,13 @@ TRT_DriftFunctionTool::TRT_DriftFunctionTool(const std::string& type, const std::string& name, const IInterface* parent) - : AthAlgTool(type, name, parent), + : AthAlgTool(type, name, parent), m_TRTCalDbSvc("TRT_CalDbSvc",name), m_TRTCalDbSvc2("",name), - m_IncidentSvc("IncidentSvc",name), + m_setupToT(true), + m_setupHT(true), + m_ToTkey("/TRT/Calib/ToTCalib"), + m_HTkey("/TRT/Calib/HTCalib"), m_drifttimeperbin(3.125 * CLHEP::ns), m_error(0.17), m_drifttimeperhalfbin(0.), // set later @@ -67,9 +66,8 @@ TRT_DriftFunctionTool::TRT_DriftFunctionTool(const std::string& type, { declareInterface<ITRT_DriftFunctionTool>(this); - declareProperty("IncidentService",m_IncidentSvc); m_drifttimeperhalfbin = m_drifttimeperbin/2.; - declareProperty("TRT_Calibration",m_isdata); + declareProperty("IsMC",m_ismc); declareProperty("AllowDigiVersionOverride",m_allow_digi_version_override); declareProperty("ForcedDigiVersion",m_forced_digiversion); declareProperty("AllowDataMCOverride",m_allow_data_mc_override); @@ -165,16 +163,6 @@ StatusCode TRT_DriftFunctionTool::initialize() ATH_MSG_INFO(" Drift time information ignored "); } - //Incident service (to check for MC/data and setup accordingly) - if ( m_IncidentSvc.retrieve().isFailure() ) { - ATH_MSG_FATAL("Failed to retrieve service " << m_IncidentSvc); - return StatusCode::FAILURE; - } else - ATH_MSG_DEBUG("Retrieved service " << m_IncidentSvc); - - // call handle in case of BeginRun - m_IncidentSvc->addListener( this, std::string("BeginRun")); - // Retrieve TRT_DetectorManager and helper sc = AthAlgTool::detStore()->retrieve(m_manager, m_trt_mgr_location); if (sc.isFailure() || !m_manager) @@ -208,21 +196,52 @@ StatusCode TRT_DriftFunctionTool::initialize() DecodeVersionKey versionKey(geomodel,"TRT"); m_key=versionKey.tag(); + ATH_CHECK( m_ToTkey.initialize() ); + ATH_CHECK( m_HTkey.initialize() ); + + int numB = m_manager->getNumerology()->getNBarrelPhi(); + ATH_MSG_DEBUG(" Number of Barrel elements "<< numB); + + if (numB==2) { + m_istestbeam = true; + } else { + m_istestbeam = false; + } - // Register callback function for cache updates - ToT: - const DataHandle<CondAttrListCollection> aptr; - if (StatusCode::SUCCESS == detStore()->regFcn(&TRT_DriftFunctionTool::update,this, aptr, "/TRT/Calib/ToTCalib" )) { - ATH_MSG_INFO ("Registered callback for TRT_DriftFunctionTool - ToT Correction."); + + bool choosedata = false; + bool choosemc = false; + + if(m_ismc) { + ATH_MSG_INFO(" TRT_DriftFunctionTool initialized for simulation"); + choosemc = true; + m_isdata=false; } else { - ATH_MSG_ERROR ("Callback registration failed for TRT_DriftFunctionTool - ToT! Using default correction values."); + ATH_MSG_INFO(" TRT_DriftFunctionTool initialized for data"); + choosedata = true; + m_isdata=true; + } + + if(m_allow_data_mc_override) { + choosedata = false; + choosemc = false; + if (m_forcedata) { + ATH_MSG_INFO(" Constants will be read from conddb "); + choosedata=true; + } else { + ATH_MSG_INFO(" Constants will be read from code "); + choosemc=true; + } } - // Register callback function for cache updates - HT: - const DataHandle<CondAttrListCollection> aptrHT; - if (StatusCode::SUCCESS == detStore()->regFcn(&TRT_DriftFunctionTool::update,this, aptrHT, "/TRT/Calib/HTCalib" )) { - ATH_MSG_INFO ("Registered callback for TRT_DriftFunctionTool - HT Correction."); + if(choosemc&&choosedata) ATH_MSG_FATAL("Trying to init MC and data setup both!"); + if(!choosemc&&!choosedata) ATH_MSG_FATAL("Neither MC nor data setup selected!"); + if(choosemc) { + m_isdata=false; + setupRtRelationMC(); } else { - ATH_MSG_ERROR ("Callback registration failed for TRT_DriftFunctionTool - HT! Using default correction values."); + m_isdata=true; + setupRtRelationData(); } return sc; @@ -236,78 +255,6 @@ StatusCode TRT_DriftFunctionTool::finalize() return sc; } -// -// handle BeginRun incidents------------------------------------------------ -void TRT_DriftFunctionTool::handle(const Incident& inc) -{ - - //Find out what type of run - if (inc.type() == "BeginRun") - { - const EventInfo* pevt = 0; // pointer for the event - StatusCode status = evtStore()->retrieve(pevt); // retrieve the pointer to the event - if(!status.isSuccess() || pevt==0) { - ATH_MSG_FATAL("Couldn't get EventInfo object from StoreGate"); - return; - } - - int numB = m_manager->getNumerology()->getNBarrelPhi(); - ATH_MSG_DEBUG(" Number of Barrel elements "<< numB); - - if (numB==2) { - m_istestbeam = true; - } else { - m_istestbeam = false; - } - - if(pevt->event_type()->test(EventType::IS_CALIBRATION)) - { - ATH_MSG_DEBUG("Run reports itself as calibration"); - } else { - ATH_MSG_DEBUG("Run reports itself as physics"); - } - - bool choosedata = false; - bool choosemc = false; - - if(pevt->event_type()->test(EventType::IS_SIMULATION)) - { - ATH_MSG_DEBUG("Run reports itself as simulation"); - choosemc = true; - m_ismc=true; - } else { - ATH_MSG_DEBUG("Run reports itself as data"); - choosedata = true; - m_ismc=false; - } - - if(m_allow_data_mc_override) - { - choosedata = false; - choosemc = false; - if (m_forcedata) - { - ATH_MSG_INFO(" Constants will be read from conddb "); - choosedata=true; - } else { - ATH_MSG_INFO(" Constants will be read from code "); - choosemc=true; - } - } - - if(choosemc&&choosedata) ATH_MSG_FATAL("Trying to init MC and data setup both!"); - if(!choosemc&&!choosedata) ATH_MSG_FATAL("Neither MC nor data setup selected!"); - if(choosemc) - { - m_isdata=false; - setupRtRelationMC(); - } else { - m_isdata=true; - setupRtRelationData(); - } - } - return; -} // Drift time in ns for any non negative drift radius; Not calibrated for // individual straws and run range, but otherwise adapted to any // setup. @@ -479,9 +426,37 @@ double TRT_DriftFunctionTool::errorOfDriftRadius(double drifttime, Identifier id // // returns the time over threshold correction in ns -double TRT_DriftFunctionTool::driftTimeToTCorrection(double tot, Identifier id) const +double TRT_DriftFunctionTool::driftTimeToTCorrection(double tot, Identifier id) { + if(m_setupToT) { + std::lock_guard<std::mutex> lock(m_cacheMutex); + const CondAttrListCollection* atrlistcol; + SG::ReadCondHandle<CondAttrListCollection> rch(m_ToTkey); + atrlistcol=*rch; + if(!atrlistcol) ATH_MSG_ERROR ("Problem reading condDB ToT correction constants."); + int channel; + std::ostringstream var_name; + for (CondAttrListCollection::const_iterator citr=atrlistcol->begin(); + citr!=atrlistcol->end();++citr) { + + //get Barrel (1) or Endcap (2) + channel = citr->first; + + if ((channel == 1) || (channel == 2)) { + const coral::AttributeList& atrlist = citr->second; + + for (int i = 0; i < 20; ++i ) { + var_name << "TRT_ToT_" << std::dec << i; + m_tot_corrections[channel-1][i] = atrlist[var_name.str()].data<float>(); + var_name.str(""); + } + } + } + m_setupToT=false; + } + + int tot_index = tot/3.125; if (tot_index < 0) tot_index = 0; if (tot_index > 19) tot_index = 19; @@ -492,9 +467,34 @@ double TRT_DriftFunctionTool::driftTimeToTCorrection(double tot, Identifier id) } // Returns high threshold correction to the drift time (ns) -double TRT_DriftFunctionTool::driftTimeHTCorrection(Identifier id) const +double TRT_DriftFunctionTool::driftTimeHTCorrection(Identifier id) { + if(m_setupHT) { + std::lock_guard<std::mutex> lock(m_cacheMutex); + const CondAttrListCollection* atrlistcol; + SG::ReadCondHandle<CondAttrListCollection> rch(m_HTkey); + atrlistcol=*rch; + if(!atrlistcol) ATH_MSG_ERROR ("Problem reading condDB HT correction constants."); + int channel; + std::ostringstream var_name; + for (CondAttrListCollection::const_iterator citr=atrlistcol->begin(); + citr!=atrlistcol->end();++citr) { + + channel = citr->first; + if (channel == 1) { + const coral::AttributeList& atrlist = citr->second; + + for (int i = 0; i < 2; ++i ) { + var_name << "TRT_HT_" << std::dec << i; + m_ht_corrections[i] = atrlist[var_name.str()].data<float>(); + var_name.str(""); + } + } + } + m_setupHT=false; + } + int bec_index = abs(m_trtid->barrel_ec(id)) - 1; return m_ht_corrections[bec_index]; @@ -900,89 +900,3 @@ void TRT_DriftFunctionTool::setupRtRelationMC() } } - -/* ----------------------------------------------------------------------------------- */ -// Callback function to update constants from database: -/* ----------------------------------------------------------------------------------- */ -StatusCode TRT_DriftFunctionTool::update( IOVSVC_CALLBACK_ARGS_P(I,keys) ) { - - ATH_MSG_INFO ("Updating constants for the TRT_DriftFunctionTool! "); - - // Callback function to update Drift Time Correction parameters when condDB data changes: - for(std::list<std::string>::const_iterator key=keys.begin(); key != keys.end(); ++key) - ATH_MSG_DEBUG("IOVCALLBACK for key " << *key << " number " << I); - - StatusCode status = StatusCode::SUCCESS; - - for(std::list<std::string>::const_iterator key=keys.begin(); key != keys.end(); ++key) { - - const CondAttrListCollection* atrlistcol; - - if (*key == "/TRT/Calib/ToTCalib") { - ATH_MSG_INFO ("Updating ToT constants for the TRT_DriftFunctionTool! "); - - // Read the ToT Correction parameters: - // ----------------------------------------------------------------------------------- // - if (StatusCode::SUCCESS == detStore()->retrieve(atrlistcol, "/TRT/Calib/ToTCalib" ) && atrlistcol != 0) { - - int channel; - std::ostringstream var_name; - for (CondAttrListCollection::const_iterator citr=atrlistcol->begin(); - citr!=atrlistcol->end();++citr) { - - //get Barrel (1) or Endcap (2) - channel = citr->first; - - if ((channel == 1) || (channel == 2)) { - const coral::AttributeList& atrlist = citr->second; - - for (int i = 0; i < 20; ++i ) { - var_name << "TRT_ToT_" << std::dec << i; - m_tot_corrections[channel-1][i] = atrlist[var_name.str()].data<float>(); - var_name.str(""); - } - } - } - - } else { - ATH_MSG_ERROR ("Problem reading condDB object for ToT correction constants."); - status = StatusCode::FAILURE; - } - } - - - if (*key == "/TRT/Calib/HTCalib") { - ATH_MSG_INFO ("Updating HT constants for the TRT_DriftFunctionTool! "); - - // Read the HT Correction parameters: - // ----------------------------------------------------------------------------------- // - if (StatusCode::SUCCESS == detStore()->retrieve(atrlistcol, "/TRT/Calib/HTCalib" ) && atrlistcol != 0) { - - int channel; - std::ostringstream var_name; - for (CondAttrListCollection::const_iterator citr=atrlistcol->begin(); - citr!=atrlistcol->end();++citr) { - - channel = citr->first; - - if (channel == 1) { - const coral::AttributeList& atrlist = citr->second; - - for (int i = 0; i < 2; ++i ) { - var_name << "TRT_HT_" << std::dec << i; - m_ht_corrections[i] = atrlist[var_name.str()].data<float>(); - var_name.str(""); - } - } - } - - } else { - ATH_MSG_ERROR ("Problem reading condDB object for HT correction constants."); - status = StatusCode::FAILURE; - } - } - - } - - return status; -} diff --git a/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py b/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py index c673273bbcb4..36cbb8890993 100644 --- a/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py +++ b/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py @@ -86,9 +86,19 @@ class egammaBremCollectionBuilder ( egammaAlgsConf.EMBremCollectionBuilder ) : # GSFBuildTRT_ElectronPidTool = None if DetFlags.haveRIO.TRT_on() and not InDetFlags.doSLHC() and not InDetFlags.doHighPileup() : + + isMC = False + if globalflags.DataSource == "geant4" : + isMC = True + from TRT_DriftFunctionTool.TRT_DriftFunctionToolConf import TRT_DriftFunctionTool + InDetTRT_DriftFunctionTool = TRT_DriftFunctionTool(name = "InDetTRT_DriftFunctionTool", + IsMC = isMC) + ToolSvc += InDetTRT_DriftFunctionTool + from TRT_ElectronPidTools.TRT_ElectronPidToolsConf import InDet__TRT_LocalOccupancy - GSFBuildTRT_LocalOccupancy = InDet__TRT_LocalOccupancy(name ="GSF_TRT_LocalOccupancy") + GSFBuildTRT_LocalOccupancy = InDet__TRT_LocalOccupancy(name ="GSF_TRT_LocalOccupancy", + TRTDriftFunctionTool = InDetTRT_DriftFunctionTool) ToolSvc += GSFBuildTRT_LocalOccupancy from TRT_ElectronPidTools.TRT_ElectronPidToolsConf import InDet__TRT_ElectronPidToolRun2 -- GitLab From 74d5b602410d0f3fa8f5aa8354a805d939199716 Mon Sep 17 00:00:00 2001 From: "christos@cern.ch" <christos@cern.ch> Date: Wed, 27 Jun 2018 01:11:11 +0100 Subject: [PATCH 263/562] move to latest version of the MVA calibration Former-commit-id: 3d657677365d42a4a8e38ba20769b858ce2b8354 --- Reconstruction/egamma/egammaRec/python/egammaRecFlags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Reconstruction/egamma/egammaRec/python/egammaRecFlags.py b/Reconstruction/egamma/egammaRec/python/egammaRecFlags.py index 6cd09d5e6265..0ab5616e4f99 100755 --- a/Reconstruction/egamma/egammaRec/python/egammaRecFlags.py +++ b/Reconstruction/egamma/egammaRec/python/egammaRecFlags.py @@ -130,7 +130,7 @@ class calibMVAVersion (JobProperty): """ statusOn=True allowedTypes=['str', 'None'] - StoredValue="egammaMVACalib/offline/v6" + StoredValue="egammaMVACalib/offline/v7" # Defines a sub-container holding the jobProperties for egamma class egammaRecFlags(JobPropertyContainer): -- GitLab From 13d1d10e3c599b02a60847a8c45d63425a9bbd08 Mon Sep 17 00:00:00 2001 From: Susumu Oda <Susumu.Oda@cern.ch> Date: Wed, 27 Jun 2018 13:48:21 +0200 Subject: [PATCH 264/562] Make most of methods const Former-commit-id: ec9b4f88d46084c4bd7d3c3eddc88cfe2c579f27 --- .../SCT_Cabling/SCT_Cabling/ISCT_CablingSvc.h | 18 +++++----- .../SCT_Cabling/src/SCT_CablingSvc.cxx | 36 ++++--------------- .../SCT_Cabling/src/SCT_CablingSvc.h | 18 +++++----- 3 files changed, 24 insertions(+), 48 deletions(-) diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/ISCT_CablingSvc.h b/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/ISCT_CablingSvc.h index b018778f26c7..c884f98ed68b 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/ISCT_CablingSvc.h +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/ISCT_CablingSvc.h @@ -41,19 +41,19 @@ class ISCT_CablingSvc: virtual public IInterface { static const InterfaceID& interfaceID(); /// return offline hash, given the online Id (used by decoders) - virtual IdentifierHash getHashFromOnlineId(const SCT_OnlineId& onlineId, const bool withWarnings = true) = 0; + virtual IdentifierHash getHashFromOnlineId(const SCT_OnlineId& onlineId, const bool withWarnings = true) const = 0; /// return the online Id, given a hash (used by simulation encoders) - virtual SCT_OnlineId getOnlineIdFromHash(const IdentifierHash& hash) = 0; + virtual SCT_OnlineId getOnlineIdFromHash(const IdentifierHash& hash) const = 0; /// return the rob/rod Id, given a hash (used by simulation encoders) - virtual std::uint32_t getRobIdFromHash(const IdentifierHash& hash) = 0; + virtual std::uint32_t getRobIdFromHash(const IdentifierHash& hash) const = 0; /// return the online Id, given an offlineId - virtual SCT_OnlineId getOnlineIdFromOfflineId(const Identifier& offlineId) = 0; + virtual SCT_OnlineId getOnlineIdFromOfflineId(const Identifier& offlineId) const = 0; /// return the rob/rod Id, given an offlineId (used by simulation encoders) - virtual std::uint32_t getRobIdFromOfflineId(const Identifier& offlineId) = 0; + virtual std::uint32_t getRobIdFromOfflineId(const Identifier& offlineId) const = 0; /// size of the data structure (for the SCT should be 8176, one for each module side) virtual unsigned int size() const = 0; @@ -62,16 +62,16 @@ class ISCT_CablingSvc: virtual public IInterface { virtual bool empty() const = 0; /// get hash from a module serial number, needed in the conditions service because configurations are stored by module s/n - virtual IdentifierHash getHashFromSerialNumber(const SCT_SerialNumber& sn) = 0; + virtual IdentifierHash getHashFromSerialNumber(const SCT_SerialNumber& sn) const = 0; /// get module serial number from hash, needed during filling of data structure - virtual SCT_SerialNumber getSerialNumberFromHash(const IdentifierHash& hash) = 0; + virtual SCT_SerialNumber getSerialNumberFromHash(const IdentifierHash& hash) const = 0; /// fill a users vector with all the RodIds - virtual void getAllRods(std::vector<std::uint32_t>& usersVector) = 0; + virtual void getAllRods(std::vector<std::uint32_t>& usersVector) const = 0; /// fill a user's vector with all the hash ids which belong to a given rod - virtual void getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId) = 0; + virtual void getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId) const = 0; /// insert the hashId, onlineId and serial number to the data, used only within this package to fill the data structure virtual bool insert(const IdentifierHash& hash, const SCT_OnlineId& onlineId, const SCT_SerialNumber& sn) = 0; diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingSvc.cxx b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingSvc.cxx index 5ef1084e94c1..99b7eb7a49e5 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingSvc.cxx +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingSvc.cxx @@ -146,7 +146,7 @@ SCT_CablingSvc::empty() const { // IdentifierHash -SCT_CablingSvc::getHashFromOnlineId(const SCT_OnlineId& onlineId, const bool withWarnings) { +SCT_CablingSvc::getHashFromOnlineId(const SCT_OnlineId& onlineId, const bool withWarnings) const { //is it valid at all? if (not onlineId.is_valid()) { if (withWarnings) ATH_MSG_WARNING("Invalid online id ("<<std::hex<<onlineId<<") "<<std::dec); @@ -158,31 +158,19 @@ SCT_CablingSvc::getHashFromOnlineId(const SCT_OnlineId& onlineId, const bool wit if (withWarnings) ATH_MSG_WARNING("Invalid online id ("<<std::hex<<onlineId<<") try using the "<<alternative<<std::dec); return invalidHash; } - if (empty() and m_cablingFiller->fillMaps(this).isFailure()) { - ATH_MSG_FATAL("Filling the cabling FAILED"); - return invalidHash; - } return m_data.getHashFromOnlineId(onlineId); } // SCT_OnlineId -SCT_CablingSvc::getOnlineIdFromHash(const IdentifierHash& hash) { - if (empty() and m_cablingFiller->fillMaps(this).isFailure()) { - ATH_MSG_FATAL("Filling the cabling FAILED"); - return invalidId; - } +SCT_CablingSvc::getOnlineIdFromHash(const IdentifierHash& hash) const { return m_data.getOnlineIdFromHash(hash); } // SCT_OnlineId -SCT_CablingSvc::getOnlineIdFromOfflineId(const Identifier& offlineId) { - if (empty() and m_cablingFiller->fillMaps(this).isFailure()) { - ATH_MSG_FATAL("Filling the cabling FAILED"); - return invalidId; - } +SCT_CablingSvc::getOnlineIdFromOfflineId(const Identifier& offlineId) const { if (not offlineId.is_valid()) return invalidId; IdentifierHash hash(m_idHelper->wafer_hash(offlineId)); return getOnlineIdFromHash(hash); @@ -190,21 +178,13 @@ SCT_CablingSvc::getOnlineIdFromOfflineId(const Identifier& offlineId) { // IdentifierHash -SCT_CablingSvc::getHashFromSerialNumber(const SCT_SerialNumber& sn) { - if (empty() and m_cablingFiller->fillMaps(this).isFailure()) { - ATH_MSG_FATAL("Filling the cabling FAILED"); - return invalidHash; - } +SCT_CablingSvc::getHashFromSerialNumber(const SCT_SerialNumber& sn) const { if (not sn.isWellFormed()) return invalidHash; return m_data.getHashFromSerialNumber(sn); } SCT_SerialNumber -SCT_CablingSvc::getSerialNumberFromHash(const IdentifierHash& hash) { - if (empty() and m_cablingFiller->fillMaps(this).isFailure()) { - ATH_MSG_FATAL("Filling the cabling FAILED"); - return invalidSn; - } +SCT_CablingSvc::getSerialNumberFromHash(const IdentifierHash& hash) const { if (not hash.is_valid()) return invalidSn; //hash must be even IdentifierHash evenHash{even(hash)}; @@ -212,11 +192,7 @@ SCT_CablingSvc::getSerialNumberFromHash(const IdentifierHash& hash) { } void -SCT_CablingSvc::getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId) { - if (not SCT_OnlineId::rodIdInRange(rodId)) { - ATH_MSG_WARNING("Invalid rod id: "<<std::hex<<"0x"<<rodId<<std::dec<<" asked for associated hashes"); - return; //users vector remains unfilled - } +SCT_CablingSvc::getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId) const { SCT_OnlineId firstPossibleId(rodId,SCT_OnlineId::FIRST_FIBRE); const bool withWarnings(false); for (SCT_OnlineId i(firstPossibleId);i!=SCT_OnlineId::INVALID_ONLINE_ID;++i) { diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingSvc.h b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingSvc.h index 38947ede5650..685408c2fb1a 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingSvc.h +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingSvc.h @@ -64,21 +64,21 @@ class SCT_CablingSvc: virtual public ISCT_CablingSvc, virtual public IIncidentLi //@name ISCT_CablingSvc methods implemented, these are visible to clients //@{ /// return offline hash, given the online Id (used by decoders) - virtual IdentifierHash getHashFromOnlineId(const SCT_OnlineId& onlineId, const bool withWarnings=true) override; + virtual IdentifierHash getHashFromOnlineId(const SCT_OnlineId& onlineId, const bool withWarnings=true) const override; /// return the online Id, given a hash (used by simulation encoders) - virtual SCT_OnlineId getOnlineIdFromHash(const IdentifierHash& hash) override; + virtual SCT_OnlineId getOnlineIdFromHash(const IdentifierHash& hash) const override; /// return the online Id, given an offlineId - virtual SCT_OnlineId getOnlineIdFromOfflineId(const Identifier& offlineId) override; + virtual SCT_OnlineId getOnlineIdFromOfflineId(const Identifier& offlineId) const override; /// return the rob/rod Id, given a hash (used by simulation encoders) - virtual std::uint32_t getRobIdFromHash(const IdentifierHash& hash) override { + virtual std::uint32_t getRobIdFromHash(const IdentifierHash& hash) const override { return getOnlineIdFromHash(hash).rod(); } /// return the rob/rod Id, given an offlineId (used by simulation encoders) - virtual std::uint32_t getRobIdFromOfflineId(const Identifier& offlineId) override { + virtual std::uint32_t getRobIdFromOfflineId(const Identifier& offlineId) const override { return getOnlineIdFromOfflineId(offlineId).rod(); } @@ -89,16 +89,16 @@ class SCT_CablingSvc: virtual public ISCT_CablingSvc, virtual public IIncidentLi virtual bool empty() const override; /// get hash from a module serial number, needed in the conditions service because configurations are stored by module s/n - virtual IdentifierHash getHashFromSerialNumber(const SCT_SerialNumber& sn) override; + virtual IdentifierHash getHashFromSerialNumber(const SCT_SerialNumber& sn) const override; /// get module serial number from hash, needed during filling of data structure - virtual SCT_SerialNumber getSerialNumberFromHash(const IdentifierHash& hash) override; + virtual SCT_SerialNumber getSerialNumberFromHash(const IdentifierHash& hash) const override; /// fill a users vector with all the RodIds - virtual void getAllRods(std::vector<std::uint32_t>& usersVector) override { m_data.getRods(usersVector); } + virtual void getAllRods(std::vector<std::uint32_t>& usersVector) const override { m_data.getRods(usersVector); } /// fill a user's vector with all the hash ids which belong to a given rod - virtual void getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId) override; + virtual void getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId) const override; //@} /// insert the hashId, onlineId and serial number to the data, used only within this package to fill the data structure -- GitLab From c894de17d943cb1ceeabb77c1160249a4f9fabcd Mon Sep 17 00:00:00 2001 From: Walter Lampl <Walter.Lampl@cern.ch> Date: Wed, 27 Jun 2018 15:44:30 +0200 Subject: [PATCH 265/562] switch external version to 2.0.8 (LCG_93c) Former-commit-id: 2d8effa84781700de66642021eb72194cee6398f --- Projects/AnalysisBase/externals.txt | 2 +- Projects/AnalysisTop/externals.txt | 2 +- Projects/AthDataQuality/externals.txt | 2 +- Projects/AthSimulation/externals.txt | 2 +- Projects/Athena/externals.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Projects/AnalysisBase/externals.txt b/Projects/AnalysisBase/externals.txt index a82f2ab07d51..faa3415a1a44 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.7 +AnalysisBaseExternalsVersion = 2.0.8 diff --git a/Projects/AnalysisTop/externals.txt b/Projects/AnalysisTop/externals.txt index 166c5895ebf6..338270671d48 100644 --- a/Projects/AnalysisTop/externals.txt +++ b/Projects/AnalysisTop/externals.txt @@ -1,4 +1,4 @@ # Versions of the various externals to build before starting the build of # this project, when doing a full stack nightly build. -AnalysisBaseExternalsVersion = 2.0.7 +AnalysisBaseExternalsVersion = 2.0.8 diff --git a/Projects/AthDataQuality/externals.txt b/Projects/AthDataQuality/externals.txt index ca518d06a4e7..45153f25f991 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.7 +AtlasExternalsVersion = 2.0.8 diff --git a/Projects/AthSimulation/externals.txt b/Projects/AthSimulation/externals.txt index 7d921838fab1..59608e18902b 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.7 +AthSimulationExternalsVersion = 2.0.8 # The version of atlas/Gaudi to use: GaudiVersion = v30r2.003 diff --git a/Projects/Athena/externals.txt b/Projects/Athena/externals.txt index c89b130d1de0..b6913bec404e 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.7 +AthenaExternalsVersion = 2.0.8 # The version of atlas/Gaudi to use: GaudiVersion = v30r2.003 -- GitLab From f7a4d4af29200cab034cb18fe228a2855b57703c Mon Sep 17 00:00:00 2001 From: Tamara Vazquez Schroeder <tamara.vazquez.schroeder@cern.ch> Date: Wed, 27 Jun 2018 16:41:43 +0000 Subject: [PATCH 266/562] Merge branch 'FastCaloSim_HitWiggleUpdate' into '21.0' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add new hit wiggle class and integer histogram and spline based 1D functions to FastCaloSim See merge request atlas/athena!11856 (cherry picked from commit 7836f2a4d4450e4b324a7f8f07d2d5cacc68e241 [formerly 18c2592a58695d6ee6a36d45792dab8bac3457a3]) 427283da Add new hit wiggle class and integer histogram and spline based 1D functions 4048b9fc Add an x-axis scaling to the wiggle initialization and template based histogram… ee16857e Add CmakeLists, LinkDef and virtual destructor for template based histogram classes 840f858f Allow independent functions for multiple eta ranges for wiggles. Include a… 2443c769 Increase version number of TFCSFunction for compatibility in root streaming Former-commit-id: 15705ba978c8e607eadbc2e9e8cbbe3f1fa3e87f --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../ISF_FastCaloSimEvent/CMakeLists.txt | 5 + .../ISF_FastCaloSimEvent/LinkDef.h | 68 ++ .../ISF_FastCaloSimEvent/TFCS1DFunction.h | 16 +- .../TFCS1DFunctionHistogram.h | 8 +- .../TFCS1DFunctionInt16Histogram.h | 50 ++ .../TFCS1DFunctionInt32Histogram.h | 50 ++ .../TFCS1DFunctionRegression.h | 6 +- .../TFCS1DFunctionRegressionTF.h | 4 +- .../TFCS1DFunctionSpline.h | 53 ++ .../TFCS1DFunctionTemplateHistogram.h | 695 ++++++++++++++++++ .../ISF_FastCaloSimEvent/TFCS2DFunction.h | 4 +- .../TFCS2DFunctionHistogram.h | 2 +- .../ISF_FastCaloSimEvent/TFCSFunction.h | 11 +- .../TFCSHitCellMappingWiggle.h | 54 ++ .../src/TFCS1DFunction.cxx | 145 +++- .../src/TFCS1DFunctionHistogram.cxx | 10 +- .../src/TFCS1DFunctionInt16Histogram.cxx | 138 ++++ .../src/TFCS1DFunctionInt32Histogram.cxx | 138 ++++ .../src/TFCS1DFunctionRegression.cxx | 6 +- .../src/TFCS1DFunctionRegressionTF.cxx | 4 +- .../src/TFCS1DFunctionSpline.cxx | 420 +++++++++++ .../src/TFCS1DFunctionTemplateHistogram.cxx | 10 + .../src/TFCS2DFunction.cxx | 2 +- .../src/TFCS2DFunctionHistogram.cxx | 4 +- .../ISF_FastCaloSimEvent/src/TFCSFunction.cxx | 3 - .../src/TFCSHitCellMappingWiggle.cxx | 173 +++++ 27 files changed, 2035 insertions(+), 44 deletions(-) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h create mode 100644 Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionInt16Histogram.h create mode 100644 Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionInt32Histogram.h create mode 100644 Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionSpline.h create mode 100644 Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionTemplateHistogram.h create mode 100644 Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMappingWiggle.h create mode 100644 Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionInt16Histogram.cxx create mode 100644 Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionInt32Histogram.cxx create mode 100644 Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionSpline.cxx create mode 100644 Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionTemplateHistogram.cxx create mode 100644 Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingWiggle.cxx diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/CMakeLists.txt b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/CMakeLists.txt index bcd6cbe7aa18..e06103e300fe 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/CMakeLists.txt +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/CMakeLists.txt @@ -30,8 +30,12 @@ atlas_add_root_dictionary( ISF_FastCaloSimEvent _dictSource ISF_FastCaloSimEvent/TFCSFunction.h ISF_FastCaloSimEvent/TFCS1DFunction.h ISF_FastCaloSimEvent/TFCS1DFunctionHistogram.h + ISF_FastCaloSimEvent/TFCS1DFunctionInt16Histogram.h + ISF_FastCaloSimEvent/TFCS1DFunctionInt32Histogram.h ISF_FastCaloSimEvent/TFCS1DFunctionRegression.h ISF_FastCaloSimEvent/TFCS1DFunctionRegressionTF.h + ISF_FastCaloSimEvent/TFCS1DFunctionSpline.h + ISF_FastCaloSimEvent/TFCS1DFunctionTemplateHistogram.h ISF_FastCaloSimEvent/TFCS2DFunction.h ISF_FastCaloSimEvent/TFCS2DFunctionHistogram.h ISF_FastCaloSimEvent/TFCSParametrizationBase.h @@ -57,6 +61,7 @@ atlas_add_root_dictionary( ISF_FastCaloSimEvent _dictSource ISF_FastCaloSimEvent/TFCSHistoLateralShapeParametrization.h ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitNumberFromE.h ISF_FastCaloSimEvent/TFCSHitCellMapping.h + ISF_FastCaloSimEvent/TFCSHitCellMappingWiggle.h ISF_FastCaloSimEvent/TFCSHitCellMappingWiggleEMB.h ISF_FastCaloSimEvent/TFCSExtrapolationState.h ISF_FastCaloSimEvent/TFCSSimulationState.h diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/LinkDef.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/LinkDef.h index 3bbf13ed340d..92fb2e0c0a1f 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/LinkDef.h +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/LinkDef.h @@ -7,8 +7,12 @@ #include "ISF_FastCaloSimEvent/TFCSFunction.h" #include "ISF_FastCaloSimEvent/TFCS1DFunction.h" #include "ISF_FastCaloSimEvent/TFCS1DFunctionHistogram.h" +#include "ISF_FastCaloSimEvent/TFCS1DFunctionInt16Histogram.h" +#include "ISF_FastCaloSimEvent/TFCS1DFunctionInt32Histogram.h" #include "ISF_FastCaloSimEvent/TFCS1DFunctionRegression.h" #include "ISF_FastCaloSimEvent/TFCS1DFunctionRegressionTF.h" +#include "ISF_FastCaloSimEvent/TFCS1DFunctionSpline.h" +#include "ISF_FastCaloSimEvent/TFCS1DFunctionTemplateHistogram.h" #include "ISF_FastCaloSimEvent/TFCS2DFunction.h" #include "ISF_FastCaloSimEvent/TFCS2DFunctionHistogram.h" @@ -37,6 +41,7 @@ #include "ISF_FastCaloSimEvent/TFCSHistoLateralShapeParametrization.h" #include "ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitNumberFromE.h" #include "ISF_FastCaloSimEvent/TFCSHitCellMapping.h" +#include "ISF_FastCaloSimEvent/TFCSHitCellMappingWiggle.h" #include "ISF_FastCaloSimEvent/TFCSHitCellMappingWiggleEMB.h" #include "ISF_FastCaloSimEvent/TFCSTruthState.h" @@ -49,8 +54,70 @@ #pragma link C++ class TFCSFunction+; #pragma link C++ class TFCS1DFunction+; #pragma link C++ class TFCS1DFunctionHistogram+; +#pragma link C++ class TFCS1DFunctionInt16Histogram+; +#pragma link C++ class TFCS1DFunctionInt32Histogram+; #pragma link C++ class TFCS1DFunctionRegression+; #pragma link C++ class TFCS1DFunctionRegressionTF+; +#pragma link C++ class TFCS1DFunctionSpline+; + +///Linkdefs needed for template based histograms +#pragma link C++ class TFCS1DFunction_Numeric<uint8_t,float>+; +#pragma link C++ class TFCS1DFunction_Numeric<uint16_t,float>+; +#pragma link C++ class TFCS1DFunction_Numeric<uint32_t,float>+; +#pragma link C++ class TFCS1DFunction_Numeric<float,float>+; +#pragma link C++ class TFCS1DFunction_Numeric<double,float>+; +#pragma link C++ class TFCS1DFunction_Numeric<double,double>+; + +#pragma link C++ class TFCS1DFunction_Array<float>+; +#pragma link C++ class TFCS1DFunction_Array<double>+; +#pragma link C++ class TFCS1DFunction_Array<uint8_t>+; +#pragma link C++ class TFCS1DFunction_Array<uint16_t>+; +#pragma link C++ class TFCS1DFunction_Array<uint32_t>+; + +#pragma link C++ class TFCS1DFunction_HistogramContent<float,float>+; +#pragma link C++ class TFCS1DFunction_HistogramContent<double,float>+; +#pragma link C++ class TFCS1DFunction_HistogramContent<double,double>+; +#pragma link C++ class TFCS1DFunction_HistogramContent<uint8_t,float>+; +#pragma link C++ class TFCS1DFunction_HistogramContent<uint16_t,float>+; +#pragma link C++ class TFCS1DFunction_HistogramContent<uint32_t,float>+; + +#pragma link C++ class TFCS1DFunction_HistogramBinEdges<float,float>+; +#pragma link C++ class TFCS1DFunction_HistogramBinEdges<double,float>+; +#pragma link C++ class TFCS1DFunction_HistogramBinEdges<double,double>+; + +#pragma link C++ class TFCS1DFunction_HistogramCompactBinEdges<float,uint8_t,float>+; +#pragma link C++ class TFCS1DFunction_HistogramCompactBinEdges<float,uint16_t,float>+; +#pragma link C++ class TFCS1DFunction_HistogramCompactBinEdges<float,uint32_t,float>+; + +#pragma link C++ class TFCS1DFunction_HistogramInt8BinEdges+; +#pragma link C++ class TFCS1DFunction_HistogramInt16BinEdges+; +#pragma link C++ class TFCS1DFunction_HistogramInt32BinEdges+; +#pragma link C++ class TFCS1DFunction_HistogramFloatBinEdges+; +#pragma link C++ class TFCS1DFunction_HistogramDoubleBinEdges+; + +#pragma link C++ class TFCS1DFunctionTemplateHistogram<TFCS1DFunction_HistogramInt8BinEdges,uint8_t,float>+; +#pragma link C++ class TFCS1DFunctionTemplateHistogram<TFCS1DFunction_HistogramInt8BinEdges,uint16_t,float>+; +#pragma link C++ class TFCS1DFunctionTemplateHistogram<TFCS1DFunction_HistogramInt8BinEdges,uint32_t,float>+; +#pragma link C++ class TFCS1DFunctionTemplateHistogram<TFCS1DFunction_HistogramInt16BinEdges,uint16_t,float>+; +#pragma link C++ class TFCS1DFunctionTemplateHistogram<TFCS1DFunction_HistogramInt16BinEdges,uint32_t,float>+; + +#pragma link C++ class TFCS1DFunctionInt8Int8Histogram+; +#pragma link C++ class TFCS1DFunctionInt8Int16Histogram+; +#pragma link C++ class TFCS1DFunctionInt8Int32Histogram+; +#pragma link C++ class TFCS1DFunctionInt16Int16Histogram+; +#pragma link C++ class TFCS1DFunctionInt16Int32Histogram+; + +#pragma link C++ class TFCS1DFunctionTemplateInterpolationHistogram<TFCS1DFunction_HistogramInt8BinEdges,uint8_t,float>+; +#pragma link C++ class TFCS1DFunctionTemplateInterpolationHistogram<TFCS1DFunction_HistogramInt8BinEdges,uint16_t,float>+; +#pragma link C++ class TFCS1DFunctionTemplateInterpolationHistogram<TFCS1DFunction_HistogramInt16BinEdges,uint16_t,float>+; +#pragma link C++ class TFCS1DFunctionTemplateInterpolationHistogram<TFCS1DFunction_HistogramInt16BinEdges,uint32_t,float>+; + +#pragma link C++ class TFCS1DFunctionInt8Int8InterpolationHistogram+; +#pragma link C++ class TFCS1DFunctionInt8Int16InterpolationHistogram+; +#pragma link C++ class TFCS1DFunctionInt16Int16InterpolationHistogram+; +#pragma link C++ class TFCS1DFunctionInt16Int32InterpolationHistogram+; +///End Linkdefs needed for template based histograms + #pragma link C++ class TFCS2DFunction+; #pragma link C++ class TFCS2DFunctionHistogram+; #pragma link C++ class TFCSParametrizationBase+; @@ -78,6 +145,7 @@ #pragma link C++ class TFCSHistoLateralShapeParametrization+; #pragma link C++ class TFCSLateralShapeParametrizationHitNumberFromE+; #pragma link C++ class TFCSHitCellMapping+; +#pragma link C++ class TFCSHitCellMappingWiggle+; #pragma link C++ class TFCSHitCellMappingWiggleEMB+; #pragma link C++ class TFCSTruthState+; diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunction.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunction.h index fb022313512f..933a24c9a0e3 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunction.h +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunction.h @@ -6,12 +6,12 @@ #define ISF_FASTCALOSIMEVENT_TFCS1DFunction_h // STL includes -#include <string> +#include <vector> -#include "TH1.h" -#include "TTree.h" #include "ISF_FastCaloSimEvent/TFCSFunction.h" +class TH1; + class TFCS1DFunction:public TFCSFunction { public: @@ -23,13 +23,19 @@ class TFCS1DFunction:public TFCSFunction ///Function gets array of random numbers rnd[] in the range [0,1) as arguments ///and returns function value in array value. ///For a n-dimensional function, value and rnd should both have n elements. - virtual void rnd_to_fct(float value[],const float rnd[]); + virtual void rnd_to_fct(float value[],const float rnd[]) const; ///Function gets random number rnd in the range [0,1) as argument and returns function value - virtual double rnd_to_fct(double rnd); + virtual double rnd_to_fct(double rnd) const = 0; static double get_maxdev(TH1* , TH1* ); + static double CheckAndIntegrate1DHistogram(const TH1* hist, std::vector<double>& integral_vec,int& first,int& last); + + static TH1* generate_histogram_random_slope(int nbinsx=50,double xmin=0,double xmax=1,double zerothreshold=0.1); + static TH1* generate_histogram_random_gauss(int nbinsx=50,int ntoy=100000,double xmin=1,double xmax=5,double xpeak=1.5,double sigma=0.6); + static void unit_test(TH1* hist,TFCS1DFunction* rtof,int nrnd=1000000,TH1* histfine=nullptr); + private: ClassDef(TFCS1DFunction,2) //TFCS1DFunction diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionHistogram.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionHistogram.h index 16310ed76c18..d34d91164473 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionHistogram.h +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionHistogram.h @@ -19,11 +19,11 @@ class TFCS1DFunctionHistogram:public TFCS1DFunction void Initialize(TH1* hist, double); using TFCS1DFunction::rnd_to_fct; - virtual double rnd_to_fct(double rnd); + virtual double rnd_to_fct(double rnd) const; TH1* vector_to_histo(); - double get_inverse(double rnd); - double linear(double x1,double x2,double y1,double y2,double x); - double non_linear(double x1,double x2,double y1,double y2,double x); + double get_inverse(double rnd) const; + double linear(double x1,double x2,double y1,double y2,double x) const; + double non_linear(double x1,double x2,double y1,double y2,double x) const; double get_maxdev(TH1*, TH1D*); void smart_rebin_loop(TH1* hist, double); diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionInt16Histogram.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionInt16Histogram.h new file mode 100644 index 000000000000..9d3b2e41353b --- /dev/null +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionInt16Histogram.h @@ -0,0 +1,50 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef ISF_FASTCALOSIMEVENT_TFCS1DFunctionInt16Histogram_h +#define ISF_FASTCALOSIMEVENT_TFCS1DFunctionInt16Histogram_h + +#include "ISF_FastCaloSimEvent/TFCS1DFunction.h" +#include <vector> + +class TH2; + +class TFCS1DFunctionInt16Histogram:public TFCS1DFunction +{ + public: + TFCS1DFunctionInt16Histogram(const TH1* hist=nullptr) {if(hist) Initialize(hist);}; + ~TFCS1DFunctionInt16Histogram() {}; + + virtual void Initialize(const TH1* hist); + + using TFCS1DFunction::rnd_to_fct; + + typedef uint16_t HistoContent_t; + static const HistoContent_t s_MaxValue; + + ///Function gets random number rnd in the range [0,1) as argument + ///and returns function value according to a histogram distribution + virtual double rnd_to_fct(double rnd) const; + + const std::vector<float>& get_HistoBordersx() const {return m_HistoBorders;}; + std::vector<float>& get_HistoBordersx() {return m_HistoBorders;}; + const std::vector<HistoContent_t>& get_HistoContents() const {return m_HistoContents;}; + std::vector<HistoContent_t>& get_HistoContents() {return m_HistoContents;}; + + static void unit_test(TH1* hist=nullptr); + protected: + + std::vector<float> m_HistoBorders; + std::vector<HistoContent_t> m_HistoContents; + + private: + + ClassDef(TFCS1DFunctionInt16Histogram,1) //TFCS1DFunctionInt16Histogram +}; + +#if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__) +#pragma link C++ class TFCS1DFunctionInt16Histogram+; +#endif + +#endif diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionInt32Histogram.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionInt32Histogram.h new file mode 100644 index 000000000000..6b3515cd8fc9 --- /dev/null +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionInt32Histogram.h @@ -0,0 +1,50 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef ISF_FASTCALOSIMEVENT_TFCS1DFunctionInt32Histogram_h +#define ISF_FASTCALOSIMEVENT_TFCS1DFunctionInt32Histogram_h + +#include "ISF_FastCaloSimEvent/TFCS1DFunction.h" +#include <vector> + +class TH2; + +class TFCS1DFunctionInt32Histogram:public TFCS1DFunction +{ + public: + TFCS1DFunctionInt32Histogram(const TH1* hist=nullptr) {if(hist) Initialize(hist);}; + ~TFCS1DFunctionInt32Histogram() {}; + + virtual void Initialize(const TH1* hist); + + using TFCS1DFunction::rnd_to_fct; + + typedef uint32_t HistoContent_t; + static const HistoContent_t s_MaxValue; + + ///Function gets random number rnd in the range [0,1) as argument + ///and returns function value according to a histogram distribution + virtual double rnd_to_fct(double rnd) const; + + const std::vector<float>& get_HistoBordersx() const {return m_HistoBorders;}; + std::vector<float>& get_HistoBordersx() {return m_HistoBorders;}; + const std::vector<HistoContent_t>& get_HistoContents() const {return m_HistoContents;}; + std::vector<HistoContent_t>& get_HistoContents() {return m_HistoContents;}; + + static void unit_test(TH1* hist=nullptr); + protected: + + std::vector<float> m_HistoBorders; + std::vector<HistoContent_t> m_HistoContents; + + private: + + ClassDef(TFCS1DFunctionInt32Histogram,1) //TFCS1DFunctionInt32Histogram +}; + +#if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__) +#pragma link C++ class TFCS1DFunctionInt32Histogram+; +#endif + +#endif diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionRegression.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionRegression.h index 1c3d14a4123e..89e67b7cf194 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionRegression.h +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionRegression.h @@ -20,10 +20,10 @@ class TFCS1DFunctionRegression:public TFCS1DFunction ~TFCS1DFunctionRegression() {}; using TFCS1DFunction::rnd_to_fct; - virtual double rnd_to_fct(double rnd); - double regression_value(double uniform); + virtual double rnd_to_fct(double rnd) const; + double regression_value(double uniform) const; void set_weights(vector<vector<double> > fWeightMatrix0to1, vector<vector<double> > fWeightMatrix1to2); - double sigmoid(double); + double sigmoid(double) const; private: diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionRegressionTF.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionRegressionTF.h index 34e387d83a00..df2ea1844f97 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionRegressionTF.h +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionRegressionTF.h @@ -18,8 +18,8 @@ class TFCS1DFunctionRegressionTF:public TFCS1DFunctionRegression ~TFCS1DFunctionRegressionTF() {}; using TFCS1DFunctionRegression::rnd_to_fct; - virtual double rnd_to_fct(double rnd); - double retransform(double value); + virtual double rnd_to_fct(double rnd) const; + double retransform(double value) const; private: diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionSpline.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionSpline.h new file mode 100644 index 000000000000..c943c8754734 --- /dev/null +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionSpline.h @@ -0,0 +1,53 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef ISF_FASTCALOSIMEVENT_TFCS1DFunctionSpline_h +#define ISF_FASTCALOSIMEVENT_TFCS1DFunctionSpline_h + +#include "ISF_FastCaloSimEvent/TFCS1DFunction.h" +#include <TSpline.h> +#include <vector> + +class TH1; +class TFCS1DFunctionInt32Histogram; + +class TFCS1DFunctionSpline:public TFCS1DFunction +{ + public: + TFCS1DFunctionSpline(TH1* hist=nullptr,double maxdevgoal=0.01,double maxeffsiggoal=3,int maxnp=20) {if(hist) Initialize(hist,maxdevgoal,maxeffsiggoal,maxnp);}; + ~TFCS1DFunctionSpline() {}; + + static double get_maxdev(const TH1* hist,const TSpline3& sp,double& maxeffsig,double& p_maxdev,double& p_maxeffsig,int ntoy=10000); + + virtual double Initialize(TH1* hist,double maxdevgoal=0.01,double maxeffsiggoal=3,int maxnp=20); + + virtual double InitializeFromSpline(TH1* hist,const TSpline3& sp,double maxdevgoal=0.01,double maxeffsiggoal=3); + virtual double InitializeEqualDistance(TH1* hist,double maxdevgoal=0.01,double maxeffsiggoal=3,int nsplinepoints=5); + virtual double InitializeEqualProbability(TH1* hist,double maxdevgoal=0.01,double maxeffsiggoal=3,int nsplinepoints=5); + + using TFCS1DFunction::rnd_to_fct; + + ///Function gets random number rnd in the range [0,1) as argument + ///and returns function value according to a histogram distribution + virtual double rnd_to_fct(double rnd) const; + + const TSpline3& spline() const {return m_spline;}; + TSpline3& spline() {return m_spline;}; + + static void unit_test(TH1* hist=nullptr); + protected: + double optimize(TSpline3& sp_best,std::vector<double>& nprop,const TH1* hist,TFCS1DFunctionInt32Histogram& hist_fct,double maxdevgoal=0.01,double maxeffsiggoal=3); + + TSpline3 m_spline; + + private: + + ClassDef(TFCS1DFunctionSpline,1) //TFCS1DFunctionSpline +}; + +#if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__) +#pragma link C++ class TFCS1DFunctionSpline+; +#endif + +#endif diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionTemplateHistogram.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionTemplateHistogram.h new file mode 100644 index 000000000000..939f21594669 --- /dev/null +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionTemplateHistogram.h @@ -0,0 +1,695 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef ISF_FASTCALOSIMEVENT_TFCS1DFunctionTemplateHistogram_h +#define ISF_FASTCALOSIMEVENT_TFCS1DFunctionTemplateHistogram_h + +#include "ISF_FastCaloSimEvent/TFCS1DFunction.h" +#include <vector> +#include "TH1.h" +#include "TBuffer.h" +#include <cstring> +#include <algorithm> +#include <cmath> + + +#include <iostream> + +//For the purpose of FastCaloSim, 32bit are sufficient for bin counting +typedef uint32_t TFCS1DFunction_size_t; + +///Converter functions that does nothing for floats +template<typename T,typename Tfloat=float> class TFCS1DFunction_Numeric { +public: + static constexpr T MaxValue = 1; + static constexpr Tfloat MaxValueFloat = MaxValue; + + static inline T MaxCeilOnlyForInt(const Tfloat value) {return value;}; + static inline T ExpandToMaxRange(const Tfloat value) {return value;}; + static inline Tfloat ToNormalizedRange(const T value) {return value;}; +}; + +///Converter functions to store/retrive float numbers in integers +template<typename Tfloat> class TFCS1DFunction_Numeric<uint8_t,Tfloat> { +public: + static constexpr uint8_t MaxValue = UINT8_MAX; + static constexpr Tfloat MaxValueFloat = MaxValue; + + static inline uint8_t MaxCeilOnlyForInt(const Tfloat value) {return std::ceil(MaxValueFloat*value);}; + static inline uint8_t ExpandToMaxRange(const Tfloat value) {return value*(1+MaxValueFloat);}; + static inline Tfloat ToNormalizedRange(const uint8_t value) {return value/(1+MaxValueFloat);}; +}; + +///Converter functions to store/retrive float numbers in integers +template<typename Tfloat> class TFCS1DFunction_Numeric<uint16_t,Tfloat> { +public: + static constexpr uint16_t MaxValue = UINT16_MAX; + static constexpr Tfloat MaxValueFloat = MaxValue; + + static inline uint16_t MaxCeilOnlyForInt(const Tfloat value) {return std::ceil(MaxValueFloat*value);}; + static inline uint16_t ExpandToMaxRange(const Tfloat value) {return value*(1+MaxValueFloat);}; + static inline Tfloat ToNormalizedRange(const uint16_t value) {return value/(1+MaxValueFloat);}; +}; + +///Converter functions to store/retrive float numbers in integers +template<typename Tfloat> class TFCS1DFunction_Numeric<uint32_t,Tfloat> { +public: + static constexpr uint32_t MaxValue = UINT32_MAX; + static constexpr Tfloat MaxValueFloat = MaxValue; + + static inline uint32_t MaxCeilOnlyForInt(const Tfloat value) {return std::ceil(MaxValueFloat*value);}; + static inline uint32_t ExpandToMaxRange(const Tfloat value) {return value*(1+MaxValueFloat);}; + static inline Tfloat ToNormalizedRange(const uint32_t value) {return value/(1+MaxValueFloat);}; +}; + +template<typename T> class TFCS1DFunction_Array +{ + public: + typedef TFCS1DFunction_size_t size_t; + + TFCS1DFunction_Array() {}; + TFCS1DFunction_Array(size_t count) {resize(count);}; + ~TFCS1DFunction_Array() {if(m_content) delete[] m_content;}; + + std::size_t MemorySizeArray() const {return size()*sizeof(T);}; + std::size_t MemorySize() const {return sizeof(*this)+MemorySizeArray();}; + + inline size_t size() const {return m_size;}; + + ///resize to given count, copying old content + void resize(size_t count) { + T* new_cont=nullptr; + if(count>0) new_cont=new T[count]; + if(m_content && new_cont) { + size_t ncopy=count; + if(size()<ncopy) ncopy=size(); + ncopy*=sizeof(T); + std::memcpy(new_cont,m_content,ncopy); + } + if(m_content) delete[] m_content; + m_size=count; + m_content=new_cont; + }; + + ///Direct data pointer + inline T* data() {return m_content;}; + inline const T* data() const {return m_content;}; + + ///Direct access operators. Values are in the range [0,TFCS1DFunction_Numeric<T>::MaxValue] + inline T& operator[]( size_t pos ) {return m_content[pos];}; + inline const T& operator[]( size_t pos ) const {return m_content[pos];}; + + ///begin() iterators + inline T* begin() {return m_content;}; + inline const T* begin() const {return m_content;}; + + ///end() iterators + inline T* end() {return m_content+size();}; + inline const T* end() const {return m_content+size();}; + + private: + T* m_content{nullptr};//! + size_t m_size{0}; + + //Use ClassDef without virtual functions. Saves 8 bytes per instance + ClassDefNV(TFCS1DFunction_Array,1) //TFCS1DFunction_Array +}; + +///Streamer method to persitify objects of type TFCS1DFunction_Array<T> +template<typename T> void TFCS1DFunction_Array<T>::Streamer(TBuffer &b) { + if (b.IsReading()) { + size_t count; + b >> count; + resize(count); + if(m_size>0) b.ReadFastArray(m_content, m_size); + } else { + b << m_size; + if(m_size>0) b.WriteFastArray(m_content, m_size); + } +} + + +//Class to represent histogram content. Trandom should be a type with a floating point range [0,1] +template<typename T,typename Trandom=float> class TFCS1DFunction_HistogramContent +{ + public: + typedef TFCS1DFunction_size_t size_t; + typedef T value_type; + typedef Trandom random_type; + + TFCS1DFunction_HistogramContent(size_t nbins=0):m_array(nbins >= 1 ? nbins-1 : 0) {}; + + std::size_t MemorySizeArray() const {return m_array.MemorySizeArray();}; + std::size_t MemorySize() const {return sizeof(*this)+MemorySizeArray();}; + + ///Set the content of bin pos to a given value, where value is in the range [0,1] + void set_fraction( size_t pos, Trandom value ) { + if(pos>=size()) return; + m_array[pos]=TFCS1DFunction_Numeric<T,Trandom>::MaxCeilOnlyForInt(value); + }; + + ///Get the cumulative content at bin pos as fraction in the range [0,1] + inline Trandom get_fraction( size_t pos ) const { + if(pos>=size()) return 1; + return m_array[pos]/TFCS1DFunction_Numeric<T,Trandom>::MaxValueFloat; + }; + + ///Get the content at bin pos as fraction in the range [0,1] + inline Trandom get_binfraction( size_t pos ) const { + if(pos==0) return m_array[pos]/TFCS1DFunction_Numeric<T,Trandom>::MaxValueFloat; + if(pos==size()) return 1-(m_array[size()-1]/TFCS1DFunction_Numeric<T,Trandom>::MaxValueFloat); + return (m_array[pos]-m_array[pos-1])/TFCS1DFunction_Numeric<T,Trandom>::MaxValueFloat; + }; + + ///set number of bins. + ///The actualy alocated size is one smaller than count, as the last bin is fixed with the range [get_fraction(size()-1,1] + void set_nbins(size_t nbins) {m_array.resize(nbins >= 1 ? nbins-1 : 0);}; + + ///return number of bins. + ///This is one larger than size, as the last bin is fixed with the range [get_fraction(size()-1,1] + inline size_t get_nbins() const {return size()+1;}; + + ///Get the matching bin for a given random value in the range [0,1). + ///A residual random number to calculate a position inside this bin is returned in residual_rnd + size_t get_bin(const Trandom& drnd,Trandom& residual_rnd) const { + if(size()==0) { + residual_rnd=drnd; + return 0; + } + T rnd=TFCS1DFunction_Numeric<T,Trandom>::MaxValueFloat*drnd; + auto it = std::upper_bound(m_array.begin(),m_array.end(),rnd); + + T basecont=0; + if(it!=m_array.begin()) basecont=*(it-1); + + T fullcont=TFCS1DFunction_Numeric<T,Trandom>::MaxValue; + if(it!=m_array.end()) fullcont=*it; + + T dcont=fullcont-basecont; + if(dcont>0) { + residual_rnd=(TFCS1DFunction_Numeric<T,Trandom>::MaxValueFloat*drnd-basecont) / dcont; + } else { + residual_rnd=0.5; + } + + if(it==m_array.end()) return size(); + return std::distance(m_array.begin(),it); + }; + + private: + TFCS1DFunction_Array<T> m_array; + inline size_t size() const {return m_array.size();}; + + //Use ClassDef without virtual functions. Saves 8 bytes per instance + ClassDefNV(TFCS1DFunction_HistogramContent,1) //TFCS1DFunction_HistogramContent +}; + +//Class to represent histogram bin edges. Trandom should be a type with a floating point range [0,1] +template<typename T,typename Trandom=float> class TFCS1DFunction_HistogramBinEdges +{ + public: + typedef TFCS1DFunction_size_t size_t; + typedef T value_type; + typedef Trandom random_type; + + TFCS1DFunction_HistogramBinEdges(size_t nbins=0):m_array(nbins+1) {}; + ~TFCS1DFunction_HistogramBinEdges() {}; + + std::size_t MemorySizeArray() const {return m_array.MemorySizeArray();}; + std::size_t MemorySize() const {return sizeof(*this)+MemorySizeArray();}; + + ///set number of bins + void set_nbins(size_t nbins) {m_array.resize(nbins+1);}; + + ///return number of bins + inline size_t get_nbins() const {return size()-1;}; + + ///set position of lower edge of bins + void SetBinLowEdge(size_t pos,const T& value) {m_array[pos]=value;}; + + ///get position of lower edge of bins + inline const T& GetBinLowEdge(size_t pos) const {return m_array[pos];}; + + ///get the length of a bin + inline const T GetBinLength(size_t pos) const {return GetBinLowEdge(pos+1)-GetBinLowEdge(pos);}; + + ///set and get minimum + void SetMin(const T& value) {m_array[0]=value;}; + inline const T& GetMin() const {return m_array[0];}; + + ///set and get maximum + void SetMax(const T& value) {m_array[get_nbins()]=value;}; + inline const T& GetMax() const {return m_array[get_nbins()];}; + + ///set minimum and maximum + void SetMinMax(const T& valuemin,const T& valuemax) {SetMin(valuemin);SetMax(valuemax);}; + + ///Get length of interval of all bins + inline const T Length() const {return GetMax()-GetMin();}; + + ///return linear interpolated position for bin pos. Interpolation is done with a random value in the range [0,1] + inline T position(size_t pos,const Trandom& drnd) const { + return (1-drnd)*m_array[pos] + drnd*m_array[pos+1]; + }; + + ///return interpolated position for bin pos, such that histograming the position gives a linear slope m, + ///where m is in units of the bin width for bin pos. Interpolation is done with a random value in the range [0,1] + inline T position(size_t pos,Trandom m,const Trandom& drnd) const { + if(m>2) m=2; + if(m<-2) m=-2; + Trandom x=fabs(m)>0.001 ? (0.5*std::sqrt(m*(m+8*drnd-4)+4)-1)/m+0.5 : drnd; + return (1-x)*m_array[pos] + x*m_array[pos+1]; + }; + + private: + TFCS1DFunction_Array<T> m_array; + inline size_t size() const {return m_array.size();}; + + //Use ClassDef without virtual functions. Saves 8 bytes per instance + ClassDefNV(TFCS1DFunction_HistogramBinEdges,1) //TFCS1DFunction_HistogramBinEdges +}; + +class TFCS1DFunction_HistogramFloatBinEdges: public TFCS1DFunction_HistogramBinEdges<float,float> +{ + public: + TFCS1DFunction_HistogramFloatBinEdges(size_t nbins=0):TFCS1DFunction_HistogramBinEdges<float,float>(nbins) {}; + + ClassDefNV(TFCS1DFunction_HistogramFloatBinEdges,1) //TFCS1DFunction_HistogramFloatBinEdges +}; + +class TFCS1DFunction_HistogramDoubleBinEdges: public TFCS1DFunction_HistogramBinEdges<double,double> +{ + public: + TFCS1DFunction_HistogramDoubleBinEdges(size_t nbins=0):TFCS1DFunction_HistogramBinEdges<double,double>(nbins) {}; + + ClassDefNV(TFCS1DFunction_HistogramDoubleBinEdges,1) //TFCS1DFunction_HistogramDoubleBinEdges +}; + + + +//Class to represent histogram bin edges, where the interval between GetMin() and GetMax() +//can be stored as a different (smaller) data type Tint +//Trandom should be a type with a floating point range [0,1] +template<typename T,typename Tint,typename Trandom=float> class TFCS1DFunction_HistogramCompactBinEdges +{ + public: + typedef TFCS1DFunction_size_t size_t; + typedef T value_type; + typedef Trandom random_type; + typedef Tint internal_storage_type; + + TFCS1DFunction_HistogramCompactBinEdges(size_t nbins=0):m_array(nbins >= 1 ? nbins-1 : 0) {}; + ~TFCS1DFunction_HistogramCompactBinEdges() {}; + + std::size_t MemorySizeArray() const {return m_array.MemorySizeArray();}; + std::size_t MemorySize() const {return sizeof(*this)+MemorySizeArray();}; + + ///set number of bins + void set_nbins(size_t nbins) {m_array.resize(nbins >= 1 ? nbins-1 : 0);}; + + ///return number of bins + inline size_t get_nbins() const {return size()+1;}; + + ///set position of lower edge of bins. Requires GetMin() and GetMax() to be set and may not be changed! + void SetBinLowEdge(size_t pos,const T& value) { + if(pos==0) { + SetMin(value); + return; + } + if(pos>=get_nbins()) { + SetMax(value); + return; + } + m_array[pos-1]=TFCS1DFunction_Numeric<Tint,T>::ExpandToMaxRange((value-GetMin())/Length()); + }; + + ///get position of lower edge of bins. Requires GetMin() and GetMax() to be set and may not be changed! + inline const T GetBinLowEdge(size_t pos) const { + if(pos==0) return GetMin(); + if(pos>=get_nbins()) return GetMax(); + return GetMin()+Length()*TFCS1DFunction_Numeric<Tint,T>::ToNormalizedRange(m_array[pos-1]); + }; + + ///get the length of a bin + inline const T GetBinLength(size_t pos) const {return GetBinLowEdge(pos+1)-GetBinLowEdge(pos);}; + + ///set and get minimum + void SetMin(const T& value) {m_Min=value;}; + inline const T& GetMin() const {return m_Min;}; + + ///set and get maximum + void SetMax(const T& value) {m_Max=value;}; + inline const T& GetMax() const {return m_Max;}; + + ///set minimum and maximum + void SetMinMax(const T& valuemin,const T& valuemax) {SetMin(valuemin);SetMax(valuemax);}; + + ///Get length of interval of all bins + inline const T Length() const {return GetMax()-GetMin();}; + + ///return linear interpolated position for bin pos. Interpolation is done with a random value in the range [0,1] + inline T position(size_t pos,const Trandom& drnd) const { + T pos1=GetBinLowEdge(pos); + T pos2=GetBinLowEdge(pos+1); + return (1-drnd)*pos1 + drnd*pos2; + }; + + ///return interpolated position for bin pos, such that histograming the position gives a linear slope m, + ///where m is in units of the bin width for bin pos. Interpolation is done with a random value in the range [0,1] + inline T position(size_t pos,Trandom m,const Trandom& drnd) const { + if(m>2) m=2; + if(m<-2) m=-2; + Trandom x=(0.5*std::sqrt(m*(m+8*drnd-4)+4)-1)/m+0.5; + T pos1=GetBinLowEdge(pos); + T pos2=GetBinLowEdge(pos+1); + return (1-x)*pos1 + x*pos2; + }; + + private: + TFCS1DFunction_Array<Tint> m_array; + inline size_t size() const {return m_array.size();}; + T m_Min{0}; + T m_Max{0}; + + ClassDefNV(TFCS1DFunction_HistogramCompactBinEdges,1) //TFCS1DFunction_HistogramCompactBinEdges +}; + +class TFCS1DFunction_HistogramInt8BinEdges: public TFCS1DFunction_HistogramCompactBinEdges<float,uint8_t,float> +{ + public: + TFCS1DFunction_HistogramInt8BinEdges(size_t nbins=0):TFCS1DFunction_HistogramCompactBinEdges<float,uint8_t,float>(nbins) {}; + + ClassDefNV(TFCS1DFunction_HistogramInt8BinEdges,1) //TFCS1DFunction_HistogramInt8BinEdges +}; + +class TFCS1DFunction_HistogramInt16BinEdges: public TFCS1DFunction_HistogramCompactBinEdges<float,uint16_t,float> +{ + public: + TFCS1DFunction_HistogramInt16BinEdges(size_t nbins=0):TFCS1DFunction_HistogramCompactBinEdges<float,uint16_t,float>(nbins) {}; + + ClassDefNV(TFCS1DFunction_HistogramInt16BinEdges,1) //TFCS1DFunction_HistogramInt16BinEdges +}; + +class TFCS1DFunction_HistogramInt32BinEdges: public TFCS1DFunction_HistogramCompactBinEdges<float,uint32_t,float> +{ + public: + TFCS1DFunction_HistogramInt32BinEdges(size_t nbins=0):TFCS1DFunction_HistogramCompactBinEdges<float,uint32_t,float>(nbins) {}; + + ClassDefNV(TFCS1DFunction_HistogramInt32BinEdges,1) //TFCS1DFunction_HistogramInt32BinEdges +}; + +template <typename Txvec, typename Ty,typename Trandom=float> class TFCS1DFunctionTemplateHistogram:public TFCS1DFunction +{ + public: + typedef TFCS1DFunction_size_t size_t; + typedef Trandom random_type; + typedef Txvec xvec_type; + typedef Ty y_value_type; + + TFCS1DFunctionTemplateHistogram(TH1* hist=nullptr) {if(hist) Initialize(hist);}; + ~TFCS1DFunctionTemplateHistogram() {}; + + std::size_t MemorySizeArray() const {return m_HistoBorders.MemorySizeArray()+m_HistoContents.MemorySizeArray();}; + std::size_t MemorySize() const {return sizeof(*this)+MemorySizeArray();}; + + ///set number of bins + void set_nbins(size_t nbins) {m_HistoBorders.set_nbins(nbins);m_HistoContents.set_nbins(nbins);}; + + ///return number of bins + inline size_t get_nbins() const {return m_HistoContents.get_nbins();}; + + ///Initialize from root histogram. Depending on the precision of the x- and y-axis, bins are merged if numerical identical + virtual void Initialize(const TH1* hist) { + Int_t nbins = hist->GetNbinsX(); + + std::vector<double> temp_HistoContents; + int first,last; + double integral=CheckAndIntegrate1DHistogram(hist, temp_HistoContents,first,last); + if(integral<=0) { + set_nbins(0); + } else { + set_nbins(nbins); + + m_HistoBorders.SetMinMax(hist->GetXaxis()->GetBinLowEdge(first+1),hist->GetXaxis()->GetBinUpEdge(last+1)); + Int_t ihist=0; + for(Int_t ibin=first;ibin<=last;++ibin) { + m_HistoBorders.SetBinLowEdge(ihist,hist->GetXaxis()->GetBinLowEdge(ibin+1)); + if(ihist>0) if(m_HistoBorders.GetBinLowEdge(ihist-1)==m_HistoBorders.GetBinLowEdge(ihist)) { + std::cout<<"Skip bin="<<ibin+1<<" x="<<hist->GetXaxis()->GetBinLowEdge(ibin+1)<<" fx="<<m_HistoBorders.GetBinLowEdge(ihist)<<std::endl; + --ihist; + std::cout<<" bin="<<ibin <<" x="<<hist->GetXaxis()->GetBinLowEdge(ibin )<<" fx="<<m_HistoBorders.GetBinLowEdge(ihist)<<std::endl; + } + m_HistoContents.set_fraction(ihist,temp_HistoContents[ibin]/integral); + if(ihist>0) if(m_HistoContents.get_fraction(ihist-1)==m_HistoContents.get_fraction(ihist)) { + std::cout<<"Skip fbin="<<ihist<<" fx="<<m_HistoBorders.GetBinLowEdge(ihist)<<" frac="<<m_HistoContents.get_fraction(ihist)<<std::endl; + --ihist; + std::cout<<" fbin="<<ihist<<" fx="<<m_HistoBorders.GetBinLowEdge(ihist)<<" frac="<<m_HistoContents.get_fraction(ihist)<<std::endl; + } + + std::cout<<"bin="<<ibin+1<<" fbin="<<ihist<<"/"<<m_HistoBorders.get_nbins()<<" x=["<<hist->GetXaxis()->GetBinLowEdge(ibin+1)<<","<<hist->GetXaxis()->GetBinUpEdge(ibin+1)<<"] fx="<<m_HistoBorders.GetBinLowEdge(ihist)<<" int="<<temp_HistoContents[ibin]/integral<<" frac="<<m_HistoContents.get_fraction(ihist)<<std::endl; + + ++ihist; + } + if(ihist!=nbins) { + set_nbins(ihist); + m_HistoBorders.SetMinMax(hist->GetXaxis()->GetBinLowEdge(first+1),hist->GetXaxis()->GetBinUpEdge(last+1)); + } + } + } + + using TFCS1DFunction::rnd_to_fct; + + ///Function gets random number rnd in the range [0,1) as argument + ///and returns function value according to a histogram distribution + virtual double rnd_to_fct(double rnd) const { + if(m_HistoContents.get_nbins()==0) return 0; + Trandom residual_rnd; + size_t ibin=m_HistoContents.get_bin(rnd,residual_rnd); + //std::cout<<"fbin="<<ibin<<" fx="<<m_HistoBorders.GetBinLowEdge(ibin)<<" frac="<<m_HistoContents.get_fraction(ibin)<<" residual_rnd="<<residual_rnd<<std::endl; + return m_HistoBorders.position(ibin,residual_rnd); + } + + inline const Txvec& get_HistoBordersx() const {return m_HistoBorders;}; + inline Txvec& get_HistoBordersx() {return m_HistoBorders;}; + + inline const TFCS1DFunction_HistogramContent<Ty,Trandom>& get_HistoContents() const {return m_HistoContents;}; + inline TFCS1DFunction_HistogramContent<Ty,Trandom>& get_HistoContents() {return m_HistoContents;}; + + protected: + + Txvec m_HistoBorders; + TFCS1DFunction_HistogramContent<Ty,Trandom> m_HistoContents; + + private: + + ClassDef(TFCS1DFunctionTemplateHistogram,1) //TFCS1DFunctionTemplateHistogram +}; + +template <typename Txvec, typename Ty,typename Trandom=float> class TFCS1DFunctionTemplateInterpolationHistogram:public TFCS1DFunctionTemplateHistogram<Txvec,Ty,Trandom> +{ + public: + TFCS1DFunctionTemplateInterpolationHistogram(TH1* hist=nullptr):TFCS1DFunctionTemplateHistogram<Txvec,Ty,Trandom>(hist) {}; + + using TFCS1DFunction::rnd_to_fct; + using TFCS1DFunctionTemplateHistogram<Txvec,Ty,Trandom>::get_nbins; + using TFCS1DFunctionTemplateHistogram<Txvec,Ty,Trandom>::m_HistoContents; + using TFCS1DFunctionTemplateHistogram<Txvec,Ty,Trandom>::m_HistoBorders; + + ///Function gets random number rnd in the range [0,1) as argument + ///and returns function value according to a histogram distribution. + ///A linear interpolation is done within each bin + virtual double rnd_to_fct(double rnd) const { + size_t nbins=get_nbins(); + if(nbins==0) return 0; + Trandom residual_rnd; + size_t ibin=m_HistoContents.get_bin(rnd,residual_rnd); + + Trandom frac=m_HistoContents.get_fraction(ibin); + + Trandom dfrac; + auto l=m_HistoBorders.GetBinLength(ibin); + Trandom dfracprev; + auto lprev=l; + if(ibin>0) { + Trandom fracprev=m_HistoContents.get_fraction(ibin-1); + dfrac=frac-fracprev; + if(ibin>1) dfracprev=fracprev-m_HistoContents.get_fraction(ibin-2); + else dfracprev=fracprev; + lprev=m_HistoBorders.GetBinLength(ibin-1); + } else { + dfrac=frac; + dfracprev=dfrac; + } + + Trandom dfracnext; + auto lnext=l; + if(ibin<nbins-1) { + dfracnext=m_HistoContents.get_fraction(ibin+1)-frac; + lnext=m_HistoBorders.GetBinLength(ibin+1); + } else { + dfracnext=dfrac; + } + + Trandom m; + if(dfrac>0) { + /* + //approximately readable version of the code below + //density in bin is dfracX/lX + Trandom mnext=dfracnext/lnext-dfrac/l; //change in density to next bin + mnext/=0.5*(l+lnext); //normalize change in density to distance between bins + Trandom mprev=dfrac/l-dfracprev/lprev; //change in density to previous bin + mprev/=0.5*(l+lprev); //normalize change in density to distance between bins + m=0.5*(mnext+mprev); //average the two + m*=l; //m is needed inside this bin, so multiply by size of this bin (matches normalization to distance between bins above) + m/=dfrac/l; //finally, m is the slope in this bin, given that this bin was already selected. So overall normalize to density inside this bin + */ + Trandom mnext=dfracnext/lnext-dfrac/l; + mnext/=l+lnext; + Trandom mprev=dfrac/l-dfracprev/lprev; + mprev/=l+lprev; + m=(mnext+mprev)*l*l/dfrac; + } else m=0; + + //std::cout<<"fbin="<<ibin<<" fx="<<m_HistoBorders.GetBinLowEdge(ibin)<<" frac="<<m_HistoContents.get_fraction(ibin)<<" dfracprev="<<dfracprev<<" dfrac="<<dfrac<<" dfracnext="<<dfracnext<<" dfracprev-dfrac="<<dfracprev-dfrac<<" dfracnext-dfrac="<<dfracnext-dfrac<<" m="<<m<<" residual_rnd="<<residual_rnd<<std::endl; + return m_HistoBorders.position(ibin,m,residual_rnd); + } + + ClassDef(TFCS1DFunctionTemplateInterpolationHistogram,1) //TFCS1DFunctionTemplateInterpolationHistogram +}; + +class TFCS1DFunctionInt8Int8Histogram: public TFCS1DFunctionTemplateHistogram<TFCS1DFunction_HistogramInt8BinEdges,uint8_t,float> +{ + public: + TFCS1DFunctionInt8Int8Histogram(TH1* h=nullptr):TFCS1DFunctionTemplateHistogram<TFCS1DFunction_HistogramInt8BinEdges,uint8_t,float>(h) {}; + + ClassDef(TFCS1DFunctionInt8Int8Histogram,1) //TFCS1DFunctionInt8Int8Histogram +}; + +class TFCS1DFunctionInt8Int16Histogram: public TFCS1DFunctionTemplateHistogram<TFCS1DFunction_HistogramInt8BinEdges,uint16_t,float> +{ + public: + TFCS1DFunctionInt8Int16Histogram(TH1* h=nullptr):TFCS1DFunctionTemplateHistogram<TFCS1DFunction_HistogramInt8BinEdges,uint16_t,float>(h) {}; + + ClassDef(TFCS1DFunctionInt8Int16Histogram,1) //TFCS1DFunctionInt8Int16Histogram +}; + +class TFCS1DFunctionInt8Int32Histogram: public TFCS1DFunctionTemplateHistogram<TFCS1DFunction_HistogramInt8BinEdges,uint32_t,float> +{ + public: + TFCS1DFunctionInt8Int32Histogram(TH1* h=nullptr):TFCS1DFunctionTemplateHistogram<TFCS1DFunction_HistogramInt8BinEdges,uint32_t,float>(h) {}; + + ClassDef(TFCS1DFunctionInt8Int32Histogram,1) //TFCS1DFunctionInt8Int32Histogram +}; + +class TFCS1DFunctionInt16Int16Histogram: public TFCS1DFunctionTemplateHistogram<TFCS1DFunction_HistogramInt16BinEdges,uint16_t,float> +{ + public: + TFCS1DFunctionInt16Int16Histogram(TH1* h=nullptr):TFCS1DFunctionTemplateHistogram<TFCS1DFunction_HistogramInt16BinEdges,uint16_t,float>(h) {}; + + ClassDef(TFCS1DFunctionInt16Int16Histogram,1) //TFCS1DFunctionInt16Int16Histogram +}; + +class TFCS1DFunctionInt16Int32Histogram: public TFCS1DFunctionTemplateHistogram<TFCS1DFunction_HistogramInt16BinEdges,uint32_t,float> +{ + public: + TFCS1DFunctionInt16Int32Histogram(TH1* h=nullptr):TFCS1DFunctionTemplateHistogram<TFCS1DFunction_HistogramInt16BinEdges,uint32_t,float>(h) {}; + + ClassDef(TFCS1DFunctionInt16Int32Histogram,1) //TFCS1DFunctionInt16Int32Histogram +}; + +class TFCS1DFunctionInt8Int8InterpolationHistogram: public TFCS1DFunctionTemplateInterpolationHistogram<TFCS1DFunction_HistogramInt8BinEdges,uint8_t,float> +{ + public: + TFCS1DFunctionInt8Int8InterpolationHistogram(TH1* h=nullptr):TFCS1DFunctionTemplateInterpolationHistogram<TFCS1DFunction_HistogramInt8BinEdges,uint8_t,float>(h) {}; + + ClassDef(TFCS1DFunctionInt8Int8InterpolationHistogram,1) //TFCS1DFunctionInt8Int8InterpolationHistogram +}; + +class TFCS1DFunctionInt8Int16InterpolationHistogram: public TFCS1DFunctionTemplateInterpolationHistogram<TFCS1DFunction_HistogramInt8BinEdges,uint16_t,float> +{ + public: + TFCS1DFunctionInt8Int16InterpolationHistogram(TH1* h=nullptr):TFCS1DFunctionTemplateInterpolationHistogram<TFCS1DFunction_HistogramInt8BinEdges,uint16_t,float>(h) {}; + + ClassDef(TFCS1DFunctionInt8Int16InterpolationHistogram,1) //TFCS1DFunctionInt8Int16InterpolationHistogram +}; + +class TFCS1DFunctionInt16Int16InterpolationHistogram: public TFCS1DFunctionTemplateInterpolationHistogram<TFCS1DFunction_HistogramInt16BinEdges,uint16_t,float> +{ + public: + TFCS1DFunctionInt16Int16InterpolationHistogram(TH1* h=nullptr):TFCS1DFunctionTemplateInterpolationHistogram<TFCS1DFunction_HistogramInt16BinEdges,uint16_t,float>(h) {}; + + ClassDef(TFCS1DFunctionInt16Int16InterpolationHistogram,1) //TFCS1DFunctionInt16Int16InterpolationHistogram +}; + +class TFCS1DFunctionInt16Int32InterpolationHistogram: public TFCS1DFunctionTemplateInterpolationHistogram<TFCS1DFunction_HistogramInt16BinEdges,uint32_t,float> +{ + public: + TFCS1DFunctionInt16Int32InterpolationHistogram(TH1* h=nullptr):TFCS1DFunctionTemplateInterpolationHistogram<TFCS1DFunction_HistogramInt16BinEdges,uint32_t,float>(h) {}; + + ClassDef(TFCS1DFunctionInt16Int32InterpolationHistogram,1) //TFCS1DFunctionInt16Int32InterpolationHistogram +}; + + + + +#if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__) +#pragma link C++ class TFCS1DFunction_Numeric<uint8_t,float>+; +#pragma link C++ class TFCS1DFunction_Numeric<uint16_t,float>+; +#pragma link C++ class TFCS1DFunction_Numeric<uint32_t,float>+; +#pragma link C++ class TFCS1DFunction_Numeric<float,float>+; +#pragma link C++ class TFCS1DFunction_Numeric<double,float>+; +#pragma link C++ class TFCS1DFunction_Numeric<double,double>+; + +#pragma link C++ class TFCS1DFunction_Array<float>-; +#pragma link C++ class TFCS1DFunction_Array<double>-; +#pragma link C++ class TFCS1DFunction_Array<uint8_t>-; +#pragma link C++ class TFCS1DFunction_Array<uint16_t>-; +#pragma link C++ class TFCS1DFunction_Array<uint32_t>-; + +#pragma link C++ class TFCS1DFunction_HistogramContent<float,float>+; +#pragma link C++ class TFCS1DFunction_HistogramContent<double,float>+; +#pragma link C++ class TFCS1DFunction_HistogramContent<double,double>+; +#pragma link C++ class TFCS1DFunction_HistogramContent<uint8_t,float>+; +#pragma link C++ class TFCS1DFunction_HistogramContent<uint16_t,float>+; +#pragma link C++ class TFCS1DFunction_HistogramContent<uint32_t,float>+; + +#pragma link C++ class TFCS1DFunction_HistogramBinEdges<float,float>+; +#pragma link C++ class TFCS1DFunction_HistogramBinEdges<double,float>+; +#pragma link C++ class TFCS1DFunction_HistogramBinEdges<double,double>+; + +#pragma link C++ class TFCS1DFunction_HistogramCompactBinEdges<float,uint8_t,float>+; +#pragma link C++ class TFCS1DFunction_HistogramCompactBinEdges<float,uint16_t,float>+; +#pragma link C++ class TFCS1DFunction_HistogramCompactBinEdges<float,uint32_t,float>+; + +#pragma link C++ class TFCS1DFunction_HistogramInt8BinEdges+; +#pragma link C++ class TFCS1DFunction_HistogramInt16BinEdges+; +#pragma link C++ class TFCS1DFunction_HistogramInt32BinEdges+; +#pragma link C++ class TFCS1DFunction_HistogramFloatBinEdges+; +#pragma link C++ class TFCS1DFunction_HistogramDoubleBinEdges+; + +#pragma link C++ class TFCS1DFunctionTemplateHistogram<TFCS1DFunction_HistogramInt8BinEdges,uint8_t,float>+; +#pragma link C++ class TFCS1DFunctionTemplateHistogram<TFCS1DFunction_HistogramInt8BinEdges,uint16_t,float>+; +#pragma link C++ class TFCS1DFunctionTemplateHistogram<TFCS1DFunction_HistogramInt8BinEdges,uint32_t,float>+; +#pragma link C++ class TFCS1DFunctionTemplateHistogram<TFCS1DFunction_HistogramInt16BinEdges,uint16_t,float>+; +#pragma link C++ class TFCS1DFunctionTemplateHistogram<TFCS1DFunction_HistogramInt16BinEdges,uint32_t,float>+; + +#pragma link C++ class TFCS1DFunctionInt8Int8Histogram+; +#pragma link C++ class TFCS1DFunctionInt8Int16Histogram+; +#pragma link C++ class TFCS1DFunctionInt8Int32Histogram+; +#pragma link C++ class TFCS1DFunctionInt16Int16Histogram+; +#pragma link C++ class TFCS1DFunctionInt16Int32Histogram+; + +#pragma link C++ class TFCS1DFunctionTemplateInterpolationHistogram<TFCS1DFunction_HistogramInt8BinEdges,uint8_t,float>+; +#pragma link C++ class TFCS1DFunctionTemplateInterpolationHistogram<TFCS1DFunction_HistogramInt8BinEdges,uint16_t,float>+; +#pragma link C++ class TFCS1DFunctionTemplateInterpolationHistogram<TFCS1DFunction_HistogramInt16BinEdges,uint16_t,float>+; +#pragma link C++ class TFCS1DFunctionTemplateInterpolationHistogram<TFCS1DFunction_HistogramInt16BinEdges,uint32_t,float>+; + +#pragma link C++ class TFCS1DFunctionInt8Int8InterpolationHistogram+; +#pragma link C++ class TFCS1DFunctionInt8Int16InterpolationHistogram+; +#pragma link C++ class TFCS1DFunctionInt16Int16InterpolationHistogram+; +#pragma link C++ class TFCS1DFunctionInt16Int32InterpolationHistogram+; + +#endif + +#endif diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS2DFunction.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS2DFunction.h index 56043ea5f063..d42cd394eaca 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS2DFunction.h +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS2DFunction.h @@ -17,8 +17,8 @@ class TFCS2DFunction:public TFCSFunction virtual int ndim() const {return 2;}; - virtual void rnd_to_fct(float& valuex,float& valuey,float rnd0,float rnd1) = 0; - virtual void rnd_to_fct(float value[],const float rnd[]); + virtual void rnd_to_fct(float& valuex,float& valuey,float rnd0,float rnd1) const = 0; + virtual void rnd_to_fct(float value[],const float rnd[]) const; private: diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS2DFunctionHistogram.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS2DFunctionHistogram.h index fa57b760e972..8d95d7b9c808 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS2DFunctionHistogram.h +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS2DFunctionHistogram.h @@ -19,7 +19,7 @@ class TFCS2DFunctionHistogram:public TFCS2DFunction virtual void Initialize(TH2* hist); using TFCS2DFunction::rnd_to_fct; - virtual void rnd_to_fct(float& valuex,float& valuey,float rnd0,float rnd1); + virtual void rnd_to_fct(float& valuex,float& valuey,float rnd0,float rnd1) const; const std::vector<float>& get_HistoBordersx() const {return m_HistoBorders;}; std::vector<float>& get_HistoBordersx() {return m_HistoBorders;}; diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSFunction.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSFunction.h index 30893759643c..765b4e6dd7bb 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSFunction.h +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSFunction.h @@ -7,23 +7,26 @@ #include "TObject.h" -class TFCSFunction:public TObject +class TFCSFunction { public: TFCSFunction() {}; - ~TFCSFunction() {}; + virtual ~TFCSFunction() {}; + ///Gives the total memory size, including the size of additional memory allocated inside the class + virtual std::size_t MemorySize() const {return sizeof(*this);}; + ///Return the number of dimensions for the function virtual int ndim() const {return 0;}; ///Function gets array of random numbers rnd[] in the range [0,1) as arguments ///and returns function value in array value. ///For a n-dimensional function, value and rnd should both have n elements. - virtual void rnd_to_fct(float value[],const float rnd[]); + virtual void rnd_to_fct(float value[],const float rnd[]) const = 0; private: - ClassDef(TFCSFunction,1) //TFCSFunction + ClassDef(TFCSFunction,2) //TFCSFunction }; diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMappingWiggle.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMappingWiggle.h new file mode 100644 index 000000000000..d0e009f515f9 --- /dev/null +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMappingWiggle.h @@ -0,0 +1,54 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef TFCSHitCellMappingWiggle_h +#define TFCSHitCellMappingWiggle_h + +#include "ISF_FastCaloSimEvent/TFCSHitCellMapping.h" + +class TFCS1DFunction; +class TH1; + +class TFCSHitCellMappingWiggle:public TFCSHitCellMapping { +public: + TFCSHitCellMappingWiggle(const char* name=nullptr, const char* title=nullptr, ICaloGeometry* geo=nullptr); + ~TFCSHitCellMappingWiggle(); + + void initialize(TFCS1DFunction* func); + void initialize(const std::vector< const TFCS1DFunction* >& functions, const std::vector< float >& bin_low_edges); + + void initialize(TH1* histogram,float xscale=1); + void initialize(const std::vector< const TH1* > histograms, std::vector< float > bin_low_edges, float xscale=1); + + inline unsigned int get_number_of_bins() const {return m_functions.size();}; + + inline double get_bin_low_edge(int bin) const {return m_bin_low_edge[bin];}; + inline double get_bin_up_edge(int bin) const {return m_bin_low_edge[bin+1];}; + + inline const TFCS1DFunction* get_function(int bin) {return m_functions[bin];}; + const std::vector< const TFCS1DFunction* > get_functions() {return m_functions;}; + const std::vector< float > get_bin_low_edges() {return m_bin_low_edge;}; + + /// modify one hit position to emulate the LAr accordeon shape + /// and then fills all hits into calorimeter cells + virtual void simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol); + + void Print(Option_t *option="") const; + + static void unit_test(TFCSSimulationState* simulstate=nullptr,TFCSTruthState* truth=nullptr, TFCSExtrapolationState* extrapol=nullptr); + +private: + //** Function for the hit-to-cell assignment accordion structure fix (wiggle) **// + //** To be moved to the conditions database at some point **// + std::vector< const TFCS1DFunction* > m_functions = {nullptr}; + std::vector< float > m_bin_low_edge = {0,static_cast<float>(init_eta_max)}; + + ClassDef(TFCSHitCellMappingWiggle,1) //TFCSHitCellMappingWiggle +}; + +#if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__) +#pragma link C++ class TFCSHitCellMappingWiggle+; +#endif + +#endif diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunction.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunction.cxx index 612558b37404..8a9ecda8a593 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunction.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunction.cxx @@ -4,17 +4,23 @@ #include "ISF_FastCaloSimEvent/TFCS1DFunction.h" -#include "TFile.h" -#include "TRandom1.h" +#include "TH1.h" +#include "TCanvas.h" +#include "TRandom.h" +#include <string> +#include <iostream> //============================================= //======= TFCS1DFunction ========= //============================================= +void TFCS1DFunction::rnd_to_fct(float value[],const float rnd[]) const +{ + value[0]=rnd_to_fct(rnd[0]); +} double TFCS1DFunction::get_maxdev(TH1* h_input1, TH1* h_approx1) { - TH1D* h_input =(TH1D*)h_input1->Clone("h_input"); TH1D* h_approx=(TH1D*)h_approx1->Clone("h_approx"); @@ -41,12 +47,137 @@ double TFCS1DFunction::get_maxdev(TH1* h_input1, TH1* h_approx1) } -void TFCS1DFunction::rnd_to_fct(float value[],const float rnd[]) +double TFCS1DFunction::CheckAndIntegrate1DHistogram(const TH1* hist, std::vector<double>& integral_vec,int& first,int& last) { + Int_t nbins = hist->GetNbinsX(); + + float integral=0; + integral_vec.resize(nbins); + for (int ix=1; ix<=nbins; ix++){ + float binval=hist->GetBinContent(ix); + if(binval<0) { + //Can't work if a bin is negative, forcing bins to 0 in this case + double fraction=binval/hist->Integral(); + if(TMath::Abs(fraction)>1e-5) { + std::cout<<"WARNING: bin content is negative in histogram "<<hist->GetName()<<" : "<<hist->GetTitle()<<" binval="<<binval<<" "<<fraction*100<<"% of integral="<<hist->Integral()<<". Forcing bin to 0."<<std::endl; + } + binval=0; + } + integral+=binval; + integral_vec[ix-1]=integral; + } + + for(first=0; first<nbins; first++) if(integral_vec[first]!=0) break; + for(last=nbins-1; last>0; last--) if(integral_vec[last]!=integral) break; + last++; + + if(integral<=0) { + std::cout<<"ERROR: histogram "<<hist->GetName()<<" : "<<hist->GetTitle()<<" integral="<<integral<<" is <=0"<<std::endl; + } + return integral; +} + +TH1* TFCS1DFunction::generate_histogram_random_slope(int nbinsx,double xmin,double xmax,double zerothreshold) { - value[0]=rnd_to_fct(rnd[0]); + TH1* hist=new TH1D("test_slope1D","test_slope1D",nbinsx,xmin,xmax); + hist->Sumw2(); + for(int ix=1;ix<=nbinsx;++ix) { + double val=(0.5+gRandom->Rndm())*(nbinsx+ix); + if(gRandom->Rndm()<zerothreshold) val=0; + hist->SetBinContent(ix,val); + hist->SetBinError(ix,0); + } + return hist; } -double TFCS1DFunction::rnd_to_fct(double) +TH1* TFCS1DFunction::generate_histogram_random_gauss(int nbinsx,int ntoy,double xmin,double xmax,double xpeak,double sigma) { - return 0; + TH1* hist=new TH1D("test_gauss1D","test_gauss1D",nbinsx,xmin,xmax); + hist->Sumw2(); + for(int i=1;i<=ntoy;++i) { + double x=gRandom->Gaus(xpeak,sigma); + if(x>=xmin && x<xmax) hist->Fill(x); + } + return hist; +} + +void TFCS1DFunction::unit_test(TH1* hist,TFCS1DFunction* rtof,int nrnd,TH1* histfine) +{ + std::cout<<"========= "<<hist->GetName()<<" funcsize="<<rtof->MemorySize()<<" ========"<<std::endl; + int nbinsx=hist->GetNbinsX(); + double integral=hist->Integral(); + + float value[2]; + float rnd[2]; + for(rnd[0]=0;rnd[0]<0.9999;rnd[0]+=0.25) { + rtof->rnd_to_fct(value,rnd); + std::cout<<"rnd0="<<rnd[0]<<" -> x="<<value[0]<<std::endl; + } + + TH1* hist_val; + if(histfine) hist_val=(TH1*)histfine->Clone(TString(hist->GetName())+"hist_val"); + else hist_val=(TH1*)hist->Clone(TString(hist->GetName())+"hist_val"); + double weightfine=hist_val->Integral()/nrnd; + hist_val->SetTitle("toy simulation"); + hist_val->Reset(); + hist_val->SetLineColor(2); + hist_val->Sumw2(); + + TH1* hist_diff=(TH1*)hist->Clone(TString(hist->GetName())+"_difference"); + hist_diff->SetTitle("cut efficiency difference"); + hist_diff->Reset(); + hist_diff->Sumw2(); + + double weight=integral/nrnd; + for(int i=0;i<nrnd;++i) { + rnd[0]=gRandom->Rndm(); + rtof->rnd_to_fct(value,rnd); + hist_val->Fill(value[0],weightfine); + hist_diff->Fill(value[0],weight); + } + hist_diff->Add(hist,-1); + hist_diff->Scale(1.0/integral); + + TH1F* hist_pull=new TH1F(TString(hist->GetName())+"_pull","pull",200,-10,10); + for(int ix=1;ix<=nbinsx;++ix) { + float val=hist_diff->GetBinContent(ix); + float err=hist_diff->GetBinError(ix); + if(err>0) hist_pull->Fill(val/err); + //std::cout<<"x="<<hist->GetBinCenter(ix)<<" : pull val="<<val<<" err="<<err<<std::endl; + } + +//Screen output in athena won't make sense and would require linking of additional libraries +#if defined(__FastCaloSimStandAlone__) + TCanvas* c=new TCanvas(hist->GetName(),hist->GetName()); + c->Divide(2,2); + + c->cd(1); + if(histfine) { + histfine->SetLineColor(kGray); + histfine->DrawClone("hist"); + hist->DrawClone("same"); + } else { + hist->DrawClone(); + } + hist_val->DrawClone("sameshist"); + + c->cd(2); + if(histfine) { + histfine->SetLineColor(kGray); + histfine->DrawClone("hist"); + hist->DrawClone("same"); + } else { + hist->DrawClone(); + } + hist_val->DrawClone("sameshist"); + gPad->SetLogy(); + + c->cd(3); + hist_diff->Draw(); + + c->cd(4); + hist_pull->Draw(); + + c->SaveAs(".png"); +#endif } + diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionHistogram.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionHistogram.cxx index 70846c31a0d9..7f21675c4988 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionHistogram.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionHistogram.cxx @@ -240,7 +240,7 @@ TH1D* TFCS1DFunctionHistogram::smart_rebin(TH1D* h_input) } -double TFCS1DFunctionHistogram::rnd_to_fct(double rnd) +double TFCS1DFunctionHistogram::rnd_to_fct(double rnd) const { double value2=get_inverse(rnd); @@ -250,7 +250,7 @@ double TFCS1DFunctionHistogram::rnd_to_fct(double rnd) } -double TFCS1DFunctionHistogram::linear(double y1,double y2,double x1,double x2,double y) +double TFCS1DFunctionHistogram::linear(double y1,double y2,double x1,double x2,double y) const { double x=-1; @@ -266,7 +266,7 @@ double TFCS1DFunctionHistogram::linear(double y1,double y2,double x1,double x2,d return x; } -double TFCS1DFunctionHistogram::non_linear(double y1,double y2,double x1,double x2,double y) +double TFCS1DFunctionHistogram::non_linear(double y1,double y2,double x1,double x2,double y) const { double x=-1; double eps=0.0000000001; @@ -281,7 +281,7 @@ double TFCS1DFunctionHistogram::non_linear(double y1,double y2,double x1,double } -double TFCS1DFunctionHistogram::get_inverse(double rnd) +double TFCS1DFunctionHistogram::get_inverse(double rnd) const { double value = 0.; @@ -298,7 +298,7 @@ double TFCS1DFunctionHistogram::get_inverse(double rnd) else { //find the first HistoContent element that is larger than rnd: - vector<float>::iterator larger_element = std::upper_bound(m_HistoContents.begin(), m_HistoContents.end(), rnd); + vector<float>::const_iterator larger_element = std::upper_bound(m_HistoContents.begin(), m_HistoContents.end(), rnd); int index=larger_element-m_HistoContents.begin(); double y=m_HistoContents[index]; double x1=m_HistoBorders[index]; diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionInt16Histogram.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionInt16Histogram.cxx new file mode 100644 index 000000000000..58bfe3f1352d --- /dev/null +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionInt16Histogram.cxx @@ -0,0 +1,138 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "ISF_FastCaloSimEvent/TFCS1DFunctionInt16Histogram.h" +#include <algorithm> +#include <iostream> +#include "TMath.h" +#include "TCanvas.h" +#include "TH2F.h" +#include "TRandom.h" +#include "TFile.h" + +//============================================= +//======= TFCS1DFunctionInt16Histogram ========= +//============================================= + +const TFCS1DFunctionInt16Histogram::HistoContent_t TFCS1DFunctionInt16Histogram::s_MaxValue=UINT16_MAX; + +void TFCS1DFunctionInt16Histogram::Initialize(const TH1* hist) +{ + Int_t nbinsx = hist->GetNbinsX(); + Int_t nbins = nbinsx; + + float integral=0; + m_HistoBorders.resize(nbinsx+1); + m_HistoContents.resize(nbins); + std::vector<double> temp_HistoContents(nbins); + int ibin=0; + for (int ix=1; ix<=nbinsx; ix++){ + float binval=hist->GetBinContent(ix); + if(binval<0) { + //Can't work if a bin is negative, forcing bins to 0 in this case + double fraction=binval/hist->Integral(); + if(TMath::Abs(fraction)>1e-5) { + std::cout<<"WARNING: bin content is negative in histogram "<<hist->GetName()<<" : "<<hist->GetTitle()<<" binval="<<binval<<" "<<fraction*100<<"% of integral="<<hist->Integral()<<". Forcing bin to 0."<<std::endl; + } + binval=0; + } + integral+=binval; + temp_HistoContents[ibin]=integral; + ++ibin; + } + if(integral<=0) { + std::cout<<"ERROR: histogram "<<hist->GetName()<<" : "<<hist->GetTitle()<<" integral="<<integral<<" is <=0"<<std::endl; + m_HistoBorders.resize(0); + m_HistoContents.resize(0); + return; + } + + for (int ix=1; ix<=nbinsx; ix++) m_HistoBorders[ix-1]=hist->GetXaxis()->GetBinLowEdge(ix); + m_HistoBorders[nbinsx]=hist->GetXaxis()->GetXmax(); + + for(ibin=0;ibin<nbins;++ibin) { + m_HistoContents[ibin]=s_MaxValue*(temp_HistoContents[ibin]/integral); + //std::cout<<"bin="<<ibin<<" val="<<m_HistoContents[ibin]<<std::endl; + } +} + +double TFCS1DFunctionInt16Histogram::rnd_to_fct(double rnd) const +{ + if(m_HistoContents.size()==0) { + return 0; + } + HistoContent_t int_rnd=s_MaxValue*rnd; + auto it = std::upper_bound(m_HistoContents.begin(),m_HistoContents.end(),int_rnd); + int ibin=std::distance(m_HistoContents.begin(),it); + if(ibin>=(int)m_HistoContents.size()) ibin=m_HistoContents.size()-1; + Int_t binx = ibin; + + HistoContent_t basecont=0; + if(ibin>0) basecont=m_HistoContents[ibin-1]; + + HistoContent_t dcont=m_HistoContents[ibin]-basecont; + if(dcont>0) { + return m_HistoBorders[binx] + ((m_HistoBorders[binx+1]-m_HistoBorders[binx]) * (int_rnd-basecont)) / dcont; + } else { + return m_HistoBorders[binx] + (m_HistoBorders[binx+1]-m_HistoBorders[binx]) / 2; + } +} + +void TFCS1DFunctionInt16Histogram::unit_test(TH1* hist) +{ + int nbinsx; + if(hist==nullptr) { + nbinsx=50; + hist=new TH1D("test1D","test1D",nbinsx,0,1); + hist->Sumw2(); + for(int ix=1;ix<=nbinsx;++ix) { + double val=(0.5+gRandom->Rndm())*(nbinsx+ix); + if(gRandom->Rndm()<0.1) val=0; + hist->SetBinContent(ix,val); + hist->SetBinError(ix,0); + } + } + TFCS1DFunctionInt16Histogram rtof(hist); + nbinsx=hist->GetNbinsX(); + + float value[2]; + float rnd[2]; + for(rnd[0]=0;rnd[0]<0.9999;rnd[0]+=0.25) { + rtof.rnd_to_fct(value,rnd); + std::cout<<"rnd0="<<rnd[0]<<" -> x="<<value[0]<<std::endl; + } + + TH1* hist_val=(TH1*)hist->Clone("hist_val"); + hist_val->SetTitle("difference"); + hist_val->Reset(); + int nrnd=100000; + double weight=hist->Integral()/nrnd; + hist_val->Sumw2(); + for(int i=0;i<nrnd;++i) { + rnd[0]=gRandom->Rndm(); + rtof.rnd_to_fct(value,rnd); + hist_val->Fill(value[0],weight); + } + hist_val->Add(hist,-1); + + TH1F* hist_pull=new TH1F("pull","pull",200,-10,10); + for(int ix=1;ix<=nbinsx;++ix) { + float val=hist_val->GetBinContent(ix); + float err=hist_val->GetBinError(ix); + if(err>0) hist_pull->Fill(val/err); + std::cout<<"val="<<val<<" err="<<err<<std::endl; + } + +//Screen output in athena won't make sense and would require linking of additional libraries +#if defined(__FastCaloSimStandAlone__) + new TCanvas("input","Input"); + hist->Draw(); + + new TCanvas("validation","Validation"); + hist_val->Draw(); + + new TCanvas("pull","Pull"); + hist_pull->Draw(); +#endif +} diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionInt32Histogram.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionInt32Histogram.cxx new file mode 100644 index 000000000000..62fc8c186d65 --- /dev/null +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionInt32Histogram.cxx @@ -0,0 +1,138 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "ISF_FastCaloSimEvent/TFCS1DFunctionInt32Histogram.h" +#include <algorithm> +#include <iostream> +#include "TMath.h" +#include "TCanvas.h" +#include "TH2F.h" +#include "TRandom.h" +#include "TFile.h" + +//============================================= +//======= TFCS1DFunctionInt32Histogram ========= +//============================================= + +const TFCS1DFunctionInt32Histogram::HistoContent_t TFCS1DFunctionInt32Histogram::s_MaxValue=UINT32_MAX; + +void TFCS1DFunctionInt32Histogram::Initialize(const TH1* hist) +{ + Int_t nbinsx = hist->GetNbinsX(); + Int_t nbins = nbinsx; + + float integral=0; + m_HistoBorders.resize(nbinsx+1); + m_HistoContents.resize(nbins); + std::vector<double> temp_HistoContents(nbins); + int ibin=0; + for (int ix=1; ix<=nbinsx; ix++){ + float binval=hist->GetBinContent(ix); + if(binval<0) { + //Can't work if a bin is negative, forcing bins to 0 in this case + double fraction=binval/hist->Integral(); + if(TMath::Abs(fraction)>1e-5) { + std::cout<<"WARNING: bin content is negative in histogram "<<hist->GetName()<<" : "<<hist->GetTitle()<<" binval="<<binval<<" "<<fraction*100<<"% of integral="<<hist->Integral()<<". Forcing bin to 0."<<std::endl; + } + binval=0; + } + integral+=binval; + temp_HistoContents[ibin]=integral; + ++ibin; + } + if(integral<=0) { + std::cout<<"ERROR: histogram "<<hist->GetName()<<" : "<<hist->GetTitle()<<" integral="<<integral<<" is <=0"<<std::endl; + m_HistoBorders.resize(0); + m_HistoContents.resize(0); + return; + } + + for (int ix=1; ix<=nbinsx; ix++) m_HistoBorders[ix-1]=hist->GetXaxis()->GetBinLowEdge(ix); + m_HistoBorders[nbinsx]=hist->GetXaxis()->GetXmax(); + + for(ibin=0;ibin<nbins;++ibin) { + m_HistoContents[ibin]=s_MaxValue*(temp_HistoContents[ibin]/integral); + //std::cout<<"bin="<<ibin<<" val="<<m_HistoContents[ibin]<<std::endl; + } +} + +double TFCS1DFunctionInt32Histogram::rnd_to_fct(double rnd) const +{ + if(m_HistoContents.size()==0) { + return 0; + } + HistoContent_t int_rnd=s_MaxValue*rnd; + auto it = std::upper_bound(m_HistoContents.begin(),m_HistoContents.end(),int_rnd); + int ibin=std::distance(m_HistoContents.begin(),it); + if(ibin>=(int)m_HistoContents.size()) ibin=m_HistoContents.size()-1; + Int_t binx = ibin; + + HistoContent_t basecont=0; + if(ibin>0) basecont=m_HistoContents[ibin-1]; + + HistoContent_t dcont=m_HistoContents[ibin]-basecont; + if(dcont>0) { + return m_HistoBorders[binx] + ((m_HistoBorders[binx+1]-m_HistoBorders[binx]) * (int_rnd-basecont)) / dcont; + } else { + return m_HistoBorders[binx] + (m_HistoBorders[binx+1]-m_HistoBorders[binx]) / 2; + } +} + +void TFCS1DFunctionInt32Histogram::unit_test(TH1* hist) +{ + int nbinsx; + if(hist==nullptr) { + nbinsx=400; + hist=new TH1D("test1D","test1D",nbinsx,0,1); + hist->Sumw2(); + for(int ix=1;ix<=nbinsx;++ix) { + double val=(0.5+gRandom->Rndm())*(nbinsx+ix); + if(gRandom->Rndm()<0.1) val=0; + hist->SetBinContent(ix,val); + hist->SetBinError(ix,0); + } + } + TFCS1DFunctionInt32Histogram rtof(hist); + nbinsx=hist->GetNbinsX(); + + float value[2]; + float rnd[2]; + for(rnd[0]=0;rnd[0]<0.9999;rnd[0]+=0.25) { + rtof.rnd_to_fct(value,rnd); + std::cout<<"rnd0="<<rnd[0]<<" -> x="<<value[0]<<std::endl; + } + + TH1* hist_val=(TH1*)hist->Clone("hist_val"); + hist_val->SetTitle("difference"); + hist_val->Reset(); + int nrnd=10000000; + double weight=hist->Integral()/nrnd; + hist_val->Sumw2(); + for(int i=0;i<nrnd;++i) { + rnd[0]=gRandom->Rndm(); + rtof.rnd_to_fct(value,rnd); + hist_val->Fill(value[0],weight); + } + hist_val->Add(hist,-1); + + TH1F* hist_pull=new TH1F("pull","pull",200,-10,10); + for(int ix=1;ix<=nbinsx;++ix) { + float val=hist_val->GetBinContent(ix); + float err=hist_val->GetBinError(ix); + if(err>0) hist_pull->Fill(val/err); + std::cout<<"val="<<val<<" err="<<err<<std::endl; + } + +//Screen output in athena won't make sense and would require linking of additional libraries +#if defined(__FastCaloSimStandAlone__) + new TCanvas("input","Input"); + hist->Draw(); + + new TCanvas("validation","Validation"); + hist_val->Draw(); + + new TCanvas("pull","Pull"); + hist_pull->Draw(); +#endif +} diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionRegression.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionRegression.cxx index cd3f56039837..9435ef8de7b5 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionRegression.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionRegression.cxx @@ -16,7 +16,7 @@ using namespace std; //============================================= -double TFCS1DFunctionRegression::regression_value(double uniform) +double TFCS1DFunctionRegression::regression_value(double uniform) const { double myresult=-1; @@ -79,7 +79,7 @@ double TFCS1DFunctionRegression::regression_value(double uniform) } -double TFCS1DFunctionRegression::rnd_to_fct(double rnd) +double TFCS1DFunctionRegression::rnd_to_fct(double rnd) const { double value=regression_value(rnd); @@ -109,7 +109,7 @@ void TFCS1DFunctionRegression::set_weights(vector<vector<double> > fWeightMatrix /// /// From the mlpfit package (J.Schwindling 20-Jul-1999) -double TFCS1DFunctionRegression::sigmoid(double x) +double TFCS1DFunctionRegression::sigmoid(double x) const { static Double_t sigval[7000] = { -3.500000e+01, 6.30511676014698530e-16, 6.30511676014698130e-16, 3.15255838007348670e-16, 1.05085279335782620e-16, 2.62713198339455210e-17, 5.25426396678905190e-18, 8.75710661131491060e-19, 1.25101523018779380e-19, 1.56376903773461590e-20, diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionRegressionTF.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionRegressionTF.cxx index 483fbce19231..99c9cf753882 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionRegressionTF.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionRegressionTF.cxx @@ -22,14 +22,14 @@ TFCS1DFunctionRegressionTF::TFCS1DFunctionRegressionTF(float rangeval, float sta } -double TFCS1DFunctionRegressionTF::retransform(double value) +double TFCS1DFunctionRegressionTF::retransform(double value) const { return (value*m_rangeval+m_startval); } -double TFCS1DFunctionRegressionTF::rnd_to_fct(double rnd) +double TFCS1DFunctionRegressionTF::rnd_to_fct(double rnd) const { double value=regression_value(rnd); diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionSpline.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionSpline.cxx new file mode 100644 index 000000000000..f92a8225cc2a --- /dev/null +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionSpline.cxx @@ -0,0 +1,420 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "ISF_FastCaloSimEvent/TFCS1DFunctionSpline.h" +#include "ISF_FastCaloSimEvent/TFCS1DFunctionInt32Histogram.h" +#include <algorithm> +#include <iostream> +#include "TMath.h" +#include "TCanvas.h" +#include "TH2F.h" +#include "TRandom.h" +#include "TFile.h" + +//============================================= +//======= TFCS1DFunctionSpline ========= +//============================================= + +double TFCS1DFunctionSpline::Initialize(TH1* hist,double maxdevgoal,double maxeffsiggoal,int maxnp) +{ + double max_penalty_best=-1; + TSpline3 sp_best; + for(int np=3;np<=maxnp;++np) { + std::cout<<"========== Spline #="<<np<<" =============="<<std::endl; + double max_penalty; + if(max_penalty_best>0) { + max_penalty=InitializeFromSpline(hist,sp_best,maxdevgoal,maxeffsiggoal); + if(max_penalty_best<0 || max_penalty<max_penalty_best) { + max_penalty_best=max_penalty; + sp_best=m_spline; + } + } + + max_penalty=InitializeEqualDistance(hist,maxdevgoal,maxeffsiggoal,np); + if(max_penalty_best<0 || max_penalty<max_penalty_best) { + max_penalty_best=max_penalty; + sp_best=m_spline; + } + + max_penalty=InitializeEqualProbability(hist,maxdevgoal,maxeffsiggoal,np); + if(max_penalty_best<0 || max_penalty<max_penalty_best) { + max_penalty_best=max_penalty; + sp_best=m_spline; + } + + std::cout<<"========== Spline #="<<np<<" max_penalty_best="<<max_penalty_best<<" =============="<<std::endl; + std::cout<<"==== Best spline init | "; + for(int i=0;i<sp_best.GetNp();++i) { + double p,x; + sp_best.GetKnot(i,p,x); + std::cout<<i<<" : p="<<p<<" x="<<x<<" ; "; + } + std::cout<<" ====="<<std::endl; + + if(max_penalty_best<2) break; + } + m_spline=sp_best; + + return max_penalty_best; +} + +double TFCS1DFunctionSpline::InitializeFromSpline(TH1* hist,const TSpline3& sp,double maxdevgoal,double maxeffsiggoal) +{ + TFCS1DFunctionInt32Histogram hist_fct(hist); + + double maxeffsig; + double p_maxdev; + double p_maxeffsig; + double maxdev=get_maxdev(hist,sp,maxeffsig,p_maxdev,p_maxeffsig); + double p_improve; + if(maxdev/maxdevgoal > maxeffsig/maxeffsiggoal) p_improve=p_maxdev; + else p_improve=p_maxeffsig; + + int nsplinepoints=sp.GetNp(); + std::vector<double> nprop(nsplinepoints+1); + int ind=0; + std::cout<<"Spline init p_improve="<<p_improve<<" | "; + for(int i=0;i<nsplinepoints;++i) { + double p,x; + sp.GetKnot(i,p,x); + if(i==0 && p_improve<p) { + nprop[ind]=(0+p)/2; + std::cout<<ind<<" : pi="<<nprop[ind]<<" ; "; + ++ind; + } + + nprop[ind]=p; + std::cout<<ind<<" : p="<<nprop[ind]<<" ; "; + ++ind; + + if(i==nsplinepoints-1 && p_improve>p) { + nprop[ind]=(1+p)/2; + std::cout<<ind<<" : pi="<<nprop[ind]<<" ; "; + ++ind; + } + if(i<nsplinepoints-1) { + double pn,xn; + sp.GetKnot(i+1,pn,xn); + if(p_improve>p && p_improve<pn) { + nprop[ind]=(p+pn)/2; + std::cout<<ind<<" : pi="<<nprop[ind]<<" ; "; + ++ind; + } + } + } + std::cout<<std::endl; + nsplinepoints=ind; + nprop.resize(nsplinepoints); + + double max_penalty=optimize(m_spline,nprop,hist,hist_fct,maxdevgoal,maxeffsiggoal); + maxdev=get_maxdev(hist,m_spline,maxeffsig,p_maxdev,p_maxeffsig); + std::cout<<"Spline init spline #="<<nsplinepoints<<" : maxdev="<<maxdev<<" p_maxdev="<<p_maxdev<<" maxeffsig="<<maxeffsig<<" p_maxeffsig="<<p_maxeffsig<<" max_penalty="<<max_penalty<<std::endl; + std::cout<<" "; + for(int i=0;i<m_spline.GetNp();++i) { + double p,x; + m_spline.GetKnot(i,p,x); + std::cout<<i<<" : p="<<p<<" x="<<x<<" ; "; + } + std::cout<<std::endl; + return max_penalty; +} + +double TFCS1DFunctionSpline::InitializeEqualDistance(TH1* hist,double maxdevgoal,double maxeffsiggoal,int nsplinepoints) +{ + TFCS1DFunctionInt32Histogram hist_fct(hist); + + double xmin=0; + double xmax=0; + for(int i=1;i<=hist->GetNbinsX();i++) { + xmin=hist->GetXaxis()->GetBinLowEdge(i); + if(hist->GetBinContent(i)>0) break; + } + for(int i=hist->GetNbinsX();i>=1;i--) { + xmax=hist->GetXaxis()->GetBinUpEdge(i); + if(hist->GetBinContent(i)>0) break; + } + //std::cout<<"xmin="<<xmin<<" xmax="<<xmax<<std::endl; + + double dx=(xmax-xmin)/(nsplinepoints-1); + + std::vector<double> nprop(nsplinepoints); + std::vector<double> nx(nsplinepoints); + nprop[0]=0; + nx[0]=hist_fct.rnd_to_fct(nprop[0]); + //std::cout<<0<<" p="<<nprop[0]<<" x="<<nx[0]<<std::endl; + for(int i=1;i<nsplinepoints;++i) { + nx[i]=xmin+i*dx; + double p_min=0; + double p_max=1; + double p_test; + double tx; + do { + p_test=0.5*(p_min+p_max); + tx=hist_fct.rnd_to_fct(p_test); + if(nx[i]<tx) p_max=p_test; + else p_min=p_test; + if((p_max-p_min)<0.0000001) break; + } while (TMath::Abs(tx-nx[i])>dx/10); + //std::cout<<i<<" p="<<p_test<<" x="<<tx<<std::endl; + nprop[i]=p_test; + } + + double max_penalty=optimize(m_spline,nprop,hist,hist_fct,maxdevgoal,maxeffsiggoal); + double maxeffsig; + double p_maxdev; + double p_maxeffsig; + double maxdev=get_maxdev(hist,m_spline,maxeffsig,p_maxdev,p_maxeffsig); + std::cout<<"Spline init equ. dist. #="<<nsplinepoints<<" : maxdev="<<maxdev<<" p_maxdev="<<p_maxdev<<" maxeffsig="<<maxeffsig<<" p_maxeffsig="<<p_maxeffsig<<" max_penalty="<<max_penalty<<std::endl; + std::cout<<" "; + for(int i=0;i<m_spline.GetNp();++i) { + double p,x; + m_spline.GetKnot(i,p,x); + std::cout<<i<<" : p="<<p<<" x="<<x<<" ; "; + } + std::cout<<std::endl; + return max_penalty; +} + +double TFCS1DFunctionSpline::InitializeEqualProbability(TH1* hist,double maxdevgoal,double maxeffsiggoal,int nsplinepoints) +{ + TFCS1DFunctionInt32Histogram hist_fct(hist); + + double dprop=1.0/(nsplinepoints-1); + std::vector<double> nprop(nsplinepoints); + for(int i=0;i<nsplinepoints;++i) { + nprop[i]=i*dprop; + } + + double max_penalty=optimize(m_spline,nprop,hist,hist_fct,maxdevgoal,maxeffsiggoal); + double maxeffsig; + double p_maxdev; + double p_maxeffsig; + double maxdev=get_maxdev(hist,m_spline,maxeffsig,p_maxdev,p_maxeffsig); + std::cout<<"Spline init equ. prob. #="<<nsplinepoints<<" : maxdev="<<maxdev<<" p_maxdev="<<p_maxdev<<" maxeffsig="<<maxeffsig<<" p_maxeffsig="<<p_maxeffsig<<" max_penalty="<<max_penalty<<std::endl; + std::cout<<" "; + for(int i=0;i<m_spline.GetNp();++i) { + double p,x; + m_spline.GetKnot(i,p,x); + std::cout<<i<<" : p="<<p<<" x="<<x<<" ; "; + } + std::cout<<std::endl; + return max_penalty; +} + +double TFCS1DFunctionSpline::optimize(TSpline3& sp_best,std::vector<double>& nprop,const TH1* hist,TFCS1DFunctionInt32Histogram& hist_fct,double maxdevgoal,double maxeffsiggoal) +{ + int nsplinepoints=(int)nprop.size(); + //double xmin=hist->GetXaxis()->GetXmin(); + //double xmax=hist->GetXaxis()->GetXmax(); + std::vector<double> nx(nsplinepoints); + std::vector<double> nprop_try=nprop; + double max_penalty=-1; + double p_gotobest=0.5/nsplinepoints; + int ntry=200/p_gotobest; + int itrytot=0; + for(double dproploop=0.4/nsplinepoints;dproploop>0.02/nsplinepoints;dproploop/=2) { + double dprop=dproploop; + int n_nogain=0; + for(int itry=0;itry<ntry;++itry) { + itrytot++; + for(int i=0;i<nsplinepoints;++i) { + nx[i]=hist_fct.rnd_to_fct(nprop_try[i]); + } + TSpline3 sp("1Dspline", nprop_try.data(), nx.data(), nsplinepoints, "b2e2", 0, 0); + double maxeffsig; + double p_maxdev; + double p_maxeffsig; + double maxdev=get_maxdev(hist,sp,maxeffsig,p_maxdev,p_maxeffsig); + double penalty=maxdev/maxdevgoal+maxeffsig/maxeffsiggoal; + if(max_penalty<0 || penalty<max_penalty) { + max_penalty=penalty; + nprop=nprop_try; + sp_best=sp; + /* + std::cout<<"#="<<nsplinepoints<<" try="<<itrytot-1<<" | "; + for(int i=0;i<nsplinepoints;++i) { + std::cout<<i<<":p="<<nprop_try[i]<<" x="<<nx[i]<<" ; "; + } + std::cout<<"new maxdev="<<maxdev<<" maxeffsig="<<maxeffsig<<" max_penalty="<<max_penalty<<std::endl; + */ + n_nogain=0; + } else { + if(gRandom->Rndm()<p_gotobest) nprop_try=nprop; + ++n_nogain; + //allow ~20 times retrying from the best found spline before aborting + if(n_nogain>20/p_gotobest) break; + } + int ip=1+gRandom->Rndm()*(nsplinepoints-1); + if(ip>nsplinepoints-1) ip=nsplinepoints-1; + double d=dprop; + if(gRandom->Rndm()>0.5) d=-dprop; + double nprop_new=nprop_try[ip]+d; + if(ip>0) if(nprop_try[ip-1]+dprop/2 > nprop_new) { + nprop_new=nprop_try[ip]; + dprop/=2; + } + if(ip<nsplinepoints-1) if(nprop_new > nprop_try[ip+1]-dprop/2) { + nprop_new=nprop_try[ip]; + dprop/=2; + } + if(nprop_new<0) { + nprop_new=0; + dprop/=2; + } + if(nprop_new>1) { + nprop_new=1; + dprop/=2; + } + nprop_try[ip]=nprop_new; + } + nprop_try=nprop; + } + return max_penalty; +} + +double TFCS1DFunctionSpline::get_maxdev(const TH1* hist,const TSpline3& sp,double& maxeffsig,double& p_maxdev,double& p_maxeffsig,int ntoy) +{ + double maxdev=0; + maxeffsig=0; + + TH1* hist_clone=(TH1*)hist->Clone("hist_clone"); + hist_clone->SetDirectory(0); + hist_clone->Reset(); + double interr=0; + double integral=hist->IntegralAndError(1,hist->GetNbinsX(),interr); + double effN=integral/interr; + effN*=effN; + //std::cout<<"integral="<<integral<<" +- "<<interr<<" relerr="<<interr/integral<<std::endl; + //std::cout<<"effN="<<effN<<" +- "<<TMath::Sqrt(effN)<<" relerr="<<1/TMath::Sqrt(effN)<<std::endl; + double toyweight=1.0/ntoy; + for(int itoy=0;itoy<ntoy;++itoy) { + double prop=itoy*toyweight; + hist_clone->Fill(sp.Eval(prop),toyweight); + } + + double int1=0; + double int2=0; + for(int i=0;i<=hist->GetNbinsX()+1;i++) { + int1+=hist->GetBinContent(i)/integral; + int2+=hist_clone->GetBinContent(i); + double val=TMath::Abs(int1-int2); + if(val>maxdev) { + maxdev=val; + p_maxdev=int1; + } + + //now view the normalized integral as selection efficiency from a total sample of sizze effN + double int1err=TMath::Sqrt(int1*(1-int1)/effN); + double valsig=0; + if(int1err>0) valsig=val/int1err; + if(valsig>maxeffsig) { + maxeffsig=valsig; + p_maxeffsig=int1; + } + + //std::cout<<i<<": diff="<<int1-int2<<" sig(diff)="<<valsig<<" int1="<<int1<<" +- "<<int1err<<" int2="<<int2<<" maxdev="<<maxdev<<" maxeffsig="<<maxeffsig<<std::endl; + } + + delete hist_clone; + + return maxdev; +} + +double TFCS1DFunctionSpline::rnd_to_fct(double rnd) const +{ + return m_spline.Eval(rnd); +} + +void TFCS1DFunctionSpline::unit_test(TH1* hist) +{ + int nbinsx; + TH1* histfine=0; + if(hist==nullptr) { + nbinsx=50; + double xmin=1; + double xpeak=1.5; + double sigma=0.6; + double xmax=5; + hist=new TH1D("test1D","test1D",nbinsx,xmin,xmax); + histfine=new TH1D("test1Dfine","test1Dfine",10*nbinsx,xmin,xmax); + hist->Sumw2(); + for(int i=1;i<=100000;++i) { + double x=gRandom->Gaus(xpeak,sigma); + if(x>=xmin && x<xmax) { + //hist->Fill(TMath::Sqrt(x)); + hist->Fill(x); + if(histfine) histfine->Fill(x,10); + } + } + } + if(!histfine) histfine=hist; + TFCS1DFunctionSpline rtof(histfine,0.01,2,15); + nbinsx=hist->GetNbinsX(); + + float value[2]; + float rnd[2]; + for(rnd[0]=0;rnd[0]<0.9999;rnd[0]+=0.25) { + rtof.rnd_to_fct(value,rnd); + std::cout<<"rnd0="<<rnd[0]<<" -> x="<<value[0]<<std::endl; + } + + TH1* hist_val=(TH1*)histfine->Clone("hist_val"); + hist_val->SetTitle("toy simulation"); + hist_val->Reset(); + hist_val->SetLineColor(2); + TH1* hist_diff=(TH1*)hist->Clone("hist_diff"); + hist_diff->SetTitle("difference"); + hist_diff->Reset(); + int nrnd=5000000; + double weight=histfine->Integral()/nrnd; + double weightdiff=hist->Integral()/nrnd; + hist_val->Sumw2(); + hist_diff->Sumw2(); + for(int i=0;i<nrnd;++i) { + rnd[0]=gRandom->Rndm(); + rtof.rnd_to_fct(value,rnd); + hist_val->Fill(value[0],weight); + hist_diff->Fill(value[0],weightdiff); + } + hist_diff->Add(hist,-1); + + TH1F* hist_pull=new TH1F("pull","pull",200,-10,10); + for(int ix=1;ix<=nbinsx;++ix) { + float val=hist_diff->GetBinContent(ix); + float err=hist_diff->GetBinError(ix); + if(err>0) hist_pull->Fill(val/err); + //std::cout<<"val="<<val<<" err="<<err<<std::endl; + } + +//Screen output in athena won't make sense and would require linking of additional libraries +#if defined(__FastCaloSimStandAlone__) + new TCanvas("input","Input"); + histfine->SetLineColor(kGray); + histfine->Draw("hist"); + hist->Draw("same"); + hist_val->Draw("sameshist"); + + new TCanvas("spline","spline"); + TFCS1DFunctionInt32Histogram hist_fct(hist); + int ngr=101; + TGraph* gr=new TGraph(); + for(int i=0;i<ngr;++i) { + double r=i*1.0/(ngr-1); + gr->SetPoint(i,r,hist_fct.rnd_to_fct(r)); + } + gr->SetMarkerStyle(7); + gr->Draw("AP"); + TSpline3* sp=new TSpline3(rtof.spline()); + sp->SetLineColor(2); + sp->SetMarkerColor(2); + sp->SetMarkerStyle(2); + sp->Draw("LPsame"); + + new TCanvas("difference","difference"); + hist_diff->Draw(); + + new TCanvas("pull","Pull"); + hist_pull->Draw(); +#endif +} diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionTemplateHistogram.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionTemplateHistogram.cxx new file mode 100644 index 000000000000..27273e697e30 --- /dev/null +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionTemplateHistogram.cxx @@ -0,0 +1,10 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "ISF_FastCaloSimEvent/TFCS1DFunctionTemplateHistogram.h" + +//============================================= +//======= TFCS1DFunctionTemplateHistogram ========= +//============================================= + diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS2DFunction.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS2DFunction.cxx index d42733ffcd3f..f657c8fd3f98 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS2DFunction.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS2DFunction.cxx @@ -8,7 +8,7 @@ //======= TFCS2DFunction ========= //============================================= -void TFCS2DFunction::rnd_to_fct(float value[],const float rnd[]) +void TFCS2DFunction::rnd_to_fct(float value[],const float rnd[]) const { rnd_to_fct(value[0],value[1],rnd[0],rnd[1]); } diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS2DFunctionHistogram.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS2DFunctionHistogram.cxx index de1726138cef..2ce4d90b2202 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS2DFunctionHistogram.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS2DFunctionHistogram.cxx @@ -59,7 +59,7 @@ void TFCS2DFunctionHistogram::Initialize(TH2* hist) for(ibin=0;ibin<nbins;++ibin) m_HistoContents[ibin]/=integral; } -void TFCS2DFunctionHistogram::rnd_to_fct(float& valuex,float& valuey,float rnd0,float rnd1) +void TFCS2DFunctionHistogram::rnd_to_fct(float& valuex,float& valuey,float rnd0,float rnd1) const { if(m_HistoContents.size()==0) { valuex=0; @@ -105,7 +105,7 @@ void TFCS2DFunctionHistogram::unit_test(TH2* hist) } TFCS2DFunctionHistogram rtof(hist); nbinsx=hist->GetNbinsX(); - nbinsy=hist->GetNbinsX(); + nbinsy=hist->GetNbinsY(); float value[2]; float rnd[2]; diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSFunction.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSFunction.cxx index cedf08c79854..0766c0c3238b 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSFunction.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSFunction.cxx @@ -8,6 +8,3 @@ //======= TFCSFunction ========= //============================================= -void TFCSFunction::rnd_to_fct(float* /*value*/,const float* /*rnd*/) -{ -} diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingWiggle.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingWiggle.cxx new file mode 100644 index 000000000000..fbfa4cac9284 --- /dev/null +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingWiggle.cxx @@ -0,0 +1,173 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "ISF_FastCaloSimEvent/TFCSHitCellMappingWiggle.h" +#include "ISF_FastCaloSimEvent/TFCSSimulationState.h" +#include "ISF_FastCaloSimEvent/TFCSTruthState.h" +#include "ISF_FastCaloSimEvent/TFCSExtrapolationState.h" +#include "ISF_FastCaloSimEvent/TFCS1DFunctionInt32Histogram.h" +#include "TH1.h" +#include "TRandom3.h" +#include "TVector2.h" +#include "TMath.h" + +#if defined(__FastCaloSimStandAlone__) +#include "CaloGeometryFromFile.h" +#endif + +//============================================= +//======= TFCSHitCellMappingWiggle ========= +//============================================= + +TFCSHitCellMappingWiggle::TFCSHitCellMappingWiggle(const char* name, const char* title, ICaloGeometry* geo) : TFCSHitCellMapping(name,title,geo) +{ +} + +TFCSHitCellMappingWiggle::~TFCSHitCellMappingWiggle() +{ + for(auto function : m_functions) delete function; +} + +void TFCSHitCellMappingWiggle::initialize(TFCS1DFunction* func) +{ + if(!func) return; + for(auto function : m_functions) if(function) delete function; + + m_functions.resize(1); + m_functions[0]=func; + + m_bin_low_edge.resize(2); + m_bin_low_edge[0] = 0; + m_bin_low_edge[1] = init_eta_max; +} + +void TFCSHitCellMappingWiggle::initialize(const std::vector< const TFCS1DFunction* >& functions, const std::vector< float >& bin_low_edges) +{ + if(functions.size()+1!=bin_low_edges.size()) { + ATH_MSG_ERROR("Using "<<functions.size()<<" functions needs "<<functions.size()+1<<" bins, but got "<<bin_low_edges.size()<<"bins"); + return; + } + for(auto function : m_functions) if(function) delete function; + m_functions=functions; + m_bin_low_edge=bin_low_edges; +} + +void TFCSHitCellMappingWiggle::initialize(TH1* histogram,float xscale) +{ + if(!histogram) return; + TFCS1DFunctionInt32Histogram* func=new TFCS1DFunctionInt32Histogram(histogram); + if(xscale!=1) { + for(auto& ele : func->get_HistoBordersx()) ele*=xscale; + } + initialize(func); +} + +void TFCSHitCellMappingWiggle::initialize(const std::vector< const TH1* > histograms, std::vector< float > bin_low_edges, float xscale) +{ + if(histograms.size()+1!=bin_low_edges.size()) { + ATH_MSG_ERROR("Using "<<histograms.size()<<" histograms needs "<<histograms.size()+1<<" bins, but got "<<bin_low_edges.size()<<"bins"); + return; + } + std::vector< const TFCS1DFunction* > functions(histograms.size()); + for(unsigned int i=0;i<histograms.size();++i) { + if(histograms[i]) { + TFCS1DFunctionInt32Histogram* func=new TFCS1DFunctionInt32Histogram(histograms[i]); + if(xscale!=1) { + for(auto& ele : func->get_HistoBordersx()) ele*=xscale; + } + functions[i]=func; + } else { + functions[i]=nullptr; + } + } + + initialize(functions,bin_low_edges); +} + +void TFCSHitCellMappingWiggle::simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) +{ + float eta=fabs(hit.eta()); + if(eta<m_bin_low_edge[0] || eta>=m_bin_low_edge[get_number_of_bins()]) { + TFCSHitCellMapping::simulate_hit(hit,simulstate,truth,extrapol); + return; + } + + auto it = std::upper_bound(m_bin_low_edge.begin(),m_bin_low_edge.end(),eta); + int bin=std::distance(m_bin_low_edge.begin(),it)-1; + + const TFCS1DFunction* func=get_function(bin); + if(func) { + double rnd = 1-gRandom->Rndm(); + + double wiggle=func->rnd_to_fct(rnd); + + ATH_MSG_DEBUG("HIT: E="<<hit.E()<<" cs="<<calosample()<<" eta="<<hit.eta()<<" phi="<<hit.phi()<<" wiggle="<<wiggle<<" bin="<<bin<<" ["<<get_bin_low_edge(bin)<<","<<get_bin_up_edge(bin)<<"] func="<<func); + + double hit_phi_shifted=hit.phi()+wiggle; + hit.phi()=TVector2::Phi_mpi_pi(hit_phi_shifted); + } + + TFCSHitCellMapping::simulate_hit(hit,simulstate,truth,extrapol); +} + +void TFCSHitCellMappingWiggle::Print(Option_t *option) const +{ + TFCSHitCellMapping::Print(option); + TString opt(option); + bool shortprint=opt.Index("short")>=0; + bool longprint=msgLvl(MSG::DEBUG) || (msgLvl(MSG::INFO) && !shortprint); + TString optprint=opt;optprint.ReplaceAll("short",""); + + if(longprint) { + ATH_MSG(INFO) << optprint <<" "<<get_number_of_bins()<<" functions in ["; + for (unsigned int i=0;i<get_number_of_bins();++i) msg()<<get_bin_low_edge(i)<<", "; + msg()<<get_bin_up_edge(get_number_of_bins()-1)<<"]"<< endmsg; + } +} + +void TFCSHitCellMappingWiggle::unit_test(TFCSSimulationState* simulstate,TFCSTruthState* truth, TFCSExtrapolationState* extrapol) +{ + if(!simulstate) simulstate=new TFCSSimulationState(); + if(!truth) truth=new TFCSTruthState(); + if(!extrapol) extrapol=new TFCSExtrapolationState(); + + int nbin=10; + float maxeta=5.0; + std::vector< const TFCS1DFunction* > functions; + std::vector< float > bin_low_edges; + + TFCSHitCellMappingWiggle wiggle_test("WiggleTest","WiggleTest"); + + for(float eta=0;eta<maxeta;eta+=maxeta/nbin) { + TH1* hist=TFCS1DFunction::generate_histogram_random_gauss(16,100000,-0.0125,0.0125,0,0.005); + bin_low_edges.push_back(eta); + functions.push_back(new TFCS1DFunctionInt32Histogram(hist)); + delete hist; + } + bin_low_edges.push_back(100); + wiggle_test.initialize(functions,bin_low_edges); + wiggle_test.set_calosample(2); + wiggle_test.setLevel(MSG::DEBUG); + wiggle_test.Print(); + +#if defined(__FastCaloSimStandAlone__) + CaloGeometryFromFile* geo = new CaloGeometryFromFile(); + +// * load geometry files + geo->LoadGeometryFromFile("/afs/cern.ch/atlas/groups/Simulation/FastCaloSimV2/Geometry-ATLAS-R2-2016-01-00-01.root", "ATLAS-R2-2016-01-00-01"); + TString path_to_fcal_geo_files = "/afs/cern.ch/atlas/groups/Simulation/FastCaloSimV2/"; + geo->LoadFCalGeometryFromFiles(path_to_fcal_geo_files + "FCal1-electrodes.sorted.HV.09Nov2007.dat", path_to_fcal_geo_files + "FCal2-electrodes.sorted.HV.April2011.dat", path_to_fcal_geo_files + "FCal3-electrodes.sorted.HV.09Nov2007.dat"); + + wiggle_test.set_geometry(geo); + for(float eta=-maxeta+0.01;eta<maxeta;eta+=maxeta/nbin) { + Hit hit; + hit.eta()=eta; + hit.phi()=0; + hit.E()=1; + wiggle_test.simulate_hit(hit,*simulstate,truth,extrapol); + } +#endif + +} + -- GitLab From 90d7e0a6edd489c762f6690d60568c9e2491514c Mon Sep 17 00:00:00 2001 From: Andrea Coccaro <andrea.coccaro@cern.ch> Date: Wed, 27 Jun 2018 06:53:23 +0000 Subject: [PATCH 267/562] Merge branch 'FixEtaPhiWindow' into '21.1' Fixing EtaPhiWindow algorithm with proper treatment of phi See merge request atlas/athena!12340 (cherry picked from commit c000f247b9a003e31897e73b815e2ff56d946e39 [formerly 536cf7d230733b9194dcd6f390cacf3bb8f07a54]) 56ca2e81 Fixing EtaPhiWindow algorithm with proper treatment of phi Former-commit-id: 95ae48db866235a51f8c923b6f1c3a4dd68e3b07 --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../TrigT1/L1Topo/L1TopoAlgorithms/Root/EtaPhiWindow.cxx | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/EtaPhiWindow.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/EtaPhiWindow.cxx index 81aa63cbffd7..61742c067ee3 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/EtaPhiWindow.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/EtaPhiWindow.cxx @@ -80,8 +80,8 @@ TCS::EtaPhiWindow::processBitCorrect(const std::vector<TCS::TOBArray const *> &i if( parType_t((*tob1)->Et()) <= p_MinET ) continue; if( (int)parType_t((*tob1)->eta()) < (int)p_EtaMin ) continue; if( (int)parType_t((*tob1)->eta()) >= (int)p_EtaMax ) continue; - if( parType_t(abs((*tob1)->phi())) < p_PhiMin ) continue; - if( parType_t(abs((*tob1)->phi())) >= p_PhiMax ) continue; + if( (int)parType_t((*tob1)->phi()) < (int)p_PhiMin ) continue; + if( (int)parType_t((*tob1)->phi()) >= (int)p_PhiMax ) continue; accept = true; output[0]->push_back(TCS::CompositeTOB(*tob1)); @@ -114,8 +114,8 @@ TCS::EtaPhiWindow::process(const std::vector<TCS::TOBArray const *> &input, if( parType_t((*tob1)->Et()) <= p_MinET ) continue; if( (int)parType_t((*tob1)->eta()) < (int)p_EtaMin ) continue; if( (int)parType_t((*tob1)->eta()) >= (int)p_EtaMax ) continue; - if( parType_t(abs((*tob1)->phi())) < p_PhiMin ) continue; - if( parType_t(abs((*tob1)->phi())) >= p_PhiMax ) continue; + if( (int)parType_t((*tob1)->phi()) < (int)p_PhiMin ) continue; + if( (int)parType_t((*tob1)->phi()) >= (int)p_PhiMax ) continue; accept = true; output[0]->push_back(TCS::CompositeTOB(*tob1)); TRG_MSG_DEBUG("TOB "<<iTob -- GitLab From 8968abb1d03dc0a0ed03f17d36575ff9baa0d0ad Mon Sep 17 00:00:00 2001 From: Emmanuel Le Guirriec <emmanuel.le.guirriec@cern.ch> Date: Thu, 28 Jun 2018 11:27:21 +0200 Subject: [PATCH 268/562] use ATH_CHECK when doable Former-commit-id: 13b772394913dbef3a52019db049ac0c959f848d --- .../JetTagCalibration/src/CalibrationBroker.cxx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/PhysicsAnalysis/JetTagging/JetTagCalibration/src/CalibrationBroker.cxx b/PhysicsAnalysis/JetTagging/JetTagCalibration/src/CalibrationBroker.cxx index fca43d48f948..8190d2c61991 100755 --- a/PhysicsAnalysis/JetTagging/JetTagCalibration/src/CalibrationBroker.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagCalibration/src/CalibrationBroker.cxx @@ -98,17 +98,13 @@ namespace Analysis { std::vector<std::string> hvect; m_taggersHists.push_back(hvect); } + // get PoolSvc - if (StatusCode::SUCCESS!=service("PoolSvc",m_poolsvc)) { - ATH_MSG_FATAL("Cannot get PoolSvc"); - return StatusCode::FAILURE; - } + ATH_CHECK(service("PoolSvc",m_poolsvc)); + // Register call back function: - if(StatusCode::SUCCESS!=this->registerCallBack()) { - ATH_MSG_FATAL("#BTAG# Could not register call back"); - return StatusCode::FAILURE; - } - // + ATH_CHECK(this->registerCallBack()); + return StatusCode::SUCCESS; } -- GitLab From 1febf3a36352eecf28a17b3b3a90dba8645be96b Mon Sep 17 00:00:00 2001 From: John Chapman <jchapman@cern.ch> Date: Wed, 20 Jun 2018 13:07:00 +0200 Subject: [PATCH 269/562] Fix for non-standard StoreGateSvc names in VarHandleKey.cxx While debugging ATLASSIM-3760 it was noticed that when `VarHandleKeys` were used with non-standard `StoreGateSvc` names, then the resulting `VarHandles` pointed at the defeult `StoreGateSvc_Impl` instance rather than the instance indicated in the `VarHandleKey`. The change in this commit resolves this issue, but in the longer term a different solution may be adopted. Former-commit-id: a90592d1ef08ab272f57c744d2117e1c3b3dc8df --- Control/StoreGate/src/VarHandleKey.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Control/StoreGate/src/VarHandleKey.cxx b/Control/StoreGate/src/VarHandleKey.cxx index 18e8a6564ef2..9f7d12c32e59 100644 --- a/Control/StoreGate/src/VarHandleKey.cxx +++ b/Control/StoreGate/src/VarHandleKey.cxx @@ -50,8 +50,8 @@ VarHandleKey::VarHandleKey (CLID clid, m_storeHandle (storeName, "VarHandleKey") { parseKey (sgkey, storeName); - m_isEventStore = (storeName == StoreID::storeName(StoreID::EVENT_STORE) || - storeName == StoreID::storeName(StoreID::PILEUP_STORE)); + m_isEventStore = (m_storeHandle.name() == StoreID::storeName(StoreID::EVENT_STORE) || + m_storeHandle.name() == StoreID::storeName(StoreID::PILEUP_STORE)); } -- GitLab From a172b8b591bea91fdf322d659eaf64dfe69a65d4 Mon Sep 17 00:00:00 2001 From: John Chapman <jchapman@cern.ch> Date: Thu, 28 Jun 2018 12:33:22 +0200 Subject: [PATCH 270/562] Update comment to mention the correct separator character For some time the character used to separate store names and keys in VarHandleKey definitions has been `+` rather than `:`. Former-commit-id: bf0ddd58111c1996b4d4b876318d70b793aad90c --- Control/StoreGate/src/VarHandleKey.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Control/StoreGate/src/VarHandleKey.cxx b/Control/StoreGate/src/VarHandleKey.cxx index 9f7d12c32e59..90ffa7f1b12c 100644 --- a/Control/StoreGate/src/VarHandleKey.cxx +++ b/Control/StoreGate/src/VarHandleKey.cxx @@ -204,7 +204,7 @@ void VarHandleKey::parseKey (const std::string& key, return; } - // StoreName separator is ":" + // StoreName separator is "+" sp = key.find(storeSeparator); if(sp == std::string::npos) { m_sgKey = key; -- GitLab From 290b2b4e2778428cd5d9f36d1e827bbfba5850fe Mon Sep 17 00:00:00 2001 From: charles leggett <leggett@cern.ch> Date: Thu, 28 Jun 2018 04:16:23 -0700 Subject: [PATCH 271/562] remove IEventDumperSvc interface, as the actual service is long gone Former-commit-id: b7f162294b10f2daa3f9f6f3ba423e14e37109e4 --- .../AthenaKernel/IEventDumperSvc.h | 41 ------------------- 1 file changed, 41 deletions(-) delete mode 100644 Control/AthenaKernel/AthenaKernel/IEventDumperSvc.h diff --git a/Control/AthenaKernel/AthenaKernel/IEventDumperSvc.h b/Control/AthenaKernel/AthenaKernel/IEventDumperSvc.h deleted file mode 100644 index 1081b6542af8..000000000000 --- a/Control/AthenaKernel/AthenaKernel/IEventDumperSvc.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef ATHENAKERNEL_IEVENTDUMPERSVC_H -#define ATHENAKERNEL_IEVENTDUMPERSVC_H 1 - -/////////////////////////////////////////////////////////////////////////// -// -// IEventDumperSvc.h -// -// -// -// author: -// -/////////////////////////////////////////////////////////////////////////// - - -#include "GaudiKernel/IService.h" - - -/** @class IEventDumperSvc - * @brief Abstract interface for EventDumperSvc. Just a placeholder for now - * @author Charles Leggett - */ - -class IEventDumperSvc : virtual public IService -{ - - public: - - static const InterfaceID& interfaceID(); - -}; - -inline const InterfaceID& IEventDumperSvc::interfaceID() { - static const InterfaceID m_IID("IEventDumperSvc", 1, 0); - return m_IID; -} - -#endif -- GitLab From 63f28b2e80f81e464b3e1ee263314fa7fb02d754 Mon Sep 17 00:00:00 2001 From: Peter Hansen <hansenph@lxplus057.cern.ch> Date: Thu, 28 Jun 2018 15:25:58 +0200 Subject: [PATCH 272/562] added migration of /TRT/DCS/ folder handling Former-commit-id: bd4d73772fd5bcd92ec62768b87f0ae8cc39dbbe --- .../share/CollisionCalibTemplate.py | 8 + .../TRT_CalibAlgs/share/CollisionTemplate.py | 7 + .../share/CosmicCalibTemplate.py | 8 + .../TRT_CalibAlgs/share/CosmicTemplate.py | 7 + .../TRT_CalibAlgs/share/ESDCalibTemplate.py | 7 + .../TRT_CalibAlgs/share/ESDTemplate.py | 8 + .../TRT_CalibAlgs/share/RAWCalibTemplate.py | 9 + .../TRT_CalibAlgs/share/RAWHITemplate.py | 7 + .../TRT_CalibAlgs/share/RAWTemplate.py | 8 + .../ITRT_DCS_ConditionsSvc.h | 8 +- .../src/TRT_DCS_ConditionsSvc.cxx | 293 +++++++++++------- .../src/TRT_DCS_ConditionsSvc.h | 42 ++- .../share/InDetRecConditionsAccess.py | 7 - .../python/InDetTrigConfigConditions.py | 10 +- .../TRT_Monitoring/TRT_Monitoring_Tool.h | 4 +- .../src/TRT_Monitoring_Tool.cxx | 12 - 16 files changed, 295 insertions(+), 150 deletions(-) diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CollisionCalibTemplate.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CollisionCalibTemplate.py index fa869c0baab7..844c24b7e986 100644 --- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CollisionCalibTemplate.py +++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CollisionCalibTemplate.py @@ -361,6 +361,14 @@ print CosmicsTRTCalibMgr from TRT_ConditionsAlgs.TRT_ConditionsAlgsConf import TRTCondWrite TRTCondWrite = TRTCondWrite( name = "TRTCondWrite") topSequence+=TRTCondWrite + +# DCS Data Folders +if (globalflags.InputFormat() == 'bytestream' and globalflags.DataSource() == 'data'): + if InDetFlags.useTrtDCS(): + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/BARREL <cache>600</cache>",classname='CondAttrListCollection') + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/ENDCAPA <cache>600</cache>",classname='CondAttrListCollection') + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/ENDCAPC <cache>600</cache>",classname='CondAttrListCollection') + #############################################conddb.addFolderWithTag('TRT_OFL','/TRT/Calib/errors','TrtCalibErrors-ErrorVal-00-00') """ diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CollisionTemplate.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CollisionTemplate.py index e8687aaa9007..b2b288eeae33 100644 --- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CollisionTemplate.py +++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CollisionTemplate.py @@ -387,6 +387,13 @@ TRTCalibDBSvc.StreamTool=TRTCondStream from IOVDbSvc.CondDB import conddb conddb.addFolder(\"PIXEL_OFL\",\"/PIXEL/PixelClustering/PixelClusNNCalib\") +# DCS Data Folders +if (globalflags.InputFormat() == 'bytestream' and globalflags.DataSource() == 'data'): + if InDetFlags.useTrtDCS(): + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/BARREL <cache>600</cache>",classname='CondAttrListCollection') + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/ENDCAPA <cache>600</cache>",classname='CondAttrListCollection') + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/ENDCAPC <cache>600</cache>",classname='CondAttrListCollection') + """ diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CosmicCalibTemplate.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CosmicCalibTemplate.py index 4035684fcbe3..196e0e83e62d 100644 --- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CosmicCalibTemplate.py +++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CosmicCalibTemplate.py @@ -336,6 +336,14 @@ conddb.blockFolder("/TRT/Calib/RT" ) conddb.blockFolder("/TRT/Calib/T0" ) #InDetTRT_DriftFunctionTool.UniversalError=0.17 #InDetTRT_DriftFunctionTool.ForceUniversalErrors=True + +# DCS Data Folders +if (globalflags.InputFormat() == 'bytestream' and globalflags.DataSource() == 'data'): + if InDetFlags.useTrtDCS(): + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/BARREL <cache>600</cache>",classname='CondAttrListCollection') + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/ENDCAPA <cache>600</cache>",classname='CondAttrListCollection') + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/ENDCAPC <cache>600</cache>",classname='CondAttrListCollection') + """ if not calibconstants=="": diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CosmicTemplate.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CosmicTemplate.py index edfb1947d922..69ff13099ff8 100644 --- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CosmicTemplate.py +++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CosmicTemplate.py @@ -301,6 +301,13 @@ from TRT_ConditionsAlgs.TRT_ConditionsAlgsConf import TRTCondWrite TRTCondWrite = TRTCondWrite( name = "TRTCondWrite") topSequence+=TRTCondWrite +# DCS Data Folders +if (globalflags.InputFormat() == 'bytestream' and globalflags.DataSource() == 'data'): + if InDetFlags.useTrtDCS(): + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/BARREL <cache>600</cache>",classname='CondAttrListCollection') + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/ENDCAPA <cache>600</cache>",classname='CondAttrListCollection') + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/ENDCAPC <cache>600</cache>",classname='CondAttrListCollection') + #============================== #==== Straw Status stuff ==== diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/ESDCalibTemplate.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/ESDCalibTemplate.py index dba6aed353bd..ec7a20aea07d 100644 --- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/ESDCalibTemplate.py +++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/ESDCalibTemplate.py @@ -356,6 +356,13 @@ CosmicsTRTCalibMgr = TRTCalibrationMgr(name = 'CosmicsTRTCalibMgr topSequence += CosmicsTRTCalibMgr print CosmicsTRTCalibMgr +# DCS Data Folders +if (globalflags.InputFormat() == 'bytestream' and globalflags.DataSource() == 'data'): + if InDetFlags.useTrtDCS(): + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/BARREL <cache>600</cache>",classname='CondAttrListCollection') + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/ENDCAPA <cache>600</cache>",classname='CondAttrListCollection') + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/ENDCAPC <cache>600</cache>",classname='CondAttrListCollection') + """ if not calibconstants=="": diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/ESDTemplate.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/ESDTemplate.py index e31436751c90..28f3b4e98219 100644 --- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/ESDTemplate.py +++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/ESDTemplate.py @@ -258,6 +258,14 @@ from AthenaServices.AthenaServicesConf import AthenaOutputStreamTool TRTCondStream=AthenaOutputStreamTool(name="CondStream1",OutputFile="trtcalibout.pool.root") ToolSvc += TRTCondStream print TRTCondStream + +# DCS Data Folders +if (globalflags.InputFormat() == 'bytestream' and globalflags.DataSource() == 'data'): + if InDetFlags.useTrtDCS(): + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/BARREL <cache>600</cache>",classname='CondAttrListCollection') + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/ENDCAPA <cache>600</cache>",classname='CondAttrListCollection') + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/ENDCAPC <cache>600</cache>",classname='CondAttrListCollection') + """ if not calibconstants=="": diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/RAWCalibTemplate.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/RAWCalibTemplate.py index 371c28d17808..9538467dee17 100644 --- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/RAWCalibTemplate.py +++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/RAWCalibTemplate.py @@ -158,6 +158,15 @@ print CosmicsTRTCalibMgr from TRT_ConditionsAlgs.TRT_ConditionsAlgsConf import TRTCondWrite TRTCondWrite = TRTCondWrite( name = "TRTCondWrite") topSequence+=TRTCondWrite + +# DCS Data Folders +if (globalflags.InputFormat() == 'bytestream' and globalflags.DataSource() == 'data'): + if InDetFlags.useTrtDCS(): + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/BARREL <cache>600</cache>",classname='CondAttrListCollection') + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/ENDCAPA <cache>600</cache>",classname='CondAttrListCollection') + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/ENDCAPC <cache>600</cache>",classname='CondAttrListCollection') + + #############################################conddb.addFolderWithTag('TRT_OFL','/TRT/Calib/errors','TrtCalibErrors-ErrorVal-00-00') """ if config["DoArXe"]: diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/RAWHITemplate.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/RAWHITemplate.py index b84db4fe807a..24f9e7dfcb46 100644 --- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/RAWHITemplate.py +++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/RAWHITemplate.py @@ -427,6 +427,13 @@ topSequence.InDetPixelClusterization.TRTEffiCut=0.5 #conddb.addOverride('/Indet/TrkErrorScaling','TrkErrorScaling_7T_2010_02') #conddb.addFolderWithTag('TRT_OFL','/TRT/Calib/errors','TrtCalibErrors-ErrorVal-00-00') +# DCS Data Folders +if (globalflags.InputFormat() == 'bytestream' and globalflags.DataSource() == 'data'): + if InDetFlags.useTrtDCS(): + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/BARREL <cache>600</cache>",classname='CondAttrListCollection') + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/ENDCAPA <cache>600</cache>",classname='CondAttrListCollection') + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/ENDCAPC <cache>600</cache>",classname='CondAttrListCollection') + """ if not calibconstants=="": diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/RAWTemplate.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/RAWTemplate.py index dc9f73995359..01c3991036ee 100644 --- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/RAWTemplate.py +++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/RAWTemplate.py @@ -141,6 +141,14 @@ print TRT_StrawStatus #conddb.addOverride('/Indet/TrkErrorScaling','TrkErrorScaling_7T_2010_02') #conddb.addFolderWithTag('TRT_OFL','/TRT/Calib/errors','TrtCalibErrors-ErrorVal-00-00') + +# DCS Data Folders +if (globalflags.InputFormat() == 'bytestream' and globalflags.DataSource() == 'data'): + if InDetFlags.useTrtDCS(): + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/BARREL <cache>600</cache>",classname='CondAttrListCollection') + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/ENDCAPA <cache>600</cache>",classname='CondAttrListCollection') + conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/ENDCAPC <cache>600</cache>",classname='CondAttrListCollection') + """ if config["DoArXe"]: ostring+=""" diff --git a/InnerDetector/InDetConditions/TRT_ConditionsServices/TRT_ConditionsServices/ITRT_DCS_ConditionsSvc.h b/InnerDetector/InDetConditions/TRT_ConditionsServices/TRT_ConditionsServices/ITRT_DCS_ConditionsSvc.h index f087533b1760..3899ff7ab368 100644 --- a/InnerDetector/InDetConditions/TRT_ConditionsServices/TRT_ConditionsServices/ITRT_DCS_ConditionsSvc.h +++ b/InnerDetector/InDetConditions/TRT_ConditionsServices/TRT_ConditionsServices/ITRT_DCS_ConditionsSvc.h @@ -11,7 +11,7 @@ **/ #include "GaudiKernel/IService.h" - +#include "AthenaPoolUtilities/CondAttrListCollection.h" class Identifier; #ifndef TRT_DCS_FLAGS @@ -65,6 +65,12 @@ class ITRT_DCS_ConditionsSvc : virtual public IService { virtual StatusCode getValue( const std::string, const int, InDet::TRT_DCS_ValueType& ) = 0; + virtual const CondAttrListCollection* getCollection( const std::string) =0; + + virtual void monitorBarrel() = 0; + virtual void monitorEndcapA() = 0; + virtual void monitorEndcapC() = 0; + /// Interface ID static const InterfaceID& interfaceID(); diff --git a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_DCS_ConditionsSvc.cxx b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_DCS_ConditionsSvc.cxx index aaa654dce9ed..e1927964e94e 100755 --- a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_DCS_ConditionsSvc.cxx +++ b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_DCS_ConditionsSvc.cxx @@ -11,9 +11,10 @@ #include "StoreGate/StoreGateSvc.h" #include "GaudiKernel/IIncidentSvc.h" #include "xAODEventInfo/EventInfo.h" -#include "AthenaPoolUtilities/CondAttrListCollection.h" + #include "InDetIdentifier/TRT_ID.h" #include "StoreGate/ReadHandle.h" +#include "StoreGate/ReadCondHandle.h" #include "TH1D.h" #include "TFile.h" @@ -29,9 +30,10 @@ TRT_DCS_ConditionsSvc::TRT_DCS_ConditionsSvc( const std::string& name, m_evtStore("StoreGateSvc",name), m_detStore("DetectorStore",name), m_mapSvc("TRT_HWMappingSvc",name), - m_Barrel_HV_COOLCont(0), - m_EndcapA_HV_COOLCont(0), - m_EndcapC_HV_COOLCont(0), + m_condSvc("CondSvc",name), + m_barrelReadKey("/TRT/DCS/HV/BARREL"), + m_EAReadKey("/TRT/DCS/HV/ENDCAPA"), + m_ECReadKey("/TRT/DCS/HV/ENDCAPC"), m_TRT_ID_Helper(0), m_numFlagRED(0), m_numFlagNOINFO(0), @@ -46,13 +48,15 @@ TRT_DCS_ConditionsSvc::TRT_DCS_ConditionsSvc( const std::string& name, m_h_Barrel_HVvalAvg(0), m_h_EndcapA_HVvalAvg(0), m_h_EndcapC_HVvalAvg(0), - m_nEvts(0) + m_nBAEvts(0), + m_nEAEvts(0), + m_nECEvts(0) { // Get properties from job options - declareProperty( "VeryVerbose", m_VeryVerbose = false ); declareProperty( "Barrel_HV_COOLFolderName", m_Barrel_HV_COOLFolderName = "/TRT/DCS/HV/BARREL" ); declareProperty( "EndcapA_HV_COOLFolderName", m_EndcapA_HV_COOLFolderName = "/TRT/DCS/HV/ENDCAPA" ); declareProperty( "EndcapC_HV_COOLFolderName", m_EndcapC_HV_COOLFolderName = "/TRT/DCS/HV/ENDCAPC" ); + declareProperty( "VeryVerbose", m_VeryVerbose = false ); declareProperty( "HV_WarningValueLow", m_HVWarnValHi = 2000. ); declareProperty( "HV_WarningValueHigh", m_HVWarnValLo = 1000. ); declareProperty( "HWMapSvc", m_mapSvc ); @@ -66,6 +70,13 @@ TRT_DCS_ConditionsSvc::TRT_DCS_ConditionsSvc( const std::string& name, ATH_MSG_WARNING( "DoIOVChecking is deprecated and does nothing. Please remove from your job options configuration." ); m_doIOVchecking = false; } + // initialize caches + m_evtBA.push_back(-1); + m_evtEA.push_back(-1); + m_evtEC.push_back(-1); + m_Barrel_HV_COOLCont.push_back(nullptr); + m_EndcapA_HV_COOLCont.push_back(nullptr); + m_EndcapC_HV_COOLCont.push_back(nullptr); } ////////// @@ -91,7 +102,10 @@ StatusCode TRT_DCS_ConditionsSvc::initialize() { } // initialize DataHandle keys - ATH_CHECK(m_EventInfoKey.initialize()); + ATH_CHECK( m_EventInfoKey.initialize()); + ATH_CHECK( m_barrelReadKey.initialize() ); + ATH_CHECK( m_EAReadKey.initialize() ); + ATH_CHECK( m_ECReadKey.initialize() ); // Get the TRT Identifier Helper. sc = m_detStore->retrieve( m_TRT_ID_Helper, "TRT_ID" ); @@ -107,15 +121,6 @@ StatusCode TRT_DCS_ConditionsSvc::initialize() { return sc; } - // Register a callback for "BeginEvent" - IIncidentSvc* incSvc; - sc = service( "IncidentSvc", incSvc ); - if ( sc.isFailure() ) { - ATH_MSG_ERROR( "Couldn't get the IncidentSvc." ); - return sc; - } - incSvc->addListener( this, std::string("BeginEvent") ); - return sc; } @@ -225,11 +230,8 @@ StatusCode TRT_DCS_ConditionsSvc::getValue( const std::string foldername, // chanName = "HVB_S24_M3_B3_OutputVoltage" */ - // Get the folder from the DetectorStore. - const CondAttrListCollection* DCScondFolder = 0; - if ( foldername == m_Barrel_HV_COOLFolderName ) DCScondFolder = m_Barrel_HV_COOLCont; - if ( foldername == m_EndcapA_HV_COOLFolderName ) DCScondFolder = m_EndcapA_HV_COOLCont; - if ( foldername == m_EndcapC_HV_COOLFolderName ) DCScondFolder = m_EndcapC_HV_COOLCont; + // Get the folder from the CondStore. + const CondAttrListCollection* DCScondFolder = getCollection(foldername); if ( !DCScondFolder ) { sc = m_detStore->retrieve( DCScondFolder, foldername ); if ( sc.isFailure() ) { @@ -284,11 +286,8 @@ StatusCode TRT_DCS_ConditionsSvc::getValue( const std::string foldername, // chanNum = e.g. result from HV map query */ - // Get the folder from the DetectorStore. - const CondAttrListCollection* DCScondFolder = 0; - if ( foldername == m_Barrel_HV_COOLFolderName ) DCScondFolder = m_Barrel_HV_COOLCont; - if ( foldername == m_EndcapA_HV_COOLFolderName ) DCScondFolder = m_EndcapA_HV_COOLCont; - if ( foldername == m_EndcapC_HV_COOLFolderName ) DCScondFolder = m_EndcapC_HV_COOLCont; + // Get the folder from the CondStore. + const CondAttrListCollection* DCScondFolder = getCollection(foldername); if ( !DCScondFolder ) { StatusCode sc = m_detStore->retrieve( DCScondFolder, foldername ); if ( sc.isFailure() ) { @@ -348,9 +347,9 @@ StatusCode TRT_DCS_ConditionsSvc::finalize() { ATH_MSG_INFO( "Reported RED " << m_numFlagRED << " times." ); ATH_MSG_INFO( "If these are suspicious numbers, turn on VERBOSE output and set VeryVerbose=True to see more info." ); if ( m_doMonitoring ) { - m_h_Barrel_HVvalAvg->Scale(1./double(m_nEvts)); - m_h_EndcapA_HVvalAvg->Scale(1./double(m_nEvts)); - m_h_EndcapC_HVvalAvg->Scale(1./double(m_nEvts)); + m_h_Barrel_HVvalAvg->Scale(1./double(m_nBAEvts)); + m_h_EndcapA_HVvalAvg->Scale(1./double(m_nEAEvts)); + m_h_EndcapC_HVvalAvg->Scale(1./double(m_nECEvts)); TFile* outFile = new TFile("TRT_DCS_Monitoring.root","RECREATE"); bool file = outFile->cd(); if (file){ @@ -370,35 +369,64 @@ StatusCode TRT_DCS_ConditionsSvc::finalize() { } ////////// -/// IncidentSvc incident handler -///// -void TRT_DCS_ConditionsSvc::handle( const Incident& inc ) { - StatusCode sc(StatusCode::SUCCESS); - - // BeginEvent handler - if ( inc.type() == "BeginEvent" ) { - // Get the COOL DCS conditions attribute list pointers from the detector store - m_Barrel_HV_COOLCont = 0; - m_EndcapA_HV_COOLCont = 0; - m_EndcapC_HV_COOLCont = 0; - sc = m_detStore->retrieve( m_Barrel_HV_COOLCont, m_Barrel_HV_COOLFolderName ); - if ( sc.isFailure() ) { - ATH_MSG_WARNING( "Couldn't retrieve folder " << m_Barrel_HV_COOLFolderName - << " from DetectorStore. Has it been loaded into IOVDbSvc?" ); - return; +/// get pointer +////////// +const CondAttrListCollection* TRT_DCS_ConditionsSvc::getCollection( const std::string foldername) { + const EventContext& event_context=Gaudi::Hive::currentContext(); + EventContext::ContextID_t slot=event_context.slot(); + EventContext::ContextEvt_t event_id=event_context.evt(); + std::lock_guard<std::mutex> lock(m_cacheMutex); + if(foldername == m_Barrel_HV_COOLFolderName ) { + if(slot>=m_evtBA.size()) { + m_evtBA.resize(slot+1); + m_Barrel_HV_COOLCont.resize(slot+1); + } + if(m_evtBA[slot]!=event_id) { + SG::ReadCondHandle<CondAttrListCollection> rst(m_barrelReadKey,event_context); + m_evtBA[slot]=event_id; + m_Barrel_HV_COOLCont[slot]=(*rst); + monitorBarrel(); } - sc = m_detStore->retrieve( m_EndcapA_HV_COOLCont, m_EndcapA_HV_COOLFolderName ); - if ( sc.isFailure() ) { - ATH_MSG_WARNING( "Couldn't retrieve folder " << m_EndcapA_HV_COOLFolderName - << " from DetectorStore. Has it been loaded into IOVDbSvc?" ); - return; + return m_Barrel_HV_COOLCont[slot]; + + } else if(foldername == m_EndcapA_HV_COOLFolderName ) { + if(slot>=m_evtEA.size()) { + m_evtEA.resize(slot+1); + m_EndcapA_HV_COOLCont.resize(slot+1); + } + if(m_evtEA[slot]!=event_id) { + SG::ReadCondHandle<CondAttrListCollection> rst(m_EAReadKey,event_context); + m_evtEA[slot]=event_id; + m_EndcapA_HV_COOLCont[slot]=(*rst); + monitorEndcapA(); } - sc = m_detStore->retrieve( m_EndcapC_HV_COOLCont, m_EndcapC_HV_COOLFolderName ); - if ( sc.isFailure() ) { - ATH_MSG_WARNING( "Couldn't retrieve folder " << m_EndcapC_HV_COOLFolderName - << " from DetectorStore. Has it been loaded into IOVDbSvc?" ); - return; + return m_EndcapA_HV_COOLCont[slot]; + + } else if (foldername == m_EndcapC_HV_COOLFolderName ) { + if(slot>=m_evtEC.size()) { + m_evtEC.resize(slot+1); + m_EndcapC_HV_COOLCont.resize(slot+1); + } + if(m_evtEC[slot]!=event_id) { + SG::ReadCondHandle<CondAttrListCollection> rst(m_ECReadKey,event_context); + m_evtEC[slot]=event_id; + m_EndcapC_HV_COOLCont[slot]=(*rst); + monitorEndcapC(); } + return m_EndcapC_HV_COOLCont[slot]; + + } else { + ATH_MSG_WARNING( " TRT DCS HV folder requested with bad folder name " ); + } + return nullptr; +} + + +/// Monitor barrel HV +///// +void TRT_DCS_ConditionsSvc::monitorBarrel(){ + + StatusCode sc(StatusCode::SUCCESS); // Get the current event timestamp m_currentTimestamp = 0; @@ -416,15 +444,16 @@ void TRT_DCS_ConditionsSvc::handle( const Incident& inc ) { // Monitoring Histograms if ( m_doMonitoring ) { CondAttrListCollection::name_const_iterator chanNameMapItr; - m_nEvts++; - + m_nBAEvts++; + + const CondAttrListCollection* clc = getCollection(m_Barrel_HV_COOLFolderName); // Set up Monitoring Histograms if not done (first event) if (!m_h_Barrel_HVvalAvg) { - m_h_Barrel_nRED = new TH1D("Barrel_nRED","Barrel - nRED",m_Barrel_HV_COOLCont->name_size(),1,m_Barrel_HV_COOLCont->name_size()); - m_h_Barrel_nNOINFO = new TH1D("Barrel_nNOINFO","Barrel - nNOINFO",m_Barrel_HV_COOLCont->name_size(),1,m_Barrel_HV_COOLCont->name_size()); - m_h_Barrel_HVvalAvg = new TH1D("Barrel_HVvalAvg","Barrel - HVvalAvg",m_Barrel_HV_COOLCont->name_size(),1,m_Barrel_HV_COOLCont->name_size()); - for ( chanNameMapItr = m_Barrel_HV_COOLCont->name_begin(); - chanNameMapItr != m_Barrel_HV_COOLCont->name_end(); ++chanNameMapItr ) { + m_h_Barrel_nRED = new TH1D("Barrel_nRED","Barrel - nRED",clc->name_size(),1,clc->name_size()); + m_h_Barrel_nNOINFO = new TH1D("Barrel_nNOINFO","Barrel - nNOINFO",clc->name_size(),1,clc->name_size()); + m_h_Barrel_HVvalAvg = new TH1D("Barrel_HVvalAvg","Barrel - HVvalAvg",clc->name_size(),1,clc->name_size()); + for ( chanNameMapItr = clc->name_begin(); + chanNameMapItr != clc->name_end(); ++chanNameMapItr ) { std::string chanName( (*chanNameMapItr).second ); int chanNum( (*chanNameMapItr).first ); m_h_Barrel_nRED->GetXaxis()->SetBinLabel(chanNum,chanName.c_str()); @@ -432,40 +461,12 @@ void TRT_DCS_ConditionsSvc::handle( const Incident& inc ) { m_h_Barrel_HVvalAvg->GetXaxis()->SetBinLabel(chanNum,chanName.c_str()); } } - - if (!m_h_EndcapA_HVvalAvg) { - m_h_EndcapA_nRED = new TH1D("EndcapA_nRED","EndcapA - nRED",m_EndcapA_HV_COOLCont->name_size(),1,m_EndcapA_HV_COOLCont->name_size()); - m_h_EndcapA_nNOINFO = new TH1D("EndcapA_nNOINFO","EndcapA - nNOINFO",m_EndcapA_HV_COOLCont->name_size(),1,m_EndcapA_HV_COOLCont->name_size()); - m_h_EndcapA_HVvalAvg = new TH1D("EndcapA_HVvalAvg","EndcapA - HVvalAvg",m_EndcapA_HV_COOLCont->name_size(),1,m_EndcapA_HV_COOLCont->name_size()); - for ( chanNameMapItr = m_EndcapA_HV_COOLCont->name_begin(); - chanNameMapItr != m_EndcapA_HV_COOLCont->name_end(); ++chanNameMapItr ) { - std::string chanName( (*chanNameMapItr).second ); - int chanNum( (*chanNameMapItr).first ); - m_h_EndcapA_nRED->GetXaxis()->SetBinLabel(chanNum,chanName.c_str()); - m_h_EndcapA_nNOINFO->GetXaxis()->SetBinLabel(chanNum,chanName.c_str()); - m_h_EndcapA_HVvalAvg->GetXaxis()->SetBinLabel(chanNum,chanName.c_str()); - } - } - - if (!m_h_EndcapC_HVvalAvg) { - m_h_EndcapC_nRED = new TH1D("EndcapC_nRED","EndcapC - nRED",m_EndcapC_HV_COOLCont->name_size(),1,m_EndcapC_HV_COOLCont->name_size()); - m_h_EndcapC_nNOINFO = new TH1D("EndcapC_nNOINFO","EndcapC - nNOINFO",m_EndcapC_HV_COOLCont->name_size(),1,m_EndcapC_HV_COOLCont->name_size()); - m_h_EndcapC_HVvalAvg = new TH1D("EndcapC_HVvalAvg","EndcapC - HVvalAvg",m_EndcapC_HV_COOLCont->name_size(),1,m_EndcapC_HV_COOLCont->name_size()); - for ( chanNameMapItr = m_EndcapC_HV_COOLCont->name_begin(); - chanNameMapItr != m_EndcapC_HV_COOLCont->name_end(); ++chanNameMapItr ) { - std::string chanName( (*chanNameMapItr).second ); - int chanNum( (*chanNameMapItr).first ); - m_h_EndcapC_nRED->GetXaxis()->SetBinLabel(chanNum,chanName.c_str()); - m_h_EndcapC_nNOINFO->GetXaxis()->SetBinLabel(chanNum,chanName.c_str()); - m_h_EndcapC_HVvalAvg->GetXaxis()->SetBinLabel(chanNum,chanName.c_str()); - } - } + return; // Fill Monitoring Histograms - // Barrel - for ( chanNameMapItr = m_Barrel_HV_COOLCont->name_begin(); - chanNameMapItr != m_Barrel_HV_COOLCont->name_end(); ++chanNameMapItr ) { + for ( chanNameMapItr = clc->name_begin(); + chanNameMapItr != clc->name_end(); ++chanNameMapItr ) { std::string chanName( (*chanNameMapItr).second ); int chanNum( (*chanNameMapItr).first ); InDet::TRT_DCS_StatusFlag theFlag; @@ -478,9 +479,53 @@ void TRT_DCS_ConditionsSvc::handle( const Incident& inc ) { if ( theFlag == InDet::TRT_DCS_NOINFO ) m_h_Barrel_nNOINFO->Fill(chanNum); if (!sc.isFailure()) m_h_Barrel_HVvalAvg->Fill(chanNum,theVoltage); } - // EndcapA - for ( chanNameMapItr = m_EndcapA_HV_COOLCont->name_begin(); - chanNameMapItr != m_EndcapA_HV_COOLCont->name_end(); ++chanNameMapItr ) { + + } // end of doMonitoring + + return; +} +/// Monitor EndcapA HV +///// +void TRT_DCS_ConditionsSvc::monitorEndcapA(){ + + StatusCode sc(StatusCode::SUCCESS); + + // Get the current event timestamp + m_currentTimestamp = 0; + SG::ReadHandle<xAOD::EventInfo> evtInfo(m_EventInfoKey); + + if (not evtInfo.isValid()) { + ATH_MSG_WARNING( "Couldn't get " << m_EventInfoKey.key() + << " from StoreGate." ); + return; + } + + m_currentTimestamp = evtInfo->timeStamp(); + if (m_VeryVerbose) ATH_MSG_VERBOSE( "Event timestamp: " << m_currentTimestamp ); + + // Monitoring Histograms + if ( m_doMonitoring ) { + CondAttrListCollection::name_const_iterator chanNameMapItr; + m_nEAEvts++; + + const CondAttrListCollection* clc = getCollection(m_EndcapA_HV_COOLFolderName); + // Set up Monitoring Histograms if not done (first event) + if (!m_h_EndcapA_HVvalAvg) { + m_h_EndcapA_nRED = new TH1D("EndcapA_nRED","EA - nRED",clc->name_size(),1,clc->name_size()); + m_h_EndcapA_nNOINFO = new TH1D("EndcapA_nNOINFO","EA - nNOINFO",clc->name_size(),1,clc->name_size()); + m_h_EndcapA_HVvalAvg = new TH1D("EndcapA_HVvalAvg","EA - HVvalAvg",clc->name_size(),1,clc->name_size()); + for ( chanNameMapItr = clc->name_begin(); + chanNameMapItr != clc->name_end(); ++chanNameMapItr ) { + std::string chanName( (*chanNameMapItr).second ); + int chanNum( (*chanNameMapItr).first ); + m_h_EndcapA_nRED->GetXaxis()->SetBinLabel(chanNum,chanName.c_str()); + m_h_EndcapA_nNOINFO->GetXaxis()->SetBinLabel(chanNum,chanName.c_str()); + m_h_EndcapA_HVvalAvg->GetXaxis()->SetBinLabel(chanNum,chanName.c_str()); + } + } + + for ( chanNameMapItr = clc->name_begin(); + chanNameMapItr != clc->name_end(); ++chanNameMapItr ) { std::string chanName( (*chanNameMapItr).second ); int chanNum( (*chanNameMapItr).first ); InDet::TRT_DCS_StatusFlag theFlag; @@ -493,9 +538,51 @@ void TRT_DCS_ConditionsSvc::handle( const Incident& inc ) { if ( theFlag == InDet::TRT_DCS_NOINFO ) m_h_EndcapA_nNOINFO->Fill(chanNum); if (!sc.isFailure()) m_h_EndcapA_HVvalAvg->Fill(chanNum,theVoltage); } - // EndcapC - for ( chanNameMapItr = m_EndcapC_HV_COOLCont->name_begin(); - chanNameMapItr != m_EndcapC_HV_COOLCont->name_end(); ++chanNameMapItr ) { + } + return; +} +/// Monitor EndcapC HV +///// +void TRT_DCS_ConditionsSvc::monitorEndcapC(){ + + StatusCode sc(StatusCode::SUCCESS); + + // Get the current event timestamp + m_currentTimestamp = 0; + SG::ReadHandle<xAOD::EventInfo> evtInfo(m_EventInfoKey); + + if (not evtInfo.isValid()) { + ATH_MSG_WARNING( "Couldn't get " << m_EventInfoKey.key() + << " from StoreGate." ); + return; + } + + m_currentTimestamp = evtInfo->timeStamp(); + if (m_VeryVerbose) ATH_MSG_VERBOSE( "Event timestamp: " << m_currentTimestamp ); + + // Monitoring Histograms + if ( m_doMonitoring ) { + CondAttrListCollection::name_const_iterator chanNameMapItr; + m_nECEvts++; + + const CondAttrListCollection* clc = getCollection(m_EndcapC_HV_COOLFolderName); + // Set up Monitoring Histograms if not done (first event) + if (!m_h_EndcapC_HVvalAvg) { + m_h_EndcapC_nRED = new TH1D("EndcapC_nRED","EC - nRED",clc->name_size(),1,clc->name_size()); + m_h_EndcapC_nNOINFO = new TH1D("EndcapC_nNOINFO","EC - nNOINFO",clc->name_size(),1,clc->name_size()); + m_h_EndcapC_HVvalAvg = new TH1D("EndcapC_HVvalAvg","EC - HVvalAvg",clc->name_size(),1,clc->name_size()); + for ( chanNameMapItr = clc->name_begin(); + chanNameMapItr != clc->name_end(); ++chanNameMapItr ) { + std::string chanName( (*chanNameMapItr).second ); + int chanNum( (*chanNameMapItr).first ); + m_h_EndcapC_nRED->GetXaxis()->SetBinLabel(chanNum,chanName.c_str()); + m_h_EndcapC_nNOINFO->GetXaxis()->SetBinLabel(chanNum,chanName.c_str()); + m_h_EndcapC_HVvalAvg->GetXaxis()->SetBinLabel(chanNum,chanName.c_str()); + } + } + + for ( chanNameMapItr = clc->name_begin(); + chanNameMapItr != clc->name_end(); ++chanNameMapItr ) { std::string chanName( (*chanNameMapItr).second ); int chanNum( (*chanNameMapItr).first ); InDet::TRT_DCS_StatusFlag theFlag; @@ -508,10 +595,6 @@ void TRT_DCS_ConditionsSvc::handle( const Incident& inc ) { if ( theFlag == InDet::TRT_DCS_NOINFO ) m_h_EndcapC_nNOINFO->Fill(chanNum); if (!sc.isFailure()) m_h_EndcapC_HVvalAvg->Fill(chanNum,theVoltage); } - - } // end of doMonitoring - - } - - return; + } + return; } diff --git a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_DCS_ConditionsSvc.h b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_DCS_ConditionsSvc.h index 97985ca358d5..3195d4a9b5d1 100755 --- a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_DCS_ConditionsSvc.h +++ b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_DCS_ConditionsSvc.h @@ -10,20 +10,21 @@ * DCS conditions data from COOL * author Denver Whittington <Denver.Whittington@cern.ch> **/ - +#include <vector> +#include "AthenaBaseComps/AthService.h" #include "TRT_ConditionsServices/ITRT_DCS_ConditionsSvc.h" #include "TRT_ConditionsServices/ITRT_ConditionsSvc.h" #include "AthenaBaseComps/AthService.h" #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" -#include "GaudiKernel/IIncidentListener.h" +#include "GaudiKernel/ICondSvc.h" +#include "StoreGate/ReadCondHandleKey.h" +#include "GaudiKernel/ThreadLocalContext.h" #include "TRT_ConditionsServices/ITRT_HWMappingSvc.h" - #include "StoreGate/ReadHandleKey.h" #include "xAODEventInfo/EventInfo.h" class StoreGateSvc; -class CondAttrListCollection; class TRT_ID; class Identifier; class TH1D; @@ -31,8 +32,8 @@ class TH1D; /// Service for accessing DCS conditions information class TRT_DCS_ConditionsSvc : public AthService, virtual public ITRT_ConditionsSvc, - virtual public ITRT_DCS_ConditionsSvc, - virtual public IIncidentListener { + virtual public ITRT_DCS_ConditionsSvc + { public: @@ -63,8 +64,12 @@ class TRT_DCS_ConditionsSvc : public AthService, */ StatusCode getValue( const std::string, const int, InDet::TRT_DCS_ValueType& ); - /// Handle IncidentSvc callbacks - void handle( const Incident& ); + const CondAttrListCollection* getCollection( const std::string); + + void monitorBarrel(); + void monitorEndcapA(); + void monitorEndcapC(); + /// @name Functions inherited from ITRT_ConditionsSvc //@{ @@ -91,14 +96,23 @@ class TRT_DCS_ConditionsSvc : public AthService, ServiceHandle<StoreGateSvc> m_detStore; ServiceHandle<ITRT_HWMappingSvc> m_mapSvc; SG::ReadHandleKey<xAOD::EventInfo> m_EventInfoKey{this,"EventInfoKey","EventInfo","RHK for EventInfo"}; + // Conditions access + ServiceHandle<ICondSvc> m_condSvc; + SG::ReadCondHandleKey<CondAttrListCollection> m_barrelReadKey{this,"BarrelKeyName","in","HV Barrel in-key"}; + SG::ReadCondHandleKey<CondAttrListCollection> m_EAReadKey{this,"EAKeyName","in","HV EA in-key"}; + SG::ReadCondHandleKey<CondAttrListCollection> m_ECReadKey{this,"ECKeyName","in","HV EC in-key"}; + mutable std::vector<const CondAttrListCollection*> m_Barrel_HV_COOLCont; + mutable std::vector<const CondAttrListCollection*> m_EndcapA_HV_COOLCont; + mutable std::vector<const CondAttrListCollection*> m_EndcapC_HV_COOLCont; + mutable std::mutex m_cacheMutex; + mutable std::vector<EventContext::ContextEvt_t> m_evtBA; + mutable std::vector<EventContext::ContextEvt_t> m_evtEA; + mutable std::vector<EventContext::ContextEvt_t> m_evtEC; + int m_IOVmaxLength; bool m_doIOVchecking; bool m_FallBackOnCOOLChanNames; - /// COOL DCS data containers - const CondAttrListCollection* m_Barrel_HV_COOLCont; - const CondAttrListCollection* m_EndcapA_HV_COOLCont; - const CondAttrListCollection* m_EndcapC_HV_COOLCont; // Straw Helpers const TRT_ID* m_TRT_ID_Helper; @@ -124,7 +138,9 @@ class TRT_DCS_ConditionsSvc : public AthService, TH1D* m_h_Barrel_HVvalAvg; // don't forget to divide by nEvts at end! TH1D* m_h_EndcapA_HVvalAvg; // don't forget to divide by nEvts at end! TH1D* m_h_EndcapC_HVvalAvg; // don't forget to divide by nEvts at end! - int m_nEvts; + int m_nBAEvts; + int m_nEAEvts; + int m_nECEvts; }; /// Query Interface diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py index 3cb69cd91345..e358b8b133f4 100644 --- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py @@ -429,13 +429,6 @@ if DetFlags.haveRIO.TRT_on(): if not conddb.folderRequested('/TRT/Cond/StatusHT'): conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/StatusHT","/TRT/Cond/StatusHT",className='TRTCond::StrawStatusMultChanContainer') - # DCS Data Folders - if (globalflags.InputFormat() == 'bytestream' and globalflags.DataSource() == 'data'): - if InDetFlags.useTrtDCS(): - conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/BARREL <cache>600</cache>") - conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/ENDCAPA <cache>600</cache>") - conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/ENDCAPC <cache>600</cache>") - # TRT PID tools if not conddb.folderRequested( "/TRT/Calib/PID" ): conddb.addFolderSplitOnline("TRT","/TRT/Onl/Calib/PID","/TRT/Calib/PID") diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py index 979617ef7738..2466762585d0 100644 --- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py +++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py @@ -578,16 +578,8 @@ class TRTConditionsServicesSetup: conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/StatusHT","/TRT/Cond/StatusHT",className='TRTCond::StrawStatusMultChanContainer') - # DCS Data Folders + from AthenaCommon.GlobalFlags import globalflags - if (globalflags.InputFormat() == 'bytestream' and globalflags.DataSource() == 'data'): - if self.useDCS and not self.onlineMode: - if not conddb.folderRequested('/TRT/DCS/HV/BARREL <cache>600</cache>'): - conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/BARREL <cache>600</cache>") - if not conddb.folderRequested('/TRT/DCS/HV/ENDCAPA <cache>600</cache>'): - conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/ENDCAPA <cache>600</cache>") - if not conddb.folderRequested('/TRT/DCS/HV/ENDCAPC <cache>600</cache>'): - conddb.addFolder('DCS_OFL',"/TRT/DCS/HV/ENDCAPC <cache>600</cache>") # TRT PID tools if not (conddb.folderRequested('/TRT/Calib/PID') or conddb.folderRequested('/TRT/Onl/Calib/PID')): diff --git a/InnerDetector/InDetMonitoring/TRT_Monitoring/TRT_Monitoring/TRT_Monitoring_Tool.h b/InnerDetector/InDetMonitoring/TRT_Monitoring/TRT_Monitoring/TRT_Monitoring_Tool.h index 160d1f685fae..905d285c7524 100644 --- a/InnerDetector/InDetMonitoring/TRT_Monitoring/TRT_Monitoring/TRT_Monitoring_Tool.h +++ b/InnerDetector/InDetMonitoring/TRT_Monitoring/TRT_Monitoring/TRT_Monitoring_Tool.h @@ -55,10 +55,9 @@ class ComTime; class IInDetConditionsSvc; class ITRT_CalDbSvc; class ITRT_StrawStatusSummarySvc; -class ITRT_DCS_ConditionsSvc; +class ITRT_ConditionsSvc; class ITRT_DAQ_ConditionsSvc; class ITRT_ByteStream_ConditionsSvc; -class ITRT_ConditionsSvc; class ITRT_StrawNeighbourSvc; //class ITRT_DriftFunctionTool; @@ -148,7 +147,6 @@ private: // Services ServiceHandle<IToolSvc> p_toolSvc; ServiceHandle<ITRT_StrawStatusSummarySvc> m_sumSvc; - ServiceHandle<ITRT_DCS_ConditionsSvc> m_DCSSvc; ServiceHandle<ITRT_DAQ_ConditionsSvc> m_DAQSvc; ServiceHandle<ITRT_ByteStream_ConditionsSvc> m_BSSvc; ServiceHandle<ITRT_ConditionsSvc> m_condSvc_BS; diff --git a/InnerDetector/InDetMonitoring/TRT_Monitoring/src/TRT_Monitoring_Tool.cxx b/InnerDetector/InDetMonitoring/TRT_Monitoring/src/TRT_Monitoring_Tool.cxx index 8b0d7ea44b30..b54aad987390 100644 --- a/InnerDetector/InDetMonitoring/TRT_Monitoring/src/TRT_Monitoring_Tool.cxx +++ b/InnerDetector/InDetMonitoring/TRT_Monitoring/src/TRT_Monitoring_Tool.cxx @@ -17,7 +17,6 @@ #include "TRT_ConditionsServices/ITRT_CalDbSvc.h" #include "TRT_ConditionsServices/ITRT_ConditionsSvc.h" #include "TRT_ConditionsServices/ITRT_StrawStatusSummarySvc.h" -#include "TRT_ConditionsServices/ITRT_DCS_ConditionsSvc.h" #include "TRT_ConditionsServices/ITRT_DAQ_ConditionsSvc.h" #include "TRT_ConditionsServices/ITRT_ByteStream_ConditionsSvc.h" #include "TRT_ConditionsServices/ITRT_StrawNeighbourSvc.h" @@ -75,7 +74,6 @@ TRT_Monitoring_Tool::TRT_Monitoring_Tool(const std::string &type, const std::str m_idHelper(0), p_toolSvc("IToolSvc", name), m_sumSvc("TRT_StrawStatusSummarySvc", name), - m_DCSSvc("TRT_DCS_ConditionsSvc", name), // NOTE: not used anywhere? m_DAQSvc("TRT_DAQ_ConditionsSvc", name), // NOTE: not used anywhere? m_BSSvc("TRT_ByteStream_ConditionsSvc", name), m_condSvc_BS("TRT_ByteStream_ConditionsSvc", name), // NOTE: not used anywhere? @@ -161,7 +159,6 @@ TRT_Monitoring_Tool::TRT_Monitoring_Tool(const std::string &type, const std::str declareProperty("ToolSvc", p_toolSvc); declareProperty("InDetTRTStrawStatusSummarySvc", m_sumSvc); declareProperty("InDetTRT_DAQ_ConditionsSvc", m_DAQSvc); - declareProperty("InDetTRT_DCS_ConditionsSvc", m_DCSSvc); declareProperty("TRT_ByteStream_ConditionsSvc", m_BSSvc); declareProperty("TRT_StrawNeighbourSvc", m_TRTStrawNeighbourSvc); declareProperty("DriftFunctionTool", m_drifttool); @@ -427,15 +424,6 @@ StatusCode TRT_Monitoring_Tool::initialize() { ATH_CHECK( m_sumSvc.retrieve() ); } - // NOTE: is this used anywhere? - if (m_doDCS) { - // Retrieve the TRT_DCS Conditions Service. - if (m_DCSSvc.name().empty()) { - ATH_MSG_WARNING("TRT_DCSConditionsSvc not given."); - } else { - ATH_CHECK( m_DCSSvc.retrieve() ); - } - }// if do dcs // NOTE: is this used anywhere? // NOTE: This is the same of m_BSSvc -- GitLab From a9a3a7dfd564c42fe945a123408e1f2940815384 Mon Sep 17 00:00:00 2001 From: Shota Hayashida <hayashida@hepl.phys.nagoya-u.ac.jp> Date: Thu, 28 Jun 2018 15:39:18 +0200 Subject: [PATCH 273/562] Updated to ServiceHandle and ToolHandle Former-commit-id: a082c0b810b670568c3be840596adfb80f9f23ca --- .../TrigL2MuonSA/MdtDataPreparator.h | 17 ++--- .../TrigL2MuonSA/src/MdtDataPreparator.cxx | 62 +++++-------------- .../TrigL2MuonSA/src/MuFastDataPreparator.cxx | 2 +- 3 files changed, 27 insertions(+), 54 deletions(-) diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtDataPreparator.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtDataPreparator.h index 46e34ffb35da..0700a8005684 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtDataPreparator.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtDataPreparator.h @@ -10,7 +10,8 @@ #include "MuonCnvToolInterfaces/IMuonRdoToPrepDataTool.h" #include "MuonCnvToolInterfaces/IMuonRawDataProviderTool.h" -#include "ByteStreamCnvSvcBase/ROBDataProviderSvc.h" +//#include "ByteStreamCnvSvcBase/ROBDataProviderSvc.h" +#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h" //added #include "TrigT1Interfaces/RecMuonRoI.h" #include "RegionSelector/IRegSelSvc.h" #include "Identifier/IdentifierHash.h" @@ -123,13 +124,14 @@ namespace TrigL2MuonSA { // Reference to StoreGateSvc; ServiceHandle<StoreGateSvc> m_storeGateSvc; - ActiveStoreSvc* m_activeStore; + 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", "MDTRawDataProviderTool"}; // Cabling - MuonMDT_CablingSvc* m_mdtCabling; + ServiceHandle<MuonMDT_CablingSvc> m_mdtCabling; // Geometry Services const MuonGM::MuonDetectorManager* m_muonMgr; @@ -139,10 +141,10 @@ namespace TrigL2MuonSA { IdentifierHash m_hash_id; // Region Selector - IRegSelSvc* m_regionSelector; + ServiceHandle<IRegSelSvc> m_regionSelector; // ROB DataProvider - ROBDataProviderSvc* m_robDataProvider; + ServiceHandle<IROBDataProviderSvc> m_robDataProvider; // Utils TrigL2MuonSA::RecMuonRoIUtils m_recMuonRoIUtils; @@ -151,7 +153,8 @@ namespace TrigL2MuonSA { ToolHandle<MdtRegionDefiner> m_mdtRegionDefiner; // handles to data access - ToolHandle<Muon::IMuonRdoToPrepDataTool> m_mdtPrepDataProvider; + ToolHandle<Muon::IMuonRdoToPrepDataTool> m_mdtPrepDataProvider { + this, "MdtPrepDataProvider", "Muon::MdtRdoToPrepDataTool/MdtPrepDataProviderTool", "MdtPrepDataProviderTool"}; SG::ReadHandleKey<MdtCsmContainer> m_mdtCsmContainerKey{ this, "MDTCSMContainer", "MDTCSM", "Name of the MDTRDO to read in"}; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx index 8c8e7991e627..e762920969a0 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx @@ -54,19 +54,18 @@ TrigL2MuonSA::MdtDataPreparator::MdtDataPreparator(const std::string& type, const std::string& name, const IInterface* parent): AthAlgTool(type,name,parent), - m_storeGateSvc( "StoreGateSvc", name ), - m_mdtRawDataProvider("Muon::MDT_RawDataProviderTool"), - m_regionSelector(0), m_robDataProvider(0), m_recMuonRoIUtils(), + m_storeGateSvc( "StoreGateSvc", this->name() ), + m_activeStore( "ActiveStoreSvc", this->name() ), + m_mdtCabling("MuonMDT_CablingSvc", this->name()), + m_regionSelector("RegSelSvc", this->name() ), + m_robDataProvider("ROBDataProviderSvc", this->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); } // -------------------------------------------------------------------------------- @@ -100,51 +99,26 @@ StatusCode TrigL2MuonSA::MdtDataPreparator::initialize() std::string serviceName; // Locate RegionSelector - serviceName = "RegionSelector"; - sc = service("RegSelSvc", m_regionSelector); - if(sc.isFailure()) { - ATH_MSG_ERROR("Could not retrieve " << serviceName); - return sc; - } - ATH_MSG_DEBUG("Retrieved service " << serviceName); + ATH_CHECK( m_regionSelector.retrieve()); + ATH_MSG_DEBUG("Retrieved service " << m_regionSelector.name()); // Locate ROBDataProvider - serviceName = "ROBDataProvider"; - IService* svc = 0; - sc = service("ROBDataProviderSvc", svc); - if(sc.isFailure()) { - ATH_MSG_ERROR("Could not retrieve " << serviceName); - return sc; - } - m_robDataProvider = dynamic_cast<ROBDataProviderSvc*> (svc); - if( m_robDataProvider == 0 ) { - ATH_MSG_ERROR("Could not cast to ROBDataProviderSvc "); - return StatusCode::FAILURE; - } - ATH_MSG_DEBUG("Retrieved service " << serviceName); + 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); // initialize the NEW cabling service - sc = service("MuonMDT_CablingSvc",m_mdtCabling); - if (sc != StatusCode::SUCCESS) { - ATH_MSG_ERROR("Could not find the MuonMDT_CablingSvc"); - return sc; - } + ATH_CHECK( m_mdtCabling.retrieve()); ATH_MSG_DEBUG("Retrieved the new cabling service "); // retrieve the mdtidhelper - StoreGateSvc* detStore(0); - sc = serviceLocator()->service("DetectorStore", detStore); - if (sc.isFailure()) { - ATH_MSG_ERROR("Could not retrieve DetectorStore."); - return sc; - } + ServiceHandle<StoreGateSvc> detStore("DetectorStore", name()); + ATH_CHECK( detStore.retrieve() ); ATH_MSG_DEBUG("Retrieved DetectorStore."); - - sc = detStore->retrieve( m_muonMgr,"Muon" ); - if (sc.isFailure()) return sc; + ATH_CHECK( detStore->retrieve(m_muonMgr,"Muon") ); ATH_MSG_DEBUG("Retrieved GeoModel from DetectorStore."); m_mdtIdHelper = m_muonMgr->mdtIdHelper(); @@ -152,11 +126,7 @@ StatusCode TrigL2MuonSA::MdtDataPreparator::initialize() ATH_MSG_DEBUG("Retrieved " << m_mdtPrepDataProvider); // Retrieve ActiveStore - sc = serviceLocator()->service("ActiveStoreSvc", m_activeStore); - if (sc.isFailure() || m_activeStore == 0) { - ATH_MSG_ERROR(" Cannot get ActiveStoreSvc."); - return sc ; - } + ATH_CHECK( m_activeStore.retrieve() ); ATH_MSG_DEBUG("Retrieved ActiveStoreSvc."); m_BMGpresent = m_mdtIdHelper->stationNameIndex("BMG") != -1; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx index adad2eea194e..96e83939f79b 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx @@ -32,7 +32,7 @@ TrigL2MuonSA::MuFastDataPreparator::MuFastDataPreparator(const std::string& type AthAlgTool(type,name,parent), m_recRPCRoiSvc("LVL1RPC::RPCRecRoiSvc",""), m_options(), - m_regionSelector("RegSelSvc", this->name()), + m_regionSelector("RegSelSvc", this->name() ), m_rpcDataPreparator("TrigL2MuonSA::RpcDataPreparator"), m_tgcDataPreparator("TrigL2MuonSA::TgcDataPreparator"), m_mdtDataPreparator("TrigL2MuonSA::MdtDataPreparator"), -- GitLab From d02482ce79f011b15de9f14019671418770e7c42 Mon Sep 17 00:00:00 2001 From: charles leggett <leggett@cern.ch> Date: Thu, 28 Jun 2018 06:44:18 -0700 Subject: [PATCH 274/562] get rid of GAUDI_SYSEXECUTE_WITHCONTEXT macro Former-commit-id: b023897b08a542de33d2969eeecc82a7572c4bc7 --- .../AthAnalysisAlgorithm.h | 4 --- .../src/AthAnalysisAlgorithm.cxx | 13 -------- Control/AthViews/src/RoiCollectionToViews.cxx | 4 --- Control/AthViews/src/ViewTestAlg.cxx | 8 +---- Control/AthViews/src_dflow/DFlowAlg1.cxx | 4 --- Control/AthViews/src_dflow/DFlowAlg2.cxx | 4 --- Control/AthViews/src_dflow/DFlowAlg3.cxx | 4 --- .../AthViews/src_dflow/DigiDemoSetupAlg.cxx | 5 --- Control/AthViews/src_dflow/ViewMergeAlg.cxx | 4 --- .../AthViews/src_dflow/ViewSubgraphAlg.cxx | 4 --- .../AthenaBaseComps/src/FilteredAlgorithm.cxx | 6 ---- .../test/AthenaEventLoopMgr_test.cxx | 4 --- Control/GaudiSequencer/src/AthSequencer.cxx | 4 --- .../PileUpComps/src/PileUpEventLoopMgr.cxx | 29 ---------------- .../ViewAlgsTest/src/TestFEXAlgView.cxx | 4 --- .../src/MergingEventLoopMgr.cxx | 33 +------------------ 16 files changed, 2 insertions(+), 132 deletions(-) diff --git a/Control/AthAnalysisBaseComps/AthAnalysisBaseComps/AthAnalysisAlgorithm.h b/Control/AthAnalysisBaseComps/AthAnalysisBaseComps/AthAnalysisAlgorithm.h index f654f8256959..1b647b0d853b 100644 --- a/Control/AthAnalysisBaseComps/AthAnalysisBaseComps/AthAnalysisAlgorithm.h +++ b/Control/AthAnalysisBaseComps/AthAnalysisBaseComps/AthAnalysisAlgorithm.h @@ -59,11 +59,7 @@ class AthAnalysisAlgorithm : public ::AthHistogramAlgorithm, virtual public IInc /// Function initialising the tool in the correct way in Athena virtual StatusCode sysInitialize() override; /// override to do firstEvent method -#ifndef GAUDI_SYSEXECUTE_WITHCONTEXT - virtual StatusCode sysExecute() override; -#else virtual StatusCode sysExecute(const EventContext&) override; -#endif /// Helper function to access IOVMetaDataContainer information helped in the MetaDataStore template<typename T> StatusCode retrieveMetadata(const std::string& folder, const std::string& key, T& out) { diff --git a/Control/AthAnalysisBaseComps/src/AthAnalysisAlgorithm.cxx b/Control/AthAnalysisBaseComps/src/AthAnalysisAlgorithm.cxx index 4451def6da80..1663d004347e 100644 --- a/Control/AthAnalysisBaseComps/src/AthAnalysisAlgorithm.cxx +++ b/Control/AthAnalysisBaseComps/src/AthAnalysisAlgorithm.cxx @@ -79,18 +79,6 @@ StatusCode AthAnalysisAlgorithm::sysInitialize() { return StatusCode::SUCCESS; } -#ifndef GAUDI_SYSEXECUTE_WITHCONTEXT -StatusCode AthAnalysisAlgorithm::sysExecute() { - if(!m_doneFirstEvent) { - m_doneFirstEvent=true; - if( firstExecute().isFailure() ) { - ATH_MSG_FATAL("Failure in firstEvent method"); - return StatusCode::FAILURE; - } - } - return AthHistogramAlgorithm::sysExecute(); -} -#else StatusCode AthAnalysisAlgorithm::sysExecute(const EventContext& ctx) { if(!m_doneFirstEvent) { m_doneFirstEvent=true; @@ -101,7 +89,6 @@ StatusCode AthAnalysisAlgorithm::sysExecute(const EventContext& ctx) { } return AthHistogramAlgorithm::sysExecute(ctx); } -#endif void AthAnalysisAlgorithm::handle( const Incident& inc ) { diff --git a/Control/AthViews/src/RoiCollectionToViews.cxx b/Control/AthViews/src/RoiCollectionToViews.cxx index bde7b91da13d..acd8071d81af 100644 --- a/Control/AthViews/src/RoiCollectionToViews.cxx +++ b/Control/AthViews/src/RoiCollectionToViews.cxx @@ -57,11 +57,7 @@ StatusCode RoiCollectionToViews::execute() { ATH_MSG_DEBUG ("Executing " << name() << "..."); -#ifdef GAUDI_SYSEXECUTE_WITHCONTEXT const EventContext& ctx = getContext(); -#else - const EventContext& ctx = *getContext(); -#endif //Load the collection of RoI descriptors SG::ReadHandle< TrigRoiDescriptorCollection > inputRoIs( m_trigRoIs, ctx ); diff --git a/Control/AthViews/src/ViewTestAlg.cxx b/Control/AthViews/src/ViewTestAlg.cxx index 38342ff7e8d9..9f18161dc7dc 100644 --- a/Control/AthViews/src/ViewTestAlg.cxx +++ b/Control/AthViews/src/ViewTestAlg.cxx @@ -59,13 +59,7 @@ StatusCode ViewTestAlg::execute() { ATH_MSG_DEBUG ("Executing " << name() << "..."); -#ifdef GAUDI_SYSEXECUTE_WITHCONTEXT - const EventContext& ctx = getContext(); -#else - const EventContext& ctx = *getContext(); -#endif - - ATH_MSG_INFO( name() << " running with store " << ctx.getExtension<Atlas::ExtendedEventContext>()->proxy()->name() ); + ATH_MSG_INFO( name() << " running with store " << getContext().getExtension<Atlas::ExtendedEventContext>()->proxy()->name() ); return StatusCode::SUCCESS; } diff --git a/Control/AthViews/src_dflow/DFlowAlg1.cxx b/Control/AthViews/src_dflow/DFlowAlg1.cxx index 8120eeff0007..9b99efe1db1e 100644 --- a/Control/AthViews/src_dflow/DFlowAlg1.cxx +++ b/Control/AthViews/src_dflow/DFlowAlg1.cxx @@ -77,11 +77,7 @@ StatusCode DFlowAlg1::execute() { ATH_MSG_DEBUG ("Executing " << name() << "..."); -#ifdef GAUDI_SYSEXECUTE_WITHCONTEXT const EventContext& ctx = getContext(); -#else - const EventContext& ctx = *getContext(); -#endif SG::ReadHandle< int > inputData( m_r_int, ctx ); if ( !inputData.isValid() ) diff --git a/Control/AthViews/src_dflow/DFlowAlg2.cxx b/Control/AthViews/src_dflow/DFlowAlg2.cxx index 714041829285..f800c38282ef 100644 --- a/Control/AthViews/src_dflow/DFlowAlg2.cxx +++ b/Control/AthViews/src_dflow/DFlowAlg2.cxx @@ -77,11 +77,7 @@ StatusCode DFlowAlg2::execute() { ATH_MSG_DEBUG ("Executing " << name() << "..."); -#ifdef GAUDI_SYSEXECUTE_WITHCONTEXT const EventContext& ctx = getContext(); -#else - const EventContext& ctx = *getContext(); -#endif SG::ReadHandle< int > inputHandle( m_r_int, ctx ); ATH_MSG_INFO("================================"); diff --git a/Control/AthViews/src_dflow/DFlowAlg3.cxx b/Control/AthViews/src_dflow/DFlowAlg3.cxx index 45d54ab56a60..b7cf1cab30db 100644 --- a/Control/AthViews/src_dflow/DFlowAlg3.cxx +++ b/Control/AthViews/src_dflow/DFlowAlg3.cxx @@ -83,11 +83,7 @@ StatusCode DFlowAlg3::execute() { ATH_MSG_DEBUG ("Executing " << name() << "..."); -#ifdef GAUDI_SYSEXECUTE_WITHCONTEXT const EventContext& ctx = getContext(); -#else - const EventContext& ctx = *getContext(); -#endif SG::ReadHandle< int > inputScalarHandle( m_r_int, ctx ); ATH_MSG_INFO("================================"); diff --git a/Control/AthViews/src_dflow/DigiDemoSetupAlg.cxx b/Control/AthViews/src_dflow/DigiDemoSetupAlg.cxx index 24676aa28c64..387bbc548678 100644 --- a/Control/AthViews/src_dflow/DigiDemoSetupAlg.cxx +++ b/Control/AthViews/src_dflow/DigiDemoSetupAlg.cxx @@ -54,12 +54,7 @@ StatusCode DigiDemoSetupAlg::execute() { ATH_MSG_DEBUG ("Executing " << name() << "..."); -#ifdef GAUDI_SYSEXECUTE_WITHCONTEXT const EventContext& ctx = getContext(); -#else - const EventContext& ctx = *getContext(); -#endif - //Get a pointer to the digitisation store IProxyDict * digiStorePointer = dynamic_cast< IProxyDict* >( m_digiStore.get() ); diff --git a/Control/AthViews/src_dflow/ViewMergeAlg.cxx b/Control/AthViews/src_dflow/ViewMergeAlg.cxx index 67a3734bdfc2..9e0e32e949fc 100644 --- a/Control/AthViews/src_dflow/ViewMergeAlg.cxx +++ b/Control/AthViews/src_dflow/ViewMergeAlg.cxx @@ -58,11 +58,7 @@ StatusCode ViewMergeAlg::execute() { ATH_MSG_DEBUG ("Executing " << name() << "..."); -#ifdef GAUDI_SYSEXECUTE_WITHCONTEXT const EventContext& ctx = getContext(); -#else - const EventContext& ctx = *getContext(); -#endif //Merge results std::vector< int > outputVector; diff --git a/Control/AthViews/src_dflow/ViewSubgraphAlg.cxx b/Control/AthViews/src_dflow/ViewSubgraphAlg.cxx index e04b3adb692b..17f0643670f6 100644 --- a/Control/AthViews/src_dflow/ViewSubgraphAlg.cxx +++ b/Control/AthViews/src_dflow/ViewSubgraphAlg.cxx @@ -56,11 +56,7 @@ StatusCode ViewSubgraphAlg::execute() { ATH_MSG_DEBUG ("Executing " << name() << "..."); -#ifdef GAUDI_SYSEXECUTE_WITHCONTEXT const EventContext& ctx = getContext(); -#else - const EventContext& ctx = *getContext(); -#endif //Make a vector of dummy data to initialise the views std::vector<int> viewData; diff --git a/Control/AthenaBaseComps/src/FilteredAlgorithm.cxx b/Control/AthenaBaseComps/src/FilteredAlgorithm.cxx index 4dfde74fa132..4b86e19aa704 100644 --- a/Control/AthenaBaseComps/src/FilteredAlgorithm.cxx +++ b/Control/AthenaBaseComps/src/FilteredAlgorithm.cxx @@ -128,14 +128,8 @@ bool FilteredAlgorithm::isEventAccepted( ) const { bool result = true; -#ifdef GAUDI_SYSEXECUTE_WITHCONTEXT const EventContext& ctx = this->getContext(); if (ctx.valid()) { -#else - const EventContext* ctxptr = this->getContext(); - if (ctxptr && ctxptr->valid()) { - const EventContext& ctx = *ctxptr; -#endif result = m_decSvc->isEventAccepted(this->name(),ctx); //ATH_MSG_DEBUG("res=" << result << " n=" << this->name() << " sl=" << ctx.slot() << " evt=" << ctx.eventID().event_number()); } else { diff --git a/Control/AthenaServices/test/AthenaEventLoopMgr_test.cxx b/Control/AthenaServices/test/AthenaEventLoopMgr_test.cxx index e3e959b72e81..a74e9d2d3866 100644 --- a/Control/AthenaServices/test/AthenaEventLoopMgr_test.cxx +++ b/Control/AthenaServices/test/AthenaEventLoopMgr_test.cxx @@ -286,11 +286,7 @@ public: StatusCode TestAlgorithm::execute() { -#ifdef GAUDI_SYSEXECUTE_WITHCONTEXT const EventContext& ctx = getContext(); -#else - const EventContext& ctx = *getContext(); -#endif std::cout << "TestAlgorithm::execute " << ctx.eventID().event_number() << " " << ctx.evt() << "\n"; diff --git a/Control/GaudiSequencer/src/AthSequencer.cxx b/Control/GaudiSequencer/src/AthSequencer.cxx index 21af9b433c6f..abcd052bf320 100644 --- a/Control/GaudiSequencer/src/AthSequencer.cxx +++ b/Control/GaudiSequencer/src/AthSequencer.cxx @@ -227,11 +227,7 @@ StatusCode AthSequencer::executeAlgorithm (Algorithm* theAlgorithm, { // Call the sysExecute() of the method the algorithm m_abortTimer.start(m_timeoutMilliseconds); -#ifndef GAUDI_SYSEXECUTE_WITHCONTEXT - sc = theAlgorithm->sysExecute(); -#else sc = theAlgorithm->sysExecute( getContext() ); -#endif all_good = sc.isSuccess(); // I think this should be done by the algorithm itself, // but just in case... diff --git a/Control/PileUpComps/src/PileUpEventLoopMgr.cxx b/Control/PileUpComps/src/PileUpEventLoopMgr.cxx index a2d3418fb68b..40de1fd4e315 100644 --- a/Control/PileUpComps/src/PileUpEventLoopMgr.cxx +++ b/Control/PileUpComps/src/PileUpEventLoopMgr.cxx @@ -295,16 +295,6 @@ StatusCode PileUpEventLoopMgr::nextEvent(int maxevt) return StatusCode::FAILURE; } -#ifndef GAUDI_SYSEXECUTE_WITHCONTEXT - Algorithm* alg = dynamic_cast<Algorithm*>( (IAlgorithm*)(*ita) ); - if (alg != nullptr) { - alg->setContext( m_eventContext ); - } else { - ATH_MSG_ERROR( "Unable to dcast IAlgorithm " << (*ita)->name() - << " to Algorithm" ); - return StatusCode::FAILURE; - } -#endif } // Initialize the list of Output Streams. Note that existing Output Streams @@ -316,17 +306,6 @@ StatusCode PileUpEventLoopMgr::nextEvent(int maxevt) (*ita)->name() ); return StatusCode::FAILURE; } - -#ifndef GAUDI_SYSEXECUTE_WITHCONTEXT - Algorithm* alg = dynamic_cast<Algorithm*>( (IAlgorithm*)(*ita) ); - if (alg != nullptr) { - alg->setContext( m_eventContext ); - } else { - ATH_MSG_ERROR( "Unable to dcast IAlgorithm " << (*ita)->name() - << " to Algorithm" ); - return StatusCode::FAILURE; - } -#endif } const EventInfo* pEvent(0); @@ -801,11 +780,7 @@ StatusCode PileUpEventLoopMgr::executeAlgorithms() ita != m_topAlgList.end(); ita++ ) { -#ifndef GAUDI_SYSEXECUTE_WITHCONTEXT - StatusCode sc = (*ita)->sysExecute(); -#else StatusCode sc = (*ita)->sysExecute(*m_eventContext); -#endif // this duplicates what is already done in Algorithm::sysExecute, which // calls Algorithm::setExecuted, but eventually we plan to remove that // function @@ -911,11 +886,7 @@ StatusCode PileUpEventLoopMgr::executeEvent(void* par) for (ListAlg::iterator ito = m_outStreamList.begin(); ito != m_outStreamList.end(); ito++ ) { -#ifndef GAUDI_SYSEXECUTE_WITHCONTEXT - sc = (*ito)->sysExecute(); -#else sc = (*ito)->sysExecute(*m_eventContext); -#endif if( !sc.isSuccess() ) { eventFailed = true; diff --git a/Trigger/TrigSteer/ViewAlgsTest/src/TestFEXAlgView.cxx b/Trigger/TrigSteer/ViewAlgsTest/src/TestFEXAlgView.cxx index 96d9de9dc031..ecd9f37f6ec5 100644 --- a/Trigger/TrigSteer/ViewAlgsTest/src/TestFEXAlgView.cxx +++ b/Trigger/TrigSteer/ViewAlgsTest/src/TestFEXAlgView.cxx @@ -47,11 +47,7 @@ StatusCode TestFEXAlgView::execute() { m_outputProxyContainerAux = CxxUtils::make_unique< xAOD::TrigCompositeAuxContainer>(); m_outputProxyContainer->setStore(m_outputProxyContainerAux.ptr()); -#ifdef GAUDI_SYSEXECUTE_WITHCONTEXT const EventContext& ctx = getContext(); -#else - const EventContext& ctx = *getContext(); -#endif // collect RoIs // do reco and produce (say clusters - that part is missing in this example) diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/src/MergingEventLoopMgr.cxx b/Trigger/TriggerSimulation/TrigSimTransforms/src/MergingEventLoopMgr.cxx index f63a4d0a8c34..036a18f8a151 100644 --- a/Trigger/TriggerSimulation/TrigSimTransforms/src/MergingEventLoopMgr.cxx +++ b/Trigger/TriggerSimulation/TrigSimTransforms/src/MergingEventLoopMgr.cxx @@ -949,19 +949,6 @@ namespace TrigSim { << (*it)->name() << endmsg; failed = true; } - -#ifndef GAUDI_SYSEXECUTE_WITHCONTEXT - Algorithm* alg = dynamic_cast<Algorithm*>( (IAlgorithm*)(*it) ); - if (alg != nullptr) { - alg->setContext( &m_eventContext ); - } else { - m_log << MSG::ERROR - << "Unable to dcast IAlgorithm " << (*it)->name() - << " to Algorithm" - << endmsg; - failed = true; - } -#endif } for(it = m_outStreamList.begin(); it != m_outStreamList.end(); ++it) { @@ -971,20 +958,7 @@ namespace TrigSim { m_log << MSG::ERROR << "Unable to initialize Output Stream: " << (*it)->name() << endmsg; failed = true; - } - -#ifndef GAUDI_SYSEXECUTE_WITHCONTEXT - Algorithm* alg = dynamic_cast<Algorithm*>( (IAlgorithm*)(*it) ); - if (alg != nullptr) { - alg->setContext( &m_eventContext ); - } else { - m_log << MSG::ERROR - << "Unable to dcast IAlgorithm " << (*it)->name() - << " to Algorithm" - << endmsg; - failed = true; } -#endif } @@ -1026,15 +1000,10 @@ namespace TrigSim { } //------------------------------------------------------------------------------ StatusCode MergingEventLoopMgr::executeAlgorithms() { - StatusCode sc; for(ListAlg::iterator it = m_topAlgList.begin(); it != m_topAlgList.end(); ++it) { -#ifdef GAUDI_SYSEXECUTE_WITHCONTEXT const StatusCode& sc = (*it)->sysExecute(m_eventContext); -#else - sc = (*it)->sysExecute(); -#endif // this duplicates what is already done in Algorithm::sysExecute, which // calls Algorithm::setExecuted, but eventually we plan to remove that // function @@ -1046,7 +1015,7 @@ namespace TrigSim { return sc; } } - return sc; + return StatusCode::SUCCESS; } //------------------------------------------------------------------------------ StatusCode MergingEventLoopMgr::overwriteTriggerInfo(EventInfo *pFrom, EventInfo *pTo) { -- GitLab From c69b6ebbb123f3acce87b1149d0357f0ab2c9ffc Mon Sep 17 00:00:00 2001 From: Mark Hodgkinson <m.hodgkinson@sheffield.ac.uk> Date: Thu, 28 Jun 2018 14:50:16 +0100 Subject: [PATCH 275/562] Add class descrtions found in: https://docs.google.com/document/d/1FY9-VtxQtP6nOL2QLUZOyNoXUgEOUx1glQwEC4AGvgM/edit# as doxygen comments in header files. Add doxygen main page. Adjust a few existing comments to be doxygen compatible. Former-commit-id: 703aa5f85fd6f7078a17f0ffa7ed3ccddf05ce02 --- Reconstruction/eflowRec/doc/packagedoc.h | 9 +++++++++ .../eflowRec/eflowRec/IEFlowCellEOverPTool.h | 3 +++ .../eflowRec/eflowRec/IPFSubtractionTool.h | 3 +++ Reconstruction/eflowRec/eflowRec/LegendreWeights.h | 7 ++++++- .../eflowRec/eflowRec/PFClusterCollectionTool.h | 3 +++ Reconstruction/eflowRec/eflowRec/PFLCCalibTool.h | 3 +++ Reconstruction/eflowRec/eflowRec/PFMatchDistance.h | 9 +++++++++ Reconstruction/eflowRec/eflowRec/PFMatcher.h | 3 +++ .../eflowRec/eflowRec/PFMomentCalculatorTool.h | 5 ++++- .../eflowRec/eflowRec/PFTrackClusterMatchingTool.h | 3 +++ .../eflowRec/eflowRec/eflowBaseAlgTool.h | 3 +++ Reconstruction/eflowRec/eflowRec/eflowCaloObject.h | 3 +++ .../eflowRec/eflowRec/eflowCaloObjectMaker.h | 3 +++ .../eflowRec/eflowRec/eflowCaloRegions.h | 7 ++++++- .../eflowRec/eflowCellEOverPTool_mc12_JetETMiss.h | 3 +++ .../eflowRec/eflowCellEOverPTool_mc12_LC.h | 3 +++ .../eflowRec/eflowRec/eflowCellIntegrator.h | 14 +++++++------- Reconstruction/eflowRec/eflowRec/eflowCellList.h | 3 +++ .../eflowRec/eflowRec/eflowCellPosition.h | 5 +++++ .../eflowRec/eflowCellSubtractionFacilitator.h | 3 +++ Reconstruction/eflowRec/eflowRec/eflowDatabase.h | 3 +++ .../eflowRec/eflowRec/eflowDepthCalculator.h | 7 +++++++ .../eflowRec/eflowRec/eflowEEtaBinBase.h | 3 +++ .../eflowRec/eflowRec/eflowEEtaBinnedParameters.h | 4 +++- Reconstruction/eflowRec/eflowRec/eflowFirstInt.h | 3 +++ .../eflowRec/eflowRec/eflowFirstIntParameters.h | 3 +++ .../eflowRec/eflowRec/eflowLayerIntegrator.h | 3 +++ Reconstruction/eflowRec/eflowRec/eflowLookupExp.h | 2 +- .../eflowRec/eflowRec/eflowOverlapRemoval.h | 3 +++ Reconstruction/eflowRec/eflowRec/eflowRecCluster.h | 6 ++++++ Reconstruction/eflowRec/eflowRec/eflowRecTrack.h | 7 +++++++ .../eflowRec/eflowRingSubtractionManager.h | 3 +++ Reconstruction/eflowRec/eflowRec/eflowSubtractor.h | 3 +++ .../eflowRec/eflowTrackCaloDummyExtensionTool.h | 3 +++ .../eflowRec/eflowTrackCaloExtensionTool.h | 5 ++++- .../eflowRec/eflowRec/eflowTrackCaloPoints.h | 4 +++- .../eflowRec/eflowRec/eflowTrackClusterLink.h | 3 +++ .../eflowRec/eflowTrackExtrapolatorBaseAlgTool.h | 3 +++ Reconstruction/eflowRec/eflowRec/eflowUtil.h | 6 ++++++ 39 files changed, 155 insertions(+), 14 deletions(-) create mode 100644 Reconstruction/eflowRec/doc/packagedoc.h diff --git a/Reconstruction/eflowRec/doc/packagedoc.h b/Reconstruction/eflowRec/doc/packagedoc.h new file mode 100644 index 000000000000..f37c737e974a --- /dev/null +++ b/Reconstruction/eflowRec/doc/packagedoc.h @@ -0,0 +1,9 @@ +/** +@page eflowRec_page eflowRec package + +@section eflowRec_Intro Introduction + +This package contains algorithms and tools used to run the JetETMiss particle flow algorithm. + +An overview of this area of work can be found at https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/ParticleFlow. +*/ diff --git a/Reconstruction/eflowRec/eflowRec/IEFlowCellEOverPTool.h b/Reconstruction/eflowRec/eflowRec/IEFlowCellEOverPTool.h index 755a191390aa..522fddcf6335 100644 --- a/Reconstruction/eflowRec/eflowRec/IEFlowCellEOverPTool.h +++ b/Reconstruction/eflowRec/eflowRec/IEFlowCellEOverPTool.h @@ -24,6 +24,9 @@ class eflowEEtaBinnedParameters; /** Must declare this, with name of interface*/ static const InterfaceID IID_IEFlowCellEOverPTool("IEFlowCellEOverPTool", 1, 0); +/** +Pure virtual base class, from which concrete classes inherit and define reference e/p mean and widths, as well as reference energy density radial profile fit parameters. Inherits from AthAlgTool. +*/ class IEFlowCellEOverPTool : public AthAlgTool { public: diff --git a/Reconstruction/eflowRec/eflowRec/IPFSubtractionTool.h b/Reconstruction/eflowRec/eflowRec/IPFSubtractionTool.h index cea1b85ad193..6bb6645f4b4d 100644 --- a/Reconstruction/eflowRec/eflowRec/IPFSubtractionTool.h +++ b/Reconstruction/eflowRec/eflowRec/IPFSubtractionTool.h @@ -13,6 +13,9 @@ class eflowCaloObjectContainer; class eflowRecTrackContainer; class eflowRecClusterContainer; +/** +Algorithm base class which inherits from IAlgTool and defines pure virtual execute method which takes pointers to eflowCaloObjectContainer, eflowRecTrackContainer and eflowRecClusterContainer as input. Algtools which inherit from this are used to modify calorimeter clusters, when performing charegd shower subtraction procedures in particle flow. +*/ class IPFSubtractionTool : virtual public IAlgTool { public: diff --git a/Reconstruction/eflowRec/eflowRec/LegendreWeights.h b/Reconstruction/eflowRec/eflowRec/LegendreWeights.h index 8a825d11e3a1..863e51c9ddca 100644 --- a/Reconstruction/eflowRec/eflowRec/LegendreWeights.h +++ b/Reconstruction/eflowRec/eflowRec/LegendreWeights.h @@ -5,6 +5,9 @@ #ifndef LEGENDREWEIGHTS_H_ #define LEGENDREWEIGHTS_H_ +/** + Stores weights of 5th and 6th order Legendre polynomials. Used in eflowCellIntegrator. +*/ double legendreWeights[21] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, @@ -21,7 +24,9 @@ double legendreWeights[21] = { }; - +/** + Stores roots of 5th and 6th order Legendre polynomials. Used in eflowCellIntegrator. +*/ double legendreRoots[21] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, diff --git a/Reconstruction/eflowRec/eflowRec/PFClusterCollectionTool.h b/Reconstruction/eflowRec/eflowRec/PFClusterCollectionTool.h index 6b7bbc835250..918b879e2bda 100644 --- a/Reconstruction/eflowRec/eflowRec/PFClusterCollectionTool.h +++ b/Reconstruction/eflowRec/eflowRec/PFClusterCollectionTool.h @@ -8,6 +8,9 @@ #include "eflowRec/IPFClusterCollectionTool.h" #include "AthenaBaseComps/AthAlgTool.h" +/** + Inherits from IPFClusterCollectionTool and AthAlgTool. Creates containers of eflowRecClusters or xAOD::CaloCluster, which can be used in the methods to apply LC weights to the neutral PFO objects in PFLCCalibTool. The xAOD::CaloCluster container is also needed to calculate new cluster moments for the modified calorimeter clusters, which is done in PFMomentCalculatorTool. +*/ class PFClusterCollectionTool : public extends<AthAlgTool, IPFClusterCollectionTool> { public: diff --git a/Reconstruction/eflowRec/eflowRec/PFLCCalibTool.h b/Reconstruction/eflowRec/eflowRec/PFLCCalibTool.h index 54dffd025f8d..9a6d720f40dd 100644 --- a/Reconstruction/eflowRec/eflowRec/PFLCCalibTool.h +++ b/Reconstruction/eflowRec/eflowRec/PFLCCalibTool.h @@ -16,6 +16,9 @@ class eflowCaloObjectContainer; class eflowRecCluster; +/** +This tool can either use a series of CaloClusterCollectionProcessor to calibrate the modified xAOD::CaloCluster (modified when we do the charged shower subtraction) using recalculated LC weights or its own internal method to use the stored LC weights in the eflowRecCluster objects. If using the LC weights which were stored in the eflowRecCluster then we use the container of eflowRecCluster, but if using recalculated LC weights for the modified xAOD::CaloCluster (modified when we remove calorimeter cells in the charged shower subtraction) then we need the container of xAOD::CaloCluster. The PFClusterCollectionTool provides both of these containers. +*/ class PFLCCalibTool : public extends<AthAlgTool, IPFBaseTool> { public: diff --git a/Reconstruction/eflowRec/eflowRec/PFMatchDistance.h b/Reconstruction/eflowRec/eflowRec/PFMatchDistance.h index 7818770ec51f..925c7d94cf1a 100644 --- a/Reconstruction/eflowRec/eflowRec/PFMatchDistance.h +++ b/Reconstruction/eflowRec/eflowRec/PFMatchDistance.h @@ -21,6 +21,9 @@ class EtaPhiWithVariance; /* Distance calculator classes */ +/** +Calculates distance between two EtaPhi objects +*/ class EtaPhiSqDistanceCalculator: public DistanceCalculator<EtaPhi, EtaPhi> { public: EtaPhiSqDistanceCalculator() { } @@ -29,6 +32,9 @@ public: virtual double distanceBetween(EtaPhi* position1, EtaPhi* position2); }; +/** +Calculates distance between EtaPhi and EtaPhiWithVariance object +*/ class EtaPhiSqSignificanceCalculator: public DistanceCalculator<EtaPhi, EtaPhiWithVariance> { public: EtaPhiSqSignificanceCalculator() { } @@ -40,6 +46,9 @@ public: /* Distance calculator factory */ +/** +Factory to create IDistanceProvider of the type requested. +*/ class DistanceFactory { public: static std::unique_ptr<IDistanceProvider> Get(std::string distanceType, std::unique_ptr<IPositionProvider> trackPosition, diff --git a/Reconstruction/eflowRec/eflowRec/PFMatcher.h b/Reconstruction/eflowRec/eflowRec/PFMatcher.h index 4c835b26463a..5a0d557d10f2 100644 --- a/Reconstruction/eflowRec/eflowRec/PFMatcher.h +++ b/Reconstruction/eflowRec/eflowRec/PFMatcher.h @@ -28,6 +28,9 @@ struct MatchDistance { bool m_isMatch; }; +/** +Checks if a cluster should be matched to a track or not, and has methods to return list of best matches. +*/ class TrackClusterMatcher { public: TrackClusterMatcher( std::unique_ptr<IDistanceProvider> distanceProvider, double matchCut): diff --git a/Reconstruction/eflowRec/eflowRec/PFMomentCalculatorTool.h b/Reconstruction/eflowRec/eflowRec/PFMomentCalculatorTool.h index 84985d449633..a64faf388cf4 100644 --- a/Reconstruction/eflowRec/eflowRec/PFMomentCalculatorTool.h +++ b/Reconstruction/eflowRec/eflowRec/PFMomentCalculatorTool.h @@ -15,6 +15,9 @@ class eflowCaloObjectContainer; +/** +This tool uses a CaloClusterCollectionProcessor to calculate new moments for the modified calorimeter clusters (modified when we do the charged shower subtraction), and makes use of IPFClusterCollectionTool to generate a VIEW container of xAOD::CaloCluster to be used in the CaloClusterCollectionProcessor tool. Inherits from IPFBaseAlgTool. +*/ class PFMomentCalculatorTool : public extends<AthAlgTool, IPFBaseTool> { public: @@ -32,7 +35,7 @@ class PFMomentCalculatorTool : public extends<AthAlgTool, IPFBaseTool> { /** Tool to put all clusters into a temporary container - then we use this to calculate moments, some of which depend on configuration of nearby clusters */ ToolHandle<IPFClusterCollectionTool> m_clusterCollectionTool{this,"PFClusterCollectionTool","eflowRecClusterCollectionTool","Tool to put all clusters into a temporary container - then we use this to calculate moments, some of which depend on configuration of nearby clusters"}; - /* Tool to calculate cluster moments */ + /** Tool to calculate cluster moments */ ToolHandle<CaloClusterCollectionProcessor> m_clusterMomentsMaker{this,"CaloClusterMomentsMaker","CaloClusterMomentsMaker","Tool to calculate cluster moments"}; /** Toggle whether we are in LC mode - false by default */ diff --git a/Reconstruction/eflowRec/eflowRec/PFTrackClusterMatchingTool.h b/Reconstruction/eflowRec/eflowRec/PFTrackClusterMatchingTool.h index a06e40a46f6f..7c3c384bb508 100644 --- a/Reconstruction/eflowRec/eflowRec/PFTrackClusterMatchingTool.h +++ b/Reconstruction/eflowRec/eflowRec/PFTrackClusterMatchingTool.h @@ -23,6 +23,9 @@ class eflowMatchCluster; static const InterfaceID IID_PFTrackClusterMatchingTool("PFTrackClusterMatchingTool", 1, 0); +/** +This is the tool, which inherits from AthAlgTool, which clients can use for track-cluster matching. Clients should define the type of cluster position, the type of track position and the type of distance to use. This tool uses the PF::TrackClusterMatcher tool and returns a vector of matched eflowRecCluster to the client. The client must provide an eflowRecTrack and a list of eflowRecCluster to consider for matching. +*/ class PFTrackClusterMatchingTool: public AthAlgTool { public: diff --git a/Reconstruction/eflowRec/eflowRec/eflowBaseAlgTool.h b/Reconstruction/eflowRec/eflowRec/eflowBaseAlgTool.h index da310976bfb7..99a068c5edb8 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowBaseAlgTool.h +++ b/Reconstruction/eflowRec/eflowRec/eflowBaseAlgTool.h @@ -20,6 +20,9 @@ class eflowRecTrackContainer; class eflowRecClusterContainer; #include "GaudiKernel/IAlgTool.h" +/** +An Algtool base class for eflowRec, which inherits from IAlgTool and defines a pure virtual execute method which takes an eflowCaloObjectContainer (which is a DataVector of eflowCaloObject) pointer as its argument. +*/ class eflowBaseAlgTool : virtual public IAlgTool { public: diff --git a/Reconstruction/eflowRec/eflowRec/eflowCaloObject.h b/Reconstruction/eflowRec/eflowRec/eflowCaloObject.h index ca5f6ba75508..0db437f57c5c 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowCaloObject.h +++ b/Reconstruction/eflowRec/eflowRec/eflowCaloObject.h @@ -29,6 +29,9 @@ class eflowTrackClusterLink; class eflowLayerIntegrator; class eflowEEtaBinnedParameters; +/** +An internal EDM object which stores information about systems of associated tracks and calorimeter clusters. Specifically it stores vectors of pointers to eflowRecTracks, eflowRecClusters and eflowTrackClusterLinks. In addition it stores links to an xAOD::CaloClusterContainer and its associated aux container. This class also calculates the expected energy deposit in the calorimeter from a track in the system, and stores that information so that clients can retrieve it. It also calculates the calorimeter cell ordering to be used in the subtraction. Both of these things are done in the simulateShower method which uses the data stored in an eflowEEtaBinnedParameters object, which is filled by e.g the eflowCellEOverP_mc12_JetETMiss tool. +*/ class eflowCaloObject { public: diff --git a/Reconstruction/eflowRec/eflowRec/eflowCaloObjectMaker.h b/Reconstruction/eflowRec/eflowRec/eflowCaloObjectMaker.h index 3c35f24b3ad8..bc0704b1029d 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowCaloObjectMaker.h +++ b/Reconstruction/eflowRec/eflowRec/eflowCaloObjectMaker.h @@ -20,6 +20,9 @@ class eflowRecClusterContainer; class eflowRecCluster; class eflowRecTrack; +/** +This class creates eflowCaloObjects and adds them into the eflowCaloObjectContainer. +*/ class eflowCaloObjectMaker { public: diff --git a/Reconstruction/eflowRec/eflowRec/eflowCaloRegions.h b/Reconstruction/eflowRec/eflowRec/eflowCaloRegions.h index bab1fcde42dc..e83ee9fbd225 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowCaloRegions.h +++ b/Reconstruction/eflowRec/eflowRec/eflowCaloRegions.h @@ -18,6 +18,9 @@ CREATED: 03 May, 2006 #include "CaloIdentifier/CaloCell_ID.h" +/** +This defines the eflowCalo enum, which is used to label calorimeter layers in a simplified scheme which exludes the presamplers and combines the Tile regions. +*/ class eflowCalo { public: @@ -45,7 +48,9 @@ class eflowCalo typedef eflowCalo::LAYER eflowCaloENUM; - +/** +This defines the J1STLAYER enum, which is used to label calorimeter layers in a simplified scheme which exludes the presamplers and combines the HEC layers. It also combines both the Tile regions and layers into one Tile quantity. This enum is used to label layers for the LHED calculation. + */ class eflowFirstIntRegions { public: diff --git a/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_JetETMiss.h b/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_JetETMiss.h index 5405ecf0b014..f687b3c5a8f5 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_JetETMiss.h +++ b/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_JetETMiss.h @@ -21,6 +21,9 @@ Description: New EM e/p for DC14 - JetMET ONLY - this is because taus already tu class eflowBaseParameters; +/** +Class to store reference e/p mean and widths, as well as reference energy density radial profile fit parameters. The data is input to an eflowEEtaBinnedParameters object in the execute method. Stores data at the uncalibrated (EM) scale and is used by default. This inherits from IEFlowCellEOverPTool. +*/ class eflowCellEOverPTool_mc12_JetETMiss : public IEFlowCellEOverPTool { public: diff --git a/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_LC.h b/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_LC.h index 18192a0fb116..ac88b6f50952 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_LC.h +++ b/Reconstruction/eflowRec/eflowRec/eflowCellEOverPTool_mc12_LC.h @@ -21,6 +21,9 @@ Description: E/P reference at LC scale class eflowBaseParameters; +/** + Class to store reference e/p mean and widths, as well as reference energy density radial profile fit parameters. The data is input to an eflowEEtaBinnedParameters object in the execute method. Stores data at the Local Hadron Calibration (LC) scale. This inherits from IEFlowCellEOverPTool. +*/ class eflowCellEOverPTool_mc12_LC : public IEFlowCellEOverPTool { public: diff --git a/Reconstruction/eflowRec/eflowRec/eflowCellIntegrator.h b/Reconstruction/eflowRec/eflowRec/eflowCellIntegrator.h index 10c77e2233a9..e302e6c8bdef 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowCellIntegrator.h +++ b/Reconstruction/eflowRec/eflowRec/eflowCellIntegrator.h @@ -21,10 +21,10 @@ #include "eflowRec/eflowLookupExp.h" #include "eflowRec/LegendreWeights.h" -/* Enum used as template argument to switch between std::exp and the lookup-table based version */ +/** Enum used as template argument to switch between std::exp and the lookup-table based version */ enum Exp_t {stdExp = 0, lookupExp}; -/* Class to perform a generic recursive Gauss-Legendre Integration, see +/** Class to perform a generic recursive Gauss-Legendre Integration, see * http://en.wikipedia.org/wiki/Gaussian_quadrature#Gauss.E2.80.93Legendre_quadrature * Templated in the type of the integrand. All the integrand class needs to have, is an evaluate() method, * that takes a double as a parameter and returns a double. @@ -108,7 +108,7 @@ private: int m_depth; }; -/* Class to represent the 2D Gaussian integrand. +/** Class to represent the 2D Gaussian integrand. * EtaSq is set via a set method, phi is a parameter to the evalutate() method. * Hence the class is only the direct integrator of the inner (i.e. phi) integration, * while the eflowCell Integrator acts as the integrand for the outer (i.e. eta) @@ -128,7 +128,7 @@ public: inline double evaluateStdExp(double rSq) { return m_norm * exp(-rSq * m_oneOverTwoSigmaSq); } inline double evaluateLookupExp(double rSq) { return m_lookupExp->evaluate(rSq * m_oneOverTwoSigmaSq)*m_norm; } - /* The evaluate method for the integration. The implementation depends on the template parameter */ + /** The evaluate method for the integration. The implementation depends on the template parameter */ inline double evaluate(double y); private: @@ -140,7 +140,7 @@ private: template<> inline double eflowCellIntegrand<stdExp>::evaluate(double phi) { return evaluateStdExp(m_etaSq+phi*phi); } template<> inline double eflowCellIntegrand<lookupExp>::evaluate(double phi) { return evaluateLookupExp(m_etaSq+phi*phi); } -/* Class that controls the 2D integration. +/** Class that controls the 2D integration. * Holds two eflowRecursiveGaussLegendreIntegrators, one to perform the outer (i.e. eta) * and one to perform the inner (i.e. phi) integration. * The class itself acts as the integrand of the outer integration. Its evaluate method @@ -165,7 +165,7 @@ public: } ~eflowCellIntegrator() {} - /* Main method, which starts the integration */ + /** Main method, which starts the integration */ inline double integrate(const eflowRange& etaRange, const eflowRange& phiRange) { /* Store the phi range for the inner integration */ m_rangePhi = phiRange; @@ -173,7 +173,7 @@ public: return m_outerIntegrator.integrate(etaRange); } - /* Evaluate method for the outer (i.e. eta) integration (invoked by m_outerIntegrator) */ + /** Evaluate method for the outer (i.e. eta) integration (invoked by m_outerIntegrator) */ inline double evaluate(double eta) { /* Set the eta (square) value for the inner integration */ m_integrand2D->setEtaSq(eta*eta); diff --git a/Reconstruction/eflowRec/eflowRec/eflowCellList.h b/Reconstruction/eflowRec/eflowRec/eflowCellList.h index 5620e3dd187c..730aa837c0f9 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowCellList.h +++ b/Reconstruction/eflowRec/eflowRec/eflowCellList.h @@ -28,6 +28,9 @@ class eflowTrackCaloPoints; typedef std::map<eflowCellPosition,std::vector<std::pair<CaloCell*,int> > >::iterator CellIt; +/** +Concrete class derived class from pure virtual eflowAbstractCellList. This stores information about the calorimeter cells - the main data type is a map between an eflowCellPosition and a pair linking the CaloCell pointer and the index of its xAOD::CaloCluster in the calorimeter cluster container. A DR2 function is provided to calculate the distance between an eflowCellPosition and the track impact point in a given calorimeter layer (eflowCellList also stores a list of track eta,phi impact points for each calorimeter later). +*/ class eflowCellList : public eflowAbstractCellList{ public: diff --git a/Reconstruction/eflowRec/eflowRec/eflowCellPosition.h b/Reconstruction/eflowRec/eflowRec/eflowCellPosition.h index 6484f6982766..3fc879d6c272 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowCellPosition.h +++ b/Reconstruction/eflowRec/eflowRec/eflowCellPosition.h @@ -20,6 +20,11 @@ CREATED: 18th Aug, 2005 class CaloCell; class eflowAbstractCellList; +/** +This class stores the eta,phi and layer of the calorimeter cell and defines a “<†operator which can be used to order the eflowCellPosition based on eta,phi and layer. The < operator makes use of a stored pointer to the eflowAbstractCellList that the eflowCellPosition is in, in order to use eflowCellList::DR2 inside the < operator. + +So conceptually we can consider that a track has some list of associated calorimeter cells in the eflowCellList, where the information that we need for each cell is stored in the eflowCellPosition. A map is kept to link the eflowCellPosition back to the actual CaloCell. +*/ class eflowCellPosition { public: diff --git a/Reconstruction/eflowRec/eflowRec/eflowCellSubtractionFacilitator.h b/Reconstruction/eflowRec/eflowRec/eflowCellSubtractionFacilitator.h index 8f41b5357614..26114340e94e 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowCellSubtractionFacilitator.h +++ b/Reconstruction/eflowRec/eflowRec/eflowCellSubtractionFacilitator.h @@ -21,6 +21,9 @@ CREATED: 3rd February 2009 #include <vector> +/** + This class deals with the removal of calorimeter cells from calorimeter clusters. The main entry points are the subtractCells methods which find out how much energy they should subtract from the eflowRingSubtractionManager. The eflowRingSubtractionManager also contains a list of calorimeter cell rings (a ring is a list of calorimeter cells, in a given calorimeter layer, between two radii r1 and r2). The cell information is stored in the eflowCellList. Rings are removed one by one in the order they are stored until the summed cell ring energy is >= to the expected energy deposit from the track in the calorimeter. +*/ class eflowCellSubtractionFacilitator{ public: diff --git a/Reconstruction/eflowRec/eflowRec/eflowDatabase.h b/Reconstruction/eflowRec/eflowRec/eflowDatabase.h index b4d35101525b..e14fe528c8b4 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowDatabase.h +++ b/Reconstruction/eflowRec/eflowRec/eflowDatabase.h @@ -18,6 +18,9 @@ CREATED: 23rd August, 2005 //C++ Headers #include <vector> +/** +Stores calorimeter cell eta and phi widths, a X0 per unit length in the EM and HAD calorimeters. +*/ class eflowDatabase { public: diff --git a/Reconstruction/eflowRec/eflowRec/eflowDepthCalculator.h b/Reconstruction/eflowRec/eflowRec/eflowDepthCalculator.h index 26c2471a46bc..8e9c08d92767 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowDepthCalculator.h +++ b/Reconstruction/eflowRec/eflowRec/eflowDepthCalculator.h @@ -17,6 +17,13 @@ CREATED: 18th Aug, 2005 #include "eflowRec/eflowCaloRegions.h" +/** +The class calculates the depth of each layer, in interaction lengths, for a given EM2 eta. This is used by eflowLayerIntegrator. + +This holds m_layerDepth (returned by getDepthArray) which is an array of double. Each double is the depth of a calorimeter layer in nuclear interaction lengths, and this is filled in calcDepthArray. This is needed in eflowLayerIntegrator::getFirstIntLayer() to calculate dy/dx, which uses the cluster integral in each calorimeter layer to calculate the gaussian weighted density. + +It has an enum (depthLayerENUM) which designates where in the detector we are, and this includes additional calorimeter positions such as EMB_back. +*/ class eflowDepthCalculator { public: diff --git a/Reconstruction/eflowRec/eflowRec/eflowEEtaBinBase.h b/Reconstruction/eflowRec/eflowRec/eflowEEtaBinBase.h index 8f92c8336fb8..2afe04eccfcb 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowEEtaBinBase.h +++ b/Reconstruction/eflowRec/eflowRec/eflowEEtaBinBase.h @@ -20,6 +20,9 @@ CREATED: 17th May, 2006 class eflowParameters; +/** +Base class which sets up some of the infrastructure to store the e/p reference values. The base class has methods to return bin indices, and has a bool to toggle whether to use linear or log interpolation between bins (such that the e/p reference can smoothly vary as a function of kinematics). +*/ class eflowEEtaBinBase { public: diff --git a/Reconstruction/eflowRec/eflowRec/eflowEEtaBinnedParameters.h b/Reconstruction/eflowRec/eflowRec/eflowEEtaBinnedParameters.h index d659feb5a5b2..5f37e4948720 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowEEtaBinnedParameters.h +++ b/Reconstruction/eflowRec/eflowRec/eflowEEtaBinnedParameters.h @@ -52,7 +52,9 @@ class eflowParameters { std::vector<std::unique_ptr<eflowFirstIntParameters> > m_FirstIntParameters; }; - +/** +Inherits from eflowEEtaBinBase. This class adds the infrastructure to store data and its set methods are used in e.g. eflowCellEOverPTool_mc12_JetETMiss. It also calculates an interpolation weight for moving between bins. +*/ class eflowEEtaBinnedParameters : public eflowEEtaBinBase { public: diff --git a/Reconstruction/eflowRec/eflowRec/eflowFirstInt.h b/Reconstruction/eflowRec/eflowRec/eflowFirstInt.h index 6344b80a6e23..bb44d2eed215 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowFirstInt.h +++ b/Reconstruction/eflowRec/eflowRec/eflowFirstInt.h @@ -17,6 +17,9 @@ CREATED: 18th Aug, 2005 #include <iostream> +/** +This object holds the expected energy deposit of a track and the known width of that distribution. +*/ class eflowFirstInt { public: diff --git a/Reconstruction/eflowRec/eflowRec/eflowFirstIntParameters.h b/Reconstruction/eflowRec/eflowRec/eflowFirstIntParameters.h index 9dcfe1af6c2f..0a3733695dc0 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowFirstIntParameters.h +++ b/Reconstruction/eflowRec/eflowRec/eflowFirstIntParameters.h @@ -22,6 +22,9 @@ CREATED: 18th Aug, 2005 #include <vector> #include <istream> +/** + Extends eflowFirstInt to include parameters of the fits to radial shower profiles. Also adds functionality to allow interpolation between fixed energy and eta reference bins. This object is used internally in the eflowRingSubtractionManager. +*/ class eflowFirstIntParameters : public eflowFirstInt { public: diff --git a/Reconstruction/eflowRec/eflowRec/eflowLayerIntegrator.h b/Reconstruction/eflowRec/eflowRec/eflowLayerIntegrator.h index ccd7e309d9c3..c7ab060aeda8 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowLayerIntegrator.h +++ b/Reconstruction/eflowRec/eflowRec/eflowLayerIntegrator.h @@ -29,6 +29,9 @@ class eflowTrackCaloPoints; template <int expType> class eflowCellIntegrator; +/** + This class calculates the LHED (Layer of Highest Energy Density) in a cluster or group of clusters. This is calculated using an integral over the eta-phi enegry density in each calorimeter layer using 2D Gaussian Weights, and makes use of eflowCellIntegrator to do the integral over each calorimeter cell. +*/ class eflowLayerIntegrator { public: diff --git a/Reconstruction/eflowRec/eflowRec/eflowLookupExp.h b/Reconstruction/eflowRec/eflowRec/eflowLookupExp.h index eaae819dfab9..af0e7c280aa2 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowLookupExp.h +++ b/Reconstruction/eflowRec/eflowRec/eflowLookupExp.h @@ -17,7 +17,7 @@ #include <math.h> #include <memory> -/* Lookup-table based exponential function to save CPU time */ +/** Lookup-table based exponential function to save CPU time, which is used by eflowCellIntegrator */ class eflowLookupExp{ public: static eflowLookupExp* getInstance(int nExpBins = 50, int nExpSubBins = 1000){ diff --git a/Reconstruction/eflowRec/eflowRec/eflowOverlapRemoval.h b/Reconstruction/eflowRec/eflowRec/eflowOverlapRemoval.h index 48aa4f160a80..223b2c8b3df0 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowOverlapRemoval.h +++ b/Reconstruction/eflowRec/eflowRec/eflowOverlapRemoval.h @@ -25,6 +25,9 @@ class StoreGateSvc; //C++ #include <string> +/** + Algorithm inheriting from eflowBaseAlg. This performs overlap checks between topocluster (which are represented by neutral PFO) and electrons/photons and decorates the PFO with the decision. This is needed for the MET calculations. +*/ class eflowOverlapRemoval : public AthAlgorithm { public: diff --git a/Reconstruction/eflowRec/eflowRec/eflowRecCluster.h b/Reconstruction/eflowRec/eflowRec/eflowRecCluster.h index 2d884ef98314..8cab141828cd 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowRecCluster.h +++ b/Reconstruction/eflowRec/eflowRec/eflowRecCluster.h @@ -27,6 +27,9 @@ class eflowTrackClusterLink; class eflowMatchCluster; +/** +This class extends the information about a xAOD::CaloCluster. It includes an element link and raw pointer back to the CaloCluster, the index of the cluster in the CaloClusterContainer, a bool to determine if the CaloCluster is allowed to be modified or not (only if we have already copied the CaloCluster), the type (ECAL/HCAL), a map to store the LC weights for the calorimeter cluster cells, a pointer to an eflowMatchCluster and a vector of eflowTrackClusterLink +*/ class eflowRecCluster { public: eflowRecCluster(const ElementLink<xAOD::CaloClusterContainer>& clusElementLink); @@ -85,6 +88,9 @@ public: }; }; +/** + This class, which inherits from the pure virtual ICluster, stores a pointer to an eflowRecCluster. It also stores assorted kinematic information such as cluster energy, mean energy weighted eta/phi values etc. +*/ class eflowMatchCluster: public PFMatch::ICluster { public: eflowMatchCluster(eflowRecCluster* efRecCluster) : m_efRecCluster(efRecCluster), m_clusterEne(m_efRecCluster->getCluster()->e()), m_clusterEta(m_efRecCluster->getCluster()->eta()), m_clusterPhi(m_efRecCluster->getCluster()->phi()), m_clusterEtaMean(0.0), m_clusterPhiMean(0.0), m_clusterEtaVariance(0), m_clusterPhiVariance(0), m_calVariance(false) { diff --git a/Reconstruction/eflowRec/eflowRec/eflowRecTrack.h b/Reconstruction/eflowRec/eflowRec/eflowRecTrack.h index 10421e1528fa..78a54d78c151 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowRecTrack.h +++ b/Reconstruction/eflowRec/eflowRec/eflowRecTrack.h @@ -39,6 +39,9 @@ class eflowTrackExtrapolatorBaseAlgTool; class IMessageSvc; class ISvcLocator; +/** +This class extends the information about a xAOD::Track. It stores an ElementLink to a track, a raw pointer to that track, the expected energy deposit (mean and width of the reference distribution) of the track in the calorimeter, the pull15 variable (used to decide whether to run the charged shower subtraction or not), a bool to tag whether this track is in an energy dense calorimeter environment (if it is, then the charged shower subtraction is not run for that track), a bool to signify if the track has already had its shower removed from the calorimeter clusters and a bool to signify if we found a reference e/p bin (which depends on the track eta,pt and LHED). In addition to these variables we store a pointer to an eflowTrackCaloPoints object, a reference to an eflowRingSubtractionManager object and a vector of pointers to eflowTrackClusterLink. There is also an option to store additional vectors in a map using a string as a key (this allows us to store sets of eflowTrackClusterLink for multiple track-cluster matching schemes). +*/ class eflowRecTrack { public: eflowRecTrack(const ElementLink<xAOD::TrackParticleContainer>& trackElemLink, @@ -153,6 +156,10 @@ public: } }; }; + +/** +This class, which inherits from the pure virtual ITrack, stores a pointer to an eflowRecTrack and has an interface which returns an eflowEtaPhiPosition (representing the track eta, phi coordinates in the requested calorimeter layer) +*/ class eflowRecMatchTrack: public PFMatch::ITrack { public: eflowRecMatchTrack(const eflowRecTrack* efRecTrack): m_efRecTrack(efRecTrack) { assert(m_efRecTrack); } diff --git a/Reconstruction/eflowRec/eflowRec/eflowRingSubtractionManager.h b/Reconstruction/eflowRec/eflowRec/eflowRingSubtractionManager.h index b881987a46d8..a80da892c180 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowRingSubtractionManager.h +++ b/Reconstruction/eflowRec/eflowRec/eflowRingSubtractionManager.h @@ -25,6 +25,9 @@ class eflowFirstIntParameters; typedef std::pair<eflowCaloENUM,short> RingId; +/** +This stores information, a rank and ring thickness, about cell rings in an ordered way. The rings are ranked in descending energy density order. A ring is a list of calorimeter cells, in a given calorimeter layer, between two radii r1 and r2. This object is stored in the eflowRecTrack object, such that we have an eflowRingSubtractionManager for each track. The data in this object is filled in the simulateShower method of eflowCaloObject. +*/ class eflowRingSubtractionManager { public: diff --git a/Reconstruction/eflowRec/eflowRec/eflowSubtractor.h b/Reconstruction/eflowRec/eflowRec/eflowSubtractor.h index 4eeaf692999f..acc87b0ee277 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowSubtractor.h +++ b/Reconstruction/eflowRec/eflowRec/eflowSubtractor.h @@ -27,6 +27,9 @@ class eflowEEtaBinnedParameters; namespace eflowSubtract { + /** +Used in eflowCellLevelSubtractionTool and eflowRecoverSplitShowersTool to perform the removal of calorimeter cells from clusters. Makes use of eflowCellList, eflowRingSubtractionManager and eflowCellSubtractionFacilitator. + */ class Subtractor{ public: diff --git a/Reconstruction/eflowRec/eflowRec/eflowTrackCaloDummyExtensionTool.h b/Reconstruction/eflowRec/eflowRec/eflowTrackCaloDummyExtensionTool.h index 3128b3be2c41..1235537a1f47 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowTrackCaloDummyExtensionTool.h +++ b/Reconstruction/eflowRec/eflowRec/eflowTrackCaloDummyExtensionTool.h @@ -21,6 +21,9 @@ class eflowTrackCaloPoints; static const InterfaceID IID_eflowTrackCaloDummyExtensionTool("eflowTrackCaloDummyExtensionTool", 1, 0); +/* +Inherits from eflowTrackExtrapolatorBaseAlgTool and AthAlgTool. Uses simple parameterisation to extrapolate tracks to the calorimeter, and creates an eflowTrackCaloPoints object. +*/ class eflowTrackCaloDummyExtensionTool: virtual public eflowTrackExtrapolatorBaseAlgTool, public AthAlgTool { public: diff --git a/Reconstruction/eflowRec/eflowRec/eflowTrackCaloExtensionTool.h b/Reconstruction/eflowRec/eflowRec/eflowTrackCaloExtensionTool.h index f1c6dcc189a7..323530356f4d 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowTrackCaloExtensionTool.h +++ b/Reconstruction/eflowRec/eflowRec/eflowTrackCaloExtensionTool.h @@ -23,13 +23,16 @@ #include "RecoToolInterfaces/IParticleCaloExtensionTool.h" namespace Trk { -//class IParticleCaloExtensionTool; + class TrackParametersIdHelper; } class eflowTrackCaloPoints; static const InterfaceID IID_eflowTrackCaloExtensionTool("eflowTrackCaloExtensionTool", 1, 0); +/** + Inherits from eflowTrackExtrapolatorBaseAlgTool and AthAlgTool. Uses ParticleCaloExtenstionTool to extrapolate tracks to the calorimeter, and creates an eflowTrackCaloPoints object. +*/ class eflowTrackCaloExtensionTool: virtual public eflowTrackExtrapolatorBaseAlgTool, public AthAlgTool { public: diff --git a/Reconstruction/eflowRec/eflowRec/eflowTrackCaloPoints.h b/Reconstruction/eflowRec/eflowRec/eflowTrackCaloPoints.h index 48618786ad55..2fa0bf3ec14f 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowTrackCaloPoints.h +++ b/Reconstruction/eflowRec/eflowRec/eflowTrackCaloPoints.h @@ -24,7 +24,9 @@ CREATED: 4th January, 2006 class MsgStream; - +/** +This class stores a map of calorimeter layers and track parameters (the result of the track extrapolation to the calorimeter layers). It also stores maps from calorimeter layers to positions, directions and eflowEtaPhiPositions. +*/ class eflowTrackCaloPoints { public: diff --git a/Reconstruction/eflowRec/eflowRec/eflowTrackClusterLink.h b/Reconstruction/eflowRec/eflowRec/eflowTrackClusterLink.h index 6bf9661efd89..ac5dc5f279ad 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowTrackClusterLink.h +++ b/Reconstruction/eflowRec/eflowRec/eflowTrackClusterLink.h @@ -25,6 +25,9 @@ class eflowRecTrack; class eflowRecCluster; +/** + Stores pointers to an eflowRecTrack and an eflowRecCluster. These pointers are inserted in the InstanceMap stored. We also store a vector of energy density, around the track impact point in each calorimeter layer, corresponding to the layers in the calorimeter. +*/ class eflowTrackClusterLink { private: typedef std::map<std::pair<eflowRecTrack*, eflowRecCluster*>, std::unique_ptr<eflowTrackClusterLink> > InstanceMap; diff --git a/Reconstruction/eflowRec/eflowRec/eflowTrackExtrapolatorBaseAlgTool.h b/Reconstruction/eflowRec/eflowRec/eflowTrackExtrapolatorBaseAlgTool.h index 907b65fdc9ba..d1a848671114 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowTrackExtrapolatorBaseAlgTool.h +++ b/Reconstruction/eflowRec/eflowRec/eflowTrackExtrapolatorBaseAlgTool.h @@ -22,6 +22,9 @@ CREATED: 24th January, 2005 class eflowTrackCaloPoints; +/* +Pure virtual base class, inherits from IAlgTool. Defines execute method which takes xAOD::Track pointer and returns eflowTrackCaloPoints pointer. +*/ class eflowTrackExtrapolatorBaseAlgTool : virtual public IAlgTool { public: virtual std::unique_ptr<eflowTrackCaloPoints> execute(const xAOD::TrackParticle* track) const = 0; diff --git a/Reconstruction/eflowRec/eflowRec/eflowUtil.h b/Reconstruction/eflowRec/eflowRec/eflowUtil.h index c86e344b4db1..2a6624f669e0 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowUtil.h +++ b/Reconstruction/eflowRec/eflowRec/eflowUtil.h @@ -15,6 +15,9 @@ #include <sstream> #include <math.h> +/** + eflowAzimuth represents phi and has kinematic functions which correctly deal with phi wraparound etc. +*/ class eflowAzimuth { public: eflowAzimuth(double phi): m_value(phi) { if (phi != -999.) adjustRange(); } @@ -104,6 +107,9 @@ private: eflowAzimuth m_phi; }; +/** +eflowRangeBase is an object to represent a length in eta or phi, and this is used in eflowCellIntegrator as a variable in the integrations over eta and phi. +*/ template <class T> class eflowRangeBase{ public: -- GitLab From 6714806f4d951cdf27475f4093c5b75124741137 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Thu, 28 Jun 2018 11:13:26 +0200 Subject: [PATCH 276/562] SGTools: Note in comments the importance of DataProxy member ordering. Documentation fix: The layout of DataProxy/TransientAddress was optimized for cache-friendliness. Note this in the comments. Former-commit-id: fc66ee0b064db497e6403e64974c8d3543aee06d --- Control/SGTools/SGTools/DataProxy.h | 5 +++++ Control/SGTools/SGTools/TransientAddress.h | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/Control/SGTools/SGTools/DataProxy.h b/Control/SGTools/SGTools/DataProxy.h index e1bfc417232b..40501c37695a 100755 --- a/Control/SGTools/SGTools/DataProxy.h +++ b/Control/SGTools/SGTools/DataProxy.h @@ -271,6 +271,11 @@ class DataStore; /// Drop the reference to the data object. void resetRef(); + // PLEASE NOTE: The data members of this class are ordered so that + // the most frequently accessed members are grouped together, within + // the first cache line. See the layout at the end of this file. + // Be aware of this when making changes to the layout of this class. + unsigned int m_refCount; ///reset and not delete: default is true diff --git a/Control/SGTools/SGTools/TransientAddress.h b/Control/SGTools/SGTools/TransientAddress.h index 9dbe6ea293a4..175f540c2cb6 100755 --- a/Control/SGTools/SGTools/TransientAddress.h +++ b/Control/SGTools/SGTools/TransientAddress.h @@ -145,6 +145,13 @@ namespace SG { const EventContext& contextFromStore (IProxyDict* store) const; + // PLEASE NOTE: The data members of this class are ordered so that + // the most frequently accessed members are grouped together, within + // the first cache line, when it is embedded in DataProxy. See the layout + // at the end of DataProxy.h. + // Be aware of this when making changes to the layout of this class. + + ///< clid of the concrete class (persistent clid) CLID m_clid; -- GitLab From 87668055f1465a48a077b04ee02c73e71e791378 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Thu, 28 Jun 2018 11:16:47 +0200 Subject: [PATCH 277/562] AthContainersRoot: Fix issues found by the thread-safety static checker. Fix issues relating to const-correctness and use of static data. Former-commit-id: bc1c4b27fb355399d3a035c2f5694446ea042378 --- .../ATLAS_CHECK_THREAD_SAFETY | 1 + .../AthContainersRoot/RootAuxVectorFactory.h | 9 ++++++-- .../AthContainersRoot/src/AuxStoreRoot.cxx | 21 +++++++++++++------ .../src/RootAuxVectorFactory.cxx | 5 +++-- .../test/getDynamicAuxID_test.cxx | 2 +- 5 files changed, 27 insertions(+), 11 deletions(-) create mode 100644 Control/AthContainersRoot/AthContainersRoot/ATLAS_CHECK_THREAD_SAFETY diff --git a/Control/AthContainersRoot/AthContainersRoot/ATLAS_CHECK_THREAD_SAFETY b/Control/AthContainersRoot/AthContainersRoot/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 000000000000..2d924fee738b --- /dev/null +++ b/Control/AthContainersRoot/AthContainersRoot/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Control/AthContainersRoot diff --git a/Control/AthContainersRoot/AthContainersRoot/RootAuxVectorFactory.h b/Control/AthContainersRoot/AthContainersRoot/RootAuxVectorFactory.h index ec088a61a0b0..bf68a65d3d97 100644 --- a/Control/AthContainersRoot/AthContainersRoot/RootAuxVectorFactory.h +++ b/Control/AthContainersRoot/AthContainersRoot/RootAuxVectorFactory.h @@ -21,6 +21,7 @@ #include "AthContainersInterfaces/IAuxTypeVectorFactory.h" #include "AthContainersInterfaces/IAuxTypeVector.h" #include "RootUtils/Type.h" +#include "CxxUtils/checker_macros.h" class TClass; @@ -261,14 +262,18 @@ public: /** * @brief Return the @c TClass for the overall object. + * + * (Returning non-const TClass* ok here; TClass is internally thread-safe.) */ - TClass* objClass() const { return m_objClass; } + TClass* objClass ATLAS_NOT_CONST_THREAD_SAFE () const { return m_objClass; } /** * @brief Return the @c TClass for the @c std::vector. + * + * (Returning non-const TClass* ok here; TClass is internally thread-safe.) */ - TClass* vecClass() const { return m_vecClass; } + TClass* vecClass ATLAS_NOT_CONST_THREAD_SAFE () const { return m_vecClass; } /** diff --git a/Control/AthContainersRoot/src/AuxStoreRoot.cxx b/Control/AthContainersRoot/src/AuxStoreRoot.cxx index cdbcbd28f2bd..d00c6b83668e 100644 --- a/Control/AthContainersRoot/src/AuxStoreRoot.cxx +++ b/Control/AthContainersRoot/src/AuxStoreRoot.cxx @@ -16,6 +16,7 @@ #include "AthContainers/exceptions.h" #include "AthContainers/tools/error.h" #include "RootUtils/Type.h" +#include "CxxUtils/checker_macros.h" #include "TROOT.h" #include "TBranch.h" #include "TLeaf.h" @@ -142,8 +143,11 @@ const void* AuxStoreRoot::getData(SG::auxid_t auxid) const // lock const void* ret = SG::AuxStoreInternal::getData (auxid); if (!ret) { - if (const_cast<AuxStoreRoot*>(this)->readData(auxid)) + // Const-cast ok; protected by mutex. + AuxStoreRoot* p ATLAS_THREAD_SAFE = const_cast<AuxStoreRoot*>(this); + if (p->readData (auxid)) { ret = SG::AuxStoreInternal::getData (auxid); + } } return ret; } @@ -167,11 +171,13 @@ const void* AuxStoreRoot::getData(SG::auxid_t auxid) const * * If the container is locked, throw an exception. */ -void* AuxStoreRoot::getData(SG::auxid_t auxid, - size_t /*size*/, size_t /*capacity*/) +void* AuxStoreRoot::getData (SG::auxid_t auxid, + size_t /*size*/, size_t /*capacity*/) { // MN: how do we add new attributes to this store? A:for now we don't - return const_cast<void*>(getData(auxid)); + // Const-cast ok because this method is non-const. + void* p ATLAS_THREAD_SAFE = const_cast<void*> (getData(auxid)); + return p; } @@ -221,8 +227,11 @@ const void* AuxStoreRoot::getIOData(SG::auxid_t auxid) const guard_t guard (m_mutex); const void* ret = SG::AuxStoreInternal::getIODataInternal (auxid, true); if (!ret) { - if (const_cast<AuxStoreRoot*>(this)->readData(auxid)) + // Const-cast ok; protected by mutex. + AuxStoreRoot* p ATLAS_THREAD_SAFE = const_cast<AuxStoreRoot*>(this); + if (p->readData (auxid)) { ret = SG::AuxStoreInternal::getIOData (auxid); + } } return ret; } @@ -297,7 +306,7 @@ bool AuxStoreRoot::readData(SG::auxid_t auxid) setOption (auxid, SG::AuxDataOption ("nbits", 32)); } - void* vector = const_cast<void*>(SG::AuxStoreInternal::getIOData (auxid)); // xxx + void* vector = SG::AuxStoreInternal::getIODataInternal (auxid, false); return doReadData (m_container, auxid, *branch, cl, vector, m_entry); } diff --git a/Control/AthContainersRoot/src/RootAuxVectorFactory.cxx b/Control/AthContainersRoot/src/RootAuxVectorFactory.cxx index 51293cf85d06..1de80ad311af 100644 --- a/Control/AthContainersRoot/src/RootAuxVectorFactory.cxx +++ b/Control/AthContainersRoot/src/RootAuxVectorFactory.cxx @@ -17,6 +17,7 @@ #include "AthContainers/normalizedTypeinfoName.h" #include "AthLinks/ElementLinkBase.h" #include "CxxUtils/ClassName.h" +#include "CxxUtils/checker_macros.h" #include "TClass.h" #include "TVirtualCollectionProxy.h" #include "TROOT.h" @@ -63,7 +64,7 @@ RootAuxVector::RootAuxVector (const RootAuxVectorFactory* factory, : m_factory (factory), m_ownFlag (true) { - TClass* vecClass = factory->vecClass(); + const TClass* vecClass = factory->vecClass(); m_proxy = vecClass->GetCollectionProxy(); m_obj = factory->objClass()->New (); m_vec = reinterpret_cast<char*> (m_obj) + factory->offset(); @@ -91,7 +92,7 @@ RootAuxVector::RootAuxVector (const RootAuxVectorFactory* factory, m_ownFlag (ownFlag) { if (isPacked) std::abort(); - TClass* vecClass = factory->vecClass(); + const TClass* vecClass = factory->vecClass(); m_proxy = vecClass->GetCollectionProxy(); m_obj = data; m_vec = reinterpret_cast<char*> (m_obj) + factory->offset(); diff --git a/Control/AthContainersRoot/test/getDynamicAuxID_test.cxx b/Control/AthContainersRoot/test/getDynamicAuxID_test.cxx index bc9c3b32adc1..a0c0c7767417 100644 --- a/Control/AthContainersRoot/test/getDynamicAuxID_test.cxx +++ b/Control/AthContainersRoot/test/getDynamicAuxID_test.cxx @@ -85,7 +85,7 @@ void test1 (SG::auxid_t a1_id) SG::auxid_t init() { - static SG::AuxElement::Accessor<int> a1 ("a1"); + static const SG::AuxElement::Accessor<int> a1 ("a1"); return a1.auxid(); } -- GitLab From 5c96cbca6132d1f8b2ae8ac2e0edeff789a2ca18 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Thu, 28 Jun 2018 11:16:37 +0200 Subject: [PATCH 278/562] AthContainers: Add a non-const version of getIODataInternal. Needed to get AthContainersRoot to pass the thread-safety checker. Former-commit-id: 206588ce85a31e001d67a3275f727345ae2ede69 --- .../AthContainers/AuxStoreInternal.h | 14 +++++++++ .../AthContainers/Root/AuxStoreInternal.cxx | 31 +++++++++++++++++++ .../test/AuxStoreInternal_test.cxx | 2 ++ 3 files changed, 47 insertions(+) diff --git a/Control/AthContainers/AthContainers/AuxStoreInternal.h b/Control/AthContainers/AthContainers/AuxStoreInternal.h index 99e2cbfebb77..1da53ef81c4f 100644 --- a/Control/AthContainers/AthContainers/AuxStoreInternal.h +++ b/Control/AthContainers/AthContainers/AuxStoreInternal.h @@ -333,6 +333,20 @@ protected: const void* getIODataInternal (auxid_t auxid, bool quiet) const; + /** + * @brief Return a pointer to the data to be stored for one aux data item. + * @param auxid The identifier of the desired aux data item. + * @param quiet If true, then don't print an error on failure. + * + * This will usually be a pointer to a @c std::vector; however, it may + * be something different for a standalone object. + * + * Returns 0 and reports an error if the requested aux data item + * does not exist. + */ + void* getIODataInternal (auxid_t auxid, bool quiet); + + /** * @brief Add a new auxid to the set of those being managed by this store. * @param auxid The auxid to add. diff --git a/Control/AthContainers/Root/AuxStoreInternal.cxx b/Control/AthContainers/Root/AuxStoreInternal.cxx index 29c6f7527372..c27b92f1629b 100644 --- a/Control/AthContainers/Root/AuxStoreInternal.cxx +++ b/Control/AthContainers/Root/AuxStoreInternal.cxx @@ -416,6 +416,37 @@ const void* AuxStoreInternal::getIODataInternal (auxid_t auxid, bool quiet) cons } +/** + * @brief Return a pointer to the data to be stored for one aux data item. + * @param auxid The identifier of the desired aux data item. + * @param quiet If true, then don't print an error on failure. + * + * This will usually be a pointer to a @c std::vector; however, it may + * be something different for a standalone object. + * + * Returns 0 and reports an error if the requested aux data item + * does not exist. + */ +void* AuxStoreInternal::getIODataInternal (auxid_t auxid, bool quiet) +{ + guard_t guard (m_mutex); + if (auxid >= m_vecs.size() || !m_vecs[auxid]) { + if (!quiet) { + std::ostringstream ss; + ss << "Requested variable " + << SG::AuxTypeRegistry::instance().getName (auxid) + << " (" << auxid << ") doesn't exist"; + ATHCONTAINERS_ERROR("AuxStoreInternal::getIODataInternal", ss.str()); + } + return 0; + } + + if (m_standalone) + return m_vecs[auxid]->toPtr(); + return m_vecs[auxid]->toVector(); +} + + /** * @brief Return a pointer to the data to be stored for one aux data item. * @param auxid The identifier of the desired aux data item. diff --git a/Control/AthContainers/test/AuxStoreInternal_test.cxx b/Control/AthContainers/test/AuxStoreInternal_test.cxx index 5b922f4abd55..3234083517a8 100644 --- a/Control/AthContainers/test/AuxStoreInternal_test.cxx +++ b/Control/AthContainers/test/AuxStoreInternal_test.cxx @@ -55,6 +55,7 @@ class AuxStoreInternalTest public: using SG::AuxStoreInternal::addAuxID; using SG::AuxStoreInternal::addVector; + using SG::AuxStoreInternal::getIODataInternal; }; @@ -133,6 +134,7 @@ void test1() const std::vector<int>* v1 = reinterpret_cast<const std::vector<int>*> (s.getIOData(ityp1)); assert (&*v1->begin() == i1c); + assert (s.getIOData(ityp1) == s.getIODataInternal(ityp1, false)); const SG::auxid_set_t& ids = s.getAuxIDs(); assert (ids.size() == 3); -- GitLab From 58a0dbc7afa0c27089c12d92e6a87a0cbcbaf4ea Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Thu, 28 Jun 2018 11:12:56 +0200 Subject: [PATCH 279/562] AthenaBaseComps: Make sure to start() conditions handle keys recursively. In the AthAlg base classes, we extend start so that it calls a start() method on all registered read conditions handle keys. This is to allow them to be able to find and cache a pointer to the conditions container (initialize() is often too early for this). However, we were not doing this for private tools owned by the algorithms. Extended so that we visit all the tools recursively. Former-commit-id: 1c511d6e0924f48f500c324007139577bcfed92e --- Control/AthenaBaseComps/CMakeLists.txt | 5 + .../share/AthAlgStartVisitor_test.ref | 59 +++++++++ .../src/AthAlgStartVisitor.cxx | 35 ++++++ .../AthenaBaseComps/src/AthAlgStartVisitor.h | 51 ++++++++ Control/AthenaBaseComps/src/AthAlgorithm.cxx | 10 +- .../src/AthReentrantAlgorithm.cxx | 10 +- .../test/AthAlgStartVisitor_test.cxx | 113 ++++++++++++++++++ 7 files changed, 269 insertions(+), 14 deletions(-) create mode 100644 Control/AthenaBaseComps/share/AthAlgStartVisitor_test.ref create mode 100644 Control/AthenaBaseComps/src/AthAlgStartVisitor.cxx create mode 100644 Control/AthenaBaseComps/src/AthAlgStartVisitor.h create mode 100644 Control/AthenaBaseComps/test/AthAlgStartVisitor_test.cxx diff --git a/Control/AthenaBaseComps/CMakeLists.txt b/Control/AthenaBaseComps/CMakeLists.txt index 1e770035316c..96b3f693f3d3 100644 --- a/Control/AthenaBaseComps/CMakeLists.txt +++ b/Control/AthenaBaseComps/CMakeLists.txt @@ -53,3 +53,8 @@ atlas_add_test( AthAlgorithmDHUpdate_test SOURCES test/AthAlgorithmDHUpdate_test.cxx LINK_LIBRARIES StoreGateLib GaudiKernel TestTools AthenaBaseComps ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" ) + + atlas_add_test( AthAlgStartVisitor_test + SOURCES test/AthAlgStartVisitor_test.cxx + LINK_LIBRARIES StoreGateLib GaudiKernel TestTools AthenaBaseComps + ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" ) diff --git a/Control/AthenaBaseComps/share/AthAlgStartVisitor_test.ref b/Control/AthenaBaseComps/share/AthAlgStartVisitor_test.ref new file mode 100644 index 000000000000..61a60fc5eccc --- /dev/null +++ b/Control/AthenaBaseComps/share/AthAlgStartVisitor_test.ref @@ -0,0 +1,59 @@ + + +Initializing Gaudi ApplicationMgr using job opts ../share/propertyHandling_test.txt +JobOptionsSvc INFO # =======> /home/sss/atlas/dvtest/build/../tests/../share/propertyHandling_test.txt +JobOptionsSvc INFO # (1,1): alg.rkey = "FooSvc+aaa" +JobOptionsSvc INFO # (2,1): alg.wkey = "BarSvc+bbb" +JobOptionsSvc INFO # (3,1): alg.ukey = "ccc" +JobOptionsSvc INFO # (4,1): alg.rhandle = "FooSvc+ddd" +JobOptionsSvc INFO # (5,1): alg.whandle = "BarSvc+eee" +JobOptionsSvc INFO # (6,1): alg.uhandle = "fff" +JobOptionsSvc INFO # (7,1): alg.rdkey = "FooSvc+ggg.qqq" +JobOptionsSvc INFO # (8,1): alg.wdkey = "hhh.rrr" +JobOptionsSvc INFO # (9,1): alg.rckey = "iii" +JobOptionsSvc INFO # (10,1): alg.wckey = "jjj" +JobOptionsSvc INFO # (12,1): alg.gp_rkey = "AAA_gp" +JobOptionsSvc INFO # (14,1): tool.rkey = "FooSvc+taa" +JobOptionsSvc INFO # (15,1): tool.wkey = "BarSvc+tbb" +JobOptionsSvc INFO # (16,1): tool.ukey = "tcc" +JobOptionsSvc INFO # (17,1): tool.rhandle = "FooSvc+tdd" +JobOptionsSvc INFO # (18,1): tool.whandle = "BarSvc+tee" +JobOptionsSvc INFO # (19,1): tool.uhandle = "tff" +JobOptionsSvc INFO # (20,1): tool.rdkey = "FooSvc+tgg.qqq" +JobOptionsSvc INFO # (21,1): tool.wdkey = "thh.rrr" +JobOptionsSvc INFO # (22,1): tool.rckey = "tii" +JobOptionsSvc INFO # (23,1): tool.wckey = "tjj" +JobOptionsSvc INFO # (25,1): ralg.rkey = "FooSvc+aaa" +JobOptionsSvc INFO # (26,1): ralg.whandle = "BarSvc+eee" +JobOptionsSvc INFO # (27,1): ralg.rdkey = "FooSvc+yyy.qqq" +JobOptionsSvc INFO # (28,1): ralg.wdkey = "zzz.rrr" +JobOptionsSvc INFO # (30,1): arralg.rkeyarr = ["raa", "rbb", "rcc", "rdd", "ree", "rff"] +JobOptionsSvc INFO # (31,1): arralg.wkeyarr = ["waa", "wbb", "wcc", "wdd", "wee", "wff"] +JobOptionsSvc INFO # (32,1): arralg.rkey = "rrr" +JobOptionsSvc INFO # (33,1): arralg.wkey = "www" +JobOptionsSvc INFO # (35,1): arralg2.rkeyarr = ["aaa"] +JobOptionsSvc INFO # (36,1): arralg2.wkeyarr = ["aaa"] +JobOptionsSvc INFO # (39,1): tool2.rkey = "taa" +JobOptionsSvc INFO # (40,1): tool2.whandle = "tee" +JobOptionsSvc INFO # (41,1): tool2.rdkey = "tgg.qqq" +JobOptionsSvc INFO # (42,1): tool2.wdkey = "thh.rrr" +JobOptionsSvc INFO # (44,1): arrtool.rkeyarr = ["raa", "rbb", "rcc", "rdd", "ree", "rff"] +JobOptionsSvc INFO # (45,1): arrtool.wkeyarr = ["waa", "wbb", "wcc", "wdd", "wee", "wff"] +JobOptionsSvc INFO # (46,1): arrtool.rkey = "rrr" +JobOptionsSvc INFO # (47,1): arrtool.wkey = "www" +JobOptionsSvc INFO # (49,1): arrtool2.rkeyarr = ["aaa"] +JobOptionsSvc INFO # (50,1): arrtool2.wkeyarr = ["aaa"] +JobOptionsSvc INFO Job options successfully read in from ../share/propertyHandling_test.txt +ApplicationMgr SUCCESS +==================================================================================================================================== + Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99) + running on karma on Tue Jun 26 12:55:45 2018 +==================================================================================================================================== +ApplicationMgr INFO Application Manager Configured successfully +EventLoopMgr WARNING Unable to locate service "EventSelector" +EventLoopMgr WARNING No events will be processed from external input. +HistogramPersis...WARNING Histograms saving not required. +ApplicationMgr INFO Application Manager Initialized successfully +ApplicationMgr Ready +AthAlgStartVisitor_test +test1 diff --git a/Control/AthenaBaseComps/src/AthAlgStartVisitor.cxx b/Control/AthenaBaseComps/src/AthAlgStartVisitor.cxx new file mode 100644 index 000000000000..f6699ccd30fc --- /dev/null +++ b/Control/AthenaBaseComps/src/AthAlgStartVisitor.cxx @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration. + */ +// $Id$ +/** + * @file AthenaBaseComps/src/AthAlgStartVisitor.cxx + * @author scott snyder <snyder@bnl.gov> + * @date Jun, 2018 + * @brief + */ + + +#include "AthAlgStartVisitor.h" +#include "StoreGate/VarHandleKey.h" + + +/** + * @brief Visit a component and start() any read conditions handles. + * @param holder The component to visit. + */ +void AthAlgStartVisitor::visit (const IDataHandleHolder* holder) +{ + // Make sure we process a component only once. + if (m_seen.insert (holder).second) { + // Call start() on all read conditions handle keys. + for (Gaudi::DataHandle* h : holder->inputHandles()) { + if (h->isCondition()) { + if (SG::VarHandleKey* k = dynamic_cast<SG::VarHandleKey*> (h)) { + k->start().ignore(); + } + } + } + holder->acceptDHVisitor (this); + } +} diff --git a/Control/AthenaBaseComps/src/AthAlgStartVisitor.h b/Control/AthenaBaseComps/src/AthAlgStartVisitor.h new file mode 100644 index 000000000000..e1c35f862089 --- /dev/null +++ b/Control/AthenaBaseComps/src/AthAlgStartVisitor.h @@ -0,0 +1,51 @@ +// This file's extension implies that it's C, but it's really -*- C++ -*-. +/* + * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration. + */ +// $Id$ +/** + * @file AthenaBaseComps/src/AthAlgStartVisitor.h + * @author scott snyder <snyder@bnl.gov> + * @date Jun, 2018 + * @brief Call start() on all ReadCondHandle's of an algorithm. + */ + + +#ifndef ATHENABASECOMPS_ATHALGSTARTVISITOR_H +#define ATHENABASECOMPS_ATHALGSTARTVISITOR_H + + +#include "GaudiKernel/IDataHandleHolder.h" +#include <unordered_set> + + +/** + * @brief Call start() on all ReadCondHandle's of an algorithm. + * + * For efficient conditions handling, a CondHandleKey needs to cache a pointer + * to the conditions container. initialize() is too early for this as conditions + * containers made by CondInputLoader are not created until start(). So during + * the start() of an algorithm, we visit all read conditions handle keys + * and call start() on them, to give them the opportunity to look up the + * conditions object. + * + * We use @c IDataHandleVisitor to do this recursively for all owned tools as well. + */ +class AthAlgStartVisitor + : public IDataHandleVisitor +{ +public: + /** + * @brief Visit a component and start() any read conditions handles. + * @param holder The component to visit. + */ + virtual void visit (const IDataHandleHolder* holder) override; + + +private: + /// Keep track of components we've already processed. + std::unordered_set<const IDataHandleHolder*> m_seen; +}; + + +#endif // not ATHENABASECOMPS_ATHALGSTARTVISITOR_H diff --git a/Control/AthenaBaseComps/src/AthAlgorithm.cxx b/Control/AthenaBaseComps/src/AthAlgorithm.cxx index 9381c1e1a925..23e3596341b9 100644 --- a/Control/AthenaBaseComps/src/AthAlgorithm.cxx +++ b/Control/AthenaBaseComps/src/AthAlgorithm.cxx @@ -12,6 +12,7 @@ // AthenaBaseComps includes #include "AthenaBaseComps/AthAlgorithm.h" #include "AthAlgorithmDHUpdate.h" +#include "AthAlgStartVisitor.h" // STL includes @@ -165,13 +166,8 @@ StatusCode AthAlgorithm::sysStart() // This allows CondHandleKeys to cache pointers to their conditions containers. // (CondInputLoader makes the containers that it creates during start(), // so initialize() is too early for this.) - for (Gaudi::DataHandle* h : inputHandles()) { - if (h->isCondition()) { - if (SG::VarHandleKey* k = dynamic_cast<SG::VarHandleKey*> (h)) { - ATH_CHECK( k->start() ); - } - } - } + AthAlgStartVisitor visitor; + acceptDHVisitor (&visitor); return StatusCode::SUCCESS; } diff --git a/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx b/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx index a7c5bb5d5ad8..5fe57b5c0a4e 100644 --- a/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx +++ b/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx @@ -12,6 +12,7 @@ // AthenaBaseComps includes #include "AthenaBaseComps/AthReentrantAlgorithm.h" #include "AthAlgorithmDHUpdate.h" +#include "AthAlgStartVisitor.h" // Framework includes #include "GaudiKernel/Property.h" @@ -214,13 +215,8 @@ StatusCode AthReentrantAlgorithm::sysStart() // This allows CondHandleKeys to cache pointers to their conditions containers. // (CondInputLoader makes the containers that it creates during start(), // so initialize() is too early for this.) - for (Gaudi::DataHandle* h : inputHandles()) { - if (h->isCondition()) { - if (SG::VarHandleKey* k = dynamic_cast<SG::VarHandleKey*> (h)) { - ATH_CHECK( k->start() ); - } - } - } + AthAlgStartVisitor visitor; + acceptDHVisitor (&visitor); return StatusCode::SUCCESS; } diff --git a/Control/AthenaBaseComps/test/AthAlgStartVisitor_test.cxx b/Control/AthenaBaseComps/test/AthAlgStartVisitor_test.cxx new file mode 100644 index 000000000000..46234e30e17c --- /dev/null +++ b/Control/AthenaBaseComps/test/AthAlgStartVisitor_test.cxx @@ -0,0 +1,113 @@ +/* + * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration. + */ +/** + * @file AthenaBaseComps/test/AthAlgStartVisitor_test.cxx + * @author scott snyder <snyder@bnl.gov> + * @date Jun, 2018 + * @brief Unit test for AthAlgStartVisitor. + */ + +#undef NDEBUG +#include "../src/AthAlgStartVisitor.h" +#include "AthenaBaseComps/AthAlgorithm.h" +#include "AthenaBaseComps/AthAlgTool.h" +#include "TestTools/initGaudi.h" +#include <iostream> +#include <cassert> + + +class TestAlg + : public AthAlgorithm +{ +public: + using AthAlgorithm::AthAlgorithm; + StatusCode execute() override { return StatusCode::SUCCESS; } +}; + + +class TestTool + : public AthAlgTool +{ +public: + using AthAlgTool::AthAlgTool; +}; + + +class TestHandleKey + : public SG::VarHandleKey +{ +public: + TestHandleKey (const std::string& key) + : SG::VarHandleKey (1234, key, + Gaudi::DataHandle::Reader, + "EventStore", true), + m_started (0) + { + } + + virtual StatusCode start() override + { + ++m_started; + return StatusCode::SUCCESS; + } + + int m_started; +}; + + +void test1 (ISvcLocator* svcLoc) +{ + std::cout << "test1\n"; + + TestHandleKey h1 ("h1"); + TestHandleKey h2 ("h2"); + TestHandleKey h3 ("h3"); + TestHandleKey h4 ("h4"); + TestHandleKey h5 ("h5"); + + TestAlg alg ("TestAlg", svcLoc); + alg.addRef(); + alg.declare (h1); + + TestTool tool1 ("TestTool", "tool1", &alg); + alg.registerTool (&tool1); + tool1.declare (h2); + + TestTool tool2 ("TestTool", "tool2", &alg); + alg.registerTool (&tool2); + tool1.declare (h3); + tool1.declare (h4); + + TestTool tool3 ("TestTool", "tool3", &tool2); + tool2.registerTool (&tool3); + tool1.declare (h5); + + assert (h1.m_started == 0); + assert (h2.m_started == 0); + assert (h3.m_started == 0); + assert (h4.m_started == 0); + assert (h5.m_started == 0); + + AthAlgStartVisitor v; + alg.acceptDHVisitor (&v); + + assert (h1.m_started == 1); + assert (h2.m_started == 1); + assert (h3.m_started == 1); + assert (h4.m_started == 1); + assert (h5.m_started == 1); +} + + +int main() +{ + ISvcLocator* svcLoc = nullptr; + if (!Athena_test::initGaudi ("propertyHandling_test.txt", svcLoc)) + return 1; + + std::cout << "AthAlgStartVisitor_test\n"; + test1 (svcLoc); + return 0; +} + -- GitLab From 7d6b9a9546bc4ed7c21f1fbbcd15cc0b11cc5546 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Mon, 11 Jun 2018 17:19:05 +0200 Subject: [PATCH 280/562] AthenaPoolMultiTest: clean up test scripts. Get rid of useless verbosity from test comparison scripts. Former-commit-id: 898556b1fe354b1dbb21dac1532959d52a93341a --- .../AthenaPoolMultiTestCheckCollections.ref | 1634 +++++++++++++++++ .../AthenaPoolMultiTest/test/post_check_bi.sh | 11 +- .../AthenaPoolMultiTest/test/post_check_bs.sh | 28 +- .../AthenaPoolMultiTest/test/post_check_ci.sh | 9 +- .../AthenaPoolMultiTest/test/post_check_cn.sh | 29 +- .../AthenaPoolMultiTest/test/post_check_co.sh | 9 +- .../AthenaPoolMultiTest/test/post_check_es.sh | 9 +- 7 files changed, 1684 insertions(+), 45 deletions(-) create mode 100644 AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestCheckCollections.ref diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestCheckCollections.ref b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestCheckCollections.ref new file mode 100644 index 000000000000..d53594d306ab --- /dev/null +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestCheckCollections.ref @@ -0,0 +1,1634 @@ +ReadData INFO in initialize() +Error in <TUnixSystem::FindDynamicLibrary>: libImt[.so | .dll | .dylib | .sl | .dl | .a] does not exist in /home/sss/atlas/igprof/inst/lib:/home/sss/root/root-6.1.0/rootsys/lib:/usr/local/gcc/lib64:/usr/local/gcc/lib:/home/sss/atlas/rootaccess/build/libs:/home/sss/atlas/extern/Gaudi/current/build/libs:/home/sss/atlas/extern/tdaq/build/libs:/home/sss/atlas/extern/clhep/2.2.0.4/build/libs:/build/libs:/home/sss/atlas/extern/CORAL/CORAL_3_2_0/build/libs:/home/sss/atlas/extern/COOL/COOL_3_2_0/build/libs:/home/sss/atlas/extern/RELAX/RELAX-root6/build/libs:/home/sss/atlas/extern/HepMC/2.0.0/build/libs:/home/sss/atlas/extern/HepPDT/2.0.0/build/libs:/home/sss/atlas/extern/fastjet/fastjet-3.2.1-inst/lib:/home/sss/atlas/extern/HepMCAnalysis/HepMCAnalysis-00-03-04-13-inst/lib:/home/sss/atlas/extern/mctester/mctester-1.2.0-inst/lib:/home/sss/atlas/extern/xmlrcp/ulxmlrpcpp-1.7.3-inst/lib:/home/sss/atlas/extern/Geant/geant4.1.1.patch03.atlasmt02/lib/Linux-g++:/home/sss/atlas/extern/dSFMT/dSFMT-2.1/build/libs:/home/sss/atlas/extern/gperftools/gperftools-2.4-inst/lib:/home/sss/atlas/extern/yampl/inst/lib:/home/sss/atlas/extern/frontier_client/frontier_client__2.8.1__src-inst/lib:/home/sss/atlas/extern/boost/boost_1_66_0-inst/lib:/home/sss/atlas/extern/googletest/googletest-1.7.0-inst/lib:/home/sss/atlas/extern/lhapdf/LHAPDF-6.1.6-inst/lib:/usr/local/lib:.:/home/sss/root/root-6.1.0/rootsys/lib:/lib64/tls/x86_64:/lib64/tls:/lib64/x86_64:/lib64:/usr/lib64/tls/x86_64:/usr/lib64/tls:/usr/lib64/x86_64:/usr/lib64 +EventSelector INFO reinitialization... +EventSelector INFO EventSelection with query +EventSelector INFO Using standard collection ref +AthenaEventLoopMgr INFO Setup EventSelector service EventSelector +AthenaPoolConve... INFO massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 0 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1.2 y = -2.3 z = 226.6 detector = DummyHitDetector +ReadData INFO Hit x = 4.4 y = -8.0 z = 94.7 detector = DummyHitDetector +ReadData INFO Hit x = 7.6 y = -13.7 z = 70.2 detector = DummyHitDetector +ReadData INFO Hit x = 10.8 y = -19.3 z = 59.9 detector = DummyHitDetector +ReadData INFO Hit x = 14.0 y = -25.0 z = 54.2 detector = DummyHitDetector +ReadData INFO Hit x = 17.2 y = -30.7 z = 50.6 detector = DummyHitDetector +ReadData INFO Hit x = 20.4 y = -36.4 z = 48.1 detector = DummyHitDetector +ReadData INFO Hit x = 23.7 y = -42.0 z = 46.3 detector = DummyHitDetector +ReadData INFO Hit x = 26.9 y = -47.7 z = 44.9 detector = DummyHitDetector +ReadData INFO Hit x = 30.1 y = -53.4 z = 43.8 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream1_ref +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 6 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 601.2 y = -2.3 z = -373.3 detector = DummyHitDetector +ReadData INFO Hit x = 604.4 y = -8.0 z = -505.2 detector = DummyHitDetector +ReadData INFO Hit x = 607.6 y = -13.7 z = -529.7 detector = DummyHitDetector +ReadData INFO Hit x = 610.8 y = -19.3 z = -540.0 detector = DummyHitDetector +ReadData INFO Hit x = 614.0 y = -25.0 z = -545.7 detector = DummyHitDetector +ReadData INFO Hit x = 617.2 y = -30.7 z = -549.3 detector = DummyHitDetector +ReadData INFO Hit x = 620.4 y = -36.4 z = -551.8 detector = DummyHitDetector +ReadData INFO Hit x = 623.7 y = -42.0 z = -553.6 detector = DummyHitDetector +ReadData INFO Hit x = 626.9 y = -47.7 z = -555.0 detector = DummyHitDetector +ReadData INFO Hit x = 630.1 y = -53.4 z = -556.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 9 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 901.2 y = -2.3 z = -673.3 detector = DummyHitDetector +ReadData INFO Hit x = 904.4 y = -8.0 z = -805.2 detector = DummyHitDetector +ReadData INFO Hit x = 907.6 y = -13.7 z = -829.7 detector = DummyHitDetector +ReadData INFO Hit x = 910.8 y = -19.3 z = -840.0 detector = DummyHitDetector +ReadData INFO Hit x = 914.0 y = -25.0 z = -845.7 detector = DummyHitDetector +ReadData INFO Hit x = 917.2 y = -30.7 z = -849.3 detector = DummyHitDetector +ReadData INFO Hit x = 920.4 y = -36.4 z = -851.8 detector = DummyHitDetector +ReadData INFO Hit x = 923.7 y = -42.0 z = -853.6 detector = DummyHitDetector +ReadData INFO Hit x = 926.9 y = -47.7 z = -855.0 detector = DummyHitDetector +ReadData INFO Hit x = 930.1 y = -53.4 z = -856.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 12 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1201.2 y = -2.3 z = -973.3 detector = DummyHitDetector +ReadData INFO Hit x = 1204.4 y = -8.0 z = -1105.2 detector = DummyHitDetector +ReadData INFO Hit x = 1207.6 y = -13.7 z = -1129.7 detector = DummyHitDetector +ReadData INFO Hit x = 1210.8 y = -19.3 z = -1140.0 detector = DummyHitDetector +ReadData INFO Hit x = 1214.0 y = -25.0 z = -1145.7 detector = DummyHitDetector +ReadData INFO Hit x = 1217.2 y = -30.7 z = -1149.3 detector = DummyHitDetector +ReadData INFO Hit x = 1220.4 y = -36.4 z = -1151.8 detector = DummyHitDetector +ReadData INFO Hit x = 1223.7 y = -42.0 z = -1153.6 detector = DummyHitDetector +ReadData INFO Hit x = 1226.9 y = -47.7 z = -1155.0 detector = DummyHitDetector +ReadData INFO Hit x = 1230.1 y = -53.4 z = -1156.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 15 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1501.2 y = -2.3 z = -1273.3 detector = DummyHitDetector +ReadData INFO Hit x = 1504.4 y = -8.0 z = -1405.2 detector = DummyHitDetector +ReadData INFO Hit x = 1507.6 y = -13.7 z = -1429.7 detector = DummyHitDetector +ReadData INFO Hit x = 1510.8 y = -19.3 z = -1440.0 detector = DummyHitDetector +ReadData INFO Hit x = 1514.0 y = -25.0 z = -1445.7 detector = DummyHitDetector +ReadData INFO Hit x = 1517.2 y = -30.7 z = -1449.3 detector = DummyHitDetector +ReadData INFO Hit x = 1520.4 y = -36.4 z = -1451.8 detector = DummyHitDetector +ReadData INFO Hit x = 1523.7 y = -42.0 z = -1453.6 detector = DummyHitDetector +ReadData INFO Hit x = 1526.9 y = -47.7 z = -1455.0 detector = DummyHitDetector +ReadData INFO Hit x = 1530.1 y = -53.4 z = -1456.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 16 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1601.2 y = -2.3 z = -1373.3 detector = DummyHitDetector +ReadData INFO Hit x = 1604.4 y = -8.0 z = -1505.2 detector = DummyHitDetector +ReadData INFO Hit x = 1607.6 y = -13.7 z = -1529.7 detector = DummyHitDetector +ReadData INFO Hit x = 1610.8 y = -19.3 z = -1540.0 detector = DummyHitDetector +ReadData INFO Hit x = 1614.0 y = -25.0 z = -1545.7 detector = DummyHitDetector +ReadData INFO Hit x = 1617.2 y = -30.7 z = -1549.3 detector = DummyHitDetector +ReadData INFO Hit x = 1620.4 y = -36.4 z = -1551.8 detector = DummyHitDetector +ReadData INFO Hit x = 1623.7 y = -42.0 z = -1553.6 detector = DummyHitDetector +ReadData INFO Hit x = 1626.9 y = -47.7 z = -1555.0 detector = DummyHitDetector +ReadData INFO Hit x = 1630.1 y = -53.4 z = -1556.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 18 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1801.2 y = -2.3 z = -1573.3 detector = DummyHitDetector +ReadData INFO Hit x = 1804.4 y = -8.0 z = -1705.2 detector = DummyHitDetector +ReadData INFO Hit x = 1807.6 y = -13.7 z = -1729.7 detector = DummyHitDetector +ReadData INFO Hit x = 1810.8 y = -19.3 z = -1740.0 detector = DummyHitDetector +ReadData INFO Hit x = 1814.0 y = -25.0 z = -1745.7 detector = DummyHitDetector +ReadData INFO Hit x = 1817.2 y = -30.7 z = -1749.3 detector = DummyHitDetector +ReadData INFO Hit x = 1820.4 y = -36.4 z = -1751.8 detector = DummyHitDetector +ReadData INFO Hit x = 1823.7 y = -42.0 z = -1753.6 detector = DummyHitDetector +ReadData INFO Hit x = 1826.9 y = -47.7 z = -1755.0 detector = DummyHitDetector +ReadData INFO Hit x = 1830.1 y = -53.4 z = -1756.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 1 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 101.2 y = -2.3 z = 126.6 detector = DummyHitDetector +ReadData INFO Hit x = 104.4 y = -8.0 z = -5.2 detector = DummyHitDetector +ReadData INFO Hit x = 107.6 y = -13.7 z = -29.7 detector = DummyHitDetector +ReadData INFO Hit x = 110.8 y = -19.3 z = -40.0 detector = DummyHitDetector +ReadData INFO Hit x = 114.0 y = -25.0 z = -45.7 detector = DummyHitDetector +ReadData INFO Hit x = 117.2 y = -30.7 z = -49.3 detector = DummyHitDetector +ReadData INFO Hit x = 120.4 y = -36.4 z = -51.8 detector = DummyHitDetector +ReadData INFO Hit x = 123.7 y = -42.0 z = -53.6 detector = DummyHitDetector +ReadData INFO Hit x = 126.9 y = -47.7 z = -55.0 detector = DummyHitDetector +ReadData INFO Hit x = 130.1 y = -53.4 z = -56.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream2_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 2 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 201.2 y = -2.3 z = 26.6 detector = DummyHitDetector +ReadData INFO Hit x = 204.4 y = -8.0 z = -105.2 detector = DummyHitDetector +ReadData INFO Hit x = 207.6 y = -13.7 z = -129.7 detector = DummyHitDetector +ReadData INFO Hit x = 210.8 y = -19.3 z = -140.0 detector = DummyHitDetector +ReadData INFO Hit x = 214.0 y = -25.0 z = -145.7 detector = DummyHitDetector +ReadData INFO Hit x = 217.2 y = -30.7 z = -149.3 detector = DummyHitDetector +ReadData INFO Hit x = 220.4 y = -36.4 z = -151.8 detector = DummyHitDetector +ReadData INFO Hit x = 223.7 y = -42.0 z = -153.6 detector = DummyHitDetector +ReadData INFO Hit x = 226.9 y = -47.7 z = -155.0 detector = DummyHitDetector +ReadData INFO Hit x = 230.1 y = -53.4 z = -156.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream3_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 4 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 401.2 y = -2.3 z = -173.3 detector = DummyHitDetector +ReadData INFO Hit x = 404.4 y = -8.0 z = -305.2 detector = DummyHitDetector +ReadData INFO Hit x = 407.6 y = -13.7 z = -329.7 detector = DummyHitDetector +ReadData INFO Hit x = 410.8 y = -19.3 z = -340.0 detector = DummyHitDetector +ReadData INFO Hit x = 414.0 y = -25.0 z = -345.7 detector = DummyHitDetector +ReadData INFO Hit x = 417.2 y = -30.7 z = -349.3 detector = DummyHitDetector +ReadData INFO Hit x = 420.4 y = -36.4 z = -351.8 detector = DummyHitDetector +ReadData INFO Hit x = 423.7 y = -42.0 z = -353.6 detector = DummyHitDetector +ReadData INFO Hit x = 426.9 y = -47.7 z = -355.0 detector = DummyHitDetector +ReadData INFO Hit x = 430.1 y = -53.4 z = -356.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream2_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 5 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 501.2 y = -2.3 z = -273.3 detector = DummyHitDetector +ReadData INFO Hit x = 504.4 y = -8.0 z = -405.2 detector = DummyHitDetector +ReadData INFO Hit x = 507.6 y = -13.7 z = -429.7 detector = DummyHitDetector +ReadData INFO Hit x = 510.8 y = -19.3 z = -440.0 detector = DummyHitDetector +ReadData INFO Hit x = 514.0 y = -25.0 z = -445.7 detector = DummyHitDetector +ReadData INFO Hit x = 517.2 y = -30.7 z = -449.3 detector = DummyHitDetector +ReadData INFO Hit x = 520.4 y = -36.4 z = -451.8 detector = DummyHitDetector +ReadData INFO Hit x = 523.7 y = -42.0 z = -453.6 detector = DummyHitDetector +ReadData INFO Hit x = 526.9 y = -47.7 z = -455.0 detector = DummyHitDetector +ReadData INFO Hit x = 530.1 y = -53.4 z = -456.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream3_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 7 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 701.2 y = -2.3 z = -473.3 detector = DummyHitDetector +ReadData INFO Hit x = 704.4 y = -8.0 z = -605.2 detector = DummyHitDetector +ReadData INFO Hit x = 707.6 y = -13.7 z = -629.7 detector = DummyHitDetector +ReadData INFO Hit x = 710.8 y = -19.3 z = -640.0 detector = DummyHitDetector +ReadData INFO Hit x = 714.0 y = -25.0 z = -645.7 detector = DummyHitDetector +ReadData INFO Hit x = 717.2 y = -30.7 z = -649.3 detector = DummyHitDetector +ReadData INFO Hit x = 720.4 y = -36.4 z = -651.8 detector = DummyHitDetector +ReadData INFO Hit x = 723.7 y = -42.0 z = -653.6 detector = DummyHitDetector +ReadData INFO Hit x = 726.9 y = -47.7 z = -655.0 detector = DummyHitDetector +ReadData INFO Hit x = 730.1 y = -53.4 z = -656.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream2_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 8 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 801.2 y = -2.3 z = -573.3 detector = DummyHitDetector +ReadData INFO Hit x = 804.4 y = -8.0 z = -705.2 detector = DummyHitDetector +ReadData INFO Hit x = 807.6 y = -13.7 z = -729.7 detector = DummyHitDetector +ReadData INFO Hit x = 810.8 y = -19.3 z = -740.0 detector = DummyHitDetector +ReadData INFO Hit x = 814.0 y = -25.0 z = -745.7 detector = DummyHitDetector +ReadData INFO Hit x = 817.2 y = -30.7 z = -749.3 detector = DummyHitDetector +ReadData INFO Hit x = 820.4 y = -36.4 z = -751.8 detector = DummyHitDetector +ReadData INFO Hit x = 823.7 y = -42.0 z = -753.6 detector = DummyHitDetector +ReadData INFO Hit x = 826.9 y = -47.7 z = -755.0 detector = DummyHitDetector +ReadData INFO Hit x = 830.1 y = -53.4 z = -756.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream3_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 10 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1001.2 y = -2.3 z = -773.3 detector = DummyHitDetector +ReadData INFO Hit x = 1004.4 y = -8.0 z = -905.2 detector = DummyHitDetector +ReadData INFO Hit x = 1007.6 y = -13.7 z = -929.7 detector = DummyHitDetector +ReadData INFO Hit x = 1010.8 y = -19.3 z = -940.0 detector = DummyHitDetector +ReadData INFO Hit x = 1014.0 y = -25.0 z = -945.7 detector = DummyHitDetector +ReadData INFO Hit x = 1017.2 y = -30.7 z = -949.3 detector = DummyHitDetector +ReadData INFO Hit x = 1020.4 y = -36.4 z = -951.8 detector = DummyHitDetector +ReadData INFO Hit x = 1023.7 y = -42.0 z = -953.6 detector = DummyHitDetector +ReadData INFO Hit x = 1026.9 y = -47.7 z = -955.0 detector = DummyHitDetector +ReadData INFO Hit x = 1030.1 y = -53.4 z = -956.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream2_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 11 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1101.2 y = -2.3 z = -873.3 detector = DummyHitDetector +ReadData INFO Hit x = 1104.4 y = -8.0 z = -1005.2 detector = DummyHitDetector +ReadData INFO Hit x = 1107.6 y = -13.7 z = -1029.7 detector = DummyHitDetector +ReadData INFO Hit x = 1110.8 y = -19.3 z = -1040.0 detector = DummyHitDetector +ReadData INFO Hit x = 1114.0 y = -25.0 z = -1045.7 detector = DummyHitDetector +ReadData INFO Hit x = 1117.2 y = -30.7 z = -1049.3 detector = DummyHitDetector +ReadData INFO Hit x = 1120.4 y = -36.4 z = -1051.8 detector = DummyHitDetector +ReadData INFO Hit x = 1123.7 y = -42.0 z = -1053.6 detector = DummyHitDetector +ReadData INFO Hit x = 1126.9 y = -47.7 z = -1055.0 detector = DummyHitDetector +ReadData INFO Hit x = 1130.1 y = -53.4 z = -1056.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream3_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 13 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1301.2 y = -2.3 z = -1073.3 detector = DummyHitDetector +ReadData INFO Hit x = 1304.4 y = -8.0 z = -1205.2 detector = DummyHitDetector +ReadData INFO Hit x = 1307.6 y = -13.7 z = -1229.7 detector = DummyHitDetector +ReadData INFO Hit x = 1310.8 y = -19.3 z = -1240.0 detector = DummyHitDetector +ReadData INFO Hit x = 1314.0 y = -25.0 z = -1245.7 detector = DummyHitDetector +ReadData INFO Hit x = 1317.2 y = -30.7 z = -1249.3 detector = DummyHitDetector +ReadData INFO Hit x = 1320.4 y = -36.4 z = -1251.8 detector = DummyHitDetector +ReadData INFO Hit x = 1323.7 y = -42.0 z = -1253.6 detector = DummyHitDetector +ReadData INFO Hit x = 1326.9 y = -47.7 z = -1255.0 detector = DummyHitDetector +ReadData INFO Hit x = 1330.1 y = -53.4 z = -1256.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream2_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 14 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1401.2 y = -2.3 z = -1173.3 detector = DummyHitDetector +ReadData INFO Hit x = 1404.4 y = -8.0 z = -1305.2 detector = DummyHitDetector +ReadData INFO Hit x = 1407.6 y = -13.7 z = -1329.7 detector = DummyHitDetector +ReadData INFO Hit x = 1410.8 y = -19.3 z = -1340.0 detector = DummyHitDetector +ReadData INFO Hit x = 1414.0 y = -25.0 z = -1345.7 detector = DummyHitDetector +ReadData INFO Hit x = 1417.2 y = -30.7 z = -1349.3 detector = DummyHitDetector +ReadData INFO Hit x = 1420.4 y = -36.4 z = -1351.8 detector = DummyHitDetector +ReadData INFO Hit x = 1423.7 y = -42.0 z = -1353.6 detector = DummyHitDetector +ReadData INFO Hit x = 1426.9 y = -47.7 z = -1355.0 detector = DummyHitDetector +ReadData INFO Hit x = 1430.1 y = -53.4 z = -1356.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream3_ref +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 16 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1601.2 y = -2.3 z = -1373.3 detector = DummyHitDetector +ReadData INFO Hit x = 1604.4 y = -8.0 z = -1505.2 detector = DummyHitDetector +ReadData INFO Hit x = 1607.6 y = -13.7 z = -1529.7 detector = DummyHitDetector +ReadData INFO Hit x = 1610.8 y = -19.3 z = -1540.0 detector = DummyHitDetector +ReadData INFO Hit x = 1614.0 y = -25.0 z = -1545.7 detector = DummyHitDetector +ReadData INFO Hit x = 1617.2 y = -30.7 z = -1549.3 detector = DummyHitDetector +ReadData INFO Hit x = 1620.4 y = -36.4 z = -1551.8 detector = DummyHitDetector +ReadData INFO Hit x = 1623.7 y = -42.0 z = -1553.6 detector = DummyHitDetector +ReadData INFO Hit x = 1626.9 y = -47.7 z = -1555.0 detector = DummyHitDetector +ReadData INFO Hit x = 1630.1 y = -53.4 z = -1556.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream1_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 17 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1701.2 y = -2.3 z = -1473.3 detector = DummyHitDetector +ReadData INFO Hit x = 1704.4 y = -8.0 z = -1605.2 detector = DummyHitDetector +ReadData INFO Hit x = 1707.6 y = -13.7 z = -1629.7 detector = DummyHitDetector +ReadData INFO Hit x = 1710.8 y = -19.3 z = -1640.0 detector = DummyHitDetector +ReadData INFO Hit x = 1714.0 y = -25.0 z = -1645.7 detector = DummyHitDetector +ReadData INFO Hit x = 1717.2 y = -30.7 z = -1649.3 detector = DummyHitDetector +ReadData INFO Hit x = 1720.4 y = -36.4 z = -1651.8 detector = DummyHitDetector +ReadData INFO Hit x = 1723.7 y = -42.0 z = -1653.6 detector = DummyHitDetector +ReadData INFO Hit x = 1726.9 y = -47.7 z = -1655.0 detector = DummyHitDetector +ReadData INFO Hit x = 1730.1 y = -53.4 z = -1656.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream2_ref +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 18 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1801.2 y = -2.3 z = -1573.3 detector = DummyHitDetector +ReadData INFO Hit x = 1804.4 y = -8.0 z = -1705.2 detector = DummyHitDetector +ReadData INFO Hit x = 1807.6 y = -13.7 z = -1729.7 detector = DummyHitDetector +ReadData INFO Hit x = 1810.8 y = -19.3 z = -1740.0 detector = DummyHitDetector +ReadData INFO Hit x = 1814.0 y = -25.0 z = -1745.7 detector = DummyHitDetector +ReadData INFO Hit x = 1817.2 y = -30.7 z = -1749.3 detector = DummyHitDetector +ReadData INFO Hit x = 1820.4 y = -36.4 z = -1751.8 detector = DummyHitDetector +ReadData INFO Hit x = 1823.7 y = -42.0 z = -1753.6 detector = DummyHitDetector +ReadData INFO Hit x = 1826.9 y = -47.7 z = -1755.0 detector = DummyHitDetector +ReadData INFO Hit x = 1830.1 y = -53.4 z = -1756.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream1_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 19 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1901.2 y = -2.3 z = -1673.3 detector = DummyHitDetector +ReadData INFO Hit x = 1904.4 y = -8.0 z = -1805.2 detector = DummyHitDetector +ReadData INFO Hit x = 1907.6 y = -13.7 z = -1829.7 detector = DummyHitDetector +ReadData INFO Hit x = 1910.8 y = -19.3 z = -1840.0 detector = DummyHitDetector +ReadData INFO Hit x = 1914.0 y = -25.0 z = -1845.7 detector = DummyHitDetector +ReadData INFO Hit x = 1917.2 y = -30.7 z = -1849.3 detector = DummyHitDetector +ReadData INFO Hit x = 1920.4 y = -36.4 z = -1851.8 detector = DummyHitDetector +ReadData INFO Hit x = 1923.7 y = -42.0 z = -1853.6 detector = DummyHitDetector +ReadData INFO Hit x = 1926.9 y = -47.7 z = -1855.0 detector = DummyHitDetector +ReadData INFO Hit x = 1930.1 y = -53.4 z = -1856.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream2_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 4 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 401.2 y = -2.3 z = -173.3 detector = DummyHitDetector +ReadData INFO Hit x = 404.4 y = -8.0 z = -305.2 detector = DummyHitDetector +ReadData INFO Hit x = 407.6 y = -13.7 z = -329.7 detector = DummyHitDetector +ReadData INFO Hit x = 410.8 y = -19.3 z = -340.0 detector = DummyHitDetector +ReadData INFO Hit x = 414.0 y = -25.0 z = -345.7 detector = DummyHitDetector +ReadData INFO Hit x = 417.2 y = -30.7 z = -349.3 detector = DummyHitDetector +ReadData INFO Hit x = 420.4 y = -36.4 z = -351.8 detector = DummyHitDetector +ReadData INFO Hit x = 423.7 y = -42.0 z = -353.6 detector = DummyHitDetector +ReadData INFO Hit x = 426.9 y = -47.7 z = -355.0 detector = DummyHitDetector +ReadData INFO Hit x = 430.1 y = -53.4 z = -356.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 5 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 501.2 y = -2.3 z = -273.3 detector = DummyHitDetector +ReadData INFO Hit x = 504.4 y = -8.0 z = -405.2 detector = DummyHitDetector +ReadData INFO Hit x = 507.6 y = -13.7 z = -429.7 detector = DummyHitDetector +ReadData INFO Hit x = 510.8 y = -19.3 z = -440.0 detector = DummyHitDetector +ReadData INFO Hit x = 514.0 y = -25.0 z = -445.7 detector = DummyHitDetector +ReadData INFO Hit x = 517.2 y = -30.7 z = -449.3 detector = DummyHitDetector +ReadData INFO Hit x = 520.4 y = -36.4 z = -451.8 detector = DummyHitDetector +ReadData INFO Hit x = 523.7 y = -42.0 z = -453.6 detector = DummyHitDetector +ReadData INFO Hit x = 526.9 y = -47.7 z = -455.0 detector = DummyHitDetector +ReadData INFO Hit x = 530.1 y = -53.4 z = -456.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream3_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 19 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1901.2 y = -2.3 z = -1673.3 detector = DummyHitDetector +ReadData INFO Hit x = 1904.4 y = -8.0 z = -1805.2 detector = DummyHitDetector +ReadData INFO Hit x = 1907.6 y = -13.7 z = -1829.7 detector = DummyHitDetector +ReadData INFO Hit x = 1910.8 y = -19.3 z = -1840.0 detector = DummyHitDetector +ReadData INFO Hit x = 1914.0 y = -25.0 z = -1845.7 detector = DummyHitDetector +ReadData INFO Hit x = 1917.2 y = -30.7 z = -1849.3 detector = DummyHitDetector +ReadData INFO Hit x = 1920.4 y = -36.4 z = -1851.8 detector = DummyHitDetector +ReadData INFO Hit x = 1923.7 y = -42.0 z = -1853.6 detector = DummyHitDetector +ReadData INFO Hit x = 1926.9 y = -47.7 z = -1855.0 detector = DummyHitDetector +ReadData INFO Hit x = 1930.1 y = -53.4 z = -1856.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream2_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 2 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 201.2 y = -2.3 z = 26.6 detector = DummyHitDetector +ReadData INFO Hit x = 204.4 y = -8.0 z = -105.2 detector = DummyHitDetector +ReadData INFO Hit x = 207.6 y = -13.7 z = -129.7 detector = DummyHitDetector +ReadData INFO Hit x = 210.8 y = -19.3 z = -140.0 detector = DummyHitDetector +ReadData INFO Hit x = 214.0 y = -25.0 z = -145.7 detector = DummyHitDetector +ReadData INFO Hit x = 217.2 y = -30.7 z = -149.3 detector = DummyHitDetector +ReadData INFO Hit x = 220.4 y = -36.4 z = -151.8 detector = DummyHitDetector +ReadData INFO Hit x = 223.7 y = -42.0 z = -153.6 detector = DummyHitDetector +ReadData INFO Hit x = 226.9 y = -47.7 z = -155.0 detector = DummyHitDetector +ReadData INFO Hit x = 230.1 y = -53.4 z = -156.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream3_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 5 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 501.2 y = -2.3 z = -273.3 detector = DummyHitDetector +ReadData INFO Hit x = 504.4 y = -8.0 z = -405.2 detector = DummyHitDetector +ReadData INFO Hit x = 507.6 y = -13.7 z = -429.7 detector = DummyHitDetector +ReadData INFO Hit x = 510.8 y = -19.3 z = -440.0 detector = DummyHitDetector +ReadData INFO Hit x = 514.0 y = -25.0 z = -445.7 detector = DummyHitDetector +ReadData INFO Hit x = 517.2 y = -30.7 z = -449.3 detector = DummyHitDetector +ReadData INFO Hit x = 520.4 y = -36.4 z = -451.8 detector = DummyHitDetector +ReadData INFO Hit x = 523.7 y = -42.0 z = -453.6 detector = DummyHitDetector +ReadData INFO Hit x = 526.9 y = -47.7 z = -455.0 detector = DummyHitDetector +ReadData INFO Hit x = 530.1 y = -53.4 z = -456.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 7 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 701.2 y = -2.3 z = -473.3 detector = DummyHitDetector +ReadData INFO Hit x = 704.4 y = -8.0 z = -605.2 detector = DummyHitDetector +ReadData INFO Hit x = 707.6 y = -13.7 z = -629.7 detector = DummyHitDetector +ReadData INFO Hit x = 710.8 y = -19.3 z = -640.0 detector = DummyHitDetector +ReadData INFO Hit x = 714.0 y = -25.0 z = -645.7 detector = DummyHitDetector +ReadData INFO Hit x = 717.2 y = -30.7 z = -649.3 detector = DummyHitDetector +ReadData INFO Hit x = 720.4 y = -36.4 z = -651.8 detector = DummyHitDetector +ReadData INFO Hit x = 723.7 y = -42.0 z = -653.6 detector = DummyHitDetector +ReadData INFO Hit x = 726.9 y = -47.7 z = -655.0 detector = DummyHitDetector +ReadData INFO Hit x = 730.1 y = -53.4 z = -656.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream2_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 8 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 801.2 y = -2.3 z = -573.3 detector = DummyHitDetector +ReadData INFO Hit x = 804.4 y = -8.0 z = -705.2 detector = DummyHitDetector +ReadData INFO Hit x = 807.6 y = -13.7 z = -729.7 detector = DummyHitDetector +ReadData INFO Hit x = 810.8 y = -19.3 z = -740.0 detector = DummyHitDetector +ReadData INFO Hit x = 814.0 y = -25.0 z = -745.7 detector = DummyHitDetector +ReadData INFO Hit x = 817.2 y = -30.7 z = -749.3 detector = DummyHitDetector +ReadData INFO Hit x = 820.4 y = -36.4 z = -751.8 detector = DummyHitDetector +ReadData INFO Hit x = 823.7 y = -42.0 z = -753.6 detector = DummyHitDetector +ReadData INFO Hit x = 826.9 y = -47.7 z = -755.0 detector = DummyHitDetector +ReadData INFO Hit x = 830.1 y = -53.4 z = -756.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream3_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 11 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1101.2 y = -2.3 z = -873.3 detector = DummyHitDetector +ReadData INFO Hit x = 1104.4 y = -8.0 z = -1005.2 detector = DummyHitDetector +ReadData INFO Hit x = 1107.6 y = -13.7 z = -1029.7 detector = DummyHitDetector +ReadData INFO Hit x = 1110.8 y = -19.3 z = -1040.0 detector = DummyHitDetector +ReadData INFO Hit x = 1114.0 y = -25.0 z = -1045.7 detector = DummyHitDetector +ReadData INFO Hit x = 1117.2 y = -30.7 z = -1049.3 detector = DummyHitDetector +ReadData INFO Hit x = 1120.4 y = -36.4 z = -1051.8 detector = DummyHitDetector +ReadData INFO Hit x = 1123.7 y = -42.0 z = -1053.6 detector = DummyHitDetector +ReadData INFO Hit x = 1126.9 y = -47.7 z = -1055.0 detector = DummyHitDetector +ReadData INFO Hit x = 1130.1 y = -53.4 z = -1056.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 14 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1401.2 y = -2.3 z = -1173.3 detector = DummyHitDetector +ReadData INFO Hit x = 1404.4 y = -8.0 z = -1305.2 detector = DummyHitDetector +ReadData INFO Hit x = 1407.6 y = -13.7 z = -1329.7 detector = DummyHitDetector +ReadData INFO Hit x = 1410.8 y = -19.3 z = -1340.0 detector = DummyHitDetector +ReadData INFO Hit x = 1414.0 y = -25.0 z = -1345.7 detector = DummyHitDetector +ReadData INFO Hit x = 1417.2 y = -30.7 z = -1349.3 detector = DummyHitDetector +ReadData INFO Hit x = 1420.4 y = -36.4 z = -1351.8 detector = DummyHitDetector +ReadData INFO Hit x = 1423.7 y = -42.0 z = -1353.6 detector = DummyHitDetector +ReadData INFO Hit x = 1426.9 y = -47.7 z = -1355.0 detector = DummyHitDetector +ReadData INFO Hit x = 1430.1 y = -53.4 z = -1356.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 17 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1701.2 y = -2.3 z = -1473.3 detector = DummyHitDetector +ReadData INFO Hit x = 1704.4 y = -8.0 z = -1605.2 detector = DummyHitDetector +ReadData INFO Hit x = 1707.6 y = -13.7 z = -1629.7 detector = DummyHitDetector +ReadData INFO Hit x = 1710.8 y = -19.3 z = -1640.0 detector = DummyHitDetector +ReadData INFO Hit x = 1714.0 y = -25.0 z = -1645.7 detector = DummyHitDetector +ReadData INFO Hit x = 1717.2 y = -30.7 z = -1649.3 detector = DummyHitDetector +ReadData INFO Hit x = 1720.4 y = -36.4 z = -1651.8 detector = DummyHitDetector +ReadData INFO Hit x = 1723.7 y = -42.0 z = -1653.6 detector = DummyHitDetector +ReadData INFO Hit x = 1726.9 y = -47.7 z = -1655.0 detector = DummyHitDetector +ReadData INFO Hit x = 1730.1 y = -53.4 z = -1656.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream2_ref +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 18 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1801.2 y = -2.3 z = -1573.3 detector = DummyHitDetector +ReadData INFO Hit x = 1804.4 y = -8.0 z = -1705.2 detector = DummyHitDetector +ReadData INFO Hit x = 1807.6 y = -13.7 z = -1729.7 detector = DummyHitDetector +ReadData INFO Hit x = 1810.8 y = -19.3 z = -1740.0 detector = DummyHitDetector +ReadData INFO Hit x = 1814.0 y = -25.0 z = -1745.7 detector = DummyHitDetector +ReadData INFO Hit x = 1817.2 y = -30.7 z = -1749.3 detector = DummyHitDetector +ReadData INFO Hit x = 1820.4 y = -36.4 z = -1751.8 detector = DummyHitDetector +ReadData INFO Hit x = 1823.7 y = -42.0 z = -1753.6 detector = DummyHitDetector +ReadData INFO Hit x = 1826.9 y = -47.7 z = -1755.0 detector = DummyHitDetector +ReadData INFO Hit x = 1830.1 y = -53.4 z = -1756.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream1_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 19 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1901.2 y = -2.3 z = -1673.3 detector = DummyHitDetector +ReadData INFO Hit x = 1904.4 y = -8.0 z = -1805.2 detector = DummyHitDetector +ReadData INFO Hit x = 1907.6 y = -13.7 z = -1829.7 detector = DummyHitDetector +ReadData INFO Hit x = 1910.8 y = -19.3 z = -1840.0 detector = DummyHitDetector +ReadData INFO Hit x = 1914.0 y = -25.0 z = -1845.7 detector = DummyHitDetector +ReadData INFO Hit x = 1917.2 y = -30.7 z = -1849.3 detector = DummyHitDetector +ReadData INFO Hit x = 1920.4 y = -36.4 z = -1851.8 detector = DummyHitDetector +ReadData INFO Hit x = 1923.7 y = -42.0 z = -1853.6 detector = DummyHitDetector +ReadData INFO Hit x = 1926.9 y = -47.7 z = -1855.0 detector = DummyHitDetector +ReadData INFO Hit x = 1930.1 y = -53.4 z = -1856.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream2_ref +ReadData INFO EventStreamInfo: Number of events = 0 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO EventStreamInfo: Number of events = 1 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Others +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 3 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 301.2 y = -2.3 z = -73.3 detector = DummyHitDetector +ReadData INFO Hit x = 304.4 y = -8.0 z = -205.2 detector = DummyHitDetector +ReadData INFO Hit x = 307.6 y = -13.7 z = -229.7 detector = DummyHitDetector +ReadData INFO Hit x = 310.8 y = -19.3 z = -240.0 detector = DummyHitDetector +ReadData INFO Hit x = 314.0 y = -25.0 z = -245.7 detector = DummyHitDetector +ReadData INFO Hit x = 317.2 y = -30.7 z = -249.3 detector = DummyHitDetector +ReadData INFO Hit x = 320.4 y = -36.4 z = -251.8 detector = DummyHitDetector +ReadData INFO Hit x = 323.7 y = -42.0 z = -253.6 detector = DummyHitDetector +ReadData INFO Hit x = 326.9 y = -47.7 z = -255.0 detector = DummyHitDetector +ReadData INFO Hit x = 330.1 y = -53.4 z = -256.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Others_ref +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 0 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1.2 y = -2.3 z = 226.6 detector = DummyHitDetector +ReadData INFO Hit x = 4.4 y = -8.0 z = 94.7 detector = DummyHitDetector +ReadData INFO Hit x = 7.6 y = -13.7 z = 70.2 detector = DummyHitDetector +ReadData INFO Hit x = 10.8 y = -19.3 z = 59.9 detector = DummyHitDetector +ReadData INFO Hit x = 14.0 y = -25.0 z = 54.2 detector = DummyHitDetector +ReadData INFO Hit x = 17.2 y = -30.7 z = 50.6 detector = DummyHitDetector +ReadData INFO Hit x = 20.4 y = -36.4 z = 48.1 detector = DummyHitDetector +ReadData INFO Hit x = 23.7 y = -42.0 z = 46.3 detector = DummyHitDetector +ReadData INFO Hit x = 26.9 y = -47.7 z = 44.9 detector = DummyHitDetector +ReadData INFO Hit x = 30.1 y = -53.4 z = 43.8 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream1_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 1 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 101.2 y = -2.3 z = 126.6 detector = DummyHitDetector +ReadData INFO Hit x = 104.4 y = -8.0 z = -5.2 detector = DummyHitDetector +ReadData INFO Hit x = 107.6 y = -13.7 z = -29.7 detector = DummyHitDetector +ReadData INFO Hit x = 110.8 y = -19.3 z = -40.0 detector = DummyHitDetector +ReadData INFO Hit x = 114.0 y = -25.0 z = -45.7 detector = DummyHitDetector +ReadData INFO Hit x = 117.2 y = -30.7 z = -49.3 detector = DummyHitDetector +ReadData INFO Hit x = 120.4 y = -36.4 z = -51.8 detector = DummyHitDetector +ReadData INFO Hit x = 123.7 y = -42.0 z = -53.6 detector = DummyHitDetector +ReadData INFO Hit x = 126.9 y = -47.7 z = -55.0 detector = DummyHitDetector +ReadData INFO Hit x = 130.1 y = -53.4 z = -56.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream2_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 2 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 201.2 y = -2.3 z = 26.6 detector = DummyHitDetector +ReadData INFO Hit x = 204.4 y = -8.0 z = -105.2 detector = DummyHitDetector +ReadData INFO Hit x = 207.6 y = -13.7 z = -129.7 detector = DummyHitDetector +ReadData INFO Hit x = 210.8 y = -19.3 z = -140.0 detector = DummyHitDetector +ReadData INFO Hit x = 214.0 y = -25.0 z = -145.7 detector = DummyHitDetector +ReadData INFO Hit x = 217.2 y = -30.7 z = -149.3 detector = DummyHitDetector +ReadData INFO Hit x = 220.4 y = -36.4 z = -151.8 detector = DummyHitDetector +ReadData INFO Hit x = 223.7 y = -42.0 z = -153.6 detector = DummyHitDetector +ReadData INFO Hit x = 226.9 y = -47.7 z = -155.0 detector = DummyHitDetector +ReadData INFO Hit x = 230.1 y = -53.4 z = -156.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream3_ref +ReadData INFO EventStreamInfo: Number of events = 0 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO EventStreamInfo: Number of events = 1 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Others +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 3 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 301.2 y = -2.3 z = -73.3 detector = DummyHitDetector +ReadData INFO Hit x = 304.4 y = -8.0 z = -205.2 detector = DummyHitDetector +ReadData INFO Hit x = 307.6 y = -13.7 z = -229.7 detector = DummyHitDetector +ReadData INFO Hit x = 310.8 y = -19.3 z = -240.0 detector = DummyHitDetector +ReadData INFO Hit x = 314.0 y = -25.0 z = -245.7 detector = DummyHitDetector +ReadData INFO Hit x = 317.2 y = -30.7 z = -249.3 detector = DummyHitDetector +ReadData INFO Hit x = 320.4 y = -36.4 z = -251.8 detector = DummyHitDetector +ReadData INFO Hit x = 323.7 y = -42.0 z = -253.6 detector = DummyHitDetector +ReadData INFO Hit x = 326.9 y = -47.7 z = -255.0 detector = DummyHitDetector +ReadData INFO Hit x = 330.1 y = -53.4 z = -256.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Others_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 4 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 401.2 y = -2.3 z = -173.3 detector = DummyHitDetector +ReadData INFO Hit x = 404.4 y = -8.0 z = -305.2 detector = DummyHitDetector +ReadData INFO Hit x = 407.6 y = -13.7 z = -329.7 detector = DummyHitDetector +ReadData INFO Hit x = 410.8 y = -19.3 z = -340.0 detector = DummyHitDetector +ReadData INFO Hit x = 414.0 y = -25.0 z = -345.7 detector = DummyHitDetector +ReadData INFO Hit x = 417.2 y = -30.7 z = -349.3 detector = DummyHitDetector +ReadData INFO Hit x = 420.4 y = -36.4 z = -351.8 detector = DummyHitDetector +ReadData INFO Hit x = 423.7 y = -42.0 z = -353.6 detector = DummyHitDetector +ReadData INFO Hit x = 426.9 y = -47.7 z = -355.0 detector = DummyHitDetector +ReadData INFO Hit x = 430.1 y = -53.4 z = -356.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream2_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 5 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 501.2 y = -2.3 z = -273.3 detector = DummyHitDetector +ReadData INFO Hit x = 504.4 y = -8.0 z = -405.2 detector = DummyHitDetector +ReadData INFO Hit x = 507.6 y = -13.7 z = -429.7 detector = DummyHitDetector +ReadData INFO Hit x = 510.8 y = -19.3 z = -440.0 detector = DummyHitDetector +ReadData INFO Hit x = 514.0 y = -25.0 z = -445.7 detector = DummyHitDetector +ReadData INFO Hit x = 517.2 y = -30.7 z = -449.3 detector = DummyHitDetector +ReadData INFO Hit x = 520.4 y = -36.4 z = -451.8 detector = DummyHitDetector +ReadData INFO Hit x = 523.7 y = -42.0 z = -453.6 detector = DummyHitDetector +ReadData INFO Hit x = 526.9 y = -47.7 z = -455.0 detector = DummyHitDetector +ReadData INFO Hit x = 530.1 y = -53.4 z = -456.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream3_ref +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 6 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 601.2 y = -2.3 z = -373.3 detector = DummyHitDetector +ReadData INFO Hit x = 604.4 y = -8.0 z = -505.2 detector = DummyHitDetector +ReadData INFO Hit x = 607.6 y = -13.7 z = -529.7 detector = DummyHitDetector +ReadData INFO Hit x = 610.8 y = -19.3 z = -540.0 detector = DummyHitDetector +ReadData INFO Hit x = 614.0 y = -25.0 z = -545.7 detector = DummyHitDetector +ReadData INFO Hit x = 617.2 y = -30.7 z = -549.3 detector = DummyHitDetector +ReadData INFO Hit x = 620.4 y = -36.4 z = -551.8 detector = DummyHitDetector +ReadData INFO Hit x = 623.7 y = -42.0 z = -553.6 detector = DummyHitDetector +ReadData INFO Hit x = 626.9 y = -47.7 z = -555.0 detector = DummyHitDetector +ReadData INFO Hit x = 630.1 y = -53.4 z = -556.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream1_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 7 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 701.2 y = -2.3 z = -473.3 detector = DummyHitDetector +ReadData INFO Hit x = 704.4 y = -8.0 z = -605.2 detector = DummyHitDetector +ReadData INFO Hit x = 707.6 y = -13.7 z = -629.7 detector = DummyHitDetector +ReadData INFO Hit x = 710.8 y = -19.3 z = -640.0 detector = DummyHitDetector +ReadData INFO Hit x = 714.0 y = -25.0 z = -645.7 detector = DummyHitDetector +ReadData INFO Hit x = 717.2 y = -30.7 z = -649.3 detector = DummyHitDetector +ReadData INFO Hit x = 720.4 y = -36.4 z = -651.8 detector = DummyHitDetector +ReadData INFO Hit x = 723.7 y = -42.0 z = -653.6 detector = DummyHitDetector +ReadData INFO Hit x = 726.9 y = -47.7 z = -655.0 detector = DummyHitDetector +ReadData INFO Hit x = 730.1 y = -53.4 z = -656.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream2_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 8 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 801.2 y = -2.3 z = -573.3 detector = DummyHitDetector +ReadData INFO Hit x = 804.4 y = -8.0 z = -705.2 detector = DummyHitDetector +ReadData INFO Hit x = 807.6 y = -13.7 z = -729.7 detector = DummyHitDetector +ReadData INFO Hit x = 810.8 y = -19.3 z = -740.0 detector = DummyHitDetector +ReadData INFO Hit x = 814.0 y = -25.0 z = -745.7 detector = DummyHitDetector +ReadData INFO Hit x = 817.2 y = -30.7 z = -749.3 detector = DummyHitDetector +ReadData INFO Hit x = 820.4 y = -36.4 z = -751.8 detector = DummyHitDetector +ReadData INFO Hit x = 823.7 y = -42.0 z = -753.6 detector = DummyHitDetector +ReadData INFO Hit x = 826.9 y = -47.7 z = -755.0 detector = DummyHitDetector +ReadData INFO Hit x = 830.1 y = -53.4 z = -756.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream3_ref +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 9 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 901.2 y = -2.3 z = -673.3 detector = DummyHitDetector +ReadData INFO Hit x = 904.4 y = -8.0 z = -805.2 detector = DummyHitDetector +ReadData INFO Hit x = 907.6 y = -13.7 z = -829.7 detector = DummyHitDetector +ReadData INFO Hit x = 910.8 y = -19.3 z = -840.0 detector = DummyHitDetector +ReadData INFO Hit x = 914.0 y = -25.0 z = -845.7 detector = DummyHitDetector +ReadData INFO Hit x = 917.2 y = -30.7 z = -849.3 detector = DummyHitDetector +ReadData INFO Hit x = 920.4 y = -36.4 z = -851.8 detector = DummyHitDetector +ReadData INFO Hit x = 923.7 y = -42.0 z = -853.6 detector = DummyHitDetector +ReadData INFO Hit x = 926.9 y = -47.7 z = -855.0 detector = DummyHitDetector +ReadData INFO Hit x = 930.1 y = -53.4 z = -856.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream1_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 10 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1001.2 y = -2.3 z = -773.3 detector = DummyHitDetector +ReadData INFO Hit x = 1004.4 y = -8.0 z = -905.2 detector = DummyHitDetector +ReadData INFO Hit x = 1007.6 y = -13.7 z = -929.7 detector = DummyHitDetector +ReadData INFO Hit x = 1010.8 y = -19.3 z = -940.0 detector = DummyHitDetector +ReadData INFO Hit x = 1014.0 y = -25.0 z = -945.7 detector = DummyHitDetector +ReadData INFO Hit x = 1017.2 y = -30.7 z = -949.3 detector = DummyHitDetector +ReadData INFO Hit x = 1020.4 y = -36.4 z = -951.8 detector = DummyHitDetector +ReadData INFO Hit x = 1023.7 y = -42.0 z = -953.6 detector = DummyHitDetector +ReadData INFO Hit x = 1026.9 y = -47.7 z = -955.0 detector = DummyHitDetector +ReadData INFO Hit x = 1030.1 y = -53.4 z = -956.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream2_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 11 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1101.2 y = -2.3 z = -873.3 detector = DummyHitDetector +ReadData INFO Hit x = 1104.4 y = -8.0 z = -1005.2 detector = DummyHitDetector +ReadData INFO Hit x = 1107.6 y = -13.7 z = -1029.7 detector = DummyHitDetector +ReadData INFO Hit x = 1110.8 y = -19.3 z = -1040.0 detector = DummyHitDetector +ReadData INFO Hit x = 1114.0 y = -25.0 z = -1045.7 detector = DummyHitDetector +ReadData INFO Hit x = 1117.2 y = -30.7 z = -1049.3 detector = DummyHitDetector +ReadData INFO Hit x = 1120.4 y = -36.4 z = -1051.8 detector = DummyHitDetector +ReadData INFO Hit x = 1123.7 y = -42.0 z = -1053.6 detector = DummyHitDetector +ReadData INFO Hit x = 1126.9 y = -47.7 z = -1055.0 detector = DummyHitDetector +ReadData INFO Hit x = 1130.1 y = -53.4 z = -1056.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream3_ref +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 12 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1201.2 y = -2.3 z = -973.3 detector = DummyHitDetector +ReadData INFO Hit x = 1204.4 y = -8.0 z = -1105.2 detector = DummyHitDetector +ReadData INFO Hit x = 1207.6 y = -13.7 z = -1129.7 detector = DummyHitDetector +ReadData INFO Hit x = 1210.8 y = -19.3 z = -1140.0 detector = DummyHitDetector +ReadData INFO Hit x = 1214.0 y = -25.0 z = -1145.7 detector = DummyHitDetector +ReadData INFO Hit x = 1217.2 y = -30.7 z = -1149.3 detector = DummyHitDetector +ReadData INFO Hit x = 1220.4 y = -36.4 z = -1151.8 detector = DummyHitDetector +ReadData INFO Hit x = 1223.7 y = -42.0 z = -1153.6 detector = DummyHitDetector +ReadData INFO Hit x = 1226.9 y = -47.7 z = -1155.0 detector = DummyHitDetector +ReadData INFO Hit x = 1230.1 y = -53.4 z = -1156.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream1_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 13 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1301.2 y = -2.3 z = -1073.3 detector = DummyHitDetector +ReadData INFO Hit x = 1304.4 y = -8.0 z = -1205.2 detector = DummyHitDetector +ReadData INFO Hit x = 1307.6 y = -13.7 z = -1229.7 detector = DummyHitDetector +ReadData INFO Hit x = 1310.8 y = -19.3 z = -1240.0 detector = DummyHitDetector +ReadData INFO Hit x = 1314.0 y = -25.0 z = -1245.7 detector = DummyHitDetector +ReadData INFO Hit x = 1317.2 y = -30.7 z = -1249.3 detector = DummyHitDetector +ReadData INFO Hit x = 1320.4 y = -36.4 z = -1251.8 detector = DummyHitDetector +ReadData INFO Hit x = 1323.7 y = -42.0 z = -1253.6 detector = DummyHitDetector +ReadData INFO Hit x = 1326.9 y = -47.7 z = -1255.0 detector = DummyHitDetector +ReadData INFO Hit x = 1330.1 y = -53.4 z = -1256.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream2_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 14 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1401.2 y = -2.3 z = -1173.3 detector = DummyHitDetector +ReadData INFO Hit x = 1404.4 y = -8.0 z = -1305.2 detector = DummyHitDetector +ReadData INFO Hit x = 1407.6 y = -13.7 z = -1329.7 detector = DummyHitDetector +ReadData INFO Hit x = 1410.8 y = -19.3 z = -1340.0 detector = DummyHitDetector +ReadData INFO Hit x = 1414.0 y = -25.0 z = -1345.7 detector = DummyHitDetector +ReadData INFO Hit x = 1417.2 y = -30.7 z = -1349.3 detector = DummyHitDetector +ReadData INFO Hit x = 1420.4 y = -36.4 z = -1351.8 detector = DummyHitDetector +ReadData INFO Hit x = 1423.7 y = -42.0 z = -1353.6 detector = DummyHitDetector +ReadData INFO Hit x = 1426.9 y = -47.7 z = -1355.0 detector = DummyHitDetector +ReadData INFO Hit x = 1430.1 y = -53.4 z = -1356.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream3_ref +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 15 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1501.2 y = -2.3 z = -1273.3 detector = DummyHitDetector +ReadData INFO Hit x = 1504.4 y = -8.0 z = -1405.2 detector = DummyHitDetector +ReadData INFO Hit x = 1507.6 y = -13.7 z = -1429.7 detector = DummyHitDetector +ReadData INFO Hit x = 1510.8 y = -19.3 z = -1440.0 detector = DummyHitDetector +ReadData INFO Hit x = 1514.0 y = -25.0 z = -1445.7 detector = DummyHitDetector +ReadData INFO Hit x = 1517.2 y = -30.7 z = -1449.3 detector = DummyHitDetector +ReadData INFO Hit x = 1520.4 y = -36.4 z = -1451.8 detector = DummyHitDetector +ReadData INFO Hit x = 1523.7 y = -42.0 z = -1453.6 detector = DummyHitDetector +ReadData INFO Hit x = 1526.9 y = -47.7 z = -1455.0 detector = DummyHitDetector +ReadData INFO Hit x = 1530.1 y = -53.4 z = -1456.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream1_ref +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 16 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1601.2 y = -2.3 z = -1373.3 detector = DummyHitDetector +ReadData INFO Hit x = 1604.4 y = -8.0 z = -1505.2 detector = DummyHitDetector +ReadData INFO Hit x = 1607.6 y = -13.7 z = -1529.7 detector = DummyHitDetector +ReadData INFO Hit x = 1610.8 y = -19.3 z = -1540.0 detector = DummyHitDetector +ReadData INFO Hit x = 1614.0 y = -25.0 z = -1545.7 detector = DummyHitDetector +ReadData INFO Hit x = 1617.2 y = -30.7 z = -1549.3 detector = DummyHitDetector +ReadData INFO Hit x = 1620.4 y = -36.4 z = -1551.8 detector = DummyHitDetector +ReadData INFO Hit x = 1623.7 y = -42.0 z = -1553.6 detector = DummyHitDetector +ReadData INFO Hit x = 1626.9 y = -47.7 z = -1555.0 detector = DummyHitDetector +ReadData INFO Hit x = 1630.1 y = -53.4 z = -1556.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 17 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1701.2 y = -2.3 z = -1473.3 detector = DummyHitDetector +ReadData INFO Hit x = 1704.4 y = -8.0 z = -1605.2 detector = DummyHitDetector +ReadData INFO Hit x = 1707.6 y = -13.7 z = -1629.7 detector = DummyHitDetector +ReadData INFO Hit x = 1710.8 y = -19.3 z = -1640.0 detector = DummyHitDetector +ReadData INFO Hit x = 1714.0 y = -25.0 z = -1645.7 detector = DummyHitDetector +ReadData INFO Hit x = 1717.2 y = -30.7 z = -1649.3 detector = DummyHitDetector +ReadData INFO Hit x = 1720.4 y = -36.4 z = -1651.8 detector = DummyHitDetector +ReadData INFO Hit x = 1723.7 y = -42.0 z = -1653.6 detector = DummyHitDetector +ReadData INFO Hit x = 1726.9 y = -47.7 z = -1655.0 detector = DummyHitDetector +ReadData INFO Hit x = 1730.1 y = -53.4 z = -1656.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream2_ref +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 18 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1801.2 y = -2.3 z = -1573.3 detector = DummyHitDetector +ReadData INFO Hit x = 1804.4 y = -8.0 z = -1705.2 detector = DummyHitDetector +ReadData INFO Hit x = 1807.6 y = -13.7 z = -1729.7 detector = DummyHitDetector +ReadData INFO Hit x = 1810.8 y = -19.3 z = -1740.0 detector = DummyHitDetector +ReadData INFO Hit x = 1814.0 y = -25.0 z = -1745.7 detector = DummyHitDetector +ReadData INFO Hit x = 1817.2 y = -30.7 z = -1749.3 detector = DummyHitDetector +ReadData INFO Hit x = 1820.4 y = -36.4 z = -1751.8 detector = DummyHitDetector +ReadData INFO Hit x = 1823.7 y = -42.0 z = -1753.6 detector = DummyHitDetector +ReadData INFO Hit x = 1826.9 y = -47.7 z = -1755.0 detector = DummyHitDetector +ReadData INFO Hit x = 1830.1 y = -53.4 z = -1756.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream1_ref +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 19 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1901.2 y = -2.3 z = -1673.3 detector = DummyHitDetector +ReadData INFO Hit x = 1904.4 y = -8.0 z = -1805.2 detector = DummyHitDetector +ReadData INFO Hit x = 1907.6 y = -13.7 z = -1829.7 detector = DummyHitDetector +ReadData INFO Hit x = 1910.8 y = -19.3 z = -1840.0 detector = DummyHitDetector +ReadData INFO Hit x = 1914.0 y = -25.0 z = -1845.7 detector = DummyHitDetector +ReadData INFO Hit x = 1917.2 y = -30.7 z = -1849.3 detector = DummyHitDetector +ReadData INFO Hit x = 1920.4 y = -36.4 z = -1851.8 detector = DummyHitDetector +ReadData INFO Hit x = 1923.7 y = -42.0 z = -1853.6 detector = DummyHitDetector +ReadData INFO Hit x = 1926.9 y = -47.7 z = -1855.0 detector = DummyHitDetector +ReadData INFO Hit x = 1930.1 y = -53.4 z = -1856.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream2_ref +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 6 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 601.2 y = -2.3 z = -373.3 detector = DummyHitDetector +ReadData INFO Hit x = 604.4 y = -8.0 z = -505.2 detector = DummyHitDetector +ReadData INFO Hit x = 607.6 y = -13.7 z = -529.7 detector = DummyHitDetector +ReadData INFO Hit x = 610.8 y = -19.3 z = -540.0 detector = DummyHitDetector +ReadData INFO Hit x = 614.0 y = -25.0 z = -545.7 detector = DummyHitDetector +ReadData INFO Hit x = 617.2 y = -30.7 z = -549.3 detector = DummyHitDetector +ReadData INFO Hit x = 620.4 y = -36.4 z = -551.8 detector = DummyHitDetector +ReadData INFO Hit x = 623.7 y = -42.0 z = -553.6 detector = DummyHitDetector +ReadData INFO Hit x = 626.9 y = -47.7 z = -555.0 detector = DummyHitDetector +ReadData INFO Hit x = 630.1 y = -53.4 z = -556.1 detector = DummyHitDetector +FullColl DEBUG Retrieved DataHeader with key EventSelector for requested key=* +FullColl.TagTool DEBUG Setting primary ref to Stream1_ref +ReadData INFO in finalize() diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_bi.sh b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_bi.sh index ffcd7ce9ab7c..65170b654431 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_bi.sh +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_bi.sh @@ -1,4 +1,4 @@ -#!/bin/sh -xv +#!/bin/sh #/** @file post_check_bi.sh # @brief sh script that check the return code of an executable and compares # its output with a reference (if available). Modified to restrict checks @@ -18,7 +18,7 @@ else joblog=${test}.log if [ "$status" = 0 ] then - echo "[92;1m post_check_bi.sh> OK: ${test} exited normally. Output is in $joblog [m" + #echo "[92;1m post_check_bi.sh> OK: ${test} exited normally. Output is in $joblog [m" reflog=../share/${test}.ref grep -e 'WriteData' \ -e 'AddTrigMap' \ @@ -32,7 +32,7 @@ else joblog=${joblog}.small if [ -r $reflog ] then - echo " post_check_bi.sh> Now comparing output with reference" + #echo " post_check_bi.sh> Now comparing output with reference" # ignore diff annotations PP='^---|^[[:digit:]]+[acd,][[:digit:]]+' @@ -95,7 +95,8 @@ else echo "[97;101;1m post_check_bi.sh> ERROR: $joblog and $reflog differ [m" exit 1 else - echo "[92;1m post_check_bi.sh> OK: $joblog and $reflog identical [m" + true + #echo "[92;1m post_check_bi.sh> OK: $joblog and $reflog identical [m" fi else tail $joblog @@ -112,7 +113,7 @@ fi # Check output for ERROR/FATAL joblog=${test}.log -echo +#echo exit $status diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_bs.sh b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_bs.sh index 4c0ad2a24b26..f7dd12192cef 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_bs.sh +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_bs.sh @@ -1,28 +1,28 @@ -#!/bin/sh -xv -#/** @file post_check_co.sh +#!/bin/sh +#/** @file post_check_bs.sh # @brief sh script that check the return code of an executable and compares # its output with a reference (if available). Modified to restrict checks # to output from AthenaPoolMultiTest CheckOutput test. # @param test_name # # @author Jack Cranshaw (Jack.Cranshaw@cern.ch), Paolo Calafiura (pcalafiura@lbl.gov). -# $Id: post_check_co.sh,v 1.4 2006-04-27 21:03:11 cranshaw Exp $ +# $Id: post_check_bs.sh,v 1.4 2006-04-27 21:03:11 cranshaw Exp $ # @param test_name # # @author Paolo Calafiura <pcalafiura@lbl.gov> - ATLAS Collaboration. -# $Id: post_check_co.sh,v 1.4 2006-04-27 21:03:11 cranshaw Exp $ +# $Id: post_check_bs.sh,v 1.4 2006-04-27 21:03:11 cranshaw Exp $ # **/ test=$1 status=${?} if [ -z "$status" ] then - echo "[93;1m post_check_co.sh> Warning: athena exit status is not available [m" + echo "[93;1m post_check_bs.sh> Warning: athena exit status is not available [m" else # check exit status joblog=${test}.log if [ "$status" = 0 ] then - echo "[92;1m post_check_co.sh> OK: ${test} exited normally. Output is in $joblog [m" + echo "[92;1m post_check_bs.sh> OK: ${test} exited normally. Output is in $joblog [m" reflog=../share/${test}.ref grep -e 'RunEventTag' \ -e 'ByteStreamAtt' \ @@ -36,7 +36,7 @@ else joblog=${joblog}.small if [ -r $reflog ] then -# echo " post_check_co.sh> Now comparing output with reference" +# echo " post_check_bs.sh> Now comparing output with reference" diff -a -b -B $joblog $reflog |\ # ignore diff annotations egrep -a -v '^---|^[[:digit:]]+[acd,][[:digit:]]+' |\ @@ -86,27 +86,27 @@ else diffStatus=$? if [ $diffStatus = 0 ] then - echo "[97;101;1m post_check_co.sh> ERROR: $joblog and $reflog differ [m" + echo "[97;101;1m post_check_bs.sh> ERROR: $joblog and $reflog differ [m" exit 1 else - echo "[92;1m post_check_co.sh> OK: $joblog and $reflog identical [m" + echo "[92;1m post_check_bs.sh> OK: $joblog and $reflog identical [m" fi else tail $joblog - echo "[93;1m post_check_co.sh> WARNING: reference output $reflog not available [m" - echo " post_check_co.sh> Please check ${PWD}/$joblog" + echo "[93;1m post_check_bs.sh> WARNING: reference output $reflog not available [m" + echo " post_check_bs.sh> Please check ${PWD}/$joblog" exit 1 fi else tail $joblog - echo "[97;101;1m post_check_co.sh> ERROR: Athena exited abnormally! Exit code: $status [m" - echo " post_check_co.sh> Please check ${PWD}/$joblog" + echo "[97;101;1m post_check_bs.sh> ERROR: Athena exited abnormally! Exit code: $status [m" + echo " post_check_bs.sh> Please check ${PWD}/$joblog" fi fi # Check output for ERROR/FATAL joblog=${test}.log -echo +#echo exit $status diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_ci.sh b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_ci.sh index 80460ee86428..395df2f24eab 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_ci.sh +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_ci.sh @@ -1,4 +1,4 @@ -#!/bin/sh -xv +#!/bin/sh #/** @file post_check_ci.sh # @brief sh script that check the return code of an executable and compares # its output with a reference (if available). Modified to restrict checks @@ -22,7 +22,7 @@ else joblog=${test}.log if [ "$status" = 0 ] then - echo "[92;1m post_check_ci.sh> OK: ${test} exited normally. Output is in $joblog [m" + #echo "[92;1m post_check_ci.sh> OK: ${test} exited normally. Output is in $joblog [m" reflog=../share/${test}.ref grep -e 'RegStream1' \ -e 'RunEventTagWriter' \ @@ -96,7 +96,8 @@ else echo "[97;101;1m post_check_ci.sh> ERROR: $joblog and $reflog differ [m" exit 1 else - echo "[92;1m post_check_ci.sh> OK: $joblog and $reflog identical [m" + true + #echo "[92;1m post_check_ci.sh> OK: $joblog and $reflog identical [m" fi else tail $joblog @@ -113,7 +114,7 @@ fi # Check output for ERROR/FATAL joblog=${test}.log -echo +#echo exit $status diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_cn.sh b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_cn.sh index 8cbc6922e655..4776d066623a 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_cn.sh +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_cn.sh @@ -1,28 +1,28 @@ -#!/bin/sh -xv -#/** @file post_check_co.sh +#!/bin/sh +#/** @file post_check_cn.sh # @brief sh script that check the return code of an executable and compares # its output with a reference (if available). Modified to restrict checks # to output from AthenaPoolMultiTest CheckOutput test. # @param test_name # # @author Jack Cranshaw (Jack.Cranshaw@cern.ch), Paolo Calafiura (pcalafiura@lbl.gov). -# $Id: post_check_co.sh,v 1.4 2006-04-27 21:03:11 cranshaw Exp $ +# $Id: post_check_cn.sh,v 1.4 2006-04-27 21:03:11 cranshaw Exp $ # @param test_name # # @author Paolo Calafiura <pcalafiura@lbl.gov> - ATLAS Collaboration. -# $Id: post_check_co.sh,v 1.4 2006-04-27 21:03:11 cranshaw Exp $ +# $Id: post_check_cn.sh,v 1.4 2006-04-27 21:03:11 cranshaw Exp $ # **/ test=$1 status=${?} if [ -z "$status" ] then - echo "[93;1m post_check_co.sh> Warning: athena exit status is not available [m" + echo "[93;1m post_check_cn.sh> Warning: athena exit status is not available [m" else # check exit status joblog=${test}.log if [ "$status" = 0 ] then - echo "[92;1m post_check_co.sh> OK: ${test} exited normally. Output is in $joblog [m" + #echo "[92;1m post_check_cn.sh> OK: ${test} exited normally. Output is in $joblog [m" reflog=../share/${test}.ref grep -e 'ReadData' \ -e 'EventSelector' \ @@ -34,7 +34,7 @@ else joblog=${joblog}.small if [ -r $reflog ] then -# echo " post_check_co.sh> Now comparing output with reference" +# echo " post_check_cn.sh> Now comparing output with reference" diff -a -b -B $joblog $reflog |\ # ignore diff annotations egrep -a -v '^---|^[[:digit:]]+[acd,][[:digit:]]+' |\ @@ -88,27 +88,28 @@ else diffStatus=$? if [ $diffStatus = 0 ] then - echo "[97;101;1m post_check_co.sh> ERROR: $joblog and $reflog differ [m" + echo "[97;101;1m post_check_cn.sh> ERROR: $joblog and $reflog differ [m" exit 1 else - echo "[92;1m post_check_co.sh> OK: $joblog and $reflog identical [m" + true + #echo "[92;1m post_check_cn.sh> OK: $joblog and $reflog identical [m" fi else tail $joblog - echo "[93;1m post_check_co.sh> WARNING: reference output $reflog not available [m" - echo " post_check_co.sh> Please check ${PWD}/$joblog" + echo "[93;1m post_check_cn.sh> WARNING: reference output $reflog not available [m" + echo " post_check_cn.sh> Please check ${PWD}/$joblog" exit 1 fi else tail $joblog - echo "[97;101;1m post_check_co.sh> ERROR: Athena exited abnormally! Exit code: $status [m" - echo " post_check_co.sh> Please check ${PWD}/$joblog" + echo "[97;101;1m post_check_cn.sh> ERROR: Athena exited abnormally! Exit code: $status [m" + echo " post_check_cn.sh> Please check ${PWD}/$joblog" fi fi # Check output for ERROR/FATAL joblog=${test}.log -echo +#echo exit $status diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_co.sh b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_co.sh index 3d5500b37e5a..488d67d41e8d 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_co.sh +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_co.sh @@ -1,4 +1,4 @@ -#!/bin/sh -xv +#!/bin/sh #/** @file post_check_co.sh # @brief sh script that check the return code of an executable and compares # its output with a reference (if available). Modified to restrict checks @@ -22,7 +22,7 @@ else joblog=${test}.log if [ "$status" = 0 ] then - echo "[92;1m post_check_co.sh> OK: ${test} exited normally. Output is in $joblog [m" + #echo "[92;1m post_check_co.sh> OK: ${test} exited normally. Output is in $joblog [m" reflog=../share/${test}.ref grep -e 'ReadData' \ -e 'EventSelector' \ @@ -94,7 +94,8 @@ else echo "[97;101;1m post_check_co.sh> ERROR: $joblog and $reflog differ [m" exit 1 else - echo "[92;1m post_check_co.sh> OK: $joblog and $reflog identical [m" + true + #echo "[92;1m post_check_co.sh> OK: $joblog and $reflog identical [m" fi else tail $joblog @@ -111,7 +112,7 @@ fi # Check output for ERROR/FATAL joblog=${test}.log -echo +#echo exit $status diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_es.sh b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_es.sh index 27b2c488152a..ef60dbd160da 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_es.sh +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/test/post_check_es.sh @@ -1,4 +1,4 @@ -#!/bin/sh -xv +#!/bin/sh #/** @file post_check_es.sh # @brief sh script that check the return code of an executable and compares # its output with a reference (if available). Modified to restrict checks @@ -18,7 +18,7 @@ else joblog=${test}.log if [ "$status" = 0 ] then - echo "[92;1m post_check_es.sh> OK: ${test} exited normally. Output is in $joblog [m" + #echo "[92;1m post_check_es.sh> OK: ${test} exited normally. Output is in $joblog [m" reflog=../share/${test}.ref grep -e 'Splitter' \ -e 'Triggered' \ @@ -97,7 +97,8 @@ else echo "[97;101;1m post_check_es.sh> ERROR: $joblog and $reflog differ [m" exit 1 else - echo "[92;1m post_check_es.sh> OK: $joblog and $reflog identical [m" + true + #echo "[92;1m post_check_es.sh> OK: $joblog and $reflog identical [m" fi else tail $joblog @@ -114,7 +115,7 @@ fi # Check output for ERROR/FATAL joblog=${test}.log -echo +#echo exit $status -- GitLab From 3f53eba0f9bfbf68881b648a894ed03ad2975088 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Wed, 13 Jun 2018 16:31:40 +0200 Subject: [PATCH 281/562] IOVDbTestAlg: fix coverity 115070 coverity warning: uninitialized class data member. (Also fixes clang warnings.) Former-commit-id: 6117b894beda45ecc980cb49ea1c14c29db4ab5c --- .../DatabaseTest/IOVDbTestAlg/IOVDbTestAlg/IOVDbTestCoolDCS.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/AtlasTest/DatabaseTest/IOVDbTestAlg/IOVDbTestAlg/IOVDbTestCoolDCS.h b/AtlasTest/DatabaseTest/IOVDbTestAlg/IOVDbTestAlg/IOVDbTestCoolDCS.h index f99b866834b5..71fac8c79c1e 100755 --- a/AtlasTest/DatabaseTest/IOVDbTestAlg/IOVDbTestAlg/IOVDbTestCoolDCS.h +++ b/AtlasTest/DatabaseTest/IOVDbTestAlg/IOVDbTestAlg/IOVDbTestCoolDCS.h @@ -26,8 +26,6 @@ class IOVDbTestCoolDCS: public AthAlgorithm StatusCode finalize(); private: - StoreGateSvc* p_evtstore; - StoreGateSvc* p_detstore; // list folders to be read as AthenaAttributeList std::vector<std::string> m_par_atrlist; // list folders to be read as CondAttrListCollection* -- GitLab From b3bf3b24243b86e80783d13e475326176c89130b Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Thu, 28 Jun 2018 11:18:23 +0200 Subject: [PATCH 282/562] TriggerMenuAnalysis: Fix clang warnings. clang warnings: unused variables / private data members. Former-commit-id: b0d44330f7ad547e412a4e597633a4392a46d0f2 --- .../TriggerMenuAnalysis/TrigMenuFlatNtComponent.h | 1 - .../TrigAnalysis/TriggerMenuAnalysis/src/HLTObjectsInRoI.cxx | 1 - .../TrigAnalysis/TriggerMenuAnalysis/src/RoILinksCnvTool.cxx | 1 - .../TrigAnalysis/TriggerMenuAnalysis/src/TrigAccessTool.cxx | 1 - .../TriggerMenuAnalysis/src/TrigMenuFlatNtComponent.cxx | 4 ++-- 5 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Trigger/TrigAnalysis/TriggerMenuAnalysis/TriggerMenuAnalysis/TrigMenuFlatNtComponent.h b/Trigger/TrigAnalysis/TriggerMenuAnalysis/TriggerMenuAnalysis/TrigMenuFlatNtComponent.h index af27435e32d8..d30a85343a43 100644 --- a/Trigger/TrigAnalysis/TriggerMenuAnalysis/TriggerMenuAnalysis/TrigMenuFlatNtComponent.h +++ b/Trigger/TrigAnalysis/TriggerMenuAnalysis/TriggerMenuAnalysis/TrigMenuFlatNtComponent.h @@ -35,7 +35,6 @@ public: private: std::string m_branchName; ChainEntry::RoIType m_RoIType; - RoILinksCnvTool* m_RoILinksCnvTool; MsgStream* m_log; // Ntuple variables diff --git a/Trigger/TrigAnalysis/TriggerMenuAnalysis/src/HLTObjectsInRoI.cxx b/Trigger/TrigAnalysis/TriggerMenuAnalysis/src/HLTObjectsInRoI.cxx index 4f86920e0b53..a0d43863715e 100755 --- a/Trigger/TrigAnalysis/TriggerMenuAnalysis/src/HLTObjectsInRoI.cxx +++ b/Trigger/TrigAnalysis/TriggerMenuAnalysis/src/HLTObjectsInRoI.cxx @@ -231,7 +231,6 @@ bool HLTObjectsInRoI::isInSameRoI(const HLT::TriggerElement* te, HLT::NavigationCore* /*navitool*/) const { bool status=false; std::vector<const HLT::TriggerElement*>::const_iterator p_roi; - std::vector<HLT::TriggerElement*>::const_iterator p; std::list<const HLT::TriggerElement*> tes; std::list<const HLT::TriggerElement*>::iterator p_te; diff --git a/Trigger/TrigAnalysis/TriggerMenuAnalysis/src/RoILinksCnvTool.cxx b/Trigger/TrigAnalysis/TriggerMenuAnalysis/src/RoILinksCnvTool.cxx index b8f516750b07..730c296bc2b6 100644 --- a/Trigger/TrigAnalysis/TriggerMenuAnalysis/src/RoILinksCnvTool.cxx +++ b/Trigger/TrigAnalysis/TriggerMenuAnalysis/src/RoILinksCnvTool.cxx @@ -124,7 +124,6 @@ StatusCode RoILinksCnvTool::beginRun() { log() << MSG::INFO << "List of triggers to check" << endmsg; - vector<string>::const_iterator p2; vector<string> cg_chains; // log() << MSG::DEBUG << "Now checking all L2 triggers" << endmsg; diff --git a/Trigger/TrigAnalysis/TriggerMenuAnalysis/src/TrigAccessTool.cxx b/Trigger/TrigAnalysis/TriggerMenuAnalysis/src/TrigAccessTool.cxx index 9391b8f1afa5..f6cdfe0dd793 100755 --- a/Trigger/TrigAnalysis/TriggerMenuAnalysis/src/TrigAccessTool.cxx +++ b/Trigger/TrigAnalysis/TriggerMenuAnalysis/src/TrigAccessTool.cxx @@ -77,7 +77,6 @@ HLTObjectsInRoI* TrigAccessTool::findRoI(int isig, << objs.size() << " objs)"); const std::vector<HLT::TriggerElement*> tmp_tes; - const std::vector<HLT::TriggerElement*>::const_iterator p_te; HLTObjectsInRoI* x=0; std::vector<HLTObjectsInRoI*>::iterator p; diff --git a/Trigger/TrigAnalysis/TriggerMenuAnalysis/src/TrigMenuFlatNtComponent.cxx b/Trigger/TrigAnalysis/TriggerMenuAnalysis/src/TrigMenuFlatNtComponent.cxx index 59025fb16ae4..aa7f9e635dc9 100644 --- a/Trigger/TrigAnalysis/TriggerMenuAnalysis/src/TrigMenuFlatNtComponent.cxx +++ b/Trigger/TrigAnalysis/TriggerMenuAnalysis/src/TrigMenuFlatNtComponent.cxx @@ -15,9 +15,9 @@ using namespace std; RoINtComponent::RoINtComponent(const std::string& brname, ChainEntry::RoIType roi_type, - RoILinksCnvTool* roitool, + RoILinksCnvTool* /*roitool*/, MsgStream* msg) : - m_branchName(brname), m_RoIType(roi_type), m_RoILinksCnvTool(roitool), + m_branchName(brname), m_RoIType(roi_type), m_log(msg), m_type(0), m_lastStep(0) { } -- GitLab From 1c428acdc3c44678fbf7791ba28d31fbffe77bf9 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Thu, 28 Jun 2018 11:18:37 +0200 Subject: [PATCH 283/562] TrigSteering: Fix clang warnings. clang warnings: uninitialized variables. Former-commit-id: cbb38e32d21de7eda4ca682c2e447dc30b958e13 --- Trigger/TrigSteer/TrigSteering/src/Lvl1FromFile.cxx | 1 - Trigger/TrigSteer/TrigSteering/src/ResultBuilder.cxx | 1 - 2 files changed, 2 deletions(-) diff --git a/Trigger/TrigSteer/TrigSteering/src/Lvl1FromFile.cxx b/Trigger/TrigSteer/TrigSteering/src/Lvl1FromFile.cxx index a5289c879ca1..6017d5fda425 100755 --- a/Trigger/TrigSteer/TrigSteering/src/Lvl1FromFile.cxx +++ b/Trigger/TrigSteer/TrigSteering/src/Lvl1FromFile.cxx @@ -130,7 +130,6 @@ ErrorCode Lvl1FromFile::activate(const std::string& str, std::vector<HLT::Steeri } } else { std::vector<std::string> names = split(str, ";"); - std::vector<std::string>::const_iterator namesIt; ATH_MSG_DEBUG("activating selected chains:" << names); for (std::vector<HLT::SteeringChain*>::const_iterator it = m_configuredChains->begin(); diff --git a/Trigger/TrigSteer/TrigSteering/src/ResultBuilder.cxx b/Trigger/TrigSteer/TrigSteering/src/ResultBuilder.cxx index 89e192d9d518..15de84eae0ad 100755 --- a/Trigger/TrigSteer/TrigSteering/src/ResultBuilder.cxx +++ b/Trigger/TrigSteer/TrigSteering/src/ResultBuilder.cxx @@ -62,7 +62,6 @@ ErrorCode ResultBuilder::setConfiguredChains(const std::vector<HLT::SteeringChai // find highest TriggerType bit configured for this run std::vector<HLT::SteeringChain*>::const_iterator chainIt; - std::vector<TrigConf::HLTTriggerType*>::const_iterator ttIt; for ( chainIt = configuredChains.begin(); chainIt != configuredChains.end(); ++chainIt ) { if ( (int)m_highestTriggerTypeBit < (int)(*chainIt)->getChainCounter() ) { m_highestTriggerTypeBit = (int)(*chainIt)->getChainCounter(); -- GitLab From 9213543167f91f91740360be161c5e3f654c7195 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Thu, 28 Jun 2018 11:19:05 +0200 Subject: [PATCH 284/562] TrkAlignGenTools: FIx clang warning. clang warning: unused variable. Former-commit-id: 4a48444b8febbcde0ded9b8edf66daad240de6d3 --- Tracking/TrkAlignment/TrkAlignGenTools/src/MatrixTool.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/Tracking/TrkAlignment/TrkAlignGenTools/src/MatrixTool.cxx b/Tracking/TrkAlignment/TrkAlignGenTools/src/MatrixTool.cxx index b497e4b94f39..2a414099334c 100644 --- a/Tracking/TrkAlignment/TrkAlignGenTools/src/MatrixTool.cxx +++ b/Tracking/TrkAlignment/TrkAlignGenTools/src/MatrixTool.cxx @@ -1611,8 +1611,6 @@ namespace Trk { { const AlignModuleList * alignModules = m_alignModuleTool->alignModules1D(); - std::vector<int>::iterator it; - AlignModuleList::const_iterator imod = alignModules->begin(); AlignModuleList::const_iterator imod_end = alignModules->end(); for( ; imod!=imod_end; ++imod) { -- GitLab From 3707d34bcc8cf3cde7740bdc293dd6c2820b1342 Mon Sep 17 00:00:00 2001 From: Tamara Vazquez Schroeder <tamara.vazquez.schroeder@cern.ch> Date: Thu, 28 Jun 2018 17:27:12 +0000 Subject: [PATCH 285/562] Merge branch '21.0-MuonHistUpd' into '21.0' histogram updates See merge request atlas/athena!12350 (cherry picked from commit 9bfcb4ad864de3654eafb759e86450ee91561beb [formerly 3d71c2ac13be798d85d534d089e87e632f7c02c9]) 397204f8 histogram updates Former-commit-id: 133e9f786f87ce212c3080304a600aa842c9bdea --- .../config/MuonCombined/collisions_run.config | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/DataQuality/DataQualityConfigurations/config/MuonCombined/collisions_run.config b/DataQuality/DataQualityConfigurations/config/MuonCombined/collisions_run.config index 6b5a83585863..855a525730b1 100644 --- a/DataQuality/DataQualityConfigurations/config/MuonCombined/collisions_run.config +++ b/DataQuality/DataQualityConfigurations/config/MuonCombined/collisions_run.config @@ -294,6 +294,7 @@ dir MuonPhysics { } hist Muons_Z_Origin_eta_phi { output = MuonTracking/Shifter/Z + display = Ref2DSignif,TCanvas(490,900) description = Muons associated with Z, eta and phi distribution } hist Muons_Z_Tight_eff { @@ -447,6 +448,7 @@ dir MuonPhysics { } hist Muons_Jpsi_Origin_eta_phi { output = MuonTracking/Shifter/Jpsi + display = Ref2DSignif,TCanvas(490,900) description = Muons associated with Jpsi, Eta and Phi directions } hist Muons_Jpsi_Tight_eff { @@ -1279,7 +1281,7 @@ dir MuonPhysics { # -------------------------------------------- hist Segments_CBMuons_eff_chamberIndex_perSector { output = MuonTracking/Shifter/Muons - algorithm = MCP_EffbyChamb_Comp + algorithm = MCP_EffbyChamb_Comp_CBMuons display = AxisRange(0.5,1.0,"Z") description = Segment precision layer hit efficiency for each chamber } @@ -1897,7 +1899,22 @@ compositeAlgorithm BinsOutOfRange&BinContentComp { algorithm MCP_EffbyChamb_Comp { name = BinsOutOfRange&BinContentComp - BinsOutOfRange|RANGE_D = 0.88 + BinsOutOfRange|RANGE_D = 0.87 + BinsOutOfRange|RANGE_U = 1.01 + BinsOutOfRange|ignoreval = 0 + BinsOutOfRange|thresholds = bin49_thresholds + BinContentComp|Value = 0.70 + BinContentComp|FixedError = 0.0001 + BinContentComp|NSigma = 1 + BinContentComp|LessThan = 1 + BinContentComp|PublishBins = 1 + BinContentComp|Ignore0 = 1 + BinContentComp|thresholds = bin11_thresholds +} + +algorithm MCP_EffbyChamb_Comp_CBMuons { + name = BinsOutOfRange&BinContentComp + BinsOutOfRange|RANGE_D = 0.86 BinsOutOfRange|RANGE_U = 1.01 BinsOutOfRange|ignoreval = 0 BinsOutOfRange|thresholds = bin49_thresholds -- GitLab From b9158dd0936960b807d3ae81e932d635e6c5d80e Mon Sep 17 00:00:00 2001 From: Tamara Vazquez Schroeder <tamara.vazquez.schroeder@cern.ch> Date: Thu, 28 Jun 2018 17:33:09 +0000 Subject: [PATCH 286/562] Merge branch 'vertexing-wo-beamline' into '21.0' Fix inconsistency in the setup in the no beam constraint mode observed in ATR-18342 See merge request atlas/athena!12270 (cherry picked from commit d6117ac7860363367118c3f79f2e5fe8ee1528eb [formerly d60db658abd9159cd9d06f3de0671663d7b01c86]) c29e29bf Fix inconsistency in the setup in the no beam constraint mode observed in ATR-18342 Former-commit-id: 4bdc902b447e55dcd00f889b9e22894786a9656a --- .../python/InDetTrigConfigRecLoadToolsPost.py | 64 ++++++++----------- 1 file changed, 28 insertions(+), 36 deletions(-) diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsPost.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsPost.py index eb77debdb38b..aadc4da5705f 100644 --- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsPost.py +++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsPost.py @@ -135,45 +135,37 @@ if InDetTrigFlags.doNewTracking(): if (InDetTrigFlags.doPrintConfigurables()): print InDetTrigTrackZ0SortingTool - if (InDetTrigFlags.primaryVertexSetup() == 'DefaultFastFinding' or - InDetTrigFlags.primaryVertexSetup() == 'DefaultFullFinding' or - InDetTrigFlags.primaryVertexSetup() == 'DefaultKalmanFinding'): - #if (not InDetTrigFlags.useBeamConstraint()): - if False: - from TrkVertexSeedFinderUtils.TrkVertexSeedFinderUtilsConf import Trk__Trk2dDistanceSeeder - TrkTrig2dDistanceSeeder = Trk__Trk2dDistanceSeeder(name = "TrkTrig2dDistanceSeederFor2D", - #SolveAmbiguityUsingZ = False - ) - try: - TrkTrig2dDistanceSeeder.SolveAmbiguityUsingZ = False - except: - pass - - ToolSvc+=TrkTrig2dDistanceSeeder - if (InDetTrigFlags.doPrintConfigurables()): - print TrkTrig2dDistanceSeeder - # - from TrkVertexSeedFinderUtils.TrkVertexSeedFinderUtilsConf import Trk__Trk2DDistanceFinder - TrkTrig2DDistanceFinder = Trk__Trk2DDistanceFinder(name = "TrkTrig2DDistanceFinder", - Trk2dDistanceSeeder = TrkTrig2dDistanceSeeder) - - ToolSvc+=TrkTrig2DDistanceFinder - if (InDetTrigFlags.doPrintConfigurables()): - print TrkTrig2DDistanceFinder + if (not InDetTrigFlags.useBeamConstraint()): + from TrkVertexSeedFinderUtils.TrkVertexSeedFinderUtilsConf import Trk__Trk2dDistanceSeeder + TrkTrig2dDistanceSeeder = Trk__Trk2dDistanceSeeder(name = "TrkTrig2dDistanceSeederFor2D", + SolveAmbiguityUsingZ = False + ) - from TrkVertexSeedFinderTools.TrkVertexSeedFinderToolsConf import Trk__CrossDistancesSeedFinder - InDetTrig2DVtxSeedFinder = Trk__CrossDistancesSeedFinder(name = "InDetTrig2DCrossDistancesSeedFinder", - TrkDistanceFinder = TrkTrig2DDistanceFinder, - trackdistcutoff = 1., - trackdistexppower = 2, - useweights=True - #Mode1dFinder = # default, no setting needed - ) - ToolSvc+=InDetTrig2DVtxSeedFinder - if (InDetTrigFlags.doPrintConfigurables()): - print InDetTrig2DVtxSeedFinder + ToolSvc+=TrkTrig2dDistanceSeeder + if (InDetTrigFlags.doPrintConfigurables()): + print TrkTrig2dDistanceSeeder + # + from TrkVertexSeedFinderUtils.TrkVertexSeedFinderUtilsConf import Trk__Trk2DDistanceFinder + TrkTrig2DDistanceFinder = Trk__Trk2DDistanceFinder(name = "TrkTrig2DDistanceFinder", + Trk2dDistanceSeeder = TrkTrig2dDistanceSeeder) + + ToolSvc+=TrkTrig2DDistanceFinder + if (InDetTrigFlags.doPrintConfigurables()): + print TrkTrig2DDistanceFinder + + from TrkVertexSeedFinderTools.TrkVertexSeedFinderToolsConf import Trk__CrossDistancesSeedFinder + InDetTrig2DVtxSeedFinder = Trk__CrossDistancesSeedFinder(name = "InDetTrig2DCrossDistancesSeedFinder", + TrkDistanceFinder = TrkTrig2DDistanceFinder, + trackdistcutoff = 1., + trackdistexppower = 2, + useweights=True + #Mode1dFinder = # default, no setting needed + ) + ToolSvc+=InDetTrig2DVtxSeedFinder + if (InDetTrigFlags.doPrintConfigurables()): + print InDetTrig2DVtxSeedFinder if InDetTrigFlags.vertexSeedFinder() == 'SlidingWindowMultiSeedFinder': #now setup new stuff -- GitLab From 650e760ef44460dfb14ee01b867da2c6b823d003 Mon Sep 17 00:00:00 2001 From: Tamara Vazquez Schroeder <tamara.vazquez.schroeder@cern.ch> Date: Thu, 28 Jun 2018 17:25:54 +0000 Subject: [PATCH 287/562] Merge branch '21.0-sleptonsLLP' into '21.0' Fix to PDGTABLE writing for long-lived sleptons See merge request atlas/athena!12370 (cherry picked from commit 53955e8ab526c8a4c846c4ea6f39014987bd8848 [formerly 9d961fba2b06c57f3d7bbb3b2355b48e15a89e36]) dd720410 Fix to PDGTABLE writing for lon-lived sleptons Former-commit-id: b144d06278d05e28ad619808e8d0825d92a21787 --- .../share/specialConfig/preInclude.SleptonsLLP.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.SleptonsLLP.py b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.SleptonsLLP.py index 0fe2c35979ba..d136a9771f00 100644 --- a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.SleptonsLLP.py +++ b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.SleptonsLLP.py @@ -3,7 +3,7 @@ ################################################################# def get_and_fix_PDGTABLE(replace): - import os, shutil, re + import os, shutil, re, sys # Download generic PDGTABLE (do not overwrite existing one if it exists, use existing one instead) os.system('get_files -data PDGTABLE.MeV') @@ -18,10 +18,10 @@ def get_and_fix_PDGTABLE(replace): lines.append('M' + str(pdgid).rjust(8) +''.ljust(26) + ('%11.5E' % mass).ljust(15) + '+0.0E+00'.ljust(9) + '-0.0E+00'.ljust(9) + - name.strip() + ''.ljust(6) + charge.strip() + '\n') + name.strip() + ''.ljust(6) + charge.strip()+''.rjust(20-len(name.strip())) + '\n') lines.append('W' + str(pdgid).rjust(8) +''.ljust(26) + '0.E+00'.ljust(15) + '+0.0E+00'.ljust(9) + '-0.0E+00'.ljust(9) + - name.strip() + ''.ljust(6) + charge.strip() + '\n') + name.strip() + ''.ljust(6) + charge.strip()+''.rjust(20-len(name.strip())) + '\n') else: for i in xrange(len(lines)): if re.search(r'M\s+'+str(pdgid)+'\s+\S+', lines[i]): @@ -33,6 +33,7 @@ def get_and_fix_PDGTABLE(replace): update.close() print 'modfied PDGTABLE\n%s\n' % ''.join(lines) + sys.stdout.flush() def load_files_for_sleptonLLP_scenario(simdict): -- GitLab From 63283d70d05251d358b1d38988911cd0df6a9626 Mon Sep 17 00:00:00 2001 From: Andrea Coccaro <andrea.coccaro@cern.ch> Date: Thu, 28 Jun 2018 10:12:19 +0000 Subject: [PATCH 288/562] Merge branch 'donot_dumpTracks' into '21.1' Don't call dumpTracks unless printing DEBUG messages See merge request atlas/athena!12307 (cherry picked from commit 735453738a3a52282f66c9db972a3eea931f9a33 [formerly 4479061dee16e336503b5329e67e950197739f0f]) 1ad7be30 Don't call dumpTracks unless printing DEBUG messages Former-commit-id: 8e48268c0f0f80adaec749c4557b846c8b4e475d --- .../src/DenseEnvironmentsAmbiguityProcessorTool.cxx | 2 +- .../TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.cxx | 2 +- .../TrkAmbiguityProcessor/src/TrackSelectionProcessorTool.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.cxx b/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.cxx index fe4e6e47b54e..5885b4d530d6 100644 --- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.cxx +++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.cxx @@ -476,7 +476,7 @@ TrackCollection* Trk::DenseEnvironmentsAmbiguityProcessorTool::process(const Tr if (m_monitorTracks) m_observerTool->saveTracksToxAOD(); - if (msgLvl(MSG::INFO)) dumpTracks(*m_finalTracks); + if (msgLvl(MSG::DEBUG)) dumpTracks(*m_finalTracks); // memory defragmantation fix. Cleaning before returning the result m_prdSigSet.clear(); diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.cxx b/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.cxx index e15f0ddb9ce6..bd3442151764 100644 --- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.cxx +++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.cxx @@ -617,7 +617,7 @@ TrackCollection* Trk::SimpleAmbiguityProcessorTool::process(const TrackCollecti ATH_MSG_DEBUG ("Solving Tracks"); solveTracks(); - if (msgLvl(MSG::INFO)) dumpTracks(*m_finalTracks); + if (msgLvl(MSG::DEBUG)) dumpTracks(*m_finalTracks); // memory defragmantation fix. Cleaning before returning the result m_prdSigSet.clear(); diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackSelectionProcessorTool.cxx b/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackSelectionProcessorTool.cxx index 3dfd8cac2942..5447c79076ea 100644 --- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackSelectionProcessorTool.cxx +++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackSelectionProcessorTool.cxx @@ -99,7 +99,7 @@ TrackCollection* Trk::TrackSelectionProcessorTool::process(const TrackCollectio solveTracks(); - if (msgLvl(MSG::INFO)) dumpTracks(*m_finalTracks); + if (msgLvl(MSG::DEBUG)) dumpTracks(*m_finalTracks); // memory defragmantation fix. Cleaning before returning the result m_prdSigSet.clear(); -- GitLab From 264f102de891580cde881e4738d032080b833323 Mon Sep 17 00:00:00 2001 From: "Vincent R. Pascuzzi" <vincent.pascuzzi@cern.ch> Date: Fri, 29 Jun 2018 02:18:47 +0000 Subject: [PATCH 289/562] Update SimHitCreatorMS.cxx: initialise pointers with `nullptr` Previously initialised to 0. Recommended to use `nullptr`. For consistency, changed `NULL` to `nullptr` (though I believe in modern C++ they are equivalent). Former-commit-id: 9715f98919114c476e95d929901835158e818d1e --- .../ISF_FatrasToolsMS/src/SimHitCreatorMS.cxx | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/src/SimHitCreatorMS.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/src/SimHitCreatorMS.cxx index cb1680e2b73e..8b1fdbe7ca78 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/src/SimHitCreatorMS.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/src/SimHitCreatorMS.cxx @@ -53,23 +53,23 @@ iFatras::SimHitCreatorMS::SimHitCreatorMS(const std::string& t, m_cscCollectionName("CSC_Hits"), m_mmCollectionName("MM_Hits"), m_stgcCollectionName("sTGC_Hits"), - m_mdtSimHitCollection(0), - m_rpcSimHitCollection(0), - m_tgcSimHitCollection(0), - m_cscSimHitCollection(0), - m_mmSimHitCollection(0), - m_stgcSimHitCollection(0), + m_mdtSimHitCollection(nullptr), + m_rpcSimHitCollection(nullptr), + m_tgcSimHitCollection(nullptr), + m_cscSimHitCollection(nullptr), + m_mmSimHitCollection(nullptr), + m_stgcSimHitCollection(nullptr), m_randomSvc("AtDSFMTGenSvc", n), m_randomEngineName("FatrasRnd"), - m_randomEngine(0), - m_mdtHitIdHelper(0), - m_rpcHitIdHelper(0), - m_cscHitIdHelper(0), - m_tgcHitIdHelper(0), - m_mmOffToSimId(NULL), - m_stgcOffToSimId(NULL), + m_randomEngine(nullptr), + m_mdtHitIdHelper(nullptr), + m_rpcHitIdHelper(nullptr), + m_cscHitIdHelper(nullptr), + m_tgcHitIdHelper(nullptr), + m_mmOffToSimId(nullptr), + m_stgcOffToSimId(nullptr), m_idHelperTool("Muon::MuonIdHelperTool/MuonIdHelperTool"), - m_muonMgr(0), + m_muonMgr(nullptr), m_mdtSigmaDriftRadius(0.08), m_createAllMdtHits(true) { -- GitLab From e59eaf068dcb60493e11598f6119e8be8ea0ae2d Mon Sep 17 00:00:00 2001 From: Shota Hayashida <hayashida@hepl.phys.nagoya-u.ac.jp> Date: Fri, 29 Jun 2018 15:06:04 +0200 Subject: [PATCH 290/562] Updated to Service/Tool handle Former-commit-id: 63239320a5c8a36074a4e2611dde07f22fa0852d --- .../TrigL2MuonSA/CscDataPreparator.h | 10 ++- .../TrigL2MuonSA/MuCalStreamerTool.h | 6 +- .../TrigL2MuonSA/RpcDataPreparator.h | 9 ++- .../TrigL2MuonSA/TgcDataPreparator.h | 32 ++++---- .../TrigL2MuonSA/src/CscDataPreparator.cxx | 43 +++-------- .../TrigL2MuonSA/src/MdtDataPreparator.cxx | 10 +-- .../TrigL2MuonSA/src/MuCalStreamerTool.cxx | 74 ++++++++++--------- .../TrigL2MuonSA/src/MuFastDataPreparator.cxx | 2 +- .../TrigL2MuonSA/src/MuFastSteering.cxx | 6 +- .../TrigL2MuonSA/src/RpcDataPreparator.cxx | 45 +++-------- .../TrigL2MuonSA/src/TgcDataPreparator.cxx | 68 ++++++----------- 11 files changed, 125 insertions(+), 180 deletions(-) diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscDataPreparator.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscDataPreparator.h index 54d383eb0bf0..572a8e704e99 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscDataPreparator.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscDataPreparator.h @@ -86,18 +86,20 @@ namespace TrigL2MuonSA { ServiceHandle<StoreGateSvc> m_storeGateSvc; // Cache the ActiveStoreSvc ptr - ActiveStoreSvc* p_ActiveStore; + ServiceHandle<ActiveStoreSvc> m_activeStore; // Geometry Services const MuonGM::MuonDetectorManager* m_muonMgr; const CscIdHelper* m_cscIdHelper; // Region Selector - IRegSelSvc* m_regionSelector; + ServiceHandle<IRegSelSvc> m_regionSelector; // 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"}; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuCalStreamerTool.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuCalStreamerTool.h index 3219c96231bc..dc341b3316b6 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuCalStreamerTool.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuCalStreamerTool.h @@ -118,7 +118,8 @@ namespace TrigL2MuonSA { ServiceHandle<StoreGateSvc> m_storeGate; // the region selector - IRegSelSvc* m_regionSelector; + //IRegSelSvc* m_regionSelector; + ServiceHandle<IRegSelSvc> m_regionSelector; // RPC cabling service const IRPCcablingSvc* m_rpcCabling; @@ -129,7 +130,8 @@ namespace TrigL2MuonSA { // const TGCCablingBase* m_tgcCablingSvc; // ROB DataProvider - ROBDataProviderSvc* m_robDataProvider; + //ROBDataProviderSvc* m_robDataProvider; + ServiceHandle<IROBDataProviderSvc> m_robDataProvider; // id of the circular buffer int m_cid; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcDataPreparator.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcDataPreparator.h index c15eb8e1f785..dd84326533d0 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcDataPreparator.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcDataPreparator.h @@ -82,11 +82,11 @@ class RpcDataPreparator: public AthAlgTool private: // Reference to StoreGateSvc; - ServiceHandle<StoreGateSvc> m_storeGateSvc; - ActiveStoreSvc* m_activeStore; + ServiceHandle<StoreGateSvc> m_storeGateSvc; + ServiceHandle<ActiveStoreSvc> m_activeStore; // Region Selector - IRegSelSvc* m_regionSelector; + ServiceHandle<IRegSelSvc> m_regionSelector; // RPC cabling service const IRPCcablingSvc* m_rpcCabling; @@ -97,7 +97,8 @@ class RpcDataPreparator: public AthAlgTool const RpcIdHelper* m_rpcIdHelper; // handles to the RoI driven data access - ToolHandle<Muon::IMuonRdoToPrepDataTool> m_rpcPrepDataProvider; + ToolHandle<Muon::IMuonRdoToPrepDataTool> m_rpcPrepDataProvider { + this, "RpcPrepDataProvider", "Muon::RpcRdoToPrepDataTool/RpcPrepDataProviderTool", ""}; ToolHandle <Muon::MuonIdHelperTool> m_idHelperTool; //!< Pointer to concrete tool diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcDataPreparator.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcDataPreparator.h index 928f01687f1a..25e9bbe74537 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcDataPreparator.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcDataPreparator.h @@ -9,7 +9,8 @@ #include "GaudiKernel/ServiceHandle.h" #include "GaudiKernel/ToolHandle.h" -#include "ByteStreamCnvSvcBase/ROBDataProviderSvc.h" +//#include "ByteStreamCnvSvcBase/ROBDataProviderSvc.h" +#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h" #include "TrigT1Interfaces/RecMuonRoI.h" #include "MuonRDO/TgcRdoContainer.h" @@ -90,28 +91,26 @@ class TgcDataPreparator: public AthAlgTool const MuonGM::MuonDetectorManager* m_muonMgr; const MuonGM::TgcReadoutElement* m_tgcReadout; const TgcIdHelper* m_tgcIdHelper; - ActiveStoreSvc* m_activeStore; - // vector of the TGC hash ID list - std::vector<IdentifierHash> m_tgcHashList; + //ActiveStoreSvc* m_activeStore; + ServiceHandle<ActiveStoreSvc> m_activeStore; - // Tool for Rdo to Prep Data conversion - ToolHandle<Muon::IMuonRdoToPrepDataTool> m_tgcPrepDataProvider; - // Cabling (new) MuonTGC_CablingSvc* m_tgcCabling; + // Tool for Rdo to Prep Data conversion + ToolHandle<Muon::IMuonRdoToPrepDataTool> m_tgcPrepDataProvider { + this, "TgcPrepDataProvider", "Muon::TgcRdoToPrepDataTool/TgcPrepDataProviderTool", ""}; + // Tools for the Raw data conversion - ToolHandle<Muon::IMuonRawDataProviderTool> m_tgcRawDataProvider; - - // TGC raw data - std::vector<tgcRawData> m_tgcRawData; + ToolHandle<Muon::IMuonRawDataProviderTool> m_tgcRawDataProvider { + this, "TGC_RawDataProvider", "Muon::TGC_RawDataProviderTool", ""}; // Region Selector - IRegSelSvc* m_regionSelector; + ServiceHandle<IRegSelSvc> m_regionSelector; // ROB DataProvider - ROBDataProviderSvc* m_robDataProvider; + ServiceHandle<IROBDataProviderSvc> m_robDataProvider; // option TrigL2MuonSA::TgcDataPreparatorOptions m_options; @@ -123,6 +122,13 @@ class TgcDataPreparator: public AthAlgTool this, "TGCPrepDataContainer", "TGC_Measurements", "Name of the TGCContainer to read in"}; bool m_use_RoIBasedDataAccess; + + // vector of the TGC hash ID list + std::vector<IdentifierHash> m_tgcHashList; + + // TGC raw data + std::vector<tgcRawData> m_tgcRawData; + }; } // namespace TrigL2MuonSA diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscDataPreparator.cxx index 9006a3db14d6..e6610224fbb7 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscDataPreparator.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscDataPreparator.cxx @@ -36,15 +36,10 @@ TrigL2MuonSA::CscDataPreparator::CscDataPreparator(const std::string& type, const IInterface* parent): AthAlgTool(type,name,parent), m_storeGateSvc( "StoreGateSvc", name ), - p_ActiveStore(0), - m_regionSelector(0), - m_cscPrepDataProvider("Muon::CscRdoToCscPrepDataTool/CscPrepDataProviderTool"), - m_cscClusterProvider("CscThresholdClusterBuilderTool") + m_activeStore( "ActiveStoreSvc", name ), + m_regionSelector( "RegSelSvc", name ) { declareInterface<TrigL2MuonSA::CscDataPreparator>(this); - - declareProperty("CscPrepDataProvider", m_cscPrepDataProvider); - declareProperty("CscClusterProvider", m_cscClusterProvider); } // -------------------------------------------------------------------------------- @@ -73,11 +68,7 @@ StatusCode TrigL2MuonSA::CscDataPreparator::initialize() ATH_CHECK( m_storeGateSvc.retrieve() ); // Retrieve ActiveStore - sc = serviceLocator()->service("ActiveStoreSvc", p_ActiveStore); - if( !sc.isSuccess() || 0 == p_ActiveStore ){ - ATH_MSG_ERROR(" Could not find ActiveStoreSvc "); - return sc; - } + ATH_CHECK( m_activeStore.retrieve() ); ATH_CHECK( m_cscPrepDataProvider.retrieve() ); ATH_MSG_INFO("Retrieved " << m_cscPrepDataProvider); @@ -86,34 +77,18 @@ StatusCode TrigL2MuonSA::CscDataPreparator::initialize() ATH_MSG_INFO("Retrieved " << m_cscClusterProvider); // Detector Store - StoreGateSvc* detStore; - sc = serviceLocator()->service("DetectorStore", detStore); - if( sc.isFailure() ){ - ATH_MSG_ERROR("Could not retrieve DetectorStore."); - return sc; - } + ServiceHandle<StoreGateSvc> detStore("DetectorStore", name()); + ATH_CHECK( detStore.retrieve() ); ATH_MSG_DEBUG("Retrieved DetectorStore."); - // CSC ID helper - sc = detStore->retrieve( m_muonMgr, "Muon" ); - if( sc.isFailure() ){ - ATH_MSG_ERROR(" Cannot retrieve MuonGeoModel "); - return sc; - } + ATH_CHECK( detStore->retrieve(m_muonMgr, "Muon") ); ATH_MSG_DEBUG("Retrieved GeoModel from DetectorStore."); m_cscIdHelper = m_muonMgr->cscIdHelper(); - // - std::string serviceName; - // Locate RegionSelector - serviceName = "RegionSelector"; - sc = service("RegSelSvc", m_regionSelector); - if(sc.isFailure()) { - ATH_MSG_ERROR("Could not retrieve " << serviceName); - return sc; - } - ATH_MSG_DEBUG("Retrieved service " << serviceName); + ATH_CHECK( m_regionSelector.retrieve() ); + ATH_MSG_DEBUG("Retrieved service " << m_regionSelector.name()); + ATH_CHECK(m_cscPrepContainerKey.initialize()); diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx index e762920969a0..964f53a10aeb 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx @@ -54,11 +54,11 @@ TrigL2MuonSA::MdtDataPreparator::MdtDataPreparator(const std::string& type, const std::string& name, const IInterface* parent): AthAlgTool(type,name,parent), - m_storeGateSvc( "StoreGateSvc", this->name() ), - m_activeStore( "ActiveStoreSvc", this->name() ), - m_mdtCabling("MuonMDT_CablingSvc", this->name()), - m_regionSelector("RegSelSvc", this->name() ), - m_robDataProvider("ROBDataProviderSvc", this->name()), + m_storeGateSvc( "StoreGateSvc", name ), + m_activeStore( "ActiveStoreSvc", name ), + m_mdtCabling("MuonMDT_CablingSvc", name), + m_regionSelector("RegSelSvc", name ), + m_robDataProvider("ROBDataProviderSvc", name), m_recMuonRoIUtils(), m_mdtRegionDefiner("TrigL2MuonSA::MdtRegionDefiner"), m_use_mdtcsm(true), diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx index 7e7fa73bfda2..575c9ea3ff18 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx @@ -39,6 +39,8 @@ TrigL2MuonSA::MuCalStreamerTool::MuCalStreamerTool(const std::string& type, const IInterface* parent): AthAlgTool(type,name,parent), m_storeGate( "StoreGateSvc", name ), + m_regionSelector( "RegSelSvc", name ), + m_robDataProvider( "ROBDataProviderSvc", name ), m_cid(-1), m_calibEvent(0), m_roi(NULL), @@ -72,16 +74,18 @@ StatusCode TrigL2MuonSA::MuCalStreamerTool::initialize() // Retrieve the RPC cabling service ServiceHandle<IRPCcablingServerSvc> RpcCabGet ("RPCcablingServerSvc", name()); - sc = RpcCabGet.retrieve(); - if ( sc != StatusCode::SUCCESS ) { - ATH_MSG_ERROR("Could not retrieve the RPCcablingServerSvc"); - return sc; - } - sc = RpcCabGet->giveCabling(m_rpcCabling); - if ( sc != StatusCode::SUCCESS ) { - ATH_MSG_ERROR("Could not retrieve the RPC Cabling Server"); - return sc; - } + //sc = RpcCabGet.retrieve(); + //if ( sc != StatusCode::SUCCESS ) { + // ATH_MSG_ERROR("Could not retrieve the RPCcablingServerSvc"); + // return sc; + //} + ATH_CHECK( RpcCabGet.retrieve() ); + //sc = RpcCabGet->giveCabling(m_rpcCabling); + //if ( sc != StatusCode::SUCCESS ) { + // ATH_MSG_ERROR("Could not retrieve the RPC Cabling Server"); + // return sc; + //} + ATH_CHECK( RpcCabGet->giveCabling(m_rpcCabling) ); m_rpcCablingSvc = m_rpcCabling->getRPCCabling(); if ( !m_rpcCablingSvc ) { ATH_MSG_ERROR("Could not retrieve the RPC cabling svc"); @@ -106,35 +110,39 @@ StatusCode TrigL2MuonSA::MuCalStreamerTool::initialize() // return StatusCode::FAILURE; //} - sc = m_tgcDataPreparator.retrieve(); - if ( sc.isFailure() ) { - ATH_MSG_ERROR("Could not retrieve " << m_tgcDataPreparator); - return sc; - } + //sc = m_tgcDataPreparator.retrieve(); + //if ( sc.isFailure() ) { + // ATH_MSG_ERROR("Could not retrieve " << m_tgcDataPreparator); + // return sc; + //} + ATH_CHECK( m_tgcDataPreparator.retrieve() ); ATH_MSG_DEBUG("Retrieved service " << m_tgcDataPreparator); // locate the region selector - sc = service("RegSelSvc",m_regionSelector); - if ( sc.isFailure() ) { - ATH_MSG_ERROR("Could not retrieve the region selector"); - return sc; - } + //sc = service("RegSelSvc",m_regionSelector); + //if ( sc.isFailure() ) { + // ATH_MSG_ERROR("Could not retrieve the region selector"); + // return sc; + //} + ATH_CHECK( m_regionSelector.retrieve() ); ATH_MSG_DEBUG("Retrieved the region selector"); // Locate ROBDataProvider - std::string serviceName = "ROBDataProvider"; - IService* svc = 0; - sc = service("ROBDataProviderSvc", svc); - if(sc.isFailure()) { - ATH_MSG_ERROR("Could not retrieve " << serviceName); - return sc; - } - m_robDataProvider = dynamic_cast<ROBDataProviderSvc*> (svc); - if( m_robDataProvider == 0 ) { - ATH_MSG_ERROR("Could not cast to ROBDataProviderSvc "); - return StatusCode::FAILURE; - } - ATH_MSG_DEBUG("Retrieved service " << serviceName); + //std::string serviceName = "ROBDataProvider"; + //IService* svc = 0; + //sc = service("ROBDataProviderSvc", svc); + //if(sc.isFailure()) { + // ATH_MSG_ERROR("Could not retrieve " << serviceName); + // return sc; + //} + //m_robDataProvider = dynamic_cast<ROBDataProviderSvc*> (svc); + //if( m_robDataProvider == 0 ) { + // ATH_MSG_ERROR("Could not cast to ROBDataProviderSvc "); + // return StatusCode::FAILURE; + //} + //ATH_MSG_DEBUG("Retrieved service " << serviceName); + ATH_CHECK( m_robDataProvider.retrieve() ); + ATH_MSG_DEBUG("Retrieved service " << m_robDataProvider.name()); // initialize the local vector buffer m_localBuffer = new std::vector<int>(); diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx index 96e83939f79b..609e7a5f1b7f 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx @@ -32,7 +32,7 @@ TrigL2MuonSA::MuFastDataPreparator::MuFastDataPreparator(const std::string& type AthAlgTool(type,name,parent), m_recRPCRoiSvc("LVL1RPC::RPCRecRoiSvc",""), m_options(), - m_regionSelector("RegSelSvc", this->name() ), + m_regionSelector("RegSelSvc", name ), m_rpcDataPreparator("TrigL2MuonSA::RpcDataPreparator"), m_tgcDataPreparator("TrigL2MuonSA::TgcDataPreparator"), m_mdtDataPreparator("TrigL2MuonSA::MdtDataPreparator"), diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx index 090b790e820d..ee833e58e3d8 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx @@ -31,16 +31,16 @@ using namespace SG; MuFastSteering::MuFastSteering(const std::string& name, ISvcLocator* svc) : HLT::FexAlgo(name, svc), - m_storeGate("StoreGateSvc", this->name()), + m_storeGate("StoreGateSvc", name), m_timerSvc("TrigTimerSvc", name), - m_regionSelector("RegSelSvc", this->name()), + m_regionSelector("RegSelSvc", name), m_recMuonRoIUtils(), m_rpcHits(), m_tgcHits(), m_mdtRegion(), m_muonRoad(), m_rpcFitResult(), m_tgcFitResult(), m_mdtHits_normal(), m_mdtHits_overlap(), m_cscHits(), - m_jobOptionsSvc("JobOptionsSvc", this->name()) + m_jobOptionsSvc("JobOptionsSvc", name) { } // -------------------------------------------------------------------------------- diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcDataPreparator.cxx index cd3c9d2cf4d8..ba7ba989e478 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcDataPreparator.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcDataPreparator.cxx @@ -42,13 +42,11 @@ TrigL2MuonSA::RpcDataPreparator::RpcDataPreparator(const std::string& type, const IInterface* parent): AthAlgTool(type,name,parent), m_storeGateSvc( "StoreGateSvc", name ), - m_activeStore(0), - m_regionSelector(0), - m_rpcPrepDataProvider("Muon::RpcRdoToPrepDataTool/RpcPrepDataProviderTool"), + m_activeStore( "ActiveStoreSvc", name ), + m_regionSelector( "RegSelSvc", name ), m_idHelperTool("Muon::MuonIdHelperTool/MuonIdHelperTool") { declareInterface<TrigL2MuonSA::RpcDataPreparator>(this); - declareProperty("RpcPrepDataProvider", m_rpcPrepDataProvider); } // -------------------------------------------------------------------------------- @@ -76,26 +74,16 @@ StatusCode TrigL2MuonSA::RpcDataPreparator::initialize() ATH_CHECK( m_storeGateSvc.retrieve() ); // Locate RegionSelector - sc = service("RegSelSvc", m_regionSelector); - if(sc.isFailure()) { - ATH_MSG_ERROR("Could not retrieve RegionSelector"); - return sc; - } + ATH_CHECK( m_regionSelector.retrieve() ); ATH_MSG_DEBUG("Retrieved service RegionSelector"); - StoreGateSvc* detStore; - sc = serviceLocator()->service("DetectorStore", detStore); - if (sc.isFailure()) { - ATH_MSG_ERROR("Could not retrieve DetectorStore."); - return sc; - } + ServiceHandle<StoreGateSvc> detStore("DetectorStore", name()); + ATH_CHECK( detStore.retrieve() ); ATH_MSG_DEBUG("Retrieved DetectorStore."); - - sc = detStore->retrieve( m_muonMgr ); - if (sc.isFailure()) return sc; + ATH_CHECK( detStore->retrieve( m_muonMgr ) ); ATH_MSG_DEBUG("Retrieved GeoModel from DetectorStore."); m_rpcIdHelper = m_muonMgr->rpcIdHelper(); - + ATH_CHECK( m_rpcPrepDataProvider.retrieve() ); ATH_MSG_DEBUG("Retrieved " << m_rpcPrepDataProvider); @@ -103,25 +91,14 @@ StatusCode TrigL2MuonSA::RpcDataPreparator::initialize() ATH_MSG_DEBUG("Retrieved " << m_idHelperTool); // Retrieve ActiveStore - sc = serviceLocator()->service("ActiveStoreSvc", m_activeStore); - if (sc.isFailure() || m_activeStore == 0) { - ATH_MSG_ERROR(" Cannot get ActiveStoreSvc."); - return sc ; - } + ATH_CHECK( m_activeStore.retrieve() ); ATH_MSG_DEBUG("Retrieved ActiveStoreSvc."); // Retrieve the RPC cabling service ServiceHandle<IRPCcablingServerSvc> RpcCabGet ("RPCcablingServerSvc", name()); - sc = RpcCabGet.retrieve(); - if ( sc != StatusCode::SUCCESS ) { - ATH_MSG_ERROR("Could not retrieve the RPCcablingServerSvc"); - return sc; - } - sc = RpcCabGet->giveCabling(m_rpcCabling); - if ( sc != StatusCode::SUCCESS ) { - ATH_MSG_ERROR("Could not retrieve the RPC Cabling Server"); - return sc; - } + ATH_CHECK( RpcCabGet.retrieve() ); + ATH_CHECK( RpcCabGet->giveCabling(m_rpcCabling) ); + m_rpcCablingSvc = m_rpcCabling->getRPCCabling(); if ( !m_rpcCablingSvc ) { ATH_MSG_ERROR("Could not retrieve the RPC cabling svc"); diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx index d21992b019dc..f56146e33abe 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx @@ -42,14 +42,12 @@ TrigL2MuonSA::TgcDataPreparator::TgcDataPreparator(const std::string& type, const IInterface* parent): AthAlgTool(type,name,parent), m_storeGateSvc( "StoreGateSvc", name ), - m_tgcPrepDataProvider("Muon::TgcRdoToPrepDataTool/TgcPrepDataProviderTool"), - m_tgcRawDataProvider("Muon::TGC_RawDataProviderTool"), - m_regionSelector(0), m_robDataProvider(0), + m_activeStore( "ActiveStoreSvc", name ), + m_regionSelector( "RegSelSvc", name ), + m_robDataProvider( "ROBDataProviderSvc", name ), m_options(), m_recMuonRoIUtils() { declareInterface<TrigL2MuonSA::TgcDataPreparator>(this); - declareProperty("TgcPrepDataProvider", m_tgcPrepDataProvider); - declareProperty("TGC_RawDataProvider", m_tgcRawDataProvider); } @@ -77,54 +75,30 @@ StatusCode TrigL2MuonSA::TgcDataPreparator::initialize() ATH_CHECK( m_storeGateSvc.retrieve() ); - ATH_CHECK( m_tgcRawDataProvider.retrieve() ); - ATH_MSG_DEBUG("Retrieved tool " << m_tgcRawDataProvider); - - // Locate RegionSelector - sc = service("RegSelSvc", m_regionSelector); - if(sc.isFailure()) { - ATH_MSG_ERROR("Could not retrieve RegionSelector"); - return sc; - } - ATH_MSG_DEBUG("Retrieved service RegionSelector"); - - // Locate ROBDataProvider - std::string serviceName = "ROBDataProvider"; - IService* svc = 0; - sc = service("ROBDataProviderSvc", svc); - if(sc.isFailure()) { - ATH_MSG_ERROR("Could not retrieve " << serviceName); - return sc; - } - m_robDataProvider = dynamic_cast<ROBDataProviderSvc*> (svc); - if( m_robDataProvider == 0 ) { - ATH_MSG_ERROR("Could not cast to ROBDataProviderSvc "); - return StatusCode::FAILURE; - } - ATH_MSG_DEBUG("Retrieved service " << serviceName); - - StoreGateSvc* detStore(0); - sc = serviceLocator()->service("DetectorStore", detStore); - if (sc.isFailure()) { - ATH_MSG_ERROR("Could not retrieve DetectorStore."); - return sc; - } + ServiceHandle<StoreGateSvc> detStore( "DetectorStore", name() ); + ATH_CHECK( detStore.retrieve() ); ATH_MSG_DEBUG("Retrieved DetectorStore."); - - sc = detStore->retrieve( m_muonMgr,"Muon" ); - if (sc.isFailure()) return sc; + ATH_CHECK( detStore->retrieve( m_muonMgr,"Muon" ) ); ATH_MSG_DEBUG("Retrieved GeoModel from DetectorStore."); m_tgcIdHelper = m_muonMgr->tgcIdHelper(); + ATH_CHECK( m_activeStore.retrieve() ); + ATH_MSG_DEBUG("Retrieved ActiveStoreSvc." ); + + ATH_CHECK( m_tgcRawDataProvider.retrieve() ); + ATH_MSG_DEBUG("Retrieved tool " << m_tgcRawDataProvider.name()); + ATH_CHECK( m_tgcPrepDataProvider.retrieve() ); - ATH_MSG_DEBUG("Retrieved m_tgcPrepDataProvider"); + ATH_MSG_DEBUG("Retrieved tool " << m_tgcPrepDataProvider.name()); - sc = serviceLocator()->service("ActiveStoreSvc", m_activeStore); - if (sc.isFailure()) { - ATH_MSG_ERROR(" Cannot get ActiveStoreSvc."); - return sc ; - } - ATH_MSG_DEBUG("Retrieved ActiveStoreSvc." ); + // Locate RegionSelector + + ATH_CHECK( m_regionSelector.retrieve() ); + ATH_MSG_DEBUG("Retrieved service RegionSelector"); + + // Locate ROBDataProvider + ATH_CHECK( m_robDataProvider.retrieve() ); + ATH_MSG_DEBUG("Retrieved service " << m_robDataProvider.name() ); ATH_CHECK(m_tgcContainerKey.initialize()); -- GitLab From 29a1740741f4f8f656a2689fd8b49138143f8440 Mon Sep 17 00:00:00 2001 From: Walter Lampl <walter.lampl@cern.ch> Date: Fri, 29 Jun 2018 16:59:03 +0000 Subject: [PATCH 291/562] Job option fixes from private MetaDataTools Former-commit-id: 2dda150793c275e0276481503b4039b288507986 --- .../AthenaPoolCnvSvc/python/ReadAthenaPool.py | 4 ---- .../share/g4runnumber.py | 16 +++++++++++----- .../python/DigitizationWriteMetaData.py | 13 ++++++++----- .../Digitization/share/LumiBlockOverrides.py | 10 ++++++++-- .../Digitization/share/RunNumberOverride.py | 11 ++++++++--- .../G4AtlasApps/python/G4Atlas_Metadata.py | 9 ++++++--- .../ISF/ISF_Example/python/ISF_Metadata.py | 9 ++++++--- .../ISF_Example/share/jobOptions_PhysValMon.py | 3 +-- .../TrigConfigSvc/python/TriggerConfig.py | 2 +- 9 files changed, 49 insertions(+), 28 deletions(-) diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/python/ReadAthenaPool.py b/Database/AthenaPOOL/AthenaPoolCnvSvc/python/ReadAthenaPool.py index 7748a115c4b9..bbc5cba2eb4d 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/python/ReadAthenaPool.py +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/python/ReadAthenaPool.py @@ -51,10 +51,6 @@ def _configureReadAthenaPool(): svcMgr.MetaDataSvc.MetaDataContainer = "MetaDataHdr" svcMgr.MetaDataSvc.MetaDataTools += [ CfgMgr.IOVDbMetaDataTool() ] - #svcMgr.MetaDataSvc.MetaDataTools += [ "IOVDbMetaDataTool" ] - #if not hasattr (svcMgr.ToolSvc, 'IOVDbMetaDataTool'): - # svcMgr.ToolSvc += CfgMgr.IOVDbMetaDataTool() - # Add in EventSelector svcMgr += CfgMgr.EventSelectorAthenaPool ("EventSelector") #default InputCollections to FilesInput value of AthenaCommonFlags diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/g4runnumber.py b/Event/EventOverlay/EventOverlayJobTransforms/share/g4runnumber.py index 8315efefd235..e42c36e2c8e9 100644 --- a/Event/EventOverlay/EventOverlayJobTransforms/share/g4runnumber.py +++ b/Event/EventOverlay/EventOverlayJobTransforms/share/g4runnumber.py @@ -38,12 +38,18 @@ from AthenaCommon.AthenaCommonFlags import athenaCommonFlags athenaCommonFlags.EvtMax.unlock() athenaCommonFlags.EvtMax.set_Value_and_Lock(num_lines) + #fix iov metadata -if not hasattr(ServiceMgr.ToolSvc, 'IOVDbMetaDataTool'): - from AthenaCommon import CfgMgr - svcMgr.ToolSvc += CfgMgr.IOVDbMetaDataTool() - svcMgr.ToolSvc.IOVDbMetaDataTool.MinMaxRunNumbers = [svcMgr.EvtIdModifierSvc.Modifiers[0], 2147483647] - ## FIXME need to use maxRunNumber = 2147483647 for now to keep overlay working but in the future this should be set properly. +try: + svcMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"] +except IndexError: + from IOVDbMetaDataTools.IOVDbMetaDataToolsConf import IOVDbMetaDataTool + svcMgr.MetaDataSvc.MetaDataTools+=[IOVDbMetaDataTool()] + pass + +svcMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"].MinMaxRunNumbers = [svcMgr.EvtIdModifierSvc.Modifiers[0], 2147483647] + ## FIXME need to use maxRunNumber = 2147483647 for now to keep overlay working but in the future this should be set properly. + #use conditions from this run number and timestamp svcMgr.EventSelector.RunNumber = svcMgr.EvtIdModifierSvc.Modifiers[0] diff --git a/Simulation/Digitization/python/DigitizationWriteMetaData.py b/Simulation/Digitization/python/DigitizationWriteMetaData.py index 0cf229f825d6..c1f848b95367 100644 --- a/Simulation/Digitization/python/DigitizationWriteMetaData.py +++ b/Simulation/Digitization/python/DigitizationWriteMetaData.py @@ -11,12 +11,15 @@ def ModifyingEventIdBySvc(): if digitizationFlags.RunAndLumiOverrideList.statusOn or digitizationFlags.dataRunNumber.statusOn: from AthenaCommon.AppMgr import ServiceMgr if hasattr(ServiceMgr, 'EvtIdModifierSvc'): - if hasattr(ServiceMgr.ToolSvc, 'IOVDbMetaDataTool'): - return True - else: + try: + #GaudiHandleArray implements __geitem__ but no has_key functionality + ServiceMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"] + except IndexError: logDigitizationWriteMetadata.error('Found the EvtIdModifierSvc, but not the IOVDbMetaDataTool. \ It will not be possible to set the min and max run number of the job.') raise SystemExit("Found the EvtIdModifierSvc, but not the IOVDbMetaDataTool.") + else: + pass else: raise SystemExit("jobProperties.Digitization.RunAndLumiOverrideList is set, but no EvtIdModifierSvc found!") else : @@ -39,8 +42,8 @@ def getRunNumberRangeForOutputMetadata(): if ModifyingEventIdBySvc(): logDigitizationWriteMetadata.info('Setting the Digitization MetaData IOV from the IOVDbMetaDataTool') from AthenaCommon.AppMgr import ServiceMgr - myRunNumber=ServiceMgr.ToolSvc.IOVDbMetaDataTool.MinMaxRunNumbers[0] - myEndRunNumber=ServiceMgr.ToolSvc.IOVDbMetaDataTool.MinMaxRunNumbers[1] + myRunNumber=ServiceMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"].MinMaxRunNumbers[0] + myEndRunNumber=ServiceMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"].MinMaxRunNumbers[1] else : if myRunNumber > 0 : logDigitizationWriteMetadata.info('Found Run Number %s in hits file metadata.', str(myRunNumber) ) diff --git a/Simulation/Digitization/share/LumiBlockOverrides.py b/Simulation/Digitization/share/LumiBlockOverrides.py index 31f25aff7747..d2df88521f25 100644 --- a/Simulation/Digitization/share/LumiBlockOverrides.py +++ b/Simulation/Digitization/share/LumiBlockOverrides.py @@ -23,5 +23,11 @@ if digitizationFlags.RunAndLumiOverrideList.get_Value(): getService("EvtIdModifierSvc") #fix iov metadata - if not hasattr(svcMgr.ToolSvc, 'IOVDbMetaDataTool'): svcMgr.ToolSvc += CfgMgr.IOVDbMetaDataTool() - svcMgr.ToolSvc.IOVDbMetaDataTool.MinMaxRunNumbers = list(digitizationFlags.RunAndLumiOverrideList.getMinMaxRunNumbers()) + try: + ServiceMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"] + except IndexError: + from IOVDbMetaDataTools.IOVDbMetaDataToolsConf import IOVDbMetaDataTool + ServiceMgr.MetaDataSvc.MetaDataTools+=[IOVDbMetaDataTool()] + pass + + svcMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"].MinMaxRunNumbers = list(digitizationFlags.RunAndLumiOverrideList.getMinMaxRunNumbers()) diff --git a/Simulation/Digitization/share/RunNumberOverride.py b/Simulation/Digitization/share/RunNumberOverride.py index 3f6b9a073f9f..0b957bff474e 100644 --- a/Simulation/Digitization/share/RunNumberOverride.py +++ b/Simulation/Digitization/share/RunNumberOverride.py @@ -20,9 +20,14 @@ if digitizationFlags.dataRunNumber.get_Value(): from Digitization.RunDependentConfig import buildListOfModifiers ServiceMgr.EvtIdModifierSvc.Modifiers += buildListOfModifiers() #fix iov metadata - if not hasattr(ServiceMgr.ToolSvc, 'IOVDbMetaDataTool'): - ServiceMgr.ToolSvc += CfgMgr.IOVDbMetaDataTool() - ServiceMgr.ToolSvc.IOVDbMetaDataTool.MinMaxRunNumbers = [myRunNumber, myRunNumber+1]#2147483647] + try: + ServiceMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"] + except IndexError: + from IOVDbMetaDataTools.IOVDbMetaDataToolsConf import IOVDbMetaDataTool + ServiceMgr.MetaDataSvc.MetaDataTools+=[IOVDbMetaDataTool()] + pass + + ServiceMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"].MinMaxRunNumbers = [myRunNumber, myRunNumber+1]#2147483647] myInitialTimeStamp=ServiceMgr.EvtIdModifierSvc.Modifiers[2] ServiceMgr.EventSelector.OverrideRunNumberFromInput=True diff --git a/Simulation/G4Atlas/G4AtlasApps/python/G4Atlas_Metadata.py b/Simulation/G4Atlas/G4AtlasApps/python/G4Atlas_Metadata.py index 8d6096a43f06..140298777e55 100644 --- a/Simulation/G4Atlas/G4AtlasApps/python/G4Atlas_Metadata.py +++ b/Simulation/G4Atlas/G4AtlasApps/python/G4Atlas_Metadata.py @@ -282,10 +282,13 @@ def configureRunNumberOverrides(): else: simMDlog.warning('Will override the settings of the EvtIdModifierSvc that was previously set up!') #fix iov metadata - if not hasattr(ServiceMgr.ToolSvc, 'IOVDbMetaDataTool'): + try: + ServiceMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"] + except IndexError: from AthenaCommon import CfgMgr - ServiceMgr.ToolSvc += CfgMgr.IOVDbMetaDataTool() - ServiceMgr.ToolSvc.IOVDbMetaDataTool.MinMaxRunNumbers = [myRunNumber, 2147483647] + ServiceMgr.MetaDataSvc.MetaDataTools += [CfgMgr.IOVDbMetaDataTool()] + pass + ServiceMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"].MinMaxRunNumbers = [myRunNumber, 2147483647] ## FIXME need to use maxRunNumber = 2147483647 for now to keep overlay working but in the future this should be set properly. # Using event numbers to avoid "some very large number" setting from AthenaCommon.AthenaCommonFlags import athenaCommonFlags diff --git a/Simulation/ISF/ISF_Example/python/ISF_Metadata.py b/Simulation/ISF/ISF_Example/python/ISF_Metadata.py index 800684b1dc80..9ec7cc901510 100644 --- a/Simulation/ISF/ISF_Example/python/ISF_Metadata.py +++ b/Simulation/ISF/ISF_Example/python/ISF_Metadata.py @@ -279,10 +279,13 @@ def configureRunNumberOverrides(): else: simMDlog.warning('Will override the settings of the EvtIdModifierSvc that was previously set up!') #fix iov metadata - if not hasattr(ServiceMgr.ToolSvc, 'IOVDbMetaDataTool'): + try: + ServiceMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"] + except IndexError: from AthenaCommon import CfgMgr - ServiceMgr.ToolSvc += CfgMgr.IOVDbMetaDataTool() - ServiceMgr.ToolSvc.IOVDbMetaDataTool.MinMaxRunNumbers = [myRunNumber, 2147483647] + ServiceMgr.MetaDataSvc.MetaDataTools += [CfgMgr.IOVDbMetaDataTool()] + pass + ServiceMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"].MinMaxRunNumbers = [myRunNumber, 2147483647] ## FIXME need to use maxRunNumber = 2147483647 for now to keep overlay working but in the future this should be set properly. # Using event numbers to avoid "some very large number" setting from AthenaCommon.AthenaCommonFlags import athenaCommonFlags diff --git a/Simulation/ISF/ISF_Example/share/jobOptions_PhysValMon.py b/Simulation/ISF/ISF_Example/share/jobOptions_PhysValMon.py index ad88b7cbfb00..602af3b2bf30 100644 --- a/Simulation/ISF/ISF_Example/share/jobOptions_PhysValMon.py +++ b/Simulation/ISF/ISF_Example/share/jobOptions_PhysValMon.py @@ -68,11 +68,10 @@ if TriggerOn == 1: ServiceMgr += TagInfoMgr() #ServiceMgr.TagInfoMgr.AddGeoModelTags = False from IOVDbMetaDataTools.IOVDbMetaDataToolsConf import IOVDbMetaDataTool - ToolSvc += IOVDbMetaDataTool( "IOVDbMetaDataTool" ) from AthenaServices.AthenaServicesConf import MetaDataSvc ServiceMgr += MetaDataSvc( "MetaDataSvc" ) ServiceMgr.MetaDataSvc.MetaDataContainer = "MetaDataHdr" - ServiceMgr.MetaDataSvc.MetaDataTools += [ "IOVDbMetaDataTool" ] + ServiceMgr.MetaDataSvc.MetaDataTools += [IOVDbMetaDataTool() ] import IOVDbSvc.IOVDb diff --git a/Trigger/TrigConfiguration/TrigConfigSvc/python/TriggerConfig.py b/Trigger/TrigConfiguration/TrigConfigSvc/python/TriggerConfig.py index 49932159d721..5e55dcccdffe 100644 --- a/Trigger/TrigConfiguration/TrigConfigSvc/python/TriggerConfig.py +++ b/Trigger/TrigConfiguration/TrigConfigSvc/python/TriggerConfig.py @@ -189,8 +189,8 @@ def _setupConfig(): # for debugging uncomment the following three lines from AthenaCommon.Constants import VERBOSE - ToolSvc.IOVDbMetaDataTool.OutputLevel = VERBOSE svcMgr.MetaDataSvc.OutputLevel = VERBOSE + svcMgr.MetaDataSvc.MetaDataTools[ "IOVDbMetaDataTool"].OutputLevel = VERBOSE dbConnection = "<dbConnection>impl=cool;techno=oracle;schema=ATLAS_COOLONL_READER;devdb10:COOLTEST:atlas_trig_stelzer</dbConnection>" -- GitLab From b1cdca81cbb4000b5ae246159b7b00ed3c783409 Mon Sep 17 00:00:00 2001 From: Adam Edward Barton <adam.edward.barton@cern.ch> Date: Fri, 29 Jun 2018 17:02:41 +0000 Subject: [PATCH 292/562] IDC lock commit1 Former-commit-id: c241192d9b2204c428b8eb26aec184358f61b292 --- Event/EventContainers/CMakeLists.txt | 4 +- .../EventContainers/DataLinkVector.h | 0 .../EventContainers/IDC_Lock.h | 41 ++ .../EventContainers/IDC_Wait.h | 22 + .../EventContainers/IIdentifiableCont.h | 5 + .../EventContainers/IdentifiableCache.h | 5 + .../EventContainers/IdentifiableCacheBase.h | 20 +- .../EventContainers/IdentifiableContTemp.h | 5 + .../EventContainers/IdentifiableContainer.h | 0 .../EventContainers/IdentifiableContainerMT.h | 48 +- .../EventContainers/SelectAllObject.h | 0 .../EventContainers/SelectObject.h | 0 .../doc/IdentifiableContainer.txt | 0 Event/EventContainers/share/IDStressTest.ref | 48 +- Event/EventContainers/src/IDC_Lock.cxx | 24 + Event/EventContainers/src/IDC_Wait.cxx | 33 + .../src/IdentifiableCacheBase.cxx | 80 ++- .../test/IDC_Realistic_Test.cxx | 565 +++++++++++------- .../test/IDMT_ContainerTest.cxx | 13 +- .../EventContainers/test/ID_ContainerTest.cxx | 4 +- 20 files changed, 636 insertions(+), 281 deletions(-) mode change 100755 => 100644 Event/EventContainers/EventContainers/DataLinkVector.h create mode 100644 Event/EventContainers/EventContainers/IDC_Lock.h create mode 100644 Event/EventContainers/EventContainers/IDC_Wait.h mode change 100755 => 100644 Event/EventContainers/EventContainers/IdentifiableContainer.h mode change 100755 => 100644 Event/EventContainers/EventContainers/SelectAllObject.h mode change 100755 => 100644 Event/EventContainers/EventContainers/SelectObject.h mode change 100755 => 100644 Event/EventContainers/doc/IdentifiableContainer.txt create mode 100644 Event/EventContainers/src/IDC_Lock.cxx create mode 100644 Event/EventContainers/src/IDC_Wait.cxx diff --git a/Event/EventContainers/CMakeLists.txt b/Event/EventContainers/CMakeLists.txt index 188034631484..ba2c3049bfe5 100644 --- a/Event/EventContainers/CMakeLists.txt +++ b/Event/EventContainers/CMakeLists.txt @@ -16,7 +16,7 @@ atlas_depends_on_subdirs( PUBLIC # Install files from the package: atlas_add_library( EventContainers - src/IdentifiableCacheBase.cxx + src/*.cxx PUBLIC_HEADERS EventContainers LINK_LIBRARIES GaudiKernel SGTools ) @@ -33,5 +33,5 @@ atlas_add_test( IdMTCont SOURCES test/IDMT_ContainerTest.cxx atlas_add_test( IDStressTest SOURCES test/IDC_Realistic_Test.cxx INCLUDE_DIRS src test EventContainers LINK_LIBRARIES Identifier GaudiKernel SGTools EventContainers - EXTRA_PATTERNS "elapsed|^no lock time|^deleted|^countHit" + EXTRA_PATTERNS "elapsed|^no lock time|^deleted|^countHit|^lock time" ) diff --git a/Event/EventContainers/EventContainers/DataLinkVector.h b/Event/EventContainers/EventContainers/DataLinkVector.h old mode 100755 new mode 100644 diff --git a/Event/EventContainers/EventContainers/IDC_Lock.h b/Event/EventContainers/EventContainers/IDC_Lock.h new file mode 100644 index 000000000000..f9e79b831009 --- /dev/null +++ b/Event/EventContainers/EventContainers/IDC_Lock.h @@ -0,0 +1,41 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + + +#ifndef IDC_LOCK_H +#define IDC_LOCK_H +#include <atomic> +#include <condition_variable> +#include <mutex> +#include <utility> + +namespace EventContainers { + +struct mutexPair{ + std::condition_variable condition; + std::mutex mutex; + mutexPair() : condition(), mutex() {} +}; + + +class IDC_Lock{ + + std::atomic<const void*>* m_atomic; + mutexPair *m_mut; + +public: + IDC_Lock() : m_atomic(nullptr) { } + void LockOn(std::atomic<const void*>* in, mutexPair *pair){ + m_atomic = in; + m_mut = pair; + } + void DropLock(); + void ReleaseLock(); + + ~IDC_Lock() { ReleaseLock(); } +}; + +} +#endif + diff --git a/Event/EventContainers/EventContainers/IDC_Wait.h b/Event/EventContainers/EventContainers/IDC_Wait.h new file mode 100644 index 000000000000..b5aa3076f023 --- /dev/null +++ b/Event/EventContainers/EventContainers/IDC_Wait.h @@ -0,0 +1,22 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + + +#ifndef IDC_WAIT_H +#define IDC_WAIT_H +#include <vector> +#include <mutex> +#include <utility> +#include <atomic> +class IDC_Wait{ + std::vector<std::atomic<const void*>* > m_locklist; + void Wait(); +public: + ~IDC_Wait(); + void AddWait(std::atomic<const void*>* at); + void WaitAndClear(); +}; + +#endif + diff --git a/Event/EventContainers/EventContainers/IIdentifiableCont.h b/Event/EventContainers/EventContainers/IIdentifiableCont.h index 1f0231f3152f..6d6b7bbc8ca6 100644 --- a/Event/EventContainers/EventContainers/IIdentifiableCont.h +++ b/Event/EventContainers/EventContainers/IIdentifiableCont.h @@ -1,3 +1,8 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + + #ifndef EVENTCONTAINERS_IIDENTIFIABLECONT_H #define EVENTCONTAINERS_IIDENTIFIABLECONT_H #include "Identifier/Identifier.h" diff --git a/Event/EventContainers/EventContainers/IdentifiableCache.h b/Event/EventContainers/EventContainers/IdentifiableCache.h index 7cc9630a2768..08899f4a2264 100644 --- a/Event/EventContainers/EventContainers/IdentifiableCache.h +++ b/Event/EventContainers/EventContainers/IdentifiableCache.h @@ -56,6 +56,11 @@ public: return reinterpret_cast<const T*> (IdentifiableCacheBase::find (hash)); } + const T* findWait (IdentifierHash hash) const + { + return reinterpret_cast<const T*> (IdentifiableCacheBase::findWait (hash)); + } + const T* get (IdentifierHash hash) { return reinterpret_cast<const T*> (IdentifiableCacheBase::get (hash)); diff --git a/Event/EventContainers/EventContainers/IdentifiableCacheBase.h b/Event/EventContainers/EventContainers/IdentifiableCacheBase.h index 8c0c40c0b24a..53c8d43a8c28 100644 --- a/Event/EventContainers/EventContainers/IdentifiableCacheBase.h +++ b/Event/EventContainers/EventContainers/IdentifiableCacheBase.h @@ -22,7 +22,9 @@ #include <mutex> #include <atomic> #include <condition_variable> - +#include "EventContainers/IDC_Wait.h" +#include "EventContainers/IDC_Lock.h" +#include <map> //abarton //Enabling the ability to remove collections to help compatability with old code. //This may be removed to improved threadsafety. @@ -31,12 +33,20 @@ namespace EventContainers { + class IdentifiableCacheBase { + public: +//here for access from other classes +static constexpr uintptr_t INVALIDflag = UINTPTR_MAX; +static constexpr uintptr_t ABORTEDflag = UINTPTR_MAX-1; +static constexpr size_t s_lockBucketSize =6; typedef std::true_type thread_safe; typedef std::set<IdentifierHash> idset_t; +typedef std::map<IdentifierHash, mutexPair>::iterator waitlistPair; + #if 0 struct deleter { @@ -77,6 +87,7 @@ typedef std::set<IdentifierHash> idset_t; // Return payload if there, null if not there. const void* find (IdentifierHash hash) const; + const void* findWait (IdentifierHash hash) const; // Try to make payload if not there. const void* get (IdentifierHash hash); @@ -86,12 +97,14 @@ typedef std::set<IdentifierHash> idset_t; bool add (IdentifierHash hash, const void* p, bool TakeOwnerShip); bool add (IdentifierHash hash, void_unique_ptr p); + int tryLock(IdentifierHash, IDC_Lock &, std::vector<waitlistPair>&); + int itemAborted(IdentifierHash) const; + int itemInProgress(IdentifierHash) const; #ifdef IdentifiableCacheBaseRemove bool remove (IdentifierHash hash); #endif size_t fullSize() const { return m_owns.size(); } size_t numberOfHashes() const; - protected: IdentifiableCacheBase (IdentifierHash maxHash, const IMaker* maker); ~IdentifiableCacheBase(); @@ -114,6 +127,9 @@ private: mutable mutex_t m_mutex; std::condition_variable m_cond; + mutable mutex_t m_mapMutexes[s_lockBucketSize]; + mutable std::map<IdentifierHash, mutexPair> m_HoldingMutexes[s_lockBucketSize]; + }; diff --git a/Event/EventContainers/EventContainers/IdentifiableContTemp.h b/Event/EventContainers/EventContainers/IdentifiableContTemp.h index 102f1fbd4917..d8b9a8ea4fa9 100644 --- a/Event/EventContainers/EventContainers/IdentifiableContTemp.h +++ b/Event/EventContainers/EventContainers/IdentifiableContTemp.h @@ -1,3 +1,8 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + + #ifndef EVENTCONTAINERS_IDENTIFIABLETEMP_H #define EVENTCONTAINERS_IDENTIFIABLETEMP_H //This is a dummy version of the identifiable container. diff --git a/Event/EventContainers/EventContainers/IdentifiableContainer.h b/Event/EventContainers/EventContainers/IdentifiableContainer.h old mode 100755 new mode 100644 diff --git a/Event/EventContainers/EventContainers/IdentifiableContainerMT.h b/Event/EventContainers/EventContainers/IdentifiableContainerMT.h index 157a18616ada..08662dc87db9 100644 --- a/Event/EventContainers/EventContainers/IdentifiableContainerMT.h +++ b/Event/EventContainers/EventContainers/IdentifiableContainerMT.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #ifndef EVENTCONTAINERS_IDENTIFIABLECONTAINERMT_H @@ -52,14 +52,32 @@ public: typedef T* const * const_pointer; typedef T base_value_type; typedef std::vector<IdentifierHash> Hash_Container; + typedef EventContainers::IDC_Lock IDC_Lock; private: ICACHE *m_cacheLink; - std::vector<bool> m_mask; + mutable std::vector<bool> m_mask; bool m_OnlineMode; + typedef EventContainers::IdentifiableCacheBase IdentifiableCacheBase; + typedef IdentifiableCacheBase::waitlistPair waitlistPair; + mutable std::vector< waitlistPair> m_waitlist; public: + void Wait() const{ + + while(!m_waitlist.empty()){ + waitlistPair &o = m_waitlist.back(); + auto hash = o->first; + std::unique_lock<decltype(o->second.mutex )> lk(o->second.mutex); + while(m_cacheLink->itemInProgress(hash)){ + o->second.condition.wait(lk); + } + if(m_cacheLink->itemAborted(hash)) m_mask[hash] = false;//reset flag + m_waitlist.pop_back(); + } + } + class const_iterator { @@ -229,6 +247,8 @@ public: /// If it does exist it incorporates it into the IDC view but changing the mask. virtual bool tryFetch(IdentifierHash hashId) override final; + bool tryFetch(IdentifierHash hashId, IDC_Lock &); + /// Tries will look for item in cache, if it doesn't exist will call the cache IMAKER /// If cache doesn't have an IMAKER then this fails. StatusCode fetchOrCreate(IdentifierHash hashId); @@ -243,10 +263,6 @@ public: T* removeCollection(IdentifierHash hashId); #endif - /// set m_hashids to have all the possible hash values given - /// the hash max - void setAllCollections(unsigned int hashMax); - /// reset m_hashids and call IdentifiableCache's cleanup virtual void cleanup() override final; @@ -263,6 +279,7 @@ public: /// return number of collections virtual size_t numberOfCollections() const override final{ if(!m_OnlineMode) return m_cacheLink->numberOfHashes(); + Wait(); size_t count =0; for(auto b : m_mask) count += b; return count; @@ -276,6 +293,7 @@ public: virtual std::vector<IdentifierHash> GetAllCurrentHashs() const override final { if(not m_OnlineMode) return m_cacheLink->ids(); else{ + Wait(); std::vector<IdentifierHash> ids; for(size_t i =0 ; i < m_mask.size(); ++i) if(m_mask[i]) ids.emplace_back(i); return ids; @@ -297,7 +315,7 @@ public: #ifdef IdentifiableCacheBaseRemove template < class T> -T* +T* //Please don't do this we want to get rid of this IdentifiableContainerMT<T>::removeCollection( IdentifierHash hashId ) { using namespace EventContainers; @@ -333,7 +351,7 @@ template < class T> const T* IdentifiableContainerMT<T>::indexFindPtr( IdentifierHash hashId ) const { - if(m_mask[hashId]) return m_cacheLink->find(hashId); + if(m_mask[hashId]) return m_cacheLink->findWait(hashId); else return nullptr; } @@ -383,6 +401,20 @@ IdentifiableContainerMT<T>::tryFetch(IdentifierHash hashId) return true; } +template < class T> +bool +IdentifiableContainerMT<T>::tryFetch(IdentifierHash hashId, IDC_Lock &lock) +{ + if(!m_OnlineMode){ + return tryFetch(hashId);//No point calling expensive lock method + } + int flag = m_cacheLink->tryLock(hashId, lock, m_waitlist); + + if(flag > 0) { m_mask[hashId] = flag!=3; return true;} + return false; +} + + template < class T > StatusCode IdentifiableContainerMT<T>::naughtyRetrieve(IdentifierHash hashId, T* &collToRetrieve) const diff --git a/Event/EventContainers/EventContainers/SelectAllObject.h b/Event/EventContainers/EventContainers/SelectAllObject.h old mode 100755 new mode 100644 diff --git a/Event/EventContainers/EventContainers/SelectObject.h b/Event/EventContainers/EventContainers/SelectObject.h old mode 100755 new mode 100644 diff --git a/Event/EventContainers/doc/IdentifiableContainer.txt b/Event/EventContainers/doc/IdentifiableContainer.txt old mode 100755 new mode 100644 diff --git a/Event/EventContainers/share/IDStressTest.ref b/Event/EventContainers/share/IDStressTest.ref index 4c8b5a4e4d9e..ddc13f633d90 100644 --- a/Event/EventContainers/share/IDStressTest.ref +++ b/Event/EventContainers/share/IDStressTest.ref @@ -8,31 +8,29 @@ range 300 to 1300 range 350 to 1350 range 400 to 1400 range 450 to 1450 -0/200 -10/200 -20/200 -30/200 -40/200 -50/200 -60/200 -70/200 -80/200 -90/200 -100/200 -110/200 -120/200 -130/200 -140/200 -150/200 -160/200 -170/200 -180/200 -190/200 +0/50 +10/50 +20/50 +30/50 +40/50 NoLock -deleted 305487 -countHit 1404513 -fills 2000000 -reads 2000000 +deleted 163825 +countHit 256975 +fills 500000 +reads 492300 +aborted 7700 +0/50 +10/50 +20/50 +30/50 +40/50 +Lock +deleted 0 +countHit 427500 +fills 500000 +reads 492300 +aborted 7700 Total elements 500000 MyDigits left undeleted 0 -no lock time 12.8273 +no lock time 2.60611 +lock time 1.12183 diff --git a/Event/EventContainers/src/IDC_Lock.cxx b/Event/EventContainers/src/IDC_Lock.cxx new file mode 100644 index 000000000000..11f7b69de416 --- /dev/null +++ b/Event/EventContainers/src/IDC_Lock.cxx @@ -0,0 +1,24 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "EventContainers/IDC_Lock.h" +#include "EventContainers/IdentifiableCacheBase.h" + + +using namespace EventContainers; +void IDC_Lock::ReleaseLock(){//IF object has not been filled this will restore unfilled state + //If object has been filled this should do nothing + if(m_atomic==nullptr) return; + using namespace EventContainers; + const void* waitstate = reinterpret_cast<const void*>(IdentifiableCacheBase::INVALIDflag); + const void* ABORTstate = reinterpret_cast<const void*>(IdentifiableCacheBase::ABORTEDflag); + std::unique_lock<decltype(m_mut->mutex) > lk(m_mut->mutex); + m_atomic->compare_exchange_strong(waitstate, ABORTstate); + m_mut->condition.notify_all(); +} + +void IDC_Lock::DropLock(){ + m_atomic = nullptr; +} + diff --git a/Event/EventContainers/src/IDC_Wait.cxx b/Event/EventContainers/src/IDC_Wait.cxx new file mode 100644 index 000000000000..3b0d038d744d --- /dev/null +++ b/Event/EventContainers/src/IDC_Wait.cxx @@ -0,0 +1,33 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "EventContainers/IDC_Wait.h" +#include "EventContainers/IdentifiableCacheBase.h" +#include <algorithm> + +using namespace EventContainers; + +void IDC_Wait::AddWait(std::atomic<const void*>* at){ + m_locklist.emplace_back(at); +} + +void IDC_Wait::Wait(){ + + const void* waitstate = reinterpret_cast<const void*>(IdentifiableCacheBase::INVALIDflag); + while(!m_locklist.empty()){ + m_locklist.erase(std::remove_if(m_locklist.begin(), m_locklist.end(), + [waitstate](const std::atomic<const void*>* o) { return o->load(std::memory_order_acquire) != waitstate; }), + m_locklist.end()); + } +} + +void IDC_Wait::WaitAndClear(){ + Wait(); + m_locklist.clear(); +} + +IDC_Wait::~IDC_Wait(){ + Wait(); +} + diff --git a/Event/EventContainers/src/IdentifiableCacheBase.cxx b/Event/EventContainers/src/IdentifiableCacheBase.cxx index 1de666967655..8e9f066012b2 100644 --- a/Event/EventContainers/src/IdentifiableCacheBase.cxx +++ b/Event/EventContainers/src/IdentifiableCacheBase.cxx @@ -14,15 +14,16 @@ // In ids, INVALID -- conversion/add failed. // In ids, valid --- Have payload // In ids, null --- Conversion in progress. - +// Not in ids, INVALID --- intension to add soon #include "EventContainers/IdentifiableCacheBase.h" -using namespace std; -namespace EventContainers { -static const void* INVALID = reinterpret_cast<const void*>(-1L); +using namespace std; +namespace EventContainers { +static const void* INVALID = reinterpret_cast<const void*>(IdentifiableCacheBase::INVALIDflag); +static const void* ABORTED = reinterpret_cast<const void*>(IdentifiableCacheBase::ABORTEDflag); IdentifiableCacheBase::IdentifiableCacheBase (IdentifierHash maxHash, const IMaker* maker) @@ -30,7 +31,7 @@ IdentifiableCacheBase::IdentifiableCacheBase (IdentifierHash maxHash, m_owns(maxHash, false), m_maker (maker) { - for(auto &h : m_vec) h.store(nullptr, std::memory_order_relaxed); //Ensure initialized to null + for(auto &h : m_vec) h.store(nullptr, std::memory_order_relaxed); //Ensure initialized to null - I'm not sure if this is implicit } @@ -40,6 +41,33 @@ IdentifiableCacheBase::~IdentifiableCacheBase() std::abort(); } +int IdentifiableCacheBase::tryLock(IdentifierHash hash, IDC_Lock &lock, std::vector<waitlistPair> &wait){ + const void *ptr1 = m_vec[hash]; //atomic load + if(ptr1==nullptr){ + size_t slot = hash % s_lockBucketSize; + lock_t lockhdl(m_mapMutexes[slot]); + if(m_vec[hash].compare_exchange_strong(ptr1, INVALID)){//atomic swap + //First call + + auto &mutexpair = m_HoldingMutexes[slot][hash]; //make new pair in unmoving memory + + lock.LockOn(&m_vec[hash], &mutexpair); + return 0; + } + } + + if(ptr1 == INVALID){ + size_t slot = hash % s_lockBucketSize; + lock_t lockhdl(m_mapMutexes[slot]); + //Second call while not finished + wait.emplace_back(m_HoldingMutexes[slot].find(hash)); + return 1; + } + if(ptr1 == ABORTED) return 3; + return 2; //Already completed +} + + void IdentifiableCacheBase::clear (deleter_f* deleter) { lock_t lock (m_mutex); @@ -63,17 +91,50 @@ void IdentifiableCacheBase::cleanUp (deleter_f* deleter) m_ids.clear(); } +int IdentifiableCacheBase::itemAborted (IdentifierHash hash) const{ + const void* p = m_vec[hash].load(); + return (p == ABORTED); +} + + +int IdentifiableCacheBase::itemInProgress (IdentifierHash hash) const{ + const void* p = m_vec[hash].load(); + return (p == INVALID); +} + const void* IdentifiableCacheBase::find (IdentifierHash hash) const { if (hash >= m_vec.size()) return nullptr; - const void* p = m_vec[hash].load(std::memory_order_relaxed); - if (p == INVALID) + const void* p = m_vec[hash].load(); + if (p >= ABORTED) return nullptr; return p; } + +const void* IdentifiableCacheBase::findWait (IdentifierHash hash) const +{ + if (hash >= m_vec.size()) return nullptr; + const void* p = m_vec[hash]; + if(p<ABORTED) return p; + size_t slot = hash % s_lockBucketSize; + std::unique_lock<std::mutex> lockmap(m_mapMutexes[slot]); + + mutexPair &mutpair = m_HoldingMutexes[slot][hash]; //make new pair in unmoving memory + lockmap.unlock(); + while(m_vec[hash]==INVALID){ + std::unique_lock<decltype(mutpair.mutex)> lk(mutpair.mutex);//mutex associated with condition + while(itemInProgress(hash)){ + mutpair.condition.wait(lk); + } + } + p = m_vec[hash]; + if(p>=ABORTED) return nullptr; + return p; +} + const void* IdentifiableCacheBase::get (IdentifierHash hash) { // If it's there already, return directly without locking. @@ -156,8 +217,8 @@ std::vector<IdentifierHash> IdentifiableCacheBase::ids() const ret.reserve (m_vec.size()); lock_t lock (m_mutex); for (IdentifierHash hash : m_ids) { - const void* p = m_vec[hash]; - if (p && p != INVALID) + const void* p = m_vec[hash].load(std::memory_order_acquire); + if (p && p < ABORTED) ret.push_back (hash); } return ret; @@ -185,7 +246,6 @@ bool IdentifiableCacheBase::add (IdentifierHash hash, const void* p, bool owns) } - bool IdentifiableCacheBase::add (IdentifierHash hash, void_unique_ptr p) { diff --git a/Event/EventContainers/test/IDC_Realistic_Test.cxx b/Event/EventContainers/test/IDC_Realistic_Test.cxx index a19816824dff..6a677689ef8c 100644 --- a/Event/EventContainers/test/IDC_Realistic_Test.cxx +++ b/Event/EventContainers/test/IDC_Realistic_Test.cxx @@ -1,7 +1,7 @@ /* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "EventContainers/IdentifiableContainerMT.h" +#include "EventContainers/IdentifiableContainerMT.h" #include <vector> #include <cstdlib> #include <iostream> @@ -13,7 +13,7 @@ namespace IDC_TEST { - class MyCollection; +class MyCollection; } std::vector<IDC_TEST::MyCollection*> initialdata; @@ -22,129 +22,191 @@ namespace IDC_TEST constexpr int nthreads=10; constexpr int ndigits = 100; constexpr int Ncontainers = 5000; -constexpr int Nevents = 200; - class MyID - { - public: - MyID(IdentifierHash id=0): m_id(id) {} - IdentifierHash id()const { return m_id;} - private: - IdentifierHash m_id; - }; +constexpr int Nevents = 50; +std::mutex abortedlock; +std::set<size_t> abortedhashes; - class MyDigit - { - - public: - MyDigit(int d) :m_digit(d) {s_total++;} - int val() const { return m_digit ;} - ~MyDigit(){ s_total--; } + +class MyID +{ +public: + MyID(IdentifierHash id=0): m_id(id) {} + IdentifierHash id()const { + return m_id; + } +private: + IdentifierHash m_id; +}; + + +class MyDigit +{ + +public: + MyDigit(int d) :m_digit(d) { + s_total++; + } + int val() const { + return m_digit ; + } + ~MyDigit() { + s_total--; + } static std::atomic<int> s_total; - private: - int m_digit; - }; - std::atomic<int> MyDigit::s_total; - static const CLID CLID_MYCOLLECTION=10000; +private: + int m_digit; +}; +std::atomic<int> MyDigit::s_total; +static const CLID CLID_MYCOLLECTION=10000; - class MyCollection - { - public: +class MyCollection +{ +public: - typedef MyDigit DIGIT; + typedef MyDigit DIGIT; + + typedef std::vector<DIGIT*>::const_iterator const_iterator; + + MyCollection( ) :m_id(0) { + return; + } + MyCollection(const MyID& id ) { + m_id=id; + return; + } + ~MyCollection() { + std::vector<DIGIT*>::const_iterator it = m_vector.begin(); + std::vector<DIGIT*>::const_iterator it_end = m_vector.end(); + for(; it!=it_end; ++it) + delete (*it); + return ; + } + + unsigned int identifyHash() const { + return m_id.id(); + } + + const_iterator begin() const { + return m_vector.begin(); + } + const_iterator end() const { + return m_vector.end() ; + } + + void add (DIGIT* d) { + m_vector.push_back(d); + } + DIGIT* at(size_t i) { + return m_vector.at(i); + } + static const CLID& classID() { + return CLID_MYCOLLECTION; + } + +private: + std::vector<DIGIT*> m_vector; + MyID m_id; - typedef std::vector<DIGIT*>::const_iterator const_iterator; +}; - MyCollection( ) :m_id(0) { return; } - MyCollection(const MyID& id ){ m_id=id; return; } - ~MyCollection() { - std::vector<DIGIT*>::const_iterator it = m_vector.begin(); - std::vector<DIGIT*>::const_iterator it_end = m_vector.end(); - for(; it!=it_end; ++it) - delete (*it); - return ; - } +class MyCollectionContainer + :public IdentifiableContainerMT<MyCollection> +{ +public: + typedef IdentifiableContainerMT<MyCollection> MyType; - unsigned int identifyHash() const { return m_id.id();} + // constructor + MyCollectionContainer( int m ) : + IdentifiableContainerMT<MyCollection>(m) { - const_iterator begin() const { return m_vector.begin();} - const_iterator end() const { return m_vector.end() ;} + } - void add (DIGIT* d){ m_vector.push_back(d); } - DIGIT* at(size_t i) { return m_vector.at(i); } - static const CLID& classID() { return CLID_MYCOLLECTION;} + MyCollectionContainer( EventContainers::IdentifiableCache<MyCollection> *m ) : + IdentifiableContainerMT<MyCollection>(m) { - private: - std::vector<DIGIT*> m_vector; - MyID m_id; + } - }; +}; - class MyCollectionContainer - :public IdentifiableContainerMT<MyCollection> - { - public: - typedef IdentifiableContainerMT<MyCollection> MyType; +struct counters { + int deletedcount=0; + int cachehit=0; + int fills =0; + int reads =0; + int aborted =0; + void Add(const counters &rh) { + deletedcount+= rh.deletedcount; + cachehit+= rh.cachehit; + fills+= rh.fills; + reads+= rh.reads; + aborted += rh.aborted; + } + void Print() const { + std::cout << "deleted " << deletedcount << '\n'; + std::cout << "countHit " << cachehit << '\n'; + std::cout << "fills " << fills << '\n'; + std::cout << "reads " << reads << '\n'; + std::cout << "aborted " << aborted << '\n'; + } + counters() { + deletedcount=0; + cachehit=0; + fills =0; + reads =0; + aborted=0; + } +}; - // constructor - MyCollectionContainer( int m ) : - IdentifiableContainerMT<MyCollection>(m) { - +class PseudoView { +public: + EventContainers::IdentifiableCache<MyCollection> *IDC; + size_t RoIStart; + size_t RoIEnd; + int threads; + counters c; + + void Check(MyCollectionContainer &container) { + //Collections filled + c.aborted=0; + + for(auto x : abortedhashes) { + c.aborted+= x >=RoIStart && x<RoIEnd; } - MyCollectionContainer( EventContainers::IdentifiableCache<MyCollection> *m ) : - IdentifiableContainerMT<MyCollection>(m) { - + int wrong = 0; + auto hashes = container.GetAllCurrentHashs(); + if(hashes.size()!=(size_t) 1000-c.aborted) { + std::cout << "Error container is " << hashes.size() << " not " << 1000-c.aborted << std::endl; + std::abort(); } - - }; - - -class PseudoView{ - public: - EventContainers::IdentifiableCache<MyCollection> *IDC; - int RoIStart; - int RoIEnd; - int threads; - int deletedcount; - int cachehit; - int fills =0; - int reads =0; - - void Check(MyCollectionContainer &container){ - //Collections filled - int wrong = 0; - auto hashes = container.GetAllCurrentHashs(); - if(hashes.size()!=1000){ - std::cout << "Error container is " << hashes.size() << " not " << Ncontainers << std::endl; std::abort(); - } - for(const auto x : hashes){ - auto p = container.indexFindPtr(x); - int j =0; - for(auto q : *p){ - if(q->val() != (initialdata[x.value()]->at(j++))->val()) wrong++; + for(const auto x : hashes) { + auto p = container.indexFindPtr(x); + int j =0; + for(auto q : *p) { + if(q->val() != (initialdata[x.value()]->at(j++))->val()) wrong++; + } + if(j!=ndigits) { + std::cout << "n digits wrong"<<std::endl; + std::abort(); + } + c.reads++; + } + if(wrong > 0) { + std::cout << "Thread " << threads << " found wrong data " << wrong << std::endl; + std::abort(); } - if(j!=ndigits) { - std::cout << "n digits wrong"<<std::endl; - std::abort(); - } - reads++; - } - if(wrong > 0){ - std::cout << "Thread " << threads << " found wrong data " << wrong << std::endl; - std::abort(); - } - } + } - virtual void ExecuteFill(MyCollectionContainer &container) = 0; - void Execute() { - MyCollectionContainer container(IDC); - ExecuteFill(container); - Check(container); - } - PseudoView(int s, int r, EventContainers::IdentifiableCache<MyCollection>* inIDC, int i) : IDC(inIDC), RoIStart(s), RoIEnd(r), - threads(i), deletedcount(0),cachehit(0) {} + virtual void ExecuteFill(MyCollectionContainer &container) = 0; + void Execute() { + MyCollectionContainer container(IDC); + ExecuteFill(container); + Check(container); + } + PseudoView(int s, int r, EventContainers::IdentifiableCache<MyCollection>* inIDC, int i) : IDC(inIDC), RoIStart(s), RoIEnd(r), + threads(i), c() {} }; @@ -152,141 +214,190 @@ class PseudoView{ class PseudoViewNoLock : public PseudoView { public: - PseudoViewNoLock(int s, int r, EventContainers::IdentifiableCache<MyCollection>* inIDC, int i) : PseudoView(s, r, inIDC, i ) { } - - virtual void ExecuteFill(MyCollectionContainer &container) override { - for(int i =RoIStart ; i < RoIEnd; i++){ - fills++; - bool cacheh = container.tryFetch(i); - if(cacheh){ - cachehit++; - continue; - } - std::unique_ptr<MyCollection> dcoll = std::make_unique<MyCollection>( MyID(i) ); - std::mt19937 gen(i); //Standard mersenne_twister_engine seeded with rd() - std::uniform_int_distribution<> dis(-9999999, 9999999); - for(int j=0;j<ndigits;j++){ - dcoll->add(new MyDigit(dis(gen))); - } + PseudoViewNoLock(int s, int r, EventContainers::IdentifiableCache<MyCollection>* inIDC, int i) : PseudoView(s, r, inIDC, i ) { } + + virtual void ExecuteFill(MyCollectionContainer &container) override { + + for(size_t i =RoIStart ; i < RoIEnd; i++) { + c.fills++; + bool cacheh = container.tryFetch(i); + if(cacheh) { + c.cachehit++; + continue; + } + std::unique_ptr<MyCollection> dcoll = std::make_unique<MyCollection>( MyID(i) ); + std::mt19937 gen(i); //Standard mersenne_twister_engine seeded with rd() + std::uniform_int_distribution<> dis(-9999999, 9999999); + for(int j=0; j<ndigits; j++) { + dcoll->add(new MyDigit(dis(gen))); + } + if(abortedhashes.count(i)) { //testing aborting collections + continue; + } // std::this_thread::sleep_for(0.005s); - bool deleted = false; - StatusCode x = container.addOrDelete(std::move(dcoll), IdentifierHash(i), deleted); - if(x.isFailure()) { - std::cout << "failure in addOrDelete" << std::endl; std::abort(); - } - if(deleted) ++deletedcount; - } - - } + bool deleted = false; + StatusCode x = container.addOrDelete(std::move(dcoll), IdentifierHash(i), deleted); + if(x.isFailure()) { + std::cout << "failure in addOrDelete" << std::endl; + std::abort(); + } + if(deleted) ++c.deletedcount; + } + + } }; +class PseudoViewLock : public PseudoView { +public: + + PseudoViewLock(int s, int r, EventContainers::IdentifiableCache<MyCollection>* inIDC, int i) : PseudoView(s, r, inIDC, i ) { } + + virtual void ExecuteFill(MyCollectionContainer &container) override { + + for(size_t i =RoIStart ; i < RoIEnd; i++) { + c.fills++; + MyCollectionContainer::IDC_Lock lock; + bool cacheh = container.tryFetch(i, lock); + if(cacheh) { + c.cachehit++; + continue; + } + std::unique_ptr<MyCollection> dcoll = std::make_unique<MyCollection>( MyID(i) ); + std::mt19937 gen(i); //Standard mersenne_twister_engine seeded with rd() + std::uniform_int_distribution<> dis(-9999999, 9999999); + for(int j=0; j<ndigits; j++) { + dcoll->add(new MyDigit(dis(gen))); + } + if(abortedhashes.count(i)) { //testing aborting collections + continue; + } + bool deleted = false; + StatusCode x = container.addOrDelete(std::move(dcoll), IdentifierHash(i), deleted); + if(x.isFailure()) { + std::cout << "failure in addOrDelete" << std::endl; + std::abort(); + } + if(deleted) ++c.deletedcount; + + } + + } +}; template <typename T> -class PseudoEvent{ +class PseudoEvent { public: - std::vector< T > m_views; - EventContainers::IdentifiableCache<MyCollection> *IDCache; - - void Execute(){ - int x = 0; - IDCache = new EventContainers::IdentifiableCache<MyCollection>(IdentifierHash(Ncontainers), nullptr); - - for(int i=0; i<nthreads;i++) { - m_views.emplace_back(x, x+1000,IDCache, i); - x+=50; - } - std::vector<std::thread> threads; - threads.reserve(nthreads); - for(int i=0; i<nthreads;i++) threads.emplace_back(&PseudoView::Execute, &m_views[i]); - for(int i=0; i<nthreads;i++) threads[i].join(); - - delete IDCache; - IDCache =nullptr; - } - - int countHits() const { - if(m_views.empty()){ - std::cout << "warning views are empty\n"; - } - int x =0; - for(auto &i : m_views) x += i.cachehit; - return x; - } - int deletedCount() const{ - int x =0; - for(auto &i : m_views) x += i.deletedcount; - return x; - } - int fillCount() const{ - int x =0; - for(auto &i : m_views) x += i.fills; - return x; - } - int readCount() const{ - int x =0; - for(auto &i : m_views) x += i.reads; - return x; - } + std::vector< T > m_views; + EventContainers::IdentifiableCache<MyCollection> *IDCache; + + void Execute() { + int x = 0; + IDCache = new EventContainers::IdentifiableCache<MyCollection>(IdentifierHash(Ncontainers), nullptr); + for(int i=0; i<nthreads; i++) { + m_views.emplace_back(x, x+1000,IDCache, i); + x+=50; + } + std::vector<std::thread> threads; + threads.reserve(nthreads); + for(int i=0; i<nthreads; i++) threads.emplace_back(&PseudoView::Execute, &m_views[i]); + for(int i=0; i<nthreads; i++) threads[i].join(); + + delete IDCache; + IDCache =nullptr; + } + + counters getcounters() const { + if(m_views.empty()) { + std::cout << "warning views are empty\n"; + } + counters x; + for(auto &i : m_views) x.Add(i.c); + return x; + } + }; } -int main(){ - using namespace IDC_TEST; - int x =0; - for(int i=0; i<nthreads;i++) { - std::cout << "range " << x << " to " << x + 1000 << std::endl; - x+=50; - } - MyDigit::s_total=0; - for(int i =0;i<Ncontainers;i++){ - std::mt19937 gen(i); //Standard mersenne_twister_engine seeded with rd() - std::uniform_int_distribution<> dis(-9999999, 9999999); - - MyCollection* dcoll = new MyCollection(MyID(i)); - for(int j=0;j<ndigits;j++){ - dcoll->add(new MyDigit(dis(gen))); - } - initialdata.push_back(dcoll); - } - - auto start1 = std::chrono::steady_clock::now(); - { - - int deletedcount=0; - int cachehit=0; - int fills=0; - int reads=0; - for(int i =0;i<Nevents;i++){ - if(i%10==0) std::cout << i << "/" << Nevents << std::endl; - PseudoEvent<PseudoViewNoLock> event; - event.Execute(); - deletedcount+=event.deletedCount(); - cachehit +=event.countHits(); - reads += event.readCount(); - fills += event.fillCount(); - } - std::cout << "NoLock\n"; - std::cout << "deleted " << deletedcount << '\n'; - std::cout << "countHit " << cachehit << '\n'; - std::cout << "fills " << fills << '\n'; - std::cout << "reads " << reads << '\n'; - if(fills!=reads) std::abort(); - } - auto end1 = std::chrono::steady_clock::now(); - - for(auto &x : initialdata) delete x; - initialdata.clear(); - std::cout << "Total elements " << Ncontainers * ndigits << '\n'; - std::cout << "MyDigits left undeleted " << MyDigit::s_total << std::endl; - std::chrono::duration<double> elapsed_nolock = end1-start1; - std::cout << "no lock time " << elapsed_nolock.count() << std::endl; -// std::cout << "lock time " << elapsed_lock.count() << std::endl; - if(MyDigit::s_total >0) std::abort(); - return 0; +int main() { + using namespace IDC_TEST; + int x =0; + int highestvalue =0; + for(int i=0; i<nthreads; i++) { + std::cout << "range " << x << " to " << x + 1000 << std::endl; + x+=50; + highestvalue = std::max(highestvalue, x+1000); + } + + std::mt19937 genabort(0); + std::uniform_int_distribution<> abort(0, highestvalue); + for(int i =0; i<20; i++) { + abortedhashes.insert(abort(genabort)); + } + + MyDigit::s_total=0; + for(int i =0; i<Ncontainers; i++) { + std::mt19937 gen(i); //Standard mersenne_twister_engine seeded with rd() + std::uniform_int_distribution<> dis(-9999999, 9999999); + + MyCollection* dcoll = new MyCollection(MyID(i)); + for(int j=0; j<ndigits; j++) { + dcoll->add(new MyDigit(dis(gen))); + } + initialdata.push_back(dcoll); + } + + auto start1 = std::chrono::steady_clock::now(); + { + + counters c; + for(int i =0; i<Nevents; i++) { + if(i%10==0) std::cout << i << "/" << Nevents << std::endl; + PseudoEvent<PseudoViewNoLock> event; + event.Execute(); + c.Add(event.getcounters()); + } + std::cout << "NoLock\n"; + c.Print(); + if(c.fills!=c.reads+c.aborted) { + std::cout << "Fills do not equal reads " << std::endl; + std::abort(); + } + } + auto end1 = std::chrono::steady_clock::now(); + { + counters c; + + for(int i =0; i<Nevents; i++) { + if(i%10==0) std::cout << i << "/" << Nevents << std::endl; + PseudoEvent<PseudoViewLock> event; + event.Execute(); + c.Add(event.getcounters()); + } + std::cout << "Lock\n"; + c.Print(); + if(c.fills!=c.reads+c.aborted) { + std::cout << "Fills do not equal reads " << std::endl; + std::abort(); + } + } + auto end2 = std::chrono::steady_clock::now(); + for(auto &x : initialdata) delete x; + initialdata.clear(); + std::cout << "Total elements " << Ncontainers * ndigits << '\n'; + std::cout << "MyDigits left undeleted " << MyDigit::s_total << std::endl; + std::chrono::duration<double> elapsed_nolock = end1-start1; + std::chrono::duration<double> elapsed_lock = end2-end1; + std::cout << "no lock time " << elapsed_nolock.count() << std::endl; + std::cout << "lock time " << elapsed_lock.count() << std::endl; + if(MyDigit::s_total >0) { + std::cout << "not all objects were cleaned up " << std::endl; + std::abort(); + } + return 0; } diff --git a/Event/EventContainers/test/IDMT_ContainerTest.cxx b/Event/EventContainers/test/IDMT_ContainerTest.cxx index 40c64ba8d93b..6287ba7f5b8d 100644 --- a/Event/EventContainers/test/IDMT_ContainerTest.cxx +++ b/Event/EventContainers/test/IDMT_ContainerTest.cxx @@ -1,9 +1,10 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ // This is a test cxx file for IdentifiableContainerMT. // +#include "src/IDC_Wait.cxx" #include "EventContainers/IdentifiableContainerMT.h" #include "EventContainers/SelectAllObjectMT.h" #include "ID_ContainerTest.h" @@ -11,7 +12,7 @@ #include "CLIDSvc/CLASS_DEF.h" // define a bunch of fake data classes - +using namespace std; namespace IDC_TEST { @@ -596,9 +597,10 @@ int ID_ContainerTest::execute(){ std::cout << "count is " << count << " should be 20 " << std::endl; if(count !=20) std::abort(); } - - - + { + MyCollectionContainer::IDC_Lock lock; + containerOnline->tryFetch(IdentifierHash(50), lock); + } delete cache; delete containerOnline; std::cout << "MyDigits left undeleted " << MyDigit::s_total << std::endl; @@ -615,5 +617,6 @@ int main (int /*argc*/, char** /*argv[]*/) test.initialize(); for (unsigned int i = 0; i < 5; i++) test.execute(); test.finalize(); + return 0; } diff --git a/Event/EventContainers/test/ID_ContainerTest.cxx b/Event/EventContainers/test/ID_ContainerTest.cxx index 52a3034a2ff3..7b319e518167 100644 --- a/Event/EventContainers/test/ID_ContainerTest.cxx +++ b/Event/EventContainers/test/ID_ContainerTest.cxx @@ -4,7 +4,7 @@ // This is a test cxx file for IdentifiableContainer. // -//#include "src/IdentifiableCacheBase.cxx" +#include "EventContainers/IdentifiableCacheBase.h" #include "EventContainers/IdentifiableContainer.h" #include "EventContainers/SelectAllObject.h" #include "ID_ContainerTest.h" @@ -12,7 +12,7 @@ #include "CLIDSvc/CLASS_DEF.h" // define a bunch of fake data classes - +using namespace std; namespace IDC_TEST { -- GitLab From 4e851a7fd838ab5583a7eb6998f966263683fb24 Mon Sep 17 00:00:00 2001 From: Jovan Mitrevski <Jovan.Mitrevski@cern.ch> Date: Fri, 29 Jun 2018 22:38:27 +0200 Subject: [PATCH 293/562] A snapshot before I will try a different organization Former-commit-id: 68fe4c4e5f801e6203bb6e079607f63607a8762b --- .../egammaMVACalib/src/egammaMVACalibTool.cxx | 127 ++++++++++++++++-- .../egammaMVACalib/src/egammaMVACalibTool.h | 17 ++- 2 files changed, 131 insertions(+), 13 deletions(-) diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx index cc856a39c643..d49c2a3aa6f0 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx @@ -71,15 +71,15 @@ StatusCode egammmMVACalibTool::setupBDT(std::string fileName) m_hPoly = hPoly->Clone(); m_hPoly->SetDirectory(0); - // Load formulae - TObjArray *formulaeTmp = nullPtr; - f->GetObject("formulae", formulaeTmp); - if (!formulaeTmp) { - ATH_MSG_FATAL("Could not find formulae"); - return StatusCode::FAILURE; - } - auto formulae = std::unique_ptr<TObjArray>(formulaeTmp); - formulae->SetOwner(); // to delete the objects when d-tor is called + // // Load formulae + // TObjArray *formulaeTmp = nullPtr; + // f->GetObject("formulae", formulaeTmp); + // if (!formulaeTmp) { + // ATH_MSG_FATAL("Could not find formulae"); + // return StatusCode::FAILURE; + // } + // auto formulae = std::unique_ptr<TObjArray>(formulaeTmp); + // formulae->SetOwner(); // to delete the objects when d-tor is called // Load variables TObjArray *variablesTmp = nullPtr; @@ -177,5 +177,114 @@ StatusCode egammmMVACalibTool::setupBDT(std::string fileName) StatusCode egammmMVACalibTool::initializeElectronFuncs() { + ATH_CHECK(initializeClusterFuncs("el")); + ATH_CHECK(initializeEgammaFuncs("el")); + + m_electronFuncs["el_charge"] = compute_el_charge; + m_electronFuncs["el_tracketa"] = compute_el_tracketa; + m_electronFuncs["el_trackpt"] = compute_el_trackpt; + m_electronFuncs["el_trackz0"] = compute_el_trackz0; + m_electronFuncs["el_refittedTrack_qoverp"] = compute_el_refittedTrack_qoverp; + + return StatusCode::SUCCESS; +} + +StatusCode egammmMVACalibTool::initializeUnconvertedPhotonFuncs() +{ + ATH_CHECK(initializeClusterFuncs("ph")); + ATH_CHECK(initializeEgammaFuncs("ph")); + + return StatusCode::SUCCESS; +} + +StatusCode egammmMVACalibTool::initializeConvertedPhotonFuncs() +{ + ATH_CHECK(initializeClusterFuncs("ph")); + ATH_CHECK(initializeEgammaFuncs("ph")); + + m_convFunc["ph_Rconv"] = [](const ConversionHelper& ch) { return ch.ph_Rconv(); }; + m_convFunc["ph_zconv"] = [](const ConversionHelper& ch) { return ch.ph_zconv(); }; + m_convFunc["ph_pt1conv"] = [](const ConversionHelper& ch) { return ch.ph_pt1conv(); }; + m_convFunc["ph_pt2conv"] = [](const ConversionHelper& ch) { return ch.ph_pt2conv(); }; + m_convFunc["ph_ptconv"] = [](const ConversionHelper& ch) { return ch.ph_ptconv(); }; + return StatusCode::SUCCESS; } + +StatusCode egammmMVACalibTool::initializeClusterFuncs(const std::string& prefix) +{ + m_clusterFuncs[prefix + "_cl_eta"] = compute_cl_eta; + m_clusterFuncs[prefix + "_cl_phi"] = compute_cl_phi; + m_clusterFuncs[prefix + "_cl_E"] = [](const xAOD::CaloCluster& cl) { return cl.e(); }; + m_clusterFuncs[prefix + "_cl_etaCalo"] = compute_cl_etaCalo; + m_clusterFuncs[prefix + "_cl_phiCalo"] = compute_cl_phiCalo; + m_clusterFuncs[prefix + "_cl_E_TileGap3"] = [](const xAOD::CaloCluster& cl) { return cl.eSample(CaloSampling::TileGap3); }; + + if (m_use_layer_corrected) { + m_clusterFuncs[prefix + "_rawcl_Es0"] = compute_correctedcl_Es0; + m_clusterFuncs[prefix + "_rawcl_Es1"] = compute_correctedcl_Es1; + m_clusterFuncs[prefix + "_rawcl_Es2"] = compute_correctedcl_Es2; + m_clusterFuncs[prefix + "_rawcl_Es3"] = compute_correctedcl_Es3; + m_clusterFuncs[prefix + "_rawcl_calibHitsShowerDepth"] = compute_correctedcl_calibHitsShowerDepth; + } else { + m_clusterFuncs[prefix + "_rawcl_Es0"] = compute_rawcl_Es0; + m_clusterFuncs[prefix + "_rawcl_Es1"] = compute_rawcl_Es1; + m_clusterFuncs[prefix + "_rawcl_Es2"] = compute_rawcl_Es2; + m_clusterFuncs[prefix + "_rawcl_Es3"] = compute_rawcl_Es3; + // and everything that depends on + // static cast here is needed to resolve overload (std::function is not able to) + m_clusterFuncs[prefix + "_rawcl_calibHitsShowerDepth"] = static_cast<float(*)(const xAOD::CaloCluster&)>(compute_rawcl_calibHitsShowerDepth); + } + + return StatusCode::SUCCESS; +} + +StatusCode egammmMVACalibTool::initializeEgammaFuncs(const std::string& prefix) +{ + m_egammaFuncs[prefix + "_e011"] = SG::AuxElement::Accessor<float>("e011"); + m_egammaFuncs[prefix + "_e033"] = SG::AuxElement::Accessor<float>("e033"); + m_egammaFuncs[prefix + "_e132"] = SG::AuxElement::Accessor<float>("e132"); + m_egammaFuncs[prefix + "_e1152"] = SG::AuxElement::Accessor<float>("e1152"); + m_egammaFuncs[prefix + "_ethad1"] = SG::AuxElement::Accessor<float>("ethad1"); + m_egammaFuncs[prefix + "_ethad"] = SG::AuxElement::Accessor<float>("ethad"); + m_egammaFuncs[prefix + "_f1"] = SG::AuxElement::Accessor<float>("f1"); + m_egammaFuncs[prefix + "_f3"] = SG::AuxElement::Accessor<float>("f3"); + m_egammaFuncs[prefix + "_f1core"] = SG::AuxElement::Accessor<float>("f1core"); + m_egammaFuncs[prefix + "_f3core"] = SG::AuxElement::Accessor<float>("f3core"); + m_egammaFuncs[prefix + "_e233"] = SG::AuxElement::Accessor<float>("e233"); + m_egammaFuncs[prefix + "_e235"] = SG::AuxElement::Accessor<float>("e235"); + m_egammaFuncs[prefix + "_e255"] = SG::AuxElement::Accessor<float>("e255"); + m_egammaFuncs[prefix + "_e237"] = SG::AuxElement::Accessor<float>("e237"); + m_egammaFuncs[prefix + "_e277"] = SG::AuxElement::Accessor<float>("e277"); + m_egammaFuncs[prefix + "_e333"] = SG::AuxElement::Accessor<float>("e333"); + m_egammaFuncs[prefix + "_e335"] = SG::AuxElement::Accessor<float>("e335"); + m_egammaFuncs[prefix + "_e337"] = SG::AuxElement::Accessor<float>("e337"); + m_egammaFuncs[prefix + "_e377"] = SG::AuxElement::Accessor<float>("e377"); + m_egammaFuncs[prefix + "_weta1"] = SG::AuxElement::Accessor<float>("weta1"); + m_egammaFuncs[prefix + "_weta2"] = SG::AuxElement::Accessor<float>("weta2"); + m_egammaFuncs[prefix + "_e2ts1"] = SG::AuxElement::Accessor<float>("e2ts1"); + m_egammaFuncs[prefix + "_e2tsts1"] = SG::AuxElement::Accessor<float>("e2tsts1"); + m_egammaFuncs[prefix + "_fracs1"] = SG::AuxElement::Accessor<float>("fracs1"); + m_egammaFuncs[prefix + "_widths1"] = SG::AuxElement::Accessor<float>("widths1"); + m_egammaFuncs[prefix + "_widths2"] = SG::AuxElement::Accessor<float>("widths2"); + m_egammaFuncs[prefix + "_poscs1"] = SG::AuxElement::Accessor<float>("poscs1"); + m_egammaFuncs[prefix + "_poscs2"] = SG::AuxElement::Accessor<float>("poscs2"); + m_egammaFuncs[prefix + "_asy1"] = SG::AuxElement::Accessor<float>("asy1"); + m_egammaFuncs[prefix + "_pos"] = SG::AuxElement::Accessor<float>("pos"); + m_egammaFuncs[prefix + "_pos7"] = SG::AuxElement::Accessor<float>("pos7"); + m_egammaFuncs[prefix + "_barys1"] = SG::AuxElement::Accessor<float>("barys1"); + m_egammaFuncs[prefix + "_wtots1"] = SG::AuxElement::Accessor<float>("wtots1"); + m_egammaFuncs[prefix + "_emins1"] = SG::AuxElement::Accessor<float>("emins1"); + m_egammaFuncs[prefix + "_emaxs1"] = SG::AuxElement::Accessor<float>("emaxs1"); + m_egammaFuncs[prefix + "_r33over37allcalo"] = SG::AuxElement::Accessor<float>("r33over37allcalo"); + m_egammaFuncs[prefix + "_ecore"] = SG::AuxElement::Accessor<float>("ecore"); + m_egammaFuncs[prefix + "_Reta"] = SG::AuxElement::Accessor<float>("Reta"); + m_egammaFuncs[prefix + "_Rphi"] = SG::AuxElement::Accessor<float>("Rphi"); + m_egammaFuncs[prefix + "_Eratio"] = SG::AuxElement::Accessor<float>("Eratio"); + m_egammaFuncs[prefix + "_Rhad"] = SG::AuxElement::Accessor<float>("Rhad"); + m_egammaFuncs[prefix + "_Rhad1"] = SG::AuxElement::Accessor<float>("Rhad1"); + m_egammaFuncs[prefix + "_DeltaE"] = SG::AuxElement::Accessor<float>("DeltaE"); + + return StatusCode::SUCCESS; +} + diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h index 4511399fa915..b26dc6c474ae 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h @@ -19,6 +19,7 @@ #include <string> #include <memory> #include <functional> +#include <unordered_map> /** @@ -71,11 +72,14 @@ private: std::vector<MVAUtils::BDT> m_BDTs; /// map of variable string to function (taking calo cluster) - std::map<std::string, std::functional<float(const xAOD::CaloCluster&)> m_clusterFuncs; + std::unordered_map<std::string, std::functional<float(const xAOD::CaloCluster&)> > m_clusterFuncs; + /// map of variable string to function (taking egamma) + std::unordered_map<std::string, std::functional<float(const xAOD::Egamma&)> > m_egammaFuncs; /// map of variable string to function (taking electron) - std::map<std::string, std::functional<float(const xAOD::Electron&)> m_ElectronFuncs; - /// map of variable string to function (taking photon) - std::map<std::string, std::functional<float(const xAOD::Photon&)> m_PhotonFuncs; + std::unordered_map<std::string, std::functional<float(const xAOD::Electron&)> > m_electronFuncs; + /// map of variable string to function (taking ConversionHelper) + std::unordered_map<std::string, + std::functional<float(const egammaMVATreeHelpers::ConversionHelper&)> > m_convFuncs; /// initialize the functions needed for electrons StatusCode initializeElectronFuncs(); @@ -84,6 +88,11 @@ private: /// initialize the functions needed for converted photons StatusCode initializeConvertedPhotonFuncs(); + /// a function called by the above functions to setup the cluster funcs + StatusCode initializeClusterFuncs(const std::string& prefix); + + /// a function called by the above functions to setup the egamma funcs + StatusCode initializeEgammaFuncs(const std::string& prefix); }; #endif -- GitLab From ef99cbbb2869d219b543af8b8e31908e531267f2 Mon Sep 17 00:00:00 2001 From: Andrea Coccaro <andrea.coccaro@cern.ch> Date: Fri, 29 Jun 2018 08:48:58 +0000 Subject: [PATCH 294/562] Merge branch 'cherry-pick-af2515ac8a [formerly 0d95f1d1db]-21.1' into '21.1' Sweeping !11746 from 21.0 to 21.1. Fix for bug in MuonTrackCleaner See merge request atlas/athena!11929 (cherry picked from commit e9b5570e6a24a6f93b0d4718c6b5e477b7126f49 [formerly 9f6bdb180464f7dafe5195b99f4a1da6799d4071]) 8a78056e Merge branch 'ATLASRECTS_4483' into '21.0' Former-commit-id: c1f86ca269df3dade480bd90faab4e64b953b1dd --- .../MuonTrackFinderTools/src/MuonTrackCleaner.cxx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackCleaner.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackCleaner.cxx index 380c995baa06..e5802a2f151c 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackCleaner.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackCleaner.cxx @@ -893,17 +893,18 @@ namespace Muon { bool remove = hit->chId == chId && ( (removePhi && measuresPhi) || (removeEta && !measuresPhi) ); // hits that are flagged as outlier or hits in the chamber to be removed are added as Outlier if( !hit->useInFit || remove ){ - hit->useInFit = 0; if( msgLvl(MSG::DEBUG) && remove ) msg() << MSG::DEBUG << " removing hit " << m_idHelper->toString(hit->id) << " pull " << hit->resPull->pull().front() << endmsg; // add as outlier if( hit->inBounds ) tsos->push_back( MuonTSOSHelper::cloneTSOSWithUpdate( *hit->originalState, - *hit->meas, - *hit->pars, - Trk::TrackStateOnSurface::Outlier) ); + *hit->meas, + *hit->pars, + Trk::TrackStateOnSurface::Outlier) ); // if removed, add hit to vector of hits - if( remove ) result.removedHits.push_back(&*hit); + //but only if the hit was not already an outlier to be skipped! + if( remove && hit->useInFit) result.removedHits.push_back(&*hit); + hit->useInFit = 0; continue; } } @@ -922,12 +923,12 @@ namespace Muon { // fit new track if ( msgLvl(MSG::DEBUG) ) { - const DataVector<const Trk::TrackStateOnSurface>* states = track.trackStateOnSurfaces(); + const DataVector<const Trk::TrackStateOnSurface>* states = cleanedTrack->trackStateOnSurfaces(); int nStates = 0; if ( states ) nStates = states->size(); msg() << MSG::DEBUG << "removeChamber: Calling fit with hits: " << nStates; if ( msgLvl(MSG::VERBOSE) ) { - msg() << MSG::VERBOSE << std::endl << m_printer->printMeasurements( track ); + msg() << MSG::VERBOSE << std::endl << m_printer->printMeasurements( *cleanedTrack ); } msg() << endmsg; if( !cleanedTrack->perigeeParameters() ){ -- GitLab From b9af1f03254d99c7c83cf9cf877cd0fae43111dd Mon Sep 17 00:00:00 2001 From: Shota Hayashida <hayashida@hepl.phys.nagoya-u.ac.jp> Date: Sat, 30 Jun 2018 16:19:32 +0200 Subject: [PATCH 295/562] Updated to Service/Tool handle and new property definition Former-commit-id: 45f4d898c2482aeb29d355fe7684f6f6bc140ba7 --- .../TrigL2MuonSA/AlignmentBarrelLUTSvc.h | 3 +- .../TrigL2MuonSA/TrigL2MuonSA/CscRegUtils.h | 2 +- .../TrigL2MuonSA/CscSegmentMaker.h | 24 ++++-- .../TrigL2MuonSA/MuCalStreamerTool.h | 5 +- .../TrigL2MuonSA/MuFastPatternFinder.h | 2 +- .../TrigL2MuonSA/MuFastStationFitter.h | 63 ++++++++++------ .../TrigL2MuonSA/MuFastTrackFitter.h | 6 +- .../TrigL2MuonSA/PtBarrelLUTSvc.h | 6 +- .../TrigL2MuonSA/PtEndcapLUTSvc.h | 3 +- .../TrigL2MuonSA/PtFromAlphaBeta.h | 6 +- .../TrigL2MuonSA/RpcRoadDefiner.h | 1 + .../TrigL2MuonSA/TgcRoadDefiner.h | 1 + .../src/AlignmentBarrelLUTSvc.cxx | 1 - .../TrigL2MuonSA/src/CscRegUtils.cxx | 1 - .../TrigL2MuonSA/src/CscSegmentMaker.cxx | 11 +-- .../TrigL2MuonSA/src/MuCalStreamerTool.cxx | 35 --------- .../TrigL2MuonSA/src/MuFastDataPreparator.cxx | 4 +- .../TrigL2MuonSA/src/MuFastPatternFinder.cxx | 20 ++--- .../TrigL2MuonSA/src/MuFastStationFitter.cxx | 73 ++++++------------- .../TrigL2MuonSA/src/MuFastTrackFitter.cxx | 63 ++++++++-------- .../TrigL2MuonSA/src/PtBarrelLUTSvc.cxx | 2 - .../TrigL2MuonSA/src/PtEndcapLUTSvc.cxx | 1 - .../TrigL2MuonSA/src/PtFromAlphaBeta.cxx | 2 - .../TrigL2MuonSA/src/RpcRoadDefiner.cxx | 3 +- 24 files changed, 141 insertions(+), 197 deletions(-) diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlignmentBarrelLUTSvc.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlignmentBarrelLUTSvc.h index 1c5d7e2c978d..1ccb00de4d40 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlignmentBarrelLUTSvc.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlignmentBarrelLUTSvc.h @@ -35,7 +35,8 @@ namespace TrigL2MuonSA { virtual StatusCode finalize(void); private: - StringProperty m_lut_fileName; + Gaudi::Property< std::string > m_lut_fileName { + this, "LUTfile", "dZ_barrel.lut", ""}; ToolHandle<AlignmentBarrelLUT> m_alignmentBarrelLUT; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscRegUtils.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscRegUtils.h index f1e9d40dce78..5181c723a425 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscRegUtils.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscRegUtils.h @@ -67,7 +67,7 @@ class CscRegDict: public AthAlgTool{ int stationPhi(int hash); private: - BooleanProperty m_isMC; + 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 diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscSegmentMaker.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscSegmentMaker.h index 07ea4e739a1a..311acf923393 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscSegmentMaker.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscSegmentMaker.h @@ -103,20 +103,28 @@ class CscSegment; private: IntegerProperty m_msglevel; UtilTools *m_util; - ToolHandle<CscRegDict> m_cscregdict; + ToolHandle<CscRegDict> m_cscregdict { + this, "CscRegDict", "TrigL2MuonSA::CscRegDict", ""}; #ifndef XAOD_ANALYSIS const MuonGM::MuonDetectorManager *m_muonMgr; #endif //properties - BooleanProperty m_use_geometry; - DoubleProperty m_max_chisquare; - DoubleProperty m_max_residual_eta; - DoubleProperty m_max_residual_phi; - DoubleProperty m_err_eta; - DoubleProperty m_err_phi; - DoubleProperty m_err_ip; + 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., ""}; }; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuCalStreamerTool.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuCalStreamerTool.h index dc341b3316b6..3e8f5a831936 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuCalStreamerTool.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuCalStreamerTool.h @@ -104,7 +104,8 @@ namespace TrigL2MuonSA { private: - BooleanProperty m_writeToFile; + Gaudi::Property< bool > m_writeToFile { + this, "WriteToFile", false, ""}; // name of the calibration buffer or of the // output file @@ -118,7 +119,6 @@ namespace TrigL2MuonSA { ServiceHandle<StoreGateSvc> m_storeGate; // the region selector - //IRegSelSvc* m_regionSelector; ServiceHandle<IRegSelSvc> m_regionSelector; // RPC cabling service @@ -130,7 +130,6 @@ namespace TrigL2MuonSA { // const TGCCablingBase* m_tgcCablingSvc; // ROB DataProvider - //ROBDataProviderSvc* m_robDataProvider; ServiceHandle<IROBDataProviderSvc> m_robDataProvider; // id of the circular buffer diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastPatternFinder.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastPatternFinder.h index 8f0bb002cb1f..4d8276b59eb6 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastPatternFinder.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastPatternFinder.h @@ -68,7 +68,7 @@ class MuFastPatternFinder: public AthAlgTool private: // MDT calibration service - MdtCalibrationSvc* m_mdtCalibrationSvc; + ServiceHandle<MdtCalibrationSvc> m_mdtCalibrationSvc; // Id helper const MdtIdHelper* m_mdtIdHelper; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastStationFitter.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastStationFitter.h index b2935a6de971..3ee72c57d1df 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastStationFitter.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastStationFitter.h @@ -64,27 +64,43 @@ class MuFastStationFitter: public AthAlgTool BooleanProperty m_use_mcLUT; - DoubleProperty m_endcapinn_mdt_chi2_limit; - DoubleProperty m_endcapmid_mdt_chi2_limit; - DoubleProperty m_endcapout_mdt_chi2_limit; - DoubleProperty m_endcapee_mdt_chi2_limit; - - DoubleProperty m_rwidth_Endcapinn_first; - DoubleProperty m_rwidth_Endcapinn_second; - DoubleProperty m_rwidth_Endcapmid_first; - DoubleProperty m_rwidth_Endcapmid_second; - DoubleProperty m_rwidth_Endcapout_first ; - DoubleProperty m_rwidth_Endcapout_second; - DoubleProperty m_rwidth_Endcapee_first; - DoubleProperty m_rwidth_Endcapee_second; - - DoubleProperty m_mdt_driftspace_uplimit; - DoubleProperty m_mdt_driftspace_downlimit; - DoubleProperty m_mdt_drifttime_limit; - - ToolHandle<ITrigMuonBackExtrapolator> m_backExtrapolator; - - private: + Gaudi::Property< double > m_endcapinn_mdt_chi2_limit { + this, "ENDCAPINN_MDT_CHI2_LIMIT", 20, ""}; + Gaudi::Property< double > m_endcapmid_mdt_chi2_limit { + this, "ENDCAPMID_MDT_CHI2_LIMIT", 20, ""}; + Gaudi::Property< double > m_endcapout_mdt_chi2_limit { + this, "ENDCAPOUT_MDT_CHI2_LIMIT", 20, ""}; + Gaudi::Property< double > m_endcapee_mdt_chi2_limit { + this, "ENDCAPEE_MDT_CHI2_LIMIT", 20, ""}; + + Gaudi::Property< double > m_rwidth_Endcapinn_first { + this, "RWIDTH_EndcapINN_FIRST", 150, ""}; + Gaudi::Property< double > m_rwidth_Endcapinn_second { + this, "RWIDTH_EndcapINN_SECOND", 80, ""}; + Gaudi::Property< double > m_rwidth_Endcapmid_first { + this, "RWIDTH_EndcapMID_FIRST", 150, ""}; + Gaudi::Property< double > m_rwidth_Endcapmid_second { + this, "RWIDTH_EndcapMID_SECOND", 100, ""}; + Gaudi::Property< double > m_rwidth_Endcapout_first { + this, "RWIDTH_EndcapOUT_FIRST", 120, ""}; + Gaudi::Property< double > m_rwidth_Endcapout_second { + this, "RWIDTH_EndcapOUT_SECOND", 60, ""}; + Gaudi::Property< double > m_rwidth_Endcapee_first { + this, "RWIDTH_EndcapEE_FIRST", 150, ""}; + Gaudi::Property< double > m_rwidth_Endcapee_second { + this, "RWIDTH_EndcapEE_SECOND", 100, ""}; + + Gaudi::Property< double > m_mdt_driftspace_uplimit { + this, "MDT_DRFITSPACE_UPLIMIT", 14.8, ""}; + Gaudi::Property< double > m_mdt_driftspace_downlimit { + this, "MDT_DRFITSPACE_DOWNLIMIT", 0.1, ""}; + Gaudi::Property< double > m_mdt_drifttime_limit { + this, "MDT_DRFITTIME_LIMIT", 1700, ""}; + + ToolHandle<ITrigMuonBackExtrapolator> m_backExtrapolator { + this, "BackExtrapolator", "TrigMuonBackExtrapolator", "public tool for back extrapolating the muon tracks to the IV"}; + + private: float SetDriftSpace(float tdr, float rad, float zeta, float phim, float phiDir); void Xline(float *, float *, float *, int *, int , float *, float *, float *, float *, float *, float *); @@ -96,8 +112,9 @@ class MuFastStationFitter: public AthAlgTool StringProperty m_lut_fileName; ToolHandle<AlphaBetaEstimate> m_alphaBetaEstimate; - ToolHandle<PtFromAlphaBeta> m_ptFromAlphaBeta; - const TrigL2MuonSA::PtEndcapLUTSvc* m_ptEndcapLUTSvc; + ToolHandle<PtFromAlphaBeta> m_ptFromAlphaBeta { + this, "PtFromAlphaBeta", "TrigL2MuonSA::PtFromAlphaBeta", ""}; + //const TrigL2MuonSA::PtEndcapLUTSvc* m_ptEndcapLUTSvc; void findLayerCombination(std::vector<unsigned int> &a, int n, int r,std::vector<std::vector<unsigned int> > &c, int &nr); void findSubLayerCombination(std::vector<unsigned int> &a, int n,int r, std::vector<unsigned int> &b, int index ,int num, diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastTrackFitter.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastTrackFitter.h index f1a8c006fdb2..9fffdc343a25 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastTrackFitter.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastTrackFitter.h @@ -65,10 +65,10 @@ namespace TrigL2MuonSA { BooleanProperty m_use_mcLUT; - const PtEndcapLUTSvc* m_ptEndcapLUTSvc; - const PtBarrelLUTSvc* m_ptBarrelLUTSvc; + //const PtEndcapLUTSvc* m_ptEndcapLUTSvc; + //const PtBarrelLUTSvc* m_ptBarrelLUTSvc; - const AlignmentBarrelLUTSvc* m_alignmentBarrelLUTSvc; + //const AlignmentBarrelLUTSvc* m_alignmentBarrelLUTSvc; BooleanProperty m_use_endcapInnerFromBarrel; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/PtBarrelLUTSvc.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/PtBarrelLUTSvc.h index caad368550b6..8326b7a660c2 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/PtBarrelLUTSvc.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/PtBarrelLUTSvc.h @@ -36,8 +36,10 @@ namespace TrigL2MuonSA { virtual StatusCode finalize(void); private: - StringProperty m_lut_fileName; - StringProperty m_lutSP_fileName; + Gaudi::Property< std::string > m_lut_fileName { + this, "LUTfile", "pt_barrel.lut", ""}; + Gaudi::Property< std::string > m_lutSP_fileName { + this, "SP_LUTfile", "pt_barrelSP_new.lut", ""}; ToolHandle<PtBarrelLUT> m_ptBarrelLUT; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/PtEndcapLUTSvc.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/PtEndcapLUTSvc.h index 8b90c00fe52a..a914fa8ef524 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/PtEndcapLUTSvc.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/PtEndcapLUTSvc.h @@ -38,7 +38,8 @@ class PtEndcapLUTSvc : public AthService, virtual public IInterface virtual StatusCode finalize(); private: - StringProperty m_lut_fileName; + Gaudi::Property< std::string > m_lut_fileName { + this, "FileNameRun2", "pt_endcap_run2.lut", ""}; StringProperty m_lut_mean; StringProperty m_lut_sigma; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/PtFromAlphaBeta.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/PtFromAlphaBeta.h index fe5eab501e87..6d3037e4cae5 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/PtFromAlphaBeta.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/PtFromAlphaBeta.h @@ -49,8 +49,10 @@ class PtFromAlphaBeta: public AthAlgTool float fp(float x, float c33, float c22, float c1) const; BooleanProperty m_use_mcLUT; - BooleanProperty m_use_cscpt; - BooleanProperty m_avoid_misaligned_cscs; + Gaudi::Property< bool > m_use_cscpt { + this, "useCscPt", false, ""}; + Gaudi::Property< bool > m_avoid_misaligned_cscs { + this, "AvoidMisalignedCSCs", true, "avoid using the 2 new chambers, whose alignment is not completed"}; const ToolHandle<PtEndcapLUT>* m_ptEndcapLUT; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h index b278616fcebd..ce054210262f 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h @@ -72,6 +72,7 @@ class RpcRoadDefiner: public AthAlgTool bool m_use_rpc; IRegSelSvc* m_regionSelector; + //ServiceHandle<IRegSelSvc> m_regionSelector; const MdtIdHelper* m_mdtIdHelper; }; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h index b2b642b2907c..980747dff701 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h @@ -72,6 +72,7 @@ class TgcRoadDefiner: public AthAlgTool double m_rWidth_TGC_Failed; IRegSelSvc* m_regionSelector; + //ServiceHandle<IRegSelSvc> m_regionSelector; const MdtIdHelper* m_mdtIdHelper; }; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlignmentBarrelLUTSvc.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlignmentBarrelLUTSvc.cxx index 2e457aecc861..5dfd13bacecb 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlignmentBarrelLUTSvc.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlignmentBarrelLUTSvc.cxx @@ -15,7 +15,6 @@ TrigL2MuonSA::AlignmentBarrelLUTSvc::AlignmentBarrelLUTSvc(const std::string& na AthService(name,sl), m_alignmentBarrelLUT("TrigL2MuonSA::AlignmentBarrelLUT") { - declareProperty( "LUTfile", m_lut_fileName="dZ_barrel.lut" ); } // -------------------------------------------------------------------------------- diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscRegUtils.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscRegUtils.cxx index 9503c85aed32..6e4c3516c6e7 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscRegUtils.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscRegUtils.cxx @@ -20,7 +20,6 @@ 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){ declareInterface<TrigL2MuonSA::CscRegDict>(this); - declareProperty("MCFlag", m_isMC=true); } diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscSegmentMaker.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscSegmentMaker.cxx index 5450e9a210a8..f775db37489a 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscSegmentMaker.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscSegmentMaker.cxx @@ -27,20 +27,13 @@ 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), m_cscregdict("TrigL2MuonSA::CscRegDict") + : AthAlgTool(type, name, parent), + m_util(0) #ifndef XAOD_ANALYSIS ,m_muonMgr(0) #endif { declareInterface<TrigL2MuonSA::CscSegmentMaker>(this); - declareProperty("CscRegDict", m_cscregdict); - declareProperty("UseGeometry", m_use_geometry=false); - declareProperty("max_chisquare", m_max_chisquare=25.); - declareProperty("max_residual_eta", m_max_residual_eta=100.); - declareProperty("max_residual_phi", m_max_residual_phi=250.); - declareProperty("err_eta", m_err_eta=3.); - declareProperty("err_phi", m_err_phi=6.); - declareProperty("err_ip", m_err_ip=250.); } diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx index 575c9ea3ff18..21d5f02461c4 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx @@ -49,8 +49,6 @@ TrigL2MuonSA::MuCalStreamerTool::MuCalStreamerTool(const std::string& type, { declareInterface<TrigL2MuonSA::MuCalStreamerTool>(this); - - declareProperty("WriteToFile", m_writeToFile=false); } // -------------------------------------------------------------------------------- @@ -74,17 +72,7 @@ StatusCode TrigL2MuonSA::MuCalStreamerTool::initialize() // Retrieve the RPC cabling service ServiceHandle<IRPCcablingServerSvc> RpcCabGet ("RPCcablingServerSvc", name()); - //sc = RpcCabGet.retrieve(); - //if ( sc != StatusCode::SUCCESS ) { - // ATH_MSG_ERROR("Could not retrieve the RPCcablingServerSvc"); - // return sc; - //} ATH_CHECK( RpcCabGet.retrieve() ); - //sc = RpcCabGet->giveCabling(m_rpcCabling); - //if ( sc != StatusCode::SUCCESS ) { - // ATH_MSG_ERROR("Could not retrieve the RPC Cabling Server"); - // return sc; - //} ATH_CHECK( RpcCabGet->giveCabling(m_rpcCabling) ); m_rpcCablingSvc = m_rpcCabling->getRPCCabling(); if ( !m_rpcCablingSvc ) { @@ -110,37 +98,14 @@ StatusCode TrigL2MuonSA::MuCalStreamerTool::initialize() // return StatusCode::FAILURE; //} - //sc = m_tgcDataPreparator.retrieve(); - //if ( sc.isFailure() ) { - // ATH_MSG_ERROR("Could not retrieve " << m_tgcDataPreparator); - // return sc; - //} ATH_CHECK( m_tgcDataPreparator.retrieve() ); ATH_MSG_DEBUG("Retrieved service " << m_tgcDataPreparator); // locate the region selector - //sc = service("RegSelSvc",m_regionSelector); - //if ( sc.isFailure() ) { - // ATH_MSG_ERROR("Could not retrieve the region selector"); - // return sc; - //} ATH_CHECK( m_regionSelector.retrieve() ); ATH_MSG_DEBUG("Retrieved the region selector"); // Locate ROBDataProvider - //std::string serviceName = "ROBDataProvider"; - //IService* svc = 0; - //sc = service("ROBDataProviderSvc", svc); - //if(sc.isFailure()) { - // ATH_MSG_ERROR("Could not retrieve " << serviceName); - // return sc; - //} - //m_robDataProvider = dynamic_cast<ROBDataProviderSvc*> (svc); - //if( m_robDataProvider == 0 ) { - // ATH_MSG_ERROR("Could not cast to ROBDataProviderSvc "); - // return StatusCode::FAILURE; - //} - //ATH_MSG_DEBUG("Retrieved service " << serviceName); ATH_CHECK( m_robDataProvider.retrieve() ); ATH_MSG_DEBUG("Retrieved service " << m_robDataProvider.name()); diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx index 609e7a5f1b7f..4ed908e04404 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx @@ -131,11 +131,11 @@ StatusCode TrigL2MuonSA::MuFastDataPreparator::setMCFlag(BooleanProperty use_mcL m_use_mcLUT = use_mcLUT; if (m_use_mcLUT) { - ServiceHandle<TrigL2MuonSA::PtEndcapLUTSvc> ptEndcapLUTSvc("PtEndcapLUTSvc_MC", name()); + const ServiceHandle<TrigL2MuonSA::PtEndcapLUTSvc> ptEndcapLUTSvc("PtEndcapLUTSvc_MC", name()); ATH_CHECK( ptEndcapLUTSvc.retrieve() ); m_tgcRoadDefiner->setPtLUT(&*ptEndcapLUTSvc); } else { - ServiceHandle<TrigL2MuonSA::PtEndcapLUTSvc> ptEndcapLUTSvc("PtEndcapLUTSvc", name()); + const ServiceHandle<TrigL2MuonSA::PtEndcapLUTSvc> ptEndcapLUTSvc("PtEndcapLUTSvc", name()); ATH_CHECK( ptEndcapLUTSvc.retrieve() ); m_tgcRoadDefiner->setPtLUT(&*ptEndcapLUTSvc); } diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastPatternFinder.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastPatternFinder.cxx index 81699bbe0b69..1365e561f79c 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastPatternFinder.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastPatternFinder.cxx @@ -31,7 +31,7 @@ TrigL2MuonSA::MuFastPatternFinder::MuFastPatternFinder(const std::string& type, const std::string& name, const IInterface* parent): AthAlgTool(type,name,parent), - m_mdtCalibrationSvc(0) + m_mdtCalibrationSvc( "MdtCalibrationSvc", name ) { declareInterface<TrigL2MuonSA::MuFastPatternFinder>(this); } @@ -56,24 +56,16 @@ StatusCode TrigL2MuonSA::MuFastPatternFinder::initialize() } // retrieve the mdtidhelper - StoreGateSvc* detStore(0); sc = serviceLocator()->service("DetectorStore", detStore); - if (sc.isFailure()) { - ATH_MSG_ERROR("Could not retrieve DetectorStore."); - return sc; - } + ServiceHandle<StoreGateSvc> detStore("DetectorStore", name()); + ATH_CHECK( detStore.retrieve() ); ATH_MSG_DEBUG("Retrieved DetectorStore."); const MuonGM::MuonDetectorManager* muonMgr; - sc = detStore->retrieve( muonMgr,"Muon" ); - if (sc.isFailure()) return sc; + ATH_CHECK( detStore->retrieve( muonMgr,"Muon" ) ); ATH_MSG_DEBUG("Retrieved GeoModel from DetectorStore."); - m_mdtIdHelper = muonMgr->mdtIdHelper(); + m_mdtIdHelper = muonMgr->mdtIdHelper(); // Locate MDT calibration service - sc = serviceLocator()->service("MdtCalibrationSvc", m_mdtCalibrationSvc ); - if(sc.isFailure()) { - ATH_MSG_WARNING("Unable to retrieve the MDT calibration Service"); - ATH_MSG_WARNING("Proceed using dummy calibration for MDT"); - } + ATH_CHECK( m_mdtCalibrationSvc.retrieve() ); // return StatusCode::SUCCESS; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastStationFitter.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastStationFitter.cxx index 825c01072bd7..34417c906427 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastStationFitter.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastStationFitter.cxx @@ -34,32 +34,9 @@ TrigL2MuonSA::MuFastStationFitter::MuFastStationFitter(const std::string& type, const std::string& name, const IInterface* parent): AthAlgTool(type,name,parent), - m_backExtrapolator("TrigMuonBackExtrapolator"), - m_alphaBetaEstimate("TrigL2MuonSA::AlphaBetaEstimate"), - m_ptFromAlphaBeta("TrigL2MuonSA::PtFromAlphaBeta") + m_alphaBetaEstimate("TrigL2MuonSA::AlphaBetaEstimate") { declareInterface<TrigL2MuonSA::MuFastStationFitter>(this); - - declareProperty("BackExtrapolator", m_backExtrapolator, "public tool for back extrapolating the muon tracks to the IV"); - declareProperty("PtFromAlphaBeta", m_ptFromAlphaBeta); - - declareProperty("ENDCAPINN_MDT_CHI2_LIMIT", m_endcapinn_mdt_chi2_limit = 20); - declareProperty("ENDCAPMID_MDT_CHI2_LIMIT", m_endcapmid_mdt_chi2_limit = 20); - declareProperty("ENDCAPOUT_MDT_CHI2_LIMIT", m_endcapout_mdt_chi2_limit = 20); - declareProperty("ENDCAPEE_MDT_CHI2_LIMIT", m_endcapee_mdt_chi2_limit = 20); - - declareProperty("RWIDTH_EndcapINN_FIRST", m_rwidth_Endcapinn_first = 150.); - declareProperty("RWIDTH_EndcapINN_SECOND", m_rwidth_Endcapinn_second = 80. ); - declareProperty("RWIDTH_EndcapMID_FIRST", m_rwidth_Endcapmid_first = 150.); - declareProperty("RWIDTH_EndcapMID_SECOND", m_rwidth_Endcapmid_second = 100.); - declareProperty("RWIDTH_EndcapOUT_FIRST", m_rwidth_Endcapout_first = 120.); - declareProperty("RWIDTH_EndcapOUT_SECOND", m_rwidth_Endcapout_second = 60. ); - declareProperty("RWIDTH_EndcapEE_FIRST", m_rwidth_Endcapee_first = 150.); - declareProperty("RWIDTH_EndcapEE_SECOND", m_rwidth_Endcapee_second = 100.); - - declareProperty("MDT_DRFITSPACE_UPLIMIT", m_mdt_driftspace_uplimit = 14.8); - declareProperty("MDT_DRFITSPACE_DOWNLIMIT", m_mdt_driftspace_downlimit = 0.1); - declareProperty("MDT_DRFITTIME_LIMIT", m_mdt_drifttime_limit = 1700.); } // -------------------------------------------------------------------------------- @@ -81,25 +58,13 @@ StatusCode TrigL2MuonSA::MuFastStationFitter::initialize() return sc; } - // BackExtrapolator services - sc = m_backExtrapolator.retrieve(); - if ( !sc.isSuccess() ) { - ATH_MSG_ERROR("Could not retrieve " << m_backExtrapolator); - return sc; - } - - sc = m_alphaBetaEstimate.retrieve(); - if ( sc.isFailure() ) { - ATH_MSG_ERROR("Could not retrieve " << m_alphaBetaEstimate); - return sc; - } + // BackExtrapolator services + ATH_CHECK( m_backExtrapolator.retrieve() ); + + ATH_CHECK( m_alphaBetaEstimate.retrieve() ); ATH_MSG_DEBUG("Retrieved service " << m_alphaBetaEstimate); - sc = m_ptFromAlphaBeta.retrieve(); - if ( sc.isFailure() ) { - ATH_MSG_ERROR("Could not retrieve " << m_ptFromAlphaBeta); - return sc; - } + ATH_CHECK( m_ptFromAlphaBeta.retrieve() ); ATH_MSG_DEBUG("Retrieved service " << m_ptFromAlphaBeta); return StatusCode::SUCCESS; @@ -113,20 +78,24 @@ StatusCode TrigL2MuonSA::MuFastStationFitter::setMCFlag(BooleanProperty use_mcLU StatusCode sc = StatusCode::SUCCESS; if (m_use_mcLUT) { - sc = serviceLocator()->service("PtEndcapLUTSvc_MC", m_ptEndcapLUTSvc); + const ServiceHandle<TrigL2MuonSA::PtEndcapLUTSvc> ptEndcapLUTSvc("PtEndcapLUTSvc_MC", name()); + ATH_CHECK( ptEndcapLUTSvc.retrieve() ); + + // Calculation of alpha and beta + m_alphaBetaEstimate->setMCFlag(m_use_mcLUT, &*ptEndcapLUTSvc); + // conversion: alpha, beta -> pT + m_ptFromAlphaBeta->setMCFlag(m_use_mcLUT, &*ptEndcapLUTSvc); + } else { - sc = serviceLocator()->service("PtEndcapLUTSvc", m_ptEndcapLUTSvc); - } - if (!sc.isSuccess()) { - ATH_MSG_ERROR("Could not find PtEndcapLUTSvc"); - return sc; - } + const ServiceHandle<TrigL2MuonSA::PtEndcapLUTSvc> ptEndcapLUTSvc("PtEndcapLUTSvc", name()); + ATH_CHECK( ptEndcapLUTSvc.retrieve() ); - // Calculation of alpha and beta - m_alphaBetaEstimate->setMCFlag(m_use_mcLUT, m_ptEndcapLUTSvc); + // Calculation of alpha and beta + m_alphaBetaEstimate->setMCFlag(m_use_mcLUT, &*ptEndcapLUTSvc); + // conversion: alpha, beta -> pT + m_ptFromAlphaBeta->setMCFlag(m_use_mcLUT, &*ptEndcapLUTSvc); - // conversion: alpha, beta -> pT - m_ptFromAlphaBeta->setMCFlag(m_use_mcLUT, m_ptEndcapLUTSvc); + } return StatusCode::SUCCESS; } diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastTrackFitter.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastTrackFitter.cxx index c2e9e040189a..1cd4696b5a1a 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastTrackFitter.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastTrackFitter.cxx @@ -26,7 +26,7 @@ TrigL2MuonSA::MuFastTrackFitter::MuFastTrackFitter(const std::string& type, AthAlgTool(type,name,parent), m_storeGateSvc( "StoreGateSvc", name ), m_use_mcLUT(true), - m_alignmentBarrelLUTSvc(0), + //m_alignmentBarrelLUTSvc(0), m_use_endcapInnerFromBarrel(false), m_sagittaRadiusEstimate("TrigL2MuonSA::SagittaRadiusEstimate"), m_alphaBetaEstimate("TrigL2MuonSA::AlphaBetaEstimate"), @@ -56,11 +56,7 @@ StatusCode TrigL2MuonSA::MuFastTrackFitter::initialize() } // Locate the StoreGateSvc - sc = m_storeGateSvc.retrieve(); - if (!sc.isSuccess()) { - ATH_MSG_ERROR("Could not find StoreGateSvc"); - return sc; - } + ATH_CHECK( m_storeGateSvc.retrieve() ); ATH_CHECK( m_sagittaRadiusEstimate.retrieve() ); ATH_CHECK( m_alphaBetaEstimate.retrieve() ); @@ -78,33 +74,39 @@ StatusCode TrigL2MuonSA::MuFastTrackFitter::setMCFlag(BooleanProperty use_mcLUT) { m_use_mcLUT = use_mcLUT; - StatusCode sc = StatusCode::SUCCESS; +// StatusCode sc = StatusCode::SUCCESS; if (m_use_mcLUT) { - sc = serviceLocator()->service("PtBarrelLUTSvc_MC", m_ptBarrelLUTSvc); + // Barrel + const ServiceHandle<PtBarrelLUTSvc> ptBarrelLUTSvc("PtBarrelLUTSvc_MC", name()); + ATH_CHECK( ptBarrelLUTSvc.retrieve() ); + // Endcap + const ServiceHandle<PtEndcapLUTSvc> ptEndcapLUTSvc("PtEndcapLUTSvc_MC", name()); + ATH_CHECK( ptEndcapLUTSvc.retrieve() ); + + m_alphaBetaEstimate->setMCFlag(m_use_mcLUT, &*ptEndcapLUTSvc); + + m_ptFromRadius->setMCFlag(m_use_mcLUT, &*ptBarrelLUTSvc); + + m_ptFromAlphaBeta->setMCFlag(m_use_mcLUT, &*ptEndcapLUTSvc); + } else{ - sc = serviceLocator()->service("PtBarrelLUTSvc", m_ptBarrelLUTSvc); - } - if (!sc.isSuccess()) { - ATH_MSG_ERROR("Could not find PtBarrelLUTSvc"); - return sc; - } - - if (m_use_mcLUT) { - sc = serviceLocator()->service("PtEndcapLUTSvc_MC", m_ptEndcapLUTSvc); - } else { - sc = serviceLocator()->service("PtEndcapLUTSvc", m_ptEndcapLUTSvc); - } - if (!sc.isSuccess()) { - ATH_MSG_ERROR("Could not find PtEndcapLUTSvc"); - return sc; - } + // Barrel + const ServiceHandle<PtBarrelLUTSvc> ptBarrelLUTSvc("PtBarrelLUTSvc", name()); + ATH_CHECK( ptBarrelLUTSvc.retrieve() ); + // Endcap + const ServiceHandle<PtEndcapLUTSvc> ptEndcapLUTSvc("PtEndcapLUTSvc", name()); + ATH_CHECK( ptEndcapLUTSvc.retrieve() ); + + m_alphaBetaEstimate->setMCFlag(m_use_mcLUT, &*ptEndcapLUTSvc); + + m_ptFromRadius->setMCFlag(m_use_mcLUT, &*ptBarrelLUTSvc); + + m_ptFromAlphaBeta->setMCFlag(m_use_mcLUT, &*ptEndcapLUTSvc); - sc = serviceLocator()->service("AlignmentBarrelLUTSvc", m_alignmentBarrelLUTSvc); - if (!sc.isSuccess()) { - ATH_MSG_ERROR("Could not find PtBarrelLUTSvc"); - return sc; } + ServiceHandle<AlignmentBarrelLUTSvc> alignmentBarrelLUTSvc("AlignmentBarrelLUTSvc", name()); + ATH_CHECK( alignmentBarrelLUTSvc.retrieve() ); // Calculation of sagitta and radius // sc = m_sagittaRadiusEstimate.retrieve(); @@ -114,7 +116,7 @@ StatusCode TrigL2MuonSA::MuFastTrackFitter::setMCFlag(BooleanProperty use_mcLUT) // } // ATH_MSG_DEBUG("Retrieved service " << m_sagittaRadiusEstimate); - m_sagittaRadiusEstimate->setMCFlag(m_use_mcLUT, m_alignmentBarrelLUTSvc); + m_sagittaRadiusEstimate->setMCFlag(m_use_mcLUT, &*alignmentBarrelLUTSvc); // Calculation of alpha and beta // sc = m_alphaBetaEstimate.retrieve(); @@ -124,7 +126,6 @@ StatusCode TrigL2MuonSA::MuFastTrackFitter::setMCFlag(BooleanProperty use_mcLUT) // } // ATH_MSG_DEBUG("Retrieved service " << m_alphaBetaEstimate); - m_alphaBetaEstimate->setMCFlag(m_use_mcLUT, m_ptEndcapLUTSvc); // conversion: radius -> pT // sc = m_ptFromRadius.retrieve(); @@ -134,7 +135,6 @@ StatusCode TrigL2MuonSA::MuFastTrackFitter::setMCFlag(BooleanProperty use_mcLUT) // } // ATH_MSG_DEBUG("Retrieved service " << m_ptFromRadius); - m_ptFromRadius->setMCFlag(m_use_mcLUT, m_ptBarrelLUTSvc); // conversion: alpha, beta -> pT // sc = m_ptFromAlphaBeta.retrieve(); @@ -144,7 +144,6 @@ StatusCode TrigL2MuonSA::MuFastTrackFitter::setMCFlag(BooleanProperty use_mcLUT) // } // ATH_MSG_DEBUG("Retrieved service " << m_ptFromAlphaBeta); - m_ptFromAlphaBeta->setMCFlag(m_use_mcLUT, m_ptEndcapLUTSvc); return StatusCode::SUCCESS; } diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/PtBarrelLUTSvc.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/PtBarrelLUTSvc.cxx index b9dae7c44cb2..bbec461efacf 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/PtBarrelLUTSvc.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/PtBarrelLUTSvc.cxx @@ -15,8 +15,6 @@ TrigL2MuonSA::PtBarrelLUTSvc::PtBarrelLUTSvc(const std::string& name,ISvcLocator AthService(name,sl), m_ptBarrelLUT("TrigL2MuonSA::PtBarrelLUT") { - declareProperty( "LUTfile", m_lut_fileName="pt_barrel.lut" ); - declareProperty( "SP_LUTfile", m_lutSP_fileName="pt_barrelSP_new.lut" ); } // -------------------------------------------------------------------------------- diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/PtEndcapLUTSvc.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/PtEndcapLUTSvc.cxx index 9b57ed06606b..5791a40a9c4f 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/PtEndcapLUTSvc.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/PtEndcapLUTSvc.cxx @@ -16,7 +16,6 @@ TrigL2MuonSA::PtEndcapLUTSvc::PtEndcapLUTSvc(const std::string& name, ISvcLocato AthService(name,sl), m_ptEndcapLUT("TrigL2MuonSA::PtEndcapLUT") { - declareProperty("FileNameRun2", m_lut_fileName="pt_endcap_run2.lut"); } // -------------------------------------------------------------------------------- diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/PtFromAlphaBeta.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/PtFromAlphaBeta.cxx index 48b6b8b0c2ed..f7d4e7aae199 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/PtFromAlphaBeta.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/PtFromAlphaBeta.cxx @@ -26,8 +26,6 @@ TrigL2MuonSA::PtFromAlphaBeta::PtFromAlphaBeta(const std::string& type, m_ptEndcapLUT(0) { declareInterface<TrigL2MuonSA::PtFromAlphaBeta>(this); - declareProperty("useCscPt", m_use_cscpt=false); - declareProperty("AvoidMisalignedCSCs", m_avoid_misaligned_cscs=true,"avoid using the 2 new chambers, whose alignment is not completed"); } // -------------------------------------------------------------------------------- diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx index db8e8bafe3ce..19e3766c28d4 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx @@ -24,7 +24,8 @@ TrigL2MuonSA::RpcRoadDefiner::RpcRoadDefiner(const std::string& type, AthAlgTool(type, name, parent), m_roadData(0), m_rWidth_RPC_Failed(0), m_use_rpc(true), - m_regionSelector(0), m_mdtIdHelper(0) + m_regionSelector(0), + m_mdtIdHelper(0) { declareInterface<TrigL2MuonSA::RpcRoadDefiner>(this); } -- GitLab From e6682ad398e45ac43a7d54875eac76618a2a0c07 Mon Sep 17 00:00:00 2001 From: Andrea Coccaro <andrea.coccaro@cern.ch> Date: Sat, 30 Jun 2018 18:28:25 +0000 Subject: [PATCH 296/562] Merge branch 'cherry-pick-d6117ac786 [formerly d60db658ab]-21.1' into '21.1' Sweeping !12270 from 21.0 to 21.1. Fix inconsistency in the setup in the no beam constraint mode observed in ATR-18342 See merge request atlas/athena!12417 (cherry picked from commit eedd54dbf0baafa3662a26676c3de447d3b09800 [formerly 152fcd94f5e3b7b252928b6271814f80e2a483c8]) e54bf837 Merge branch 'vertexing-wo-beamline' into '21.0' Former-commit-id: 98bf89c4331d84690a1e7acdbcfa0ba917dcbb41 --- .../python/InDetTrigConfigRecLoadToolsPost.py | 64 ++++++++----------- 1 file changed, 28 insertions(+), 36 deletions(-) diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsPost.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsPost.py index eb77debdb38b..aadc4da5705f 100644 --- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsPost.py +++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsPost.py @@ -135,45 +135,37 @@ if InDetTrigFlags.doNewTracking(): if (InDetTrigFlags.doPrintConfigurables()): print InDetTrigTrackZ0SortingTool - if (InDetTrigFlags.primaryVertexSetup() == 'DefaultFastFinding' or - InDetTrigFlags.primaryVertexSetup() == 'DefaultFullFinding' or - InDetTrigFlags.primaryVertexSetup() == 'DefaultKalmanFinding'): - #if (not InDetTrigFlags.useBeamConstraint()): - if False: - from TrkVertexSeedFinderUtils.TrkVertexSeedFinderUtilsConf import Trk__Trk2dDistanceSeeder - TrkTrig2dDistanceSeeder = Trk__Trk2dDistanceSeeder(name = "TrkTrig2dDistanceSeederFor2D", - #SolveAmbiguityUsingZ = False - ) - try: - TrkTrig2dDistanceSeeder.SolveAmbiguityUsingZ = False - except: - pass - - ToolSvc+=TrkTrig2dDistanceSeeder - if (InDetTrigFlags.doPrintConfigurables()): - print TrkTrig2dDistanceSeeder - # - from TrkVertexSeedFinderUtils.TrkVertexSeedFinderUtilsConf import Trk__Trk2DDistanceFinder - TrkTrig2DDistanceFinder = Trk__Trk2DDistanceFinder(name = "TrkTrig2DDistanceFinder", - Trk2dDistanceSeeder = TrkTrig2dDistanceSeeder) - - ToolSvc+=TrkTrig2DDistanceFinder - if (InDetTrigFlags.doPrintConfigurables()): - print TrkTrig2DDistanceFinder + if (not InDetTrigFlags.useBeamConstraint()): + from TrkVertexSeedFinderUtils.TrkVertexSeedFinderUtilsConf import Trk__Trk2dDistanceSeeder + TrkTrig2dDistanceSeeder = Trk__Trk2dDistanceSeeder(name = "TrkTrig2dDistanceSeederFor2D", + SolveAmbiguityUsingZ = False + ) - from TrkVertexSeedFinderTools.TrkVertexSeedFinderToolsConf import Trk__CrossDistancesSeedFinder - InDetTrig2DVtxSeedFinder = Trk__CrossDistancesSeedFinder(name = "InDetTrig2DCrossDistancesSeedFinder", - TrkDistanceFinder = TrkTrig2DDistanceFinder, - trackdistcutoff = 1., - trackdistexppower = 2, - useweights=True - #Mode1dFinder = # default, no setting needed - ) - ToolSvc+=InDetTrig2DVtxSeedFinder - if (InDetTrigFlags.doPrintConfigurables()): - print InDetTrig2DVtxSeedFinder + ToolSvc+=TrkTrig2dDistanceSeeder + if (InDetTrigFlags.doPrintConfigurables()): + print TrkTrig2dDistanceSeeder + # + from TrkVertexSeedFinderUtils.TrkVertexSeedFinderUtilsConf import Trk__Trk2DDistanceFinder + TrkTrig2DDistanceFinder = Trk__Trk2DDistanceFinder(name = "TrkTrig2DDistanceFinder", + Trk2dDistanceSeeder = TrkTrig2dDistanceSeeder) + + ToolSvc+=TrkTrig2DDistanceFinder + if (InDetTrigFlags.doPrintConfigurables()): + print TrkTrig2DDistanceFinder + + from TrkVertexSeedFinderTools.TrkVertexSeedFinderToolsConf import Trk__CrossDistancesSeedFinder + InDetTrig2DVtxSeedFinder = Trk__CrossDistancesSeedFinder(name = "InDetTrig2DCrossDistancesSeedFinder", + TrkDistanceFinder = TrkTrig2DDistanceFinder, + trackdistcutoff = 1., + trackdistexppower = 2, + useweights=True + #Mode1dFinder = # default, no setting needed + ) + ToolSvc+=InDetTrig2DVtxSeedFinder + if (InDetTrigFlags.doPrintConfigurables()): + print InDetTrig2DVtxSeedFinder if InDetTrigFlags.vertexSeedFinder() == 'SlidingWindowMultiSeedFinder': #now setup new stuff -- GitLab From 0e9fa174017f705c4db22db54f8b2330a952f431 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Sun, 1 Jul 2018 17:45:33 +0200 Subject: [PATCH 297/562] Fix uninitialized variable. Former-commit-id: a00aaaf2d0d012f865f8f317274bdc1b0be14212 --- Control/AthenaServices/src/DelayedConditionsCleanerSvc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Control/AthenaServices/src/DelayedConditionsCleanerSvc.h b/Control/AthenaServices/src/DelayedConditionsCleanerSvc.h index 86c8ae92635e..b6b648279b51 100644 --- a/Control/AthenaServices/src/DelayedConditionsCleanerSvc.h +++ b/Control/AthenaServices/src/DelayedConditionsCleanerSvc.h @@ -243,7 +243,7 @@ private: /// Number of active asynchronous cleaning tasks. - std::atomic<int> m_cleanTasks; + std::atomic<int> m_cleanTasks {0}; /// Component properties. std::unique_ptr<DelayedConditionsCleanerSvcProps> m_props; -- GitLab From 9591125175722a10ba8d8e05aaedc4a76285a746 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Thu, 28 Jun 2018 11:11:14 +0200 Subject: [PATCH 298/562] AthAllocators: Fix memory leak when context argument is supplied in serial job. There are two versions of ArenaHeader::allocator, one taking an EventContext argument and one not. The one without a context was first checking for an arena set via the thread-specific pointer m_arena, and if that's not set, using m_defaultArena. The version that takes an EventContext was first trying to look up an arena using the event slot, and if that fails, using m_defaultArena. The problem comes if you supply the EventContext argument in a non-MT job. Since it's not MT, we won't have slots set up, so we use m_defaultArena. However, this is usually not correct --- we need to use the version set through the thread-specific pointer, which will be pointing at the arena in the event store. The default arena will never be cleared by default --- so things will appear to work, but you'll have a big memory leak. Fixed logic to properly check the thread-specific pointer if the lookup by slot doesn't work. Former-commit-id: 49a52825d77c850ff6533314e302e992bbde4308 --- Control/AthAllocators/AthAllocators/ArenaHeader.icc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Control/AthAllocators/AthAllocators/ArenaHeader.icc b/Control/AthAllocators/AthAllocators/ArenaHeader.icc index 17099f7a263f..47f5912ff042 100644 --- a/Control/AthAllocators/AthAllocators/ArenaHeader.icc +++ b/Control/AthAllocators/AthAllocators/ArenaHeader.icc @@ -51,7 +51,7 @@ LockedAllocator ArenaHeader::allocator (const EventContext& ctx, size_t i) } } } - return m_defaultArena.allocator (i); + return allocator (i); } -- GitLab From 3732086db44d5272359482b665d75bd3888d200d Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Sat, 30 Jun 2018 10:32:10 +0200 Subject: [PATCH 299/562] StoreGate: Fixing issues identified by thread-safety checker. Fix many of the issues identified by the thread-safety static checker (const-correctness and the use of shared data). A few still remain to be resolved. Former-commit-id: c9b69a8dde1d877a621354d97611efc8a8049dd1 --- Control/StoreGate/CMakeLists.txt | 4 ++-- Control/StoreGate/StoreGate/CondHandleKey.h | 7 +++++- Control/StoreGate/StoreGate/SegMemSvc.h | 2 -- Control/StoreGate/StoreGate/SegMemSvc.icc | 12 +++++----- .../StoreGate/StoreClearedIncident.h | 2 +- Control/StoreGate/StoreGate/StoreGateSvc.h | 6 +++-- Control/StoreGate/StoreGate/UpdateHandle.h | 2 +- Control/StoreGate/StoreGate/UpdateHandle.icc | 2 +- Control/StoreGate/StoreGate/VarHandleBase.h | 7 ++++-- .../StoreGate/StoreGate/VarHandleKeyArray.icc | 14 +++++++---- Control/StoreGate/StoreGate/WriteHandle.h | 10 ++++---- Control/StoreGate/StoreGate/WriteHandle.icc | 12 +++++----- Control/StoreGate/src/SegMemSvc.cxx | 23 +++++++------------ .../StoreGate/src/StoreClearedIncident.cxx | 2 +- Control/StoreGate/src/VarHandleKey.cxx | 2 +- .../StoreGate/src/VarHandleKeyProperty.cxx | 6 ++--- Control/StoreGate/test/SGtests.cxx | 6 +++-- Control/StoreGate/test/VarHandles_test.cxx | 8 +++---- Control/StoreGate/test/WriteHandle_test.cxx | 7 +++--- 19 files changed, 71 insertions(+), 63 deletions(-) diff --git a/Control/StoreGate/CMakeLists.txt b/Control/StoreGate/CMakeLists.txt index 31f3f7166223..62c77bf918c7 100644 --- a/Control/StoreGate/CMakeLists.txt +++ b/Control/StoreGate/CMakeLists.txt @@ -14,11 +14,11 @@ atlas_depends_on_subdirs( Control/AthContainers Control/AthenaKernel Control/SGTools + Control/CxxUtils Database/PersistentDataModel GaudiKernel PRIVATE - AtlasTest/TestTools - Control/CxxUtils ) + AtlasTest/TestTools ) # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) diff --git a/Control/StoreGate/StoreGate/CondHandleKey.h b/Control/StoreGate/StoreGate/CondHandleKey.h index f0ff4001d49f..c5ba0717e487 100644 --- a/Control/StoreGate/StoreGate/CondHandleKey.h +++ b/Control/StoreGate/StoreGate/CondHandleKey.h @@ -8,6 +8,7 @@ #include "AthenaKernel/CondCont.h" #include "StoreGate/VarHandleKey.h" #include "StoreGate/StoreGateSvc.h" +#include "CxxUtils/checker_macros.h" #include "GaudiKernel/ServiceHandle.h" #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/IClassIDSvc.h" @@ -43,7 +44,11 @@ namespace SG { protected: bool isInit() const { return m_isInit; } - CondCont<T>* getCC() const { return m_cc; } + // Deliberately returning a non-const pointer here from a const + // member function. We don't own the CondCont, we just reference it. + // The Handle<> classes need to get a non-const CondCont from a + // const HandleKey<>. + CondCont<T>* getCC ATLAS_NOT_CONST_THREAD_SAFE () const { return m_cc; } StoreGateSvc* getCS() const; diff --git a/Control/StoreGate/StoreGate/SegMemSvc.h b/Control/StoreGate/StoreGate/SegMemSvc.h index c2c5711484ca..1f2f49082254 100644 --- a/Control/StoreGate/StoreGate/SegMemSvc.h +++ b/Control/StoreGate/StoreGate/SegMemSvc.h @@ -85,8 +85,6 @@ private: ServiceHandle<IIncidentSvc> p_incSvc; - mutable MsgStream m_log; - /// helper to for printout inline std::string cvt(SegMemSvc::LIFETIME life) { switch (life) { diff --git a/Control/StoreGate/StoreGate/SegMemSvc.icc b/Control/StoreGate/StoreGate/SegMemSvc.icc index ce3e6cca734e..b67e9e1467a4 100644 --- a/Control/StoreGate/StoreGate/SegMemSvc.icc +++ b/Control/StoreGate/StoreGate/SegMemSvc.icc @@ -34,10 +34,10 @@ SegMemSvc::allocate(SegMemSvc::LIFETIME life, bool cache) { } } - if (m_log.level() <= MSG::DEBUG) { - m_log << MSG::DEBUG << "allocating object size " << sizeof(T) - << " with lifetime/cache " << cvt(life) << "/" << cache << " at " - << ptr << endmsg; + if (msgStream().level() <= MSG::DEBUG) { + debug() << "allocating object size " << sizeof(T) + << " with lifetime/cache " << cvt(life) << "/" << cache << " at " + << ptr << endmsg; } @@ -51,8 +51,8 @@ template <typename T> bool SegMemSvc::del(T* ptr) { - if (m_log.level() <= MSG::DEBUG) { - m_log << MSG::DEBUG << "deleting object at " << ptr << endmsg; + if (msgStream().level() <= MSG::DEBUG) { + debug() << "deleting object at " << ptr << endmsg; } diff --git a/Control/StoreGate/StoreGate/StoreClearedIncident.h b/Control/StoreGate/StoreGate/StoreClearedIncident.h index d3e1d67cab45..0d9f826ecdd4 100644 --- a/Control/StoreGate/StoreGate/StoreClearedIncident.h +++ b/Control/StoreGate/StoreGate/StoreClearedIncident.h @@ -40,7 +40,7 @@ public: const std::string& type = "StoreCleared"); /// Return the store that was cleared. - StoreGateSvc* store() const; + const StoreGateSvc* store() const; private: diff --git a/Control/StoreGate/StoreGate/StoreGateSvc.h b/Control/StoreGate/StoreGate/StoreGateSvc.h index 97402be24fa2..385725068762 100644 --- a/Control/StoreGate/StoreGate/StoreGateSvc.h +++ b/Control/StoreGate/StoreGate/StoreGateSvc.h @@ -59,6 +59,7 @@ #include "StoreGate/SGWPtr.h" #include "SGTools/DataStore.h" #include "StoreGate/SGObjectWithVersion.h" +#include "CxxUtils/checker_macros.h" #include "GaudiKernel/ServiceHandle.h" #include "GaudiKernel/IIncidentListener.h" @@ -1016,8 +1017,9 @@ private: /// Remember calls to retrieve and record for a MT store, so we can /// warn about them during finalize(). - mutable BadItemList m_badRetrieves; - mutable BadItemList m_badRecords; + // Thread-safe, since they're protected by m_badMutex. + mutable BadItemList m_badRetrieves ATLAS_THREAD_SAFE; + mutable BadItemList m_badRecords ATLAS_THREAD_SAFE; /// Protect access to m_bad* members. typedef std::mutex mutex_t; diff --git a/Control/StoreGate/StoreGate/UpdateHandle.h b/Control/StoreGate/StoreGate/UpdateHandle.h index c06a74692a17..8b5245fe07a3 100644 --- a/Control/StoreGate/StoreGate/UpdateHandle.h +++ b/Control/StoreGate/StoreGate/UpdateHandle.h @@ -220,7 +220,7 @@ namespace SG { /** * @brief Return the cached pointer directly; no lookup. */ - pointer_type cachedPtr() const; + pointer_type cachedPtr(); /** diff --git a/Control/StoreGate/StoreGate/UpdateHandle.icc b/Control/StoreGate/StoreGate/UpdateHandle.icc index 81e7c333e45c..dde658ed11f4 100644 --- a/Control/StoreGate/StoreGate/UpdateHandle.icc +++ b/Control/StoreGate/StoreGate/UpdateHandle.icc @@ -217,7 +217,7 @@ UpdateHandle<T>::ptr() template <class T> inline typename UpdateHandle<T>::pointer_type -UpdateHandle<T>::cachedPtr() const +UpdateHandle<T>::cachedPtr() { return reinterpret_cast<pointer_type>(this->m_ptr); } diff --git a/Control/StoreGate/StoreGate/VarHandleBase.h b/Control/StoreGate/StoreGate/VarHandleBase.h index 27ad0a657a23..f24314c62ebf 100644 --- a/Control/StoreGate/StoreGate/VarHandleBase.h +++ b/Control/StoreGate/StoreGate/VarHandleBase.h @@ -35,8 +35,11 @@ #include "SGTools/StlVectorClids.h" #include "SGTools/StlMapClids.h" +namespace SGTest { + class TestStore; +} namespace Athena_test { - void varHandleTest(void); + void varHandleTest(SGTest::TestStore&); void resetableTest(void); void refCountTest(void); } @@ -85,7 +88,7 @@ namespace SG { class VarHandleBase : public IResetable { // For testing. - friend void Athena_test::varHandleTest(void); + friend void Athena_test::varHandleTest(SGTest::TestStore&); friend void Athena_test::resetableTest(void); friend void Athena_test::refCountTest(void); friend std::ostream& operator<<( std::ostream&, const VarHandleBase&); diff --git a/Control/StoreGate/StoreGate/VarHandleKeyArray.icc b/Control/StoreGate/StoreGate/VarHandleKeyArray.icc index f8bcad9a0745..79a471508fb1 100644 --- a/Control/StoreGate/StoreGate/VarHandleKeyArray.icc +++ b/Control/StoreGate/StoreGate/VarHandleKeyArray.icc @@ -2,6 +2,10 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ + +#include "CxxUtils/checker_macros.h" + + namespace SG { // // Forward the initialization to the member VarHandleKeys @@ -67,11 +71,11 @@ namespace SG { inline std::vector<SG::VarHandleKey*> VarHandleKeyArrayCommon<Base>::keys() const { std::vector<SG::VarHandleKey*> keys; - typename std::vector<Base>::const_iterator itr; - for (itr = this->begin(); itr != this->end(); ++itr) { - SG::VarHandleKey* vk = - const_cast<SG::VarHandleKey*>( (const SG::VarHandleKey*) &(*itr) ); - keys.push_back( vk ); + for (const SG::VarHandleKey& k : *this) { + // FIXME: This is a rule violation, but we can't really fix it without + // changing the IDataHandleHolder base class from Gaudi. + SG::VarHandleKey* k_nc ATLAS_THREAD_SAFE = const_cast<SG::VarHandleKey*>(&k); + keys.push_back (k_nc); } return keys; } diff --git a/Control/StoreGate/StoreGate/WriteHandle.h b/Control/StoreGate/StoreGate/WriteHandle.h index 57c941754cbe..a6c3c73d512b 100644 --- a/Control/StoreGate/StoreGate/WriteHandle.h +++ b/Control/StoreGate/StoreGate/WriteHandle.h @@ -168,14 +168,14 @@ public: * @brief Dereference the pointer. * Returns the cached pointer. Throws ExcNullWriteHandle if null. */ - pointer_type operator->() const; + pointer_type operator->(); /** * @brief Dereference the pointer. * Returns the cached pointer. Throws ExcNullWriteHandle if null. */ - reference_type operator*() const; + reference_type operator*(); /** @@ -189,13 +189,13 @@ public: * @brief Dereference the pointer. * Returns the cached pointer. */ - pointer_type ptr() const; + pointer_type ptr(); /** * @brief Return the cached pointer directly; no lookup. */ - pointer_type cachedPtr() const; + pointer_type cachedPtr(); /** @@ -531,7 +531,7 @@ private: * * If it is null, throw ExcNullWriteHandle. */ - pointer_type checkedCachedPtr() const; + pointer_type checkedCachedPtr(); /** diff --git a/Control/StoreGate/StoreGate/WriteHandle.icc b/Control/StoreGate/StoreGate/WriteHandle.icc index ccb3d5c5b604..5d79ff5d75f8 100644 --- a/Control/StoreGate/StoreGate/WriteHandle.icc +++ b/Control/StoreGate/StoreGate/WriteHandle.icc @@ -171,7 +171,7 @@ WriteHandle<T>::~WriteHandle() template <class T> inline typename WriteHandle<T>::pointer_type -WriteHandle<T>::operator->() const +WriteHandle<T>::operator->() { return WriteHandle<T>::checkedCachedPtr(); } @@ -184,7 +184,7 @@ WriteHandle<T>::operator->() const template <class T> inline typename WriteHandle<T>::reference_type -WriteHandle<T>::operator*() const +WriteHandle<T>::operator*() { return *WriteHandle<T>::checkedCachedPtr(); } @@ -199,7 +199,7 @@ inline typename WriteHandle<T>::const_pointer_type WriteHandle<T>::cptr() const { - return cachedPtr(); + return reinterpret_cast<pointer_type>(this->m_ptr); } @@ -210,7 +210,7 @@ WriteHandle<T>::cptr() const template <class T> inline typename WriteHandle<T>::pointer_type -WriteHandle<T>::ptr() const +WriteHandle<T>::ptr() { return cachedPtr(); } @@ -222,7 +222,7 @@ WriteHandle<T>::ptr() const template <class T> inline typename WriteHandle<T>::pointer_type -WriteHandle<T>::cachedPtr() const +WriteHandle<T>::cachedPtr() { return reinterpret_cast<pointer_type>(this->m_ptr); } @@ -692,7 +692,7 @@ StatusCode WriteHandle<T>::symLink (const WriteHandleKey<U>& other) */ template <class T> typename WriteHandle<T>::pointer_type -WriteHandle<T>::checkedCachedPtr() const +WriteHandle<T>::checkedCachedPtr() { if (!m_ptr) throwExcNullWriteHandle (clid(), key(), store()); diff --git a/Control/StoreGate/src/SegMemSvc.cxx b/Control/StoreGate/src/SegMemSvc.cxx index ad4c99b57d68..2420260805a9 100644 --- a/Control/StoreGate/src/SegMemSvc.cxx +++ b/Control/StoreGate/src/SegMemSvc.cxx @@ -18,7 +18,6 @@ using namespace std; SegMemSvc::SegMemSvc( const std::string& name, ISvcLocator* svc ) : Service( name, svc ), p_incSvc("IncidentSvc",name), - m_log(msgSvc(), name), m_arena_job("sms_job",&m_ahead_job), m_arena_evt("sms_evt",&m_ahead_evt), m_arena_inc("sms_inc",&m_ahead_inc) @@ -94,30 +93,24 @@ void SegMemSvc::handle(const Incident& inc) { if (inc.type() == "EndEvent") { - if (m_log.level() <= MSG::DEBUG) { - m_log << MSG::DEBUG << "Running report for " << m_arena_evt.name() - << std::endl; + if (msgStream().level() <= MSG::DEBUG) { std::ostringstream ost; m_ahead_evt.report(ost); - m_log << MSG::DEBUG << ost.str() << endmsg; - // m_log << MSG::DEBUG << "header: " << m_ahead.reportStr() << endmsg; - + debug() << "Running report for " << m_arena_evt.name() + << ost.str() << endmsg; } - m_log << MSG::DEBUG << "freeing all memory allocated for Event" - << endmsg; + debug() << "freeing all memory allocated for Event" << endmsg; m_arena_evt.reset(); m_ahead_evt.reset(); } else if ( inc.type() == "DefragMemory") { - if (m_log.level() <= MSG::DEBUG) { - m_log << MSG::DEBUG << "defragmenting memory" - << endmsg; + if (msgStream().level() <= MSG::DEBUG) { + debug() << "defragmenting memory" << endmsg; } - m_log << MSG::DEBUG << "freeing all memory allocated associated with " - << "DefragMemory incident" - << endmsg; + debug() << "freeing all memory allocated associated with " + << "DefragMemory incident" << endmsg; m_arena_inc.reset(); m_ahead_inc.reset(); } diff --git a/Control/StoreGate/src/StoreClearedIncident.cxx b/Control/StoreGate/src/StoreClearedIncident.cxx index 0e1acca22521..770539967dbb 100644 --- a/Control/StoreGate/src/StoreClearedIncident.cxx +++ b/Control/StoreGate/src/StoreClearedIncident.cxx @@ -30,7 +30,7 @@ StoreClearedIncident::StoreClearedIncident (StoreGateSvc* sg, /// Return the store that was cleared. -StoreGateSvc* StoreClearedIncident::store() const +const StoreGateSvc* StoreClearedIncident::store() const { return m_sg; } diff --git a/Control/StoreGate/src/VarHandleKey.cxx b/Control/StoreGate/src/VarHandleKey.cxx index 18e8a6564ef2..d2e77807a590 100644 --- a/Control/StoreGate/src/VarHandleKey.cxx +++ b/Control/StoreGate/src/VarHandleKey.cxx @@ -20,7 +20,7 @@ #include "StoreGate/StoreGateSvc.h" -static const char* storeSeparator = "+"; +static const char* const storeSeparator = "+"; namespace SG { diff --git a/Control/StoreGate/src/VarHandleKeyProperty.cxx b/Control/StoreGate/src/VarHandleKeyProperty.cxx index 52685c08438b..caaace59a506 100644 --- a/Control/StoreGate/src/VarHandleKeyProperty.cxx +++ b/Control/StoreGate/src/VarHandleKeyProperty.cxx @@ -4,10 +4,10 @@ // $Id$ /** - * @file VarHandleKeyProperty.cxx + * @file StoreGate/src/VarHandleKeyProperty.cxx * @author scott snyder <snyder@bnl.gov> * @date Jan, 2016 - * @brief + * @brief Handle Gaudi property setting for VarHandleKey. */ // STL includes @@ -18,7 +18,7 @@ // StoreGate includes #include "StoreGate/VarHandleKeyProperty.h" -static const char* storeSeparator = "+"; +static const char* const storeSeparator = "+"; namespace Gaudi { namespace Parsers { diff --git a/Control/StoreGate/test/SGtests.cxx b/Control/StoreGate/test/SGtests.cxx index 19852b057087..8be47bdf54ee 100644 --- a/Control/StoreGate/test/SGtests.cxx +++ b/Control/StoreGate/test/SGtests.cxx @@ -17,6 +17,7 @@ #include <cassert> #include <iostream> #include <stdexcept> +#include <atomic> #include <boost/config.hpp> @@ -37,6 +38,7 @@ #include "AthenaKernel/IProxyProviderSvc.h" #include "GaudiKernel/IConversionSvc.h" #include "GaudiKernel/IOpaqueAddress.h" +#include "CxxUtils/checker_macros.h" using namespace std; using namespace SG; @@ -47,7 +49,7 @@ using std::make_unique; class Base {}; class Foo : public Base { public: - static std::vector<int> dtor_log; + static std::vector<int> dtor_log ATLAS_THREAD_SAFE; Foo() : m_i(0) {} Foo(int i) : m_i(i) {} int i() const { return m_i; } @@ -77,7 +79,7 @@ private: }; //----------------------------------- -static int b1_dtor = 0; +static std::atomic<int> b1_dtor { 0 }; struct B1 { B1() : b(0){} virtual ~B1() { ++b1_dtor; } int b; }; struct D1 : virtual public B1 { int d; }; CLASS_DEF(B1, 8111, 1) diff --git a/Control/StoreGate/test/VarHandles_test.cxx b/Control/StoreGate/test/VarHandles_test.cxx index 7d3ab2b1b7dc..48110f1d2b5f 100644 --- a/Control/StoreGate/test/VarHandles_test.cxx +++ b/Control/StoreGate/test/VarHandles_test.cxx @@ -55,7 +55,7 @@ namespace Athena_test { return in; } - void varHandleTest() { + void varHandleTest (SGTest::TestStore& store) { //empty handles ReadHandle<MyDataObj> empty; ReadHandle<MyDataObj> copy(empty); @@ -101,7 +101,7 @@ namespace Athena_test { WriteHandle<MyDataObj> hMy ("hMy"); assert(!hMy.isInitialized()); assert(hMy.cachedPtr() == nullptr); - hMy.setProxyDict (&SGTest::store); + hMy.setProxyDict (&store); hMy = std::make_unique<MyDataObj>(4); //assert(hMy.setState(pMyProxy).isSuccess()); assert(hMy.isInitialized()); @@ -304,11 +304,11 @@ using namespace Athena_test; //#include "Reflex/PluginService.h" int main() { - SGTest::initTestStore(); + std::unique_ptr<SGTest::TestStore> store = SGTest::getTestStore(); ISvcLocator* pDum; initGaudi(pDum); //need MessageSvc cout << "*** VarHandles_test starts ***" <<endl; - varHandleTest(); + varHandleTest(*store); resetableTest(); refCountTest(); cout << "*** VarHandles_test OK ***" <<endl; diff --git a/Control/StoreGate/test/WriteHandle_test.cxx b/Control/StoreGate/test/WriteHandle_test.cxx index 2b2c2bb0d7ee..7de7d10b3789 100644 --- a/Control/StoreGate/test/WriteHandle_test.cxx +++ b/Control/StoreGate/test/WriteHandle_test.cxx @@ -27,6 +27,7 @@ #include "AthenaKernel/errorcheck.h" #include "AthenaKernel/ExtendedEventContext.h" #include "CxxUtils/unused.h" +#include "CxxUtils/checker_macros.h" #include <cassert> #include <iostream> @@ -50,7 +51,7 @@ public: virtual size_t size() const override { return 0; } virtual void lockDecoration (SG::auxid_t) override { std::abort(); } - static std::vector<int> deleted; + static std::vector<int> deleted ATLAS_THREAD_SAFE; }; std::vector<int> MyObjAux::deleted; CLASS_DEF (MyObjAux, 293847296, 1) @@ -65,7 +66,7 @@ public: int x; MyObjAux* aux {nullptr}; - static std::vector<int> deleted; + static std::vector<int> deleted ATLAS_THREAD_SAFE; }; std::vector<int> MyObj::deleted; CLASS_DEF (MyObj, 293847295, 1) @@ -85,7 +86,7 @@ public: ~MyDObj() { deleted.push_back (x); } int x; - static std::vector<int> deleted; + static std::vector<int> deleted ATLAS_THREAD_SAFE; }; std::vector<int> MyDObj::deleted; CLASS_DEF (MyDObj, 293847297, 1) -- GitLab From df7f187cb49273593109ed5781152c6e11d51c51 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Fri, 29 Jun 2018 10:33:21 +0200 Subject: [PATCH 300/562] FPTracker: Fix clang warnings. clang warnings: unused private data members. Former-commit-id: 0ce15a6541acf435e3396c90b96837d57fb2e709 --- ForwardDetectors/FPTracker/src/Beamline.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ForwardDetectors/FPTracker/src/Beamline.cxx b/ForwardDetectors/FPTracker/src/Beamline.cxx index 12ffc35774c6..c45784b267ab 100644 --- a/ForwardDetectors/FPTracker/src/Beamline.cxx +++ b/ForwardDetectors/FPTracker/src/Beamline.cxx @@ -73,7 +73,7 @@ namespace FPTracker{ class ParticleTracker{ public: - ParticleTracker(IParticle& particle):m_particle(particle), m_element(0){ + ParticleTracker(IParticle& particle):m_particle(particle) { } bool operator()(const IBeamElement::ConstPtr_t& be){ @@ -89,7 +89,6 @@ namespace FPTracker{ } private: IParticle& m_particle; - int m_element; }; @@ -111,7 +110,7 @@ namespace FPTracker{ class Calibrator{ public: - Calibrator(IParticle& particle):m_particle(particle), m_element(0) + Calibrator(IParticle& particle):m_particle(particle) { } @@ -122,7 +121,6 @@ namespace FPTracker{ } private: IParticle& m_particle; - int m_element; }; -- GitLab From e4e269b131556f025127754e96fcd2f30d5bde62 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Fri, 29 Jun 2018 10:35:01 +0200 Subject: [PATCH 301/562] MdtCalibIOSvc: Remove useless INFO printout. Remove useless INFO printout from MdtCalibInputSvc::queryInterface. Former-commit-id: e10bc334eec7db6d841cfe12a400e536b74564f2 --- .../MuonCalibStandAlone/MdtCalibIOSvc/src/MdtCalibInputSvc.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MdtCalibIOSvc/src/MdtCalibInputSvc.cxx b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MdtCalibIOSvc/src/MdtCalibInputSvc.cxx index 60a9c5013f92..8fadc6946629 100644 --- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MdtCalibIOSvc/src/MdtCalibInputSvc.cxx +++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MdtCalibIOSvc/src/MdtCalibInputSvc.cxx @@ -64,7 +64,6 @@ StatusCode MdtCalibInputSvc::finalize(void) { } StatusCode MdtCalibInputSvc::queryInterface(const InterfaceID &riid, void **ppvUnknown) { - ATH_MSG_INFO( "StatusCode MdtCalibInputSvc::queryInterface" ); if (IID_IMdtCalibInputSvc.versionMatch(riid)) { *ppvUnknown = (MdtCalibInputSvc *)this; -- GitLab From fb81845eff324a11bb01f5ac0184cc1743c417b6 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Fri, 29 Jun 2018 10:44:01 +0200 Subject: [PATCH 302/562] CaloCalibHitRec: Fix clang warning. clang warning: unused variable. Former-commit-id: e893dd5c6f1096e1d378d08f7c9d4f9a2c52f3e0 --- .../CaloCalibHitRec/src/CaloCalibClusterMomentsMaker2.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterMomentsMaker2.cxx b/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterMomentsMaker2.cxx index a8f19ace087c..6dae113cab77 100644 --- a/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterMomentsMaker2.cxx +++ b/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterMomentsMaker2.cxx @@ -303,7 +303,6 @@ CaloCalibClusterMomentsMaker2::execute(const EventContext& /*ctx*/, bool foundAllContainers (true); const DataHandle<CaloCalibrationHitContainer> cchc; std::vector<const CaloCalibrationHitContainer *> v_cchc; - std::vector<std::string>::iterator iter; for (const std::string& cname : m_CalibrationHitContainerNames) { if ( !evtStore()->contains<CaloCalibrationHitContainer>(cname)) { if (m_foundAllContainers) { -- GitLab From 298970f762bd1b8a50372811a45454900bc2bb5d Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Fri, 29 Jun 2018 10:54:33 +0200 Subject: [PATCH 303/562] CaloJiveXML: Fix clang warning. clang warning: unused variable. Former-commit-id: 5f9af51d33ea23c7def5ddfde83b2d0b0d7878cf --- Calorimeter/CaloCnv/CaloJiveXML/src/CaloClusterRetriever.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloClusterRetriever.cxx b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloClusterRetriever.cxx index 6fca962cc294..9e29cfb5a6d4 100755 --- a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloClusterRetriever.cxx +++ b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloClusterRetriever.cxx @@ -89,7 +89,7 @@ namespace JiveXML { } }else { //obtain all collections with keys provided by user: m_otherKeys - std::vector<std::string>::const_iterator keyIter,endIter; + std::vector<std::string>::const_iterator keyIter; for ( keyIter=m_otherKeys.begin(); keyIter!=m_otherKeys.end(); ++keyIter ){ if ( evtStore()->contains<CaloClusterContainer>(*keyIter) ){ // to avoid some SG dumps if ( !evtStore()->retrieve( ccc, (*keyIter) ).isFailure()) { -- GitLab From 9f09999927ef36595996a81330c55af7664fe9a7 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Sat, 30 Jun 2018 10:31:07 +0200 Subject: [PATCH 304/562] MuonRecExample: Don't crash if CMTCONFIG isn't defined.. Trying to fix an occasional crash in the release tests. Former-commit-id: 8a86d10f98515ad8d6c76ce6752f2bb55fbd202a --- .../MuonRecExample/python/MuonRecStandaloneOnlySetup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecStandaloneOnlySetup.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecStandaloneOnlySetup.py index 88ce9f2a9804..f276a3ff0083 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecStandaloneOnlySetup.py +++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecStandaloneOnlySetup.py @@ -21,7 +21,7 @@ athenaCommonFlags.RuntimeStrictness = "abort" #-------------------------------------------------------------- # Set default recFlags #-------------------------------------------------------------- -if os.environ['CMTCONFIG'].endswith('-dbg'): +if os.environ.get('CMTCONFIG','').endswith('-dbg'): recFlags.doEdmMonitor = True recFlags.doNameAuditor = True else: -- GitLab From ca76f0cb690c0a0f2f7e6c6595eb3621b66dfac6 Mon Sep 17 00:00:00 2001 From: Shota Hayashida <hayashida@hepl.phys.nagoya-u.ac.jp> Date: Mon, 2 Jul 2018 12:32:50 +0200 Subject: [PATCH 305/562] Update to Service/Tool handle Former-commit-id: eeb388dcf9acf0186d7fbcc4d6d5281b9c7495f1 --- .../TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h | 7 ++++--- .../TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h | 6 +++--- .../TrigL2MuonSA/src/MuFastDataPreparator.cxx | 4 ++-- Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx | 5 +++-- Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcRoadDefiner.cxx | 5 +++-- 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h index ce054210262f..f404db27e42d 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h @@ -57,7 +57,9 @@ class RpcRoadDefiner: public AthAlgTool double roiEtaMinHigh, double roiEtaMaxHigh); - void setMdtGeometry(IRegSelSvc* regionSelector, const MdtIdHelper* mdtIdHelper); + //void setMdtGeometry(IRegSelSvc* regionSelector, const MdtIdHelper* mdtIdHelper); + void setMdtGeometry( const ServiceHandle<IRegSelSvc>& regionSelector, + const MdtIdHelper* mdtIdHelper); void setRoadWidthForFailure(double rWidth_RPC_Failed); void setRpcGeometry(bool use_rpc); @@ -71,8 +73,7 @@ class RpcRoadDefiner: public AthAlgTool double m_rWidth_RPC_Failed; bool m_use_rpc; - IRegSelSvc* m_regionSelector; - //ServiceHandle<IRegSelSvc> m_regionSelector; + ServiceHandle<IRegSelSvc> m_regionSelector; const MdtIdHelper* m_mdtIdHelper; }; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h index 980747dff701..8a99a38eb849 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h @@ -51,7 +51,8 @@ class TgcRoadDefiner: public AthAlgTool TrigL2MuonSA::MuonRoad& muonRoad, TrigL2MuonSA::TgcFitResult& tgcFitResult); - void setMdtGeometry(IRegSelSvc* regionSelector, const MdtIdHelper* mdtIdHelper); + void setMdtGeometry(const ServiceHandle<IRegSelSvc>& regionSelector, + const MdtIdHelper* mdtIdHelper); void setPtLUT(const TrigL2MuonSA::PtEndcapLUTSvc* ptEndcapLUTSvc); void setRoadWidthForFailure(double rWidth_TGC_Failed); void setExtrapolatorTool(ToolHandle<ITrigMuonBackExtrapolator>* backExtrapolator); @@ -71,8 +72,7 @@ class TgcRoadDefiner: public AthAlgTool double m_rWidth_TGC_Failed; - IRegSelSvc* m_regionSelector; - //ServiceHandle<IRegSelSvc> m_regionSelector; + ServiceHandle<IRegSelSvc> m_regionSelector; const MdtIdHelper* m_mdtIdHelper; }; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx index 4ed908e04404..46f81c5c37d3 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx @@ -106,8 +106,8 @@ StatusCode TrigL2MuonSA::MuFastDataPreparator::initialize() ATH_MSG_DEBUG("Retrieved service " << m_rpcPatFinder); // set the geometry tools - m_rpcRoadDefiner->setMdtGeometry(&*m_regionSelector,m_mdtIdHelper); - m_tgcRoadDefiner->setMdtGeometry(&*m_regionSelector,m_mdtIdHelper); + m_rpcRoadDefiner->setMdtGeometry(m_regionSelector,m_mdtIdHelper); + m_tgcRoadDefiner->setMdtGeometry(m_regionSelector,m_mdtIdHelper); // return StatusCode::SUCCESS; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx index 19e3766c28d4..360393a67548 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx @@ -24,7 +24,7 @@ TrigL2MuonSA::RpcRoadDefiner::RpcRoadDefiner(const std::string& type, AthAlgTool(type, name, parent), m_roadData(0), m_rWidth_RPC_Failed(0), m_use_rpc(true), - m_regionSelector(0), + m_regionSelector( "RegSelSvc", name ), m_mdtIdHelper(0) { declareInterface<TrigL2MuonSA::RpcRoadDefiner>(this); @@ -77,7 +77,8 @@ void TrigL2MuonSA::RpcRoadDefiner::setRpcGeometry(bool use_rpc) // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- -void TrigL2MuonSA::RpcRoadDefiner::setMdtGeometry(IRegSelSvc* regionSelector, const MdtIdHelper* mdtIdHelper) +void TrigL2MuonSA::RpcRoadDefiner::setMdtGeometry( const ServiceHandle<IRegSelSvc>& regionSelector, + const MdtIdHelper* mdtIdHelper) { m_regionSelector = regionSelector; m_mdtIdHelper = mdtIdHelper; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcRoadDefiner.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcRoadDefiner.cxx index 62d697544a06..291a94f7d4c2 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcRoadDefiner.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcRoadDefiner.cxx @@ -32,7 +32,7 @@ TrigL2MuonSA::TgcRoadDefiner::TgcRoadDefiner(const std::string& type, m_ptEndcapLUT(0), m_tgcFit("TrigL2MuonSA::TgcFit"), m_rWidth_TGC_Failed(0), - m_regionSelector(0), + m_regionSelector( "RegSelSvc", name ), m_mdtIdHelper(0) { declareInterface<TrigL2MuonSA::TgcRoadDefiner>(this); @@ -73,7 +73,8 @@ StatusCode TrigL2MuonSA::TgcRoadDefiner::initialize() // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- -void TrigL2MuonSA::TgcRoadDefiner::setMdtGeometry(IRegSelSvc* regionSelector, const MdtIdHelper* mdtIdHelper) +void TrigL2MuonSA::TgcRoadDefiner::setMdtGeometry( const ServiceHandle<IRegSelSvc>& regionSelector, + const MdtIdHelper* mdtIdHelper) { m_regionSelector = regionSelector; m_mdtIdHelper = mdtIdHelper; -- GitLab From d883ba649cbec0ca705d0abb9307a324e451938a Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Mon, 2 Jul 2018 13:49:47 +0200 Subject: [PATCH 306/562] solve coverity 118598 Former-commit-id: 34985cf4ab37c5889a9d77f98f92f4cf857ed5a1 --- .../InDetRecAlgs/InDetLowBetaFinder/src/LowBetaAlg.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/src/LowBetaAlg.cxx b/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/src/LowBetaAlg.cxx index c79b29841b7b..cc204e544ec8 100644 --- a/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/src/LowBetaAlg.cxx +++ b/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/src/LowBetaAlg.cxx @@ -47,7 +47,8 @@ namespace InDet m_fieldServiceHandle("AtlasFieldSvc",name), m_TrtTool(0), m_TRTdEdxTool("TRT_ToT_dEdx"), - m_TrtToolInitSuccess(0) + m_TrtToolsSuccess{}, + m_TrtToolInitSuccess{} { declareProperty("MinimumTRThitsForIDpid", m_minTRThits); declareProperty("TracksName", m_trackParticleCollection); -- GitLab From 7a6e0908ab0ab79f78e377042ffbcabfb911ac07 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Mon, 2 Jul 2018 16:26:21 +0000 Subject: [PATCH 307/562] Adds Trigger ringer hypos Former-commit-id: 952e3a3f9e4c69fdaff5188837b2f52e01f5e487 --- .../TrigMultiVarHypo/CMakeLists.txt | 8 +- .../TrigMultiVarHypo/TrigL2CaloRingerFexMT.h | 1 + .../src/TrigL2CaloRingerFexMT.cxx | 12 +- .../src/TrigL2CaloRingerHypoAlgMT.cxx | 76 ++++++++++ .../src/TrigL2CaloRingerHypoAlgMT.h | 54 ++++++++ .../src/TrigL2CaloRingerHypoToolMT.cxx | 131 ++++++++++++++++++ .../src/TrigL2CaloRingerHypoToolMT.h | 87 ++++++++++++ 7 files changed, 365 insertions(+), 4 deletions(-) create mode 100644 Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerHypoAlgMT.cxx create mode 100644 Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerHypoAlgMT.h create mode 100644 Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerHypoToolMT.cxx create mode 100644 Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerHypoToolMT.h diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/CMakeLists.txt b/Trigger/TrigHypothesis/TrigMultiVarHypo/CMakeLists.txt index 7ecbd0c98e0d..af904aff6aab 100644 --- a/Trigger/TrigHypothesis/TrigMultiVarHypo/CMakeLists.txt +++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/CMakeLists.txt @@ -13,19 +13,21 @@ atlas_depends_on_subdirs( PUBLIC Trigger/TrigEvent/TrigSteeringEvent Trigger/TrigSteer/TrigInterfaces Trigger/TrigTools/TrigTimeAlgs + Trigger/TrigSteer/DecisionHandling PRIVATE - GaudiKernel ) + GaudiKernel + Control/AthViews ) # Component(s) in the package: atlas_add_library( TrigMultiVarHypoLib src/*.cxx PUBLIC_HEADERS TrigMultiVarHypo - LINK_LIBRARIES xAODTrigCalo xAODTrigRinger TrigCaloEvent TrigSteeringEvent TrigInterfacesLib TrigTimeAlgsLib + LINK_LIBRARIES xAODTrigCalo xAODTrigRinger TrigCaloEvent TrigSteeringEvent TrigInterfacesLib TrigTimeAlgsLib DecisionHandlingLib PRIVATE_LINK_LIBRARIES GaudiKernel ) atlas_add_component( TrigMultiVarHypo src/components/*.cxx - LINK_LIBRARIES xAODTrigCalo xAODTrigRinger TrigCaloEvent TrigSteeringEvent TrigInterfacesLib TrigTimeAlgsLib GaudiKernel TrigMultiVarHypoLib ) + LINK_LIBRARIES xAODTrigCalo xAODTrigRinger TrigCaloEvent TrigSteeringEvent TrigInterfacesLib TrigTimeAlgsLib GaudiKernel TrigMultiVarHypoLib DecisionHandlingLib ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/TrigL2CaloRingerFexMT.h b/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/TrigL2CaloRingerFexMT.h index 05f1ccb32344..221cdbbfe684 100644 --- a/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/TrigL2CaloRingerFexMT.h +++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/TrigL2CaloRingerFexMT.h @@ -92,3 +92,4 @@ class TrigL2CaloRingerFexMT : public AthAlgorithm { }; }; + diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerFexMT.cxx b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerFexMT.cxx index 5896ae68f694..efb37f68069f 100644 --- a/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerFexMT.cxx +++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerFexMT.cxx @@ -17,6 +17,8 @@ #include "xAODTrigRinger/TrigRNNOutputContainer.h" #include "xAODTrigRinger/TrigRingerRings.h" #include "xAODTrigRinger/TrigRingerRingsContainer.h" +#include "xAODEventInfo/EventInfo.h" + @@ -27,7 +29,7 @@ TrigL2CaloRingerFexMT:: TrigL2CaloRingerFexMT(const std::string & name, ISvcLocator* pSvcLocator) :AthAlgorithm(name, pSvcLocator){ - ATH_MSG_DEBUG( "start RingerMT const:" ); + ATH_MSG_DEBUG( "start RingerMT const:" << name ); } TrigL2CaloRingerFexMT:: ~TrigL2CaloRingerFexMT(){} @@ -189,6 +191,14 @@ StatusCode TrigL2CaloRingerFexMT::execute(){ ATH_MSG_DEBUG( "Et = " << et << " GeV, |eta| = " << eta << " and rnnoutput = " << m_output ); ///Store outout information for monitoring and studys + const xAOD::EventInfo* ei = nullptr; + if ( evtStore()->retrieve( ei ).isFailure() ) { + ATH_MSG_ERROR("No Event info in store" ); + return StatusCode::FAILURE; + } + + ATH_MSG_DEBUG( "Event " << ei->eventNumber() <<" Et = " << et << " GeV, eta = " << eta << " phi " << " and rnnoutput = " << m_output ); + std::unique_ptr<xAOD::TrigRNNOutput> rnnOutput( new xAOD::TrigRNNOutput()); rnnOutput->makePrivateStore(); rnnOutput->setRnnDecision(m_output); diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerHypoAlgMT.cxx b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerHypoAlgMT.cxx new file mode 100644 index 000000000000..31dded544e14 --- /dev/null +++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerHypoAlgMT.cxx @@ -0,0 +1,76 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ +#include <map> +#include "GaudiKernel/Property.h" +#include "TrigL2CaloRingerHypoAlgMT.h" + +using TrigCompositeUtils::DecisionContainer; +using TrigCompositeUtils::DecisionAuxContainer; +using TrigCompositeUtils::DecisionIDContainer; +using TrigCompositeUtils::decisionIDs; +using TrigCompositeUtils::newDecisionIn; +using TrigCompositeUtils::linkToPrevious; + + +TrigL2CaloRingerHypoAlgMT::TrigL2CaloRingerHypoAlgMT( const std::string& name, + ISvcLocator* pSvcLocator ) : + ::HypoBase( name, pSvcLocator ) {} + +TrigL2CaloRingerHypoAlgMT::~TrigL2CaloRingerHypoAlgMT() {} + +StatusCode TrigL2CaloRingerHypoAlgMT::initialize() { + ATH_MSG_INFO ( "Initializing " << name() << "..." ); + ATH_CHECK( m_hypoTools.retrieve() ); + + ATH_CHECK( m_views.initialize() ); + ATH_CHECK( m_decisionsKey.initialize() ); + + renounce( m_outputKey ); + ATH_CHECK( m_outputKey.initialize() ); + + + return StatusCode::SUCCESS; +} + + +StatusCode TrigL2CaloRingerHypoAlgMT::execute_r( const EventContext& context ) const { + ATH_MSG_DEBUG ( "Executing " << name() << "..." ); + + // prepare decisions container and link back to the clusters, and decision on clusters + auto decisions = std::make_unique<DecisionContainer>(); + auto aux = std::make_unique<DecisionAuxContainer>(); + decisions->setStore( aux.get() ); + + + //ATH_MSG_DEBUG( "RNNOutput ptr to decision map has size " << clusterToIndexMap.size() ); + + // prepare imput for tools + std::vector<TrigL2CaloRingerHypoToolMT::RNNOutInfo> hypoToolInput; + + auto viewsHandle = SG::makeHandle( m_views, context ); + for ( auto view: *viewsHandle ) { + size_t counter = 0; + auto rnnOutHandle = SG::makeHandle( m_outputKey, context ); + //CHECK( electronsHandle.setProxyDict( view ) ); + //CHECK( electronsHandle.isValid() ); + + for ( auto rnnOutIter = rnnOutHandle->begin(); rnnOutIter != rnnOutHandle->end(); ++rnnOutIter, counter++ ) { + auto d = newDecisionIn( decisions.get() ); + d->setObjectLink( "feature", ElementLink<xAOD::TrigRNNOutputContainer>( view->name()+"_"+m_outputKey.key(), counter ) ); + hypoToolInput.emplace_back( TrigL2CaloRingerHypoToolMT::RNNOutInfo{ d, *rnnOutIter } ); + } + } + + for ( auto & tool: m_hypoTools ) { + ATH_CHECK( tool->decide( hypoToolInput ) ); + + } + + { + auto handle = SG::makeHandle( m_decisionsKey, context ); + CHECK( handle.record( std::move( decisions ), std::move( aux ) ) ); + } + + return StatusCode::SUCCESS; +} diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerHypoAlgMT.h b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerHypoAlgMT.h new file mode 100644 index 000000000000..a6bb833cd96f --- /dev/null +++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerHypoAlgMT.h @@ -0,0 +1,54 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ +#ifndef MULTIVARHYPO_TRIGL2CALORINGERHYPOALG_H +#define MULTIVARHYPO_TRIGL2CALORINGERHYPOALG_H 1 + +#include <string> + +#include "AthenaBaseComps/AthReentrantAlgorithm.h" +#include "xAODTrigRinger/TrigRNNOutput.h" +#include "xAODTrigRinger/TrigRNNOutputContainer.h" +#include "DecisionHandling/TrigCompositeUtils.h" +#include "DecisionHandling/HypoBase.h" +#include "AthViews/View.h" + +#include "TrigL2CaloRingerHypoToolMT.h" + + + +class TrigL2CaloRingerHypoAlgMT + : public ::HypoBase +{ + public: + + TrigL2CaloRingerHypoAlgMT( const std::string& name, ISvcLocator* pSvcLocator ); + + virtual ~TrigL2CaloRingerHypoAlgMT(); + + virtual StatusCode initialize() override; + virtual StatusCode execute_r(const EventContext& context) const override; + + + private: + TrigL2CaloRingerHypoAlgMT(); + ToolHandleArray< TrigL2CaloRingerHypoToolMT > m_hypoTools {this, "HypoTools", {}, "Tools to perfrom selection"}; + + + SG::ReadHandleKey< ViewContainer > m_views {this, "Views", "Unspecified", "Views to read electrons from" }; + SG::WriteHandleKey< TrigCompositeUtils::DecisionContainer > m_decisionsKey {this, "RNNOutDecisions", "RNNOutDecisions", "Output decisions"}; + //SG::WriteHandleKey< TrigCompositeUtils::DecisionContainer > m_RNNOutdecisionsKey {this, "RNNOutDecisions", "RNNOutDecisions", "Output decisions"}; + + SG::ReadHandleKey<xAOD::TrigRNNOutputContainer> m_outputKey { + this, + "RNNOutputContainer", + "CaloRNNOutput", + "" + }; + + + +}; +//DECLARE_ALGORITHM_FACTORY( TrigL2CaloRingerHypoAlgMT ) + +#endif //> !MULTIVARHYPO_TRIGL2CALORINGERHYPOALG_H diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerHypoToolMT.cxx b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerHypoToolMT.cxx new file mode 100644 index 000000000000..1b7909752fdd --- /dev/null +++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerHypoToolMT.cxx @@ -0,0 +1,131 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + + +#include "DecisionHandling/HLTIdentifier.h" +#include "DecisionHandling/Combinators.h" +#include "AthenaMonitoring/MonitoredScope.h" +#include "GaudiKernel/SystemOfUnits.h" +#include "TrigL2CaloRingerHypoToolMT.h" + +using namespace TrigCompositeUtils; + +TrigL2CaloRingerHypoToolMT::TrigL2CaloRingerHypoToolMT( const std::string& type, + const std::string& name, + const IInterface* parent ) + : AthAlgTool( type, name, parent ), + m_decisionId( HLT::Identifier::fromToolName( name ) ) {} + +StatusCode TrigL2CaloRingerHypoToolMT::initialize() { + + ///What is the number of discriminators? + m_nThresholds = m_thresholds.size(); + + if((m_etaBins.size() != m_nThresholds) && (m_etBins.size() != m_nThresholds)){ + ATH_MSG_ERROR("Eta/Et list dont match with the number of thesholds found"); + return StatusCode::FAILURE; + } + + ///Initialize all discriminators + for(unsigned i=0; i<m_nThresholds; ++i) + { + ///Hold the pointer configuration + try{ + m_cutDefs.push_back(new TrigL2CaloRingerHypoToolMT::CutDefsHelper(m_thresholds[i],m_etaBins[i][0], + m_etaBins[i][1], m_etBins[i][0],m_etBins[i][1])); + }catch(const std::bad_alloc& xa){ + ATH_MSG_ERROR("Can not alloc cutDefs on memory."); + return StatusCode::FAILURE; + } + }///Loop over discriminators + + ATH_MSG_INFO("TrigL2CaloRingerHypo initialization completed successfully."); + + + return StatusCode::SUCCESS; +} + + +TrigL2CaloRingerHypoToolMT::~TrigL2CaloRingerHypoToolMT() {} + + +bool TrigL2CaloRingerHypoToolMT::decideOnSingleObject( const xAOD::TrigRNNOutput* rnnOutput) const { + + + + if(m_acceptAll){ + ATH_MSG_DEBUG("AcceptAll property is set: taking all events"); + return true; + } + + if(!rnnOutput){ + ATH_MSG_WARNING("There is no xAO::TrigRNNOutput into the TriggerElement."); + return false; + } + + const xAOD::TrigEMCluster *emCluster = 0; + const xAOD::TrigRingerRings *ringerShape = rnnOutput->ringer(); + if(ringerShape){ + emCluster = ringerShape->emCluster(); + if(!emCluster){ + ATH_MSG_WARNING( "There is no link to xAOD::TrigEMCluster into the Ringer object."); + return false; + } + }else{ + ATH_MSG_WARNING( "There is no xAOD::TrigRingerRings link into the rnnOutput object."); + return false; + } + + float eta = std::fabs(emCluster->eta()); + float et = emCluster->et() / Gaudi::Units::GeV; + if(eta>2.50) eta=2.50;///fix for events out of the ranger + float output = rnnOutput->rnnDecision().at(0); + + + ///Et threshold + if(et < m_emEtCut){ + ATH_MSG_DEBUG( "Event reproved by Et threshold. Et = " << et << ", EtCut = " << m_emEtCut); + return false; + } + + + if(m_nThresholds > 0){ + ///Select the correct threshold for each eta/Et region + for(unsigned i=0; i<m_nThresholds;++i){ + if((et > m_cutDefs[i]->etmin()) && (et <= m_cutDefs[i]->etmax())){ + if((eta > m_cutDefs[i]->etamin()) && (eta <= m_cutDefs[i]->etamax())){ + if(output >= m_cutDefs[i]->threshold()){ + ATH_MSG_DEBUG( "Event information:" ); + //ATH_MSG_DEBUG( " " << m_cutDefs[i]->etmin() << "< Et ("<<et<<") GeV" << " <=" << m_cutDefs[i]->etmax() ); + //ATH_MSG_DEBUG( " " << m_cutDefs[i]->etamin() << "< |Eta| ("<<eta<<") " << " <=" << m_cutDefs[i]->etamax() ); + //ATH_MSG_DEBUG( " rnnOutput: " << output << " and threshold: " << m_cutDefs[i]->threshold()); + return true; + }else{ + ATH_MSG_DEBUG( "Event reproved by discriminator threshold" ); + }///Threshold condition + break; + }///Loop over eta + }///Loop over et + }///Loop over cutDefs + }else{ + ATH_MSG_DEBUG( "There is no discriminator. Event approved by Et threshold."); + return true; + }///protection + return false; +} + + +StatusCode TrigL2CaloRingerHypoToolMT::decide( std::vector<RNNOutInfo>& input ) const { + + + for ( auto i: input ) { + auto objDecision = decideOnSingleObject( i.rnnOut ); + if ( objDecision == true ) { + addDecisionID( m_decisionId.numeric(), i.decision ); + } + } + return StatusCode::SUCCESS; +} + + diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerHypoToolMT.h b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerHypoToolMT.h new file mode 100644 index 000000000000..5a6c783fe698 --- /dev/null +++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerHypoToolMT.h @@ -0,0 +1,87 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ +#ifndef TRIGL2CALORINGERTOOL_H +#define TRIGL2CALORINGERTOOL_H 1 + +#include "GaudiKernel/Property.h" +#include "CLHEP/Units/SystemOfUnits.h" +#include "AthenaBaseComps/AthAlgTool.h" +#include "AthenaMonitoring/GenericMonitoringTool.h" +#include "DecisionHandling/HLTIdentifier.h" +#include "DecisionHandling/TrigCompositeUtils.h" + +#include "xAODTrigRinger/TrigRNNOutput.h" + + + + + +class TrigL2CaloRingerHypoToolMT : virtual public ::AthAlgTool +{ + public: + TrigL2CaloRingerHypoToolMT( const std::string& type, + const std::string& name, + const IInterface* parent ); + + virtual ~TrigL2CaloRingerHypoToolMT(); + virtual StatusCode initialize() override; + + + + struct RNNOutInfo { + TrigCompositeUtils::Decision* decision; + const xAOD::TrigRNNOutput* rnnOut; + }; + + StatusCode decide( std::vector<RNNOutInfo>& decisions ) const; + bool decideOnSingleObject( const xAOD::TrigRNNOutput* rnnOut ) const; + + + ///Helper class + class CutDefsHelper{ + private: + double m_etamin; + double m_etamax; + double m_etmin; + double m_etmax; + double m_threshold; + + public: + CutDefsHelper(double th, double etamin, double etamax, + double etmin, double etmax):m_etamin(etamin), + m_etamax(etamax),m_etmin(etmin),m_etmax(etmax), + m_threshold(th) + {;} + + ~CutDefsHelper() + {;} + double threshold(){return m_threshold;}; + double etamin(){return m_etamin;}; + double etamax(){return m_etamax;}; + double etmin(){return m_etmin;}; + double etmax(){return m_etmax;}; + + };///end of configuration + + std::vector<TrigL2CaloRingerHypoToolMT::CutDefsHelper*> m_cutDefs; + + + + private: + HLT::Identifier m_decisionId; + Gaudi::Property<bool> m_acceptAll{ this, "AcceptAll", false, "Ignore selection" }; + Gaudi::Property<std::vector<double>> m_thresholds; + Gaudi::Property<std::vector<std::vector<double>>> m_etaBins; + Gaudi::Property<std::vector<std::vector<double>>> m_etBins; + Gaudi::Property<double> m_nThresholds; + Gaudi::Property<double> m_emEtCut; + + + size_t m_multiplicity = 1; + + //ToolHandle<GenericMonitoringTool> m_monTool{ this, "MonTool", "", "Monitoring tool" }; +}; + +//:DECLARE_TOOL_FACTORY( TrigL2CaloRingerHypoToolMT ) +#endif //> ! TRIGL2CALORINGERTOOL_H -- GitLab From 9cf984c5edb73866e143a0c1e6625bbf69c01ad3 Mon Sep 17 00:00:00 2001 From: "Vincent R. Pascuzzi" <vincent.pascuzzi@cern.ch> Date: Mon, 2 Jul 2018 16:27:54 +0000 Subject: [PATCH 308/562] ISF_Fatras Coverity defect fixes (ATLASSIM-3734) Former-commit-id: 9ef72194b894e0fb87185ff6f26d51afa97aabb3 --- .../EnergyLossSamplerBetheHeitler.h | 2 - .../McMaterialEffectsUpdator.h | 5 -- .../MultipleScatteringSamplerGeneralMixture.h | 10 +-- .../ISF_FatrasTools/PhotonConversionTool.h | 3 - .../src/HadIntProcessorParametric.cxx | 5 +- .../src/McMaterialEffectsEngine.cxx | 5 ++ .../src/McMaterialEffectsUpdator.cxx | 71 +++++++++++-------- ...ultipleScatteringSamplerGeneralMixture.cxx | 22 +++--- .../src/PhysicsValidationTool.cxx | 28 +++++++- .../ISF_FatrasTools/src/TransportEngine.cxx | 2 +- .../ISF_FatrasTools/src/TransportTool.cxx | 4 +- 11 files changed, 96 insertions(+), 61 deletions(-) diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/EnergyLossSamplerBetheHeitler.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/EnergyLossSamplerBetheHeitler.h index 910554d58fd0..a85a242e3538 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/EnergyLossSamplerBetheHeitler.h +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/EnergyLossSamplerBetheHeitler.h @@ -76,8 +76,6 @@ namespace iFatras{ std::string m_randomEngineName; mutable std::vector<double> m_pdf; - mutable double m_cashedPathLength; - int m_numberPointsInPDF; /** the one free parameter to scale */ double m_scaleFactor; diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/McMaterialEffectsUpdator.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/McMaterialEffectsUpdator.h index 669ac830e7ee..98a6b7f9c43a 100755 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/McMaterialEffectsUpdator.h +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/McMaterialEffectsUpdator.h @@ -207,9 +207,6 @@ namespace iFatras { /** MCTruth process sampling */ ToolHandle<iFatras::IProcessSamplingTool> m_samplingTool; - - /** pass geometry signature to offspring */ - mutable Trk::GeometrySignature m_geomSignature; /** hadronic interaction setting */ bool m_hadInt; @@ -328,8 +325,6 @@ namespace iFatras { /** cache layer properties */ mutable const Trk::Layer* m_layer; mutable const Trk::MaterialProperties* m_matProp; - mutable const Trk::MaterialProperties* m_extMatProp; - Trk::PdgToParticleHypothesis m_pdgToParticleHypothesis; }; diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/MultipleScatteringSamplerGeneralMixture.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/MultipleScatteringSamplerGeneralMixture.h index 6ce90563417b..191fcf2a6349 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/MultipleScatteringSamplerGeneralMixture.h +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/MultipleScatteringSamplerGeneralMixture.h @@ -80,15 +80,15 @@ namespace iFatras { static double s_genMixScale; //!< General mixture model: Scaling factor //!< General mixture model: get parameters for single gaussian simulation - double *getGaussian(double beta, double p,double dOverX0, double scale) const; + std::vector<double> getGaussian(double beta, double p,double dOverX0, double scale) const; //!< General mixture model: get parameters for gaussian mixture - double *getGaussmix(double beta, double p,double dOverX0,double Z, double scale) const; + std::vector<double> getGaussmix(double beta, double p,double dOverX0,double Z, double scale) const; //!< General mixture model: get parameters for semi-gaussian mixture - double *getSemigauss(double beta,double p,double dOverX0,double Z, double scale) const; + std::vector<double> getSemigauss(double beta,double p,double dOverX0,double Z, double scale) const; //!< General mixture model: simulate semi-gaussian mixture - double simGaussmix(double * scattering_params) const; + double simGaussmix(std::vector<double> scattering_params) const; //!< General mixture model: simulate gaussian mixture - double simSemigauss(double * scattering_params) const; + double simSemigauss(std::vector<double> scattering_params) const; }; diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/PhotonConversionTool.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/PhotonConversionTool.h index 3dda6c45016c..b1b723987d06 100755 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/PhotonConversionTool.h +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/PhotonConversionTool.h @@ -125,9 +125,6 @@ namespace iFatras { /** Switch to use reference material */ bool m_referenceMaterial; - /** private member to pass geometry signature */ - mutable Trk::GeometrySignature m_geomSignature; - /** The cut from which on the child products are followed */ double m_minChildEnergy; double m_childEnergyScaleFactor; diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/HadIntProcessorParametric.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/HadIntProcessorParametric.cxx index 007cdfafff8f..97aa171bf8fa 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/HadIntProcessorParametric.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/HadIntProcessorParametric.cxx @@ -69,10 +69,13 @@ iFatras::HadIntProcessorParametric::HadIntProcessorParametric(const std::string& m_hadIntPointR(0.), m_hadIntPointZ(0.), m_hadIntMotherPdg(0), + m_hadIntMotherBarcode(0), m_hadIntMotherP(0.), + m_hadIntMotherPt(0.), m_hadIntMotherPhi(0.), m_hadIntMotherEta(0.), - m_hadIntChildren(0) + m_hadIntChildren(0), + m_hadIntChildE(0.) { // property setting declareProperty("MinimumHadronicOutEnergy" , m_minimumHadOutEnergy); diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsEngine.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsEngine.cxx index c654566a69d5..e3a57797efd2 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsEngine.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsEngine.cxx @@ -80,6 +80,11 @@ iFatras::McMaterialEffectsEngine::McMaterialEffectsEngine(const std::string& t, m_particleBroker("ISF_ParticleParticleBroker", n), m_truthRecordSvc("ISF_TruthRecordSvc", n), m_oneOverThree(1./3.), + m_isp(nullptr), + m_layer(nullptr), + m_matProp(nullptr), + m_thicknessInX0(0.), + m_thicknessInL0(0.), m_projectionFactor(sqrt(2.)/2.) { // steering of the screen outoput (SOP) diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsUpdator.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsUpdator.cxx index 09e7dca42348..eb8d23d111ba 100755 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsUpdator.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsUpdator.cxx @@ -79,14 +79,14 @@ iFatras::McMaterialEffectsUpdator::McMaterialEffectsUpdator(const std::string& t m_referenceMaterial(true), m_bendingCorrection(false), m_rndGenSvc("AtDSFMTGenSvc", n), - m_randomEngine(0), + m_randomEngine(nullptr), m_randomEngineName("FatrasRnd"), m_recordedBremPhotons(0), m_currentSample(-1), m_recordEnergyDeposition(false), m_layerIndexCaloSampleMapName("LayerIndexCaloSampleMap"), - m_layerIndexCaloSampleMap(0), - m_trackingGeometry(0), + m_layerIndexCaloSampleMap(nullptr), + m_trackingGeometry(nullptr), m_trackingGeometrySvc("ISF_FatrasTrackingGeometrySvc", n), m_trackingGeometryName("ISF_FatrasTrackingGeometry"), m_projectionFactor(sqrt(2.)), @@ -95,7 +95,7 @@ iFatras::McMaterialEffectsUpdator::McMaterialEffectsUpdator(const std::string& t m_validationTreeName("FatrasMaterialEffects"), m_validationTreeDescription("Validation output from the McMaterialEffectsUpdator"), m_validationTreeFolder("/val/FatrasSimulationMaterial"), - m_validationTree(0), + m_validationTree(nullptr), m_layerIndex(0), m_tInX0(0.), m_thetaMSproj(0.), @@ -107,7 +107,7 @@ iFatras::McMaterialEffectsUpdator::McMaterialEffectsUpdator(const std::string& t m_bremValidationTreeName("FatrasBremPhotons"), m_bremValidationTreeDescription("Validation output from the McMaterialEffectsUpdator"), m_bremValidationTreeFolder("/val/FatrasBremPhotons"), - m_bremValidationTree(0), + m_bremValidationTree(nullptr), m_bremPointX(0.), m_bremPointY(0.), m_bremPointR(0.), @@ -119,17 +119,19 @@ iFatras::McMaterialEffectsUpdator::McMaterialEffectsUpdator(const std::string& t m_edValidationTreeName("FatrasEnergyInCaloDeposit"), m_edValidationTreeDescription("Validation output from the McMaterialEffectUpdator"), m_edValidationTreeFolder("/val/FatrasEnergyInCaloDeposit"), - m_edValidationTree(0), + m_edValidationTree(nullptr), m_edLayerIntersectX(0.), m_edLayerIntersectY(0.), m_edLayerIntersectZ(0.), m_edLayerIntersectR(0.), m_edLayerEnergyDeposit(0.), - m_edLayerSample(0), + m_edLayerSample(0.), m_oneOverThree(1./3.), m_particleBroker("ISF_ParticleParticleBroker", n), m_truthRecordSvc("ISF_TruthRecordSvc", n), - m_layer(0) + m_isp(nullptr), + m_layer(nullptr), + m_matProp(nullptr) { // the tool parameters ----------------------------------------------------- declareProperty("EnergyLoss" , m_eLoss); @@ -403,7 +405,7 @@ const Trk::TrackParameters* iFatras::McMaterialEffectsUpdator::update(const Trk: m_isp = parent; // get the material properties - m_matProp = 0; + m_matProp = nullptr; if (m_referenceMaterial){ // very first go : get the Surface @@ -436,8 +438,21 @@ const Trk::TrackParameters* iFatras::McMaterialEffectsUpdator::updateInLay(const //if (m_referenceMaterial && m_matProp) pathCorrection = 1./fabs(parm->associatedSurface()->normal().dot(parm->momentum().unit())); + if (!parm) + { + ATH_MSG_WARNING("Trk::TrackParameters parm is null -- will not proceed. Returning nullptr."); + return nullptr; + } + // recalculate if missing m_matProp = m_matProp ? m_matProp : m_layer->fullUpdateMaterialProperties(*parm); + + if (!m_matProp) + { + ATH_MSG_WARNING("Something went wrong -- m_matProp is missing but Trk::TrackParameters is not null! Returning nullptr."); + return nullptr; + } + double pathCorrection = m_layer->surfaceRepresentation().normal().dot(parm->momentum()) !=0 ? fabs(m_layer->surfaceRepresentation().pathCorrection(parm->position(),dir*(parm->momentum()))) : 1.; @@ -452,7 +467,7 @@ const Trk::TrackParameters* iFatras::McMaterialEffectsUpdator::updateInLay(const } //-------------------------------------------------------------------------------------------------- - if (msgLvl(MSG::VERBOSE) && int(dir)){ + if (msgLvl(MSG::VERBOSE) && dir != Trk::PropDirection::anyDirection){ const Trk::TrackingVolume* enclosingVolume = m_layer->enclosingTrackingVolume(); std::string volumeName = enclosingVolume ? enclosingVolume->volumeName() : "Unknown"; double layerR = m_layer->surfaceRepresentation().bounds().r(); @@ -475,22 +490,20 @@ const Trk::TrackParameters* iFatras::McMaterialEffectsUpdator::updateInLay(const // prepare material collection const Trk::MaterialProperties* extMatProp = 0; double dInL0 = 0.; - if (m_matProp) { - extMatProp = dynamic_cast<const Trk::MaterialProperties*>(m_matProp); - dInL0 = extMatProp ? (1-matFraction)*pathCorrection*extMatProp->thicknessInL0() : - (1-matFraction)*pathCorrection*m_matProp->thicknessInX0()/0.37/m_matProp->averageZ(); - } + extMatProp = dynamic_cast<const Trk::MaterialProperties*>(m_matProp); + dInL0 = extMatProp ? (1-matFraction)*pathCorrection*extMatProp->thicknessInL0() : + (1-matFraction)*pathCorrection*m_matProp->thicknessInX0()/0.37/m_matProp->averageZ(); // figure out if particle stopped in the layer and recalculate path limit int iStatus = 0; double dX0 = (1.-matFraction)*pathCorrection*m_matProp->thicknessInX0(); - if (!m_matProp || particle==Trk::geantino || particle==Trk::nonInteracting || dX0==0.) { + if (particle==Trk::geantino || particle==Trk::nonInteracting || dX0==0.) { // non-interacting - pass them back pathLim.updateMat(dX0,m_matProp->averageZ(),dInL0); // register particle if not in the stack already - if (parm && isp!=m_isp ) { + if (isp!=m_isp ) { ISF::ISFParticle* regisp=new ISF::ISFParticle(isp->position(),parm->momentum(),isp->mass(),isp->charge(), isp->pdgCode(),isp->timeStamp(),*m_isp,isp->barcode()); // add presampled process info @@ -647,7 +660,7 @@ const Trk::TrackParameters* iFatras::McMaterialEffectsUpdator::updateInLay(const } // register particle if not in the stack already - if (parm && isp!=m_isp ) { + if (isp!=m_isp) { ISF::ISFParticle* regisp=new ISF::ISFParticle(isp->position(),parm->momentum(),isp->mass(),isp->charge(), isp->pdgCode(),isp->timeStamp(),*m_isp,isp->barcode()); // add presampled process info @@ -676,7 +689,12 @@ const Trk::TrackParameters* iFatras::McMaterialEffectsUpdator::updateInLay(const m_particleBroker->push(regisp, m_isp); } - if (isp!=m_isp) { delete isp; delete parm; } + if (isp!=m_isp) + { + delete isp; + delete parm; + return nullptr; + } return parm; @@ -920,7 +938,7 @@ const Trk::TrackParameters* iFatras::McMaterialEffectsUpdator::update(double tim double newP = p; if (m_eLoss){ // get the momentum change plus the according sigma - Trk::EnergyLoss* sampledEnergyLoss = m_eLossUpdator->energyLoss(matprop, p, pathCorrection, dir, particle); + std::unique_ptr<Trk::EnergyLoss> sampledEnergyLoss( m_eLossUpdator->energyLoss(matprop, p, pathCorrection, dir, particle)); if (sampledEnergyLoss){ @@ -928,7 +946,6 @@ const Trk::TrackParameters* iFatras::McMaterialEffectsUpdator::update(double tim // protection against NaN if ( E+energyLoss < m) { ATH_MSG_VERBOSE( " [+] particle momentum fell under momentum cut - stop simulation" ); - delete sampledEnergyLoss; return 0; } // smear the mometnum change with the sigma @@ -948,7 +965,6 @@ const Trk::TrackParameters* iFatras::McMaterialEffectsUpdator::update(double tim ATH_MSG_VERBOSE( " [+] sucessfully recorded deposited energy of " << sampledEnergyLoss->deltaE() << " CLHEP::MeV / sample " << m_currentSample ); */ - sampledEnergyLoss = 0; // avoid double deletion --- EnergyDeposit takes ownership if (m_edValidationTree){ // fill the variables m_edLayerIntersectX = parm.position().x(); @@ -965,16 +981,15 @@ const Trk::TrackParameters* iFatras::McMaterialEffectsUpdator::update(double tim // the deltaP double deltaP = newP - p; - delete sampledEnergyLoss; // validation if (m_bremValidation && particle==Trk::electron) m_bremMotherEnergy = p; // record the brem if (particle == Trk::electron && deltaP < -1.*m_minimumBremPhotonMomentum) { - Amg::Vector3D dir = parm.momentum().unit(); // to be used for recoil + Amg::Vector3D recoilDir = parm.momentum().unit(); // to be used for recoil recordBremPhoton(time,p,-deltaP, parm.position(), - dir, + recoilDir, Trk::electron); } // bail out if the update drops below the momentum cut @@ -1054,7 +1069,7 @@ const Trk::TrackParameters* iFatras::McMaterialEffectsUpdator::update( double / if(!meff.scatteringAngles()){ //Trick to keep using existing MultipleScatteringUpdator interface //and create a dummy materialProperties with the properties we are interested in - Trk::MaterialProperties mprop(meff.thicknessInX0(),1.,0.,0.,0.,0.); + Trk::MaterialProperties mprop(meff.thicknessInX0(),1.,10.e-10,10.e-10,10.e-10,10.e-10); // get the projected scattering angle double sigmaMSproj = (m_use_msUpdator && m_msUpdator) ? sqrt(m_msUpdator->sigmaSquare(mprop, p, pathCorrection, particle)) : @@ -1927,10 +1942,6 @@ ISF::ISFParticleVector iFatras::McMaterialEffectsUpdator::interactLay(const ISF if (process==121) { // hadronic interaction - //const Amg::Vector3D pDir = momentum.unit(); - - const Trk::CurvilinearParameters parm(position,momentum,parent->charge()); - return ( m_hadIntProcessor->doHadIntOnLayer(parent, time, position, momentum, extMatProp? &extMatProp->material() : 0, particle) ); diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/MultipleScatteringSamplerGeneralMixture.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/MultipleScatteringSamplerGeneralMixture.cxx index 65ccd7a15095..ea1e844267fb 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/MultipleScatteringSamplerGeneralMixture.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/MultipleScatteringSamplerGeneralMixture.cxx @@ -106,16 +106,16 @@ double iFatras::MultipleScatteringSamplerGeneralMixture::simTheta(const Trk::Mat //see Mixture models of multiple scattering: computation and simulation. - R.Frühwirth, M. Liendl. - //Computer Physics Communications 141 (2001) 230–246 //----------------------------------------------------------------------------------------------// - double * scattering_params; + std::vector<double> scattering_params; // Decide which mixture is best if (dOverX0/(beta*beta)>0.6/pow(Z,0.6)){ //Gaussian // Gaussian mixture or pure Gaussian if (dOverX0/(beta*beta)>10){ - scattering_params=getGaussian(beta,p,dOverX0,s_genMixScale); // Get parameters + scattering_params = getGaussian(beta,p,dOverX0,s_genMixScale); // Get parameters //std::cout<<"MultipleScatteringSamplerGeneralMixture::multipleScatteringUpdate: using pure_gaussian"<<std::endl; } else{ - scattering_params=getGaussmix(beta,p,dOverX0,Z,s_genMixScale); // Get parameters + scattering_params = getGaussmix(beta,p,dOverX0,Z,s_genMixScale); // Get parameters //std::cout<<"MultipleScatteringSamplerGeneralMixture::multipleScatteringUpdate: using gaussian_mixture"<<std::endl; } theta = simGaussmix(scattering_params); // Simulate @@ -147,8 +147,8 @@ double iFatras::MultipleScatteringSamplerGeneralMixture::simTheta(const Trk::Mat return theta*s_projectionFactor; } -double * iFatras::MultipleScatteringSamplerGeneralMixture::getGaussian(double beta, double p,double dOverX0, double scale) const{ - double * scattering_params = new double[4]; +std::vector<double> iFatras::MultipleScatteringSamplerGeneralMixture::getGaussian(double beta, double p,double dOverX0, double scale) const{ + std::vector<double> scattering_params(4); scattering_params[0]=15./beta/p*sqrt(dOverX0)*scale; //Total standard deviation of mixture scattering_params[1]=1.0; //Variance of core scattering_params[2]=1.0; //Variance of tails @@ -156,8 +156,8 @@ double * iFatras::MultipleScatteringSamplerGeneralMixture::getGaussian(double be return scattering_params; } -double * iFatras::MultipleScatteringSamplerGeneralMixture::getGaussmix(double beta, double p,double dOverX0,double Z, double scale) const{ - double * scattering_params = new double[4]; +std::vector<double> iFatras::MultipleScatteringSamplerGeneralMixture::getGaussmix(double beta, double p,double dOverX0,double Z, double scale) const{ + std::vector<double> scattering_params(4); scattering_params[0]=15./beta/p*sqrt(dOverX0)*scale; //Total standard deviation of mixture double d1=log(dOverX0/(beta*beta)); double d2=log(pow(Z,2.0/3.0)*dOverX0/(beta*beta)); @@ -173,8 +173,8 @@ double * iFatras::MultipleScatteringSamplerGeneralMixture::getGaussmix(double be return scattering_params; } -double * iFatras::MultipleScatteringSamplerGeneralMixture::getSemigauss(double beta,double p,double dOverX0,double Z, double scale) const{ - double * scattering_params = new double[6]; +std::vector<double> iFatras::MultipleScatteringSamplerGeneralMixture::getSemigauss(double beta,double p,double dOverX0,double Z, double scale) const{ + std::vector<double> scattering_params(6); double N=dOverX0*1.587E7*pow(Z,1.0/3.0)/(beta*beta)/(Z+1)/log(287/sqrt(Z)); scattering_params[4]=15./beta/p*sqrt(dOverX0)*scale; //Total standard deviation of mixture double rho=41000/pow(Z,2.0/3.0); @@ -191,7 +191,7 @@ double * iFatras::MultipleScatteringSamplerGeneralMixture::getSemigauss(double b return scattering_params; } -double iFatras::MultipleScatteringSamplerGeneralMixture::simGaussmix(double * scattering_params) const{ +double iFatras::MultipleScatteringSamplerGeneralMixture::simGaussmix(std::vector<double> scattering_params) const{ double sigma_tot = scattering_params[0]; double var1 = scattering_params[1]; double var2 = scattering_params[2]; @@ -204,7 +204,7 @@ double iFatras::MultipleScatteringSamplerGeneralMixture::simGaussmix(double * sc return sqrt(var2)*sqrt(-2*log(u))*sigma_tot; } -double iFatras::MultipleScatteringSamplerGeneralMixture::simSemigauss(double * scattering_params) const{ +double iFatras::MultipleScatteringSamplerGeneralMixture::simSemigauss(std::vector<double> scattering_params) const{ double a = scattering_params[0]; double b = scattering_params[1]; double var1 = scattering_params[2]; diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/PhysicsValidationTool.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/PhysicsValidationTool.cxx index 0ea0620f62f5..68155a453ef1 100755 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/PhysicsValidationTool.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/PhysicsValidationTool.cxx @@ -31,7 +31,33 @@ iFatras::PhysicsValidationTool::PhysicsValidationTool( const std::string& t, const IInterface* p ) : base_class(t,n,p), m_thistSvc("THistSvc",n), - m_validationStream("ISFFatras") + m_validationStream("ISFFatras"), + m_eloss(0.), + m_ionloss(0.), + m_radloss(0.), + m_zOaTr(0.), + m_wZ(0.), + m_thIn(0.), + m_phIn(0.), + m_dIn(0.), + m_thEnd(0.), + m_phEnd(0.), + m_dEnd(0.), + m_X0(0.), + m_dt(0.), + m_interactions(nullptr), + m_process(0), + m_pdg_mother(0), + m_gen_mother(0), + m_nChild(0), + m_vtx_dist(0.), + m_vtx_theta(0.), + m_vtx_phi(0.), + m_vtx_e_diff(0.), + m_vtx_p_diff(0.), + m_vtx_plong_diff(0.), + m_vtx_pperp_diff(0.), + m_p_mother(0.) { // validation output section declareProperty("ValidationStreamName", diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportEngine.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportEngine.cxx index 9ccc5b7821a3..15d3c9cf1791 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportEngine.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportEngine.cxx @@ -416,7 +416,7 @@ ISF::ISFParticle* iFatras::TransportEngine::handleExtrapolationResult(const ISF: ATH_MSG_VERBOSE( "[ fatras transport ] Successfully reached detector boundary with the particle -> return particle at boundary."); // create the updated particle at the end of processing step AtlasDetDescr::AtlasRegion geoID=AtlasDetDescr::AtlasRegion(5); - if (nextGeoID<99) geoID = AtlasDetDescr::AtlasRegion(nextGeoID); + if (nextGeoID<99) geoID = static_cast<AtlasDetDescr::AtlasRegion>(nextGeoID); rParticle = new ISF::ISFParticle(position, momentum, isp.mass(), diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportTool.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportTool.cxx index 26c74520a318..1202f66962ec 100755 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportTool.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportTool.cxx @@ -271,7 +271,7 @@ ISF::ISFParticle* iFatras::TransportTool::process( const ISF::ISFParticle& isp) // NB: don't delete eParameters, it's memory is managed inside the extrapolator // additional exercise due to the current mismatch in geoID - Trk::GeometrySignature nextGeoID=Trk::GeometrySignature(isp.nextGeoID()); + Trk::GeometrySignature nextGeoID=static_cast<Trk::GeometrySignature>(isp.nextGeoID()); const Trk::TrackParameters* eParameters = 0; @@ -339,7 +339,7 @@ ISF::ISFParticle* iFatras::TransportTool::process( const ISF::ISFParticle& isp) // additional exercise due to the current mismatch in geoID AtlasDetDescr::AtlasRegion geoID=AtlasDetDescr::AtlasRegion(5); if (nextGeoID<99) { - geoID = AtlasDetDescr::AtlasRegion(nextGeoID); + geoID = static_cast<AtlasDetDescr::AtlasRegion>(nextGeoID); } // validation mode - for all particle registered into stack -- GitLab From ebfbeb59d1d3539262f4ab4411c11088a856bf2f Mon Sep 17 00:00:00 2001 From: "Vincent R. Pascuzzi" <vincent.pascuzzi@cern.ch> Date: Mon, 2 Jul 2018 16:28:33 +0000 Subject: [PATCH 309/562] Fixes for Coverity defects in ISF_FatraToolsID (ATLASSIM-3735) Former-commit-id: ac0818355c81df829c6c5850271d699351fe6025 --- .../src/HitCreatorSilicon.cxx | 1 + .../ISF_FatrasToolsID/src/SimHitCreatorID.cxx | 47 +++++++++---------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorSilicon.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorSilicon.cxx index d3de0c5d65cc..21e814fe7616 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorSilicon.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorSilicon.cxx @@ -62,6 +62,7 @@ iFatras::HitCreatorSilicon::HitCreatorSilicon(const std::string& t, const std::s m_sctIdHelper(0), m_condSummaryTool("PixelConditionsSummaryTool", this), m_useConditionsTool(true), + m_dEdX_function(0), m_siPathToCharge(500.), m_fastEnergyDepositionModel(true) { diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/SimHitCreatorID.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/SimHitCreatorID.cxx index 089afaf5bdad..ec73b4705620 100755 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/SimHitCreatorID.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/SimHitCreatorID.cxx @@ -113,30 +113,29 @@ void iFatras::SimHitCreatorID::createHits(const ISF::ISFParticle& isp, const std double time = (*plIter).time; // ------------------------------------------------------------------------- const Trk::TrkDetElementBase* hitDetElement = hitParameter->associatedSurface().associatedDetectorElement(); - if (hitDetElement){ - // initialize an unvalid one - Identifier hitId = hitDetElement ? hitDetElement->identify() : Identifier(); - if (m_idHelper->is_pixel(hitId)) { - // ----------------------------------------------------------------------- - // HIT in Pixel Detector - // ----------------------------------------------------------------------- - ATH_MSG_VERBOSE( "[ sim ] Creating Pixel Cluster" ); - m_pixelHitCreator->createSimHit(isp,*hitParameter,time); ++nHits; - } - else if (m_idHelper->is_sct(hitId)) { - // ----------------------------------------------------------------------- - // HIT in SCT Detector - // ----------------------------------------------------------------------- - ATH_MSG_VERBOSE( "[ sim ] Creating SCT Cluster" ); - m_sctHitCreator->createSimHit(isp,*hitParameter,time); ++nHits; - } - else if (m_idHelper->is_trt(hitId)) { - // ----------------------------------------------------------------------- - // HIT in TRT Detector - // ----------------------------------------------------------------------- - ATH_MSG_VERBOSE( "[ sim ] Creating TRT DriftCircle" ); - m_trtHitCreator->createSimHit(isp,*hitParameter,time); ++nHits; - } + + // initialize an unvalid one + Identifier hitId = hitDetElement ? hitDetElement->identify() : Identifier(); + if (m_idHelper->is_pixel(hitId)) { + // ----------------------------------------------------------------------- + // HIT in Pixel Detector + // ----------------------------------------------------------------------- + ATH_MSG_VERBOSE( "[ sim ] Creating Pixel Cluster" ); + m_pixelHitCreator->createSimHit(isp,*hitParameter,time); ++nHits; + } + else if (m_idHelper->is_sct(hitId)) { + // ----------------------------------------------------------------------- + // HIT in SCT Detector + // ----------------------------------------------------------------------- + ATH_MSG_VERBOSE( "[ sim ] Creating SCT Cluster" ); + m_sctHitCreator->createSimHit(isp,*hitParameter,time); ++nHits; + } + else if (m_idHelper->is_trt(hitId)) { + // ----------------------------------------------------------------------- + // HIT in TRT Detector + // ----------------------------------------------------------------------- + ATH_MSG_VERBOSE( "[ sim ] Creating TRT DriftCircle" ); + m_trtHitCreator->createSimHit(isp,*hitParameter,time); ++nHits; } } ATH_MSG_VERBOSE( "[ idtrack ] **** done, " << nHits << " hits created from this track." ); -- GitLab From 901b49ad84881156c4350eab82511e7902055a70 Mon Sep 17 00:00:00 2001 From: Tim Martin <tim.martin@cern.ch> Date: Mon, 2 Jul 2018 16:30:46 +0000 Subject: [PATCH 310/562] Merge branch 'TrigCostToAnalysis' into '21.2' -- push to master Former-commit-id: f826e579d7b7bc8218fbdee1f760876766828b69 --- .../DerivationFrameworkTrigger/CMakeLists.txt | 23 +++ .../EnhancedBiasAugmentationTool.h | 48 ++++++ .../python/TrigThinningHelper.py | 161 ++++++++++++++++++ .../python/__init__.py | 2 + .../DerivationFrameworkTrigger/share/TRIG1.py | 98 +++++++++++ .../DerivationFrameworkTrigger/share/TRIG2.py | 66 +++++++ .../DerivationFrameworkTrigger/share/TRIG3.py | 65 +++++++ .../DerivationFrameworkTrigger/share/TRIG4.py | 65 +++++++ .../EnhancedBiasWeighter/CMakeLists.txt | 54 +++--- .../EnhancedBiasWeighter_entries.cxx | 5 +- .../RatesAnalysis/RatesAnalysisAlg.h | 3 +- .../RatesAnalysis/RatesAnalysis/RatesGroup.h | 2 +- .../RatesAnalysis/RatesHistoBase.h | 12 +- .../RatesAnalysis/RatesScanTrigger.h | 5 +- .../RatesAnalysis/RatesTrigger.h | 2 +- .../share/RatesAnalysis_test.ref | 10 +- .../RatesAnalysis/src/RatesAnalysisAlg.cxx | 109 ++++++------ .../TrigCost/RatesAnalysis/src/RatesGroup.cxx | 12 +- .../RatesAnalysis/src/RatesHistoBase.cxx | 42 ++++- .../RatesAnalysis/src/RatesScanTrigger.cxx | 18 +- .../RatesAnalysis/src/RatesTrigger.cxx | 4 +- .../RatesAnalysis/test/RatesAnalysis_test.cxx | 2 +- .../RatesAnalysisExamplesXAOD/CMakeLists.txt | 2 +- .../src/ExampleRatesEmulation.cxx | 10 +- .../src/ExampleRatesFullMenu.cxx | 2 + .../src/components/RatesAnalysis_entries.cxx | 5 +- 26 files changed, 711 insertions(+), 116 deletions(-) create mode 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/CMakeLists.txt create mode 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/DerivationFrameworkTrigger/EnhancedBiasAugmentationTool.h create mode 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/python/TrigThinningHelper.py create mode 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/python/__init__.py create mode 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/share/TRIG1.py create mode 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/share/TRIG2.py create mode 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/share/TRIG3.py create mode 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/share/TRIG4.py diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/CMakeLists.txt new file mode 100644 index 000000000000..ec08633e8e80 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/CMakeLists.txt @@ -0,0 +1,23 @@ +################################################################################ +# Package: DerivationFrameworkTrigger +################################################################################ + +# Declare the package name: +atlas_subdir( DerivationFrameworkTrigger ) + +# Declare the package's dependencies: +atlas_depends_on_subdirs( PUBLIC + Control/AthenaBaseComps + GaudiKernel + PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces + Trigger/TrigCost/EnhancedBiasWeighter + Trigger/TrigAnalysis/TrigAnalysisInterfaces + PRIVATE + Event/xAOD/xAODEventInfo + Tools/PathResolver + External/AtlasROOT) + +# Install files from the package: +atlas_install_python_modules( python/*.py ) +atlas_install_joboptions( share/*.py ) + diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/DerivationFrameworkTrigger/EnhancedBiasAugmentationTool.h b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/DerivationFrameworkTrigger/EnhancedBiasAugmentationTool.h new file mode 100644 index 000000000000..544f1a834287 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/DerivationFrameworkTrigger/EnhancedBiasAugmentationTool.h @@ -0,0 +1,48 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// EnhancedBiasAugmentationTool.h, (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + +#ifndef DERIVATIONFRAMEWORK_ENHANCEDBIASAUGMENTATIONTOOL_H +#define DERIVATIONFRAMEWORK_ENHANCEDBIASAUGMENTATIONTOOL_H + +#include <string> +#include <map> +#include <cstdint> + +#include "GaudiKernel/ToolHandle.h" +#include "AthenaBaseComps/AthAlgTool.h" +#include "DerivationFrameworkInterfaces/IAugmentationTool.h" +#include "TrigCostMonitor/ReadLumiBlock.h" +#include "TrigAnalysisInterfaces/IBunchCrossingTool.h" + +namespace DerivationFramework { + + class EnhancedBiasAugmentationTool : public AthAlgTool, public IAugmentationTool { + public: + EnhancedBiasAugmentationTool(const std::string& t, const std::string& n, const IInterface* p); + virtual StatusCode addBranches() const; + virtual StatusCode initialize(); + + + private: + void loadWeights(); + void loadLumi(); + template <class T> T stringToNum(const std::string& i, T typeOfClass) const; + + ToolHandle<Trig::IBunchCrossingTool> m_bcTool; + + int32_t m_runNumber; + std::map<int32_t, uint32_t> m_eventNumberToIdMap; //!< Used to cache & map EventNumber to weight-ID + std::map<uint32_t, float> m_idToWeightMap; //!< Cache & map weight-ID to weight. TODO, move to 46bit, but also need to update some XMLs + std::map<uint32_t, char> m_idToUnbiasedMap; //!< Cache & map weight-ID to unbiased flag + mutable Trig::ReadLumiBlock m_readLumiBlock; //!< Cache lumi block lengths TODO - not actually modified, but without a const accessor + std::map<uint32_t, uint32_t> m_eventsPerLB; //!< Cache & map enhanced bias events per LB + std::map<uint32_t, char> m_goodLB; //!< Cache & map "good run list" like mechanism for rates + }; +} + +#endif // DERIVATIONFRAMEWORK_ENHANCEDBIASAUGMENTATIONTOOL_H diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/python/TrigThinningHelper.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/python/TrigThinningHelper.py new file mode 100644 index 000000000000..436e0a7e7142 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/python/TrigThinningHelper.py @@ -0,0 +1,161 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +#################################################################### +# TrigThinningHelper.py +# James.Catmore@cern.ch +# Ryan.White@cern.ch +# This is a helper class to hide the details of the thinning service +# configuration from the derivation job options. +# The code does three things: +# (1) establishes a thinning service for a given stream provided by +# the user +# (2) sets up trigger navigation thinning +# (3) passes the thinning service back to the job options on request +# For use for trigger studies for AOD +#################################################################### + +# Needed import(s): +import AthenaCommon.CfgMgr as CfgMgr +from AthenaServices.Configurables import ThinningSvc as AthThinningSvc + +## Custom specialisation of the core ThinningSvc configurable +# +# Unfortunately the ThinningSvc configurable in AthenaServices was not written +# with extendability in mind. So in order to change its behaviour, one must +# inherit from it. As most of the settings made by that class are only made +# after the jobOption code is already done executing... +# +class WorkerThinningSvc( AthThinningSvc ): + + def __init__( self, name, athStream, navThinSvc, **kwargs ): + + # Remember the object's properties: + self.athStream = athStream + self.navThinSvc = navThinSvc + # Set up a logger object: + from AthenaCommon.Logging import logging + self.log = logging.getLogger( name ) + # Call the initialisation of the base class: + AthThinningSvc.__init__( self, name, **kwargs ) + return + + ## Function overriding the one defined in Configurable + # + # This is probably not the very best design, but because of how weirdly + # ThinningSvc.setDefaults(...) is implemented, this seemed to be the best + # way to tweak the configuration made by that function. + # + def setup( self ): + + # Let the base class do all of its setup functions + super( WorkerThinningSvc, self ).setup() + + # Make the stream talk to this service: + toolFound = False + for tool in self.athStream.HelperTools: + # Check whether there's a tool of this type already attached + # to the stream. If there is, it should start talking to the + # navigation thinning service from now on: + if not isinstance( tool, CfgMgr.ThinningOutputTool ): + continue + tool.ThinningSvc = self.navThinSvc + toolFound = True + self.log.info( "Updated the existing ThinningOutputTool to point at" + " the TrigNavigationThinningSvc instance" ) + pass + if not toolFound: + # If there was no such tool yet, let's create one from scratch: + stream.HelperTools.insert( 0, + CfgMgr.ThinningOutputTool( formatName + + "ThinningOutputTool", + ThinningSvc = self.navThinSvc ) ) + self.log.warning( "No ThinningOutputTool found for the output " + "stream" ) + self.log.warning( "Configured one now, job will likely be " + "faulty..." ) + pass + + return + +## Class helping to set up (navigation) thinning in derivation jobs +# +# In order to hide the complexity of using navigation thinning from the users, +# this helper class should be used in derivation jobs instead of the code +# provided by AthenaServices, to set up a functional thinning service for a +# given output stream. +# +# The usage is that the user creates an instance of the class, configures it, +# and then calls its AppendToStream(...) function on the (augmented) stream +# (coming from MSMgr.NewPoolRootStream(...)) that the thinning should be set +# up on. +# +class ThinningHelper: + + ## Constructor, creating a default instance of the object + # + # @param helperName The instance name of this helper object + # + def __init__( self, helperName, edmList, mode ): + from AthenaCommon.AppMgr import ServiceMgr as svcMgr + self.helperName = helperName + self.TriggerChains = "" + self.worker = None + self.edmList = edmList + self.mode = mode + from AthenaCommon.Logging import logging + self.log = logging.getLogger( "ThinningHelper" ) + return + + ## Function creating the correct thinning service + # + # This function needs to be called on the output stream that thinning + # is to be applied for. It creates the correct thinning service + # infrastructure for the stream, and configures trigger navigation + # thinning if that was requested. + # + # @param augmentedStream The augmented stream object returned by + # MultipleStreamManager + # + def AppendToStream( self, augmentedStream ): + # Access the stream object: + stream = augmentedStream.GetEventStream() + # Get the name of the "format": + formatName = stream.name().strip( "StreamDAOD_" ) + # The necessary import(s): + from AthenaCommon.AppMgr import ServiceMgr as svcMgr + from AthenaServices.Configurables import createThinningSvc + + # Let's create the navigation thinning service first. Notice that its + # 'WorkerThinningSvc' property is not getting set at this point yet. + svcMgr += CfgMgr.TrigNavigationThinningSvc( formatName + + "ThinningSvc" ) + thinningSvc = getattr( svcMgr, formatName + "ThinningSvc" ) + + # Now set up the worker thinning service: + svcMgr += WorkerThinningSvc( formatName + "NavThinningWorkerSvc", + athStream = stream, + navThinSvc = thinningSvc, + Streams = [ stream.name() ] ) + self.worker = getattr( svcMgr, formatName + "NavThinningWorkerSvc" ) + + # And now point the navigation thinning service to the worker: + thinningSvc.WorkerThinningSvc = self.worker + + from TrigNavTools.TrigNavToolsConfig import slimmingTool + sTool = slimmingTool( { 'name' : self.helperName, + 'features' : self.edmList, + 'chains' : self.TriggerChains, + 'mode' : self.mode, + 'ThinningSvc' : thinningSvc } ) + thinningSvc.SlimmingTool = sTool + return + + ## Convenience function returning the thinning service + # + # This is the thinning service that needs to be passed to "normal" + # thinning tools to operate on. + # + # @returns The thinning service that tools should operate on + # + def ThinningSvc( self ): + return self.worker diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/python/__init__.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/python/__init__.py new file mode 100644 index 000000000000..74583d364ec2 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/python/__init__.py @@ -0,0 +1,2 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/share/TRIG1.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/share/TRIG1.py new file mode 100644 index 000000000000..e27a204bb7ec --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/share/TRIG1.py @@ -0,0 +1,98 @@ +#==================================================================== +# TRIG1.py +# For use in menuXtreme +#==================================================================== +# Set up common services and job object. +# This should appear in ALL derivation job options +from DerivationFrameworkCore.DerivationFrameworkMaster import * +#==================================================================== +# FIND THE RUN NUMBER (NEEDED TO LOCATE XMLs) +#==================================================================== +import PyUtils.AthFile as athFile +from AthenaCommon.AthenaCommonFlags import athenaCommonFlags +af = athFile.fopen(svcMgr.EventSelector.InputCollections[0]) +run_number = af.run_number[0] +#==================================================================== +# SETUP BUNCH CROSSING TOOL - WE WILL ALWAYS RUN OVER EB DATA +#==================================================================== +from AthenaCommon.GlobalFlags import globalflags +isMC = 'IS_SIMULATION' in af.fileinfos['evt_type'] +#globalflags.DataSource = 'data' +globalflags.DatabaseInstance = 'CONDBR2' +from TrigBunchCrossingTool.BunchCrossingTool import BunchCrossingTool +if isMC: ToolSvc += BunchCrossingTool( "MC" ) +else: ToolSvc += BunchCrossingTool( "LHC" ) +#==================================================================== +# SKIMMING TOOLS +#==================================================================== +# Set up your skimming tools (you can have as many as you need). +# The tools must use the DerivationFrameworkInterfaces as in this example. +# Currently no skimming - keep all events +#==================================================================== +# AUGMENTATION TOOLS +# Used to decorate enhanced bias weighting quantites for rate estimations +#==================================================================== +# +# TODO this doesn't work - component not yet exposed +from EnhancedBiasWeighter.EnhancedBiasWeighterConf import EnhancedBiasWeighter +TRIG1AugmentationTool = EnhancedBiasWeighter(name = "TRIG1AugmentationTool") +TRIG1AugmentationTool.RunNumber = run_number +TRIG1AugmentationTool.UseBunchCrossingTool = True +# These are needed for MC rates +#TRIG1AugmentationTool.MCCrossSection = xxx +#TRIG1AugmentationTool.MCFilterEfficiency = xxx +#TRIG1AugmentationTool.MCKFactor = xxx +ToolSvc += TRIG1AugmentationTool +print TRIG1AugmentationTool +#==================================================================== +# CREATE THE DERIVATION KERNEL ALGORITHM AND PASS THE ABOVE TOOLS +#==================================================================== +# The name of the kernel (LooseSkimKernel in this case) must be unique to this +# derivation +from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel +DerivationFrameworkJob += CfgMgr.DerivationFramework__DerivationKernel("TRIG1Kernel", +SkimmingTools = [], +AugmentationTools = [TRIG1AugmentationTool]) +#==================================================================== +# SET UP STREAM +#==================================================================== +# SKIMMING +# The base name (DAOD_TRIG1 here) must match the string in +# DerivationFrameworkProdFlags (in DerivationFrameworkCore) +streamName = derivationFlags.WriteDAOD_TRIG1Stream.StreamName +fileName = buildFileName( derivationFlags.WriteDAOD_TRIG1Stream ) +TRIG1Stream = MSMgr.NewPoolRootStream( streamName, fileName ) +# Only events that pass the filters listed below are written out. +# Name must match that of the kernel above +# AcceptAlgs = logical OR of filters +# RequireAlgs = logical AND of filters +TRIG1Stream.AcceptAlgs(["TRIG1Kernel"]) +#==================================================================== +# CONTENT LIST +#==================================================================== +from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper +TRIG1SlimmingHelper = SlimmingHelper("TRIG1SlimmingHelper") +##Smart Slimming +TRIG1SlimmingHelper.SmartCollections = [ +] +TRIG1SlimmingHelper.AllVariables = [ + "LVL1EmTauRoIs", + "LVL1EnergySumRoIs", + "LVL1JetEtRoIs", + "LVL1JetRoIs", + "LVL1MuonRoIs", + "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_topocl_PS", + "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_topocl_PUC", + "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_mht", + "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_topocl", + "HLT_xAOD__JetContainer_a4tclcwsubjesFS", +] +TRIG1SlimmingHelper.IncludeMuonTriggerContent = True +TRIG1SlimmingHelper.IncludeEGammaTriggerContent = True +TRIG1SlimmingHelper.IncludeJetTriggerContent = True +TRIG1SlimmingHelper.IncludeTauTriggerContent = True +TRIG1SlimmingHelper.IncludeEtMissTriggerContent = True +TRIG1SlimmingHelper.IncludeBJetTriggerContent = True +TRIG1SlimmingHelper.IncludeBPhysTriggerContent = True +TRIG1SlimmingHelper.IncludeMinBiasTriggerContent = True +TRIG1SlimmingHelper.AppendContentToStream(TRIG1Stream) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/share/TRIG2.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/share/TRIG2.py new file mode 100644 index 000000000000..e4baf81f8420 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/share/TRIG2.py @@ -0,0 +1,66 @@ +#==================================================================== +# TRIG2.py +# For use to study xAOD reduction based on AODSets defined in TriggerEDM +# Creates derivation from AODFull +#==================================================================== +# Set up common services and job object. +# This should appear in ALL derivation job options +from DerivationFrameworkCore.DerivationFrameworkMaster import * +#==================================================================== +# SKIMMING TOOLS +#==================================================================== +# Set up your skimming tools (you can have as many as you need). +# The tools must use the DerivationFrameworkInterfaces as in this example. +# Currently no skimming - keep all events +#==================================================================== +# AUGMENTATION TOOLS +#==================================================================== +# CREATE THE DERIVATION KERNEL ALGORITHM AND PASS THE ABOVE TOOLS +#==================================================================== +# The name of the kernel (TRIG2 in this case) must be unique to this +# derivation +from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel +DerivationFrameworkJob += CfgMgr.DerivationFramework__DerivationKernel("TRIG2Kernel") + +# First define the content list from TriggerEDM + +# Configure collection list via TriggerEDM.py +from TrigEDMConfig.TriggerEDM import getTriggerEDMList +edmlist=[] +for item in getTriggerEDMList('AODFULL',2): + edmlist.extend(getTriggerEDMList('AODFULL',2)[item]) +edmlist.remove('TrigNavigation') +edmlist.remove('TrigConfKeys') +#from DerivationFrameworkCore.CompulsoryContent import * +#edmlist(set(CompulsoryTriggerNavigation)) +#edmlist(set()) +#==================================================================== +# SET UP STREAM +#==================================================================== +# SKIMMING +# The base name (DAOD_TRIG2 here) must match the string in +# DerivationFrameworkProdFlags (in DerivationFrameworkCore) +streamName = derivationFlags.WriteDAOD_TRIG2Stream.StreamName +fileName = buildFileName( derivationFlags.WriteDAOD_TRIG2Stream ) +TRIG2Stream = MSMgr.NewPoolRootStream( streamName, fileName ) +# Only events that pass the filters listed below are written out. +# Name must match that of the kernel above +# AcceptAlgs = logical OR of filters +# RequireAlgs = logical AND of filters +TRIG2Stream.AcceptAlgs(["TRIG2Kernel"]) + +# Thinning +from DerivationFrameworkTrigger.TrigThinningHelper import ThinningHelper +TRIG2ThinningHelper = ThinningHelper("TRIG2ThinningHelper",edmlist,'slimming') +TRIG2ThinningHelper.AppendToStream(TRIG2Stream) + +#==================================================================== +# CONTENT LIST +#==================================================================== +from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper +TRIG2SlimmingHelper = SlimmingHelper("TRIG2SlimmingHelper") +##Smart Slimming +TRIG2SlimmingHelper.SmartCollections = [ +] +TRIG2SlimmingHelper.AllVariables = edmlist +TRIG2SlimmingHelper.AppendContentToStream(TRIG2Stream) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/share/TRIG3.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/share/TRIG3.py new file mode 100644 index 000000000000..c233c39a5295 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/share/TRIG3.py @@ -0,0 +1,65 @@ +#==================================================================== +# TRIG3.py +# For use to study xAOD reduction based on AODSets defined in TriggerEDM +# Creates derivation from AODSlim +#==================================================================== +# Set up common services and job object. +# This should appear in ALL derivation job options +from DerivationFrameworkCore.DerivationFrameworkMaster import * +#==================================================================== +# SKIMMING TOOLS +#==================================================================== +# Set up your skimming tools (you can have as many as you need). +# The tools must use the DerivationFrameworkInterfaces as in this example. +# Currently no skimming - keep all events +#==================================================================== +# AUGMENTATION TOOLS +#==================================================================== +# CREATE THE DERIVATION KERNEL ALGORITHM AND PASS THE ABOVE TOOLS +#==================================================================== +# The name of the kernel (TRIG2 in this case) must be unique to this +# derivation +from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel +DerivationFrameworkJob += CfgMgr.DerivationFramework__DerivationKernel("TRIG3Kernel") + +# First define the content list from TriggerEDM + +# Configure collection list via TriggerEDM.py +from TrigEDMConfig.TriggerEDM import getTriggerEDMList +edmlist=[] +for item in getTriggerEDMList('AODSLIM',2): + edmlist.extend(getTriggerEDMList('AODSLIM',2)[item]) +edmlist.remove('TrigNavigation') +edmlist.remove('TrigConfKeys') +#from DerivationFrameworkCore.CompulsoryContent import * +#edmlist(set(CompulsoryTriggerNavigation)) +#edmlist(set()) +#==================================================================== +# SET UP STREAM +#==================================================================== +# SKIMMING +# The base name (DAOD_TRIG3 here) must match the string in +# DerivationFrameworkProdFlags (in DerivationFrameworkCore) +streamName = derivationFlags.WriteDAOD_TRIG3Stream.StreamName +fileName = buildFileName( derivationFlags.WriteDAOD_TRIG3Stream ) +TRIG3Stream = MSMgr.NewPoolRootStream( streamName, fileName ) +# Only events that pass the filters listed below are written out. +# Name must match that of the kernel above +# AcceptAlgs = logical OR of filters +# RequireAlgs = logical AND of filters +TRIG3Stream.AcceptAlgs(["TRIG3Kernel"]) + +# Thinning +from DerivationFrameworkTrigger.TrigThinningHelper import ThinningHelper +TRIG3ThinningHelper = ThinningHelper("TRIG3ThinningHelper",edmlist,'slimming') +TRIG3ThinningHelper.AppendToStream(TRIG3Stream) + +#==================================================================== +# CONTENT LIST +#==================================================================== +from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper +TRIG3SlimmingHelper = SlimmingHelper("TRIG3SlimmingHelper") +##Smart Slimming +TRIG3SlimmingHelper.SmartCollections = [] +TRIG3SlimmingHelper.AllVariables = edmlist +TRIG3SlimmingHelper.AppendContentToStream(TRIG3Stream) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/share/TRIG4.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/share/TRIG4.py new file mode 100644 index 000000000000..ed93901def8a --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTrigger/share/TRIG4.py @@ -0,0 +1,65 @@ +#==================================================================== +# TRIG4.py +# For use to study xAOD reduction based on AODSets defined in TriggerEDM +# Creates derivation from AODSuperSlim +#==================================================================== +# Set up common services and job object. +# This should appear in ALL derivation job options +from DerivationFrameworkCore.DerivationFrameworkMaster import * +#==================================================================== +# SKIMMING TOOLS +#==================================================================== +# Set up your skimming tools (you can have as many as you need). +# The tools must use the DerivationFrameworkInterfaces as in this example. +# Currently no skimming - keep all events +#==================================================================== +# AUGMENTATION TOOLS +#==================================================================== +# CREATE THE DERIVATION KERNEL ALGORITHM AND PASS THE ABOVE TOOLS +#==================================================================== +# The name of the kernel (TRIG2 in this case) must be unique to this +# derivation +from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel +DerivationFrameworkJob += CfgMgr.DerivationFramework__DerivationKernel("TRIG4Kernel") + +# First define the content list from TriggerEDM + +# Configure collection list via TriggerEDM.py +from TrigEDMConfig.TriggerEDM import getTriggerEDMList +edmlist=[] +for item in getTriggerEDMList('AODSUPERSLIM',2): + edmlist.extend(getTriggerEDMList('AODSUPERSLIM',2)[item]) +edmlist.remove('TrigNavigation') +edmlist.remove('TrigConfKeys') +#from DerivationFrameworkCore.CompulsoryContent import * +#edmlist(set(CompulsoryTriggerNavigation)) +#edmlist(set()) +#==================================================================== +# SET UP STREAM +#==================================================================== +# SKIMMING +# The base name (DAOD_TRIG4 here) must match the string in +# DerivationFrameworkProdFlags (in DerivationFrameworkCore) +streamName = derivationFlags.WriteDAOD_TRIG4Stream.StreamName +fileName = buildFileName( derivationFlags.WriteDAOD_TRIG4Stream ) +TRIG4Stream = MSMgr.NewPoolRootStream( streamName, fileName ) +# Only events that pass the filters listed below are written out. +# Name must match that of the kernel above +# AcceptAlgs = logical OR of filters +# RequireAlgs = logical AND of filters +TRIG4Stream.AcceptAlgs(["TRIG4Kernel"]) + +# Thinning +from DerivationFrameworkTrigger.TrigThinningHelper import ThinningHelper +TRIG4ThinningHelper = ThinningHelper("TRIG4ThinningHelper",edmlist,'slimming') +TRIG4ThinningHelper.AppendToStream(TRIG4Stream) + +#==================================================================== +# CONTENT LIST +#==================================================================== +from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper +TRIG4SlimmingHelper = SlimmingHelper("TRIG4SlimmingHelper") +##Smart Slimming +TRIG4SlimmingHelper.SmartCollections = [] +TRIG4SlimmingHelper.AllVariables = edmlist +TRIG4SlimmingHelper.AppendContentToStream(TRIG4Stream) diff --git a/Trigger/TrigCost/EnhancedBiasWeighter/CMakeLists.txt b/Trigger/TrigCost/EnhancedBiasWeighter/CMakeLists.txt index 87b48eafd727..2654ace712c9 100644 --- a/Trigger/TrigCost/EnhancedBiasWeighter/CMakeLists.txt +++ b/Trigger/TrigCost/EnhancedBiasWeighter/CMakeLists.txt @@ -6,36 +6,48 @@ atlas_subdir( EnhancedBiasWeighter ) # Declare the package's dependencies: -atlas_depends_on_subdirs( - PUBLIC - Control/AthToolSupport/AsgTools - Event/xAOD/xAODEventInfo - GaudiKernel - PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces - Trigger/TrigAnalysis/TrigAnalysisInterfaces - PRIVATE - Tools/PathResolver ) +atlas_depends_on_subdirs( PUBLIC + Control/AthToolSupport/AsgTools + Event/xAOD/xAODEventInfo + GaudiKernel + PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces + Trigger/TrigAnalysis/TrigAnalysisInterfaces + PRIVATE + AtlasTest/TestTools + Tools/PathResolver ) # External dependencies: find_package( COOL COMPONENTS CoolKernel CoolApplication ) find_package( CORAL COMPONENTS CoralKernel ) find_package( ROOT COMPONENTS XMLIO XMLParser Core ) +find_package( LibXml2 ) + +# tag NEEDS_CORAL_BASE was not recognized in automatic conversion in cmt2cmake # Component(s) in the package: atlas_add_library( EnhancedBiasWeighterLib - EnhancedBiasWeighter/*.h Root/*.cxx - PUBLIC_HEADERS EnhancedBiasWeighter - INCLUDE_DIRS ${COOL_INCLUDE_DIRS} - PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - LINK_LIBRARIES ${COOL_LIBRARIES} AsgTools xAODEventInfo GaudiKernel - DerivationFrameworkInterfaces TrigAnalysisInterfaces - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} PathResolver ) + Root/*.cxx + PUBLIC_HEADERS EnhancedBiasWeighter + INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIR} + PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} + LINK_LIBRARIES ${COOL_LIBRARIES} AsgTools xAODEventInfo GaudiKernel ${LIBXML2_LIBRARIES} + PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} TestTools PathResolver ) atlas_add_component( EnhancedBiasWeighter - src/components/*.cxx - LINK_LIBRARIES GaudiKernel EnhancedBiasWeighterLib ) + src/components/*.cxx + INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIR} + LINK_LIBRARIES ${COOL_LIBRARIES} ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} ${LIBXML2_LIBRARIES} AsgTools xAODEventInfo GaudiKernel TestTools PathResolver EnhancedBiasWeighterLib ) atlas_add_dictionary( EnhancedBiasWeighterDict - EnhancedBiasWeighter/EnhancedBiasWeighterDict.h - EnhancedBiasWeighter/selection.xml - LINK_LIBRARIES EnhancedBiasWeighterLib ) + EnhancedBiasWeighter/EnhancedBiasWeighterDict.h + EnhancedBiasWeighter/selection.xml + INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIR} + LINK_LIBRARIES ${COOL_LIBRARIES} ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} ${LIBXML2_LIBRARIES} AsgTools xAODEventInfo GaudiKernel TestTools PathResolver EnhancedBiasWeighterLib ) + +# No tests at the moment +#atlas_add_test( ut_EnhancedBiasWeighter_test +# SOURCES +# test/ut_EnhancedBiasWeighter_test.cxx +# INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIR} +# LINK_LIBRARIES ${COOL_LIBRARIES} ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} ${LIBXML2_LIBRARIES} AsgTools xAODEventInfo GaudiKernel TestTools PathResolver EnhancedBiasWeighterLib ) + diff --git a/Trigger/TrigCost/EnhancedBiasWeighter/src/components/EnhancedBiasWeighter_entries.cxx b/Trigger/TrigCost/EnhancedBiasWeighter/src/components/EnhancedBiasWeighter_entries.cxx index 24dd780ce519..169a998ff414 100644 --- a/Trigger/TrigCost/EnhancedBiasWeighter/src/components/EnhancedBiasWeighter_entries.cxx +++ b/Trigger/TrigCost/EnhancedBiasWeighter/src/components/EnhancedBiasWeighter_entries.cxx @@ -1,4 +1,7 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + #include "EnhancedBiasWeighter/EnhancedBiasWeighter.h" DECLARE_COMPONENT( EnhancedBiasWeighter ) - diff --git a/Trigger/TrigCost/RatesAnalysis/RatesAnalysis/RatesAnalysisAlg.h b/Trigger/TrigCost/RatesAnalysis/RatesAnalysis/RatesAnalysisAlg.h index 950d709e967f..58da2957e528 100644 --- a/Trigger/TrigCost/RatesAnalysis/RatesAnalysis/RatesAnalysisAlg.h +++ b/Trigger/TrigCost/RatesAnalysis/RatesAnalysis/RatesAnalysisAlg.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #ifndef RATESANALYSIS_RATESANALYSISALG_H @@ -256,7 +256,6 @@ class RatesAnalysisAlg: public ::AthAnalysisAlgorithm { double m_targetBunches; //!< How many bunches the prediction is targeting double m_targetLumi; //!< What instantaneous luminosity the prediction is targeting double m_expoScalingFactor; //!< Exponential factor for exponential-in-mu chains - bool m_populatedTriggers; //!< Set to true once we enter the event loop. No new triggers can be added from this point. bool m_doUniqueRates; //!< What rate is unique to each trigger. More computationally taxing. bool m_useBunchCrossingTool; //!< If rates should be done vs. position in the train. Requires DB access bool m_currentEventIsUnbiased; //!< If the current event was triggered online by RDx or not. Random seeded HLT chains must only see these diff --git a/Trigger/TrigCost/RatesAnalysis/RatesAnalysis/RatesGroup.h b/Trigger/TrigCost/RatesAnalysis/RatesAnalysis/RatesGroup.h index 38830ab758d6..fc4abbb8bc1c 100644 --- a/Trigger/TrigCost/RatesAnalysis/RatesAnalysis/RatesGroup.h +++ b/Trigger/TrigCost/RatesAnalysis/RatesAnalysis/RatesGroup.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #ifndef RATESANALYSIS_RATESTGROUP_H diff --git a/Trigger/TrigCost/RatesAnalysis/RatesAnalysis/RatesHistoBase.h b/Trigger/TrigCost/RatesAnalysis/RatesAnalysis/RatesHistoBase.h index 9ada0d677e78..6e888eddde79 100644 --- a/Trigger/TrigCost/RatesAnalysis/RatesAnalysis/RatesHistoBase.h +++ b/Trigger/TrigCost/RatesAnalysis/RatesAnalysis/RatesHistoBase.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #ifndef RATESANALYSIS_RATESHISTOBASE_H @@ -80,9 +80,9 @@ class RatesHistoBase { RatesHistoBase(const std::string& name, const MsgStream& log, const bool doHistograms = true); virtual ~RatesHistoBase(); - TH1D* getMuHist() const; //!< @return histogram pointer or nullptr and an error - TH1D* getDataHist() const; //!< @return histogram pointer or nullptr. Does not cause error - TH1D* getTrainHist() const; //!< @return histogram pointer or nullptr and an error + TH1D* getMuHist(bool clientIsTHistSvc = false); //!< @return histogram pointer or nullptr and an error + TH1D* getDataHist(bool clientIsTHistSvc = false); //!< @return histogram pointer or nullptr. Does not cause error + TH1D* getTrainHist(bool clientIsTHistSvc = false); //!< @return histogram pointer or nullptr and an error virtual void normaliseHist(const double ratesDenominator); //!< Normalise to walltime to get rate. bool doHistograms() const { return m_doHistograms; } //!< If histogramming was enabled in this rates object @@ -90,10 +90,14 @@ class RatesHistoBase { protected: + std::string m_name; //!< My name bool m_doHistograms; //!< If histogramming is switched on TH1D* m_rateVsMu; //!< Histogram of rate as a fn. of the input event's mu TH1D* m_rateVsTrain; //!< Histogram of rate as a fn. of position in bunch train TH1D* m_data; //!< Histogram of raw rates quantites, for when we need to normalise offline (e.g. grid processing) + bool m_givenRateVsMu; //!< m_rateVsMu has been given to the THistSvc and should not be deleted + bool m_givenRateVsTrain; //!< m_rateVsTrain has been given to the THistSvc and should not be deleted + bool m_givenData; //!< m_data has been given to the THistSvc and should not be deleted static uint32_t m_histoID; //!< Give every histo a unique name using this mutable MsgStream m_log; //!< For ATHENA messaging diff --git a/Trigger/TrigCost/RatesAnalysis/RatesAnalysis/RatesScanTrigger.h b/Trigger/TrigCost/RatesAnalysis/RatesAnalysis/RatesScanTrigger.h index 4fa43fc8e092..b1966f7b6929 100644 --- a/Trigger/TrigCost/RatesAnalysis/RatesAnalysis/RatesScanTrigger.h +++ b/Trigger/TrigCost/RatesAnalysis/RatesAnalysis/RatesScanTrigger.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #ifndef RATESANALYSIS_RATESSCANTRIGGER_H @@ -100,11 +100,12 @@ class RatesScanTrigger : public RatesTrigger { */ const std::string printRate(const double ratesDenominator) const override; - TH1D* getThresholdHist() const { return m_rateScanHist; } //!< Get a pointer to the rate as a fn. of threshold + TH1D* getThresholdHist(bool clientIsTHistSvc = false); //!< Get a pointer to the rate as a fn. of threshold private: TH1D* m_rateScanHist; //!< Even if we are not exporting it - we still need this histo + bool m_givenRateScanHist; //!< m_rateScanHist has been given to the THistSvc and should not be deleted double m_thresholdPassed; //!< Analogous to m_pass. This is the threshold that the trigger passed in the event TriggerBehaviour_t m_behaviour; //!< If we need to be above or below the threshold to cause the trigger to fire diff --git a/Trigger/TrigCost/RatesAnalysis/RatesAnalysis/RatesTrigger.h b/Trigger/TrigCost/RatesAnalysis/RatesAnalysis/RatesTrigger.h index 43660f28591e..8f0279b1a6ad 100644 --- a/Trigger/TrigCost/RatesAnalysis/RatesAnalysis/RatesTrigger.h +++ b/Trigger/TrigCost/RatesAnalysis/RatesAnalysis/RatesTrigger.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #ifndef RATESANALYSIS_RATESTRIGGER_H diff --git a/Trigger/TrigCost/RatesAnalysis/share/RatesAnalysis_test.ref b/Trigger/TrigCost/RatesAnalysis/share/RatesAnalysis_test.ref index 19bb75bb3854..2646787b78d0 100644 --- a/Trigger/TrigCost/RatesAnalysis/share/RatesAnalysis_test.ref +++ b/Trigger/TrigCost/RatesAnalysis/share/RatesAnalysis_test.ref @@ -1,6 +1,6 @@ -Rate: 30050 +- 25495.1 Hz : SeedA [PS:2] -> TriggerA1 [PS:1] -Rate: 15000 +- 12747.5 Hz : SeedA [PS:2] -> TriggerA2 [PS:2] -Rate: 4591.67 +- 4187.46 Hz : SeedB [PS:4] -> TriggerB1 [PS:3] -Rate: 3437.5 +- 3140.59 Hz : SeedB [PS:4] -> TriggerB2 [PS:4] +Rate: 30050 +- 25495.1 Hz : TriggerA1 [PS:1] <- SeedA [PS:2] +Rate: 15000 +- 12747.5 Hz : TriggerA2 [PS:2] <- SeedA [PS:2] +Rate: 4591.67 +- 4187.46 Hz : TriggerB1 [PS:3] <- SeedB [PS:4] +Rate: 3437.5 +- 3140.59 Hz : TriggerB2 [PS:4] <- SeedB [PS:4] RateOR: 30050 +- 25495.1 Hz, RateAND: 15000 +- 12747.5 Hz : GroupA -RateOR: 6883.33 +- 6281.18 Hz, RateAND: 1145.83 +- 1046.86 Hz : GroupB \ No newline at end of file +RateOR: 6883.33 +- 6281.18 Hz, RateAND: 1145.83 +- 1046.86 Hz : GroupB diff --git a/Trigger/TrigCost/RatesAnalysis/src/RatesAnalysisAlg.cxx b/Trigger/TrigCost/RatesAnalysis/src/RatesAnalysisAlg.cxx index 823b9a8d4b27..8eeff4c31927 100644 --- a/Trigger/TrigCost/RatesAnalysis/src/RatesAnalysisAlg.cxx +++ b/Trigger/TrigCost/RatesAnalysis/src/RatesAnalysisAlg.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ // RatesAnalysis includes @@ -17,11 +17,10 @@ RatesAnalysisAlg::RatesAnalysisAlg( const std::string& name, ISvcLocator* pSvcLocator ) : AthAnalysisAlgorithm( name, pSvcLocator ), m_enhancedBiasRatesTool("EnhancedBiasWeighter/EnhancedBiasRatesTool"), - m_tdt("Trig::TrigDecisionTool"), + m_tdt("Trig::TrigDecisionTool/TrigDecisionTool"), m_targetMu(0.), m_targetBunches(0.), m_targetLumi(0.), - m_populatedTriggers(false), m_ratesDenominator(0), m_eventCounter(0), m_weightedEventCounter(0), @@ -43,6 +42,9 @@ RatesAnalysisAlg::RatesAnalysisAlg( const std::string& name, ISvcLocator* pSvcLo declareProperty("MCFilterEfficiency", m_mcFilterEfficiency = 0, "If running over MC. The process filter efficiency (0.0-1.0). Required."); declareProperty("MCKFactor", m_mcKFactor = 1., "If running over MC. Higher-order corrections fudge factor to the cross section. Optional."); declareProperty("InelasticCrossSection", m_inelasticCrossSection = 8e-26, "Inelastic cross section in units cm^2. Default 80 mb at 13 TeV."); + + declareProperty( "TrigDecisionTool", m_tdt, "The tool to access TrigDecision" ); + declareProperty( "EnhancedBiasRatesTool", m_enhancedBiasRatesTool, "The tool to access enhanced bias weighting data" ); } RatesAnalysisAlg::~RatesAnalysisAlg() {} @@ -64,8 +66,7 @@ StatusCode RatesAnalysisAlg::newScanTrigger(const std::string& name, } const ExtrapStrat_t e = (m_enableLumiExtrapolation ? extrapolation : ExtrapStrat_t::kNONE); - - m_scanTriggers.emplace(std::make_pair(name, RatesScanTrigger(name, msg(), thresholdMin, thresholdMax, thresholdBins, behaviour, prescale, seedName, seedPrecale, e))); + m_scanTriggers.emplace(std::piecewise_construct, std::forward_as_tuple(name), std::forward_as_tuple(name, msg(), thresholdMin, thresholdMax, thresholdBins, behaviour, prescale, seedName, seedPrecale, e)); RatesScanTrigger* newScanTrigger = &(m_scanTriggers.at(name)); if (isRandomSeed(name, seedName)) newScanTrigger->setSeedsFromRandom(true); ATH_MSG_DEBUG("newScanTrigger " << name << " added"); @@ -89,7 +90,7 @@ StatusCode RatesAnalysisAlg::newScanTrigger(const std::string& name, const ExtrapStrat_t e = (m_enableLumiExtrapolation ? extrapolation : ExtrapStrat_t::kNONE); - m_scanTriggers.emplace(std::make_pair(name, RatesScanTrigger(name, msg(), thresholdBinEdges, behaviour, prescale, seedName, seedPrecale, e))); + m_scanTriggers.emplace(std::piecewise_construct, std::forward_as_tuple(name), std::forward_as_tuple(name, msg(), thresholdBinEdges, behaviour, prescale, seedName, seedPrecale, e)); RatesScanTrigger* newScanTrigger = &(m_scanTriggers.at(name)); if (isRandomSeed(name, seedName)) newScanTrigger->setSeedsFromRandom(true); ATH_MSG_DEBUG("newScanTrigger " << name << " added"); @@ -126,7 +127,7 @@ StatusCode RatesAnalysisAlg::newTrigger(const std::string& name, const Method_t method, const ExtrapStrat_t extrapolation) { - if (m_populatedTriggers) { // All triggers must be defined before we start looping over the sample + if (m_eventCounter > 0) { // All triggers must be defined before we start looping over the sample ATH_MSG_FATAL("Too late to call newTrigger. All emulated triggers must be registered during ratesInitialize()."); return StatusCode::FAILURE; } @@ -141,7 +142,7 @@ StatusCode RatesAnalysisAlg::newTrigger(const std::string& name, const ExtrapStrat_t e = (m_enableLumiExtrapolation ? extrapolation : ExtrapStrat_t::kNONE); - m_triggers.emplace(std::make_pair(name, RatesTrigger(name, msg(), prescale, expressPrescale, seedName, seedPrecale, m_doHistograms, e))); + m_triggers.emplace(std::piecewise_construct, std::forward_as_tuple(name), std::forward_as_tuple(name, msg(), prescale, expressPrescale, seedName, seedPrecale, m_doHistograms, e)); RatesTrigger* newTriggerPtr = &(m_triggers.at(name)); if (isRandomSeed(name, seedName)) newTriggerPtr->setSeedsFromRandom(true); @@ -161,7 +162,7 @@ StatusCode RatesAnalysisAlg::newTrigger(const std::string& name, // Add this trigger to its groups for (const std::string& group : groups) { if (m_groups.count(group) == 0) { - m_groups.emplace(std::make_pair(group, RatesGroup(group, msg(), m_doHistograms, m_enableLumiExtrapolation))); + m_groups.emplace(std::piecewise_construct, std::forward_as_tuple(group), std::forward_as_tuple(group, msg(), m_doHistograms, m_enableLumiExtrapolation)); // As the group is formed from at least one active trigger - it must be active itself (counter example - CPS group of a PS=-1 trigger) m_activeGroups.insert( &(m_groups.at(group)) ); } @@ -192,6 +193,7 @@ StatusCode RatesAnalysisAlg::newTrigger(const std::string& name, } StatusCode RatesAnalysisAlg::addAllExisting() { + ATH_CHECK(checkGotTDT()); return addExisting(".*"); } @@ -214,7 +216,7 @@ StatusCode RatesAnalysisAlg::addExisting(const std::string pattern) { const std::string lowerName = (isHLT ? trigConf->lower_chain_name() : ""); const std::set<std::string> groups = (isHLT ? trigConf->groups() : std::set<std::string>()); - //ATH_MSG_INFO(" chain " << trigger << " has " << groups.size() << " groups"); + ATH_MSG_DEBUG(" chain " << trigger << " has " << groups.size() << " groups"); if (isHLT) { // If this is a HLT item, we require it to be seeded by at most one item. This allows us to use a factorising rates algorithm @@ -273,11 +275,16 @@ StatusCode RatesAnalysisAlg::addExisting(const std::string pattern) { } StatusCode RatesAnalysisAlg::checkGotTDT() { - if (!m_tdt.isSet()) { - ATH_MSG_INFO("Setting up TDT"); - ATH_CHECK(m_tdt.retrieve()); - m_tdt->ExperimentalAndExpertMethods()->enable(); - } + // if (!m_tdt.isSet()) { // We used to have to actually fetch the TDT here. Leaving this in should the behaviour change, we can at least confirm the TDT is configured here. + // ATH_MSG_INFO("Setting up TDT"); + // ATH_CHECK(m_tdt.retrieve()); + // m_tdt->ExperimentalAndExpertMethods()->enable(); + // } + static bool printed = false; + if (!printed) ATH_MSG_INFO("TDT contains: " << m_tdt->getListOfTriggers().size() << " triggers, " + << m_tdt->getListOfStreams().size() << " streams and " + << m_tdt->getListOfGroups().size() << " groups."); + printed = true; return StatusCode::SUCCESS; } @@ -329,15 +336,16 @@ StatusCode RatesAnalysisAlg::setTriggerDesicison(const std::string& name, const StatusCode RatesAnalysisAlg::initialize() { ATH_MSG_INFO ("Initializing " << name() << "..."); - m_globalGroups.emplace(std::make_pair(m_l1GroupName, RatesGroup(m_l1GroupName, msg(), m_doHistograms, m_enableLumiExtrapolation))); - m_globalGroups.emplace(std::make_pair(m_l2GroupName, RatesGroup(m_l2GroupName, msg(), m_doHistograms, m_enableLumiExtrapolation))); - m_globalGroups.emplace(std::make_pair(m_expressGroupName, RatesGroup(m_expressGroupName, msg(), m_doHistograms, m_enableLumiExtrapolation))); + m_globalGroups.emplace(std::piecewise_construct, std::forward_as_tuple(m_l1GroupName), std::forward_as_tuple(m_l1GroupName, msg(), m_doHistograms, m_enableLumiExtrapolation)); + m_globalGroups.emplace(std::piecewise_construct, std::forward_as_tuple(m_l2GroupName), std::forward_as_tuple(m_l2GroupName, msg(), m_doHistograms, m_enableLumiExtrapolation)); + m_globalGroups.emplace(std::piecewise_construct, std::forward_as_tuple(m_expressGroupName), std::forward_as_tuple(m_expressGroupName, msg(), m_doHistograms, m_enableLumiExtrapolation)); m_globalGroups.at(m_l2GroupName).setDoCachedWeights( m_doUniqueRates ); // This extra sub-weight caching is only utilised by unique-rate groups m_globalGroups.at(m_expressGroupName).setExpressGroup( true ); return StatusCode::SUCCESS; } StatusCode RatesAnalysisAlg::beginInputFile() { + ATH_MSG_INFO ("beginInputFile " << name() << "..."); if (m_enhancedBiasRatesTool.isSet() == false) { ATH_MSG_INFO("Setting up EnhancedBiasRatesTool"); @@ -377,12 +385,18 @@ StatusCode RatesAnalysisAlg::beginInputFile() { } } + if (m_tdt.isSet() == false) { + ATH_MSG_INFO("Setting up TDT in initialize()"); + ATH_CHECK(m_tdt.retrieve()); + m_tdt->ExperimentalAndExpertMethods()->enable(); + } + return StatusCode::SUCCESS; } StatusCode RatesAnalysisAlg::populateTriggers() { // Let user add their triggers - ATH_MSG_INFO("Setting up User's Triggers"); + ATH_MSG_INFO("Initializing User's Triggers (note: we are actually now in the event loop)"); ATH_CHECK( ratesInitialize() ); ATH_MSG_INFO("Computing coherent factors for coherent prescale groups."); @@ -398,7 +412,7 @@ StatusCode RatesAnalysisAlg::populateTriggers() { const RatesGroup* l1GroupPtr = &(m_globalGroups.at(m_l1GroupName)); // The finalised list of all L1 chains for (const auto& trigger : m_triggers) { const uint32_t level = getLevel(trigger.first); - m_uniqueGroups.emplace(std::make_pair(trigger.first, RatesGroup(trigger.first, msg(), false, m_enableLumiExtrapolation))); // Each trigger gets its own unique group. No hist needed + m_uniqueGroups.emplace(std::piecewise_construct, std::forward_as_tuple(trigger.first), std::forward_as_tuple(trigger.first, msg(), false, m_enableLumiExtrapolation)); // Each trigger gets its own unique group. No hist needed RatesTrigger* triggerPtr = &(m_triggers.at(trigger.first)); RatesGroup* uniqueGroupPtr = &(m_uniqueGroups.at(trigger.first)); triggerPtr->setUniqueGroup( uniqueGroupPtr ); // Create two-way links @@ -438,47 +452,44 @@ StatusCode RatesAnalysisAlg::populateTriggers() { ATH_CHECK( histSvc->regHist(std::string("/RATESTREAM/normalisation"), m_scalingHist) ); m_bcidHist = new TH1D("bcid",";BCID;Events",3565,-.5,3564.5); ATH_CHECK( histSvc->regHist(std::string("/RATESTREAM/bcid"), m_bcidHist) ); - for (const auto& trigger : m_triggers) { + for (auto& trigger : m_triggers) { if (!trigger.second.doHistograms()) continue; // Not all may be doing histograming - ATH_CHECK( histSvc->regHist(std::string("/RATESTREAM/Triggers/" + trigger.first + "/data"), trigger.second.getDataHist()) ); - ATH_CHECK( histSvc->regHist(std::string("/RATESTREAM/Triggers/" + trigger.first + "/rateVsMu"), trigger.second.getMuHist()) ); - if (m_useBunchCrossingTool) ATH_CHECK( histSvc->regHist(std::string("/RATESTREAM/Triggers/" + trigger.first + "/rateVsTrain"), trigger.second.getTrainHist()) ); + ATH_CHECK( histSvc->regHist(std::string("/RATESTREAM/Triggers/" + trigger.first + "/data"), trigger.second.getDataHist(true)) ); + ATH_CHECK( histSvc->regHist(std::string("/RATESTREAM/Triggers/" + trigger.first + "/rateVsMu"), trigger.second.getMuHist(true)) ); + if (m_useBunchCrossingTool) ATH_CHECK( histSvc->regHist(std::string("/RATESTREAM/Triggers/" + trigger.first + "/rateVsTrain"), trigger.second.getTrainHist(true)) ); } - for (const auto& trigger : m_scanTriggers) { - ATH_CHECK( histSvc->regHist(std::string("/RATESTREAM/ScanTriggers/" + trigger.first + "/rateVsThreshold"), trigger.second.getThresholdHist()) ); + for (auto& trigger : m_scanTriggers) { + ATH_CHECK( histSvc->regHist(std::string("/RATESTREAM/ScanTriggers/" + trigger.first + "/rateVsThreshold"), trigger.second.getThresholdHist(true)) ); } - for (const auto& group : m_groups) { + for (auto& group : m_groups) { if (!group.second.doHistograms()) continue; - ATH_CHECK( histSvc->regHist(std::string("/RATESTREAM/Groups/" + group.first + "/data"), group.second.getDataHist()) ); - ATH_CHECK( histSvc->regHist(std::string("/RATESTREAM/Groups/" + group.first + "/rateVsMu"), group.second.getMuHist()) ); - if (m_useBunchCrossingTool) ATH_CHECK( histSvc->regHist(std::string("/RATESTREAM/Groups/" + group.first + "/rateVsTrain"), group.second.getTrainHist()) ); + ATH_CHECK( histSvc->regHist(std::string("/RATESTREAM/Groups/" + group.first + "/data"), group.second.getDataHist(true)) ); + ATH_CHECK( histSvc->regHist(std::string("/RATESTREAM/Groups/" + group.first + "/rateVsMu"), group.second.getMuHist(true)) ); + if (m_useBunchCrossingTool) ATH_CHECK( histSvc->regHist(std::string("/RATESTREAM/Groups/" + group.first + "/rateVsTrain"), group.second.getTrainHist(true)) ); } - for (const auto& group : m_globalGroups) { + for (auto& group : m_globalGroups) { if (!group.second.doHistograms()) continue; - ATH_CHECK( histSvc->regHist(std::string("/RATESTREAM/Globals/" + group.first + "/data"), group.second.getDataHist()) ); - ATH_CHECK( histSvc->regHist(std::string("/RATESTREAM/Globals/" + group.first + "/rateVsMu"), group.second.getMuHist()) ); - if (m_useBunchCrossingTool) ATH_CHECK( histSvc->regHist(std::string("/RATESTREAM/Globals/" + group.first + "/rateVsTrain"), group.second.getTrainHist()) ); + ATH_CHECK( histSvc->regHist(std::string("/RATESTREAM/Globals/" + group.first + "/data"), group.second.getDataHist(true)) ); + ATH_CHECK( histSvc->regHist(std::string("/RATESTREAM/Globals/" + group.first + "/rateVsMu"), group.second.getMuHist(true)) ); + if (m_useBunchCrossingTool) ATH_CHECK( histSvc->regHist(std::string("/RATESTREAM/Globals/" + group.first + "/rateVsTrain"), group.second.getTrainHist(true)) ); } } - // Has the user set a lumi extrapolation? If not - set a default if (m_enableLumiExtrapolation && m_targetLumi == 0) setTargetLumi(1e34); // We now know the final lumi scaling so we can set the bunch scaling const uint32_t ebPairedBunches = m_enhancedBiasRatesTool->getPairedBunches(); + ATH_MSG_INFO("Number of paired bunches in input file:" << m_enhancedBiasRatesTool->getPairedBunches()); m_weightingValues.m_bunchFactor = m_targetBunches / (double)ebPairedBunches; return StatusCode::SUCCESS; } StatusCode RatesAnalysisAlg::execute() { - ATH_MSG_DEBUG("Executing " << name() << "..."); - setFilterPassed(false); - if (m_populatedTriggers == false) { // First time in execute loop - cannot access TDT before this. - //ATH_CHECK( checkGotTDT() ); upgrade samples don't have TDT + ATH_MSG_DEBUG("Executing " << name() << " on event " << m_eventCounter << "..."); + if (m_eventCounter == 0) { // First time in execute loop - cannot access TDT before this. ATH_CHECK( populateTriggers() ); - m_populatedTriggers = true; } // Get event characteristics @@ -527,7 +538,7 @@ StatusCode RatesAnalysisAlg::execute() { if (m_doHistograms) m_bcidHist->Fill(eventInfo->bcid(), m_weightingValues.m_enhancedBiasWeight); // Some debug info - if (m_eventCounter++ % 1000 == 0) { + if (++m_eventCounter % 1000 == 0) { ATH_MSG_INFO( "Event " << m_eventCounter << " " << m_weightingValues.print() << " currentWallTime:" << m_ratesDenominator ); } @@ -537,9 +548,7 @@ StatusCode RatesAnalysisAlg::execute() { StatusCode RatesAnalysisAlg::executeTrigDecisionToolTriggers() { for (const auto& trigger : m_existingTriggers) { - if (trigger.second->isPassed()) { - ATH_CHECK( setTriggerDesicison(trigger.first) ); - } + ATH_CHECK( setTriggerDesicison(trigger.first, trigger.second->isPassed()) ); } return StatusCode::SUCCESS; } @@ -561,7 +570,9 @@ StatusCode RatesAnalysisAlg::finalize() { } if (m_triggers.size()) { ATH_MSG_INFO("################## Computed Rate Estimations for Single Items:"); - for (const auto& trigger : m_triggers) ATH_MSG_INFO(trigger.second.printRate(m_ratesDenominator)); + std::set<std::string> keys; // Used an unordered map for speed, but now we'd like the items in order + for (const auto& trigger : m_triggers) keys.insert(trigger.first); + for (const std::string& key : keys) ATH_MSG_INFO(m_triggers.at(key).printRate(m_ratesDenominator)); } if (m_expressTriggers.size()) { ATH_MSG_INFO("################## Computed Express Rate Estimations for Single Items:"); @@ -593,13 +604,13 @@ StatusCode RatesAnalysisAlg::finalize() { for (auto& group : m_globalGroups) group.second.normaliseHist(m_ratesDenominator); } - if (m_tdt.isSet()) ATH_CHECK(m_tdt->finalize()); + //if (m_tdt.isSet()) ATH_CHECK(m_tdt->finalize()); // Has issues ATH_CHECK(m_enhancedBiasRatesTool->finalize()); return StatusCode::SUCCESS; } void RatesAnalysisAlg::setTargetLumiMu(const double lumi, const double mu) { - if (m_populatedTriggers) { // All settings must be defined before we start looping over the sample + if (m_eventCounter > 0) { // All settings must be defined before we start looping over the sample ATH_MSG_WARNING("Too late to call setTargetLumiMu. Do this during ratesInitialize()."); return; } @@ -619,7 +630,7 @@ void RatesAnalysisAlg::setTargetLumiMu(const double lumi, const double mu) { } void RatesAnalysisAlg::setTargetLumiBunches(const double lumi, const int32_t bunches) { - if (m_populatedTriggers) { // All settings must be defined before we start looping over the sample + if (m_eventCounter > 0) { // All settings must be defined before we start looping over the sample ATH_MSG_WARNING("Too late to call setTargetLumiBunches. Do this during ratesInitialize()."); return; } @@ -636,7 +647,7 @@ void RatesAnalysisAlg::setTargetLumiBunches(const double lumi, const int32_t bun void RatesAnalysisAlg::setTargetMuBunches(const double mu, const int32_t bunches) { - if (m_populatedTriggers) { // All settings must be defined before we start looping over the sample + if (m_eventCounter > 0) { // All settings must be defined before we start looping over the sample ATH_MSG_WARNING("Too late to call setTargetMuBunches. Do this during ratesInitialize()."); return; } diff --git a/Trigger/TrigCost/RatesAnalysis/src/RatesGroup.cxx b/Trigger/TrigCost/RatesAnalysis/src/RatesGroup.cxx index 06cae0d25d84..b7a8ebd3c68e 100644 --- a/Trigger/TrigCost/RatesAnalysis/src/RatesGroup.cxx +++ b/Trigger/TrigCost/RatesAnalysis/src/RatesGroup.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #include "RatesAnalysis/RatesGroup.h" @@ -159,13 +159,9 @@ void RatesGroup::execute(const WeightingValuesSummary_t& weights) { m_rateAccumulatorOR2 += wOR * wOR; m_rateAccumulatorAND2 += wAND * wAND; - // We don't apply any lumi extrapolation when filling the MU histogram - // This is wOR but without weights.m_linearLumiFactor or any other scaling in L - if (m_rateVsMu != nullptr) m_rateVsMu->Fill(weights.m_eventMu, weights.m_enhancedBiasWeight * (1. - weightOR)); - - if (m_rateVsTrain != nullptr) m_rateVsTrain->Fill(weights.m_distanceInTrain, wOR); - - if (m_data != nullptr) { + if (m_doHistograms) { + m_rateVsMu->Fill(weights.m_eventMu, wOR); + m_rateVsTrain->Fill(weights.m_distanceInTrain, wOR); m_data->Fill(RatesBinIdentifier_t::kRATE_BIN_OR, wOR); m_data->Fill(RatesBinIdentifier_t::kRATE_BIN_AND, wAND); } diff --git a/Trigger/TrigCost/RatesAnalysis/src/RatesHistoBase.cxx b/Trigger/TrigCost/RatesAnalysis/src/RatesHistoBase.cxx index 15afcc34bc6c..6c8656d8f05a 100644 --- a/Trigger/TrigCost/RatesAnalysis/src/RatesHistoBase.cxx +++ b/Trigger/TrigCost/RatesAnalysis/src/RatesHistoBase.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #include "RatesAnalysis/RatesHistoBase.h" @@ -7,7 +7,10 @@ uint32_t RatesHistoBase::m_histoID = 0; RatesHistoBase::RatesHistoBase(const std::string& name, const MsgStream& log, const bool doHistograms) : - m_doHistograms(doHistograms), m_rateVsMu(nullptr), m_rateVsTrain(nullptr), m_data(nullptr), m_log(log) + m_name(name), + m_doHistograms(doHistograms), m_rateVsMu(nullptr), m_rateVsTrain(nullptr), m_data(nullptr), + m_givenRateVsMu(false), m_givenRateVsTrain(false), m_givenData(false), + m_log(log) { if (m_doHistograms) { m_rateVsMu = new TH1D(TString(std::to_string(m_histoID++)),TString(name + ";#mu;Rate / Unit #mu [Hz]"),226,-.5,225.5) ; @@ -22,31 +25,52 @@ RatesHistoBase::RatesHistoBase(const std::string& name, const MsgStream& log, co m_data->SetName("data"); m_data->Sumw2(true); - // std::cout << " For " << name << " I have made my two histograms " << (uint64_t) m_rateVsMu << " " << m_rateVsMu->GetName() << " and " << (uint64_t)m_rateVsTrain << " " << m_rateVsTrain->GetName() << std::endl; + m_log << MSG::DEBUG << " For " << name << "(" << this << ") I have made histograms " + << (uint64_t) m_rateVsMu << " " << m_rateVsMu->GetName() << " and " + << (uint64_t) m_rateVsTrain << " " << m_rateVsTrain->GetName() << " and " + << (uint64_t) m_data << " " << m_data->GetName() << endmsg; } } -RatesHistoBase::~RatesHistoBase() {} +RatesHistoBase::~RatesHistoBase() { + m_log << MSG::DEBUG << "Deleting " << m_name << " (" << this << ")" << endmsg; + if (m_doHistograms) { + if (!m_givenData) { + delete m_data; + m_data = nullptr; + } + if (!m_givenRateVsMu) { + delete m_rateVsMu; + m_rateVsMu = nullptr; + } + if (!m_givenRateVsTrain) { + delete m_rateVsTrain; + m_rateVsTrain = nullptr; + } + } +} -TH1D* RatesHistoBase::getMuHist() const { +TH1D* RatesHistoBase::getMuHist(bool clientIsTHistSvc) { if (!m_doHistograms) { m_log << MSG::ERROR << "RatesHistoBase::getTrainHist Warning requested histograms when histograming is OFF here." << endmsg; return nullptr; } + if (clientIsTHistSvc) m_givenRateVsMu = true; return m_rateVsMu; } -TH1D* RatesHistoBase::getTrainHist() const { +TH1D* RatesHistoBase::getTrainHist(bool clientIsTHistSvc) { if (!m_doHistograms) { m_log << MSG::ERROR << "RatesHistoBase::getTrainHist Warning requested histograms when histograming is OFF here." << endmsg; return nullptr; } + if (clientIsTHistSvc) m_givenRateVsTrain = true; return m_rateVsTrain; } -TH1D* RatesHistoBase::getDataHist() const { - if (!m_doHistograms) return nullptr; // Do not flag an error here as this is fetched by the unique rates groups on their trigger - return m_data; +TH1D* RatesHistoBase::getDataHist(bool clientIsTHistSvc) { + if (clientIsTHistSvc) m_givenData = true; + return m_data; // Do not flag an errors about nullptr here as this is fetched by the unique rates groups on their trigger } diff --git a/Trigger/TrigCost/RatesAnalysis/src/RatesScanTrigger.cxx b/Trigger/TrigCost/RatesAnalysis/src/RatesScanTrigger.cxx index 727724d3b376..3acc45e3e00b 100644 --- a/Trigger/TrigCost/RatesAnalysis/src/RatesScanTrigger.cxx +++ b/Trigger/TrigCost/RatesAnalysis/src/RatesScanTrigger.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #include "RatesAnalysis/RatesScanTrigger.h" @@ -12,9 +12,9 @@ RatesScanTrigger::RatesScanTrigger( const std::string& name, const std::string& seedName, const double seedPrescale, const ExtrapStrat_t extrapolation) : RatesTrigger(name, log, prescale, -1, seedName, seedPrescale, false, extrapolation), - m_rateScanHist(nullptr), m_thresholdPassed(0), m_behaviour(behaviour) + m_rateScanHist(nullptr), m_givenRateScanHist(false), m_thresholdPassed(0), m_behaviour(behaviour) { - m_rateScanHist = new TH1D(TString(std::to_string(m_histoID++)),TString(name + ";Threshold;Rate [Hz]"), thresholdBins, thresholdMin, thresholdMax); + m_rateScanHist = new TH1D(std::to_string(m_histoID++).data(),TString(name + ";Threshold;Rate [Hz]"), thresholdBins, thresholdMin, thresholdMax); m_rateScanHist->SetName("rateVsThreshold"); } @@ -33,11 +33,13 @@ RatesScanTrigger::RatesScanTrigger( const std::string& name, return; } size_t nBins = thresholdBinEdged.size() - 1; - m_rateScanHist = new TH1D(TString(std::to_string(m_histoID++)),TString(name + ";Threshold;Rate [Hz]"), nBins, thresholdBinEdged.data()); + m_rateScanHist = new TH1D(std::to_string(m_histoID++).data(),TString(name + ";Threshold;Rate [Hz]"), nBins, thresholdBinEdged.data()); m_rateScanHist->SetName("rateVsThreshold"); } -RatesScanTrigger::~RatesScanTrigger() {} +RatesScanTrigger::~RatesScanTrigger() { + if (!m_givenRateScanHist) delete m_rateScanHist; +} void RatesScanTrigger::passThreshold(const double t, const bool unbiasedEvent) { if (m_seedsFromRandom == true && unbiasedEvent == false) return; @@ -51,6 +53,10 @@ void RatesScanTrigger::setPassedAndExecute(const double t, const WeightingValues execute(weights); } +TH1D* RatesScanTrigger::getThresholdHist(bool clientIsTHistSvc) { + if (clientIsTHistSvc) m_givenRateScanHist = true; + return m_rateScanHist; +} void RatesScanTrigger::execute(const WeightingValuesSummary_t& weights) { if (m_thresholdPassed == std::numeric_limits<double>::min()) return; // Did not pass @@ -87,8 +93,8 @@ const std::string RatesScanTrigger::printRate(const double ratesDenominator) con std::stringstream ss; const int nBins = m_rateScanHist->GetNbinsX(); ss << std::setfill(' '); - if (m_seed != "") ss << m_seed << " [PS:" << m_seedPrescale << "] -> "; ss << m_name << " [PS:" << m_prescale << "]" << std::endl; + if (m_seed != "") ss << " <- " << m_seed << " [PS:" << m_seedPrescale << "]"; if (m_behaviour == kTriggerBelowThreshold) { diff --git a/Trigger/TrigCost/RatesAnalysis/src/RatesTrigger.cxx b/Trigger/TrigCost/RatesAnalysis/src/RatesTrigger.cxx index 9e70d0371113..a40c5e916828 100644 --- a/Trigger/TrigCost/RatesAnalysis/src/RatesTrigger.cxx +++ b/Trigger/TrigCost/RatesAnalysis/src/RatesTrigger.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #include "RatesAnalysis/RatesTrigger.h" @@ -107,8 +107,8 @@ const std::string RatesTrigger::printRate(const double ratesDenominator) const { << " +- " << std::setw(11) << std::left << uniqueErr << " Hz"; } ss << " : "; - if (m_seed != "") ss << m_seed << " [PS:" << m_seedPrescale << "] -> "; ss << m_name << " [PS:" << m_prescale << "]"; + if (m_seed != "") ss << " <- " << m_seed << " [PS:" << m_seedPrescale << "]"; return ss.str(); } diff --git a/Trigger/TrigCost/RatesAnalysis/test/RatesAnalysis_test.cxx b/Trigger/TrigCost/RatesAnalysis/test/RatesAnalysis_test.cxx index 874c88c63561..5b65b75f91b4 100644 --- a/Trigger/TrigCost/RatesAnalysis/test/RatesAnalysis_test.cxx +++ b/Trigger/TrigCost/RatesAnalysis/test/RatesAnalysis_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #include "../RatesAnalysis/RatesTrigger.h" diff --git a/Trigger/TrigCost/RatesAnalysisExamplesXAOD/CMakeLists.txt b/Trigger/TrigCost/RatesAnalysisExamplesXAOD/CMakeLists.txt index 3ba70f981e1a..67f85f1622dc 100644 --- a/Trigger/TrigCost/RatesAnalysisExamplesXAOD/CMakeLists.txt +++ b/Trigger/TrigCost/RatesAnalysisExamplesXAOD/CMakeLists.txt @@ -20,7 +20,7 @@ atlas_depends_on_subdirs( PUBLIC atlas_add_component( RatesAnalysisExamplesXAOD src/*.cxx src/components/*.cxx - LINK_LIBRARIES GaudiKernel xAODJet RatesAnalysis ) + LINK_LIBRARIES GaudiKernel xAODMuon xAODTau xAODEgamma xAODMissingET xAODJet RatesAnalysis ) # Install files from the package: atlas_install_headers( RatesAnalysisExamplesXAOD ) diff --git a/Trigger/TrigCost/RatesAnalysisExamplesXAOD/src/ExampleRatesEmulation.cxx b/Trigger/TrigCost/RatesAnalysisExamplesXAOD/src/ExampleRatesEmulation.cxx index bd9cf2639886..c13ff4719709 100644 --- a/Trigger/TrigCost/RatesAnalysisExamplesXAOD/src/ExampleRatesEmulation.cxx +++ b/Trigger/TrigCost/RatesAnalysisExamplesXAOD/src/ExampleRatesEmulation.cxx @@ -10,7 +10,12 @@ #include "xAODMuon/Muon.h" #include "xAODTau/TauJet.h" #include "xAODEgamma/Photon.h" - +#include "xAODTau/TauJetContainer.h" +#include "xAODTau/TauJetAuxContainer.h" +#include "xAODMuon/MuonContainer.h" +#include "xAODMuon/MuonAuxContainer.h" +#include "xAODEgamma/PhotonContainer.h" +#include "xAODEgamma/PhotonAuxContainer.h" ExampleRatesEmulation::ExampleRatesEmulation( const std::string& name, ISvcLocator* pSvcLocator ) : RatesAnalysisAlg(name, pSvcLocator) { declareProperty( "TargetLuminosity", m_lumi = 1e34); @@ -25,7 +30,8 @@ StatusCode ExampleRatesEmulation::ratesInitialize() { // Here we assume a full-ring, other functions are available to change this assumption. // @see setTargetLumiMu(const double lumi, const double mu); // @see setTargetLumiBunches(const double lumi, const int32_t bunches); - // setTargetLumi( m_lumi ); + // @see setTargetMuBunches(const double mu, const int32_t bunches); + setTargetLumi( m_lumi ); const std::vector<double> jetBinEdges = {0,2.5,5,7.5,10,12.5,15,17.5,20,22.5,25,30,35,40,45,50,60,70,80,90,100,110,120,130,140,150,200,250,300,350,400,500}; const std::vector<double> htBinEdges = {100,200,300,400,500,600,700,800,900,1000,1500,2000,2500}; diff --git a/Trigger/TrigCost/RatesAnalysisExamplesXAOD/src/ExampleRatesFullMenu.cxx b/Trigger/TrigCost/RatesAnalysisExamplesXAOD/src/ExampleRatesFullMenu.cxx index d57b1e1a32b7..6016638439e4 100644 --- a/Trigger/TrigCost/RatesAnalysisExamplesXAOD/src/ExampleRatesFullMenu.cxx +++ b/Trigger/TrigCost/RatesAnalysisExamplesXAOD/src/ExampleRatesFullMenu.cxx @@ -17,9 +17,11 @@ StatusCode ExampleRatesFullMenu::ratesInitialize() { // Here we assume a full-ring, other functions are available to change this assumption. // @see setTargetLumiMu(const double lumi, const double mu); // @see setTargetLumiBunches(const double lumi, const int32_t bunches); + // @see setTargetMuBunches(const double mu, const int32_t bunches); setTargetLumi( m_lumi ); // Register all triggers in the menu. Will not include any which were prescaled out in Athena. + ATH_MSG_INFO("Adding all existing triggers"); ATH_CHECK( addAllExisting() ); // Or, if you were only interested in part of the menu you could do e.g. diff --git a/Trigger/TrigCost/RatesAnalysisExamplesXAOD/src/components/RatesAnalysis_entries.cxx b/Trigger/TrigCost/RatesAnalysisExamplesXAOD/src/components/RatesAnalysis_entries.cxx index f96524fbebe4..3470edc0e866 100644 --- a/Trigger/TrigCost/RatesAnalysisExamplesXAOD/src/components/RatesAnalysis_entries.cxx +++ b/Trigger/TrigCost/RatesAnalysisExamplesXAOD/src/components/RatesAnalysis_entries.cxx @@ -1,6 +1,9 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + #include "../ExampleRatesEmulation.h" #include "../ExampleRatesFullMenu.h" DECLARE_COMPONENT( ExampleRatesEmulation ) DECLARE_COMPONENT( ExampleRatesFullMenu ) - -- GitLab From 0e725e89b12d7f562dfd3fabf1dc34781db428d3 Mon Sep 17 00:00:00 2001 From: Edward Moyse <edward.moyse@cern.ch> Date: Mon, 2 Jul 2018 20:51:53 +0000 Subject: [PATCH 311/562] Master add newmuonscuts vp1 Former-commit-id: 5b311b8f0b22f5a30df7996180623f08467a3cf5 --- graphics/VP1/VP1Algs/share/vp1.py | 17 +++- .../VP1TrackSystems/TrackHandleBase.h | 1 + .../TrackHandle_TrackParticle.h | 1 + .../src/TrackCollHandleBase.cxx | 8 +- .../src/TrackCollectionSettingsButton.cxx | 82 +++++++++++++++---- .../VP1TrackSystems/src/TrackHandleBase.cxx | 6 +- .../src/TrackHandle_TrackParticle.cxx | 9 ++ .../src/TrackSystemController.cxx | 20 +++-- .../src/pertrackcollectionsettings_form.ui | 14 +++- .../VP1TrackSystems/src/settings_cuts_form.ui | 31 ++++++- 10 files changed, 151 insertions(+), 38 deletions(-) diff --git a/graphics/VP1/VP1Algs/share/vp1.py b/graphics/VP1/VP1Algs/share/vp1.py index bdffac8a383d..f3d499089be3 100644 --- a/graphics/VP1/VP1Algs/share/vp1.py +++ b/graphics/VP1/VP1Algs/share/vp1.py @@ -249,7 +249,22 @@ if (vp1ForwardRegion): DetFlags.FwdRegion_setOn() else: DetFlags.FwdRegion_setOff() if (vp1ZDC): DetFlags.ZDC_setOn() else: DetFlags.ZDC_setOff() -if (vp1NSW): DetFlags.Micromegas_setOn() #FIXME - sTGC? +if (vp1NSW): + DetFlags.Micromegas_setOn() + DetFlags.sTGC_setOn() + from GeoModelSvc.GeoModelSvcConf import GeoModelSvc + GeoModelSvc = GeoModelSvc() + GeoModelSvc.MuonVersionOverride="MuonSpectrometer-R.08.01-NSW" + + from MuonAGDD.MuonAGDDConf import NSWAGDDTool + nTool=NSWAGDDTool('NewSmallWheel') + nTool.ReadAGDD=False + nTool.XMLFiles += ["stations.v2.03.xml"] + nTool.DefaultDetector="Muon" + nTool.Locked=False + nTool.Volumes += ["NewSmallWheel"] + ToolSvc+=nTool + DetFlags.Print() # --- GeoModel diff --git a/graphics/VP1/VP1Systems/VP1TrackSystems/VP1TrackSystems/TrackHandleBase.h b/graphics/VP1/VP1Systems/VP1TrackSystems/VP1TrackSystems/TrackHandleBase.h index c127474915ee..7136304bfb7c 100644 --- a/graphics/VP1/VP1Systems/VP1TrackSystems/VP1TrackSystems/TrackHandleBase.h +++ b/graphics/VP1/VP1Systems/VP1TrackSystems/VP1TrackSystems/TrackHandleBase.h @@ -105,6 +105,7 @@ public: virtual unsigned getNRPCHits() const { return 0; } virtual unsigned getNTGCHits() const { return 0; } virtual unsigned getNCSCHits() const { return 0; } + virtual unsigned getNMuonPrecisionHits() const { return getNMDTHits() + getNCSCHits(); } // This should really only count eta csc hits. virtual const Trk::FitQuality* getFitQuality() const {return 0;} QList<AssociatedObjectHandleBase*> getVisibleMeasurements() const; diff --git a/graphics/VP1/VP1Systems/VP1TrackSystems/VP1TrackSystems/TrackHandle_TrackParticle.h b/graphics/VP1/VP1Systems/VP1TrackSystems/VP1TrackSystems/TrackHandle_TrackParticle.h index 880bbe5b1ab7..936c4d397ca4 100644 --- a/graphics/VP1/VP1Systems/VP1TrackSystems/VP1TrackSystems/TrackHandle_TrackParticle.h +++ b/graphics/VP1/VP1Systems/VP1TrackSystems/VP1TrackSystems/TrackHandle_TrackParticle.h @@ -37,6 +37,7 @@ public: virtual unsigned getNRPCHits() const; virtual unsigned getNTGCHits() const; virtual unsigned getNCSCHits() const; + virtual unsigned getNMuonPrecisionHits() const; virtual QString type() const { return QString("TrackParticle"); } //!< return very short word with type (maybe link with collection type?) diff --git a/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackCollHandleBase.cxx b/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackCollHandleBase.cxx index 2efa76edb010..22184c087610 100644 --- a/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackCollHandleBase.cxx +++ b/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackCollHandleBase.cxx @@ -312,16 +312,20 @@ bool TrackCollHandleBase::cut(TrackHandleBase* handle) if (m_cut_etaptphi_allwillfail) return false; - // messageVerbose("TrackCollHandleBase::cut - checking hit cuts."); + messageVerbose("TrackCollHandleBase::cut - checking hit cuts."); if (mightHaveSubSystemHitInfo()&&!m_cut_requiredNHits.isEmpty()&&handle->hasSubSystemHitInfo()) { assert(m_cut_requiredNHits.count()==4); - // Only apply ID cuts to tracks which have ID hits + // Only apply ID cuts to tracks which have ID hits (so ID only and combined muons) if (handle->isIDTrack()){ if (handle->getNPixelHits()<m_cut_requiredNHits[0]) return false; if (handle->getNSCTHits()<m_cut_requiredNHits[1]) return false; if (handle->getNTRTHits()<m_cut_requiredNHits[2]) return false; } + // Probably we should only be applying these to MS tracks? + messageVerbose("TrackCollHandleBase::cut : "+QString::number(handle->getNMuonPrecisionHits())+" / "+ QString::number(m_cut_requiredNHits[4])); + if (handle->getNMuonHits()<m_cut_requiredNHits[3]) return false; + if (handle->getNMuonPrecisionHits()<m_cut_requiredNHits[4]) return false; } if (!m_cut_pt_allowall||!m_cut_eta_allowall||!m_cut_phi_allowall) diff --git a/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackCollectionSettingsButton.cxx b/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackCollectionSettingsButton.cxx index 4704b2c0ebd9..4e09010a0f12 100644 --- a/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackCollectionSettingsButton.cxx +++ b/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackCollectionSettingsButton.cxx @@ -75,15 +75,6 @@ void TrackCollectionSettingsButton::Imp::initEditWindow() editwindow = new QWidget(0,Qt::WindowStaysOnTopHint); editwindow_ui.setupUi(editwindow); matButton = editwindow_ui.pushButton_matButton; - - // FIXME - remove when cuts implemented - // editwindow_ui.checkBox_defaultCuts->hide(); - // editwindow_ui.groupBox_cuts_momentum->hide(); - // editwindow_ui.groupBox_cuts_reconstructed->hide(); - // editwindow_ui.groupBox_cuts_truth_tracks->hide(); - // editwindow_ui.checkBox_vertexAssociated->hide(); - // editwindow->adjustSize(); - // std::cout<<" matButton "<<matButton<<std::endl; } //____________________________________________________________________ @@ -128,6 +119,9 @@ TrackCollectionSettingsButton::TrackCollectionSettingsButton(QWidget * parent,in // Cuts connect(m_d->editwindow_ui.checkBox_defaultCuts,SIGNAL(toggled(bool)),this,SLOT(possibleChange_useDefaultCuts())); m_d->last_useDefaultCuts=m_d->editwindow_ui.checkBox_defaultCuts->isChecked(); + messageVerbose("editwindow_ui.checkBox_defaultCuts->isChecked() L " + str(m_d->editwindow_ui.checkBox_defaultCuts->isChecked())); + + // -> cutAllowedP/Pt connect(m_d->editwindow_ui.checkBox_cut_minpt,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutAllowedPt())); connect(m_d->editwindow_ui.checkBox_cut_maxpt,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutAllowedPt())); @@ -149,10 +143,12 @@ TrackCollectionSettingsButton::TrackCollectionSettingsButton(QWidget * parent,in connect(m_d->editwindow_ui.checkBox_cut_nhits_sct,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutRequiredNHits())); connect(m_d->editwindow_ui.checkBox_cut_nhits_trt,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutRequiredNHits())); connect(m_d->editwindow_ui.checkBox_cut_nhits_muon,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutRequiredNHits())); + connect(m_d->editwindow_ui.checkBox_cut_nprecisionhits_muon,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutRequiredNHits())); connect(m_d->editwindow_ui.spinBox_cut_nhits_pixel,SIGNAL(valueChanged(int)),this,SLOT(possibleChange_cutRequiredNHits())); connect(m_d->editwindow_ui.spinBox_cut_nhits_sct,SIGNAL(valueChanged(int)),this,SLOT(possibleChange_cutRequiredNHits())); connect(m_d->editwindow_ui.spinBox_cut_nhits_trt,SIGNAL(valueChanged(int)),this,SLOT(possibleChange_cutRequiredNHits())); connect(m_d->editwindow_ui.spinBox_cut_nhits_muon,SIGNAL(valueChanged(int)),this,SLOT(possibleChange_cutRequiredNHits())); + connect(m_d->editwindow_ui.spinBox_cut_nprecisionhits_muon,SIGNAL(valueChanged(int)),this,SLOT(possibleChange_cutRequiredNHits())); // -> cutTruthFromIROnly connect(m_d->editwindow_ui.checkBox_cut_truthtracks_creationvertexinIR,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutTruthFromIROnly())); @@ -388,7 +384,7 @@ void TrackCollectionSettingsButton::dropEvent(QDropEvent *event) QByteArray TrackCollectionSettingsButton::saveState() const{ // messageVerbose("getState"); // if (m_d->editwindow_ui.checkBox_tracksUseBaseLightModel->isChecked()) messageVerbose("checked!"); - VP1Serialise serialise(1/*version*/); + VP1Serialise serialise(2/*version*/); serialise.save(m_d->matButton); // serialise.disableUnsavedChecks(); @@ -398,6 +394,31 @@ QByteArray TrackCollectionSettingsButton::saveState() const{ serialise.save(m_d->editwindow_ui.checkBox_tracksUseBaseLightModel); serialise.save(m_d->editwindow_ui.checkBox_hideactualpaths); serialise.save(m_d->editwindow_ui.checkBox_defaultCuts); + serialise.save(m_d->editwindow_ui.checkBox_defaultCuts); + + serialise.save(m_d->editwindow_ui.checkBox_cut_minpt); + serialise.save(m_d->editwindow_ui.checkBox_cut_maxpt); + serialise.save(m_d->editwindow_ui.doubleSpinBox_cut_minpt_gev); + serialise.save(m_d->editwindow_ui.doubleSpinBox_cut_maxpt_gev); + serialise.save(m_d->editwindow_ui.checkBox_cut_minpt); + serialise.save(m_d->editwindow_ui.comboBox_momtype); + serialise.save(m_d->editwindow_ui.etaPhiCutWidget); + serialise.save(m_d->editwindow_ui.etaPhiCutWidget); + serialise.save(m_d->editwindow_ui.checkBox_cut_nhits_pixel); + serialise.save(m_d->editwindow_ui.checkBox_cut_nhits_sct); + serialise.save(m_d->editwindow_ui.checkBox_cut_nhits_trt); + serialise.save(m_d->editwindow_ui.checkBox_cut_nhits_muon); + serialise.save(m_d->editwindow_ui.checkBox_cut_nprecisionhits_muon); + serialise.save(m_d->editwindow_ui.spinBox_cut_nhits_pixel); + serialise.save(m_d->editwindow_ui.spinBox_cut_nhits_sct); + serialise.save(m_d->editwindow_ui.spinBox_cut_nhits_trt); + serialise.save(m_d->editwindow_ui.spinBox_cut_nhits_muon); + serialise.save(m_d->editwindow_ui.spinBox_cut_nprecisionhits_muon); + serialise.save(m_d->editwindow_ui.checkBox_cut_truthtracks_creationvertexinIR); + serialise.save(m_d->editwindow_ui.checkBox_cut_truthtracks_excludebarcode0); + serialise.save(m_d->editwindow_ui.checkBox_cut_truthtracks_excludeneutrals); + serialise.save(m_d->editwindow_ui.checkBox_vertexAssociated); + serialise.widgetHandled(this); serialise.warnUnsaved(this); return serialise.result(); @@ -416,6 +437,29 @@ void TrackCollectionSettingsButton::restoreFromState( const QByteArray& ba){ state.restore(m_d->editwindow_ui.checkBox_hideactualpaths); state.restore(m_d->editwindow_ui.checkBox_defaultCuts); + state.restore(m_d->editwindow_ui.checkBox_cut_minpt); + state.restore(m_d->editwindow_ui.checkBox_cut_maxpt); + state.restore(m_d->editwindow_ui.doubleSpinBox_cut_minpt_gev); + state.restore(m_d->editwindow_ui.doubleSpinBox_cut_maxpt_gev); + state.restore(m_d->editwindow_ui.checkBox_cut_minpt); + state.restore(m_d->editwindow_ui.comboBox_momtype); + state.restore(m_d->editwindow_ui.etaPhiCutWidget); + state.restore(m_d->editwindow_ui.etaPhiCutWidget); + state.restore(m_d->editwindow_ui.checkBox_cut_nhits_pixel); + state.restore(m_d->editwindow_ui.checkBox_cut_nhits_sct); + state.restore(m_d->editwindow_ui.checkBox_cut_nhits_trt); + state.restore(m_d->editwindow_ui.checkBox_cut_nhits_muon); + state.restore(m_d->editwindow_ui.checkBox_cut_nprecisionhits_muon); + state.restore(m_d->editwindow_ui.spinBox_cut_nhits_pixel); + state.restore(m_d->editwindow_ui.spinBox_cut_nhits_sct); + state.restore(m_d->editwindow_ui.spinBox_cut_nhits_trt); + state.restore(m_d->editwindow_ui.spinBox_cut_nhits_muon); + state.restore(m_d->editwindow_ui.spinBox_cut_nprecisionhits_muon); + state.restore(m_d->editwindow_ui.checkBox_cut_truthtracks_creationvertexinIR); + state.restore(m_d->editwindow_ui.checkBox_cut_truthtracks_excludebarcode0); + state.restore(m_d->editwindow_ui.checkBox_cut_truthtracks_excludeneutrals); + state.restore(m_d->editwindow_ui.checkBox_vertexAssociated); + state.widgetHandled(this); state.warnUnrestored(this); @@ -478,10 +522,11 @@ QList<unsigned> TrackCollectionSettingsButton::cutRequiredNHits() const unsigned nsct = m_d->editwindow_ui.checkBox_cut_nhits_sct->isChecked() ? m_d->editwindow_ui.spinBox_cut_nhits_sct->value() : 0; unsigned ntrt = m_d->editwindow_ui.checkBox_cut_nhits_trt->isChecked() ? m_d->editwindow_ui.spinBox_cut_nhits_trt->value() : 0; unsigned nmuon = m_d->editwindow_ui.checkBox_cut_nhits_muon->isChecked() ? m_d->editwindow_ui.spinBox_cut_nhits_muon->value() : 0; + unsigned nprecmuon = m_d->editwindow_ui.checkBox_cut_nprecisionhits_muon->isChecked() ? m_d->editwindow_ui.spinBox_cut_nprecisionhits_muon->value() : 0; QList<unsigned> l; - if (!npixel&&!nsct&&!ntrt&&!nmuon) + if (!npixel&&!nsct&&!ntrt&&!nmuon&&!nprecmuon) return l; - l << npixel << nsct << ntrt << nmuon; + l << npixel << nsct << ntrt << nmuon << nprecmuon; return l; } @@ -542,8 +587,9 @@ void TrackCollectionSettingsButton::possibleChange_cutAllowedPhi() } //____________________________________________________________________ void TrackCollectionSettingsButton::possibleChange_cutRequiredNHits() -{ - if (m_d->last_cutRequiredNHits!=cutRequiredNHits()) return; +{ + messageVerbose("TrackCollectionSettingsButton::possibleChange_cutRequiredNHits"); + if (m_d->last_cutRequiredNHits==cutRequiredNHits()) return; messageVerbose("cutRequiredNHits() changed"); m_d->last_cutRequiredNHits=cutRequiredNHits(); emit cutRequiredNHitsChanged(m_d->last_cutRequiredNHits); @@ -551,7 +597,7 @@ void TrackCollectionSettingsButton::possibleChange_cutRequiredNHits() //____________________________________________________________________ void TrackCollectionSettingsButton::possibleChange_cutTruthFromIROnly() { - if (m_d->last_cutTruthFromIROnly!=cutTruthFromIROnly()) return; + if (m_d->last_cutTruthFromIROnly==cutTruthFromIROnly()) return; messageVerbose("cutTruthFromIROnly() changed"); m_d->last_cutTruthFromIROnly=cutTruthFromIROnly(); emit cutTruthFromIROnlyChanged(m_d->last_cutTruthFromIROnly); @@ -559,7 +605,7 @@ void TrackCollectionSettingsButton::possibleChange_cutTruthFromIROnly() //____________________________________________________________________ void TrackCollectionSettingsButton::possibleChange_cutExcludeBarcodeZero() { - if (m_d->last_cutExcludeBarcodeZero!=cutExcludeBarcodeZero()) return; + if (m_d->last_cutExcludeBarcodeZero==cutExcludeBarcodeZero()) return; messageVerbose("cutExcludeBarcodeZero() changed"); m_d->last_cutExcludeBarcodeZero=cutExcludeBarcodeZero(); emit cutExcludeBarcodeZeroChanged(m_d->last_cutExcludeBarcodeZero); @@ -568,7 +614,7 @@ void TrackCollectionSettingsButton::possibleChange_cutExcludeBarcodeZero() //____________________________________________________________________ void TrackCollectionSettingsButton::possibleChange_cutTruthExcludeNeutrals() { - if (m_d->last_cutTruthExcludeNeutrals!=cutTruthExcludeNeutrals()) return; + if (m_d->last_cutTruthExcludeNeutrals==cutTruthExcludeNeutrals()) return; messageVerbose("cutTruthExcludeNeutrals() changed"); m_d->last_cutTruthExcludeNeutrals=cutTruthExcludeNeutrals(); emit cutTruthExcludeNeutralsChanged(m_d->last_cutTruthExcludeNeutrals); @@ -577,7 +623,7 @@ void TrackCollectionSettingsButton::possibleChange_cutTruthExcludeNeutrals() //____________________________________________________________________ void TrackCollectionSettingsButton::possibleChange_cutOnlyVertexAssocTracks() { - if (m_d->last_cutOnlyVertexAssocTracks!=cutOnlyVertexAssocTracks()) return; + if (m_d->last_cutOnlyVertexAssocTracks==cutOnlyVertexAssocTracks()) return; messageVerbose("cutOnlyVertexAssocTracks() changed"); m_d->last_cutOnlyVertexAssocTracks=cutOnlyVertexAssocTracks(); emit cutOnlyVertexAssocTracksChanged(m_d->last_cutOnlyVertexAssocTracks); diff --git a/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackHandleBase.cxx b/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackHandleBase.cxx index df71213249b3..a643a17c63d1 100644 --- a/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackHandleBase.cxx +++ b/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackHandleBase.cxx @@ -1601,10 +1601,9 @@ bool TrackHandleBase::isIDTrack() const { const Amg::Vector3D * start = startPoint(); if (!start) return false; - return start->perp()<1100 &&fabs( start->perp())<3500; + return start->perp()<1100 &&fabs( start->z())>3500; } - //____________________________________________________________________ QList<AssociatedObjectHandleBase*> TrackHandleBase::getAllAscObjHandles() const { @@ -1962,7 +1961,8 @@ void TrackHandleBase::fillObjectBrowser( QList<QTreeWidgetItem *>& listOfItems) assert(m_d->m_objBrowseTree==0); m_d->m_objBrowseTree = new QTreeWidgetItem(); - QString l = shortInfo(); + QString direction = QString::fromUtf8("(\u03B7,\u03D5)=[") + QString::number(momentum().eta(),'f',2) + ","+QString::number(momentum().phi(),'f',2)+"], "; + QString l = direction + shortInfo(); m_d->m_objBrowseTree->setText(0, type()+QString(QString::number(listOfItems.size())) ); m_d->m_objBrowseTree->setText(1, l ); diff --git a/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackHandle_TrackParticle.cxx b/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackHandle_TrackParticle.cxx index 9213cab5a7b8..9d908c940b47 100644 --- a/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackHandle_TrackParticle.cxx +++ b/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackHandle_TrackParticle.cxx @@ -173,3 +173,12 @@ unsigned TrackHandle_TrackParticle::getNCSCHits() const { return (m_d->trackparticle->trackSummary()) ? m_d->trackparticle->trackSummary()->get(Trk::numberOfCscEtaHits) + m_d->trackparticle->trackSummary()->get(Trk::numberOfCscPhiHits) : 0; } + +//____________________________________________________________________ +unsigned TrackHandle_TrackParticle::getNMuonPrecisionHits() const +{ + return (m_d->trackparticle->trackSummary()) ? m_d->trackparticle->trackSummary()->get(Trk::numberOfCscEtaHits) + m_d->trackparticle->trackSummary()->get(Trk::numberOfMdtHits) : 0; +} + + + diff --git a/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackSystemController.cxx b/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackSystemController.cxx index f6ee083404c5..29f40270ed14 100644 --- a/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackSystemController.cxx +++ b/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackSystemController.cxx @@ -481,10 +481,12 @@ TrackSystemController::TrackSystemController(IVP1System * sys) connectToLastUpdateSlot(m_d->ui_cuts.checkBox_cut_nhits_sct); connectToLastUpdateSlot(m_d->ui_cuts.checkBox_cut_nhits_trt); connectToLastUpdateSlot(m_d->ui_cuts.checkBox_cut_nhits_muon); + connectToLastUpdateSlot(m_d->ui_cuts.checkBox_cut_nprecisionhits_muon); connectToLastUpdateSlot(m_d->ui_cuts.spinBox_cut_nhits_pixel); connectToLastUpdateSlot(m_d->ui_cuts.spinBox_cut_nhits_sct); connectToLastUpdateSlot(m_d->ui_cuts.spinBox_cut_nhits_trt); connectToLastUpdateSlot(m_d->ui_cuts.spinBox_cut_nhits_muon); + connectToLastUpdateSlot(m_d->ui_cuts.spinBox_cut_nprecisionhits_muon); // -> cutTruthFromIROnly addUpdateSlot(SLOT(possibleChange_cutTruthFromIROnly())); @@ -1846,10 +1848,12 @@ QList<unsigned> TrackSystemController::cutRequiredNHits() const unsigned nsct = m_d->ui_cuts.checkBox_cut_nhits_sct->isChecked() ? m_d->ui_cuts.spinBox_cut_nhits_sct->value() : 0; unsigned ntrt = m_d->ui_cuts.checkBox_cut_nhits_trt->isChecked() ? m_d->ui_cuts.spinBox_cut_nhits_trt->value() : 0; unsigned nmuon = m_d->ui_cuts.checkBox_cut_nhits_muon->isChecked() ? m_d->ui_cuts.spinBox_cut_nhits_muon->value() : 0; + unsigned nprecmuon = m_d->ui_cuts.checkBox_cut_nprecisionhits_muon->isChecked() ? m_d->ui_cuts.spinBox_cut_nprecisionhits_muon->value() : 0; + QList<unsigned> l; - if (!npixel&&!nsct&&!ntrt&&!nmuon) + if (!npixel&&!nsct&&!ntrt&&!nmuon&&!nprecmuon) return l; - l << npixel << nsct << ntrt << nmuon; + l << npixel << nsct << ntrt << nmuon << nprecmuon; return l; } @@ -1903,15 +1907,15 @@ bool TrackSystemController::Imp::updateComboBoxContents(QComboBox*cb,QStringList //AtlasExtrapolater over... whatever (same for fitters): int i_vp1(-1), i_atlas(-1); for (int j = 0; j <cb->count();++j) { - if (i_vp1==-1&&cb->itemText(j).contains("vp1",Qt::CaseInsensitive)) - i_vp1 = j; - if (i_atlas==-1&&cb->itemText(j).contains("atlas",Qt::CaseInsensitive)) - i_atlas = j; + if (i_vp1==-1&&cb->itemText(j).contains("vp1",Qt::CaseInsensitive)) + i_vp1 = j; + if (i_atlas==-1&&cb->itemText(j).contains("atlas",Qt::CaseInsensitive)) + i_atlas = j; } if (i_vp1>=0) - cb->setCurrentIndex(i_vp1); + cb->setCurrentIndex(i_vp1); else if (i_atlas>=0) - cb->setCurrentIndex(i_atlas); + cb->setCurrentIndex(i_atlas); } //m_d->ui_extrap.radioButton_athenaExtrapolator->setEnabled(true); enabled = true; diff --git a/graphics/VP1/VP1Systems/VP1TrackSystems/src/pertrackcollectionsettings_form.ui b/graphics/VP1/VP1Systems/VP1TrackSystems/src/pertrackcollectionsettings_form.ui index 00373827b074..b7ab8c2fb649 100644 --- a/graphics/VP1/VP1Systems/VP1TrackSystems/src/pertrackcollectionsettings_form.ui +++ b/graphics/VP1/VP1Systems/VP1TrackSystems/src/pertrackcollectionsettings_form.ui @@ -322,6 +322,9 @@ </property> </widget> </item> + <item row="4" column="1"> + <widget class="QSpinBox" name="spinBox_cut_nhits_muon"/> + </item> <item row="3" column="1"> <widget class="QSpinBox" name="spinBox_cut_nhits_trt"/> </item> @@ -332,8 +335,15 @@ </property> </widget> </item> - <item row="4" column="1"> - <widget class="QSpinBox" name="spinBox_cut_nhits_muon"/> + <item row="5" column="0"> + <widget class="QCheckBox" name="checkBox_cut_nprecisionhits_muon"> + <property name="text"> + <string>Require Precision Muon hits:</string> + </property> + </widget> + </item> + <item row="5" column="1"> + <widget class="QSpinBox" name="spinBox_cut_nprecisionhits_muon"/> </item> </layout> </item> diff --git a/graphics/VP1/VP1Systems/VP1TrackSystems/src/settings_cuts_form.ui b/graphics/VP1/VP1Systems/VP1TrackSystems/src/settings_cuts_form.ui index 9e9040637834..c330815f3e07 100644 --- a/graphics/VP1/VP1Systems/VP1TrackSystems/src/settings_cuts_form.ui +++ b/graphics/VP1/VP1Systems/VP1TrackSystems/src/settings_cuts_form.ui @@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>290</width> - <height>420</height> + <width>390</width> + <height>464</height> </rect> </property> <property name="windowTitle"> @@ -185,6 +185,9 @@ <item row="2" column="1"> <widget class="QSpinBox" name="spinBox_cut_nhits_trt"/> </item> + <item row="3" column="1"> + <widget class="QSpinBox" name="spinBox_cut_nhits_muon"/> + </item> <item row="3" column="0"> <widget class="QCheckBox" name="checkBox_cut_nhits_muon"> <property name="text"> @@ -192,11 +195,31 @@ </property> </widget> </item> - <item row="3" column="1"> - <widget class="QSpinBox" name="spinBox_cut_nhits_muon"/> + <item row="4" column="0"> + <widget class="QCheckBox" name="checkBox_cut_nprecisionhits_muon"> + <property name="text"> + <string>Require Precision Muon hits:</string> + </property> + </widget> + </item> + <item row="4" column="1"> + <widget class="QSpinBox" name="spinBox_cut_nprecisionhits_muon"/> </item> </layout> </item> + <item> + <widget class="QLabel" name="label"> + <property name="autoFillBackground"> + <bool>false</bool> + </property> + <property name="text"> + <string>ID requirements only apply to tracks with ID hits (i.e. not MS standalone tracks)</string> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + </widget> + </item> <item> <spacer name="horizontalSpacer_2"> <property name="orientation"> -- GitLab From c3e9d8b2ddec1dfc83c7c3f166cfcbd9e5433aa5 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Mon, 2 Jul 2018 10:00:13 +0200 Subject: [PATCH 312/562] PersistentDataModel: Thread-safety fixes. Fix many of the issues found by the thread-safety checker: const_casts and use of static data. (Still a remaining issue to resolve with DataHeader.) Former-commit-id: 6bcc6e7cd529cfb71f606bb91fe6e4e8318f76b0 --- .../PersistentDataModel/Guid.h | 4 +-- .../PersistentDataModel/Placement.h | 2 +- .../PersistentDataModel/Token.h | 6 ++-- .../PersistentDataModel/TokenAddress.h | 36 ++++++++++++------- .../PersistentDataModel/src/DataHeader.cxx | 5 +-- Database/PersistentDataModel/src/Guid.cxx | 4 +-- .../PersistentDataModel/src/Placement.cxx | 18 +++------- Database/PersistentDataModel/src/Token.cxx | 22 +++++------- 8 files changed, 47 insertions(+), 50 deletions(-) diff --git a/Database/PersistentDataModel/PersistentDataModel/Guid.h b/Database/PersistentDataModel/PersistentDataModel/Guid.h index ed35f5a9fd98..257098ea4075 100755 --- a/Database/PersistentDataModel/PersistentDataModel/Guid.h +++ b/Database/PersistentDataModel/PersistentDataModel/Guid.h @@ -66,11 +66,9 @@ public: static const Guid& null(); enum GuidGenMethod { GuidGenDefault, GuidGenRandom, GuidGenByTime }; - static GuidGenMethod m_guidGenMethod; + static const GuidGenMethod m_guidGenMethod; /// Checks for POOL_GUID_TIME or POOL_GUID_RANDOM env variables static GuidGenMethod initGuidGenMethod(); - /// Set method of GUID generation to time or random based - static void setGuidGeneration(GuidGenMethod method) { m_guidGenMethod = method; } /// Create a new Guid /// default method is currently Random, can be changed by param, API or environment diff --git a/Database/PersistentDataModel/PersistentDataModel/Placement.h b/Database/PersistentDataModel/PersistentDataModel/Placement.h index 280f9c31cdff..e1aa1d9b4305 100755 --- a/Database/PersistentDataModel/PersistentDataModel/Placement.h +++ b/Database/PersistentDataModel/PersistentDataModel/Placement.h @@ -48,7 +48,7 @@ public: private: /// Technology identifier - long m_technology; + long unsigned m_technology; /// File name std::string m_fileName; /// Container name diff --git a/Database/PersistentDataModel/PersistentDataModel/Token.h b/Database/PersistentDataModel/PersistentDataModel/Token.h index be5c21c192e9..cf15bf39fefc 100755 --- a/Database/PersistentDataModel/PersistentDataModel/Token.h +++ b/Database/PersistentDataModel/PersistentDataModel/Token.h @@ -21,9 +21,9 @@ class Token { public: // typedef std::pair<long long int, long long int> OID_t; - struct OID_t : public std::pair<long long int, long long int> { + struct OID_t : public std::pair<long long unsigned int, long long unsigned int> { OID_t() {} - OID_t(long long int i1, long long int i2) : std::pair<long long int, long long int> (i1,i2) {} + OID_t(long long unsigned int i1, long long unsigned int i2) : std::pair<long long unsigned int, long long unsigned int> (i1,i2) {} }; private: @@ -105,7 +105,7 @@ private: /// Reference count int m_refCount; /// Technology identifier - int m_technology; + unsigned int m_technology; /// Database identifier Guid m_dbID; /// Container identifier diff --git a/Database/PersistentDataModel/PersistentDataModel/TokenAddress.h b/Database/PersistentDataModel/PersistentDataModel/TokenAddress.h index df3866d19fd9..12fd525fc592 100644 --- a/Database/PersistentDataModel/PersistentDataModel/TokenAddress.h +++ b/Database/PersistentDataModel/PersistentDataModel/TokenAddress.h @@ -36,28 +36,38 @@ public: const std::string& p1 = "", const std::string& p2 = "", unsigned long ip = 0, - const Token* pt = 0) : GenericAddress(svc, clid, p1, p2, ip), m_token(pt), m_par() {} + const Token* pt = 0) : GenericAddress(svc, clid, p1, p2, ip), m_token(pt), m_par() + { + setPar(); + } virtual ~TokenAddress() { delete m_token; m_token = 0; } const Token* getToken() const { return m_token; } - void setToken(const Token* token) { delete m_token; m_token = token; } + void setToken(const Token* token) + { + delete m_token; + m_token = token; + setPar(); + } const std::string* par() const { - if (m_par->empty()) { - if (this->GenericAddress::par()->empty() && m_token != 0) { - m_par[0] = m_token->toString(); - } else { - m_par[0] = this->GenericAddress::par()[0]; - } - m_par[1] = this->GenericAddress::par()[1]; - m_par[2] = this->GenericAddress::par()[2]; - } - return(m_par); + return m_par; } private: + void setPar() + { + m_par[0] = this->GenericAddress::par()[0]; + m_par[1] = this->GenericAddress::par()[1]; + m_par[2] = this->GenericAddress::par()[2]; + + if (m_par[0].empty() && m_token) { + m_par[0] = m_token->toString(); + } + } + const Token* m_token; - mutable std::string m_par[3]; + std::string m_par[3]; }; #endif diff --git a/Database/PersistentDataModel/src/DataHeader.cxx b/Database/PersistentDataModel/src/DataHeader.cxx index 1e99e4ddfa55..dffd6d805aaa 100755 --- a/Database/PersistentDataModel/src/DataHeader.cxx +++ b/Database/PersistentDataModel/src/DataHeader.cxx @@ -102,8 +102,9 @@ DataHeaderElement& DataHeaderElement::operator=(const DataHeaderElement& rhs) { m_alias = rhs.m_alias; if (m_ownToken) { delete m_token; m_token = 0; m_ownToken = false; } if (rhs.getToken() != 0) { - m_token = new Token; m_ownToken = true; - rhs.getToken()->setData(const_cast<Token*>(m_token)); + Token* newtok = new Token; + m_token = newtok; m_ownToken = true; + rhs.getToken()->setData(newtok); } m_hashes = rhs.m_hashes; } diff --git a/Database/PersistentDataModel/src/Guid.cxx b/Database/PersistentDataModel/src/Guid.cxx index 85a75ef90e16..ccbaecbe1c25 100755 --- a/Database/PersistentDataModel/src/Guid.cxx +++ b/Database/PersistentDataModel/src/Guid.cxx @@ -10,7 +10,7 @@ #include "uuid/uuid.h" -static const char* fmt_Guid = "%08lX-%04hX-%04hX-%02hhX%02hhX-%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX"; +static const char* const fmt_Guid = "%08X-%04hX-%04hX-%02hhX%02hhX-%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX"; //{ 0x0,0x0,0x0,{0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}}; static const Guid clid_null(std::string("00000000-0000-0000-0000-000000000000")); @@ -19,7 +19,7 @@ const Guid& Guid::null() { return clid_null; } -Guid::GuidGenMethod Guid::m_guidGenMethod = Guid::initGuidGenMethod(); +const Guid::GuidGenMethod Guid::m_guidGenMethod = Guid::initGuidGenMethod(); Guid::GuidGenMethod Guid::initGuidGenMethod() { char* envv = getenv("POOL_GUID_TIME"); diff --git a/Database/PersistentDataModel/src/Placement.cxx b/Database/PersistentDataModel/src/Placement.cxx index 4a104f3341f8..aac39c96d2af 100755 --- a/Database/PersistentDataModel/src/Placement.cxx +++ b/Database/PersistentDataModel/src/Placement.cxx @@ -7,7 +7,7 @@ #include <cstdio> #include <cstring> -static const char* fmt_tech = "[TECH=%08X]"; +static const char* const fmt_tech = "[TECH=%08lX]"; Placement::Placement() : m_technology(0L), m_fileName(""), m_containerName("") { } @@ -27,26 +27,18 @@ Placement& Placement::fromString(const std::string& source) { const char* p3 = ::strchr(p1, ']'); if (p2 != 0 && p3 != 0) { if (::strncmp("[FILE=", p1, 6) == 0) { - char* p3mod = const_cast<char*>(p3); - *p3mod = 0; - m_fileName = p2 + 1; - *p3mod = ']'; + m_fileName.assign (p2+1, p3-p2-1); } else if (::strncmp("[CONT=", p1, 6) == 0) { - char* p3mod = const_cast<char*>(p3); - *p3mod = 0; - m_containerName = p2 + 1; - *p3mod = ']'; + m_containerName.assign (p2+1, p3-p2-1); } else if (::strncmp(fmt_tech, p1, 6) == 0) { ::sscanf(p1, fmt_tech, &m_technology); } else { while (*(p2 + 1) == '[' && p3 && *(++p3) != 0 && *p3 != ']') { p3 = ::strchr(p3, ']'); } - char* p3mod = const_cast<char*>(p3); - if (p3mod) *p3mod = 0; - m_auxString += p1; + if (!p3) p3 = source.c_str() + source.size(); + m_auxString.append (p1, p3-p1); m_auxString += "]"; - if (p3mod) *p3mod = ']'; } } } diff --git a/Database/PersistentDataModel/src/Token.cxx b/Database/PersistentDataModel/src/Token.cxx index e60b760f4423..c87c6c2556ed 100755 --- a/Database/PersistentDataModel/src/Token.cxx +++ b/Database/PersistentDataModel/src/Token.cxx @@ -7,13 +7,14 @@ #include <cstdio> #include <cstring> #include <climits> +#include <atomic> -static const char* fmt_clid = "[CLID="; -static const char* fmt_tech = "[TECH=%08X]"; -static const char* fmt_oid = "[OID=%016llX-%016llX]"; -static const char* fmt_oid_old = "[OID=%08llX-%08llX]"; +static const char* const fmt_clid = "[CLID="; +static const char* const fmt_tech = "[TECH=%08X]"; +static const char* const fmt_oid = "[OID=%016llX-%016llX]"; +static const char* const fmt_oid_old = "[OID=%08llX-%08llX]"; static const int KEY_MASK = (~0u) << CHAR_BIT; -static int s_numCount = 0; +static std::atomic<int> s_numCount { 0 }; int numTokenInstances() { return s_numCount; } @@ -130,10 +131,7 @@ Token& Token::fromString(const std::string& source) { if (::strncmp("[DB=", p1, 4) == 0) { m_dbID.fromString(p1 + 4); } else if (::strncmp("[CNT=", p1, 5) == 0) { - char* p3mod = const_cast<char*>(p3); - *p3mod = 0; - m_cntID = p2 + 1; - *p3mod = ']'; + m_cntID.assign (p2+1, p3-p2-1); } else if (::strncmp(fmt_oid, p1, 5) == 0) { if (::strncmp("]", p1 + 22, 1) == 0) { // 5 + 8(int) + 1(minus) + 8(int) = 22 ::sscanf(p1, fmt_oid_old, &m_oid.first, &m_oid.second); @@ -150,11 +148,9 @@ Token& Token::fromString(const std::string& source) { while (*(p2 + 1) == '[' && p3 && *(++p3) != 0 && *p3 != ']') { p3 = ::strchr(p3, ']'); } - char* p3mod = const_cast<char*>(p3); - if (p3mod) *p3mod = 0; - m_auxString += p1; + if (!p3) p3 = source.c_str() + source.size(); + m_auxString.append (p1, p3-p1); m_auxString += "]"; - if (p3mod) *p3mod = ']'; } } } -- GitLab From 848d1c0a44041bf15f6b7a7f212e758164929f61 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Mon, 2 Jul 2018 10:22:42 +0200 Subject: [PATCH 313/562] InDetSVWithMuonTool: Fix clang warnings. clang warnings: unused variables. Former-commit-id: f390cd3d34375d20d6c41e73c0023da07fde4bdd --- .../InDetRecTools/InDetSVWithMuonTool/src/MuonVrtSec.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/InnerDetector/InDetRecTools/InDetSVWithMuonTool/src/MuonVrtSec.cxx b/InnerDetector/InDetRecTools/InDetSVWithMuonTool/src/MuonVrtSec.cxx index 69ef99ee6311..b54e47fd2809 100755 --- a/InnerDetector/InDetRecTools/InDetSVWithMuonTool/src/MuonVrtSec.cxx +++ b/InnerDetector/InDetRecTools/InDetSVWithMuonTool/src/MuonVrtSec.cxx @@ -58,7 +58,6 @@ namespace InDet{ // Secondary track list is ready // Now common vertex fit // - std::vector<const xAOD::TrackParticle*>::const_iterator i_ntrk, i_found; Amg::Vector3D FitVertex; std::vector<double> ErrorMatrix; std::vector< std::vector<double> > TrkAtVrt; -- GitLab From 3950e3d562625d081982d2c692aca1ecf82ed8d5 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Mon, 2 Jul 2018 10:22:56 +0200 Subject: [PATCH 314/562] TrkVKalVrtFitter: Fix clang warning. clang warning: unused variable. Former-commit-id: 5789a0a395226325b79ded8600be08b66b95fcef --- .../TrkVertexFitter/TrkVKalVrtFitter/src/TrkCascadeFitter.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/TrkCascadeFitter.cxx b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/TrkCascadeFitter.cxx index 68f6ac204ba5..0a4595b299d9 100755 --- a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/TrkCascadeFitter.cxx +++ b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/TrkCascadeFitter.cxx @@ -220,7 +220,6 @@ void TrkVKalVrtFitter::makeSimpleCascade(std::vector< std::vector<int> > & vrtDe std::vector< std::vector<int> > & cascadeDef) { int iv,ip,it, nVAdd, iva; - std::vector<int>::iterator iter; vrtDef.clear(); cascadeDef.clear(); int NVC=m_cascadeVList.size(); -- GitLab From 071fcf653fa7b3fd6fd826c2967621b81d2716b9 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Mon, 2 Jul 2018 10:23:07 +0200 Subject: [PATCH 315/562] ZdcRec: Fix clang warnings. clang warnings: unused variables. Former-commit-id: 900aee21dc4502074169aa8b43e287b63e438863 --- ForwardDetectors/ZDC/ZdcRec/src/ZdcRecChannelTool.cxx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/ForwardDetectors/ZDC/ZdcRec/src/ZdcRecChannelTool.cxx b/ForwardDetectors/ZDC/ZdcRec/src/ZdcRecChannelTool.cxx index 0527839a973b..715117e41f59 100644 --- a/ForwardDetectors/ZDC/ZdcRec/src/ZdcRecChannelTool.cxx +++ b/ForwardDetectors/ZDC/ZdcRec/src/ZdcRecChannelTool.cxx @@ -204,10 +204,6 @@ int ZdcRecChannelTool::makeRawFromDigits( std::vector<float> time_sratio; std::vector<float> chi; - std::vector<std::vector<float> >::iterator vfit; - std::vector<float>::iterator fit; - - std::vector<int> v; std::vector<int> vd; std::vector<int> vi; @@ -215,8 +211,6 @@ int ZdcRecChannelTool::makeRawFromDigits( std::vector<float> vcfd1; std::vector<float> vcfd2; std::vector<float> vcfd3; - std::vector<float>::iterator v_ft; - std::vector<float>::iterator v_ft1; //Identifier::value_type zId; @@ -799,7 +793,6 @@ int ZdcRecChannelTool::getTimingSinc2(const Identifier& id, const std::vector<st bool corr=0; std::vector<std::vector<int> >::const_iterator vit; - std::vector<int>::const_iterator it; std::vector<int> y; int mType = 0; -- GitLab From d23d2db662c05e06c15b31f6c15d08617eace56b Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Mon, 2 Jul 2018 10:23:18 +0200 Subject: [PATCH 316/562] egammaTools: Fix clang warnings. clang warnings: unused variables. Former-commit-id: 45b4a8448d83910bebc9aeffc1b7ffc0fa6a5a89 --- Reconstruction/egamma/egammaTools/src/egammaSwTool.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/Reconstruction/egamma/egammaTools/src/egammaSwTool.cxx b/Reconstruction/egamma/egammaTools/src/egammaSwTool.cxx index f01213aa8c18..f145038fc5df 100644 --- a/Reconstruction/egamma/egammaTools/src/egammaSwTool.cxx +++ b/Reconstruction/egamma/egammaTools/src/egammaSwTool.cxx @@ -85,8 +85,6 @@ StatusCode egammaSwTool::execute(xAOD::CaloCluster *cluster){ // protection against bad clusters if (cluster==0) return StatusCode::SUCCESS; - std::vector<CaloClusterProcessor*>::const_iterator firstTool, lastTool; - xAOD::CaloCluster::ClusterSize requestedSize = cluster->clusterSize(); switch (requestedSize) { case xAOD::CaloCluster::SW_55ele: -- GitLab From 577c43c4ce4fa41f87ff8f6abed766b0bc6ec294 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Mon, 2 Jul 2018 10:23:30 +0200 Subject: [PATCH 317/562] JetSubStructureUtils: Fix clang warning. clang warning: unused lambda capture. Former-commit-id: 56e9de12c6e76f3503f01061deb0a2e67e1d6885 --- Reconstruction/Jet/JetSubStructureUtils/Root/BoostedXbbTag.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Reconstruction/Jet/JetSubStructureUtils/Root/BoostedXbbTag.cxx b/Reconstruction/Jet/JetSubStructureUtils/Root/BoostedXbbTag.cxx index e88ebbb9c0b9..5c9f92e4b454 100644 --- a/Reconstruction/Jet/JetSubStructureUtils/Root/BoostedXbbTag.cxx +++ b/Reconstruction/Jet/JetSubStructureUtils/Root/BoostedXbbTag.cxx @@ -430,7 +430,7 @@ int BoostedXbbTag::result(const xAOD::Jet& jet, std::string algorithm_name, cons // filter out the track jets we do not want (pT > 10 GeV and |eta| < 2.5 and at least 2 constituents) associated_trackJets.erase( - std::remove_if(associated_trackJets.begin(), associated_trackJets.end(), [this](const xAOD::Jet* jet) -> bool { return (jet->pt()/1.e3 < 10.0 || fabs(jet->eta()) > 2.5 || jet->numConstituents() < 2); }), + std::remove_if(associated_trackJets.begin(), associated_trackJets.end(), [](const xAOD::Jet* jet) -> bool { return (jet->pt()/1.e3 < 10.0 || fabs(jet->eta()) > 2.5 || jet->numConstituents() < 2); }), associated_trackJets.end()); if(associated_trackJets.size() < 2){ if(m_working_point.find("single") == std::string::npos){ -- GitLab From e9cf18d8bea06bcd88183d40d10574077ec9e4a1 Mon Sep 17 00:00:00 2001 From: Carlo Varni <cvarni@lxplus037.cern.ch> Date: Tue, 3 Jul 2018 10:31:06 +0200 Subject: [PATCH 318/562] Make TrigBjetHypoAlg inherit from BaseAlgo Former-commit-id: d56f44ed00afa9a1a08ff7f42f48c875e75c2534 --- Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetHypoAlg.cxx | 2 +- Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetHypoAlg.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetHypoAlg.cxx b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetHypoAlg.cxx index 38ab8875d2ef..a49b5b907ca6 100644 --- a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetHypoAlg.cxx +++ b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetHypoAlg.cxx @@ -9,7 +9,7 @@ using namespace TrigCompositeUtils; TrigBjetHypoAlg::TrigBjetHypoAlg( const std::string& name, ISvcLocator* pSvcLocator ) : - ::AthReentrantAlgorithm( name, pSvcLocator ) {} + ::HypoBase( name, pSvcLocator ) {} TrigBjetHypoAlg::~TrigBjetHypoAlg() {} diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetHypoAlg.h b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetHypoAlg.h index 72c11bedcf9d..4d6956029345 100644 --- a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetHypoAlg.h +++ b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetHypoAlg.h @@ -16,6 +16,7 @@ #include "TrigBjetHypoTool.h" +#include "DecisionHandling/HypoBase.h" /** * @class Implements b-jet selection for the new HLT framework @@ -23,7 +24,7 @@ **/ class TrigBjetHypoAlg - : public ::AthReentrantAlgorithm + : public ::HypoBase { public: -- GitLab From 553e2b4414d390f0378e4b29a6ce2703f31d0780 Mon Sep 17 00:00:00 2001 From: Tim Martin <tim.martin@cern.ch> Date: Tue, 3 Jul 2018 08:33:55 +0000 Subject: [PATCH 319/562] Update xAODBTaggingEfficiency file to recommended for r21. Fix for ATLASRECTS-4511 Former-commit-id: f07947a73c148809afbf499e77782cb109b2c076 --- .../JetMissingEtTagTools/share/JetTagTool_jobOptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PhysicsAnalysis/JetMissingEtID/JetMissingEtTagTools/share/JetTagTool_jobOptions.py b/PhysicsAnalysis/JetMissingEtID/JetMissingEtTagTools/share/JetTagTool_jobOptions.py index 9034e2dc5ec9..5e698ecbaade 100755 --- a/PhysicsAnalysis/JetMissingEtID/JetMissingEtTagTools/share/JetTagTool_jobOptions.py +++ b/PhysicsAnalysis/JetMissingEtID/JetMissingEtTagTools/share/JetTagTool_jobOptions.py @@ -50,7 +50,7 @@ METMakerTool = CfgMgr.met__METMaker('METMaker', ) ToolSvc += METMakerTool -FlvTagCutDefinitionsFileName = "xAODBTaggingEfficiency/13TeV/2016-20_7-13TeV-MC15-CDI-2017-03-30_v1.root" +FlvTagCutDefinitionsFileName = "xAODBTaggingEfficiency/13TeV/2017-21-13TeV-MC16-CDI-2018-06-24_v1.root" MaxEta = 2.5 MinPt = 20000. JetAuthor = "AntiKt4EMTopoJets" -- GitLab From f5f971b46ae5671b10c8f749dfef780fbd7483ed Mon Sep 17 00:00:00 2001 From: Marcin Nowak <Marcin.Nowak@cern.ch> Date: Tue, 3 Jul 2018 11:08:00 +0200 Subject: [PATCH 320/562] Implement new pure virtual methods of the base TVirtualPerfStats Former-commit-id: be55a05662031fa47cbf73a75aee63639cf1b7f2 --- Event/xAOD/xAODCore/Root/PerfStats.cxx | 29 +++++++++++++++++++ .../xAOD/xAODCore/xAODCore/tools/PerfStats.h | 14 +++++++++ 2 files changed, 43 insertions(+) diff --git a/Event/xAOD/xAODCore/Root/PerfStats.cxx b/Event/xAOD/xAODCore/Root/PerfStats.cxx index 2328445deef7..252a629929db 100644 --- a/Event/xAOD/xAODCore/Root/PerfStats.cxx +++ b/Event/xAOD/xAODCore/Root/PerfStats.cxx @@ -310,6 +310,35 @@ namespace xAOD { return 0; } +#if ROOT_VERSION_CODE >= ROOT_VERSION( 6, 14, 0 ) + /* Some methods that are pure virtual in the basaclass and need + a definition - forwarding them to the actuall ROOT TPerfStats + new in ROOT 6.14 + */ + void PerfStats::PrintBasketInfo( Option_t *option ) const { + if( m_otherPerfStats ) m_otherPerfStats->PrintBasketInfo( option ); + } + + void PerfStats::UpdateBranchIndices( TObjArray *branches ) { + if( m_otherPerfStats ) m_otherPerfStats->UpdateBranchIndices( branches ); + } + + #define FWD_CALL(CALL) \ + void PerfStats::CALL( TBranch *b, size_t basketNumber ) { \ + if( m_otherPerfStats ) m_otherPerfStats->CALL( b, basketNumber ); \ + } \ + void PerfStats::CALL( size_t bi, size_t basketNumber ) { \ + if( m_otherPerfStats ) m_otherPerfStats->CALL( bi, basketNumber ); \ + } struct dummyforsemi + + FWD_CALL(SetLoaded); + FWD_CALL(SetLoadedMiss); + FWD_CALL(SetMissed); + FWD_CALL(SetUsed); + #undef FWD_CALL + +#endif //ROOT_VERSION + /// The constructor needs to do a few things. If there is already /// another TVirtualPerfStats object defined under gPerfStats, then /// it stores that pointer in order to be able to forward monitoring diff --git a/Event/xAOD/xAODCore/xAODCore/tools/PerfStats.h b/Event/xAOD/xAODCore/xAODCore/tools/PerfStats.h index 7bb05aff85ad..29ac0177caff 100644 --- a/Event/xAOD/xAODCore/xAODCore/tools/PerfStats.h +++ b/Event/xAOD/xAODCore/xAODCore/tools/PerfStats.h @@ -90,6 +90,20 @@ namespace xAOD { /// Function used by PROOF to set the number of processed events correctly virtual ::Long64_t GetNumEvents() const; +#if ROOT_VERSION_CODE >= ROOT_VERSION( 6, 14, 0 ) + // new methods (ROOT 6.14) - need forwarding to the original TPerfStats + virtual void PrintBasketInfo(Option_t *option = "") const; + virtual void SetLoaded(TBranch *b, size_t basketNumber); + virtual void SetLoaded(size_t bi, size_t basketNumber); + virtual void SetLoadedMiss(TBranch *b, size_t basketNumber); + virtual void SetLoadedMiss(size_t bi, size_t basketNumber); + virtual void SetMissed(TBranch *b, size_t basketNumber); + virtual void SetMissed(size_t bi, size_t basketNumber); + virtual void SetUsed(TBranch *b, size_t basketNumber); + virtual void SetUsed(size_t bi, size_t basketNumber); + virtual void UpdateBranchIndices(TObjArray *branches); +#endif + /// @} protected: -- GitLab From 624873a04d778219cca9c64d24552d224664fdce Mon Sep 17 00:00:00 2001 From: Marcin Nowak <Marcin.Nowak@cern.ch> Date: Tue, 3 Jul 2018 15:59:31 +0200 Subject: [PATCH 321/562] Added description for the new methods into the PersStats header Former-commit-id: 2116ea47e236b97d72b88abb4b3b6021da318d1c --- Event/xAOD/xAODCore/xAODCore/tools/PerfStats.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Event/xAOD/xAODCore/xAODCore/tools/PerfStats.h b/Event/xAOD/xAODCore/xAODCore/tools/PerfStats.h index 29ac0177caff..2aee4a340abe 100644 --- a/Event/xAOD/xAODCore/xAODCore/tools/PerfStats.h +++ b/Event/xAOD/xAODCore/xAODCore/tools/PerfStats.h @@ -92,15 +92,28 @@ namespace xAOD { #if ROOT_VERSION_CODE >= ROOT_VERSION( 6, 14, 0 ) // new methods (ROOT 6.14) - need forwarding to the original TPerfStats + + /// Print the TTree basket read caching statistics virtual void PrintBasketInfo(Option_t *option = "") const; + + /// Increase by 1 the counter of how many times a basket was cached virtual void SetLoaded(TBranch *b, size_t basketNumber); virtual void SetLoaded(size_t bi, size_t basketNumber); + + /// Increase by 1 the counter of how many times a basket was cached on access virtual void SetLoadedMiss(TBranch *b, size_t basketNumber); virtual void SetLoadedMiss(size_t bi, size_t basketNumber); + + /// Increase count (by 1) of not cached basket reads virtual void SetMissed(TBranch *b, size_t basketNumber); virtual void SetMissed(size_t bi, size_t basketNumber); + + /// Mark a basket as accessed virtual void SetUsed(TBranch *b, size_t basketNumber); virtual void SetUsed(size_t bi, size_t basketNumber); + + /// Update the fBranchIndexCache collection to match the current TTree given + /// the ordered list of branch names. virtual void UpdateBranchIndices(TObjArray *branches); #endif -- GitLab From 46207b2323ba434f005f3ea84b4bc231b448dbca Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Tue, 3 Jul 2018 16:13:56 +0200 Subject: [PATCH 322/562] Solve coverity 113676 Former-commit-id: a4a6a525aba530b2e396e26d8f59b3ca61b4aa11 --- .../InDetLowBetaInfo/InDetLowBetaCandidate.h | 15 ++++++--------- .../src/InDetLowBetaCandidate.cxx | 14 +++----------- 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/InnerDetector/InDetRecEvent/InDetLowBetaInfo/InDetLowBetaInfo/InDetLowBetaCandidate.h b/InnerDetector/InDetRecEvent/InDetLowBetaInfo/InDetLowBetaInfo/InDetLowBetaCandidate.h index 783938519350..26823986d09b 100644 --- a/InnerDetector/InDetRecEvent/InDetLowBetaInfo/InDetLowBetaInfo/InDetLowBetaCandidate.h +++ b/InnerDetector/InDetRecEvent/InDetLowBetaInfo/InDetLowBetaInfo/InDetLowBetaCandidate.h @@ -14,7 +14,7 @@ #ifndef INDETLOWBETACANDIDATE_H #define INDETLOWBETACANDIDATE_H -#include "GaudiKernel/MsgStream.h" +//#include "GaudiKernel/MsgStream.h" #include "AthenaKernel/CLASS_DEF.h" class MsgStream; @@ -23,7 +23,6 @@ namespace InDet{ class InDetLowBetaCandidate{ - /** default, copy = operator constructors */ public: InDetLowBetaCandidate(); @@ -39,14 +38,13 @@ namespace InDet{ ); virtual ~InDetLowBetaCandidate(); - InDetLowBetaCandidate(const InDetLowBetaCandidate& rhs); - InDetLowBetaCandidate &operator=(const InDetLowBetaCandidate &); - /////////virtual VxCandidate* clone() const; - + InDetLowBetaCandidate(const InDetLowBetaCandidate& rhs) = default; + InDetLowBetaCandidate &operator=(const InDetLowBetaCandidate &) = default; + InDetLowBetaCandidate &operator=(InDetLowBetaCandidate &&) = default; + /** Output Method for MsgStream, to be overloaded by child classes */ virtual MsgStream& dump(MsgStream& sl) const; - /** Output Method for std::ostream, to be overloaded by child classes */ - //virtual std::ostream& dump(std::ostream& sl) const; + float getTRTCorrBitsOverThreshold() const; float getTRTTrailingEdge() const; @@ -70,7 +68,6 @@ namespace InDet{ }; //end of class definitions MsgStream& operator << ( MsgStream& sl, const InDetLowBetaCandidate& sf); - //std::ostream& operator << ( std::ostream& sl, const InDetLowBetaCandidate& sf); }//end of namsepace diff --git a/InnerDetector/InDetRecEvent/InDetLowBetaInfo/src/InDetLowBetaCandidate.cxx b/InnerDetector/InDetRecEvent/InDetLowBetaInfo/src/InDetLowBetaCandidate.cxx index bd0c0d25dc7f..072b47712307 100644 --- a/InnerDetector/InDetRecEvent/InDetLowBetaInfo/src/InDetLowBetaCandidate.cxx +++ b/InnerDetector/InDetRecEvent/InDetLowBetaInfo/src/InDetLowBetaCandidate.cxx @@ -28,7 +28,7 @@ namespace InDet { float TRTLikelihoodError, float TRTHighTbits):m_TRTCorrBitsOverThreshold(TRTCorrBitsOverThreshold), m_TRTTrailingEdge( TRTTrailingEdge), m_TRTTrailingEdgeError( TRTTrailingEdgeError), m_TRTNLastBits(TRTNLastBits), m_TRTdEdx(TRTdEdx), m_TRTLikelihoodBeta(TRTLikelihoodBeta), m_TRTLikelihoodError(TRTLikelihoodError), m_TRTHighTbits( TRTHighTbits ) {} - +/** InDetLowBetaCandidate::InDetLowBetaCandidate(const InDetLowBetaCandidate& rhs) : m_TRTCorrBitsOverThreshold(rhs.m_TRTCorrBitsOverThreshold), m_TRTTrailingEdge(rhs.m_TRTTrailingEdge), @@ -54,6 +54,7 @@ namespace InDet { } return *this; } +**/ InDetLowBetaCandidate::~InDetLowBetaCandidate() {} @@ -70,20 +71,11 @@ namespace InDet { return sl; } - //std::ostrem& InDetLowBetaCandidate::dump(std::ostrem sl) const { - // sl << "Printing InDet::InDetLowBetaCandidate: " << endmsg; - // sl << "TRTCorrBitsOverThreshold: " << m_TRTCorrBitsOverThreshold << endmsg; - // sl << "TRTTrailingEdge: " << m_TRTTrailingEdge << endmsg; - // sl << "TRTTrailingEdgeError: " << m_TRTTrailingEdgeError << endmsg; - // sl << "TRTNLastBits: " << m_TRTNLastBits << endmsg; - // return sl; - // } MsgStream& operator << ( MsgStream& sl, const InDetLowBetaCandidate& sf) { return sf.dump(sl); } - //std::ostream& operator << ( std::ostream& sl, const InDetLowBetaCandidate& sf) - // { return sf.dump(sl); } + float InDetLowBetaCandidate::getTRTCorrBitsOverThreshold() const { -- GitLab From 8442ba8b35e05b56811df15c946e05604b2528ee Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Tue, 3 Jul 2018 16:34:19 +0200 Subject: [PATCH 323/562] Small corrections, and solve coverity 113543 Former-commit-id: 6e8389e4d6aa35fb7a1b4a6612890bd4161b079d --- .../InDetPrepRawData/TRT_DriftCircle.h | 37 +++++++++--------- .../InDetPrepRawData/src/TRT_DriftCircle.cxx | 39 +++++++------------ 2 files changed, 31 insertions(+), 45 deletions(-) diff --git a/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/TRT_DriftCircle.h b/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/TRT_DriftCircle.h index be6bf237e810..9787459370f6 100755 --- a/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/TRT_DriftCircle.h +++ b/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/TRT_DriftCircle.h @@ -37,11 +37,10 @@ class TRT_DriftCircle : public Trk::PrepRawData /////////////////////////////////////////////////////////////////// public: - /** default, copy = operator constructors */ TRT_DriftCircle(); - TRT_DriftCircle(const TRT_DriftCircle &); - TRT_DriftCircle &operator=(const TRT_DriftCircle &); - + TRT_DriftCircle(const TRT_DriftCircle &) =default; + TRT_DriftCircle &operator=(const TRT_DriftCircle &)=default; + TRT_DriftCircle &operator=(TRT_DriftCircle &&)=default; /** Constructor with parameters: compact id of the DriftCircle, the driftRadius and its error @@ -65,28 +64,28 @@ class TRT_DriftCircle : public Trk::PrepRawData const unsigned int word=0 ); - TRT_DriftCircle( - const Identifier &Id, - const Amg::Vector2D& driftRadius, - std::vector<Identifier>&& rdoList, - std::unique_ptr<const Amg::MatrixX> errDriftRadius, - const InDetDD::TRT_BaseElement* detEl, - const unsigned int word); + TRT_DriftCircle( + const Identifier &Id, + const Amg::Vector2D& driftRadius, + std::vector<Identifier>&& rdoList, + std::unique_ptr<const Amg::MatrixX> errDriftRadius, + const InDetDD::TRT_BaseElement* detEl, + const unsigned int word); /** Destructor*/ virtual ~TRT_DriftCircle(); //accesors - /** returns the TRT dataword */ - virtual unsigned int getWord() const; + /** returns the TRT dataword */ + virtual unsigned int getWord() const; - /** returns the leading edge bin - * defined as in TRT_LoLumRawData to be the first 0-1 transition */ - virtual int driftTimeBin() const; + /** returns the leading edge bin + * defined as in TRT_LoLumRawData to be the first 0-1 transition */ + virtual int driftTimeBin() const; - /** returns the trailing edge bin */ - virtual int trailingEdge() const; + /** returns the trailing edge bin */ + virtual int trailingEdge() const; /** returns true if the high level threshold was passed */ virtual bool highLevel() const ; @@ -143,7 +142,7 @@ class TRT_DriftCircle : public Trk::PrepRawData private: // not const because of DataPool const InDetDD::TRT_BaseElement* m_detEl; - unsigned int m_word; + unsigned int m_word; }; diff --git a/InnerDetector/InDetRecEvent/InDetPrepRawData/src/TRT_DriftCircle.cxx b/InnerDetector/InDetRecEvent/InDetPrepRawData/src/TRT_DriftCircle.cxx index ff0ffb8af675..1b942f6ddc39 100755 --- a/InnerDetector/InDetRecEvent/InDetPrepRawData/src/TRT_DriftCircle.cxx +++ b/InnerDetector/InDetRecEvent/InDetPrepRawData/src/TRT_DriftCircle.cxx @@ -12,7 +12,6 @@ /////////////////////////////////////////////////////////////////// #include "InDetPrepRawData/TRT_DriftCircle.h" -// forward declares #include "GaudiKernel/MsgStream.h" namespace InDet{ @@ -44,7 +43,7 @@ TRT_DriftCircle::TRT_DriftCircle( : PrepRawData(Id, driftRadius, errDriftRadius), //call base class constructor m_detEl(detEl), - m_word(word) + m_word(word) { } @@ -61,7 +60,7 @@ TRT_DriftCircle::TRT_DriftCircle( std::move(rdoList), std::move(errDriftRadius)), //call base class constructor m_detEl(detEl), - m_word(word) + m_word(word) { } @@ -77,35 +76,22 @@ TRT_DriftCircle::TRT_DriftCircle() : PrepRawData(), m_detEl( 0 ), - m_word( 0) + m_word( 0) { } -//Copy constructor: -TRT_DriftCircle::TRT_DriftCircle(const TRT_DriftCircle & RIO) - : - PrepRawData( RIO ), - m_detEl(RIO.m_detEl), - m_word( RIO.m_word) - -{ -} double TRT_DriftCircle::driftTime(bool& valid) const { - /* - std::cout << " TRT_DriftCircle ERROR - driftTime(valid) is depreciated " - << std::endl; - std::cout << " use rawDriftTime() and driftTimeValid() instead " << std::endl; - */ + valid = driftTimeValid(); return rawDriftTime(); } -//assignment operator +/**assignment operator TRT_DriftCircle& TRT_DriftCircle::operator=(const TRT_DriftCircle& RIO) { if (&RIO !=this) { @@ -115,17 +101,18 @@ TRT_DriftCircle& TRT_DriftCircle::operator=(const TRT_DriftCircle& RIO) return *this; } +**/ MsgStream& TRT_DriftCircle::dump( MsgStream& stream) const { - stream << "TRT_DriftCircle object"<<std::endl; - stream << "Level (true/false) " << highLevel() << std::endl; - stream << "Valid (true/false) " << driftTimeValid() << std::endl; - stream << "timeOverThreshold: " << timeOverThreshold() << std::endl; - stream << "driftTime: " << rawDriftTime() << std::endl; - stream << "dataWord: " << m_word << std::endl; - stream << "Base class (PrepRawData):" << std::endl; + stream << "TRT_DriftCircle object"<<endmsg; + stream << "Level (true/false) " << highLevel() << endmsg; + stream << "Valid (true/false) " << driftTimeValid() << endmsg; + stream << "timeOverThreshold: " << timeOverThreshold() << endmsg; + stream << "driftTime: " << rawDriftTime() << endmsg; + stream << "dataWord: " << m_word << endmsg; + stream << "Base class (PrepRawData):" << endmsg; this->PrepRawData::dump(stream); return stream; -- GitLab From dca39915078aee0600a5135d2c99c8a676ad704f Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Tue, 3 Jul 2018 17:00:10 +0200 Subject: [PATCH 324/562] TrigMultiVarHypo: Add missing library dependency. Fixes linking in dbg build. Former-commit-id: 53e6629c4198ac628bc679e12729c056d445d48c --- Trigger/TrigHypothesis/TrigMultiVarHypo/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/CMakeLists.txt b/Trigger/TrigHypothesis/TrigMultiVarHypo/CMakeLists.txt index af904aff6aab..9053f6079714 100644 --- a/Trigger/TrigHypothesis/TrigMultiVarHypo/CMakeLists.txt +++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/CMakeLists.txt @@ -23,7 +23,7 @@ atlas_add_library( TrigMultiVarHypoLib src/*.cxx PUBLIC_HEADERS TrigMultiVarHypo LINK_LIBRARIES xAODTrigCalo xAODTrigRinger TrigCaloEvent TrigSteeringEvent TrigInterfacesLib TrigTimeAlgsLib DecisionHandlingLib - PRIVATE_LINK_LIBRARIES GaudiKernel ) + PRIVATE_LINK_LIBRARIES GaudiKernel AthViews ) atlas_add_component( TrigMultiVarHypo src/components/*.cxx -- GitLab From c7ce35dcdb6bd45c4467dd632fcffa32d2e19967 Mon Sep 17 00:00:00 2001 From: "Vincent R. Pascuzzi" <vincent.pascuzzi@cern.ch> Date: Tue, 3 Jul 2018 15:03:59 +0000 Subject: [PATCH 325/562] Update SimHitCreatorMS.cxx: fix order of variable initialisation Cleaned up `-Wreorder` warnings. Former-commit-id: 201da5b8583cf2e6e493190cd7eb2e476f694d80 --- .../ISF_FatrasToolsMS/src/SimHitCreatorMS.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/src/SimHitCreatorMS.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/src/SimHitCreatorMS.cxx index 8b1fdbe7ca78..e4243da59403 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/src/SimHitCreatorMS.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/src/SimHitCreatorMS.cxx @@ -47,18 +47,18 @@ iFatras::SimHitCreatorMS::SimHitCreatorMS(const std::string& t, m_incidentSvc("IncidentSvc", n), m_extrapolator(""), m_measTool("Muon::MuonTGMeasurementTool/MuonTGMeasurementTool"), - m_mdtCollectionName("MDT_Hits"), - m_rpcCollectionName("RPC_Hits"), - m_tgcCollectionName("TGC_Hits"), - m_cscCollectionName("CSC_Hits"), - m_mmCollectionName("MM_Hits"), - m_stgcCollectionName("sTGC_Hits"), m_mdtSimHitCollection(nullptr), m_rpcSimHitCollection(nullptr), m_tgcSimHitCollection(nullptr), m_cscSimHitCollection(nullptr), m_mmSimHitCollection(nullptr), m_stgcSimHitCollection(nullptr), + m_mdtCollectionName("MDT_Hits"), + m_rpcCollectionName("RPC_Hits"), + m_tgcCollectionName("TGC_Hits"), + m_cscCollectionName("CSC_Hits"), + m_mmCollectionName("MM_Hits"), + m_stgcCollectionName("sTGC_Hits"), m_randomSvc("AtDSFMTGenSvc", n), m_randomEngineName("FatrasRnd"), m_randomEngine(nullptr), -- GitLab From 2efa3017cd4de46523f72c65641dab545127f925 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Tue, 3 Jul 2018 10:53:20 +0200 Subject: [PATCH 326/562] ForwardTracker: Fix clang warnings. clang warnings: - unused variable. - class with virtual functions but no virtual dtor. Former-commit-id: 2540865d521c1f1dd360fa89ed6ff3c5431f5cd3 --- ForwardDetectors/ForwardTracker/ForwardTracker/IBender.h | 3 ++- ForwardDetectors/ForwardTracker/src/Beamline.cxx | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ForwardDetectors/ForwardTracker/ForwardTracker/IBender.h b/ForwardDetectors/ForwardTracker/ForwardTracker/IBender.h index 715b4efba3d5..f95a2395c9ff 100644 --- a/ForwardDetectors/ForwardTracker/ForwardTracker/IBender.h +++ b/ForwardDetectors/ForwardTracker/ForwardTracker/IBender.h @@ -14,7 +14,8 @@ namespace ForwardTracker { class IBender { public: - + + virtual ~IBender() {} virtual void bend(IParticle&) const = 0; typedef boost::shared_ptr<IBender> ConstPtr_t; diff --git a/ForwardDetectors/ForwardTracker/src/Beamline.cxx b/ForwardDetectors/ForwardTracker/src/Beamline.cxx index 39c4fdb6ef32..67165ccbce7f 100644 --- a/ForwardDetectors/ForwardTracker/src/Beamline.cxx +++ b/ForwardDetectors/ForwardTracker/src/Beamline.cxx @@ -45,7 +45,7 @@ namespace ForwardTracker { public: - ParticleTracker(IParticle& particle): m_particle(particle), m_element(0) {} + ParticleTracker(IParticle& particle): m_particle(particle) {} bool operator()(const IBeamElement::ConstPtr_t& be) { @@ -59,7 +59,6 @@ namespace ForwardTracker { private: IParticle& m_particle; - int m_element; }; void Beamline::track(IParticle& particle) const { // Pass the particle to beam elements until out of aperture or endPlane -- GitLab From 7ef00e89bfe3ba7e35041d14f693866aa0e065dd Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Tue, 3 Jul 2018 10:54:31 +0200 Subject: [PATCH 327/562] RPC_Digitization: Fix clang warning. clang warning: unused variable. Former-commit-id: 73d308462e3dcd5c7da4ff2c2b14272d89868573 --- .../RPC_Digitization/src/RpcDigitizationTool.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/MuonSpectrometer/MuonDigitization/RPC_Digitization/src/RpcDigitizationTool.cxx b/MuonSpectrometer/MuonDigitization/RPC_Digitization/src/RpcDigitizationTool.cxx index 50f6978dc0a8..df3c0d4cc402 100644 --- a/MuonSpectrometer/MuonDigitization/RPC_Digitization/src/RpcDigitizationTool.cxx +++ b/MuonSpectrometer/MuonDigitization/RPC_Digitization/src/RpcDigitizationTool.cxx @@ -2473,7 +2473,6 @@ StatusCode RpcDigitizationTool::DumpRPCCalibFromCoolDB() { std::map <Identifier,std::string>::const_iterator itrs; std::map <Identifier, float>::const_iterator itrf; std::map <Identifier, int>::const_iterator itri; - std::vector<Identifier> ::const_iterator itrv; ATH_MSG_DEBUG ( "Size Summary RPC_EfficiencyMap: " << m_rSummarySvc->RPC_EfficiencyMap().size() ); for (itr=m_rSummarySvc->RPC_EfficiencyMap().begin(); itr!=m_rSummarySvc->RPC_EfficiencyMap().end(); ++itr) { -- GitLab From e71ca538313426575eb0e71811ab7983190fb7ea Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Tue, 3 Jul 2018 10:54:59 +0200 Subject: [PATCH 328/562] AthenaPoolExampleConverter: Fix clang warnings. clang warnings: unused private data members. Former-commit-id: e8c3e07a6817e5e8bdeb666521207d288078ba7d --- .../ExampleTrack_p1.h | 81 ++++++++++--------- .../AthenaPoolExampleConverter/CMakeLists.txt | 1 + 2 files changed, 42 insertions(+), 40 deletions(-) diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleConverter/AthenaPoolExampleConverter/ExampleTrack_p1.h b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleConverter/AthenaPoolExampleConverter/ExampleTrack_p1.h index 275f4bd8f050..a9c496fc0b81 100755 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleConverter/AthenaPoolExampleConverter/ExampleTrack_p1.h +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleConverter/AthenaPoolExampleConverter/ExampleTrack_p1.h @@ -2,43 +2,44 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef ATHENAPOOLEXAMPLECONVERTER_EXAMPLETRACK_P1_H -#define ATHENAPOOLEXAMPLECONVERTER_EXAMPLETRACK_P1_H - -/** @file ExampleTrack_p1.h - * @brief This file contains the class definition for the ExampleTrack_p1 class. - * @author Peter van Gemmeren <gemmeren@anl.gov> - * $Id: ExampleTrack_p1.h,v 1.1 2008-03-25 22:03:54 gemmeren Exp $ - **/ - -// DataModelAthenaPool includes -#include "DataModelAthenaPool/ElementLink_p3.h" -#include "DataModelAthenaPool/ElementLinkVector_p1.h" -#include "DataModelAthenaPool/Navigable_p2.h" - -#include <CLHEP/Geometry/Vector3D.h> -#include <string> - -/** @class ExampleTrack_p1 - * @brief This class provides a dummy hit data object for AthenaPool. - **/ -class ExampleTrack_p1 { - -public: // Constructor and Destructor - /// Default Constructor - ExampleTrack_p1() : m_pt(0.0), m_eta(0.0), m_phi(0.0), m_detector(""), m_elementlink1(), m_elementlink2(), m_elementlinkvector(), m_navigable(), m_weightednavigable() {} - /// Destructor - virtual ~ExampleTrack_p1() {} - -private: - double m_pt; - double m_eta; - double m_phi; - std::string m_detector; - - ElementLinkInt_p3 m_elementlink1, m_elementlink2; - ElementLinkIntVector_p1 m_elementlinkvector; - Navigable_p2<uint32_t> m_navigable; - Navigable_p2<uint32_t, double> m_weightednavigable; -}; -#endif +#ifndef ATHENAPOOLEXAMPLECONVERTER_EXAMPLETRACK_P1_H +#define ATHENAPOOLEXAMPLECONVERTER_EXAMPLETRACK_P1_H + +/** @file ExampleTrack_p1.h + * @brief This file contains the class definition for the ExampleTrack_p1 class. + * @author Peter van Gemmeren <gemmeren@anl.gov> + * $Id: ExampleTrack_p1.h,v 1.1 2008-03-25 22:03:54 gemmeren Exp $ + **/ + +// DataModelAthenaPool includes +#include "DataModelAthenaPool/ElementLink_p3.h" +#include "DataModelAthenaPool/ElementLinkVector_p1.h" +#include "DataModelAthenaPool/Navigable_p2.h" +#include "CxxUtils/unused.h" + +#include <CLHEP/Geometry/Vector3D.h> +#include <string> + +/** @class ExampleTrack_p1 + * @brief This class provides a dummy hit data object for AthenaPool. + **/ +class ExampleTrack_p1 { + +public: // Constructor and Destructor + /// Default Constructor + ExampleTrack_p1() : m_pt(0.0), m_eta(0.0), m_phi(0.0), m_detector(""), m_elementlink1(), m_elementlink2(), m_elementlinkvector(), m_navigable(), m_weightednavigable() {} + /// Destructor + virtual ~ExampleTrack_p1() {} + +private: + double ATH_UNUSED_MEMBER(m_pt); + double ATH_UNUSED_MEMBER(m_eta); + double ATH_UNUSED_MEMBER(m_phi); + std::string m_detector; + + ElementLinkInt_p3 m_elementlink1, m_elementlink2; + ElementLinkIntVector_p1 m_elementlinkvector; + Navigable_p2<uint32_t> m_navigable; + Navigable_p2<uint32_t, double> m_weightednavigable; +}; +#endif diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleConverter/CMakeLists.txt b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleConverter/CMakeLists.txt index 4dc253a11ecd..3b12264e0816 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleConverter/CMakeLists.txt +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleConverter/CMakeLists.txt @@ -8,6 +8,7 @@ atlas_subdir( AthenaPoolExampleConverter ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC Control/DataModelAthenaPool + Control/CxxUtils Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleData Database/AthenaPOOL/AthenaPoolServices Database/AthenaPOOL/AthenaPoolUtilities -- GitLab From a1c7931bcb81e7f75e638702e156ac38c3d63af0 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Tue, 3 Jul 2018 10:55:24 +0200 Subject: [PATCH 329/562] TrkAlgebraUtils: Fix clang warning. clang warning: unused variable. Former-commit-id: 8adc86de8b64e5db834a339e6a01d21fb7aa0334 --- Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx index a8a508c04619..eec0a942deb4 100644 --- a/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx +++ b/Tracking/TrkAlignment/TrkAlgebraUtils/src/AlSpaMat.cxx @@ -578,7 +578,6 @@ void AlSpaMat::RemoveAlignPar(int index, int control) index = index-control; mapiterator pos; - indices key; for(int row=index; row<(size()-shiftRow); row++) { shiftCol = 0; -- GitLab From 5eb8cc79e807468d1df4c9b10d633a2a0aa01377 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Tue, 3 Jul 2018 10:56:05 +0200 Subject: [PATCH 330/562] LArROD: Fix clang warning. clang warning: unused private data member. Former-commit-id: aa64ce817b694f5dcce3c322c7d9bebe7831bc3e --- LArCalorimeter/LArROD/LArROD/LArFebErrorSummaryMaker.h | 1 - LArCalorimeter/LArROD/src/LArFebErrorSummaryMaker.cxx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/LArCalorimeter/LArROD/LArROD/LArFebErrorSummaryMaker.h b/LArCalorimeter/LArROD/LArROD/LArFebErrorSummaryMaker.h index 6ea3bcb17ff2..e60de328f3b6 100644 --- a/LArCalorimeter/LArROD/LArROD/LArFebErrorSummaryMaker.h +++ b/LArCalorimeter/LArROD/LArROD/LArFebErrorSummaryMaker.h @@ -44,7 +44,6 @@ class LArFebErrorSummaryMaker : public AthAlgorithm private: - int m_nwarns; //counter for warnings int m_missingFebsWarns; //counter for missing FEB warnings std::vector<int> m_errors; //error types accumulator std::set<unsigned int> m_all_febs ; diff --git a/LArCalorimeter/LArROD/src/LArFebErrorSummaryMaker.cxx b/LArCalorimeter/LArROD/src/LArFebErrorSummaryMaker.cxx index cd3d28cc736b..39cf8496df11 100644 --- a/LArCalorimeter/LArROD/src/LArFebErrorSummaryMaker.cxx +++ b/LArCalorimeter/LArROD/src/LArFebErrorSummaryMaker.cxx @@ -19,7 +19,7 @@ ///////////////////////////////////////////////////////////////////// LArFebErrorSummaryMaker::LArFebErrorSummaryMaker(const std::string& name, ISvcLocator* pSvcLocator) : - AthAlgorithm(name, pSvcLocator),m_nwarns(0),m_missingFebsWarns(0), + AthAlgorithm(name, pSvcLocator),m_missingFebsWarns(0), m_isHec(false), m_isFcal(false), m_isEmb(false), m_isEmec(false), m_isEmPS(false), m_isAside(false), m_isCside(false), m_onlineHelper(nullptr), -- GitLab From d42a3682aad45e87bab08eb7bd301dea680fb930 Mon Sep 17 00:00:00 2001 From: Jovan Mitrevski <Jovan.Mitrevski@cern.ch> Date: Tue, 3 Jul 2018 18:31:47 +0200 Subject: [PATCH 331/562] finished all the features of egammaMVACalibTool; still need to update egammaMVASvc Former-commit-id: 75ceb803c81e5dd1c67e61ecd3c168fbdaaa0d41 --- .../egammaInterfaces/IegammaMVACalibTool.h | 4 + .../egammaInterfaces/IegammaMVASvc.h | 9 +- .../egammaMVACalib/src/egammaMVACalibTool.cxx | 364 +++++++++++++----- .../egammaMVACalib/src/egammaMVACalibTool.h | 29 +- .../egammaMVACalib/src/egammaMVASvc.cxx | 108 +----- .../egamma/egammaMVACalib/src/egammaMVASvc.h | 14 +- 6 files changed, 312 insertions(+), 216 deletions(-) diff --git a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVACalibTool.h b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVACalibTool.h index 221356d114fe..11adfca7b11b 100644 --- a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVACalibTool.h +++ b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVACalibTool.h @@ -15,6 +15,10 @@ public: DeclareInterfaceID(IegammaMVACalibTool, 1, 0); virtual ~IegammaMVACalibTool() override {}; + + virtual float getEnergy(const xAOD::Egamma* eg, + const xAOD::CaloCluster* clus) const = 0; + }; #endif diff --git a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVASvc.h b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVASvc.h index e3ff4a184d37..9eb2ec6d3d01 100644 --- a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVASvc.h +++ b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVASvc.h @@ -22,9 +22,12 @@ public: virtual ~IegammaMVASvc() override {}; - virtual StatusCode execute(xAOD::CaloCluster* cluster,const xAOD::Egamma* eg)=0; - virtual StatusCode execute(xAOD::CaloCluster* cluster,const xAOD::EgammaParameters::EgammaType egType)=0; - virtual StatusCode hltexecute(xAOD::CaloCluster* cluster, const std::string& egType)=0; + virtual StatusCode execute(xAOD::CaloCluster* cluster, + const xAOD::Egamma* eg) const = 0; + virtual StatusCode execute(xAOD::CaloCluster* cluster, + const xAOD::EgammaParameters::EgammaType egType) const = 0; + virtual StatusCode hltexecute(xAOD::CaloCluster* cluster, + const std::string& egType) const =0; }; diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx index d49c2a3aa6f0..e42752585c7c 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx @@ -8,9 +8,12 @@ #include "egammaMVACalib/egammaMVATreeHelper.h" #include "MVAUtils/BDT.h" #include "PathResolver/PathResolver.h" +#include "xAODEgamma/PhotonAODHelpers.h" #include "TFile.h" +#include <cmath> + egammaMVACalibTool::egammaMVACalibTool(const std::string& type, const std::string& name, const IInterface* parent) : base_class(type, name, parent) @@ -24,6 +27,15 @@ egammaMVACalibTool::~egammaMVACalibTool() StatusCode egammaMVACalibTool::initialize() { + if (m_shiftType == MEAN10TOTRUE) { + ATH_MSG_DEBUG("Using Mean10 shift"); + } else if (m_shiftType == NOSHIFT) { + ATH_MSG_DEBUG("Not using a shift"); + } else { + ATH_MSG_FATAL("Unsupported shift: " << m_shiftType); + return StatusCode::FAILURE; + } + // get the BDTs ATH_MSG_DEBUG("get BDTs in folder: " << m_folder); switch (m_particleType) { @@ -71,16 +83,6 @@ StatusCode egammmMVACalibTool::setupBDT(std::string fileName) m_hPoly = hPoly->Clone(); m_hPoly->SetDirectory(0); - // // Load formulae - // TObjArray *formulaeTmp = nullPtr; - // f->GetObject("formulae", formulaeTmp); - // if (!formulaeTmp) { - // ATH_MSG_FATAL("Could not find formulae"); - // return StatusCode::FAILURE; - // } - // auto formulae = std::unique_ptr<TObjArray>(formulaeTmp); - // formulae->SetOwner(); // to delete the objects when d-tor is called - // Load variables TObjArray *variablesTmp = nullPtr; f->GetObject("variables", variablesTmp); @@ -129,13 +131,6 @@ StatusCode egammmMVACalibTool::setupBDT(std::string fileName) return StatusCode::FAILURE; } - // (pre) define formulae - TNamed *formula; - TIter nextFormula(formulae.get()); - while ((formula = (TNamed*) nextFormula())){ - predefineFormula(formula->GetName(), formula->GetTitle(), "variable"); - } - // Loop simultaneously over trees, variables and shifts // Define the BDTs, the list of variables and the shift for each BDT TObjString *str2, *shift; @@ -145,11 +140,10 @@ StatusCode egammmMVACalibTool::setupBDT(std::string fileName) TIter nextShift(shifts.get()); for (int i=0; (tree = (TTree*) nextTree()) && ((TObjString*) nextVariables()); ++i) { - key.bin = i+1; // bin has an offset BDT *bdt = new BDT(tree); - m_BDTs[key] = bdt; - std::vector<float*> pointers; + m_BDTs.emplace_back(tree); + std::vector<std::function<float(const xAOD::Egamma*, const xAOD::CaloCluster*)> > funcs; // Loop over variables, which are separated by comma char separator_var = ';'; if (getString(variables->At(i)).Index(";") < 1) separator_var = ','; // old versions @@ -157,19 +151,25 @@ StatusCode egammmMVACalibTool::setupBDT(std::string fileName) TIter nextVar(tokens.get()); while ((str2 = (TObjString*) nextVar())) { - TString varName = getString(str2); - if (!varName.Length()) continue; - std::map< TString, VarFormula >::iterator it = m_formulae.find(varName); - if (it == m_formulae.end()) - { - ATH_MSG_FATAL("egammaMVACalib::setupBDT Variable not defined: "<< varName.Data()); - throw std::runtime_error("Variable not defined"); + const TString& varName = getString(str2); + if (!varName.Length()) { + ATH_MSG_FATAL("There was an empty variable name!"); + return StatusCode::FATAL; } - pointers.push_back(&(it->second.variable)); + try { + funcs.push_back(m_funcsLibrary.at(varName)); + } catch(const std::out_of_range& e) { + ATH_MSG_FATAL("Could not find formula for variable " << varName << ", error: " << e.what()); + return StatusCode::FATAL; + } + } + m_funcs.push_back(std::move(funcs)); + + if (m_shiftType == MEAN10TOTRUE) { + shift = (TObjString*) nextShift(); + const TString& shiftFormula = getString(shift); + m_shifts.emplace_back("", shiftFormula); } - bdt->SetPointers(pointers); - shift = (TObjString*) nextShift(); - if (shift) m_additional_infos[key]["Mean10"] = getString(shift); } return StatusCode::SUCCESS; @@ -180,11 +180,16 @@ StatusCode egammmMVACalibTool::initializeElectronFuncs() ATH_CHECK(initializeClusterFuncs("el")); ATH_CHECK(initializeEgammaFuncs("el")); - m_electronFuncs["el_charge"] = compute_el_charge; - m_electronFuncs["el_tracketa"] = compute_el_tracketa; - m_electronFuncs["el_trackpt"] = compute_el_trackpt; - m_electronFuncs["el_trackz0"] = compute_el_trackz0; - m_electronFuncs["el_refittedTrack_qoverp"] = compute_el_refittedTrack_qoverp; + m_funcLibrary["el_charge"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return compute_el_charge(*(static_cast<const xAOD::Electron*>(eg))); }; + m_funcLibrary["el_tracketa"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return compute_el_tracketa(*(static_cast<const xAOD::Electron*>(eg))); }; + m_funcLibrary["el_trackpt"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return compute_el_trackpt(*(static_cast<const xAOD::Electron*>(eg))); }; + m_funcLibrary["el_trackz0"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return compute_el_trackz0(*(static_cast<const xAOD::Electron*>(eg))); }; + m_funcLibrary["el_refittedTrack_qoverp"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return compute_el_refittedTrack_qoverp(*(static_cast<const xAOD::Electron*>(eg))); }; return StatusCode::SUCCESS; } @@ -202,38 +207,76 @@ StatusCode egammmMVACalibTool::initializeConvertedPhotonFuncs() ATH_CHECK(initializeClusterFuncs("ph")); ATH_CHECK(initializeEgammaFuncs("ph")); - m_convFunc["ph_Rconv"] = [](const ConversionHelper& ch) { return ch.ph_Rconv(); }; - m_convFunc["ph_zconv"] = [](const ConversionHelper& ch) { return ch.ph_zconv(); }; - m_convFunc["ph_pt1conv"] = [](const ConversionHelper& ch) { return ch.ph_pt1conv(); }; - m_convFunc["ph_pt2conv"] = [](const ConversionHelper& ch) { return ch.ph_pt2conv(); }; - m_convFunc["ph_ptconv"] = [](const ConversionHelper& ch) { return ch.ph_ptconv(); }; + m_funcLibrary["ph_Rconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return xAOD::EgammaHelpers::conversionRadius(static_cast<const xAOD::Photon*>(eg)); }; + m_funcLibrary["ph_zconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return static_cast<const xAOD::Photon*>(eg)->vertex()->position().z(); }; + m_funcLibrary["ph_pt1conv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { + static const SG::AuxElement::Accessor<float> accPt1("pt1"); + + auto vx = static_cast<const xAOD::Photon*>(eg)->vertex(); + return accPt1(*vx); + }; + m_funcLibrary["ph_pt2conv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { + static const SG::AuxElement::Accessor<float> accPt2("pt2"); + + auto vx = static_cast<const xAOD::Photon*>(eg)->vertex(); + return accPt2(*vx); + }; + + m_funcLibrary["ph_ptconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { + static const SG::AuxElement::Accessor<float> accPx("px"); + static const SG::AuxElement::Accessor<float> accPy("py"); + + auto vx = static_cast<const xAOD::Photon*>(eg)->vertex(); + return std::hypot(accPx(*vx), accPy(*vx)); + }; return StatusCode::SUCCESS; } StatusCode egammmMVACalibTool::initializeClusterFuncs(const std::string& prefix) { - m_clusterFuncs[prefix + "_cl_eta"] = compute_cl_eta; - m_clusterFuncs[prefix + "_cl_phi"] = compute_cl_phi; - m_clusterFuncs[prefix + "_cl_E"] = [](const xAOD::CaloCluster& cl) { return cl.e(); }; - m_clusterFuncs[prefix + "_cl_etaCalo"] = compute_cl_etaCalo; - m_clusterFuncs[prefix + "_cl_phiCalo"] = compute_cl_phiCalo; - m_clusterFuncs[prefix + "_cl_E_TileGap3"] = [](const xAOD::CaloCluster& cl) { return cl.eSample(CaloSampling::TileGap3); }; + m_funcLibrary[prefix + "_cl_eta"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_cl_eta(*cl); }; + m_funcLibrary[prefix + "_cl_phi"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_cl_phi(*cl); }; + m_funcLibrary[prefix + "_cl_E"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_cl_e(*cl); }; + m_funcLibrary[prefix + "_cl_etaCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_cl_etaCalo(*cl); }; + m_funcLibrary[prefix + "_cl_phiCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_cl_phiCalo(*cl); }; + m_funcLibrary[prefix + "_cl_E_TileGap3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return cl.eSample(CaloSampling::TileGap3); }; if (m_use_layer_corrected) { - m_clusterFuncs[prefix + "_rawcl_Es0"] = compute_correctedcl_Es0; - m_clusterFuncs[prefix + "_rawcl_Es1"] = compute_correctedcl_Es1; - m_clusterFuncs[prefix + "_rawcl_Es2"] = compute_correctedcl_Es2; - m_clusterFuncs[prefix + "_rawcl_Es3"] = compute_correctedcl_Es3; - m_clusterFuncs[prefix + "_rawcl_calibHitsShowerDepth"] = compute_correctedcl_calibHitsShowerDepth; + m_funcLibrary[prefix + "_rawcl_Es0"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_correctedcl_Es0(*cl); }; + m_funcLibrary[prefix + "_rawcl_Es1"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_correctedcl_Es1(*cl); }; + m_funcLibrary[prefix + "_rawcl_Es2"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_correctedcl_Es2(*cl); }; + m_funcLibrary[prefix + "_rawcl_Es3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_correctedcl_Es3(*cl); }; + m_funcLibrary[prefix + "_rawcl_calibHitsShowerDepth"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_correctedcl_calibHitsShowerDepth(*cl); }; } else { - m_clusterFuncs[prefix + "_rawcl_Es0"] = compute_rawcl_Es0; - m_clusterFuncs[prefix + "_rawcl_Es1"] = compute_rawcl_Es1; - m_clusterFuncs[prefix + "_rawcl_Es2"] = compute_rawcl_Es2; - m_clusterFuncs[prefix + "_rawcl_Es3"] = compute_rawcl_Es3; + m_funcLibrary[prefix + "_rawcl_Es0"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_rawcl_Es0(*cl); }; + m_funcLibrary[prefix + "_rawcl_Es1"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_rawcl_Es1(*cl); }; + m_funcLibrary[prefix + "_rawcl_Es2"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_rawcl_Es2(*cl); }; + m_funcLibrary[prefix + "_rawcl_Es3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_rawcl_Es3(*cl); }; // and everything that depends on // static cast here is needed to resolve overload (std::function is not able to) - m_clusterFuncs[prefix + "_rawcl_calibHitsShowerDepth"] = static_cast<float(*)(const xAOD::CaloCluster&)>(compute_rawcl_calibHitsShowerDepth); + m_funcLibrary[prefix + "_rawcl_calibHitsShowerDepth"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_rawcl_calibHitsShowerDepth(*cl); }; } return StatusCode::SUCCESS; @@ -241,50 +284,171 @@ StatusCode egammmMVACalibTool::initializeClusterFuncs(const std::string& prefix) StatusCode egammmMVACalibTool::initializeEgammaFuncs(const std::string& prefix) { - m_egammaFuncs[prefix + "_e011"] = SG::AuxElement::Accessor<float>("e011"); - m_egammaFuncs[prefix + "_e033"] = SG::AuxElement::Accessor<float>("e033"); - m_egammaFuncs[prefix + "_e132"] = SG::AuxElement::Accessor<float>("e132"); - m_egammaFuncs[prefix + "_e1152"] = SG::AuxElement::Accessor<float>("e1152"); - m_egammaFuncs[prefix + "_ethad1"] = SG::AuxElement::Accessor<float>("ethad1"); - m_egammaFuncs[prefix + "_ethad"] = SG::AuxElement::Accessor<float>("ethad"); - m_egammaFuncs[prefix + "_f1"] = SG::AuxElement::Accessor<float>("f1"); - m_egammaFuncs[prefix + "_f3"] = SG::AuxElement::Accessor<float>("f3"); - m_egammaFuncs[prefix + "_f1core"] = SG::AuxElement::Accessor<float>("f1core"); - m_egammaFuncs[prefix + "_f3core"] = SG::AuxElement::Accessor<float>("f3core"); - m_egammaFuncs[prefix + "_e233"] = SG::AuxElement::Accessor<float>("e233"); - m_egammaFuncs[prefix + "_e235"] = SG::AuxElement::Accessor<float>("e235"); - m_egammaFuncs[prefix + "_e255"] = SG::AuxElement::Accessor<float>("e255"); - m_egammaFuncs[prefix + "_e237"] = SG::AuxElement::Accessor<float>("e237"); - m_egammaFuncs[prefix + "_e277"] = SG::AuxElement::Accessor<float>("e277"); - m_egammaFuncs[prefix + "_e333"] = SG::AuxElement::Accessor<float>("e333"); - m_egammaFuncs[prefix + "_e335"] = SG::AuxElement::Accessor<float>("e335"); - m_egammaFuncs[prefix + "_e337"] = SG::AuxElement::Accessor<float>("e337"); - m_egammaFuncs[prefix + "_e377"] = SG::AuxElement::Accessor<float>("e377"); - m_egammaFuncs[prefix + "_weta1"] = SG::AuxElement::Accessor<float>("weta1"); - m_egammaFuncs[prefix + "_weta2"] = SG::AuxElement::Accessor<float>("weta2"); - m_egammaFuncs[prefix + "_e2ts1"] = SG::AuxElement::Accessor<float>("e2ts1"); - m_egammaFuncs[prefix + "_e2tsts1"] = SG::AuxElement::Accessor<float>("e2tsts1"); - m_egammaFuncs[prefix + "_fracs1"] = SG::AuxElement::Accessor<float>("fracs1"); - m_egammaFuncs[prefix + "_widths1"] = SG::AuxElement::Accessor<float>("widths1"); - m_egammaFuncs[prefix + "_widths2"] = SG::AuxElement::Accessor<float>("widths2"); - m_egammaFuncs[prefix + "_poscs1"] = SG::AuxElement::Accessor<float>("poscs1"); - m_egammaFuncs[prefix + "_poscs2"] = SG::AuxElement::Accessor<float>("poscs2"); - m_egammaFuncs[prefix + "_asy1"] = SG::AuxElement::Accessor<float>("asy1"); - m_egammaFuncs[prefix + "_pos"] = SG::AuxElement::Accessor<float>("pos"); - m_egammaFuncs[prefix + "_pos7"] = SG::AuxElement::Accessor<float>("pos7"); - m_egammaFuncs[prefix + "_barys1"] = SG::AuxElement::Accessor<float>("barys1"); - m_egammaFuncs[prefix + "_wtots1"] = SG::AuxElement::Accessor<float>("wtots1"); - m_egammaFuncs[prefix + "_emins1"] = SG::AuxElement::Accessor<float>("emins1"); - m_egammaFuncs[prefix + "_emaxs1"] = SG::AuxElement::Accessor<float>("emaxs1"); - m_egammaFuncs[prefix + "_r33over37allcalo"] = SG::AuxElement::Accessor<float>("r33over37allcalo"); - m_egammaFuncs[prefix + "_ecore"] = SG::AuxElement::Accessor<float>("ecore"); - m_egammaFuncs[prefix + "_Reta"] = SG::AuxElement::Accessor<float>("Reta"); - m_egammaFuncs[prefix + "_Rphi"] = SG::AuxElement::Accessor<float>("Rphi"); - m_egammaFuncs[prefix + "_Eratio"] = SG::AuxElement::Accessor<float>("Eratio"); - m_egammaFuncs[prefix + "_Rhad"] = SG::AuxElement::Accessor<float>("Rhad"); - m_egammaFuncs[prefix + "_Rhad1"] = SG::AuxElement::Accessor<float>("Rhad1"); - m_egammaFuncs[prefix + "_DeltaE"] = SG::AuxElement::Accessor<float>("DeltaE"); + m_funcLibrary[prefix + "_e011"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e011); }; + m_funcLibrary[prefix + "_e033"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e033); }; + m_funcLibrary[prefix + "_e132"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e132); }; + m_funcLibrary[prefix + "_e1152"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e1152); }; + m_funcLibrary[prefix + "_ethad1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::ethad1); }; + m_funcLibrary[prefix + "_ethad"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::ethad); }; + m_funcLibrary[prefix + "_f1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::f1); }; + m_funcLibrary[prefix + "_f3"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::f3); }; + m_funcLibrary[prefix + "_f1core"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::f1core); }; + m_funcLibrary[prefix + "_f3core"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::f3core); }; + m_funcLibrary[prefix + "_e233"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e233); }; + m_funcLibrary[prefix + "_e235"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e235); }; + m_funcLibrary[prefix + "_e255"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e255); }; + m_funcLibrary[prefix + "_e237"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e237); }; + m_funcLibrary[prefix + "_e277"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e277); }; + m_funcLibrary[prefix + "_e333"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e333); }; + m_funcLibrary[prefix + "_e335"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e335); }; + m_funcLibrary[prefix + "_e337"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e337); }; + m_funcLibrary[prefix + "_e377"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e377); }; + m_funcLibrary[prefix + "_weta1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::weta1); }; + m_funcLibrary[prefix + "_weta2"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::weta2); }; + m_funcLibrary[prefix + "_e2ts1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e2ts1); }; + m_funcLibrary[prefix + "_e2tsts1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e2tsts1); }; + m_funcLibrary[prefix + "_fracs1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::fracs1); }; + m_funcLibrary[prefix + "_widths1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::widths1); }; + m_funcLibrary[prefix + "_widths2"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::widths2); }; + m_funcLibrary[prefix + "_poscs1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::poscs1); }; + m_funcLibrary[prefix + "_poscs2"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::poscs2); }; + m_funcLibrary[prefix + "_asy1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::asy1); }; + m_funcLibrary[prefix + "_pos"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::pos); }; + m_funcLibrary[prefix + "_pos7"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::pos7); }; + m_funcLibrary[prefix + "_barys1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::barys1); }; + m_funcLibrary[prefix + "_wtots1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::wtots1); }; + m_funcLibrary[prefix + "_emins1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::emins1); }; + m_funcLibrary[prefix + "_emaxs1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::emaxs1); }; + m_funcLibrary[prefix + "_r33over37allcalo"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::r33over37allcalo); }; + m_funcLibrary[prefix + "_ecore"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::ecore); }; + m_funcLibrary[prefix + "_Reta"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::Reta); }; + m_funcLibrary[prefix + "_Rphi"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::Rphi); }; + m_funcLibrary[prefix + "_Eratio"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::Eratio); }; + m_funcLibrary[prefix + "_Rhad"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::Rhad); }; + m_funcLibrary[prefix + "_Rhad1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::Rhad1); }; + m_funcLibrary[prefix + "_DeltaE"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::DeltaE); }; return StatusCode::SUCCESS; } +const TString& egammaMVACalibTools::getString(TObject* obj) const +{ + TObjString *objS = dynamic_cast<TObjString*>(obj); + if (!objS) return TString(); + return objS->GetString(); +} + +float egammaMVACalibTools::getEnergy(const xAOD::Egamma* eg, + const xAOD::CaloCluster* clus) const +{ + + if (!clus && eg) { + clus = eg->caloCluster(); + } + if (!clus) { + ATH_MSG_FATAL("The cluster pointer must not be null!"); + throw std::runtime_error("egammaMVACalibTools::getEnergy called with a null cluster"); + return 0.0; + } + + // find the bin of BDT + + const auto initEnergy = clus->energyBE(1) + clus->energyBE(2) + clus->energyBE(3); + + const auto energyVarGeV = (initEnergy / std::cosh(clus->eta())) / CLHEP::GeV; + const auto etaVar = std::abs(clus->eta()); + + const auto bin = m_hPoly->FindBin(etaVar, energyVarGeV) - 1; // poly bins are shifted by one + + // select the bdt and funcsions. (shifts are done later if needed) + const auto& bdt = m_BDTs[bin]; + const auto& funcs = m_funcs[bin]; + + const size_t sz = funcs.size(); + + // could consider adding std::array support to the BDTs + std::vector<float> vars(sz); + + for (size_t i = 0; i < sz; i++) { + vars[i] = funcs[i](eg,clus); + } + + // evaluate the BDT response + const float mvaOutput = bdt.GetResponse(vars); + + // what to do if the MVA response is 0; + if (mvaOutput == 0.) { + if (m_clusterEif0) { + return clus->E(); + } else { + return 0.; + } + } + + // calcluate the unshifted energy + const auto energy = (m_calibrationType == fullCalibration) ? + mvaOutput : (initialEnergy * mvaOutput); + + ATH_MSG_DEBUG("energy after MVA = " << energy); + + if (shift_type == NSHIFT) { + // if no shift, just return the unshifted energy + return energy; + } + + // have to do a shift if here. It's based on the corrected Et in GeV + const auto etGeV = (energy / std::cosh(clus->eta())) / CLHEP::GeV; + + // evaluate the TFormula associated with the bin + const auto shift = m_shifts[bin]->Eval(etGeV); + ATH_MSG_DEBUG("shift = " << shift); + if (shift > 0.5) { + return energy / shift; + } else { + ATH_MSG_WARNING("Shift value too small: " << shift << "; not applying shift"); + return energy; + } +} diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h index b26dc6c474ae..65af87203872 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h @@ -14,6 +14,8 @@ // Framework includes #include "AthenaBaseComps/AthAlgTool.h" #include "TH2Poly.h" +#include "TObject.h" +#inlcude "TString.h" // STL includes #include <string> @@ -41,6 +43,9 @@ public: MEAN10TOTRUE, MEAN20TOTRUE, MEDIAN10TOTRUE, MEDIAN20TOTRUE, NSHIFTCORRECTIONS}; + float getEnergy(const xAOD::Egamma* eg, + const xAOD::CaloCluster* clus) const override final; + private: Gaudi::Property<int> m_particleType {this, "ParticleType", xAOD::EgammaParameters::electron, @@ -67,19 +72,22 @@ private: "use_layer_corrected", true, "whether to use layer corrections"}; + /// A TH2Poly used to extract bin numbers. Note there is an offset of 1 std::unique_ptr<TH2Poly> m_hPoly; + /// Where the BDTs are stored std::vector<MVAUtils::BDT> m_BDTs; - /// map of variable string to function (taking calo cluster) - std::unordered_map<std::string, std::functional<float(const xAOD::CaloCluster&)> > m_clusterFuncs; - /// map of variable string to function (taking egamma) - std::unordered_map<std::string, std::functional<float(const xAOD::Egamma&)> > m_egammaFuncs; - /// map of variable string to function (taking electron) - std::unordered_map<std::string, std::functional<float(const xAOD::Electron&)> > m_electronFuncs; - /// map of variable string to function (taking ConversionHelper) + /// where the pointers to the funcs to calculate the vars per BDT + std::vector<std::vector<std::function<float(const xAOD::Egamma*, const xAOD::CaloCluster*)> > > m_funcs; + + /// shifts for mean10 + std::vector<TFormula> > m_shifts; + + + /// A dictionary of all available functions std::unordered_map<std::string, - std::functional<float(const egammaMVATreeHelpers::ConversionHelper&)> > m_convFuncs; + std::function<float(const xAOD::Egamma*, const xAOD::CaloCluster*)> > m_funcLibrary; /// initialize the functions needed for electrons StatusCode initializeElectronFuncs(); @@ -93,6 +101,11 @@ private: /// a function called by the above functions to setup the egamma funcs StatusCode initializeEgammaFuncs(const std::string& prefix); + + /// a utility to get a TString out of an TObjString pointer + const TString& egammaMVACalibTools::getString(TObject* obj) const + + }; #endif diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx index 8bc770c4c185..4a123c6d848b 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx @@ -29,113 +29,18 @@ StatusCode egammaMVASvc::initialize() ATH_CHECK(m_mvaUnconvertedPhoton.retrieve()); ATH_CHECK(m_mvaConvertedPhoton.retrieve()); - // ATH_MSG_DEBUG("initializing egammaMVACalib for electrons"); - // m_mvaElectron = std::make_unique<egammaMVACalib>(egammaMVACalib::egELECTRON, // particle type - // true, // use new BDT (not TMVA) - // m_folder, // folder with weight files - // "BDTG", // method - // 1, // Full Calib - // false, // not debugging - // "", // that - // "", - // "", - // "", // file pattern of xml files - // true // ignore spectators - // ); - // m_mvaElectron->msg().setLevel(this->msg().level()); - // ATH_MSG_INFO(std::string(m_use_layer_corrected ? "U" : "Not u") + "sing layer correction"); // j4f - // { - // const std::string filename = PathResolverFindCalibFile(m_folder + "/MVACalib_electron.weights.root"); - // ATH_MSG_DEBUG("configuration does not contain list of variables, try to guess:"); // TODO: because it is not implemented - // std::set<std::string> el_variables = guess_variables(filename); - // el_variables.insert({"el_cl_E", "el_cl_eta", "el_rawcl_Es0", "el_rawcl_Es1", "el_rawcl_Es2", "el_rawcl_Es3"}); // used for binning - // for (const auto var : el_variables) { ATH_MSG_DEBUG(" " << var); } - // ATH_MSG_INFO(el_variables.size() << " variables for electrons"); - - // m_MVATreeElectron = std::make_unique<egammaMVATreeElectron>("MVATreeElectron", el_variables, m_use_layer_corrected); - // m_MVATreeElectron->msg().setLevel(this->msg().level()); - // m_mvaElectron->InitTree(m_MVATreeElectron.get()); - // } - - // ATH_MSG_DEBUG("initializing egammaMVACalib for photons"); - // m_mvaPhoton = std::make_unique<egammaMVACalib>(egammaMVACalib::egPHOTON, // particle type - // true, // use new BDT (not TMVA) - // m_folder, // folder with weight files - // "BDTG", // method - // 1 , // Full Calib - // false, // not debugging - // "", // that - // "", - // "", - // "", // file pattern of xml files - // true // ignore spectators - // ); - // m_mvaPhoton->msg().setLevel(this->msg().level()); - // { - // const std::string filename_unconv = PathResolverFindCalibFile(m_folder + "/MVACalib_unconvertedPhoton.weights.root"); - // const std::string filename_conv = PathResolverFindCalibFile(m_folder + "/MVACalib_convertedPhoton.weights.root"); - // ATH_MSG_INFO("configuration does not contain list of variables, try to guess:"); // TODO: because it is not implemented - // const std::set<std::string> ph_unconv_variables = guess_variables(filename_unconv); - // const std::set<std::string> ph_conv_variables = guess_variables(filename_conv); - // std::set<std::string> ph_variables = ph_unconv_variables; - // ph_variables.insert(ph_conv_variables.begin(), ph_conv_variables.end()); - // ph_variables.insert({"ph_cl_E", "ph_cl_eta", "ph_rawcl_Es0", "ph_rawcl_Es1", "ph_rawcl_Es2", "ph_rawcl_Es3"}); // used for binning - // ATH_MSG_INFO(ph_variables.size() << " variables for photons"); - // for (const auto var : ph_variables) { ATH_MSG_INFO(" " << var); } - - // m_MVATreePhoton = CxxUtils::make_unique<egammaMVATreePhoton>("MVATreePhoton", ph_variables, m_use_layer_corrected, true); - // m_MVATreePhoton->msg().setLevel(this->msg().level()); - // m_mvaPhoton->InitTree(m_MVATreePhoton.get()); - // } - return StatusCode::SUCCESS; } -std::set<std::string> egammaMVASvc::guess_variables(const std::string& filename) -{ - TFile f(filename.c_str()); - std::unique_ptr<TObjArray> formulae(dynamic_cast<TObjArray*>(f.Get("formulae"))); - formulae->SetOwner(true); // by default TObjArray doesn't own elements - if (not formulae) { ATH_MSG_FATAL("cannot find formulae in " << filename); } - - // TODO: use regex parsing (regex supported only in gcc 4.9, TPRegexp sucks) - const std::vector<std::string> all_possible_variables = { - "el_cl_E", "el_cl_eta", "el_cl_phi", "el_charge", "el_author", - "el_rawcl_Es0", "el_rawcl_Es1", "el_rawcl_Es2", "el_rawcl_Es3", "el_cl_E_TileGap3", - "el_cl_etaCalo", "el_cl_phiCalo", "el_rawcl_calibHitsShowerDepth", "el_wtots1", - "ph_cl_E", "ph_cl_eta", "ph_cl_phi", "ph_author", - "ph_rawcl_Es0", "ph_rawcl_Es1", "ph_rawcl_Es2", "ph_rawcl_Es3", "ph_cl_E_TileGap3", "ph_wtots1", - "ph_cl_etaCalo", "ph_cl_phiCalo", "ph_rawcl_calibHitsShowerDepth", - "el_charge", "el_tracketa", "el_trackpt", "el_trackz0", "el_refittedTrack_qoverp", "el_author", - "ph_Rconv", "ph_zconv", "ph_pt1conv", "ph_pt2conv", "ph_ptconv", "ph_convtrk1nPixHits", "ph_convtrk2nPixHits", "ph_convtrk1nSCTHits", "ph_convtrk2nSCTHits", - }; - - std::set<std::string> variables_found; - TIter iter(formulae.get()); - while (TNamed* obj = dynamic_cast<TNamed*>(iter())) { - const std::string expression = obj->GetTitle(); - ATH_MSG_DEBUG("searching variables in " << expression); - for (const auto var : all_possible_variables) { - const auto pos = expression.find(var); - if (pos != std::string::npos) { - if (pos + var.size() < expression.size()) { - const char next_char = expression[pos + var.size()]; - if (isalnum(next_char) or next_char == '_') continue; - } - ATH_MSG_DEBUG("found variable '" << var << "' in '" << expression << "'"); - variables_found.insert(var); - } - } - } - return variables_found; -} StatusCode egammaMVASvc::finalize(){ ATH_MSG_DEBUG( "in finalize" ); return StatusCode::SUCCESS; } -StatusCode egammaMVASvc::execute(xAOD::CaloCluster* cluster,const xAOD::Egamma* eg){ +StatusCode egammaMVASvc::execute(xAOD::CaloCluster* cluster, + const xAOD::Egamma* eg) const +{ if (!eg || !cluster) { ATH_MSG_ERROR("Invalid Pointer to egamma or cluster object"); return StatusCode::FAILURE; @@ -153,7 +58,9 @@ StatusCode egammaMVASvc::execute(xAOD::CaloCluster* cluster,const xAOD::Egamma* return StatusCode::SUCCESS; } -StatusCode egammaMVASvc::execute(xAOD::CaloCluster* cluster, const xAOD::EgammaParameters::EgammaType egType){ +StatusCode egammaMVASvc::execute(xAOD::CaloCluster* cluster, + const xAOD::EgammaParameters::EgammaType egType) const +{ if (!cluster) { ATH_MSG_ERROR("Invalid Pointer to egamma or cluster object"); return StatusCode::FAILURE; @@ -169,7 +76,8 @@ StatusCode egammaMVASvc::execute(xAOD::CaloCluster* cluster, const xAOD::EgammaP return StatusCode::SUCCESS; } -StatusCode egammaMVASvc::hltexecute(xAOD::CaloCluster* cluster, const std::string& egType) { +StatusCode egammaMVASvc::hltexecute(xAOD::CaloCluster* cluster, const std::string& egType) const +{ if(!cluster){ ATH_MSG_ERROR("Invalid Pointer to cluster object"); return StatusCode::FAILURE; diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h index 7d4c6d2cf087..2fc9df281e0d 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h @@ -27,7 +27,7 @@ public: virtual StatusCode initialize() override; /** @brief finalize method*/ - virtual StatusCode finalize() override;; + virtual StatusCode finalize() override; /** Main execute. We need to calibrate the cluster. Use full egamma object instead of Type @@ -35,12 +35,16 @@ public: This method needs to be valid also for reconstruction */ - StatusCode execute(xAOD::CaloCluster* cluster,const xAOD::Egamma* eg) override; - StatusCode execute(xAOD::CaloCluster* cluster, const xAOD::EgammaParameters::EgammaType egType) override; - StatusCode hltexecute(xAOD::CaloCluster* cluster, const std::string& egType) override; + StatusCode execute(xAOD::CaloCluster* cluster, + const xAOD::Egamma* eg) const override final; + + StatusCode execute(xAOD::CaloCluster* cluster, + const xAOD::EgammaParameters::EgammaType egType) const override final; + + StatusCode hltexecute(xAOD::CaloCluster* cluster, + const std::string& egType) override final; private: - std::set<std::string> guess_variables(const std::string& filename); /// MVA tool for electron ToolHandle<IegammaMVACalibTool> m_mvaElectron {this, -- GitLab From c4f2b57f04cdb9e4e1c8275327209bde237dd852 Mon Sep 17 00:00:00 2001 From: Susumu Oda <susumu.oda@cern.ch> Date: Tue, 3 Jul 2018 19:15:03 +0000 Subject: [PATCH 332/562] Use SiLorentzAngleTool for SCT in FTK related codes (ATLASRECTS-4486) Former-commit-id: af86516e7063e959849013508b3cefefa84f1808 --- Trigger/TrigFTK/FTK_DataProviderSvc/CMakeLists.txt | 1 + .../FTK_DataProviderSvc/FTK_DataProviderSvc.h | 2 ++ .../FTK_DataProviderSvc/src/FTK_DataProviderSvc.cxx | 5 ++--- .../FTK_RecExample/python/FTK_DataProviderSvc_Config.py | 8 ++++++++ .../TrigFTK/FTK_RecExample/share/FTKRec_jobOptions.py | 9 ++++++++- Trigger/TrigFTK/FTK_RecTools/CMakeLists.txt | 1 + .../FTK_RecTools/FTK_SCTClusterOnTrackTool.h | 2 ++ .../FTK_RecTools/src/FTK_SCTClusterOnTrackTool.cxx | 4 +++- ...mRegionalWrap_64TowersIBL_InDetClusters_jobOptions.py | 8 +++++++- Trigger/TrigFTK/TrigFTK_RawDataAlgs/CMakeLists.txt | 1 + .../TrigFTK_RawDataAlgs/share/FTKMonitor_topOptions.py | 7 +++++++ .../TrigFTK_RawDataAlgs/src/FTK_RDO_MonitorAlgo.cxx | 3 ++- .../TrigFTK_RawDataAlgs/src/FTK_RDO_MonitorAlgo.h | 3 +++ .../TrigFTK_RecExample/python/TrigFTKLoadTools.py | 9 ++++++++- .../python/TrigFTK_DataProviderSvc_Config.py | 6 +++++- Trigger/TrigTools/TrigFTKTrackConverter/CMakeLists.txt | 1 + .../TrigFTKTrackConverter/TrigFTKClusterConverterTool.h | 2 ++ .../python/TrigFTKTrackConverter_Config.py | 8 +++++++- .../src/TrigFTKClusterConverterTool.cxx | 4 +++- .../TrigInDetConf/python/TrigInDetRecToolsFTK.py | 7 ++++++- 20 files changed, 79 insertions(+), 12 deletions(-) diff --git a/Trigger/TrigFTK/FTK_DataProviderSvc/CMakeLists.txt b/Trigger/TrigFTK/FTK_DataProviderSvc/CMakeLists.txt index 654fb0987b74..a9af307651ba 100644 --- a/Trigger/TrigFTK/FTK_DataProviderSvc/CMakeLists.txt +++ b/Trigger/TrigFTK/FTK_DataProviderSvc/CMakeLists.txt @@ -14,6 +14,7 @@ atlas_depends_on_subdirs( PUBLIC Event/xAOD/xAODTracking # Event/xAOD/xAODViews GaudiKernel + InnerDetector/InDetConditions/InDetCondServices InnerDetector/InDetRecEvent/InDetPrepRawData InnerDetector/InDetRecEvent/InDetRIO_OnTrack Tools/PyJobTransforms diff --git a/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_DataProviderSvc.h b/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_DataProviderSvc.h index 57dae1c14f6a..b9a320e44a95 100644 --- a/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_DataProviderSvc.h +++ b/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_DataProviderSvc.h @@ -33,6 +33,7 @@ #include "xAODTracking/TrackParticleContainer.h" #include "FTK_DataProviderInterfaces/IFTK_UncertaintyTool.h" #include "FTK_RecToolInterfaces/IFTK_DuplicateTrackRemovalTool.h" +#include "InDetCondServices/ISiLorentzAngleTool.h" /// Forward Declarations /// class AtlasDetectorID; @@ -175,6 +176,7 @@ class FTK_DataProviderSvc : public virtual IFTK_DataProviderSvc, virtual public ToolHandle< IFTK_VertexFinderTool > m_RawVertexFinderTool; ToolHandle< Trk::IRIO_OnTrackCreator > m_ROTcreator; ToolHandle< IFTK_DuplicateTrackRemovalTool > m_DuplicateTrackRemovalTool; + ToolHandle<ISiLorentzAngleTool> m_sctLorentzAngleTool{this, "SCTLorentzAngleTool", "SCTLorentzAngleTool", "Tool to retrieve Lorentz angle of SCT"}; double m_trainingBeamspotX; double m_trainingBeamspotY; diff --git a/Trigger/TrigFTK/FTK_DataProviderSvc/src/FTK_DataProviderSvc.cxx b/Trigger/TrigFTK/FTK_DataProviderSvc/src/FTK_DataProviderSvc.cxx index f2990db46601..700b3dbc224e 100644 --- a/Trigger/TrigFTK/FTK_DataProviderSvc/src/FTK_DataProviderSvc.cxx +++ b/Trigger/TrigFTK/FTK_DataProviderSvc/src/FTK_DataProviderSvc.cxx @@ -272,6 +272,7 @@ StatusCode FTK_DataProviderSvc::initialize() { ATH_CHECK(m_RawVertexFinderTool.retrieve()); ATH_MSG_INFO( " getting ROTcreator tool with name " << m_ROTcreator.name()); ATH_CHECK(m_ROTcreator.retrieve()); + ATH_CHECK(m_sctLorentzAngleTool.retrieve()); // Register incident handler ServiceHandle<IIncidentSvc> iincSvc( "IncidentSvc", name()); @@ -1697,7 +1698,7 @@ const Trk::RIO_OnTrack* FTK_DataProviderSvc::createSCT_Cluster(const FTK_RawSCT_ const double width((double(nStrips)/double(nStrips+1))*( lastStripPos.xPhi()-firstStripPos.xPhi())); const InDetDD::SiLocalPosition centre((firstStripPos+lastStripPos)/2.0); - double shift = pDE->getLorentzCorrection(); + const double shift = m_sctLorentzAngleTool->getLorentzShift(hash); Amg::Vector2D localPos(centre.xPhi()+shift, centre.xEta()); ATH_MSG_VERBOSE(" centre.xPhi() " << centre.xPhi() << " centre.xEta() " << centre.xEta()); @@ -1754,8 +1755,6 @@ const Trk::RIO_OnTrack* FTK_DataProviderSvc::createSCT_Cluster(const FTK_RawSCT_ } if (!m_correctSCTClusters || sct_cluster_on_track == nullptr) { - double shift = pDE->getLorentzCorrection(); - Amg::Vector2D locPos(pCL->localPosition()[Trk::locX]+shift,pCL->localPosition()[Trk::locY]); ATH_MSG_VERBOSE("locX "<< pCL->localPosition()[Trk::locX] << " locY " << pCL->localPosition()[Trk::locY] << " lorentz shift " << shift); diff --git a/Trigger/TrigFTK/FTK_RecExample/python/FTK_DataProviderSvc_Config.py b/Trigger/TrigFTK/FTK_RecExample/python/FTK_DataProviderSvc_Config.py index 1f8ca48ff7a3..5ac1a4de62c5 100644 --- a/Trigger/TrigFTK/FTK_RecExample/python/FTK_DataProviderSvc_Config.py +++ b/Trigger/TrigFTK/FTK_RecExample/python/FTK_DataProviderSvc_Config.py @@ -10,6 +10,14 @@ class ConfiguredFTK_DataProviderSvc(FTK_DataProviderSvc) : def __init__(self, name = "ConfiguredFTK_DataProviderSvc"): print "In FTK_DataProviderSvc_Config.py" FTK_DataProviderSvc.__init__(self, name) + + # SiLorentzAngleTool for SCT + from AthenaCommon.AppMgr import ToolSvc + if not hasattr(ToolSvc, "SCTLorentzAngleTool"): + from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() + FTK_DataProviderSvc.SCTLorentzAngleTool = ToolSvc.SCTLorentzAngleTool + # Track Fitter from TrkGlobalChi2Fitter.TrkGlobalChi2FitterConf import Trk__GlobalChi2Fitter from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigExtrapolator, InDetTrigNavigator, InDetTrigPropagator, InDetTrigRefitRotCreator,InDetTrigBroadInDetRotCreator, \ diff --git a/Trigger/TrigFTK/FTK_RecExample/share/FTKRec_jobOptions.py b/Trigger/TrigFTK/FTK_RecExample/share/FTKRec_jobOptions.py index e3fa7bcf9cfa..13cc1769ffe4 100644 --- a/Trigger/TrigFTK/FTK_RecExample/share/FTKRec_jobOptions.py +++ b/Trigger/TrigFTK/FTK_RecExample/share/FTKRec_jobOptions.py @@ -9,9 +9,16 @@ if rec.doFTK() and globalflags.InputFormat() == 'bytestream': ByteStreamAddressProviderSvc.TypeNames += [ "FTK_RawTrackContainer/FTK_RDO_Tracks"] if rec.doFTK(): + + # SiLorentzAngleTool for SCT + from AthenaCommon.AppMgr import ToolSvc + if not hasattr(ToolSvc, "SCTLorentzAngleTool"): + from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() from TrigFTK_RecExample.TrigFTK_DataProviderSvc_Config import TrigFTK_DataProviderSvc - theFTK_DataProviderSvc = TrigFTK_DataProviderSvc("TrigFTK_DataProviderSvc") + theFTK_DataProviderSvc = TrigFTK_DataProviderSvc("TrigFTK_DataProviderSvc", + SCTLorentzAngleTool = ToolSvc.SCTLorentzAngleTool) ServiceMgr += theFTK_DataProviderSvc from TrigFTK_RawDataAlgs.TrigFTK_RawDataAlgsConf import FTK_RDO_ReaderAlgo diff --git a/Trigger/TrigFTK/FTK_RecTools/CMakeLists.txt b/Trigger/TrigFTK/FTK_RecTools/CMakeLists.txt index 6e68377a4954..44545feb3f2c 100644 --- a/Trigger/TrigFTK/FTK_RecTools/CMakeLists.txt +++ b/Trigger/TrigFTK/FTK_RecTools/CMakeLists.txt @@ -13,6 +13,7 @@ atlas_depends_on_subdirs( PUBLIC GaudiKernel Tools/PyJobTransforms DetectorDescription/GeoPrimitives + InnerDetector/InDetConditions/InDetCondServices Tracking/TrkEvent/TrkTrack Tracking/TrkEvent/VxVertex Tracking/TrkVertexFitter/TrkVxEdmCnv diff --git a/Trigger/TrigFTK/FTK_RecTools/FTK_RecTools/FTK_SCTClusterOnTrackTool.h b/Trigger/TrigFTK/FTK_RecTools/FTK_RecTools/FTK_SCTClusterOnTrackTool.h index c6f76ff56216..c4af2cb25f74 100644 --- a/Trigger/TrigFTK/FTK_RecTools/FTK_RecTools/FTK_SCTClusterOnTrackTool.h +++ b/Trigger/TrigFTK/FTK_RecTools/FTK_RecTools/FTK_SCTClusterOnTrackTool.h @@ -22,6 +22,7 @@ #include "TrkParameters/TrackParameters.h" #include "InDetRIO_OnTrack/SCT_ClusterOnTrack.h" #include "SCT_ModuleDistortions/ISCT_ModuleDistortionsTool.h" +#include "InDetCondServices/ISiLorentzAngleTool.h" //namespace InDet { @@ -92,6 +93,7 @@ public: //! toolhandle for central error scaling ToolHandle< Trk::IRIO_OnTrackErrorScalingTool > m_errorScalingTool; ToolHandle<ISCT_ModuleDistortionsTool> m_distortionsTool; + ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SCTLorentzAngleTool", "Tool to retreive Lorentz angle"}; //! flag storing if errors need scaling or should be kept nominal bool m_scaleSctCov; diff --git a/Trigger/TrigFTK/FTK_RecTools/src/FTK_SCTClusterOnTrackTool.cxx b/Trigger/TrigFTK/FTK_RecTools/src/FTK_SCTClusterOnTrackTool.cxx index f98a727a8359..69971c1a2201 100644 --- a/Trigger/TrigFTK/FTK_RecTools/src/FTK_SCTClusterOnTrackTool.cxx +++ b/Trigger/TrigFTK/FTK_RecTools/src/FTK_SCTClusterOnTrackTool.cxx @@ -105,6 +105,8 @@ FTK_SCTClusterOnTrackTool::initialize() { return StatusCode::FAILURE; } + ATH_CHECK(m_lorentzAngleTool.retrieve()); + return sc; } @@ -157,7 +159,7 @@ FTK_SCTClusterOnTrackTool::correct if (m_option_errorStrategy == 2 || m_option_correctionStrategy == 0) { double pNormal = trackPar.momentum().dot(EL->normal()); double pPhi = trackPar.momentum().dot(Amg::AngleAxis3D(asin(-sinAlpha), Amg::Vector3D::UnitZ()) * EL->phiAxis()); - dphi = atan(pPhi / pNormal) - atan(EL->getTanLorentzAnglePhi()); + dphi = atan(pPhi / pNormal) - atan(m_lorentzAngleTool->getTanLorentzAngle(iH)); } // SCT_ClusterOnTrack production diff --git a/Trigger/TrigFTK/FastTrackSimWrap/share/FastTrackSimRegionalWrap_64TowersIBL_InDetClusters_jobOptions.py b/Trigger/TrigFTK/FastTrackSimWrap/share/FastTrackSimRegionalWrap_64TowersIBL_InDetClusters_jobOptions.py index 0ea7e44690f8..f3fccbd8424d 100644 --- a/Trigger/TrigFTK/FastTrackSimWrap/share/FastTrackSimRegionalWrap_64TowersIBL_InDetClusters_jobOptions.py +++ b/Trigger/TrigFTK/FastTrackSimWrap/share/FastTrackSimRegionalWrap_64TowersIBL_InDetClusters_jobOptions.py @@ -31,8 +31,14 @@ FTKSGInput.ReadTruthTracks = True ToolSvc += FTKSGInput +# SiLorentzAngleTool for SCT +if not hasattr(ToolSvc, "SCTLorentzAngleTool"): + from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() + from TrigFTKTrackConverter.TrigFTKTrackConverterConf import TrigFTKClusterConverterTool -ClusterConvTool = TrigFTKClusterConverterTool(UsePixelCalibSvc = False) +ClusterConvTool = TrigFTKClusterConverterTool(UsePixelCalibSvc = False, + SCTLorentzAngleTool = ToolSvc.SCTLorentzAngleTool) ToolSvc += ClusterConvTool diff --git a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/CMakeLists.txt b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/CMakeLists.txt index c4a9455a2499..1720c9a5ce18 100644 --- a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/CMakeLists.txt +++ b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/CMakeLists.txt @@ -10,6 +10,7 @@ atlas_depends_on_subdirs( PUBLIC Control/AthenaBaseComps Control/PileUpTools GaudiKernel + InnerDetector/InDetConditions/InDetCondServices Tools/PyJobTransforms Tracking/TrkEvent/TrkEventPrimitives Trigger/TrigFTK/FTK_DataProviderInterfaces diff --git a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/share/FTKMonitor_topOptions.py b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/share/FTKMonitor_topOptions.py index 489dbf3159f5..9e5cfd9e9a28 100644 --- a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/share/FTKMonitor_topOptions.py +++ b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/share/FTKMonitor_topOptions.py @@ -32,6 +32,13 @@ FTK_RDO_Monitor.RDO_CollectionName="FTK_RDO_Tracks" FTK_RDO_Monitor.offlineTracksName="Tracks" FTK_RDO_Monitor.FTK_DataProvider=theFTK_DataProviderSvc +# SiLorentzAngleTool for SCT +from AthenaCommon.AppMgr import ToolSvc +if not hasattr(ToolSvc, "SCTLorentzAngleTool"): + from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() +FTK_RDO_Monitor.SCTLorentzAngleTool = ToolSvc.SCTLorentzAngleTool + alg += FTK_RDO_Monitor from GaudiSvc.GaudiSvcConf import THistSvc diff --git a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_MonitorAlgo.cxx b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_MonitorAlgo.cxx index 3be61d9c88e2..5ee271ef5946 100644 --- a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_MonitorAlgo.cxx +++ b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_MonitorAlgo.cxx @@ -148,6 +148,7 @@ StatusCode FTK_RDO_MonitorAlgo::initialize(){ ATH_CHECK(detStore()->retrieve(m_SCT_Manager)); ATH_CHECK(detStore()->retrieve(m_id_helper, "AtlasID")); + ATH_CHECK(m_sctLorentzAngleTool.retrieve()); ATH_MSG_INFO("RDO_CollectionName " << m_ftk_raw_trackcollection_Name); ATH_MSG_INFO("offlineTracksName "<<m_offlineTracksName); @@ -1512,7 +1513,7 @@ double FTK_RDO_MonitorAlgo::getSctLocX(const IdentifierHash hash, const float ra const InDetDD::SCT_ModuleSideDesign* design; - double shift = pDE->getLorentzCorrection(); + double shift = m_sctLorentzAngleTool->getLorentzShift(hash); Identifier wafer_id = m_sctId->wafer_id(hash); diff --git a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_MonitorAlgo.h b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_MonitorAlgo.h index 0d03894f351d..527e95588f31 100644 --- a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_MonitorAlgo.h +++ b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_MonitorAlgo.h @@ -14,6 +14,7 @@ #include "InDetPrepRawData/SiClusterContainer.h" #include "InDetReadoutGeometry/SiDetectorManager.h" #include "InDetReadoutGeometry/PixelDetectorManager.h" +#include "InDetCondServices/ISiLorentzAngleTool.h" #include "FTK_DataProviderInterfaces/IFTK_DataProviderSvc.h" @@ -102,6 +103,8 @@ public: const AtlasDetectorID* m_id_helper; + ToolHandle<ISiLorentzAngleTool> m_sctLorentzAngleTool{this, "SCTLorentzAngleTool", "SCTLorentzAngleTool", "Tool to retreive Lorentz angle of SCT"}; + /// Histograms /// TH1D* m_h_FTK_RawTrack_n; TH1D* m_h_FTK_pt; diff --git a/Trigger/TrigFTK/TrigFTK_RecExample/python/TrigFTKLoadTools.py b/Trigger/TrigFTK/TrigFTK_RecExample/python/TrigFTKLoadTools.py index 30728ad19c1f..d7a3adb5d140 100644 --- a/Trigger/TrigFTK/TrigFTK_RecExample/python/TrigFTKLoadTools.py +++ b/Trigger/TrigFTK/TrigFTK_RecExample/python/TrigFTKLoadTools.py @@ -6,8 +6,15 @@ jiri.masik@manchester.ac.uk from AthenaCommon.AppMgr import ServiceMgr as svcMgr +# SiLorentzAngleTool for SCT +from AthenaCommon.AppMgr import ToolSvc +if not hasattr(ToolSvc, "SCTLorentzAngleTool"): + from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() + from TrigFTK_RecExample.TrigFTK_DataProviderSvc_Config import TrigFTK_DataProviderSvc -theFTK_DataProviderSvc = TrigFTK_DataProviderSvc("TrigFTK_DataProviderSvc") +theFTK_DataProviderSvc = TrigFTK_DataProviderSvc("TrigFTK_DataProviderSvc", + SCTLorentzAngleTool = ToolSvc.SCTLorentzAngleTool) svcMgr += theFTK_DataProviderSvc diff --git a/Trigger/TrigFTK/TrigFTK_RecExample/python/TrigFTK_DataProviderSvc_Config.py b/Trigger/TrigFTK/TrigFTK_RecExample/python/TrigFTK_DataProviderSvc_Config.py index d2ceb4f36676..c1a463afbbe5 100644 --- a/Trigger/TrigFTK/TrigFTK_RecExample/python/TrigFTK_DataProviderSvc_Config.py +++ b/Trigger/TrigFTK/TrigFTK_RecExample/python/TrigFTK_DataProviderSvc_Config.py @@ -9,8 +9,12 @@ class TrigFTK_DataProviderSvc(FTK_DataProviderSvc) : print "In FTK_DataProviderSvc_Config.py" FTK_DataProviderSvc.__init__(self, name) + # SiLorentzAngleTool for SCT from AthenaCommon.AppMgr import ToolSvc - + if not hasattr(ToolSvc, "SCTLorentzAngleTool"): + from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() + FTK_DataProviderSvc.SCTLorentzAngleTool = ToolSvc.SCTLorentzAngleTool from TrigInDetConf.TrigInDetRecToolsFTK import InDetTrigTrackFitterFTK, InDetTrigRotCreatorFTK, TrigFTK_VertexCollectionSortingTool, \ TrigFTK_UncertaintyTool,TrigFTK_RawVertexFinderTool,InDetTrigTrackParticleCreatorToolFTK,InDetTrigTrackSummaryToolFTK diff --git a/Trigger/TrigTools/TrigFTKTrackConverter/CMakeLists.txt b/Trigger/TrigTools/TrigFTKTrackConverter/CMakeLists.txt index f9b9b4c25ffa..e18120c0eb33 100644 --- a/Trigger/TrigTools/TrigFTKTrackConverter/CMakeLists.txt +++ b/Trigger/TrigTools/TrigFTKTrackConverter/CMakeLists.txt @@ -9,6 +9,7 @@ atlas_subdir( TrigFTKTrackConverter ) atlas_depends_on_subdirs( PUBLIC Control/AthenaBaseComps GaudiKernel + InnerDetector/InDetConditions/InDetCondServices InnerDetector/InDetConditions/PixelConditionsServices Tracking/TrkFitter/TrkFitterInterfaces Tracking/TrkFitter/TrkFitterUtils diff --git a/Trigger/TrigTools/TrigFTKTrackConverter/TrigFTKTrackConverter/TrigFTKClusterConverterTool.h b/Trigger/TrigTools/TrigFTKTrackConverter/TrigFTKTrackConverter/TrigFTKClusterConverterTool.h index 3f9b5f30916a..194917f5163b 100644 --- a/Trigger/TrigTools/TrigFTKTrackConverter/TrigFTKTrackConverter/TrigFTKClusterConverterTool.h +++ b/Trigger/TrigTools/TrigFTKTrackConverter/TrigFTKTrackConverter/TrigFTKClusterConverterTool.h @@ -17,6 +17,7 @@ #include "TrkFitterInterfaces/ITrackFitter.h" #include "TrkFitterUtils/FitterTypes.h" #include "PixelConditionsServices/IPixelOfflineCalibSvc.h" +#include "InDetCondServices/ISiLorentzAngleTool.h" class StoreGateSvc; @@ -74,6 +75,7 @@ private: const InDetDD::PixelDetectorManager* m_pixelManager; const InDetDD::SCT_DetectorManager* m_SCT_Manager; + ToolHandle<ISiLorentzAngleTool> m_sctLorentzAngleTool{this, "SCTLorentzAngleTool", "SCTLorentzAngleTool", "Tool to retreive Lorentz angle of SCT"}; ToolHandle<Trk::ITrackFitter> m_trackFitter; bool m_doFit; bool m_doTruth; diff --git a/Trigger/TrigTools/TrigFTKTrackConverter/python/TrigFTKTrackConverter_Config.py b/Trigger/TrigTools/TrigFTKTrackConverter/python/TrigFTKTrackConverter_Config.py index 26e96fa0715c..f97e25e4d252 100644 --- a/Trigger/TrigTools/TrigFTKTrackConverter/python/TrigFTKTrackConverter_Config.py +++ b/Trigger/TrigTools/TrigFTKTrackConverter/python/TrigFTKTrackConverter_Config.py @@ -70,6 +70,12 @@ from TrigFTKTrackConverter.TrigFTKTrackConverterConf import TrigFTKClusterConve class ConfiguredTrigFTKTool(TrigFTKClusterConverterTool): def __init__(self, name = "ConfiguredTrigFTKClusterConverterTool"): TrigFTKClusterConverterTool.__init__(self, name) - + # SiLorentzAngleTool for SCT + from AthenaCommon.AppMgr import ToolSvc + if not hasattr(ToolSvc, "SCTLorentzAngleTool"): + from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() + TrigFTKClusterConverterTool.SCTLorentzAngleTool = ToolSvc.SCTLorentzAngleTool + diff --git a/Trigger/TrigTools/TrigFTKTrackConverter/src/TrigFTKClusterConverterTool.cxx b/Trigger/TrigTools/TrigFTKTrackConverter/src/TrigFTKClusterConverterTool.cxx index e30bee611ac2..28a9b3375b0f 100644 --- a/Trigger/TrigTools/TrigFTKTrackConverter/src/TrigFTKClusterConverterTool.cxx +++ b/Trigger/TrigTools/TrigFTKTrackConverter/src/TrigFTKClusterConverterTool.cxx @@ -142,6 +142,8 @@ StatusCode TrigFTKClusterConverterTool::initialize() { return sc; } + ATH_CHECK(m_sctLorentzAngleTool.retrieve()); + ATH_MSG_INFO("TrigFTKClusterConverterTool initialized "); return sc; } @@ -196,7 +198,7 @@ InDet::SCT_Cluster* TrigFTKClusterConverterTool::createSCT_Cluster(IdentifierHas InDet::SiWidth siWidth(Amg::Vector2D(w,1), Amg::Vector2D(width,stripLength) ); - double shift = pDE->getLorentzCorrection(); + double shift = m_sctLorentzAngleTool->getLorentzShift(hash); double derivedPos = localPos[Trk::locX]+shift; double rawPos = (hCoord-0.5*767)*pDE->phiPitch(); diff --git a/Trigger/TrigTools/TrigInDetConf/python/TrigInDetRecToolsFTK.py b/Trigger/TrigTools/TrigInDetConf/python/TrigInDetRecToolsFTK.py index 83dfebb38438..0f067dd97029 100644 --- a/Trigger/TrigTools/TrigInDetConf/python/TrigInDetRecToolsFTK.py +++ b/Trigger/TrigTools/TrigInDetConf/python/TrigInDetRecToolsFTK.py @@ -54,10 +54,15 @@ ToolSvc += InDetTrigBroadPixelClusterOnTrackToolFTK if (InDetTrigFlags.doPrintConfigurables()): print InDetTrigBroadPixelClusterOnTrackToolFTK +# SiLorentzAngleTool for SCT +if not hasattr(ToolSvc, "SCTLorentzAngleTool"): + from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() InDetTrigBroadSCT_ClusterOnTrackToolFTK = FTK_SCTClusterOnTrackTool("InDetTrigBroadSCT_ClusterOnTrackToolFTK", CorrectionStrategy = 0, # do correct position bias - ErrorStrategy = 0) # do use broad errors + ErrorStrategy = 0, # do use broad errors + SCTLorentzAngleTool = ToolSvc.SCTLorentzAngleTool) ToolSvc += InDetTrigBroadSCT_ClusterOnTrackToolFTK if (InDetTrigFlags.doPrintConfigurables()): print InDetTrigBroadSCT_ClusterOnTrackToolFTK -- GitLab From 8e5e27cc45f45dcd529f6791bda2e31833dc6271 Mon Sep 17 00:00:00 2001 From: Goetz Gaycken <goetz.gaycken@cern.ch> Date: Mon, 2 Jul 2018 16:44:29 +0200 Subject: [PATCH 333/562] Added read and write CondHandleArray. A common base class template is used for the ReadHandleKeyArray, the WriteHandleKeyArray and the new ReadCondHandleKeyArray and WriteCondHandleKeyArray. Former-commit-id: bf9c1a018937cd1bbca2b5f6e7febf19ae14f151 --- .../StoreGate/StoreGate/CondHandleKeyArray.h | 37 +++++ Control/StoreGate/StoreGate/HandleKeyArray.h | 126 ++++++++++++++++++ .../StoreGate/StoreGate/ReadHandleKeyArray.h | 96 +------------ .../StoreGate/StoreGate/WriteHandleKeyArray.h | 98 +------------- 4 files changed, 171 insertions(+), 186 deletions(-) create mode 100644 Control/StoreGate/StoreGate/CondHandleKeyArray.h create mode 100644 Control/StoreGate/StoreGate/HandleKeyArray.h diff --git a/Control/StoreGate/StoreGate/CondHandleKeyArray.h b/Control/StoreGate/StoreGate/CondHandleKeyArray.h new file mode 100644 index 000000000000..e19bca9db63e --- /dev/null +++ b/Control/StoreGate/StoreGate/CondHandleKeyArray.h @@ -0,0 +1,37 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef STOREGATE_CONDHANDLEKEYARRAY_H +#define STOREGATE_CONDHANDLEKEYARRAY_H 1 + +#include "StoreGate/HandleKeyArray.h" + +#include "StoreGate/ReadCondHandleKey.h" +#include "StoreGate/ReadCondHandle.h" +#include "StoreGate/WriteCondHandleKey.h" +#include "StoreGate/WriteCondHandle.h" + +namespace SG { + + namespace CondHandleDefault { + // need default constructor for VarHandleKeyArrayCommon<Base>::assign + template <class Base> + class Key : public Base { + public: + Key() : Base("") {} + + Key(std::string val) : Base(val) {} + + }; + } + + template <class T> + using ReadCondHandleKeyArray = HandleKeyArray<ReadCondHandle<T>, CondHandleDefault::Key<ReadCondHandleKey<T> >, Gaudi::DataHandle::Reader >; + + template <class T> + using WriteCondHandleKeyArray = HandleKeyArray<WriteCondHandle<T>,CondHandleDefault::Key<WriteCondHandleKey<T> >, Gaudi::DataHandle::Writer >; + +} // namespace SG + +#endif diff --git a/Control/StoreGate/StoreGate/HandleKeyArray.h b/Control/StoreGate/StoreGate/HandleKeyArray.h new file mode 100644 index 000000000000..2d8256f66ea6 --- /dev/null +++ b/Control/StoreGate/StoreGate/HandleKeyArray.h @@ -0,0 +1,126 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef STOREGATE_HANDLEKEYARRAY_H +#define STOREGATE_HANDLEKEYARRAY_H 1 + +#include "StoreGate/VarHandleKeyArray.h" +#include "GaudiKernel/EventContext.h" + +#include <vector> +#include <string> + +namespace SG { + + /** + * @class SG::HandleKeyArray<T> + * @brief class to hold an array of HandleKeys + * + * since it inherits from std::vector, all vector operations are + * permitted. + * + * initialization can be done in three ways. + * 1: with an std::vector<HandleKey> as a parameter + * SG::Cond<foo>::ReadHandleKeyArray m_foo ( std::vector<ReadCondHandleKey> ); + * SG::Cond<foo>::WriteHandleKeyArray m_foo ( std::vector<WriteCondHandleKey> ); + * 2: with an initializer list of HandleKeys + * SG::Cond<foo>::ReadHandleKeyArray m_foo { ReadCondHandleKey<foo> k1, ReadCondHandleKey<foo> k2 }; + * SG::Cond<foo>::WriteHandleKeyArray m_foo { WriteCondHandleKey<foo> k1, WriteCondHandleKey<foo> k2 }; + * 3: with an initializer list of std::strings, that will be used to + * internally create HandleKeys with those initializers + * SG::Cond<foo>::ReadHandleKeyArray m_foo { "key1", "key2", "key3" }; + * SG::Cond<foo>::WriteHandleKeyArray m_foo { "key1", "key2", "key3" }; + */ + + template <class T_Handle, class T_HandleKey, Gaudi::DataHandle::Mode MODE> + class HandleKeyArray : public VarHandleKeyArrayCommon< T_HandleKey > { + public: + /** + * @brief default Constructor from a HandleKeyArray + */ + HandleKeyArray(){} + + /** + * @brief Constructor from a HandleKeyArray that takes a vector + * of ReadHandleKeys + * @param v vector of HandleKey + */ + HandleKeyArray( const std::vector<T_HandleKey>& v ) : + VarHandleKeyArrayCommon<T_HandleKey> ( v ) {} + + /** + * @brief Constructor from a HandleKeyArray that takes an + * initializer list of HandleKeys + * @param l initializer list of HandleKey + */ + HandleKeyArray( std::initializer_list<T_HandleKey> l ): + VarHandleKeyArrayCommon<T_HandleKey> {l} {} + + /** + * @brief Constructor from a HandleKeyArray that takes an + * initializer list of std::strings. + * @param l initializer list of std::strings used to create the + * HandleKeys + */ + HandleKeyArray( std::initializer_list<std::string> key_names): + VarHandleKeyArrayCommon<T_HandleKey> {key_names} {} + + /** + * @brief auto-declaring Property Constructor from a HandleKeyArray + * that takes an initializer list of std::strings, and associates the WHKA + * with the specified Property name + * @param name name of Property + * @param l initializer list of std::strings used to create the + * HandleKeys + * @param doc documentation string + */ + template <class OWNER, + typename = typename std::enable_if<std::is_base_of<IProperty, OWNER>::value>::type> + inline HandleKeyArray( OWNER* owner, + std::string name, + std::initializer_list<std::string> l, + std::string doc="") : + VarHandleKeyArrayCommon<T_HandleKey> {l} { + auto p = owner->declareProperty(std::move(name), *this, std::move(doc)); + p->template setOwnerType<OWNER>(); + } + + + /** + * @brief return the type (Read/Write/Update) of handle + */ + Gaudi::DataHandle::Mode mode() const { return MODE; } + + /** + * @brief create a vector of Handles from the HandleKeys + * in the array + */ + std::vector< T_Handle > makeHandles() const { + std::vector< T_Handle > hndl; + typename std::vector<T_HandleKey>::const_iterator itr; + for (itr = this->begin(); itr != this->end(); ++itr) { + hndl.push_back ( T_Handle( *itr) ); + } + return ( std::move( hndl ) ); + } + + /** + * @brief create a vector of Handles from the HandleKeys + * in the array, with explicit EventContext. + */ + std::vector< T_Handle > makeHandles (const EventContext& ctx) const + { + std::vector< T_Handle > hndl; + typename std::vector<T_HandleKey>::const_iterator itr; + for (itr = this->begin(); itr != this->end(); ++itr) { + hndl.push_back ( T_Handle( *itr, ctx) ); + } + return ( std::move( hndl ) ); + } + + }; + +} // namespace SG + +#endif diff --git a/Control/StoreGate/StoreGate/ReadHandleKeyArray.h b/Control/StoreGate/StoreGate/ReadHandleKeyArray.h index eba55f86312c..1a60222a6edb 100644 --- a/Control/StoreGate/StoreGate/ReadHandleKeyArray.h +++ b/Control/StoreGate/StoreGate/ReadHandleKeyArray.h @@ -1,25 +1,22 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #ifndef STOREGATE_READHANDLEKEYARRAY_H #define STOREGATE_READHANDLEKEYARRAY_H 1 -#include "StoreGate/VarHandleKeyArray.h" +#include "StoreGate/HandleKeyArray.h" #include "StoreGate/ReadHandleKey.h" #include "StoreGate/ReadHandle.h" -#include <vector> -#include <string> - namespace SG { /** * @class SG::ReadHandleKeyArray<T> * @brief class to hold an array of ReadHandleKeys * - * since it inherits from std::vector, all vector operations are + * since it inherits from std::vector, all vector operations are * permitted. * * initialization can be done in three ways. @@ -31,93 +28,8 @@ namespace SG { * internally create ReadHandleKeys with those initializers * SG::ReadHandleKeyArray<foo> m_foo { "key1", "key2", "key3" }; */ - template <class T> - class ReadHandleKeyArray : public VarHandleKeyArrayCommon< ReadHandleKey<T> > { - public: - /** - * @brief default Constructor from a ReadHandleKeyArray - */ - ReadHandleKeyArray(){}; - - /** - * @brief Constructor from a ReadHandleKeyArray that takes a vector - * of ReadHandleKeys - * @param v vector of ReadHandleKey - */ - ReadHandleKeyArray( const std::vector<ReadHandleKey<T>>& v ): - VarHandleKeyArrayCommon<ReadHandleKey<T>> ( v ) {}; - - /** - * @brief Constructor from a ReadHandleKeyArray that takes an - * initializer list of ReadHandleKeys - * @param l initializer list of ReadHandleKey - */ - ReadHandleKeyArray( std::initializer_list<ReadHandleKey<T>> l ): - VarHandleKeyArrayCommon<ReadHandleKey<T>> {l} {}; - - /** - * @brief Constructor from a ReadHandleKeyArray that takes an - * initializer list of std::strings. - * @param l initializer list of std::strings used to create the - * ReadHandleKeys - */ - ReadHandleKeyArray( std::initializer_list<std::string> l ): - VarHandleKeyArrayCommon<ReadHandleKey<T>> {l} {}; - - /** - * @brief auto-declaring Property Constructor from a ReadHandleKeyArray - * that takes an initializer list of std::strings, and associates the RHKA - * with the specified Property name - * @param name name of Property - * @param l initializer list of std::strings used to create the - * ReadHandleKeys - * @param doc documentation string - */ - template <class OWNER, - typename = typename std::enable_if<std::is_base_of<IProperty, OWNER>::value>::type> - inline ReadHandleKeyArray( OWNER* owner, - std::string name, - std::initializer_list<std::string> l, - std::string doc="") : - VarHandleKeyArrayCommon<ReadHandleKey<T>> {l} { - auto p = owner->declareProperty(std::move(name), *this, std::move(doc)); - p->template setOwnerType<OWNER>(); - } - - /** - * @brief return the type (Read/Write/Update) of handle - */ - Gaudi::DataHandle::Mode mode() const { return Gaudi::DataHandle::Reader; } - - /** - * @brief create a vector of ReadHandles from the ReadHandleKeys - * in the array - */ - std::vector< ReadHandle<T> > makeHandles() const { - std::vector< ReadHandle<T> > hndl; - typename std::vector<ReadHandleKey<T>>::const_iterator itr; - for (itr = this->begin(); itr != this->end(); ++itr) { - hndl.push_back ( ReadHandle<T>( *itr) ); - } - return ( std::move( hndl ) ); - } - - /** - * @brief create a vector of ReadHandles from the ReadHandleKeys - * in the array, with explicit EventContext. - */ - std::vector< ReadHandle<T> > makeHandles (const EventContext& ctx) const - { - std::vector< ReadHandle<T> > hndl; - typename std::vector<ReadHandleKey<T>>::const_iterator itr; - for (itr = this->begin(); itr != this->end(); ++itr) { - hndl.push_back ( ReadHandle<T>( *itr, ctx ) ); - } - return ( std::move( hndl ) ); - } - - }; + using ReadHandleKeyArray = HandleKeyArray<ReadHandle<T>, ReadHandleKey<T>, Gaudi::DataHandle::Reader >; } // namespace SG diff --git a/Control/StoreGate/StoreGate/WriteHandleKeyArray.h b/Control/StoreGate/StoreGate/WriteHandleKeyArray.h index 171184eef0c5..b45e1018e587 100644 --- a/Control/StoreGate/StoreGate/WriteHandleKeyArray.h +++ b/Control/StoreGate/StoreGate/WriteHandleKeyArray.h @@ -1,25 +1,22 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #ifndef STOREGATE_WRITEHANDLEKEYARRAY_H #define STOREGATE_WRITEHANDLEKEYARRAY_H 1 -#include "StoreGate/VarHandleKeyArray.h" +#include "StoreGate/HandleKeyArray.h" #include "StoreGate/WriteHandleKey.h" #include "StoreGate/WriteHandle.h" -#include <vector> -#include <string> - namespace SG { /** * @class SG::WriteHandleKeyArray<T> * @brief class to hold an array of WriteHandleKeys * - * since it inherits from std::vector, all vector operations are + * since it inherits from std::vector, all vector operations are * permitted. * * initialization can be done in three ways. @@ -31,95 +28,8 @@ namespace SG { * internally create WriteHandleKeys with those initializers * SG::WriteHandleKeyArray<foo> m_foo { "key1", "key2", "key3" }; */ - template <class T> - class WriteHandleKeyArray : public VarHandleKeyArrayCommon< WriteHandleKey<T> > { - public: - /** - * @brief default Constructor from a WriteHandleKeyArray - */ - WriteHandleKeyArray(){}; - - /** - * @brief Constructor from a WriteHandleKeyArray that takes a vector - * of ReadHandleKeys - * @param v vector of WriteHandleKey - */ - WriteHandleKeyArray( const std::vector<WriteHandleKey<T>>& v ) : - VarHandleKeyArrayCommon<WriteHandleKey<T>> ( v ) {}; - - /** - * @brief Constructor from a WriteHandleKeyArray that takes an - * initializer list of WriteHandleKeys - * @param l initializer list of WriteHandleKey - */ - WriteHandleKeyArray( std::initializer_list<WriteHandleKey<T>> l ): - VarHandleKeyArrayCommon<WriteHandleKey<T>> {l} {}; - - /** - * @brief Constructor from a WriteHandleKeyArray that takes an - * initializer list of std::strings. - * @param l initializer list of std::strings used to create the - * WriteHandleKeys - */ - WriteHandleKeyArray( std::initializer_list<std::string> l ): - VarHandleKeyArrayCommon<WriteHandleKey<T>> {l} {}; - - /** - * @brief auto-declaring Property Constructor from a WriteHandleKeyArray - * that takes an initializer list of std::strings, and associates the WHKA - * with the specified Property name - * @param name name of Property - * @param l initializer list of std::strings used to create the - * WriteHandleKeys - * @param doc documentation string - */ - template <class OWNER, - typename = typename std::enable_if<std::is_base_of<IProperty, OWNER>::value>::type> - inline WriteHandleKeyArray( OWNER* owner, - std::string name, - std::initializer_list<std::string> l, - std::string doc="") : - VarHandleKeyArrayCommon<WriteHandleKey<T>> {l} { - auto p = owner->declareProperty(std::move(name), *this, std::move(doc)); - p->template setOwnerType<OWNER>(); - } - - - /** - * @brief return the type (Read/Write/Update) of handle - */ - Gaudi::DataHandle::Mode mode() const { return Gaudi::DataHandle::Writer; } - - /** - * @brief create a vector of WriteHandles from the WriteHandleKeys - * in the array - */ - std::vector< WriteHandle<T> > makeHandles() const { - std::vector< WriteHandle<T> > hndl; - typename std::vector<WriteHandleKey<T>>::const_iterator itr; - for (itr = this->begin(); itr != this->end(); ++itr) { - hndl.push_back ( WriteHandle<T>( *itr) ); - } - return ( std::move( hndl ) ); - } - - /** - * @brief create a vector of WriteHandles from the WriteHandleKeys - * in the array, with explicit EventContext. - */ - std::vector< WriteHandle<T> > makeHandles (const EventContext& ctx) const - { - std::vector< WriteHandle<T> > hndl; - typename std::vector<WriteHandleKey<T>>::const_iterator itr; - for (itr = this->begin(); itr != this->end(); ++itr) { - hndl.push_back ( WriteHandle<T>( *itr, ctx) ); - } - return ( std::move( hndl ) ); - } - - }; - + using WriteHandleKeyArray = HandleKeyArray<WriteHandle<T>,WriteHandleKey<T>, Gaudi::DataHandle::Writer >; } // namespace SG -- GitLab From dd98a45bb7b7c774102da746674918b335f9b8b6 Mon Sep 17 00:00:00 2001 From: Goetz Gaycken <goetz.gaycken@cern.ch> Date: Mon, 2 Jul 2018 20:16:46 +0200 Subject: [PATCH 334/562] Added compile test for the WriteCondHandleKeyArray. Former-commit-id: 04ed9f2f44a204205c8d697dcd49662bc7131b79 --- Control/StoreGate/CMakeLists.txt | 6 + .../test/CondHandleKeyArray_test.cxx | 135 ++++++++++++++++++ 2 files changed, 141 insertions(+) create mode 100644 Control/StoreGate/test/CondHandleKeyArray_test.cxx diff --git a/Control/StoreGate/CMakeLists.txt b/Control/StoreGate/CMakeLists.txt index 31f3f7166223..cf2994c75ecd 100644 --- a/Control/StoreGate/CMakeLists.txt +++ b/Control/StoreGate/CMakeLists.txt @@ -168,6 +168,12 @@ atlas_add_test( WriteDecorHandle_test LINK_LIBRARIES StoreGateLib AthContainers TestTools ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" ) +atlas_add_test( CondHandleKeyArray_test + SOURCES test/CondHandleKeyArray_test.cxx + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} + LINK_LIBRARIES StoreGateLib AthContainers TestTools + ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" ) + # Install files from the package: atlas_install_python_modules( python/*.py ) atlas_install_joboptions( share/StoreGate_jobOptions.txt diff --git a/Control/StoreGate/test/CondHandleKeyArray_test.cxx b/Control/StoreGate/test/CondHandleKeyArray_test.cxx new file mode 100644 index 000000000000..e8d44d6f6ce2 --- /dev/null +++ b/Control/StoreGate/test/CondHandleKeyArray_test.cxx @@ -0,0 +1,135 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @brief Compile tests for WriteCondHandleKeyArray + * @TODO extend to also test functionality + */ + + +#undef NDEBUG +#include "StoreGate/CondHandleKeyArray.h" +#include "StoreGate/exceptions.h" +#include "SGTools/TestStore.h" +#include "SGTools/CLASS_DEF.h" +#include "SGTools/StorableConversions.h" +#include "SGTools/DataProxy.h" +#include "TestTools/initGaudi.h" +#include "TestTools/expect_exception.h" +#include "AthContainersInterfaces/IConstAuxStore.h" +#include "AthContainers/DataVector.h" +#include "AthContainers/ConstDataVector.h" +#include "AthenaKernel/errorcheck.h" +#include "AthenaKernel/ExtendedEventContext.h" +#include "CxxUtils/unused.h" +#include <cassert> +#include <iostream> + +#define DEBUG_VHB 1 + + +class MyObjAux + : public SG::IConstAuxStore, public ILockable +{ +public: + MyObjAux(int x=0) : x(x) {} + ~MyObjAux() { deleted.push_back (x); } + int x; + bool m_locked = false; + + virtual const void* getData (SG::auxid_t /*auxid*/) const override { return 0; } + virtual void* getDecoration (SG::auxid_t /*auxid*/, size_t /*size*/, size_t /*capacity*/) override { return 0; } + virtual const SG::auxid_set_t& getAuxIDs() const override { std::abort(); } + virtual void lock() override { m_locked = true; } + virtual bool clearDecorations() override { return false; } + virtual size_t size() const override { return 0; } + virtual void lockDecoration (SG::auxid_t) override { std::abort(); } + + static std::vector<int> deleted; +}; +std::vector<int> MyObjAux::deleted; +CLASS_DEF (MyObjAux, 293847296, 1) + +class MyObj +{ +public: + MyObj(int x=0) : x(x) {} + ~MyObj() { deleted.push_back (x); } + SG::IAuxStore* getStore() const { return nullptr; } + void setStore (SG::IConstAuxStore* store) {aux = dynamic_cast<MyObjAux*>(store); } + int x; + MyObjAux* aux {nullptr}; + + static std::vector<int> deleted; +}; +std::vector<int> MyObj::deleted; +CLASS_DEF (MyObj, 293847295, 1) +static const CLID MyCLID = 293847295; + +#include "AthenaKernel/CondCont.h" +CONDCONT_DEF(MyObj, 223019562 ); + + +CLASS_DEF (DataVector<MyObj>, 293847495, 1) + + +class MyObj2 {}; +CLASS_DEF (MyObj2, 293847395, 1) + + +class MyDObj : public DataObject +{ +public: + MyDObj(int x=0) : x(x) {} + ~MyDObj() { deleted.push_back (x); } + int x; + + static std::vector<int> deleted; +}; +std::vector<int> MyDObj::deleted; +CLASS_DEF (MyDObj, 293847297, 1) + + +std::pair<std::unique_ptr<MyObj>, std::unique_ptr<MyObjAux> > +makeWithAux (int x=0) +{ + auto obj = std::make_unique<MyObj>(x); + auto aux = std::make_unique<MyObjAux>(x+100); + obj->setStore (aux.get()); + return std::make_pair (std::move(obj), std::move(aux)); +} + + + + +// Ctors. +void test1() +{ + std::cout << "test1\n"; + + SG::WriteCondHandleKeyArray<MyObj> k1 {"MyObj"}; + + assert ( k1.size() == 1); + assert ( k1.mode() == Gaudi::DataHandle::Writer); + assert ( k1[0].key() == "MyObj"); + // need to setup conditions store + /* assert ( */ k1[0].initialize() /* .isSuccess())*/ ; + + try { + std::vector<SG::WriteCondHandle<MyObj> > h1( k1.makeHandles() ); + assert (h1[0].key() == "MyObj"); + } + catch(...) { + } + +} + +int main() +{ + ISvcLocator* pDum; + Athena_test::initGaudi(pDum); //need MessageSvc + + test1(); + return 0; +} -- GitLab From 1c076f6586c53d657f19b247a94f253ae35146c8 Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Tue, 3 Jul 2018 18:58:51 +0000 Subject: [PATCH 335/562] Merge branch '21.0-hancool-2' into '21.0' Update hancool uploads, as per ATLASDQ-547 See merge request atlas/athena!12511 (cherry picked from commit 91fae89b08b4597aebd5991ce8d7b6c7d2bc73de [formerly 84ce8526f9cd0900d13d77a1e8e3593856794489]) 6e35bdfd Update hancool uploads, as per ATLASDQ-547 Former-commit-id: 7ae28d3f7adfcbcf511eebf1ce8229dd1f632a9d --- .../DataQualityUtils/python/detmaskmod.py | 4 +- .../DataQualityUtils/python/hancoolmod.py | 157 ++++++++++-------- 2 files changed, 91 insertions(+), 70 deletions(-) diff --git a/DataQuality/DataQualityUtils/python/detmaskmod.py b/DataQuality/DataQualityUtils/python/detmaskmod.py index f15d5c092a76..0cbfe3ab8064 100644 --- a/DataQuality/DataQualityUtils/python/detmaskmod.py +++ b/DataQuality/DataQualityUtils/python/detmaskmod.py @@ -4,6 +4,7 @@ import eformat import operator detmaskmap = { + 'FORWARD_AFP': 'AFP', 'FORWARD_ALPHA': 'ALFA', 'FORWARD_BCM': 'IDBCM', 'FORWARD_LUCID': 'LCD', @@ -44,8 +45,9 @@ detmaskmap = { } detmaskmap_defects = { + #'FORWARD_AFP': 'AFP_DISABLED', # not yet functional 'FORWARD_ALPHA': 'ALFA_DISABLED', - 'FORWARD_LUCID': 'LCD_DISABLED', + #'FORWARD_LUCID': 'LCD_DISABLED', # LUCID now operates outside ATLAS partition 'FORWARD_ZDC': 'ZDC_DISABLED', 'LAR_EM_BARREL_A_SIDE': 'LAR_EMBA_DISABLED', 'LAR_EM_BARREL_C_SIDE': 'LAR_EMBC_DISABLED', diff --git a/DataQuality/DataQualityUtils/python/hancoolmod.py b/DataQuality/DataQualityUtils/python/hancoolmod.py index 3702a524cd77..a4f93c27eaba 100644 --- a/DataQuality/DataQualityUtils/python/hancoolmod.py +++ b/DataQuality/DataQualityUtils/python/hancoolmod.py @@ -332,23 +332,73 @@ def ctp_defects(d, i, runNumber): import detmaskmod # ugly: could happen for more than one defect - should be cheap though nlbs = detmaskmod.getNumLumiBlocks(runNumber) rv.append(defect_iov(defect, message, False, when.GetNbinsX(), nlbs+1)) - print "The following defects were extracted: " # TODO: remove this line? - print rv # TODO: remove this line? + #print "The following defects were extracted: " # TODO: remove this line? + #print rv # TODO: remove this line? return rv +def sct_lowstat_defect(d, i, runNumber): + histogram = d.Get('InnerDetector/SCT/Summary/tracksPerRegion') + if not histogram: + return None + if histogram.GetEntries() < 200: + return [defect_val('SCT_GLOBAL_LOWSTAT', 'Low statistics', False)] + else: + return [] + def sct_conf_defects(d, i, runNumber): - mapping = { 1: 'SCT_MOD_OUT_GT40', - 4: 'SCT_MOD_ERR_GT40', - 6: 'SCT_MOD_NOISE_GT40', - } + def sct_conf_defects_core(d, i, runNumber, histname, mapping): + rv = [] + histogram = d.Get(histname) + if not histogram: + return None + for bin in mapping: + if histogram.GetBinContent(bin) > 40: + rv.append(defect_val(mapping[bin], '%.1d modules affected' % histogram.GetBinContent(bin), False)) + return rv + + rv1 = sct_conf_defects_core(d, i, runNumber, 'InnerDetector/SCT/Summary/SCTConfOutM', + { 1: 'SCT_MOD_OUT_GT40' }) + rv2 = sct_conf_defects_core(d, i, runNumber, 'InnerDetector/SCT/Summary/SCTConfNew', + { 3: 'SCT_MOD_ERR_GT40', + 5: 'SCT_MOD_NOISE_GT40' }) + if rv1 is None and rv2 is None: + return None + else: + return (rv1 if rv1 is not None else [])+(rv2 if rv2 is not None else []) + +def sct_perlb_defects(d, i, runNumber): + pairs = [('InnerDetector/SCT/Summary/SCT_LinksWithLinkLevelErrorsVsLbs', + 'SCT_PERIOD_ERR_GT40', lambda _: _ > 80), + ('InnerDetector/SCT/Summary/SCT_LinksWithRODLevelErrorsVsLbs', + 'SCT_ROD_OUT', lambda _: _ >= 1)] rv = [] - histogram = d.Get('InnerDetector/SCT/SCTAll/ModuleStatus/SCTConf') - if not histogram: return None - for bin in mapping: - if histogram.GetBinContent(bin) > 40: - rv.append(defect_val(mapping[bin], '%.1d modules affected' % histogram.GetBinContent(bin), False)) - return rv + bad_lbs = {} + overflow_bad_lbs = {} + message = 'Automatically set' + foundany = False + + for hname, dname, policy in pairs: + when = d.Get(hname) + if not when: + continue + foundany = True + + # extract bad bins + bad_lbs[dname] = [bin for bin in xrange(1, when.GetNbinsX()+1) if policy(when.GetBinContent(bin))] + overflow_bad_lbs[dname] = policy(when.GetBinContent(when.GetNbinsX()+1)) + + for lb in bad_lbs[dname]: + rv.append(defect_iov(dname, message, False, lb, lb+1)) + if overflow_bad_lbs[dname]: + message += '; defect occurred past end of monitoring histogram, marking end of run as bad' + import detmaskmod # ugly: could happen for more than one defect - should be cheap though + nlbs = detmaskmod.getNumLumiBlocks(runNumber) + rv.append(defect_iov(dname, message, False, when.GetNbinsX(), nlbs+1)) + if foundany: + return rv + else: + return None def iovs_merge(l): l.sort(key=lambda x: x.since) @@ -371,54 +421,23 @@ def iovs_merge(l): rl.append(previous._replace(until=until)) return rl -def sct_readout_defects(d, i, runNumber): - def sct_readout_defects_core(d, prefix, l, comment): - import re - for k in d.GetListOfKeys(): - keyname = k.GetName() - m = re.search(prefix + '\((\d+)', keyname) - if m: - l.append(int(m.group(1))+1) - - def lb_comment(lb, l): - # l is a tuple name, list - rvl = [] - for name, l2 in l: - if lb in l2: - rvl.append(name) - return ' '.join(rvl) - - robfragment = d.Get('InnerDetector/SCT/SCTAll/ModuleStatus/SCTROBFragmentConf_/Results') - robwarnings = []; roberrors = [] - if not robfragment: return None - for prefix, l in (('WarningBin', robwarnings), - ('ErrorBin', roberrors)): - sct_readout_defects_core(robfragment, prefix, l, 'ROBFragment') - - maskedlink = d.Get('InnerDetector/SCT/SCTAll/ModuleStatus/SCTMaskedLinkConf_/Results') - linkwarnings = []; linkerrors = [] - if not maskedlink: return None - for prefix, l in (('WarningBin', linkwarnings), - ('ErrorBin', linkerrors)): - sct_readout_defects_core(maskedlink, prefix, l, 'MaskedLink') - allwarnings = set(robwarnings + roberrors + linkwarnings + linkerrors) - namelisttuple = (('ROBFragment', robwarnings), - ('MaskedLink', linkwarnings), - ('ROBFragment', roberrors), - ('MaskedLink', linkerrors)) - allwarnings_defects = [defect_iov('SCT_ROD_OUT_1', lb_comment(lb, namelisttuple), False, lb, lb+1) for lb in allwarnings] - allwarnings_defects = iovs_merge(allwarnings_defects) - - allerrors = set(roberrors + linkerrors) - namelisttuple = (('ROBFragment', roberrors), - ('MaskedLink', linkerrors)) - allerrors_defects = [defect_iov('SCT_GLOBAL_UNKNOWN', lb_comment(lb, namelisttuple), False, lb, lb+1) for lb in allerrors] - allerrors_defects = iovs_merge(allerrors_defects) - - #if allwarnings_defects: print allwarnings_defects - #if allerrors_defects: print allerrors_defects - - return allwarnings_defects + allerrors_defects +def sct_eff_defect(d, i, runNumber): + h1 = d.Get('InnerDetector/SCT/Summary/SctTotalEffBCID_/Results/Status') + h2 = d.Get('InnerDetector/SCT/Summary/SctTotalEff_/Results/Status') + if not h1 or not h2: return None + badstatuses = set(['Yellow', 'Red']) + statuscheck = [] + for h in h1, h2: + status = set(x.GetName() for x in h.GetListOfKeys()) + if len(badstatuses & status) > 0: + assert len(status) == 1, 'Status must be length one or the file is corrupt' + statuscheck.append(True) + else: + statuscheck.append(False) + if all(statuscheck): + return [defect_val('SCT_EFF_LT99', 'Automatically set for whole run', False)] + else: + return [] def dqmf_node_defect(node, defect, badstatuses=['Red']): badstatuses = set(badstatuses) @@ -436,19 +455,19 @@ def dqmf_node_defect(node, defect, badstatuses=['Red']): def hancool_defects(runNumber, filePath="./", dbConnection="", db_tag='HEAD', isESn=True): import pix_defect analyzers = [] - if False: - analyzers += [ctp_defects] if isESn: - analyzers += [dqmf_node_defect('InnerDetector/SCT/SCTAll/Hits/SctTotalEff', 'SCT_EFF_LT99', ['Yellow', 'Red']), - dqmf_node_defect('InnerDetector/SCT/SCTAll/Hits/SctTotalEff', 'SCT_GLOBAL_UNKNOWN', ['Red']), - dqmf_node_defect('InnerDetector/SCT/SCTAll/ModuleStatus/SCTConf', 'SCT_GLOBAL_UNKNOWN', ['Red']), + # CTP + analyzers += [ctp_defects] + # SCT + analyzers += [sct_eff_defect, + sct_lowstat_defect, sct_conf_defects, - sct_readout_defects, + sct_perlb_defects, ] if ( len(filePath) == 0 or filePath[-1] != '/'): filePath+="/" - if (len(dbConnection)<1): dbConnection = "/afs/cern.ch/user/a/atlasdqm/dqmdisk1/cherrypy-devel/defectstest.db/CONDBR2" + if (len(dbConnection)<1): dbConnection = "/afs/cern.ch/user/a/atlasdqm/dqmdisk1/cherrypy-devel/defectstest.db/COMP200" import ROOT # Conflict logic: shorter intervals override longer ones @@ -485,7 +504,8 @@ def hancool_defects(runNumber, filePath="./", dbConnection="", db_tag='HEAD', is globname = fnames[0][0] filename = os.path.basename(globname) since, until = getLimits(filename) - defects += pix_defect.execute(runNumber, globname, until-1) + # disabled until fixed + #defects += pix_defect.execute(runNumber, globname, until-1) from DQDefects import DefectsDB ddb = DefectsDB(dbConnection, read_only=False) @@ -493,7 +513,6 @@ def hancool_defects(runNumber, filePath="./", dbConnection="", db_tag='HEAD', is detmask_defects(runNumber, ddb) with ddb.storage_buffer: for defect in iovs_merge(defects): - #print defect ddb.insert(defect.defect, since=(runNumber << 32 | defect.since), until=(runNumber << 32 | defect.until), comment=defect.comment, -- GitLab From 8492331b3ec91c4874b704062ada5f240f941b84 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Wed, 4 Jul 2018 09:36:49 +0200 Subject: [PATCH 336/562] Proposed trigger flags Former-commit-id: 7c9d1d96b46556131b83a606d4dba0ba262eee3d --- .../TriggerJobOpts/python/NewTriggerFlags.py | 165 ++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 Trigger/TriggerCommon/TriggerJobOpts/python/NewTriggerFlags.py diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/NewTriggerFlags.py b/Trigger/TriggerCommon/TriggerJobOpts/python/NewTriggerFlags.py new file mode 100644 index 000000000000..db9323f4203d --- /dev/null +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/NewTriggerFlags.py @@ -0,0 +1,165 @@ +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + +from AthenaConfiguration.AthConfigFlags import AthConfigFlags + +def createTriggerFlags(): + + flags = AthConfigFlags() + # enables L1 simulation + flags.addFlag('Trigger.doLVL1', lambda prevFlags: prevFlags('global.isMC')) + + # enables L1 topological trigger simulation + flags.addFlag('Trigger.doL1Topo', True ) + + # writes additional info from Topo simulation + flags.addFlag('Trigger.writeL1TopoValData', True ) + + # need proper documentation + flags.addFlag('Trigger.useL1CaloCalibration', False) + + # need proper documentation + flags.addFlag('Trigger.useRun1CaloEnergyScale', False) + + # enable HLT part of the trigger + flags.addFlag('Trigger.doHLT', True) + + # if 1, Run1 decoding version is set; if 2, Run2 + flags.addFlag('Trigger.EDMDecodingVersion', 2) + + # enables additional algorithms colecting MC truth infrmation (this is only used by IDso maybe we need Trigger.ID.doTruth only?) + flags.addFlag('Trigger.doTruth', False) + + # only enable services for analysis and BS -> ESD processing (we need better name) + flags.addFlag('Trigger.doTriggerConfigOnly', False) + + # enable Bcm inputs simulation + flags.addFlag('Trigger.L1.doBcm', True) + + # enable muon inputs simulation + flags.addFlag('Trigger.L1.doMuons', True) + + # version of CTP data, int value up to 4 + flags.addFlag('Trigger.L1.CTPVersion', 4) + + # list of thresholds (not sure if we want to use new flags to generate L1, leaving out for now?) + + + # enable streaming of HLT content as BS payload + flags.addFlag('Trigger.writeBS', False) + + # list of EDM objects to be written to AOD + flags.addFlag('Trigger.AODEDMSet', []) + + # list of objects to be written to ESD + flags.addFlag('Trigger.ESDEDMSet', []) + + # tag to be used for condutions used by HLT code + flags.addFlag('Trigger.OnlineCondTag', 'CONDBR2-HLTP-2016-01') + + # geometry version used by HLT online + flags.addFlag('Trigger.OnlineGeoTag', 'ATLAS-R2-2015-04-00-00') + + # configuration tune for various years of Run2 (why string?) + flags.addFlag('Trigger.run2Config', '2018') + + # comissionig options + # one of: 'HltOnly', + # 'Lvl1Only', + # 'FullTrigger', + # 'NoTrigger' + flags.addFlag('Trigger.dataTakingConditions', 'FullTrigger') + + + # use or not frontier proxies + flags.addFlag('Trigger.triggerUseFrontier', False) + + # the configuration name, see TriggerFlags for full info + flags.addFlag('Trigger.triggerConfig', 'MCRECO:DEFAULT') + + # name of the trigger menu + flags.addFlag('Trigger.triggerMenuSetup', 'MC_pp_v7_tight_mc_prescale') + + # generate or not the L1 configuration + flags.addFlag('Trigger.generateLVL1Config', False) + + # L1 XML file name + flags.addFlag('Trigger.LVL1ConfigFile', + lambda prevFlags: 'LVL1config_'+prevFlags.triggerMenuSetup()+'_' + prevFlags.menuVersion() + '.xml') + + # generate or not the L1 topo configuration + flags.addFlag('Trigger.generateLVL1TopoConfig', False) + + # L1 topo XML file name + flags.addFlag('Trigger.LVL1TopoConfigFile', + lambda prevFlags: 'LVL1config_'+prevFlags.triggerMenuSetup()+'_' + prevFlags.menuVersion() + '.xml') + + + # trigger reconstruction + + # controls track extension tool setting (not sure we can handle it via this flag now, should it be moved to Trigger.InDet?) + flags.addFlag('Trigger.id.useOfflineSpacePoints', False) + + # enables the correction for pileup in cell energy calibration (should it be moved to some place where other calo flags are defined?) + flags.addFlag('Trigger.calo.doOffsetCorrection', True ) + + # helper to switch between versions + def __tunes(default, ver2016, ver2017): + from collections import defaultdict + return lambda year: defaultdict( lambda: default, + (('2016', ver2016), + ('2017', ver2017)))[year] + + + # Particle ID tune + flags.addFlag('Trigger.egamma.pidVersion', + lambda prefVlags: + __tunes(default='ElectronPhotonSelectorTools/trigger/rel21_mc16a/', + ver2016='ElectronPhotonSelectorTools/trigger/rel21_mc16a/', + ver2017='ElectronPhotonSelectorTools/trigger/rel21_20170214/')( prevFlags.gte('Trigger.run2Config') ) + ) + + # cluster correction version, allowed value is: None or v12phiflip_noecorrnogap + flags.addFlag('Trigger.egamma.clusterCorrectionVersion', + lambda prevFlags: + __tunes(default=None, + ver2016=None, + ver2017='v12phiflip_noecorrnogap')( prevFlags.get('Trigger.run2Config') ) + ) + # tune of MVA + flags.addFlag('Trigger.egamma.calibMVAVersiona', + lambda prevFlags: + __tunes(default='egammaMVACalib/online/v3', + ver2016='egammaMVACalib/online/v3', + ver2017='egammaMVACalib/online/v6')( prevFlags.get('Trigger.run2Config') ) + ) + + # muons + flags.addFlag('Trigger.muon.doEFRoIDrivenAccess', False) + + return flags + # for reference, this flags are skipped as never used or never set in fact, or set identical to de default or used in a very old JO: + # readLVL1Calo, readLVL1Muon, fakeLVL1, useCaloTTL + # doCosmicSim - old JO + # disableRandomPrescale - never used + # doMergedHLTResult - not needed now + # doAlwaysUnpackDSResult - never set + # doTrt - fast TRT or trigger - never used + # doLucid - not sure if ever set to False, identical rec flag exists + # doZdc - never set to anything different than default + # doHLTpersistency - never red + # useOfflineSpacePoints - used only to set + # doNtuple - never red + # configForStartup + # the flags related to trigger DB are redundant of triggerConfig - need to decide if they are needed in this form + # also not defined the Prescale sets yet + # abortOnConfigurationError - never red + # in signatures + # egamma: rinferVrsion - not used + # muon: doMuonCalibrationStream - not used + # tau: doTrackingApproach - not used + +if __name__ == '__main__': + flags = createTriggerFlags() + flags.set('Trigger.run2Config', '2017') + assert flags.get('Trigger.egamma.clusterCorrectionVersion') == 'v12phiflip_noecorrnogap' + flags.dump() -- GitLab From d461be0383d877d832927bea032e7bcffa2a129f Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Wed, 4 Jul 2018 10:40:45 +0200 Subject: [PATCH 337/562] left just dump Former-commit-id: 80e582e4473581a321ce46fb74430256f0e656ae --- Control/AthenaConfiguration/python/AthConfigFlags.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Control/AthenaConfiguration/python/AthConfigFlags.py b/Control/AthenaConfiguration/python/AthConfigFlags.py index 90f3204b5fe8..03a4ab4c59be 100644 --- a/Control/AthenaConfiguration/python/AthConfigFlags.py +++ b/Control/AthenaConfiguration/python/AthConfigFlags.py @@ -154,9 +154,9 @@ class AthConfigFlags(object): return def dump(self): - print "%40.40s : %s" % ("Flag Name","Value") + print "%-40.40s : %s" % ("Flag Name","Value") for name in sorted(self._flagdict): - print "%40.40s : %s" % (name,repr(self._flagdict[name])) + print "%-40.40s : %s" % (name,repr(self._flagdict[name])) def initAll(self): #Mostly a self-test method for n,f in self._flagdict.items(): -- GitLab From 079e7f5544f19ac3f9f1d927adb4fb8c4f210de5 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Wed, 4 Jul 2018 10:41:02 +0200 Subject: [PATCH 338/562] include new trigger flags Former-commit-id: 21f07e84199ab8c21bc5482d718612fa5257b059 --- Control/AthenaConfiguration/python/AllConfigFlags.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Control/AthenaConfiguration/python/AllConfigFlags.py b/Control/AthenaConfiguration/python/AllConfigFlags.py index a7b8024d71e1..dbf7451ac3e1 100644 --- a/Control/AthenaConfiguration/python/AllConfigFlags.py +++ b/Control/AthenaConfiguration/python/AllConfigFlags.py @@ -49,10 +49,8 @@ def _createCfgFlags(): # Trigger - acf.addFlag("Trigger.inputLVL1ConfigFile", "UNSPECIFIED") - acf.addFlag("Trigger.L1Decoder.doMuon", True) # should have dependency on detector flag doCalo - acf.addFlag("Trigger.L1Decoder.doCalo", True) - acf.addFlag("Trigger.L1Decoder.forceEnableAllChains", True) + from TriggerJobOpts.NewTriggerFlags import createTriggerFlags + acf.join( createTriggerFlags() ) return acf -- GitLab From c02e34449c568d82d0952ab445bb1926f65793b6 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Wed, 4 Jul 2018 10:41:25 +0200 Subject: [PATCH 339/562] fixes flag interdependencies Former-commit-id: c21760a4c505d1d11cd40f8e8dc1c775fb262cb2 --- .../TriggerJobOpts/python/NewTriggerFlags.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/NewTriggerFlags.py b/Trigger/TriggerCommon/TriggerJobOpts/python/NewTriggerFlags.py index db9323f4203d..1c6fe6eadb39 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/NewTriggerFlags.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/NewTriggerFlags.py @@ -23,6 +23,9 @@ def createTriggerFlags(): # enable HLT part of the trigger flags.addFlag('Trigger.doHLT', True) + # changes decoding of L1 so that allways all configured chains are enabled, testing mode + flags.addFlag("Trigger.L1Decoder.forceEnableAllChains", False) + # if 1, Run1 decoding version is set; if 2, Run2 flags.addFlag('Trigger.EDMDecodingVersion', 2) @@ -78,20 +81,25 @@ def createTriggerFlags(): # name of the trigger menu flags.addFlag('Trigger.triggerMenuSetup', 'MC_pp_v7_tight_mc_prescale') + + # version of the menu + from AthenaCommon.AppMgr import release_metadata + flags.addFlag('Trigger.menuVersion', + lambda prevFlags: release_metadata()['release'] ) # generate or not the L1 configuration flags.addFlag('Trigger.generateLVL1Config', False) # L1 XML file name flags.addFlag('Trigger.LVL1ConfigFile', - lambda prevFlags: 'LVL1config_'+prevFlags.triggerMenuSetup()+'_' + prevFlags.menuVersion() + '.xml') + lambda prevFlags: 'LVL1config_'+prevFlags.get('Trigger.triggerMenuSetup')+'_' + prevFlags.get('Trigger.menuVersion') + '.xml') # generate or not the L1 topo configuration flags.addFlag('Trigger.generateLVL1TopoConfig', False) # L1 topo XML file name flags.addFlag('Trigger.LVL1TopoConfigFile', - lambda prevFlags: 'LVL1config_'+prevFlags.triggerMenuSetup()+'_' + prevFlags.menuVersion() + '.xml') + lambda prevFlags: 'LVL1config_'+prevFlags.get('Trigger.triggerMenuSetup')+'_' + prevFlags.get('Trigger.menuVersion') + '.xml') # trigger reconstruction @@ -112,10 +120,10 @@ def createTriggerFlags(): # Particle ID tune flags.addFlag('Trigger.egamma.pidVersion', - lambda prefVlags: + lambda prevFlags: __tunes(default='ElectronPhotonSelectorTools/trigger/rel21_mc16a/', ver2016='ElectronPhotonSelectorTools/trigger/rel21_mc16a/', - ver2017='ElectronPhotonSelectorTools/trigger/rel21_20170214/')( prevFlags.gte('Trigger.run2Config') ) + ver2017='ElectronPhotonSelectorTools/trigger/rel21_20170214/')( prevFlags.get('Trigger.run2Config') ) ) # cluster correction version, allowed value is: None or v12phiflip_noecorrnogap -- GitLab From 0d0e02b10d38a3226178f793e6de5414b9a9783a Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Wed, 4 Jul 2018 12:18:43 +0200 Subject: [PATCH 340/562] Fix resolution of signed/unsigned warnings. Former-commit-id: a552216eef79a93fa9060d28fc36925207cd0c7a --- .../PersistentDataModel/PersistentDataModel/Token.h | 4 ++-- Database/PersistentDataModel/src/Token.cxx | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Database/PersistentDataModel/PersistentDataModel/Token.h b/Database/PersistentDataModel/PersistentDataModel/Token.h index cf15bf39fefc..73b7fd2c1a88 100755 --- a/Database/PersistentDataModel/PersistentDataModel/Token.h +++ b/Database/PersistentDataModel/PersistentDataModel/Token.h @@ -21,9 +21,9 @@ class Token { public: // typedef std::pair<long long int, long long int> OID_t; - struct OID_t : public std::pair<long long unsigned int, long long unsigned int> { + struct OID_t : public std::pair<long long int, long long int> { OID_t() {} - OID_t(long long unsigned int i1, long long unsigned int i2) : std::pair<long long unsigned int, long long unsigned int> (i1,i2) {} + OID_t(long long int i1, long long int i2) : std::pair<long long int, long long int> (i1,i2) {} }; private: diff --git a/Database/PersistentDataModel/src/Token.cxx b/Database/PersistentDataModel/src/Token.cxx index c87c6c2556ed..94595cd39d2b 100755 --- a/Database/PersistentDataModel/src/Token.cxx +++ b/Database/PersistentDataModel/src/Token.cxx @@ -133,13 +133,16 @@ Token& Token::fromString(const std::string& source) { } else if (::strncmp("[CNT=", p1, 5) == 0) { m_cntID.assign (p2+1, p3-p2-1); } else if (::strncmp(fmt_oid, p1, 5) == 0) { + long long unsigned int first, second; if (::strncmp("]", p1 + 22, 1) == 0) { // 5 + 8(int) + 1(minus) + 8(int) = 22 - ::sscanf(p1, fmt_oid_old, &m_oid.first, &m_oid.second); - if (int(m_oid.first) == ~0x0) m_oid.first = ~0x0LL; - if (int(m_oid.second) == ~0x0) m_oid.second = ~0x0LL; + ::sscanf(p1, fmt_oid_old, &first, &second); + if (int(first) == ~0x0) first = ~0x0LL; + if (int(second) == ~0x0) second = ~0x0LL; } else { - ::sscanf(p1, fmt_oid, &m_oid.first, &m_oid.second); + ::sscanf(p1, fmt_oid, &first, &second); } + m_oid.first = first; + m_oid.second = second; } else if (::strncmp(fmt_clid, p1, 6) == 0) { m_classID.fromString(p1 + 6); } else if (::strncmp(fmt_tech, p1, 6) == 0) { -- GitLab From 43ab086ea6d7bd9b014e0be73cfcb83ee9ed9c54 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Wed, 4 Jul 2018 10:48:53 +0000 Subject: [PATCH 341/562] 22.0 coverity InDetPerformanceMonitoring Former-commit-id: 816979c79e260ee5c270e2049273680198892461 --- .../IDPerfMonEoverP.h | 2 +- .../IDPerfMonKshort.h | 104 ++++++++---------- .../IDPerfMonWenu.h | 28 ++--- .../InDetPerformanceMonitoring/IDPerfMonZee.h | 50 +++++---- .../IDPerfMonZmumu.h | 53 ++++----- .../IDPerfMuonRefitter.h | 10 -- .../TRT_Electron_Monitoring_Tool.h | 24 ++-- .../InDetPerformanceMonitoring/ZmumuEvent.h | 12 +- .../src/IDPerfMonEoverP.cxx | 33 +++++- .../src/IDPerfMonKshort.cxx | 9 +- .../src/IDPerfMonWenu.cxx | 18 +-- .../src/IDPerfMonZee.cxx | 25 +++-- .../src/IDPerfMonZmumu.cxx | 92 ++++++---------- .../src/IDPerfMuonRefitter.cxx | 11 +- .../src/TRT_Electron_Monitoring_Tool.cxx | 11 +- .../src/ZmumuEvent.cxx | 8 +- 16 files changed, 236 insertions(+), 254 deletions(-) diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonEoverP.h b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonEoverP.h index 144a9c9f9335..f77a4b39bf1f 100755 --- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonEoverP.h +++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonEoverP.h @@ -138,7 +138,7 @@ class IDPerfMonEoverP : public AthAlgorithm /** @brief Primary vertex input name*/ std::string m_primaryVertexCollection; - /** @brief Name of outpu of Refitted Inner Detector Tracks*/ + /** @brief Name of output of Refitted Inner Detector Tracks*/ std::string m_OutputTrackCollectionName_no1; std::string m_OutputTrackCollectionName_no2; diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonKshort.h b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonKshort.h index e3debb35dcb2..f4ea6b37bb21 100755 --- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonKshort.h +++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonKshort.h @@ -10,15 +10,8 @@ // AUTHORS: Beate Heinemann, Tobias Golling // ********************************************************************** #include "GaudiKernel/StatusCode.h" -#include "GaudiKernel/SystemOfUnits.h" -#include "GaudiKernel/PhysicalConstants.h" #include "AthenaMonitoring/ManagedMonitorToolBase.h" -//#include "InDetPerformanceMonitoring/IDPerfMonNtupleMaker.h" -#include "xAODTracking/TrackParticle.h" -#include "xAODTracking/TrackParticleContainer.h" -#include "xAODTracking/Vertex.h" -#include "xAODTracking/VertexContainer.h" class TH1; class TProfile; @@ -44,51 +37,51 @@ public: protected: - int m_histosBooked; - - TH1F* m_mass; - TH1F* m_mass_scaled; - TH2F* m_massVsPhi; - TH1F* m_radius; - TH1F* m_radius_secVertices; - TH1F* m_radius_secVertices_sel; - TH2F* m_radiusVsZ_secVertex; - TH2F* m_radiusVsZ_secVertex_sel; - TH2F* m_YVsX_secVertex; - TH2F* m_YVsX_secVertex_sel; - TH2F* m_radiusVsZ_secVertex_Ks; - TH2F* m_YVsX_secVertex_Ks; - - TH2F* m_YVsX_primVertex; - TH2F* m_XVsZ_primVertex; - TH2F* m_YVsZ_primVertex; - TH2F* m_YVsX_primVertex_Ks; - TH2F* m_XVsZ_primVertex_Ks; - TH2F* m_YVsZ_primVertex_Ks; - TH1F* m_pt; - TH1F* m_eta; - TH1F* m_phi; - TH1F* m_massVersusPt; - TH1F* m_widthVersusPt; - TH1F* m_massVersusRadius; - TH1F* m_widthVersusRadius; - TH1F* m_massVersusEta; - TH1F* m_widthVersusEta; - TH1F* m_massVersusPhi; - TH1F* m_widthVersusPhi; - TH1F* m_massVersusCurvatureDiff; - TH1F* m_widthVersusCurvatureDiff; - - TH1F* m_massVersusPt_merged; - TH1F* m_widthVersusPt_merged; - TH1F* m_massVersusRadius_merged; - TH1F* m_widthVersusRadius_merged; - TH1F* m_massVersusEta_merged; - TH1F* m_widthVersusEta_merged; - TH1F* m_massVersusPhi_merged; - TH1F* m_widthVersusPhi_merged; - TH1F* m_massVersusCurvatureDiff_merged; - TH1F* m_widthVersusCurvatureDiff_merged; + int m_histosBooked{}; + + TH1F* m_mass{}; + TH1F* m_mass_scaled{}; + TH2F* m_massVsPhi{}; + TH1F* m_radius{}; + TH1F* m_radius_secVertices{}; + TH1F* m_radius_secVertices_sel{}; + TH2F* m_radiusVsZ_secVertex{}; + TH2F* m_radiusVsZ_secVertex_sel{}; + TH2F* m_YVsX_secVertex{}; + TH2F* m_YVsX_secVertex_sel{}; + TH2F* m_radiusVsZ_secVertex_Ks{}; + TH2F* m_YVsX_secVertex_Ks{}; + + TH2F* m_YVsX_primVertex{}; + TH2F* m_XVsZ_primVertex{}; + TH2F* m_YVsZ_primVertex{}; + TH2F* m_YVsX_primVertex_Ks{}; + TH2F* m_XVsZ_primVertex_Ks{}; + TH2F* m_YVsZ_primVertex_Ks{}; + TH1F* m_pt{}; + TH1F* m_eta{}; + TH1F* m_phi{}; + TH1F* m_massVersusPt{}; + TH1F* m_widthVersusPt{}; + TH1F* m_massVersusRadius{}; + TH1F* m_widthVersusRadius{}; + TH1F* m_massVersusEta{}; + TH1F* m_widthVersusEta{}; + TH1F* m_massVersusPhi{}; + TH1F* m_widthVersusPhi{}; + TH1F* m_massVersusCurvatureDiff{}; + TH1F* m_widthVersusCurvatureDiff{}; + + TH1F* m_massVersusPt_merged{}; + TH1F* m_widthVersusPt_merged{}; + TH1F* m_massVersusRadius_merged{}; + TH1F* m_widthVersusRadius_merged{}; + TH1F* m_massVersusEta_merged{}; + TH1F* m_widthVersusEta_merged{}; + TH1F* m_massVersusPhi_merged{}; + TH1F* m_widthVersusPhi_merged{}; + TH1F* m_massVersusCurvatureDiff_merged{}; + TH1F* m_widthVersusCurvatureDiff_merged{}; const static Int_t m_nFittedBinsPt = 5 ; const static Int_t m_nBinsPt = 46 ; @@ -102,20 +95,17 @@ protected: TH1F* m_massVPtBinFittedHistos[m_nFittedBinsPt]; TH1F* m_massVRadiusBinFittedHistos[m_nFittedBinsRadius]; - TH1F* m_Nevents; + TH1F* m_Nevents{}; private: - // StoreGateSvc* m_storeGate; std::string m_stream; std::string m_tracksName; std::string m_triggerChainName; - int m_checkrate; + int m_checkrate{}; std::string m_VxContainerName; std::string m_VxPrimContainerName; - //IDPerfMonNtupleMaker NtupleMaker; - //bool m_Ntuple; }; diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonWenu.h b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonWenu.h index d0b6ef602b6b..7cad734190fd 100755 --- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonWenu.h +++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonWenu.h @@ -80,20 +80,20 @@ public: protected: - int m_histosBooked; + int m_histosBooked{}; enum m_eta_region { incl, barrel, eca, ecc, Nregions }; std::vector<std::string> m_region_strings; // event histos - TH1F* m_Nevents; + TH1F* m_Nevents{}; - TH1F* m_Wenu_met_sel; - TH1F* m_Wenu_transmass_sel; - TH1F* m_Wenu_trk_transmass_sel; - TH1F* m_Wenu_trk_transmass_sel_scaled; - TH1F* m_Wenu_clus_pt; + TH1F* m_Wenu_met_sel{}; + TH1F* m_Wenu_transmass_sel{}; + TH1F* m_Wenu_trk_transmass_sel{}; + TH1F* m_Wenu_trk_transmass_sel_scaled{}; + TH1F* m_Wenu_clus_pt{}; // cluster histos @@ -173,14 +173,14 @@ public: std::string m_metName; std::string m_triggerChainName; std::string m_metRefFinalName; - double m_eoverp_tight_min; - double m_eoverp_tight_max; - double m_eoverp_standard_min; - double m_eoverp_standard_max; - int m_checkrate; - bool m_rejectSecondCluster; + double m_eoverp_tight_min{}; + double m_eoverp_tight_max{}; + double m_eoverp_standard_min{}; + double m_eoverp_standard_max{}; + int m_checkrate{}; + bool m_rejectSecondCluster{}; std::string m_electronIDLevel; - bool m_doIDCuts; + bool m_doIDCuts{}; //Likelihood tool: std::unique_ptr<AsgElectronLikelihoodTool> m_LHTool2015; //! diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonZee.h b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonZee.h index e5a76b392e55..a5ac0a2d284d 100755 --- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonZee.h +++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonZee.h @@ -13,17 +13,11 @@ #include <vector> #include "GaudiKernel/StatusCode.h" -#include "GaudiKernel/SystemOfUnits.h" -#include "GaudiKernel/PhysicalConstants.h" + #include "AthenaMonitoring/AthenaMonManager.h" #include "AthenaMonitoring/ManagedMonitorToolBase.h" -class TH1; -class TH1F; -class TH2; -class TH2F; -class TProfile; - +//typdefs, cannot be fwd declared #include "xAODEgamma/Electron.h" #include "xAODEgamma/ElectronContainer.h" #include "xAODEgamma/Photon.h" @@ -33,6 +27,14 @@ class TProfile; #include "xAODCaloEvent/CaloClusterContainer.h" #include "xAODMissingET/MissingET.h" +class TH1; +class TH1F; +class TH2; +class TH2F; +class TProfile; + + + #include "ElectronPhotonSelectorTools/AsgElectronLikelihoodTool.h" class IDPerfMonZee : public ManagedMonitorToolBase @@ -81,21 +83,21 @@ public: enum m_eta_region { incl, barrel, eca, ecc, Nregions }; std::vector<std::string> m_region_strings; - int m_histosBooked; + int m_histosBooked{}; // event histos - TH1F* m_Nevents; + TH1F* m_Nevents{}; - TH1F* m_Check; - TH1F* m_Zee_invmass; - TH1F* m_Zee_invmass_sel; - TH1F* m_Zee_trk_invmass; - TH1F* m_Zee_trk_invmass_scaled; - TH1F* m_Zee_trk_invmass_sel; + TH1F* m_Check{}; + TH1F* m_Zee_invmass{}; + TH1F* m_Zee_invmass_sel{}; + TH1F* m_Zee_trk_invmass{}; + TH1F* m_Zee_trk_invmass_scaled{}; + TH1F* m_Zee_trk_invmass_sel{}; - TH1F* m_Zee_Eopasym_perevent; - TH1F* m_Zee_Eopasym_perevent_central; + TH1F* m_Zee_Eopasym_perevent{}; + TH1F* m_Zee_Eopasym_perevent_central{}; // cluster histos @@ -181,13 +183,13 @@ public: std::string m_metName; std::string m_triggerChainName; std::string m_metRefFinalName; - double m_eoverp_tight_min; - double m_eoverp_tight_max; - double m_eoverp_standard_min; - double m_eoverp_standard_max; - int m_checkrate; + double m_eoverp_tight_min{}; + double m_eoverp_tight_max{}; + double m_eoverp_standard_min{}; + double m_eoverp_standard_max{}; + int m_checkrate{}; std::string m_electronIDLevel; - bool m_doIDCuts; + bool m_doIDCuts{}; //Likelihood tool: AsgElectronLikelihoodTool* m_LHTool2015; //! }; diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonZmumu.h b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonZmumu.h index a6ad3e9ddb9e..583d314d0f29 100755 --- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonZmumu.h +++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonZmumu.h @@ -10,12 +10,9 @@ //============================================================================== #include "AthenaMonitoring/ManagedMonitorToolBase.h" #include "InDetPerformanceMonitoring/ZmumuEvent.h" -#include "InDetPerformanceMonitoring/EventAnalysis.h" -//#include "TrkFitterInterfaces/ITrackFitter.h" #include "xAODTruth/TruthVertex.h" #include "xAODTruth/TruthParticle.h" -//#include "xAODTruth/xAODTruthHelpers.h" #include "xAODTruth/TruthParticleContainer.h" #include "ITrackToVertex/ITrackToVertex.h" @@ -25,17 +22,11 @@ #include "xAODEgamma/Electron.h" #include "xAODEgamma/EgammaTruthxAODHelpers.h" -#include <map> -#include "TH1.h" -#include "TH2.h" -#include "TProfile.h" -#include "TProfile2D.h" - #include "AthenaBaseComps/AthAlgorithm.h" #include "GaudiKernel/ToolHandle.h" - +class TTree; class IegammaTrkRefitterTool; @@ -87,7 +78,6 @@ class IDPerfMonZmumu : public AthAlgorithm std::string m_refit1TreeName; //Refit ID Tracks std::string m_refit2TreeName; //Refit ID Tracks std::string m_truthTreeName; //Truth Tracks - // std::string m_meStacoTreeName; //Extrapolated Staco not existent in xAOD anymore std::string m_combStacoTreeName; //Combined Staco std::string m_combMuidTreeName; //Combined Muid //!< validation tree description - second argument in TTree @@ -110,30 +100,29 @@ class IDPerfMonZmumu : public AthAlgorithm TTree* m_refit1Tree; TTree* m_refit2Tree; TTree* m_truthTree; - //TTree* m_meStacoTree; TTree* m_combStacoTree; TTree* m_combMuidTree; - mutable unsigned int m_runNumber; - mutable unsigned int m_evtNumber; - mutable unsigned int m_lumi_block; - - double m_positive_px; - double m_positive_py; - double m_positive_pz; - double m_positive_z0; - double m_positive_d0; - double m_positive_z0_err; - double m_positive_d0_err; - - - double m_negative_px; - double m_negative_py; - double m_negative_pz; - double m_negative_z0; - double m_negative_d0; - double m_negative_z0_err; - double m_negative_d0_err; + mutable unsigned int m_runNumber{}; + mutable unsigned int m_evtNumber{}; + mutable unsigned int m_lumi_block{}; + + double m_positive_px{}; + double m_positive_py{}; + double m_positive_pz{}; + double m_positive_z0{}; + double m_positive_d0{}; + double m_positive_z0_err{}; + double m_positive_d0_err{}; + + + double m_negative_px{}; + double m_negative_py{}; + double m_negative_pz{}; + double m_negative_z0{}; + double m_negative_d0{}; + double m_negative_z0_err{}; + double m_negative_d0_err{}; std::string m_sTriggerChainName; std::string m_outputTracksName; diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMuonRefitter.h b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMuonRefitter.h index a10cc72fe313..3c4221286696 100755 --- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMuonRefitter.h +++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMuonRefitter.h @@ -9,16 +9,6 @@ // Include files... //============================================================================== #include "AthenaMonitoring/ManagedMonitorToolBase.h" -#include "InDetPerformanceMonitoring/IDPerfMuonRefitter.h" - -#include <map> -#include "TH1.h" -#include "TH2.h" -#include "TProfile.h" -#include "TProfile2D.h" - -#include "xAODMuon/Muon.h" -#include "xAODMuon/MuonContainer.h" #include "AthenaBaseComps/AthAlgorithm.h" diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/TRT_Electron_Monitoring_Tool.h b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/TRT_Electron_Monitoring_Tool.h index ee6f53ec2e1c..4449876d681a 100644 --- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/TRT_Electron_Monitoring_Tool.h +++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/TRT_Electron_Monitoring_Tool.h @@ -6,7 +6,6 @@ #define TRT_ELECTRON_MONITORING_TOOL_H #include "GaudiKernel/StatusCode.h" -#include "GaudiKernel/SystemOfUnits.h" #include "AthenaMonitoring/AthenaMonManager.h" #include "AthenaMonitoring/ManagedMonitorToolBase.h" #include "InDetReadoutGeometry/TRT_DetectorManager.h" @@ -25,15 +24,12 @@ #include <vector> -#include <sstream> -#include <stdlib.h> #include <string> -#include "TF1.h" -#include "TMath.h" -#include "TProfile.h" -#include "LWHists/TH1F_LW.h" -#include "LWHists/TH2F_LW.h" -#include "LWHists/TProfile_LW.h" + + +class TH1F_LW; +class TH2F_LW; +class TProfile_LW; @@ -135,20 +131,20 @@ public: private: - const DataVector<xAOD::TrackParticle> *m_trkpCollection; + const DataVector<xAOD::TrackParticle> *m_trkpCollection{}; std::string m_tracksName; - const xAOD::ElectronContainer* m_electronContainer; + const xAOD::ElectronContainer* m_electronContainer{}; std::string m_electronsName; - const xAOD::MuonContainer* m_muonContainer; + const xAOD::MuonContainer* m_muonContainer{}; std::string m_muonsName; - const xAOD::VertexContainer* m_conversionContainer; + const xAOD::VertexContainer* m_conversionContainer{}; std::string m_conversionName; std::string m_isEMFlag; - myIsEMType m_isEMType; + myIsEMType m_isEMType{ISEMLOOSE}; bool m_doTracksMon; bool m_doElectronMon; diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/ZmumuEvent.h b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/ZmumuEvent.h index d774197cde64..e490cf311368 100644 --- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/ZmumuEvent.h +++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/ZmumuEvent.h @@ -109,13 +109,13 @@ class ZmumuEvent : public EventAnalysis double m_etaCut; bool m_doDebug; // Member variables : Mostly to store relevant muon data for quick access. - unsigned int m_numberOfFullPassMuons; - bool m_passedSelectionCuts; + unsigned int m_numberOfFullPassMuons{}; + bool m_passedSelectionCuts{}; - const xAOD::Muon* m_pxRecMuon[NUM_MUONS]; - const xAOD::TrackParticle* m_pxMETrack[NUM_MUONS]; // Pointer to muon spectro ( corr. ) - const xAOD::TrackParticle* m_pxMSTrack[NUM_MUONS]; // Pointer to muon spectro - const xAOD::TrackParticle* m_pxIDTrack[NUM_MUONS]; // Pointer to ID track + const xAOD::Muon* m_pxRecMuon[NUM_MUONS] {}; + const xAOD::TrackParticle* m_pxMETrack[NUM_MUONS] {}; // Pointer to muon spectro ( corr. ) + const xAOD::TrackParticle* m_pxMSTrack[NUM_MUONS] {}; // Pointer to muon spectro + const xAOD::TrackParticle* m_pxIDTrack[NUM_MUONS] {}; // Pointer to ID track // Keep kinematic information on the Z float m_fZPt[NUM_TYPES]; diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonEoverP.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonEoverP.cxx index fa6f3ea28599..03862d92c76a 100755 --- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonEoverP.cxx +++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonEoverP.cxx @@ -22,7 +22,7 @@ PURPOSE: Create a simple ntuple to perform EoverP studies with #include "GaudiKernel/ListItem.h" #include <algorithm> -#include <math.h> +#include <cmath> #include <vector> // Validation mode - TTree includes #include "GaudiKernel/ITHistSvc.h" @@ -60,6 +60,8 @@ using namespace Trk; IDPerfMonEoverP::IDPerfMonEoverP(const std::string& name, ISvcLocator* pSvcLocator): AthAlgorithm(name, pSvcLocator), + m_refittedTracks_no1{}, + m_refittedTracks_no2{}, m_TrackRefitter(""), m_TrackRefitter_no2(""), m_trigDec("Trig::TrigDecisionTool/TrigDecisionTool"), @@ -67,11 +69,22 @@ IDPerfMonEoverP::IDPerfMonEoverP(const std::string& name, m_isDATA(true), m_validationMode(true), m_fillDetailedTree(false), + m_primaryVertexFirstCandidate{}, m_validationTreeName("EGrefitter"), m_validationTreeDescription("egamma track refitter results"), m_validationTreeFolder("/eoverpValidation/efitterValidation"), m_validationTree(0), + m_runNumber{}, + m_evtNumber{}, + m_lumi_block{}, + m_nelectrons{}, m_electronCounter(0), + m_nbpv{}, + m_METgoodness{}, + m_sumet{}, + m_missingEt{}, + m_missingEtx{}, + m_missingEty{}, m_ZeeLooseMassOS_Cluster(0), m_ZeeLooseMassSS_Cluster(0), m_ZeeMediumMassOS_Cluster(0), @@ -88,7 +101,20 @@ IDPerfMonEoverP::IDPerfMonEoverP(const std::string& name, m_smallValidationTreeName("EGrefitterSmall"), m_smallValidationTreeDescription("Small Tree for E/p fits"), m_smallValidationTreeFolder("/eoverpValidation2/efitterValidation2"), - m_smallValidationTree(0) + m_smallValidationTree(0), + m_small_QoverP{}, + m_small1_QoverP{}, + m_small2_QoverP{}, + m_smallClusterEnergy{}, + m_smallClusterPhi{}, + m_smallClusterEta{}, + m_smallTrackTheta{}, + m_smallCharge{}, + m_smalld0{}, + m_smallz0{}, + m_LHToolLoose2015{}, + m_LHToolMedium2015{}, + m_LHToolTight2015{} { // The following properties are specified at run-time @@ -640,6 +666,7 @@ StatusCode IDPerfMonEoverP::execute() if (sc.isFailure()) { ATH_MSG_ERROR("Could not record "<< m_OutputTrackCollectionName_no1 <<" object."); + delete selectedElectrons; return (StatusCode::FAILURE); } @@ -647,6 +674,7 @@ StatusCode IDPerfMonEoverP::execute() if (sc.isFailure()) { ATH_MSG_ERROR("Could not record "<< m_OutputTrackCollectionName_no2 <<" object."); + delete selectedElectrons; return (StatusCode::FAILURE); } @@ -654,6 +682,7 @@ StatusCode IDPerfMonEoverP::execute() if (sc.isFailure()) { ATH_MSG_ERROR("Could not record "<< m_OutputTrackCollectionName_no1+"Selected" <<" object."); + delete selectedElectrons; return (StatusCode::FAILURE); } diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonKshort.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonKshort.cxx index e3ac27c4dfa5..a8006f751875 100755 --- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonKshort.cxx +++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonKshort.cxx @@ -7,8 +7,7 @@ // AUTHORS: Jed Biesiada, Tobias Golling, Beate Heinemann // ********************************************************************** -#include <sstream> -#include <math.h> +#include <cmath> #include <vector> #include "TH1.h" @@ -20,10 +19,15 @@ #include "GaudiKernel/IJobOptionsSvc.h" +#include "GaudiKernel/SystemOfUnits.h" +#include "GaudiKernel/PhysicalConstants.h" #include "xAODTracking/TrackParticle.h" #include "xAODTracking/TrackParticleContainer.h" +#include "xAODTracking/Vertex.h" +#include "xAODTracking/VertexContainer.h" + #include "TrkEventPrimitives/FitQuality.h" #include "TrkEventPrimitives/LocalParameters.h" @@ -39,7 +43,6 @@ #include "EventInfo/EventInfo.h" #include "EventInfo/EventID.h" -// #include "AthenaMonitoring/AthenaMonManager.h" #include "InDetPerformanceMonitoring/IDPerfMonKshort.h" diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonWenu.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonWenu.cxx index 2d09601d7709..04bc2f010d93 100755 --- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonWenu.cxx +++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonWenu.cxx @@ -7,8 +7,7 @@ // AUTHORS: Beate Heinemann, Tobias Golling, Sara Strandberg // ********************************************************************** -#include <sstream> -#include <math.h> +#include <cmath> #include "TH1.h" #include "TH2.h" #include "TH1F.h" @@ -47,6 +46,7 @@ #include "AthenaMonitoring/AthenaMonManager.h" #include "InDetPerformanceMonitoring/IDPerfMonWenu.h" +#include <stdexcept> // ********************************************************************* // Public Methods @@ -238,15 +238,19 @@ StatusCode IDPerfMonWenu::bookHistograms() name = "Wenu_Eop_" + m_region_strings[region]; title = "E/p for Wenu EM-clusters in " + m_region_strings[region]; m_Wenu_Eop.push_back(new TH1F(name.c_str(),title.c_str(), 60, 0., 10.)); + /** original code: what was intended here? if (region==incl) RegisterHisto(al_Wenu_mon,m_Wenu_Eop[region]); else RegisterHisto(al_Wenu_mon,m_Wenu_Eop[region]); - + **/ + RegisterHisto(al_Wenu_mon,m_Wenu_Eop[region]); name = "Wenu_Eopdiff_" + m_region_strings[region]; title = "E/p difference (pos-neg) for Wenu EM-clusters in " + m_region_strings[region]; m_Wenu_Eopdiff.push_back(new TH1F(name.c_str(),title.c_str(), 10, 0., 2.)); + /** original code: what was intended here? if (region==incl) RegisterHisto(al_Wenu_mon,m_Wenu_Eopdiff[region],true); else RegisterHisto(al_Wenu_mon,m_Wenu_Eopdiff[region],true); - + **/ + RegisterHisto(al_Wenu_mon,m_Wenu_Eopdiff[region],true); name = "Wenu_Eop_plus_" + m_region_strings[region]; title = "E/p for pos. charged Wenu EM-clusters in " + m_region_strings[region]; m_Wenu_Eop_plus.push_back(new TH1F(name.c_str(),title.c_str(), 10, 0., 2.)); @@ -858,10 +862,10 @@ int IDPerfMonWenu::etaRegion(double eta) { } void IDPerfMonWenu::FillHistosPerCluster(const xAOD::CaloCluster* cluster, const xAOD::TrackParticle* track, int region, float dEta, float dPhi) { - - //std::cout << "In FillHistosPerCluster with cluster " << cluster << "track " << track << " region " << region << std::endl; - if (cluster == 0) return; + if (region<0){ + throw std::out_of_range("Region is negative in IDPerfMonWenu::FillHistosPerCluster"); + } // THERE IS A CLUSTER if (region == incl) { // inclusive only diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonZee.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonZee.cxx index 5834cff4cd92..d1b047acdecf 100755 --- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonZee.cxx +++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonZee.cxx @@ -7,8 +7,7 @@ // AUTHORS: Beate Heinemann, Tobias Golling, Sara Strandberg // ********************************************************************** -#include <sstream> -#include <math.h> +#include <cmath> #include "TH1.h" #include "TH2.h" #include "TH1F.h" @@ -39,11 +38,11 @@ #include "TrkEventPrimitives/FitQuality.h" #include "TrkEventPrimitives/LocalParameters.h" -//#include "VxVertex/VxContainer.h" -//#include "VxVertex/VxCandidate.h" -//#include "VxVertex/RecVertex.h" -//#include "VxVertex/Vertex.h" -//#include "VxVertex/VxTrackAtVertex.h" +#include "GaudiKernel/SystemOfUnits.h" +#include "GaudiKernel/PhysicalConstants.h" + + + #include "egammaEvent/egammaParamDefs.h" #include "egammaEvent/egammaPIDdefsObs.h" @@ -54,6 +53,7 @@ #include "AthenaMonitoring/AthenaMonManager.h" #include "InDetPerformanceMonitoring/IDPerfMonZee.h" +#include <stdexcept> // ********************************************************************* // Public Methods @@ -256,15 +256,19 @@ StatusCode IDPerfMonZee::bookHistograms() name = "Zee_Eop_" + m_region_strings[region]; title = "E/p for Zee EM-clusters in " + m_region_strings[region]; m_Zee_Eop.push_back(new TH1F(name.c_str(),title.c_str(), 60, 0., 10.)); + /**Original code: what was intended? if (region==incl) RegisterHisto(al_Zee_mon,m_Zee_Eop[region]); else RegisterHisto(al_Zee_mon,m_Zee_Eop[region]); - + **/ + RegisterHisto(al_Zee_mon,m_Zee_Eop[region]); name = "Zee_Eopdiff_" + m_region_strings[region]; title = "E/p difference (pos-neg) for Zee EM-clusters in " + m_region_strings[region]; m_Zee_Eopdiff.push_back(new TH1F(name.c_str(),title.c_str(), 10, 0., 2.)); + /**Original code: what was intended? if (region==incl) RegisterHisto(al_Zee_mon,m_Zee_Eopdiff[region],true); else RegisterHisto(al_Zee_mon,m_Zee_Eopdiff[region],true); - + **/ + RegisterHisto(al_Zee_mon,m_Zee_Eopdiff[region],true); name = "Zee_Eop_plus_" + m_region_strings[region]; title = "E/p for pos. charged Zee EM-clusters in " + m_region_strings[region]; m_Zee_Eop_plus.push_back(new TH1F(name.c_str(),title.c_str(), 10, 0., 2.)); @@ -937,6 +941,9 @@ int IDPerfMonZee::etaRegion(double eta) { void IDPerfMonZee::FillHistosPerCluster(const xAOD::CaloCluster* cluster, const xAOD::TrackParticle* track, int region, float dEta, float dPhi) { if (cluster == 0) return; + if (region<0){ + throw(std::out_of_range("Region index has negative value in IDPerfMonZee::FillHistosPerCluster")); + } // THERE IS A CLUSTER if (region == incl) { // inclusive only m_Zee_eta[region]->Fill(cluster->etaBE(2)); diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonZmumu.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonZmumu.cxx index 1530e2405a93..8ec353ab7f03 100755 --- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonZmumu.cxx +++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonZmumu.cxx @@ -11,18 +11,15 @@ // This files header #include "InDetPerformanceMonitoring/IDPerfMonZmumu.h" // Standard headers -#include <string> #include "TTree.h" #include "TLorentzVector.h" #include "InDetPerformanceMonitoring/PerfMonServices.h" #include "InDetPerformanceMonitoring/ZmumuEvent.h" -//#include "TrkFitterInterfaces/ITrackFitter.h" #include "egammaInterfaces/IegammaTrkRefitterTool.h" #include "EventPrimitives/EventPrimitivesHelpers.h" -//#include "xAODTruth/xAODTruthHelpers.h" //For extrapolation // ATLAS headers @@ -54,7 +51,6 @@ IDPerfMonZmumu::IDPerfMonZmumu(const std::string& name, m_refit1TreeName("Refit1Params"), m_refit2TreeName("Refit2Params"), m_truthTreeName("TruthParams"), - // m_meStacoTreeName("MEStacoParams"), //not existent in xAOD anymore m_combStacoTreeName("CombStacoParams"), m_combMuidTreeName("CombMuidParams"), m_ValidationTreeDescription("Small Tree for Zmumu fits"), @@ -62,13 +58,11 @@ IDPerfMonZmumu::IDPerfMonZmumu(const std::string& name, m_refit1TreeFolder("/ZmumuValidation/refit1"), m_refit2TreeFolder("/ZmumuValidation/refit2"), m_truthTreeFolder("/ZmumuValidation/truth"), - // m_meStacoTreeFolder("/ZmumuValidation/mestaco"), m_combStacoTreeFolder("/ZmumuValidation/combstaco"), m_defaultTree(0), m_refit1Tree(0), m_refit2Tree(0), m_truthTree(0), - // m_meStacoTree(0), // not existent in xAOD anymore m_combStacoTree(0), m_combMuidTree(0) @@ -89,8 +83,6 @@ IDPerfMonZmumu::IDPerfMonZmumu(const std::string& name, declareProperty("TrackTruthName", m_truthName="TrackTruthCollection"); declareProperty("TrackParticleName", m_trackParticleName="InDetTrackParticles"); - // declareProperty("TrackParticleName", m_trackParticleName="TruthParticles"); - // declareProperty("TrackParticleName", m_trackParticleName="CombinedMuonTrackParticles"); declareProperty("xAODTruthLinkVector",m_truthLinkVecName="xAODTruthLinks"); @@ -346,11 +338,6 @@ StatusCode IDPerfMonZmumu::initialize() m_validationMode = false; } - // if ((tHistSvc->regTree(m_meStacoTreeFolder, m_meStacoTree)).isFailure() ) { - //ATH_MSG_ERROR("initialize() Could not register the validation Tree -> Switching ValidationMode Off !"); - //delete m_meStacoTree; m_meStacoTree = 0; - //m_validationMode = false; - //} if ((tHistSvc->regTree(m_combStacoTreeFolder, m_combStacoTree)).isFailure() ) { ATH_MSG_ERROR("initialize() Could not register the validation Tree -> Switching ValidationMode Off !"); @@ -398,41 +385,35 @@ StatusCode IDPerfMonZmumu::execute() //Fill Staco muon parameters only m_xZmm.setContainer(PerfMonServices::MUON_COLLECTION); - // m_xZmm.Reco(); if(!m_xZmm.Reco()){ //failed reconstruction return StatusCode::SUCCESS; } const xAOD::Muon* muon_pos = m_xZmm.getCombMuon(m_xZmm.getPosMuon(ZmumuEvent::CB)); const xAOD::Muon* muon_neg = m_xZmm.getCombMuon(m_xZmm.getNegMuon(ZmumuEvent::CB)); + //already here, muon_pos and muon_neg may not be nullptr + if ((not muon_pos) or (not muon_neg)){ + ATH_MSG_WARNING("No muon here!"); + return StatusCode::SUCCESS; + } const xAOD::TrackParticle* p1_comb = muon_pos->trackParticle(xAOD::Muon::CombinedTrackParticle); const xAOD::TrackParticle* p2_comb = muon_neg->trackParticle(xAOD::Muon::CombinedTrackParticle); - if ( m_xZmm.EventPassed() ) { + if ( m_xZmm.EventPassed() ) { //fill Combined Staco parameters - if (!muon_pos || !muon_neg) { - ATH_MSG_WARNING("CB Staco Muons missing!"); - } else { - // FillRecParameters(muon_pos->combinedMuonTrackParticle()->originalTrack(), muon_pos->combinedMuonTrackParticle()->charge()); - // FillRecParameters(muon_neg->combinedMuonTrackParticle()->originalTrack(), muon_neg->combinedMuonTrackParticle()->charge()); - FillRecParameters(p1_comb->track(), p1_comb->charge()); - FillRecParameters(p2_comb->track(), p2_comb->charge()); - m_combStacoTree->Fill(); - } + FillRecParameters(p1_comb->track(), p1_comb->charge()); + FillRecParameters(p2_comb->track(), p2_comb->charge()); + m_combStacoTree->Fill(); + } - //Now use MUID collection to find ID tracks - //m_xZmm.setContainer(PerfMonServices::MUID_COLLECTION); - //m_xZmm.Reco(); - + if ( !m_xZmm.EventPassed() ) { //failed cuts, continue to next event return StatusCode::SUCCESS; } - //const std::string region = m_xZmm.getRegion(); - // const xAOD::TrackParticle* p1 = m_xZmm.getIDTrack(m_xZmm.getPosMuon(ZmumuEvent::ID)); - // const xAOD::TrackParticle* p2 = m_xZmm.getIDTrack(m_xZmm.getNegMuon(ZmumuEvent::ID)); + TrackCollection* muonTrks = new TrackCollection(SG::OWN_ELEMENTS); TrackCollection* muonTrksRefit1 = new TrackCollection(SG::OWN_ELEMENTS); TrackCollection* muonTrksRefit2 = new TrackCollection(SG::OWN_ELEMENTS); @@ -440,6 +421,9 @@ StatusCode IDPerfMonZmumu::execute() // changed refitting to combinedparticles since run II DESDM_ZMUMU did not store InDetTrackParticles if (!p1_comb->track() || !p2_comb->track()) { ATH_MSG_WARNING("Track missing! Skipping Event"); + delete muonTrks; + delete muonTrksRefit1; + delete muonTrksRefit2; return StatusCode::SUCCESS; } @@ -461,6 +445,9 @@ StatusCode IDPerfMonZmumu::execute() fitStatus = m_TrackRefitter1->refitTrack( p1_comb->track(),egam ); if (fitStatus.isFailure()) { ATH_MSG_DEBUG("Track Refit1 Failed. Skipping Event"); + delete muonTrks; + delete muonTrksRefit1; + delete muonTrksRefit2; return StatusCode::SUCCESS; } else { refit1MuonTrk1 = m_TrackRefitter1->refittedTrack(); @@ -472,6 +459,9 @@ StatusCode IDPerfMonZmumu::execute() fitStatus = m_TrackRefitter2->refitTrack( p1_comb->track(),egam ); if (fitStatus.isFailure()) { ATH_MSG_DEBUG("Track Refit2 Failed. Skipping Event"); + delete muonTrks; + delete muonTrksRefit1; + delete muonTrksRefit2; return StatusCode::SUCCESS; } else { refit2MuonTrk1 = m_TrackRefitter2->refittedTrack(); @@ -483,10 +473,9 @@ StatusCode IDPerfMonZmumu::execute() if( p2_comb->track() ) { defaultMuonTrk2 = new Trk::Track(*p2_comb->track()); - fitStatus = m_TrackRefitter1->refitTrack( p2_comb->track(),egam ); if (fitStatus.isFailure()) { - ATH_MSG_DEBUG("Track Refit1 Failed. Skipping Event"); + ATH_MSG_DEBUG("Track Refit1 Failed. Skipping Event"); return StatusCode::SUCCESS; } else { refit1MuonTrk2 = m_TrackRefitter1->refittedTrack(); @@ -536,11 +525,11 @@ StatusCode IDPerfMonZmumu::execute() if (m_isMC) { if (FillTruthParameters(p1_comb).isFailure()){ - ATH_MSG_WARNING("Failed to fill truth parameters - skipping event"); + ATH_MSG_WARNING("Failed to fill truth parameters - skipping event"); return StatusCode::SUCCESS; } if (FillTruthParameters(p2_comb).isFailure()){ - ATH_MSG_WARNING("Failed to fill truth parameters - skipping event"); + ATH_MSG_WARNING("Failed to fill truth parameters - skipping event"); return StatusCode::SUCCESS; } ATH_MSG_DEBUG("fill truthTree with parameters : "); @@ -607,13 +596,10 @@ StatusCode IDPerfMonZmumu::execute() m_refit2Tree->Fill(); } - if (!muon_pos || !muon_neg) { - ATH_MSG_WARNING("CB Muons missing!"); - } else { - FillRecParameters(p1_comb->track(), p1_comb->charge()); - FillRecParameters(p2_comb->track(), p2_comb->charge()); - m_combMuidTree->Fill(); - } + FillRecParameters(p1_comb->track(), p1_comb->charge()); + FillRecParameters(p2_comb->track(), p2_comb->charge()); + m_combMuidTree->Fill(); + return StatusCode::SUCCESS; } @@ -627,19 +613,14 @@ void IDPerfMonZmumu::FillRecParameters(const Trk::Track* track, double charge) return; } const Trk::Perigee* trkPerigee = track->perigeeParameters(); - // const AmgSymMatrix(5)* covariance = trkPerigee ? trkPerigee->covariance() : NULL; - // if (covariance == NULL) { - // if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "No measured perigee parameters assigned to the track" << endmsg; - // } + double px = 0; double py = 0; double pz = 0; double d0 = 0; double z0 = 0; - // double d0_err = 0; - // double z0_err = 0; - + if(trkPerigee){ double qOverP = trkPerigee->parameters()[Trk::qOverP]; if (qOverP) { @@ -662,8 +643,7 @@ void IDPerfMonZmumu::FillRecParameters(const Trk::Track* track, double charge) pz = atBL->momentum().z(); d0 = atBL->parameters()[Trk::d0]; z0 = atBL->parameters()[Trk::z0]; - // z0_err = Amg::error(*trkPerigee->covariance(),Trk::z0); - // d0_err = Amg::error(*trkPerigee->covariance(),Trk::d0); + } } @@ -675,8 +655,7 @@ void IDPerfMonZmumu::FillRecParameters(const Trk::Track* track, double charge) m_positive_z0 = z0; m_positive_d0 = d0; ATH_MSG_DEBUG("(Filled charge == 1 ) (reco)-> px : "<< px <<" py: "<<py <<" pz: "<<pz <<" d0: "<<d0<<" z0: "<< z0); - // m_positive_z0_err = z0_err; - // m_positive_d0_err = d0_err; + } else if (charge == -1) { m_negative_px = px; m_negative_py = py; @@ -684,8 +663,7 @@ void IDPerfMonZmumu::FillRecParameters(const Trk::Track* track, double charge) m_negative_z0 = z0; m_negative_d0 = d0; ATH_MSG_DEBUG("(Filled charge == -1 ) (reco)-> px : "<< px <<" py: "<<py <<" pz: "<<pz <<" d0: "<<d0<<" z0: "<<z0 ); - // m_negative_z0_err = z0_err; - // m_negative_d0_err = d0_err; + } return; @@ -694,8 +672,7 @@ void IDPerfMonZmumu::FillRecParameters(const Trk::Track* track, double charge) StatusCode IDPerfMonZmumu::FillTruthParameters(const xAOD::TrackParticle* trackParticle) { double momX(0),momY(0),momZ(0), vtxX(0),vtxY(0),vtxZ(0); - // const xAOD::TruthParticle* truthParticle = xAOD::TruthHelpers::getTruthParticle( *trackParticle ); - // const xAOD::TruthParticle* truthParticle = xAOD::EgammaHelpers::getTruthParticle( trackParticle ); + const xAOD::TruthParticle* truthParticle = getTruthParticle( *trackParticle ); if(truthParticle->hasProdVtx()){ vtxX = truthParticle->prodVtx()->x(); @@ -710,7 +687,6 @@ StatusCode IDPerfMonZmumu::FillTruthParameters(const xAOD::TrackParticle* trackP double charge = 0; if(truthParticle->pdgId() == 13) charge = -1.; else if(truthParticle->pdgId() == -13) charge = 1.; - // Trk::Perigee* candidatePerigee = new Trk::Perigee(pos,mom,charge,pos); Trk::TrackParameters* parameters = new Trk::Perigee(pos,mom,charge,pos); const Trk::AtaStraightLine* atBLi = diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMuonRefitter.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMuonRefitter.cxx index ce672df2f9ea..68430db4db2a 100755 --- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMuonRefitter.cxx +++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMuonRefitter.cxx @@ -9,16 +9,13 @@ // Include files... //================================================================================== -// This files header +// This file's header #include "InDetPerformanceMonitoring/IDPerfMuonRefitter.h" -// Standard headers -#include <string> -#include "TTree.h" -// Package Headers -#include "InDetPerformanceMonitoring/PerfMonServices.h" -#include "InDetPerformanceMonitoring/ZmumuEvent.h" +// Need containers +#include "xAODMuon/Muon.h" +#include "xAODMuon/MuonContainer.h" //Interface Headers #include "egammaInterfaces/IegammaTrkRefitterTool.h" diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/TRT_Electron_Monitoring_Tool.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/TRT_Electron_Monitoring_Tool.cxx index 3224a2191a9e..ae3a541cdc1b 100644 --- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/TRT_Electron_Monitoring_Tool.cxx +++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/TRT_Electron_Monitoring_Tool.cxx @@ -10,6 +10,10 @@ // ********************************************************************** #include "InDetPerformanceMonitoring/TRT_Electron_Monitoring_Tool.h" +#include "LWHists/TH1F_LW.h" +#include "LWHists/TH2F_LW.h" +#include "LWHists/TProfile_LW.h" + const float electron_mass = 0.511 * Gaudi::Units::MeV; const float muon_mass = 105.66 * Gaudi::Units::MeV; @@ -757,14 +761,13 @@ fillAllHistograms(xAOD::TrackParticle *trkP, float mass, int PCand){ break; case DET_BARRELC: myGeoHists = &m_tBarrelC; - break; + break; case DET_ENDCAPA: myGeoHists = &m_tEndCapA; - break; + break; case DET_ENDCAPC: myGeoHists = &m_tEndCapC; - break; - default : continue; + break; } if(!myGeoHists) continue; if(nLLHits[i]>0){ diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/ZmumuEvent.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/ZmumuEvent.cxx index 5c439eac0bb4..438ae1aa96e9 100644 --- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/ZmumuEvent.cxx +++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/ZmumuEvent.cxx @@ -19,7 +19,6 @@ // ATLAS headers #include "StoreGate/StoreGateSvc.h" -//#include "muonEvent/MuonParamDefs.h" #include "CLHEP/Random/RandFlat.h" @@ -334,15 +333,12 @@ const xAOD::TrackParticle* ZmumuEvent::getLooseIDTk( unsigned int /*uPart*/ ) while ( xTrkItr != xTrkItrE ) { const xAOD::TrackParticle* pxTrack = *xTrkItr; - if(!(pxTrack->track())) continue; + if(!(pxTrack)) continue; const Trk::Track* pxTrkTrack = pxTrack->track(); - if ( !pxTrack ) continue; + if ( !pxTrack->track() ) continue; const Trk::Perigee* pxPerigee = pxTrkTrack->perigeeParameters() ; if ( !pxPerigee ) continue; - // const float fTrkPt = pxPerigee->pT()*1.0e-3; - // const float fTrkPtErr = fabs( pxPerigee->localErrorMatrix().error(Trk::qOverP) ); - // const float fPtSig = ( 1.0f / pxPerigee->pT() ) / fTrkPtErr; // Potential problem. const float fTrkPhi = pxPerigee->parameters()[Trk::phi]; const float fTrkEta = pxPerigee->eta(); -- GitLab From cd4e4488cfba146a54279bad65ffe95dbe7586bb Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Wed, 4 Jul 2018 11:02:57 +0000 Subject: [PATCH 342/562] 22.0 coverity TRT_SeededTrackFinder Former-commit-id: a680369ef6e7f28126f6c0226c27bd2f6318a423 --- .../TRT_SeededTrackFinder.h | 61 ++++++++++--------- .../src/TRT_SeededTrackFinder.cxx | 38 +++--------- 2 files changed, 38 insertions(+), 61 deletions(-) diff --git a/InnerDetector/InDetRecAlgs/TRT_SeededTrackFinder/TRT_SeededTrackFinder/TRT_SeededTrackFinder.h b/InnerDetector/InDetRecAlgs/TRT_SeededTrackFinder/TRT_SeededTrackFinder/TRT_SeededTrackFinder.h index bbf642c16500..1452ffd95f62 100755 --- a/InnerDetector/InDetRecAlgs/TRT_SeededTrackFinder/TRT_SeededTrackFinder/TRT_SeededTrackFinder.h +++ b/InnerDetector/InDetRecAlgs/TRT_SeededTrackFinder/TRT_SeededTrackFinder/TRT_SeededTrackFinder.h @@ -14,12 +14,10 @@ #ifndef TRT_SeededTrackFinder_H #define TRT_SeededTrackFinder_H -#include <string> #include "AthenaBaseComps/AthAlgorithm.h" #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" -#include "InDetRecToolInterfaces/ITRT_SeededTrackFinder.h" ///Track Collection to store the tracks #include "TrkTrack/TrackCollection.h" @@ -35,9 +33,12 @@ #include "TrkExInterfaces/IExtrapolator.h" #include "InDetBeamSpotService/IBeamCondSvc.h" +#include "InDetRecToolInterfaces/ITRT_SeededTrackFinder.h" + class MsgStream; + namespace InDet { /** @@ -57,7 +58,7 @@ namespace InDet { public: /////////////////////////////////////////////////////////////////// - /** Standard Algotithm methods */ + /** Standard Algorithm methods */ /////////////////////////////////////////////////////////////////// TRT_SeededTrackFinder(const std::string &name, ISvcLocator *pSvcLocator); @@ -107,33 +108,33 @@ namespace InDet { double m_maxZImp; //!< maximal z impact parameter cut /** Global Counters for final algorithm statistics */ - int m_nTrtSeg ; /** Number of TRT segments to be investigated per event */ - int m_nTrtFailSel ; /** Number of TRT segments failing input selection */ - int m_nTrtSegGood ; /** Number of TRT segments that will be investigated per event */ - int m_nTrtLimit ; /** Number of TRT segments lost in busy events */ - int m_nTrtNoSiExt ; /** Number of TRT segments not extended in Si */ - int m_nExtCut ; /** Number of Si extensions failing cuts */ - int m_nBckTrkTrt ; /** Number of back tracks found without a Si extension per event */ - int m_nTrtExtCalls ; /** Number of times the TRT extension is called */ - int m_nTrtExt ; /** Number of good TRT extensions */ - int m_nTrtExtBad ; /** Number of shorter TRT extensions */ - int m_nTrtExtFail ; /** Number of failed TRT extensions */ - int m_nBckTrkSi ; /** Number of back tracks found with Si extension per event */ - int m_nBckTrk ; /** Number of back tracks found with or without Si extension per event */ - - int m_nTrtSegTotal ; /** Total number of TRT segments to be investigated */ - int m_nTrtFailSelTotal ; /** Total number of TRT segments failing input selection */ - int m_nTrtSegGoodTotal ; /** Total number of TRT segments that will be investigated */ - int m_nTrtLimitTotal ; /** Total number of TRT segments lost in busy events */ - int m_nTrtNoSiExtTotal ; /** Total number of TRT segments not extended in Si */ - int m_nExtCutTotal ; /** Total number of Si extensions failing cuts */ - int m_nBckTrkTrtTotal ; /** Total number of back tracks found without a Si extension */ - int m_nTrtExtCallsTotal; /** Total number of times the TRT extension is called */ - int m_nTrtExtTotal ; /** Total number of good TRT extensions */ - int m_nTrtExtBadTotal ; /** Total number of shorter TRT extensions */ - int m_nTrtExtFailTotal ; /** Total number of failed TRT extensions */ - int m_nBckTrkSiTotal ; /** Total number of back tracks found with Si extension */ - int m_nBckTrkTotal ; /** Total number of back tracks found with or without Si extension */ + int m_nTrtSeg{} ; /** Number of TRT segments to be investigated per event */ + int m_nTrtFailSel{} ; /** Number of TRT segments failing input selection */ + int m_nTrtSegGood{} ; /** Number of TRT segments that will be investigated per event */ + int m_nTrtLimit{} ; /** Number of TRT segments lost in busy events */ + int m_nTrtNoSiExt{} ; /** Number of TRT segments not extended in Si */ + int m_nExtCut{} ; /** Number of Si extensions failing cuts */ + int m_nBckTrkTrt{} ; /** Number of back tracks found without a Si extension per event */ + int m_nTrtExtCalls{} ; /** Number of times the TRT extension is called */ + int m_nTrtExt{} ; /** Number of good TRT extensions */ + int m_nTrtExtBad{} ; /** Number of shorter TRT extensions */ + int m_nTrtExtFail{} ; /** Number of failed TRT extensions */ + int m_nBckTrkSi{} ; /** Number of back tracks found with Si extension per event */ + int m_nBckTrk{} ; /** Number of back tracks found with or without Si extension per event */ + + int m_nTrtSegTotal{} ; /** Total number of TRT segments to be investigated */ + int m_nTrtFailSelTotal{} ; /** Total number of TRT segments failing input selection */ + int m_nTrtSegGoodTotal{} ; /** Total number of TRT segments that will be investigated */ + int m_nTrtLimitTotal{} ; /** Total number of TRT segments lost in busy events */ + int m_nTrtNoSiExtTotal{} ; /** Total number of TRT segments not extended in Si */ + int m_nExtCutTotal{} ; /** Total number of Si extensions failing cuts */ + int m_nBckTrkTrtTotal{} ; /** Total number of back tracks found without a Si extension */ + int m_nTrtExtCallsTotal{}; /** Total number of times the TRT extension is called */ + int m_nTrtExtTotal{} ; /** Total number of good TRT extensions */ + int m_nTrtExtBadTotal{} ; /** Total number of shorter TRT extensions */ + int m_nTrtExtFailTotal{} ; /** Total number of failed TRT extensions */ + int m_nBckTrkSiTotal{} ; /** Total number of back tracks found with Si extension */ + int m_nBckTrkTotal{} ; /** Total number of back tracks found with or without Si extension */ /////////////////////////////////////////////////////////////////// /** Protected methods */ diff --git a/InnerDetector/InDetRecAlgs/TRT_SeededTrackFinder/src/TRT_SeededTrackFinder.cxx b/InnerDetector/InDetRecAlgs/TRT_SeededTrackFinder/src/TRT_SeededTrackFinder.cxx index 50bc3a9c384a..dd8d04dc5cba 100755 --- a/InnerDetector/InDetRecAlgs/TRT_SeededTrackFinder/src/TRT_SeededTrackFinder.cxx +++ b/InnerDetector/InDetRecAlgs/TRT_SeededTrackFinder/src/TRT_SeededTrackFinder.cxx @@ -15,9 +15,8 @@ #include "GaudiKernel/MsgStream.h" #include "TRT_SeededTrackFinder/TRT_SeededTrackFinder.h" #include "TrkTrack/TrackInfo.h" -//#include "TrkParameters/MeasuredPerigee.h" -//#include "TrkParameters/MeasuredAtaStraightLine.h" #include "TrkPseudoMeasurementOnTrack/PseudoMeasurementOnTrack.h" + ///Needed for my scoring #include "InDetRIO_OnTrack/SiClusterOnTrack.h" @@ -84,52 +83,29 @@ StatusCode InDet::TRT_SeededTrackFinder::initialize() //Get the TRT seeded track maker tool // - if(m_trackmaker.retrieve().isFailure()) { - msg(MSG::FATAL) << "Could not get " << m_trackmaker << endmsg; return StatusCode::FAILURE; - }else{ - msg(MSG::INFO) << "Got track maker tool " << m_trackmaker << endmsg; - } + ATH_CHECK(m_trackmaker.retrieve()); //Get the refitting tool // if(m_doRefit){ - if(m_fitterTool.retrieve().isFailure()) { - msg(MSG::FATAL) << "Could not get " << m_fitterTool << endmsg; return StatusCode::FAILURE; - }else{ - msg(MSG::INFO) << "Got refitting tool " << m_fitterTool << endmsg; - } + ATH_CHECK(m_fitterTool.retrieve()); } else { m_fitterTool.disable(); } if (m_SiExtensionCuts) { // get extrapolator - sc = m_extrapolator.retrieve(); - if (sc.isFailure()) { - msg(MSG::FATAL) << "Failed to retrieve tool " << m_extrapolator << endmsg; - return StatusCode::FAILURE; - } else - msg(MSG::INFO) << "Retrieved tool " << m_extrapolator << endmsg; - + ATH_CHECK( m_extrapolator.retrieve()); // get beam spot service - sc = m_iBeamCondSvc.retrieve(); - if (sc.isFailure()) { - msg(MSG::INFO) << "Could not find BeamCondSvc." << endmsg; - return StatusCode::FAILURE; - } + ATH_CHECK( m_iBeamCondSvc.retrieve()); } else { m_extrapolator.disable(); } - // Get tool for track ectension to TRT + // Get tool for track extension to TRT // if(m_doExtension){ - if( m_trtExtension.retrieve().isFailure()) { - msg(MSG::FATAL)<< "Could not get " << m_trtExtension << endmsg; return StatusCode::FAILURE; - } - else { - msg(MSG::INFO) << "Retrieved tool " << m_trtExtension << endmsg; - } + ATH_CHECK( m_trtExtension.retrieve()); } else { m_trtExtension.disable(); } -- GitLab From 054425b5196c38b901159618084173b13efba5ae Mon Sep 17 00:00:00 2001 From: Knut Zoch <knut.zoch@cern.ch> Date: Wed, 4 Jul 2018 13:08:56 +0200 Subject: [PATCH 343/562] Removing last traces of KLFitter from atlas/athena Former-commit-id: 6eac3ac2584a3c3d03b2f4b8c2743285e14c4512 --- Projects/AnalysisTop/package_filters.txt | 1 - Projects/Athena/package_filters.txt | 1 - 2 files changed, 2 deletions(-) diff --git a/Projects/AnalysisTop/package_filters.txt b/Projects/AnalysisTop/package_filters.txt index a68258ed3d5d..19f0bfb9a080 100644 --- a/Projects/AnalysisTop/package_filters.txt +++ b/Projects/AnalysisTop/package_filters.txt @@ -90,7 +90,6 @@ # Packages to build as part of AnalysisTop: # + PhysicsAnalysis/UpgradePhys/SmearingFunctions/UpgradePerformanceFunctions -+ PhysicsAnalysis/TopPhys/KLFitter + PhysicsAnalysis/TopPhys/TopPhysUtils/TopDataPreparation + PhysicsAnalysis/TopPhys/xAOD/TopAnalysis + PhysicsAnalysis/TopPhys/xAOD/TopCPTools diff --git a/Projects/Athena/package_filters.txt b/Projects/Athena/package_filters.txt index 0e88a9521dfa..b73ebf5097ee 100644 --- a/Projects/Athena/package_filters.txt +++ b/Projects/Athena/package_filters.txt @@ -42,7 +42,6 @@ - PhysicsAnalysis/SUSYPhys/SUSYTools - PhysicsAnalysis/TauID/DiTauMassTools #- PhysicsAnalysis/TauID/TauCorrUncert #no CMakeLists.txt file -- PhysicsAnalysis/TopPhys/KLFitter - PhysicsAnalysis/TopPhys/QuickAna - PhysicsAnalysis/TopPhys/TopPhysUtils/.* - PhysicsAnalysis/TopPhys/xAOD/.* -- GitLab From 49bb2f2dd61359594b8b4cc7da4cf2a054044f86 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Wed, 4 Jul 2018 11:50:14 +0000 Subject: [PATCH 344/562] 22.0 coverity InDetV0Finder Former-commit-id: aee7c19ea13ec1d810863adbdae8fa3ed3442e4d --- .../InDetV0Finder/InDetV0FinderTool.h | 15 ++++-- .../InDetV0Finder/src/InDetV0Finder.cxx | 48 +++++++++++++++---- .../InDetV0Finder/src/InDetV0Finder.h | 18 ++++--- .../InDetV0Finder/src/InDetV0FinderTool.cxx | 8 +++- 4 files changed, 68 insertions(+), 21 deletions(-) diff --git a/InnerDetector/InDetRecAlgs/InDetV0Finder/InDetV0Finder/InDetV0FinderTool.h b/InnerDetector/InDetRecAlgs/InDetV0Finder/InDetV0Finder/InDetV0FinderTool.h index 380e18d43130..9e062193f48f 100755 --- a/InnerDetector/InDetRecAlgs/InDetV0Finder/InDetV0Finder/InDetV0FinderTool.h +++ b/InnerDetector/InDetRecAlgs/InDetV0Finder/InDetV0Finder/InDetV0FinderTool.h @@ -17,11 +17,10 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" -#include "HepPDT/ParticleDataTable.hh" -#include "InDetConversionFinderTools/InDetConversionFinderTools.h" +#include "InDetConversionFinderTools/InDetConversionFinderTools.h" //why needed? #include "AthContainers/DataVector.h" -#include "ITrackToVertex/ITrackToVertex.h" -#include "xAODTracking/VertexContainer.h" +#include "xAODTracking/VertexContainerFwd.h" +#include "xAODTracking/VertexAuxContainer.h" #include "xAODTracking/TrackParticleContainer.h" /** @@ -79,12 +78,20 @@ namespace Trk class V0Tools; class IExtrapolator; class ITrackSelectorTool; +} + +namespace HepPDT{ class ParticleDataTable; } +namespace Reco{ + class ITrackToVertex; +} + namespace InDet { class VertexPointEstimator; + class ConversionFinderUtils; static const InterfaceID IID_InDetV0FinderTool("InDetV0FinderTool", 1, 0); diff --git a/InnerDetector/InDetRecAlgs/InDetV0Finder/src/InDetV0Finder.cxx b/InnerDetector/InDetRecAlgs/InDetV0Finder/src/InDetV0Finder.cxx index 2c84d29c40b3..5f948f8c2bd8 100755 --- a/InnerDetector/InDetRecAlgs/InDetV0Finder/src/InDetV0Finder.cxx +++ b/InnerDetector/InDetRecAlgs/InDetV0Finder/src/InDetV0Finder.cxx @@ -22,8 +22,10 @@ #include "xAODTracking/VertexContainer.h" #include "xAODTracking/VertexAuxContainer.h" #include "TrkVertexAnalysisUtils/V0Tools.h" +#include "InDetV0Finder/InDetV0FinderTool.h" #include "GaudiKernel/IPartPropSvc.h" #include "StoreGate/WriteDecorHandle.h" +#include "HepPDT/ParticleDataTable.hh" #include <vector> #include <cmath> @@ -194,6 +196,7 @@ StatusCode InDetV0Finder::initialize() return StatusCode::SUCCESS; } + StatusCode InDetV0Finder::execute() { @@ -229,26 +232,53 @@ StatusCode InDetV0Finder::execute() ATH_CHECK( m_v0FinderTool->performSearch(v0Container, v0AuxContainer, ksContainer, ksAuxContainer, laContainer, laAuxContainer, - lbContainer, lbAuxContainer, + lbContainer, lbAuxContainer, primaryVertex, importedVxContainer) ); + + auto cleanUpOnExit= [&](){ + delete v0Container; + delete v0AuxContainer; + delete ksContainer; + delete ksAuxContainer; + delete laContainer; + delete laAuxContainer; + delete lbContainer; + delete lbAuxContainer; + }; //---- Recording section: write the results to StoreGate ---// SG::WriteHandle<xAOD::VertexContainer> h_V0( m_v0Key ); - ATH_CHECK( h_V0.record(std::unique_ptr<xAOD::VertexContainer>(v0Container), - std::unique_ptr<xAOD::VertexAuxContainer>(v0AuxContainer)) ); + if ( h_V0.record(std::unique_ptr<xAOD::VertexContainer>(v0Container), + std::unique_ptr<xAOD::VertexAuxContainer>(v0AuxContainer)) !=StatusCode::SUCCESS){ + ATH_MSG_ERROR("Storegate record of v0Container failed."); + cleanUpOnExit(); + return StatusCode::FAILURE; + } SG::WriteHandle<xAOD::VertexContainer> h_Ks( m_ksKey ); - ATH_CHECK( h_Ks.record(std::unique_ptr<xAOD::VertexContainer>(ksContainer), - std::unique_ptr<xAOD::VertexAuxContainer>(ksAuxContainer)) ); + if ( h_Ks.record(std::unique_ptr<xAOD::VertexContainer>(ksContainer), + std::unique_ptr<xAOD::VertexAuxContainer>(ksAuxContainer)) != StatusCode::SUCCESS){ + ATH_MSG_ERROR("Storegate record of ksContainer failed."); + cleanUpOnExit(); + return StatusCode::FAILURE; + } SG::WriteHandle<xAOD::VertexContainer> h_La( m_laKey ); - ATH_CHECK( h_La.record(std::unique_ptr<xAOD::VertexContainer>(laContainer), - std::unique_ptr<xAOD::VertexAuxContainer>(laAuxContainer)) ); + if( h_La.record(std::unique_ptr<xAOD::VertexContainer>(laContainer), + std::unique_ptr<xAOD::VertexAuxContainer>(laAuxContainer)) != StatusCode::SUCCESS){ + ATH_MSG_ERROR("Storegate record of laContainer failed."); + cleanUpOnExit(); + return StatusCode::FAILURE; + } SG::WriteHandle<xAOD::VertexContainer> h_Lb( m_lbKey ); - ATH_CHECK(h_Lb.record(std::unique_ptr<xAOD::VertexContainer>(lbContainer), - std::unique_ptr<xAOD::VertexAuxContainer>(lbAuxContainer)) ); + if(h_Lb.record(std::unique_ptr<xAOD::VertexContainer>(lbContainer), + std::unique_ptr<xAOD::VertexAuxContainer>(lbAuxContainer)) != StatusCode::SUCCESS){ + ATH_MSG_ERROR("Storegate record of lbContainer failed."); + cleanUpOnExit(); + return StatusCode::FAILURE; + } if (m_decorate) { SG::WriteDecorHandle<xAOD::VertexContainer, float> decorKsMass(m_decorKsMass); diff --git a/InnerDetector/InDetRecAlgs/InDetV0Finder/src/InDetV0Finder.h b/InnerDetector/InDetRecAlgs/InDetV0Finder/src/InDetV0Finder.h index d59d9a929f1b..add05480cb28 100755 --- a/InnerDetector/InDetRecAlgs/InDetV0Finder/src/InDetV0Finder.h +++ b/InnerDetector/InDetRecAlgs/InDetV0Finder/src/InDetV0Finder.h @@ -6,7 +6,7 @@ InDetV0Finder.h - Description ------------------- begin : 20-07-2005 - authors : Evelina Bouhova-Thacker (Lancater University), Rob Henderson (Lancater University) + authors : Evelina Bouhova-Thacker (Lancaster University), Rob Henderson (Lancater University) email : e.bouhova@cern.ch, r.henderson@lancaster.ac.uk changes : @@ -17,8 +17,9 @@ #include "AthenaBaseComps/AthAlgorithm.h" #include "GaudiKernel/ToolHandle.h" -#include "InDetV0Finder/InDetV0FinderTool.h" -#include "HepPDT/ParticleDataTable.hh" +#include "xAODTracking/VertexContainerFwd.h" + + /** @class InDetV0Finder @@ -30,18 +31,20 @@ /* Forward declarations */ -namespace Trk -{ +namespace Trk{ class V0Tools; +} + +namespace HepPDT{ class ParticleDataTable; } namespace InDet { class VertexPointEstimator; - + class InDetV0FinderTool; + class InDetV0Finder : public AthAlgorithm - { public: InDetV0Finder(const std::string &name, ISvcLocator *pSvcLocator); @@ -50,6 +53,7 @@ namespace InDet StatusCode execute(); StatusCode finalize(); StatusCode resetStatistics(); + protected: // input primary vertices diff --git a/InnerDetector/InDetRecAlgs/InDetV0Finder/src/InDetV0FinderTool.cxx b/InnerDetector/InDetRecAlgs/InDetV0Finder/src/InDetV0FinderTool.cxx index 85e8f424b5e0..773b0f70475b 100755 --- a/InnerDetector/InDetRecAlgs/InDetV0Finder/src/InDetV0FinderTool.cxx +++ b/InnerDetector/InDetRecAlgs/InDetV0Finder/src/InDetV0FinderTool.cxx @@ -27,15 +27,21 @@ #include "TrkToolInterfaces/ITrackSelectorTool.h" #include "InDetConversionFinderTools/VertexPointEstimator.h" -#include "InDetConversionFinderTools/InDetConversionFinderTools.h" #include "InDetConversionFinderTools/ConversionFinderUtils.h" +#include "ITrackToVertex/ITrackToVertex.h" + + #include "GaudiKernel/IPartPropSvc.h" #include "CLHEP/GenericFunctions/CumulativeChiSquare.hh" // for chi2prob calculation #include "xAODTracking/TrackingPrimitives.h" #include "InDetBeamSpotService/IBeamCondSvc.h" +#include "HepPDT/ParticleDataTable.hh" +#include "xAODTracking/VertexContainer.h" + + #include <vector> #include <cmath> -- GitLab From d6297fb5815909b69d2c0573794671cb028d9009 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Wed, 4 Jul 2018 14:04:32 +0200 Subject: [PATCH 345/562] Remoed unneded flag. Proper file name. Former-commit-id: d228ce604ccbafce5bb4104179149afd1f9732a1 --- Control/AthenaConfiguration/python/AllConfigFlags.py | 2 +- .../python/{NewTriggerFlags.py => TriggerConfigFlags.py} | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) rename Trigger/TriggerCommon/TriggerJobOpts/python/{NewTriggerFlags.py => TriggerConfigFlags.py} (97%) diff --git a/Control/AthenaConfiguration/python/AllConfigFlags.py b/Control/AthenaConfiguration/python/AllConfigFlags.py index dbf7451ac3e1..608f1e5ace77 100644 --- a/Control/AthenaConfiguration/python/AllConfigFlags.py +++ b/Control/AthenaConfiguration/python/AllConfigFlags.py @@ -49,7 +49,7 @@ def _createCfgFlags(): # Trigger - from TriggerJobOpts.NewTriggerFlags import createTriggerFlags + from TriggerJobOpts.TriggerConfigFlags import createTriggerFlags acf.join( createTriggerFlags() ) diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/NewTriggerFlags.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py similarity index 97% rename from Trigger/TriggerCommon/TriggerJobOpts/python/NewTriggerFlags.py rename to Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py index 1c6fe6eadb39..f26ca4e3d690 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/NewTriggerFlags.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py @@ -104,9 +104,6 @@ def createTriggerFlags(): # trigger reconstruction - # controls track extension tool setting (not sure we can handle it via this flag now, should it be moved to Trigger.InDet?) - flags.addFlag('Trigger.id.useOfflineSpacePoints', False) - # enables the correction for pileup in cell energy calibration (should it be moved to some place where other calo flags are defined?) flags.addFlag('Trigger.calo.doOffsetCorrection', True ) -- GitLab From 1bd93d80ba121b360571209433380d1dbd7b84c7 Mon Sep 17 00:00:00 2001 From: Jovan Mitrevski <Jovan.Mitrevski@cern.ch> Date: Wed, 4 Jul 2018 14:21:51 +0200 Subject: [PATCH 346/562] Fixing egammaMVASvc and egammaMVACalibTool to compile Former-commit-id: 962a83c4b4a0c0b8e088d857cec830949a556b67 --- .../egammaInterfaces/IegammaMVACalibTool.h | 4 + .../egamma/egammaMVACalib/CMakeLists.txt | 2 +- .../egammaMVACalib/src/egammaMVACalibTool.cxx | 73 +++++----- .../egammaMVACalib/src/egammaMVACalibTool.h | 12 +- .../egammaMVACalib/src/egammaMVASvc.cxx | 135 +++++------------- .../egamma/egammaMVACalib/src/egammaMVASvc.h | 2 +- 6 files changed, 92 insertions(+), 136 deletions(-) diff --git a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVACalibTool.h b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVACalibTool.h index 11adfca7b11b..9b8bc9f03392 100644 --- a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVACalibTool.h +++ b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVACalibTool.h @@ -6,6 +6,10 @@ #include "GaudiKernel/IAlgTool.h" +// EDM includes +#include "xAODEgamma/EgammaFwd.h" +#include "xAODCaloEvent/CaloClusterFwd.h" + /** * @class IegammaMVACalibTool * @brief A tool used by the egammaMVASvc to help manage the MVAs. diff --git a/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt b/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt index 343bdc607fa6..bdb7b3b17405 100644 --- a/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt +++ b/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt @@ -46,7 +46,7 @@ atlas_add_library( egammaMVACalibLib if( NOT XAOD_STANDALONE ) atlas_add_component( egammaMVACalib src/*.cxx src/components/*.cxx - LINK_LIBRARIES GaudiKernel egammaMVACalibLib ) + LINK_LIBRARIES GaudiKernel egammaMVACalibLib PathResolver MVAUtils ) endif() atlas_add_dictionary( egammaMVACalibDict diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx index e42752585c7c..9a846aad8fb0 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx @@ -5,10 +5,9 @@ #include "egammaMVACalibTool.h" #include "egammaMVACalib/egammaMVALayerDepth.h" -#include "egammaMVACalib/egammaMVATreeHelper.h" -#include "MVAUtils/BDT.h" +#include "egammaMVACalib/egammaMVATreeHelpers.h" #include "PathResolver/PathResolver.h" -#include "xAODEgamma/PhotonAODHelpers.h" +#include "xAODEgamma/PhotonxAODHelpers.h" #include "TFile.h" @@ -41,15 +40,15 @@ StatusCode egammaMVACalibTool::initialize() switch (m_particleType) { case xAOD::EgammaParameters::electron: ATH_CHECK(initializeElectronFuncs()); - ATH_CHECK(setupBDT(PathResolverFindCalibFile(folder + "/MVACalib_electron.weights.root"))); + ATH_CHECK(setupBDT(PathResolverFindCalibFile(m_folder + "/MVACalib_electron.weights.root"))); break; - case xAOD::EgammaParameters::uncovertedPhoton: + case xAOD::EgammaParameters::unconvertedPhoton: ATH_CHECK(initializeUnconvertedPhotonFuncs()); - ATH_CHECK(setupBDT(PathResolverFindCalibFile(folder + "/MVACalib_unconvertedPhoton.weights.root"))); + ATH_CHECK(setupBDT(PathResolverFindCalibFile(m_folder + "/MVACalib_unconvertedPhoton.weights.root"))); break; - case xAOD::EgammaParameters::covertedPhoton: + case xAOD::EgammaParameters::convertedPhoton: ATH_CHECK(initializeConvertedPhotonFuncs()); - ATH_CHECK(setupBDT(PathResolverFindCalibFile(folder + "/MVACalib_convertedPhoton.weights.root"))); + ATH_CHECK(setupBDT(PathResolverFindCalibFile(m_folder + "/MVACalib_convertedPhoton.weights.root"))); break; default: ATH_MSG_FATAL("Particle type not set properly: " << m_particleType); @@ -64,27 +63,27 @@ StatusCode egammaMVACalibTool::finalize() return StatusCode::SUCCESS; } -StatusCode egammmMVACalibTool::setupBDT(std::string fileName) +StatusCode egammaMVACalibTool::setupBDT(std::string fileName) { - std::unique_ptr<TFile> f(TFile::Open(fileName)); + std::unique_ptr<TFile> f(TFile::Open(fileName.c_str())); if (!f || f->IsZombie() ) { ATH_MSG_FATAL("Could not open file: " << fileName); return StatusCode::FAILURE; } // Load hPoly - TH2Poly *hPoly = nullPtr; + TH2Poly *hPoly = nullptr; f->GetObject("hPoly", hPoly); if (!hPoly) { ATH_MSG_FATAL("Could not find hPoly"); return StatusCode::FAILURE; } - m_hPoly = hPoly->Clone(); + m_hPoly.reset(static_cast<TH2Poly*>(hPoly->Clone())); m_hPoly->SetDirectory(0); // Load variables - TObjArray *variablesTmp = nullPtr; + TObjArray *variablesTmp = nullptr; f->GetObject("variables", variablesTmp); if (!variablesTmp) { ATH_MSG_FATAL("Could not find variables"); @@ -94,7 +93,7 @@ StatusCode egammmMVACalibTool::setupBDT(std::string fileName) variables->SetOwner(); // to delete the objects when d-tor is called // Load shifts - TObjArray *shiftsTmp = nullPtr; + TObjArray *shiftsTmp = nullptr; f->GetObject("shifts", shiftsTmp); if (!shiftsTmp) { ATH_MSG_FATAL("Could not find shifts"); @@ -104,7 +103,7 @@ StatusCode egammmMVACalibTool::setupBDT(std::string fileName) shifts->SetOwner(); // to delete the objects when d-tor is called // Load trees - TObjArray *treesTmp = nullPtr; + TObjArray *treesTmp = nullptr; std::unique_ptr<TObjArray> trees; f->GetObject("trees", treesTmp); if (treesTmp) { @@ -140,7 +139,6 @@ StatusCode egammmMVACalibTool::setupBDT(std::string fileName) TIter nextShift(shifts.get()); for (int i=0; (tree = (TTree*) nextTree()) && ((TObjString*) nextVariables()); ++i) { - BDT *bdt = new BDT(tree); m_BDTs.emplace_back(tree); std::vector<std::function<float(const xAOD::Egamma*, const xAOD::CaloCluster*)> > funcs; @@ -154,13 +152,13 @@ StatusCode egammmMVACalibTool::setupBDT(std::string fileName) const TString& varName = getString(str2); if (!varName.Length()) { ATH_MSG_FATAL("There was an empty variable name!"); - return StatusCode::FATAL; + return StatusCode::FAILURE; } try { - funcs.push_back(m_funcsLibrary.at(varName)); + funcs.push_back(m_funcLibrary.at(varName.Data())); } catch(const std::out_of_range& e) { ATH_MSG_FATAL("Could not find formula for variable " << varName << ", error: " << e.what()); - return StatusCode::FATAL; + return StatusCode::FAILURE; } } m_funcs.push_back(std::move(funcs)); @@ -175,11 +173,13 @@ StatusCode egammmMVACalibTool::setupBDT(std::string fileName) } -StatusCode egammmMVACalibTool::initializeElectronFuncs() +StatusCode egammaMVACalibTool::initializeElectronFuncs() { ATH_CHECK(initializeClusterFuncs("el")); ATH_CHECK(initializeEgammaFuncs("el")); + using namespace egammaMVATreeHelpers; + m_funcLibrary["el_charge"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return compute_el_charge(*(static_cast<const xAOD::Electron*>(eg))); }; m_funcLibrary["el_tracketa"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) @@ -194,7 +194,7 @@ StatusCode egammmMVACalibTool::initializeElectronFuncs() return StatusCode::SUCCESS; } -StatusCode egammmMVACalibTool::initializeUnconvertedPhotonFuncs() +StatusCode egammaMVACalibTool::initializeUnconvertedPhotonFuncs() { ATH_CHECK(initializeClusterFuncs("ph")); ATH_CHECK(initializeEgammaFuncs("ph")); @@ -202,7 +202,7 @@ StatusCode egammmMVACalibTool::initializeUnconvertedPhotonFuncs() return StatusCode::SUCCESS; } -StatusCode egammmMVACalibTool::initializeConvertedPhotonFuncs() +StatusCode egammaMVACalibTool::initializeConvertedPhotonFuncs() { ATH_CHECK(initializeClusterFuncs("ph")); ATH_CHECK(initializeEgammaFuncs("ph")); @@ -238,8 +238,11 @@ StatusCode egammmMVACalibTool::initializeConvertedPhotonFuncs() return StatusCode::SUCCESS; } -StatusCode egammmMVACalibTool::initializeClusterFuncs(const std::string& prefix) +StatusCode egammaMVACalibTool::initializeClusterFuncs(const std::string& prefix) { + + using namespace egammaMVATreeHelpers; + m_funcLibrary[prefix + "_cl_eta"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return compute_cl_eta(*cl); }; m_funcLibrary[prefix + "_cl_phi"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) @@ -251,7 +254,7 @@ StatusCode egammmMVACalibTool::initializeClusterFuncs(const std::string& prefix) m_funcLibrary[prefix + "_cl_phiCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return compute_cl_phiCalo(*cl); }; m_funcLibrary[prefix + "_cl_E_TileGap3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return cl.eSample(CaloSampling::TileGap3); }; + { return cl->eSample(CaloSampling::TileGap3); }; if (m_use_layer_corrected) { m_funcLibrary[prefix + "_rawcl_Es0"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) @@ -282,7 +285,7 @@ StatusCode egammmMVACalibTool::initializeClusterFuncs(const std::string& prefix) return StatusCode::SUCCESS; } -StatusCode egammmMVACalibTool::initializeEgammaFuncs(const std::string& prefix) +StatusCode egammaMVACalibTool::initializeEgammaFuncs(const std::string& prefix) { m_funcLibrary[prefix + "_e011"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::e011); }; @@ -374,15 +377,17 @@ StatusCode egammmMVACalibTool::initializeEgammaFuncs(const std::string& prefix) return StatusCode::SUCCESS; } -const TString& egammaMVACalibTools::getString(TObject* obj) const +const TString& egammaMVACalibTool::getString(TObject* obj) const { TObjString *objS = dynamic_cast<TObjString*>(obj); - if (!objS) return TString(); + if (!objS) { + throw std::runtime_error("egammaMVACalibTool::getString was passed something that was not a string object"); + } return objS->GetString(); } -float egammaMVACalibTools::getEnergy(const xAOD::Egamma* eg, - const xAOD::CaloCluster* clus) const +float egammaMVACalibTool::getEnergy(const xAOD::Egamma* eg, + const xAOD::CaloCluster* clus) const { if (!clus && eg) { @@ -390,7 +395,7 @@ float egammaMVACalibTools::getEnergy(const xAOD::Egamma* eg, } if (!clus) { ATH_MSG_FATAL("The cluster pointer must not be null!"); - throw std::runtime_error("egammaMVACalibTools::getEnergy called with a null cluster"); + throw std::runtime_error("egammaMVACalibTool::getEnergy called with a null cluster"); return 0.0; } @@ -422,7 +427,7 @@ float egammaMVACalibTools::getEnergy(const xAOD::Egamma* eg, // what to do if the MVA response is 0; if (mvaOutput == 0.) { if (m_clusterEif0) { - return clus->E(); + return clus->e(); } else { return 0.; } @@ -430,11 +435,11 @@ float egammaMVACalibTools::getEnergy(const xAOD::Egamma* eg, // calcluate the unshifted energy const auto energy = (m_calibrationType == fullCalibration) ? - mvaOutput : (initialEnergy * mvaOutput); + mvaOutput : (initEnergy * mvaOutput); ATH_MSG_DEBUG("energy after MVA = " << energy); - if (shift_type == NSHIFT) { + if (m_shiftType == NOSHIFT) { // if no shift, just return the unshifted energy return energy; } @@ -443,7 +448,7 @@ float egammaMVACalibTools::getEnergy(const xAOD::Egamma* eg, const auto etGeV = (energy / std::cosh(clus->eta())) / CLHEP::GeV; // evaluate the TFormula associated with the bin - const auto shift = m_shifts[bin]->Eval(etGeV); + const auto shift = m_shifts[bin].Eval(etGeV); ATH_MSG_DEBUG("shift = " << shift); if (shift > 0.5) { return energy / shift; diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h index 65af87203872..6b6ca9d09ebe 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h @@ -10,12 +10,14 @@ #include "xAODEgamma/Electron.h" #include "xAODEgamma/Photon.h" #include "xAODCaloEvent/CaloCluster.h" +#include "MVAUtils/BDT.h" // Framework includes #include "AthenaBaseComps/AthAlgTool.h" #include "TH2Poly.h" #include "TObject.h" -#inlcude "TString.h" +#include "TString.h" +#include "TFormula.h" // STL includes #include <string> @@ -82,7 +84,7 @@ private: std::vector<std::vector<std::function<float(const xAOD::Egamma*, const xAOD::CaloCluster*)> > > m_funcs; /// shifts for mean10 - std::vector<TFormula> > m_shifts; + std::vector<TFormula> m_shifts; /// A dictionary of all available functions @@ -102,9 +104,11 @@ private: /// a function called by the above functions to setup the egamma funcs StatusCode initializeEgammaFuncs(const std::string& prefix); - /// a utility to get a TString out of an TObjString pointer - const TString& egammaMVACalibTools::getString(TObject* obj) const + /// a function called by initialize to setup the BDT, funcs, and shifts. + StatusCode setupBDT(std::string fileName); + /// a utility to get a TString out of an TObjString pointer + const TString& getString(TObject* obj) const; }; diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx index 4a123c6d848b..70393c5948dc 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx @@ -42,10 +42,23 @@ StatusCode egammaMVASvc::execute(xAOD::CaloCluster* cluster, const xAOD::Egamma* eg) const { if (!eg || !cluster) { - ATH_MSG_ERROR("Invalid Pointer to egamma or cluster object"); + ATH_MSG_FATAL("Invalid Pointer to egamma or cluster object"); + return StatusCode::FAILURE; + } + + float mvaE = 0.0; + + if (xAOD::EgammaHelpers::isElectron(eg)) { + mvaE = m_mvaElectron->getEnergy(eg, cluster); + } else if (xAOD::EgammaHelpers::isConvertedPhoton(eg)) { + mvaE = m_mvaConvertedPhoton->getEnergy(eg, cluster); + } else if (xAOD::EgammaHelpers::isPhoton(eg)) { + mvaE = m_mvaUnconvertedPhoton->getEnergy(eg, cluster); + } else { + ATH_MSG_FATAL("Egamma object is of unsupported type"); return StatusCode::FAILURE; } - double mvaE = getEnergy(cluster, eg); + ATH_MSG_DEBUG( "Calculated MVA calibrated energy = " << mvaE ); if (mvaE > eg->m()) { cluster->setCalE(mvaE); @@ -65,12 +78,29 @@ StatusCode egammaMVASvc::execute(xAOD::CaloCluster* cluster, ATH_MSG_ERROR("Invalid Pointer to egamma or cluster object"); return StatusCode::FAILURE; } - double mvaE = getEnergy(cluster, egType); + float mvaE = 0.0; + switch (egType) { + case xAOD::EgammaParameters::electron: + mvaE = m_mvaElectron->getEnergy(nullptr, cluster); + break; + case xAOD::EgammaParameters::convertedPhoton: + mvaE = m_mvaConvertedPhoton->getEnergy(nullptr, cluster); + break; + case xAOD::EgammaParameters::unconvertedPhoton: + mvaE = m_mvaUnconvertedPhoton->getEnergy(nullptr, cluster); + break; + default: + ATH_MSG_FATAL("Egamma object is of unsupported type"); + return StatusCode::FAILURE; + } + ATH_MSG_DEBUG( "Calculated MVA calibrated energy = " << mvaE ); if (mvaE > 0) { cluster->setCalE(mvaE); } else { + ATH_MSG_DEBUG("MVA energy (" << mvaE << ") < 0, setting e = cluster energy (" + << cluster->e() << ")"); cluster->setCalE(cluster->e()); } return StatusCode::SUCCESS; @@ -78,100 +108,13 @@ StatusCode egammaMVASvc::execute(xAOD::CaloCluster* cluster, StatusCode egammaMVASvc::hltexecute(xAOD::CaloCluster* cluster, const std::string& egType) const { - if(!cluster){ - ATH_MSG_ERROR("Invalid Pointer to cluster object"); + if (egType == "Electron") { + return execute(cluster, xAOD::EgammaParameters::electron); + } else if (egType == "Photon"){ + return execute(cluster, xAOD::EgammaParameters::unconvertedPhoton); + } else { + ATH_MSG_FATAL("The egType string is not Electron or Photon: " << egType); return StatusCode::FAILURE; } - double mvaE = getEnergy(cluster, egType); - ATH_MSG_DEBUG( "Calculated MVA calibrated energy = " << mvaE ); - if(mvaE > 0){ - cluster->setCalE(mvaE); - } - else{ - cluster->setCalE(cluster->e()); - } return StatusCode::SUCCESS; } - -float egammaMVASvc::getEnergy(const xAOD::CaloCluster* cluster, - const xAOD::Egamma* eg){ - ATH_MSG_DEBUG("In execute..."); - // Check for errors... - if ( !eg ){ - ATH_MSG_WARNING("no xAOD::Egamma object provided"); - return 0; - } - if( eg->type() == xAOD::Type::Electron ){ - ATH_MSG_DEBUG("Processing for electron"); - return getEnergy(cluster, static_cast<const xAOD::Electron*>(eg)); - } - else if (eg->type() == xAOD::Type::Photon ){ - ATH_MSG_DEBUG("Processing for photon"); - // this is because topo seeded electron (author == 128) have cluster in - // another collection, which is not decorated with etaCalo, m_cl_phiCalo - // needed by the MVA calibration - // TODO: make more general: no input -> no MVA - if (eg->author() == 128) { return cluster->e(); } - - return getEnergy(cluster, static_cast<const xAOD::Photon*>(eg)); - } - else{ - ATH_MSG_INFO("Unknown Type"); - } - return 0; -} - - -float egammaMVASvc::getEnergy(const xAOD::CaloCluster* cluster, - const std::string& egType){ - // Check for errors... - if ( !cluster ){ - ATH_MSG_WARNING("no xAOD::CaloCluster object provided"); - return 0; - } - if (egType == "Electron") { - ATH_MSG_DEBUG("Processing for type electron"); - m_MVATreeElectron->update(nullptr, cluster); - return m_mvaElectron->getMVAEnergy(); - } - else if(egType == "Photon"){ - ATH_MSG_DEBUG("Processing for type photon"); - m_MVATreePhoton->update(nullptr, cluster); - return m_mvaPhoton->getMVAEnergy(); - } - else { - ATH_MSG_WARNING("Unknown particle type"); - } - return 0; -} - -float egammaMVASvc::getEnergy(const xAOD::CaloCluster* cluster, - const xAOD::EgammaParameters::EgammaType egType){ - return ( (egType==xAOD::EgammaParameters::electron) ? - getEnergy(cluster, "Electron") : - getEnergy(cluster, "Photon")); -} - - -float egammaMVASvc::getEnergy(const xAOD::CaloCluster* cluster, - const xAOD::Electron* el){ - if(!el){ - ATH_MSG_ERROR("No electron passed"); - return 0; - } - ATH_MSG_DEBUG("updating variables electron"); - m_MVATreeElectron->update(el, cluster); - return m_mvaElectron->getMVAEnergy(); -} - -float egammaMVASvc::getEnergy(const xAOD::CaloCluster* cluster, - const xAOD::Photon* ph){ - if(!ph){ - ATH_MSG_ERROR("No photon passed"); - return 0; - } - ATH_MSG_DEBUG("updating variables photon"); - m_MVATreePhoton->update(ph, cluster); - return m_mvaPhoton->getMVAEnergy(); -} - diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h index 2fc9df281e0d..54719dddfb52 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h @@ -42,7 +42,7 @@ public: const xAOD::EgammaParameters::EgammaType egType) const override final; StatusCode hltexecute(xAOD::CaloCluster* cluster, - const std::string& egType) override final; + const std::string& egType) const override final; private: -- GitLab From 8fa10e07d0f729fd6a65ea2378020cf0dde6a4fc Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Wed, 4 Jul 2018 14:32:17 +0200 Subject: [PATCH 347/562] Added debug messages protection Former-commit-id: 9c8a5e8ea43a4afec4074356b72380fb1734e9ef --- .../TrigSteer/L1Decoder/src/JRoIsUnpackingTool.cxx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.cxx b/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.cxx index 8e2456caad5c..9ab8136e2d2b 100644 --- a/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.cxx +++ b/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.cxx @@ -62,8 +62,11 @@ StatusCode JRoIsUnpackingTool::unpack( const EventContext& ctx, addChainsToDecision( thresholdChainsPair.first, fsDecision, activeChains ); } ATH_MSG_DEBUG( "Stored " << decisionIDs( fsDecision ).size() << " decision in FS RoI" ); - for ( auto chain : decisionIDs( fsDecision ) ) { - ATH_MSG_DEBUG( "Chain decision stored for FS RoI " << HLT::Identifier( chain ) ); + + if ( msgLvl(MSG::DEBUG) ) { + for ( auto chain : decisionIDs( fsDecision ) ) { + ATH_MSG_DEBUG( "Chain decision stored for FS RoI " << HLT::Identifier( chain ) ); + } } @@ -106,9 +109,12 @@ StatusCode JRoIsUnpackingTool::unpack( const EventContext& ctx, decision->setObjectLink( "initialRecRoI", ElementLink<DataVector<LVL1::RecJetRoI>>( m_recRoIsKey.key(), recRoIs->size()-1 ) ); } } - for ( auto roi: *trigRoIs ) { - ATH_MSG_DEBUG( "RoI Eta: " << roi->eta() << " Phi: " << roi->phi() << " RoIWord: " << roi->roiWord() ); + if ( msgLvl(MSG::DEBUG) ) { + for ( auto roi: *trigRoIs ) { + ATH_MSG_DEBUG( "RoI Eta: " << roi->eta() << " Phi: " << roi->phi() << " RoIWord: " << roi->roiWord() ); + } } + // monitoring { using namespace Monitored; -- GitLab From d9bbe30a8c5b2b527fd28bf729f8b6caba004e58 Mon Sep 17 00:00:00 2001 From: Jovan Mitrevski <Jovan.Mitrevski@cern.ch> Date: Wed, 4 Jul 2018 15:05:35 +0200 Subject: [PATCH 348/562] egammaMVACalibTool now frees functions library after initialize to save memory Former-commit-id: 98bff55a336aede0db6ec5da65576e220d1320eb --- .../egammaMVACalib/src/egammaMVACalibTool.cxx | 199 ++++++++++-------- .../egammaMVACalib/src/egammaMVACalibTool.h | 32 ++- 2 files changed, 132 insertions(+), 99 deletions(-) diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx index 9a846aad8fb0..be07a9e1283b 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx @@ -34,21 +34,29 @@ StatusCode egammaMVACalibTool::initialize() ATH_MSG_FATAL("Unsupported shift: " << m_shiftType); return StatusCode::FAILURE; } + + /// A dictionary of all available functions + std::unordered_map<std::string, + std::function<float(const xAOD::Egamma*, const xAOD::CaloCluster*)> > funcLibrary; + // get the BDTs ATH_MSG_DEBUG("get BDTs in folder: " << m_folder); switch (m_particleType) { case xAOD::EgammaParameters::electron: - ATH_CHECK(initializeElectronFuncs()); - ATH_CHECK(setupBDT(PathResolverFindCalibFile(m_folder + "/MVACalib_electron.weights.root"))); + ATH_CHECK(initializeElectronFuncs(funcLibrary)); + ATH_CHECK(setupBDT(funcLibrary, + PathResolverFindCalibFile(m_folder + "/MVACalib_electron.weights.root"))); break; case xAOD::EgammaParameters::unconvertedPhoton: - ATH_CHECK(initializeUnconvertedPhotonFuncs()); - ATH_CHECK(setupBDT(PathResolverFindCalibFile(m_folder + "/MVACalib_unconvertedPhoton.weights.root"))); + ATH_CHECK(initializeUnconvertedPhotonFuncs(funcLibrary)); + ATH_CHECK(setupBDT(funcLibrary, + PathResolverFindCalibFile(m_folder + "/MVACalib_unconvertedPhoton.weights.root"))); break; case xAOD::EgammaParameters::convertedPhoton: - ATH_CHECK(initializeConvertedPhotonFuncs()); - ATH_CHECK(setupBDT(PathResolverFindCalibFile(m_folder + "/MVACalib_convertedPhoton.weights.root"))); + ATH_CHECK(initializeConvertedPhotonFuncs(funcLibrary)); + ATH_CHECK(setupBDT(funcLibrary, + PathResolverFindCalibFile(m_folder + "/MVACalib_convertedPhoton.weights.root"))); break; default: ATH_MSG_FATAL("Particle type not set properly: " << m_particleType); @@ -63,7 +71,10 @@ StatusCode egammaMVACalibTool::finalize() return StatusCode::SUCCESS; } -StatusCode egammaMVACalibTool::setupBDT(std::string fileName) +StatusCode egammaMVACalibTool::setupBDT(const std::unordered_map<std::string, + std::function<float(const xAOD::Egamma*, + const xAOD::CaloCluster*)> >& funcLibrary, + std::string fileName) { std::unique_ptr<TFile> f(TFile::Open(fileName.c_str())); if (!f || f->IsZombie() ) { @@ -155,7 +166,7 @@ StatusCode egammaMVACalibTool::setupBDT(std::string fileName) return StatusCode::FAILURE; } try { - funcs.push_back(m_funcLibrary.at(varName.Data())); + funcs.push_back(funcLibrary.at(varName.Data())); } catch(const std::out_of_range& e) { ATH_MSG_FATAL("Could not find formula for variable " << varName << ", error: " << e.what()); return StatusCode::FAILURE; @@ -173,52 +184,58 @@ StatusCode egammaMVACalibTool::setupBDT(std::string fileName) } -StatusCode egammaMVACalibTool::initializeElectronFuncs() +StatusCode egammaMVACalibTool::initializeElectronFuncs(std::unordered_map<std::string, + std::function<float(const xAOD::Egamma*, + const xAOD::CaloCluster*)> >& funcLibrary) const { - ATH_CHECK(initializeClusterFuncs("el")); - ATH_CHECK(initializeEgammaFuncs("el")); + ATH_CHECK(initializeClusterFuncs(funcLibrary, "el")); + ATH_CHECK(initializeEgammaFuncs(funcLibrary, "el")); using namespace egammaMVATreeHelpers; - m_funcLibrary["el_charge"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary["el_charge"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return compute_el_charge(*(static_cast<const xAOD::Electron*>(eg))); }; - m_funcLibrary["el_tracketa"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary["el_tracketa"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return compute_el_tracketa(*(static_cast<const xAOD::Electron*>(eg))); }; - m_funcLibrary["el_trackpt"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary["el_trackpt"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return compute_el_trackpt(*(static_cast<const xAOD::Electron*>(eg))); }; - m_funcLibrary["el_trackz0"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary["el_trackz0"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return compute_el_trackz0(*(static_cast<const xAOD::Electron*>(eg))); }; - m_funcLibrary["el_refittedTrack_qoverp"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary["el_refittedTrack_qoverp"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return compute_el_refittedTrack_qoverp(*(static_cast<const xAOD::Electron*>(eg))); }; return StatusCode::SUCCESS; } -StatusCode egammaMVACalibTool::initializeUnconvertedPhotonFuncs() +StatusCode egammaMVACalibTool::initializeUnconvertedPhotonFuncs(std::unordered_map<std::string, + std::function<float(const xAOD::Egamma*, + const xAOD::CaloCluster*)> >& funcLibrary) const { - ATH_CHECK(initializeClusterFuncs("ph")); - ATH_CHECK(initializeEgammaFuncs("ph")); + ATH_CHECK(initializeClusterFuncs(funcLibrary, "ph")); + ATH_CHECK(initializeEgammaFuncs(funcLibrary, "ph")); return StatusCode::SUCCESS; } -StatusCode egammaMVACalibTool::initializeConvertedPhotonFuncs() +StatusCode egammaMVACalibTool::initializeConvertedPhotonFuncs(std::unordered_map<std::string, + std::function<float(const xAOD::Egamma*, + const xAOD::CaloCluster*)> >& funcLibrary) const { - ATH_CHECK(initializeClusterFuncs("ph")); - ATH_CHECK(initializeEgammaFuncs("ph")); + ATH_CHECK(initializeClusterFuncs(funcLibrary, "ph")); + ATH_CHECK(initializeEgammaFuncs(funcLibrary, "ph")); - m_funcLibrary["ph_Rconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary["ph_Rconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return xAOD::EgammaHelpers::conversionRadius(static_cast<const xAOD::Photon*>(eg)); }; - m_funcLibrary["ph_zconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary["ph_zconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return static_cast<const xAOD::Photon*>(eg)->vertex()->position().z(); }; - m_funcLibrary["ph_pt1conv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary["ph_pt1conv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { static const SG::AuxElement::Accessor<float> accPt1("pt1"); auto vx = static_cast<const xAOD::Photon*>(eg)->vertex(); return accPt1(*vx); }; - m_funcLibrary["ph_pt2conv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary["ph_pt2conv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { static const SG::AuxElement::Accessor<float> accPt2("pt2"); @@ -226,7 +243,7 @@ StatusCode egammaMVACalibTool::initializeConvertedPhotonFuncs() return accPt2(*vx); }; - m_funcLibrary["ph_ptconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary["ph_ptconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { static const SG::AuxElement::Accessor<float> accPx("px"); static const SG::AuxElement::Accessor<float> accPy("py"); @@ -238,140 +255,146 @@ StatusCode egammaMVACalibTool::initializeConvertedPhotonFuncs() return StatusCode::SUCCESS; } -StatusCode egammaMVACalibTool::initializeClusterFuncs(const std::string& prefix) +StatusCode egammaMVACalibTool::initializeClusterFuncs(std::unordered_map<std::string, + std::function<float(const xAOD::Egamma*, + const xAOD::CaloCluster*)> >& funcLibrary, + const std::string& prefix) const { using namespace egammaMVATreeHelpers; - m_funcLibrary[prefix + "_cl_eta"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + funcLibrary[prefix + "_cl_eta"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return compute_cl_eta(*cl); }; - m_funcLibrary[prefix + "_cl_phi"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + funcLibrary[prefix + "_cl_phi"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return compute_cl_phi(*cl); }; - m_funcLibrary[prefix + "_cl_E"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + funcLibrary[prefix + "_cl_E"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return compute_cl_e(*cl); }; - m_funcLibrary[prefix + "_cl_etaCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + funcLibrary[prefix + "_cl_etaCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return compute_cl_etaCalo(*cl); }; - m_funcLibrary[prefix + "_cl_phiCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + funcLibrary[prefix + "_cl_phiCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return compute_cl_phiCalo(*cl); }; - m_funcLibrary[prefix + "_cl_E_TileGap3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + funcLibrary[prefix + "_cl_E_TileGap3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return cl->eSample(CaloSampling::TileGap3); }; if (m_use_layer_corrected) { - m_funcLibrary[prefix + "_rawcl_Es0"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + funcLibrary[prefix + "_rawcl_Es0"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return compute_correctedcl_Es0(*cl); }; - m_funcLibrary[prefix + "_rawcl_Es1"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + funcLibrary[prefix + "_rawcl_Es1"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return compute_correctedcl_Es1(*cl); }; - m_funcLibrary[prefix + "_rawcl_Es2"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + funcLibrary[prefix + "_rawcl_Es2"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return compute_correctedcl_Es2(*cl); }; - m_funcLibrary[prefix + "_rawcl_Es3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + funcLibrary[prefix + "_rawcl_Es3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return compute_correctedcl_Es3(*cl); }; - m_funcLibrary[prefix + "_rawcl_calibHitsShowerDepth"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + funcLibrary[prefix + "_rawcl_calibHitsShowerDepth"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return compute_correctedcl_calibHitsShowerDepth(*cl); }; } else { - m_funcLibrary[prefix + "_rawcl_Es0"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + funcLibrary[prefix + "_rawcl_Es0"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return compute_rawcl_Es0(*cl); }; - m_funcLibrary[prefix + "_rawcl_Es1"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + funcLibrary[prefix + "_rawcl_Es1"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return compute_rawcl_Es1(*cl); }; - m_funcLibrary[prefix + "_rawcl_Es2"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + funcLibrary[prefix + "_rawcl_Es2"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return compute_rawcl_Es2(*cl); }; - m_funcLibrary[prefix + "_rawcl_Es3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + funcLibrary[prefix + "_rawcl_Es3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return compute_rawcl_Es3(*cl); }; // and everything that depends on // static cast here is needed to resolve overload (std::function is not able to) - m_funcLibrary[prefix + "_rawcl_calibHitsShowerDepth"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + funcLibrary[prefix + "_rawcl_calibHitsShowerDepth"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return compute_rawcl_calibHitsShowerDepth(*cl); }; } return StatusCode::SUCCESS; } -StatusCode egammaMVACalibTool::initializeEgammaFuncs(const std::string& prefix) +StatusCode egammaMVACalibTool::initializeEgammaFuncs(std::unordered_map<std::string, + std::function<float(const xAOD::Egamma*, + const xAOD::CaloCluster*)> >& funcLibrary, + const std::string& prefix) const { - m_funcLibrary[prefix + "_e011"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_e011"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::e011); }; - m_funcLibrary[prefix + "_e033"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_e033"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::e033); }; - m_funcLibrary[prefix + "_e132"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_e132"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::e132); }; - m_funcLibrary[prefix + "_e1152"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_e1152"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::e1152); }; - m_funcLibrary[prefix + "_ethad1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_ethad1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::ethad1); }; - m_funcLibrary[prefix + "_ethad"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_ethad"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::ethad); }; - m_funcLibrary[prefix + "_f1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_f1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::f1); }; - m_funcLibrary[prefix + "_f3"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_f3"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::f3); }; - m_funcLibrary[prefix + "_f1core"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_f1core"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::f1core); }; - m_funcLibrary[prefix + "_f3core"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_f3core"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::f3core); }; - m_funcLibrary[prefix + "_e233"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_e233"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::e233); }; - m_funcLibrary[prefix + "_e235"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_e235"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::e235); }; - m_funcLibrary[prefix + "_e255"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_e255"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::e255); }; - m_funcLibrary[prefix + "_e237"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_e237"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::e237); }; - m_funcLibrary[prefix + "_e277"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_e277"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::e277); }; - m_funcLibrary[prefix + "_e333"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_e333"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::e333); }; - m_funcLibrary[prefix + "_e335"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_e335"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::e335); }; - m_funcLibrary[prefix + "_e337"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_e337"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::e337); }; - m_funcLibrary[prefix + "_e377"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_e377"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::e377); }; - m_funcLibrary[prefix + "_weta1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_weta1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::weta1); }; - m_funcLibrary[prefix + "_weta2"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_weta2"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::weta2); }; - m_funcLibrary[prefix + "_e2ts1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_e2ts1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::e2ts1); }; - m_funcLibrary[prefix + "_e2tsts1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_e2tsts1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::e2tsts1); }; - m_funcLibrary[prefix + "_fracs1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_fracs1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::fracs1); }; - m_funcLibrary[prefix + "_widths1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_widths1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::widths1); }; - m_funcLibrary[prefix + "_widths2"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_widths2"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::widths2); }; - m_funcLibrary[prefix + "_poscs1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_poscs1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::poscs1); }; - m_funcLibrary[prefix + "_poscs2"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_poscs2"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::poscs2); }; - m_funcLibrary[prefix + "_asy1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_asy1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::asy1); }; - m_funcLibrary[prefix + "_pos"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_pos"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::pos); }; - m_funcLibrary[prefix + "_pos7"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_pos7"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::pos7); }; - m_funcLibrary[prefix + "_barys1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_barys1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::barys1); }; - m_funcLibrary[prefix + "_wtots1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_wtots1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::wtots1); }; - m_funcLibrary[prefix + "_emins1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_emins1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::emins1); }; - m_funcLibrary[prefix + "_emaxs1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_emaxs1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::emaxs1); }; - m_funcLibrary[prefix + "_r33over37allcalo"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_r33over37allcalo"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::r33over37allcalo); }; - m_funcLibrary[prefix + "_ecore"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_ecore"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::ecore); }; - m_funcLibrary[prefix + "_Reta"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_Reta"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::Reta); }; - m_funcLibrary[prefix + "_Rphi"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_Rphi"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::Rphi); }; - m_funcLibrary[prefix + "_Eratio"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_Eratio"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::Eratio); }; - m_funcLibrary[prefix + "_Rhad"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_Rhad"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::Rhad); }; - m_funcLibrary[prefix + "_Rhad1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_Rhad1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::Rhad1); }; - m_funcLibrary[prefix + "_DeltaE"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary[prefix + "_DeltaE"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return eg->showerShapeValue(xAOD::EgammaParameters::DeltaE); }; return StatusCode::SUCCESS; diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h index 6b6ca9d09ebe..316a89fef179 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h @@ -23,7 +23,6 @@ #include <string> #include <memory> #include <functional> -#include <unordered_map> /** @@ -87,25 +86,36 @@ private: std::vector<TFormula> m_shifts; - /// A dictionary of all available functions - std::unordered_map<std::string, - std::function<float(const xAOD::Egamma*, const xAOD::CaloCluster*)> > m_funcLibrary; - /// initialize the functions needed for electrons - StatusCode initializeElectronFuncs(); + StatusCode initializeElectronFuncs(std::unordered_map<std::string, + std::function<float(const xAOD::Egamma*, + const xAOD::CaloCluster*)> >& funcLibrary) const; /// initialize the functions needed for unconverted photons - StatusCode initializeUnconvertedPhotonFuncs(); + StatusCode initializeUnconvertedPhotonFuncs(std::unordered_map<std::string, + std::function<float(const xAOD::Egamma*, + const xAOD::CaloCluster*)> >& funcLibrary) const; /// initialize the functions needed for converted photons - StatusCode initializeConvertedPhotonFuncs(); + StatusCode initializeConvertedPhotonFuncs(std::unordered_map<std::string, + std::function<float(const xAOD::Egamma*, + const xAOD::CaloCluster*)> >& funcLibrary) const; /// a function called by the above functions to setup the cluster funcs - StatusCode initializeClusterFuncs(const std::string& prefix); + StatusCode initializeClusterFuncs(std::unordered_map<std::string, + std::function<float(const xAOD::Egamma*, + const xAOD::CaloCluster*)> >& funcLibrary, + const std::string& prefix) const; /// a function called by the above functions to setup the egamma funcs - StatusCode initializeEgammaFuncs(const std::string& prefix); + StatusCode initializeEgammaFuncs(std::unordered_map<std::string, + std::function<float(const xAOD::Egamma*, + const xAOD::CaloCluster*)> >& funcLibrary, + const std::string& prefix) const; /// a function called by initialize to setup the BDT, funcs, and shifts. - StatusCode setupBDT(std::string fileName); + StatusCode setupBDT(const std::unordered_map<std::string, + std::function<float(const xAOD::Egamma*, + const xAOD::CaloCluster*)> >& funcLibrary, + std::string fileName); /// a utility to get a TString out of an TObjString pointer const TString& getString(TObject* obj) const; -- GitLab From f3f877a09e19b98733efc7203adbaa8f960a05e3 Mon Sep 17 00:00:00 2001 From: Shota Hayashida <hayashida@hepl.phys.nagoya-u.ac.jp> Date: Wed, 4 Jul 2018 15:09:16 +0200 Subject: [PATCH 349/562] Modified to create some collections under the same name Former-commit-id: d3637d4ff3f4e1a5923bc8c81416b216ba81b76d --- .../TrigUpgradeTest/python/muMenuDefs.py | 20 ++++++++++--------- .../TrigUpgradeTest/share/mu.menu.py | 16 +++++++++------ 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py b/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py index 3d25695574c8..3385f7f9970c 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py @@ -59,11 +59,11 @@ if TriggerFlags.doID: (viewAlgs, eventAlgs) = makeInDetAlgs() from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_Muon - theFTF = TrigFastTrackFinder_Muon() - theFTF.OutputLevel = DEBUG - theFTF.TracksName = "TrigFastTrackFinder_MuTracks" - theFTF.isRoI_Seeded = True - viewAlgs.append(theFTF) + theFTF_Muon = TrigFastTrackFinder_Muon() + theFTF_Muon.OutputLevel = DEBUG + #theFTF_Muon.TracksName = "TrigFastTrackFinder_MuTracks" + theFTF_Muon.isRoI_Seeded = True + viewAlgs.append(theFTF_Muon) ### A simple algorithm to confirm that data has been inherited from parent view ### ### Required to satisfy data dependencies ### @@ -340,8 +340,10 @@ if TriggerFlags.doMuon: l2muCombViewsMaker = EventViewCreatorAlgorithm("l2muCombViewsMaker", OutputLevel=DEBUG) l2muCombViewsMaker.ViewFallThrough = True l2muCombViewsMaker.RoIsLink = "roi" # -||- - l2muCombViewsMaker.InViewRoIs = "MUTrkRoIs" # contract with the consumer - l2muCombViewsMaker.Views = "MUTrkViewRoIs" + #l2muCombViewsMaker.InViewRoIs = "MUTrkRoIs" # contract with the consumer + #l2muCombViewsMaker.Views = "MUTrkViewRoIs" + l2muCombViewsMaker.InViewRoIs = "EMIDRoIs" # contract with the consumer + l2muCombViewsMaker.Views = "EMCombViewRoIs" l2muCombViewsMaker.ViewNodeName = l2muCombViewNode.name() @@ -356,12 +358,12 @@ if TriggerFlags.doMuon: viewAlg.roiCollectionName = l2muCombViewsMaker.InViewRoIs if viewAlg.name() == "InDetTrigTrackParticleCreatorAlg": TrackParticlesName = viewAlg.TrackParticlesName - viewAlg.TrackName = theFTF.TracksName + #viewAlg.TrackName = theFTF_Muon.TracksName ### please read out TrigmuCombMTConfig file ### ### and set up to run muCombMT algorithm ### from TrigmuComb.TrigmuCombMTConfig import TrigmuCombMTConfig - muCombAlg = TrigmuCombMTConfig("Muon", theFTF.getName()) + muCombAlg = TrigmuCombMTConfig("Muon", theFTF_Muon.getName()) muCombAlg.OutputLevel = DEBUG muCombAlg.L2StandAloneMuonContainerName = muFastAlg.MuonL2SAInfo muCombAlg.TrackParticlesContainerName = TrackParticlesName diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py index d3aaf194ab6f..cb9bca0d6c7b 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py @@ -89,19 +89,23 @@ if TriggerFlags.doMuon==True: if TriggerFlags.doID==False: - if doL2SA==True and doL2CB==False and doEFSA==False: + if doL2SA==True and doL2CB==False and doEFSA==False: MenuChains += [Chain(name='HLT_mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]) ])] - MenuChains += [Chain(name='HLT_2mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]) ])] - if doEFSA==True and doL2SA==False and doL2CB==False: + MenuChains += [Chain(name='HLT_2mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]) ])] + if doL2SA==False and doL2CB==False and doEFSA==True: MenuChains += [Chain(name='HLT_mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]) ])] + MenuChains += [Chain(name='HLT_2mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]) ])] elif TriggerFlags.doID==True: - if doL2SA==True and doL2CB==True and doEFSA==False: + if doL2SA==True and doL2CB==True and doEFSA==False: MenuChains += [Chain(name='HLT_mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]), ChainStep("Step2_muComb", [muCombStep]) ])] - if doL2SA==True and doEFSA==True and doL2CB==True: + MenuChains += [Chain(name='HLT_2mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]), + ChainStep("Step2_muComb", [muCombStep]) ])] + if doL2SA==True and doL2CB==True and doEFSA==True: MenuChains += [Chain(name='HLT_mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]), ChainStep("Step2_muComb", [muCombStep]) ])] - + MenuChains += [Chain(name='HLT_2mu6', Seed="L1_MU6", ChainSteps=[ChainStep("Step1_mufast", [muFastStep]), + ChainStep("Step2_muComb", [muCombStep]) ])] -- GitLab From 5a04e911245a8ff00afaad197bcc830a368c161c Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Mon, 11 Jun 2018 17:19:27 +0200 Subject: [PATCH 350/562] AthenaPoolMultiTest: coverity 12612, 111788, 114213 Fix coverity warnings: memory leaks in test code. Former-commit-id: ffc4bb913af8be6c65015cb670980e3c9c3cacc0 --- .../AthenaPoolMultiTest/src/AddTrigMap.cxx | 15 +++++++-------- .../src/DummyLumirangeTool.cxx | 6 +++--- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/AddTrigMap.cxx b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/AddTrigMap.cxx index e2eca1f59433..09f2a6098adc 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/AddTrigMap.cxx +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/AddTrigMap.cxx @@ -55,30 +55,29 @@ StatusCode AddTrigMap::execute() // Since we have an event, add the dummy trigger object // int event = evt->event_ID()->event_number(); - FauxTriggerMap* ftm=0; - ftm = new FauxTriggerMap(); + auto ftm = std::make_unique<FauxTriggerMap>(); // Add some paths ftm->addPath(TrigPath(event%3, 2,event%6)); // repeats with period 3 ftm->addPath(TrigPath(event%16,2,event%11+(event+1)%2)); // repeats with period 16 if (event==3) { - delete ftm ; ftm = new FauxTriggerMap(); + ftm = std::make_unique<FauxTriggerMap>(); ftm->addPath(TrigPath(8,2,1)); // non normal trigger } // Extra map for testing exclude list - FauxTriggerMap* ftm2 = new FauxTriggerMap(); + auto ftm2 = std::make_unique<FauxTriggerMap>(); // Add some paths ftm2->addPath(TrigPath(event%4, 2,event%6)); // repeats with period 3 // Set up the writing - if (ftm!=0) { + if (ftm) { SG::WriteHandle<FauxTriggerMap> wftm(m_wftm); - ATH_CHECK( wftm.record (std::make_unique<FauxTriggerMap>(*ftm)) ); + ATH_CHECK( wftm.record (std::move (ftm)) ); } // Now add a copy for exclude list test - if (ftm2!=0) { + if (ftm2) { SG::WriteHandle<FauxTriggerMap> wftm2(m_wftm2); - ATH_CHECK( wftm2.record (std::make_unique<FauxTriggerMap>(*ftm2)) ); + ATH_CHECK( wftm2.record (std::move (ftm2)) ); } ATH_MSG_INFO( "registered all data" ); diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/DummyLumirangeTool.cxx b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/DummyLumirangeTool.cxx index 4d3d4c1c7d8e..fd9b54080bea 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/DummyLumirangeTool.cxx +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/DummyLumirangeTool.cxx @@ -117,11 +117,11 @@ DummyLumirangeTool::initialize() ATH_MSG_DEBUG("Filled a metadata container of size " << defMeta.size()); CollectionMetadata* def = new CollectionMetadata(defMeta); - CollectionMetadataContainer* cont = new CollectionMetadataContainer(); - cont->push_back(def); + auto cont = std::make_unique<CollectionMetadataContainer>(); + cont->push_back (def); SG::WriteHandle<CollectionMetadataContainer> wcmd(m_wcmd); - ATH_CHECK( wcmd.record (std::make_unique<CollectionMetadataContainer>(*cont)) ); + ATH_CHECK( wcmd.record (std::move (cont)) ); ATH_MSG_DEBUG("Stored CollectionMetadataContainer in " << m_storeName); ATH_MSG_DEBUG("Size: " << def->size()); ATH_MSG_DEBUG("Contents: "); -- GitLab From a156fce58761e63160d0eb5b508693ab0d837577 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Wed, 4 Jul 2018 10:28:52 +0200 Subject: [PATCH 351/562] CaloMonitoring: Coverity 118681, 118684, 118687. Coverity warnings: - Uninitialized private data members; - Integer division converted to float. Former-commit-id: 00bd9c8c11d7b6f3697ba2178bc9f7e7d15cd3bd --- Calorimeter/CaloMonitoring/src/CaloBaselineMon.cxx | 8 ++++++-- Calorimeter/CaloMonitoring/src/LArCellMonTool.cxx | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Calorimeter/CaloMonitoring/src/CaloBaselineMon.cxx b/Calorimeter/CaloMonitoring/src/CaloBaselineMon.cxx index c36a77647165..5d26910d5bc9 100644 --- a/Calorimeter/CaloMonitoring/src/CaloBaselineMon.cxx +++ b/Calorimeter/CaloMonitoring/src/CaloBaselineMon.cxx @@ -31,8 +31,12 @@ using Athena::Units::GeV; CaloBaselineMon::CaloBaselineMon(const std::string& type, const std::string& name, const IInterface* parent) : CaloMonToolBase(type, name, parent), + m_bool_pedestalMon(false), + m_bool_bcidtoolMon(false), m_calo_id(nullptr), - m_bunchCrossingTool("BunchCrossingTool") + m_bunchCrossingTool("BunchCrossingTool"), + m_h1_BCID_bcidtoolMon(nullptr), + m_h1_BCID_pedestalMon(nullptr) { declareInterface<IMonitorToolBase>(this); @@ -312,7 +316,7 @@ StatusCode CaloBaselineMon::fillHistograms() { m_sum_partition_eta[iPart][iEta] = m_sum_partition_eta[iPart][iEta]*(m_inv_etaBinWidth[iPart])/(2*M_PI)/lbAverageInteractionsPerCrossing(); float etaToBeFilled = ((float) iEta)*m_etaBinWidth[iPart] + m_etaMin[iPart]; m_partHistos[iPart].hProf_bcidtoolMon_vs_Eta->Fill(etaToBeFilled,m_sum_partition_eta[iPart][iEta]); - m_partHistos[iPart].hProf_bcidtoolMon_vs_EtaBCID[iEta]->Fill(m_bunchCrossingTool->distanceFromFront(bcid)/25,m_sum_partition_eta[iPart][iEta]); + m_partHistos[iPart].hProf_bcidtoolMon_vs_EtaBCID[iEta]->Fill(m_bunchCrossingTool->distanceFromFront(bcid)/25.,m_sum_partition_eta[iPart][iEta]); m_partHistos[iPart].hProf_bcidtoolMon_vs_LB->Fill(lumiBlock,m_sum_partition_eta[iPart][iEta]); } } diff --git a/Calorimeter/CaloMonitoring/src/LArCellMonTool.cxx b/Calorimeter/CaloMonitoring/src/LArCellMonTool.cxx index 2fa8b94089e7..3b73d4d2f7f3 100644 --- a/Calorimeter/CaloMonitoring/src/LArCellMonTool.cxx +++ b/Calorimeter/CaloMonitoring/src/LArCellMonTool.cxx @@ -46,7 +46,9 @@ LArCellMonTool::LArCellMonTool(const std::string& type, const std::string& name, m_LArCablingService("LArCablingService"), m_LArOnlineIDHelper(nullptr), m_calo_id(nullptr), - m_counter_sporadic_protc(0){ + m_counter_sporadic_protc(0), + m_h_sporadicHists() +{ declareInterface<IMonitorToolBase>(this); declareProperty("DoSaveTempHists",m_doSaveTempHists=false,"Store temporary, intermediate histograms in a /Temp/ directory (for debugging"); -- GitLab From 4c4eaf0d6852dc99f53e0fd3f35fb67c1ff03817 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Wed, 4 Jul 2018 10:29:45 +0200 Subject: [PATCH 352/562] TrigCaloEventTPCnv: Fix clang warnings. clang warnings: unused private data members. These, however, are in _p classes, so don't remove them. Instead, just suppress the warnings we get from clang. Former-commit-id: 780d486bd4b9bf5319486a5d10483dbc5691ea32 --- .../TrigCaloEventTPCnv/CMakeLists.txt | 2 +- .../TrigCaloEventTPCnv/TrigTauCluster_p1.h | 21 +++++++++++-------- .../TrigCaloEventTPCnv/TrigTauCluster_p2.h | 4 +++- .../TrigCaloEventTPCnv/TrigTauCluster_p3.h | 4 +++- .../TrigCaloEventTPCnv/TrigTauCluster_p4.h | 4 +++- .../TrigCaloEventTPCnv/TrigTauCluster_p5.h | 4 +++- 6 files changed, 25 insertions(+), 14 deletions(-) diff --git a/Trigger/TrigEvent/TrigCaloEventTPCnv/CMakeLists.txt b/Trigger/TrigEvent/TrigCaloEventTPCnv/CMakeLists.txt index 23bfc361fe94..df19a49a47ee 100644 --- a/Trigger/TrigEvent/TrigCaloEventTPCnv/CMakeLists.txt +++ b/Trigger/TrigEvent/TrigCaloEventTPCnv/CMakeLists.txt @@ -12,10 +12,10 @@ atlas_depends_on_subdirs( PUBLIC Database/AthenaPOOL/AthenaPoolCnvSvc Database/AthenaPOOL/AthenaPoolUtilities Trigger/TrigEvent/TrigCaloEvent + Control/CxxUtils PRIVATE AtlasTest/TestTools Control/AthenaKernel - Control/CxxUtils Control/SGTools GaudiKernel ) diff --git a/Trigger/TrigEvent/TrigCaloEventTPCnv/TrigCaloEventTPCnv/TrigTauCluster_p1.h b/Trigger/TrigEvent/TrigCaloEventTPCnv/TrigCaloEventTPCnv/TrigTauCluster_p1.h index 3ba519863be1..086788533ff6 100644 --- a/Trigger/TrigEvent/TrigCaloEventTPCnv/TrigCaloEventTPCnv/TrigTauCluster_p1.h +++ b/Trigger/TrigEvent/TrigCaloEventTPCnv/TrigCaloEventTPCnv/TrigTauCluster_p1.h @@ -22,6 +22,7 @@ //need this for MAXSIZE, NUMEMSAMP, and NUMHADSAMP #include "TrigCaloEvent/TrigTauCluster.h" +#include "CxxUtils/unused.h" class TrigTauCluster_p1 { @@ -32,27 +33,29 @@ class TrigTauCluster_p1 private: + // Some of these are unused, but we shouldn't delete them + // since they're part of the persistent data. float m_EMenergy; float m_HADenergy; - float m_eEMCalib; + float ATH_UNUSED_MEMBER(m_eEMCalib); float m_eCalib; - float m_EnergyS[MAXSIZE]; + float ATH_UNUSED_MEMBER(m_EnergyS[MAXSIZE]); float m_Eta; float m_Phi; float m_EMRadius[NUMEMSAMP]; float m_IsoFrac; float m_EMenergyWidth[NUMEMSAMP]; - float m_HADenergyWidth[NUMHADSAMP]; + float ATH_UNUSED_MEMBER(m_HADenergyWidth[NUMHADSAMP]); int m_numStripCells; float m_stripWidth; - float m_EMenergyNor[NUMEMSAMP]; - float m_EMenergyWid[NUMEMSAMP]; - float m_EMenergyNar[NUMEMSAMP]; + float ATH_UNUSED_MEMBER(m_EMenergyNor[NUMEMSAMP]); + float ATH_UNUSED_MEMBER(m_EMenergyWid[NUMEMSAMP]); + float ATH_UNUSED_MEMBER(m_EMenergyNar[NUMEMSAMP]); - float m_HADenergyNor[NUMHADSAMP]; - float m_HADenergyWid[NUMHADSAMP]; - float m_HADenergyNar[NUMHADSAMP]; + float ATH_UNUSED_MEMBER(m_HADenergyNor[NUMHADSAMP]); + float ATH_UNUSED_MEMBER( m_HADenergyWid[NUMHADSAMP]); + float ATH_UNUSED_MEMBER(m_HADenergyNar[NUMHADSAMP]); //the TrigCaloCluster base class TPObjRef m_trigCaloCluster; diff --git a/Trigger/TrigEvent/TrigCaloEventTPCnv/TrigCaloEventTPCnv/TrigTauCluster_p2.h b/Trigger/TrigEvent/TrigCaloEventTPCnv/TrigCaloEventTPCnv/TrigTauCluster_p2.h index b1abce666748..ba1e7e5e4412 100644 --- a/Trigger/TrigEvent/TrigCaloEventTPCnv/TrigCaloEventTPCnv/TrigTauCluster_p2.h +++ b/Trigger/TrigEvent/TrigCaloEventTPCnv/TrigCaloEventTPCnv/TrigTauCluster_p2.h @@ -21,6 +21,7 @@ //need this for MAXSIZE, NUMEMSAMP, and NUMHADSAMP #include "TrigCaloEvent/TrigTauCluster.h" +#include "CxxUtils/unused.h" class TrigTauCluster_p2 { @@ -64,7 +65,8 @@ class TrigTauCluster_p2 /** Width as in Offline */ float m_stripWidthOffline; - bool m_valid; + // Unused, but shouldn't delete it since it's part of the persistent data. + bool ATH_UNUSED_MEMBER(m_valid); /** ElementLink to TrigTauClusterDetailsContainer **/ ElementLinkInt_p1 m_details; diff --git a/Trigger/TrigEvent/TrigCaloEventTPCnv/TrigCaloEventTPCnv/TrigTauCluster_p3.h b/Trigger/TrigEvent/TrigCaloEventTPCnv/TrigCaloEventTPCnv/TrigTauCluster_p3.h index 81389f56fa8d..966653e2ebb8 100644 --- a/Trigger/TrigEvent/TrigCaloEventTPCnv/TrigCaloEventTPCnv/TrigTauCluster_p3.h +++ b/Trigger/TrigEvent/TrigCaloEventTPCnv/TrigCaloEventTPCnv/TrigTauCluster_p3.h @@ -18,6 +18,7 @@ #include "AthenaPoolUtilities/TPObjRef.h" #include "DataModelAthenaPool/ElementLink_p3.h" +#include "CxxUtils/unused.h" //need this for MAXSIZE, NUMEMSAMP, and NUMHADSAMP #include "TrigCaloEvent/TrigTauCluster.h" @@ -57,7 +58,8 @@ class TrigTauCluster_p3 { /** Width as in Offline */ // float m_stripWidthOffline; - bool m_valid; + // Unused, but shouldn't delete it since it's part of the persistent data. + bool ATH_UNUSED_MEMBER(m_valid); /** ElementLink to TrigTauClusterDetailsContainer **/ ElementLinkInt_p3 m_details; TrigCaloCluster_p2 m_trigCaloCluster; diff --git a/Trigger/TrigEvent/TrigCaloEventTPCnv/TrigCaloEventTPCnv/TrigTauCluster_p4.h b/Trigger/TrigEvent/TrigCaloEventTPCnv/TrigCaloEventTPCnv/TrigTauCluster_p4.h index 2b824e239f8d..8c5cb83351e4 100644 --- a/Trigger/TrigEvent/TrigCaloEventTPCnv/TrigCaloEventTPCnv/TrigTauCluster_p4.h +++ b/Trigger/TrigEvent/TrigCaloEventTPCnv/TrigCaloEventTPCnv/TrigTauCluster_p4.h @@ -22,6 +22,7 @@ //need this for MAXSIZE, NUMEMSAMP, and NUMHADSAMP #include "TrigCaloEvent/TrigTauCluster.h" #include "TrigCaloEventTPCnv/TrigCaloCluster_p2.h" +#include "CxxUtils/unused.h" class TrigTauCluster_p4 { friend class TrigTauClusterCnv_p4; @@ -35,7 +36,8 @@ private: // float m_allTheFloats[9]; int m_allTheInts[2]; - bool m_valid; + // Unused, but shouldn't delete it since it's part of the persistent data. + bool ATH_UNUSED_MEMBER(m_valid); /** ElementLink to TrigTauClusterDetailsContainer **/ ElementLinkInt_p3 m_details; TrigCaloCluster_p2 m_trigCaloCluster; diff --git a/Trigger/TrigEvent/TrigCaloEventTPCnv/TrigCaloEventTPCnv/TrigTauCluster_p5.h b/Trigger/TrigEvent/TrigCaloEventTPCnv/TrigCaloEventTPCnv/TrigTauCluster_p5.h index d770098b546b..3dc13876fa6d 100644 --- a/Trigger/TrigEvent/TrigCaloEventTPCnv/TrigCaloEventTPCnv/TrigTauCluster_p5.h +++ b/Trigger/TrigEvent/TrigCaloEventTPCnv/TrigCaloEventTPCnv/TrigTauCluster_p5.h @@ -22,6 +22,7 @@ //need this for MAXSIZE, NUMEMSAMP, and NUMHADSAMP #include "TrigCaloEvent/TrigTauCluster.h" #include "TrigCaloEventTPCnv/TrigCaloCluster_p2.h" +#include "CxxUtils/unused.h" class TrigTauCluster_p5 { @@ -35,7 +36,8 @@ private: float m_allTheFloats[12]; int m_allTheInts[2]; - bool m_valid; + // Unused, but shouldn't delete it since it's part of the persistent data. + bool ATH_UNUSED_MEMBER(m_valid); /** ElementLink to TrigTauClusterDetailsContainer **/ ElementLinkInt_p3 m_details; TrigCaloCluster_p2 m_trigCaloCluster; -- GitLab From 4a395e73f7ced8fd543aca73b3bb19cab764c0ed Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Wed, 4 Jul 2018 10:41:15 +0200 Subject: [PATCH 353/562] LArTPCnv: Fix clang warnings. clang warnings: unused private data members. These, however, are in _p classes, so don't remove them. Instead, just suppress the warnings we get from clang. Former-commit-id: 4115fda9ec45e344e754e7ce11aca10eaf83dfae --- LArCalorimeter/LArCnv/LArTPCnv/CMakeLists.txt | 1 + .../LArTPCnv/LArTPCnv/LArRawChannelCollection_p2.h | 14 +++++--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/LArCalorimeter/LArCnv/LArTPCnv/CMakeLists.txt b/LArCalorimeter/LArCnv/LArTPCnv/CMakeLists.txt index 8e6d874474f4..7a8fd9979ac2 100644 --- a/LArCalorimeter/LArCnv/LArTPCnv/CMakeLists.txt +++ b/LArCalorimeter/LArCnv/LArTPCnv/CMakeLists.txt @@ -10,6 +10,7 @@ atlas_depends_on_subdirs( PUBLIC Database/AthenaPOOL/AthenaPoolCnvSvc LArCalorimeter/LArRawEvent LArCalorimeter/LArRecEvent + Control/CxxUtils PRIVATE AtlasTest/TestTools Calorimeter/CaloIdentifier diff --git a/LArCalorimeter/LArCnv/LArTPCnv/LArTPCnv/LArRawChannelCollection_p2.h b/LArCalorimeter/LArCnv/LArTPCnv/LArTPCnv/LArRawChannelCollection_p2.h index c0a2130e53b3..78c0baf89214 100644 --- a/LArCalorimeter/LArCnv/LArTPCnv/LArTPCnv/LArRawChannelCollection_p2.h +++ b/LArCalorimeter/LArCnv/LArTPCnv/LArTPCnv/LArRawChannelCollection_p2.h @@ -7,6 +7,7 @@ #define LARTPCNV_LARRAWCHANNELCOLLECTION_P2_H #include "LArTPCnv/LArRawChannel_p1.h" +#include "CxxUtils/unused.h" #include <vector> /** @@ -26,20 +27,15 @@ public: m_end(0) { } ; - // container cnv does conversion - friend class LArRawChannelContainerCnv_p2; - -private: - + // Unused, but shouldn't delete them since they're part of the persistent data. // Identifier of this collection - unsigned int m_id; + unsigned int ATH_UNUSED_MEMBER(m_id); // Begin index into master collection - unsigned int m_begin; + unsigned int ATH_UNUSED_MEMBER(m_begin); // End index into master collection - unsigned int m_end; - + unsigned int ATH_UNUSED_MEMBER(m_end); }; #endif -- GitLab From 3018cc48f78872bd329c6766984499d4e2898af1 Mon Sep 17 00:00:00 2001 From: Adam Edward Barton <adam.edward.barton@cern.ch> Date: Wed, 4 Jul 2018 14:48:00 +0000 Subject: [PATCH 354/562] IDC Lock Commit 2 Former-commit-id: dddc676cb512acf93a79de7e3799c2f16889039f --- .../EventContainers/IDC_Wait.h | 22 ------------- .../EventContainers/IIdentifiableCont.h | 2 +- .../EventContainers/IdentifiableCacheBase.h | 1 - .../EventContainers/IdentifiableContTemp.h | 2 +- .../EventContainers/IdentifiableContainerMT.h | 17 ++++++---- .../EventContainers/SelectAllObjectMT.h | 2 +- Event/EventContainers/share/IdMTCont.ref | 10 +++--- Event/EventContainers/src/IDC_Lock.cxx | 13 ++++++-- Event/EventContainers/src/IDC_Wait.cxx | 33 ------------------- .../src/IdentifiableCacheBase.cxx | 8 ++--- .../test/IDC_Realistic_Test.cxx | 2 +- .../test/IDMT_ContainerTest.cxx | 13 ++++---- 12 files changed, 40 insertions(+), 85 deletions(-) delete mode 100644 Event/EventContainers/EventContainers/IDC_Wait.h delete mode 100644 Event/EventContainers/src/IDC_Wait.cxx diff --git a/Event/EventContainers/EventContainers/IDC_Wait.h b/Event/EventContainers/EventContainers/IDC_Wait.h deleted file mode 100644 index b5aa3076f023..000000000000 --- a/Event/EventContainers/EventContainers/IDC_Wait.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - - -#ifndef IDC_WAIT_H -#define IDC_WAIT_H -#include <vector> -#include <mutex> -#include <utility> -#include <atomic> -class IDC_Wait{ - std::vector<std::atomic<const void*>* > m_locklist; - void Wait(); -public: - ~IDC_Wait(); - void AddWait(std::atomic<const void*>* at); - void WaitAndClear(); -}; - -#endif - diff --git a/Event/EventContainers/EventContainers/IIdentifiableCont.h b/Event/EventContainers/EventContainers/IIdentifiableCont.h index 6d6b7bbc8ca6..66de8637bb95 100644 --- a/Event/EventContainers/EventContainers/IIdentifiableCont.h +++ b/Event/EventContainers/EventContainers/IIdentifiableCont.h @@ -15,7 +15,7 @@ class IIdentifiableCont{ public: virtual const T* indexFindPtr( IdentifierHash hashId ) const = 0; - virtual std::vector<IdentifierHash> GetAllCurrentHashs() const =0; + virtual std::vector<IdentifierHash> GetAllCurrentHashes() const =0; virtual StatusCode addOrDelete(std::unique_ptr<T> ptr, IdentifierHash hashId) =0; diff --git a/Event/EventContainers/EventContainers/IdentifiableCacheBase.h b/Event/EventContainers/EventContainers/IdentifiableCacheBase.h index 53c8d43a8c28..4bc2f0a1fc28 100644 --- a/Event/EventContainers/EventContainers/IdentifiableCacheBase.h +++ b/Event/EventContainers/EventContainers/IdentifiableCacheBase.h @@ -22,7 +22,6 @@ #include <mutex> #include <atomic> #include <condition_variable> -#include "EventContainers/IDC_Wait.h" #include "EventContainers/IDC_Lock.h" #include <map> //abarton diff --git a/Event/EventContainers/EventContainers/IdentifiableContTemp.h b/Event/EventContainers/EventContainers/IdentifiableContTemp.h index d8b9a8ea4fa9..51b21f550baf 100644 --- a/Event/EventContainers/EventContainers/IdentifiableContTemp.h +++ b/Event/EventContainers/EventContainers/IdentifiableContTemp.h @@ -42,7 +42,7 @@ public: return m_randomcont[hashId]; } - virtual std::vector<IdentifierHash> GetAllCurrentHashs() const override{ + virtual std::vector<IdentifierHash> GetAllCurrentHashes() const override{ std::vector<IdentifierHash> out; out.reserve(m_usedhashes.size()); for(auto x : m_usedhashes) out.push_back(x.first); diff --git a/Event/EventContainers/EventContainers/IdentifiableContainerMT.h b/Event/EventContainers/EventContainers/IdentifiableContainerMT.h index 08662dc87db9..5c214e4690f8 100644 --- a/Event/EventContainers/EventContainers/IdentifiableContainerMT.h +++ b/Event/EventContainers/EventContainers/IdentifiableContainerMT.h @@ -27,7 +27,7 @@ //const_iterator and indexFind are provided for backwards compatability. they are not optimal /* IT is faster to iterate over the container with this method: - auto hashes= m_container->GetAllCurrentHashs(); + auto hashes= m_container->GetAllCurrentHashes(); for (auto hash : hashes) { T* coll = m_container->indexFindPtr(hash); //Use coll here @@ -61,15 +61,20 @@ private: typedef EventContainers::IdentifiableCacheBase IdentifiableCacheBase; typedef IdentifiableCacheBase::waitlistPair waitlistPair; mutable std::vector< waitlistPair> m_waitlist; + mutable std::mutex m_waitMutex; public: void Wait() const{ - + //lockguard to protect m_waitlist from multiple wait calls + typedef std::lock_guard<decltype(m_waitMutex)> lockguard; + lockguard lock(m_waitMutex); while(!m_waitlist.empty()){ waitlistPair &o = m_waitlist.back(); auto hash = o->first; - std::unique_lock<decltype(o->second.mutex )> lk(o->second.mutex); + //unique lock is necessary for the condition variable to have access to unlock + typedef std::unique_lock<decltype(o->second.mutex)> uniquelock; + uniquelock lk(o->second.mutex); while(m_cacheLink->itemInProgress(hash)){ o->second.condition.wait(lk); } @@ -101,7 +106,7 @@ public: if(m_end) return *this; //If called on iterator created by "fast" iterator method const_iterator( const MyType* idC, IdentifierHash hash ) if(!m_sptr) { - auto ids = m_idContainer->GetAllCurrentHashs(); + auto ids = m_idContainer->GetAllCurrentHashes(); m_sptr = std::shared_ptr<Hash_Container> (new Hash_Container()); m_sptr->swap(ids); m_hashItr = std::find(m_sptr->begin(), m_sptr->end(), m_hash); @@ -176,7 +181,7 @@ public: const_iterator(const MyType* idC, bool end) : m_sptr(), m_current(nullptr), m_idContainer(idC), m_end(end) { if(!m_end) { - auto ids = m_idContainer->GetAllCurrentHashs(); + auto ids = m_idContainer->GetAllCurrentHashes(); if(ids.empty()) {//For empty containers m_end = true; } else { @@ -290,7 +295,7 @@ public: //If this is an "offline" mode IDC then this is identical to the cache //If this is an "online" mode IDC then this is the items that both exist in the cache //and have a postive mask element - virtual std::vector<IdentifierHash> GetAllCurrentHashs() const override final { + virtual std::vector<IdentifierHash> GetAllCurrentHashes() const override final { if(not m_OnlineMode) return m_cacheLink->ids(); else{ Wait(); diff --git a/Event/EventContainers/EventContainers/SelectAllObjectMT.h b/Event/EventContainers/EventContainers/SelectAllObjectMT.h index 6bbeacde4206..42a25c0f7c5e 100644 --- a/Event/EventContainers/EventContainers/SelectAllObjectMT.h +++ b/Event/EventContainers/EventContainers/SelectAllObjectMT.h @@ -109,7 +109,7 @@ SKIPNEXT: }; - SelectAllObjectMT(const DCC* dcc) : m_dcc(dcc), m_hashes(dcc->GetAllCurrentHashs()) + SelectAllObjectMT(const DCC* dcc) : m_dcc(dcc), m_hashes(dcc->GetAllCurrentHashes()) { } SelectAllObjectMT( ) = delete; diff --git a/Event/EventContainers/share/IdMTCont.ref b/Event/EventContainers/share/IdMTCont.ref index ba0415f5590b..5e8b13579b75 100644 --- a/Event/EventContainers/share/IdMTCont.ref +++ b/Event/EventContainers/share/IdMTCont.ref @@ -7,7 +7,7 @@ Full Size:100000 N Coll:100000 By interation Iteration over collections: user, kernel, elapsed 0 0 1957 Number of Collection Accessed 100000 -By GetAllCurrentHashs search +By GetAllCurrentHashes search Iteration over collections : user, kernel, elapsed 10000 0 1546 iter, hash id 0 nd, val 0 0 @@ -137,7 +137,7 @@ Full Size:100000 N Coll:100000 By interation Iteration over collections: user, kernel, elapsed 0 0 2060 Number of Collection Accessed 100000 -By GetAllCurrentHashs search +By GetAllCurrentHashes search Iteration over collections : user, kernel, elapsed 10000 0 1710 iter, hash id 0 nd, val 0 0 @@ -267,7 +267,7 @@ Full Size:100000 N Coll:100000 By interation Iteration over collections: user, kernel, elapsed 0 0 1925 Number of Collection Accessed 100000 -By GetAllCurrentHashs search +By GetAllCurrentHashes search Iteration over collections : user, kernel, elapsed 0 0 1734 iter, hash id 0 nd, val 0 0 @@ -397,7 +397,7 @@ Full Size:100000 N Coll:100000 By interation Iteration over collections: user, kernel, elapsed 0 0 2029 Number of Collection Accessed 100000 -By GetAllCurrentHashs search +By GetAllCurrentHashes search Iteration over collections : user, kernel, elapsed 10000 0 1651 iter, hash id 0 nd, val 0 0 @@ -527,7 +527,7 @@ Full Size:100000 N Coll:100000 By interation Iteration over collections: user, kernel, elapsed 0 10000 2044 Number of Collection Accessed 100000 -By GetAllCurrentHashs search +By GetAllCurrentHashes search Iteration over collections : user, kernel, elapsed 0 0 1764 iter, hash id 0 nd, val 0 0 diff --git a/Event/EventContainers/src/IDC_Lock.cxx b/Event/EventContainers/src/IDC_Lock.cxx index 11f7b69de416..84cb9fdf2b86 100644 --- a/Event/EventContainers/src/IDC_Lock.cxx +++ b/Event/EventContainers/src/IDC_Lock.cxx @@ -7,17 +7,24 @@ using namespace EventContainers; -void IDC_Lock::ReleaseLock(){//IF object has not been filled this will restore unfilled state - //If object has been filled this should do nothing + +//If object has not been filled this will change state to aborted +//If object has been filled this should do nothing +void IDC_Lock::ReleaseLock(){ if(m_atomic==nullptr) return; +//Convenience declarations using namespace EventContainers; + typedef std::lock_guard<decltype(m_mut->mutex)> lockguard; const void* waitstate = reinterpret_cast<const void*>(IdentifiableCacheBase::INVALIDflag); const void* ABORTstate = reinterpret_cast<const void*>(IdentifiableCacheBase::ABORTEDflag); - std::unique_lock<decltype(m_mut->mutex) > lk(m_mut->mutex); + +//Running code + lockguard lk(m_mut->mutex); m_atomic->compare_exchange_strong(waitstate, ABORTstate); m_mut->condition.notify_all(); } +//Can't imagine why this would be used but this may be necessary void IDC_Lock::DropLock(){ m_atomic = nullptr; } diff --git a/Event/EventContainers/src/IDC_Wait.cxx b/Event/EventContainers/src/IDC_Wait.cxx deleted file mode 100644 index 3b0d038d744d..000000000000 --- a/Event/EventContainers/src/IDC_Wait.cxx +++ /dev/null @@ -1,33 +0,0 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - -#include "EventContainers/IDC_Wait.h" -#include "EventContainers/IdentifiableCacheBase.h" -#include <algorithm> - -using namespace EventContainers; - -void IDC_Wait::AddWait(std::atomic<const void*>* at){ - m_locklist.emplace_back(at); -} - -void IDC_Wait::Wait(){ - - const void* waitstate = reinterpret_cast<const void*>(IdentifiableCacheBase::INVALIDflag); - while(!m_locklist.empty()){ - m_locklist.erase(std::remove_if(m_locklist.begin(), m_locklist.end(), - [waitstate](const std::atomic<const void*>* o) { return o->load(std::memory_order_acquire) != waitstate; }), - m_locklist.end()); - } -} - -void IDC_Wait::WaitAndClear(){ - Wait(); - m_locklist.clear(); -} - -IDC_Wait::~IDC_Wait(){ - Wait(); -} - diff --git a/Event/EventContainers/src/IdentifiableCacheBase.cxx b/Event/EventContainers/src/IdentifiableCacheBase.cxx index 8e9f066012b2..4f21e6b674cd 100644 --- a/Event/EventContainers/src/IdentifiableCacheBase.cxx +++ b/Event/EventContainers/src/IdentifiableCacheBase.cxx @@ -14,7 +14,7 @@ // In ids, INVALID -- conversion/add failed. // In ids, valid --- Have payload // In ids, null --- Conversion in progress. -// Not in ids, INVALID --- intension to add soon +// Not in ids, INVALID --- intention to add soon #include "EventContainers/IdentifiableCacheBase.h" @@ -217,7 +217,7 @@ std::vector<IdentifierHash> IdentifiableCacheBase::ids() const ret.reserve (m_vec.size()); lock_t lock (m_mutex); for (IdentifierHash hash : m_ids) { - const void* p = m_vec[hash].load(std::memory_order_acquire); + const void* p = m_vec[hash].load(); if (p && p < ABORTED) ret.push_back (hash); } @@ -238,7 +238,7 @@ bool IdentifiableCacheBase::add (IdentifierHash hash, const void* p, bool owns) // cout << "iterator wrong " << endl; return false; } - assert (m_vec[hash] == nullptr); + assert (m_vec[hash] == nullptr || m_vec[hash]==INVALID);//Can be invalid in the case of "tryfetch lock" m_vec[hash] = p ? p : INVALID; m_owns[hash] = p!=nullptr ? owns : false; m_ids.insert (it, hash); @@ -254,7 +254,7 @@ bool IdentifiableCacheBase::add (IdentifierHash hash, idset_t::iterator it = m_ids.lower_bound (hash); if (it != m_ids.end() && *it == hash) return false; - assert (m_vec[hash] == nullptr); + assert (m_vec[hash] == nullptr || m_vec[hash]==INVALID);//Can be invalid in the case of "tryfetch lock" if (p) { m_vec[hash] = p.release(); m_owns[hash] = true; diff --git a/Event/EventContainers/test/IDC_Realistic_Test.cxx b/Event/EventContainers/test/IDC_Realistic_Test.cxx index 6a677689ef8c..e4ee1f86e664 100644 --- a/Event/EventContainers/test/IDC_Realistic_Test.cxx +++ b/Event/EventContainers/test/IDC_Realistic_Test.cxx @@ -175,7 +175,7 @@ public: } int wrong = 0; - auto hashes = container.GetAllCurrentHashs(); + auto hashes = container.GetAllCurrentHashes(); if(hashes.size()!=(size_t) 1000-c.aborted) { std::cout << "Error container is " << hashes.size() << " not " << 1000-c.aborted << std::endl; std::abort(); diff --git a/Event/EventContainers/test/IDMT_ContainerTest.cxx b/Event/EventContainers/test/IDMT_ContainerTest.cxx index 6287ba7f5b8d..e0176c766720 100644 --- a/Event/EventContainers/test/IDMT_ContainerTest.cxx +++ b/Event/EventContainers/test/IDMT_ContainerTest.cxx @@ -4,7 +4,6 @@ // This is a test cxx file for IdentifiableContainerMT. // -#include "src/IDC_Wait.cxx" #include "EventContainers/IdentifiableContainerMT.h" #include "EventContainers/SelectAllObjectMT.h" #include "ID_ContainerTest.h" @@ -244,7 +243,7 @@ int ID_ContainerTest::execute(){ startOfKernelTime = System::kernelTime ( System::microSec ); startOfElapsedTime = System::ellapsedTime ( System::microSec ); // Access all COllections -/* auto hashes= m_container->GetAllCurrentHashs(); +/* auto hashes= m_container->GetAllCurrentHashes(); int nc1 = 0 ; for (auto hash : hashes) { auto coll = m_container->indexFindPtr(hash); @@ -274,13 +273,13 @@ int ID_ContainerTest::execute(){ std::cout <<" Number of Collection Accessed "<<nc1<<std::endl; - std::cout << "By GetAllCurrentHashs search\n"; + std::cout << "By GetAllCurrentHashes search\n"; startOfUserTime = System::userTime( System::microSec ); startOfKernelTime = System::kernelTime ( System::microSec ); startOfElapsedTime = System::ellapsedTime ( System::microSec ); // Access all COllections - auto hashes= m_container->GetAllCurrentHashs(); + auto hashes= m_container->GetAllCurrentHashes(); nc1 = 0 ; for (auto hash : hashes) { auto coll = m_container->indexFindPtr(hash); @@ -299,7 +298,7 @@ int ID_ContainerTest::execute(){ // Print out some hash ids via iterator - hashes= m_container->GetAllCurrentHashs(); + hashes= m_container->GetAllCurrentHashes(); nc1 = 0 ; unsigned int skip1 = 0; for ( auto h = hashes.cbegin() ; h!=hashes.cend() && nc1 < 10; ++h, ++skip1) { @@ -565,8 +564,8 @@ int ID_ContainerTest::execute(){ std::cout << __FILE__ << " cache does not contain correct elements" << std::endl; std::abort(); } - assert(containerOnline->GetAllCurrentHashs().size() == 2); - if(containerOnline->GetAllCurrentHashs() != IDCshouldContain){ + assert(containerOnline->GetAllCurrentHashes().size() == 2); + if(containerOnline->GetAllCurrentHashes() != IDCshouldContain){ std::cout << __FILE__ << " IDC does not contain correct elements" << std::endl; std::abort(); } -- GitLab From 7a400d65be13f4d5459d0cc1f1514d89b4434444 Mon Sep 17 00:00:00 2001 From: Atlas Nightlybuild <atlas.nightlybuild@cern.ch> Date: Wed, 4 Jul 2018 14:51:48 +0000 Subject: [PATCH 355/562] Sweeping !11614 from 21.0 to master. Pixel Radiation Damage Digitizer Former-commit-id: 2bd07f4d1662d57b0bd3152d7d384d8fbda99373 --- .../PixelRadDamDigitization/CMakeLists.txt | 49 ++ .../doc/images/pixelhits.fig | 61 ++ .../doc/images/pixelhits.png | Bin 0 -> 3900 bytes .../doc/images/timingfig.fig | 67 ++ .../doc/images/timingfig.png | Bin 0 -> 6787 bytes .../PixelRadDamDigitization/doc/index.html | 5 + .../PixelRadDamDigitization/doc/packagedoc.h | 237 +++++++ .../python/JobOptCfg.py | 353 ++++++++++ .../python/PixelRadDamDigitizationConfig.py | 249 +++++++ .../python/PixelRadDamDigitizationConfigDb.py | 30 + .../share/DigitizationTst.py | 112 +++ .../share/Monitoring.py | 34 + .../src/ChargeCollProbSvc.cxx | 135 ++++ .../src/ChargeCollProbSvc.h | 66 ++ .../src/EnergyDepositionTool.cxx | 656 ++++++++++++++++++ .../src/EnergyDepositionTool.h | 115 +++ .../src/FEI3SimTool.cxx | 410 +++++++++++ .../PixelRadDamDigitization/src/FEI3SimTool.h | 40 ++ .../src/FEI4SimTool.cxx | 186 +++++ .../PixelRadDamDigitization/src/FEI4SimTool.h | 31 + .../src/FrontEndSimTool.h | 161 +++++ .../src/IChargeCollProbSvc.h | 38 + .../src/PixelChargeSmearer.cxx | 51 ++ .../src/PixelChargeSmearer.h | 37 + .../src/PixelDigitization.cxx | 46 ++ .../src/PixelDigitization.h | 97 +++ .../src/PixelDigitizationTool.cxx | 437 ++++++++++++ .../src/PixelDigitizationTool.h | 95 +++ .../src/PixelDiodeCrossTalkGenerator.cxx | 96 +++ .../src/PixelDiodeCrossTalkGenerator.h | 36 + .../src/PixelNoisyCellGenerator.cxx | 174 +++++ .../src/PixelNoisyCellGenerator.h | 57 ++ .../src/PixelProcessorTool.h | 64 ++ .../src/PixelRandomDisabledCellGenerator.cxx | 53 ++ .../src/PixelRandomDisabledCellGenerator.h | 37 + .../src/RD53SimTool.cxx | 172 +++++ .../PixelRadDamDigitization/src/RD53SimTool.h | 30 + .../src/RadDamageUtil.cxx | 416 +++++++++++ .../src/RadDamageUtil.h | 77 ++ .../src/SensorSim3DTool.cxx | 203 ++++++ .../src/SensorSim3DTool.h | 34 + .../src/SensorSimPlanarTool.cxx | 643 +++++++++++++++++ .../src/SensorSimPlanarTool.h | 72 ++ .../src/SensorSimTool.h | 86 +++ .../PixelRadDamDigitization_entries.cxx | 31 + .../PixelRadDamDigitization_load.cxx | 4 + 46 files changed, 6083 insertions(+) create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/CMakeLists.txt create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/doc/images/pixelhits.fig create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/doc/images/pixelhits.png create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/doc/images/timingfig.fig create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/doc/images/timingfig.png create mode 100755 InnerDetector/InDetDigitization/PixelRadDamDigitization/doc/index.html create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/doc/packagedoc.h create mode 100755 InnerDetector/InDetDigitization/PixelRadDamDigitization/python/JobOptCfg.py create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/python/PixelRadDamDigitizationConfig.py create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/python/PixelRadDamDigitizationConfigDb.py create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/share/DigitizationTst.py create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/share/Monitoring.py create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/ChargeCollProbSvc.cxx create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/ChargeCollProbSvc.h create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/EnergyDepositionTool.cxx create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/EnergyDepositionTool.h create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FEI3SimTool.cxx create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FEI3SimTool.h create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FEI4SimTool.cxx create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FEI4SimTool.h create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FrontEndSimTool.h create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/IChargeCollProbSvc.h create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelChargeSmearer.cxx create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelChargeSmearer.h create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitization.cxx create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitization.h create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitizationTool.cxx create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitizationTool.h create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDiodeCrossTalkGenerator.cxx create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDiodeCrossTalkGenerator.h create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelNoisyCellGenerator.cxx create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelNoisyCellGenerator.h create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelProcessorTool.h create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelRandomDisabledCellGenerator.cxx create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelRandomDisabledCellGenerator.h create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/RD53SimTool.cxx create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/RD53SimTool.h create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/RadDamageUtil.cxx create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/RadDamageUtil.h create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSim3DTool.cxx create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSim3DTool.h create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.cxx create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.h create mode 100644 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimTool.h create mode 100755 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/components/PixelRadDamDigitization_entries.cxx create mode 100755 InnerDetector/InDetDigitization/PixelRadDamDigitization/src/components/PixelRadDamDigitization_load.cxx diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/CMakeLists.txt b/InnerDetector/InDetDigitization/PixelRadDamDigitization/CMakeLists.txt new file mode 100644 index 000000000000..68b6075f91f8 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/CMakeLists.txt @@ -0,0 +1,49 @@ +################################################################################ +# Package: PixelDigitization +################################################################################ + +# Declare the package name: +atlas_subdir( PixelRadDamDigitization ) + +# Declare the package's dependencies: +atlas_depends_on_subdirs( PUBLIC + GaudiKernel + PRIVATE + Commission/CommissionEvent + Control/AthenaBaseComps + Control/AthenaKernel + Control/CxxUtils + Control/PileUpTools + Control/StoreGate + DetectorDescription/Identifier + Generators/GeneratorObjects + InnerDetector/InDetConditions/InDetConditionsSummaryService + InnerDetector/InDetConditions/PixelConditionsServices + InnerDetector/InDetConditions/PixelConditionsTools + InnerDetector/InDetConditions/SiPropertiesSvc + InnerDetector/InDetDetDescr/InDetIdentifier + InnerDetector/InDetDetDescr/InDetReadoutGeometry + InnerDetector/InDetDigitization/SiDigitization + InnerDetector/InDetRawEvent/InDetRawData + InnerDetector/InDetRawEvent/InDetSimData + InnerDetector/InDetSimEvent + Simulation/HitManagement + Tools/PathResolver ) + +# External dependencies: +find_package( CLHEP ) +find_package( HepMC ) +find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) + +# Component(s) in the package: +atlas_add_component( PixelRadDamDigitization + src/*.cxx + src/components/*.cxx + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} AthenaBaseComps GaudiKernel CommissionEvent AthenaKernel PileUpToolsLib StoreGateLib SGtests Identifier xAODEventInfo GeneratorObjects PixelConditionsData SiPropertiesSvcLib InDetIdentifier InDetReadoutGeometry SiDigitization InDetRawData InDetSimData InDetSimEvent HitManagement PathResolver ) + +# Install files from the package: +atlas_install_python_modules( python/*.py ) +atlas_install_joboptions( share/PixelDigitization_jobOptions.py share/PixelDigiTool_jobOptions.py ) +atlas_install_runtime( share/3DFEI3-3E-problist-1um_v1.txt share/3DFEI4-2E-problist-1um_v0.txt share/Bichsel_*.dat share/maps*.root ) + diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/doc/images/pixelhits.fig b/InnerDetector/InDetDigitization/PixelRadDamDigitization/doc/images/pixelhits.fig new file mode 100644 index 000000000000..26728fe5e772 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/doc/images/pixelhits.fig @@ -0,0 +1,61 @@ +#FIG 3.2 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +5 1 0 1 0 7 50 -1 -1 0.000 0 1 0 0 7290.000 2070.000 7245 2070 7290 2115 7335 2070 +6 7065 4230 7380 4545 +4 0 0 50 -1 0 20 0.0000 4 195 195 7065 4455 R\001 +4 0 0 50 -1 0 12 0.0000 4 135 135 7245 4545 D\001 +-6 +2 1 0 2 18 7 50 0 -1 0.000 0 0 7 0 0 2 + 8082 1433 8055 1215 +2 1 0 2 18 7 50 0 -1 0.000 0 0 7 0 0 2 + 6660 3375 6795 4140 +2 1 0 2 18 7 50 0 -1 0.000 0 0 7 0 0 2 + 6300 3825 6345 4140 +2 1 0 2 18 7 50 0 -1 0.000 0 0 7 0 0 2 + 7650 1215 7740 1890 +2 1 0 2 18 7 50 0 -1 0.000 0 0 7 0 0 2 + 7005 2910 7200 4140 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7245 2295 7245 1215 +2 3 0 1 20 11 52 -1 20 0.000 0 0 -1 0 0 5 + 6975 2925 7065 4140 7335 4140 7020 2880 6975 2925 +2 1 0 4 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 0 0 3.00 180.00 360.00 + 8415 990 5715 4590 +2 1 0 2 18 7 50 0 -1 0.000 0 0 7 0 0 2 + 7245 1215 7380 2385 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 7965 2565 7290 2160 +2 1 1 1 0 7 50 -1 -1 6.000 0 0 -1 0 0 2 + 7380 2385 5490 2385 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 6885 1215 5085 1215 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 6840 4140 5040 4140 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 1 2 + 0 0 1.00 120.00 180.00 + 0 0 1.00 120.00 180.00 + 5715 1260 5715 2340 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 1 2 + 0 0 1.00 120.00 180.00 + 0 0 1.00 120.00 180.00 + 5220 1260 5220 4140 +2 2 0 2 0 31 55 0 20 0.000 0 0 -1 0 0 5 + 7740 1215 8640 1215 8640 4140 7740 4140 7740 1215 +2 2 0 2 0 31 55 0 20 0.000 0 0 -1 0 0 5 + 6840 1215 7740 1215 7740 4140 6840 4140 6840 1215 +2 2 0 2 0 31 55 0 20 0.000 0 0 -1 0 0 5 + 5940 1215 6840 1215 6840 4140 5940 4140 5940 1215 +4 0 0 50 -1 32 28 0.0000 4 345 255 8055 2700 q\001 +4 0 0 50 -1 0 12 0.0000 4 135 105 8325 2835 L\001 +4 0 0 50 -1 2 20 0.0000 4 195 195 4995 2700 T\001 +4 0 0 50 -1 2 20 0.0000 4 195 135 5445 1935 y\001 +4 0 0 50 -1 0 12 0.0000 4 135 435 8325 810 Track\001 diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/doc/images/pixelhits.png b/InnerDetector/InDetDigitization/PixelRadDamDigitization/doc/images/pixelhits.png new file mode 100644 index 0000000000000000000000000000000000000000..64bc4b168caed9ceb8e73beb6fbf3451744ae76a GIT binary patch literal 3900 zcmeHJYdF*W|DUjXX0lbwR|!LR+M+3^L=M{!cQLlfseGMsNRAbT$c$TyV$m<^7AdWW z99pU9tLeZ{GQw@7Na%K!!}zW1`aSqR`9J(W_+QuW!RPe;yx*VC`|x^S*XvK`qjpNj zZAcglrgYez>;i+yAfy9}*dUeU_D@Vo7ljCW_h=Xlb>!EO`OsE=R4UvNLpc`X8Xg#P z4vY$b*&U^8+69G2$3*)@1xLhan&=Zv9t>$M!C;DUhsoBo*uu%bk3^|G!B~OZRK*i% z+YgQ)tLK7k?@qax3HKz*rv;YWZ>@NqESJYiUbdF`v-Q;qGz47P^6B=n(I&d!$JhCI zc^}`FM-znD?NP4Dqj>>uUr0oLiDS8F_yY%-2O2Yu=jKwKawG(njGHgc;OgA^__;K? z`FL%>tSyx6IhNFLFJLxL@;V*8hKqNUiM*F0^t1tiiwM~^y_Ot{A2sWh^BM}WYhgTl zrBe&oabtw6`l|qNHgAIID*GwmONr{yDH-MizzPn+R9Q0qX!vF8|LtJjbAtR64K`-8 z<IwQd(0T@$CDUh2uUR%iLdoC_9)cxf(!2I<2iV9{_q@m=`nWXU@LH&z&iYI%pt7Q~ zT584_ds=Ickj+D&s2H#jRfXRGHkJ)IZLtR`tph`^py8;?YQ;$jg5ihMr`9V8j{le? zG6g3vNmI#wr7I1&yUrZX`#PUEcd4xQS^9{{S_|`MNz*6_TnW|~_&G7!e{8^Vt$tED zByKPJrS4Zz{^D%5>W`X%fR1z4Ku4%++85`Dy{M|8o8BxN;mK-0+4~4A0e;Ti@SNHF z+i*>zESD+^WZ|c>a!Qmo>c>5V7IV3ZM2lex?Dyg}3J+a+A=70@!)(cN8LKtijh1ac z;;l6N&M`w4EBdXT9j=#i9h>?(ittC_up<{my;4C9sn(|!8B2}^l<~B@P^kxyIczr! z&kd#Ca#ECF;~I-P@?Q6<cfM|iMVRy(b$B$F3gsJjy?3YZH`(6H9I4Gn#C^McH?t^& z3!R!PtnJZ8^>>EYxE>@^SVM(v(FyPFBUmXzTNoIG?3tT;$k!ilRRFEHYroR|rpkq) zi4q(BHQebX-DDV4{Yv~}`W`ZyU6w&y-JXPR^1`MNoy#jsHq+%GtMIxysdbU|MG}n+ zd=s3O-f1>5q;vmxOqSE+xJQi*5Y#@0#$w>xqMa$4oWn6@ukTKs(euEeYWx#_74Q1A zfz-1UV{<yjCU#sRztFDDPl~d>x&PhHak^Xz)-Sr-X)m(+yowpd^y-kb-u4`q6<Dm9 zhf|>v^?juUyd}-?5Dzf}Rx(US?qq6iZH`YYx`c}_9CrQrbZa?Bwe(tvTEvrD`!A3t z+$q5gWBM|Ebd`=_vtE7xZ!}bIWfp^%U+F5fPYazXmlgcn^I~-}^JlBuBqFUbbz3vj z7OKZdH8%`UdS_;e)~rLKeUyCn@SOs0;_#m%^xA|BX{P#(NYbDqLU`pA8^CnmkTl@t zJ@^XNjXEie`9VA>WK9<$!il3IEgb6cadFek+H}Lu%jc)n#I3&`l+%Fo>PfB?A3<Z) zf%^y^r0X5<rYk+?cd>^~CS<iMGCOiwyZer}{so?eZNm39Atikk`8qmSMLjXTT|9ix z_Y&3*InG>K4(hs^{nuu&RcoNza@|YyxcK~&#p>D~XG4dyzYPUyT?{XRuX0OBk#9zC zCl(&Rvbz6I;H^5H%yH@5eZ(~d&-j>j<v4?VfcMu2bQ;+kKvzG!aCFlGkc$uFcXEvm zTq3~tk{7(jZr(_AfQ0T@A6_Kjw>4RX-(6f0zMWCny`%J){wuC1FXrj+pr4wb;F{yJ zlJjdzuREEmHMv-@b$r>3IOM<6&>`Ub-Ory})c$$+`1u_6;SJIA8SuGf*YWO$KZ9$1 zy-fQ2&-|lvy*KxC%cCAiw+FI2#bg~H>h$9Ch#8^JatV_BiyDFq+q=0CeB=^OLrM(e zl214>!gfFTn2&90NK&2@&f5Ql_Z~D23D!c5%Bd%N9$}2*jn{G6MDxwt9Y2g^eK%jA z`-=%|VjynnTi@`h!7{=Zg{E?<-K7Mz>iGJ#m_W03AI;E-svGquWwDI8Nd8&L7P->L zjdDBf%op3A`n<`eW_C5+A3Enyl8fE-^BFZ(<(ZND?kAFPHxW{_nILUv_x5nk7g}@X zQ2GeI;vhfc*v!Gt5#>&{_d8OFh0gn~*INVX$25w!4ER9A_IRurhD})G0gq-kvcMY! z<!N<yJ9na*q%dDGw$)Psqt*SQkI+`NPcFtpF(}*$4~=W&IY+?IhntPp+9_5n;U0E? zPY*3i)DTVT`6R9}3q;Z1Xrh|RiZ!50R(To#5mRvvo4_6`tV*p1ZHcmzS>{{bNrHnw zqp0|{*iWv6dlp3{q1hoc10;CO8k>V4JrqVws~l9aX5IRDCo?lY_tj?BEesuH2lPr7 z2@N{?VPKi7S?Kg=w@M$%fOV_oPG&fcg<cDMkG2CcBSbdJkaNfhf#vz(ugouK_SR43 zf`%9A>ks063UF*9%_rjnoA~h-QVBuIcfqP%+hhx*{w?uVtW({G@YAW=8iHviV(AgD z7$~r;(c_j9$eI4q&HogL(B#O(M#)MLB#(J^fp%Taf3(?Uqa>O+QD9tR0$p}BA%|6H zvrrHkdSdR0@PqL>vWYr1W{2tz{n8*n-?DJ;w4iVI?XX@3JCliDDj9$cuw(wkTxyuD zCF{MSr(!3f<YE#%Lcm2ym1`j_D9CAs7geWv18wWK&r>n0XTcWGn>^9|Sy6e^7-PFv zsT-+ZdDRXOa+cHRb*dI<+wD0g^-O&U$;55C^y%Mz3lVB@nqRefMELLsQ0(`ZP+Wvh zW|(a>YZ{?Kj-vqcWsm_BMB*bi{xNS0T-Co>i$3_vSv{!imVd_QMw%rn(vu?fH((=Z z4zc?P5dY*yd8%85wtvBUG}vF{ABu_m^){dP6j^cYQ3f%D_5eH45QgJ8etcotGm@d# z$6+9b3wh=8{^(`}-nGqOzq7aeN_aG4IHR|m!nN>iF)mSnbVCl2BYobXp*Q<$Y6o2) zb*aq=zC!`@*A;sd`W8&9fv3)FD>fwtD1xgtvmz~KieCPvvo-+5f;ZU6#j>Vf{t)?| zmj>5NVoj%x;E*#2Z8=`!M(|YPkA;67AO;{n|GKT-kKYI_<Hj1d^l^3tDyQO*?yl)W z_oSYOgnlQA{%}hf8Br>U5fzVbb&p*a8kh9m24lAscQnNTEjb#;9mBiBW3gU9u{aKR z*xhnk_O1i{+p~Z2ZkFXbDijo)=00Lt({|LUp20UAlahc(i@HV$8Q(Lt>y*5aO|K10 zZzJ_l2H;aF-mK!nihc-GX=)eT=V5>P$EQFVe;a!&*x@a@3;Wxh-Wf{=y4$VU3_bt; zjZL4`uJXMIB2!}5yGz793q@g}n783llm4%9T$dNMKD5q>vj9VMDP0QOvr$V*O(QVc z^0g0rgtd2TK=<DbQBz$zR?hw$SWlZ`E<ImAo#1J%YtgZN;IM|NJ%SGnsi)$n3Lg{8 zHXL~-r4REivZYK*deQYRthT4X+%sY>(1>Hf);09s$B{%?V}n|z)Jy!?cn8ujN?eap z2LIsK+Be8oe)63ZXP7P6-V>?`&{tbmpPQWA%c&i{NdDdHa7Shp_4{DI;3fT7qc_`) za|*WK&0uzMps)(7-MhYFIjO;*tI=Z8WFWirerR?!we9SvDgU%ayQ+F=F+aYQL79nv z-s3gz^E>CF)6+wA?At=|8Mi>lv^Hs?(0Sp(M&2jH@SK=AqGKFXqOcuQE6L0d+LDa3 z9CoZa7VsrP@3`X`6V<%7rD2|rCaOZGye_WSUf<wZ+jm_-!)f`XpzdI0?Ru{%WzIlN zdX*g(U1Ww@$N~hd6qe4kT6*NeY7CrCD_FokN}p4&ut+>)RHV_x<XB+=@|bSGvb=B* zwrHtITG5q9NvUb`x{Tpux%|<=NGWxP!46Z7k}GU{F8uj_&G$ES{fF;&Rw==7=*G&? zMe$PEl@BD)>GJQPfrkd?#2b@URAnz1XafJ8{+omU7dU|6_qybF&D@M`{hz(`Z^XPn A-T(jq literal 0 HcmV?d00001 diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/doc/images/timingfig.fig b/InnerDetector/InDetDigitization/PixelRadDamDigitization/doc/images/timingfig.fig new file mode 100644 index 000000000000..87195c42dfba --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/doc/images/timingfig.fig @@ -0,0 +1,67 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +6 3150 5595 3296 5780 +4 0 0 50 -1 0 12 0.0000 4 105 60 3150 5700 t\001 +4 0 0 50 -1 0 10 0.0000 4 105 75 3221 5780 0\001 +-6 +6 3726 5586 4480 5800 +6 3726 5615 3872 5800 +4 0 0 50 -1 0 12 0.0000 4 105 60 3726 5720 t\001 +4 0 0 50 -1 0 10 0.0000 4 105 75 3797 5800 0\001 +-6 +4 0 0 50 -1 0 12 0.0000 4 135 555 3925 5721 + 20 ns\001 +-6 +6 5282 2991 5928 3229 +4 0 0 50 -1 0 12 0.0000 4 165 135 5282 3126 Q\001 +4 0 0 50 -1 0 12 0.0000 4 135 465 5463 3229 intime\001 +-6 +6 5250 4125 6150 4350 +4 0 0 50 -1 0 12 0.0000 4 165 135 5250 4275 Q\001 +4 0 0 50 -1 0 12 0.0000 4 135 705 5400 4350 threshold\001 +-6 +6 5250 2025 5625 2325 +4 0 0 50 -1 0 12 0.0000 4 165 135 5284 2181 Q\001 +4 0 0 50 -1 0 12 0.0000 4 135 90 5465 2284 2\001 +-6 +6 3300 5925 4200 6225 +4 0 0 50 -1 2 16 0.0000 4 165 870 3300 6150 t ~ 5ns\001 +4 0 0 50 -1 2 12 0.0000 4 135 90 3375 6225 0\001 +-6 +6 3782 1800 4488 2038 +4 0 0 50 -1 0 12 0.0000 4 165 135 3782 1935 Q\001 +4 0 0 50 -1 0 12 0.0000 4 135 525 3963 2038 infinite\001 +-6 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 3000 5400 3000 1800 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 3000 5400 9000 5400 +2 1 1 2 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 2850 4500 8700 4500 +2 1 0 2 12 7 50 -1 -1 0.000 0 0 -1 0 0 3 + 3000 5400 5100 3300 8400 4500 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 3 + 3000 5400 5100 4500 7800 5400 +2 1 0 2 2 7 50 -1 -1 0.000 0 0 -1 0 0 3 + 3000 5400 5100 2400 8400 3600 +2 1 0 2 8 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3000 5400 3900 2100 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 5100 5400 5100 1650 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 3250 5409 3250 3759 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 3912 5403 3912 3753 +4 0 0 50 -1 0 12 0.0000 4 180 750 8250 5700 Time (ns)\001 +4 0 0 50 -1 0 12 0.0000 4 105 60 5100 5700 t\001 +4 0 0 50 -1 0 10 0.0000 4 135 270 5182 5756 peak\001 +4 0 0 50 -1 0 12 0.0000 4 180 3555 3963 1376 Decay slope and peak pos. ~ independent of Q\001 +4 0 0 50 -1 0 12 1.5708 4 180 600 2700 2400 Voltage\001 diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/doc/images/timingfig.png b/InnerDetector/InDetDigitization/PixelRadDamDigitization/doc/images/timingfig.png new file mode 100644 index 0000000000000000000000000000000000000000..24ef6a35563c1bd5691dfc8d5910f6be163c56ff GIT binary patch literal 6787 zcmeHLYdDl`*B+A1Fg6)OLo~!QLa2G{vm4uDGRb4K!HkN*WE--tF=H6ng!B|KGe~4x zwxOCaDHVgH$Yw|+n;FSt6W)1__x<s`-}mSH^Zogb_s6>LW1Yu+t!rItt!o|YKGWP# zjvycu2mk;;&Q5lx0RW*|fw+nb3lI}h^n~Cg5$fa>0RTw3{w+cSz11iIcp%aq6X_mu zIWig>ehJ`+@;K-i5E2m?;TMh%jXY?4#K8CwSA7EjP`K%AXLBZ|aB&PDK5f=O#@0>i zwghT=m|xzt{*!DYE9@*~+I}kX^LLGth~E?P|4gYMO#B4^ENzGUlm@^*HW5afhT^!A zc+BH%#H>DQU1xgd32$5NN!*xmT(H6D$`?<D@ox3F(6<3+W)ndQ(si2u{>ihHUQen- z%=zA`dh<Y*@>+tT_txr|(}cPCA}ww$)pC6P#pS0HGl-oJolsZ0QM`JB!b`<~sMq}B z?vTf7HBIijL)RXA8e4@txTK*L;{EL2x9aq*!Is9Jv4_inTM6-NJj;*4vAOF%HeP63 zN_%NiB%D~I>C4v_JmM0Y&uresoyzO9&)T&x8ubRhpZLfY(H?K#8LcX+4bgj=_3di< zz`3EVuFZt@*i}o*b{V64<A<~^%=lzZx0XwK-#~59wome#KPfW|4;&tDZ7c0mo;`l; z>%6`<p?$}(b_u=RPZ5&Kr4JV!wv2369bbEAG`{wtnj?viL6&tpCsnMbvD-?<&os6F z(0RDZ2d%~QL^bl)nj@psbg~@UK8c07w`S?9jT_%P?z1sn-Ef7meX3;d-fQnX(md5( zdR*~PQz{#N=u*;K@T8z(6o133u*4&(Hqp44u-N`WYz)V*X|#$|tNr0Ch!8&hVsEt7 zVhh#txpFD@(DH9KKm45&cIiB?JG?RTCsG)`RMF9r*WENd)j|F;E$RZ0wa$7nTea*1 z_U;#-IR4fKDr_wt*#nTxAp>NE@!|kEfxxl_%KsLa+y6jv@99z)AjMi>tE;tE=%7d- z5<qc60>rN)Rx|v1tkV%9$+80dUzkX8!24Jh!M*O5;qi=vNg+Z~`NQPVCU!<l(sT4W z>`hDDmLfM!()Y<5)F-5M>CckXEy)txtIydO^z{c4PTQXCd4EX&LRLl$f>eF36rI^y zV$X&5g!#fSS&vu8kGDMNmirAL3jRv|gq?XB5~C-S^Kv^Z-t;MIrc>qF=AE>&s<O{p z<2@$pQM?$LZesP~g^0DUik+GI9rvO`Ot@Nra&0yD#6mf4&|aTS;>DZCuCHxoo{)8` z40ZX$-P$<ZI2d?D=QeV{$KT#(EyVfPVpwi4mhmge0Px!iLbta!rkh+G@p5yu1QV=k zobw|K)Tf($xYpQ(Pu_psQ6am0%?oVmk>O#%Ojfx@c(wI-Y?{^6O;<T=XPx;*!H7F{ zKJCxEcne4C`IU&C_ET@4{sc#;sC>=O(x#fNrp+{T-cQoSp5{jM@Ws5BoWhPc-TAAC z{H;4T;eM9y=uXWz>7j}x+nOEypfE8MH@2fYtp^mk7&vPz0<hW{B73^Zb14<;IfUo8 zlJHLRB-yp?;rR=)^BBWK6|0AZlDCHU<+WLiR#heKCP;%q*ndO~q%Smoo2l_Ott)M3 zk_&$CJv@8E<y2s+Z(p)1u#whR@H-(~L*Y06UR9-)gdR7n-Qsc-2_n_vg0vzu^wGHD ziQdNy9`Z~tNlQ=d_cm~=4wY6;t;Lhc%ilI@>?RlDem3?M=o7;AEq$!&zC1N5wOJ$o z26a-fq%xi7g-jw_$2oo7XeFqycz#IQikq^T8no>IWRE>5;v-L5Xp)mP!of-pXzihN z&XT1WvH<DCzL2?u0HvnsU9#-j<kDWiMUx<+-&VBv6)bi4+*8Nrwlg6G(ac4TLAiGZ z6Ct~2NL?l3F8TiG7X;9~OTCcczNWcI(tifkUEn8myUvwxuMduJT3?3id*3`Qhgx?< zrXpEYs;!yQP*jWyvKYzoN8eG0VDEJ!x=yk&hvaERgNW4+T8ewVZ{La&rPg)fp>0Ro zq8LOnXlZ~m%L$dn$yL^mb6QSdO_qW?A7N4)mI7Im_<)vQ>!L(^_>>OlLgVZ39z(N$ zib);NfqnTVUFwH4K!mg78pHKCIpNlmNEsySWoS-lx{oL|n}vq9L80@uVju~XGMaql zQxr~4a^q}BK&NY`0%`h#a%XqC{aZ(Zc)yY^4yuoz!v<8eIo2?UFGaiuI2NqGy*JEc zAP^RaNE3HIwt8Dc4q0{N3vUv<EByCrU%8GJC*&xcDtrJDdk}P019+@UUG+!9IETmK z8NU7wnh-2nYVc8pszOgIHTl+29M%Rohv__sSwQ?3br3!`>>wnJZ4VtmV%Jr5AUTHj z$y%x8j`3!rf11zXBc7!0VGubstVHNt73d1&Kq@Bk%}OjXju1Za>GtAJ@^U?{UwNyM zwm)OT6I(YYf)_{7h(>)e(7XEud-mAqp1ouQ(gT4s?XYGSFXB;M>Gpna%VCy*GL1^4 z?w`#B4Ow?72%)Z!Y&3Earr-!o+Uk_2_(yU^yimwJDR!_cFi3ubpx9n=LRaSner3K) zx4%#UDr1xwB)^~oFAutHaoo;k6-ooO4;RyjkY3*h!6mM@AtXaFKk>`m1u{3~oNtk- z(s#9DO^JAl+<>*Ns%wo3?sD~%f+&@qO`dYmky;iV>|DlcdDAxIl24<B??oUxkVyRT zl}{dIh!{2O5^i&JAvGfMvSM4M=6>CpOM(MQfk3ZD=6g;rE;Nreq0frq!sLSR6(e7m zZY#6ST}vM?#)D(Eh!My#!cqOzWAj~mh-?X|a+<?epHE&jWz?(8KGBW22F-$+syc)} z+`Xt_jYgYi@|<dVWV-uiPu3(-)kUcqcTOP7=5qK-M0Vz*GFlsr%Pi2>yrUTp-aKxO zujp_U9cK^|i43?-^<q%dGna{XQ!#J$L<J(ResJV2mqxAIFZ#+8*-_;KZeyI#e8%C= zNsIj1)mxXIl5&)E6A^*V!(Z6Auz(6UNO4F005N1YKgst<P+^+=XhY4P7^#<mNWDXL z+zroe(iy61X#31t6rrNb;QV^S8#-?~BJU6CMfx>-<J>X%hoE7MDv5^ez_uSPqsvP{ z^xl)x$>gfoFDHoc(Hdg7exp>PeIV=F8Aq&d-CPFi1wCgZo5@?r@^<8I%~D>_b-s#G z=Lg+R-qY0sBA?Atq(>B32M|RoQo@Wn4YL4Gsc23q&2^A&V6WST(}(Cq_Ap1kY>=>i zU{p+|l5QJ4p{~LlG$R9IJ8)g3AQ$@0F{SRR0Xq_TA`aLRVw6LOSaqjSsll(E2z5ps zC9q#XZ%Dn73twS`atj6&s_c*UAJ&`2oH?(2LKWJR#jHbsj^(A-Q1lcYf`*Q{VGJ>m z_6xq~Xo3@VT?;t#p6q{yS|jdtm+?D@-Sqk_-QX39wMPeH2r6p$V_Es)23pCaTU|>X z6nFOzCFmW6ai*`FJbWpytnszo-~RO%^&r3|h{CAzkNm)uca#&m1lO6P{Z}a*_)c(B zy`Ov_3rixeq5~L4Z#g#8hJmc+JO`SGO2`Yp%|Ij`$&$dEz=5tG$o>Lblo6gn2U;ob zk#T(13w7wjM<5cIT*=_*iBenWx*+?;*NnkzxJo+4&cW@0E;eJRQ%02T#@y2>JNq{T zJ&ZdD3={0?<o4imcy2$ERi2>qt3DTxo@+O1w-sBwU5+R;Km?ycE~1s3Sf?oVA#-`l zhVrC!LEemS1hUA4Bi`qb;8=%;0jiBOaXVUk{MSB<-y69r`Q&LJlJ2HmY40a8MBYc< z^xX123e>citTe<R9NY+)XRixs+%JgpTRSk&7X8e7lp_=sluP~lt37xVsrrh%5|o!# z6`B%eGEN8MF}aD~uJ*m#N3t})ytj9IaDHs$Za!H9h#cQ{rQb&K!9kE`bu|oVC|(bj zFACo;Sf-@gbEv|o{ruR`dRNOeS{xLZVVkM_=0!oXlQjV|2?N4_vzR>VSc1v5fEL2J zx7IRfCjuNoWNTJ{y7wuQvNK*x?E?m~{&dXsBYdnf0IQM&rEP#Iw048uHagnux@2}l zfN?0&v2e4Qq|L;I6nK|-BnO#8wu;o2O0&&y(9Jwp;chu`afHL0%b74<Pp4<M(ln(Y z6S?=uKYFL~GbDXPQ|NH1chOO!x0?5V(^e+3jpy>7_A8KX;=rmfCsS>e1FOpPAl7RV z_nO+3U`H(2DB)TpHs0o7pl##F-m8R<LC!Z{!c*i6{pyQKMtHOD{G~uoOKFP*ij6eG zymW=cASAtxVJzp&vJ^A~U~40n!_0;UM_Q)uJ0a%bgzTt*$lMq(xE6GikeiiNR5)0d z&<wKURx227b@~gEjy#8{pKEqcbXS5>m{EpeRJ2l}C@yw;;j8C4l=0Q`r@go_joR(q zrjW5R?w0B&53qxyQ<;KSM(e5-tIu{th44wVZ&b#L+PR>A+3K&3EQ*B;gcQ|79Ql%k zUJq;5v&W`p!S0*QOv%vBoFN|)8B{~PK|RxNKj9!X<6j3q0!ozz`IOVj;8HpR27+-9 z)HkfZla45S`^y*Y_P}D3JvN}RmB!?J6RIse{ma8B$|A95!6UXPa$3*0+eFY?1Z7&Q zERE0g$&_5Qhw*N8NS}2R<QXkq_{n@+y~5~olU|Ay_Bp4n!$9{@&|_s%#yF>7?FD^% zgy)(SYy!N#^h5^29wH}53g$vo%^Eijl=>51YSiU6FG^htV(}^r5Nf370RrvzATKP- z1uT33Z`w_-K()@c1<_@*orA^nbU^0PpyDzZTHHlL4^mc2OJQ;@fUlgJgabun8xXTY z_-_Nd?Pje`KW36_*T?+KVV8Y3*{AeIC6a8#!xU}b{QT*iXfbhao!`gS3btx3e4}=L zhg>nji!Oc|`OLtg(sr7P8c=kLJ#lA2O_Y@d2z@tVIAe@92`oOe{wHxGB<tkVP-j)} zV3q_gmx9PZvZP00z+=%=OPpM0niK0tW>(SXmNYK>ks?t|j>?-&s*0X0PS_o~<U8!G z1YvNPoY2w4l;NMp1KS>lN#ae)N5!PPe3YZ`xyx&>M5~znj<yvL?ARtEzAp~k8JxZ> zn85P#P^N{70O?JgA^4f7+Z$iY*QY)#FX_4>g5}W4og3mk)l80)2b^&2;E=itrjV?k zN?xLehP%fr){DQhdry|H$g<^{-hn}A9D(7_S`+I{@*QY+wRR^JlcM^4kQcff@y?I# z#))O|*^}?hPwLvX=i}F70zU54%jbL0YRcD-;N(tARDzZ_F-nK2wu`R(3tj3dUWMdu zoH~B+*_+2#9>dQ^IMmv+OY#N_<fz$LFQ{cuZmI)Uxar>1Q;NNAS&Mro{UEU8cXqTK z6=UNLZ32@A7}+=;1Scn7?ZP^z0~&IKnXZf0Q}`cBv0(x0;q(bj;Fg+)>}N35Bqdz2 zo`Q{x>`{|Mrg^~FlWtw=vFC1+7YPlW@Izw$>X81ll99TWUyIY-s7(iMm1fM1dsFJ# z-$8LO2*39RBED{bS80%UTH&-*x~=Y%oJ}LwtHTi@NBUB7u}ggklS|e^BKy%5)!J*B z7(3!8{Kr}46^H|jT@u)(UL!G|H<*@KW}pHkH8Ox-!#VF^d4f|Fil1PyD&g%PmG9yP zDfaPR+2p=c+g7H)cM8M`7-a0;W<t+T8unN0L=`g>1-{a4&Sn1v4x%l*VLaf*(K~Jp zY1iJgO&9)U-8lDl0TIv9>Z91+#hsC*TE40Tu^t+zsFJ*-2V`kCFbIM-G*Jn9JNC<U z^s5|PyI?XrL^t}SNZQJSKQdz1+@5T0d(4ofl3iR`%Km()97#&dP`bWiq7?Dy$?I9w z)(G$b*iQ?Gu4Wg7LrMI|xZ@07qG7;dUXn-6(t>ao-AMf_IrR$K$z95nVz2qNjC(Br zW0CpmFc6;(+g}eK%|Pf%gC4`<&j~_kD~Cgu+D{zZ{4t8cfi1@%rs9nhduOepMp{eL z*NGRowUxYaJF6|-ga;8iEoPOI^Svj!AF7LB_<HDXVPC{RN7)CZ7-!G>$3QP5S)OPo zX{HP=tnHFca4$Nh^%r3(2j_W`cYe%^O<{XoF69~`EP$*JmDxC16Im+prYq}-Yo{XV z%fV0*M#XQ_nDT*<Ju_%+j;pWo@+VLvrFO}o3M4S`xnCDfhBX*Ek(5AT*7{$O`Ce?{ z>8K#Et50Doik4$lpyg`j8*(HB`?*QiRKnx0<fL49skUf23~~>&b8&pfJmnCus<<qd z_p@`~8W!pq4T)c0X7G#Mca+yAygO?TxFuuS4QkwX<ad1@Nh3>+ilu~ou=9V%*?>=d zY~^-tZ#_ot0+T({>jSn4_sD)OFVV$kE@|zxrq&B63A*l5o{)8BEMM>!1Aw_~X#oJT zng5+up!^%qM+e+_6tj<*FfozzB6<swK79U9@`-0-zhaJL6<HNaA?3>YgwJe6-%hC= z_Kp{Gr80Fo&1U}c|KMEQq$~0oT*BTc8rbgm!7oxh*}uTN)QJ78@S5ZtHj#NU)A3lx zNb5*Jycm(}FO*nXhBK^A_i(xt)O{5i(x3}^njvw;>t}Bg?~%)~T`vIil78>>_Gsdd z(1`SzIrxcbbE|~)UJd4|=S|qkq!;?S68mtpPYl0fH_S|16Qt96%xg2Gf2h~uzLk-s z4!|-tRHSvM_d+~avpVrylqY5Nj`PTFVtnkBLg|cey^5%oNjh=$R(8AeV;vRku;$-Q zcWKP4huV)l{`S1(LQi@_tW9j=Z?iwrJliIFd@)Roq^O_iuXn0(lj7IGwZ?_|<|E3t zJ~VDu>{kC2!b^BPD_6-^Kfa}KUHoKxweef{i3*Q3eXhFNw?{C?t+>`0SM5fa2U&$} zc!kf}ldP#ekgZWoFFj?$_rI@k=a4#xMK@O3tDQ{zZj$}@6<S<XHs-4tNN93$^UhI# z%0Fo#k>r2Rl^}8d190jw4ZhsAdH)Z<{j?g;Y~krVxQMLE2Xdi1#5(8mNN51|Roa5k z#gzLKykB}njONcP3Snc>qRA?@L9A6BlcmJe)oQCqRNI2SYEk3!5Rw=t=V2?>rDoH( zWtjS6^R|TDa|2o<*U#&$hkC8yNP}6<bq(MA@)6#2v=V5uDW=m#iDzv?h*^EMtUR>% zhF`2^{7Uio9+dd;a+Mk@!<D1=(%sn$%qQYA$wwzsJ|kSpB%I1beMR;b9R;}j&4r1d z9WeM##pen|J_sR!(Bi%+yL*NMF6IwI24VyZF2LCyWmjYCdn4`tngbRQ{}%`Rz8;ip z4d|+SzGH611_|w36L}b36d}Ccv9$<DJ{5{g4o4=3{pb0g2>d4k{~sezDR$R&Z-Gel K)xQ7Qe*OXQ`#+li literal 0 HcmV?d00001 diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/doc/index.html b/InnerDetector/InDetDigitization/PixelRadDamDigitization/doc/index.html new file mode 100755 index 000000000000..9cd14389acd4 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/doc/index.html @@ -0,0 +1,5 @@ +<html> +<head> +<meta http-equiv="Refresh" content="1; URL=http://atlas-proj-id-software.web.cern.ch/atlas-proj-id-software/ATLAS/digitization.html"> +</head> +</html> diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/doc/packagedoc.h b/InnerDetector/InDetDigitization/PixelRadDamDigitization/doc/packagedoc.h new file mode 100644 index 000000000000..be730330a4d9 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/doc/packagedoc.h @@ -0,0 +1,237 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/** +@page PixelDigitization_page PixelDigitization +@author fredrik.tegenfeldt@cern.ch + +@section PixelDigitization_PixelDigitizationIntro Introduction + +The package PixelDigitization provides the simulation of the pixel +detector response. It reads the pixel detector hits generated by +Geant4 and 'digitizes' the information. In addition several other +detector effects not necessarily related to hits are treated. The +result is output as so called RDO objects. These are then read by e.g +the clustering and tracking algorithm further upstream of the +processing. + +@section PixelDigitization_PixelDigitizationClasses Classes + +The package consists of three groups of classes: +-# main class PixelDigitization : the user interface, reads the input hits and generates the output RDOs +-# surface charge generator : generates the initial charge collection from the Geant4 hits +-# charge processors : simulates various detector effects and operates on the current collection of charges + +Together with SCT_Digitization, the package inherits functionality from SiDigitization. +Briefly they are: + +<table border="0"> +<tr> + <td> 1. SiDigitization </td> <td>: contains common framework with SCT_Digitization </td> +</tr> +<tr> + <td> 2. SiChargedDiodeProcessor </td> <td>: charged diode processor; all charge modifiers must inherit from this class </td> +</tr> +<tr> + <td> 3. SiChargedDiode </td> <td>: a class that contains the charge of a given pixel element </td> +</tr> +<tr> + <td> 4. SiChargedDiodeCollection </td> <td>: the container used internally to keep track of the generated charges </td> +</tr> +<tr> + <td> 5. SiHelper </td> <td>: static class with members operating on the SiChargeDiode status flag </td> +</tr> +<tr> + <td> 6. SiRandomDisabledCellGenerator </td> <td>: disables random pixels according to a given probability </td> +</tr> +</table> + +<b>NOTE: the current software design of the charge processors should be migrated to using (private) AlgTools (F.T, 26/7/2007)</b> + +In the table below, all the classes in the package are summarized. +Columns 2-4 refers to how they operate on the collection of charged +diodes. + +<table> + <tr style="background-color: rgb(255, 255, 153);"> + <td style="text-align: center;"><b>Class</b><br></td> + <td style="text-align: center;"><b>Modifies</b><br></td> + <td style="text-align: center;"><b>Adds</b><br></td> + <td style="text-align: center;"><b>Removes</b><br></td> + <td style="text-align: center;"><b>Description</b><br></td> + </tr> + <tr> + <td>PixelDigitization<br></td> + <td style="text-align: center;">X<br></td> + <td style="text-align: center;">X<br></td> + <td style="text-align: center;">X<br></td> + <td>main class<br></td> + </tr> + <tr> + <td>PixelSimpleSurfaceChargesGenerator<br></td> + <td style="text-align: center;"> <br></td> + <td style="text-align: center;">X<br></td> + <td style="text-align: center;"> <br></td> + <td>generates the initial charge collection from the G4 hits<br></td> + </tr> + <tr> + <td>PixelChargeSmearer<br></td> + <td style="text-align: center;">X<br></td> + <td style="text-align: center;"> <br></td> + <td style="text-align: center;"> <br></td> + <td>adds random gaussian noise to existing charges<br></td> + </tr> + <tr> + <td>PixelDiodeCrossTalkGenerator<br></td> + <td style="text-align: center;"> <br></td> + <td style="text-align: center;">X<br></td> + <td style="text-align: center;"> <br></td> + <td>generates cross talk<br></td> + </tr> + <tr> + <td>PixelGangedMerger<br></td> + <td style="text-align: center;">X<br></td> + <td style="text-align: center;"> <br></td> + <td style="text-align: center;">X<br></td> + <td>merges ganged pixels<br></td> + </tr> + <tr> + <td>SpecialPixelGenerator<br></td> + <td style="text-align: center;"> <br></td> + <td style="text-align: center;"> <br></td> + <td style="text-align: center;">X<br></td> + <td>simulates special pixels using special pixel maps, simulated or from cond. DB<br></td> + </tr> + <tr> + <td>PixelTimeWalkGenerator<br></td> + <td style="text-align: center;">X<br></td> + <td style="text-align: center;"> <br></td> + <td style="text-align: center;">X<br></td> + <td>simulates the timing of the RDOs<br></td> + </tr> + <tr> + <td>PixelCellDiscriminator<br></td> + <td style="text-align: center;"> <br></td> + <td style="text-align: center;"> <br></td> + <td style="text-align: center;">X<br></td> + <td>simulates the discrimination<br></td> + </tr> +</table> + +@section PixelDigitization_PixelDigitizationFromTOTtoRDO From TOT to RDO +The order of the following subsections follow the actual order they are executed. + +@subsection PixelDigitizationSurfaceCharge 1. Surface charge + +<em>Uses class PixelSimpleSurfaceChargesGenerator</em> + +The algorithm finds the entry and exit points of the track in the +detector element. This distance is divided into a number of steps +(default = 5). It is then assumed that an equal fraction of the total +charge is deposited at each step. The obtained charge is then split +into several charges (default = 100), each of which are then diffused +to the surface of the detector. It takes into account the Lorentz +angle and the stochastic nature of the diffusion. + +@subsection PixelDigitizationCrossTalk 2. Cross talk + +<em>Uses class PixelDiodeCrossTalkGenerator</em> + +Cross talk is generated if the original pixel has a minimum charge of +3 times the discriminator threshold. If that is true, the neighboring +pixels with one side in common will be given a charge. The length of +the common side is referred to as intersection length. For a neighbor +with the same column number this length will be 400 microns (600 for +long pixels). If the row number is the same, the length is then 50 +microns. The deposited charge is proportional (jobOpt DiodeCrossTalk) +to the product of this length and the original charge. + +@subsection PixelDigitizationThermalNoise 3. Thermal noise + +<em>Uses class PixelChargeSmearer</em> + +Each charge created up to this point is smeared with a gaussian of a +given amplitude (currently 200e-). This does not create any new +charged pixels. + +@subsection PixelDigitizationGeneralNoise 4. General noise + +<em>Uses class PixelNoisyCellGenerator</em> + +The purpose with this is to add noise to random pixels irrespective if +they have hits or not. As with the thermal noise, this adds a +gaussian. However, in this case the mean is 3 sigma over the +discriminator threshold with the same spread as the threshold. This +will both modify existing charges and create new charged pixels. + +@subsection PixelDigitizationMergeGangedPixels 5. Merge ganged pixels + +<em>Uses class PixelGangedMerger</em> + +This modifier merges ganged pixels and masks out the pixel not corresponding +to the read out electronics (is the mask out really needed??). + +@subsection PixelDigitizationSpecialPixels 6. Special pixels + +<em>Uses class SpecialPixelGenerator</em> + +In reality the detector will have problematic pixels that either will +be completely silent or noisy. They are masked out using special pixel +maps. The maps may be obtained from conditions database or simulated +using a set of probabilities. If they are simulated, there is the +option of simulating various Interval Of Validity (IOV) scenarios. All +types of special pixels are defined here. + +In addition to the special pixel maps, pixels may also be randomly disabled +independently of the special pixel map. This is to simulate random inefficiencies. +The frequency is controlled through a single probability. + +@subsection PixelDigitizationRandomDisabling 7. Random disabling + +<em>Uses class SiRandomDisabledCellGenerator</em> + +The purpose of this modifer is to randomly disable pixelson an event-by-event basis. +This simulates random inefficiences arising from non-masked pixels being temporarily disabled. +A pixel is declared as disabled if a flat random number is below RndDisableProb. + +@subsection PixelDigitizationTimingAndDiscrimination 8. Timing and discrimination + +<em>Uses class PixelTimeWalkGenerator and PixelCellDiscriminator</em> + +The timing is simulated as follows: + +-# set time to an offset value (jobOption: TimeZero) +-# calculate time walk using the threshold and intime threshold (parametrised); the result is smeared by a gaussian +-# add random jitter (jobOption: TimeJitter - flat distribution [-jitter/2, +jitter/2] ) +-# add G4Time and subtract ComTime (if used) +-# BCID = time/TimePerBCO + +If the obtained BCID is outside the range [0,timeBCN-1], the pixel is +flagged as below threshold and thus removed from further processing. + +The discrimination compares the charge of the pixel with a threshold +drawn randomly from a gaussian with mean and width from conditions +database. Optionally, they may be set in jobOptions (DiscrThresh and +DiscrThreshVar). If the charge is below the obtained threshold, the +pixel is flagged as such. + +@subsection PixelDigitizationToTCalculationAndRDO 9. ToT calculation and RDO + +The TOT is calculated using a paremtrization where the parameters are +either supplied by the user or taken from cond DB. + +For each valid +charge collection, a RDO is created and stored in storegate.In +addition a collection of SDO objects (not clear if they are +used??). The collection contains a map between the deposited charge +and the truth (InDetSimData).For debugging purposes there exists an +option RDOfromSPM. If set, a RDO collection will be created containing +just the special pixel map. The RDOs in this collection will have a +fixed ToT and time. Its name is derived by adding the postfix "_SPM" +to the RDO collection name. Both RDO collections can be viewed using +for example the PixelMonitoring package. + +@section PixelDigitization_PixelDigitizationExtras Extra Pages + +*/ diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/python/JobOptCfg.py b/InnerDetector/InDetDigitization/PixelRadDamDigitization/python/JobOptCfg.py new file mode 100755 index 000000000000..91fa45fb9dd9 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/python/JobOptCfg.py @@ -0,0 +1,353 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +""" PixelRadDamDigitization/python/JobOptCfg.py + Wrapper class to PixelRadDamDigitization generated by genconf. +""" +__version__ = '' +__author__ = '' +__doc__ = "PixelRadDamDigitization" +__all__ = [ 'CustomPixelRadDamDigitization' ] + +# import genconf class +from GaudiKernel.GaudiHandles import ServiceHandle +from PixelRadDamDigitization.PixelRadDamDigitizationConf import PixelRadDamDigitization,PixelRadDamDigitizationTool +from AthenaCommon.OldStyleConfig import * +from AthenaCommon.Logging import logging +from AthenaCommon.AppMgr import theApp + +# make custom class +class CustomPixelRadDamDigitization( PixelRadDamDigitization ): + """Wrapper class to PixelRadDamDigitization""" + __slots__ = [] # enforce no new properties + __logger__ = logging.getLogger( 'PixelRadDamDigitization' ) # logger + __iovdbsvc__ = Service("IOVDbSvc") + # + def __init__( self, name = 'CustomPixelRadDamDigitization' ): # sets default name + """Constructor. Sets all properties to their default values""" + super( PixelRadDamDigitization, self ).__init__( name ) # have to call base init + # + # set all default attributes + # + self.setAllDefaults() + # + return + + # setDefaults is enforced to be a class method; because it is a class method, + # the defaults can be savely queried by other tools, without touching any part + # of the configuration as would happen otherwise + def setDefaults( self, handle ): + """Set default values - NOT YET IMPLEMENTED.""" + # these values will override the C++ (i.e. developer) default values, not + # any python (i.e. user) values + #self.__logger__.info("setDefaults() called") + #print handle + return + + def setAllDefaults( self ): + """ + Set all properties to their default values. + """ + # this will set all properties to default value + + #### handle.RndmFactor = 42. # best, is considered default + + from AthenaCommon.Configurable import ConfigurableAlgorithm + # make sure one tool is always selected + self.__logger__.info("setting all default values") + allprops = self.getDefaultProperties() + for k,v in allprops.items(): + if k in ConfigurableAlgorithm.__slots__: + continue + setattr( self, k, v ) + # set i/o object names - they're set above, but to the default from SiDigitization + rname = getattr(self,"RndmEngine") + if len(rname)<1: + defengine = "PixelRadDamDigitization" + exec '__logger__.warning("no random engine name specified! Setting engine name to %s")' % defengine + self.setattr("RndmEngine",defengine) + # set random number seed +### self.setRndSeed( self.getDefaultProperty("RndmSeed1"), self.getDefaultProperty("RndmSeed2") ) + + return + + def setIOVonce( self ) : + """IOV is infinite: regenerate a simulated special pixel map only once""" + self.IOVFlag = 0 + return + + def setIOVall( self ) : + """IOV is one: regenerate a simulated special pixel map every event""" + self.IOVFlag = 1 + return + + def setIOVstep( self, step ) : + """IOV is <step> : regenerate a simulated special pixel map at every <step> event""" + self.IOVFlag = 2 + self.EventIOV = step + return + + def setIOVrnd( self, step ) : + """IOV is randomly chosen in [0,step] : regenerate a simulated special pixel map at random events""" + self.IOVFlag = 3 + self.EventIOV = step + return + +# +# not sure if this one is relevant. +# the idea was to +# + def dbfolderContains( self, tag ): + """Check if a certain tag is already in IOVDbSvc.Folders""" + name = tag.strip() + allFolders = self.__iovdbsvc__.Folders + nFolders = len(allFolders) + done = (nFolders < 1) + index = 0 + found = False + while not done: + folder = allFolders[index].strip() + found = (folder==name) + if not found: + index = index + 1 + done = ( index==nFolders ) or ( found ) + # + if not found: + index = -1 + # + return index + +# def setUseCalibCondDB( self ): +# """Set calib db folder""" + + # + # The following handle the random number seed list in the rnd service. + # They will most likely be obsolete in the near future. + # + def removeRndSeed( self ): + """Remove the random seed with the set name (RndmEngine)""" + # remove a seed associated with the digitization + name = getattr(self,"RndmEngine") + rndmSvc = Service(self.RndmSvc.getName()) + rndmSvc.Seeds += [] + allSeeds = rndmSvc.Seeds + # + nseeds = len(allSeeds) + done = (nseeds < 1) + index = 0 + found = False + while not done: + seed = allSeeds[index] + found = seed.startswith(name+" ") + index = index + 1 + done = ( index==nseeds ) or ( found ) + # + if found: + allSeeds.remove(allSeeds[index-1]) + rndmSvc.Seeds = allSeeds + return + + def setRndSeed( self, seed1, seed2 ): + """Set random seed using the name given by RndmEngine""" + # set a random number seed - OBSOLETE + name = getattr(self,"RndmEngine") + self.removeRndSeed() + newseed = name + " " + str(seed1) + " " + str(seed2) + rndmSvc = Service(self.RndmSvc.getName()) + rndmSvc.Seeds += [ newseed ] +# setattr(self,"RndmSeed1",seed1) +# setattr(self,"RndmSeed2",seed2) + return + + def printRndSeed( self ): + """print random seed setting""" + name = getattr(self,"RndmEngine") + rndmSvc = Service(self.RndmSvc.getName()) + rndmSvc.Seeds += [] + allSeeds = rndmSvc.Seeds + # + nseeds = len(allSeeds) + done = (nseeds < 1) + index = 0 + found = False + while not done: + seed = allSeeds[index] + found = seed.startswith(name+" ") + index = index + 1 + done = ( index==nseeds ) or ( found ) + # + if found: + exec 'self.__logger__.info("Random number service : %s")' % self.RndmSvc.getName() + exec 'self.__logger__.info("Random number seeds : %s")' % allSeeds[index-1] + else: + exec 'self.__logger__.info("No random number seeds for key : %s")' % name + return + + +# make custom class +class CustomPixelRadDamDigitizationTool( PixelDigitizationTool ): + """Wrapper class to PixelDigitizationTool""" + __slots__ = [] # enforce no new properties + __logger__ = logging.getLogger( 'PixelDigitizationTool' ) # logger + __iovdbsvc__ = Service("IOVDbSvc") + # + def __init__( self, name = 'CustomPixelDigitizationTool' ): # sets default name + """Constructor. Sets all properties to their default values""" + super( PixelDigitizationTool, self ).__init__( name ) # have to call base init + # + # set all default attributes + # + self.setAllDefaults() + # + return + + # setDefaults is enforced to be a class method; because it is a class method, + # the defaults can be savely queried by other tools, without touching any part + # of the configuration as would happen otherwise + def setDefaults( self, handle ): + """Set default values - NOT YET IMPLEMENTED.""" + # these values will override the C++ (i.e. developer) default values, not + # any python (i.e. user) values + #self.__logger__.info("setDefaults() called") + #print handle + return + + def setAllDefaults( self ): + """ + Set all properties to their default values. + """ + # this will set all properties to default value + + #### handle.RndmFactor = 42. # best, is considered default + + from AthenaCommon.Configurable import ConfigurableAlgorithm + # make sure one tool is always selected + self.__logger__.info("setting all default values") + allprops = self.getDefaultProperties() + for k,v in allprops.items(): + if k in ConfigurableAlgorithm.__slots__: + continue + setattr( self, k, v ) + # set i/o object names - they're set above, but to the default from SiDigitization + rname = getattr(self,"RndmEngine") + if len(rname)<1: + defengine = "PixelDigitization" + exec '__logger__.warning("no random engine name specified! Setting engine name to %s")' % defengine + self.setattr("RndmEngine",defengine) + # set random number seed +### self.setRndSeed( self.getDefaultProperty("RndmSeed1"), self.getDefaultProperty("RndmSeed2") ) + + return + + def setIOVonce( self ) : + """IOV is infinite: regenerate a simulated special pixel map only once""" + self.IOVFlag = 0 + return + + def setIOVall( self ) : + """IOV is one: regenerate a simulated special pixel map every event""" + self.IOVFlag = 1 + return + + def setIOVstep( self, step ) : + """IOV is <step> : regenerate a simulated special pixel map at every <step> event""" + self.IOVFlag = 2 + self.EventIOV = step + return + + def setIOVrnd( self, step ) : + """IOV is randomly chosen in [0,step] : regenerate a simulated special pixel map at random events""" + self.IOVFlag = 3 + self.EventIOV = step + return + +# +# not sure if this one is relevant. +# the idea was to +# + def dbfolderContains( self, tag ): + """Check if a certain tag is already in IOVDbSvc.Folders""" + name = tag.strip() + allFolders = self.__iovdbsvc__.Folders + nFolders = len(allFolders) + done = (nFolders < 1) + index = 0 + found = False + while not done: + folder = allFolders[index].strip() + found = (folder==name) + if not found: + index = index + 1 + done = ( index==nFolders ) or ( found ) + # + if not found: + index = -1 + # + return index + +# def setUseCalibCondDB( self ): +# """Set calib db folder""" + + # + # The following handle the random number seed list in the rnd service. + # They will most likely be obsolete in the near future. + # + def removeRndSeed( self ): + """Remove the random seed with the set name (RndmEngine)""" + # remove a seed associated with the digitization + name = getattr(self,"RndmEngine") + rndmSvc = Service(self.RndmSvc.getName()) + rndmSvc.Seeds += [] + allSeeds = rndmSvc.Seeds + # + nseeds = len(allSeeds) + done = (nseeds < 1) + index = 0 + found = False + while not done: + seed = allSeeds[index] + found = seed.startswith(name+" ") + index = index + 1 + done = ( index==nseeds ) or ( found ) + # + if found: + allSeeds.remove(allSeeds[index-1]) + rndmSvc.Seeds = allSeeds + return + + def setRndSeed( self, seed1, seed2 ): + """Set random seed using the name given by RndmEngine""" + # set a random number seed - OBSOLETE + name = getattr(self,"RndmEngine") + self.removeRndSeed() + newseed = name + " " + str(seed1) + " " + str(seed2) + rndmSvc = Service(self.RndmSvc.getName()) + rndmSvc.Seeds += [ newseed ] +# setattr(self,"RndmSeed1",seed1) +# setattr(self,"RndmSeed2",seed2) + return + + def printRndSeed( self ): + """print random seed setting""" + name = getattr(self,"RndmEngine") + rndmSvc = Service(self.RndmSvc.getName()) + rndmSvc.Seeds += [] + allSeeds = rndmSvc.Seeds + # + nseeds = len(allSeeds) + done = (nseeds < 1) + index = 0 + found = False + while not done: + seed = allSeeds[index] + found = seed.startswith(name+" ") + index = index + 1 + done = ( index==nseeds ) or ( found ) + # + if found: + exec 'self.__logger__.info("Random number service : %s")' % self.RndmSvc.getName() + exec 'self.__logger__.info("Random number seeds : %s")' % allSeeds[index-1] + else: + exec 'self.__logger__.info("No random number seeds for key : %s")' % name + return + + diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/python/PixelRadDamDigitizationConfig.py b/InnerDetector/InDetDigitization/PixelRadDamDigitization/python/PixelRadDamDigitizationConfig.py new file mode 100644 index 000000000000..ab980531b4d3 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/python/PixelRadDamDigitizationConfig.py @@ -0,0 +1,249 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +from AthenaCommon import CfgMgr +from Digitization.DigitizationFlags import digitizationFlags +from AtlasGeoModel.InDetGMJobProperties import GeometryFlags + +# The earliest bunch crossing time for which interactions will be sent +# to the Pixel Digitization code. +def Pixel_FirstXing(): + FirstXing = -50 + from AthenaCommon.BeamFlags import jobproperties + if jobproperties.Beam.estimatedLuminosity()> 0.5e33: + FirstXing = -25 + return FirstXing + +# The latest bunch crossing time for which interactions will be sent +# to the Pixel Digitization code. +def Pixel_LastXing(): + LastXing = 100 + from AthenaCommon.BeamFlags import jobproperties + if jobproperties.Beam.estimatedLuminosity()> 0.5e33: + if jobproperties.Beam.bunchSpacing.get_Value() > 50 : + LastXing = 75 + else : + LastXing = 25 + return LastXing + +def ChargeCollProbSvc(name="ChargeCollProbSvc", **kwargs): + return CfgMgr.RadDam__ChargeCollProbSvc(name, **kwargs) + +############################################################################### + +def EnergyDepositionTool(name="EnergyDepositionTool", **kwargs): + kwargs.setdefault("DeltaRayCut", 117.) + kwargs.setdefault("nCols", 5) + kwargs.setdefault("LoopLimit", 100000) + kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) + kwargs.setdefault("RndmEngine", "PixelDigitization") + kwargs.setdefault("doBichsel", hasattr(digitizationFlags, "doBichselSimulation") and digitizationFlags.doBichselSimulation()) + kwargs.setdefault("doBichselBetaGammaCut", 0.7) # dEdx not quite consistent below this + kwargs.setdefault("doDeltaRay", False) # needs validation + kwargs.setdefault("doPU", True) + return CfgMgr.RadDam__EnergyDepositionTool(name, **kwargs) + +def SensorSimPlanarTool(name="SensorSimPlanarTool", **kwargs): + kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) + kwargs.setdefault("RndmEngine", "PixelDigitization") + return CfgMgr.RadDam__SensorSimPlanarTool(name, **kwargs) + +def SensorSim3DTool(name="SensorSim3DTool", **kwargs): + kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) + kwargs.setdefault("RndmEngine", "PixelDigitization") + return CfgMgr.RadDam__SensorSim3DTool(name, **kwargs) + +def SensorSimTool(name="SensorSimTool", **kwargs): + kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) + kwargs.setdefault("RndmEngine", "PixelDigitization") + return CfgMgr.RadDam__SensorSimTool(name, **kwargs) + +def RadDamageUtil(name="RadDamageUtil", **kwargs): + kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) + kwargs.setdefault("RndmEngine", "PixelDigitization") + return CfgMgr.RadDam__RadDamageUtil(name, **kwargs) + +def PixelProcessorTool(name="PixelProcessorTool", **kwargs): + kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) + kwargs.setdefault("RndmEngine", "PixelDigitization") + return CfgMgr.RadDam__PixelProcessorTool(name, **kwargs) + +def PixelNoisyCellGenerator(name="PixelNoisyCellGenerator", **kwargs): + from AthenaCommon.BeamFlags import jobproperties + kwargs.setdefault("MergeCharge", True) + NoiseShape = [0.00596, 0.03491, 0.07058, 0.11991, 0.17971, 0.24105, 0.29884, 0.35167, 0.39912, 0.44188, 0.48016, 0.51471, 0.54587, 0.57405, 0.59958, 0.62288, 0.64411, 0.66360, 0.68159, 0.69823, 0.71362, 0.72781, 0.74096, 0.75304, 0.76415, 0.77438, 0.78383, 0.79256, 0.80066, 0.80821, 0.81547, 0.82246, 0.82918, 0.83501, 0.84054, 0.84576, 0.85078, 0.85558, 0.86018, 0.86455, 0.86875, 0.87273, 0.87653, 0.88020, 0.88369, 0.88705, 0.89027, 0.89336, 0.89633, 0.89921, 0.90195, 0.90460, 0.90714, 0.90961, 0.91198, 0.91426, 0.91644, 0.91853, 0.92055, 0.92250, 0.92435, 0.92611, 0.92782, 0.92947, 0.93105, 0.93257, 0.93404, 0.93547, 0.93688, 0.93822, 0.93953, 0.94079, 0.94201, 0.94318, 0.94432, 0.94542, 0.94649, 0.94751, 0.94851, 0.94949, 0.95045, 0.95137, 0.95227, 0.95314, 0.95399, 0.95483, 0.95563, 0.95646, 0.95729, 0.95812, 0.95896, 0.95980, 0.96063, 0.96144, 0.96224, 0.96301, 0.96377, 0.96451, 0.96521, 0.96590, 0.96657, 0.96722, 0.96787, 0.96849, 0.96911, 0.96971, 0.97031, 0.97090, 0.97148, 0.97204, 0.97260, 0.97314, 0.97367, 0.97421, 0.97474, 0.97525, 0.97576, 0.97627, 0.97676, 0.97722, 0.97769, 0.97815, 0.97861, 0.97906, 0.97950, 0.97992, 0.98033, 0.98073, 0.98111, 0.98147, 0.98182, 0.98216, 0.98249, 0.98281, 0.98312, 0.98343, 0.98374, 0.98402, 0.98430, 0.98456, 0.98482, 0.98507, 0.98532, 0.98555, 0.98579, 0.98602, 0.98624, 0.98646, 0.98668, 0.98690, 0.98711, 0.98732, 0.98753, 0.98773, 0.98793, 0.98813, 0.98832, 0.98851, 0.98870, 0.98888, 0.98907, 0.98925, 0.98943, 0.98961, 0.98979, 0.98996, 0.99014, 0.99031, 0.99048, 0.99064, 0.99081, 0.99098, 0.99114, 0.99131, 0.99147, 0.99163, 0.99179, 0.99194, 0.99210, 0.99225, 0.99240, 0.99256, 0.99271, 0.99286, 0.99300, 0.99315, 0.99329, 0.99344, 0.99358, 0.99372, 0.99386, 0.99400, 0.99414, 0.99427, 0.99440, 0.99453, 0.99466, 0.99479, 0.99491, 0.99503, 0.99515, 0.99527, 0.99538, 0.99549, 0.99560, 0.99571, 0.99582, 0.99592, 0.99602, 0.99613, 0.99623, 0.99633, 0.99643, 0.99653, 0.99662, 0.99672, 0.99682, 0.99691, 0.99701, 0.99710, 0.99719, 0.99728, 0.99737, 0.99746, 0.99755, 0.99764, 0.99772, 0.99781, 0.99790, 0.99798, 0.99806, 0.99814, 0.99823, 0.99831, 0.99839, 0.99847, 0.99855, 0.99863, 0.99871, 0.99879, 0.99887, 0.99895, 0.99902, 0.99910, 0.99918, 0.99925, 0.99933, 0.99940, 0.99948, 0.99955, 0.99963, 0.99971, 0.99978, 0.99985, 0.99993, 1.00000] + kwargs.setdefault("NoiseShape",NoiseShape) + if jobproperties.Beam.beamType == "cosmics" : + kwargs.setdefault("TimeBCN",8.0) + else: + kwargs.setdefault("RndNoiseProb", 1.e-10) + kwargs.setdefault("TimeBCN",1.0) + return CfgMgr.RadDam__PixelNoisyCellGenerator(name, **kwargs) + +def PixelChargeSmearer(name="PixelChargeSmearer", **kwargs): + kwargs.setdefault("ThermalNoise", 160.0) + return CfgMgr.RadDam__PixelChargeSmearer(name, **kwargs) + +def PixelDiodeCrossTalkGenerator(name="PixelDiodeCrossTalkGenerator", **kwargs): + return CfgMgr.RadDam__PixelDiodeCrossTalkGenerator(name, **kwargs) + +def PixelRandomDisabledCellGenerator(name="PixelRandomDisabledCellGenerator", **kwargs): + return CfgMgr.RadDam__PixelRandomDisabledCellGenerator(name, **kwargs) + +def FrontEndSimTool(name="FrontEndSimTool", **kwargs): + kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) + kwargs.setdefault("RndmEngine", "PixelDigitization") + from AthenaCommon.BeamFlags import jobproperties + if jobproperties.Beam.beamType == "cosmics" : + kwargs.setdefault("UseComTime", True) + kwargs.setdefault("TimeJitter", 25.0) + kwargs.setdefault("TimeBCN",8.0) + kwargs.setdefault("TimeZero", 100.0) + else: + kwargs.setdefault("TimeBCN",1.0) + kwargs.setdefault("TimeZero", 5.0) + kwargs.setdefault("TimePerBCO", 25.0) + return CfgMgr.RadDam__FrontEndSimTool(name, **kwargs) + +def RD53SimTool(name="RD53SimTool", **kwargs): + kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) + kwargs.setdefault("RndmEngine", "PixelDigitization") + kwargs.setdefault("BarrelAnalogthreshold", [-1, -1, -1, -1, -1]) + kwargs.setdefault("EndcapAnalogthreshold", [-1, -1, -1, -1]) + kwargs.setdefault("BarrelToTthreshold", [-1, -1, -1, -1, -1]) + kwargs.setdefault("EndcapToTthreshold", [-1, -1, -1, -1]) + return CfgMgr.RadDam__RD53SimTool(name, **kwargs) + +def FEI4SimTool(name="FEI4SimTool", **kwargs): + kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) + kwargs.setdefault("RndmEngine", "PixelDigitization") + kwargs.setdefault("BarrelAnalogthreshold", [-1]) + kwargs.setdefault("EndcapAnalogthreshold", [-1, -1, -1]) + kwargs.setdefault("BarrelToTthreshold", [-1]) + kwargs.setdefault("EndcapToTthreshold", [-1,-1,-1]) + kwargs.setdefault("HitDiscConfig", 2) + return CfgMgr.RadDam__FEI4SimTool(name, **kwargs) + +def FEI3SimTool(name="FEI3SimTool", **kwargs): + kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) + kwargs.setdefault("RndmEngine", "PixelDigitization") + kwargs.setdefault("BarrelAnalogthreshold", [-1, -1, -1, -1]) # first argument is dummy + kwargs.setdefault("EndcapAnalogthreshold", [-1, -1, -1]) + kwargs.setdefault("BarrelToTthreshold", [-1, 5, 5, 5]) # first argument is dummy + kwargs.setdefault("EndcapToTthreshold", [ 5, 5, 5]) + kwargs.setdefault("BarrelLatency", [ -1, 151, 256, 256]) + kwargs.setdefault("EndcapLatency", [256, 256, 256]) + kwargs.setdefault("BarrelHitDuplication", [False, False, False, False]) + kwargs.setdefault("EndcapHitDuplication", [False, False, False]) + kwargs.setdefault("BarrelSmallHitToT", [-1, -1, -1, -1]) + kwargs.setdefault("EndcapSmallHitToT", [-1, -1, -1]) + kwargs.setdefault("TimingTune", 2015) + return CfgMgr.RadDam__FEI3SimTool(name, **kwargs) + +def BasicPixelDigitizationTool(name="PixelDigitizationTool", **kwargs): + from AthenaCommon import CfgGetter + kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) + streamName = kwargs.setdefault("RndmEngine", "PixelDigitization") + if not digitizationFlags.rndmSeedList.checkForExistingSeed(streamName): + digitizationFlags.rndmSeedList.addSeed(streamName, 10513239, 492615104 ) + from AthenaCommon.BeamFlags import jobproperties + from AthenaCommon.Resilience import protectedInclude + from AthenaCommon.Include import include + from AthenaCommon.AppMgr import ServiceMgr + from AthenaCommon.CfgGetter import getService + protectedInclude( "PixelConditionsServices/SpecialPixelMapSvc_jobOptions.py" ) + include.block( "PixelConditionsServices/SpecialPixelMapSvc_jobOptions.py" ) + protectedInclude( "PixelConditionsServices/PixelDCSSvc_jobOptions.py" ) + include.block( "PixelConditionsServices/PixelDCSSvc_jobOptions.py" ) + protectedInclude("PixelConditionsServices/PixelCalibSvc_jobOptions.py") + from IOVDbSvc.CondDB import conddb + conddb.addFolderSplitMC("PIXEL","/PIXEL/ReadoutSpeed","/PIXEL/ReadoutSpeed") + PixelCablingSvc = getService("PixelCablingSvc") + ServiceMgr += PixelCablingSvc + print PixelCablingSvc + if not hasattr(ServiceMgr, "PixelSiPropertiesSvc"): + from SiLorentzAngleSvc.LorentzAngleSvcSetup import lorentzAngleSvc + from SiPropertiesSvc.SiPropertiesSvcConf import SiPropertiesSvc + pixelSiPropertiesSvc = SiPropertiesSvc(name = "PixelSiPropertiesSvc",DetectorName="Pixel",SiConditionsServices = lorentzAngleSvc.pixelSiliconConditionsSvc) + ServiceMgr += pixelSiPropertiesSvc + kwargs.setdefault("InputObjectName", "PixelHits") + procTools = [] + chargeTools = [] #Tools in array for flexibility + feSimTools = [] + if GeometryFlags.isSLHC(): + procTools += ['PixelRadDamDiodeCrossTalkGenerator'] + chargeTools += ['RadDamSensorSimPlanarTool'] + feSimTools += ['RadDamRD53SimTool'] + else: + procTools += ['PixelRadDamDiodeCrossTalkGenerator'] + procTools += ['PixelRadDamChargeSmearer'] + procTools += ['PixelRadDamNoisyCellGenerator'] + procTools += ['PixelRadDamRandomDisabledCellGenerator'] + chargeTools += ['RadDamSensorSimPlanarTool'] + chargeTools += ['RadDamSensorSim3DTool'] + feSimTools += ['RadDamFEI4SimTool'] + feSimTools += ['RadDamFEI3SimTool'] + kwargs.setdefault("PixelProcessorTools", procTools) + kwargs.setdefault("ChargeTools", chargeTools) + kwargs.setdefault("FrontEndSimTools", feSimTools) + kwargs.setdefault("EnergyDepositionTool", "RadDamEnergyDepositionTool") + if digitizationFlags.doXingByXingPileUp(): # PileUpTool approach + kwargs.setdefault("FirstXing", Pixel_FirstXing() ) + kwargs.setdefault("LastXing", Pixel_LastXing() ) + return CfgMgr.RadDam__PixelDigitizationTool(name, **kwargs) + +def PixelDigitizationTool(name="PixelDigitizationTool", **kwargs): + kwargs.setdefault("HardScatterSplittingMode", 0) + from IOVDbSvc.CondDB import conddb + if conddb.dbmc == "OFLP200" and not conddb.folderRequested("/PIXEL/HitDiscCnfg"): + conddb.addFolderSplitMC("PIXEL","/PIXEL/HitDiscCnfg","/PIXEL/HitDiscCnfg") + if not conddb.folderRequested('PIXEL/PixReco'): + conddb.addFolder('PIXEL_OFL','/PIXEL/PixReco') + return BasicPixelDigitizationTool(name, **kwargs) + +def PixelGeantinoTruthDigitizationTool(name="PixelGeantinoTruthDigitizationTool", **kwargs): + kwargs.setdefault("ParticleBarcodeVeto", 0) + return PixelDigitizationTool(name, **kwargs) + +def PixelDigitizationToolHS(name="PixelDigitizationToolHS", **kwargs): + kwargs.setdefault("HardScatterSplittingMode", 1) + return BasicPixelDigitizationTool(name, **kwargs) + +def PixelDigitizationToolPU(name="PixelDigitizationToolPU", **kwargs): + kwargs.setdefault("HardScatterSplittingMode", 2) + kwargs.setdefault("RDOCollName", "Pixel_PU_RDOs") + kwargs.setdefault("SDOCollName", "Pixel_PU_SDO_Map") + return BasicPixelDigitizationTool(name, **kwargs) + +def PixelDigitizationToolSplitNoMergePU(name="PixelDigitizationToolSplitNoMergePU", **kwargs): + kwargs.setdefault("HardScatterSplittingMode", 0) + kwargs.setdefault("InputObjectName", "PileupPixelHits") + kwargs.setdefault("RDOCollName", "Pixel_PU_RDOs") + kwargs.setdefault("SDOCollName", "Pixel_PU_SDO_Map") + return BasicPixelDigitizationTool(name, **kwargs) + +def PixelOverlayDigitizationTool(name="PixelOverlayDigitizationTool",**kwargs): + from OverlayCommonAlgs.OverlayFlags import overlayFlags + kwargs.setdefault("EvtStore", overlayFlags.evtStore()) + kwargs.setdefault("RDOCollName", overlayFlags.evtStore() + "+PixelRDOs") + kwargs.setdefault("SDOCollName", overlayFlags.evtStore() + "+PixelSDO_Map") + kwargs.setdefault("HardScatterSplittingMode", 0) + return BasicPixelDigitizationTool(name,**kwargs) + +def getPixelRange(name="PixelRange" , **kwargs): + kwargs.setdefault('FirstXing', Pixel_FirstXing() ) + kwargs.setdefault('LastXing', Pixel_LastXing() ) + kwargs.setdefault('CacheRefreshFrequency', 1.0 ) #default 0 no dataproxy reset + kwargs.setdefault('ItemList', ["SiHitCollection#PixelHits"] ) + return CfgMgr.PileUpXingFolder(name, **kwargs) + +def PixelDigitizationHS(name="PixelDigitizationHS",**kwargs): + kwargs.setdefault("DigitizationTool", "PixelDigitizationToolHS") + return CfgMgr.RadDam__PixelDigitization(name,**kwargs) + +def PixelDigitizationPU(name="PixelDigitizationPU",**kwargs): + kwargs.setdefault("DigitizationTool", "PixelDigitizationToolPU") + return CfgMgr.RadDam__PixelDigitization(name,**kwargs) + +def PixelOverlayDigitization(name="PixelOverlayDigitization",**kwargs): + kwargs.setdefault("DigitizationTool", "PixelOverlayDigitizationTool") + return CfgMgr.RadDam__PixelDigitization(name,**kwargs) diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/python/PixelRadDamDigitizationConfigDb.py b/InnerDetector/InDetDigitization/PixelRadDamDigitization/python/PixelRadDamDigitizationConfigDb.py new file mode 100644 index 000000000000..f2b9e4da8cda --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/python/PixelRadDamDigitizationConfigDb.py @@ -0,0 +1,30 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +from AthenaCommon.CfgGetter import addTool,addService,addAlgorithm + +addTool("PixelRadDamDigitization.PixelRadDamDigitizationConfig.PixelDigitizationTool", "PixelRadDamDigitizationTool") +addTool("PixelRadDamDigitization.PixelRadDamDigitizationConfig.PixelGeantinoTruthDigitizationTool", "PixelRadDamGeantinoTruthDigitizationTool") +addTool("PixelRadDamDigitization.PixelRadDamDigitizationConfig.PixelDigitizationToolHS", "PixelRadDamDigitizationToolHS") +addTool("PixelRadDamDigitization.PixelRadDamDigitizationConfig.PixelDigitizationToolPU", "PixelRadDamDigitizationToolPU") +addTool("PixelRadDamDigitization.PixelRadDamDigitizationConfig.PixelDigitizationToolSplitNoMergePU", "PixelRadDamDigitizationToolSplitNoMergePU") + +addAlgorithm("PixelRadDamDigitization.PixelRadDamDigitizationConfig.PixelDigitizationHS" , "PixelRadDamDigitizationHS") +addAlgorithm("PixelRadDamDigitization.PixelRadDamDigitizationConfig.PixelDigitizationPU" , "PixelRadDamDigitizationPU") +addTool("PixelRadDamDigitization.PixelRadDamDigitizationConfig.getPixelRange", "PixelRadDamRange") +addService("PixelRadDamDigitization.PixelRadDamDigitizationConfig.ChargeCollProbSvc","RadDamChargeCollProbSvc") +addTool("PixelRadDamDigitization.PixelRadDamDigitizationConfig.PixelProcessorTool","PixelRadDamProcessorTool") +addTool("PixelRadDamDigitization.PixelRadDamDigitizationConfig.PixelNoisyCellGenerator", "PixelRadDamNoisyCellGenerator") +addTool("PixelRadDamDigitization.PixelRadDamDigitizationConfig.PixelChargeSmearer", "PixelRadDamChargeSmearer") +addTool("PixelRadDamDigitization.PixelRadDamDigitizationConfig.PixelDiodeCrossTalkGenerator", "PixelRadDamDiodeCrossTalkGenerator") +addTool("PixelRadDamDigitization.PixelRadDamDigitizationConfig.PixelRandomDisabledCellGenerator", "PixelRadDamRandomDisabledCellGenerator") +addTool("PixelRadDamDigitization.PixelRadDamDigitizationConfig.SensorSimPlanarTool","RadDamSensorSimPlanarTool") +addTool("PixelRadDamDigitization.PixelRadDamDigitizationConfig.SensorSim3DTool","RadDamSensorSim3DTool") +addTool("PixelRadDamDigitization.PixelRadDamDigitizationConfig.SensorSimTool","RadDamSensorSimTool") +addTool("PixelRadDamDigitization.PixelRadDamDigitizationConfig.FrontEndSimTool","RadDamFrontEndSimTool") +addTool("PixelRadDamDigitization.PixelRadDamDigitizationConfig.RD53SimTool","RadDamRD53SimTool") +addTool("PixelRadDamDigitization.PixelRadDamDigitizationConfig.FEI4SimTool","RadDamFEI4SimTool") +addTool("PixelRadDamDigitization.PixelRadDamDigitizationConfig.FEI3SimTool","RadDamFEI3SimTool") +addTool("PixelRadDamDigitization.PixelRadDamDigitizationConfig.EnergyDepositionTool", "RadDamEnergyDepositionTool") +addTool("PixelRadDamDigitization.PixelRadDamDigitizationConfig.PixelOverlayDigitizationTool", "PixelRadDamOverlayDigitizationTool") +addAlgorithm("PixelRadDamDigitization.PixelRadDamDigitizationConfig.PixelOverlayDigitization", "PixelRadDamOverlayDigitization") +addTool("PixelRadDamDigitization.PixelRadDamDigitizationConfig.RadDamageUtil", "RadDamageUtil") diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/share/DigitizationTst.py b/InnerDetector/InDetDigitization/PixelRadDamDigitization/share/DigitizationTst.py new file mode 100644 index 000000000000..6febe18a398f --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/share/DigitizationTst.py @@ -0,0 +1,112 @@ +########################################### +# A short script to test PixelDigitization +########################################### +# +# Set auditors to use. +# Chrono: time used by algos +# Name: print info upon entry/exit of init/exec/fina routines of the algo +# MemStat: memory usage +# +theApp.Dlls += [ "GaudiAud" ] +theAuditorSvc.Auditors += [ "ChronoAuditor"] +theAuditorSvc.Auditors += [ "NameAuditor" ] +theAuditorSvc.Auditors += [ "MemStatAuditor" ] +MemStatAuditor = theAuditorSvc.auditor( "MemStatAuditor" ) +theApp.AuditAlgorithms=True +MemStatAuditor.OutputLevel = INFO +# +# Pixel digitization using a configurable class. +# +from AthenaCommon.Logging import logging +logger = logging.getLogger("PixelDigitization") + +# +# Get flags +# +from AthenaCommon.AthenaCommonFlags import jobproperties +jobproperties.AthenaCommonFlags.EvtMax=5 +# +# define input hits and output digits +# +#jobproperties.AthenaCommonFlags.PoolHitsInput=["rfio:/castor/cern.ch/user/s/svahsen/digitization/RTT/calib1_csc11.005200.T1_McAtNlo_Jimmy.simul.HITS.v12003104_tid004131._00069.pool.root.10"] +jobproperties.AthenaCommonFlags.PoolHitsInput=["/afs/cern.ch/user/t/tegen/scratch0/calib1_csc11.005200.T1_McAtNlo_Jimmy.simul.HITS.v12003104_tid004131._00069.pool.root.10"] +jobproperties.AthenaCommonFlags.PoolRDOOutput="DigitizationOutput.pool.root" + +# +# Flags that are defined in python are best set here +# switch off ID and muons +# +from AthenaCommon.DetFlags import DetFlags +DetFlags.ID_setOn() +DetFlags.SCT_setOn() +DetFlags.TRT_setOff() +DetFlags.Calo_setOff() +DetFlags.Muon_setOff() +DetFlags.Truth_setOn() +DetFlags.LVL1_setOff() + + +from AthenaCommon.GlobalFlags import jobproperties +jobproperties.Global.DetDescrVersion='ATLAS-CSC-01-02-00' +#GeoModelSvc = Service( "GeoModelSvc" ) +#GeoModelSvc.IgnoreTagDifference = True + +include("Digitization/Digitization.py") +# +# PixelDigitization configurable is added to the job sequence in +# PixelDigitization_jobOptions.py. +# It can be accessed by job.PixelDigitization as below. +# +from AthenaCommon.AlgSequence import AlgSequence +job = AlgSequence() +if 'PixelDigitization' in dir(job): + # + # set audit flags + # + job.PixelDigitization.AuditInitialize = True + job.PixelDigitization.AuditExecute = True + job.PixelDigitization.AuditFinalize = True + # + # set whether or not to use cond DB. + # + job.PixelDigitization.UseCalibCondDB = True + job.PixelDigitization.UsePixMapCondDB = True + job.PixelDigitization.UsePixCondSum = True + # + # set various enable flags + # + job.PixelDigitization.EnableHits = True + job.PixelDigitization.EnableNoise = True + + # + # create RDOs for special pixel map monitoring + # + job.PixelDigitization.RDOforSPM = True + + # + # simulate special pixels - only used if UsePixMapCondDB = False + # + job.PixelDigitization.SpmNoiseProb = 0.00001 + job.PixelDigitization.SpmDisableProb = 0.00002 + job.PixelDigitization.SpmNoBumpProb = 0.00050 + job.PixelDigitization.SpmBadTOTProb = 0.00050 + + # simulated IOV - setIOV[once,all,step,rnd] + job.PixelDigitization.setIOVonce() + + # + # Probabilities for random noise/in-efficiency. + # The below probabilities are independent of special pixels. + # They simulate random 'unknown' effects. + # + job.PixelDigitization.RndNoiseProb = 5e-8 + job.PixelDigitization.RndDisableProb = 0.0 + +else: + logger.warning("PixelDigitization configurable not found in AlgSequence() - assuming oldstyle setup is used.") + +# +MessageSvc.OutputLevel = INFO +# + + diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/share/Monitoring.py b/InnerDetector/InDetDigitization/PixelRadDamDigitization/share/Monitoring.py new file mode 100644 index 000000000000..85a1b5a19d65 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/share/Monitoring.py @@ -0,0 +1,34 @@ +# +# Add monitoring ot the digitization. +# Usage: +# athena DigitizationTst.py Monitoring.py +# +# If the Special Pixel Map is to be monitored, then +# modify the RDOName by adding _SPM to the name used +# for the normal RDOs (default "PixelRDOs") +# +#-------------------------------------------------------------- +#load the main monitoring algorithm and tool service +theApp.Dlls += [ "PixelMonitoring" ]; +theApp.TopAlg += [ "PixelMonitor" ]; +PixelMonitor = Algorithm( "PixelMonitor" ) +ToolSvc = Service("ToolSvc") + +#load a tool to run in the algorithm. Fill histograms with RDO data +PixelMonitor.PixelMonTools += ["RDOTool"] +RDOTool= Service("ToolSvc.RDOTool") +#load job options files for these tools +ToolSvc.RDOTool.RDOName = "PixelRDOs" +###ToolSvc.RDOTool.RDOName = "PixelRDOs_SPM" +ToolSvc.RDOTool.doA = False #Turns on EndcapA occupancy maps +ToolSvc.RDOTool.doB = False #Turns on Barel occupancy maps (SLOW!!!) +ToolSvc.RDOTool.doC = False #Turns on EndcapC occupancy maps + +theApp.Dlls += [ "GaudiSvc" ] +THistSvc = Algorithm( "THistSvc" ) +THistSvc.Output = ["stat DATAFILE='digitMon.root' TYP='ROOT' OPT='RECREATE'"] + + +# End of job options file +# +# diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/ChargeCollProbSvc.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/ChargeCollProbSvc.cxx new file mode 100644 index 000000000000..7040ac34a15b --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/ChargeCollProbSvc.cxx @@ -0,0 +1,135 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "src/ChargeCollProbSvc.h" +#include "src/IChargeCollProbSvc.h" +#include "GaudiKernel/ISvcLocator.h" +#include "GaudiKernel/IToolSvc.h" +#include "GaudiKernel/IConversionSvc.h" +#include "GaudiKernel/ServiceHandle.h" + +#include "PathResolver/PathResolver.h" + +#include <fstream> + +using namespace RadDam; + +ChargeCollProbSvc::ChargeCollProbSvc(const std::string& name,ISvcLocator* svc) + : AthService(name,svc) + // : AthService(name,svc),log(msgSvc(),name) +{ + + declareProperty( "CCProbMapFileFEI3", m_cc_prob_file_fei3 = "PixelDigitization/3DFEI3-3E-problist-1um_v1.txt"); + declareProperty( "CCProbMapFileFEI4", m_cc_prob_file_fei4 = "PixelDigitization/3DFEI4-2E-problist-1um_v0.txt"); +} + +ChargeCollProbSvc::~ChargeCollProbSvc() { } + +StatusCode ChargeCollProbSvc::initialize() { + + CHECK(AthService::initialize()); + + CHECK(readProbMap(m_cc_prob_file_fei3)); + + CHECK(readProbMap(m_cc_prob_file_fei4)); + + ATH_MSG_INFO("initialized service!"); + return StatusCode::SUCCESS; +} + +StatusCode ChargeCollProbSvc::finalize() { + return StatusCode::SUCCESS; +} + +StatusCode ChargeCollProbSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) { + if ( IID_IChargeCollProbSvc == riid ) { + *ppvInterface = (IChargeCollProbSvc*)this; + } + else { + // Interface is not directly available: try out a base class + return AthService::queryInterface(riid, ppvInterface); + } + addRef(); + return StatusCode::SUCCESS; +} + +// read the Charge Collection Prob Map from text file +StatusCode ChargeCollProbSvc::readProbMap(std::string fileE) +{ + std::string line; + const std::string fileName = fileE; + std::string inputFile=PathResolverFindCalibFile(fileName); + if (inputFile==""){ + ATH_MSG_ERROR ( "Could not open input file!!!!!" ); + return StatusCode::FAILURE; + } + ATH_MSG_DEBUG (" opening file "<<inputFile); + std::ifstream myfile(inputFile.c_str()); + if (myfile.is_open()){ + ATH_MSG_DEBUG (" opened file!"); + while (myfile.good()) + { + while (std::getline(myfile,line)) + { + std::istringstream sline(line); + int xpos,ypos; + double prob; + sline>>xpos>>ypos>>prob; + if (fileName.find("FEI4")!=std::string::npos){ + m_probMapFEI4.insert( std::make_pair( std::make_pair( xpos , ypos ) , prob ) ); + ATH_MSG_DEBUG ("FEI4 inside xpos "<<xpos<<" ypos "<<ypos<<" prob "<<prob); + }else if(fileName.find("FEI3")!=std::string::npos){ + m_probMapFEI3.insert( std::make_pair( std::make_pair( xpos , ypos ) , prob ) ); + ATH_MSG_DEBUG ("FEI3 inside xpos "<<xpos<<" ypos "<<ypos<<" prob "<<prob); + }else{ + ATH_MSG_ERROR ("Please check name of Charge Coll Prob Maps! (should contain FEI3 or FEI4) "); + return StatusCode::FAILURE; + } + } + } + myfile.close(); + } + // + return StatusCode::SUCCESS; +} + +// -- Print out the Charge Collection Probability map (full map) +StatusCode ChargeCollProbSvc::printProbMap(std::string readout) +{ + + if(readout == "FEI4"){ + for ( std::multimap<std::pair<int,int>, double >::iterator it = m_probMapFEI4.begin(); it != m_probMapFEI4.end(); ++it ) { + ATH_MSG_DEBUG ("read full probMap FEI4 --- bin x "<<it->first.first<<" bin y "<<it->first.second<<" prob "<<it->second); + } + }else if(readout == "FEI3"){ + for ( std::multimap<std::pair<int,int>, double >::iterator it = m_probMapFEI3.begin(); it != m_probMapFEI3.end(); ++it ) { + ATH_MSG_DEBUG ("read full probMap FEI3 --- bin x "<<it->first.first<<" bin y "<<it->first.second<<" prob "<<it->second); + } + }else{ + ATH_MSG_ERROR ("Error in printout Charge Coll Prob Maps! (readout should contain FEI3 or FEI4 strings) "); + return StatusCode::FAILURE; + } + return StatusCode::SUCCESS; +} + + +// -- Returns the Charge Collection Probability at a given point (bin_x,bin_y) +double ChargeCollProbSvc::getProbMapEntry( std::string readout, int binx, int biny ) const { + + std::pair <int, int> doublekey ( binx, biny); + double echarge; + + if (readout == "FEI4"){ + std::multimap< std::pair< int,int >, double >::const_iterator iter = m_probMapFEI4.find(doublekey); + echarge = iter->second; + }else if(readout == "FEI3"){ + std::multimap< std::pair< int,int >, double >::const_iterator iter = m_probMapFEI3.find(doublekey); + echarge = iter->second; + }else{ + ATH_MSG_ERROR ("No Map Entry available for the requested readout"); + echarge = -1.; + } + + return echarge; +} diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/ChargeCollProbSvc.h b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/ChargeCollProbSvc.h new file mode 100644 index 000000000000..67e714928958 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/ChargeCollProbSvc.h @@ -0,0 +1,66 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef ChargeCollProbSvc_H +#define ChargeCollProbSvc_H + +#include "IChargeCollProbSvc.h" +#include "GaudiKernel/ToolHandle.h" +#include "GaudiKernel/Property.h" +#include "GaudiKernel/Service.h" + +#include "AthenaBaseComps/AthService.h" + +#include <vector> +#include <map> + +class ISvcLocator; +class IToolSvc; +class ITagInfoMgr; + + +template <class TYPE> class SvcFactory; + +namespace RadDam{ + +class ChargeCollProbSvc : public AthService, virtual public IChargeCollProbSvc { + +public: + + virtual StatusCode initialize(); + virtual StatusCode finalize(); + + // Query the interfaces. + // Input: riid, Requested interface ID + // ppvInterface, Pointer to requested interface + // Return: StatusCode indicating SUCCESS or FAILURE. + // N.B. Don't forget to release the interface after use!!! + virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface ); + + + virtual StatusCode readProbMap( std::string ); + virtual StatusCode printProbMap( std::string ); + virtual double getProbMapEntry( std::string, int, int) const; + + + friend class SvcFactory<ChargeCollProbSvc>; + + // Standard Constructor + ChargeCollProbSvc(const std::string& name, ISvcLocator* svc); + + // Standard Destructor + virtual ~ChargeCollProbSvc(); + +private: + + std::string m_cc_prob_file_fei3; + std::string m_cc_prob_file_fei4; + std::multimap< std::pair< int , int >, double > m_probMapFEI4; + std::multimap< std::pair< int , int >, double > m_probMapFEI3; + +}; + +} + +#endif diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/EnergyDepositionTool.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/EnergyDepositionTool.cxx new file mode 100644 index 000000000000..a530bfc1f3cc --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/EnergyDepositionTool.cxx @@ -0,0 +1,656 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// EnergyDepositionTool.cxx +// Implementation file for class EnergyDepositionTool +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +// Details in head file +/////////////////////////////////////////////////////////////////// + +#include "EnergyDepositionTool.h" + +#include "TGraph.h" +#include "TString.h" +#include "TMath.h" + +#include "InDetReadoutGeometry/SiDetectorElement.h" +#include "InDetReadoutGeometry/PixelModuleDesign.h" +#include "InDetSimEvent/SiHit.h" +#include "InDetIdentifier/PixelID.h" +#include "GeneratorObjects/HepMcParticleLink.h" +#include "SiPropertiesSvc/SiliconProperties.h" +#include "HepMC/GenEvent.h" +#include "HepMC/GenVertex.h" +#include "HepMC/GenParticle.h" + +#include "PathResolver/PathResolver.h" +#include <fstream> +#include <cmath> + +#include "CLHEP/Random/RandExpZiggurat.h" +#include "CLHEP/Random/RandFlat.h" +#include "TLorentzVector.h" +#include "CLHEP/Units/PhysicalConstants.h" + +using namespace std; +using namespace RadDam; + +// Constructor with parameters: +EnergyDepositionTool::EnergyDepositionTool(const std::string& type, const std::string& name,const IInterface* parent): + AthAlgTool(type,name,parent), + m_numberOfSteps(50), + m_numberOfCharges(10), + m_disableDistortions(false), + m_doBichsel(false), + m_doBichselBetaGammaCut(0.1), // replace momentum cut + m_doDeltaRay(false), // need validation + m_doPU(true), + m_pixDistoTool("PixelDistortionsTool"), + m_rndmSvc("AtDSFMTGenSvc",name), + m_rndmEngineName("PixelDigitization"), + m_rndmEngine(0) +{ + declareProperty("DeltaRayCut", m_DeltaRayCut = 117.); + declareProperty("nCols", m_nCols = 1); + declareProperty("LoopLimit", m_LoopLimit = 100000); + declareProperty("numberOfSteps",m_numberOfSteps,"Geant4:number of steps for PixelPlanar"); + declareProperty("numberOfCharges",m_numberOfCharges,"Geant4:number of charges for PixelPlanar"); + declareProperty("DisableDistortions",m_disableDistortions, "Disable simulation of module distortions"); + declareProperty("doBichsel", m_doBichsel, "re-do charge deposition following Bichsel model"); + declareProperty("doBichselBetaGammaCut", m_doBichselBetaGammaCut, "minimum beta-gamma for particle to be re-simulated through Bichsel Model"); + declareProperty("doDeltaRay", m_doDeltaRay, "whether we simulate delta-ray using Bichsel model"); + declareProperty("doPU", m_doPU, "Whether we apply Bichsel model on PU"); + declareProperty("RndmSvc", m_rndmSvc, "Random Number Service used in EnergyDepositionTool"); + declareProperty("RndmEngine", m_rndmEngineName, "Random engine name"); +} + +// Destructor: +EnergyDepositionTool::~EnergyDepositionTool(){} + +//======================================= +// I N I T I A L I Z E +//======================================= +StatusCode EnergyDepositionTool::initialize() { + + ATH_CHECK(AthAlgTool::initialize()); + ATH_CHECK(m_rndmSvc.retrieve()); + ATH_MSG_INFO("You are using EnergyDepositionTool for solid-state silicon detectors."); + + //Setup distortions tool + if (!m_disableDistortions) { + ATH_MSG_DEBUG("Getting distortions tool"); + if (!m_pixDistoTool.empty()) { + ATH_CHECK(m_pixDistoTool.retrieve()); + ATH_MSG_DEBUG("Distortions tool retrieved"); + } + else { + ATH_MSG_DEBUG("No distortions tool selected"); + } + } + + // get the random stream + ATH_MSG_DEBUG ( "Getting random number engine : <" << m_rndmEngineName << ">" ); + m_rndmEngine = m_rndmSvc->GetEngine(m_rndmEngineName); + if (!m_rndmEngine) { + ATH_MSG_ERROR("Could not find RndmEngine : " << m_rndmEngineName); + return StatusCode::FAILURE; + } + else { + ATH_MSG_DEBUG("Found RndmEngine : " << m_rndmEngineName); + } + + if(m_doBichsel){ + // Load Bichsel data + m_BichselData.clear(); + ATH_MSG_INFO("The number of collision for each sampling is " << m_nCols); + ATH_MSG_INFO("Loading data file"); + + int n_ParticleType = 6; + for(int iParticleType = 1; iParticleType <= n_ParticleType; iParticleType++){ + + std::ifstream inputFile; + TString inputFileName = TString::Format("PixelDigitization/Bichsel_%d%s.dat", iParticleType, m_nCols == 1 ? "" : TString::Format("_%dsteps", m_nCols).Data()); + + std::string FullFileName = PathResolverFindCalibFile(std::string(inputFileName.Data())); + + inputFile.open(FullFileName.data()); + + ATH_MSG_INFO( "Loading file name : " << inputFileName.Data()); + ATH_MSG_INFO( "-- File full name: " << FullFileName.data()); + ATH_MSG_INFO( "-- Is file open ? " << inputFile.is_open()); + + if(!inputFile.is_open()){ + ATH_MSG_FATAL("Fail to load file " << inputFileName.Data() << " !"); + ATH_MSG_FATAL("EnergyDepositionTool::initialize() failed"); + return StatusCode::FAILURE; + } + + // prepare data + RadDam::BichselData iData; + + double BetaGammaLog10 = 0; inputFile >> BetaGammaLog10; + double ColELog10 = 0; inputFile >> ColELog10; + double IntXLog10 = 0; inputFile >> IntXLog10; + + ATH_MSG_INFO( "-- File eof check : " << inputFile.eof()); + + while(!inputFile.eof()){ + // check if this BetaGamma has already been stored + if( (iData.Array_BetaGammaLog10.size() == 0) || (iData.Array_BetaGammaLog10.back() != BetaGammaLog10) ){ // a new BetaGamma + + if(iData.Array_BetaGammaLog10.size() != 0){ + iData.Array_BetaGammaLog10_UpperBoundIntXLog10.push_back(iData.Array_BetaGammaLog10_IntXLog10.back().back()); + } + + iData.Array_BetaGammaLog10.push_back(BetaGammaLog10); + std::vector<double> new_ColELog10; iData.Array_BetaGammaLog10_ColELog10.push_back(new_ColELog10); + std::vector<double> new_IntXLog10; iData.Array_BetaGammaLog10_IntXLog10.push_back(new_IntXLog10); + } + + iData.Array_BetaGammaLog10_ColELog10.back().push_back(ColELog10); + iData.Array_BetaGammaLog10_IntXLog10.back().push_back(IntXLog10); + + inputFile >> BetaGammaLog10; + inputFile >> ColELog10; + inputFile >> IntXLog10; + } + iData.Array_BetaGammaLog10_UpperBoundIntXLog10.push_back(iData.Array_BetaGammaLog10_IntXLog10.back().back()); + + ATH_MSG_INFO("-- Array_BetaGammaLog10 size : " << iData.Array_BetaGammaLog10.size()); + ATH_MSG_INFO("-- Array_BetaGammaLog10_ColELog10 size at 0 : " << iData.Array_BetaGammaLog10_ColELog10[0].size()); + ATH_MSG_INFO("-- Array_BetaGammaLog10_IntXLog10 size at 0 : " << iData.Array_BetaGammaLog10_IntXLog10[0].size()); + ATH_MSG_INFO("-- Array_BetaGammaLog10_UpperBoundIntXLog10 : " << iData.Array_BetaGammaLog10_UpperBoundIntXLog10.size()); + + m_BichselData.push_back(iData); + inputFile.close(); + + ATH_MSG_INFO("-- Finish loading file " << inputFileName.Data()); + } + ATH_MSG_INFO("Finish Loading Data File"); + } + + m_doDeltaRay = (m_doBichsel && m_doDeltaRay); // if we don't do Bichsel model, no re-simulation on delta-ray at all! + return StatusCode::SUCCESS; +} +//======================================= +// F I N A L I Z E +//======================================= +StatusCode EnergyDepositionTool::finalize() { + ATH_MSG_DEBUG ( "EnergyDepositionTool::finalize()"); + return StatusCode::SUCCESS; +} + + +//======================================= +// D E P O S I T E N E R G Y +//======================================= +StatusCode EnergyDepositionTool::depositEnergy(const TimedHitPtr<SiHit> &phit, const InDetDD::SiDetectorElement &Module, std::vector<std::pair<double,double> > &trfHitRecord, std::vector<double> &initialConditions) const { + + ATH_MSG_DEBUG("Deposit energy in sensor volume."); + + //Check if simulated particle or delta ray + const HepMcParticleLink McLink = HepMcParticleLink(phit->trackNumber(),phit.eventId()); + const HepMC::GenParticle* genPart= McLink.cptr(); + bool delta_hit = true; + if (genPart) delta_hit = false; + double sensorThickness = Module.design().thickness(); + + + //Get path of particle through volume of G4 + double stepsize = sensorThickness/m_numberOfSteps; + const CLHEP::Hep3Vector startPosition=phit->localStartPosition(); + const CLHEP::Hep3Vector endPosition=phit->localEndPosition(); + + //Get entry and exit positions, store for SensorSim tools + double eta_0=startPosition[SiHit::xEta]; + double phi_0=startPosition[SiHit::xPhi]; + const double depth_0=startPosition[SiHit::xDep]; + + double eta_f = endPosition[SiHit::xEta]; + double phi_f = endPosition[SiHit::xPhi]; + const double depth_f = endPosition[SiHit::xDep]; + + //Simulate effect of bowing on entry and exit points + if (!m_disableDistortions && !delta_hit) simulateBow(&Module,phi_0,eta_0,depth_0,phi_f,eta_f,depth_f); + + double dEta=eta_f-eta_0; + double dPhi=phi_f-phi_0; + const double dDepth=depth_f-depth_0; + double pathLength=sqrt(dEta*dEta+dPhi*dPhi+dDepth*dDepth); + + //Scale steps and charge chunks + const int nsteps=int(pathLength/stepsize)+1; + const int ncharges=this->m_numberOfCharges*this->m_numberOfSteps/nsteps+1; + + //Store information + initialConditions.reserve( 8 ); + initialConditions.push_back( eta_0 ); + initialConditions.push_back( phi_0 ); + initialConditions.push_back( depth_0 ); + initialConditions.push_back( dEta ); + initialConditions.push_back( dPhi ); + initialConditions.push_back( dDepth ); + initialConditions.push_back( ncharges ); + + ////////////////////////////////////////////////////// + // *** For Bichsel *** // + ////////////////////////////////////////////////////// + double iTotalLength = pathLength*1000.; // mm -> micrometer + initialConditions.push_back( iTotalLength ); + + // -1 ParticleType means we are unable to run Bichel simulation for this case + int ParticleType = -1; + if(m_doBichsel && !(Module.isDBM())){ + + ParticleType = delta_hit ? (m_doDeltaRay ? 4 : -1) : trfPDG(genPart->pdg_id()); + + + if(ParticleType != -1){ // this is a protection in case delta_hit == true (a delta ray) + TLorentzVector genPart_4V; + + if(genPart){ // non-delta-ray + genPart_4V.SetPtEtaPhiM(genPart->momentum().perp(), genPart->momentum().eta(), genPart->momentum().phi(), genPart->momentum().m()); + double iBetaGamma = genPart_4V.Beta() * genPart_4V.Gamma(); + if(iBetaGamma < m_doBichselBetaGammaCut) ParticleType = -1; + + } + else{ // delta-ray. + double k = phit->energyLoss()/CLHEP::MeV; // unit of MeV + double m = 0.511; // unit of MeV + double iBetaGamma = TMath::Sqrt(k*(2*m+k))/m; + + if(iBetaGamma < m_doBichselBetaGammaCut) ParticleType = -1; + } + + // In-time PU + if(!m_doPU){ + if(phit.eventId() != 0) ParticleType = -1; + } + + // Out-of-time PU + // We don't cut on the out-of-time PU, since studies show that the fraction is too small + } + } + + if(ParticleType != -1){ // yes, good to go with Bichsel + // I don't know why genPart->momentum() goes crazy ... + TLorentzVector genPart_4V; + double iBetaGamma; + + + if(genPart){ + genPart_4V.SetPtEtaPhiM(genPart->momentum().perp(), genPart->momentum().eta(), genPart->momentum().phi(), genPart->momentum().m()); + iBetaGamma = genPart_4V.Beta() * genPart_4V.Gamma(); + } + else{ + double k = phit->energyLoss()/CLHEP::MeV; // unit of MeV + double m = 0.511; // unit of MeV + iBetaGamma = TMath::Sqrt(k*(2*m+k))/m; + } + + int iParticleType = ParticleType; + //double iTotalLength = pathLength*1000.; // mm -> micrometer + + // begin simulation + std::vector<std::pair<double,double> > rawHitRecord = BichselSim(iBetaGamma, iParticleType, iTotalLength, genPart ? (genPart->momentum().e()/CLHEP::MeV) : (phit->energyLoss()/CLHEP::MeV)); + + // check if returned simulation result makes sense + if(rawHitRecord.size() == 0){ // deal with rawHitRecord==0 specifically -- no energy deposition + std::pair<double,double> specialHit; + specialHit.first = 0.; specialHit.second = 0.; + trfHitRecord.push_back(specialHit); + } + else if( (rawHitRecord.size() == 1) && (rawHitRecord[0].first == -1.) && (rawHitRecord[0].second == -1.) ){ // special flag returned from BichselSim meaning it FAILs + for(int j = 0; j < nsteps; j++){ // do the same thing as old digitization method + std::pair<double,double> specialHit; + specialHit.first = 1.0*iTotalLength/nsteps * (j + 0.5); specialHit.second = phit->energyLoss()*1.E+6/nsteps; + trfHitRecord.push_back(specialHit); + } + } + else{ // cluster thousands hits to ~20 groups + trfHitRecord = ClusterHits(rawHitRecord, nsteps); + } + } + else{ // same as old digitization method + ////////////////////////////////////////////////////// + // *** B I C H S E L O F F *** // + ////////////////////////////////////////////////////// + //double iTotalLength = pathLength*1000.; // mm -> micrometer + for(int j = 0; j < nsteps; j++){ // do the same thing as old digitization method + std::pair<double,double> specialHit; + specialHit.first = 1.0*iTotalLength/nsteps * (j + 0.5); specialHit.second = phit->energyLoss()*1.E+6/nsteps; + trfHitRecord.push_back(specialHit); + } + } + + // *** Finsih Bichsel *** // + return StatusCode::SUCCESS; + +} + +//====================================== +// S I M U L A T E B O W +//====================================== +void EnergyDepositionTool::simulateBow(const InDetDD::SiDetectorElement * element, double& xi, double& yi, const double zi, double& xf, double& yf, const double zf) const { + + // If tool is NONE we apply no correction. + if (m_pixDistoTool.empty()) return; + Amg::Vector3D dir(element->hitPhiDirection()*(xf-xi), element->hitEtaDirection()*(yf-yi), element->hitDepthDirection()*(zf-zi)); + + Amg::Vector2D locposi = element->hitLocalToLocal(yi, xi); + Amg::Vector2D locposf = element->hitLocalToLocal(yf, xf); + + Amg::Vector2D newLocposi = m_pixDistoTool->correctSimulation(element->identify(), locposi, dir); + Amg::Vector2D newLocposf = m_pixDistoTool->correctSimulation(element->identify(), locposf, dir); + + // Extract new coordinates and convert back to hit frame. + xi = newLocposi[Trk::x] * element->hitPhiDirection(); + yi = newLocposi[Trk::y] * element->hitEtaDirection(); + + xf = newLocposf[Trk::x] * element->hitPhiDirection(); + yf = newLocposf[Trk::y] * element->hitEtaDirection(); +} + + +//======================================= +// B I C H S E L D E P O S I T I O N +//======================================= +// input total length should be in the unit of micrometer +// InciEnergy should be in MeV +// In case there is any abnormal in runtime, (-1,-1) will be returned indicating old deposition model should be used instead +//----------------------------------------------------------- +std::vector<std::pair<double,double> > EnergyDepositionTool::BichselSim(double BetaGamma, int ParticleType, double TotalLength, double InciEnergy) const{ + ATH_MSG_DEBUG("Begin EnergyDepositionTool::BichselSim"); + + // prepare hit record (output) + std::vector<std::pair<double,double> > rawHitRecord; + double TotalEnergyLoss = 0.; + double accumLength = 0.; + + // load relevant data + RadDam::BichselData iData = m_BichselData[ParticleType-1]; + double BetaGammaLog10 = TMath::Log10(BetaGamma); + std::pair<int,int> indices_BetaGammaLog10 = GetBetaGammaIndices(BetaGammaLog10, iData); + + // upper bound + double IntXUpperBound = GetUpperBound(indices_BetaGammaLog10, BetaGammaLog10, iData); + if(IntXUpperBound <= 0.){ + ATH_MSG_WARNING("Negative IntXUpperBound in EnergyDepositionTool::BichselSim! (-1,-1) will be returned"); + SetFailureFlag(rawHitRecord); + return rawHitRecord; + } + + // mean-free path + double lambda = (1./IntXUpperBound) * 1.E4; // unit of IntX is cm-1. It needs to be converted to micrometer-1 + + // check nan lambda + if(std::isnan(lambda)){ + SetFailureFlag(rawHitRecord); + return rawHitRecord; + } + + // direct those hits with potential too many steps into nominal simulation + int LoopLimit = m_LoopLimit; // limit assuming 1 collision per sampling + if(fabs(1.0*TotalLength/lambda) > LoopLimit){ // m_nCols is cancelled out in the formula + SetFailureFlag(rawHitRecord); + return rawHitRecord; + } + + // begin simulation + int count = 0; + while(true){ + // infinite loop protection + if(count >= (1.0*LoopLimit/m_nCols)){ + ATH_MSG_WARNING("Potential infinite loop in BichselSim. Exit Loop. A special flag will be returned (-1,-1). The total length is " << TotalLength << ". The lambda is " << lambda << "."); + SetFailureFlag(rawHitRecord); + break; + } + + // sample hit position -- exponential distribution + double HitPosition = 0.; + for(int iHit = 0; iHit < m_nCols; iHit++){ + HitPosition += CLHEP::RandExpZiggurat::shoot(m_rndmEngine, lambda); + } + // termination by hit position + // yes, in case m_nCols > 1, we will loose the last m_nCols collisions. So m_nCols cannot be too big + if(accumLength + HitPosition >= TotalLength) + break; + + // sample single collision + double TossEnergyLoss = -1.; + while(TossEnergyLoss <= 0.){ // we have to do this because sometimes TossEnergyLoss will be negative due to too small TossIntX + double TossIntX = CLHEP::RandFlat::shoot(m_rndmEngine, 0., IntXUpperBound); + TossEnergyLoss = GetColE(indices_BetaGammaLog10, TMath::Log10(TossIntX), iData); + } + + // check if it is delta-ray -- delta-ray is already taken care of by G4 and treated as an independent hit. Unfortunately, we won't deal with delta-ray using Bichsel's model + // as long as m_nCols is not very big, the probability of having >= 2 such a big energy loss in a row is very small. In case there is a delta-ray, it would be so dominant that other energy deposition becomes negligible + if(TossEnergyLoss > (m_DeltaRayCut*1000.)){ + TossEnergyLoss = 0.; + } + + bool fLastStep = false; + + if( ((TotalEnergyLoss + TossEnergyLoss)/1.E+6) > InciEnergy ){ + ATH_MSG_WARNING("Energy loss is larger than incident energy in EnergyDepositionTool::BichselSim! This is usually delta-ray."); + TossEnergyLoss = InciEnergy*1.E+6 - TotalEnergyLoss; + fLastStep = true; + } + + // update + accumLength += HitPosition; + TotalEnergyLoss += TossEnergyLoss; + + // record this hit + std::pair<double,double> oneHit; + if(m_nCols == 1) oneHit.first = accumLength; + else oneHit.first = (accumLength - 1.0*HitPosition/2); // as long as m_nCols is small enough (making sure lambda*m_nCols is withint resolution of a pixel), then taking middle point might still be reasonable + oneHit.second = TossEnergyLoss; + rawHitRecord.push_back(oneHit); + + count++; + + if(fLastStep) + break; + } + + ATH_MSG_DEBUG("Finish EnergyDepositionTool::BichselSim"); + + return rawHitRecord; +} + +//======================================= +// C L U S T E R H I T S +//======================================= +std::vector<std::pair<double,double> > EnergyDepositionTool::ClusterHits(std::vector<std::pair<double,double> >& rawHitRecord, int n_pieces) const{ + ATH_MSG_DEBUG("Begin EnergyDepositionTool::ClusterHits"); + std::vector<std::pair<double,double> > trfHitRecord; + + if((int)(rawHitRecord.size()) < n_pieces){ // each single collision is the most fundamental unit + n_pieces = rawHitRecord.size(); + } + + int unitlength = int(1.0*rawHitRecord.size()/n_pieces); + int index_start = 0; + int index_end = unitlength-1; // [index_start, index_end] are included + while(true){ + // calculate weighted center of each slice + double position = 0.; + double energyloss = 0.; + + for(int index = index_start; index <= index_end; index++){ + position += (rawHitRecord[index].first * rawHitRecord[index].second); + energyloss += rawHitRecord[index].second; + } + position = (energyloss == 0. ? 0. : position/energyloss); + + // store + std::pair<double,double> oneHit; + oneHit.first = position; oneHit.second = energyloss; + trfHitRecord.push_back(oneHit); + + // procede to next slice + index_start = index_end + 1; + index_end = index_start + unitlength - 1; + + if(index_start > (int)(rawHitRecord.size()-1)){ + break; + } + + if(index_end > (int)(rawHitRecord.size()-1)){ + index_end = rawHitRecord.size()-1; + } + } + + ATH_MSG_DEBUG("Finsih EnergyDepositionTool::ClusterHits"); + + return trfHitRecord; +} + + +/////////// +// Utils // +/////////// + +//======================================= +// TRF PDG +//======================================= +int EnergyDepositionTool::trfPDG(int pdgId) const{ + if(std::fabs(pdgId) == 2212) return 1; // proton + if(std::fabs(pdgId) == 211) return 2; // pion + // alpha is skipped -- 3 + if(std::fabs(pdgId) == 11) return 4; // electron + if(std::fabs(pdgId) == 321) return 5; // kaon + if(std::fabs(pdgId) == 13) return 6; // muon + + return -1; // unsupported particle +} + +//TODO: why is this implemented? We shuld use a std lib search +//======================================= +// C L U S T E R H I T S +//======================================= +std::pair<int,int> EnergyDepositionTool::FastSearch(std::vector<double> vec, double item) const{ + std::pair<int,int> output; + + int index_low = 0; + int index_up = vec.size()-1; + + if((item < vec[index_low]) || (item > vec[index_up])){ + output.first = -1; output.second = -1; + return output; + } + else if(item == vec[index_low]){ + output.first = index_low; output.second = index_low; + return output; + } + else if(item == vec[index_up]){ + output.first = index_up; output.second = index_up; + return output; + } + + while( (index_up - index_low) != 1 ){ + int index_middle = int(1.0*(index_up + index_low)/2.); + if(item < vec[index_middle]) + index_up = index_middle; + else if(item > vec[index_middle]) + index_low = index_middle; + else{ // accurate hit. Though this is nearly impossible ... + output.first = index_middle; output.second = index_middle; + return output; + } + } + + output.first = index_low; output.second = index_up; + return output; +} + +//======================================= +// B E T A G A M M A I N D E X +//======================================= +std::pair<int,int> EnergyDepositionTool::GetBetaGammaIndices(double BetaGammaLog10, RadDam::BichselData& iData) const{ + std::pair<int,int> indices_BetaGammaLog10; + if(BetaGammaLog10 > iData.Array_BetaGammaLog10.back()){ // last one is used because when beta-gamma is very large, energy deposition behavior is very similar + indices_BetaGammaLog10.first = iData.Array_BetaGammaLog10.size()-1; + indices_BetaGammaLog10.second = iData.Array_BetaGammaLog10.size()-1; + } + else{ + indices_BetaGammaLog10 = FastSearch(iData.Array_BetaGammaLog10, BetaGammaLog10); + } + + return indices_BetaGammaLog10; +} + +//========================================== +// G E T C O L L I S I O N E N E R G Y +//========================================== +//Interpolate collision energy +double EnergyDepositionTool::GetColE(std::pair<int,int> indices_BetaGammaLog10, double IntXLog10, RadDam::BichselData& iData) const{ + + if( (indices_BetaGammaLog10.first==-1) && (indices_BetaGammaLog10.second==-1) ) + return -1.; + + // BetaGammaLog10_2 then + std::pair<int,int> indices_IntXLog10_x2 = FastSearch(iData.Array_BetaGammaLog10_IntXLog10[indices_BetaGammaLog10.second], IntXLog10); + if (indices_IntXLog10_x2.first<0) { return -1; } + if (indices_IntXLog10_x2.second<0) { return -1; } + + double y21 = iData.Array_BetaGammaLog10_IntXLog10[indices_BetaGammaLog10.second][indices_IntXLog10_x2.first]; + double y22 = iData.Array_BetaGammaLog10_IntXLog10[indices_BetaGammaLog10.second][indices_IntXLog10_x2.second]; + double Est_x2 = ((y22 - IntXLog10)*iData.Array_BetaGammaLog10_ColELog10[indices_BetaGammaLog10.second][indices_IntXLog10_x2.first] + (IntXLog10 - y21)*iData.Array_BetaGammaLog10_ColELog10[indices_BetaGammaLog10.second][indices_IntXLog10_x2.second])/(y22-y21); + double Est = Est_x2; + + return TMath::Power(10., Est); +} + +//=========================================== +// Overloaded C O L L I S I O N E N E R G Y +//=========================================== +double EnergyDepositionTool::GetColE(double BetaGammaLog10, double IntXLog10, RadDam::BichselData& iData) const{ + std::pair<int,int> indices_BetaGammaLog10 = GetBetaGammaIndices(BetaGammaLog10, iData); + return GetColE(indices_BetaGammaLog10, IntXLog10, iData); +} + + +//========================================== +// G E T U P P E R B O U N D BETA GAMMA +//========================================== +double EnergyDepositionTool::GetUpperBound(std::pair<int,int> indices_BetaGammaLog10, double BetaGammaLog10, RadDam::BichselData& iData) const{ + + if (indices_BetaGammaLog10.first<0) { return -1; } + if (indices_BetaGammaLog10.second<0) { return -1; } + double BetaGammaLog10_1 = iData.Array_BetaGammaLog10[indices_BetaGammaLog10.first]; + double BetaGammaLog10_2 = iData.Array_BetaGammaLog10[indices_BetaGammaLog10.second]; + + // obtain estimation + double Est_1 = iData.Array_BetaGammaLog10_UpperBoundIntXLog10[indices_BetaGammaLog10.first]; + double Est_2 = iData.Array_BetaGammaLog10_UpperBoundIntXLog10[indices_BetaGammaLog10.second]; + + // final estimation + double Est = ((BetaGammaLog10_2 - BetaGammaLog10)*Est_1 + (BetaGammaLog10 - BetaGammaLog10_1)*Est_2)/(BetaGammaLog10_2 - BetaGammaLog10_1); + + return TMath::Power(10., Est); +} + +//========================================== +// overloaded G E T U P P E R B O U N D +//========================================== +double EnergyDepositionTool::GetUpperBound(double BetaGammaLog10, RadDam::BichselData& iData) const{ + std::pair<int,int> indices_BetaGammaLog10 = GetBetaGammaIndices(BetaGammaLog10, iData); + return GetUpperBound(indices_BetaGammaLog10, BetaGammaLog10, iData); +} + +//========================================== +// S E T F A I L U R E +//========================================== +void EnergyDepositionTool::SetFailureFlag(std::vector<std::pair<double,double> >& rawHitRecord) const{ + rawHitRecord.clear(); + std::pair<double, double> specialFlag; + specialFlag.first = -1.; specialFlag.second = -1.; + rawHitRecord.push_back(specialFlag); + + return; +} diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/EnergyDepositionTool.h b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/EnergyDepositionTool.h new file mode 100644 index 000000000000..2342dc659796 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/EnergyDepositionTool.h @@ -0,0 +1,115 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// EnergyDepositionTool.h +// Header file for class EnergyDepositionTool +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +// Author: Qi Zeng, Rebecca Carney +// 2015-02-14 (Happy Valentines Day!) +// 2018-06 +// Description: +// A general tool to implement Bichsel's energy deposition simultion in silicon. +// Bichsel model can be used to simulate how a single particle deposits energy inside silicon material +// Instead of a Landau distribution, the simulation is done on collision-by-collision level (i.e. single collision between particle and atom) +// This model can better describe how deposited charges distribute along incident path. +// +// This class returns a vector of pairs of doubles, with each pair representing the location of an energy deposition and the energy loss. +/////////////////////////////////////////////////////////////////// + + +#ifndef PIXELDIGITIZATION_EnergyDepositionTool_H +#define PIXELDIGITIZATION_EnergyDepositionTool_H + +#include "GaudiKernel/ServiceHandle.h" +#include "AthenaBaseComps/AthAlgTool.h" +#include "CLHEP/Random/RandomEngine.h" +#include "AthenaKernel/IAtRndmGenSvc.h" +#include "GaudiKernel/ToolHandle.h" +#include "GaudiKernel/Property.h" +#include "GaudiKernel/Service.h" +#include "HitManagement/TimedHitPtr.h" +#include "InDetReadoutGeometry/SiDetectorElement.h" +#include "PixelConditionsTools/IModuleDistortionsTool.h" +#include "SiDigitization/SiChargedDiodeCollection.h" +#include "InDetReadoutGeometry/PixelModuleDesign.h" + +namespace RadDam{ + +//============================= +// C U S T O M S T R U C T +//============================= +struct BichselData +{ + std::vector<double> Array_BetaGammaLog10; + std::vector<std::vector<double> > Array_BetaGammaLog10_ColELog10; // ColE = CollisionEnergy in eV + std::vector<std::vector<double> > Array_BetaGammaLog10_IntXLog10; // IntX = Integrated Xsection. The unit doesn't matter + std::vector<double> Array_BetaGammaLog10_UpperBoundIntXLog10; // upper bound of log10(IntX) +}; + +//==================== +// C L A S S D E F +//==================== +class EnergyDepositionTool : public AthAlgTool { + +public: + + EnergyDepositionTool( const std::string& type, const std::string& name,const IInterface* parent); + + static const InterfaceID& interfaceID() ; + virtual StatusCode initialize(); + virtual StatusCode finalize(); + + virtual ~EnergyDepositionTool(); + StatusCode initTools(); + + std::vector<std::pair<double,double> > BichselSim(double BetaGamma, int ParticleType, double TotalLength, double InciEnergy) const; // output hit record in the format (hit position, energy loss) + + std::vector<std::pair<double,double> > ClusterHits(std::vector<std::pair<double,double> >& rawHitRecord, int n_pieces) const; // cluster hits into n steps (there could be thousands of hit) + int trfPDG(int pdgId) const; // convert pdgId to ParticleType. If it is unsupported particle, -1 is returned. + + virtual StatusCode depositEnergy(const TimedHitPtr<SiHit> &phit, const InDetDD::SiDetectorElement &Module, std::vector<std::pair<double,double> > &trfHitRecord, std::vector<double> &initialConditions) const; + + +// Variables +private: + EnergyDepositionTool(); + + // internal private members // + double m_DeltaRayCut; // Threshold to identify a delta ray. unit in keV + std::vector<BichselData> m_BichselData; // vector to store Bichsel Data. Each entry is for one particle type + int m_nCols; // number of collisions to simulate each time. This is mainly to save CPU time if necessary + int m_LoopLimit; // upper limit on number of loops. The default value is optimized for current configuration. People can tune this number in case of ITK upgrade (very forward barrel) or other new situation. + int m_numberOfSteps; + int m_numberOfCharges; + bool m_disableDistortions; + + const InDetDD::SiDetectorElement *m_module; + bool m_doBichsel; // re-do charge deposition following Bichsel model ? + double m_doBichselBetaGammaCut; // replace momentum cut + bool m_doDeltaRay; // implement Bichsel Model into delta-ray, which does not have truth particle link. + bool m_doPU; // Whether we apply Bichsel model on non-HS particles + + ToolHandle<IModuleDistortionsTool> m_pixDistoTool; + +protected: + ServiceHandle<IAtRndmGenSvc> m_rndmSvc; + std::string m_rndmEngineName; + CLHEP::HepRandomEngine* m_rndmEngine; + +// Functions +private: + void simulateBow(const InDetDD::SiDetectorElement * element,double& xi, double& yi, const double zi, double& xf, double& yf, const double zf) const; + std::pair<int,int> FastSearch(std::vector<double> vec, double item) const; // A quick implementation of binary search in 2D table + std::pair<int,int> GetBetaGammaIndices(double BetaGammaLog10, BichselData& iData) const; // get beta-gamma index. This is so commonly used by other functions that a caching would be beneficial + double GetColE(double BetaGammaLog10, double IntXLog10, BichselData& iData) const; // return ColE NOT ColELog10 ! unit is eV + double GetColE(std::pair<int,int> indices_BetaGammaLog10, double IntXLog10, BichselData& iData) const; // return ColE NOT ColELog10 ! unit is eV + double GetUpperBound(double BetaGammaLog10, BichselData& iData) const; // return IntX upper bound + double GetUpperBound(std::pair<int,int> indices_BetaGammaLog10, double BetaGammaLog10, BichselData& iData) const; // return IntX upper bound + void SetFailureFlag(std::vector<std::pair<double,double> >& rawHitRecord) const; // return (-1,-1) which indicates failure in running BichselSim + }; + +} +#endif //PIXELDIGITIZATION_EnergyDepositionTool_H diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FEI3SimTool.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FEI3SimTool.cxx new file mode 100644 index 000000000000..14daa8bd0122 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FEI3SimTool.cxx @@ -0,0 +1,410 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "FEI3SimTool.h" + +#include "InDetReadoutGeometry/PixelModuleDesign.h" + +#include "SiDigitization/SiHelper.h" +#include "InDetReadoutGeometry/SiReadoutCellId.h" + +#include "CLHEP/Random/RandFlat.h" + +using namespace RadDam; + +FEI3SimTool::FEI3SimTool( const std::string& type, const std::string& name,const IInterface* parent): + FrontEndSimTool(type,name,parent), + m_BarrelHitDuplication({false,false,false,false,false,false,false}), + m_EndcapHitDuplication({false,false,false,false,false,false,false}), + m_BarrelSmallHitToT({7,7,7,7,7,7,7}), + m_EndcapSmallHitToT({7,7,7,7,7,7,7}), + m_timingTune(2015) +{ + declareProperty("BarrelHitDuplication", m_BarrelHitDuplication); + declareProperty("EndcapHitDuplication", m_EndcapHitDuplication); + declareProperty("BarrelSmallHitToT", m_BarrelSmallHitToT); + declareProperty("EndcapSmallHitToT", m_EndcapSmallHitToT); + declareProperty("TimingTune", m_timingTune, "Version of the timing calibration"); +} + +FEI3SimTool::~FEI3SimTool() { } + +StatusCode FEI3SimTool::initialize() { + ATH_CHECK(FrontEndSimTool::initialize()); + ATH_MSG_DEBUG("FEI3SimTool::initialize()"); + return StatusCode::SUCCESS; +} + +StatusCode FEI3SimTool::finalize() { + ATH_MSG_DEBUG("FEI3SimTool::finalize()"); + return StatusCode::SUCCESS; +} + +void FEI3SimTool::process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Collection &rdoCollection) { + + const InDetDD::PixelModuleDesign *p_design = static_cast<const InDetDD::PixelModuleDesign*>(&(chargedDiodes.element())->design()); + if (p_design->getReadoutTechnology()!=InDetDD::PixelModuleDesign::FEI3) { return; } + + const PixelID* pixelId = static_cast<const PixelID *>(chargedDiodes.element()->getIdHelper()); + const IdentifierHash moduleHash = pixelId->wafer_hash(chargedDiodes.identify()); // wafer hash + + int barrel_ec = pixelId->barrel_ec(chargedDiodes.element()->identify()); + int layerIndex = pixelId->layer_disk(chargedDiodes.element()->identify()); + int moduleIndex = pixelId->eta_module(chargedDiodes.element()->identify()); + + // Merge ganged pixel + for (SiChargedDiodeIterator i_chargedDiode=chargedDiodes.begin(); i_chargedDiode!=chargedDiodes.end(); ++i_chargedDiode) { + InDetDD::SiCellId cellID = chargedDiodes.element()->cellIdFromIdentifier(chargedDiodes.getId((*i_chargedDiode).first)); + InDetDD::SiCellId gangedCell = chargedDiodes.element()->gangedCell(cellID); + Identifier gangedID = chargedDiodes.element()->identifierFromCellId(gangedCell); + if (gangedCell.isValid()) { + SiChargedDiode *gangedChargeDiode = chargedDiodes.find(gangedID); + int phiGanged = pixelId->phi_index(gangedID); + int phiThis = pixelId->phi_index(chargedDiodes.getId((*i_chargedDiode).first)); + + if (gangedChargeDiode) { // merge charges + bool maskGanged = ((phiGanged>159) && (phiGanged<168)); + bool maskThis = ((phiThis>159) && (phiThis<168)); + // mask the one ganged pixel that does not correspond to the readout electronics. + // not really sure this is needed + if (maskGanged && maskThis) { + ATH_MSG_ERROR("FEI3SimTool: both ganged pixels are in the mask out region -> BUG!"); + } + if (maskGanged) { + (*i_chargedDiode).second.add(gangedChargeDiode->totalCharge()); // merged org pixel + SiHelper::maskOut(*gangedChargeDiode,true); + } + else { + gangedChargeDiode->add((*i_chargedDiode).second.totalCharge()); // merged org pixel + SiHelper::maskOut((*i_chargedDiode).second,true); + } + } + } + } + + for (SiChargedDiodeIterator i_chargedDiode=chargedDiodes.begin(); i_chargedDiode!=chargedDiodes.end(); ++i_chargedDiode) { + + Identifier diodeID = chargedDiodes.getId((*i_chargedDiode).first); + double charge = (*i_chargedDiode).second.charge(); + + // Apply analogu threshold, timing simulation + double th0 = m_pixelCalibSvc->getThreshold(diodeID); + double ith0 = m_pixelCalibSvc->getTimeWalk(diodeID); + + double threshold = th0+m_pixelCalibSvc->getThresholdSigma(diodeID)*CLHEP::RandGaussZiggurat::shoot(m_rndmEngine)+m_pixelCalibSvc->getNoise(diodeID)*CLHEP::RandGaussZiggurat::shoot(m_rndmEngine); + double intimethreshold = (ith0/th0)*threshold; + + if (charge>threshold) { + int bunchSim; + if ((*i_chargedDiode).second.totalCharge().fromTrack()) { + if (m_timingTune==2015) { bunchSim = relativeBunch2015((*i_chargedDiode).second.totalCharge(),barrel_ec,layerIndex,moduleIndex); } + else { bunchSim = relativeBunch2009(threshold,intimethreshold,(*i_chargedDiode).second.totalCharge()); } + } + else { + bunchSim = CLHEP::RandFlat::shootInt(m_rndmEngine,m_timeBCN); + } + + if (bunchSim<0 || bunchSim>m_timeBCN) { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } + else { SiHelper::SetBunch((*i_chargedDiode).second,bunchSim); } + } + else { + SiHelper::belowThreshold((*i_chargedDiode).second,true,true); + } + + if (barrel_ec==0 && charge<m_BarrelAnalogthreshold.at(layerIndex)) { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } + if (barrel_ec!=0 && charge<m_EndcapAnalogthreshold.at(layerIndex)) { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } + + // charge to ToT conversion + double tot = m_pixelCalibSvc->getTotMean(diodeID,charge); + double totsig = m_pixelCalibSvc->getTotRes(diodeID,tot); + int nToT = static_cast<int>(CLHEP::RandGaussZiggurat::shoot(m_rndmEngine,tot,totsig)); + + if (nToT<1) { nToT=1; } + + if (barrel_ec==0 && nToT<=m_BarrelToTthreshold.at(layerIndex)) { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } + if (barrel_ec!=0 && nToT<=m_EndcapToTthreshold.at(layerIndex)) { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } + + if (barrel_ec==0 && nToT>=m_BarrelLatency.at(layerIndex)) { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } + if (barrel_ec!=0 && nToT>=m_EndcapLatency.at(layerIndex)) { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } + + // Filter events + if (SiHelper::isMaskOut((*i_chargedDiode).second)) { continue; } + if (SiHelper::isDisabled((*i_chargedDiode).second)) { continue; } + + if (!m_pixelConditionsSvc->isActive(moduleHash,diodeID)) { + SiHelper::disabled((*i_chargedDiode).second,true,true); + continue; + } + + int flag = (*i_chargedDiode).second.flag(); + int bunch = (flag>>8)&0xff; + + InDetDD::SiReadoutCellId cellId=(*i_chargedDiode).second.getReadoutCell(); + const Identifier id_readout = chargedDiodes.element()->identifierFromCellId(cellId); + + // Front-End simulation + if (bunch>=0 && bunch<m_timeBCN) { + Pixel1RawData *p_rdo = new Pixel1RawData(id_readout,nToT,bunch,0,bunch); + rdoCollection.push_back(p_rdo); + } + + // Duplication mechanism for FEI3 small hits : + if (barrel_ec==0 && m_BarrelHitDuplication.at(layerIndex)) { + if (nToT<=m_BarrelSmallHitToT.at(layerIndex) && bunch>0 && bunch<=m_timeBCN) { + Pixel1RawData *p_rdo = new Pixel1RawData(id_readout,nToT,bunch-1,0,bunch-1); + rdoCollection.push_back(p_rdo); + } + } + if (barrel_ec!=0 && m_EndcapHitDuplication.at(layerIndex)) { + if (nToT<=m_EndcapSmallHitToT.at(layerIndex) && bunch>0 && bunch<=m_timeBCN) { + Pixel1RawData *p_rdo = new Pixel1RawData(id_readout,nToT,bunch-1,0,bunch-1); + rdoCollection.push_back(p_rdo); + } + } + } + return; +} + +int FEI3SimTool::relativeBunch2009(const double threshold, const double intimethreshold, const SiTotalCharge &totalCharge) const { + + int BCID=0; + double myTimeWalkEff = 0.; + double overdrive = intimethreshold - threshold ; + + //my TimeWalk computation through PARAMETRIZATION (by Francesco De Lorenzi - Milan) + //double curvature = 7.6e7*overdrive-2.64e10; + //double divergence = -1.6*overdrive+942 ; + //double myTimeWalk = curvature/(pow((totalCharge.charge()-divergence),2.5)); + + //my TimeWalk computation through PARAMETRIZATION from 2009 cosmic data (by I. Ibragimov and D. Miller) + double p1 = 20./log(intimethreshold/overdrive); + double p0 = p1 * log (1. - threshold/100000.); + + double myTimeWalk = -p0 -p1 * log(1. - threshold/totalCharge.charge()); + + myTimeWalkEff = myTimeWalk+myTimeWalk*0.2*CLHEP::RandGaussZiggurat::shoot(m_rndmEngine); + + double randomjitter = CLHEP::RandFlat::shoot(m_rndmEngine,(-m_timeJitter/2.0),(m_timeJitter/2.0)); + + //double G4Time = totalCharge.time(); + + double G4Time = getG4Time(totalCharge); + double timing = m_timeZero+myTimeWalkEff+(randomjitter)+G4Time-m_comTime; + BCID = static_cast<int>(floor(timing/m_timePerBCO)); + //ATH_MSG_DEBUG ( CTW << " , " << myTimeWalkEff << " , " << G4Time << " , " << timing << " , " << BCID ); + + return BCID; +} + +// This is the new parameterization based on the 2015 collision data. +int FEI3SimTool::relativeBunch2015(const SiTotalCharge &totalCharge, int barrel_ec, int layer_disk, int moduleID) const { + + /** + * 2016.03.29 Soshi.Tsuno@cern.ch + * + * The time walk effect is directly tuned with timing scan data (collision) in 2015. + * + * See reference in the talk, + * https://indico.cern.ch/event/516099/contributions/1195889/attachments/1252177/1846815/pixelOffline_timing_04.04.2016_soshi.pdf + * + * Ideally, it could be directly parameterized as a function of given ToT. + * However, the ToT calibration was changed over 2015-2016, where newly calibrated ToT value was not available for 2016. + * For instance, the b-layer charge tuning was changed from ToT30@MIP (2015) to ToT18@MIP (2016). + * Thus the time walk effect needs to be parameterized with more universal value, that is, charge information. + * But it was non-trivial because of the migration effect between the border in ToT. + * + * Here in 2015 version, we apply the threshold of the 60% total charge to get a certain ToT value, + * which most describes the data timing structure. + * + * 60% working point tune-2 + */ + + double prob = 0.0; + if (barrel_ec==0 && layer_disk==1) { + if (abs(moduleID)==0) { + if (totalCharge.charge()<4100.0) { prob = 0.9349; } // corresponds to ToT=4 + else if (totalCharge.charge()<4150.0) { prob = 0.2520; } // ToT=5 + else if (totalCharge.charge()<4600.0) { prob = 0.0308; } // ToT=6 + else if (totalCharge.charge()<5250.0) { prob = 0.0160; } // ToT=7 + else if (totalCharge.charge()<5850.0) { prob = 0.0104; } // ToT=8 + else if (totalCharge.charge()<6500.0) { prob = 0.0127; } // ToT=9 + } + if (abs(moduleID)==1) { + if (totalCharge.charge()<4100.0) { prob = 0.9087; } + else if (totalCharge.charge()<4150.0) { prob = 0.2845; } + else if (totalCharge.charge()<4600.0) { prob = 0.0504; } + else if (totalCharge.charge()<5250.0) { prob = 0.0198; } + else if (totalCharge.charge()<5850.0) { prob = 0.0141; } + else if (totalCharge.charge()<6500.0) { prob = 0.0122; } + } + if (abs(moduleID)==2) { + if (totalCharge.charge()<4100.0) { prob = 0.9060; } + else if (totalCharge.charge()<4150.0) { prob = 0.2885; } + else if (totalCharge.charge()<4600.0) { prob = 0.0387; } + else if (totalCharge.charge()<5250.0) { prob = 0.0126; } + else if (totalCharge.charge()<5850.0) { prob = 0.0116; } + else if (totalCharge.charge()<6500.0) { prob = 0.0052; } + } + if (abs(moduleID)==3) { + if (totalCharge.charge()<4100.0) { prob = 0.8774; } + else if (totalCharge.charge()<4150.0) { prob = 0.3066; } + else if (totalCharge.charge()<4600.0) { prob = 0.0449; } + else if (totalCharge.charge()<5250.0) { prob = 0.0188; } + else if (totalCharge.charge()<5850.0) { prob = 0.0169; } + else if (totalCharge.charge()<6500.0) { prob = 0.0096; } + } + if (abs(moduleID)==4) { + if (totalCharge.charge()<4100.0) { prob = 0.8725; } + else if (totalCharge.charge()<4150.0) { prob = 0.2962; } + else if (totalCharge.charge()<4600.0) { prob = 0.0472; } + else if (totalCharge.charge()<5250.0) { prob = 0.0188; } + else if (totalCharge.charge()<5850.0) { prob = 0.0141; } + else if (totalCharge.charge()<6500.0) { prob = 0.0130; } + } + if (abs(moduleID)==5) { + if (totalCharge.charge()<4100.0) { prob = 0.8731; } + else if (totalCharge.charge()<4150.0) { prob = 0.3443; } + else if (totalCharge.charge()<4600.0) { prob = 0.0686; } + else if (totalCharge.charge()<5250.0) { prob = 0.0243; } + else if (totalCharge.charge()<5850.0) { prob = 0.0139; } + else if (totalCharge.charge()<6500.0) { prob = 0.0089; } + } + if (abs(moduleID)==6) { + if (totalCharge.charge()<4100.0) { prob = 0.8545; } + else if (totalCharge.charge()<4150.0) { prob = 0.2946; } + else if (totalCharge.charge()<4600.0) { prob = 0.0524; } + else if (totalCharge.charge()<5250.0) { prob = 0.0218; } + else if (totalCharge.charge()<5850.0) { prob = 0.0218; } + else if (totalCharge.charge()<6500.0) { prob = 0.0191; } + } + } + if (barrel_ec==0 && layer_disk==2) { + if (abs(moduleID)==0) { + if (totalCharge.charge()<4100.0) { prob = 0.9479; } + else if (totalCharge.charge()<4150.0) { prob = 0.6051; } + else if (totalCharge.charge()<4600.0) { prob = 0.2031; } + else if (totalCharge.charge()<5250.0) { prob = 0.0735; } + else if (totalCharge.charge()<5850.0) { prob = 0.0462; } + else if (totalCharge.charge()<6500.0) { prob = 0.0272; } + } + if (abs(moduleID)==1) { + if (totalCharge.charge()<4100.0) { prob = 0.9736; } + else if (totalCharge.charge()<4150.0) { prob = 0.6344; } + else if (totalCharge.charge()<4600.0) { prob = 0.2439; } + else if (totalCharge.charge()<5250.0) { prob = 0.1000; } + else if (totalCharge.charge()<5850.0) { prob = 0.0435; } + else if (totalCharge.charge()<6500.0) { prob = 0.0335; } + } + if (abs(moduleID)==2) { + if (totalCharge.charge()<4100.0) { prob = 0.9461; } + else if (totalCharge.charge()<4150.0) { prob = 0.6180; } + else if (totalCharge.charge()<4600.0) { prob = 0.1755; } + else if (totalCharge.charge()<5250.0) { prob = 0.0647; } + else if (totalCharge.charge()<5850.0) { prob = 0.0476; } + else if (totalCharge.charge()<6500.0) { prob = 0.0470; } + } + if (abs(moduleID)==3) { + if (totalCharge.charge()<4100.0) { prob = 0.9542; } + else if (totalCharge.charge()<4150.0) { prob = 0.5839; } + else if (totalCharge.charge()<4600.0) { prob = 0.1899; } + else if (totalCharge.charge()<5250.0) { prob = 0.0604; } + else if (totalCharge.charge()<5850.0) { prob = 0.0576; } + else if (totalCharge.charge()<6500.0) { prob = 0.0285; } + } + if (abs(moduleID)==4) { + if (totalCharge.charge()<4100.0) { prob = 0.9233; } + else if (totalCharge.charge()<4150.0) { prob = 0.5712; } + else if (totalCharge.charge()<4600.0) { prob = 0.1633; } + else if (totalCharge.charge()<5250.0) { prob = 0.0796; } + else if (totalCharge.charge()<5850.0) { prob = 0.0612; } + else if (totalCharge.charge()<6500.0) { prob = 0.0384; } + } + if (abs(moduleID)==5) { + if (totalCharge.charge()<4100.0) { prob = 0.8994; } + else if (totalCharge.charge()<4150.0) { prob = 0.5176; } + else if (totalCharge.charge()<4600.0) { prob = 0.1626; } + else if (totalCharge.charge()<5250.0) { prob = 0.0698; } + else if (totalCharge.charge()<5850.0) { prob = 0.0416; } + else if (totalCharge.charge()<6500.0) { prob = 0.0382; } + } + if (abs(moduleID)==6) { + if (totalCharge.charge()<4100.0) { prob = 0.8919; } + else if (totalCharge.charge()<4150.0) { prob = 0.5313; } + else if (totalCharge.charge()<4600.0) { prob = 0.1585; } + else if (totalCharge.charge()<5250.0) { prob = 0.0520; } + else if (totalCharge.charge()<5850.0) { prob = 0.0318; } + else if (totalCharge.charge()<6500.0) { prob = 0.0254; } + } + } + if (barrel_ec==0 && layer_disk==3) { + if (abs(moduleID)==0) { + if (totalCharge.charge()<4100.0) { prob = 0.9182; } + else if (totalCharge.charge()<4150.0) { prob = 0.6744; } + else if (totalCharge.charge()<4600.0) { prob = 0.3174; } + else if (totalCharge.charge()<5250.0) { prob = 0.1460; } + else if (totalCharge.charge()<5850.0) { prob = 0.1001; } + else if (totalCharge.charge()<6500.0) { prob = 0.0587; } + } + if (abs(moduleID)==1) { + if (totalCharge.charge()<4100.0) { prob = 0.9255; } + else if (totalCharge.charge()<4150.0) { prob = 0.6995; } + else if (totalCharge.charge()<4600.0) { prob = 0.3046; } + else if (totalCharge.charge()<5250.0) { prob = 0.1449; } + else if (totalCharge.charge()<5850.0) { prob = 0.0954; } + else if (totalCharge.charge()<6500.0) { prob = 0.0608; } + } + if (abs(moduleID)==2) { + if (totalCharge.charge()<4100.0) { prob = 0.9419; } + else if (totalCharge.charge()<4150.0) { prob = 0.7380; } + else if (totalCharge.charge()<4600.0) { prob = 0.3346; } + else if (totalCharge.charge()<5250.0) { prob = 0.1615; } + else if (totalCharge.charge()<5850.0) { prob = 0.0726; } + else if (totalCharge.charge()<6500.0) { prob = 0.0564; } + } + if (abs(moduleID)==3) { + if (totalCharge.charge()<4100.0) { prob = 0.9319; } + else if (totalCharge.charge()<4150.0) { prob = 0.6747; } + else if (totalCharge.charge()<4600.0) { prob = 0.2640; } + else if (totalCharge.charge()<5250.0) { prob = 0.1018; } + else if (totalCharge.charge()<5850.0) { prob = 0.0588; } + else if (totalCharge.charge()<6500.0) { prob = 0.0502; } + } + if (abs(moduleID)==4) { + if (totalCharge.charge()<4100.0) { prob = 0.9276; } + else if (totalCharge.charge()<4150.0) { prob = 0.6959; } + else if (totalCharge.charge()<4600.0) { prob = 0.2859; } + else if (totalCharge.charge()<5250.0) { prob = 0.1214; } + else if (totalCharge.charge()<5850.0) { prob = 0.0776; } + else if (totalCharge.charge()<6500.0) { prob = 0.0387; } + } + if (abs(moduleID)==5) { + if (totalCharge.charge()<4100.0) { prob = 0.8845; } + else if (totalCharge.charge()<4150.0) { prob = 0.6270; } + else if (totalCharge.charge()<4600.0) { prob = 0.2798; } + else if (totalCharge.charge()<5250.0) { prob = 0.1209; } + else if (totalCharge.charge()<5850.0) { prob = 0.0706; } + else if (totalCharge.charge()<6500.0) { prob = 0.0703; } + } + if (abs(moduleID)==6) { + if (totalCharge.charge()<4100.0) { prob = 0.8726; } + else if (totalCharge.charge()<4150.0) { prob = 0.6358; } + else if (totalCharge.charge()<4600.0) { prob = 0.2907; } + else if (totalCharge.charge()<5250.0) { prob = 0.1051; } + else if (totalCharge.charge()<5850.0) { prob = 0.0646; } + else if (totalCharge.charge()<6500.0) { prob = 0.0685; } + } + } + + double G4Time = getG4Time(totalCharge); + double rnd = CLHEP::RandFlat::shoot(m_rndmEngine,0.0,1.0); + + double timeWalk = 0.0; + if (rnd<prob) { timeWalk = 25.0; } + + int BCID = static_cast<int>(floor((G4Time+m_timeZero+timeWalk)/m_timePerBCO)); + + return BCID; +} + + diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FEI3SimTool.h b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FEI3SimTool.h new file mode 100644 index 000000000000..2ebb92894099 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FEI3SimTool.h @@ -0,0 +1,40 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef PIXELDIGITIZATION_FEI3SimTool_H +#define PIXELDIGITIZATION_FEI3SimTool_H + +#include "AthenaBaseComps/AthAlgTool.h" +#include "FrontEndSimTool.h" + +namespace RadDam{ + +class FEI3SimTool:public FrontEndSimTool { + + public: + FEI3SimTool( const std::string& type, const std::string& name,const IInterface* parent); + + virtual StatusCode initialize(); + virtual StatusCode finalize(); + virtual ~FEI3SimTool(); + virtual void process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Collection &rdoCollection); + + private: + FEI3SimTool(); + + std::vector<bool> m_BarrelHitDuplication; + std::vector<bool> m_EndcapHitDuplication; + std::vector<int> m_BarrelSmallHitToT; + std::vector<int> m_EndcapSmallHitToT; + + int m_timingTune; + + int relativeBunch2009(const double threshold, const double intimethreshold, const SiTotalCharge &totalCharge) const; + + int relativeBunch2015(const SiTotalCharge &totalCharge, int barrel_ec, int layer_disk, int moduleID) const; + +}; + +} +#endif // PIXELDIGITIZATION_FEI3SimTool_H diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FEI4SimTool.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FEI4SimTool.cxx new file mode 100644 index 000000000000..f6b32a4d30ea --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FEI4SimTool.cxx @@ -0,0 +1,186 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "FEI4SimTool.h" + +#include "InDetReadoutGeometry/PixelModuleDesign.h" + +#include "SiDigitization/SiHelper.h" +#include "InDetReadoutGeometry/SiReadoutCellId.h" + +#include "CLHEP/Random/RandFlat.h" + +using namespace RadDam; + +FEI4SimTool::FEI4SimTool( const std::string& type, const std::string& name,const IInterface* parent): + FrontEndSimTool(type,name,parent), + m_HitDiscConfig(2) +{ + declareProperty("HitDiscConfig", m_HitDiscConfig); +} + +FEI4SimTool::~FEI4SimTool() { } + +StatusCode FEI4SimTool::initialize() { + CHECK(FrontEndSimTool::initialize()); + ATH_MSG_DEBUG("FEI4SimTool::initialize()"); + + if (m_HitDiscConfig<0 || m_HitDiscConfig>2) { + ATH_MSG_FATAL("HitDisConfig must be [0-2], but not " << m_HitDiscConfig); + return StatusCode::FAILURE; + } + return StatusCode::SUCCESS; +} + +StatusCode FEI4SimTool::finalize() { + ATH_MSG_DEBUG("FEI4SimTool::finalize()"); + return StatusCode::SUCCESS; +} + +void FEI4SimTool::process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Collection &rdoCollection) { + + const InDetDD::PixelModuleDesign *p_design = static_cast<const InDetDD::PixelModuleDesign*>(&(chargedDiodes.element())->design()); + if (p_design->getReadoutTechnology()!=InDetDD::PixelModuleDesign::FEI4) { return; } + + const PixelID* pixelId = static_cast<const PixelID *>(chargedDiodes.element()->getIdHelper()); + const IdentifierHash moduleHash = pixelId->wafer_hash(chargedDiodes.identify()); // wafer hash + + int maxFEI4SmallHit = 2; + int overflowToT = 16; + if (m_HitDiscConfig==0) { maxFEI4SmallHit=0; overflowToT=14; } + if (m_HitDiscConfig==1) { maxFEI4SmallHit=1; overflowToT=15; } + if (m_HitDiscConfig==2) { maxFEI4SmallHit=2; overflowToT=16; } + + int barrel_ec = pixelId->barrel_ec(chargedDiodes.element()->identify()); + int layerIndex = pixelId->layer_disk(chargedDiodes.element()->identify()); + + std::vector<Pixel1RawData*> p_rdo_small_fei4; + int nSmallHitsFEI4 = 0; + std::vector<int> row, col; + const int maxRow = p_design->rowsPerCircuit(); + const int maxCol = p_design->columnsPerCircuit(); + std::vector<std::vector<int>> FEI4Map(maxRow+16,std::vector<int>(maxCol+16)); + + for (SiChargedDiodeIterator i_chargedDiode=chargedDiodes.begin(); i_chargedDiode!=chargedDiodes.end(); ++i_chargedDiode) { + + Identifier diodeID = chargedDiodes.getId((*i_chargedDiode).first); + double charge = (*i_chargedDiode).second.charge(); + + // Apply analogu threshold, timing simulation + double th0 = m_pixelCalibSvc->getThreshold(diodeID); + + double threshold = th0+m_pixelCalibSvc->getThresholdSigma(diodeID)*CLHEP::RandGaussZiggurat::shoot(m_rndmEngine)+m_pixelCalibSvc->getNoise(diodeID)*CLHEP::RandGaussZiggurat::shoot(m_rndmEngine); + + if (charge>threshold) { + int bunchSim; + if ((*i_chargedDiode).second.totalCharge().fromTrack()) { + bunchSim = static_cast<int>(floor((getG4Time((*i_chargedDiode).second.totalCharge())+m_timeZero)/m_timePerBCO)); + } + else { + bunchSim = CLHEP::RandFlat::shootInt(m_rndmEngine,m_timeBCN); + } + + if (bunchSim<0 || bunchSim>m_timeBCN) { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } + else { SiHelper::SetBunch((*i_chargedDiode).second,bunchSim); } + } + else { + SiHelper::belowThreshold((*i_chargedDiode).second,true,true); + } + + if (barrel_ec==0 && charge<m_BarrelAnalogthreshold.at(layerIndex)) { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } + if (barrel_ec!=0 && charge<m_EndcapAnalogthreshold.at(layerIndex)) { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } + + // charge to ToT conversion + double tot = m_pixelCalibSvc->getTotMean(diodeID,charge); + double totsig = m_pixelCalibSvc->getTotRes(diodeID,tot); + int nToT = static_cast<int>(CLHEP::RandGaussZiggurat::shoot(m_rndmEngine,tot,totsig)); + + const PixelID* pixelId = static_cast<const PixelID*>(chargedDiodes.element()->getIdHelper()); + if (pixelId->is_dbm(chargedDiodes.element()->identify())) { + nToT = 8*(charge - 1200. )/(8000. - 1200.); + } + + if (nToT<1) { nToT=1; } + + // FEI4 HitDiscConfig + if (nToT==2 && maxFEI4SmallHit==2) { nToT=1; } + if (nToT>=overflowToT) { nToT=overflowToT; } + + if (barrel_ec==0 && nToT<=m_BarrelToTthreshold.at(layerIndex)) { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } + if (barrel_ec!=0 && nToT<=m_EndcapToTthreshold.at(layerIndex)) { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } + + // Filter events + if (SiHelper::isMaskOut((*i_chargedDiode).second)) { continue; } + if (SiHelper::isDisabled((*i_chargedDiode).second)) { continue; } + + if (!m_pixelConditionsSvc->isActive(moduleHash,diodeID)) { + SiHelper::disabled((*i_chargedDiode).second,true,true); + continue; + } + + int flag = (*i_chargedDiode).second.flag(); + int bunch = (flag>>8)&0xff; + + InDetDD::SiReadoutCellId cellId=(*i_chargedDiode).second.getReadoutCell(); + const Identifier id_readout = chargedDiodes.element()->identifierFromCellId(cellId); + + int iirow = cellId.phiIndex(); + int iicol = cellId.etaIndex(); + if (iicol>=maxCol) { iicol=iicol-maxCol; } // FEI4 copy mechanism works per FE. + + // Front-End simulation + if (bunch>=0 && bunch<m_timeBCN) { + Pixel1RawData *p_rdo = new Pixel1RawData(id_readout,nToT,bunch,0,bunch); + if (nToT>maxFEI4SmallHit) { + rdoCollection.push_back(p_rdo); + FEI4Map[iirow][iicol] = 2; //Flag for "big hits" + } + else { + p_rdo_small_fei4.push_back(p_rdo); + row.push_back(iirow); + col.push_back(iicol); + FEI4Map[iirow][iicol] = 1; //Flag for low hits + nSmallHitsFEI4++; + } + } + } + + // Copy mechanism for IBL small hits: + if (nSmallHitsFEI4>0) { + bool recorded = false; + + //First case: Record small hits which are in the same Pixel Digital Region than a big hit: + for (int ismall=0; ismall<nSmallHitsFEI4; ismall++) { + int rowPDR = row[ismall]/2; + int colPDR = col[ismall]/2; + for (int rowBigHit=2*rowPDR; rowBigHit!=2*rowPDR+2 && rowBigHit<maxRow; ++rowBigHit) { + for (int colBigHit=2*colPDR; colBigHit!=2*colPDR+2 && colBigHit<maxCol; ++colBigHit) { + ATH_MSG_DEBUG("rowBig = " << rowBigHit << " colBig = " << colBigHit << " Map Content = " << FEI4Map[rowBigHit][colBigHit]); + if (FEI4Map[rowBigHit][colBigHit]==2 && !recorded) { + rdoCollection.push_back(p_rdo_small_fei4[ismall]); + recorded = true; + } + } + } + + // Second case: Record small hits which are phi-neighbours with a big hit: + if (!recorded && row[ismall]<maxRow-1) { + if (FEI4Map[row[ismall]+1][col[ismall]]==2) { + rdoCollection.push_back(p_rdo_small_fei4[ismall]); + recorded = true; + } + } + if (!recorded && row[ismall]!=0) { + if (FEI4Map[row[ismall]-1][col[ismall]]==2) { + rdoCollection.push_back(p_rdo_small_fei4[ismall]); + recorded = true; + } + } + } + } + + return; +} + + diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FEI4SimTool.h b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FEI4SimTool.h new file mode 100644 index 000000000000..e9b7e58d07c2 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FEI4SimTool.h @@ -0,0 +1,31 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef PIXELDIGITIZATION_FEI4SimTool_H +#define PIXELDIGITIZATION_FEI4SimTool_H + +#include "AthenaBaseComps/AthAlgTool.h" +#include "FrontEndSimTool.h" + +namespace RadDam{ + +class FEI4SimTool:public FrontEndSimTool { + + public: + FEI4SimTool( const std::string& type, const std::string& name,const IInterface* parent); + + virtual StatusCode initialize(); + virtual StatusCode finalize(); + virtual ~FEI4SimTool(); + virtual void process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Collection &rdoCollection); + + private: + FEI4SimTool(); + + int m_HitDiscConfig; +}; + +} + +#endif // PIXELDIGITIZATION_FEI4SimTool_H diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FrontEndSimTool.h b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FrontEndSimTool.h new file mode 100644 index 000000000000..75ce3be9df72 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FrontEndSimTool.h @@ -0,0 +1,161 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef PIXELDIGITIZATION_FrontEndSimTool_H +#define PIXELDIGITIZATION_FrontEndSimTool_H + +#include "AthenaBaseComps/AthAlgTool.h" +#include "GaudiKernel/ServiceHandle.h" +#include "GaudiKernel/ToolHandle.h" +#include "CLHEP/Random/RandomEngine.h" +#include "CLHEP/Random/RandGaussZiggurat.h" +#include "AthenaKernel/IAtRndmGenSvc.h" + +#include "SiDigitization/SiChargedDiodeCollection.h" +#include "InDetRawData/InDetRawDataCLASS_DEF.h" + +#include "InDetConditionsSummaryService/IInDetConditionsSvc.h" +#include "PixelConditionsServices/IPixelCalibSvc.h" +#include "InDetSimEvent/SiTotalCharge.h" + +#include "CommissionEvent/ComTime.h" + +static const InterfaceID IID_IFrontEndSimTool("FrontEndSimTool", 1, 0); + +class FrontEndSimTool:public AthAlgTool,virtual public IAlgTool { + + public: + FrontEndSimTool( const std::string& type, const std::string& name,const IInterface* parent): + AthAlgTool(type,name,parent), + m_rndmSvc("AtRndmGenSvc",name), + m_rndmEngineName("PixelDigitization"), + m_rndmEngine(nullptr), + m_pixelConditionsSvc("PixelConditionsSummarySvc",name), + m_pixelCalibSvc("PixelCalibSvc",name), + m_timeBCN(1), + m_timeZero(5.0), + m_timePerBCO(25.0), + m_useComTime(false), + m_ComputedTime(nullptr), + m_comTime(0.0), + m_timeJitter(0.0), + m_eventStore("StoreGateSvc", name), + m_BarrelAnalogthreshold({-1,-1,-1,-1,-1,-1,-1}), + m_EndcapAnalogthreshold({-1,-1,-1,-1,-1,-1,-1}), + m_BarrelToTthreshold({-1,-1,-1,-1,-1,-1,-1}), + m_EndcapToTthreshold({-1,-1,-1,-1,-1,-1,-1}), + m_BarrelLatency({256,256,256,256,256,256,256}), + m_EndcapLatency({256,256,256,256,256,256,256}) + { + declareInterface<FrontEndSimTool>(this); + declareProperty("RndmSvc", m_rndmSvc, "Random number service used in FE simulation"); + declareProperty("RndmEngine", m_rndmEngineName, "Random engine name"); + declareProperty("PixelConditionsSummarySvc", m_pixelConditionsSvc); + declareProperty("PixelCalibSvc", m_pixelCalibSvc); + declareProperty("TimeBCN", m_timeBCN, "Number of BCID"); + declareProperty("TimeZero", m_timeZero, "Time zero...?"); + declareProperty("TimePerBCO", m_timePerBCO, "Time per BCO - should be 25ns"); + declareProperty("UseComTime", m_useComTime, "Use ComTime for timing"); + declareProperty("TimeJitter", m_timeJitter, "Time jitter"); + declareProperty("BarrelAnalogthreshold", m_BarrelAnalogthreshold); + declareProperty("EndcapAnalogthreshold", m_EndcapAnalogthreshold); + declareProperty("BarrelToTthreshold", m_BarrelToTthreshold); + declareProperty("EndcapToTthreshold", m_EndcapToTthreshold); + declareProperty("BarrelLatency", m_BarrelLatency); + declareProperty("EndcapLatency", m_EndcapLatency); + } + + static const InterfaceID& interfaceID() { return IID_IFrontEndSimTool; } + + virtual StatusCode initialize() { + CHECK(AthAlgTool::initialize()); + + CHECK(m_rndmSvc.retrieve()); + + CHECK(m_pixelConditionsSvc.retrieve()); + + CHECK(m_pixelCalibSvc.retrieve()); + + m_rndmEngine = m_rndmSvc->GetEngine(m_rndmEngineName); + if (!m_rndmEngine) { + ATH_MSG_ERROR("Could not find RndmEngine : " << m_rndmEngineName); + return StatusCode::FAILURE; + } + else { + ATH_MSG_DEBUG("Found RndmEngine : " << m_rndmEngineName); + } + + if (m_useComTime) { + CHECK(m_eventStore.retrieve()); + if (StatusCode::SUCCESS==m_eventStore->retrieve(m_ComputedTime,"ComTime")) { + m_comTime = m_ComputedTime->getTime(); + ATH_MSG_DEBUG("Found tool for cosmic/commissioning timing: ComTime"); + } + else { + ATH_MSG_WARNING("Did not find tool needed for cosmic/commissioning timing: ComTime"); + } + } + + return StatusCode::SUCCESS; + } + + virtual StatusCode finalize() { return StatusCode::FAILURE; } + virtual ~FrontEndSimTool() {} + virtual void process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Collection &rdoCollection) = 0; + + private: + FrontEndSimTool(); + + protected: + ServiceHandle<IAtRndmGenSvc> m_rndmSvc; + std::string m_rndmEngineName; + CLHEP::HepRandomEngine *m_rndmEngine; + + ServiceHandle<IInDetConditionsSvc> m_pixelConditionsSvc; + ServiceHandle<IPixelCalibSvc> m_pixelCalibSvc; + + double m_timeBCN; + double m_timeZero; + double m_timePerBCO; + bool m_useComTime; /**< use ComTime for timing */ + ComTime *m_ComputedTime; + double m_comTime; /**< cosmics timing ofs */ + double m_timeJitter; + ServiceHandle<StoreGateSvc> m_eventStore; + std::vector<int> m_BarrelAnalogthreshold; + std::vector<int> m_EndcapAnalogthreshold; + std::vector<int> m_BarrelToTthreshold; + std::vector<int> m_EndcapToTthreshold; + std::vector<int> m_BarrelLatency; + std::vector<int> m_EndcapLatency; + + double getG4Time(const SiTotalCharge &totalCharge) const { + // If there is one single charge, return its time: + if (totalCharge.chargeComposition().empty()) { return totalCharge.time(); } + + std::list<SiCharge>::const_iterator p_charge=totalCharge.chargeComposition().begin(); + int findfirst = 0; + SiCharge first = *p_charge; + + // Look for first charge which is not noise + for ( ; p_charge!=totalCharge.chargeComposition().end() ; p_charge++) { + if (p_charge->processType()!=SiCharge::noise) { findfirst=1; break; } + } + + // if all charges were noise, return the time of the highest charge + if (findfirst == 0) { return totalCharge.time(); } + + // look for the earlist charge among the remaining non-noise charges: + first = *p_charge; + p_charge++; + + for ( ; p_charge!=totalCharge.chargeComposition().end() ; p_charge++) { + if (p_charge->time()<first.time() && p_charge->processType()!=SiCharge::noise) { first=*p_charge; } + } + return first.time(); + } + +}; + +#endif // PIXELDIGITIZATION_FrontEndSimTool_H diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/IChargeCollProbSvc.h b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/IChargeCollProbSvc.h new file mode 100644 index 000000000000..cf87508ba429 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/IChargeCollProbSvc.h @@ -0,0 +1,38 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef IChargeCollProbSvc_H +#define IChargeCollProbSvc_H + +// Include Files +#include "GaudiKernel/IInterface.h" +#include "AthenaKernel/IOVSvcDefs.h" +#include <string> + +// Forward declarations +//class IIncidentListener; +//class Incident; +class StatusCode; + +// Declaration of the interface ID ( interface id, major version, minor version) +static const InterfaceID IID_IChargeCollProbSvc("IChargeCollProbSvc", 1 , 0); + + +class IChargeCollProbSvc : virtual public IInterface { +public: + + /// Retrieve interface ID + static const InterfaceID& interfaceID() { return IID_IChargeCollProbSvc; } + + + virtual StatusCode readProbMap(std::string) = 0; + virtual StatusCode printProbMap( std::string ) = 0; + virtual double getProbMapEntry(std::string, int, int)const = 0; + + //virtual MsgStream GetMsgStream() const =0; + +}; + + +#endif diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelChargeSmearer.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelChargeSmearer.cxx new file mode 100644 index 000000000000..197b7b1070ac --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelChargeSmearer.cxx @@ -0,0 +1,51 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// PixelChargeSmearer.cxx +// Implementation file for class PixelChargeSmearer +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + +#include "PixelChargeSmearer.h" +#include "SiDigitization/SiChargedDiodeCollection.h" + +using namespace RadDam; + +PixelChargeSmearer::PixelChargeSmearer(const std::string& type, const std::string& name,const IInterface* parent): + PixelProcessorTool(type,name,parent), + m_amplitude(0) +{ + declareProperty("ThermalNoise",m_amplitude,"Thermal noise amplitude"); +} + +PixelChargeSmearer::~PixelChargeSmearer() {} + +StatusCode PixelChargeSmearer::initialize() { + CHECK(PixelProcessorTool::initialize()); + ATH_MSG_DEBUG("PixelChargeSmearer::initialize()"); + return StatusCode::SUCCESS; +} + +StatusCode PixelChargeSmearer::finalize() { + ATH_MSG_DEBUG("PixelChargeSmearer::finalize()"); + return StatusCode::SUCCESS; +} + +void PixelChargeSmearer::process(SiChargedDiodeCollection &collection) { + + // if the noise amplitude if 0, do nothing + if (0==m_amplitude) return; + + // loop on all charged diodes + for (std::pair<const InDetDD::SiCellId, SiChargedDiode> & i_chargedDiode : collection) { + + // create noise charge + SiCharge charge(m_amplitude*CLHEP::RandGaussZiggurat::shoot(m_rndmEngine),0,SiCharge::noise); + + // add it to the charged diode + i_chargedDiode.second.add(charge); + } +} diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelChargeSmearer.h b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelChargeSmearer.h new file mode 100644 index 000000000000..0f045c3b0b77 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelChargeSmearer.h @@ -0,0 +1,37 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// PixelChargeSmearer.h +// Header file for class PixelChargeSmearer +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// +#ifndef PIXELDIGITIZATION_PIXELCHARGESMEARER_H +#define PIXELDIGITIZATION_PIXELCHARGESMEARER_H + +#include "PixelProcessorTool.h" + +namespace RadDam{ + +class PixelChargeSmearer:public PixelProcessorTool { + + public: + + PixelChargeSmearer( const std::string& type, const std::string& name,const IInterface* parent); + + virtual ~PixelChargeSmearer(); + virtual StatusCode initialize(); + virtual StatusCode finalize(); + virtual void process(SiChargedDiodeCollection &collection); + + private: + PixelChargeSmearer(); + + double m_amplitude; +}; + +} + +#endif // SITHERMALDIODENOISEGENERATOR_H diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitization.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitization.cxx new file mode 100644 index 000000000000..f87be8e91cda --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitization.cxx @@ -0,0 +1,46 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +//////////////////////////////////////////////////////////////////////////// +// PixelDigitization.cxx +// Implementation file for class PixelDigitization +//////////////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +//////////////////////////////////////////////////////////////////////////// + +#include "PixelDigitization.h" +#include "PixelDigitizationTool.h" + +using namespace RadDam; + +// Constructor with parameters: +PixelDigitization::PixelDigitization(const std::string &name, + ISvcLocator *pSvcLocator) : + AthAlgorithm(name,pSvcLocator), + m_pixelDigitizationTool("PixelDigitizationTool") +{ + declareProperty("DigitizationTool", m_pixelDigitizationTool, "PixelDigitizationTool Name"); +} + +PixelDigitization::~PixelDigitization() { } + +// Initialize method: +StatusCode PixelDigitization::initialize() { + + ATH_MSG_DEBUG("initialize()"); + CHECK(m_pixelDigitizationTool.retrieve()); + ATH_MSG_DEBUG ( "Successfully retreived IPixelDigitizaitonTool." ); + return StatusCode::SUCCESS; +} + +// Execute method: +StatusCode PixelDigitization::execute() { + ATH_MSG_DEBUG ( "execute()" ); + return m_pixelDigitizationTool->processAllSubEvents(); +} + +StatusCode PixelDigitization::finalize() { + ATH_MSG_DEBUG ( "finalize()" ); + return StatusCode::SUCCESS; +} diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitization.h b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitization.h new file mode 100644 index 000000000000..06f0f9154885 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitization.h @@ -0,0 +1,97 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// PixelDigitization.h +// Header file for class PixelDigitization +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// +// Top algorithm class for Pixel digitization +/////////////////////////////////////////////////////////////////// +// Version 2.1 10/07/2001 David Calvet +// Revisited version. 04-04-03 Davide Costanzo +// - Moved to the the SiDigitization +// - Added PixelID +// - Added createRDO class +// - creates RDOs instead of digits +// Revisited version. 06-12-06 Marian Zdrazil +// - Modified PixelDigitization to accomodate needs of the Pixel +// EndCap C Cosmic Test. We need to check the status of each +// module, whether it was in a readout and if it has any bad +// channels. The code should be further developed to access the +// conditions database (COOL) just like SCT does. +// Revisited version 04/07/2006 Fredrik Tegenfeldt +// - Made the TOT parameters available via jobOpts +// Restructured/rewritten version 29/08/2013 Matthew Klein +// - Eliminated dependence on SiDigitization +// - Added separate class for each technology to account for addition +// of IBL +// - Functions to choose technology and detect presence of IBL +// - Other structural/minor changes +/////////////////////////////////////////////////////////////////// + +/** @class PixelDigitization + * @brief The main pixel digitization class + * @author David Calvet + * @author Davide Costanzo + * @author Fredrik Tegenfeldt + * @author Matthe Klein + * + * \b Description + * + * This is the main class for the pixel digitization process. That is, for each event it + * reads the Geant 4 produced hits and simulates the detector respons. + * + * The current design uses so called 'charge processors' for each simulated + * process that affects the digitization. + * Such a processor inherits from SiDigitization::SiChargedDiodesProcessor. + * The number of processors is not explicitly limited apart from performance issues. + * + * + * <b>Job options</b> + * + * <table border="1"> + * <tr><td><b>Name</b></td> <td><b>Description</b></td></tr> + * <tr><td>DigitizationTool</td> <td>Pixel Digtization Tool Name</td></tr> + * </table> + */ + +#ifndef PIXELDIGITIZATION_PIXELDIGITIZATION_H +#define PIXELDIGITIZATION_PIXELDIGITIZATION_H + +// Base class +#include "AthenaBaseComps/AthAlgorithm.h" +// Data members +#include "GaudiKernel/ToolHandle.h" + +#include "PileUpTools/PileUpToolBase.h" + +namespace RadDam{ + +class PixelDigitization : public AthAlgorithm { + +public: + + /** Constructor with parameters */ + PixelDigitization(const std::string &name,ISvcLocator *pSvcLocator); + + /** Destructor */ + ~PixelDigitization(); + + /** Algorithm::initialize() */ + virtual StatusCode initialize(); + + /** Algorithm::execute() */ + virtual StatusCode execute(); + + /** Algorithm::finalize() */ + virtual StatusCode finalize(); + +private: + ToolHandle<IPileUpTool> m_pixelDigitizationTool; +}; + +} +#endif // PIXELDIGITIZATION_PIXELDIGITIZATION_H diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitizationTool.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitizationTool.cxx new file mode 100644 index 000000000000..c256ef159727 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitizationTool.cxx @@ -0,0 +1,437 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +//////////////////////////////////////////////////////////////////////////// +// PixelDigitizationTool.cxx +// Implementation file for class PixelDigitizationTool +//////////////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +//////////////////////////////////////////////////////////////////////////// +#include "PixelDigitizationTool.h" + +#include "PileUpTools/PileUpMergeSvc.h" +#include "AthenaKernel/IAtRndmGenSvc.h" + +#include "SiDigitization/SiChargedDiodeCollection.h" +#include "Identifier/Identifier.h" +#include "InDetIdentifier/PixelID.h" +#include "InDetReadoutGeometry/SiDetectorManager.h" + +#include "AthenaKernel/errorcheck.h" +#include "StoreGate/DataHandle.h" +#include "CxxUtils/make_unique.h" + +#include <limits> +#include <cstdint> + +using namespace RadDam; + +static constexpr unsigned int crazyParticleBarcode(std::numeric_limits<int32_t>::max()); +//Barcodes at the HepMC level are int + +PixelDigitizationTool::PixelDigitizationTool(const std::string &type, + const std::string &name, + const IInterface * pIID) : + PileUpToolBase(type,name,pIID), + m_rdoContainer("PixelRDOs"), + m_simDataColl("PixelSDO_Map"), + m_HardScatterSplittingMode(0), + m_HardScatterSplittingSkipper(false), + m_rndmEngineName("PixelDigitization"), + m_onlyHitElements(false), + m_processorTool(nullptr), + m_chargeTool(nullptr), + m_fesimTool(nullptr), + m_energyDepositionTool(nullptr), + m_detID(nullptr), + m_vetoThisBarcode(crazyParticleBarcode), + m_timedHits(nullptr), + m_rndmSvc("AtRndmGenSvc",name), + m_mergeSvc("PileUpMergeSvc",name), + m_rndmEngine(nullptr), + m_detManager(nullptr), + m_inputObjectName(""), + m_createNoiseSDO(false) +{ + declareProperty("PixelProcessorTools", m_processorTool, "List of processor tools"); + declareProperty("ChargeTools", m_chargeTool, "List of charge tools"); + declareProperty("FrontEndSimTools", m_fesimTool, "List of Front-End simulation tools"); + declareProperty("EnergyDepositionTool", m_energyDepositionTool, "Energy deposition tool"); + declareProperty("RndmSvc", m_rndmSvc, "Random number service used in Pixel Digitization"); + declareProperty("MergeSvc", m_mergeSvc, "Merge service used in Pixel digitization"); + declareProperty("InputObjectName", m_inputObjectName, "Input Object name" ); + declareProperty("CreateNoiseSDO", m_createNoiseSDO, "Set create noise SDO flag"); + declareProperty("RDOCollName", m_rdoContainer, "RDO collection name"); + declareProperty("SDOCollName", m_simDataColl, "SDO collection name"); + declareProperty("RndmEngine", m_rndmEngineName, "Random engine name"); + declareProperty("OnlyHitElements", m_onlyHitElements, "Process only elements with hits"); + declareProperty("HardScatterSplittingMode", m_HardScatterSplittingMode, "Control pileup & signal splitting" ); + declareProperty("ParticleBarcodeVeto",m_vetoThisBarcode=crazyParticleBarcode, "Barcode of particle to ignore"); +} + +//======================================= +// I N I T I A L I Z E +//======================================= +StatusCode PixelDigitizationTool::initialize() { + ATH_MSG_DEBUG("PixelDigitizationTool::Initialize()"); + + // check the input object name + if (m_inputObjectName=="") { + ATH_MSG_FATAL("Property InputObjectName not set !"); + return StatusCode::FAILURE; + } + else { + ATH_MSG_DEBUG("Input objects: '" << m_inputObjectName << "'"); + } + + // Initialize services + CHECK(m_mergeSvc.retrieve()); + + // Initialize random number generator + CHECK(m_rndmSvc.retrieve()); + m_rndmEngine = m_rndmSvc->GetEngine(m_rndmEngineName); + if (!m_rndmEngine) { + ATH_MSG_ERROR("Could not find RndmEngine : " << m_rndmEngineName); + return StatusCode::FAILURE; + } + else { + ATH_MSG_DEBUG("Found RndmEngine : " << m_rndmEngineName); + } + + // Initialize detector manager + CHECK(detStore()->retrieve(m_detManager,"Pixel")); + + CHECK(detStore()->retrieve(m_detID,"PixelID")); + ATH_MSG_DEBUG("Pixel ID helper retrieved"); + + // Initialize tools + CHECK(m_processorTool.retrieve()); + + CHECK(m_chargeTool.retrieve()); + + CHECK(m_fesimTool.retrieve()); + + CHECK(m_energyDepositionTool.retrieve()); + + return StatusCode::SUCCESS; +} + +//======================================= +// F I N A L I Z E +//======================================= +StatusCode PixelDigitizationTool::finalize() { + return StatusCode::SUCCESS; +} + +//======================================= +// P R O C E S S S U B E V E N T S +//======================================= +StatusCode PixelDigitizationTool::processAllSubEvents() { + + // Prepare event + ATH_MSG_DEBUG("Prepare event"); + CHECK(prepareEvent(0)); + + // Get the container(s) + typedef PileUpMergeSvc::TimedList<SiHitCollection>::type TimedHitCollList; + TimedHitCollList hitCollList; + unsigned int numberOfSiHits(0); + CHECK(m_mergeSvc->retrieveSubEvtsData(m_inputObjectName,hitCollList,numberOfSiHits)); + m_timedHits->reserve(numberOfSiHits); + // Now merge all collections into one + for (TimedHitCollList::iterator iColl=hitCollList.begin(); iColl!=hitCollList.end(); iColl++) { + // Decide if this event will be processed depending on HardScatterSplittingMode + if (m_HardScatterSplittingMode==2 && !m_HardScatterSplittingSkipper) { m_HardScatterSplittingSkipper=true; continue; } + if (m_HardScatterSplittingMode==1 && m_HardScatterSplittingSkipper) { continue; } + if (m_HardScatterSplittingMode==1 && !m_HardScatterSplittingSkipper) { m_HardScatterSplittingSkipper=true; } + const SiHitCollection* p_collection(iColl->second); + m_timedHits->insert(iColl->first, p_collection); + ATH_MSG_DEBUG("SiTrackerHitCollection found with"<<p_collection->size()<<" hits"); // loop on the hit collections + } + + // Digitize hits + CHECK(digitizeEvent()); + + ATH_MSG_DEBUG("Digitize success!"); + return StatusCode::SUCCESS; +} + +//======================================= +// D I G I T I Z E E V E N T (main) +//======================================= +StatusCode PixelDigitizationTool::digitizeEvent() { + ATH_MSG_VERBOSE("PixelDigitizationTool::digitizeEvent()"); + + SiChargedDiodeCollection *chargedDiodes = new SiChargedDiodeCollection; + std::vector<std::pair<double,double> > trfHitRecord; trfHitRecord.clear(); + std::vector<double> initialConditions; initialConditions.clear(); + + std::vector<bool> processedElements; + processedElements.resize(m_detID->wafer_hash_max(),false); + + TimedHitCollection<SiHit>::const_iterator firstHit, lastHit; + + //////////////////////////////////////////////// + // **** Loop over the Detectors with hits **** + //////////////////////////////////////////////// + while (m_timedHits->nextDetectorElement(firstHit,lastHit)) { + + // Create the identifier for the collection + ATH_MSG_DEBUG("create ID for the hit collection"); + const PixelID* PID = static_cast<const PixelID*>(m_detID); + Identifier id = PID->wafer_id((*firstHit)->getBarrelEndcap(),(*firstHit)->getLayerDisk(),(*firstHit)->getPhiModule(),(*firstHit)->getEtaModule()); + + // Get the det element from the manager + InDetDD::SiDetectorElement* sielement = m_detManager->getDetectorElement(id); + + if (sielement==0) { + ATH_MSG_DEBUG(" Barrel=" << (*firstHit)->getBarrelEndcap() << " Layer=" << (*firstHit)->getLayerDisk() << " Eta=" << (*firstHit)->getEtaModule() << " Phi=" << (*firstHit)->getPhiModule()); + ATH_MSG_ERROR("detector manager could not find element with id = " << id); + break; + } + + // Create the charged diodes collection + chargedDiodes->setDetectorElement(sielement); + const InDetDD::PixelModuleDesign *p_design= static_cast<const InDetDD::PixelModuleDesign*>(&(sielement->design())); + + /////////////////////////////////////////////////////////// + // **** Loop over the hits and created charged diodes **** + /////////////////////////////////////////////////////////// + for (TimedHitCollection<SiHit>::const_iterator phit=firstHit; phit!=lastHit; phit++) { + //skip hits which are more than 10us away + if (fabs((*phit)->meanTime())<10000.0*CLHEP::ns) { + ATH_MSG_DEBUG("HASH = " << m_detID->wafer_hash(m_detID->wafer_id((*phit)->getBarrelEndcap(),(*phit)->getLayerDisk(),(*phit)->getPhiModule(),(*phit)->getEtaModule()))); + + // Apply charge collection tools + ATH_MSG_DEBUG("Running sensor simulation."); + + //Deposit energy in sensor + CHECK(m_energyDepositionTool->depositEnergy( *phit, *sielement, trfHitRecord, initialConditions)); + + //Create signal in sensor, loop over collection of loaded sensorTools + for (unsigned int itool=0; itool<m_chargeTool.size(); itool++) { + ATH_MSG_DEBUG("Executing tool " << m_chargeTool[itool]->name()); + if (m_chargeTool[itool]->induceCharge( *phit, *chargedDiodes, *sielement, *p_design, trfHitRecord, initialConditions)==StatusCode::FAILURE) { break; } + } + initialConditions.clear(); + trfHitRecord.clear(); + ATH_MSG_DEBUG("charges filled!"); + } + } + + // Apply processor tools + ATH_MSG_DEBUG("Apply processor tools"); + for (unsigned int itool=0; itool<m_processorTool.size(); itool++) { + ATH_MSG_DEBUG("Executing tool " << m_processorTool[itool]->name()); + m_processorTool[itool]->process(*chargedDiodes); + } + + ATH_MSG_DEBUG("Hit collection ID=" << m_detID->show_to_string(chargedDiodes->identify())); + ATH_MSG_DEBUG("in digitize elements with hits: ec - layer - eta - phi " << m_detID->barrel_ec(chargedDiodes->identify()) << " - " << m_detID->layer_disk(chargedDiodes->identify()) << " - " << m_detID->eta_module(chargedDiodes->identify()) << " - " << m_detID->phi_module(chargedDiodes->identify())); + + IdentifierHash idHash = chargedDiodes->identifyHash(); + + assert(idHash<processedElements.size()); + processedElements[idHash] = true; + + /////////////////////////////////////////////////////////// + // *** Create and store RDO and SDO **** + /////////////////////////////////////////////////////////// + if (!chargedDiodes->empty()) { + + PixelRDO_Collection *RDOColl = new PixelRDO_Collection(chargedDiodes->identifyHash()); + RDOColl->setIdentifier(chargedDiodes->identify()); + for (unsigned int itool=0; itool<m_fesimTool.size(); itool++) { + ATH_MSG_DEBUG("Executing tool " << m_fesimTool[itool]->name()); + m_fesimTool[itool]->process(*chargedDiodes,*RDOColl); + } + CHECK(m_rdoContainer->addCollection(RDOColl,RDOColl->identifyHash())); + + ATH_MSG_DEBUG("Pixel RDOs '" << RDOColl->identifyHash() << "' added to container"); + addSDO(chargedDiodes); + } + chargedDiodes->clear(); + } + delete m_timedHits; + m_timedHits = nullptr; + ATH_MSG_DEBUG("hits processed"); + + /////////////////////////////////////////////////////////// + // *** Loop over the Detectors without hits **** + /////////////////////////////////////////////////////////// + if (!m_onlyHitElements) { + ATH_MSG_DEBUG("processing elements without hits"); + for (unsigned int i=0; i<processedElements.size(); i++) { + if (!processedElements[i]) { + IdentifierHash idHash = i; + if (!idHash.is_valid()) { ATH_MSG_ERROR("PixelDetector element id hash is invalid = " << i); } + + const InDetDD::SiDetectorElement *element = m_detManager->getDetectorElement(idHash); + if (element) { + ATH_MSG_DEBUG ("In digitize of untouched elements: layer - phi - eta " << m_detID->layer_disk(element->identify()) << " - " << m_detID->phi_module(element->identify()) << " - " << m_detID->eta_module(element->identify()) << " - " << "size: " << processedElements.size()); + + chargedDiodes->setDetectorElement(element); + ATH_MSG_DEBUG("Digitize non hit element"); + + // Apply processor tools + ATH_MSG_DEBUG("Apply processor tools"); + for (unsigned int itool=0; itool<m_processorTool.size(); itool++) { + ATH_MSG_DEBUG("Executing tool " << m_processorTool[itool]->name()); + m_processorTool[itool]->process(*chargedDiodes); + } + + // Create and store RDO and SDO + if (!chargedDiodes->empty()) { + PixelRDO_Collection *RDOColl = new PixelRDO_Collection(chargedDiodes->identifyHash()); + RDOColl->setIdentifier(chargedDiodes->identify()); + for (unsigned int itool=0; itool<m_fesimTool.size(); itool++) { + ATH_MSG_DEBUG("Executing tool " << m_fesimTool[itool]->name()); + m_fesimTool[itool]->process(*chargedDiodes,*RDOColl); + } + CHECK(m_rdoContainer->addCollection(RDOColl,RDOColl->identifyHash())); + + ATH_MSG_DEBUG("Pixel RDOs '" << RDOColl->identifyHash() << "' added to container"); + addSDO(chargedDiodes); + } + chargedDiodes->clear(); + } + } + } + } + delete chargedDiodes; + ATH_MSG_DEBUG("non-hits processed"); + + return StatusCode::SUCCESS; +} + +//======================================= +// A D D S D O +//======================================= +// Convert a SiTotalCharge to a InDetSimData, and store it. (this needs working...) +//----------------------------------------------------------------------------------------------- +void PixelDigitizationTool::addSDO(SiChargedDiodeCollection* collection) { + + typedef SiTotalCharge::list_t list_t; + + std::vector<InDetSimData::Deposit> deposits; + deposits.reserve(5); // no idea what a reasonable number for this would be with pileup + + // loop over the charged diodes + SiChargedDiodeIterator EndOfDiodeCollection = collection->end(); + for(SiChargedDiodeIterator i_chargedDiode=collection->begin(); i_chargedDiode!=EndOfDiodeCollection; ++i_chargedDiode) { + deposits.clear(); + const list_t& charges = (*i_chargedDiode).second.totalCharge().chargeComposition(); + + bool real_particle_hit = false; + // loop over the list + list_t::const_iterator EndOfChargeList = charges.end(); + for ( list_t::const_iterator i_ListOfCharges = charges.begin(); i_ListOfCharges!=EndOfChargeList; ++i_ListOfCharges) { + + const HepMcParticleLink& trkLink = i_ListOfCharges->particleLink(); + int barcode = trkLink.barcode(); + if ((barcode == 0) || (barcode == m_vetoThisBarcode)){ + continue; + } + if(!real_particle_hit) { real_particle_hit = trkLink.isValid(); } + // check if this track number has been already used. + std::vector<InDetSimData::Deposit>::reverse_iterator theDeposit = deposits.rend(); //dummy value + std::vector<InDetSimData::Deposit>::reverse_iterator depositsR_end = deposits.rend(); + std::vector<InDetSimData::Deposit>::reverse_iterator i_Deposit = deposits.rbegin(); + for ( ; i_Deposit != depositsR_end; ++i_Deposit) { + if( (*i_Deposit).first == trkLink ) {theDeposit = i_Deposit; break;} + } + + // if the charge has already hit the Diode add it to the deposit + if(theDeposit != depositsR_end ) (*theDeposit).second += i_ListOfCharges->charge(); + else { // create a new deposit + InDetSimData::Deposit deposit(trkLink, i_ListOfCharges->charge()); + deposits.push_back(deposit); + } + } + // add the simdata object to the map: + if(real_particle_hit || m_createNoiseSDO) { + m_simDataColl->insert(std::make_pair(collection->getId((*i_chargedDiode).first),InDetSimData(deposits,(*i_chargedDiode).second.flag()))); + } + } +} + +//======================================= +// P R E P A R E E V E N T +//======================================= +StatusCode PixelDigitizationTool::prepareEvent(unsigned int) { + ATH_MSG_VERBOSE("PixelDigitizationTool::prepareEvent()"); + + // Prepare event + if (!m_rdoContainer.isValid()) { + if (!(m_rdoContainer=CxxUtils::make_unique<PixelRDO_Container>(m_detID->wafer_hash_max())).isValid()) { + ATH_MSG_FATAL("Could not create PixelRDO_Container"); + return StatusCode::FAILURE; + } + } + ATH_MSG_DEBUG("PixelRDO_Container " << m_rdoContainer.name() << " registered in StoreGate"); + + if (!m_simDataColl.isValid()) { + if (!(m_simDataColl = CxxUtils::make_unique<InDetSimDataCollection>()).isValid()) { + ATH_MSG_FATAL("Could not create InDetSimDataCollection"); + return StatusCode::FAILURE; + } + } + ATH_MSG_DEBUG("InDetSimDataCollection " << m_simDataColl.name() << " registered in StoreGate"); + + // Create hit collection + if(m_timedHits) delete m_timedHits; + m_timedHits = new TimedHitCollection<SiHit>(); + + m_HardScatterSplittingSkipper = false; + return StatusCode::SUCCESS; +} + +//======================================= +// M E R G E E V E N T +//======================================= +StatusCode PixelDigitizationTool::mergeEvent() { + ATH_MSG_VERBOSE("PixelDigitizationTool::mergeEvent()"); + + // Digitize hits + CHECK(digitizeEvent()); + + for (std::vector<SiHitCollection*>::iterator it = m_hitCollPtrs.begin();it!=m_hitCollPtrs.end();it++) { + (*it)->Clear(); + delete(*it); + } + m_hitCollPtrs.clear(); + + return StatusCode::SUCCESS; +} + +//======================================= +// P R O C E S S B U N C H X I N G +//======================================= +StatusCode PixelDigitizationTool::processBunchXing(int bunchXing, SubEventIterator bSubEvents, SubEventIterator eSubEvents) { + + ATH_MSG_VERBOSE("PixelDigitizationTool::processBunchXing() " << bunchXing); + //decide if this event will be processed depending on HardScatterSplittingMode & bunchXing + if (m_HardScatterSplittingMode==2 && !m_HardScatterSplittingSkipper) { m_HardScatterSplittingSkipper=true; return StatusCode::SUCCESS; } + if (m_HardScatterSplittingMode==1 && m_HardScatterSplittingSkipper) { return StatusCode::SUCCESS; } + if (m_HardScatterSplittingMode==1 && !m_HardScatterSplittingSkipper) { m_HardScatterSplittingSkipper=true; } + + SubEventIterator iEvt = bSubEvents; + for (; iEvt!=eSubEvents; iEvt++) { + StoreGateSvc& seStore = *iEvt->ptr()->evtStore(); + ATH_MSG_VERBOSE("SubEvt StoreGate " << seStore.name() << " :" << " bunch crossing : " << bunchXing << " time offset : " << iEvt->time() << " event number : " << iEvt->ptr()->eventNumber() << " run number : " << iEvt->ptr()->runNumber()); + + const SiHitCollection* seHitColl(0); + + CHECK(seStore.retrieve(seHitColl,m_inputObjectName)); + ATH_MSG_DEBUG("SiHitCollection found with " << seHitColl->size() << " hits"); + + PileUpTimeEventIndex timeIndex(iEvt->time(),iEvt->index()); + SiHitCollection *hitCollPtr = new SiHitCollection(*seHitColl); + m_timedHits->insert(timeIndex,hitCollPtr); + m_hitCollPtrs.push_back(hitCollPtr); + } + + return StatusCode::SUCCESS; +} + diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitizationTool.h b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitizationTool.h new file mode 100644 index 000000000000..b9d46c6b317c --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitizationTool.h @@ -0,0 +1,95 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// PixelDigitizationTool.h +// Header file for class PixelDigitizationTool +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// +#ifndef PIXELDIGITIZATION_PIXELDIGITIZATIONTOOL_H +#define PIXELDIGITIZATION_PIXELDIGITIZATIONTOOL_H + +#include "PileUpTools/PileUpToolBase.h" +#include "HitManagement/TimedHitCollection.h" +#include "InDetSimEvent/SiHitCollection.h" + +#include "InDetRawData/InDetRawDataCLASS_DEF.h" +#include "GaudiKernel/ToolHandle.h" +#include "GaudiKernel/ServiceHandle.h" + +#include "StoreGate/WriteHandle.h" + +#include "InDetSimData/InDetSimDataCollection.h" +#include "PixelProcessorTool.h" +#include "SensorSimTool.h" +#include "FrontEndSimTool.h" +#include "EnergyDepositionTool.h" + +namespace InDetDD{ + class SiDetectorManager; +} + +namespace RadDam{ + +class PixelDigitizationTool : public PileUpToolBase { + + public: + PixelDigitizationTool(const std::string &type, const std::string &name, const IInterface *pIID); + + virtual StatusCode initialize() override; + virtual StatusCode processAllSubEvents() override; + virtual StatusCode finalize() override; + + virtual StatusCode prepareEvent(unsigned int) override; + StatusCode digitizeEvent(); + virtual StatusCode mergeEvent() override; + virtual StatusCode processBunchXing(int bunchXing, SubEventIterator bSubEvents, SubEventIterator eSubEvents) override final; + + protected: + void addSDO(SiChargedDiodeCollection *collection); + + private: + + PixelDigitizationTool(); + PixelDigitizationTool(const PixelDigitizationTool&); + PixelDigitizationTool &operator=(const PixelDigitizationTool&); + + std::vector<SiHitCollection*> m_hitCollPtrs; + + SG::WriteHandle<PixelRDO_Container> m_rdoContainer; + SG::WriteHandle<InDetSimDataCollection> m_simDataColl; + + int m_HardScatterSplittingMode; + bool m_HardScatterSplittingSkipper; + std::string m_rndmEngineName; + + bool m_onlyHitElements; + + ToolHandleArray<PixelProcessorTool> m_processorTool; + ToolHandleArray<SensorSimTool> m_chargeTool; + ToolHandleArray<FrontEndSimTool> m_fesimTool; + ToolHandle<EnergyDepositionTool> m_energyDepositionTool; + + const PixelID *m_detID; + + IntegerProperty m_vetoThisBarcode; + + TimedHitCollection<SiHit> *m_timedHits; + + protected: + + ServiceHandle <IAtRndmGenSvc> m_rndmSvc; + ServiceHandle <PileUpMergeSvc> m_mergeSvc; + + CLHEP::HepRandomEngine *m_rndmEngine; + const InDetDD::SiDetectorManager *m_detManager; + + std::string m_inputObjectName; + bool m_createNoiseSDO; + +}; + +} +#endif // PIXELDIGITIZATION_PIXELDIGITIZATIONTOOL_H diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDiodeCrossTalkGenerator.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDiodeCrossTalkGenerator.cxx new file mode 100644 index 000000000000..250514a6f490 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDiodeCrossTalkGenerator.cxx @@ -0,0 +1,96 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// PixelDiodeCrossTalkGenerator.cxx +// Implementation file for class PixelDiodeCrossTalkGenerator +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + +#include "PixelDiodeCrossTalkGenerator.h" +#include "SiDigitization/SiChargedDiodeCollection.h" +#include "InDetReadoutGeometry/PixelModuleDesign.h" +#include "InDetReadoutGeometry/SiCellId.h" +#include "InDetIdentifier/PixelID.h" + +using namespace InDetDD; +using namespace RadDam; + +PixelDiodeCrossTalkGenerator::PixelDiodeCrossTalkGenerator(const std::string& type, const std::string& name,const IInterface* parent): + PixelProcessorTool(type,name,parent), + m_diodeCrossTalk(.06) +{ + declareProperty("DiodeCrossTalk",m_diodeCrossTalk,"Diode cross talk factor"); +} + +PixelDiodeCrossTalkGenerator::~PixelDiodeCrossTalkGenerator() {} + +StatusCode PixelDiodeCrossTalkGenerator::initialize() { + CHECK(PixelProcessorTool::initialize()); + ATH_MSG_DEBUG("PixelDiodeCrossTalkGenerator::initialize()"); + return StatusCode::SUCCESS; +} + +StatusCode PixelDiodeCrossTalkGenerator::finalize() { + ATH_MSG_DEBUG("PixelDiodeCrossTalkGenerator::finalize()"); + return StatusCode::SUCCESS; +} + +void PixelDiodeCrossTalkGenerator::process(SiChargedDiodeCollection &collection) { + + // if the cross talk factor if 0, do nothing + if (0==m_diodeCrossTalk) return; + + // get pixel module design and check it + const PixelModuleDesign *p_design= static_cast<const PixelModuleDesign *>(&(collection.design())); + if (!p_design) return; + + // create a local copy of the current collection + // (cross-talk must be added only to the current SiChargedDiodes) + // -ME fix- std::map<Identifier32,SiChargedDiode> oldChargedDiodes=collection.chargedDiodes(); + SiChargedDiodeMap oldChargedDiodes=collection.chargedDiodes(); + + // loop on all old charged diodes + // -ME fix- for(std::map<Identifier32,SiChargedDiode>::const_iterator p_chargedDiode= + for (SiChargedDiodeMap::const_iterator p_chargedDiode=oldChargedDiodes.begin(); p_chargedDiode!=oldChargedDiodes.end(); ++p_chargedDiode) { + + // current diode + SiCellId diode=(*p_chargedDiode).second.diode(); + + // get the list of neighbours for this diode + std::vector<SiCellId> neighbours; + p_design->neighboursOfCell(diode,neighbours); + + // loop on all neighbours + for (std::vector<SiCellId>::const_iterator p_neighbour=neighbours.begin(); p_neighbour!=neighbours.end(); ++p_neighbour) { + + // get the intersection length between the two diodes + const double intersection=p_design->intersectionLength(diode,*p_neighbour); + + // add cross talk only if the intersection is non-zero + // if the original pixel is at (col,row) then the intersection length is + // (col+-1, row+-1) : 0 -> diagonal + // (col , row+-1) : 0.4 mm (or 0.6 if long pixel) pixel width = 400um or 600um + // (col+-1, row ) : 0.05 mm , pixel height = 50um + // intersection length is just the length of the contact surface between + // the two pixels + if (intersection>0) { + // + // create a new charge: + // Q(new) = Q*L*X + // Q = charge of source pixel + // L = intersection length [mm] + // X = crosstalk factor [mm-1] + // + const SiChargedDiode & chargedDiode = (*p_chargedDiode).second; + + SiCharge charge(chargedDiode.charge()*intersection*m_diodeCrossTalk, chargedDiode.totalCharge().time(), SiCharge::diodeX_Talk, chargedDiode.totalCharge().particleLink()); + // add this new charge + collection.add(*p_neighbour,charge); + } + } + } +} + diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDiodeCrossTalkGenerator.h b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDiodeCrossTalkGenerator.h new file mode 100644 index 000000000000..76b9fbcfad40 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDiodeCrossTalkGenerator.h @@ -0,0 +1,36 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// PixelDiodeCrossTalkGenerator.h +// Header file for class PixelDiodeCrossTalkGenerator +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// +#ifndef PIXELDIGITIZATION_PIXELDIODECROSSTALKGENERATOR_H +#define PIXELDIGITIZATION_PIXELDIODECROSSTALKGENERATOR_H + +#include "PixelProcessorTool.h" + +namespace RadDam{ + +class PixelDiodeCrossTalkGenerator:public PixelProcessorTool { + + public: + + PixelDiodeCrossTalkGenerator( const std::string& type, const std::string& name,const IInterface* parent); + + virtual ~PixelDiodeCrossTalkGenerator(); + virtual StatusCode initialize(); + virtual StatusCode finalize(); + virtual void process(SiChargedDiodeCollection &collection); + + private: + PixelDiodeCrossTalkGenerator(); + + double m_diodeCrossTalk; +}; +} + +#endif // PIXELDIGITIZATION_PIXELDIODECROSSTALKGENERATOR_H diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelNoisyCellGenerator.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelNoisyCellGenerator.cxx new file mode 100644 index 000000000000..f198c4f45d02 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelNoisyCellGenerator.cxx @@ -0,0 +1,174 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// PixelNoisyCellGenerator.cxx +// Implementation file for class PixelNoisyCellGenerator +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + +#include "PixelNoisyCellGenerator.h" +#include "InDetReadoutGeometry/SiCellId.h" +#include "InDetReadoutGeometry/SiReadoutCellId.h" +#include "InDetReadoutGeometry/PixelModuleDesign.h" +#include "InDetReadoutGeometry/PixelDetectorManager.h" + + +#include "CLHEP/Random/RandFlat.h" +#include "CLHEP/Random/RandPoisson.h" + +#include<fstream> +#include<sstream> +#include<string> +#include<limits> +#include<iomanip> + +using namespace RadDam; + +PixelNoisyCellGenerator::PixelNoisyCellGenerator(const std::string& type, const std::string& name,const IInterface* parent): + PixelProcessorTool(type,name,parent), + m_pixelCalibSvc("PixelCalibSvc", name), + m_timeBCN(1), + m_mergeCharge(false), + m_pixelID(0), + m_rndNoiseProb(5e-8) +{ + declareProperty("TimeBCN", m_timeBCN, "Number of BCID"); + declareProperty("NoiseShape", m_noiseShape, "Vector containing noise ToT shape"); + declareProperty("MergeCharge", m_mergeCharge, ""); + declareProperty("RndNoiseProb", m_rndNoiseProb, "Random noisy pixels, amplitude from calib. - NOT special pixels!"); +} + +PixelNoisyCellGenerator::~PixelNoisyCellGenerator() {} + +StatusCode PixelNoisyCellGenerator::initialize() { + CHECK(PixelProcessorTool::initialize()); + + CHECK(m_pixelCalibSvc.retrieve()); + ATH_MSG_DEBUG("Retrieved PixelCalibSvc"); + + CHECK(detStore()->retrieve(m_pixelID,"PixelID")); + + CHECK(detStore()->retrieve(m_pixMgr,"Pixel")); + + ATH_MSG_DEBUG("PixelNoisyCellGenerator::initialize()"); + return StatusCode::SUCCESS; +} + +StatusCode PixelNoisyCellGenerator::finalize() { + ATH_MSG_DEBUG("PixelNoisyCellGenerator::finalize()"); + return StatusCode::SUCCESS; +} + +void PixelNoisyCellGenerator::process(SiChargedDiodeCollection &collection) { + + // Get Module identifier + Identifier mmod = collection.identify(); + ATH_MSG_DEBUG(" Processing diodes for module " << m_pixelID->show_to_string(mmod)); + + double pnoise_rndm(m_rndNoiseProb); + if (pnoise_rndm>0) addRandomNoise(collection,pnoise_rndm); + + return; +} + +void PixelNoisyCellGenerator::addRandomNoise(SiChargedDiodeCollection &collection, double occupancy) const { + + // get pixel module design and check it + const InDetDD::PixelModuleDesign *p_design = static_cast<const InDetDD::PixelModuleDesign *>(&(collection.design())); + + // compute number of noisy cells + // multiply the number of pixels with BCN since noise will be evenly distributed + // over time + int number_rndm=CLHEP::RandPoisson::shoot(m_rndmEngine, + p_design->numberOfCircuits() // =8 + *p_design->columnsPerCircuit() // =18 + *p_design->rowsPerCircuit() // =320 + *occupancy + *static_cast<double>(m_timeBCN)); + + for (int i=0; i<number_rndm; i++) { + int circuit = CLHEP::RandFlat::shootInt(m_rndmEngine,p_design->numberOfCircuits()); + int column = CLHEP::RandFlat::shootInt(m_rndmEngine,p_design->columnsPerCircuit()); + int row = CLHEP::RandFlat::shootInt(m_rndmEngine,p_design->rowsPerCircuit()); + addCell(collection,p_design,circuit,column,row); + } + return; +} + +void PixelNoisyCellGenerator::addCell(SiChargedDiodeCollection &collection,const InDetDD::PixelModuleDesign *design, int circuit, int column, int row) const { + ATH_MSG_DEBUG("addCell 1 circuit = " << circuit << ", column = " << column << ", row = " << row); +#ifdef __PIXEL_DEBUG__ + ATH_MSG_DEBUG("addCell: circuit,column,row=" << circuit << "," << column << "," << row); +#endif + ATH_MSG_DEBUG("addCell 2 circuit = " << circuit << ", column = " << column << ", row = " << row); + + if ( row > 159 && design->getReadoutTechnology() == InDetDD::PixelModuleDesign::FEI3 ) row = row+8; // jump over ganged pixels - rowsPerCircuit == 320 above + ATH_MSG_DEBUG("addCell 3 circuit = " << circuit << ", column = " << column << ", row = " << row); + + InDetDD::SiReadoutCellId roCell(row, design->columnsPerCircuit() * circuit + column); + ATH_MSG_DEBUG("addCell 4 circuit = " << circuit << ", column = " << column << ", row = " << row); + + Identifier noisyID=collection.element()->identifierFromCellId(roCell); + ATH_MSG_DEBUG("addCell 5 circuit = " << circuit << ", column = " << column << ", row = " << row); + + // if required, check if the cell is already hit + if (!m_mergeCharge) { + if (collection.AlreadyHit(noisyID)) { + roCell = InDetDD::SiReadoutCellId(); // Set it to an Invalid ID + } + } + + // create the diode if the cell is ok + // p_cell is NOT ok only if: + // * the newObject() call above failed + // * no charge merging is allowed and cell already hit + ATH_MSG_DEBUG("addCell 6 circuit = " << circuit << ", column = " << column << ", row = " << row); + if (roCell.isValid()) { + ATH_MSG_DEBUG("addCell 7 circuit = " << circuit << ", column = " << column << ", row = " << row); + InDetDD::SiCellId diode = roCell; + ATH_MSG_DEBUG("addCell 7a circuit = " << circuit << ", column = " << column << ", row = " << row); + + // create a random charge following the ToT shape of the noise measured in automn 2006 in EndCapA + double ToT = getNoiseToT(); + ATH_MSG_DEBUG ( "addCell 7b circuit = " << circuit << ", column = " << column << ", row = " << row); + + ATH_MSG_DEBUG ( "addCell 7c circuit = " << circuit << ", column = " << column << ", row = " << row); + double chargeShape = m_pixelCalibSvc->getCharge(noisyID,ToT); + ATH_MSG_DEBUG ( "addCell 7d circuit = " << circuit << ", column = " << column << ", row = " << row); + // const double chargeGauss = chargeOfs + chargeVar*CLHEP::RandGaussZiggurat::shoot( m_rndmEngine ); + + // add this charge to the collection + // if (mergeCharge) and p_diode is already hit, the charge is merged + // the add() will create a SiChargedDiode (if it does not exist). + // if a new one is created, the flag is not set (==0). + // + // Use chargeShape rather than chargeGauss + + ATH_MSG_DEBUG ( "addCell 8 circuit = " << circuit << ", column = " << column << ", row = " << row); + collection.add(diode,SiCharge(chargeShape,0,SiCharge::noise)); + ATH_MSG_DEBUG ( "addCell 9 circuit = " << circuit << ", column = " << column << ", row = " << row); + } + return; +} + +double PixelNoisyCellGenerator::getNoiseToT() const { +// +// Generate a noise ToT according to the ToT noise distribution seen under cosmic tests. +// + ATH_MSG_DEBUG("Beginning getNoiseToT()"); + double x = CLHEP::RandFlat::shoot(m_rndmEngine,0.,1.); + ATH_MSG_DEBUG ( " x = " << x ); + int bin=0; + ATH_MSG_DEBUG("size = " << m_noiseShape.size()); + for(int i=1; i<256; i++){ + ATH_MSG_DEBUG ( " i = " << i << " noiseshape = " << m_noiseShape[i] ); + if(x < m_noiseShape[i] && x > m_noiseShape[i-1]) bin = i - 1; + } + double ToTm = bin + 1.5; + double ToT = CLHEP::RandGaussZiggurat::shoot(m_rndmEngine,ToTm,1.); + return ToT; + ATH_MSG_DEBUG("Ending getNoiseToT()"); +} diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelNoisyCellGenerator.h b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelNoisyCellGenerator.h new file mode 100644 index 000000000000..676b7e4f5c99 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelNoisyCellGenerator.h @@ -0,0 +1,57 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// PixelNoisyCellGenerator.h +// Header file for class PixelNoisyCellGenerator +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// +#ifndef PIXELDIGITIZATION_PIXELNOISYCELLGENERATOR_H +#define PIXELDIGITIZATION_PIXELNOISYCELLGENERATOR_H + +#include "PixelProcessorTool.h" + +#include "PixelConditionsServices/IPixelCalibSvc.h" + +#include "InDetReadoutGeometry/SiDetectorElement.h" + +namespace InDetDD{ + class PixelModuleDesign; + class PixelDetectorManager; +} + +class PixelID; + +namespace RadDam{ + +class PixelNoisyCellGenerator:public PixelProcessorTool { + + public: + PixelNoisyCellGenerator( const std::string& type, const std::string& name,const IInterface* parent); + + virtual ~PixelNoisyCellGenerator(); + virtual StatusCode initialize(); + virtual StatusCode finalize(); + virtual void process(SiChargedDiodeCollection &collection); + + private: + PixelNoisyCellGenerator(); + + ServiceHandle<IPixelCalibSvc> m_pixelCalibSvc; + double m_timeBCN; + bool m_mergeCharge; + std::vector<double> m_noiseShape; + void addRandomNoise(SiChargedDiodeCollection &collection, double occupancy) const; + void addCell(SiChargedDiodeCollection &collection, const InDetDD::PixelModuleDesign *design, int circuit, int column, int row) const; + + double getNoiseToT() const; + const PixelID *m_pixelID; /**< the ID helper */ + double m_rndNoiseProb; + const InDetDD::PixelDetectorManager *m_pixMgr; + +}; + +} +#endif // PIXELDIGITIZATION_PIXELNOISYCELLGENERATOR_H diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelProcessorTool.h b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelProcessorTool.h new file mode 100644 index 000000000000..72bc727ff056 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelProcessorTool.h @@ -0,0 +1,64 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef PIXELDIGITIZATION_PIXELPROCESSORTOOL_H +#define PIXELDIGITIZATION_PIXELPROCESSORTOOL_H + +#include "AthenaBaseComps/AthAlgTool.h" +#include "GaudiKernel/ServiceHandle.h" +#include "GaudiKernel/ToolHandle.h" +#include "CLHEP/Random/RandomEngine.h" +#include "CLHEP/Random/RandGaussZiggurat.h" +#include "AthenaKernel/IAtRndmGenSvc.h" + +#include "SiDigitization/SiChargedDiodeCollection.h" + +static const InterfaceID IID_IPixelProcessorTool("PixelProcessorTool", 1, 0); + +class PixelProcessorTool:public AthAlgTool,virtual public IAlgTool { + + public: + PixelProcessorTool( const std::string& type, const std::string& name,const IInterface* parent): + AthAlgTool(type,name,parent), + m_rndmSvc("AtRndmGenSvc",name), + m_rndmEngineName("PixelDigitization"), + m_rndmEngine(nullptr) + { + declareInterface<PixelProcessorTool>(this); + declareProperty("RndmSvc", m_rndmSvc, "Random number service used in FE simulation"); + declareProperty("RndmEngine", m_rndmEngineName, "Random engine name"); + } + + static const InterfaceID& interfaceID() { return IID_IPixelProcessorTool; } + + virtual StatusCode initialize() { + CHECK(AthAlgTool::initialize()); + + CHECK(m_rndmSvc.retrieve()); + m_rndmEngine = m_rndmSvc->GetEngine(m_rndmEngineName); + if (!m_rndmEngine) { + ATH_MSG_ERROR("Could not find RndmEngine : " << m_rndmEngineName); + return StatusCode::FAILURE; + } + else { + ATH_MSG_DEBUG("Found RndmEngine : " << m_rndmEngineName); + } + return StatusCode::SUCCESS; + } + + virtual StatusCode finalize() { return StatusCode::FAILURE; } + virtual ~PixelProcessorTool() {} + virtual void process(SiChargedDiodeCollection &chargedDiodes) = 0; + + private: + PixelProcessorTool(); + + protected: + ServiceHandle<IAtRndmGenSvc> m_rndmSvc; + std::string m_rndmEngineName; + CLHEP::HepRandomEngine *m_rndmEngine; + +}; + +#endif // PIXELDIGITIZATION_PixelProcessorTool_H diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelRandomDisabledCellGenerator.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelRandomDisabledCellGenerator.cxx new file mode 100644 index 000000000000..4bf185a8315e --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelRandomDisabledCellGenerator.cxx @@ -0,0 +1,53 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// PixelRandomDisabledCellGenerator.cxx +// Implementation file for class PixelRandomDisabledCellGenerator +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + +#include "PixelRandomDisabledCellGenerator.h" +#include "SiDigitization/SiHelper.h" + +#include "CLHEP/Random/RandFlat.h" + +using namespace RadDam; + +PixelRandomDisabledCellGenerator::PixelRandomDisabledCellGenerator(const std::string& type, const std::string& name,const IInterface* parent): + PixelProcessorTool(type,name,parent), + m_disableProbability(9e-3) +{ + declareProperty("TotalBadChannels",m_disableProbability); +} + +PixelRandomDisabledCellGenerator::~PixelRandomDisabledCellGenerator() {} + +StatusCode PixelRandomDisabledCellGenerator::initialize() { + CHECK(PixelProcessorTool::initialize()); + + ATH_MSG_INFO("\tCreating disabled cell generator with "<<m_disableProbability<<" probability"); + + ATH_MSG_DEBUG("PixelRandomDisabledCellGenerator::initialize()"); + return StatusCode::SUCCESS; +} + +StatusCode PixelRandomDisabledCellGenerator::finalize() { + ATH_MSG_DEBUG ("PixelRandomDisabledCellGenerator::finalize()"); + return StatusCode::SUCCESS; +} + +void PixelRandomDisabledCellGenerator::process(SiChargedDiodeCollection &collection) { + // disabling is applied to all cells even unconnected or below threshold + // ones to be able to use these cells as well + + for(SiChargedDiodeIterator i_chargedDiode=collection.begin(); i_chargedDiode!=collection.end(); ++i_chargedDiode) { + // disable the diode randomly + if (CLHEP::RandFlat::shoot(m_rndmEngine)<m_disableProbability) { + SiHelper::disabled((*i_chargedDiode).second,true,false); + } + } +} + diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelRandomDisabledCellGenerator.h b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelRandomDisabledCellGenerator.h new file mode 100644 index 000000000000..6dd6fe1de69e --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelRandomDisabledCellGenerator.h @@ -0,0 +1,37 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// PixelRandomDisabledCellGenerator.h +// Header file for class PixelRandomDisabledCellGenerator +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +////////////////////////////////////////////////////////////////// +#ifndef PIXELDIGITIZATION_PIXELRANDOMDISABLEDCELLGENERATOR_H +#define PIXELDIGITIZATION_PIXELRANDOMDISABLEDCELLGENERATOR_H + +#include "PixelProcessorTool.h" + +namespace RadDam{ + +class PixelRandomDisabledCellGenerator:public PixelProcessorTool { + + public: + PixelRandomDisabledCellGenerator( const std::string& type, const std::string& name,const IInterface* parent); + + virtual ~PixelRandomDisabledCellGenerator(); + virtual StatusCode initialize(); + virtual StatusCode finalize(); + virtual void process(SiChargedDiodeCollection &collection); + + private: + PixelRandomDisabledCellGenerator(); + + double m_disableProbability; // probability that a cell is disabled + +}; + +} + +#endif diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/RD53SimTool.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/RD53SimTool.cxx new file mode 100644 index 000000000000..c272c6c70f63 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/RD53SimTool.cxx @@ -0,0 +1,172 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "RD53SimTool.h" + +#include "InDetReadoutGeometry/PixelModuleDesign.h" + +#include "SiDigitization/SiHelper.h" +#include "InDetReadoutGeometry/SiReadoutCellId.h" + +#include "CLHEP/Random/RandFlat.h" + +using namespace RadDam; + +RD53SimTool::RD53SimTool( const std::string& type, const std::string& name,const IInterface* parent): + FrontEndSimTool(type,name,parent) +{ +} + +RD53SimTool::~RD53SimTool() { } + +StatusCode RD53SimTool::initialize() { + CHECK(FrontEndSimTool::initialize()); + ATH_MSG_DEBUG("RD53SimTool::initialize()"); + + return StatusCode::SUCCESS; +} + +StatusCode RD53SimTool::finalize() { + ATH_MSG_DEBUG("RD53SimTool::finalize()"); + return StatusCode::SUCCESS; +} + +void RD53SimTool::process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Collection &rdoCollection) { + + const InDetDD::PixelModuleDesign *p_design = static_cast<const InDetDD::PixelModuleDesign*>(&(chargedDiodes.element())->design()); + if (p_design->getReadoutTechnology()!=InDetDD::PixelModuleDesign::RD53) { return; } + + const PixelID* pixelId = static_cast<const PixelID *>(chargedDiodes.element()->getIdHelper()); + const IdentifierHash moduleHash = pixelId->wafer_hash(chargedDiodes.identify()); // wafer hash + + int maxRD53SmallHit = 0; + int overflowToT = 256; + + int barrel_ec = pixelId->barrel_ec(chargedDiodes.element()->identify()); + int layerIndex = pixelId->layer_disk(chargedDiodes.element()->identify()); + + std::vector<Pixel1RawData*> p_rdo_small_fei4; + int nSmallHitsRD53 = 0; + std::vector<int> row, col; + const int maxRow = p_design->rowsPerCircuit(); + const int maxCol = p_design->columnsPerCircuit(); + std::vector<std::vector<int>> RD53Map(maxRow+16,std::vector<int>(maxCol+16)); + + for (SiChargedDiodeIterator i_chargedDiode=chargedDiodes.begin(); i_chargedDiode!=chargedDiodes.end(); ++i_chargedDiode) { + + Identifier diodeID = chargedDiodes.getId((*i_chargedDiode).first); + double charge = (*i_chargedDiode).second.charge(); + + // Apply analogu threshold, timing simulation + double th0 = m_pixelCalibSvc->getThreshold(diodeID); + + double threshold = th0+m_pixelCalibSvc->getThresholdSigma(diodeID)*CLHEP::RandGaussZiggurat::shoot(m_rndmEngine)+m_pixelCalibSvc->getNoise(diodeID)*CLHEP::RandGaussZiggurat::shoot(m_rndmEngine); + + if (charge>threshold) { + + int bunchSim = 0; + if ((*i_chargedDiode).second.totalCharge().fromTrack()) { + bunchSim = static_cast<int>(floor((getG4Time((*i_chargedDiode).second.totalCharge())+m_timeZero)/m_timePerBCO)); + } + else { + bunchSim = CLHEP::RandFlat::shootInt(m_rndmEngine,m_timeBCN); + } + + if (bunchSim<0 || bunchSim>m_timeBCN) { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } + else { SiHelper::SetBunch((*i_chargedDiode).second,bunchSim); } + } + else { + SiHelper::belowThreshold((*i_chargedDiode).second,true,true); + } + + if (barrel_ec==0 && charge<m_BarrelAnalogthreshold.at(layerIndex)) { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } + if (barrel_ec!=0 && charge<m_EndcapAnalogthreshold.at(layerIndex)) { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } + + // charge to ToT conversion + double tot = m_pixelCalibSvc->getTotMean(diodeID,charge); + double totsig = m_pixelCalibSvc->getTotRes(diodeID,tot); + int nToT = static_cast<int>(CLHEP::RandGaussZiggurat::shoot(m_rndmEngine,tot,totsig)); + + if (nToT<1) { nToT=1; } + + // RD53 HitDiscConfig + if (nToT>=overflowToT) { nToT=overflowToT; } + + if (barrel_ec==0 && nToT<=m_BarrelToTthreshold.at(layerIndex)) { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } + if (barrel_ec!=0 && nToT<=m_EndcapToTthreshold.at(layerIndex)) { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } + + // Filter events + if (SiHelper::isMaskOut((*i_chargedDiode).second)) { continue; } + if (SiHelper::isDisabled((*i_chargedDiode).second)) { continue; } + + if (!m_pixelConditionsSvc->isActive(moduleHash,diodeID)) { + SiHelper::disabled((*i_chargedDiode).second,true,true); + continue; + } + + int flag = (*i_chargedDiode).second.flag(); + int bunch = (flag>>8)&0xff; + + InDetDD::SiReadoutCellId cellId=(*i_chargedDiode).second.getReadoutCell(); + const Identifier id_readout = chargedDiodes.element()->identifierFromCellId(cellId); + + int iirow = cellId.phiIndex(); + int iicol = cellId.etaIndex(); + if (iicol>=maxCol) { iicol=iicol-maxCol; } // RD53 copy mechanism works per FE. + + // Front-End simulation + if (bunch>=0 && bunch<m_timeBCN) { + Pixel1RawData *p_rdo = new Pixel1RawData(id_readout,nToT,bunch,0,bunch); + if (nToT>maxRD53SmallHit) { + rdoCollection.push_back(p_rdo); + RD53Map[iirow][iicol] = 2; //Flag for "big hits" + } + else { + p_rdo_small_fei4.push_back(p_rdo); + row.push_back(iirow); + col.push_back(iicol); + RD53Map[iirow][iicol] = 1; //Flag for low hits + nSmallHitsRD53++; + } + } + } + + // Copy mechanism for IBL small hits: + if (nSmallHitsRD53>0) { + bool recorded = false; + + //First case: Record small hits which are in the same Pixel Digital Region than a big hit: + for (int ismall=0; ismall<nSmallHitsRD53; ismall++) { + int rowPDR = row[ismall]/2; + int colPDR = col[ismall]/2; + for (int rowBigHit=2*rowPDR; rowBigHit!=2*rowPDR+2 && rowBigHit<maxRow; ++rowBigHit) { + for (int colBigHit=2*colPDR; colBigHit!=2*colPDR+2 && colBigHit<maxCol; ++colBigHit) { + ATH_MSG_DEBUG("rowBig = " << rowBigHit << " colBig = " << colBigHit << " Map Content = " << RD53Map[rowBigHit][colBigHit]); + if (RD53Map[rowBigHit][colBigHit]==2 && !recorded) { + rdoCollection.push_back(p_rdo_small_fei4[ismall]); + recorded = true; + } + } + } + + // Second case: Record small hits which are phi-neighbours with a big hit: + if (!recorded && row[ismall]<maxRow-1) { + if (RD53Map[row[ismall]+1][col[ismall]]==2) { + rdoCollection.push_back(p_rdo_small_fei4[ismall]); + recorded = true; + } + } + if (!recorded && row[ismall]!=0) { + if (RD53Map[row[ismall]-1][col[ismall]]==2) { + rdoCollection.push_back(p_rdo_small_fei4[ismall]); + recorded = true; + } + } + } + } + + return; +} + + diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/RD53SimTool.h b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/RD53SimTool.h new file mode 100644 index 000000000000..46c4e55d5f64 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/RD53SimTool.h @@ -0,0 +1,30 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef PIXELDIGITIZATION_RD53SimTool_H +#define PIXELDIGITIZATION_RD53SimTool_H + +#include "AthenaBaseComps/AthAlgTool.h" +#include "FrontEndSimTool.h" + +namespace RadDam{ + +class RD53SimTool:public FrontEndSimTool { + + public: + RD53SimTool( const std::string& type, const std::string& name,const IInterface* parent); + + virtual StatusCode initialize(); + virtual StatusCode finalize(); + virtual ~RD53SimTool(); + virtual void process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Collection &rdoCollection); + + private: + RD53SimTool(); + +}; + +} + +#endif // PIXELDIGITIZATION_RD53SimTool_H diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/RadDamageUtil.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/RadDamageUtil.cxx new file mode 100644 index 000000000000..0ed2793422c9 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/RadDamageUtil.cxx @@ -0,0 +1,416 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// RadDamageUtil.cxx +// Implementation file for class RadDamageUtil +// R. Carney & B Nachman 2018 +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +// Details in head file +/////////////////////////////////////////////////////////////////// + +#include "RadDamageUtil.h" + +#include "TGraph.h" +#include "TString.h" +#include "TMath.h" +#include "TFile.h" + +#include "InDetReadoutGeometry/SiDetectorElement.h" +#include "InDetReadoutGeometry/PixelModuleDesign.h" +#include "InDetSimEvent/SiHit.h" +#include "InDetIdentifier/PixelID.h" +#include "GeneratorObjects/HepMcParticleLink.h" +#include "SiPropertiesSvc/SiliconProperties.h" +#include "HepMC/GenEvent.h" +#include "HepMC/GenVertex.h" +#include "HepMC/GenParticle.h" + +#include "PathResolver/PathResolver.h" +#include <fstream> +#include <cmath> + +#include "CLHEP/Random/RandExpZiggurat.h" +#include "CLHEP/Random/RandFlat.h" +#include "TLorentzVector.h" +#include "CLHEP/Units/PhysicalConstants.h" + +using namespace std; + +// Constructor with parameters: +RadDam::RadDamageUtil::RadDamageUtil(const std::string& type, const std::string& name,const IInterface* parent): + AthAlgTool(type,name,parent), + betaElectrons(4.5e-16), + betaHoles(6.0e-16), + m_defaultRamo( 1 ), + m_defaultEField( 1 ), + m_rndmSvc("AtDSFMTGenSvc",name), + m_rndmEngineName("PixelDigitization"), + m_rndmEngine(0) +{ + declareProperty("RndmSvc", m_rndmSvc, "Random Number Service used in RadDamageUtil"); + declareProperty("RndmEngine", m_rndmEngineName, "Random engine name"); +} + +// Destructor: +RadDam::RadDamageUtil::~RadDamageUtil(){} + +//======================================= +// I N I T I A L I Z E +//======================================= +StatusCode RadDam::RadDamageUtil::initialize() { + + CHECK(AthAlgTool::initialize()); + CHECK(m_rndmSvc.retrieve()); + ATH_MSG_INFO("You are using RadDamageUtil for solid-state silicon detectors."); + + return StatusCode::SUCCESS; +} + +//======================================= +// G E N E R A T E R A M O M A P +//======================================= +// The third of the 3 maps should be the most accurate. +// See doc/RadDamageDefaults.pdf in the Allpix repo for details. +// See ATL-COM-INDET-2018-011 for details. +//======================================= +const StatusCode RadDam::RadDamageUtil::generateRamoMap( TH3F* ramoPotentialMap, InDetDD::PixelModuleDesign* module){ + + //TODO: this needs to come from DB + double pitchX = 0.05; + double pitchY = 0.25; + //TODO: from PixelModuleDesign + double sensorThickness = module->thickness() * 1000.0;//default 200; + + + //Ramo potential evaluated up to 2x pitch away + //from the center of the primary pixel. + double xmin = 0.; + double xmax = 2*pitchX*1000; + double ymin = 0.; + double ymax = 2*pitchY*1000; + + //One bin per 10 microns. + ramoPotentialMap = new TH3F("hramomap1","hramomap1",((xmax-xmin)/10.), xmin, xmax, ((ymax-ymin)/10.), ymin, ymax, int(sensorThickness*1000)/10, 0., sensorThickness*1000.); + + //****************** + //*** Loop in z *** + //****************** + for (int k=1; k <= ramoPotentialMap->GetNbinsZ(); k++){ + + //use the lower bin edge. + double z = ramoPotentialMap->GetZaxis()->GetBinCenter(k) - ramoPotentialMap->GetZaxis()->GetBinWidth(k)/2.; + + //****************** + //*** Loop in x,y *** + //****************** + for (int i=1; i <= ramoPotentialMap->GetNbinsX(); i++){ //Loop over x + for (int j=1; j <= ramoPotentialMap->GetNbinsY(); j++){ //loop over y + + double x = ramoPotentialMap->GetXaxis()->GetBinCenter(i) - ramoPotentialMap->GetXaxis()->GetBinWidth(i)/2.; + double y = ramoPotentialMap->GetYaxis()->GetBinCenter(j) - ramoPotentialMap->GetYaxis()->GetBinWidth(j)/2.; + + //******************************* + //*** Option A: 1D approx. in z + //******************************* + if (m_defaultRamo == -1){ + if (x > (pitchX*1000.* 0.5) || y > (pitchY*1000.*0.5) ){ + ramoPotentialMap->SetBinContent(i,j,k,0.01); //outside of the primary pixel. + //TODO what is the last bin value? Is 0.01 the min? + } else { + + //TODO make sure all of these eta/phi values make sense for non-barrel modules too + //The formula below parameterises the 1D Ramo potential. See ATL-COM-INDET-2018-011 for details. + double par_a = 3*sensorThickness / pitchY; + double norm = exp( -par_a ) + exp(-1.); + double val = exp( -par_a*z/(1000.*sensorThickness) ) + exp(-z/(1000*sensorThickness)); + val -= norm; + val /= ( 2.-norm ); + ramoPotentialMap->SetBinContent( i,j,k,val ); + } + //******************************* + //*** Option B: 2D approx. in xy + //******************************* + } else if (m_defaultRamo == 0){ + + double par_a = 10.0; + double norm = exp( -par_a ) + exp(-1.); + double val = exp( -par_a*z/(1000*sensorThickness) ) + exp( -z/(1000*sensorThickness) ); + val -= norm; + val /= ( 2.-norm ); + //From equation 16 in the RadDamageDefaults support note, using solution for weighting potential in 2D + double productSolution = weighting2D(x,z,pitchX,sensorThickness) * weighting2D(y,z,pitchY,sensorThickness) * val / (weighting2D(0,z,pitchX,sensorThickness) * weighting2D(0,z,pitchY,sensorThickness)); + ramoPotentialMap->SetBinContent(i,j,k, productSolution); + //************************************************ + //*** Option C: Poisson's eqn. w/ simple geometry + //************************************************ + } else if (m_defaultRamo > 0){ + + double fullSolution = weighting3D( x/sensorThickness,y/sensorThickness,z/sensorThickness,m_defaultRamo,m_defaultRamo,4,pitchX/sensorThickness,pitchY/sensorThickness); //N = 4 is arbitrary; just need something bigger than ~1 + ramoPotentialMap->SetBinContent(i,j,k,fullSolution); + + }//Ramo option > 0. + }//loop over y. + }//loop over x. + }//loop over z. + return StatusCode::SUCCESS; +} //TODO: What about debugging the ramo potential? I vaguely remember running into issues with this. + + +//======================================= +// A L P H A +//======================================= +//Constituent of full poisson solution. +//Last terms in eqn. 18, 19 in support note +double RadDam::RadDamageUtil::alpha(int n, int Nrep, double a){ + return ( (2*TMath::Pi()*n) / (Nrep*a)); +} + +//======================================= +// W E I G H T I N G 3 D +//======================================= +//Approx, solution to Poisson's eqn. with simplified geometry +//See section 1.3 in support note for details +double RadDam::RadDamageUtil::weighting3D(double x, double y, double z, int n, int m, int Nrep, double a, double b){ + + //TODO: talk to ben about this comment: + //be warned that there is numerical instability if n and m are too large! Suggest n ~ m ~ 10. + double potential = 0.; + double pi = TMath::Pi(); + + for (int i=-n; i<=n; i++){ + for (int j=-m; j<=m; j++){ + double X = 0.; + double Y = 0.; + double Z = 0.; + double factor_x = 0.; + double factor_y = 0.; + if (i==0 && j==0){ + factor_x = 1./Nrep; + factor_y = factor_x; + Z = 1-z; + } else { + //Equation 18 & 19 in support note + factor_x = std::sin( i*pi/Nrep )/ (pi*i); + factor_y = std::sin( j*pi/Nrep )/ (pi*j); + //Equation 17 in support note + double norm = std::sqrt( std::pow( alpha(i,Nrep,a),2) + std::pow( alpha(j,Nrep,b),2) ); + Z = sinh(norm*(1-z))/sinh(norm); + } + //Equation 18 & 19 in support note + X = factor_x*std::cos( alpha(i,Nrep,a)*x ); + Y = factor_y*std::cos( alpha(j,Nrep,b)*y ); + + //Equation 20 in support note + potential+= Z * X * Y; + } + } + return potential; +} + +//======================================= +//W E I G H T I N G 2 D +//======================================= +//Solution to Poisson's equation for a 2D inf. strip +//i.e. weighting potential with 2D solution +double RadDam::RadDamageUtil::weighting2D(double x, double z, double Lx, double sensorThickness){ + + if (z==0) z=0.00001;//a pathology in the definition. + double pi = 4.*TMath::ATan(1.); + + //scale to binsize (inputs assumed to be in mm) + sensorThickness *= 1000.; + Lx *= 1000; + + //val is set according to equation 3 in the radDamageDefaults support note + double val = (TMath::Sin(pi*z/sensorThickness)*TMath::SinH(0.5*pi*Lx/sensorThickness)/(TMath::CosH(pi*x/sensorThickness)-TMath::Cos(pi*z/sensorThickness)*TMath::CosH(0.5*pi*Lx/sensorThickness))); + if (val > 0) return TMath::ATan(val)/pi; + else return TMath::ATan(val)/pi+1; +} + +//========================================= +// G E N E R A T E E - F I E L D M A P +//========================================= +const StatusCode RadDam::RadDamageUtil::generateEfieldMap( TH1F* eFieldMap, InDetDD::PixelModuleDesign* module ){ + + //TODO: from DB + double biasVoltage = 600.; + double depletionVoltage = 80.; + double depletionLength = 0.2; + double sensorThickness = module->thickness(); //default should be 0.2? + + eFieldMap = new TH1F("hefieldz","hefieldz",200,0,sensorThickness*1e3); + + //Set depletion width + double electricField=0; //V/mm + double depletionWidth = sensorThickness; //in mm + if( biasVoltage < depletionVoltage) + depletionWidth *= pow(biasVoltage/depletionVoltage, 0.5); + + //Fill map + double binSize = depletionLength/eFieldMap->GetNbinsX(); + for (int i=1; i<= eFieldMap->GetNbinsX()+1; i++){ + + double position = binSize*i; + if(biasVoltage < depletionVoltage){ + electricField=( biasVoltage/depletionLength )*( 1.-position/depletionLength ); + } else { + electricField =( depletionVoltage/depletionLength )*( 1.-position/depletionLength); + electricField += (biasVoltage-depletionVoltage)/(2.*depletionLength); + } + //Boundary checking + if(position > depletionLength) + electricField=0.; + + eFieldMap->SetBinContent(eFieldMap->GetNbinsX()-i+1,electricField*10); //in V/cm; n in n prior to type inversion. + if (m_defaultEField==0) + eFieldMap->SetBinContent(i,10*biasVoltage/(sensorThickness)); //in V/cm + } + return StatusCode::SUCCESS; +} + + +//================================================== +// G E N E R A T E DISTANCE / TIME / LORENTZ MAP +//================================================== +//Currently, if one is missing, all 3 have to be regenerated. +//It IS possible to split them up but riht now that means lots of repeated code. +//Might be worth coming back in the future if it needs to be optimised or +//if +const StatusCode RadDam::RadDamageUtil::generateDistanceTimeMap( TH2F* distanceMap_e, TH2F* distanceMap_h, TH1F* timeMap_e, TH1F* timeMap_h, TH2F* lorentzMap_e, TH2F* lorentzMap_h, TH1F* eFieldMap, InDetDD::PixelModuleDesign* module ){ + + //TODO: From DB call each time + double temperature = 300; + double bField = 2;//Tesla + //From PixelModuleDesign: TODO + double sensorThickness = module->thickness() * 1000.0;//default is 200; + + //Y-axis is time charge carrier travelled for, + //X-axis is initial position of charge carrier, + //Z-axis is final position of charge carrier + distanceMap_e = new TH2F("edistance","Electron Distance Map",100,0,sensorThickness,20,0,10); //mm by ns + distanceMap_h = new TH2F("hdistance","Holes Distance Map",100,0,sensorThickness,20,0,10); + + for (int i=1; i<= distanceMap_e->GetNbinsX(); i++){ + for (int j=1; j<= distanceMap_e->GetNbinsY(); j++){ + distanceMap_h->SetBinContent(i,j,sensorThickness); //if you travel long enough, you will reach the electrode. + } + } + + //From a given place in the sensor bulk, show time-to-electrode + timeMap_e = new TH1F("etimes","Electron Time Map",100,0,sensorThickness); //mm + timeMap_h = new TH1F("htimes","Hole Time Map",100,0,sensorThickness); //mm + + //X axis is initial position of charge carrier (in z) + //Y axis is distance travelled in z by charge carrier + //Z axis is tan( lorentz_angle ) + lorentzMap_e = new TH2F("lorentz_map_e","Lorentz Map e",100,0,sensorThickness,100,0,sensorThickness); //mm by mm + lorentzMap_h = new TH2F("lorentz_map_h","Lorentz Map h",100,0,sensorThickness,100,0,sensorThickness); //mm by mm + ATH_MSG_DEBUG ("Did not find time and/or distance maps. Will compute them from the E-field map.."); + + for (int i=1; i<= distanceMap_e->GetNbinsX(); i++){ //Loop over initial position of charge carrier (in z) + double z_i = distanceMap_e->GetXaxis()->GetBinCenter(i); + double time_e = 0.; //ns + double time_h = 0.; //ns + double distanceTravelled_e=0; //mm + double distanceTravelled_h=0; //mm + double drift_e = 0.; //mm + double drift_h = 0.; //mm + + for (int j=i; j >= 1; j--){ //Lower triangle + + double dz = distanceMap_e->GetXaxis()->GetBinWidth(j); //mm + double Ez = eFieldMap->GetBinContent(eFieldMap->GetXaxis()->FindBin(z_i*1000))/1e7; // in MV/mm; + double z_j = distanceMap_e->GetXaxis()->GetBinCenter(j); //mm + + if (Ez > 0){ + + //Electrons + std::pair<double, double> mu = getMobility(Ez, temperature); //mm^2/MV*ns + double tanLorentzAngle = mu.first*bField*(1.0E-3); //rad, unit conversion; pixelPitch_eta-Field is in T = V*s/m^2 + time_e += dz/(mu.first*Ez); //mm * 1/(mm/ns) = ns + + //Fill: time charge carrier travelled for, given staring position (i) and final position (z_j) + distanceMap_e->SetBinContent(i,distanceMap_e->GetYaxis()->FindBin(time_e),z_j); + + drift_e += dz*tanLorentzAngle; //Increment the total drift parallel to plane of sensor + distanceTravelled_e += dz; //mm (travelled in z) + lorentzMap_e->SetBinContent(i,j,drift_e/distanceTravelled_e); + + //Holes + tanLorentzAngle = mu.second*bField*(1.0E-3); //rad + time_h+=dz/(mu.second*Ez); //mm * 1/(mm/ns) = ns + distanceMap_h->SetBinContent(i,distanceMap_h->GetYaxis()->FindBin(time_h),z_j); + + drift_h+=dz*tanLorentzAngle; + distanceTravelled_h += dz; //mm + lorentzMap_h->SetBinContent(i,j,drift_h/distanceTravelled_h); + } + } + timeMap_e->SetBinContent(i,time_e); + timeMap_h->SetBinContent(i,time_h); + } + + return StatusCode::SUCCESS; + //Finally, we make maps of the average collected charge, in order to make charge chunking corrections later. + //TODO: talk to Ben about the above comment. Where is code? + +} +//======================================= +// G E T M O B I L I T Y +//======================================= +const std::pair<double,double> RadDam::RadDamageUtil::getMobility(double electricField, double temperature) const{ + //Returns the electron/hole mobility *in the z direction* + //Note, this already includes the Hall scattering factor! + //These parameterizations come from C. Jacoboni et al., Solid-State Electronics 20 89. (1977) 77. (see also https://cds.cern.ch/record/684187/files/indet-2001-004.pdf). + //electrons + double vsat_e = 15.3*pow(temperature,-0.87);// mm/ns + double ecrit_e = 1.01E-7*pow(temperature,1.55);// MV/mm + double beta_e = 2.57E-2*pow(temperature,0.66);//dimensionless + double r_e = 1.13+0.0008*(temperature-273.);//Hall scaling factor + //holes + double vsat_h = 1.62*pow(temperature,-0.52);// mm/ns + double ecrit_h = 1.24E-7*pow(temperature,1.68);// MV/mm + double beta_h = 0.46*pow(temperature,0.17); + double r_h = 0.72 - 0.0005*(temperature-273.); + + double num_e = vsat_e/ecrit_e; + double den_e = pow(1+pow((electricField/ecrit_e),beta_e),(1/beta_e)); + double mobility_e = r_e*num_e/den_e; + + double num_h = vsat_h/ecrit_h; + double den_h = pow(1+pow((electricField/ecrit_h),beta_h),(1/beta_h)); + double mobility_h = r_h*num_h/den_h; + + return std::make_pair( mobility_e, mobility_h ); +} + +//======================================= +// G E T T R A P P I N G T I M E +//======================================= +const std::pair<double,double> RadDam::RadDamageUtil::getTrappingTimes( double fluence) const{ + + double trappingTimeElectrons(0.), trappingTimeHoles(0.); + + if(fluence!=0.0){ + trappingTimeElectrons = 1.0/(betaElectrons*fluence); //Make memberVar + trappingTimeHoles = 1.0/(betaHoles*fluence); //ns + } + else{//fluence = 0 so do not trap! + trappingTimeElectrons = 1000; //~infinity + trappingTimeHoles = 1000; + } + + return std::make_pair( trappingTimeElectrons, trappingTimeHoles); +} + +//======================================= +// F I N A L I Z E +//======================================= +StatusCode RadDam::RadDamageUtil::finalize() { + ATH_MSG_DEBUG ( "RadDamageUtil::finalize()"); + return StatusCode::SUCCESS; +} + diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/RadDamageUtil.h b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/RadDamageUtil.h new file mode 100644 index 000000000000..ef8804c1322d --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/RadDamageUtil.h @@ -0,0 +1,77 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// RadDamageUtil.h +// Header file for class RadDamageUtil +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +// Author: Ben Nachman, Rebecca Carney +// 2018-07 +// Description: +/////////////////////////////////////////////////////////////////// + + +#ifndef PIXELDIGITIZATION_RADDAMAGEUTIL_H +#define PIXELDIGITIZATION_RADDAMAGEUTIL_H + +#include "GaudiKernel/ServiceHandle.h" +#include "AthenaBaseComps/AthAlgTool.h" +#include "CLHEP/Random/RandomEngine.h" +#include "AthenaKernel/IAtRndmGenSvc.h" +#include "GaudiKernel/ToolHandle.h" +#include "GaudiKernel/Property.h" +#include "GaudiKernel/Service.h" +#include "InDetReadoutGeometry/SiDetectorElement.h" +#include "SiDigitization/SiChargedDiodeCollection.h" +#include "InDetReadoutGeometry/PixelModuleDesign.h" + +#include "TH3.h" +#include "TH2.h" +#include "TH1.h" + +namespace RadDam{ + +//==================== +// C L A S S D E F +//==================== +class RadDamageUtil : public AthAlgTool { + +public: + + RadDamageUtil( const std::string& type, const std::string& name,const IInterface* parent); + + static const InterfaceID& interfaceID() ; + virtual StatusCode initialize(); + virtual StatusCode finalize(); + + virtual ~RadDamageUtil(); + StatusCode initTools(); + const StatusCode generateRamoMap(TH3F* ramPotentialMap, InDetDD::PixelModuleDesign* module); + const StatusCode generateEfieldMap(TH1F* eFieldMap, InDetDD::PixelModuleDesign* module); + const StatusCode generateDistanceTimeMap( TH2F* distanceMap_e, TH2F* distanceMap_h, TH1F* timeMap_e, TH1F* timeMap_h, TH2F* lorentzMap_e, TH2F* lorentzMap_h, TH1F* eFieldMap, InDetDD::PixelModuleDesign* module); + + const std::pair<double,double> getTrappingTimes( double fluence ) const; + const std::pair<double,double> getMobility( double electricField, double temperature) const; + + double betaElectrons; //TODO: should be replaced my DB version + double betaHoles; //TODO: should be replaced my DB version + int m_defaultRamo; //TODO: need to decide what we want to do with this. + int m_defaultEField; //TODO: need to decide what we want to do with this. + +private: + RadDamageUtil(); + + double alpha(int n, int Nrep, double a); //Poisson solution factor + double weighting3D(double x, double y, double z, int n, int m, int Nrep, double a, double b); + double weighting2D(double x, double z, double Lx, double sensorThickness); + +protected: + ServiceHandle<IAtRndmGenSvc> m_rndmSvc; + std::string m_rndmEngineName; + CLHEP::HepRandomEngine* m_rndmEngine; + }; + +} +#endif //PIXELDIGITIZATION_RADDAMAGEUTIL_H diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSim3DTool.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSim3DTool.cxx new file mode 100644 index 000000000000..8a2caab9bc77 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSim3DTool.cxx @@ -0,0 +1,203 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// SensorSim3DTool.cxx +// Implementation file for class SensorSim3DTool +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + +#include "SensorSim3DTool.h" +#include "InDetReadoutGeometry/SiDetectorElement.h" +#include "InDetReadoutGeometry/PixelModuleDesign.h" +#include "InDetSimEvent/SiHit.h" +#include "SiDigitization/SiSurfaceCharge.h" +#include "InDetIdentifier/PixelID.h" +#include "GeneratorObjects/HepMcParticleLink.h" +#include "SiPropertiesSvc/SiliconProperties.h" + +#include "HepMC/GenEvent.h" +#include "HepMC/GenVertex.h" +#include "HepMC/GenParticle.h" +#include "CLHEP/Random/RandGaussZiggurat.h" + +#include "TLorentzVector.h" + +using namespace InDetDD; +using namespace RadDam; + +//=============================================== +// C O N S T R U C T O R +//=============================================== +SensorSim3DTool::SensorSim3DTool(const std::string& type, const std::string& name,const IInterface* parent): + SensorSimTool(type,name,parent), + m_numberOfSteps(50), + m_chargeCollSvc("ChargeCollProbSvc",name) +{ + declareProperty("numberOfSteps",m_numberOfSteps,"Number of steps for Pixel3D module"); + declareProperty("ChargeCollProbSvc",m_chargeCollSvc); +} + +class DetCondCFloat; + +// Destructor: +SensorSim3DTool::~SensorSim3DTool() { } + +//=============================================== +// I N I T I A L I Z E +//=============================================== +StatusCode SensorSim3DTool::initialize() { + CHECK(SensorSimTool::initialize()); + + // -- Get ChargeCollProb Service + CHECK(m_chargeCollSvc.retrieve()); + + ATH_MSG_DEBUG("SensorSim3DTool::initialize()"); + return StatusCode::SUCCESS; +} + +//=============================================== +// F I N A L I Z E +//=============================================== +StatusCode SensorSim3DTool::finalize() { + ATH_MSG_DEBUG("SensorSim3DTool::finalize()"); + return StatusCode::SUCCESS; +} + +//=============================================== +// I N D U C E C H A R G E +//=============================================== +StatusCode SensorSim3DTool::induceCharge(const TimedHitPtr<SiHit> &phit, SiChargedDiodeCollection &chargedDiodes, const InDetDD::SiDetectorElement &Module, const InDetDD::PixelModuleDesign &p_design, std::vector< std::pair<double,double> > &trfHitRecord, std::vector<double> &initialConditions) { + + + if (!Module.isBarrel()) { return StatusCode::SUCCESS; } + if (p_design.getReadoutTechnology()!=InDetDD::PixelModuleDesign::FEI4) { return StatusCode::SUCCESS; } + if (p_design.numberOfCircuits()>1) { return StatusCode::SUCCESS; } + + ATH_MSG_DEBUG("Applying SensorSim3D charge processor"); + if( initialConditions.size() != 8 ){ + ATH_MSG_INFO("ERROR! Starting coordinates were not filled correctly in EnergyDepositionSvc."); + return StatusCode::FAILURE; + } + + double eta_0 = initialConditions[0]; + double phi_0 = initialConditions[1]; + double depth_0 = initialConditions[2]; + double dEta = initialConditions[3]; + double dPhi = initialConditions[4]; + double dDepth = initialConditions[5]; + double iTotalLength = initialConditions[7]; + + + ATH_MSG_VERBOSE("Applying 3D sensor simulation."); + double sensorThickness = Module.design().thickness(); + const InDet::SiliconProperties & siProperties = m_siPropertiesSvc->getSiProperties(Module.identifyHash()); + double eleholePairEnergy = siProperties.electronHolePairsPerEnergy(); + + // Charge Collection Probability Map bin size + const double x_bin_size = 0.001; + const double y_bin_size = 0.001; + + std::string readout; + + // determine which readout is used + // FEI4 : 50 X 250 microns + double pixel_size_x = Module.width()/p_design.rows(); + double pixel_size_y = Module.length()/p_design.columns(); + double module_size_x = Module.width(); + double module_size_y = Module.length(); + + + //**************************************// + //*** Now diffuse charges to surface *** // + //**************************************// + for(unsigned int istep = 0; istep < trfHitRecord.size(); istep++) { + std::pair<double,double> iHitRecord = trfHitRecord[istep]; + + double eta_i = eta_0; + double phi_i = phi_0; + double depth_i = depth_0; + + if (iTotalLength) { + eta_i += 1.0*iHitRecord.first/iTotalLength*dEta; + phi_i += 1.0*iHitRecord.first/iTotalLength*dPhi; + depth_i += 1.0*iHitRecord.first/iTotalLength*dDepth; + } + + double es_current = 1.0*iHitRecord.second*1.E-6; + + double dist_electrode = 0.5 * sensorThickness - Module.design().readoutSide() * depth_i; + if (dist_electrode<0) dist_electrode=0; + + CLHEP::Hep3Vector chargepos; + chargepos.setX(phi_i); chargepos.setY(eta_i); chargepos.setZ(dist_electrode); + + bool coord = Module.isModuleFrame(); + + ATH_MSG_DEBUG("ismoduleframe "<<coord << " -- startPosition (x,y,z) = " << chargepos.x() << ", " << chargepos.y() << ", " << chargepos.z()); + + // -- change origin of coordinates to the left bottom of module + double x_new = chargepos.x() + module_size_x/2.; + double y_new = chargepos.y() + module_size_y/2.; + + // -- change from module frame to pixel frame + int nPixX = int(x_new/pixel_size_x); + int nPixY = int(y_new/pixel_size_y); + ATH_MSG_DEBUG(" -- nPixX = "<<nPixX<<" nPixY = "<<nPixY); + double x_pix = x_new - pixel_size_x*(nPixX); + double y_pix = y_new - pixel_size_y*(nPixY); + // -- change origin of coordinates to the center of the pixel + double x_pix_center = x_pix - pixel_size_x/2; + double y_pix_center = y_pix - pixel_size_y/2; + ATH_MSG_DEBUG(" -- current hit position w.r.t. pixel center = "<<x_pix_center<<" "<<y_pix_center); + + double x_neighbor; double y_neighbor; CLHEP::Hep3Vector pos_neighbor; + // -- Calculate signal in current pixel and in the neighboring ones + // -- loop in the x-coordinate + for (int i=-1; i<=1; i++){ + x_neighbor = x_pix_center - i*pixel_size_x; + // -- loop in the y-coordinate + for (int j=-1; j<=1; j++){ + y_neighbor = y_pix_center - j*pixel_size_y; + + // -- check if the neighbor falls inside the charge collection prob map window + if ( (fabs(x_neighbor)<pixel_size_x) && (fabs(y_neighbor)<pixel_size_y) ){ + + // -- change origin of coordinates to the bottom left of the charge + // collection prob map "window", i.e. shift of 1-pixel twd bottom left + double x_neighbor_map = x_neighbor + pixel_size_x; + double y_neighbor_map = y_neighbor + pixel_size_y; + + int x_bin_cc_map = static_cast<int>(x_neighbor_map / x_bin_size); + int y_bin_cc_map = static_cast<int>(y_neighbor_map / y_bin_size); + + // -- retrieve the charge collection probability from Svc + // -- swap x and y bins to match Map coord convention + double ccprob_neighbor = m_chargeCollSvc->getProbMapEntry("FEI4",y_bin_cc_map,x_bin_cc_map); + if ( ccprob_neighbor == -1. ) return StatusCode::FAILURE; + + double ed=es_current*eleholePairEnergy*ccprob_neighbor; + + // -- pixel coordinates --> module coordinates + //double x_mod = x_neighbor - half_pixel_size_x + pixel_size_x*nPixX -module_size_x/2.; + //double y_mod = y_neighbor - half_pixel_size_y + pixel_size_y*nPixY -module_size_y/2.; + double x_mod = x_neighbor + pixel_size_x*0.5 + pixel_size_x*nPixX -module_size_x*0.5; + double y_mod = y_neighbor + pixel_size_y*0.5 + pixel_size_y*nPixY -module_size_y*0.5; + SiLocalPosition chargePos = Module.hitLocalToLocal(y_mod,x_mod); + + SiSurfaceCharge scharge(chargePos,SiCharge(ed,hitTime(phit),SiCharge::track,HepMcParticleLink(phit->trackNumber(),phit.eventId()))); + SiCellId diode = Module.cellIdOfPosition(scharge.position()); + SiCharge charge = scharge.charge(); + if (diode.isValid()) { + chargedDiodes.add(diode,charge); + } + } + } + } + } + + + return StatusCode::SUCCESS; +} diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSim3DTool.h b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSim3DTool.h new file mode 100644 index 000000000000..61acb047c4c5 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSim3DTool.h @@ -0,0 +1,34 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef PIXELDIGITIZATION_SensorSim3DTool_H +#define PIXELDIGITIZATION_SensorSim3DTool_H + +#include "AthenaBaseComps/AthAlgTool.h" +#include "SensorSimTool.h" +#include "IChargeCollProbSvc.h" + +namespace RadDam{ + +class SensorSim3DTool : public SensorSimTool { + + public: + SensorSim3DTool( const std::string& type, const std::string& name,const IInterface* parent); + virtual StatusCode initialize(); + virtual StatusCode finalize(); + virtual ~SensorSim3DTool(); + + virtual StatusCode induceCharge(const TimedHitPtr<SiHit> &phit, SiChargedDiodeCollection& chargedDiodes, const InDetDD::SiDetectorElement &Module, const InDetDD::PixelModuleDesign &p_design, std::vector< std::pair<double,double> > &trfHitRecord, std::vector<double> &initialConditions); + + + private: + SensorSim3DTool(); + + int m_numberOfSteps; + ServiceHandle<IChargeCollProbSvc> m_chargeCollSvc; +}; + +} + +#endif // PIXELDIGITIZATION_SensorSim3DTool_H diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.cxx new file mode 100644 index 000000000000..a8c8aa005d31 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.cxx @@ -0,0 +1,643 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// SensorSimPlanarTool.cxx +// Implementation file for class SensorSimPlanarTool +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + +#include "SensorSimPlanarTool.h" +#include "InDetReadoutGeometry/SiDetectorElement.h" +#include "InDetReadoutGeometry/PixelModuleDesign.h" +#include "SiDigitization/SiSurfaceCharge.h" +#include "InDetSimEvent/SiHit.h" +#include "InDetIdentifier/PixelID.h" +#include "GeneratorObjects/HepMcParticleLink.h" +#include "SiPropertiesSvc/SiliconProperties.h" +#include "HepMC/GenEvent.h" +#include "HepMC/GenVertex.h" +#include "HepMC/GenParticle.h" +#include "CLHEP/Random/RandGaussZiggurat.h" +#include "CLHEP/Random/RandFlat.h" + +//TODO: these includes are just for settign up the ModuleDesign ID, shouldn't be needed after stuff is stored in detector store +#include "Identifier/Identifier.h" +#include "InDetIdentifier/PixelID.h" + +#include "TLorentzVector.h" +#include "CLHEP/Units/PhysicalConstants.h" +#include "PathResolver/PathResolver.h" + +//Temp includes : check if these are needed TODO +#include "TMath.h" +#include "TFile.h" +#include "TH3F.h" +#include "TH2.h" +#include "TH1.h" + +using namespace InDetDD; +using namespace RadDam; + +//=============================================== +// C O N S T R U C T O R +//=============================================== +SensorSimPlanarTool::SensorSimPlanarTool(const std::string& type, const std::string& name,const IInterface* parent): + SensorSimTool(type,name,parent), + m_radDamageUtil(nullptr), + m_numberOfSteps(50), + m_numberOfCharges(10), + m_diffusionConstant(.0), + m_doRadDamage(true), + m_fluence(5), + m_trappingTimeElectrons(0.), + m_trappingTimeHoles(0.) +{ + declareProperty("RadDamageUtil", m_radDamageUtil, "Rad Damage utility"); + declareProperty("numberOfSteps",m_numberOfSteps,"Geant4:number of steps for PixelPlanar"); + declareProperty("numberOfCharges",m_numberOfCharges,"Geant4:number of charges for PixelPlanar"); + declareProperty("diffusionConstant",m_diffusionConstant,"Geant4:Diffusion Constant for PixelPlanar"); + declareProperty("doRadDamage", m_doRadDamage, "doRadDmaage bool: should be flag"); + declareProperty("fluence", m_fluence, "this is the fluence benchmark, 0-6. 0 is unirradiated, 1 is start of Run 2, 5 is end of 2018 and 6 is projected end of 2018"); + declareProperty("trappingTimeElectrons", m_trappingTimeElectrons, "Characteristic time till electron is trapped [ns]"); + declareProperty("trappingTimeHoles", m_trappingTimeHoles, "Characteristic time till hole is trapped [ns]"); +} + +class DetCondCFloat; + +SensorSimPlanarTool::~SensorSimPlanarTool() { } + +//=============================================== +// I N I T I A L I Z E +//=============================================== +StatusCode SensorSimPlanarTool::initialize() { + CHECK(SensorSimTool::initialize()); + ATH_MSG_DEBUG ( "SensorSimPlanarTool::initialize()"); + + CHECK(m_radDamageUtil.retrieve()); + ATH_MSG_DEBUG ( "RadDamageUtil tool retrieved successfully"); + + //Calculate trapping times based on fluence (already includes check for fluence=0) + if(m_doRadDamage){ + + std::pair<double,double> trappingTimes = m_radDamageUtil->getTrappingTimes( m_fluence ); + m_trappingTimeElectrons = trappingTimes.first; + m_trappingTimeHoles = trappingTimes.second; + } + + std::vector<std::string> mapsPath_list; + + if(m_fluence==0){ + + } + else if(m_fluence==1){ + + mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_IBL_PL_80V_fl0em10.root") ); //IBL PL - Barrel + mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_PIX_150V_fl7e13.root") ); //B-Layer - Barrel + mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_PIX_150V_fl3e13.root") ); //Layer-1 - Barrel + mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_PIX_150V_fl2e13.root") ); //Layer-2 - Barrel + + m_fluence_layers.push_back(1e-10); + m_fluence_layers.push_back(7e13); + m_fluence_layers.push_back(3e13); + m_fluence_layers.push_back(2e13); + + } + else if(m_fluence==2){ + + mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_IBL_PL_80V_fl1e14.root") ); + mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_PIX_150V_fl1.2e14.root") ); + mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_PIX_150V_fl5e13.root") ); + mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_PIX_150V_fl3e13.root") ); + + m_fluence_layers.push_back(1e14); + m_fluence_layers.push_back(1.2e14); + m_fluence_layers.push_back(5e13); + m_fluence_layers.push_back(3e13); + + }else if(m_fluence==3){ + + mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_IBL_PL_80V_fl2e14.root") ); + mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_PIX_150V_fl1.7e14.root") ); + mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_PIX_150V_fl7e13.root") ); + mapsPath_list.push_back( PathResolverFindCalibFile("maps_PIX_150V_fl4e13.root") ); + + m_fluence_layers.push_back(2e14); + m_fluence_layers.push_back(1.7e14); + m_fluence_layers.push_back(7e13); + m_fluence_layers.push_back(4e13); + + }else if(m_fluence==4){ + + mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_IBL_PL_150V_fl2e14.root") ); + mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_PIX_350V_fl1.7e14.root") ); + mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_PIX_250V_fl7e13.root") ); + mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_PIX_150V_fl4e13.root") ); + + m_fluence_layers.push_back(2e14); + m_fluence_layers.push_back(1.7e14); + m_fluence_layers.push_back(7e13); + m_fluence_layers.push_back(4e13); + + }else if(m_fluence==5){ + + mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_IBL_PL_350V_fl5e14.root") ); + mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_PIX_350V_fl3.1e14.root") ); + mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_PIX_250V_fl1.3e14.root") ); + mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_PIX_150V_fl8e13.root") ); + + m_fluence_layers.push_back(5e14); + m_fluence_layers.push_back(3.1e14); + m_fluence_layers.push_back(1.3e14); + m_fluence_layers.push_back(8e13); + + }else if(m_fluence==6){ + + mapsPath_list.push_back( PathResolver::find_file("maps_IBL_400V_fl8_7e14.root", "DATAPATH") ); + mapsPath_list.push_back( PathResolver::find_file("maps_PIX_400V_fl4_6e14.root", "DATAPATH") ); + + mapsPath_list.push_back( PathResolver::find_file("maps_PIX_250V_fl2_1e14.root", "DATAPATH") ); + mapsPath_list.push_back( PathResolver::find_file("maps_PIX_150V_fl1_3e14.root", "DATAPATH") ); + + m_fluence_layers.push_back(8.7e14); + m_fluence_layers.push_back(4.6e14); + m_fluence_layers.push_back(2.1e14); + m_fluence_layers.push_back(1.3e14); + + } + + // ***************************** + // *** Setup Maps **** + // ***************************** + //TODO This is only temporary until remotely stored maps and locally generated maps can be implemented + + for(unsigned int i=0; i<mapsPath_list.size(); i++){ + + ATH_MSG_INFO("Using maps located in: "<<mapsPath_list.at(i)); + //std::unique_ptr<TFile> mapsFile=std::make_unique<TFile>( (mapsPath_list.at(i)).c_str() ); //this is the ramo potential. + TFile* mapsFile=new TFile( (mapsPath_list.at(i)).c_str() ); //this is the ramo potential. + + std::pair<int, int> Layer; // index for layer/end cap position + Layer.first=0; //Barrel (0) or End Cap (1) - Now only for Barrel. If we want to add End Caps, put them at Layer.first=1 + Layer.second=i; //Layer: 0 = IBL Planar, 1=B-Layer, 2=Layer-1, 3=Layer-2 + //IBL Barrel doesn't exist. So the possible idexes should be: 0-0, 0-1, 0-2, 0-3, 1-1, 1-2, 1-3 + + //Setup ramo weighting field map + TH3F* ramoPotentialMap_hold; + ramoPotentialMap_hold=0; + ramoPotentialMap_hold=(TH3F*)mapsFile->Get("hramomap1"); + if (ramoPotentialMap_hold==0) ramoPotentialMap_hold=(TH3F*)mapsFile->Get("ramo3d"); + if (ramoPotentialMap_hold==0){ + ATH_MSG_INFO("Did not find a Ramo potential map. Will use an approximate form."); + return StatusCode::FAILURE; //Obviously, remove this when gen. code is set up + //TODO + // CHECK(m_radDamageUtil->generateRamoMap( ramoPotentialMap, p_design_dummy )); + } + //ramoPotentialMap.push_back(ramoPotentialMap_hold); + ramoPotentialMap[Layer]=ramoPotentialMap_hold; + m_fluence_layersMaps[Layer]=m_fluence_layers.at(i); + //Now setup the E-field. + TH1F* eFieldMap_hold; + eFieldMap_hold=0; + eFieldMap_hold=(TH1F*)mapsFile->Get("hEfield1D"); + if (eFieldMap_hold == 0){ + ATH_MSG_INFO("Unable to load sensor e-field map, so generating one using approximations."); + return StatusCode::FAILURE;//Obviously, remove this when gen. code is set up + //TODO + // CHECK(m_radDamageUtil->generateEfieldMap( eFieldMap, p_design_dummy )); + } + //eFieldMap.push_back(eFieldMap_hold); + eFieldMap[Layer]=eFieldMap_hold; + + TH2F* lorentzMap_e_hold; + TH2F* lorentzMap_h_hold; + TH2F* distanceMap_h_hold; + TH2F* distanceMap_e_hold; + TH1F* timeMap_e_hold; + TH1F* timeMap_h_hold; + + lorentzMap_e_hold=0; + lorentzMap_h_hold=0; + distanceMap_e_hold=0; + distanceMap_h_hold=0; + timeMap_e_hold=0; + timeMap_h_hold=0; + lorentzMap_e_hold=(TH2F*)mapsFile->Get("lorentz_map_e"); + lorentzMap_h_hold=(TH2F*)mapsFile->Get("lorentz_map_h"); + distanceMap_h_hold=(TH2F*)mapsFile->Get("hdistance"); + distanceMap_e_hold=(TH2F*)mapsFile->Get("edistance"); + timeMap_e_hold=(TH1F*)mapsFile->Get("etimes"); + timeMap_h_hold=(TH1F*)mapsFile->Get("htimes"); + //Now, determine the time to reach the electrode and the trapping position. + if (distanceMap_e_hold == 0 || distanceMap_h_hold == 0 || timeMap_e_hold == 0 || timeMap_h_hold == 0 || lorentzMap_e_hold == 0 || lorentzMap_h_hold == 0){ + + ATH_MSG_INFO("Unable to load at least one of teh distance/time/Lorentz angle maps, so generating all using approximations."); + return StatusCode::FAILURE;//Obviously, remove this when gen. code is set up + //TODO + //CHECK(m_radDamageUtil->generateDistanceTimeMap( distanceMap_e, distanceMap_h, timeMap_e, timeMap_h, lorentzMap_e, lorentzMap_h, eFieldMap, p_design_dummy )); + } + lorentzMap_e[Layer]=lorentzMap_e_hold; + lorentzMap_h[Layer]=lorentzMap_h_hold; + distanceMap_e[Layer]=distanceMap_e_hold; + distanceMap_h[Layer]=distanceMap_h_hold; + timeMap_e[Layer]=timeMap_e_hold; + timeMap_h[Layer]=timeMap_h_hold; + + } + return StatusCode::SUCCESS; +} + +//=============================================== +// F I N A L I Z E +//=============================================== +StatusCode SensorSimPlanarTool::finalize() { + ATH_MSG_DEBUG("SensorSimPlanarTool::finalize()"); + return StatusCode::SUCCESS; +} +//=============================================== +// I N D U C E C H A R G E +//=============================================== +StatusCode SensorSimPlanarTool::induceCharge(const TimedHitPtr<SiHit> &phit, SiChargedDiodeCollection &chargedDiodes, const InDetDD::SiDetectorElement &Module, const InDetDD::PixelModuleDesign &p_design, std::vector< std::pair<double,double> > &trfHitRecord, std::vector<double> &initialConditions) { + + // So far, this is only discriminating variable from 3D sensor. + if (p_design.numberOfCircuits()<2){ + if(!Module.isDBM()) { //DBM modules also processed here + return StatusCode::SUCCESS; + } + } + + bool isBarrel = false; + + const PixelID* p_pixelId = static_cast<const PixelID *>(Module.getIdHelper()); + int layer=p_pixelId->layer_disk(Module.identify() ); + int bec=1; + if(p_pixelId->is_barrel(Module.identify()) ) bec=0 ; + + if(Module.isBarrel()) isBarrel = true; + + std::pair<int, int> Layer; // index for layer/end cap position + Layer.first=bec; //Barrel (0) or End Cap (1) - Maps only for Barrel at the moment. isBarrel will avoid zsh + Layer.second=layer; //Layer: 0 = IBL Planar, 1=B-Layer, 2=Layer-1, 3=Layer-2 + //IBL Barrel doesn't exist. So the possible idexes should be: 0-0, 0-1, 0-2, 0-3, 1-1, 1-2, 1-3 + + if(m_doRadDamage && isBarrel && m_fluence>0){ + std::pair<double,double> trappingTimes = m_radDamageUtil->getTrappingTimes( m_fluence_layersMaps[Layer] ); + m_trappingTimeElectrons = trappingTimes.first; + m_trappingTimeHoles = trappingTimes.second; + } + + + //Load values from energyDeposition + double eta_0 = initialConditions[0]; + double phi_0 = initialConditions[1]; + double depth_0 = initialConditions[2]; + double dEta = initialConditions[3]; + double dPhi = initialConditions[4]; + double dDepth = initialConditions[5]; + double ncharges = initialConditions[6]; + double iTotalLength = initialConditions[7]; + + //Set up physical detector properties, switch on detector material + ATH_MSG_DEBUG("Applying planar sensor simulation"); + double sensorThickness = Module.design().thickness(); + const InDet::SiliconProperties & siProperties = m_siPropertiesSvc->getSiProperties(Module.identifyHash()); + + int etaCells = p_design.columns(); + int phiCells = p_design.rows(); + + double eleholePairEnergy = 0; + double smearRand = 0; + + if (Module.isDBM()){ + eleholePairEnergy = 1. / (13. * CLHEP::eV); // was 3.62 eV. + m_diffusionConstant = .00265;//diffusion contant for DBM - not changed wrt previous version of digitization. Does someone know where this comes from? + smearRand = CLHEP::RandGaussZiggurat::shoot(m_rndmEngine); + } + else{ + eleholePairEnergy = siProperties.electronHolePairsPerEnergy(); // = 1 / 3.6 eV -> expressed in MeV^-1 = 276243 MeV^-1 + m_diffusionConstant = .007;//diffusion length used in simulation, consistent with current simluation and previous version of digitization. Eventually to be changed to proper Einstein relation + } + + double collectionDist = 0.2*CLHEP::mm;//kept for consistency with previosu version of digi. Does someone know where this number comes from? + double smearScale = 1. + 0.35*smearRand;//ditto... + double tanLorentz = Module.getTanLorentzAnglePhi(); + double coLorentz=sqrt(1+pow(tanLorentz,2)); + + //**************************************// + //*** Now diffuse charges to surface *** // + //**************************************// + + for(unsigned int i = 0; i < trfHitRecord.size(); i++){ + std::pair<double,double> iHitRecord = trfHitRecord[i]; + + double eta_i = eta_0; + double phi_i = phi_0; + double depth_i = depth_0; + if (iTotalLength) { + eta_i += 1.0*iHitRecord.first/iTotalLength*dEta; + phi_i += 1.0*iHitRecord.first/iTotalLength*dPhi; + depth_i += 1.0*iHitRecord.first/iTotalLength*dDepth; + } + + //Find the position of the centre of the pixel in which the charge carriers are created, wrt centre of module + SiLocalPosition pos_i = Module.hitLocalToLocal(eta_i,phi_i); + SiCellId pixel_i = Module.cellIdOfPosition( pos_i ); + + //Check that the HIT isn't outside of the pixel matrix + if( pixel_i.etaIndex() < 0 || pixel_i.phiIndex() < 0 || pixel_i.etaIndex() > std::pow(2.,10) || pixel_i.phiIndex() > std::pow(2.,10) ){ + continue; + } + + SiLocalPosition centreOfPixel_i; + double pixelEta_i = 0.; + double pixelPhi_i =0.; + + int nnLoop_pixelEtaMax =0; + int nnLoop_pixelEtaMin=0; + int nnLoop_pixelPhiMax=0; + int nnLoop_pixelPhiMin=0; + + int numBins_driftTime_e=0; + int numBins_driftTime_h=0; + int numBins_weightingPotential_x=0; + int numBins_weightingPotential_y=0; + int numBins_weightingPotential_z=0; + + if (m_doRadDamage && m_fluence>0 && !(Module.isDBM()) && isBarrel) { + centreOfPixel_i = p_design.positionFromColumnRow(pixel_i.etaIndex(), pixel_i.phiIndex()); + + //Find the displacment of the charge carriers from the centre of the pixel in +ve quadrant + pixelEta_i = eta_i - centreOfPixel_i.xEta(); + pixelPhi_i = phi_i - centreOfPixel_i.xPhi(); + + //Make limits for NN loop + nnLoop_pixelEtaMax = std::min( 2,pixel_i.etaIndex() ); + nnLoop_pixelEtaMin = std::max( -2, pixel_i.etaIndex() + 1 - etaCells ); + + nnLoop_pixelPhiMax = std::min( 2,pixel_i.phiIndex() ); + nnLoop_pixelPhiMin = std::max( -2, pixel_i.phiIndex() + 1 - phiCells ); + + //Setup values to check for overflow when using maps + numBins_driftTime_e = distanceMap_e[Layer]->GetNbinsY(); //Returns nBins = totalBins - underflow - overflow + numBins_driftTime_h = distanceMap_h[Layer]->GetNbinsY(); + + numBins_weightingPotential_x = ramoPotentialMap[Layer]->GetNbinsX(); + numBins_weightingPotential_y = ramoPotentialMap[Layer]->GetNbinsY(); + numBins_weightingPotential_z = ramoPotentialMap[Layer]->GetNbinsZ(); + + } + + // Distance between charge and readout side. p_design->readoutSide() is + // +1 if readout side is in +ve depth axis direction and visa-versa. + double dist_electrode = 0.5 * sensorThickness - Module.design().readoutSide() * depth_i; + if (dist_electrode<0) dist_electrode=0; + + // nonTrapping probability: DBM trapping, independant of radDamage + double nontrappingProbability = 1.0; + if (Module.isDBM()){ + nontrappingProbability = exp(-dist_electrode/collectionDist); + } + + // amount of energy to be converted into charges at current step + double energy_per_step = 1.0*iHitRecord.second/1.E+6/ncharges; + + //Loop over charge-carrier pairs + for(int j=0 ; j<ncharges ; j++) { + + if( m_doRadDamage && m_fluence>0 && !(Module.isDBM()) && isBarrel){ + double u = CLHEP::RandFlat::shoot(0.,1.); + double drifttime_e = (-1.)*m_trappingTimeElectrons*TMath::Log(u); //ns + u = CLHEP::RandFlat::shoot(0.,1.); + double drifttime_h = (-1.)*m_trappingTimeHoles*TMath::Log(u); //ns + + //Now, need the z-position at the trap. + int nbin_z_e_xbin = distanceMap_e[Layer]->GetXaxis()->FindBin(dist_electrode); + int nbin_z_e_ybin = distanceMap_e[Layer]->GetYaxis()->FindBin(drifttime_e); + if (nbin_z_e_ybin > numBins_driftTime_e ) nbin_z_e_ybin = numBins_driftTime_e; + double depth_f_e = distanceMap_e[Layer]->GetBinContent( nbin_z_e_xbin,nbin_z_e_ybin ); + double dz_e = fabs(dist_electrode - depth_f_e); + + //TODO: the holes map does not currently extend for a drift time long enough that, any hole will reach + //the corresponding electrode. This needs to be rectified by either (a) extrapolating the current map or + //(b) making a new map with a y-axis (drift time) that extends to at least 18 ns so all charge carriers reach electrode. + //However, if choose (b), will need to reduce granularity of map. + int nbin_z_h_xbin = distanceMap_h[Layer]->GetXaxis()->FindBin(dist_electrode); + int nbin_z_h_ybin = distanceMap_h[Layer]->GetYaxis()->FindBin(drifttime_h); + if (nbin_z_h_ybin > numBins_driftTime_h ) + nbin_z_h_ybin = numBins_driftTime_h; + double depth_f_h = distanceMap_h[Layer]->GetBinContent( nbin_z_h_xbin,nbin_z_h_ybin ); + double dz_h = fabs(depth_f_h - dist_electrode); + + //Apply drift due to Lorentz force and diffusion + double phiRand = CLHEP::RandGaussZiggurat::shoot(m_rndmEngine); + + int nbin_Lorentz_e = lorentzMap_e[Layer]->FindBin(dist_electrode,depth_f_e); + tanLorentz = lorentzMap_e[Layer]->GetBinContent(nbin_Lorentz_e); + coLorentz=sqrt(1+pow(tanLorentz,2)); + + //Apply diffusion. rdif is teh max. diffusion + double rdif_e=this->m_diffusionConstant*sqrt( fabs(dist_electrode - depth_f_e)*coLorentz/0.3); + double phi_f_e=phi_i + dz_e*tanLorentz + rdif_e*phiRand; + double etaRand = CLHEP::RandGaussZiggurat::shoot(m_rndmEngine); + double eta_f_e=eta_i + rdif_e*etaRand; + + phiRand = CLHEP::RandGaussZiggurat::shoot(m_rndmEngine); + + int nbin_Lorentz_h = lorentzMap_h[Layer]->FindBin(dist_electrode,depth_f_h); + tanLorentz = lorentzMap_h[Layer]->GetBinContent(nbin_Lorentz_h); + coLorentz=sqrt(1+pow(tanLorentz,2)); + + double rdif_h=this->m_diffusionConstant*sqrt( fabs(dist_electrode - depth_f_h)*coLorentz/0.3); + + double phi_f_h=phi_i + dz_h*tanLorentz + rdif_h*phiRand; + etaRand = CLHEP::RandGaussZiggurat::shoot(m_rndmEngine); + double eta_f_h=eta_i + rdif_h*etaRand; + + // Slim Edge for IBL planar sensors: + if ( p_design.getReadoutTechnology()==InDetDD::PixelModuleDesign::FEI4) { + CHECK( applySlimEdges( energy_per_step, eta_f_e ) ); + CHECK( applySlimEdges( energy_per_step, eta_f_h ) ); + } + + //Loop over nearest neighbours in x and y + //We assume that the lateral diffusion is minimal + for (int p=nnLoop_pixelEtaMin; p<=nnLoop_pixelEtaMax; p++){ + for (int q=nnLoop_pixelPhiMin; q<=nnLoop_pixelPhiMax; q++){ + + //Since both e-h charge carriers start in the same place, they have the same initial ramo value + //Centre of nearest neighbour (nn) pixel + SiLocalPosition centreOfPixel_nn = p_design.positionFromColumnRow( pixel_i.etaIndex() - p, pixel_i.phiIndex() - q ); + + //What is the displacement of the nn pixel from the primary pixel. + //This is to index the correct entry in the Ramo weighting potential map + double dPhi_nn_centre = centreOfPixel_nn.xPhi() - centreOfPixel_i.xPhi(); //in mm + double dEta_nn_centre = centreOfPixel_nn.xEta() - centreOfPixel_i.xEta(); //in mm + + //Find weighting potential in initial position. This all has to be done relative to the (0,0) position since the + //Ramo weighting potential is only mapped out for 1/8th of a pixel. Much of this logic is reflecting the charge + //carrier across the boundaries. + double dEta_i_e = pixelEta_i - dEta_nn_centre; + double dPhi_i_e = pixelPhi_i - dPhi_nn_centre; + + int nbin_ramo_i_x = ramoPotentialMap[Layer]->GetXaxis()->FindBin( fabs( dPhi_i_e )*1000. ); + int nbin_ramo_i_y = ramoPotentialMap[Layer]->GetYaxis()->FindBin( fabs( dEta_i_e )*1000. ); + int nbin_ramo_i_z = ramoPotentialMap[Layer]->GetZaxis()->FindBin( dist_electrode*1000 ); + //int nbin_ramo_i = ramoPotentialMap[0]->FindBin( fabs( dEta_i_e )*1000. , fabs( dPhi_i_e )*1000., dist_electrode*1000); + + //Boundary check on maps + double ramo_i=0.; + if( nbin_ramo_i_x <= numBins_weightingPotential_x && nbin_ramo_i_y <= numBins_weightingPotential_y && nbin_ramo_i_z <=numBins_weightingPotential_z ){ + ramo_i =ramoPotentialMap[Layer]->GetBinContent( nbin_ramo_i_x,nbin_ramo_i_y,nbin_ramo_i_z ); + } + //Find the displacment of the charge carriers from the centre of the pixel in +ve quadrant + double pixelEta_f_e = eta_f_e - centreOfPixel_i.xEta() ; + double pixelPhi_f_e = phi_f_e - centreOfPixel_i.xPhi() ; + + double pixelEta_f_h = eta_f_h - centreOfPixel_i.xEta() ; + double pixelPhi_f_h = phi_f_h - centreOfPixel_i.xPhi() ; + + //Final position of charge carriers wrt nn centre + double dEta_f_e = pixelEta_f_e - dEta_nn_centre ; + double dPhi_f_e = pixelPhi_f_e - dPhi_nn_centre ; + + int nbin_ramo_f_e_x = ramoPotentialMap[Layer]->GetXaxis()->FindBin( fabs( dPhi_f_e )*1000. ); + int nbin_ramo_f_e_y = ramoPotentialMap[Layer]->GetYaxis()->FindBin( fabs( dEta_f_e )*1000. ); + int nbin_ramo_f_e_z = ramoPotentialMap[Layer]->GetZaxis()->FindBin( depth_f_e*1000 ); + //int nbin_ramo_f_e = ramoPotentialMap[0]->FindBin( fabs( dEta_f_e )*1000. , fabs( dPhi_f_e )*1000., depth_f_e*1000); + double ramo_f_e=0.; + if( nbin_ramo_f_e_x <= numBins_weightingPotential_x && nbin_ramo_f_e_y <= numBins_weightingPotential_y && nbin_ramo_f_e_z <=numBins_weightingPotential_z ){ + ramo_f_e =ramoPotentialMap[Layer]->GetBinContent( nbin_ramo_f_e_x,nbin_ramo_f_e_y,nbin_ramo_f_e_z ); + } + + double dEta_f_h = pixelEta_f_h - dEta_nn_centre ; + double dPhi_f_h = pixelPhi_f_h - dPhi_nn_centre ; + + int nbin_ramo_f_h_x = ramoPotentialMap[Layer]->GetXaxis()->FindBin( fabs( dPhi_f_h )*1000. ); + int nbin_ramo_f_h_y = ramoPotentialMap[Layer]->GetYaxis()->FindBin( fabs( dEta_f_h )*1000. ); + int nbin_ramo_f_h_z = ramoPotentialMap[Layer]->GetZaxis()->FindBin( depth_f_h*1000 ); + //int nbin_ramo_f_h = ramoPotentialMap->FindBin( fabs( dEta_f_h )*1000. , fabs( dPhi_f_h )*1000., depth_f_h*1000); + //Boundary check on maps + double ramo_f_h=0.; + if( nbin_ramo_f_h_x <= numBins_weightingPotential_x && nbin_ramo_f_h_y <= numBins_weightingPotential_y && nbin_ramo_f_h_z <=numBins_weightingPotential_z ){ + ramo_f_h =ramoPotentialMap[Layer]->GetBinContent( nbin_ramo_f_h_x,nbin_ramo_f_h_y,nbin_ramo_f_h_z ); + } + + //Account for the imperfect binning that would cause charge to be double-counted + if(ramoPotentialMap[Layer]->GetZaxis()->FindBin(depth_f_h*1000) == ramoPotentialMap[Layer]->GetNbinsZ()+1) ramo_f_h=0;//this means the hole has reached the back end + if(ramoPotentialMap[Layer]->GetZaxis()->FindBin(depth_f_e*1000) == 1){ + if( fabs(dEta_f_e)>=Module.etaPitch()/2. || fabs(dPhi_f_e)>=Module.phiPitch()/2. ) ramo_f_e=0; + else if (fabs(dEta_f_e)<Module.etaPitch()/2. && fabs(dPhi_f_e)<Module.phiPitch()/2. ) ramo_f_e=1.; + } + + + //Given final position of charge carrier, find induced charge. The difference in Ramo weighting potential gives the fraction of charge induced. + //The energy_per_step is transformed into charge with the eleholePair per Energy + double induced_charge_e = (ramo_f_e - ramo_i) * energy_per_step * eleholePairEnergy; + double induced_charge_h = -(ramo_f_h - ramo_i) * energy_per_step * eleholePairEnergy; + + + //Collect charge in centre of each pixel, since location within pixel doesn't matter for record + SiLocalPosition chargePos = Module.hitLocalToLocal( centreOfPixel_nn.xEta(), centreOfPixel_nn.xPhi() ); + + //The following lines are adapted from SiDigitization's Inserter class + SiSurfaceCharge scharge_e( chargePos,SiCharge( induced_charge_e,hitTime(phit),SiCharge::track,HepMcParticleLink(phit->trackNumber(),phit.eventId()))); + SiSurfaceCharge scharge_h( chargePos,SiCharge( induced_charge_h,hitTime(phit),SiCharge::track,HepMcParticleLink(phit->trackNumber(),phit.eventId()))); + SiCellId diode = Module.cellIdOfPosition(scharge_e.position()); + SiCharge charge_e = scharge_e.charge(); + SiCharge charge_h = scharge_h.charge(); + if (diode.isValid()) { + chargedDiodes.add(diode,charge_e); + chargedDiodes.add(diode,charge_h); + } //IF + } //For q + } //for p + }else { //If no radDamage, run original + + double rdif=this->m_diffusionConstant*sqrt(dist_electrode*coLorentz/0.3); + // position at the surface + double phiRand = CLHEP::RandGaussZiggurat::shoot(m_rndmEngine); + double phi_drifted=phi_i+dist_electrode*tanLorentz+rdif*phiRand; + double etaRand = CLHEP::RandGaussZiggurat::shoot(m_rndmEngine); + double eta_drifted=eta_i+rdif*etaRand; + + + // Slim Edge for IBL planar sensors: + if ( !(Module.isDBM()) && p_design.getReadoutTechnology()==InDetDD::PixelModuleDesign::FEI4) { + CHECK( applySlimEdges( energy_per_step, eta_drifted ) ); + } + SiLocalPosition chargePos = Module.hitLocalToLocal(eta_drifted, phi_drifted); + + // The parametrization of the sensor efficiency + double ed = 0; + if (Module.isDBM()){ + ed=energy_per_step*eleholePairEnergy*nontrappingProbability*smearScale; + } + else { + ed=energy_per_step*eleholePairEnergy; + } + + //The following lines are adapted from SiDigitization's Inserter class + SiSurfaceCharge scharge(chargePos,SiCharge(ed,hitTime(phit),SiCharge::track,HepMcParticleLink(phit->trackNumber(),phit.eventId()))); + SiCellId diode = Module.cellIdOfPosition(scharge.position()); + SiCharge charge = scharge.charge(); + + if (diode.isValid()) { + chargedDiodes.add(diode,charge); + } + + } //else: no radDamage, run original + }//end cycle for charge + }//trfHitRecord.size() + return StatusCode::SUCCESS; + } + + +StatusCode SensorSimPlanarTool::applySlimEdges( double &energy_per_step, double &eta_drifted){ + + if(fabs(eta_drifted) > 20.440)energy_per_step=0.; + if(fabs(eta_drifted)< 20.440 && fabs(eta_drifted)> 20.200){ + if(eta_drifted>0){ + energy_per_step=energy_per_step*(68.13-eta_drifted*3.333); + eta_drifted = eta_drifted - 0.250; + }else{ + energy_per_step=energy_per_step*(68.13+eta_drifted*3.333); + eta_drifted = eta_drifted + 0.250; + } + } + if(fabs(eta_drifted)< 20.200 && fabs(eta_drifted)> 20.100){ + if(eta_drifted>0){ + energy_per_step=energy_per_step*(41.2-eta_drifted*2.); + eta_drifted = eta_drifted - 0.250; + }else{ + energy_per_step=energy_per_step*(41.2+eta_drifted*2.); + eta_drifted = eta_drifted + 0.250; + } + } + + return StatusCode::SUCCESS; + +} + +//TODO: Lorentz angle: correct calculation. To test at a later time + /* + double max_dfe = (lorentzMap_e->GetNbinsY())*(lorentzMap_e->GetYaxis()->GetBinWidth(2)); + if(depth_f_e >= max_dfe) depth_f_e=max_dfe- 0.5*(lorentzMap_e->GetYaxis()->GetBinWidth(2)); + + int nbin = lorentzMap_e->FindBin(dist_electrode,depth_f_e); + tanLorentz = lorentzMap_e->GetBinContent(nbin); + double tanlor_e = tanLorentz; + + double coLorentz=sqrt(1+pow(tanLorentz,2)); + double max_dfh = (lorentzMap_h->GetNbinsY())*(lorentzMap_h->GetYaxis()->GetBinWidth(2)); + double max_di = (lorentzMap_h->GetNbinsX())*(lorentzMap_h->GetXaxis()->GetBinWidth(2)); + double appo_fh = depth_f_h; + if(depth_f_h >= max_dfh) appo_fh=max_dfh - 0.5*(lorentzMap_h->GetYaxis()->GetBinWidth(2)); + nbin = lorentzMap_h->FindBin(dist_electrode,appo_fh); + tanLorentz = lorentzMap_h->GetBinContent(nbin) ; + double tanlor_h = tanLorentz; + + coLorentz=sqrt(1+pow(tanLorentz,2)); + + */ diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.h b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.h new file mode 100644 index 000000000000..e73f67d43b10 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.h @@ -0,0 +1,72 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// SensorSimPlanarTool.h +// Header file for class SensorSimPlanarTool +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// +// +// Configurable Parameters +// +// -numberOfSteps Geant4:number of steps for PixelPlanar +// -numberOfCharges Geant4:number of charges for PixelPlanar +// +////////////////////////////////////////////////////////////////// + +#ifndef PIXELDIGITIZATION_SensorSimPlanarTool_H +#define PIXELDIGITIZATION_SensorSimPlanarTool_H + +#include "AthenaBaseComps/AthAlgTool.h" +#include "GaudiKernel/ToolHandle.h" +#include "StoreGate/WriteHandle.h" + +#include "SensorSimTool.h" +#include "RadDamageUtil.h" + +namespace RadDam{ + +class SensorSimPlanarTool : public SensorSimTool { + + public: + SensorSimPlanarTool( const std::string& type, const std::string& name,const IInterface* parent); + virtual StatusCode initialize(); + virtual StatusCode finalize(); + virtual ~SensorSimPlanarTool(); + + virtual StatusCode induceCharge(const TimedHitPtr<SiHit> &phit, SiChargedDiodeCollection& chargedDiodes, const InDetDD::SiDetectorElement &Module, const InDetDD::PixelModuleDesign &p_design, std::vector< std::pair<double,double> > &trfHitRecord, std::vector<double> &initialConditions); + //Apply slim edge inefficiencies for IBL sensors + virtual StatusCode applySlimEdges( double &energyPerStep, double &eta_drifted); + + //Maps + std::map<std::pair<int, int>, TH3F* > ramoPotentialMap; + std::map<std::pair<int, int>, TH1F*> eFieldMap; + std::map<std::pair<int, int>, TH2F*> distanceMap_e; + std::map<std::pair<int, int>, TH2F*> distanceMap_h; + std::map<std::pair<int, int>, TH1F*> timeMap_e; + std::map<std::pair<int, int>, TH1F*> timeMap_h; + std::map<std::pair<int, int>, TH2F*> lorentzMap_e; + std::map<std::pair<int, int>, TH2F*> lorentzMap_h; + + ToolHandle<RadDamageUtil> m_radDamageUtil; + + private: + SensorSimPlanarTool(); + + int m_numberOfSteps; + int m_numberOfCharges; + double m_diffusionConstant; + + bool m_doRadDamage; + double m_fluence; //eventually, this should be pulled from the conditions. + + std::vector<double> m_fluence_layers; + std::map<std::pair<int, int>, double> m_fluence_layersMaps; + double m_trappingTimeElectrons; + double m_trappingTimeHoles; +}; + +} +#endif // PIXELDIGITIZATION_SensorSimPlanarTool_H diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimTool.h b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimTool.h new file mode 100644 index 000000000000..5a859c3d9d0d --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimTool.h @@ -0,0 +1,86 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// SensorSimTool.h +// Header file for class SensorSimTool +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// +#ifndef PIXELDIGITIZATION_SensorSimTool_H +#define PIXELDIGITIZATION_SensorSimTool_H + +#include "AthenaBaseComps/AthAlgTool.h" +#include "GaudiKernel/ServiceHandle.h" +#include "GaudiKernel/ToolHandle.h" +#include "CLHEP/Random/RandomEngine.h" +#include "CLHEP/Random/RandGaussZiggurat.h" +#include "AthenaKernel/IAtRndmGenSvc.h" + +#include "HitManagement/TimedHitPtr.h" +#include "SiDigitization/SiChargedDiodeCollection.h" +#include "SiPropertiesSvc/ISiPropertiesSvc.h" +#include "InDetReadoutGeometry/SiDetectorElement.h" +#include "SiDigitization/SiChargedDiodeCollection.h" +#include "InDetReadoutGeometry/PixelModuleDesign.h" +#include "SiPropertiesSvc/ISiPropertiesSvc.h" + +static const InterfaceID IID_ISensorSimTool("SensorSimTool", 1, 0); + +class SensorSimTool:public AthAlgTool,virtual public IAlgTool { + + public: + SensorSimTool( const std::string& type, const std::string& name,const IInterface* parent) : + AthAlgTool(type,name,parent), + m_siPropertiesSvc("PixelSiPropertiesSvc",name), + m_rndmSvc("AtDSFMTGenSvc",name), + m_rndmEngineName("PixelDigitization"), + m_rndmEngine(nullptr) + { + declareInterface<SensorSimTool>(this); + declareProperty("SiPropertiesSvc", m_siPropertiesSvc, "SiPropertiesSvc"); + declareProperty("RndmSvc", m_rndmSvc, "Random Number Service used in SCT & Pixel digitization"); + declareProperty("RndmEngine", m_rndmEngineName, "Random engine name"); + } + + static const InterfaceID& interfaceID() { return IID_ISensorSimTool; } + + virtual StatusCode initialize() { + CHECK(AthAlgTool::initialize()); + + CHECK(m_siPropertiesSvc.retrieve()); + + CHECK(m_rndmSvc.retrieve()); + + m_rndmEngine = m_rndmSvc->GetEngine(m_rndmEngineName); + if (!m_rndmEngine) { + ATH_MSG_ERROR("Could not find RndmEngine : " << m_rndmEngineName); + return StatusCode::FAILURE; + } + else { + ATH_MSG_DEBUG("Found RndmEngine : " << m_rndmEngineName); + } + + return StatusCode::SUCCESS; + } + + virtual StatusCode finalize() {return StatusCode::FAILURE;} + virtual ~SensorSimTool() {} + virtual StatusCode induceCharge(const TimedHitPtr<SiHit> &phit, SiChargedDiodeCollection& chargedDiodes, const InDetDD::SiDetectorElement &Module, const InDetDD::PixelModuleDesign &p_design, std::vector< std::pair<double,double> > &trfHitRecord, std::vector<double> &initialConditions) = 0; + + private: + SensorSimTool(); + + protected: + ServiceHandle<ISiPropertiesSvc> m_siPropertiesSvc; + ServiceHandle<IAtRndmGenSvc> m_rndmSvc; + std::string m_rndmEngineName; + CLHEP::HepRandomEngine *m_rndmEngine; + + private: + const InDetDD::SiDetectorElement *m_module; +}; + + +#endif // PIXELDIGITIZATION_SensorSimTool_H diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/components/PixelRadDamDigitization_entries.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/components/PixelRadDamDigitization_entries.cxx new file mode 100755 index 000000000000..a9254cb96f57 --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/components/PixelRadDamDigitization_entries.cxx @@ -0,0 +1,31 @@ +#include "src/PixelDigitization.h" +#include "src/PixelDigitizationTool.h" +#include "src/PixelNoisyCellGenerator.h" +#include "src/PixelChargeSmearer.h" +#include "src/PixelDiodeCrossTalkGenerator.h" +#include "src/PixelRandomDisabledCellGenerator.h" +#include "src/SensorSimPlanarTool.h" +#include "src/SensorSim3DTool.h" +#include "src/ChargeCollProbSvc.h" +#include "src/EnergyDepositionTool.h" +#include "src/RadDamageUtil.h" +#include "src/RD53SimTool.h" +#include "src/FEI4SimTool.h" +#include "src/FEI3SimTool.h" + +using namespace RadDam; +DECLARE_COMPONENT(PixelDigitization) +DECLARE_COMPONENT(EnergyDepositionTool) +DECLARE_COMPONENT(RadDamageUtil) +DECLARE_COMPONENT(PixelDigitizationTool) +DECLARE_COMPONENT(PixelNoisyCellGenerator) +DECLARE_COMPONENT(PixelChargeSmearer) +DECLARE_COMPONENT(PixelDiodeCrossTalkGenerator) +DECLARE_COMPONENT(PixelRandomDisabledCellGenerator) +DECLARE_COMPONENT(SensorSimPlanarTool) +DECLARE_COMPONENT(SensorSim3DTool) +DECLARE_COMPONENT(RD53SimTool) +DECLARE_COMPONENT(FEI4SimTool) +DECLARE_COMPONENT(FEI3SimTool) +DECLARE_COMPONENT(ChargeCollProbSvc) + diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/components/PixelRadDamDigitization_load.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/components/PixelRadDamDigitization_load.cxx new file mode 100755 index 000000000000..e197f3353e0e --- /dev/null +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/components/PixelRadDamDigitization_load.cxx @@ -0,0 +1,4 @@ +#include "GaudiKernel/LoadFactoryEntries.h" + +LOAD_FACTORY_ENTRIES( PixelRadDamDigitization ) +LOAD_FACTORY_ENTRIES( ChargeCollProbSvc ) -- GitLab From ad91c6c8cae8dc29aa9e9c0342d6daff0341c859 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Wed, 4 Jul 2018 10:41:27 +0200 Subject: [PATCH 356/562] JetTagInfoTPCnv: Fix clang warnings. clang warnings: unused private data members. These, however, are in _p classes, so don't remove them. Instead, just suppress the warnings we get from clang. Former-commit-id: 7c8d779e5140feb8abf1b544c776e08438d07a5d --- PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/CMakeLists.txt | 1 - .../JetTagInfoTPCnv/JetTagInfoTPCnv/SecVtxInfo_p1.h | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/CMakeLists.txt b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/CMakeLists.txt index a72abe8433cf..edf2e846b6ae 100644 --- a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/CMakeLists.txt +++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/CMakeLists.txt @@ -21,7 +21,6 @@ atlas_depends_on_subdirs( PUBLIC Reconstruction/egamma/egammaEvent Tracking/TrkEvent/VxVertex Tracking/TrkEventCnv/TrkEventTPCnv - PRIVATE Control/CxxUtils ) # External dependencies: diff --git a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/JetTagInfoTPCnv/SecVtxInfo_p1.h b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/JetTagInfoTPCnv/SecVtxInfo_p1.h index c8747a34fbed..6c8d239bd750 100644 --- a/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/JetTagInfoTPCnv/SecVtxInfo_p1.h +++ b/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/JetTagInfoTPCnv/SecVtxInfo_p1.h @@ -5,6 +5,8 @@ #ifndef JETTAGINFOTPCNV_SECVTXINFO_P1_H #define JETTAGINFOTPCNV_SECVTXINFO_P1_H +#include "CxxUtils/unused.h" + /// /// Cache all info having to do with the secondary vertex. /// @@ -21,7 +23,8 @@ namespace Analysis /// Info stored in the SecVtxInfo subclass: - int m_numSelTracksForFit; + // Unused, but shouldn't delete it since it's part of the persistent data. + int ATH_UNUSED_MEMBER(m_numSelTracksForFit); float m_dist; float m_rphidist; float m_prob; -- GitLab From d77294f9085ba7fb3a2e84831612a116d3d9e6bc Mon Sep 17 00:00:00 2001 From: Tim Martin <tim.martin@cern.ch> Date: Wed, 4 Jul 2018 14:56:17 +0000 Subject: [PATCH 357/562] Trig Composite & trigger filter updates from hackathon Former-commit-id: 2f6e95fa540660665ca49158b4e879c981ca9bbc --- Event/xAOD/xAODTrigger/CMakeLists.txt | 4 + .../xAODTrigger/Root/TrigComposite_v1.cxx | 25 +- .../ut_xaodtrigger_trigcomposite_test.cxx | 109 ++++-- .../xAODTrigger/versions/TrigComposite_v1.h | 8 +- .../xAODTrigger/versions/TrigComposite_v1.icc | 4 +- .../DecisionHandling/src/RoRSeqFilter.cxx | 63 ++-- .../DecisionHandling/src/RoRSeqFilter.h | 66 +++- .../src/TriggerSummaryAlg.cxx | 9 +- .../TrigUpgradeTest/CMakeLists.txt | 1 + .../TrigUpgradeTest/share/checkESD.py | 14 +- .../TrigUpgradeTest/share/egamma.withViews.py | 14 +- .../TrigValidation/TrigValAlgs/CMakeLists.txt | 7 +- .../TrigValAlgs/TrigValAlgs/TrigEDMChecker.h | 35 +- .../TrigValAlgs/src/TrigEDMChecker.cxx | 331 +++++++++++++----- 14 files changed, 505 insertions(+), 185 deletions(-) diff --git a/Event/xAOD/xAODTrigger/CMakeLists.txt b/Event/xAOD/xAODTrigger/CMakeLists.txt index 30814b2a6a7b..bde66f3bd68d 100644 --- a/Event/xAOD/xAODTrigger/CMakeLists.txt +++ b/Event/xAOD/xAODTrigger/CMakeLists.txt @@ -37,3 +37,7 @@ atlas_add_dictionary( xAODTriggerDict atlas_add_test( ut_xaodtrigger_bytestreamauxcontainer_v1_test SOURCES test/ut_xaodtrigger_bytestreamauxcontainer_v1_test.cxx LINK_LIBRARIES AthContainers xAODTrigger ) + +atlas_add_test( ut_xaodtrigger_trigcomposite_test + SOURCES test/ut_xaodtrigger_trigcomposite_test.cxx + LINK_LIBRARIES AthContainers xAODTrigger ) diff --git a/Event/xAOD/xAODTrigger/Root/TrigComposite_v1.cxx b/Event/xAOD/xAODTrigger/Root/TrigComposite_v1.cxx index 68c5851f6161..0c8bf74f6041 100644 --- a/Event/xAOD/xAODTrigger/Root/TrigComposite_v1.cxx +++ b/Event/xAOD/xAODTrigger/Root/TrigComposite_v1.cxx @@ -16,14 +16,29 @@ namespace xAOD { - TrigComposite_v1::TrigComposite_v1() { + const std::string TrigComposite_v1::s_collectionSuffix = "__COLL"; - } + TrigComposite_v1::TrigComposite_v1() { + } + + TrigComposite_v1::TrigComposite_v1( const TrigComposite_v1& parent ) : SG::AuxElement() { + this->makePrivateStore( parent ); + } + + TrigComposite_v1& TrigComposite_v1::operator=( const TrigComposite_v1& rhs ) { + if(this == &rhs) return *this; + if( ( ! hasStore() ) && ( ! container() ) ) this->makePrivateStore(); + + // Copy the auxiliary variables: + SG::AuxElement::operator=( rhs ); + + // Return this object: + return *this; + } AUXSTORE_OBJECT_SETTER_AND_GETTER( TrigComposite_v1, std::string, name, setName ) - template<> bool TrigComposite_v1::hasDetail<unsigned int>( const std::string& name ) const { return hasDetail<int>(name); @@ -34,8 +49,6 @@ namespace xAOD { return hasDetail<std::vector<int>>(name); } - - ///////////////////////////////////////////////////////////////////////////// // // Simple detail accessor functions @@ -227,7 +240,7 @@ namespace xAOD { } bool TrigComposite_v1::hasObjectCollectionLinks( const std::string& collectionName ) const { - const std::string mangledName = collectionName + m_collectionSuffix; + const std::string mangledName = collectionName + s_collectionSuffix; return hasObjectLink( mangledName ); } diff --git a/Event/xAOD/xAODTrigger/test/ut_xaodtrigger_trigcomposite_test.cxx b/Event/xAOD/xAODTrigger/test/ut_xaodtrigger_trigcomposite_test.cxx index b61e58dc62d7..31a7457763ab 100644 --- a/Event/xAOD/xAODTrigger/test/ut_xaodtrigger_trigcomposite_test.cxx +++ b/Event/xAOD/xAODTrigger/test/ut_xaodtrigger_trigcomposite_test.cxx @@ -10,6 +10,7 @@ // EDM include(s): #include "AthLinks/ElementLink.h" +#include "AthLinks/ElementLinkVector.h" // Local include(s): #include "xAODTrigger/TrigCompositeContainer.h" @@ -42,28 +43,33 @@ std::ostream& operator<< ( std::ostream& out, const std::vector< T >& vec ) { return out; } -int main() { - - // Create the container that we want to test: - xAOD::TrigCompositeAuxContainer aux; - xAOD::TrigCompositeContainer c; - c.setStore( &aux ); - - // Create a test object: - xAOD::TrigComposite* obj = new xAOD::TrigComposite(); - c.push_back( obj ); +const unsigned uintTestConst = (1<<(sizeof(unsigned)*4-1)) + 41; +int populateObject(xAOD::TrigComposite* obj) { // Set some simple properties on it: obj->setName( "TestObj" ); obj->setDetail( "IntValue", 12 ); - const unsigned uintTestConst = (1<<(sizeof(unsigned)*4-1)) + 41; obj->setDetail( "UnsignedIntValue", uintTestConst ); obj->setDetail( "FloatValue", 3.14f ); obj->setDetail( "IntVecValue", std::vector< int >( { 1, 2, 3 } ) ); obj->setDetail( "UnsignedIntVecValue", std::vector< unsigned int >( { uintTestConst, 2, 3 } ) ); obj->setDetail( "FloatVecValue", std::vector< float >( { 1.23, 2.34 } ) ); - std::cout << "Set detail ok." << std::endl; + + // Now test the ElementLink functionality in a basic way: + obj->setObjectLink( "MuonRoI", + ElementLink<xAOD::MuonRoIContainer>( 123, 456 ) ); + + // Test the ElementLinkVector functionality in a basic way: + ElementLinkVector<xAOD::MuonRoIContainer> elementLinks; + elementLinks.push_back( ElementLink<xAOD::MuonRoIContainer>( 789, 012 ) ); + elementLinks.push_back( ElementLink<xAOD::MuonRoIContainer>( 345, 678 ) ); + obj->addObjectCollectionLinks("ManyMuonRoIs", elementLinks); + + return 0; +} + +int testObject(const xAOD::TrigComposite* obj) { SIMPLE_ASSERT( obj->hasDetail<int>("IntValue") ); SIMPLE_ASSERT( obj->hasDetail<unsigned int>("UnsignedIntValue") ); SIMPLE_ASSERT( obj->hasDetail<std::vector<unsigned int> >("UnsignedIntVecValue") ); @@ -83,7 +89,7 @@ int main() { float floatValue = 0; SIMPLE_ASSERT( obj->getDetail( "FloatValue", floatValue ) ); SIMPLE_ASSERT( std::abs( floatValue - 3.14 ) < 0.001 ); - + std::vector< int > intVector; SIMPLE_ASSERT( obj->getDetail( "IntVecValue", intVector ) ); SIMPLE_ASSERT( intVector == std::vector< int >( { 1, 2, 3 } ) ); @@ -99,7 +105,7 @@ int main() { std::cout << "FloatVecValue = " << floatVector << std::endl; int intValue2 = obj->getDetail<int>("IntValue"); - SIMPLE_ASSERT( intValue2 == 12 ); + SIMPLE_ASSERT( intValue2 == 12 ); unsigned int unsignedIntValue2 = obj->getDetail<unsigned int>("UnsignedIntValue"); SIMPLE_ASSERT( unsignedIntValue2 == uintTestConst); float floatValue2 = obj->getDetail<float>("FloatValue"); @@ -109,8 +115,6 @@ int main() { std::vector< float > floatVector2 = obj->getDetail<std::vector<float>>( "FloatVecValue"); std::cout << "Simple getDetail API ok." << std::endl; - - std::vector<unsigned int> unsignedIntVector2 = obj->getDetail<std::vector<unsigned int>>("UnsignedIntVecValue"); SIMPLE_ASSERT( unsignedIntVector2 == std::vector<unsigned int>( { uintTestConst, 2, 3 } ) ); @@ -130,24 +134,73 @@ int main() { } catch (...) {} std::cout << "Missing details handled ok." << std::endl; - - - - - - // Now test the ElementLink functionality in a basic way: - obj->setObjectLink( "MuonRoI", - ElementLink< xAOD::MuonRoIContainer >( 123, 456 ) ); SIMPLE_ASSERT( obj->hasObjectLink( "MuonRoI" ) ); - SIMPLE_ASSERT( obj->linkColNames().size() == 1 ); - SIMPLE_ASSERT( obj->linkColKeys().size() == 1 ); - SIMPLE_ASSERT( obj->linkColIndices().size() == 1 ); - SIMPLE_ASSERT( obj->linkColClids().size() == 1 ); + SIMPLE_ASSERT( obj->linkColNames().size() == 3 ); + SIMPLE_ASSERT( obj->linkColKeys().size() == 3 ); + SIMPLE_ASSERT( obj->linkColIndices().size() == 3 ); + SIMPLE_ASSERT( obj->linkColClids().size() == 3 ); SIMPLE_ASSERT( obj->linkColKeys()[ 0 ] == 123 ); SIMPLE_ASSERT( obj->linkColIndices()[ 0 ] == 456 ); SIMPLE_ASSERT( obj->linkColClids()[ 0 ] == ClassID_traits< xAOD::MuonRoIContainer >::ID() ); + std::cout << "Basic link functionality OK" << std::endl; + + ElementLink< xAOD::MuonRoIContainer > getMuonRoILink = obj->objectLink<xAOD::MuonRoIContainer>("MuonRoI"); + SIMPLE_ASSERT(getMuonRoILink == ElementLink<xAOD::MuonRoIContainer>( 123, 456 )); + + ElementLinkVector<xAOD::MuonRoIContainer> getMuonRoILinks = obj->objectCollectionLinks<xAOD::MuonRoIContainer>("ManyMuonRoIs"); + ElementLinkVector<xAOD::MuonRoIContainer> elementLinks; + elementLinks.push_back( ElementLink<xAOD::MuonRoIContainer>( 789, 012 ) ); + elementLinks.push_back( ElementLink<xAOD::MuonRoIContainer>( 345, 678 ) ); + SIMPLE_ASSERT(getMuonRoILinks == elementLinks); + + std::cout << "Link recovery OK" << std::endl; + + return 0; +} + +int main() { + + // Create the container that we want to test: + xAOD::TrigCompositeAuxContainer aux; + xAOD::TrigCompositeContainer c; + c.setStore( &aux ); + + // Create a test object: + xAOD::TrigComposite* obj = new xAOD::TrigComposite(); + c.push_back( obj ); + + std::cout << "Populating initial TC object" << std::endl; + populateObject(obj); + + // Standalone with copy constructor. Should get own store. + xAOD::TrigComposite* copyConstructor = new xAOD::TrigComposite(*obj); + + // Standalone with assignment operator. Should get own store. + xAOD::TrigComposite* assignmentOperator = new xAOD::TrigComposite(); + *assignmentOperator = *obj; + + // Creating a new object in a new store and copying to it + xAOD::TrigCompositeAuxContainer aux2; + xAOD::TrigCompositeContainer c2; + c2.setStore( &aux2 ); + xAOD::TrigComposite* obj2 = new xAOD::TrigComposite(); + c2.push_back( obj2 ); + *obj2 = *obj; + + std::cout << "Testing initial TC object" << std::endl; + SIMPLE_ASSERT( testObject(obj) == 0 ); + + std::cout << "Testing copy constructor" << std::endl; + SIMPLE_ASSERT( testObject(copyConstructor) == 0 ); + + std::cout << "Testing assignment operator (standalone object)" << std::endl; + SIMPLE_ASSERT( testObject(assignmentOperator) == 0 ); + + std::cout << "Testing assignment operator (object with store)" << std::endl; + SIMPLE_ASSERT( testObject(obj2) == 0 ); + // Apparently everything went well: std::cout << "All tests successful." << std::endl; diff --git a/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigComposite_v1.h b/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigComposite_v1.h index a8260874608e..9ee700e2dc96 100644 --- a/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigComposite_v1.h +++ b/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigComposite_v1.h @@ -40,6 +40,12 @@ namespace xAOD { /// Default constructor TrigComposite_v1(); + /// Copy constructor + TrigComposite_v1( const TrigComposite_v1& parent ); + + /// Assignment operator + TrigComposite_v1& operator=( const TrigComposite_v1& rhs ); + /// @name Basic properties /// @{ @@ -158,7 +164,7 @@ namespace xAOD { /// Raw access to the persistent link CLIDs (non-const) std::vector< uint32_t >& linkColClidsNC(); - const std::string m_collectionSuffix = "__COLL"; + static const std::string s_collectionSuffix; }; // class TrigComposite_v1 diff --git a/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigComposite_v1.icc b/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigComposite_v1.icc index d679ab2da674..91ee5ef23f2b 100644 --- a/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigComposite_v1.icc +++ b/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigComposite_v1.icc @@ -160,7 +160,7 @@ namespace xAOD { // being added to a container. // Add a new object: - const std::string mangledName = collectionName + m_collectionSuffix; + const std::string mangledName = collectionName + s_collectionSuffix; linkColNamesNC().push_back( mangledName ); linkColKeysNC().push_back( link.key() ); linkColIndicesNC().push_back( link.index() ); @@ -183,7 +183,7 @@ namespace xAOD { ElementLinkVector< CONTAINER > TrigComposite_v1::objectCollectionLinks( const std::string& collectionName ) const { ElementLinkVector< CONTAINER > links; - const std::string mangledName = collectionName + m_collectionSuffix; + const std::string mangledName = collectionName + s_collectionSuffix; const std::vector< std::string >& names = linkColNames(); for( size_t i = 0; i < names.size(); ++i ) { diff --git a/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.cxx b/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.cxx index 30c64cfd8516..350fb5fd3905 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.cxx +++ b/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.cxx @@ -8,7 +8,7 @@ #include "GaudiKernel/Property.h" RoRSeqFilter::RoRSeqFilter( const std::string& name, - ISvcLocator* pSvcLocator ) : + ISvcLocator* pSvcLocator ) : ::AthAlgorithm( name, pSvcLocator ) {} @@ -28,14 +28,11 @@ StatusCode RoRSeqFilter::initialize() CHECK( m_inputKeys.size() == m_outputKeys.size() ); } - // for ( auto key: m_inputKeys ) { - // renounce( key ); - // } CHECK( m_inputKeys.initialize() ); CHECK( m_outputKeys.initialize() ); renounceArray(m_inputKeys); - // is this needed? renounceArray(m_outputKeys); + // is this needed? renounceArray(m_outputKeys); // TimM - I don't think so ATH_MSG_DEBUG("Will consume implicit ReadDH:" ); for (auto& input: m_inputKeys){ @@ -46,7 +43,6 @@ StatusCode RoRSeqFilter::initialize() ATH_MSG_DEBUG(" - "<<output.key()); } - CHECK( not m_chainsProperty.empty() ); for ( const std::string& el: m_chainsProperty ) @@ -55,7 +51,7 @@ StatusCode RoRSeqFilter::initialize() for ( const HLT::Identifier& id: m_chains ) ATH_MSG_DEBUG( "Configured to require chain " << id ); - ATH_MSG_DEBUG( "mergeInputs is "<<m_mergeInputs); + ATH_MSG_DEBUG( "mergeInputs is " << m_mergeInputs); return StatusCode::SUCCESS; } @@ -69,7 +65,7 @@ StatusCode RoRSeqFilter::execute() { auto inputHandles = m_inputKeys.makeHandles(); auto outputHandles = m_outputKeys.makeHandles(); - + bool validInputs=false; for ( auto inputHandle: inputHandles ) { if( inputHandle.isValid() ) {// this is because input is implicit @@ -81,24 +77,25 @@ StatusCode RoRSeqFilter::execute() { ATH_MSG_DEBUG ( "No valid inputs found, filter failed. Return...." ); return StatusCode::SUCCESS; } - - ATH_MSG_DEBUG( "Running on "<< inputHandles.size() <<" input keys"); size_t passCounter = 0; size_t outputIndex = 0; if ( m_mergeInputs ) { - auto output = std::make_unique< ConstDataVector< TrigCompositeUtils::DecisionContainer > > (); - output->clear( SG::VIEW_ELEMENTS ); - for ( auto inputHandle: inputHandles ) { + auto output = std::make_unique< TrigCompositeUtils::DecisionContainer > (); + auto outputAux = std::make_unique< TrigCompositeUtils::DecisionAuxContainer > (); + output->setStore( outputAux.get() ); + + for ( auto inputKey: m_inputKeys ) { + auto inputHandle = SG::makeHandle( inputKey ); if( inputHandle.isValid() ) - passCounter += copyPassing( *inputHandle, *output ); + passCounter += copyPassing( *inputHandle, inputKey.key(), *output ); } ATH_MSG_DEBUG( "Recording " << m_outputKeys[ 0 ].key() ); - CHECK( outputHandles[0].record( std::move( output ) ) ); + CHECK( outputHandles[0].record( std::move(output), std::move(outputAux) ) ); outputIndex++; } else { @@ -106,19 +103,20 @@ StatusCode RoRSeqFilter::execute() { for ( auto inputKey: m_inputKeys ) { auto inputHandle = SG::makeHandle( inputKey ); - if( not inputHandle.isValid() ) continue;//implicit + if( not inputHandle.isValid() ) continue; // implicit ATH_MSG_DEBUG( "Checking inputHandle "<< inputKey.key() <<" with " << inputHandle->size() <<" elements"); - auto output = std::make_unique< ConstDataVector< TrigCompositeUtils::DecisionContainer > > (); - output->clear( SG::VIEW_ELEMENTS ); + auto output = std::make_unique< TrigCompositeUtils::DecisionContainer > (); + auto outputAux = std::make_unique< TrigCompositeUtils::DecisionAuxContainer > (); + output->setStore( outputAux.get() ); - passCounter += copyPassing( *inputHandle, *output ); + passCounter += copyPassing( *inputHandle, inputKey.key(), *output ); if (output->size() >0){ // data handle reduction - ATH_MSG_DEBUG( "Recording output key " << m_outputKeys[ outputIndex ].key() <<" of size "<<output->size() <<" at index "<< outputIndex); - CHECK( outputHandles[outputIndex].record( std::move( output ) ) ); - outputIndex++; + ATH_MSG_DEBUG( "Recording output key " << m_outputKeys[ outputIndex ].key() <<" of size "<<output->size() <<" at index "<< outputIndex); + CHECK( outputHandles[outputIndex].record( std::move(output), std::move(outputAux) ) ); } + outputIndex++; // Keep the mapping of inputKey<->outputKey correct } } @@ -131,13 +129,15 @@ StatusCode RoRSeqFilter::execute() { } size_t RoRSeqFilter::copyPassing( const TrigCompositeUtils::DecisionContainer& input, - ConstDataVector<TrigCompositeUtils::DecisionContainer>& output ) const { + const std::string& inputKey, + TrigCompositeUtils::DecisionContainer& output ) const { size_t passCounter = 0; ATH_MSG_DEBUG( "Input size " << input.size() ); - for ( const TrigCompositeUtils::Decision* i: input ) { - + for (size_t i = 0; i < input.size(); ++i) { + const TrigCompositeUtils::Decision* inputDecision = input.at(i); + TrigCompositeUtils::DecisionIDContainer objDecisions; - TrigCompositeUtils::decisionIDs( i, objDecisions ); + TrigCompositeUtils::decisionIDs( inputDecision, objDecisions ); ATH_MSG_DEBUG("Number of positive decisions for this input: " << objDecisions.size() ); @@ -147,11 +147,14 @@ size_t RoRSeqFilter::copyPassing( const TrigCompositeUtils::DecisionContainer& i std::vector<TrigCompositeUtils::DecisionID> intersection; std::set_intersection( m_chains.begin(), m_chains.end(), - objDecisions.begin(), objDecisions.end(), - std::back_inserter( intersection ) ); - + objDecisions.begin(), objDecisions.end(), + std::back_inserter( intersection ) ); + if ( not intersection.empty() ) { - output.push_back( i ); + TrigCompositeUtils::Decision* decisionCopy = new TrigCompositeUtils::Decision(); + output.push_back( decisionCopy ); + *decisionCopy = *inputDecision; // copies auxdata from one auxstore to the other + TrigCompositeUtils::linkToPrevious(decisionCopy, inputKey, i); // Update seed passCounter ++; ATH_MSG_DEBUG("Input satisfied at least one active chain"); } diff --git a/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.h b/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.h index 0b7e6a9f8deb..ee6a6dd2f9fb 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.h +++ b/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.h @@ -4,7 +4,6 @@ #ifndef DECISIONHANDLING_RORSEQFILTER_H #define DECISIONHANDLING_RORSEQFILTER_H 1 - #include <string> #include <set> @@ -13,10 +12,34 @@ #include "DecisionHandling/TrigCompositeUtils.h" #include "DecisionHandling/HLTIdentifier.h" - /** - * @class Filtering algorithm for HLT step sequencer - * @brief Consumes multiple decision inputs and filters those that are labled with the required decision IDs + * @class Filtering algorithm for HLT Step sequencer + * @brief Consumes multiple decision inputs and filters those that are labelled with the required decision IDs + * + * A RoRSeqFilter is a generic filter over collections of Decision objects. + * It is the first thing to run in a Step, and all RoRSeqFilter within a Step must run before the Step proper can run. + * It manages the inter-Step logic and gates the execution of all algorithms needed by the Filter's set of chains + * within the following Step. + * + * Typically each input collection will correspond to a collection of reconstructed objects which have been subject to a + * hypothesis algorithm. There is hence a one-to-one mapping between each input Decision object and a physics object in another + * collection (link key: "feature"). The decision is additionally decorated with the chain-ID of all Hypothesis Tools which passed + * the object in whole/as part of their selection. + * + * Execution of the RoRSeqFilter is managed by Control Flow, it will be scheduled once all hypothesis algorithms in the + * previous step which feed it have finished or are known to not run in the event. + * It attempts to read in all implicit read handles. + * + * All successfully read handles are filtered with respect to m_chainsProperty. Only Decision objects which contain an + * affirmative decision from at least one of the Chain-IDs within m_chainsProperty will be duplicated into the output collection. + * All non-empty output collections will be written to their write handles. + * + * If at least one (non-empty) write handle is written, the filter will report TRUE to the Scheduler, unlocking the next Step + * of execution for the set of Chains which utilise this Filter in their path through the HLT Control Flow graph. Otherwise, + * it will report a filter decision of FALSE and terminate. + * + * Note: Algorithms and hypos can be placed under the control flow of more than one RoRSeqFilter, in this case, only one is + * required to return a positive filter decision to unlock the control flow for this set of algorithms and hypo. **/ class RoRSeqFilter @@ -27,22 +50,47 @@ class RoRSeqFilter virtual ~RoRSeqFilter(); - +/** + * @brief Setup input and output handles. Renounce all input handles. Get IDs for all configured chains. + **/ virtual StatusCode initialize() override; + +/** + * @brief Apply this filter in-between Steps of trigger execution. Fully implicit inputs, requires Control Flow to unlock. + * will signal a negative filter result to the Scheduler if zero chains remain active upon termination. + **/ virtual StatusCode execute() override; + +/** + * @brief Currently a noop + **/ virtual StatusCode finalize() override; private: RoRSeqFilter(); - SG::ReadHandleKeyArray<TrigCompositeUtils::DecisionContainer> m_inputKeys{ this, "Input", {}, "Inputs to the filter" }; - SG::WriteHandleKeyArray< ConstDataVector<TrigCompositeUtils::DecisionContainer> > m_outputKeys{ this, "Output", {}, "Output" }; + SG::ReadHandleKeyArray<TrigCompositeUtils::DecisionContainer> m_inputKeys{ this, "Input", {}, "Inputs to the filter" }; + SG::WriteHandleKeyArray<TrigCompositeUtils::DecisionContainer> m_outputKeys{ this, "Output", {}, "Output" }; - Gaudi::Property<std::vector<std::string> > m_chainsProperty{ this, "Chains", {}, "Chains of whihc this filter is concerned" }; + Gaudi::Property<std::vector<std::string> > m_chainsProperty{ this, "Chains", {}, "Chains of which this filter is concerned" }; Gaudi::Property<bool> m_mergeInputs{ this, "MergeInputs", false, "Produce one output" }; std::set<HLT::Identifier> m_chains; + +/** + * @brief Applies generic filter to input container, keeping only the decision objects with at least + * one affirmative decision from the previous Stage. Considering only decisions from chains utilising this filter. + * @param input Reference to input container of decision objects. + * @param inputKey Storegate key of input, needed to link newly created decision objects to their parents. + * @param output Writeable output container to store copies of decision objects which pass the filter. + * @return The number of decision objects which passed the filter. + * + * Produced a deep-copy of all Decision objects in the input container which possess a positive decision from + * at least one of the chains which this filter algorithm is configured for. This new object is linked to its + * parent and stored in the output collection. It will form the starting point for the next Step. + **/ size_t copyPassing( const TrigCompositeUtils::DecisionContainer& input, - ConstDataVector<TrigCompositeUtils::DecisionContainer>& output ) const; + const std::string& inputKey, + TrigCompositeUtils::DecisionContainer& output) const; }; diff --git a/Trigger/TrigSteer/DecisionHandling/src/TriggerSummaryAlg.cxx b/Trigger/TrigSteer/DecisionHandling/src/TriggerSummaryAlg.cxx index 1db37af272ec..2dc628244cdf 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/TriggerSummaryAlg.cxx +++ b/Trigger/TrigSteer/DecisionHandling/src/TriggerSummaryAlg.cxx @@ -42,7 +42,7 @@ StatusCode TriggerSummaryAlg::execute_r(const EventContext& context) const for ( auto input: inputHandles ) { if ( input.isValid() ) { for ( auto decisionObject: *input ) { - TrigCompositeUtils::decisionIDs( decisionObject, allPassingIDs ); + TrigCompositeUtils::decisionIDs( decisionObject, allPassingIDs ); } ATH_MSG_DEBUG( "Found "<<input->size()<<" Decisions for " << input.key() ); } else { @@ -57,9 +57,6 @@ StatusCode TriggerSummaryAlg::execute_r(const EventContext& context) const // check for an evident error, this is HLT chain not mentioned at the L1 // that is the only reason we pull the L1 here - - - auto summaryCont = std::make_unique<TrigCompositeUtils::DecisionContainer>(); auto summaryAuxCont = std::make_unique<TrigCompositeUtils::DecisionAuxContainer>(); @@ -71,7 +68,6 @@ StatusCode TriggerSummaryAlg::execute_r(const EventContext& context) const TrigCompositeUtils::addDecisionID( id, summaryObj ); } - // if ( ! m_hltResultKey.empty() ) { // auto result = std::make_unique<HLT::HLTResult>(); // CHECK( buildHLTResult( result ) ); @@ -86,6 +82,3 @@ StatusCode TriggerSummaryAlg::execute_r(const EventContext& context) const return StatusCode::SUCCESS; } - - - diff --git a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt index dfc0c2612bdb..f3f9a4a54071 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt +++ b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt @@ -135,3 +135,4 @@ atlas_add_test( NewJO atlas_install_joboptions( share/*.py ) atlas_install_python_modules( python/*.py ) +atlas_install_scripts( test/test*.sh ) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/checkESD.py b/Trigger/TrigValidation/TrigUpgradeTest/share/checkESD.py index b779924bf707..1d55a43d5069 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/checkESD.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/checkESD.py @@ -2,17 +2,19 @@ include("AthenaPoolDataModelTest/esdtoesd_base.py") svcMgr.EventSelector.InputCollections = [ "myESD.pool.root" ] from TrigValAlgs.TrigValAlgsConf import TrigEDMChecker +MessageSvc.defaultLimit = 9999999 +MessageSvc.useColors = True checker = TrigEDMChecker() checker.OutputLevel = DEBUG checker.doDumpAll = False -checker.doDumpxAODTrigElectronContainer = True +checker.doDumpxAODTrigElectronContainer = False checker.doDumpxAODTrackParticle = True +checker.doDumpTrigCompsiteNavigation = True +checker.doDumpStoreGate = True # this list was obtained by: checkxAOD.py myESD.pool.root | grep Composite | tr -s " "| cut -d" " -f10 | awk '{print "\""$1"\""}' | tr "\n" "," > f -checker.dumpTrigCompositeContainers = ["MURoIDecisions","MuonL2Decisions","ElectronL2Decisions" - ,"HLTSummary","EMRoIDecisions","METRoIDecisions","HLTChainsResult", - "EgammaCaloDecisions","MURoIDecisions","MuonL2Decisions", - "ElectronL2Decisions","HLTSummary","METRoIDecisions", - "EgammaCaloDecisions","EMRoIDecisions","HLTChainsResult"] +# Note that now there is also a flag to look at all of them at runtime. We may want to move to this in the future. +checker.dumpTrigCompositeContainers = [ "FilteredEMRoIDecisions", "L2CaloLinks", "L2ElectronLinks", "EgammaCaloDecisions", "FilteredEgammaCaloDecisions", "filterCaloRoIsAlg", "ElectronL2Decisions", "MuonL2Decisions", "METRoIDecisions", "MURoIDecisions", "HLTChainsResult", +"JRoIDecisions", "MonitoringSummaryStep1", "RerunEMRoIDecisions", "RerunMURoIDecisions", "TAURoIDecisions", "EMRoIDecisions" ] from AthenaCommon.AppMgr import topSequence topSequence += checker diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py index 4e01219b2480..fce32b0b9ad4 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py @@ -218,8 +218,8 @@ summary.InputDecision = "HLTChains" summary.FinalDecisions = [ "ElectronL2Decisions", "MuonL2Decisions" ] from TrigOutputHandling.TrigOutputHandlingConf import HLTEDMCreator edmCreator = HLTEDMCreator() -edmCreator.TrigCompositeContainer = [ "EgammaCaloDecisions", "ElectronL2Decisions", "MuonL2Decisions", "EMRoIDecisions", "METRoIDecisions", "MURoIDecisions", "HLTChainsResult" ] - +edmCreator.TrigCompositeContainer = [ "L2ElectronLinks", "filterCaloRoIsAlg", "EgammaCaloDecisions","ElectronL2Decisions", "MuonL2Decisions", "EMRoIDecisions", "METRoIDecisions", "MURoIDecisions", "HLTChainsResult", +"JRoIDecisions", "MonitoringSummaryStep1", "RerunEMRoIDecisions", "RerunMURoIDecisions", "TAURoIDecisions", "L2CaloLinks", "FilteredEMRoIDecisions", "FilteredEgammaCaloDecisions" ] egammaViewsMerger = HLTEDMCreator("egammaViewsMerger") @@ -275,14 +275,20 @@ StreamESD.ItemList += [ "xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronCo "xAOD::TrackParticleAuxContainer#HLT_xAOD_TrackParticleContainer_L2ElectronTracksAux.", "xAOD::TrigEMClusterAuxContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux."] +StreamESD.ItemList += [ "EventInfo#ByteStreamEventInfo" ] + +StreamESD.ItemList += [ "TrigRoiDescriptorCollection#EMRoIs" ] +StreamESD.ItemList += [ "TrigRoiDescriptorCollection#JRoIs" ] +StreamESD.ItemList += [ "TrigRoiDescriptorCollection#METRoI" ] +StreamESD.ItemList += [ "TrigRoiDescriptorCollection#MURoIs" ] +StreamESD.ItemList += [ "TrigRoiDescriptorCollection#TAURoIs" ] + print "ESD file content " print StreamESD.ItemList - hltTop = seqOR( "hltTop", [ steps, mon, summary, StreamESD ] ) topSequence += hltTop - from AthenaCommon.AlgSequence import dumpSequence dumpSequence(topSequence) diff --git a/Trigger/TrigValidation/TrigValAlgs/CMakeLists.txt b/Trigger/TrigValidation/TrigValAlgs/CMakeLists.txt index c9c822560e83..db647d60d287 100644 --- a/Trigger/TrigValidation/TrigValAlgs/CMakeLists.txt +++ b/Trigger/TrigValidation/TrigValAlgs/CMakeLists.txt @@ -20,10 +20,12 @@ atlas_depends_on_subdirs( PUBLIC Trigger/TrigEvent/TrigNavigation Trigger/TrigEvent/TrigParticle Trigger/TrigEvent/TrigSteeringEvent + Trigger/TrigEvent/TrigRoiConversion PRIVATE Control/AthenaKernel Control/CxxUtils Event/EventInfo + Event/xAOD/xAODEventInfo Event/xAOD/xAODBTagging Event/xAOD/xAODEgamma Event/xAOD/xAODJet @@ -46,7 +48,8 @@ atlas_depends_on_subdirs( PUBLIC Trigger/TrigConfiguration/TrigConfigSvc Trigger/TrigEvent/TrigDecisionEvent Trigger/TrigEvent/TrigMissingEtEvent - Trigger/TrigTruthEvent/TrigInDetTruthEvent ) + Trigger/TrigTruthEvent/TrigInDetTruthEvent + Trigger/TrigT1/TrigT1Interfaces ) # External dependencies: find_package( CLHEP ) @@ -57,7 +60,7 @@ atlas_add_component( TrigValAlgs src/*.cxx src/components/*.cxx INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps GaudiKernel TrigDecisionToolLib TrigCaloEvent TrigInDetEvent TrigMuonEvent TrigNavToolsLib TrigNavigationLib TrigParticle TrigSteeringEvent AthenaKernel CxxUtils EventInfo xAODBTagging xAODEgamma xAODJet xAODMuon xAODTau xAODTracking xAODTrigBphys xAODTrigCalo xAODTrigEgamma xAODTrigMinBias xAODTrigMissingET xAODTrigMuon xAODCore xAODTrigger AnalysisTriggerEvent MuonCombinedToolInterfaces Particle tauEvent VxSecVertex TrigConfigSvcLib TrigConfHLTData TrigDecisionEvent TrigMissingEtEvent TrigInDetTruthEvent ) + LINK_LIBRARIES ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps GaudiKernel TrigDecisionToolLib TrigCaloEvent TrigInDetEvent TrigMuonEvent TrigNavToolsLib TrigNavigationLib TrigParticle TrigSteeringEvent AthenaKernel CxxUtils EventInfo xAODEventInfo xAODBTagging xAODEgamma xAODJet xAODMuon xAODTau xAODTracking xAODTrigBphys xAODTrigCalo xAODTrigEgamma xAODTrigMinBias xAODTrigMissingET xAODTrigMuon xAODCore xAODTrigger AnalysisTriggerEvent MuonCombinedToolInterfaces Particle tauEvent VxSecVertex TrigConfigSvcLib TrigConfHLTData TrigRoiConversionLib TrigDecisionEvent TrigMissingEtEvent TrigInDetTruthEvent TrigT1Interfaces ) # Install files from the package: atlas_install_headers( TrigValAlgs ) diff --git a/Trigger/TrigValidation/TrigValAlgs/TrigValAlgs/TrigEDMChecker.h b/Trigger/TrigValidation/TrigValAlgs/TrigValAlgs/TrigEDMChecker.h index cfe5071d7fe9..d6197e72c42b 100755 --- a/Trigger/TrigValidation/TrigValAlgs/TrigValAlgs/TrigEDMChecker.h +++ b/Trigger/TrigValidation/TrigValAlgs/TrigValAlgs/TrigEDMChecker.h @@ -11,6 +11,10 @@ #include "AthenaBaseComps/AthAlgorithm.h" +#include "xAODTrigger/TrigCompositeContainer.h" + +#include "AthenaKernel/IClassIDSvc.h" + #include <string> // forward declarations of muon track classes used in TrigMuonEFInfo @@ -156,6 +160,9 @@ class TrigEDMChecker : public AthAlgorithm { bool m_doDumpxAODVertex; StatusCode dumpxAODVertex(); + bool m_doDumpStoreGate; + StatusCode dumpStoreGate(); + bool m_doDumpxAODTrigMinBias; StatusCode dumpxAODTrigMinBias(); void dumpTrigSpacePointCounts(); @@ -163,11 +170,37 @@ class TrigEDMChecker : public AthAlgorithm { void dumpTrigVertexCounts(); void dumpTrigTrackCounts(); - + bool m_doDumpAllTrigComposite; std::vector<std::string> m_dumpTrigCompositeContainers; + + /** + * @brief Dump information on TrigComposite collections + * + * Only dumpTrigCompositeContainers are dumped unless doDumpAllTrigComposite is set + */ StatusCode dumpTrigComposite(); + + /** + * @brief Dump details on element links within TrigComposites + * + * With specific checking of the Run-3 relationships + */ + StatusCode checkTrigCompositeElementLink(const xAOD::TrigComposite* tc, size_t element); + + bool m_doDumpTrigCompsiteNavigation; + + /** + * @brief Construct graph of HLT navigation in Run-3 + * @param returnValue String to populate with dot graph. + * + * Navigates all TrigComposite objects in store gate and forms a relational graph in the dot format + */ + StatusCode TrigCompositeNavigationToDot(std::string& returnValue); + ToolHandle<Rec::IMuonPrintingTool> m_muonPrinter; + ServiceHandle< ::IClassIDSvc > m_clidSvc; + }; #endif // TRIG_EDM_CHECKER_H diff --git a/Trigger/TrigValidation/TrigValAlgs/src/TrigEDMChecker.cxx b/Trigger/TrigValidation/TrigValAlgs/src/TrigEDMChecker.cxx index 68f2aef5ba91..5cc8006f3f4b 100644 --- a/Trigger/TrigValidation/TrigValAlgs/src/TrigEDMChecker.cxx +++ b/Trigger/TrigValidation/TrigValAlgs/src/TrigEDMChecker.cxx @@ -13,7 +13,6 @@ #include "xAODTrigger/TrigPassBitsContainer.h" #include "xAODTrigger/TrigPassBits.h" -#include "xAODTrigger/TrigCompositeContainer.h" #include "AthContainers/debug.h" #include "xAODJet/JetContainer.h" #include "xAODJet/JetConstituentVector.h" @@ -52,6 +51,8 @@ #include "tauEvent/TauJetContainer.h" #include "tauEvent/TauJet.h" +#include "xAODEventInfo/EventInfo.h" + #include "xAODMuon/MuonContainer.h" #include "MuonCombinedToolInterfaces/IMuonPrintingTool.h" @@ -88,8 +89,15 @@ #include "xAODTrigMinBias/TrigTrackCountsContainer.h" #include "xAODTrigMinBias/TrigTrackCounts.h" +#include "TrigSteeringEvent/TrigRoiDescriptor.h" +#include "TrigRoiConversion/RoiSerialise.h" +#include "xAODTrigger/RoiDescriptorStore.h" + +#include "TrigT1Interfaces/RecEmTauRoI.h" + #include <iostream> +#include <fstream> static int trackWarningNum; static int vertexWarningNum; @@ -98,51 +106,56 @@ static int maxRepWarnings; TrigEDMChecker::TrigEDMChecker(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator), - m_muonPrinter("Rec::MuonPrintingTool/MuonPrintingTool") + m_muonPrinter("Rec::MuonPrintingTool/MuonPrintingTool"), + m_clidSvc( "ClassIDSvc", name ) { - /** switches to control the analysis through job options */ - - declareProperty("doDumpAll", m_doDumpAll = true); - declareProperty("doDumpTrigPassBits", m_doDumpTrigPassBits = false); - declareProperty("doDumpLVL1_ROI", m_doDumpLVL1_ROI = false); - declareProperty("doDumpTrigMissingET", m_doDumpTrigMissingET = false); - declareProperty("doDumpxAODTrigMissingET", m_doDumpxAODTrigMissingET = false); - declareProperty("doDumpMuonFeature", m_doDumpMuonFeature = false); - declareProperty("doDumpCombinedMuonFeature", m_doDumpCombinedMuonFeature = false); - declareProperty("doDumpTileMuFeature", m_doDumpTileMuFeature = false); - declareProperty("doDumpTileTrackMuFeature", m_doDumpTileTrackMuFeature = false); - declareProperty("doDumpTrigPhotonContainer", m_doDumpTrigPhotonContainer = false); - declareProperty("doDumpTrigL2BphysContainer", m_doDumpTrigL2BphysContainer = false); - declareProperty("doDumpTrigEFBphysContainer", m_doDumpTrigEFBphysContainer = false); - declareProperty("doDumpTrigEFBjetContainer", m_doDumpTrigEFBjetContainer = false); - declareProperty("doDumpTrigL2BjetContainer", m_doDumpTrigL2BjetContainer = false); - declareProperty("doDumpxAODJetContainer", m_doDumpxAODJetContainer = false); - declareProperty("doDumpTrigMuonEFContainer", m_doDumpTrigMuonEFContainer = false); - declareProperty("doDumpTrigMuonEFInfoContainer", m_doDumpTrigMuonEFInfoContainer = false); - declareProperty("doDumpTrigMuonEFIsolationContainer", m_doDumpTrigMuonEFIsolationContainer = false); - declareProperty("doDumpxAODMuonContainer", m_doDumpxAODMuonContainer = false); - declareProperty("doDumpTrigElectronContainer", m_doDumpTrigElectronContainer = false); - declareProperty("doDumpxAODTrigElectronContainer", m_doDumpxAODTrigElectronContainer = false); - declareProperty("doDumpxAODTrigPhotonContainer", m_doDumpxAODTrigPhotonContainer = false); - declareProperty("doDumpxAODElectronContainer", m_doDumpxAODElectronContainer = false); - declareProperty("doDumpxAODPhotonContainer", m_doDumpxAODPhotonContainer = false); - declareProperty("doDumpHLTResult", m_doDumpHLTResult = false); - declareProperty("doDumpTrigTauContainer", m_doDumpTrigTauContainer = false); - declareProperty("doDumpTrigTauTracksInfo", m_doDumpTrigTauTracksInfo = false); - declareProperty("doDumpTrigInDetTrackCollection", m_doDumpTrigInDetTrackCollection = false); - declareProperty("doDumpTrigVertexCollection", m_doDumpTrigVertexCollection = false); - declareProperty("doDumpTrigEMCluster", m_doDumpTrigEMCluster = false); - declareProperty("doDumpTrigEMClusterContainer", m_doDumpTrigEMClusterContainer = false); - declareProperty("doDumpxAODTrigEMCluster", m_doDumpxAODTrigEMCluster = false); - declareProperty("doDumpxAODTrigEMClusterContainer", m_doDumpxAODTrigEMClusterContainer = false); - declareProperty("doDumpTrigTauClusterContainer", m_doDumpTrigTauClusterContainer = false); - declareProperty("doDumpTrackParticleContainer", m_doDumpTrackParticleContainer = false); - declareProperty("doDumpTauJetContainer", m_doDumpTauJetContainer = false); - declareProperty("doDumpxAODTrackParticle", m_doDumpxAODTrackParticle = false); - declareProperty("doDumpxAODVertex", m_doDumpxAODVertex = false); - declareProperty("doDumpxAODTauJetContainer", m_doDumpxAODTauJetContainer = false); - declareProperty("doDumpxAODTrigMinBias", m_doDumpxAODTrigMinBias = false); - declareProperty("dumpTrigCompositeContainers", m_dumpTrigCompositeContainers, "List of TC to dump" ); + /** switches to control the analysis through job options */ + + declareProperty("doDumpAll", m_doDumpAll = true); + declareProperty("doDumpTrigPassBits", m_doDumpTrigPassBits = false); + declareProperty("doDumpLVL1_ROI", m_doDumpLVL1_ROI = false); + declareProperty("doDumpTrigMissingET", m_doDumpTrigMissingET = false); + declareProperty("doDumpxAODTrigMissingET", m_doDumpxAODTrigMissingET = false); + declareProperty("doDumpMuonFeature", m_doDumpMuonFeature = false); + declareProperty("doDumpCombinedMuonFeature", m_doDumpCombinedMuonFeature = false); + declareProperty("doDumpTileMuFeature", m_doDumpTileMuFeature = false); + declareProperty("doDumpTileTrackMuFeature", m_doDumpTileTrackMuFeature = false); + declareProperty("doDumpTrigPhotonContainer", m_doDumpTrigPhotonContainer = false); + declareProperty("doDumpTrigL2BphysContainer", m_doDumpTrigL2BphysContainer = false); + declareProperty("doDumpTrigEFBphysContainer", m_doDumpTrigEFBphysContainer = false); + declareProperty("doDumpTrigEFBjetContainer", m_doDumpTrigEFBjetContainer = false); + declareProperty("doDumpTrigL2BjetContainer", m_doDumpTrigL2BjetContainer = false); + declareProperty("doDumpxAODJetContainer", m_doDumpxAODJetContainer = false); + declareProperty("doDumpTrigMuonEFContainer", m_doDumpTrigMuonEFContainer = false); + declareProperty("doDumpTrigMuonEFInfoContainer", m_doDumpTrigMuonEFInfoContainer = false); + declareProperty("doDumpTrigMuonEFIsolationContainer", m_doDumpTrigMuonEFIsolationContainer = false); + declareProperty("doDumpxAODMuonContainer", m_doDumpxAODMuonContainer = false); + declareProperty("doDumpTrigElectronContainer", m_doDumpTrigElectronContainer = false); + declareProperty("doDumpxAODTrigElectronContainer", m_doDumpxAODTrigElectronContainer = false); + declareProperty("doDumpxAODTrigPhotonContainer", m_doDumpxAODTrigPhotonContainer = false); + declareProperty("doDumpxAODElectronContainer", m_doDumpxAODElectronContainer = false); + declareProperty("doDumpxAODPhotonContainer", m_doDumpxAODPhotonContainer = false); + declareProperty("doDumpHLTResult", m_doDumpHLTResult = false); + declareProperty("doDumpTrigTauContainer", m_doDumpTrigTauContainer = false); + declareProperty("doDumpTrigTauTracksInfo", m_doDumpTrigTauTracksInfo = false); + declareProperty("doDumpTrigInDetTrackCollection", m_doDumpTrigInDetTrackCollection = false); + declareProperty("doDumpTrigVertexCollection", m_doDumpTrigVertexCollection = false); + declareProperty("doDumpTrigEMCluster", m_doDumpTrigEMCluster = false); + declareProperty("doDumpTrigEMClusterContainer", m_doDumpTrigEMClusterContainer = false); + declareProperty("doDumpxAODTrigEMCluster", m_doDumpxAODTrigEMCluster = false); + declareProperty("doDumpxAODTrigEMClusterContainer", m_doDumpxAODTrigEMClusterContainer = false); + declareProperty("doDumpTrigTauClusterContainer", m_doDumpTrigTauClusterContainer = false); + declareProperty("doDumpTrackParticleContainer", m_doDumpTrackParticleContainer = false); + declareProperty("doDumpTauJetContainer", m_doDumpTauJetContainer = false); + declareProperty("doDumpxAODTrackParticle", m_doDumpxAODTrackParticle = false); + declareProperty("doDumpxAODVertex", m_doDumpxAODVertex = false); + declareProperty("doDumpxAODTauJetContainer", m_doDumpxAODTauJetContainer = false); + declareProperty("doDumpxAODTrigMinBias", m_doDumpxAODTrigMinBias = false); + declareProperty("doDumpStoreGate", m_doDumpStoreGate = false ); + declareProperty("doDumpAllTrigComposite", m_doDumpAllTrigComposite = false ); + declareProperty("dumpTrigCompositeContainers", m_dumpTrigCompositeContainers, "List of TC to dump" ); + declareProperty("doDumpTrigCompsiteNavigation", m_doDumpTrigCompsiteNavigation = false ); + declareProperty( "ClassIDSvc", m_clidSvc, "Service providing CLID info" ); } @@ -151,46 +164,49 @@ TrigEDMChecker::~TrigEDMChecker() {} StatusCode TrigEDMChecker::initialize() { - ATH_MSG_DEBUG("Initializing TrigEDMChecker"); - - ATH_MSG_INFO("REGTEST Initializing..."); - ATH_MSG_INFO("REGTEST m_doDumpAll = " << m_doDumpAll ); - ATH_MSG_INFO("REGTEST m_doDumpLVL1_ROI = " << m_doDumpLVL1_ROI); - ATH_MSG_INFO("REGTEST m_doDumpTrigMissingET = " << m_doDumpTrigMissingET ); - ATH_MSG_INFO("REGTEST m_doDumpxAODTrigMissingET = " << m_doDumpxAODTrigMissingET ); - ATH_MSG_INFO("REGTEST m_doDumpMuonFeature = " << m_doDumpMuonFeature ); - ATH_MSG_INFO("REGTEST m_doDumpCombinedMuonFeature = " << m_doDumpCombinedMuonFeature ); - ATH_MSG_INFO("REGTEST m_doDumpTileMuFeature = " << m_doDumpTileMuFeature); - ATH_MSG_INFO("REGTEST m_doDumpTileTrackMuFeature = " << m_doDumpTileTrackMuFeature); - ATH_MSG_INFO("REGTEST m_doDumpTrigPhotonContainer = " << m_doDumpTrigPhotonContainer ); - ATH_MSG_INFO("REGTEST m_doDumpTrigL2BphysContainer = " << m_doDumpTrigL2BphysContainer ); - ATH_MSG_INFO("REGTEST m_doDumpTrigEFBphysContainer = " << m_doDumpTrigEFBphysContainer ); - ATH_MSG_INFO("REGTEST m_doDumpTrigEFBjetContainer = " << m_doDumpTrigEFBjetContainer ); - ATH_MSG_INFO("REGTEST m_doDumpTrigL2BjetContainer = " << m_doDumpTrigL2BjetContainer ); - ATH_MSG_INFO("REGTEST m_doDumpxAODJetContainer = " << m_doDumpxAODJetContainer ); - ATH_MSG_INFO("REGTEST m_doDumpTrigMuonEFContainer = " << m_doDumpTrigMuonEFContainer ); - ATH_MSG_INFO("REGTEST m_doDumpTrigMuonEFInfoContainer = " << m_doDumpTrigMuonEFInfoContainer ); - ATH_MSG_INFO("REGTEST m_doDumpxAODMuonContainer = " << m_doDumpxAODMuonContainer ); - ATH_MSG_INFO("REGTEST m_doDumpTrigElectronContainer = " << m_doDumpTrigElectronContainer ); - ATH_MSG_INFO("REGTEST m_doDumpxAODTrigElectronContainer = " << m_doDumpxAODTrigElectronContainer ); - ATH_MSG_INFO("REGTEST m_doDumpxAODTrigPhotonContainer = " << m_doDumpxAODTrigPhotonContainer ); - ATH_MSG_INFO("REGTEST m_doDumpxAODElectronContainer = " << m_doDumpxAODElectronContainer ); - ATH_MSG_INFO("REGTEST m_doDumpxAODPhotonContainer = " << m_doDumpxAODPhotonContainer ); - ATH_MSG_INFO("REGTEST m_doDumpHLTResult = " << m_doDumpHLTResult ); - ATH_MSG_INFO("REGTEST m_doDumpTrigTauContainer = " << m_doDumpTrigTauContainer ); - ATH_MSG_INFO("REGTEST m_doDumpTrigTauTracksInfo = " << m_doDumpTrigTauTracksInfo ); - ATH_MSG_INFO("REGTEST m_doDumpTrigInDetTrackCollection= " << m_doDumpTrigInDetTrackCollection ); - ATH_MSG_INFO("REGTEST m_doDumpTrigVertexCollection = " << m_doDumpTrigVertexCollection ); - ATH_MSG_INFO("REGTEST m_doDumpTrigEMCluster = " << m_doDumpTrigEMCluster ); - ATH_MSG_INFO("REGTEST m_doDumpTrigEMClusterContainer = " << m_doDumpTrigEMClusterContainer ); - ATH_MSG_INFO("REGTEST m_doDumpTrigTauClusterContainer = " << m_doDumpTrigTauClusterContainer ); - ATH_MSG_INFO("REGTEST m_doDumpTrackParticleContainer = " << m_doDumpTrackParticleContainer ); - ATH_MSG_INFO("REGTEST m_doDumpTauJetContainer = " << m_doDumpTauJetContainer ); - ATH_MSG_INFO("REGTEST m_doDumpxAODTrackParticle = " << m_doDumpxAODTrackParticle ); - ATH_MSG_INFO("REGTEST m_doDumpxAODVertex = " << m_doDumpxAODVertex ); - ATH_MSG_INFO("REGTEST m_doDumpxAODTauJetContainer = " << m_doDumpxAODTauJetContainer ); - ATH_MSG_INFO("REGTEST m_doDumpxAODTrigMinBias = " << m_doDumpxAODTrigMinBias ); - ATH_MSG_INFO("REGTEST dumpTrigCompositeContainers = " << m_dumpTrigCompositeContainers ); + ATH_MSG_DEBUG("Initializing TrigEDMChecker"); + + ATH_MSG_INFO("REGTEST Initializing..."); + ATH_MSG_INFO("REGTEST m_doDumpAll = " << m_doDumpAll ); + ATH_MSG_INFO("REGTEST m_doDumpLVL1_ROI = " << m_doDumpLVL1_ROI); + ATH_MSG_INFO("REGTEST m_doDumpTrigMissingET = " << m_doDumpTrigMissingET ); + ATH_MSG_INFO("REGTEST m_doDumpxAODTrigMissingET = " << m_doDumpxAODTrigMissingET ); + ATH_MSG_INFO("REGTEST m_doDumpMuonFeature = " << m_doDumpMuonFeature ); + ATH_MSG_INFO("REGTEST m_doDumpCombinedMuonFeature = " << m_doDumpCombinedMuonFeature ); + ATH_MSG_INFO("REGTEST m_doDumpTileMuFeature = " << m_doDumpTileMuFeature); + ATH_MSG_INFO("REGTEST m_doDumpTileTrackMuFeature = " << m_doDumpTileTrackMuFeature); + ATH_MSG_INFO("REGTEST m_doDumpTrigPhotonContainer = " << m_doDumpTrigPhotonContainer ); + ATH_MSG_INFO("REGTEST m_doDumpTrigL2BphysContainer = " << m_doDumpTrigL2BphysContainer ); + ATH_MSG_INFO("REGTEST m_doDumpTrigEFBphysContainer = " << m_doDumpTrigEFBphysContainer ); + ATH_MSG_INFO("REGTEST m_doDumpTrigEFBjetContainer = " << m_doDumpTrigEFBjetContainer ); + ATH_MSG_INFO("REGTEST m_doDumpTrigL2BjetContainer = " << m_doDumpTrigL2BjetContainer ); + ATH_MSG_INFO("REGTEST m_doDumpxAODJetContainer = " << m_doDumpxAODJetContainer ); + ATH_MSG_INFO("REGTEST m_doDumpTrigMuonEFContainer = " << m_doDumpTrigMuonEFContainer ); + ATH_MSG_INFO("REGTEST m_doDumpTrigMuonEFInfoContainer = " << m_doDumpTrigMuonEFInfoContainer ); + ATH_MSG_INFO("REGTEST m_doDumpxAODMuonContainer = " << m_doDumpxAODMuonContainer ); + ATH_MSG_INFO("REGTEST m_doDumpTrigElectronContainer = " << m_doDumpTrigElectronContainer ); + ATH_MSG_INFO("REGTEST m_doDumpxAODTrigElectronContainer= " << m_doDumpxAODTrigElectronContainer ); + ATH_MSG_INFO("REGTEST m_doDumpxAODTrigPhotonContainer = " << m_doDumpxAODTrigPhotonContainer ); + ATH_MSG_INFO("REGTEST m_doDumpxAODElectronContainer = " << m_doDumpxAODElectronContainer ); + ATH_MSG_INFO("REGTEST m_doDumpxAODPhotonContainer = " << m_doDumpxAODPhotonContainer ); + ATH_MSG_INFO("REGTEST m_doDumpHLTResult = " << m_doDumpHLTResult ); + ATH_MSG_INFO("REGTEST m_doDumpTrigTauContainer = " << m_doDumpTrigTauContainer ); + ATH_MSG_INFO("REGTEST m_doDumpTrigTauTracksInfo = " << m_doDumpTrigTauTracksInfo ); + ATH_MSG_INFO("REGTEST m_doDumpTrigInDetTrackCollection = " << m_doDumpTrigInDetTrackCollection ); + ATH_MSG_INFO("REGTEST m_doDumpTrigVertexCollection = " << m_doDumpTrigVertexCollection ); + ATH_MSG_INFO("REGTEST m_doDumpTrigEMCluster = " << m_doDumpTrigEMCluster ); + ATH_MSG_INFO("REGTEST m_doDumpTrigEMClusterContainer = " << m_doDumpTrigEMClusterContainer ); + ATH_MSG_INFO("REGTEST m_doDumpTrigTauClusterContainer = " << m_doDumpTrigTauClusterContainer ); + ATH_MSG_INFO("REGTEST m_doDumpTrackParticleContainer = " << m_doDumpTrackParticleContainer ); + ATH_MSG_INFO("REGTEST m_doDumpTauJetContainer = " << m_doDumpTauJetContainer ); + ATH_MSG_INFO("REGTEST m_doDumpxAODTrackParticle = " << m_doDumpxAODTrackParticle ); + ATH_MSG_INFO("REGTEST m_doDumpxAODVertex = " << m_doDumpxAODVertex ); + ATH_MSG_INFO("REGTEST m_doDumpxAODTauJetContainer = " << m_doDumpxAODTauJetContainer ); + ATH_MSG_INFO("REGTEST m_doDumpxAODTrigMinBias = " << m_doDumpxAODTrigMinBias ); + ATH_MSG_INFO("REGTEST m_doDumpStoreGate = " << m_doDumpStoreGate ); + ATH_MSG_INFO("REGTEST m_doDumpAllTrigComposite = " << m_doDumpAllTrigComposite ); + ATH_MSG_INFO("REGTEST m_dumpTrigCompositeContainers = " << m_dumpTrigCompositeContainers ); + ATH_MSG_INFO("REGTEST m_doDumpTrigCompsiteNavigation = " << m_doDumpTrigCompsiteNavigation ); // puts this here for the moment maxRepWarnings = 5; @@ -207,6 +223,10 @@ StatusCode TrigEDMChecker::initialize() { } } + if (m_doDumpTrigCompsiteNavigation) { + ATH_CHECK( m_clidSvc.retrieve() ); + } + return StatusCode::SUCCESS; } @@ -494,6 +514,24 @@ StatusCode TrigEDMChecker::execute() { } } + if (m_doDumpAll || m_doDumpStoreGate) { + ATH_MSG_DEBUG(evtStore()->dump()); + } + + if (m_doDumpAll || m_doDumpTrigCompsiteNavigation) { + std::string trigCompositeSteering; + ATH_CHECK(TrigCompositeNavigationToDot(trigCompositeSteering)); + ATH_MSG_DEBUG(trigCompositeSteering); + const xAOD::EventInfo* evtInfo = nullptr; + if (evtStore()->contains<xAOD::EventInfo>("EventInfo")) { + StatusCode sc = evtStore()->retrieve(evtInfo); + } + static int eventStatic = 0; // Might not always have EventInfo (early testing of Run-3 software) + const std::string evtNumber = (evtInfo == nullptr ? std::to_string(eventStatic++) : std::to_string(evtInfo->eventNumber())); + std::ofstream ofile(std::string("NavigationGraph_" + evtNumber + ".dot").c_str()); + ofile << trigCompositeSteering; + } + ATH_CHECK( dumpTrigComposite() ); return StatusCode::SUCCESS; @@ -3939,14 +3977,21 @@ StatusCode TrigEDMChecker::dumpxAODVertex() { } StatusCode TrigEDMChecker::dumpTrigComposite() { - ATH_MSG_INFO( "REGTEST ==========END of xAOD::TrigCompositeContainer DUMP===========" ); + ATH_MSG_INFO( "REGTEST ==========START of xAOD::TrigCompositeContainer DUMP===========" ); + + if (m_doDumpAllTrigComposite) { + m_dumpTrigCompositeContainers.clear(); + const CLID TrigCompositeCLID = static_cast<CLID>( ClassID_traits< xAOD::TrigCompositeContainer >::ID() ); + evtStore()->keys(TrigCompositeCLID, m_dumpTrigCompositeContainers); + } + for ( const std::string & key: m_dumpTrigCompositeContainers ) { // get the collection if ( not evtStore()->contains<xAOD::TrigCompositeContainer>(key) ) { - ATH_MSG_INFO("Absent TrigCompositeContainer: " << key ); + ATH_MSG_WARNING("Absent TrigCompositeContainer: " << key ); continue; } - ATH_MSG_DEBUG( "Dumping container of : " << key ); + ATH_MSG_DEBUG( " #################### Dumping container of : " << key ); const xAOD::TrigCompositeContainer* cont= nullptr; ATH_CHECK( evtStore()->retrieve( cont, key ) ); @@ -3962,8 +4007,118 @@ StatusCode TrigEDMChecker::dumpTrigComposite() { ATH_MSG_DEBUG( "Link col keys : " << tc->linkColKeys() ); ATH_MSG_DEBUG( "Link col CLIDs : " << tc->linkColClids() ); ATH_MSG_DEBUG( "Link col indices : " << tc->linkColIndices() ); + + // Get the objects we know of + for (size_t i = 0; i < tc->linkColNames().size(); ++i) ATH_CHECK(checkTrigCompositeElementLink(tc, i)); + } } ATH_MSG_INFO( "REGTEST ==========END of xAOD::TrigCompositeContainer DUMP===========" ); return StatusCode::SUCCESS; } + + + +StatusCode TrigEDMChecker::checkTrigCompositeElementLink(const xAOD::TrigComposite* tc, size_t element) { + + const std::string name = tc->linkColNames().at(element); + const CLID clid = static_cast<CLID>(tc->linkColClids().at(element)); + + if (clid == ClassID_traits< TrigRoiDescriptorCollection >::ID()) { + + const ElementLink<TrigRoiDescriptorCollection> elementLink = tc->objectLink<TrigRoiDescriptorCollection>(name); + if (!elementLink.isValid()) ATH_MSG_WARNING("Invalid element link from '" << tc->name() << "' to '" << name << "'"); + else ATH_MSG_DEBUG("Got TrigRoiDescriptor:" << *elementLink); + + } else if (clid == ClassID_traits< DataVector< LVL1::RecEmTauRoI > >::ID()) { // There could be a few ROI types.... + // CLASS_DEF( DataVector< LVL1::RecEmTauRoI >, 6256, 1 ) + + const ElementLink<DataVector< LVL1::RecEmTauRoI >> elementLink = tc->objectLink<DataVector< LVL1::RecEmTauRoI >>(name); + if (!elementLink.isValid()) ATH_MSG_WARNING("Invalid element link from '" << tc->name() << "' to '" << name << "'"); + else ATH_MSG_DEBUG("Got LVL1::RecEmTauRoI:" << *elementLink); + + } else if (clid == ClassID_traits< xAOD::TrigCompositeContainer >::ID()) { + + const ElementLink<xAOD::TrigCompositeContainer> elementLink = tc->objectLink<xAOD::TrigCompositeContainer>(name); + if (!elementLink.isValid()) ATH_MSG_WARNING("Invalid element link from '" << tc->name() << "' to '" << name << "'"); + else ATH_MSG_DEBUG("Got TrigComposite:" << (*elementLink)->name()); + + } else { + ATH_MSG_DEBUG("Ignoring link to '" << name << "' with CLID " << clid); + } + + return StatusCode::SUCCESS; + +} + + +StatusCode TrigEDMChecker::TrigCompositeNavigationToDot(std::string& returnValue) { + std::vector<std::string> keys; + // This constexpr is evaluated at compile time + const CLID TrigCompositeCLID = static_cast<CLID>( ClassID_traits< xAOD::TrigCompositeContainer >::ID() ); + evtStore()->keys(TrigCompositeCLID, keys); + std::string typeNameTC; + ATH_CHECK(m_clidSvc->getTypeNameOfID(TrigCompositeCLID, typeNameTC)); + ATH_MSG_DEBUG("Got " << keys.size() << " keys for " << typeNameTC); + + // First retrieve them all (this should not be needed in future) + const xAOD::TrigCompositeContainer* container = nullptr; + for (const std::string key : keys) ATH_CHECK( evtStore()->retrieve( container, key ) ); + + std::stringstream ss; + ss << "digraph {" << std::endl; + ss << " node [shape=rectangle]" << std::endl; + ss << " rankdir = BT" << std::endl; + + // Now process them + for (const std::string key : keys) { + ATH_CHECK( evtStore()->retrieve( container, key ) ); + size_t index = 0; + ss << " subgraph " << key << " {" << std::endl; + ss << " label=\"" << key << "\"" << std::endl; + // ss << " rank=same" << std::endl; // dot cannot handle this is seems + for (const xAOD::TrigComposite* tc : *container ) { + // Output my name + ss << " \"" << tc << "\" [label=\"" << typeNameTC << "\\n" << key << ":" << std::to_string(index); + if (tc->name() != "") ss << "\\n" << tc->name(); + ss << "\"]" << std::endl; + // Output all the things I link to + for (size_t i = 0; i < tc->linkColNames().size(); ++i) { + const std::string link = tc->linkColNames().at(i); + if (link == "seed") { + const xAOD::TrigComposite* seed = tc->object<xAOD::TrigComposite>("seed"); + ss << " \"" << tc << "\" -> \"" << seed << "\" [label=\"seed\"]" << std::endl; + } else { + // Start with my class ID + const CLID linkCLID = static_cast<CLID>( tc->linkColClids().at(i) ); + // Use it to get my class name + std::string tname; + ATH_CHECK(m_clidSvc->getTypeNameOfID(linkCLID, tname)); + // Now ge the sgkey I'm linking to & the index + const SG::sgkey_t key = static_cast<SG::sgkey_t>( tc->linkColKeys().at(i) ); + const unsigned index = tc->linkColIndices().at(i); + // Look it up + CLID checkCLID; + const std::string* keyStr = evtStore()->keyToString(key, checkCLID); + if (checkCLID != linkCLID) { + ATH_MSG_ERROR("Inconsistent CLID " << checkCLID << "stored in storegate for key " << key + << " expecting " << linkCLID << " class name:" << tname); + } + // Print + ss << " \"" << tc << "\" -> \""; + ss << tname << "\\n"; + if (keyStr != nullptr) ss << *keyStr << ":"; + else ss << "[KEY "<< key <<" NOT IN STORE]:"; + ss << index << "\" [label=\"" << link << "\"]" << std::endl; + } + } + ++index; + } + ss << " }" << std::endl; + } + + ss << "}" << std::endl; + + returnValue.assign( ss.str() ); + return StatusCode::SUCCESS; +} -- GitLab From 46d0f7400cfc2b83b30c35785c0d243266942482 Mon Sep 17 00:00:00 2001 From: Marcin Nowak <marcin.nowak@cern.ch> Date: Wed, 4 Jul 2018 14:57:08 +0000 Subject: [PATCH 358/562] factorize _root_open() and fix it for web files with http parameters Former-commit-id: 5b0026ce8124c1f2fd1037b5c509395c54aef5d8 --- Tools/PyUtils/python/AthFile/impl.py | 71 ++++++++++------------------ 1 file changed, 24 insertions(+), 47 deletions(-) diff --git a/Tools/PyUtils/python/AthFile/impl.py b/Tools/PyUtils/python/AthFile/impl.py index 5134e3fb8124..7ddb535b1cc4 100644 --- a/Tools/PyUtils/python/AthFile/impl.py +++ b/Tools/PyUtils/python/AthFile/impl.py @@ -230,7 +230,8 @@ def ami_dsinfos(dsname): pass return af_infos - + + ### classes ------------------------------------------------------------------- class AthFile (object): """A handle to an athena file (POOL,ROOT or ByteStream) @@ -395,27 +396,31 @@ class AthFileServer(object): f.Close() return md5.hexdigest() - def _root_open(self, fname): - import PyUtils.Helpers as H - # speed-up by tampering LD_LIBRARY_PATH to not load reflex-dicts + def _root_open(self, fname, raw=True): + root = self.pyroot import re with H.ShutUp(filters=[ - re.compile( - 'TClass::TClass:0: RuntimeWarning: no dictionary for.*'), - re.compile( - 'Warning in <TEnvRec::ChangeValue>: duplicate entry.*' - ), - ]): - root_open = self.pyroot.TFile.Open + re.compile('TClass::TClass:0: RuntimeWarning: no dictionary for class.*') ]): + root.gSystem.Load('libRootCollection') + root_open = root.TFile.Open + + # we need to get back the protocol b/c of the special + # case of secure-http which needs to open TFiles as TWebFiles... protocol, _ = self.fname(fname) if protocol == 'https': - _setup_ssl(self.msg, self.pyroot) - root_open = self.pyroot.TWebFile - pass - f = root_open(fname+"?filetype=raw", "read") + _setup_ssl(self.msg(), root) + root_open = root.TWebFile.Open + if raw: + if protocol == 'https' and '?' in fname: + # append filetype to existing parameters + f = root_open(fname+'&filetype=raw', 'READ') + else: + f = root_open(fname+'?filetype=raw', 'READ') + else: + f = root_open(fname, 'READ') if f is None or not f: - raise IOError(errno.ENOENT, 'No such file or directory', - fname) + raise IOError(errno.ENOENT, + 'No such file or directory',fname) return f return @@ -1006,36 +1011,8 @@ class FilePeeker(object): del self._sub_env[k] def _root_open(self, fname, raw=False): - import PyUtils.Helpers as H - root = self.pyroot - import re - with H.ShutUp(filters=[ - re.compile('TClass::TClass:0: RuntimeWarning: no dictionary for class.*'), - re.compile("Error in <T.*?File::Init>:.*? not a ROOT file")]): - # for AttributeListLayout which uses CINT for its dict... - # first try the APR version - ooo = root.gSystem.Load('libRootCollection') - if ooo < 0: - # then try the POOL one - root.gSystem.Load('liblcg_RootCollection') - root_open = root.TFile.Open - - # we need to get back the protocol b/c of the special - # case of secure-http which needs to open TFiles as TWebFiles... - protocol, _ = self.server.fname(fname) - if protocol == 'https': - _setup_ssl(self.msg(), root) - root_open = root.TWebFile - if raw: - f = root_open(fname+'?filetype=raw', 'READ') - else: - f = root_open(fname, 'READ') - if f is None or not f: - raise IOError(errno.ENOENT, - 'No such file or directory', - fname) - return f - + return self.server._root_open(fname, raw) + def _is_tag_file(self, fname, evtmax): is_tag = False tag_ref= None -- GitLab From b4222fdb5e8f52d4a09678a0c7f6149c9fe8d7c1 Mon Sep 17 00:00:00 2001 From: Christos Anastopoulos <christos.anastopoulos@cern.ch> Date: Wed, 4 Jul 2018 15:01:54 +0000 Subject: [PATCH 359/562] ATLASRECTS-2889: Split the track candidate selection in a separate algorithm , EMBremCollectionBuilder does just refits. Former-commit-id: 786cf477abbc3c9bbd07f468e813afd9a52fc43b --- .../python/EMBremCollectionBuilder.py | 83 +- .../python/egammaSelectedTrackCopy.py | 28 + .../python/egammaTopoClusterCopier.py | 2 +- .../src/EMBremCollectionBuilder.cxx | 710 ++++++------------ .../egammaAlgs/src/EMBremCollectionBuilder.h | 180 ++--- .../egamma/egammaAlgs/src/EMVertexBuilder.h | 7 +- .../src/components/egammaAlgs_entries.cxx | 4 +- .../egamma/egammaAlgs/src/egammaBuilder.h | 6 +- .../egammaAlgs/src/egammaForwardBuilder.h | 6 +- .../egammaAlgs/src/egammaRecBuilder.cxx | 0 .../egamma/egammaAlgs/src/egammaRecBuilder.h | 6 +- .../src/egammaSelectedTrackCopy.cxx | 277 +++++++ .../egammaAlgs/src/egammaSelectedTrackCopy.h | 102 +++ .../src/egammaSuperClusterBuilder.h | 2 +- .../egammaAlgs/src/egammaTopoClusterCopier.h | 2 +- .../egammaAlgs/src/egammaTrackSlimmer.h | 6 +- .../src/egammaTruthAssociationAlg.h | 6 +- .../src/electronSuperClusterBuilder.h | 11 +- .../src/photonSuperClusterBuilder.h | 11 +- .../egammaAlgs/src/topoEgammaBuilder.cxx | 0 .../egamma/egammaAlgs/src/topoEgammaBuilder.h | 6 +- .../egamma/egammaRec/python/egammaRecFlags.py | 11 +- .../share/egammaRec_RTT_topOptions.py | 46 -- .../egammaRec/share/egammaRec_jobOptions.py | 218 +++--- 24 files changed, 912 insertions(+), 818 deletions(-) create mode 100644 Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopy.py mode change 100755 => 100644 Reconstruction/egamma/egammaAlgs/src/egammaBuilder.h mode change 100755 => 100644 Reconstruction/egamma/egammaAlgs/src/egammaForwardBuilder.h mode change 100755 => 100644 Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.cxx mode change 100755 => 100644 Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.h create mode 100644 Reconstruction/egamma/egammaAlgs/src/egammaSelectedTrackCopy.cxx create mode 100644 Reconstruction/egamma/egammaAlgs/src/egammaSelectedTrackCopy.h mode change 100755 => 100644 Reconstruction/egamma/egammaAlgs/src/topoEgammaBuilder.cxx mode change 100755 => 100644 Reconstruction/egamma/egammaAlgs/src/topoEgammaBuilder.h delete mode 100755 Reconstruction/egamma/egammaRec/share/egammaRec_RTT_topOptions.py diff --git a/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py b/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py index c673273bbcb4..707210865c19 100644 --- a/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py +++ b/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py @@ -1,17 +1,19 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2001-2018 CERN for the benefit of the ATLAS collaboration + +__doc__ = "ToolFactory to instantiate egammaBremCollectionBuilder with default configuration" +__author__ = "Christos" # default configuration of the EMBremCollectionBuilder from AthenaCommon.Logging import logging from AthenaCommon.SystemOfUnits import * from AthenaCommon.Constants import * -from AthenaCommon.AppMgr import ServiceMgr + from AthenaCommon.AppMgr import ToolSvc from AthenaCommon.DetFlags import DetFlags from AthenaCommon.GlobalFlags import globalflags from RecExConfig.RecFlags import rec from InDetRecExample.InDetJobProperties import InDetFlags import traceback - #import base class from egammaAlgs import egammaAlgsConf from egammaTools.InDetTools import egammaExtrapolator @@ -39,17 +41,14 @@ class egammaBremCollectionBuilder ( egammaAlgsConf.EMBremCollectionBuilder ) : Extrapolator = AtlasExtrapolator(), ReintegrateOutliers=True) from AthenaCommon.AppMgr import ToolSvc - #ToolSvc += GSFRefitterTool - - # ----------- load association tool from Inner Detector to handle pixel ganged ambiguities + # + # Load association tool from Inner Detector to handle pixel ganged ambiguities # from InDetAssociationTools.InDetAssociationToolsConf import InDet__InDetPRD_AssociationToolGangedPixels GSFBuildInDetPrdAssociationTool = InDet__InDetPRD_AssociationToolGangedPixels(name = "GSFBuildInDetPrdAssociationTool", - PixelClusterAmbiguitiesMapName = 'PixelClusterAmbiguitiesMap') + PixelClusterAmbiguitiesMapName = 'PixelClusterAmbiguitiesMap') ToolSvc += GSFBuildInDetPrdAssociationTool # - # ----------- Load SummaryTool - # # Loading Configurable HoleSearchTool # from InDetTrackHoleSearch.InDetTrackHoleSearchConf import InDet__InDetTrackHoleSearchTool @@ -70,7 +69,7 @@ class egammaBremCollectionBuilder ( egammaAlgsConf.EMBremCollectionBuilder ) : ToolSvc += GSFBuildHoleSearchTool # - # Load BLayer tool + # Load BLayer tool # GSFBuildTestBLayerTool = None if DetFlags.haveRIO.pixel_on() : @@ -81,8 +80,8 @@ class egammaBremCollectionBuilder ( egammaAlgsConf.EMBremCollectionBuilder ) : PixelSummaryTool = ToolSvc.PixelConditionsSummaryTool, Extrapolator = GSFBuildInDetExtrapolator) ToolSvc += GSFBuildTestBLayerTool - - # Configurable version of TRT_ElectronPidTools + # + # Configurable version of TRT_ElectronPidTools # GSFBuildTRT_ElectronPidTool = None if DetFlags.haveRIO.TRT_on() and not InDetFlags.doSLHC() and not InDetFlags.doHighPileup() : @@ -90,16 +89,16 @@ class egammaBremCollectionBuilder ( egammaAlgsConf.EMBremCollectionBuilder ) : from TRT_ElectronPidTools.TRT_ElectronPidToolsConf import InDet__TRT_LocalOccupancy GSFBuildTRT_LocalOccupancy = InDet__TRT_LocalOccupancy(name ="GSF_TRT_LocalOccupancy") ToolSvc += GSFBuildTRT_LocalOccupancy - + from TRT_ElectronPidTools.TRT_ElectronPidToolsConf import InDet__TRT_ElectronPidToolRun2 GSFBuildTRT_ElectronPidTool = InDet__TRT_ElectronPidToolRun2(name = "GSFBuildTRT_ElectronPidTool", TRT_LocalOccupancyTool = GSFBuildTRT_LocalOccupancy, isData = (globalflags.DataSource == 'data') ) - + ToolSvc += GSFBuildTRT_ElectronPidTool # - # Configurable version of PixelToTPIDTOol + # Configurable version of PixelToTPIDTOol # GSFBuildPixelToTPIDTool = None if DetFlags.haveRIO.pixel_on(): @@ -108,21 +107,21 @@ class egammaBremCollectionBuilder ( egammaAlgsConf.EMBremCollectionBuilder ) : GSFBuildPixelToTPIDTool.ReadFromCOOL = True ToolSvc += GSFBuildPixelToTPIDTool # - # Configrable version of loading the InDetTrackSummaryHelperTool + # Configrable version of loading the InDetTrackSummaryHelperTool # from InDetTrackSummaryHelperTool.InDetTrackSummaryHelperToolConf import InDet__InDetTrackSummaryHelperTool GSFBuildTrackSummaryHelperTool = InDet__InDetTrackSummaryHelperTool(name = "GSFBuildTrackSummaryHelperTool", - AssoTool = GSFBuildInDetPrdAssociationTool, - PixelToTPIDTool = GSFBuildPixelToTPIDTool, - TestBLayerTool = GSFBuildTestBLayerTool, - DoSharedHits = False, - HoleSearch = GSFBuildHoleSearchTool, - usePixel = DetFlags.haveRIO.pixel_on(), - useSCT = DetFlags.haveRIO.SCT_on(), - useTRT = DetFlags.haveRIO.TRT_on()) + AssoTool = GSFBuildInDetPrdAssociationTool, + PixelToTPIDTool = GSFBuildPixelToTPIDTool, + TestBLayerTool = GSFBuildTestBLayerTool, + DoSharedHits = False, + HoleSearch = GSFBuildHoleSearchTool, + usePixel = DetFlags.haveRIO.pixel_on(), + useSCT = DetFlags.haveRIO.SCT_on(), + useTRT = DetFlags.haveRIO.TRT_on()) ToolSvc += GSFBuildTrackSummaryHelperTool # - # Configurable version of TrkTrackSummaryTool: no TRT_PID tool needed here (no shared hits) + # Configurable version of TrkTrackSummaryTool: no TRT_PID tool needed here (no shared hits) # from TrkTrackSummaryTool.TrkTrackSummaryToolConf import Trk__TrackSummaryTool GSFBuildInDetTrackSummaryTool = Trk__TrackSummaryTool(name = "GSFBuildInDetTrackSummaryTool", @@ -133,7 +132,7 @@ class egammaBremCollectionBuilder ( egammaAlgsConf.EMBremCollectionBuilder ) : PixelToTPIDTool = GSFBuildPixelToTPIDTool) ToolSvc += GSFBuildInDetTrackSummaryTool # - # --- load patricle creator tool + # load patricle creator tool # from TrkParticleCreator.TrkParticleCreatorConf import Trk__TrackParticleCreatorTool GSFBuildInDetParticleCreatorTool = Trk__TrackParticleCreatorTool(name = "GSFBuildInDetParticleCreatorTool", @@ -142,44 +141,28 @@ class egammaBremCollectionBuilder ( egammaAlgsConf.EMBremCollectionBuilder ) : TrackSummaryTool = GSFBuildInDetTrackSummaryTool, UseTrackSummaryTool = False, ForceTrackSummaryUpdate = False) - #ToolSvc += GSFBuildInDetParticleCreatorTool # - # --- do track slimming + # do track slimming # from TrkTrackSlimmingTool.TrkTrackSlimmingToolConf import Trk__TrackSlimmingTool as ConfigurableTrackSlimmingTool GSFBuildInDetTrkSlimmingTool = ConfigurableTrackSlimmingTool(name = "GSFBuildInDetTrackSlimmingTool", KeepParameters = False, KeepOutliers = True ) - #ToolSvc += GSFBuildInDetTrkSlimmingTool - - - # do the configuration - self.ClusterContainerName="LArClusterEM" - from InDetRecExample.InDetKeys import InDetKeys - self.TrackParticleContainerName=InDetKeys.xAODTrackParticleContainer() - self.OutputTrkPartContainerName="GSFTrackParticles" - self.OutputTrackContainerName="GSFTracks" + # + # Default Configuration + # self.TrackRefitTool= GSFRefitterTool self.TrackParticleCreatorTool=GSFBuildInDetParticleCreatorTool self.TrackSlimmingTool=GSFBuildInDetTrkSlimmingTool self.TrackSummaryTool=GSFBuildInDetTrackSummaryTool - # do the configuration (from old EMBremCollectionBuilderBase) - self.minNoSiHits=4 - self.broadDeltaEta=0.1 # this is multiplied by 2 for the Candidate Match , so +- 0.2 in eta - self.broadDeltaPhi=0.15 # this is multiplied by 2 for the Candidate Match , so +- 0.3 in phi - self.narrowDeltaEta=0.05 - #These have to be relaxed enough for the conversions - self.narrowDeltaPhi=0.05 - self.narrowDeltaPhiBrem=0.20 #Dominated by the needs of assymetric conversions - self.narrowDeltaPhiRescale=0.05 - self.narrowDeltaPhiRescaleBrem=0.1 - from egammaTrackTools.egammaTrackToolsFactories import EMExtrapolationTools +from InDetRecExample.InDetKeys import InDetKeys EMBremCollectionBuilder = AlgFactory( egammaBremCollectionBuilder, name = 'EMBremCollectionBuilder', ExtrapolationTool = EMExtrapolationTools, - OutputTrackContainerName=egammaKeys.outputTrackKey(), - ClusterContainerName=egammaKeys.inputClusterKey(), + TrackParticleContainerName=InDetKeys.xAODTrackParticleContainer(), + OutputTrkPartContainerName=egammaKeys.outputTrackParticleKey(), + OutputTrackContainerName=egammaKeys.outputTrackKey(), DoTruth=rec.doTruth() ) diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopy.py b/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopy.py new file mode 100644 index 000000000000..2c90ffe977f4 --- /dev/null +++ b/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopy.py @@ -0,0 +1,28 @@ +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + +__doc__ = "ToolFactory to instantiate egammaSelectedTrackCopy with default configuration" +__author__ = "Christos" + +from egammaAlgs import egammaAlgsConf +from egammaRec.Factories import AlgFactory +from egammaRec.egammaRecFlags import jobproperties # to set jobproperties.egammaRecFlags +from egammaRec import egammaKeys +from InDetRecExample.InDetKeys import InDetKeys + +from egammaTrackTools.egammaTrackToolsFactories import EMExtrapolationTools + +egammaSelectedTrackCopy = AlgFactory( egammaAlgsConf.egammaSelectedTrackCopy, + name = 'egammaSelectedTrackCopy' , + ExtrapolationTool = EMExtrapolationTools, + ClusterContainerName="LArClusterEM", + TrackParticleContainerName=InDetKeys.xAODTrackParticleContainer(), + minNoSiHits=4, + broadDeltaEta=0.1, # this is multiplied by 2 for the Candidate Match , so +- 0.2 in eta + broadDeltaPhi=0.15, # this is multiplied by 2 for the Candidate Match , so +- 0.3 in phi + narrowDeltaEta=0.05, + #These have to be relaxed enough for the conversions + narrowDeltaPhi=0.05, + narrowDeltaPhiBrem=0.20, #Dominated by the needs of assymetric conversions + narrowDeltaPhiRescale=0.05, + narrowDeltaPhiRescaleBrem=0.1 + ) diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopier.py b/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopier.py index bf18067e58e6..a127a20457af 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopier.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopier.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration __doc__ = "ToolFactory to instantiate egammaTopoClusterCopier with default configuration" __author__ = "Jovan Mitrevski" diff --git a/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.cxx index ff4834ece452..571bde983d1e 100644 --- a/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.cxx +++ b/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.cxx @@ -14,508 +14,292 @@ UPDATE : **********************************************************************/ #include "EMBremCollectionBuilder.h" // -#include "Particle/TrackParticleContainer.h" -#include "Particle/TrackParticle.h" -#include "CaloEvent/CaloClusterContainer.h" -#include "CaloEvent/CaloCluster.h" -#include "ParticleTruth/TrackParticleTruthCollection.h" -#include "ParticleTruth/TrackParticleTruth.h" +#include "TrkTrack/Track.h" #include "TrkTrack/LinkToTrack.h" #include "TrkTrackLink/ITrackLink.h" -#include "TrkParticleBase/LinkToTrackParticleBase.h" -// -#include "TrkEventPrimitives/VertexType.h" -#include "NavFourMom/INavigable4MomentumCollection.h" -// -#include "egammaUtils/CandidateMatchHelpers.h" -#include "FourMomUtils/P4Helpers.h" #include "AthenaKernel/errorcheck.h" // -#include "xAODTracking/Vertex.h" -#include "xAODTracking/TrackParticle.h" -#include "xAODTruth/TruthParticle.h" -#include "xAODCaloEvent/CaloCluster.h" #include "xAODTracking/TrackParticleContainer.h" #include "xAODTracking/TrackParticleAuxContainer.h" -#include "xAODCaloEvent/CaloClusterContainer.h" +#include "xAODTracking/TrackParticle.h" +#include "xAODTruth/TruthParticle.h" #include "xAODTruth/TruthParticleContainer.h" #include "TrkPseudoMeasurementOnTrack/PseudoMeasurementOnTrack.h" +#include "TrkMaterialOnTrack/EstimatedBremOnTrack.h" #include "StoreGate/ReadHandle.h" #include "StoreGate/WriteHandle.h" //std includes -#include <stdint.h> #include <algorithm> #include <cmath> -#include "CxxUtils/make_unique.h" - -#include "TrkMaterialOnTrack/EstimatedBremOnTrack.h" +#include <memory> -////////////////////////////////////////////////////////////////////////////////////// -/// Constructor EMBremCollectionBuilder::EMBremCollectionBuilder(const std::string& name, - ISvcLocator* pSvcLocator): - AthAlgorithm(name, pSvcLocator) + ISvcLocator* pSvcLocator): + AthAlgorithm(name, pSvcLocator) { - m_AllClusters=0; - m_AllTracks=0; - m_AllTRTTracks=0; - m_AllSiTracks=0; - m_SelectedTracks=0; - m_SelectedTRTTracks=0; - m_SelectedSiTracks=0; - m_FailedFitTracks=0; - m_FailedSiliconRequirFit=0; - m_RefittedTracks=0; } -// ================================================================== StatusCode EMBremCollectionBuilder::initialize() { - ATH_CHECK(m_clusterContainerKey.initialize()); - ATH_CHECK(m_trackParticleContainerKey.initialize()); - ATH_CHECK(m_OutputTrkPartContainerKey.initialize()); - ATH_CHECK(m_OutputTrackContainerKey.initialize()); - - // retrieve the track refitter tool: - if(m_trkRefitTool.retrieve().isFailure()) { - ATH_MSG_ERROR ( "Unable to retrieve " << m_trkRefitTool); - return StatusCode::FAILURE; - } - - /* Get the particle creation tool */ - if ( m_particleCreatorTool.retrieve().isFailure() ) { - ATH_MSG_ERROR ("Failed to retrieve tool " << m_particleCreatorTool); - return StatusCode::FAILURE; - } - - /* Get the track slimming tool */ - if ( m_slimTool.retrieve().isFailure() ) { - ATH_MSG_ERROR ( "Failed to retrieve TrkTrackSlimmingTool tool "<< m_slimTool); - return StatusCode::FAILURE; - } - - /* Get the track summary tool */ - if ( m_summaryTool.retrieve().isFailure() ) { - ATH_MSG_ERROR ( "Failed to retrieve TrkTrackSummaryTool tool "<< m_summaryTool); - return StatusCode::FAILURE; - } - - /* the extrapolation tool*/ - if(m_extrapolationTool.retrieve().isFailure()){ - ATH_MSG_ERROR("initialize: Cannot retrieve extrapolationTool " << m_extrapolationTool); - return StatusCode::FAILURE; - } - - //counters - m_AllClusters=0; - m_AllTracks=0; - m_AllTRTTracks=0; - m_AllSiTracks=0; - m_SelectedTracks=0; - m_SelectedTRTTracks=0; - m_SelectedSiTracks=0; - m_FailedFitTracks=0; - m_FailedSiliconRequirFit=0; - m_RefittedTracks=0; - - return StatusCode::SUCCESS; + ATH_CHECK(m_selectedTrackParticleContainerKey.initialize()); + ATH_CHECK(m_trackParticleContainerKey.initialize()); + ATH_CHECK(m_OutputTrkPartContainerKey.initialize()); + ATH_CHECK(m_OutputTrackContainerKey.initialize()); + + /* retrieve the track refitter tool*/ + if(m_trkRefitTool.retrieve().isFailure()) { + ATH_MSG_ERROR ( "Unable to retrieve " << m_trkRefitTool); + return StatusCode::FAILURE; + } + + /* Get the particle creation tool */ + if ( m_particleCreatorTool.retrieve().isFailure() ) { + ATH_MSG_ERROR ("Failed to retrieve tool " << m_particleCreatorTool); + return StatusCode::FAILURE; + } + + /* Get the track slimming tool */ + if ( m_slimTool.retrieve().isFailure() ) { + ATH_MSG_ERROR ( "Failed to retrieve TrkTrackSlimmingTool tool "<< m_slimTool); + return StatusCode::FAILURE; + } + + /* Get the track summary tool */ + if ( m_summaryTool.retrieve().isFailure() ) { + ATH_MSG_ERROR ( "Failed to retrieve TrkTrackSummaryTool tool "<< m_summaryTool); + return StatusCode::FAILURE; + } + + /* the extrapolation tool*/ + if(m_extrapolationTool.retrieve().isFailure()){ + ATH_MSG_ERROR("initialize: Cannot retrieve extrapolationTool " << m_extrapolationTool); + return StatusCode::FAILURE; + } + return StatusCode::SUCCESS; } - -//************************************************************************* -// Finalize StatusCode EMBremCollectionBuilder::EMBremCollectionBuilder::finalize(){ - ATH_MSG_INFO ("AllClusters " << m_AllClusters); - ATH_MSG_INFO ("AllTracks " << m_AllTracks); - ATH_MSG_INFO ("AllSiTracks " << m_AllSiTracks); - ATH_MSG_INFO ("AllTRTTracks " << m_AllTRTTracks); - ATH_MSG_INFO ("SelectedTracks " << m_SelectedTracks); - ATH_MSG_INFO ("SelectedSiTracks " << m_SelectedSiTracks); - ATH_MSG_INFO ("SelectedTRTTracks " << m_SelectedTRTTracks); - ATH_MSG_INFO ("Not refitted due to Silicon Requirements " << m_FailedSiliconRequirFit); - ATH_MSG_INFO ("Failed Fit Tracks " << m_FailedFitTracks); - ATH_MSG_INFO ("RefittedTracks " << m_RefittedTracks); - - return StatusCode::SUCCESS; + + ATH_MSG_INFO ("Not refitted due to Silicon Requirements " << m_FailedSiliconRequirFit); + ATH_MSG_INFO ("Failed Fit Tracks " << m_FailedFitTracks); + ATH_MSG_INFO ("RefittedTracks " << m_RefittedTracks); + + return StatusCode::SUCCESS; } StatusCode EMBremCollectionBuilder::execute() { - // Record the final Track Particle container in StoreGate - SG::WriteHandle<xAOD::TrackParticleContainer> finalTrkPartContainer(m_OutputTrkPartContainerKey); - ATH_CHECK(finalTrkPartContainer.record(std::make_unique<xAOD::TrackParticleContainer>(), - std::make_unique<xAOD::TrackParticleAuxContainer>())); - - xAOD::TrackParticleContainer* cPtrTrkPart=finalTrkPartContainer.ptr(); - // - //create container for the final slimmed Trk::Tracks - SG::WriteHandle<TrackCollection> finalTracks(m_OutputTrackContainerKey); - ATH_CHECK(finalTracks.record(std::make_unique<TrackCollection>())); - - TrackCollection* cPtrTracks=finalTracks.ptr(); - // - SG::ReadHandle<xAOD::CaloClusterContainer> clusterTES(m_clusterContainerKey); - if(!clusterTES.isValid()) { - ATH_MSG_FATAL("Failed to retrieve cluster container: "<< m_clusterContainerKey.key()); - return StatusCode::FAILURE; - } - // - SG::ReadHandle<xAOD::TrackParticleContainer> trackTES(m_trackParticleContainerKey); - if(!trackTES.isValid()) { - ATH_MSG_FATAL("Failed to retrieve TrackParticle container: "<< m_trackParticleContainerKey.key()); - return StatusCode::FAILURE; + // Record the final Track Particle container in StoreGate + SG::WriteHandle<xAOD::TrackParticleContainer> finalTrkPartContainer(m_OutputTrkPartContainerKey); + ATH_CHECK(finalTrkPartContainer.record(std::make_unique<xAOD::TrackParticleContainer>(), + std::make_unique<xAOD::TrackParticleAuxContainer>())); + xAOD::TrackParticleContainer* cPtrTrkPart=finalTrkPartContainer.ptr(); + //create container for the final slimmed Trk::Tracks + SG::WriteHandle<TrackCollection> finalTracks(m_OutputTrackContainerKey); + ATH_CHECK(finalTracks.record(std::make_unique<TrackCollection>())); + TrackCollection* cPtrTracks=finalTracks.ptr(); + + //Read input + SG::ReadHandle<xAOD::TrackParticleContainer> trackTES(m_trackParticleContainerKey); + if(!trackTES.isValid()) { + ATH_MSG_FATAL("Failed to retrieve TrackParticle container: "<< m_trackParticleContainerKey.key()); + return StatusCode::FAILURE; + } + ATH_MSG_DEBUG ("Track Particle container size: " <<trackTES->size() ); + + SG::ReadHandle<xAOD::TrackParticleContainer> selectedTracks(m_selectedTrackParticleContainerKey); + if(!selectedTracks.isValid()) { + ATH_MSG_FATAL("Failed to retrieve TrackParticle container: "<< m_selectedTrackParticleContainerKey.key()); + return StatusCode::FAILURE; + } + ATH_MSG_DEBUG ("Selected Track Particle container size: " <<selectedTracks->size() ); + + /* + * Struct of unsigned int, local varibale of this method + * Initialization of counters is 0 + */ + localCounter locCounter; + //Loop over the selected input tracks + xAOD::TrackParticleContainer::const_iterator track_iter=selectedTracks->begin(); + xAOD::TrackParticleContainer::const_iterator track_iter_end=selectedTracks->end(); + for(; track_iter != track_iter_end; ++track_iter){ + + const xAOD::TrackParticle* track=(*track_iter); + ATH_MSG_DEBUG ("Attempt to Refit Track with Eta "<< track->eta() + << " Phi " << track->phi()<<" Pt " <<track->pt()); + //Try to refit, if failded move to next one + if(refitTrack(track,cPtrTracks,cPtrTrkPart,locCounter).isFailure()) { + ATH_MSG_WARNING("Problem in EMBreCollection Builder Refit"); + continue; } - - //====================================================================================================== - //Here is the new Logic - //Loop over tracks and clusters - m_AllClusters+=clusterTES->size(); - // - xAOD::TrackParticleContainer::const_iterator track_iter; - xAOD::CaloClusterContainer::const_iterator clus_iter; - xAOD::TrackParticleContainer::const_iterator track_iter_end=trackTES->end(); - xAOD::CaloClusterContainer::const_iterator clus_iter_end=clusterTES->end(); - - ATH_MSG_DEBUG ("Cluster container size: " << clusterTES->size() ); - ATH_MSG_DEBUG ("Track container size: " <<trackTES->size() ); - - track_iter = trackTES->begin(); - //Outer loop over Track Particles - for(unsigned int trackNumber = 0; track_iter != track_iter_end; ++track_iter,++trackNumber){ - ATH_MSG_DEBUG ("Check Track with Eta "<< (*track_iter)->eta()<< " Phi " << (*track_iter)->phi()<<" Pt " <<(*track_iter)->pt()); - - m_AllTracks++; - bool isTRT=false; - int nclus(0); - uint8_t dummy(0); - if( (*track_iter)->summaryValue(dummy,xAOD::numberOfPixelHits) ) - nclus += dummy; - if( (*track_iter)->summaryValue(dummy,xAOD::numberOfSCTHits) ) - nclus += dummy; - - if(nclus<4){ - isTRT = true; - m_AllTRTTracks++; - } else{ - isTRT = false; - m_AllSiTracks++; - } - //inner loop over clusters - clus_iter = clusterTES->begin(); - for( ;clus_iter !=clus_iter_end; ++clus_iter){ - - //check if it the track is selected due to this - //cluster. - //If not continue to next cluster - if(!Select((*clus_iter), isTRT, (*track_iter))){ - ATH_MSG_DEBUG ("Track did not match cluster"); - continue; - } - - //If track is selected/matched - ATH_MSG_DEBUG ("Track Matched"); - //Try to refit - if(refitTrack(*track_iter,cPtrTracks,cPtrTrkPart).isFailure()) { - ATH_MSG_WARNING("Problem in EMBreCollection Builder Refit"); - } - else { - //Selected refitted track - //Do the rest - // Add Auxiliary decorations to the GSF Track Particle - // Set Element link to original Track Particle - ElementLink<xAOD::TrackParticleContainer> linkToOriginal(*trackTES,trackNumber); - xAOD::TrackParticle* gsfTrack = cPtrTrkPart->back(); - static const SG::AuxElement::Accessor<ElementLink<xAOD::TrackParticleContainer> > tP ("originalTrackParticle"); - tP(*gsfTrack)= linkToOriginal; - - if(m_doTruth){ - //Add Truth decorations. Copy from the original. - static const SG::AuxElement::Accessor<ElementLink<xAOD::TruthParticleContainer> > tPL ("truthParticleLink"); - if(tPL.isAvailable(*(*track_iter))){ - ElementLink<xAOD::TruthParticleContainer> linkToTruth= tPL(*(*track_iter)); - tPL(*gsfTrack) = linkToTruth; - if(!linkToTruth.isValid()){ - ATH_MSG_DEBUG("Cannot create Valid Link to Truth Particle for GSFTrackParticle"); - } - } - static const SG::AuxElement::Accessor<float > tMP ("truthMatchProbability"); - if(tMP.isAvailable(*(*track_iter))){ - float originalProbability = tMP(*(*track_iter)); - tMP(*gsfTrack)= originalProbability ; - } - - static const SG::AuxElement::Accessor<int> tT("truthType") ; - if(tT.isAvailable(*(*track_iter))){ - int truthType = tT(*(*track_iter)); - tT(*gsfTrack) = truthType ; - } - static const SG::AuxElement::Accessor<int> tO("truthOrigin") ; - if(tO.isAvailable(*(*track_iter))){ - int truthOrigin = tO(*(*track_iter)); - tO(*gsfTrack) = truthOrigin ; - } - } - } - m_SelectedTracks++; - if(isTRT) {m_SelectedTRTTracks++;} - else {m_SelectedSiTracks++;} - //The particular track got refitted the moment it matched/got selected - //due to any cluster - //break here and move to the next track - break; - }//Loop on clusters - }//Loop on tracks - ATH_MSG_DEBUG ("Final Track container size: " << cPtrTrkPart->size() ); - return StatusCode::SUCCESS; + xAOD::TrackParticle* gsfTrack = cPtrTrkPart->back(); + + //Add an element link back to original Track Particle collection + static const SG::AuxElement::Accessor<ElementLink<xAOD::TrackParticleContainer> > tP ("originalTrackParticle"); + ElementLink<xAOD::TrackParticleContainer> linkToOriginal(*trackTES,track->index()); + tP(*gsfTrack) = linkToOriginal; + + if(m_doTruth){ + //Add Truth decorations. Copy from the original. + static const SG::AuxElement::Accessor<ElementLink<xAOD::TruthParticleContainer> > tPL ("truthParticleLink"); + if(tPL.isAvailable(*(track))){ + ElementLink<xAOD::TruthParticleContainer> linkToTruth= tPL(*(track)); + tPL(*gsfTrack) = linkToTruth; + } + static const SG::AuxElement::Accessor<float > tMP ("truthMatchProbability"); + if(tMP.isAvailable(*(track))){ + float originalProbability = tMP(*(track)); + tMP(*gsfTrack)= originalProbability ; + } + static const SG::AuxElement::Accessor<int> tT("truthType") ; + if(tT.isAvailable(*(track))){ + int truthType = tT(*(track)); + tT(*gsfTrack) = truthType ; + } + static const SG::AuxElement::Accessor<int> tO("truthOrigin") ; + if(tO.isAvailable(*(track))){ + int truthOrigin = tO(*(track)); + tO(*gsfTrack) = truthOrigin ; + } + }//End truth + }//Loop over tracks + ATH_MSG_DEBUG ("Final Track container size: " << cPtrTrkPart->size() ); + + /* + * Increment the global counters + */ + m_FailedFitTracks.fetch_add(locCounter.failedFitTracks, std::memory_order_relaxed); + m_RefittedTracks.fetch_add(locCounter.refittedTracks, std::memory_order_relaxed); + m_FailedSiliconRequirFit.fetch_add(locCounter.failedSiliconRequirFit,std::memory_order_relaxed); + + return StatusCode::SUCCESS; } -// ==================================================================== StatusCode EMBremCollectionBuilder::refitTrack(const xAOD::TrackParticle* tmpTrkPart, - TrackCollection* finalTracks, - xAOD::TrackParticleContainer* finalTrkPartContainer){ - - //No output SG Collections , should never happen - if(!finalTrkPartContainer ||!finalTracks ){ - ATH_MSG_ERROR ("No GSF TrackParticle or Trk::Track Container "); - return StatusCode::FAILURE; - } - - //Get the original track that the track particle points to. - const Trk::Track* tmpTrk(0); - if ( tmpTrkPart->trackLink().isValid() ){ - tmpTrk = tmpTrkPart->track(); + TrackCollection* finalTracks, + xAOD::TrackParticleContainer* finalTrkPartContainer, + localCounter& counter) const{ + + + //No output SG Collections , should never happen + if(!finalTrkPartContainer ||!finalTracks ){ + ATH_MSG_ERROR ("No GSF TrackParticle or Trk::Track Container "); + return StatusCode::FAILURE; + } + //Get the original track that the track particle points to. + const Trk::Track* tmpTrk(0); + if ( tmpTrkPart->trackLink().isValid() ){ + tmpTrk = tmpTrkPart->track(); + } + else{ + ATH_MSG_ERROR ("TrackParticle has not Track -- are you running on AOD?"); + return StatusCode::FAILURE; + } + + int nSiliconHits_trk =0; + uint8_t dummy(0); + if( tmpTrkPart->summaryValue(dummy,xAOD::numberOfSCTHits) ){ + nSiliconHits_trk += dummy; + } + if( tmpTrkPart->summaryValue(dummy,xAOD::numberOfPixelHits) ){ + nSiliconHits_trk += dummy; + } + if( tmpTrkPart->summaryValue(dummy,xAOD::numberOfSCTOutliers) ){ + nSiliconHits_trk += dummy; + } + if( tmpTrkPart->summaryValue(dummy,xAOD::numberOfPixelOutliers) ){ + nSiliconHits_trk += dummy; + } + ATH_MSG_DEBUG("Number of Silicon hits "<<nSiliconHits_trk); + //Setup the Trk::Track Refit + std::unique_ptr<Trk::Track> trk_refit; + if( nSiliconHits_trk >= m_MinNoSiHits ) { + StatusCode status = m_trkRefitTool->refitTrackParticle(tmpTrkPart); + if (status == StatusCode::SUCCESS){ + ATH_MSG_DEBUG("FIT SUCCESS "); + ++(counter.refittedTracks); + trk_refit.reset(m_trkRefitTool->refittedTrack()); //this is a Trk::Track + m_summaryTool->updateTrack(*trk_refit); } else{ - ATH_MSG_ERROR ("TrackParticle has not Track -- are you running on AOD?"); - return StatusCode::FAILURE; - } - - int nSiliconHits_trk =0; - uint8_t dummy(0); - if( tmpTrkPart->summaryValue(dummy,xAOD::numberOfSCTHits) ){ - nSiliconHits_trk += dummy; - } - if( tmpTrkPart->summaryValue(dummy,xAOD::numberOfPixelHits) ){ - nSiliconHits_trk += dummy; - } - if( tmpTrkPart->summaryValue(dummy,xAOD::numberOfSCTOutliers) ){ - nSiliconHits_trk += dummy; + //We end up here due to a failed fit + ATH_MSG_DEBUG("FIT FAILED "); + ++(counter.failedFitTracks); + trk_refit.reset(new Trk::Track(*tmpTrk)); } - if( tmpTrkPart->summaryValue(dummy,xAOD::numberOfPixelOutliers) ){ - nSiliconHits_trk += dummy; + } + else{ + //We end up here if not enough silicons hits + ATH_MSG_DEBUG("NO FIT ATTEMPTED"); + ++(counter.failedSiliconRequirFit); + trk_refit.reset(new Trk::Track(*tmpTrk)); + } + //Refit Trk::Track has been created + + // Create TrackParticle from the refitted Trk::Track + xAOD::TrackParticle* aParticle = m_particleCreatorTool->createParticle( *trk_refit, finalTrkPartContainer, nullptr, xAOD::electron ); + if (!aParticle){ + ATH_MSG_ERROR("Could not create TrackParticle, this should never happen !"); + return StatusCode::FAILURE; + } + //Additional info for internal e/gamma usage via the full Trk::Track + //Save extrapolated perigee to calo (eta,phi) for later usage in supercluster algorithm. + static const SG::AuxElement::Accessor<float> pgExtrapEta ("perigeeExtrapEta"); + static const SG::AuxElement::Accessor<float> pgExtrapPhi ("perigeeExtrapPhi"); + float perigeeExtrapEta(-999.), perigeeExtrapPhi(-999.); + + auto tsos = trk_refit->trackStateOnSurfaces()->begin(); + for (;tsos != trk_refit->trackStateOnSurfaces()->end(); ++tsos) { + if ((*tsos)->type(Trk::TrackStateOnSurface::Perigee) && (*tsos)->trackParameters()!=0) { + float extrapEta(-999.), extrapPhi(-999.); + const Trk::TrackParameters *perigeeTrackParams(0); + perigeeTrackParams = (*tsos)->trackParameters(); + + const Trk::PerigeeSurface pSurface (perigeeTrackParams->position()); + std::unique_ptr<const Trk::TrackParameters> pTrkPar(pSurface.createTrackParameters( perigeeTrackParams->position(), perigeeTrackParams->momentum().unit()*1.e9, +1, 0)); + //Do the straight-line extrapolation. + bool hitEM2 = m_extrapolationTool->getEtaPhiAtCalo(pTrkPar.get(), &extrapEta, &extrapPhi); + if (hitEM2) { + perigeeExtrapEta = extrapEta; + perigeeExtrapPhi = extrapPhi; + } else { + ATH_MSG_WARNING("Extrapolation to EM2 failed!"); + } + break; } - ATH_MSG_DEBUG("Number of Silicon hits "<<nSiliconHits_trk); - - //Setup the Trk::Track Refit - std::unique_ptr<Trk::Track> trk_refit; - if( nSiliconHits_trk >= m_MinNoSiHits ) { - StatusCode status = m_trkRefitTool->refitTrackParticle(tmpTrkPart); - if (status == StatusCode::SUCCESS){ - ATH_MSG_DEBUG("FIT SUCCESS "); - m_RefittedTracks++; - trk_refit.reset(m_trkRefitTool->refittedTrack()); //this is a Trk::Track - m_summaryTool->updateTrack(*trk_refit); - } - else{ - //We end up here due to a failed fit - ATH_MSG_DEBUG("FIT FAILED "); - m_FailedFitTracks++; - trk_refit.reset(new Trk::Track(*tmpTrk)); - } + } + pgExtrapEta(*aParticle) = perigeeExtrapEta; + pgExtrapPhi(*aParticle) = perigeeExtrapPhi; + //Add qoverP for the last measurement + static const SG::AuxElement::Accessor<float > QoverPLM ("QoverPLM"); + float QoverPLast(0); + auto rtsos = trk_refit->trackStateOnSurfaces()->rbegin(); + for (;rtsos != trk_refit->trackStateOnSurfaces()->rend(); ++rtsos){ + if ((*rtsos)->type(Trk::TrackStateOnSurface::Measurement) + && (*rtsos)->trackParameters()!=0 + &&(*rtsos)->measurementOnTrack()!=0 + && !dynamic_cast<const Trk::PseudoMeasurementOnTrack*>((*rtsos)->measurementOnTrack())) { + QoverPLast = (*rtsos)->trackParameters()->parameters()[Trk::qOverP]; + break; } - else{ - //We end up here if not enough silicons hits - ATH_MSG_DEBUG("NO FIT ATTEMPTED"); - m_FailedSiliconRequirFit++; - trk_refit.reset(new Trk::Track(*tmpTrk)); - } - //Refit Trk::Track has been created - - // Use the the Refitted Trk::Track and the original vertex to construct a new TrackParticle - xAOD::TrackParticle* aParticle = m_particleCreatorTool->createParticle( *trk_refit, finalTrkPartContainer, nullptr, xAOD::electron ); - - //If no TrackParticle , then ERROR - if (!aParticle){ - ATH_MSG_ERROR("Could not create TrackParticle, this should never happen !"); - return StatusCode::FAILURE; - } - - //Additional info for internal e/gamma usage via the full Trk::Track - //Save extrapolated perigee to calo (eta,phi) for later usage in supercluster algorithm. - static const SG::AuxElement::Accessor<float> pgExtrapEta ("perigeeExtrapEta"); - static const SG::AuxElement::Accessor<float> pgExtrapPhi ("perigeeExtrapPhi"); - float perigeeExtrapEta(-999.), perigeeExtrapPhi(-999.); - - auto tsos = trk_refit->trackStateOnSurfaces()->begin(); - for (;tsos != trk_refit->trackStateOnSurfaces()->end(); ++tsos) { - if ((*tsos)->type(Trk::TrackStateOnSurface::Perigee) && (*tsos)->trackParameters()!=0) { - float extrapEta(-999.), extrapPhi(-999.); - const Trk::TrackParameters *perigeeTrackParams(0); - perigeeTrackParams = (*tsos)->trackParameters(); - - const Trk::PerigeeSurface pSurface (perigeeTrackParams->position()); - std::unique_ptr<const Trk::TrackParameters> pTrkPar(pSurface.createTrackParameters( perigeeTrackParams->position(), perigeeTrackParams->momentum().unit()*1.e9, +1, 0)); - //Do the straight-line extrapolation. - bool hitEM2 = m_extrapolationTool->getEtaPhiAtCalo(pTrkPar.get(), &extrapEta, &extrapPhi); - if (hitEM2) { - perigeeExtrapEta = extrapEta; - perigeeExtrapPhi = extrapPhi; - } else { - ATH_MSG_WARNING("Extrapolation to EM2 failed!"); - } - break; - } - } - pgExtrapEta(*aParticle) = perigeeExtrapEta; - pgExtrapPhi(*aParticle) = perigeeExtrapPhi; - - //Add qoverP for the last measurement - static const SG::AuxElement::Accessor<float > QoverPLM ("QoverPLM"); - float QoverPLast(0); - auto rtsos = trk_refit->trackStateOnSurfaces()->rbegin(); - for (;rtsos != trk_refit->trackStateOnSurfaces()->rend(); ++rtsos){ - if ((*rtsos)->type(Trk::TrackStateOnSurface::Measurement) - && (*rtsos)->trackParameters()!=0 - &&(*rtsos)->measurementOnTrack()!=0 - && !dynamic_cast<const Trk::PseudoMeasurementOnTrack*>((*rtsos)->measurementOnTrack())) { - QoverPLast = (*rtsos)->trackParameters()->parameters()[Trk::qOverP]; - break; - } - } - QoverPLM(*aParticle) = QoverPLast; - - //Now Slim the TrK::Track for writing to disk - Trk::Track* slimmed = m_slimTool->slim(*trk_refit); - if(!slimmed){ - ATH_MSG_WARNING ("TrackSlimming failed"); - ElementLink<TrackCollection> dummy; - aParticle->setTrackLink(dummy); - }else{ - finalTracks->push_back(slimmed); - ElementLink<TrackCollection> trackLink( slimmed, *finalTracks); - aParticle->setTrackLink( trackLink ); - } - - return StatusCode::SUCCESS; -} - -// ================================================================= -bool EMBremCollectionBuilder::Select(const xAOD::CaloCluster* cluster, - bool trkTRT, - const xAOD::TrackParticle* track) const -{ - - ATH_MSG_DEBUG("EMBremCollectionBuilder::Select()" ); - if (cluster == 0 || track == 0) return false; - const Trk::Perigee& candidatePerigee = track->perigeeParameters(); - //Get Perigee Parameters - double trkPhi = candidatePerigee.parameters()[Trk::phi]; - double trkEta = candidatePerigee.eta(); - double r_first=candidatePerigee.position().perp(); - double z_first=candidatePerigee.position().z(); - //===========================================================// - //Get Cluster parameters - double clusterEta=cluster->etaBE(2); - bool isEndCap= cluster->inEndcap(); - double Et= cluster->e()/cosh(trkEta); - if(trkTRT){ - Et = cluster->et(); - } - - //===========================================================// - // a few sanity checks - if (fabs(clusterEta) > 10.0 || fabs(trkEta) > 10.0 || Et <= 0.0) { - ATH_MSG_DEBUG("FAILS sanity checks : Track Eta : " << trkEta - << ", Cluster Eta " << clusterEta ); - return false; - } - //===========================================================// - //Calculate corrrected eta and Phi - double etaclus_corrected = CandidateMatchHelpers::CorrectedEta(clusterEta,z_first,isEndCap); - double phiRot = CandidateMatchHelpers::PhiROT(Et,trkEta, track->charge(),r_first ,isEndCap) ; - double phiRotTrack = CandidateMatchHelpers::PhiROT(track->pt(),trkEta, track->charge(),r_first ,isEndCap) ; - //===========================================================// - //Calcualate deltaPhis - double deltaPhiStd = P4Helpers::deltaPhi(cluster->phiBE(2), trkPhi); - double trkPhiCorr = P4Helpers::deltaPhi(trkPhi, phiRot); - double deltaPhi2 = P4Helpers::deltaPhi(cluster->phiBE(2), trkPhiCorr); - double trkPhiCorrTrack = P4Helpers::deltaPhi(trkPhi, phiRotTrack); - double deltaPhi2Track = P4Helpers::deltaPhi(cluster->phiBE(2), trkPhiCorrTrack); - //===========================================================// - - if ((!trkTRT)&& fabs(cluster->etaBE(2) - trkEta) > 2*m_broadDeltaEta && - fabs( etaclus_corrected- trkEta) > 2.*m_broadDeltaEta){ - ATH_MSG_DEBUG("FAILS broad window eta match (track eta, cluster eta, cluster eta corrected): ( " - << trkEta << ", " << cluster->etaBE(2) <<", "<<etaclus_corrected<<")" ); - return false; - } - //if it does not fail the eta cut, does it fail the phi? - if ( (fabs(deltaPhi2) > 2*m_broadDeltaPhi) && (fabs(deltaPhi2Track) > 2.*m_broadDeltaPhi) - && (fabs(deltaPhiStd) > 2*m_broadDeltaPhi)){ - ATH_MSG_DEBUG("FAILS broad window phi match (track phi, phirotCluster , phiRotTrack ,cluster phi): ( " - << trkPhi << ", " << phiRot<< ", "<<phiRotTrack<< ", " << cluster->phiBE(2) << ")" ); - return false; - } - - //Extrapolate from last measurement, since this is before brem fit last measurement is better. - IEMExtrapolationTools::TrkExtrapDef extrapFrom = IEMExtrapolationTools::fromLastMeasurement; - std::vector<double> eta(4, -999.0); - std::vector<double> phi(4, -999.0); - std::vector<double> deltaEta(4, -999.0); - std::vector<double> deltaPhi(4, -999.0); - if (m_extrapolationTool->getMatchAtCalo (cluster, - track, - trkTRT, - Trk::alongMomentum, - eta, - phi, - deltaEta, - deltaPhi, - extrapFrom).isFailure()) {return false;} - - // Selection in narrow eta/phi window - if(( trkTRT || fabs(deltaEta[2]) < m_narrowDeltaEta ) && - deltaPhi[2] < m_narrowDeltaPhi && - deltaPhi[2] > -m_narrowDeltaPhiBrem) { - ATH_MSG_DEBUG("Standard Match success " << deltaPhi[2] ); - return true; - } - else if(!trkTRT && fabs(deltaEta[2]) < m_narrowDeltaEta ){ - ATH_MSG_DEBUG("Normal matched Failed deltaPhi/deltaEta " - << deltaPhi[2] <<" / "<< deltaEta[2]<<", Trying Rescale" ); - //Extrapolate from Perigee Rescaled - IEMExtrapolationTools::TrkExtrapDef extrapFrom1 = IEMExtrapolationTools::fromPerigeeRescaled; - std::vector<double> eta1(4, -999.0); - std::vector<double> phi1(4, -999.0); - std::vector<double> deltaEta1(4, -999.0); - std::vector<double> deltaPhi1(5, -999.0); // Set size to 5 to store deltaPhiRot - if (m_extrapolationTool->getMatchAtCalo (cluster, - track, - trkTRT, - Trk::alongMomentum, - eta1, - phi1, - deltaEta1, - deltaPhi1, - extrapFrom1).isFailure()) return false; - if( fabs(deltaEta1[2]) < m_narrowDeltaEta - && deltaPhi1[2] < m_narrowRescale - && deltaPhi1[2] > -m_narrowRescaleBrem) { - ATH_MSG_DEBUG("Rescale Match success " << deltaPhi1[2] ); - return true; - } - else { - ATH_MSG_DEBUG("Rescaled matched Failed deltaPhi/deltaEta " - << deltaPhi1[2] <<" / "<< deltaEta1[2] ); - return false; - } - } - ATH_MSG_DEBUG("Matched Failed deltaPhi/deltaEta " << deltaPhi[2] <<" / "<< deltaEta[2]<<",isTRT, "<< trkTRT); - return false; + } + QoverPLM(*aParticle) = QoverPLast; + + //Now Slim the TrK::Track for writing to disk + Trk::Track* slimmed = m_slimTool->slim(*trk_refit); + if(!slimmed){ + ATH_MSG_WARNING ("TrackSlimming failed"); + ElementLink<TrackCollection> dummy; + aParticle->setTrackLink(dummy); + }else{ + finalTracks->push_back(slimmed); + ElementLink<TrackCollection> trackLink( slimmed, *finalTracks); + aParticle->setTrackLink( trackLink ); + } + return StatusCode::SUCCESS; } - diff --git a/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.h b/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.h index 9e6873d9e84b..bc89c3ded4b0 100644 --- a/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.h +++ b/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.h @@ -7,7 +7,7 @@ /** @class EMBremCollectionBuilder Algorithm which creates new brem-refitted tracks -*/ + */ #include "egammaInterfaces/IegammaTrkRefitterTool.h" #include "egammaInterfaces/IEMExtrapolationTools.h" @@ -23,119 +23,85 @@ #include "xAODTracking/TrackParticleFwd.h" #include "xAODTracking/TrackParticleContainerFwd.h" -#include "xAODCaloEvent/CaloClusterFwd.h" -#include "xAODCaloEvent/CaloClusterContainer.h" - - -class CaloCluster; class EMBremCollectionBuilder : public AthAlgorithm { + /*Helper struct, + * added here mainly for + * scopping + */ + + struct localCounter{ + unsigned int failedFitTracks{0}; + unsigned int refittedTracks{0}; + unsigned int failedSiliconRequirFit{0}; + }; + public: - /** @brief Default constructor*/ - EMBremCollectionBuilder(const std::string& name, ISvcLocator* pSvcLocator); + /** @brief Default constructor*/ + EMBremCollectionBuilder(const std::string& name, ISvcLocator* pSvcLocator); + + virtual StatusCode initialize() override final; + virtual StatusCode finalize() override final; + virtual StatusCode execute() override final; - virtual StatusCode initialize(); - virtual StatusCode finalize(); - virtual StatusCode execute(); private: - //------------------------------------------------------------------------ - // methods - //------------------------------------------------------------------------ - // - - /** @brief Refit of track */ - StatusCode refitTrack(const xAOD::TrackParticle* tmpTrkPart , + + /** @brief Refit of track */ + StatusCode refitTrack(const xAOD::TrackParticle* tmpTrkPart , TrackCollection* finalTracks, - xAOD::TrackParticleContainer* finalTrkPartContainer); - - /** @brief broad track selection */ - bool Select(const xAOD::CaloCluster* cluster, - bool trkTRT, - const xAOD::TrackParticle* track) const; - //------------------------------------------------------------------------ - // configurable data members - //------------------------------------------------------------------------ - /** @brief The track refitter */ - ToolHandle<IegammaTrkRefitterTool> m_trkRefitTool {this, - "TrackRefitTool", "ElectronRefitterTool", "Track refitter tool"}; - - /** @brief Tool to create track particle */ - ToolHandle< Trk::ITrackParticleCreatorTool > m_particleCreatorTool {this, - "TrackParticleCreatorTool", - "TrackParticleCreatorTool", - "TrackParticle creator tool"}; - - /** @brief Tool to slim tracks */ - ToolHandle<Trk::ITrackSlimmingTool> m_slimTool {this, - "TrackSlimmingTool", "TrkTrackSlimmingTool", "Track slimming tool"}; - - /** @brief Tool for Track summary */ - ToolHandle<Trk::ITrackSummaryTool> m_summaryTool {this, - "TrackSummaryTool", "InDetTrackSummaryTool", "Track summary tool"}; - - /** @brief Tool for extrapolation */ - ToolHandle<IEMExtrapolationTools> m_extrapolationTool {this, - "ExtrapolationTool", "EMExtrapolationTools", "Extrapolation tool"}; - - /** @brier Option to do truth*/ - Gaudi::Property<bool> m_doTruth {this, "DoTruth", false, "do truth"}; - - /** @brief Names of input output collections */ - SG::ReadHandleKey<xAOD::CaloClusterContainer> m_clusterContainerKey {this, - "ClusterContainerName", "LArClusterEM", "Input calo cluster for seeding"}; - - SG::ReadHandleKey<xAOD::TrackParticleContainer> m_trackParticleContainerKey {this, - "TrackParticleContainerName", "InDetTrackParticles", - "Input TrackParticles to refit"}; - - SG::WriteHandleKey<xAOD::TrackParticleContainer> m_OutputTrkPartContainerKey {this, - "OutputTrkPartContainerName", "GSFTrackParticles", - "Output refitted TrackParticles"}; - - SG::WriteHandleKey<TrackCollection> m_OutputTrackContainerKey {this, - "OutputTrackContainerName", "GSFTracks", "Output refitted Trk::Tracks"}; - - /** @Cut on minimum silicon hits*/ - Gaudi::Property<int> m_MinNoSiHits {this, "minNoSiHits", 4, - "Minimum number of silicon hits on track before it is allowed to be refitted"}; - - /** @brief broad cut on deltaEta*/ - Gaudi::Property<double> m_broadDeltaEta {this, "broadDeltaEta", 0.1, - "Value of broad cut for delta eta, it is mult by 2"}; - - /** @brief broad cut on deltaPhi*/ - Gaudi::Property<double> m_broadDeltaPhi {this, "broadDeltaPhi", 0.15, - "Value of broad cut for delta phi, it is mult by 2"}; - - /** @narrow windows*/ - Gaudi::Property<double> m_narrowDeltaEta {this, "narrowDeltaEta", 0.05, - "Value of narrow cut for delta eta"}; - - Gaudi::Property<double> m_narrowDeltaPhi {this, "narrowDeltaPhi", 0.05, - "Value of narrow cut for delta phi"}; - - Gaudi::Property<double> m_narrowDeltaPhiBrem {this, "narrowDeltaPhiBrem", 0.15, - "Value of the narrow cut for delta phi in the brem direction"}; - - Gaudi::Property<double> m_narrowRescale {this, "narrowDeltaPhiRescale", 0.05, - "Value of the narrow cut for delta phi Rescale"}; - - Gaudi::Property<double> m_narrowRescaleBrem {this, "narrowDeltaPhiRescaleBrem", 0.1, - "Value of the narrow cut for delta phi Rescale Brem"}; - - //counters - unsigned int m_AllClusters; - unsigned int m_AllTracks; - unsigned int m_AllTRTTracks; - unsigned int m_AllSiTracks; - unsigned int m_SelectedTracks; - unsigned int m_SelectedTRTTracks; - unsigned int m_SelectedSiTracks; - unsigned int m_FailedFitTracks; - unsigned int m_FailedSiliconRequirFit; - unsigned int m_RefittedTracks; - //------------------------------------------------------------------------ + xAOD::TrackParticleContainer* finalTrkPartContainer, + localCounter& counter) const; + + /** @brief The track refitter */ + ToolHandle<IegammaTrkRefitterTool> m_trkRefitTool {this, + "TrackRefitTool", "ElectronRefitterTool", "Track refitter tool"}; + + /** @brief Tool to create track particle */ + ToolHandle< Trk::ITrackParticleCreatorTool > m_particleCreatorTool {this, + "TrackParticleCreatorTool", + "TrackParticleCreatorTool", + "TrackParticle creator tool"}; + + /** @brief Tool to slim tracks */ + ToolHandle<Trk::ITrackSlimmingTool> m_slimTool {this, + "TrackSlimmingTool", "TrkTrackSlimmingTool", "Track slimming tool"}; + + /** @brief Tool for Track summary */ + ToolHandle<Trk::ITrackSummaryTool> m_summaryTool {this, + "TrackSummaryTool", "InDetTrackSummaryTool", "Track summary tool"}; + + /** @brief Tool for extrapolation */ + ToolHandle<IEMExtrapolationTools> m_extrapolationTool {this, + "ExtrapolationTool", "EMExtrapolationTools", "Extrapolation tool"}; + + /** @brier Option to do truth*/ + Gaudi::Property<bool> m_doTruth {this, "DoTruth", false, "do truth"}; + + SG::ReadHandleKey<xAOD::TrackParticleContainer> m_trackParticleContainerKey {this, + "TrackParticleContainerName", "InDetTrackParticles", + "Input InDet TrackParticles"}; + + /** @brief Names of input output collections */ + SG::ReadHandleKey<xAOD::TrackParticleContainer> m_selectedTrackParticleContainerKey {this, + "SelectedTrackParticleContainerName", "egammaSelectedTrackParticles", + "Input of Selected TrackParticles to refit"}; + + SG::WriteHandleKey<xAOD::TrackParticleContainer> m_OutputTrkPartContainerKey {this, + "OutputTrkPartContainerName", "GSFTrackParticles", + "Output refitted TrackParticles"}; + + SG::WriteHandleKey<TrackCollection> m_OutputTrackContainerKey {this, + "OutputTrackContainerName", "GSFTracks", "Output refitted Trk::Tracks"}; + + /** @Cut on minimum silicon hits*/ + Gaudi::Property<int> m_MinNoSiHits {this, "minNoSiHits", 4, + "Minimum number of silicon hits on track before it is allowed to be refitted"}; + + //counters + mutable std::atomic_uint m_FailedFitTracks{0}; + mutable std::atomic_uint m_RefittedTracks{0}; + mutable std::atomic_uint m_FailedSiliconRequirFit{0}; }; #endif // diff --git a/Reconstruction/egamma/egammaAlgs/src/EMVertexBuilder.h b/Reconstruction/egamma/egammaAlgs/src/EMVertexBuilder.h index 199da482b8dd..270fa1f0fc2a 100644 --- a/Reconstruction/egamma/egammaAlgs/src/EMVertexBuilder.h +++ b/Reconstruction/egamma/egammaAlgs/src/EMVertexBuilder.h @@ -26,10 +26,9 @@ class EMVertexBuilder : public AthAlgorithm { public: EMVertexBuilder (const std::string& name, ISvcLocator* pSvcLocator); - virtual StatusCode initialize(); - virtual StatusCode finalize(); - - virtual StatusCode execute(); + virtual StatusCode initialize() override final; + virtual StatusCode finalize() override final; + virtual StatusCode execute() override final; private: diff --git a/Reconstruction/egamma/egammaAlgs/src/components/egammaAlgs_entries.cxx b/Reconstruction/egamma/egammaAlgs/src/components/egammaAlgs_entries.cxx index c0b891b4fbcf..652d16ab4319 100644 --- a/Reconstruction/egamma/egammaAlgs/src/components/egammaAlgs_entries.cxx +++ b/Reconstruction/egamma/egammaAlgs/src/components/egammaAlgs_entries.cxx @@ -9,7 +9,7 @@ #include "../egammaTopoClusterCopier.h" #include "../electronSuperClusterBuilder.h" #include "../photonSuperClusterBuilder.h" - +#include "../egammaSelectedTrackCopy.h" DECLARE_COMPONENT( egammaBuilder ) DECLARE_COMPONENT( egammaRecBuilder ) @@ -22,4 +22,4 @@ DECLARE_COMPONENT( EMVertexBuilder ) DECLARE_COMPONENT( egammaTopoClusterCopier ) DECLARE_COMPONENT( electronSuperClusterBuilder ) DECLARE_COMPONENT( photonSuperClusterBuilder ) - +DECLARE_COMPONENT( egammaSelectedTrackCopy ) diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaBuilder.h b/Reconstruction/egamma/egammaAlgs/src/egammaBuilder.h old mode 100755 new mode 100644 index cb2e8cbb776b..b589c7979b75 --- a/Reconstruction/egamma/egammaAlgs/src/egammaBuilder.h +++ b/Reconstruction/egamma/egammaAlgs/src/egammaBuilder.h @@ -59,11 +59,11 @@ class egammaBuilder : public AthAlgorithm ~egammaBuilder(); /** @brief initialize method*/ - StatusCode initialize(); + StatusCode initialize() override final; /** @brief finalize method*/ - StatusCode finalize(); + StatusCode finalize() override final; /** @brief execute method*/ - StatusCode execute(); + StatusCode execute() override final; /** Given an egammaRec object, a pointer to the electron container and the author, * create and dress an electron, pushing it back to the container and diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaForwardBuilder.h b/Reconstruction/egamma/egammaAlgs/src/egammaForwardBuilder.h old mode 100755 new mode 100644 index 6da01af9ced2..a2c7a4a2d050 --- a/Reconstruction/egamma/egammaAlgs/src/egammaForwardBuilder.h +++ b/Reconstruction/egamma/egammaAlgs/src/egammaForwardBuilder.h @@ -53,11 +53,11 @@ class egammaForwardBuilder : public AthAlgorithm ~egammaForwardBuilder(); /** @brief initialize method*/ - StatusCode initialize(); + StatusCode initialize() override final; /** @brief finalize method*/ - StatusCode finalize(); + StatusCode finalize() override final; /** @brief execute method*/ - StatusCode execute(); + StatusCode execute() override final; /** @brief retrieve object quality tool */ void RetrieveObjectQualityTool(); diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.cxx old mode 100755 new mode 100644 diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.h b/Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.h old mode 100755 new mode 100644 index ad994f6dd618..51130429b60c --- a/Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.h +++ b/Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.h @@ -35,11 +35,11 @@ class egammaRecBuilder : public AthAlgorithm egammaRecBuilder(const std::string& name, ISvcLocator* pSvcLocator); /** @brief initialize method*/ - StatusCode initialize(); + StatusCode initialize() override final; /** @brief finalize method*/ - StatusCode finalize(); + StatusCode finalize() override final; /** @brief execute method*/ - StatusCode execute(); + StatusCode execute() override final; private: diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaSelectedTrackCopy.cxx b/Reconstruction/egamma/egammaAlgs/src/egammaSelectedTrackCopy.cxx new file mode 100644 index 000000000000..a4fedc9d71b0 --- /dev/null +++ b/Reconstruction/egamma/egammaAlgs/src/egammaSelectedTrackCopy.cxx @@ -0,0 +1,277 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + */ + +/* +NAME: egammaSelectedTrackCopy +PACKAGE: offline/Reconstruction/egamma/egammaAlgs/egammaSelectedTrackCopy +AUTHORS: Anastopoulos +CREATED: 25/06/2018 + +PURPOSE: Select track to be refitted later on with GSF +UPDATE : 25/06/2018 +*/ + +#include "egammaSelectedTrackCopy.h" +// +#include "egammaUtils/CandidateMatchHelpers.h" +#include "FourMomUtils/P4Helpers.h" +#include "AthenaKernel/errorcheck.h" +#include "xAODTracking/TrackParticle.h" +#include "xAODCaloEvent/CaloCluster.h" +#include "xAODTracking/TrackParticleContainer.h" +#include "xAODCaloEvent/CaloClusterContainer.h" +#include "xAODCore/ShallowCopy.h" + +#include "StoreGate/ReadHandle.h" +#include "StoreGate/WriteHandle.h" + +//std includes +#include <algorithm> +#include <cmath> +#include <memory> + +egammaSelectedTrackCopy::egammaSelectedTrackCopy(const std::string& name, + ISvcLocator* pSvcLocator): + AthAlgorithm(name, pSvcLocator) +{ +} + +StatusCode egammaSelectedTrackCopy::initialize() { + + ATH_CHECK(m_clusterContainerKey.initialize()); + ATH_CHECK(m_trackParticleContainerKey.initialize()); + ATH_CHECK(m_OutputTrkPartContainerKey.initialize()); + + /* the extrapolation tool*/ + if(m_extrapolationTool.retrieve().isFailure()){ + ATH_MSG_ERROR("initialize: Cannot retrieve extrapolationTool " << m_extrapolationTool); + return StatusCode::FAILURE; + } + + return StatusCode::SUCCESS; +} + +StatusCode egammaSelectedTrackCopy::egammaSelectedTrackCopy::finalize(){ + + ATH_MSG_INFO ("AllTracks " << m_AllTracks); + ATH_MSG_INFO ("AllSiTracks " << m_AllSiTracks); + ATH_MSG_INFO ("AllTRTTracks " << m_AllTRTTracks); + ATH_MSG_INFO ("SelectedTracks " << m_SelectedTracks); + ATH_MSG_INFO ("SelectedSiTracks " << m_SelectedSiTracks); + ATH_MSG_INFO ("SelectedTRTTracks " << m_SelectedTRTTracks); + return StatusCode::SUCCESS; +} + +StatusCode egammaSelectedTrackCopy::execute() +{ + SG::ReadHandle<xAOD::CaloClusterContainer> clusterTES(m_clusterContainerKey); + if(!clusterTES.isValid()) { + ATH_MSG_FATAL("Failed to retrieve cluster container: "<< m_clusterContainerKey.key()); + return StatusCode::FAILURE; + } + SG::ReadHandle<xAOD::TrackParticleContainer> trackTES(m_trackParticleContainerKey); + if(!trackTES.isValid()) { + ATH_MSG_FATAL("Failed to retrieve TrackParticle container: "<< m_trackParticleContainerKey.key()); + return StatusCode::FAILURE; + } + + SG::WriteHandle<ConstDataVector<xAOD::TrackParticleContainer> > outputTrkPartContainer(m_OutputTrkPartContainerKey); + /* + * Here it just needs to be a view copy , + * i.e the collection of selected trackParticles + * we create does not really own its elements + */ + auto viewCopy = std::make_unique<ConstDataVector <xAOD::TrackParticleContainer> >(SG::VIEW_ELEMENTS ); + + ATH_MSG_DEBUG ("Cluster container size: " << clusterTES->size() ); + ATH_MSG_DEBUG ("Track Particle container size: " <<trackTES->size() ); + + //Local counters + unsigned int allTracks(0); + unsigned int allTRTTracks(0); + unsigned int allSiTracks(0); + unsigned int selectedTracks(0); + unsigned int selectedTRTTracks(0); + unsigned int selectedSiTracks(0); + + for(const xAOD::TrackParticle* track : *trackTES){ + ATH_MSG_DEBUG ("Check Track with Eta "<< track->eta()<< " Phi " << track->phi()<<" Pt " <<track->pt()); + bool isTRT=false; + int nhits(0); + uint8_t dummy(0); + if( track->summaryValue(dummy,xAOD::numberOfPixelHits) ){ + nhits += dummy; + } + if( track->summaryValue(dummy,xAOD::numberOfSCTHits) ){ + nhits+= dummy; + } + ++allTracks; + if(nhits<4){ + isTRT = true; + ++allTRTTracks; + } else{ + isTRT = false; + ++allSiTracks; + } + for(const xAOD::CaloCluster* cluster : *clusterTES ){ + /* + check if it the track is selected due to this cluster. + If not continue to next cluster + */ + if(!Select(cluster, isTRT,track )){ + ATH_MSG_DEBUG ("Track did not match cluster"); + continue; + } + //Track is selected/matched + ATH_MSG_DEBUG ("Track Matched"); + //Push back the selected to the view container + viewCopy->push_back(track); + ++selectedTracks; + if(isTRT) { + ++selectedTRTTracks; + } + else { + ++selectedSiTracks; + } + /* + * The particular track got selected + * due to a cluster (any one of them will do) + * break here and move to the next track + */ + break; + }//Loop on clusters + }//Loop on tracks + + ATH_MSG_DEBUG ("Selected Track container size: " << viewCopy->size() ); + ATH_CHECK( outputTrkPartContainer.record(std::move(viewCopy)) ); + + /* + * Typical use for relaxed memory ordering is incrementing counters, + * (such as the reference counters of std::shared_ptr) + * since this only requires atomicity, but not ordering or synchronization. + */ + m_AllTracks.fetch_add(allTracks, std::memory_order_relaxed); + m_AllTRTTracks.fetch_add(allTRTTracks, std::memory_order_relaxed); + m_AllSiTracks.fetch_add(allSiTracks,std::memory_order_relaxed); + m_SelectedTracks.fetch_add(selectedTracks,std::memory_order_relaxed); + m_SelectedTRTTracks.fetch_add(selectedTRTTracks,std::memory_order_relaxed); + m_SelectedSiTracks.fetch_add(selectedSiTracks,std::memory_order_relaxed); + + return StatusCode::SUCCESS; +} + + + +bool egammaSelectedTrackCopy::Select(const xAOD::CaloCluster* cluster, + bool trkTRT, + const xAOD::TrackParticle* track) const +{ + + ATH_MSG_DEBUG("egammaSelectedTrackCopy::Select()" ); + if (cluster == 0 || track == 0) return false; + const Trk::Perigee& candidatePerigee = track->perigeeParameters(); + + //Get Perigee Parameters + double trkPhi = candidatePerigee.parameters()[Trk::phi]; + double trkEta = candidatePerigee.eta(); + double r_first=candidatePerigee.position().perp(); + double z_first=candidatePerigee.position().z(); + + //Get Cluster parameters + double clusterEta=cluster->etaBE(2); + bool isEndCap= cluster->inEndcap(); + double Et= cluster->e()/cosh(trkEta); + if(trkTRT){ + Et = cluster->et(); + } + + // a few sanity checks + if (fabs(clusterEta) > 10.0 || fabs(trkEta) > 10.0 || Et <= 0.0) { + ATH_MSG_DEBUG("FAILS sanity checks : Track Eta : " << trkEta + << ", Cluster Eta " << clusterEta ); + return false; + } + + //Calculate corrrected eta and Phi + double etaclus_corrected = CandidateMatchHelpers::CorrectedEta(clusterEta,z_first,isEndCap); + double phiRot = CandidateMatchHelpers::PhiROT(Et,trkEta, track->charge(),r_first ,isEndCap) ; + double phiRotTrack = CandidateMatchHelpers::PhiROT(track->pt(),trkEta, track->charge(),r_first ,isEndCap) ; + + //Calcualate deltaPhis + double deltaPhiStd = P4Helpers::deltaPhi(cluster->phiBE(2), trkPhi); + double trkPhiCorr = P4Helpers::deltaPhi(trkPhi, phiRot); + double deltaPhi2 = P4Helpers::deltaPhi(cluster->phiBE(2), trkPhiCorr); + double trkPhiCorrTrack = P4Helpers::deltaPhi(trkPhi, phiRotTrack); + double deltaPhi2Track = P4Helpers::deltaPhi(cluster->phiBE(2), trkPhiCorrTrack); + + if ((!trkTRT)&& fabs(cluster->etaBE(2) - trkEta) > 2*m_broadDeltaEta && + fabs( etaclus_corrected- trkEta) > 2.*m_broadDeltaEta){ + ATH_MSG_DEBUG("FAILS broad window eta match (track eta, cluster eta, cluster eta corrected): ( " + << trkEta << ", " << cluster->etaBE(2) <<", "<<etaclus_corrected<<")" ); + return false; + } + //if it does not fail the eta cut, does it fail the phi? + if ( (fabs(deltaPhi2) > 2*m_broadDeltaPhi) && (fabs(deltaPhi2Track) > 2.*m_broadDeltaPhi) + && (fabs(deltaPhiStd) > 2*m_broadDeltaPhi)){ + ATH_MSG_DEBUG("FAILS broad window phi match (track phi, phirotCluster , phiRotTrack ,cluster phi): ( " + << trkPhi << ", " << phiRot<< ", "<<phiRotTrack<< ", " << cluster->phiBE(2) << ")" ); + return false; + } + + //Extrapolate from last measurement, since this is before brem fit last measurement is better. + IEMExtrapolationTools::TrkExtrapDef extrapFrom = IEMExtrapolationTools::fromLastMeasurement; + std::vector<double> eta(4, -999.0); + std::vector<double> phi(4, -999.0); + std::vector<double> deltaEta(4, -999.0); + std::vector<double> deltaPhi(4, -999.0); + if (m_extrapolationTool->getMatchAtCalo (cluster, + track, + trkTRT, + Trk::alongMomentum, + eta, + phi, + deltaEta, + deltaPhi, + extrapFrom).isFailure()) {return false;} + + // Selection in narrow eta/phi window + if(( trkTRT || fabs(deltaEta[2]) < m_narrowDeltaEta ) && + deltaPhi[2] < m_narrowDeltaPhi && + deltaPhi[2] > -m_narrowDeltaPhiBrem) { + ATH_MSG_DEBUG("Standard Match success " << deltaPhi[2] ); + return true; + } + else if(!trkTRT && fabs(deltaEta[2]) < m_narrowDeltaEta ){ + ATH_MSG_DEBUG("Normal matched Failed deltaPhi/deltaEta " + << deltaPhi[2] <<" / "<< deltaEta[2]<<", Trying Rescale" ); + //Extrapolate from Perigee Rescaled + IEMExtrapolationTools::TrkExtrapDef extrapFrom1 = IEMExtrapolationTools::fromPerigeeRescaled; + std::vector<double> eta1(4, -999.0); + std::vector<double> phi1(4, -999.0); + std::vector<double> deltaEta1(4, -999.0); + std::vector<double> deltaPhi1(5, -999.0); // Set size to 5 to store deltaPhiRot + if (m_extrapolationTool->getMatchAtCalo (cluster, + track, + trkTRT, + Trk::alongMomentum, + eta1, + phi1, + deltaEta1, + deltaPhi1, + extrapFrom1).isFailure()) return false; + if( fabs(deltaEta1[2]) < m_narrowDeltaEta + && deltaPhi1[2] < m_narrowRescale + && deltaPhi1[2] > -m_narrowRescaleBrem) { + ATH_MSG_DEBUG("Rescale Match success " << deltaPhi1[2] ); + return true; + } + else { + ATH_MSG_DEBUG("Rescaled matched Failed deltaPhi/deltaEta " + << deltaPhi1[2] <<" / "<< deltaEta1[2] ); + return false; + } + } + ATH_MSG_DEBUG("Matched Failed deltaPhi/deltaEta " << deltaPhi[2] <<" / "<< deltaEta[2]<<",isTRT, "<< trkTRT); + return false; +} diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaSelectedTrackCopy.h b/Reconstruction/egamma/egammaAlgs/src/egammaSelectedTrackCopy.h new file mode 100644 index 000000000000..2d7878182f9d --- /dev/null +++ b/Reconstruction/egamma/egammaAlgs/src/egammaSelectedTrackCopy.h @@ -0,0 +1,102 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + */ + +#ifndef EGAMMAALGS_EGAMMASELECTEDTRACKCOPY_H +#define EGAMMAALGS_EGAMMASELECTEDTRACKCOPY_H + +/** + @class egammaSelectedTrackCopy + Algorithm which selectrs tracks to be GSF refitted + later on. + */ + +#include "egammaInterfaces/IEMExtrapolationTools.h" + +#include "AthenaBaseComps/AthAlgorithm.h" +#include "GaudiKernel/ToolHandle.h" +#include "StoreGate/ReadHandleKey.h" +#include "StoreGate/WriteHandleKey.h" + +#include "xAODTracking/TrackParticleFwd.h" +#include "xAODTracking/TrackParticleContainerFwd.h" +#include "xAODCaloEvent/CaloClusterFwd.h" +#include "xAODCaloEvent/CaloClusterContainer.h" +#include "AthContainers/ConstDataVector.h" + +#include <atomic> + +class CaloCluster; + +class egammaSelectedTrackCopy : public AthAlgorithm +{ +public: + /** @brief Default constructor*/ + egammaSelectedTrackCopy(const std::string& name, ISvcLocator* pSvcLocator); + + virtual StatusCode initialize() override final; + virtual StatusCode finalize() override final; + virtual StatusCode execute() override final; + +private: + /** @brief broad track selection */ + bool Select(const xAOD::CaloCluster* cluster, + bool trkTRT, + const xAOD::TrackParticle* track) const; + /** @brief Tool for extrapolation */ + ToolHandle<IEMExtrapolationTools> m_extrapolationTool {this, + "ExtrapolationTool", "EMExtrapolationTools", "Extrapolation tool"}; + + /** @brief Names of input output collections */ + SG::ReadHandleKey<xAOD::CaloClusterContainer> m_clusterContainerKey {this, + "ClusterContainerName", "LArClusterEM", "Input calo cluster for seeding"}; + + SG::ReadHandleKey<xAOD::TrackParticleContainer> m_trackParticleContainerKey {this, + "TrackParticleContainerName", "InDetTrackParticles", + "Input TrackParticles to select from"}; + + SG::WriteHandleKey< ConstDataVector<xAOD::TrackParticleContainer> > m_OutputTrkPartContainerKey {this, + "OutputTrkPartContainerName", "egammaSelectedTrackParticles", + "Output selected TrackParticles"}; + + /** @Cut on minimum silicon hits*/ + Gaudi::Property<int> m_MinNoSiHits {this, "minNoSiHits", 4, + "Minimum number of silicon hits on track before it is allowed to be refitted"}; + + /** @brief broad cut on deltaEta*/ + Gaudi::Property<double> m_broadDeltaEta {this, "broadDeltaEta", 0.1, + "Value of broad cut for delta eta, it is mult by 2"}; + + /** @brief broad cut on deltaPhi*/ + Gaudi::Property<double> m_broadDeltaPhi {this, "broadDeltaPhi", 0.15, + "Value of broad cut for delta phi, it is mult by 2"}; + + /** @narrow windows*/ + Gaudi::Property<double> m_narrowDeltaEta {this, "narrowDeltaEta", 0.05, + "Value of narrow cut for delta eta"}; + + Gaudi::Property<double> m_narrowDeltaPhi {this, "narrowDeltaPhi", 0.05, + "Value of narrow cut for delta phi"}; + + Gaudi::Property<double> m_narrowDeltaPhiBrem {this, "narrowDeltaPhiBrem", 0.15, + "Value of the narrow cut for delta phi in the brem direction"}; + + Gaudi::Property<double> m_narrowRescale {this, "narrowDeltaPhiRescale", 0.05, + "Value of the narrow cut for delta phi Rescale"}; + + Gaudi::Property<double> m_narrowRescaleBrem {this, "narrowDeltaPhiRescaleBrem", 0.1, + "Value of the narrow cut for delta phi Rescale Brem"}; + + /* counters. For now use mutable atomic + * the methods will increment a local variable + * inside the loops. + * At the end they will add_fetch to these ones + */ + mutable std::atomic_uint m_AllTracks{0}; + mutable std::atomic_uint m_AllTRTTracks{0}; + mutable std::atomic_uint m_AllSiTracks{0}; + mutable std::atomic_uint m_SelectedTracks{0}; + mutable std::atomic_uint m_SelectedTRTTracks{0}; + mutable std::atomic_uint m_SelectedSiTracks{0}; +}; +#endif diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.h b/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.h index 7207f8bff618..609bb223eca0 100644 --- a/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.h +++ b/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.h @@ -30,7 +30,7 @@ protected: egammaSuperClusterBuilder(const std::string& name, ISvcLocator* pSvcLocator); /** should be called by the derived class in the initialize phase */ - StatusCode initialize(); + StatusCode initialize() override; /** Is clus in window center around ref? */ bool MatchesInWindow(const xAOD::CaloCluster *ref, diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaTopoClusterCopier.h b/Reconstruction/egamma/egammaAlgs/src/egammaTopoClusterCopier.h index 2f47f0982426..a30dfcaa888d 100644 --- a/Reconstruction/egamma/egammaAlgs/src/egammaTopoClusterCopier.h +++ b/Reconstruction/egamma/egammaAlgs/src/egammaTopoClusterCopier.h @@ -23,7 +23,7 @@ class egammaTopoClusterCopier : public AthReentrantAlgorithm { /** @brief initialize method */ virtual StatusCode initialize() override final; /** @brief execute on container */ - virtual StatusCode execute_r(const EventContext& ctx) const override; + virtual StatusCode execute_r(const EventContext& ctx) const override final; /** @brief finalize method */ virtual StatusCode finalize() override final; diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaTrackSlimmer.h b/Reconstruction/egamma/egammaAlgs/src/egammaTrackSlimmer.h index 2f1ed3a25341..839cb5f622c4 100644 --- a/Reconstruction/egamma/egammaAlgs/src/egammaTrackSlimmer.h +++ b/Reconstruction/egamma/egammaAlgs/src/egammaTrackSlimmer.h @@ -33,11 +33,11 @@ class egammaTrackSlimmer : public AthAlgorithm ~egammaTrackSlimmer(); /** @brief initialize method*/ - StatusCode initialize(); + StatusCode initialize() override final; /** @brief finalize method*/ - StatusCode finalize(); + StatusCode finalize() override final; /** @brief execute method*/ - StatusCode execute(); + StatusCode execute() override final; private: diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaTruthAssociationAlg.h b/Reconstruction/egamma/egammaAlgs/src/egammaTruthAssociationAlg.h index a59388fcd7ac..944b5eefcb42 100644 --- a/Reconstruction/egamma/egammaAlgs/src/egammaTruthAssociationAlg.h +++ b/Reconstruction/egamma/egammaAlgs/src/egammaTruthAssociationAlg.h @@ -43,11 +43,11 @@ public: virtual ~egammaTruthAssociationAlg(); /** @brief initialize method */ - virtual StatusCode initialize(); + virtual StatusCode initialize() override final; /** @brief execute on container */ - virtual StatusCode execute(); + virtual StatusCode execute() override final; /** @brief finalize method */ - virtual StatusCode finalize(); + virtual StatusCode finalize() override final; private: diff --git a/Reconstruction/egamma/egammaAlgs/src/electronSuperClusterBuilder.h b/Reconstruction/egamma/egammaAlgs/src/electronSuperClusterBuilder.h index c6dd22c06f5d..3a63bbe8a93b 100644 --- a/Reconstruction/egamma/egammaAlgs/src/electronSuperClusterBuilder.h +++ b/Reconstruction/egamma/egammaAlgs/src/electronSuperClusterBuilder.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #ifndef EGAMMAALGS_ELECTRONSUPERCLUSTERBUILDER_H @@ -26,12 +26,9 @@ class electronSuperClusterBuilder : public egammaSuperClusterBuilder { electronSuperClusterBuilder(const std::string& name, ISvcLocator* pSvcLocator); //Tool standard routines. - StatusCode initialize(); - StatusCode finalize(); - //New StoreGate-based execute routine. Will use previously-established - //track-cluster matches and make a supercluster egammaRec - //container in StoreGate. - StatusCode execute(); + StatusCode initialize() override final; + StatusCode finalize() override final; + StatusCode execute() override final; private: diff --git a/Reconstruction/egamma/egammaAlgs/src/photonSuperClusterBuilder.h b/Reconstruction/egamma/egammaAlgs/src/photonSuperClusterBuilder.h index 1d82151bdd7d..653ec26f3234 100644 --- a/Reconstruction/egamma/egammaAlgs/src/photonSuperClusterBuilder.h +++ b/Reconstruction/egamma/egammaAlgs/src/photonSuperClusterBuilder.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #ifndef EGAMMAALGS_PHOTONSUPERCLUSTERBUILDER_H @@ -25,12 +25,9 @@ class photonSuperClusterBuilder : public egammaSuperClusterBuilder { photonSuperClusterBuilder(const std::string& name, ISvcLocator* pSvcLocator); //Tool standard routines. - StatusCode initialize(); - StatusCode finalize(); - //New StoreGate-based execute routine. Will use previously-established - //track-cluster vertex matches and make a supercluster egammaRec - //container in StoreGate. - StatusCode execute(); + StatusCode initialize() override final; + StatusCode finalize() override final; + StatusCode execute() override final; private: /** Return extra clusters that can be added to make supercluster */ diff --git a/Reconstruction/egamma/egammaAlgs/src/topoEgammaBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/topoEgammaBuilder.cxx old mode 100755 new mode 100644 diff --git a/Reconstruction/egamma/egammaAlgs/src/topoEgammaBuilder.h b/Reconstruction/egamma/egammaAlgs/src/topoEgammaBuilder.h old mode 100755 new mode 100644 index 405d3fcd6422..762edcd47d9c --- a/Reconstruction/egamma/egammaAlgs/src/topoEgammaBuilder.h +++ b/Reconstruction/egamma/egammaAlgs/src/topoEgammaBuilder.h @@ -41,11 +41,11 @@ public: topoEgammaBuilder(const std::string& name, ISvcLocator* pSvcLocator); /** @brief initialize method*/ - StatusCode initialize(); + StatusCode initialize() override final; /** @brief finalize method*/ - StatusCode finalize(); + StatusCode finalize() override final; /** @brief execute method*/ - StatusCode execute(); + StatusCode execute() override final; private: diff --git a/Reconstruction/egamma/egammaRec/python/egammaRecFlags.py b/Reconstruction/egamma/egammaRec/python/egammaRecFlags.py index 0ab5616e4f99..61367ac2e30e 100755 --- a/Reconstruction/egamma/egammaRec/python/egammaRecFlags.py +++ b/Reconstruction/egamma/egammaRec/python/egammaRecFlags.py @@ -1,3 +1,4 @@ + # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration #======================================================================= @@ -86,12 +87,6 @@ class cellContainerName (JobProperty): allowedTypes=['str'] StoredValue='' -class doSwitchTRTGas (JobProperty): - """ switch using Xenon gas in TRT - """ - statusOn=True - allowedTypes=['bool'] - StoredValue=True # Super cluster options class doSuperclusters (JobProperty): @@ -141,8 +136,8 @@ jobproperties.add_Container(egammaRecFlags) # I want always the following flags in the container _list_Egamma=[Enabled, doEgammaCaloSeeded, doEgammaForwardSeeded, doBremFinding, doVertexBuilding, - doConversions, doTopoCaloSeeded, cellContainerName, doSwitchTRTGas, - doEgammaTruthAssociation, clusterCorrectionVersion, calibMVAVersion, doSuperclusters, + doConversions, doTopoCaloSeeded, cellContainerName, doEgammaTruthAssociation, + clusterCorrectionVersion, calibMVAVersion, doSuperclusters, inputTopoClusterCollection, egammaTopoClusterCollection] for j in _list_Egamma: diff --git a/Reconstruction/egamma/egammaRec/share/egammaRec_RTT_topOptions.py b/Reconstruction/egamma/egammaRec/share/egammaRec_RTT_topOptions.py deleted file mode 100755 index a2af2f0d2706..000000000000 --- a/Reconstruction/egamma/egammaRec/share/egammaRec_RTT_topOptions.py +++ /dev/null @@ -1,46 +0,0 @@ -# topOptions for egammaRec_RTT -# -from RecExConfig.RecFlags import rec -from RecExConfig.RecFlags import recAlgs -# -rec.doESD = False # if false, all algorithms are switched off by defaults -doESD = rec.doESD() # if false, all algorithms are switched off by defaults -#only switched minimal algorithm -recAlgs.donewTracking = True -donewTracking = recAlgs.donewTracking() -# -recAlgs.doEmCluster = True -doEmCluster = recAlgs.doEmCluster() -# -recAlgs.doEgamma = True -doEgamma = recAlgs.doEgamma() -# -recAlgs.doConversion = True -doConversion = recAlgs.doConversion() -# -rec.doAOD = False -doAOD = rec.doAOD() -# -rec.doWriteAOD = False -doWriteAOD = rec.doWriteAOD() -# -rec.doWriteESD = False -doWriteESD = rec.doWriteESD() -# -rec.doWriteTAG = False -doWriteTAG = rec.doWriteTAG() -# number of event to process -#from AthenaCommon.AthenaCommonFlags import athenaCommonFlags -#athenaCommonFlags.EvtMax= 2000 -EvtMax= 2000 - -include ("RecExCommon/RecExCommon_flags.py") - -DetFlags.Muon_setOff() - -include ("RecExCommon/RecExCommon_topOptions.py") - -CBNT_MuonParticle=Algorithm("CBNT_MuonParticle") -CBNT_MuonParticle.Enable=False -CBNT_AodTrigger=Algorithm("CBNT_AodTrigger") -CBNT_AodTrigger.Enable=False diff --git a/Reconstruction/egamma/egammaRec/share/egammaRec_jobOptions.py b/Reconstruction/egamma/egammaRec/share/egammaRec_jobOptions.py index b9190c0634b1..18a980636f00 100755 --- a/Reconstruction/egamma/egammaRec/share/egammaRec_jobOptions.py +++ b/Reconstruction/egamma/egammaRec/share/egammaRec_jobOptions.py @@ -7,118 +7,130 @@ from AthenaCommon.Resilience import treatException from AthenaCommon.DetFlags import DetFlags from egammaRec import egammaKeys from egammaRec.egammaKeys import egammaKeysDict - - from AthenaCommon.AlgSequence import AlgSequence + topSequence = AlgSequence() -###############Print Egamma JobProperties############# jobproperties.egammaRecFlags.print_JobProperties("full") -##################################################################### - -# Run Brem builder. -if jobproperties.egammaRecFlags.doBremFinding() and DetFlags.detdescr.ID_on(): - try: - from egammaAlgs.EMBremCollectionBuilder import EMBremCollectionBuilder - EMBremCollectionBuilder() - except Exception: - treatException("Could not set up EMBremFinder. Switch it off !") - jobproperties.egammaRecFlags.doBremFinding=False - #EMBremCollectionBuilder(disable=True) - -# Run conversion vertex builder. -if jobproperties.egammaRecFlags.doVertexBuilding() and DetFlags.detdescr.ID_on(): - try: - from egammaAlgs.EMVertexBuilder import EMVertexBuilder - EMVertexBuilder() - except Exception: - treatException("Could not set up the conversion vertex building. Switch it off !") + +######The simple cases where we can already disable something + +# Truth +if not rec.doTruth(): + jobproperties.egammaRecFlags.doEgammaTruthAssociation = False + +#GSF and vertex building need the inner detector +if not DetFlags.detdescr.ID_on(): + jobproperties.egammaRecFlags.doBremFinding=False jobproperties.egammaRecFlags.doVertexBuilding=False - #EMVertexBuilder(disable=True) - -# Run calo-based (egamma) algorithm, includes topo-seeded -# It requires either to read ESD -# either that Emcluster have been build -if jobproperties.egammaRecFlags.doEgammaCaloSeeded() and ( rec.readESD() or jobproperties.CaloRecFlags.doEmCluster()) : - # - try: - if jobproperties.egammaRecFlags.doEgammaCaloSeeded: - if jobproperties.egammaRecFlags.doSuperclusters(): + +#GSF also is seeded by the LarEMClusters for now. So we need these as well +if not (rec.readESD() or jobproperties.CaloRecFlags.doEmCluster()): + jobproperties.egammaRecFlags.doBremFinding=False + +#We can not run Forward without having the TopoClusters +if not (rec.readESD() or jobproperties.CaloRecFlags.doCaloTopoCluster()): + jobproperties.egammaRecFlags.doEgammaForwardSeeded=False + +#######Helper Functions + +#Function to schedule the GSF +def setupGSF(): + try: + from egammaAlgs.egammaSelectedTrackCopy import egammaSelectedTrackCopy + egammaSelectedTrackCopy(doPrint=True) + except Exception: + treatException("Could not set up the egamma track Selection for GSF. Switch it off !") + jobproperties.egammaRecFlags.doBremFinding=False + try: + from egammaAlgs.EMBremCollectionBuilder import EMBremCollectionBuilder + EMBremCollectionBuilder(doPrint=True) + except Exception: + treatException("Could not set up EMBremCollectionBuilder. Switch it off !") + jobproperties.egammaRecFlags.doBremFinding=False + +#Function to schedule the vertices +def setupVertices(): + # Conversion vertex builder can not run in the default mode without GSF + try: + from egammaAlgs.EMVertexBuilder import EMVertexBuilder + EMVertexBuilder(doPrint=True) + except Exception: + treatException("Could not set up the conversion vertex building. Switch it off !") + jobproperties.egammaRecFlags.doVertexBuilding=False + +#Function to schedule the Topo cluster based egamma +def setupTopoSeededEgamma(): + try: from egammaRec.topoEgammaGetter import topoEgammaGetter topoEgammaGetter(ignoreExistingDataObject=True) - else: + except Exception: + treatException("Could not set up topoEgammaGetter. Switch it off !") + #If we wanted Topo based cluster seeded egamma it just failed + jobproperties.egammaRecFlags.doEgammaCaloSeeded=False + topoEgammaGetter(disable=True) + + +#Function to schedule the SW seeded egamma (only if we do not do super clusters). +def setupSWSeededEgamma(): + try: from egammaRec.egammaGetter import egammaGetter egammaGetter(ignoreExistingDataObject=True) - except Exception: - treatException("Could not set up egammaGetter or topoEgammaGetter. Switch it off !") - jobproperties.egammaRecFlags.doEgammaCaloSeeded=False - if jobproperties.egammaRecFlags.doSuperclusters(): - topoEgammaGetter(disable=True) - else: - egammaGetter(disable=True) -else: - jobproperties.egammaRecFlags.doEgammaCaloSeeded=False - - # Is the stuff below really necessary? - - # try: - # from egammaRec.egammaGetter import egammaGetter - # egammaGetter(disable=True) - # except Exception: - # pass - -#################################################################### -# Run forward electrons algorithm -# It requires either to read ESD -# either that CaloTopoCluster have been build -# It is not run if scoping level is greater or equal to 5 (so a priori always) -if jobproperties.egammaRecFlags.doEgammaForwardSeeded and ( rec.readESD() or jobproperties.CaloRecFlags.doCaloTopoCluster()): - try: - from egammaRec.egammaForwardGetter import egammaForwardGetter - # descoping of track-seeded algorithm - if rec.ScopingLevel()>=5: - egammaForwardGetter(disable=True) - else: - egammaForwardGetter(ignoreExistingDataObject=True) - except Exception: - jobproperties.egammaRecFlags.doEgammaForwardSeeded=False - treatException("Could not set up egammaForwardGetter. Switch it off !") - egammaForwardGetter(disable=True) -else: - jobproperties.egammaRecFlags.doEgammaForwardSeeded=False - try: - from egammaRec.egammaForwardGetter import egammaForwardGetter - egammaForwardGetter(disable=True) - except Exception: - pass - -#################################################################### -# Run association between true and reco objects -# It requires Truth and some of the above to be actually there + except Exception: + treatException("Could not set up egammaGetter. Switch it off !") + #If we wanted SW based cluster seeded egamma it just failed + jobproperties.egammaRecFlags.doEgammaCaloSeeded=False + egammaGetter(disable=True) -if not rec.doTruth(): - jobproperties.egammaRecFlags.doEgammaTruthAssociation = False - -if jobproperties.egammaRecFlags.doEgammaTruthAssociation() and jobproperties.egammaRecFlags.doEgammaCaloSeeded() : - try: - from egammaRec.egammaTruthAssociationAlg import egammaTruthAssociationGetter - egammaTruthAssociationGetter(ignoreExistingDataObject=True) - except Exception: - treatException("Could not set up egammaTruthAssociationAlg. Switched off !") - egammaTruthAssociationGetter(disable=True) - -#################################################################### -# miscallaneous algorithms -if rec.doESD(): - - #Decorate cluster with links to Topo clusters (when not superclusters) - if not jobproperties.egammaRecFlags.doSuperclusters: +#Function to schedule the Fwd egamma +def setupFwdSeededEgamma(): + try: + from egammaRec.egammaForwardGetter import egammaForwardGetter + egammaForwardGetter(ignoreExistingDataObject=True) + except Exception: + treatException("Could not set up egammaForwardGetter. Switch it off !") + jobproperties.egammaRecFlags.doEgammaForwardSeeded=False + egammaForwardGetter(disable=True) + +#Function to schedule the Truth Association +def setupTruthAssociation(): try: - topSequence+=CfgMgr.ClusterMatching__CaloClusterMatchLinkAlg("EgammaTCLinks", - ClustersToDecorate=egammaKeys.outputClusterKey()) - topSequence+=CfgMgr.ClusterMatching__CaloClusterMatchLinkAlg("TopoEgammaTCLinks", - ClustersToDecorate=egammaKeys.outputTopoSeededClusterKey()) - - except: - treatException("Could not set up ClusterMatching tool! Switched off") + from egammaRec.egammaTruthAssociationAlg import egammaTruthAssociationGetter + egammaTruthAssociationGetter(ignoreExistingDataObject=True) + except Exception: + treatException("Could not set up egammaTruthAssociationAlg. Switched off !") + jobproperties.egammaRecFlags.doEgammaTruthAssociation=False + egammaTruthAssociationGetter(disable=True) + + +######## Do the actual scheduling +if jobproperties.egammaRecFlags.doBremFinding(): + setupGSF() +if jobproperties.egammaRecFlags.doVertexBuilding(): + setupVertices() +#Calo seeded egamma +# Either we can do TopoSeeded superClusters +# Or we can do SW seeded +# Or we can do nothing (i.e no ESD nor CaloTopo nor LarEM clusters) +if jobproperties.egammaRecFlags.doEgammaCaloSeeded(): + if jobproperties.egammaRecFlags.doSuperclusters() and (jobproperties.CaloRecFlags.doCaloTopoCluster() or rec.readESD()): + setupTopoSeededEgamma() + elif not jobproperties.egammaRecFlags.doSuperclusters() and (jobproperties.CaloRecFlags.doEmCluster() or rec.readESD()): + setupSWSeededEgamma() + #Special algs to run on ESD when we do standard egamma + if rec.doESD(): + try: + topSequence+=CfgMgr.ClusterMatching__CaloClusterMatchLinkAlg("EgammaTCLinks", + ClustersToDecorate=egammaKeys.outputClusterKey()) + topSequence+=CfgMgr.ClusterMatching__CaloClusterMatchLinkAlg("TopoEgammaTCLinks", + ClustersToDecorate=egammaKeys.outputTopoSeededClusterKey()) + except: + treatException("Could not set up ClusterMatching tool! Switched off") + else: + jobproperties.egammaRecFlags.doEgammaCaloSeeded=False + +if jobproperties.egammaRecFlags.doEgammaForwardSeeded(): + setupFwdSeededEgamma() +if jobproperties.egammaRecFlags.doEgammaTruthAssociation() and jobproperties.egammaRecFlags.doEgammaCaloSeeded(): + setupTruthAssociation() -- GitLab From 41d5eae3aec1d2e9cfdc7127bf43023309996658 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Wed, 4 Jul 2018 10:28:11 +0200 Subject: [PATCH 360/562] AthViews: Coverity 118568-118571. Coverity warnings: unchecked results of dynamic_cast. Former-commit-id: e5ab5672fa832992addb85cb9de2ef45f767b176 --- .../test/ViewCollectionMerge_test.cxx | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/Control/AthViews/test/ViewCollectionMerge_test.cxx b/Control/AthViews/test/ViewCollectionMerge_test.cxx index 986fa8b7afd5..d223f791f0e0 100644 --- a/Control/AthViews/test/ViewCollectionMerge_test.cxx +++ b/Control/AthViews/test/ViewCollectionMerge_test.cxx @@ -94,6 +94,9 @@ protected: m_jobOptionsSvc = m_svcLoc->service("JobOptionsSvc"); ASSERT_TRUE( m_jobOptionsSvc.isValid() ); + + m_sg = nullptr; + ASSERT_TRUE( m_svcLoc->service ("StoreGateSvc", m_sg).isSuccess() ); } void TearDownGaudi() { @@ -105,6 +108,11 @@ protected: Gaudi::setInstance( static_cast<IAppMgrUI*>(nullptr) ); } + StoreGateSvc* evtStore() + { + return m_sg; + } + // protected member variables for Core Gaudi components IAppMgrUI* m_appMgr = nullptr; SmartIF<ISvcLocator> m_svcLoc; @@ -112,6 +120,7 @@ protected: SmartIF<IJobOptionsSvc> m_jobOptionsSvc; SmartIF<IToolSvc> m_toolSvc; SmartIF<IProperty> m_propMgr; + StoreGateSvc* m_sg; }; @@ -393,8 +402,7 @@ TEST_F( ViewCollectionMerge_test, elementLinkRemapTest ) { ASSERT_TRUE( outputDataHandle2.isValid() ); // Declare remapping - StoreGateSvc * storeGate = dynamic_cast< StoreGateSvc* >( m_svcLoc->service( "StoreGateSvc" ).get() ); - storeGate->remap( ClassID_traits< DataVector< int > >::ID(), DATA_NAME, DATA_NAME + "2", 0 ); + evtStore()->remap( ClassID_traits< DataVector< int > >::ID(), DATA_NAME, DATA_NAME + "2", 0 ); // Test the link again - should not have changed ASSERT_TRUE( dataLink.isValid() ); @@ -447,8 +455,7 @@ TEST_F( ViewCollectionMerge_test, elementLinkViewRemapTest ) { ASSERT_TRUE( outputDataHandle2.isValid() ); // Declare remapping - pretty hacky, have to specify view object names explicitly - StoreGateSvc * storeGate = dynamic_cast< StoreGateSvc* >( m_svcLoc->service( "StoreGateSvc" ).get() ); - storeGate->remap( ClassID_traits< DataVector< int > >::ID(), "testView_" + DATA_NAME, "testView_" + DATA_NAME + "2", 0 ); + evtStore()->remap( ClassID_traits< DataVector< int > >::ID(), "testView_" + DATA_NAME, "testView_" + DATA_NAME + "2", 0 ); // Test the link again - should not have changed ASSERT_TRUE( dataLink.isValid() ); @@ -537,9 +544,8 @@ TEST_F( ViewCollectionMerge_test, elementLinkMergeRemapTest ) { ASSERT_TRUE( outputDataHandle.isValid() ); // Declare remapping - pretty hacky, have to specify view object names explicitly - StoreGateSvc * storeGate = dynamic_cast< StoreGateSvc* >( m_svcLoc->service( "StoreGateSvc" ).get() ); - storeGate->remap( ClassID_traits< DataVector< int > >::ID(), "testView1_" + DATA_NAME, DATA_NAME, 0 ); - storeGate->remap( ClassID_traits< DataVector< int > >::ID(), "testView2_" + DATA_NAME, DATA_NAME, 1 ); + evtStore()->remap( ClassID_traits< DataVector< int > >::ID(), "testView1_" + DATA_NAME, DATA_NAME, 0 ); + evtStore()->remap( ClassID_traits< DataVector< int > >::ID(), "testView2_" + DATA_NAME, DATA_NAME, 1 ); // Element link should still be pointing to view container ASSERT_TRUE( dataLink.isValid() ); @@ -638,9 +644,8 @@ TEST_F( ViewCollectionMerge_test, elementLinkMergeRemapBookkeepTest ) { ASSERT_TRUE( auxHandle.isValid() ); // Declare remapping - pretty hacky, have to specify view object names explicitly - StoreGateSvc * storeGate = dynamic_cast< StoreGateSvc* >( m_svcLoc->service( "StoreGateSvc" ).get() ); - storeGate->remap( ClassID_traits< DataVector< DummyData > >::ID(), "testView1_" + DATA_NAME, DATA_NAME, 0 ); - storeGate->remap( ClassID_traits< DataVector< DummyData > >::ID(), "testView2_" + DATA_NAME, DATA_NAME, 1 ); + evtStore()->remap( ClassID_traits< DataVector< DummyData > >::ID(), "testView1_" + DATA_NAME, DATA_NAME, 0 ); + evtStore()->remap( ClassID_traits< DataVector< DummyData > >::ID(), "testView2_" + DATA_NAME, DATA_NAME, 1 ); // Element link should still be pointing to view container ASSERT_TRUE( dataLink.isValid() ); @@ -667,8 +672,7 @@ TEST_F( ViewCollectionMerge_test, mergeHelperTest ) { // Make a dummy event context EventContext dummyContext( 0, 0 ); - StoreGateSvc * storeGate = dynamic_cast< StoreGateSvc* >( m_svcLoc->service( "StoreGateSvc" ).get() ); - dummyContext.setExtension( Atlas::ExtendedEventContext( storeGate, 0 ) ); + dummyContext.setExtension( Atlas::ExtendedEventContext( evtStore(), 0 ) ); // Parcel the view data auto viewData = std::vector< DataVector< DummyData > >( 2 ); @@ -707,7 +711,7 @@ TEST_F( ViewCollectionMerge_test, mergeHelperTest ) { inputDataHandleKey.initialize(); MsgStream log(Athena::getMessageSvc(), "ViewCollectionMerge_test"); - ViewHelper::ViewMerger merger( storeGate, log); + ViewHelper::ViewMerger merger( evtStore(), log); ASSERT_TRUE( merger.mergeViewCollection( *inputViewsHandle, inputDataHandleKey, dummyContext, *mergedData ).isSuccess() ); // Verify merging -- GitLab From 5b4ec2af7a4e915870675b1368222e5cedcaea62 Mon Sep 17 00:00:00 2001 From: Jovan Mitrevski <Jovan.Mitrevski@cern.ch> Date: Wed, 4 Jul 2018 17:19:37 +0200 Subject: [PATCH 361/562] Allow for disabled tools in egammaMVASvc Former-commit-id: c2b0d3f9581a5ed8f557c030f0701865a8d0752b --- .../egammaMVACalib/src/egammaMVASvc.cxx | 62 ++++++++++++++++--- 1 file changed, 53 insertions(+), 9 deletions(-) diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx index 70393c5948dc..d290eba171b6 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx @@ -25,9 +25,23 @@ StatusCode egammaMVASvc::initialize() { ATH_MSG_DEBUG("In initialize of " << name() << "..." ); - ATH_CHECK(m_mvaElectron.retrieve()); - ATH_CHECK(m_mvaUnconvertedPhoton.retrieve()); - ATH_CHECK(m_mvaConvertedPhoton.retrieve()); + if (m_mvaElectron.isEnabled()) { + ATH_CHECK(m_mvaElectron.retrieve()); + } else { + m_mvaElectron.disable(); + } + + if (m_mvaUnconvertedPhoton.isEnabled()) { + ATH_CHECK(m_mvaUnconvertedPhoton.retrieve()); + } else { + m_mvaUnconvertedPhoton.disable(); + } + + if (m_mvaConvertedPhoton.isEnabled()) { + ATH_CHECK(m_mvaConvertedPhoton.retrieve()); + } else { + m_mvaConvertedPhoton.disable(); + } return StatusCode::SUCCESS; } @@ -49,11 +63,26 @@ StatusCode egammaMVASvc::execute(xAOD::CaloCluster* cluster, float mvaE = 0.0; if (xAOD::EgammaHelpers::isElectron(eg)) { - mvaE = m_mvaElectron->getEnergy(eg, cluster); + if (m_mvaElectron.isEnabled()) { + mvaE = m_mvaElectron->getEnergy(eg, cluster); + } else { + ATH_MSG_FATAL("Trying to calibrate an electron, but disabled"); + return StatusCode::FAILURE; + } } else if (xAOD::EgammaHelpers::isConvertedPhoton(eg)) { - mvaE = m_mvaConvertedPhoton->getEnergy(eg, cluster); + if (m_mvaConvertedPhoton.isEnabled()) { + mvaE = m_mvaConvertedPhoton->getEnergy(eg, cluster); + } else { + ATH_MSG_FATAL("Trying to calibrate a converted photon, but disabled"); + return StatusCode::FAILURE; + } } else if (xAOD::EgammaHelpers::isPhoton(eg)) { - mvaE = m_mvaUnconvertedPhoton->getEnergy(eg, cluster); + if (m_mvaUnconvertedPhoton.isEnabled()) { + mvaE = m_mvaUnconvertedPhoton->getEnergy(eg, cluster); + } else { + ATH_MSG_FATAL("Trying to calibrate an unconverted photon, but disabled"); + return StatusCode::FAILURE; + } } else { ATH_MSG_FATAL("Egamma object is of unsupported type"); return StatusCode::FAILURE; @@ -81,13 +110,28 @@ StatusCode egammaMVASvc::execute(xAOD::CaloCluster* cluster, float mvaE = 0.0; switch (egType) { case xAOD::EgammaParameters::electron: - mvaE = m_mvaElectron->getEnergy(nullptr, cluster); + if (m_mvaElectron.isEnabled()) { + mvaE = m_mvaElectron->getEnergy(nullptr, cluster); + } else { + ATH_MSG_FATAL("Trying to calibrate an electron, but disabled"); + return StatusCode::FAILURE; + } break; case xAOD::EgammaParameters::convertedPhoton: - mvaE = m_mvaConvertedPhoton->getEnergy(nullptr, cluster); + if (m_mvaConvertedPhoton.isEnabled()) { + mvaE = m_mvaConvertedPhoton->getEnergy(nullptr, cluster); + } else { + ATH_MSG_FATAL("Trying to calibrate a converted photon, but disabled"); + return StatusCode::FAILURE; + } break; case xAOD::EgammaParameters::unconvertedPhoton: - mvaE = m_mvaUnconvertedPhoton->getEnergy(nullptr, cluster); + if (m_mvaUnconvertedPhoton.isEnabled()) { + mvaE = m_mvaUnconvertedPhoton->getEnergy(nullptr, cluster); + } else { + ATH_MSG_FATAL("Trying to calibrate an unconverted photon, but disabled"); + return StatusCode::FAILURE; + } break; default: ATH_MSG_FATAL("Egamma object is of unsupported type"); -- GitLab From ec758e213bf714ea75e599d665d73f2a0446318e Mon Sep 17 00:00:00 2001 From: Jovan Mitrevski <Jovan.Mitrevski@cern.ch> Date: Wed, 4 Jul 2018 18:29:53 +0200 Subject: [PATCH 362/562] Modify tools and algs to use IegammaMVASvc instead of tool Former-commit-id: 19aa7ef9abfc60cd37d22f5474d37a6d9564368f --- .../egammaAlgs/src/egammaSuperClusterBuilder.cxx | 11 ++++++----- .../egammaAlgs/src/egammaSuperClusterBuilder.h | 8 ++++---- .../egamma/egammaTools/src/EMClusterTool.cxx | 10 +++++----- .../egamma/egammaTools/src/EMClusterTool.h | 8 ++++---- .../TrigEgammaAnalysisTools/TrigEgammaNavBaseTool.h | 2 -- .../TrigEgammaNavTPBaseTool.h | 2 -- .../TrigEgammaHypo/TrigEFCaloCalibFex.h | 5 +++-- .../TrigEgammaHypo/src/TrigEFCaloCalibFex.cxx | 13 ++++++------- 8 files changed, 28 insertions(+), 31 deletions(-) diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx index 8c552719ccdd..6ebe3417e3a6 100644 --- a/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx +++ b/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx @@ -145,10 +145,11 @@ StatusCode egammaSuperClusterBuilder::initialize() { m_clusterCorrectionTool.disable(); } if (m_calibrateClusters) { - ATH_CHECK(m_MVACalibTool.retrieve()); - } else { - m_MVACalibTool.disable(); - } + ATH_CHECK(m_MVACalibSvc.retrieve()); + } + // else { + // m_MVACalibSvc.disable(); + // } return StatusCode::SUCCESS; } @@ -400,7 +401,7 @@ StatusCode egammaSuperClusterBuilder::CalibrateCluster(xAOD::CaloCluster* newClu //So We will need at the end to do the final update in the EMClusterTool //For now apply just cluster info only calibration. if (m_calibrateClusters) { - ATH_CHECK(m_MVACalibTool->execute(newCluster,egType)); + ATH_CHECK(m_MVACalibSvc->execute(newCluster,egType)); } ATH_MSG_DEBUG("========== cluster only calibration ==== "); ATH_MSG_DEBUG("Cluster Energy after cluster only calibration: "<<newCluster->e()); diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.h b/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.h index 7207f8bff618..97d94ca6b6b6 100644 --- a/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.h +++ b/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.h @@ -17,7 +17,7 @@ #include "CaloUtils/CaloCellDetPos.h" #include "xAODEgamma/EgammaEnums.h" #include "egammaInterfaces/IegammaSwTool.h" -#include "egammaMVACalib/IegammaMVATool.h" +#include "egammaInterfaces/IegammaMVASvc.h" /** Base class for electronSuperClusterBuilder and photonSuperClusterBuilder. * The inheritance should be private. This class should never be instantiated @@ -141,9 +141,9 @@ private: Gaudi::Property<bool> m_calibrateClusters {this, "CalibrateClusters", true, "Whether to run cluster calibrations"}; - /** @brief Handle to the MVA calibration Tool **/ - PublicToolHandle<IegammaMVATool> m_MVACalibTool {this, - "MVACalibTool", "egammaMVATool", "calibration tool"}; + /** @brief Handle to the MVA calibration service **/ + ServiceHandle<IegammaMVASvc> m_MVACalibSvc {this, + "MVACalibSvc", "egammaMVASvc", "calibration service"}; /** @brief Tool to handle cluster corrections */ ToolHandle<IegammaSwTool> m_clusterCorrectionTool {this, diff --git a/Reconstruction/egamma/egammaTools/src/EMClusterTool.cxx b/Reconstruction/egamma/egammaTools/src/EMClusterTool.cxx index 7582c6b6db2e..f3569e3c91dd 100644 --- a/Reconstruction/egamma/egammaTools/src/EMClusterTool.cxx +++ b/Reconstruction/egamma/egammaTools/src/EMClusterTool.cxx @@ -59,12 +59,12 @@ StatusCode EMClusterTool::initialize() { // Get the cluster correction tool - if(m_MVACalibTool.retrieve().isFailure()) { - ATH_MSG_ERROR("Failed to retrieve " << m_MVACalibTool); + if(m_MVACalibSvc.retrieve().isFailure()) { + ATH_MSG_ERROR("Failed to retrieve " << m_MVACalibSvc); return StatusCode::SUCCESS; } else { - ATH_MSG_DEBUG("Retrieved tool " << m_MVACalibTool); + ATH_MSG_DEBUG("Retrieved tool " << m_MVACalibSvc); } ATH_MSG_DEBUG("Initialization successful"); @@ -205,7 +205,7 @@ xAOD::CaloCluster* EMClusterTool::makeNewCluster(const xAOD::CaloCluster& cluste } xAOD::CaloCluster *newCluster = makeNewCluster(cluster, cluSize); - if (newCluster && m_MVACalibTool->execute(newCluster,eg).isFailure()){ + if (newCluster && m_MVACalibSvc->execute(newCluster,eg).isFailure()){ ATH_MSG_ERROR("Problem executing MVA cluster tool"); } return newCluster; @@ -242,7 +242,7 @@ xAOD::CaloCluster* EMClusterTool::makeNewSuperCluster(const xAOD::CaloCluster& c // xAOD::CaloCluster* newClus = new xAOD::CaloCluster(cluster); if(m_applySuperClusters){ - if (newClus && m_MVACalibTool->execute(newClus,eg).isFailure()){ + if (newClus && m_MVACalibSvc->execute(newClus,eg).isFailure()){ ATH_MSG_ERROR("Problem executing MVA cluster tool"); } } diff --git a/Reconstruction/egamma/egammaTools/src/EMClusterTool.h b/Reconstruction/egamma/egammaTools/src/EMClusterTool.h index 5007c500bf6b..0d1e8fbea819 100644 --- a/Reconstruction/egamma/egammaTools/src/EMClusterTool.h +++ b/Reconstruction/egamma/egammaTools/src/EMClusterTool.h @@ -12,7 +12,7 @@ #include "egammaBaseTool.h" #include "egammaInterfaces/IegammaSwTool.h" -#include "egammaMVACalib/IegammaMVATool.h" +#include "egammaInterfaces/IegammaMVASvc.h" #include "xAODCaloEvent/CaloCluster.h" // cannot use CaloClusterFwd b/c of ClusterSize #include "xAODCaloEvent/CaloClusterContainer.h" @@ -109,9 +109,9 @@ class EMClusterTool : public AthAlgTool, virtual public IEMClusterTool { * name taken from containter name */ SG::WriteHandleKey<CaloClusterCellLinkContainer> m_outputTopoSeededClusterContainerCellLinkKey; - /** Handle to the MVA calibration Tool **/ - PublicToolHandle<IegammaMVATool> m_MVACalibTool {this, - "MVACalibTool", "egammaMVATool", "calibration tool"}; + /** Handle to the MVA calibration service **/ + ServiceHandle<IegammaMVASvc> m_MVACalibSvc {this, + "MVACalibSvc", "egammaMVASvc", "calibration service"}; /** @brief Name of the input electron container **/ std::string m_electronContainerName; diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/TrigEgammaAnalysisTools/TrigEgammaNavBaseTool.h b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/TrigEgammaAnalysisTools/TrigEgammaNavBaseTool.h index d44ff092a34e..850ed18d98bd 100755 --- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/TrigEgammaAnalysisTools/TrigEgammaNavBaseTool.h +++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/TrigEgammaAnalysisTools/TrigEgammaNavBaseTool.h @@ -30,7 +30,6 @@ #include "xAODCaloEvent/CaloClusterAuxContainer.h" #include "xAODJet/JetContainer.h" #include "xAODTrigger/EmTauRoIContainer.h" -#include "egammaMVACalib/IegammaMVATool.h" #include "EgammaAnalysisInterfaces/IAsgElectronIsEMSelector.h" #include "EgammaAnalysisInterfaces/IAsgPhotonIsEMSelector.h" #include "EgammaAnalysisInterfaces/IAsgElectronLikelihoodTool.h" @@ -39,7 +38,6 @@ namespace Trig{ class FeatureContainer; } -class IegammaMVATool; class TrigEgammaNavBaseTool : public TrigEgammaAnalysisBaseTool, diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/TrigEgammaAnalysisTools/TrigEgammaNavTPBaseTool.h b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/TrigEgammaAnalysisTools/TrigEgammaNavTPBaseTool.h index 27a7c801734a..317521db5d47 100644 --- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/TrigEgammaAnalysisTools/TrigEgammaNavTPBaseTool.h +++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/TrigEgammaAnalysisTools/TrigEgammaNavTPBaseTool.h @@ -29,7 +29,6 @@ #include "xAODCaloEvent/CaloClusterAuxContainer.h" #include "xAODJet/JetContainer.h" #include "xAODTrigger/EmTauRoIContainer.h" -#include "egammaMVACalib/IegammaMVATool.h" #include "EgammaAnalysisInterfaces/IAsgElectronIsEMSelector.h" #include "EgammaAnalysisInterfaces/IAsgPhotonIsEMSelector.h" #include "EgammaAnalysisInterfaces/IAsgElectronLikelihoodTool.h" @@ -37,7 +36,6 @@ namespace Trig{ class FeatureContainer; } -class IegammaMVATool; class TrigEgammaNavTPBaseTool : public TrigEgammaAnalysisBaseTool, diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/TrigEgammaHypo/TrigEFCaloCalibFex.h b/Trigger/TrigHypothesis/TrigEgammaHypo/TrigEgammaHypo/TrigEFCaloCalibFex.h index 03c7c966fa12..95d1096b71bf 100755 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/TrigEgammaHypo/TrigEFCaloCalibFex.h +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/TrigEgammaHypo/TrigEFCaloCalibFex.h @@ -32,8 +32,9 @@ #include "xAODCaloEvent/CaloClusterContainer.h" #include "CaloUtils/CaloCellDetPos.h" +#include "egammaInterfaces/IegammaMVASvc.h" + class TrigCaloQuality; -class IegammaMVATool; /** * \class TrigEFCaloCalibFex * \brief TrigEFCaloCalibFex is a Trigger Fex Algorithm that retrieves the EF xAODCaloCluster @@ -67,7 +68,7 @@ class TrigEFCaloCalibFex : public HLT::FexAlgo { CaloCellDetPos *m_caloCellDetPos; /** Handle to the MVA calibration Tool **/ - ToolHandle<IegammaMVATool> m_MVACalibTool; + ServiceHandle<IegammaMVASvc> m_MVACalibSvc {this, "MVACalibSvc", ""}; // Timers TrigTimer* m_totalTimer; diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEFCaloCalibFex.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEFCaloCalibFex.cxx index 065eebc86898..44239385a9b3 100755 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEFCaloCalibFex.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEFCaloCalibFex.cxx @@ -21,7 +21,6 @@ #include "xAODCaloEvent/CaloClusterContainer.h" #include "CaloUtils/CaloClusterStoreHelper.h" #include "TrigCaloRec/TrigCaloQuality.h" -#include "egammaMVACalib/IegammaMVATool.h" #include "xAODEgamma/EgammaEnums.h" class ISvcLocator; @@ -33,7 +32,7 @@ TrigEFCaloCalibFex::TrigEFCaloCalibFex(const std::string & name, ISvcLocator* pS // Read cuts - should probably get these from an xml file declareProperty( "AcceptAll", m_acceptAll = false ); declareProperty( "egType", m_egType = "Electron"); - declareProperty("MVACalibTool", m_MVACalibTool); + //declareProperty("MVACalibSvc", m_MVACalibSvc); declareProperty("ApplyMVACalib", m_applyMVACalib=true); declareProperty("ClusterContainerKey", m_persKey="TrigEFCaloCalibFex"); m_caloCellDetPos = new CaloCellDetPos(); @@ -72,19 +71,19 @@ HLT::ErrorCode TrigEFCaloCalibFex::hltInitialize() ATH_MSG_DEBUG("AcceptAll = " << (m_acceptAll==true ? "True" : "False") ); // Get the cluster correction tool - if(m_MVACalibTool.retrieve().isFailure()) { - ATH_MSG_ERROR("Failed to retrieve " << m_MVACalibTool); + if(m_MVACalibSvc.retrieve().isFailure()) { + ATH_MSG_ERROR("Failed to retrieve " << m_MVACalibSvc); m_applyMVACalib = false; return HLT::BAD_JOB_SETUP; } else { - ATH_MSG_DEBUG("Retrieved tool " << m_MVACalibTool); + ATH_MSG_DEBUG("Retrieved service " << m_MVACalibSvc); } if (timerSvc()){ m_totalTimer = addTimer("TrigEFCaloCalibFexTot"); - m_toolTimer = addTimer("MVACalibTool"); + m_toolTimer = addTimer("MVACalibSvc"); } ATH_MSG_DEBUG("Initialization of TrigEFCaloHypo completed successfully"); @@ -259,7 +258,7 @@ HLT::ErrorCode TrigEFCaloCalibFex::hltExecute(const HLT::TriggerElement* inputTE ATH_MSG_DEBUG("Applying MVA Calib"); if (timerSvc()) m_toolTimer->start(); - if(m_MVACalibTool->hltexecute(newClus,m_egType).isFailure()) + if(m_MVACalibSvc->hltexecute(newClus,m_egType).isFailure()) ATH_MSG_DEBUG("MVACalib Fails"); if (timerSvc()) m_toolTimer->stop(); } -- GitLab From 296cbe7f34d7e2cbdd13c24b843c5425cbf1cddc Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Wed, 4 Jul 2018 19:37:44 +0000 Subject: [PATCH 363/562] 22.0 coverity InDetCompetingRIOsOnTrack Former-commit-id: 3fdc1619befbd555eb8c74bcc0d499e739b6df1e --- .../CompetingPixelClustersOnTrack.h | 37 +- .../CompetingSCT_ClustersOnTrack.h | 332 ++++++++---------- .../CompetingTRT_DriftCirclesOnTrack.h | 24 +- .../src/CompetingPixelClustersOnTrack.cxx | 9 +- .../src/CompetingSCT_ClustersOnTrack.cxx | 63 +--- .../src/CompetingTRT_DriftCirclesOnTrack.cxx | 37 +- 6 files changed, 172 insertions(+), 330 deletions(-) diff --git a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingPixelClustersOnTrack.h b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingPixelClustersOnTrack.h index da7bc305e374..fd32d023039c 100755 --- a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingPixelClustersOnTrack.h +++ b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingPixelClustersOnTrack.h @@ -11,12 +11,9 @@ // Trk #include "TrkCompetingRIOsOnTrack/CompetingRIOsOnTrack.h" -//#include "TrkEventPrimitives/GlobalPosition.h" -//#include "TrkEventPrimitives/ErrorMatrix.h" #include "InDetRIO_OnTrack/PixelClusterOnTrack.h" // cannot forward declare -#include <ostream> +#include <iosfwd> -//#include <iostream.h> class MsgStream; namespace Trk { @@ -65,10 +62,6 @@ public: //const Trk::Surface* sf, std::vector<const InDet::PixelClusterOnTrack*>* childrots, std::vector<AssignmentProb>* assgnProb - // const Trk::TrackParameters* assumedTrkPars, - //const Trk::LocalParameters* effecLocalPars, - //const Trk::ErrorMatrix* effecLocalErrMat, - //int ROTsHaveComSrfc // meaning of the values are described in the definition of ROTsHaveCommonSurface() ); /** Destructor */ @@ -100,33 +93,14 @@ public: /**returns some information about this MeasurementBase/CompetingPixelClustersOnTrack. */ std::ostream& dump( std::ostream& out ) const; -// /** returns the effective LocalParameters @f$ \hat{m} @f$ according to the weights @f$ p_i @f$ (assignment probabilities). -// - interface from MeasurementBase -// - CompetingPixelClustersOnTrack overwrites implementation in CompetingRIOsOnTrack, because TRT -// needs special attention in calculating the effective parameters */ -// const Trk::LocalParameters& localParameters() const; - -// /** returns the effective local ErrorMatrix (@f$ \hat{G} @f$ = effective WeightMatrix) according to the weights @f$ p_i @f$ (assignment probabilities) . -// - interface from MeasurementBase -// - CompetingPixelClustersOnTrack overwrites implementation in CompetingRIOsOnTrack, because TRT -// needs special attention in calculating the effective ErrorMatrix */ -// const Trk::ErrorMatrix& localErrorMatrix() const; - - // /** returns the TrackParameters used for calculation of the effective measurement. - // - specific for CompetingPixelClustersOnTrack */ - // const Trk::TrackParameters* assumedTrackParameters() const; private: - // /** returns the RIO_OnTrack vector (of base class type) i.e. cast upwards to provide RIO_OnTrack - // for base class CompetingRIOsOnTrack*/ - // const std::vector<const Trk::RIO_OnTrack*>* getBaseRioOnTrack() const; /** private method to clear the Trk::RIO_OnTrack vector */ void clearChildRotVector(); -// /** The surface to which the competingROTs parameters are expressed to */ -// mutable const Trk::Surface* m_associatedSurface; + /** The global Position */ mutable const Amg::Vector3D* m_globalPosition; @@ -159,9 +133,7 @@ inline const std::vector<const InDet::PixelClusterOnTrack*>& CompetingPixelClust } inline const InDet::PixelClusterOnTrack& CompetingPixelClustersOnTrack::rioOnTrack(unsigned int indx) const { - //if (m_containedChildRots && indx<m_containedChildRots->size()) return * m_containedChildRots->operator[](indx); - //return 0; } inline const Amg::Vector3D& CompetingPixelClustersOnTrack::globalPosition() const { @@ -175,10 +147,7 @@ inline unsigned int CompetingPixelClustersOnTrack::numberOfContainedROTs() const return m_containedChildRots->size(); } -// inline const Trk::LocalParameters& CompetingPixelClustersOnTrack::localParameters() const { -// return (*m_localParameters); -// } -// + // inline const Trk::ErrorMatrix& CompetingPixelClustersOnTrack::localErrorMatrix() const { // return (*m_localErrorMatrix); // } diff --git a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrack.h b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrack.h index 2ba537c230ae..324108680d21 100755 --- a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrack.h +++ b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrack.h @@ -2,183 +2,155 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -/////////////////////////////////////////////////////////////////// -// CompetingSCT_ClustersOnTrack.h, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#ifndef COMPETINGSCTCLUSTERSONTRACK_H -#define COMPETINGSCTCLUSTERSONTRACK_H - -// Trk -#include "TrkCompetingRIOsOnTrack/CompetingRIOsOnTrack.h" -//#include "TrkEventPrimitives/GlobalPosition.h" -//#include "TrkEventPrimitives/ErrorMatrix.h" -// #include "TrkParameters/TrackParameters.h" -#include "InDetRIO_OnTrack/SCT_ClusterOnTrack.h" // cannot fwd-declare because of covariant method -#include <ostream> - -//#include <iostream.h> -class MsgStream; - -namespace Trk {class Surface;} - -namespace InDet { - -/** @class CompetingSCT_ClustersOnTrack - - Class for competing SCT_Clusters, it - extends the Trk::CompetingRIOsOnTrack base class. - - This class is used by the Deterministic Annealing Filter to - handle several SCT_ClusterOnTrack in one detector element, which compete against - each other in being assigned to a track. In contrast to the InDet::CompetingTRT_DriftCirclesOnTrack - all competing measurements of the InDet::CompetingSCT_ClustersOnTrack have to be on the same - detector element (i.e. have a common associated surface). - localParameters() and localErrorMatrix() return the mean values - according to the weights (assignment probabilities). - - @author Sebastian.Fleischmann@cern.ch - - */ - -class CompetingSCT_ClustersOnTrack : public Trk::CompetingRIOsOnTrack { - -public: - /** InDet::CompetingSCT_ClustersOnTrackTool is a friend to allow for updates of the - assignment probabilities */ - friend class CompetingSCT_ClustersOnTrackTool; - - /** Default Constructor for POOL */ - CompetingSCT_ClustersOnTrack(); - /** Copy Constructor */ - CompetingSCT_ClustersOnTrack(const CompetingSCT_ClustersOnTrack& compROT); - /** Assignment operator */ - CompetingSCT_ClustersOnTrack& operator=(const CompetingSCT_ClustersOnTrack& compROT); - /** Default move assignment operator */ - CompetingSCT_ClustersOnTrack& operator=(CompetingSCT_ClustersOnTrack&& compROT) = default; - - /** Constructor with all parameters: PLEASE do not use directly, - but call InDet::CompetingSCT_ClustersOnTrackTool, otherwise inconsistency of - the data will be very probable. */ - CompetingSCT_ClustersOnTrack( - //const Trk::Surface* sf, - std::vector<const InDet::SCT_ClusterOnTrack*>* childrots, - std::vector<AssignmentProb>* assgnProb - //const Trk::TrackParameters* assumedTrkPars, - //const Trk::LocalParameters* effecLocalPars, - //const Trk::ErrorMatrix* effecLocalErrMat, - //int ROTsHaveComSrfc // meaning of the values are described in the definition of ROTsHaveCommonSurface() - ); - - /** Destructor */ - virtual ~CompetingSCT_ClustersOnTrack(); - - /** needed to avoid excessive RTTI*/ - CompetingSCT_ClustersOnTrack* clone() const; - - /** returns the surface for the local to global transformation . - - interface from MeasurementBase */ - const Trk::Surface& associatedSurface() const; - - /**Interface method to get the global Position. - - interface from MeasurementBase */ - const Amg::Vector3D& globalPosition() const; - - /** Number of RIO_OnTracks to be contained by this CompetingRIOsOnTrack. */ - unsigned int numberOfContainedROTs() const; - - /** returns the vector of SCT_ClusterOnTrack objects . - - specific for this CompetingSCT_ClustersOnTrack: SCT_ClusterOnTrack */ - const std::vector<const InDet::SCT_ClusterOnTrack*>& containedROTs() const; - - /** returns the RIO_OnTrack (also known as ROT) objects depending on the integer*/ - const InDet::SCT_ClusterOnTrack& rioOnTrack(unsigned int) const; - - /**returns some information about this MeasurementBase/CompetingSCT_ClustersOnTrack. */ - MsgStream& dump( MsgStream& out ) const; - /**returns some information about this MeasurementBase/CompetingSCT_ClustersOnTrack. */ - std::ostream& dump( std::ostream& out ) const; - - /** @brief recalculate the LocalParameters and ErrorMatrix - - CompetingSCT_ClustersOnTrack overwrites implementation in CompetingRIOsOnTrack, because SCT end cap - needs special attention in calculating the effective parameters */ - virtual void setLocalParametersAndErrorMatrix(); -// /** returns the effective LocalParameters @f$ \hat{m} @f$ according to the weights @f$ p_i @f$ (assignment probabilities). -// - interface from MeasurementBase -// - CompetingSCT_ClustersOnTrack overwrites implementation in CompetingRIOsOnTrack, because TRT -// needs special attention in calculating the effective parameters */ -// const Trk::LocalParameters& localParameters() const; - -// /** returns the effective local ErrorMatrix (@f$ \hat{G} @f$ = effective WeightMatrix) according to the weights @f$ p_i @f$ (assignment probabilities) . -// - interface from MeasurementBase -// - CompetingSCT_ClustersOnTrack overwrites implementation in CompetingRIOsOnTrack, because TRT -// needs special attention in calculating the effective ErrorMatrix */ -// const Trk::ErrorMatrix& localErrorMatrix() const; - - // /** returns the TrackParameters used for calculation of the effective measurement. - // - specific for CompetingSCT_ClustersOnTrack */ - // const Trk::TrackParameters* assumedTrackParameters() const; - - -private: - - // /** returns the RIO_OnTrack vector (of base class type) i.e. cast upwards to provide RIO_OnTrack - // for base class CompetingRIOsOnTrack*/ - // const std::vector<const Trk::RIO_OnTrack*>* getBaseRioOnTrack() const; - - /** private method to clear the Trk::RIO_OnTrack vector */ - void clearChildRotVector(); -// /** The surface to which the competingROTs parameters are expressed to */ -// mutable const Trk::Surface* m_associatedSurface; - - /** The global Position */ - mutable const Amg::Vector3D* m_globalPosition; - - /** The vector of contained InDet::SCT_ClusterOnTrack objects */ - 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 - are checked. - - interface from CompetingRIOsOnTrack - - CompetingSCT_ClustersOnTrack assume that all PixelClusters belong to the same detector element, - so this function will always return true */ - bool ROTsHaveCommonSurface(const bool withNonVanishingAssignProb=true) const; -}; - -inline CompetingSCT_ClustersOnTrack* CompetingSCT_ClustersOnTrack::clone() const { - // cout << "in clone()" << endl; - return new InDet::CompetingSCT_ClustersOnTrack(*this); -} - -inline const Trk::Surface& CompetingSCT_ClustersOnTrack::associatedSurface() const { - //if (m_containedChildRots) - return ((*(m_containedChildRots->begin()))->associatedSurface()); -} - - -inline const std::vector<const InDet::SCT_ClusterOnTrack*>& CompetingSCT_ClustersOnTrack::containedROTs() const { - return (*m_containedChildRots); -} - -inline const InDet::SCT_ClusterOnTrack& CompetingSCT_ClustersOnTrack::rioOnTrack(unsigned int indx) const { - //if (m_containedChildRots && indx<m_containedChildRots->size()) - return * m_containedChildRots->operator[](indx); - //return 0; -} - - inline const Amg::Vector3D& CompetingSCT_ClustersOnTrack::globalPosition() const { - if (m_globalPosition) - return (*m_globalPosition); - m_globalPosition = associatedSurface().localToGlobal(localParameters()); - return (*m_globalPosition); -} - -inline unsigned int CompetingSCT_ClustersOnTrack::numberOfContainedROTs() const { - return m_containedChildRots->size(); -} - -} - -#endif // COMPETINGSCTCLUSTERSONTRACK_H - +/////////////////////////////////////////////////////////////////// +// CompetingSCT_ClustersOnTrack.h, (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + +#ifndef COMPETINGSCTCLUSTERSONTRACK_H +#define COMPETINGSCTCLUSTERSONTRACK_H + +// Trk +#include "TrkCompetingRIOsOnTrack/CompetingRIOsOnTrack.h" +//#include "TrkEventPrimitives/GlobalPosition.h" +//#include "TrkEventPrimitives/ErrorMatrix.h" +// #include "TrkParameters/TrackParameters.h" +#include "InDetRIO_OnTrack/SCT_ClusterOnTrack.h" // cannot fwd-declare because of covariant method +#include <iosfwd> + +//#include <iostream.h> +class MsgStream; + +namespace Trk {class Surface;} + +namespace InDet { + +/** @class CompetingSCT_ClustersOnTrack + + Class for competing SCT_Clusters, it + extends the Trk::CompetingRIOsOnTrack base class. + + This class is used by the Deterministic Annealing Filter to + handle several SCT_ClusterOnTrack in one detector element, which compete against + each other in being assigned to a track. In contrast to the InDet::CompetingTRT_DriftCirclesOnTrack + all competing measurements of the InDet::CompetingSCT_ClustersOnTrack have to be on the same + detector element (i.e. have a common associated surface). + localParameters() and localErrorMatrix() return the mean values + according to the weights (assignment probabilities). + + @author Sebastian.Fleischmann@cern.ch + + */ + +class CompetingSCT_ClustersOnTrack : public Trk::CompetingRIOsOnTrack { + +public: + /** InDet::CompetingSCT_ClustersOnTrackTool is a friend to allow for updates of the + assignment probabilities */ + friend class CompetingSCT_ClustersOnTrackTool; + + /** Default Constructor for POOL */ + CompetingSCT_ClustersOnTrack(); + /** Copy Constructor */ + CompetingSCT_ClustersOnTrack(const CompetingSCT_ClustersOnTrack& compROT); + /** Assignment operator */ + CompetingSCT_ClustersOnTrack& operator=(const CompetingSCT_ClustersOnTrack& compROT); + /** Default move assignment operator */ + CompetingSCT_ClustersOnTrack& operator=(CompetingSCT_ClustersOnTrack&& compROT) = default; + + /** Constructor with all parameters: PLEASE do not use directly, + 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<AssignmentProb>* assgnProb + ); + + /** Destructor */ + virtual ~CompetingSCT_ClustersOnTrack(); + + /** needed to avoid excessive RTTI*/ + CompetingSCT_ClustersOnTrack* clone() const; + + /** returns the surface for the local to global transformation . + - interface from MeasurementBase */ + const Trk::Surface& associatedSurface() const; + + /**Interface method to get the global Position. + - interface from MeasurementBase */ + const Amg::Vector3D& globalPosition() const; + + /** Number of RIO_OnTracks to be contained by this CompetingRIOsOnTrack. */ + unsigned int numberOfContainedROTs() const; + + /** returns the vector of SCT_ClusterOnTrack objects . + - specific for this CompetingSCT_ClustersOnTrack: SCT_ClusterOnTrack */ + const std::vector<const InDet::SCT_ClusterOnTrack*>& containedROTs() const; + + /** returns the RIO_OnTrack (also known as ROT) objects depending on the integer*/ + const InDet::SCT_ClusterOnTrack& rioOnTrack(unsigned int) const; + + /**returns some information about this MeasurementBase/CompetingSCT_ClustersOnTrack. */ + MsgStream& dump( MsgStream& out ) const; + /**returns some information about this MeasurementBase/CompetingSCT_ClustersOnTrack. */ + std::ostream& dump( std::ostream& out ) const; + + /** @brief recalculate the LocalParameters and ErrorMatrix + - CompetingSCT_ClustersOnTrack overwrites implementation in CompetingRIOsOnTrack, because SCT end cap + needs special attention in calculating the effective parameters */ + virtual void setLocalParametersAndErrorMatrix(); + +private: + + + + /** private method to clear the Trk::RIO_OnTrack vector */ + void clearChildRotVector(); + + + /** The global Position */ + mutable const Amg::Vector3D* m_globalPosition; + + /** The vector of contained InDet::SCT_ClusterOnTrack objects */ + 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 + are checked. + - interface from CompetingRIOsOnTrack + - CompetingSCT_ClustersOnTrack assume that all PixelClusters belong to the same detector element, + so this function will always return true */ + bool ROTsHaveCommonSurface(const bool withNonVanishingAssignProb=true) const; +}; + +inline CompetingSCT_ClustersOnTrack* CompetingSCT_ClustersOnTrack::clone() const { + return new InDet::CompetingSCT_ClustersOnTrack(*this); +} + +inline const Trk::Surface& CompetingSCT_ClustersOnTrack::associatedSurface() const { + return ((*(m_containedChildRots->begin()))->associatedSurface()); +} + + +inline const std::vector<const InDet::SCT_ClusterOnTrack*>& CompetingSCT_ClustersOnTrack::containedROTs() const { + return (*m_containedChildRots); +} + +inline const InDet::SCT_ClusterOnTrack& CompetingSCT_ClustersOnTrack::rioOnTrack(unsigned int indx) const { + return * m_containedChildRots->operator[](indx); +} + + inline const Amg::Vector3D& CompetingSCT_ClustersOnTrack::globalPosition() const { + if (m_globalPosition) + return (*m_globalPosition); + m_globalPosition = associatedSurface().localToGlobal(localParameters()); + return (*m_globalPosition); +} + +inline unsigned int CompetingSCT_ClustersOnTrack::numberOfContainedROTs() const { + return m_containedChildRots->size(); +} + +} + +#endif // COMPETINGSCTCLUSTERSONTRACK_H + diff --git a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingTRT_DriftCirclesOnTrack.h b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingTRT_DriftCirclesOnTrack.h index 0fefaa449e9f..bb8cf7969007 100755 --- a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingTRT_DriftCirclesOnTrack.h +++ b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingTRT_DriftCirclesOnTrack.h @@ -11,10 +11,8 @@ // Trk #include "TrkCompetingRIOsOnTrack/CompetingRIOsOnTrack.h" -//#include "TrkEventPrimitives/GlobalPosition.h" -//#include "TrkEventPrimitives/ErrorMatrix.h" #include "InDetRIO_OnTrack/TRT_DriftCircleOnTrack.h" -#include <ostream> +#include <iosfwd> class MsgStream; @@ -54,13 +52,9 @@ namespace InDet { CompetingTRT_DriftCirclesOnTrack(const CompetingTRT_DriftCirclesOnTrack& compROT); //! Assignment operator CompetingTRT_DriftCirclesOnTrack& operator=(const CompetingTRT_DriftCirclesOnTrack& compROT); - // /** Constructor with parameters */ - /* CompetingTRT_DriftCirclesOnTrack( - //const Trk::Surface* sf, - std::vector<const InDet::TRT_DriftCircleOnTrack*>* childrots, - std::vector<AssignmentProb>* assgnProb, - const Trk::TrackParameters* assumedTrackParameters - );*/ + /** Default move assignment operator */ + CompetingTRT_DriftCirclesOnTrack& operator=(CompetingTRT_DriftCirclesOnTrack&& compROT) = default; + /** @brief Constructor with all parameters: PLEASE do not use directly, but call InDet::CompetingTRT_DriftCirclesOnTrackTool, otherwise inconsistency of @@ -107,9 +101,6 @@ namespace InDet { virtual void setLocalParametersAndErrorMatrix(); private: - // /** returns the RIO_OnTrack vector (of base class type) i.e. cast upwards to provide RIO_OnTrack - // for base class CompetingRIOsOnTrack*/ - // const std::vector<const Trk::RIO_OnTrack*>* getBaseRioOnTrack() const; //! private method to clear the Trk::RIO_OnTrack vector void clearChildRotVector(); @@ -122,11 +113,6 @@ namespace InDet { //! The vector of contained InDet::TRT_DriftCircleOnTrack objects std::vector<const InDet::TRT_DriftCircleOnTrack*>* m_containedChildRots; - // /** The TrackParameters used for calculation of the effective measurement (needed - // for projecting drift radii onto a common surface). - // - the TrackParameters are owned by CompetingDriftCrirclesOnTrack - // - perhaps use AtaStraightLine directly???? */ - // mutable const Trk::TrackParameters* m_assumedTrackParameters; /** Have all the contained ROTs a common associated surface? @@ -154,9 +140,7 @@ namespace InDet { } inline const InDet::TRT_DriftCircleOnTrack& CompetingTRT_DriftCirclesOnTrack::rioOnTrack(unsigned int indx) const { - //if (m_containedChildRots && indx<m_containedChildRots->size()) return * m_containedChildRots->operator[](indx); - //return 0; } inline unsigned int CompetingTRT_DriftCirclesOnTrack::numberOfContainedROTs() const { diff --git a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingPixelClustersOnTrack.cxx b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingPixelClustersOnTrack.cxx index be957facdc12..62ab26a92dc4 100755 --- a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingPixelClustersOnTrack.cxx +++ b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingPixelClustersOnTrack.cxx @@ -9,7 +9,8 @@ #include "TrkSurfaces/Surface.h" #include "GaudiKernel/MsgStream.h" #include "InDetCompetingRIOsOnTrack/CompetingPixelClustersOnTrack.h" -#include <math.h> +#include <ostream> +#include <cmath> // default constructor InDet::CompetingPixelClustersOnTrack::CompetingPixelClustersOnTrack(): @@ -34,14 +35,9 @@ InDet::CompetingPixelClustersOnTrack::CompetingPixelClustersOnTrack(const InDet: InDet::CompetingPixelClustersOnTrack::CompetingPixelClustersOnTrack( std::vector<const InDet::PixelClusterOnTrack*>* childrots, std::vector<AssignmentProb>* assgnProb - //const Trk::LocalParameters* effecLocalPars, - //const Trk::ErrorMatrix* effecLocalErrMat - //int ROTsHaveComSrfc // meaning of the values are described in the definition of ROTsHaveCommonSurface() ) : Trk::CompetingRIOsOnTrack( assgnProb), - //m_localParameters(effecLocalPars); - //m_localErrorMatrix(effecLocalErrMat); m_globalPosition(0), m_containedChildRots(childrots) { @@ -59,7 +55,6 @@ InDet::CompetingPixelClustersOnTrack& InDet::CompetingPixelClustersOnTrack::oper delete m_globalPosition; m_containedChildRots = new std::vector<const InDet::PixelClusterOnTrack*>; m_globalPosition = compROT.m_globalPosition ? new Amg::Vector3D(*compROT.m_globalPosition) : 0; - //m_ROTsHaveCommonSurface = compROT.m_ROTsHaveCommonSurface; std::vector<const InDet::PixelClusterOnTrack*>::const_iterator rotIter = compROT.m_containedChildRots->begin(); for (; rotIter!=compROT.m_containedChildRots->end(); ++rotIter) m_containedChildRots->push_back((*rotIter)->clone()); diff --git a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingSCT_ClustersOnTrack.cxx b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingSCT_ClustersOnTrack.cxx index 087c8f2d3210..e3fba303f1f2 100755 --- a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingSCT_ClustersOnTrack.cxx +++ b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingSCT_ClustersOnTrack.cxx @@ -12,16 +12,14 @@ // InDet #include "InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrack.h" // std -#include <math.h> +#include <cmath> +#include <ostream> -//#include <iostream.h> // default constructor InDet::CompetingSCT_ClustersOnTrack::CompetingSCT_ClustersOnTrack(): Trk::CompetingRIOsOnTrack(), - //m_associatedSurface(0), m_globalPosition(0), m_containedChildRots(0) - // m_assumedTrackParameters(0), // {} @@ -30,12 +28,10 @@ InDet::CompetingSCT_ClustersOnTrack::CompetingSCT_ClustersOnTrack(const InDet::C Trk::CompetingRIOsOnTrack(compROT), m_globalPosition(compROT.m_globalPosition ? new Amg::Vector3D(*compROT.m_globalPosition) : 0), m_containedChildRots(0) { - // cout << "CompetingSCT_ClustersOnTrack: in copy constructor" << endl; 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()); - // cout << "pushed back cloned ROT" << endl; } } @@ -44,18 +40,11 @@ InDet::CompetingSCT_ClustersOnTrack::CompetingSCT_ClustersOnTrack( //const Trk::Surface* sf, std::vector<const InDet::SCT_ClusterOnTrack*>* childrots, std::vector<AssignmentProb>* assgnProb - // const Trk::TrackParameters* assumedTrkPars, - //const Trk::LocalParameters* effecLocalPars, - //const Trk::ErrorMatrix* effecLocalErrMat - //int ROTsHaveComSrfc // meaning of the values are described in the definition of ROTsHaveCommonSurface() + ): Trk::CompetingRIOsOnTrack(assgnProb), -//m_associatedSurface(sf), -//m_localParameters(effecLocalPars); -//m_localErrorMatrix(effecLocalErrMat); m_globalPosition(0), m_containedChildRots(childrots) -// m_assumedTrackParameters(assumedTrkPars), { // initialize local position and error matrix setLocalParametersAndErrorMatrix(); @@ -70,20 +59,9 @@ InDet::CompetingSCT_ClustersOnTrack& InDet::CompetingSCT_ClustersOnTrack::operat clearChildRotVector(); delete m_containedChildRots; delete m_globalPosition; - // delete m_assumedTrackParameters; - // delete surface if not owned by detElement - //if (m_associatedSurface && !m_associatedSurface->associatedDetectorElement()) - // delete m_associatedSurface; m_containedChildRots = new std::vector<const InDet::SCT_ClusterOnTrack*>; -// if (compROT.m_associatedSurface) { -// // copy only if surface is not one owned by a detector Element -// m_associatedSurface = (!compROT.m_associatedSurface->associatedDetectorElement()) ? compROT.m_associatedSurface->clone() : compROT.m_associatedSurface; -// } else { -// m_associatedSurface = 0; -// } + m_globalPosition = compROT.m_globalPosition ? new Amg::Vector3D(*compROT.m_globalPosition) : 0; - // m_assumedTrackParameters = compROT.m_assumedTrackParameters ? compROT.m_assumedTrackParameters->clone() : 0; - //m_ROTsHaveCommonSurface = compROT.m_ROTsHaveCommonSurface; 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()); @@ -92,13 +70,10 @@ InDet::CompetingSCT_ClustersOnTrack& InDet::CompetingSCT_ClustersOnTrack::operat } InDet::CompetingSCT_ClustersOnTrack::~CompetingSCT_ClustersOnTrack() { - // delete surface if not owned by detElement -// if (m_associatedSurface && !m_associatedSurface->associatedDetectorElement()) -// delete m_associatedSurface; + delete m_globalPosition; clearChildRotVector(); delete m_containedChildRots; - // delete m_assumedTrackParameters; } void InDet::CompetingSCT_ClustersOnTrack::clearChildRotVector() { @@ -141,13 +116,8 @@ bool InDet::CompetingSCT_ClustersOnTrack::ROTsHaveCommonSurface(const bool) cons void InDet::CompetingSCT_ClustersOnTrack::setLocalParametersAndErrorMatrix() { if (ROTsHaveCommonSurface()) { - //std::cout << "weight matrices: " << std::endl; - //std::cout << "[0] " << rioOnTrack(0)->localErrorMatrix().weight() << std::endl; - //CLHEP::HepSymMatrix meanWeightMatrix = assignmentProbability(0) * rioOnTrack(0)->localErrorMatrix().weight(); int nNonVanishingROTs = ((assignmentProbability(0) > 1.e-10)? 1 : 0); for (unsigned int i=1; i<numberOfContainedROTs(); i++) { - //meanWeightMatrix += assignmentProbability(i) * rioOnTrack(i)->localErrorMatrix().weight(); - //std::cout << "["<< i << "] " << rioOnTrack(i)->localErrorMatrix().weight() << std::endl; if (assignmentProbability(i) > 1.e-10) { nNonVanishingROTs+=1; } @@ -155,10 +125,7 @@ void InDet::CompetingSCT_ClustersOnTrack::setLocalParametersAndErrorMatrix() { const int& paramKey = rioOnTrack(0).localParameters().parameterKey(); Amg::MatrixX meanWeightMatrix; meanWeightMatrix.setZero(); - //= AmgSymMatrix(rioOnTrack(0)->localErrorMatrix().weight().num_col()); - //CLHEP::HepSymMatrix meanWeightMatrix = CLHEP::HepSymMatrix(2, 0); const unsigned int& maxProbIndex = indexOfMaxAssignProb(); - // std::cout << "CompSCT - nNonVanishingROTs: " << nNonVanishingROTs << std::endl; if (nNonVanishingROTs > 1) { // more than one non-vanishing ROT: do the more complicated calculation if (paramKey==1) { @@ -171,13 +138,10 @@ void InDet::CompetingSCT_ClustersOnTrack::setLocalParametersAndErrorMatrix() { meanWeightMatrix += assignmentProbability(i) * weight; } - // std::cout << "sum params: " << meanParams << std::endl; meanParams = meanWeightMatrix.inverse() * meanParams; - // std::cout << "mean params: " << meanParams << std::endl; Trk::DefinedParameter Par1(meanParams[Trk::loc1], Trk::loc1); m_localParams = Trk::LocalParameters(Par1); } else if (paramKey==3) { - //double meanRho = 0.; double meanTheta = 0.; double meanEigen1 = 0.; double meanEigen2 = 0.; @@ -193,8 +157,6 @@ void InDet::CompetingSCT_ClustersOnTrack::setLocalParametersAndErrorMatrix() { const double det = covMat(0,0)*covMat(1,1)-covMat(0,1)*covMat(1,0); const double lambda1 = trace/2. - sqrt(trace*trace/4. - det); const double lambda2 = trace/2. + sqrt(trace*trace/4. - det); -// std::cout << "["<<i<<"]: l1= " << lambda1 << " l2="<< lambda2 << " theta="<< atan2(2.*covMat[0][1], covMat[0][0]-covMat[1][1])/2. << std::endl; - //meanTheta += assignProb * 0.5 * atan2(2.*covMat[0][1], covMat[0][0]-covMat[1][1]); meanTheta += assignProb * 0.5 * atan(2.*covMat(0,1)/( covMat(0,0)-covMat(1,1))); meanEigen1 += assignProb / lambda1; meanEigen2 += assignProb / lambda2; @@ -208,8 +170,6 @@ void InDet::CompetingSCT_ClustersOnTrack::setLocalParametersAndErrorMatrix() { const double cosTheta = cos(meanTheta); const double sinTheta = sin(meanTheta); -// std::cout << "[mean]: l1= " << meanEigen1 << " l2="<< meanEigen2 << " theta="<< meanTheta << std::endl; - //CLHEP::HepSymMatrix meanWeightMatrix = CLHEP::HepSymMatrix(2, 0); meanWeightMatrix = Amg::MatrixX(2,2); meanWeightMatrix.setZero(); meanWeightMatrix(0,0) = cosTheta*cosTheta*meanEigen1 + sinTheta*sinTheta*meanEigen2; @@ -217,15 +177,13 @@ void InDet::CompetingSCT_ClustersOnTrack::setLocalParametersAndErrorMatrix() { meanWeightMatrix(0,1) = cosTheta*sinTheta*meanEigen1 - cosTheta*sinTheta*meanEigen2; meanWeightMatrix(1,0) = meanWeightMatrix(0,1); - Amg::MatrixX weightMatrix_maxIndex = rioOnTrack(maxProbIndex).localCovariance().inverse(); + Amg::MatrixX weightMatrix_maxIndex = rioOnTrack(maxProbIndex).localCovariance().inverse(); int orderInput = (weightMatrix_maxIndex(0,0) > weightMatrix_maxIndex(1,1)) ? -1 : 1; int orderOutput = (meanWeightMatrix(0,0) > meanWeightMatrix(1,1)) ? -1 : 1; if (orderInput*orderOutput < 0) { std::cout << "Trk::CompetingSCT_ClustersOnTrack: order of dimensions does not match!!!"; } - //m_localParams[Trk::locX] = meanMeasX; - //m_localParams[Trk::locY] = meanMeasY; Trk::DefinedParameter Par1(meanMeasX, Trk::loc1); Trk::DefinedParameter Par2(meanMeasY, Trk::loc2); m_localParams = Trk::LocalParameters(Par1, Par2); @@ -242,17 +200,10 @@ void InDet::CompetingSCT_ClustersOnTrack::setLocalParametersAndErrorMatrix() { for (int i=0; i<meanWeightMatrix.cols(); ++i) meanWeightMatrix(i,i) = 1.0e-10; } -// std::cout << "mean weight: " << meanWeightMatrix << std::endl; m_localCovariance = meanWeightMatrix.inverse(); - //Trk::WeightMatrix(new Trk::WeightMatrix(meanWeightMatrix)); -// std::cout << "mean covariance: " << localErrorMatrix().covariance() << std::endl; } else { - // -------------------------------------------------- - // Warning: effective localParams cannot be calculated when ROTs don't lie on the - // associated surface without detector specific knowledge. - // -------------------------------------------------- - //return 0; + std::cout << "Trk::CompetingRIOsOnTrack: can not handle ROTs in different surfaces without detector specific knowledge " << std::endl; } } diff --git a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingTRT_DriftCirclesOnTrack.cxx b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingTRT_DriftCirclesOnTrack.cxx index d349f51924f9..950112b78793 100755 --- a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingTRT_DriftCirclesOnTrack.cxx +++ b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingTRT_DriftCirclesOnTrack.cxx @@ -13,7 +13,8 @@ // InDet #include "InDetCompetingRIOsOnTrack/CompetingTRT_DriftCirclesOnTrack.h" // std -#include <math.h> +#include <cmath> +#include <ostream> // default constructor InDet::CompetingTRT_DriftCirclesOnTrack::CompetingTRT_DriftCirclesOnTrack(): @@ -21,18 +22,14 @@ InDet::CompetingTRT_DriftCirclesOnTrack::CompetingTRT_DriftCirclesOnTrack(): m_associatedSurface(0), m_globalPosition(0), m_containedChildRots(0), - // m_assumedTrackParameters(0), m_ROTsHaveCommonSurface(8) {} // copy constructor InDet::CompetingTRT_DriftCirclesOnTrack::CompetingTRT_DriftCirclesOnTrack(const InDet::CompetingTRT_DriftCirclesOnTrack& compROT) : Trk::CompetingRIOsOnTrack(compROT), - //m_associatedSurface(compROT.m_associatedSurface ? compROT.m_associatedSurface->clone() : 0), m_globalPosition(compROT.m_globalPosition ? new Amg::Vector3D(*compROT.m_globalPosition) : 0), m_containedChildRots(0), - // m_assumedTrackParameters(compROT.m_assumedTrackParameters ? m_assumedTrackParameters->clone() : 0), m_ROTsHaveCommonSurface(compROT.m_ROTsHaveCommonSurface) { - // cout << "CompetingTRT_DriftCirclesOnTrack: in copy constructor" << endl; if (compROT.m_associatedSurface) { // copy only if surface is not one owned by a detector Element m_associatedSurface = (!compROT.m_associatedSurface->associatedDetectorElement()) ? compROT.m_associatedSurface->clone() : compROT.m_associatedSurface; @@ -43,7 +40,6 @@ InDet::CompetingTRT_DriftCirclesOnTrack::CompetingTRT_DriftCirclesOnTrack(const std::vector< const InDet::TRT_DriftCircleOnTrack* >::const_iterator rotIter = compROT.m_containedChildRots->begin(); for (; rotIter!=compROT.m_containedChildRots->end(); ++rotIter) { m_containedChildRots->push_back((*rotIter)->clone()); - // cout << "pushed back cloned ROT" << endl; } } @@ -62,7 +58,6 @@ InDet::CompetingTRT_DriftCirclesOnTrack::CompetingTRT_DriftCirclesOnTrack( m_associatedSurface(sf), m_globalPosition(0), m_containedChildRots(childrots), - // m_assumedTrackParameters(assumedTrkPars), m_ROTsHaveCommonSurface(ROTsHaveComSrfc) { @@ -70,18 +65,7 @@ InDet::CompetingTRT_DriftCirclesOnTrack::CompetingTRT_DriftCirclesOnTrack( m_localCovariance = *effecLocalErrMat; delete effecLocalErrMat; delete effecLocalPars; - // if (childrots->size() != assgnProb->size()){ - // // TODO: Throw something... - // // maybe delete given objects. - // // at least give an error message - // } else { - // // search for maximum assignment probability (surface of this ROT is used as common surface): - // Trk::AssignmentProb maxAssgnProb = m_assignProb->operator[](0); - // //unsigned int imax = 0; - // for (unsigned int i=1; i<m_rotsnum; i++) { - // if (m_assignProb->operator[](i) > maxAssgnProb) {imax=i}; - // } - // } + } InDet::CompetingTRT_DriftCirclesOnTrack& InDet::CompetingTRT_DriftCirclesOnTrack::operator=(const InDet::CompetingTRT_DriftCirclesOnTrack& compROT) { @@ -92,7 +76,6 @@ InDet::CompetingTRT_DriftCirclesOnTrack& InDet::CompetingTRT_DriftCirclesOnTrack clearChildRotVector(); delete m_containedChildRots; delete m_globalPosition; - // delete m_assumedTrackParameters; // delete surface if not owned by detElement if (m_associatedSurface && !m_associatedSurface->associatedDetectorElement()) delete m_associatedSurface; @@ -104,7 +87,6 @@ InDet::CompetingTRT_DriftCirclesOnTrack& InDet::CompetingTRT_DriftCirclesOnTrack m_associatedSurface = 0; } m_globalPosition = compROT.m_globalPosition ? new Amg::Vector3D(*compROT.m_globalPosition) : 0; - // m_assumedTrackParameters = compROT.m_assumedTrackParameters ? compROT.m_assumedTrackParameters->clone() : 0; m_ROTsHaveCommonSurface = compROT.m_ROTsHaveCommonSurface; std::vector<const InDet::TRT_DriftCircleOnTrack*>::const_iterator rotIter = compROT.m_containedChildRots->begin(); for (; rotIter!=compROT.m_containedChildRots->end(); ++rotIter) @@ -120,7 +102,6 @@ InDet::CompetingTRT_DriftCirclesOnTrack::~CompetingTRT_DriftCirclesOnTrack() { delete m_globalPosition; clearChildRotVector(); delete m_containedChildRots; - // delete m_assumedTrackParameters; } void InDet::CompetingTRT_DriftCirclesOnTrack::clearChildRotVector() { @@ -164,17 +145,9 @@ bool InDet::CompetingTRT_DriftCirclesOnTrack::ROTsHaveCommonSurface(const bool w // for all | just ROTs with non-vanishing assgnProb // * 1 | * 3 if (withNonVanishingAssignProb) { - //if (!(m_ROTsHaveCommonSurface / 3)==2){ return (m_ROTsHaveCommonSurface / 3); - //}else{ - //have to calc: should not happen here!!! - //} } else { - //if (!(m_ROTsHaveCommonSurface % 3)==2){ return (m_ROTsHaveCommonSurface % 3); - //}else{ - //have to calc: should not happen here!!! - //} } } @@ -201,9 +174,7 @@ const Amg::Vector3D& InDet::CompetingTRT_DriftCirclesOnTrack::globalPosition() c for (; rotIter != m_containedChildRots->end(); ++rotIter, ++assgnProbIter) { globalPos += ( ((*assgnProbIter)/assgnProbSum) * ((*rotIter)->globalPosition()) ); } - // for (unsigned int index = 0; index < m_rotsnum; index++) { - // globalPos += (m_assignProb->operator[](index)) * (m_containedChildRots->operator[](index)->globalPosition()); - // } + } else { globalPos = (*m_containedChildRots->begin())->globalPosition(); } -- GitLab From a805b1dee9c4e1f6a8ae7f4f582ee1a88b41a3c5 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Thu, 5 Jul 2018 12:24:37 +0200 Subject: [PATCH 364/562] Addedcteps monitoring Former-commit-id: 1333d1e750d2dc48af257f3cdacea0aa7041a4ce --- .../src/DecisionCollectorTool.cxx | 34 ++++++++++++++ .../src/DecisionCollectorTool.h | 36 ++++++++++++++ .../TrigSteerMonitor/src/IDecisionCollector.h | 23 +++++++++ .../src/TrigSignatureMoniMT.cxx | 47 +++++++++---------- .../src/TrigSignatureMoniMT.h | 12 +++-- .../components/TrigSteerMonitor_entries.cxx | 2 + .../TrigUpgradeTest/share/egamma.withViews.py | 10 +++- 7 files changed, 133 insertions(+), 31 deletions(-) create mode 100644 Trigger/TrigMonitoring/TrigSteerMonitor/src/DecisionCollectorTool.cxx create mode 100644 Trigger/TrigMonitoring/TrigSteerMonitor/src/DecisionCollectorTool.h create mode 100644 Trigger/TrigMonitoring/TrigSteerMonitor/src/IDecisionCollector.h diff --git a/Trigger/TrigMonitoring/TrigSteerMonitor/src/DecisionCollectorTool.cxx b/Trigger/TrigMonitoring/TrigSteerMonitor/src/DecisionCollectorTool.cxx new file mode 100644 index 000000000000..bea67badfe88 --- /dev/null +++ b/Trigger/TrigMonitoring/TrigSteerMonitor/src/DecisionCollectorTool.cxx @@ -0,0 +1,34 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "DecisionCollectorTool.h" + +DecisionCollectorTool::DecisionCollectorTool(const std::string& type, const std::string& name, const IInterface* parent) + : base_class(type, name, parent) {} + +DecisionCollectorTool::~DecisionCollectorTool() {} + +StatusCode DecisionCollectorTool::initialize() { + ATH_CHECK( m_decisionsKey.initialize() ); + renounceArray( m_decisionsKey ); + return StatusCode::SUCCESS; +} + +StatusCode DecisionCollectorTool::finalize() { + return StatusCode::SUCCESS; +} + + + +StatusCode DecisionCollectorTool::getDecisions( TrigCompositeUtils::DecisionIDContainer& output ) const { + for (auto decisionKey: m_decisionsKey ) { + auto handle = SG::makeHandle( decisionKey ); + if ( handle.isValid() ) { + for ( const TrigCompositeUtils::Decision* d : *handle.cptr() ) { + TrigCompositeUtils::decisionIDs( d, output ); + } + } + } + return StatusCode::SUCCESS; +} diff --git a/Trigger/TrigMonitoring/TrigSteerMonitor/src/DecisionCollectorTool.h b/Trigger/TrigMonitoring/TrigSteerMonitor/src/DecisionCollectorTool.h new file mode 100644 index 000000000000..df2c310811b0 --- /dev/null +++ b/Trigger/TrigMonitoring/TrigSteerMonitor/src/DecisionCollectorTool.h @@ -0,0 +1,36 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ +#ifndef TRIGSTEERMONITOR_DECISIONCOLLECTORTOOL_H +#define TRIGSTEERMONITOR_DECISIONCOLLECTORTOOL_H + +#include "./IDecisionCollector.h" + +// Framework includes +#include "AthenaBaseComps/AthAlgTool.h" + +// STL includes +#include <string> + +/** + * @class DecisionCollectorTool + * @brief + **/ +class DecisionCollectorTool : public extends<AthAlgTool, IDecisionCollector> { +public: + DecisionCollectorTool(const std::string& type, const std::string& name, const IInterface* parent); + virtual ~DecisionCollectorTool() override; + + virtual StatusCode getDecisions( TrigCompositeUtils::DecisionIDContainer& ) const override; + + virtual StatusCode initialize() override; + virtual StatusCode finalize() override; + + SG::ReadHandleKeyArray<TrigCompositeUtils::DecisionContainer> m_decisionsKey{ this, "Decisions", {}, "Containers from which the decisions need to be red" }; + // in future we will also need a property to filter only the desired decision for combined chains (partial decisions should not be accounted) + +private: + +}; + +#endif // TRIGSTEERMONITOR_DECISIONCOLLECTORTOOL_H diff --git a/Trigger/TrigMonitoring/TrigSteerMonitor/src/IDecisionCollector.h b/Trigger/TrigMonitoring/TrigSteerMonitor/src/IDecisionCollector.h new file mode 100644 index 000000000000..9113639dd935 --- /dev/null +++ b/Trigger/TrigMonitoring/TrigSteerMonitor/src/IDecisionCollector.h @@ -0,0 +1,23 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ +#ifndef TRIGSTEERMONITOR_IDECISIONCOLLECTOR_H +#define TRIGSTEERMONITOR_IDECISIONCOLLECTOR_H + +#include "GaudiKernel/IAlgTool.h" +#include "DecisionHandling/TrigCompositeUtils.h" + +/** + * @class IDecisionCollector + * @brief Tools that collect decisions + **/ +class IDecisionCollector : virtual public IAlgTool { +public: + DeclareInterfaceID(IDecisionCollector, 1, 0); + + virtual StatusCode getDecisions( TrigCompositeUtils::DecisionIDContainer& ) const = 0; + + virtual ~IDecisionCollector() override {} +}; + +#endif // TRIGSTEERMONITOR_IDECISIONCOLLECTOR_H diff --git a/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoniMT.cxx b/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoniMT.cxx index f8acb63f6a7f..b0fdf10d197c 100644 --- a/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoniMT.cxx +++ b/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoniMT.cxx @@ -15,13 +15,12 @@ TrigSignatureMoniMT::TrigSignatureMoniMT( const std::string& name, StatusCode TrigSignatureMoniMT::initialize() { - ATH_MSG_INFO ("Initializing " << name() << "..."); - CHECK( m_l1DecisionsKey.initialize() ); - CHECK( m_finalDecisionsKey.initialize() ); + ATH_CHECK( m_l1DecisionsKey.initialize() ); + ATH_CHECK( m_finalDecisionsKey.initialize() ); renounceArray( m_finalDecisionsKey ); - + ATH_CHECK( m_collectorTools.retrieve() ); CHECK( m_histSvc.retrieve() ); - + { const int x = nBinsX(); @@ -45,6 +44,7 @@ StatusCode TrigSignatureMoniMT::initialize() { y, 1, y + 1 ); // Fill and GetBinContent use the same indexing then const std::string fullName = m_bookingPath + "/SignatureAcceptance"; m_histSvc->regHist( fullName, m_outputHistogram ); + ATH_MSG_DEBUG( "Registerd under " << fullName ); } CHECK( initHist() ); @@ -105,6 +105,14 @@ StatusCode TrigSignatureMoniMT::execute() { CHECK( fillL1(0) ); CHECK( fillL1(1) ); + int step = 0; + for ( auto& ctool: m_collectorTools ) { + TrigCompositeUtils::DecisionIDContainer stepSum; + ctool->getDecisions( stepSum ); + ATH_MSG_DEBUG( " Step " << step << " decisions " << stepSum.size() ); + ATH_CHECK( fillChains( stepSum, 3+step ) ); + ++step; + } const int row = m_outputHistogram->GetYaxis()->GetNbins(); @@ -121,7 +129,7 @@ StatusCode TrigSignatureMoniMT::execute() { TrigCompositeUtils::decisionIDs( decisionObj, ids ); sum.insert( ids.begin(), ids.end() ); // merge with so far passing chains } - CHECK( fillChains( sum, row ) ); + ATH_CHECK( fillChains( sum, row ) ); anyPassed = anyPassed or ( not sum.empty() ); } else { ATH_MSG_DEBUG( "Final decision " << d.key() << " absent, possibly early rejected" ); @@ -140,24 +148,8 @@ StatusCode TrigSignatureMoniMT::execute() { -int TrigSignatureMoniMT::nBinsY() const { - typedef StringToStringVectorMap::value_type v; - if ( m_steps.empty() ) { - ATH_MSG_INFO( "Step decisions are not specified, output histogram will only contain input, HLT PS, and output" ); - return 3; // in, PS, out - } - - - const int maxSteps = std::max_element( m_steps.begin(), m_steps.end(), - [](const v& el1, const v& el2){ return el1.second.size() < el2.second.size(); } - ) ->second.size(); - if ( maxSteps == 0 ) - ATH_MSG_INFO( "Step of depth 0 specified, output histogram will only contain input, HLT PS, and output" ); - else - ATH_MSG_DEBUG( "Longest step of " << maxSteps ); - - - return 3+maxSteps; +int TrigSignatureMoniMT::nBinsY() const { + return m_collectorTools.size()+3; // in, after ps, out } StatusCode TrigSignatureMoniMT::initHist() { @@ -173,8 +165,11 @@ StatusCode TrigSignatureMoniMT::initHist() { TAxis* y = m_outputHistogram->GetYaxis(); - y->SetBinLabel(1, "L1"); - y->SetBinLabel(2, "AfterPS"); + y->SetBinLabel( 1, "L1" ); + y->SetBinLabel( 2, "AfterPS" ); + for ( size_t i = 0; i < m_collectorTools.size(); ++i ) { + y->SetBinLabel( 3+i, ("Step "+std::to_string(i)).c_str() ); + } y->SetBinLabel( y->GetNbins(), "Output" ); // last bin // loop until the last bin and assign labels Step # diff --git a/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoniMT.h b/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoniMT.h index 2eccd8bdb085..2830e317ac78 100644 --- a/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoniMT.h +++ b/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoniMT.h @@ -12,7 +12,7 @@ #include "GaudiKernel/ITHistSvc.h" #include "DecisionHandling/TrigCompositeUtils.h" #include "xAODEventInfo/EventInfo.h" - +#include "DecisionCollectorTool.h" /** * @class Algorithm implementing monitoring of the HLT decision in the MT framework @@ -35,9 +35,12 @@ class TrigSignatureMoniMT : public ::AthAlgorithm TrigSignatureMoniMT(); SG::ReadHandleKey<TrigCompositeUtils::DecisionContainer> m_l1DecisionsKey{ this, "L1Decisions", "HLTChainsResult", "Chains activated after the L1" }; + + SG::ReadHandleKeyArray<TrigCompositeUtils::DecisionContainer> m_finalDecisionsKey{ this, "FinalDecisions", {}, "Final stage of all decisions" }; - typedef std::map<std::string, std::vector<std::string> > StringToStringVectorMap; - Gaudi::Property< StringToStringVectorMap > m_steps{ this, "FinalDecisionToStepsMap", {}, "Mapping from each final decision object in FinalDecisions to the decisions at earlier steps" }; + + // typedef std::map<std::string, std::vector<std::string> > StringToStringVectorMap; + //Gaudi::Property< StringToStringVectorMap > m_steps{ this, "FinalDecisionToStepsMap", {}, "Mapping from each final decision object in FinalDecisions to the decisions at earlier steps" }; Gaudi::Property<std::vector<std::string> > m_allChains{ this, "ChainsList", {}, "List of all configured chains" }; std::map<unsigned int, int> m_chainIDToBinMap; @@ -46,7 +49,8 @@ class TrigSignatureMoniMT : public ::AthAlgorithm Gaudi::Property<std::string> m_bookingPath{ this, "HistParh", "/EXPERT/TrigSteer_HLT", "Booking path for the histogram"}; TH2* m_outputHistogram; - + + ToolHandleArray<DecisionCollectorTool> m_collectorTools{ this, "CollectorTools", {}, "Tools that collect decisions for steps" }; int nBinsX() const { return m_allChains.size() +1; } int nBinsY() const; diff --git a/Trigger/TrigMonitoring/TrigSteerMonitor/src/components/TrigSteerMonitor_entries.cxx b/Trigger/TrigMonitoring/TrigSteerMonitor/src/components/TrigSteerMonitor_entries.cxx index a8d10ac2eefc..5a464d8d3382 100644 --- a/Trigger/TrigMonitoring/TrigSteerMonitor/src/components/TrigSteerMonitor_entries.cxx +++ b/Trigger/TrigMonitoring/TrigSteerMonitor/src/components/TrigSteerMonitor_entries.cxx @@ -11,6 +11,7 @@ #include "../TrigCorMoni.h" #include "../TrigMemAuditor.h" #include "../TrigSignatureMoniMT.h" +#include "../DecisionCollectorTool.h" DECLARE_COMPONENT( TrigSteerMoni ) DECLARE_COMPONENT( TrigChainMoni ) @@ -25,3 +26,4 @@ DECLARE_COMPONENT( TrigMemMoni ) DECLARE_COMPONENT( TrigCorMoni ) DECLARE_COMPONENT( TrigMemAuditor ) DECLARE_COMPONENT( TrigSignatureMoniMT ) +DECLARE_COMPONENT( DecisionCollectorTool ) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py index fce32b0b9ad4..121bd7b376cc 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py @@ -247,13 +247,21 @@ summary.OutputLevel = DEBUG steps = seqAND("HLTSteps", [ step0, step1, step0r ] ) -from TrigSteerMonitor.TrigSteerMonitorConf import TrigSignatureMoniMT +from TrigSteerMonitor.TrigSteerMonitorConf import TrigSignatureMoniMT, DecisionCollectorTool mon = TrigSignatureMoniMT() mon.FinalDecisions = [ "ElectronL2Decisions", "MuonL2Decisions", "WhateverElse" ] from TrigUpgradeTest.TestUtils import MenuTest mon.ChainsList = [ x.split(":")[1] for x in MenuTest.CTPToChainMapping ] mon.OutputLevel = DEBUG +step1Collector = DecisionCollectorTool("Step1Collector") +step1Collector.Decisions = ["EgammaCaloDecisions"] + +step2Collector = DecisionCollectorTool("Step2Collector") +step2Collector.Decisions = ["ElectronL2Decisions"] +mon.CollectorTools = [step1Collector, step2Collector] + + import AthenaPoolCnvSvc.WriteAthenaPool from OutputStreamAthenaPool.OutputStreamAthenaPool import createOutputStream StreamESD=createOutputStream("StreamESD","myESD.pool.root",True) -- GitLab From 36c49cc2a40f178ce109069bd1c5305e21e67abc Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Thu, 5 Jul 2018 13:03:29 +0000 Subject: [PATCH 365/562] 22.0 coverity InDetAssociationTools Former-commit-id: e0476c6bd8e6356e35f06b3763a0ee743156547d --- .../InDetPRD_AssociationToolGangedPixels.h | 2 - .../InDetAssociationTools/InDetPRD_Provider.h | 9 ++-- .../InDetPRD_AssociationToolGangedPixels.cxx | 54 +++++++++---------- .../src/InDetPRD_Provider.cxx | 49 +++++++---------- 4 files changed, 49 insertions(+), 65 deletions(-) diff --git a/InnerDetector/InDetRecTools/InDetAssociationTools/InDetAssociationTools/InDetPRD_AssociationToolGangedPixels.h b/InnerDetector/InDetRecTools/InDetAssociationTools/InDetAssociationTools/InDetPRD_AssociationToolGangedPixels.h index 68ee8ce52bde..18c1cab60247 100755 --- a/InnerDetector/InDetRecTools/InDetAssociationTools/InDetAssociationTools/InDetPRD_AssociationToolGangedPixels.h +++ b/InnerDetector/InDetRecTools/InDetAssociationTools/InDetAssociationTools/InDetPRD_AssociationToolGangedPixels.h @@ -10,8 +10,6 @@ #include "StoreGate/ReadHandleKey.h" #include "TrkToolInterfaces/IPRD_AssociationTool.h" #include "InDetPrepRawData/PixelGangedClusterAmbiguities.h" -#include <set> -#include <map> class AtlasDetectorID; class Identifier; diff --git a/InnerDetector/InDetRecTools/InDetAssociationTools/InDetAssociationTools/InDetPRD_Provider.h b/InnerDetector/InDetRecTools/InDetAssociationTools/InDetAssociationTools/InDetPRD_Provider.h index 57fea2ac8e9d..73d42c5f16a6 100644 --- a/InnerDetector/InDetRecTools/InDetAssociationTools/InDetAssociationTools/InDetPRD_Provider.h +++ b/InnerDetector/InDetRecTools/InDetAssociationTools/InDetAssociationTools/InDetPRD_Provider.h @@ -12,7 +12,7 @@ // Gaudi #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" -// InDet includes +// InDet includes; these are needed (cannot be fwd declared) for template type deduction #include "InDetPrepRawData/PixelClusterContainer.h" #include "InDetPrepRawData/SCT_ClusterContainer.h" #include "InDetPrepRawData/TRT_DriftCircleContainer.h" @@ -20,15 +20,14 @@ #include "TrkToolInterfaces/IPRD_Provider.h" #include "TrkPrepRawData/PrepRawDataContainer.h" #include "TrkPrepRawData/PrepRawDataCollection.h" -// Identifier -#include "Identifier/Identifier.h" -#include "Identifier/IdentifierHash.h" + class AtlasDetectorID; class PixelID; class SCT_ID; class TRT_ID; - +class Identifier; +class IdentifierHash; namespace InDet { /** diff --git a/InnerDetector/InDetRecTools/InDetAssociationTools/src/InDetPRD_AssociationToolGangedPixels.cxx b/InnerDetector/InDetRecTools/InDetAssociationTools/src/InDetPRD_AssociationToolGangedPixels.cxx index fdc0667bf9f1..9b2b7d34ca48 100755 --- a/InnerDetector/InDetRecTools/InDetAssociationTools/src/InDetPRD_AssociationToolGangedPixels.cxx +++ b/InnerDetector/InDetRecTools/InDetAssociationTools/src/InDetPRD_AssociationToolGangedPixels.cxx @@ -11,14 +11,14 @@ #include "Identifier/Identifier.h" #include "AtlasDetDescr/AtlasDetectorID.h" -#include <cassert> #include <vector> -#include "ext/functional" +//#include "ext/functional" InDet::InDetPRD_AssociationToolGangedPixels::InDetPRD_AssociationToolGangedPixels(const std::string& t, const std::string& n, const IInterface* p ) : - AthAlgTool(t,n,p) + AthAlgTool(t,n,p), + m_has_ambi_map{} { declareInterface<IPRD_AssociationTool>(this); declareProperty( "PixelClusterAmbiguitiesMapName", m_pixelClusterAmbiguitiesMapName = "PixelClusterAmbiguitiesMap" ); @@ -39,8 +39,7 @@ StatusCode InDet::InDetPRD_AssociationToolGangedPixels::initialize() StatusCode InDet::InDetPRD_AssociationToolGangedPixels::finalize() { - StatusCode sc = AlgTool::finalize(); - return sc; + return StatusCode::SUCCESS; } StatusCode InDet::InDetPRD_AssociationToolGangedPixels::addPRDs( const Trk::Track& track ) @@ -51,7 +50,7 @@ StatusCode InDet::InDetPRD_AssociationToolGangedPixels::addPRDs( const Trk::Trac TrackPrepRawDataMap::const_iterator itvec = m_trackPrepRawDataMap.find(&track); if (itvec!=m_trackPrepRawDataMap.end()) { - msg(MSG::ERROR)<<"track already found in cache, should not happen"<<endmsg; + ATH_MSG_ERROR("track already found in cache, should not happen"); return StatusCode::FAILURE; } // get all prds on 'track' @@ -62,19 +61,18 @@ StatusCode InDet::InDetPRD_AssociationToolGangedPixels::addPRDs( const Trk::Trac // loop over PRD for (; it!=itEnd; ++it) { m_prepRawDataTrackMap.insert(std::make_pair(*it, &track) ); - // test ganged ambiguity const PixelCluster* pixel = dynamic_cast<const PixelCluster*> (*it); if (pixel!=0) { if (pixel->gangedPixel()) { - if (msgLvl(MSG::DEBUG)) msg() << "Found ganged pixel, search for mirror" << endmsg; - std::pair<PixelGangedClusterAmbiguities::const_iterator, + ATH_MSG_DEBUG( "Found ganged pixel, search for mirror" ); + std::pair<PixelGangedClusterAmbiguities::const_iterator, PixelGangedClusterAmbiguities::const_iterator> ambi = m_gangedAmbis->equal_range(pixel); - for (; ambi.first != ambi.second ; ++(ambi.first) ) { - // add ambiguity as used by this track as well - if (msgLvl(MSG::DEBUG)) msg() << "Found mirror pixel, add mirror to association map" << endmsg; - m_prepRawDataTrackMap.insert(std::make_pair(ambi.first->second, &track) ); - } + for (; ambi.first != ambi.second ; ++(ambi.first) ) { + // add ambiguity as used by this track as well + ATH_MSG_DEBUG( "Found mirror pixel, add mirror to association map" ); + m_prepRawDataTrackMap.insert(std::make_pair(ambi.first->second, &track) ); + } } } } @@ -82,8 +80,8 @@ StatusCode InDet::InDetPRD_AssociationToolGangedPixels::addPRDs( const Trk::Trac // cache this using m_trackPrepRawDataMap m_trackPrepRawDataMap.insert( std::make_pair(&track, prds) ); - if (msgLvl(MSG::DEBUG)) msg()<<"Added PRDs from Track at ("<<&track<<") - map now has size: \t" - <<m_prepRawDataTrackMap.size()<<endmsg; + ATH_MSG_DEBUG("Added PRDs from Track at ("<<&track<<") - map now has size: \t" + <<m_prepRawDataTrackMap.size()); return StatusCode::SUCCESS; } @@ -105,7 +103,7 @@ StatusCode InDet::InDetPRD_AssociationToolGangedPixels::removePRDs( const Trk::T TrackPrepRawDataMap::iterator itvec = m_trackPrepRawDataMap.find(&track); if (itvec==m_trackPrepRawDataMap.end()) { - msg(MSG::ERROR)<<"Track not found in cache, this should not happen"<<endmsg; + ATH_MSG_ERROR("Track not found in cache, this should not happen"); return StatusCode::FAILURE; } @@ -141,7 +139,7 @@ StatusCode InDet::InDetPRD_AssociationToolGangedPixels::removePRDs( const Trk::T PixelGangedClusterAmbiguities::const_iterator> ambi = m_gangedAmbis->equal_range(pixel); for (; ambi.first != ambi.second ; ++(ambi.first) ) { // add ambiguity as used by this track as well - if (msgLvl(MSG::DEBUG)) msg()<<MSG::DEBUG<<"Found ganged pixel, remove also mirror from association map"<<endmsg; + ATH_MSG_DEBUG("Found ganged pixel, remove also mirror from association map"); range = m_prepRawDataTrackMap.equal_range(ambi.first->second); // get iterators for range @@ -163,9 +161,9 @@ StatusCode InDet::InDetPRD_AssociationToolGangedPixels::removePRDs( const Trk::T // remove cached PRD vector m_trackPrepRawDataMap.erase( itvec ); - if (msgLvl(MSG::DEBUG)) msg()<<"Removed PRDs from track (" + ATH_MSG_DEBUG("Removed PRDs from track (" <<&track<<") \t- map has changed size from \t" - <<oldSize <<" \tto "<<m_prepRawDataTrackMap.size()<<endmsg; + <<oldSize <<" \tto "<<m_prepRawDataTrackMap.size()); return StatusCode::SUCCESS; } @@ -204,8 +202,8 @@ Trk::IPRD_AssociationTool::TrackSet // don't forget to remove the input track connectedTracks.erase(&track); - if (msgLvl(MSG::VERBOSE)) msg()<<"Added in connected tracks for track "<<&track - << "\tsize of list is "<<connectedTracks.size()<<endmsg; + ATH_MSG_VERBOSE("Added in connected tracks for track "<<&track + << "\tsize of list is "<<connectedTracks.size()); return connectedTracks; } @@ -219,12 +217,12 @@ std::vector< const Trk::PrepRawData* > InDet::InDetPRD_AssociationToolGangedPixe TrackPrepRawDataMap::const_iterator itvec = m_trackPrepRawDataMap.find(&track); if (itvec!=m_trackPrepRawDataMap.end()) { - msg(MSG::VERBOSE)<<"found track in cache, return cached PRD vector for track"<<endmsg; + ATH_MSG_VERBOSE("found track in cache, return cached PRD vector for track"); return itvec->second; } if (track.measurementsOnTrack()==0) { - msg(MSG::WARNING)<<"Track has no RoTs"<<endmsg; + ATH_MSG_WARNING("Track has no RoTs"); return PRDs_t(); // return vector optimization } @@ -250,8 +248,8 @@ std::vector< const Trk::PrepRawData* > InDet::InDetPRD_AssociationToolGangedPixe vec.push_back(rot->prepRawData()); } - if (msgLvl(MSG::DEBUG)) msg()<<" Getting "<<vec.size() - <<" PRDs from track at:"<<&track<<endmsg; + ATH_MSG_DEBUG(" Getting "<<vec.size() + <<" PRDs from track at:"<<&track); // new mode, we add the outleirs in the TRT if (m_addTRToutliers) { @@ -275,8 +273,8 @@ std::vector< const Trk::PrepRawData* > InDet::InDetPRD_AssociationToolGangedPixe } } - if (msgLvl(MSG::DEBUG)) msg()<<" Getting "<<vec.size() - <<" PRDs including TRT outlier from track at:"<<&track<<endmsg; + ATH_MSG_DEBUG(" Getting "<<vec.size() + <<" PRDs including TRT outlier from track at:"<<&track); } return vec; diff --git a/InnerDetector/InDetRecTools/InDetAssociationTools/src/InDetPRD_Provider.cxx b/InnerDetector/InDetRecTools/InDetAssociationTools/src/InDetPRD_Provider.cxx index 6a34eaea72c6..5a9aa2f9e0a8 100644 --- a/InnerDetector/InDetRecTools/InDetAssociationTools/src/InDetPRD_Provider.cxx +++ b/InnerDetector/InDetRecTools/InDetAssociationTools/src/InDetPRD_Provider.cxx @@ -10,9 +10,13 @@ #include "InDetPrepRawData/PixelCluster.h" #include "InDetPrepRawData/SCT_Cluster.h" #include "InDetPrepRawData/TRT_DriftCircle.h" +// +#include "InDetPrepRawData/SCT_ClusterContainer.h" // AtlasDetDescr #include "AtlasDetDescr/AtlasDetectorID.h" +#include "Identifier/Identifier.h" +#include "Identifier/IdentifierHash.h" // InDetIdentifier #include "InDetIdentifier/PixelID.h" #include "InDetIdentifier/SCT_ID.h" @@ -44,48 +48,33 @@ StatusCode InDet::InDetPRD_Provider::initialize() { ATH_MSG_VERBOSE("Initializing ..."); // Set up ATLAS ID helper to be able to identify the PRD's det-subsystem - if (detStore()->retrieve(m_idHelper, "AtlasID").isFailure()) { - ATH_MSG_ERROR ("Could not get AtlasDetectorID helper. Aborting ..."); - return StatusCode::FAILURE; - } + ATH_CHECK(detStore()->retrieve(m_idHelper, "AtlasID")); // Get Pixel helpers - if (detStore()->retrieve(m_pixIdHelper, "PixelID").isFailure()) { - ATH_MSG_ERROR ("Could not get PixelID helper. Aborting ..."); - return StatusCode::FAILURE; - } + ATH_CHECK(detStore()->retrieve(m_pixIdHelper, "PixelID")); // Get SCT helpers - if (detStore()->retrieve(m_sctIdHelper, "SCT_ID").isFailure()) { - ATH_MSG_ERROR ("Could not get SCT_ID helper. Aborting ..."); - return StatusCode::FAILURE; - } + ATH_CHECK(detStore()->retrieve(m_sctIdHelper, "SCT_ID")); // Get TRT helpers - if (detStore()->retrieve(m_trtIdHelper, "TRT_ID").isFailure()) { - ATH_MSG_ERROR ("Could not get TRT_ID helper. Aborting ..."); - return StatusCode::FAILURE; - } + ATH_CHECK(detStore()->retrieve(m_trtIdHelper, "TRT_ID")); return StatusCode::SUCCESS; } StatusCode InDet::InDetPRD_Provider::finalize() { - ATH_MSG_VERBOSE("Initializing ..."); + ATH_MSG_VERBOSE("Finalizing ..."); return StatusCode::SUCCESS; } StatusCode InDet::InDetPRD_Provider::retrieveCollection() { - if (m_pixClusterContainerName!="" && evtStore()->retrieve(m_pixClusterContainer,m_pixClusterContainerName).isFailure() ){ - ATH_MSG_ERROR("Could not retrieve " << m_pixClusterContainerName << ". Aborting." ); - return StatusCode::FAILURE; - } - if (m_sctClusterContainerName!="" && evtStore()->retrieve(m_sctClusterContainer,m_sctClusterContainerName).isFailure() ){ - ATH_MSG_ERROR("Could not retrieve " << m_sctClusterContainerName << ". Aborting." ); - return StatusCode::FAILURE; - } - if (m_trtDriftCircleContainerName!="" && evtStore()->retrieve(m_trtDriftCircleContainer,m_trtDriftCircleContainerName).isFailure() ){ - ATH_MSG_ERROR("Could not retrieve " << m_trtDriftCircleContainerName << ". Aborting." ); - return StatusCode::FAILURE; - } - return StatusCode::SUCCESS; + if (not m_pixClusterContainerName.empty()){ + ATH_CHECK(evtStore()->retrieve(m_pixClusterContainer,m_pixClusterContainerName)); + } + if (not m_sctClusterContainerName.empty()){ + ATH_CHECK(evtStore()->retrieve(m_sctClusterContainer,m_sctClusterContainerName)); + } + if (not m_trtDriftCircleContainerName.empty()){ + ATH_CHECK(evtStore()->retrieve(m_trtDriftCircleContainer,m_trtDriftCircleContainerName)); + } + return StatusCode::SUCCESS; } -- GitLab From 72e7ce581a0b5100f81e613e1d800f10e56e0e44 Mon Sep 17 00:00:00 2001 From: Walter Lampl <Walter.Lampl@cern.ch> Date: Thu, 5 Jul 2018 15:03:47 +0200 Subject: [PATCH 366/562] Add AthExHellWorld to AthSimulation to allow unit-test to succeed Former-commit-id: 11d8faaf6f434a4b9a20b82e7cfc2db213f1e371 --- Projects/AthSimulation/package_filters.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Projects/AthSimulation/package_filters.txt b/Projects/AthSimulation/package_filters.txt index be8c497c2571..21eae9182195 100644 --- a/Projects/AthSimulation/package_filters.txt +++ b/Projects/AthSimulation/package_filters.txt @@ -30,6 +30,7 @@ + Control/AthToolSupport/AsgTools + Control/AthenaBaseComps + Control/AthenaCommon ++ Control/AthenaExamples/AthExHelloWorld + Control/AthenaInterprocess + Control/AthenaKernel + Control/AthenaMP -- GitLab From ac24a72e44f5a0e30a420fdb816c4292166c76b9 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Thu, 5 Jul 2018 13:30:56 +0000 Subject: [PATCH 367/562] 22.0 coverity InDetAmbiTrackSelectionTool Former-commit-id: f20504b37f3e8d732f012273cfbaa86b40ea370b --- .../InDetAmbiTrackSelectionTool.h | 1 - .../InDetDenseEnvAmbiTrackSelectionTool.h | 13 +- .../src/InDetAmbiTrackSelectionTool.cxx | 49 ++---- .../InDetDenseEnvAmbiTrackSelectionTool.cxx | 145 +++++++----------- 4 files changed, 76 insertions(+), 132 deletions(-) diff --git a/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/InDetAmbiTrackSelectionTool/InDetAmbiTrackSelectionTool.h b/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/InDetAmbiTrackSelectionTool/InDetAmbiTrackSelectionTool.h index d2fd1b6f93ed..91a1240a9b75 100755 --- a/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/InDetAmbiTrackSelectionTool/InDetAmbiTrackSelectionTool.h +++ b/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/InDetAmbiTrackSelectionTool/InDetAmbiTrackSelectionTool.h @@ -15,7 +15,6 @@ #include "TrkTrack/TrackStateOnSurface.h" #include "TrkToolInterfaces/IAmbiTrackSelectionTool.h" #include "TrkToolInterfaces/IPRD_AssociationTool.h" -#include <map> #include <vector> class SiliconID; diff --git a/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/InDetAmbiTrackSelectionTool/InDetDenseEnvAmbiTrackSelectionTool.h b/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/InDetAmbiTrackSelectionTool/InDetDenseEnvAmbiTrackSelectionTool.h index ccef61613b9c..8d19dfdab3b3 100755 --- a/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/InDetAmbiTrackSelectionTool/InDetDenseEnvAmbiTrackSelectionTool.h +++ b/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/InDetAmbiTrackSelectionTool/InDetDenseEnvAmbiTrackSelectionTool.h @@ -14,20 +14,23 @@ #include "GaudiKernel/IIncidentSvc.h" #include "StoreGate/ReadHandleKey.h" #include "TrkCaloClusterROI/CaloClusterROI_Collection.h" -#include "TrkTrack/TrackStateOnSurface.h" #include "TrkToolInterfaces/IAmbiTrackSelectionTool.h" #include "TrkToolInterfaces/IPRD_AssociationTool.h" #include <map> #include <vector> -#include "TrkRIO_OnTrack/RIO_OnTrack.h" -#include "TrkValInterfaces/ITrkObserverTool.h" +#include "TrkTrack/Track.h" //for use in the struct lessTrkTrack implementation in this header #include "TrkParameters/TrackParameters.h" +#include <cmath> //for std::fabs in implementation of structs in this header +#include <iostream> //for cout in dumpInfo class SiliconID; class Identifier; class IBLParameterSvc; namespace Trk { - class Track; + class ITrkObserverTool; + class TrackStateOnSurface; + class RIO_OnTrack; + class PrepRawData; } namespace InDet @@ -201,7 +204,7 @@ namespace InDet return true; if(ATH_UNLIKELY(!y->trackParameters() && y->trackParameters()->size() <= 0) ) return false; - return fabs( (*x->trackParameters())[0]->parameters()[Trk::qOverP]) < fabs( (*y->trackParameters())[0]->parameters()[Trk::qOverP]) ; + return std::fabs( (*x->trackParameters())[0]->parameters()[Trk::qOverP]) < std::fabs( (*y->trackParameters())[0]->parameters()[Trk::qOverP]) ; } }; diff --git a/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/src/InDetAmbiTrackSelectionTool.cxx b/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/src/InDetAmbiTrackSelectionTool.cxx index c5a0c0ac91e5..a7c925f51f25 100755 --- a/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/src/InDetAmbiTrackSelectionTool.cxx +++ b/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/src/InDetAmbiTrackSelectionTool.cxx @@ -24,7 +24,6 @@ #include "InDetRecToolInterfaces/ITrtDriftCircleCutTool.h" #include "PixelGeoModel/IBLParameterSvc.h" -#include <ext/functional> //================ Constructor ================================================= InDet::InDetAmbiTrackSelectionTool::InDetAmbiTrackSelectionTool(const std::string& t, @@ -73,49 +72,22 @@ InDet::InDetAmbiTrackSelectionTool::~InDetAmbiTrackSelectionTool() StatusCode InDet::InDetAmbiTrackSelectionTool::initialize() { - - StatusCode sc = AlgTool::initialize(); - if (sc.isFailure()) return sc; if (m_IBLParameterSvc.retrieve().isFailure()) { - ATH_MSG_WARNING( "Could not retrieve IBLParameterSvc"); - } - else { - m_IBLParameterSvc->setBoolParameters(m_doPixelClusterSplitting,"doPixelClusterSplitting"); + ATH_MSG_WARNING( "Could not retrieve IBLParameterSvc"); + } else { + m_IBLParameterSvc->setBoolParameters(m_doPixelClusterSplitting,"doPixelClusterSplitting"); } - - sc = m_assoTool.retrieve(); - if (sc.isFailure()) - { - msg(MSG::FATAL) << "Failed to retrieve tool " << m_assoTool << endmsg; - return StatusCode::FAILURE; - } - else - msg(MSG::INFO) << "Retrieved tool " << m_assoTool << endmsg; - + ATH_CHECK( m_assoTool.retrieve()); + // Get segment selector tool // if(m_parameterization){ - if(m_selectortool.retrieve().isFailure()) { - msg(MSG::FATAL)<<"Failed to retrieve tool "<< m_selectortool <<endmsg; - return StatusCode::FAILURE; - } else { - msg(MSG::INFO) << "Retrieved tool " << m_selectortool << endmsg; - } - } - else { + ATH_CHECK(m_selectortool.retrieve()); + } else { m_selectortool.disable(); } - - sc = detStore()->retrieve(m_detID, "SiliconID" ); - if (sc.isFailure()) - { - msg(MSG::FATAL) << "Could not get SiliconID "<<endmsg; - return sc; - } - else - msg(MSG::DEBUG) << "Found SiliconID"<<endmsg; - - msg(MSG::INFO) << "initialize() successful in " << name() << endmsg; + ATH_CHECK(detStore()->retrieve(m_detID, "SiliconID" )); + ATH_MSG_DEBUG( "initialize() successful" ); return StatusCode::SUCCESS; } @@ -123,8 +95,7 @@ StatusCode InDet::InDetAmbiTrackSelectionTool::initialize() StatusCode InDet::InDetAmbiTrackSelectionTool::finalize() { - StatusCode sc = AlgTool::finalize(); - return sc; + return StatusCode::SUCCESS; } //============================================================================================ diff --git a/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/src/InDetDenseEnvAmbiTrackSelectionTool.cxx b/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/src/InDetDenseEnvAmbiTrackSelectionTool.cxx index b4174cf259ec..ecf35181ca0a 100755 --- a/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/src/InDetDenseEnvAmbiTrackSelectionTool.cxx +++ b/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/src/InDetDenseEnvAmbiTrackSelectionTool.cxx @@ -11,7 +11,7 @@ #include "InDetIdentifier/SiliconID.h" #include "StoreGate/StoreGateSvc.h" #include "AthContainers/DataVector.h" -#include "TrkTrack/Track.h" +#include "TrkTrack/TrackStateOnSurface.h" #include "TrkMeasurementBase/MeasurementBase.h" #include "TrkRIO_OnTrack/RIO_OnTrack.h" #include "TrkPseudoMeasurementOnTrack/PseudoMeasurementOnTrack.h" @@ -26,12 +26,11 @@ #include "PixelGeoModel/IBLParameterSvc.h" #include "TrkCaloClusterROI/CaloClusterROI.h" #include "TrkCaloClusterROI/CaloClusterROI_Collection.h" +#include "TrkValInterfaces/ITrkObserverTool.h" -#include "TMath.h" #include "TString.h" -#include <ext/functional> //================ Constructor ================================================= InDet::InDetDenseEnvAmbiTrackSelectionTool::InDetDenseEnvAmbiTrackSelectionTool(const std::string& t, @@ -726,86 +725,56 @@ void InDet::InDetDenseEnvAmbiTrackSelectionTool::fillTrackDetails(const Trk::Tra if ( !clus->tooBigToBeSplit() ) { tsosDetails.splitProb1[index] = clus->splitProbability1(); tsosDetails.splitProb2[index] = clus->splitProbability2(); - //if(clus->isSplit()) numissplit++; } else { tsosDetails.splitProb1[index] = 0.51; tsosDetails.splitProb2[index] = 0.51; - //numissplit++; } } } if (isSCT) { - if(m_doSCTSplitting){ - ATH_MSG_DEBUG ("Entered doSCTSplitting. Getting cluster parameters."); - - const InDet::SCT_Cluster* clussct = dynamic_cast <const InDet::SCT_Cluster*> (rot->prepRawData()); - if( abs((*iTsos)->surface().normal()(2)) < 0.1 ){ - - //layer info; not used now but may be used later - //float sx = (*iTsos)->surface().center()(0); - //float sy = (*iTsos)->surface().center()(1); - //float sz = (*iTsos)->surface().position()(2); - //float sR = sqrt( sx*sx + sy*sy ); - - //int layer; - //if(sR < 290) layer = -1; - //if(sR > 290 && sR < 310) layer = 0; - //if(sR > 360 && sR < 380) layer = 1; - //if(sR > 435 && sR < 455) layer = 2; - //if(sR > 500 && sR < 525) layer = 3; - //if(sR > 525) layer = 4; - - float px = (*iTsos)->trackParameters()->momentum()(0); - float py = (*iTsos)->trackParameters()->momentum()(1); - float nx = (*iTsos)->surface().normal()(0); - float ny = (*iTsos)->surface().normal()(1); - - //lphi will be the momentum's angle in the x-y plane minus the surface's normal angle - double lphi = atan2( py, px ) - atan2( ny, nx ); - - double diff = ((285*abs( tan(lphi)-tan(-0.07)) ) - 80*clussct->width().colRow()(0)); - ATH_MSG_DEBUG ("Calculated width - observed width? "<< diff ); - - //track pT would be sqrt( ( px * px ) + ( py * py ) ) - //isStereo?: (*iTsos)->surface().isStereo() - //Number of split pixel clusters: numissplit <- would have to uncomment stuff out from above - - if(abs(diff) > 80){ - tsosDetails.splitProb1[index] = .99; - tsosDetails.splitProb2[index] = .99; - } - else{ - tsosDetails.splitProb1[index] = 0; - tsosDetails.splitProb2[index] = 0; - } - }//This ends the "isBarrel" if statement; no endcap clusters are split - else{ - tsosDetails.splitProb1[index] = 0; - tsosDetails.splitProb2[index] = 0; - } - //const InDet::SCT_Cluster* sctClus = dynamic_cast <const InDet::SCT_Cluster*> (rot->prepRawData()); - - //if ( !sctClus ) { - // ATH_MSG_WARNING ("---> Cast to SCT cluster failed, should not happen !"); - // tsosDetails.type[index] = RejectedHit; - // continue; - //} - - // If SCT cluster is not too big to be split - //if ( sctClus->isShareable() ) { - // // We allow the cluster to be shared with one other track - // tsosDetails.splitProb1[index] = sctClus->isShareable() * 0.51; - // tsosDetails.splitProb2[index] = sctClus->isShareable() * 0.; - //} - + ATH_MSG_DEBUG ("Entered doSCTSplitting. Getting cluster parameters."); + const InDet::SCT_Cluster* clussct = dynamic_cast <const InDet::SCT_Cluster*> (rot->prepRawData()); + if (!clussct){ + ATH_MSG_WARNING ("---> Cast to SCT cluster failed, should not happen !"); + tsosDetails.type[index] = RejectedHit; + continue; + } + if( std::abs((*iTsos)->surface().normal()(2)) < 0.1 ){ + float px = (*iTsos)->trackParameters()->momentum()(0); + float py = (*iTsos)->trackParameters()->momentum()(1); + float nx = (*iTsos)->surface().normal()(0); + float ny = (*iTsos)->surface().normal()(1); + + //lphi will be the momentum's angle in the x-y plane minus the surface's normal angle + double lphi = std::atan2( py, px ) - std::atan2( ny, nx ); + + double diff = ((285*std::abs( std::tan(lphi)-std::tan(-0.07)) ) - 80*clussct->width().colRow()(0)); + ATH_MSG_DEBUG ("Calculated width - observed width? "<< diff ); + + //track pT would be sqrt( ( px * px ) + ( py * py ) ) + //isStereo?: (*iTsos)->surface().isStereo() + //Number of split pixel clusters: numissplit <- would have to uncomment stuff out from above + + if(std::abs(diff) > 80){ + tsosDetails.splitProb1[index] = .99; + tsosDetails.splitProb2[index] = .99; + }else{ + tsosDetails.splitProb1[index] = 0; + tsosDetails.splitProb2[index] = 0; + } + }//This ends the "isBarrel" if statement; no endcap clusters are split + else { + tsosDetails.splitProb1[index] = 0; + tsosDetails.splitProb2[index] = 0; + } } //Always set to 0 if splitting not allowed - else{ - tsosDetails.splitProb1[index] = 0; - tsosDetails.splitProb2[index] = 0; + else{ + tsosDetails.splitProb1[index] = 0; + tsosDetails.splitProb2[index] = 0; } } @@ -1460,7 +1429,8 @@ void InDet::InDetDenseEnvAmbiTrackSelectionTool::updatePixelClusterInformation(T //========================================================================================== bool InDet::InDetDenseEnvAmbiTrackSelectionTool::isHadCaloCompatible(const Trk::TrackParameters& Tp) const { - const double pi = M_PI, pi2 = 2.*M_PI; + constexpr double pi = M_PI; + constexpr double pi2 = 2.*M_PI; if(m_hadF.empty()) return false; auto f = m_hadF.begin(), fe = m_hadF.end(); @@ -1472,14 +1442,14 @@ bool InDet::InDetDenseEnvAmbiTrackSelectionTool::isHadCaloCompatible(const Trk:: double E = Tp.eta(); for(; f!=fe; ++f) { - double df = fabs(F-(*f)); - if(df > pi ) df = fabs(pi2-df); + double df = std::fabs(F-(*f)); + if(df > pi ) df = std::fabs(pi2-df); if(df < m_phiWidth) { //Correct eta of cluster to take into account the z postion of the track double newZ = *z - Tp.position().z(); - double newEta = atanh( newZ / sqrt( (*r) * (*r) + newZ*newZ ) ); + double newEta = std::atanh( newZ / std::sqrt( (*r) * (*r) + newZ*newZ ) ); - double de = fabs(E-newEta); + double de = std::fabs(E-newEta); if(de < m_etaWidth) return true; } @@ -1495,7 +1465,8 @@ bool InDet::InDetDenseEnvAmbiTrackSelectionTool::isHadCaloCompatible(const Trk:: bool InDet::InDetDenseEnvAmbiTrackSelectionTool::isEmCaloCompatible(const Trk::TrackParameters& Tp) const { - const double pi = M_PI, pi2 = 2.*M_PI; + constexpr double pi = M_PI; + constexpr double pi2 = 2.*M_PI; if(m_emF.empty()) return false; auto f = m_emF.begin(), fe = m_emF.end(); @@ -1509,14 +1480,14 @@ bool InDet::InDetDenseEnvAmbiTrackSelectionTool::isEmCaloCompatible(const Trk::T double Z = Tp.position().z(); for(; f!=fe; ++f) { - double df = fabs(F-(*f)); - if(df > pi ) df = fabs(pi2-df); + double df = std::fabs(F-(*f)); + if(df > pi ) df = std::fabs(pi2-df); if(df < m_phiWidthEm) { //Correct eta of cluster to take into account the z postion of the track double newZ = *z - Z; double newR = *r - R; - double newEta = atanh( newZ / sqrt( newR*newR + newZ*newZ ) ); - double de = fabs(E-newEta); + double newEta = std::atanh( newZ / std::sqrt( newR*newR + newZ*newZ ) ); + double de = std::fabs(E-newEta); if(de < m_etaWidthEm) return true; } @@ -1625,15 +1596,15 @@ bool InDet::InDetDenseEnvAmbiTrackSelectionTool::isNearbyTrackCandidate(const T double dPhi = paraA->parameters()[Trk::phi] - paraB->parameters()[Trk::phi]; - if(dPhi > TMath::Pi()) - dPhi -= 2* TMath::Pi(); + if(dPhi > M_PI) + dPhi -= 2* M_PI; - if(dPhi < -TMath::Pi()) - dPhi += 2* TMath::Pi(); + if(dPhi < -M_PI) + dPhi += 2* M_PI; - double dEta = fabs(1./tan(paraA->parameters()[Trk::theta]) - 1./tan(paraB->parameters()[Trk::theta])); + double dEta = std::fabs(1./std::tan(paraA->parameters()[Trk::theta]) - 1./std::tan(paraB->parameters()[Trk::theta])); - if(fabs(dlocalX) > m_pairDeltaX || fabs(dlocalY) > m_pairDeltaY || fabs(dPhi) > m_pairDeltaPhi || fabs(dEta) > m_pairDeltaEta) + if(std::fabs(dlocalX) > m_pairDeltaX || std::fabs(dlocalY) > m_pairDeltaY || std::fabs(dPhi) > m_pairDeltaPhi || std::fabs(dEta) > m_pairDeltaEta) pass = false; -- GitLab From 850457f28ac7bf6e33c49cbe23af588d147a1f35 Mon Sep 17 00:00:00 2001 From: Shota Hayashida <hayashida@hepl.phys.nagoya-u.ac.jp> Date: Thu, 5 Jul 2018 15:44:05 +0200 Subject: [PATCH 368/562] Updated the TrigL2MuonSA package to use Service/ToolHandle Former-commit-id: 4623257af2f4eef492b2b32442eb3fafdcd622c6 --- .../TrigL2MuonSA/MdtDataPreparator.h | 10 +++--- .../TrigL2MuonSA/MuFastDataPreparator.h | 3 +- .../TrigL2MuonSA/MuFastStationFitter.h | 26 +++++++-------- .../TrigL2MuonSA/RpcRoadDefiner.h | 1 - .../TrigL2MuonSA/TgcRoadDefiner.h | 2 +- .../TrigL2MuonSA/src/CscRegUtils.cxx | 6 ++-- .../TrigL2MuonSA/src/MdtDataPreparator.cxx | 2 ++ .../TrigL2MuonSA/src/MuCalStreamerTool.cxx | 2 -- .../TrigL2MuonSA/src/MuFastDataPreparator.cxx | 11 +++++-- .../TrigL2MuonSA/src/MuFastStationFitter.cxx | 19 ++++++----- .../TrigL2MuonSA/src/MuFastTrackFitter.cxx | 32 ++++++++++++++----- .../TrigL2MuonSA/src/TgcDataPreparator.cxx | 17 +++++----- 12 files changed, 79 insertions(+), 52 deletions(-) diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtDataPreparator.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtDataPreparator.h index 0700a8005684..82aebda0bb4f 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtDataPreparator.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtDataPreparator.h @@ -127,8 +127,9 @@ namespace TrigL2MuonSA { ServiceHandle<ActiveStoreSvc> m_activeStore; // Tools for the Raw data conversion - ToolHandle<Muon::IMuonRawDataProviderTool> m_mdtRawDataProvider { - this, "MDT_RawDataProvider", "Muon::MDT_RawDataProviderTool", "MDTRawDataProviderTool"}; + ToolHandle<Muon::IMuonRawDataProviderTool> m_mdtRawDataProvider; + //ToolHandle<Muon::IMuonRawDataProviderTool> m_mdtRawDataProvider { + // this, "MDT_RawDataProvider", "Muon::MDT_RawDataProviderTool", "MDTRawDataProviderTool"}; // Cabling ServiceHandle<MuonMDT_CablingSvc> m_mdtCabling; @@ -153,8 +154,9 @@ namespace TrigL2MuonSA { ToolHandle<MdtRegionDefiner> m_mdtRegionDefiner; // handles to data access - ToolHandle<Muon::IMuonRdoToPrepDataTool> m_mdtPrepDataProvider { - this, "MdtPrepDataProvider", "Muon::MdtRdoToPrepDataTool/MdtPrepDataProviderTool", "MdtPrepDataProviderTool"}; + ToolHandle<Muon::IMuonRdoToPrepDataTool> m_mdtPrepDataProvider; + //ToolHandle<Muon::IMuonRdoToPrepDataTool> m_mdtPrepDataProvider { + // this, "MdtPrepDataProvider", "Muon::MdtRdoToPrepDataTool/MdtPrepDataProviderTool", "MdtPrepDataProviderTool"}; SG::ReadHandleKey<MdtCsmContainer> m_mdtCsmContainerKey{ this, "MDTCSMContainer", "MDTCSM", "Name of the MDTRDO to read in"}; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastDataPreparator.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastDataPreparator.h index b859368df56c..f98708ac17d6 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastDataPreparator.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastDataPreparator.h @@ -100,8 +100,9 @@ class MuFastDataPreparator: public AthAlgTool protected: // Services + //ServiceHandle<LVL1RPC::RPCRecRoiSvc> m_recRPCRoiSvc; ServiceHandle<LVL1RPC::RPCRecRoiSvc> m_recRPCRoiSvc { - this, "RPCRecRoiSvc", "LVL1RPC::RPCRecRoiSvc", "Reconstruction of RPC RoI"}; + this, "RPCRecRoiSvc", "LVL1RPC::RPCRecRoiSvc", "Reconstruction of RPC RoI"}; private: diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastStationFitter.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastStationFitter.h index 3ee72c57d1df..3f26145db793 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastStationFitter.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastStationFitter.h @@ -65,37 +65,37 @@ class MuFastStationFitter: public AthAlgTool BooleanProperty m_use_mcLUT; Gaudi::Property< double > m_endcapinn_mdt_chi2_limit { - this, "ENDCAPINN_MDT_CHI2_LIMIT", 20, ""}; + this, "ENDCAPINN_MDT_CHI2_LIMIT", 20., ""}; Gaudi::Property< double > m_endcapmid_mdt_chi2_limit { - this, "ENDCAPMID_MDT_CHI2_LIMIT", 20, ""}; + this, "ENDCAPMID_MDT_CHI2_LIMIT", 20., ""}; Gaudi::Property< double > m_endcapout_mdt_chi2_limit { - this, "ENDCAPOUT_MDT_CHI2_LIMIT", 20, ""}; + this, "ENDCAPOUT_MDT_CHI2_LIMIT", 20., ""}; Gaudi::Property< double > m_endcapee_mdt_chi2_limit { - this, "ENDCAPEE_MDT_CHI2_LIMIT", 20, ""}; + this, "ENDCAPEE_MDT_CHI2_LIMIT", 20., ""}; Gaudi::Property< double > m_rwidth_Endcapinn_first { - this, "RWIDTH_EndcapINN_FIRST", 150, ""}; + this, "RWIDTH_EndcapINN_FIRST", 150., ""}; Gaudi::Property< double > m_rwidth_Endcapinn_second { - this, "RWIDTH_EndcapINN_SECOND", 80, ""}; + this, "RWIDTH_EndcapINN_SECOND", 80., ""}; Gaudi::Property< double > m_rwidth_Endcapmid_first { - this, "RWIDTH_EndcapMID_FIRST", 150, ""}; + this, "RWIDTH_EndcapMID_FIRST", 150., ""}; Gaudi::Property< double > m_rwidth_Endcapmid_second { - this, "RWIDTH_EndcapMID_SECOND", 100, ""}; + this, "RWIDTH_EndcapMID_SECOND", 100., ""}; Gaudi::Property< double > m_rwidth_Endcapout_first { - this, "RWIDTH_EndcapOUT_FIRST", 120, ""}; + this, "RWIDTH_EndcapOUT_FIRST", 120., ""}; Gaudi::Property< double > m_rwidth_Endcapout_second { - this, "RWIDTH_EndcapOUT_SECOND", 60, ""}; + this, "RWIDTH_EndcapOUT_SECOND", 60., ""}; Gaudi::Property< double > m_rwidth_Endcapee_first { - this, "RWIDTH_EndcapEE_FIRST", 150, ""}; + this, "RWIDTH_EndcapEE_FIRST", 150., ""}; Gaudi::Property< double > m_rwidth_Endcapee_second { - this, "RWIDTH_EndcapEE_SECOND", 100, ""}; + this, "RWIDTH_EndcapEE_SECOND", 100., ""}; Gaudi::Property< double > m_mdt_driftspace_uplimit { this, "MDT_DRFITSPACE_UPLIMIT", 14.8, ""}; Gaudi::Property< double > m_mdt_driftspace_downlimit { this, "MDT_DRFITSPACE_DOWNLIMIT", 0.1, ""}; Gaudi::Property< double > m_mdt_drifttime_limit { - this, "MDT_DRFITTIME_LIMIT", 1700, ""}; + this, "MDT_DRFITTIME_LIMIT", 1700., ""}; ToolHandle<ITrigMuonBackExtrapolator> m_backExtrapolator { this, "BackExtrapolator", "TrigMuonBackExtrapolator", "public tool for back extrapolating the muon tracks to the IV"}; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h index f404db27e42d..3cf1d98f84b6 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h @@ -57,7 +57,6 @@ class RpcRoadDefiner: public AthAlgTool double roiEtaMinHigh, double roiEtaMaxHigh); - //void setMdtGeometry(IRegSelSvc* regionSelector, const MdtIdHelper* mdtIdHelper); void setMdtGeometry( const ServiceHandle<IRegSelSvc>& regionSelector, const MdtIdHelper* mdtIdHelper); void setRoadWidthForFailure(double rWidth_RPC_Failed); diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h index 8a99a38eb849..a468c63f9ca2 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h @@ -71,7 +71,7 @@ class TgcRoadDefiner: public AthAlgTool TrigL2MuonSA::TgcFit::PointArray m_tgcWireInnPoints; // List of TGC wire inner station points. double m_rWidth_TGC_Failed; - + ServiceHandle<IRegSelSvc> m_regionSelector; const MdtIdHelper* m_mdtIdHelper; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscRegUtils.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscRegUtils.cxx index 6e4c3516c6e7..a43c060c54a7 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscRegUtils.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscRegUtils.cxx @@ -18,9 +18,11 @@ 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){ +CscRegDict :: CscRegDict(const std::string &type, const std::string &name, const IInterface *parent) + : AthAlgTool(type,name,parent), + m_util(0) +{ declareInterface<TrigL2MuonSA::CscRegDict>(this); - } diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx index 964f53a10aeb..672cef8e2a7b 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx @@ -56,11 +56,13 @@ TrigL2MuonSA::MdtDataPreparator::MdtDataPreparator(const std::string& type, AthAlgTool(type,name,parent), m_storeGateSvc( "StoreGateSvc", name ), m_activeStore( "ActiveStoreSvc", name ), + m_mdtRawDataProvider("Muon::MDT_RawDataProviderTool"), m_mdtCabling("MuonMDT_CablingSvc", name), 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) diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx index 21d5f02461c4..fa25ae5f740e 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx @@ -45,8 +45,6 @@ TrigL2MuonSA::MuCalStreamerTool::MuCalStreamerTool(const std::string& type, m_calibEvent(0), m_roi(NULL), m_tgcDataPreparator("TrigL2MuonSA::TgcDataPreparator") - - { declareInterface<TrigL2MuonSA::MuCalStreamerTool>(this); } diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx index 46f81c5c37d3..961f5c7af22f 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastDataPreparator.cxx @@ -30,7 +30,6 @@ TrigL2MuonSA::MuFastDataPreparator::MuFastDataPreparator(const std::string& type const std::string& name, const IInterface* parent): AthAlgTool(type,name,parent), - m_recRPCRoiSvc("LVL1RPC::RPCRecRoiSvc",""), m_options(), m_regionSelector("RegSelSvc", name ), m_rpcDataPreparator("TrigL2MuonSA::RpcDataPreparator"), @@ -132,11 +131,17 @@ StatusCode TrigL2MuonSA::MuFastDataPreparator::setMCFlag(BooleanProperty use_mcL if (m_use_mcLUT) { const ServiceHandle<TrigL2MuonSA::PtEndcapLUTSvc> ptEndcapLUTSvc("PtEndcapLUTSvc_MC", name()); - ATH_CHECK( ptEndcapLUTSvc.retrieve() ); + if ( ptEndcapLUTSvc.retrieve().isFailure() ) { + ATH_MSG_DEBUG("Could not retrieve PtEndcapLUTSvc_MC"); + return StatusCode::FAILURE; + } m_tgcRoadDefiner->setPtLUT(&*ptEndcapLUTSvc); } else { const ServiceHandle<TrigL2MuonSA::PtEndcapLUTSvc> ptEndcapLUTSvc("PtEndcapLUTSvc", name()); - ATH_CHECK( ptEndcapLUTSvc.retrieve() ); + if ( ptEndcapLUTSvc.retrieve().isFailure() ) { + ATH_MSG_DEBUG("Could not retrieve PtEndcapLUTSvc"); + return StatusCode::FAILURE; + } m_tgcRoadDefiner->setPtLUT(&*ptEndcapLUTSvc); } diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastStationFitter.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastStationFitter.cxx index 34417c906427..c1552c0459b2 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastStationFitter.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastStationFitter.cxx @@ -60,7 +60,7 @@ StatusCode TrigL2MuonSA::MuFastStationFitter::initialize() // BackExtrapolator services ATH_CHECK( m_backExtrapolator.retrieve() ); - + ATH_CHECK( m_alphaBetaEstimate.retrieve() ); ATH_MSG_DEBUG("Retrieved service " << m_alphaBetaEstimate); @@ -75,28 +75,31 @@ StatusCode TrigL2MuonSA::MuFastStationFitter::initialize() StatusCode TrigL2MuonSA::MuFastStationFitter::setMCFlag(BooleanProperty use_mcLUT) { m_use_mcLUT = use_mcLUT; - StatusCode sc = StatusCode::SUCCESS; if (m_use_mcLUT) { const ServiceHandle<TrigL2MuonSA::PtEndcapLUTSvc> ptEndcapLUTSvc("PtEndcapLUTSvc_MC", name()); - ATH_CHECK( ptEndcapLUTSvc.retrieve() ); - + if ( ptEndcapLUTSvc.retrieve().isFailure() ) { + ATH_MSG_ERROR("Could not find PtEndcaplLUTSvc"); + return StatusCode::FAILURE; + } // Calculation of alpha and beta m_alphaBetaEstimate->setMCFlag(m_use_mcLUT, &*ptEndcapLUTSvc); // conversion: alpha, beta -> pT m_ptFromAlphaBeta->setMCFlag(m_use_mcLUT, &*ptEndcapLUTSvc); - } else { const ServiceHandle<TrigL2MuonSA::PtEndcapLUTSvc> ptEndcapLUTSvc("PtEndcapLUTSvc", name()); - ATH_CHECK( ptEndcapLUTSvc.retrieve() ); - + if ( ptEndcapLUTSvc.retrieve().isFailure() ) { + ATH_MSG_ERROR("Could not find PtEndcaplLUTSvc"); + return StatusCode::FAILURE; + } // Calculation of alpha and beta m_alphaBetaEstimate->setMCFlag(m_use_mcLUT, &*ptEndcapLUTSvc); // conversion: alpha, beta -> pT m_ptFromAlphaBeta->setMCFlag(m_use_mcLUT, &*ptEndcapLUTSvc); - } + ATH_MSG_DEBUG( "Completed tp set " << (m_use_mcLUT?"MC":"not MC") << " flag" ); + return StatusCode::SUCCESS; } diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastTrackFitter.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastTrackFitter.cxx index 1cd4696b5a1a..f7820a4d7804 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastTrackFitter.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastTrackFitter.cxx @@ -26,7 +26,6 @@ TrigL2MuonSA::MuFastTrackFitter::MuFastTrackFitter(const std::string& type, AthAlgTool(type,name,parent), m_storeGateSvc( "StoreGateSvc", name ), m_use_mcLUT(true), - //m_alignmentBarrelLUTSvc(0), m_use_endcapInnerFromBarrel(false), m_sagittaRadiusEstimate("TrigL2MuonSA::SagittaRadiusEstimate"), m_alphaBetaEstimate("TrigL2MuonSA::AlphaBetaEstimate"), @@ -79,10 +78,16 @@ StatusCode TrigL2MuonSA::MuFastTrackFitter::setMCFlag(BooleanProperty use_mcLUT) if (m_use_mcLUT) { // Barrel const ServiceHandle<PtBarrelLUTSvc> ptBarrelLUTSvc("PtBarrelLUTSvc_MC", name()); - ATH_CHECK( ptBarrelLUTSvc.retrieve() ); + if ( ptBarrelLUTSvc.retrieve().isFailure() ) { + ATH_MSG_ERROR("Could not find PtBarrelLUTSvc"); + return StatusCode::FAILURE; + } // Endcap const ServiceHandle<PtEndcapLUTSvc> ptEndcapLUTSvc("PtEndcapLUTSvc_MC", name()); - ATH_CHECK( ptEndcapLUTSvc.retrieve() ); + if ( ptEndcapLUTSvc.retrieve().isFailure() ) { + ATH_MSG_ERROR("Could not find PtEndcaplLUTSvc"); + return StatusCode::FAILURE; + } m_alphaBetaEstimate->setMCFlag(m_use_mcLUT, &*ptEndcapLUTSvc); @@ -90,13 +95,19 @@ StatusCode TrigL2MuonSA::MuFastTrackFitter::setMCFlag(BooleanProperty use_mcLUT) m_ptFromAlphaBeta->setMCFlag(m_use_mcLUT, &*ptEndcapLUTSvc); - } else{ + } else { // Barrel const ServiceHandle<PtBarrelLUTSvc> ptBarrelLUTSvc("PtBarrelLUTSvc", name()); - ATH_CHECK( ptBarrelLUTSvc.retrieve() ); + if ( ptBarrelLUTSvc.retrieve().isFailure() ) { + ATH_MSG_ERROR("Could not find PtBarrelLUTSvc"); + return StatusCode::FAILURE; + } // Endcap const ServiceHandle<PtEndcapLUTSvc> ptEndcapLUTSvc("PtEndcapLUTSvc", name()); - ATH_CHECK( ptEndcapLUTSvc.retrieve() ); + if ( ptEndcapLUTSvc.retrieve().isFailure() ) { + ATH_MSG_ERROR("Could not find PtEndcaplLUTSvc"); + return StatusCode::FAILURE; + } m_alphaBetaEstimate->setMCFlag(m_use_mcLUT, &*ptEndcapLUTSvc); @@ -105,8 +116,12 @@ StatusCode TrigL2MuonSA::MuFastTrackFitter::setMCFlag(BooleanProperty use_mcLUT) m_ptFromAlphaBeta->setMCFlag(m_use_mcLUT, &*ptEndcapLUTSvc); } - ServiceHandle<AlignmentBarrelLUTSvc> alignmentBarrelLUTSvc("AlignmentBarrelLUTSvc", name()); - ATH_CHECK( alignmentBarrelLUTSvc.retrieve() ); + + const ServiceHandle<AlignmentBarrelLUTSvc> alignmentBarrelLUTSvc("AlignmentBarrelLUTSvc", name()); + if ( alignmentBarrelLUTSvc.retrieve().isFailure() ) { + ATH_MSG_ERROR("Could not find AlignmentBarrelLUTSvc"); + return StatusCode::FAILURE; + } // Calculation of sagitta and radius // sc = m_sagittaRadiusEstimate.retrieve(); @@ -144,6 +159,7 @@ StatusCode TrigL2MuonSA::MuFastTrackFitter::setMCFlag(BooleanProperty use_mcLUT) // } // ATH_MSG_DEBUG("Retrieved service " << m_ptFromAlphaBeta); + ATH_MSG_DEBUG( "Completed tp set " << (m_use_mcLUT?"MC":"not MC") << " flag" ); return StatusCode::SUCCESS; } diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx index f56146e33abe..a2588632c4fd 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx @@ -75,6 +75,13 @@ StatusCode TrigL2MuonSA::TgcDataPreparator::initialize() ATH_CHECK( m_storeGateSvc.retrieve() ); + ATH_CHECK( m_tgcRawDataProvider.retrieve() ); + ATH_MSG_DEBUG("Retrieved tool " << m_tgcRawDataProvider); + + // Locate RegionSelector + ATH_CHECK( m_regionSelector.retrieve() ); + ATH_MSG_DEBUG("Retrieved service RegionSelector"); + ServiceHandle<StoreGateSvc> detStore( "DetectorStore", name() ); ATH_CHECK( detStore.retrieve() ); ATH_MSG_DEBUG("Retrieved DetectorStore."); @@ -85,16 +92,8 @@ StatusCode TrigL2MuonSA::TgcDataPreparator::initialize() ATH_CHECK( m_activeStore.retrieve() ); ATH_MSG_DEBUG("Retrieved ActiveStoreSvc." ); - ATH_CHECK( m_tgcRawDataProvider.retrieve() ); - ATH_MSG_DEBUG("Retrieved tool " << m_tgcRawDataProvider.name()); - ATH_CHECK( m_tgcPrepDataProvider.retrieve() ); - ATH_MSG_DEBUG("Retrieved tool " << m_tgcPrepDataProvider.name()); - - // Locate RegionSelector - - ATH_CHECK( m_regionSelector.retrieve() ); - ATH_MSG_DEBUG("Retrieved service RegionSelector"); + ATH_MSG_DEBUG("Retrieved tool " << m_tgcPrepDataProvider ); // Locate ROBDataProvider ATH_CHECK( m_robDataProvider.retrieve() ); -- GitLab From 9bf0b892518b168966e0b5282dc15a6a479d0fa8 Mon Sep 17 00:00:00 2001 From: Susumu Oda <susumu.oda@cern.ch> Date: Thu, 5 Jul 2018 16:04:00 +0000 Subject: [PATCH 369/562] Implement condition algs for SCT alignment (ATLASRECTS-4231, ATLASRECTS-4046, ATLASRECTS-4049) Former-commit-id: 4a24996e561b2c36de1f38eb131b322aa1d039b0 --- .../CondAttrListCollection.h | 2 +- .../AlignableTransformContainer.h | 2 + .../python/InDetAlignFolders.py | 25 +- .../SCT_ConditionsAlgorithms/CMakeLists.txt | 4 +- .../src/SCT_AlignCondAlg.cxx | 164 ++++++++++++ .../src/SCT_AlignCondAlg.h | 44 ++++ .../src/SCT_DetectorElementCondAlg.cxx | 144 +++++++++++ .../src/SCT_DetectorElementCondAlg.h | 41 +++ .../SCT_ConditionsAlgorithms_entries.cxx | 4 + .../InDetReadoutGeometry/CMakeLists.txt | 5 +- .../InDetDetectorManager.h | 41 ++- .../PixelDetectorManager.h | 26 +- .../SCT_DetectorManager.h | 23 +- .../InDetReadoutGeometry/SiDetectorElement.h | 16 +- .../SiDetectorElementCollection.h | 5 + .../InDetReadoutGeometry/SiDetectorManager.h | 20 +- .../TRT_DetectorManager.h | 18 +- .../src/InDetDetectorManager.cxx | 234 ++++++++++++------ .../src/PixelDetectorManager.cxx | 36 ++- .../src/SCT_DetectorManager.cxx | 224 +++++++++-------- .../src/SiDetectorElement.cxx | 22 +- .../src/SiDetectorManager.cxx | 10 +- .../src/TRT_DetectorManager.cxx | 14 +- .../src/TestTRT_Alignment.cxx | 2 +- 24 files changed, 886 insertions(+), 240 deletions(-) create mode 100644 InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.cxx create mode 100644 InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.h create mode 100644 InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.cxx create mode 100644 InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.h diff --git a/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/CondAttrListCollection.h b/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/CondAttrListCollection.h index 555855879371..35fb3bf3620d 100644 --- a/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/CondAttrListCollection.h +++ b/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/CondAttrListCollection.h @@ -14,7 +14,7 @@ */ #ifndef DBDATAOBJECTS_CONDATTRLISTCOLLECTION_H -# define DBDATAOBJECTS_CONDATTRLISTCOLLECTION_H +#define DBDATAOBJECTS_CONDATTRLISTCOLLECTION_H //<<<<<< INCLUDES >>>>>> diff --git a/DetectorDescription/DetDescrCond/DetDescrConditions/DetDescrConditions/AlignableTransformContainer.h b/DetectorDescription/DetDescrCond/DetDescrConditions/DetDescrConditions/AlignableTransformContainer.h index 2a479f590bae..bbba585a6b01 100755 --- a/DetectorDescription/DetDescrCond/DetDescrConditions/DetDescrConditions/AlignableTransformContainer.h +++ b/DetectorDescription/DetDescrCond/DetDescrConditions/DetDescrConditions/AlignableTransformContainer.h @@ -10,11 +10,13 @@ // Richard Hawkings, 31/8/05 #include "AthenaKernel/CLASS_DEF.h" +#include "AthenaKernel/CondCont.h" #include "AthenaPoolUtilities/CondMultChanCollection.h" #include "DetDescrConditions/AlignableTransform.h" typedef CondMultChanCollection<AlignableTransform> AlignableTransformContainer; CLASS_DEF( AlignableTransformContainer , 1170039409 , 1 ) +CONDCONT_DEF( AlignableTransformContainer , 1141302089 ); #endif // DETDESCRCOND_ALIGNTRKCONTAINER_H diff --git a/InnerDetector/InDetConditions/InDetCondFolders/python/InDetAlignFolders.py b/InnerDetector/InDetConditions/InDetCondFolders/python/InDetAlignFolders.py index 31a88aa02c8c..248f630518b4 100644 --- a/InnerDetector/InDetConditions/InDetCondFolders/python/InDetAlignFolders.py +++ b/InnerDetector/InDetConditions/InDetCondFolders/python/InDetAlignFolders.py @@ -42,13 +42,30 @@ try: except ImportError: pass if useDynamicAlignFolders: - conddb.addFolderSplitOnline("INDET","/Indet/Onl/AlignL1/ID","/Indet/AlignL1/ID") + conddb.addFolderSplitOnline("INDET","/Indet/Onl/AlignL1/ID","/Indet/AlignL1/ID",className="CondAttrListCollection") conddb.addFolderSplitOnline("INDET","/Indet/Onl/AlignL2/PIX","/Indet/AlignL2/PIX") - conddb.addFolderSplitOnline("INDET","/Indet/Onl/AlignL2/SCT","/Indet/AlignL2/SCT") - conddb.addFolderSplitOnline("INDET","/Indet/Onl/AlignL3","/Indet/AlignL3") + conddb.addFolderSplitOnline("INDET","/Indet/Onl/AlignL2/SCT","/Indet/AlignL2/SCT",className="CondAttrListCollection") + conddb.addFolderSplitOnline("INDET","/Indet/Onl/AlignL3","/Indet/AlignL3",className="AlignableTransformContainer") conddb.addFolderSplitOnline("TRT","/TRT/Onl/AlignL1/TRT","/TRT/AlignL1/TRT") conddb.addFolderSplitOnline("TRT","/TRT/Onl/AlignL2","/TRT/AlignL2") else: - conddb.addFolderSplitOnline("INDET","/Indet/Onl/Align","/Indet/Align") + if DetFlags.simulate.any_on(): + # Simulation does not use condition algorithms for alignment + conddb.addFolderSplitOnline("INDET","/Indet/Onl/Align","/Indet/Align") + else: + conddb.addFolderSplitOnline("INDET","/Indet/Onl/Align","/Indet/Align",className="AlignableTransformContainer") conddb.addFolderSplitOnline("TRT","/TRT/Onl/Align","/TRT/Align") + +# Condition algorithms for ID alignment only for non-simulation jobs +if not DetFlags.simulate.any_on(): + from AthenaCommon.AlgSequence import AthSequencer + condSeq = AthSequencer("AthCondSeq") + if not hasattr(condSeq, "SCT_AlignCondAlg"): + from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_AlignCondAlg + condSeq += SCT_AlignCondAlg(name = "SCT_AlignCondAlg", + UseDynamicAlignFolders = useDynamicAlignFolders) + if not hasattr(condSeq, "SCT_DetectorElementCondAlg"): + from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_DetectorElementCondAlg + condSeq += SCT_DetectorElementCondAlg(name = "SCT_DetectorElementCondAlg") + del useDynamicAlignFolders #tidy up diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt index 369c884186f1..5b54b12a75c8 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt @@ -12,6 +12,8 @@ atlas_depends_on_subdirs( PUBLIC Control/StoreGate Database/AthenaPOOL/AthenaPoolUtilities DetectorDescription/Identifier + DetectorDescription/DetDescrCond/DetDescrConditions + DetectorDescription/GeoModel/GeoModelUtilities GaudiKernel InnerDetector/InDetConditions/InDetConditionsSummaryService InnerDetector/InDetConditions/SCT_ConditionsData @@ -31,6 +33,6 @@ atlas_add_component( SCT_ConditionsAlgorithms src/*.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests Identifier GaudiKernel SCT_ConditionsData SCT_CablingLib EventInfo xAODEventInfo AthenaPoolUtilities InDetIdentifier InDetReadoutGeometry SCT_ConditionsToolsLib ) + LINK_LIBRARIES ${Boost_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests Identifier DetDescrConditions GeoModelUtilities GaudiKernel SCT_ConditionsData SCT_CablingLib EventInfo xAODEventInfo AthenaPoolUtilities InDetIdentifier InDetReadoutGeometry SCT_ConditionsToolsLib ) # Install files from the package: diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.cxx new file mode 100644 index 000000000000..4e8c88ae74fa --- /dev/null +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.cxx @@ -0,0 +1,164 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "SCT_AlignCondAlg.h" + +#include <memory> + +#include "InDetReadoutGeometry/SCT_DetectorManager.h" +#include "InDetReadoutGeometry/SiDetectorElement.h" + +SCT_AlignCondAlg::SCT_AlignCondAlg(const std::string& name, ISvcLocator* pSvcLocator) + : ::AthAlgorithm(name, pSvcLocator) + , m_writeKey{"SCTAlignmentStore", "SCTAlignmentStore"} + , m_condSvc{"CondSvc", name} + , m_detManager{nullptr} +{ + declareProperty("WriteKey", m_writeKey); +} + +StatusCode SCT_AlignCondAlg::initialize() +{ + ATH_MSG_DEBUG("initialize " << name()); + + // CondSvc + ATH_CHECK(m_condSvc.retrieve()); + + // Read Handles + if (not m_useDynamicAlignFolders) { // Static + ATH_CHECK(m_readKeyStatic.initialize()); + } else { // Dynamic + ATH_CHECK(m_readKeyDynamicL1.initialize()); + ATH_CHECK(m_readKeyDynamicL2.initialize()); + ATH_CHECK(m_readKeyDynamicL3.initialize()); + } + // Write Handles + ATH_CHECK(m_writeKey.initialize()); + + // Register write handle + ATH_CHECK(m_condSvc->regHandle(this, m_writeKey)); + + ATH_CHECK(detStore()->retrieve(m_detManager, "SCT")); + + return StatusCode::SUCCESS; +} + +StatusCode SCT_AlignCondAlg::execute() +{ + ATH_MSG_DEBUG("execute " << name()); + + // ____________ Construct Write Cond Handle and check its validity ____________ + SG::WriteCondHandle<GeoAlignmentStore> writeHandle{m_writeKey}; + + // Do we have a valid Write Cond Handle for current time? + if (writeHandle.isValid()) { + ATH_MSG_DEBUG("CondHandle " << writeHandle.fullKey() << " is already valid." + << ". In theory this should not be called, but may happen" + << " if multiple concurrent events are being processed out of order."); + return StatusCode::SUCCESS; + } + + // Get SiDetectorElements + const InDetDD::SiDetectorElementCollection* oldColl{m_detManager->getDetectorElementCollection()}; + if (oldColl==nullptr) { + ATH_MSG_ERROR("Null pointer is returned by getDetectorElementCollection()"); + return StatusCode::FAILURE; + } + + // ____________ Construct new Write Cond Object ____________ + std::unique_ptr<GeoAlignmentStore> writeCdo{std::make_unique<GeoAlignmentStore>()}; + EventIDRange rangeW; + + if (not m_useDynamicAlignFolders) { // Static + // ____________ Get Read Cond Object ____________ + SG::ReadCondHandle<AlignableTransformContainer> readHandleStatic{m_readKeyStatic}; + const AlignableTransformContainer* readCdoStatic{*readHandleStatic}; + if (readCdoStatic==nullptr) { + ATH_MSG_ERROR("Null pointer to the read conditions object of " << m_readKeyStatic.key()); + return StatusCode::FAILURE; + } + // ____________ Apply alignments to SCT GeoModel ____________ + // Construct Container for read CDO. + InDetDD::RawAlignmentObjects readCdoContainerStatic; + readCdoContainerStatic.emplace(m_readKeyStatic.key(), readCdoStatic); + ATH_CHECK(m_detManager->align(readCdoContainerStatic, writeCdo.get())); + + // Define validity of the output cond object and record it + if (not readHandleStatic.range(rangeW)) { + ATH_MSG_ERROR("Failed to retrieve validity range for " << readHandleStatic.key()); + return StatusCode::FAILURE; + } + } else { // Dynamic + // ____________ Get Read Cond Object ____________ + SG::ReadCondHandle<CondAttrListCollection> readHandleDynamicL1{m_readKeyDynamicL1}; + const CondAttrListCollection* readCdoDynamicL1{*readHandleDynamicL1}; + if (readCdoDynamicL1==nullptr) { + ATH_MSG_ERROR("Null pointer to the read conditions object of " << m_readKeyDynamicL1.key()); + return StatusCode::FAILURE; + } + SG::ReadCondHandle<CondAttrListCollection> readHandleDynamicL2{m_readKeyDynamicL2}; + const CondAttrListCollection* readCdoDynamicL2{*readHandleDynamicL2}; + if (readCdoDynamicL2==nullptr) { + ATH_MSG_ERROR("Null pointer to the read conditions object of " << readHandleDynamicL2.key()); + return StatusCode::FAILURE; + } + SG::ReadCondHandle<AlignableTransformContainer> readHandleDynamicL3{m_readKeyDynamicL3}; + const AlignableTransformContainer* readCdoDynamicL3{*readHandleDynamicL3}; + if (readCdoDynamicL3==nullptr) { + ATH_MSG_ERROR("Null pointer to the read conditions object of " << readHandleDynamicL3.key()); + return StatusCode::FAILURE; + } + // ____________ Apply alignments to SCT GeoModel ____________ + // Construct Container for read CDO-s. + InDetDD::RawAlignmentObjects readCdoContainerDynamicL1; + readCdoContainerDynamicL1.emplace(m_readKeyDynamicL1.key(), readCdoDynamicL1); + ATH_CHECK(m_detManager->align(readCdoContainerDynamicL1, writeCdo.get())); + InDetDD::RawAlignmentObjects readCdoContainerDynamicL2; + readCdoContainerDynamicL2.emplace(m_readKeyDynamicL2.key(), readCdoDynamicL2); + ATH_CHECK(m_detManager->align(readCdoContainerDynamicL2, writeCdo.get())); + InDetDD::RawAlignmentObjects readCdoContainerDynamicL3; + readCdoContainerDynamicL3.emplace(m_readKeyDynamicL3.key(), readCdoDynamicL3); + ATH_CHECK(m_detManager->align(readCdoContainerDynamicL3, writeCdo.get())); + + // Define validity of the output cond object and record it + EventIDRange rangeWL1; + if (not readHandleDynamicL1.range(rangeWL1)) { + ATH_MSG_ERROR("Failed to retrieve validity range for " << readHandleDynamicL1.key()); + return StatusCode::FAILURE; + } + EventIDRange rangeWL2; + if (not readHandleDynamicL2.range(rangeWL2)) { + ATH_MSG_ERROR("Failed to retrieve validity range for " << readHandleDynamicL2.key()); + return StatusCode::FAILURE; + } + EventIDRange rangeWL3; + if (not readHandleDynamicL3.range(rangeWL3)) { + ATH_MSG_ERROR("Failed to retrieve validity range for " << readHandleDynamicL3.key()); + return StatusCode::FAILURE; + } + rangeW = EventIDRange::intersect(rangeWL1, rangeWL2, rangeWL3); + } + + // Set (default) absolute transforms in alignment store by calling them. + for (const InDetDD::SiDetectorElement* oldEl: *oldColl) { + oldEl->getMaterialGeom()->getAbsoluteTransform(writeCdo.get()); + oldEl->getMaterialGeom()->getDefAbsoluteTransform(writeCdo.get()); + } + + if (writeHandle.record(rangeW, std::move(writeCdo)).isFailure()) { + ATH_MSG_ERROR("Could not record GeoAlignmentStore " << writeHandle.key() + << " with EventRange " << rangeW + << " into Conditions Store"); + return StatusCode::FAILURE; + } + ATH_MSG_INFO("recorded new CDO " << writeHandle.key() << " with range " << rangeW << " into Conditions Store"); + + return StatusCode::SUCCESS; +} + +StatusCode SCT_AlignCondAlg::finalize() +{ + ATH_MSG_DEBUG("finalize " << name()); + return StatusCode::SUCCESS; +} diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.h new file mode 100644 index 000000000000..f222a292abbd --- /dev/null +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.h @@ -0,0 +1,44 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef SCT_CONDITIONSALGORITHMS_SCT_ALIGNCONDALG_H +#define SCT_CONDITIONSALGORITHMS_SCT_ALIGNCONDALG_H + +#include "AthenaBaseComps/AthAlgorithm.h" +#include "StoreGate/ReadCondHandleKey.h" +#include "StoreGate/WriteCondHandleKey.h" + +#include "GaudiKernel/ICondSvc.h" + +#include "DetDescrConditions/AlignableTransformContainer.h" +#include "AthenaPoolUtilities/CondAttrListCollection.h" +#include "GeoModelUtilities/GeoAlignmentStore.h" + +namespace InDetDD { + class SCT_DetectorManager; +} + +class SCT_AlignCondAlg : public AthAlgorithm +{ + public: + SCT_AlignCondAlg(const std::string& name, ISvcLocator* pSvcLocator); + virtual ~SCT_AlignCondAlg() override = default; + + virtual StatusCode initialize() override; + virtual StatusCode execute() override; + virtual StatusCode finalize() override; + + private: + BooleanProperty m_useDynamicAlignFolders{this, "UseDynamicAlignFolders", false, "Flag of dynamic or static ID alignment folders"}; + SG::ReadCondHandleKey<AlignableTransformContainer> m_readKeyStatic{this, "ReadKeyStatic", "/Indet/Align", "Key for the static alignment folder"}; + SG::ReadCondHandleKey<CondAttrListCollection> m_readKeyDynamicL1{this, "ReadKeyDynamicL1", "/Indet/AlignL1/ID", "Key for the dynamic L1 alignment folder"}; + SG::ReadCondHandleKey<CondAttrListCollection> m_readKeyDynamicL2{this, "ReadKeyDynamicL2", "/Indet/AlignL2/SCT", "Key for the dynamic L2 alignment folder"}; + SG::ReadCondHandleKey<AlignableTransformContainer> m_readKeyDynamicL3{this, "ReadKeyDynamicL3", "/Indet/AlignL3", "Key for the dynamic L3 alignment folder"}; + SG::WriteCondHandleKey<GeoAlignmentStore> m_writeKey; + + ServiceHandle<ICondSvc> m_condSvc; + const InDetDD::SCT_DetectorManager* m_detManager; +}; + +#endif // SCT_CONDITIONSALGORITHMS_SCT_ALIGNCONDALG_H diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.cxx new file mode 100644 index 000000000000..7d57a8a915b2 --- /dev/null +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.cxx @@ -0,0 +1,144 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "SCT_DetectorElementCondAlg.h" + +#include <memory> +#include <map> + +#include "InDetReadoutGeometry/SCT_DetectorManager.h" +#include "InDetReadoutGeometry/SiCommonItems.h" +#include "InDetReadoutGeometry/SiDetectorElement.h" + +SCT_DetectorElementCondAlg::SCT_DetectorElementCondAlg(const std::string& name, ISvcLocator* pSvcLocator) + : ::AthAlgorithm(name, pSvcLocator) + , m_readKey{"SCTAlignmentStore", "SCTAlignmentStore"} + , m_condSvc{"CondSvc", name} + , m_detManager{nullptr} + , m_commonItems{nullptr} +{ + declareProperty("ReadKey", m_readKey); +} + +StatusCode SCT_DetectorElementCondAlg::initialize() +{ + ATH_MSG_DEBUG("initialize " << name()); + + // Read Handle + ATH_CHECK(m_readKey.initialize()); + + // Write Handle + ATH_CHECK(m_writeKey.initialize()); + // CondSvc + ATH_CHECK(m_condSvc.retrieve()); + // Register write handle + ATH_CHECK(m_condSvc->regHandle(this, m_writeKey)); + + ATH_CHECK(detStore()->retrieve(m_detManager, "SCT")); + + return StatusCode::SUCCESS; +} + +StatusCode SCT_DetectorElementCondAlg::execute() +{ + ATH_MSG_DEBUG("execute " << name()); + + // ____________ Construct Write Cond Handle and check its validity ____________ + SG::WriteCondHandle<InDetDD::SiDetectorElementCollection> writeHandle{m_writeKey}; + + // Do we have a valid Write Cond Handle for current time? + if (writeHandle.isValid()) { + ATH_MSG_DEBUG("CondHandle " << writeHandle.fullKey() << " is already valid." + << ". In theory this should not be called, but may happen" + << " if multiple concurrent events are being processed out of order."); + return StatusCode::SUCCESS; + } + + const InDetDD::SiDetectorElementCollection* oldColl{m_detManager->getDetectorElementCollection()}; + if (oldColl==nullptr) { + ATH_MSG_ERROR("Null pointer is returned by getDetectorElementCollection()"); + return StatusCode::FAILURE; + } + + // ____________ Construct new Write Cond Object ____________ + std::unique_ptr<InDetDD::SiDetectorElementCollection> writeCdo{std::make_unique<InDetDD::SiDetectorElementCollection>()}; + EventIDRange rangeW; + + // ____________ Get Read Cond Object ____________ + SG::ReadCondHandle<GeoAlignmentStore> readHandle{m_readKey}; + const GeoAlignmentStore* readCdo{*readHandle}; + if (readCdo==nullptr) { + ATH_MSG_ERROR("Null pointer to the read conditions object of " << m_readKey.key()); + return StatusCode::FAILURE; + } + + // Define validity of the output cond object and record it + if (not readHandle.range(rangeW)) { + ATH_MSG_ERROR("Failed to retrieve validity range for " << readHandle.key()); + return StatusCode::FAILURE; + } + + // ____________ Update writeCdo using readCdo ____________ + std::map<const InDetDD::SiDetectorElement*, const InDetDD::SiDetectorElement*> oldToNewMap; + oldToNewMap[nullptr] = nullptr; + writeCdo->resize(oldColl->size(), nullptr); + InDetDD::SiDetectorElementCollection::iterator newEl{writeCdo->begin()}; + for (const InDetDD::SiDetectorElement* oldEl: *oldColl) { + // At the first time access, SiCommonItems are prepared using the first old element + if (m_commonItems==nullptr) { + const InDetDD::SiCommonItems* oldCommonItems{oldEl->getCommonItems()}; + m_commonItems = new InDetDD::SiCommonItems(oldCommonItems->getIdHelper()); + m_commonItems->setSolenoidFrame(oldCommonItems->solenoidFrame()); + // SiLorentzAngleSvc is not set. + } + + *newEl = new InDetDD::SiDetectorElement(oldEl->identify(), + &(oldEl->design()), + oldEl->GeoVDetectorElement::getMaterialGeom(), + m_commonItems, + readCdo); + oldToNewMap[oldEl] = *newEl; + newEl++; + } + + // Set neighbours and other side + InDetDD::SiDetectorElementCollection::const_iterator oldIt{oldColl->begin()}; + for (InDetDD::SiDetectorElement* newEl: *writeCdo) { + if (oldToNewMap[(*oldIt)]!=newEl) { + ATH_MSG_ERROR("Old and new elements are not synchronized!"); + } + newEl->setNextInEta(oldToNewMap[(*oldIt)->nextInEta()]); + newEl->setPrevInEta(oldToNewMap[(*oldIt)->prevInEta()]); + newEl->setNextInPhi(oldToNewMap[(*oldIt)->nextInPhi()]); + newEl->setPrevInPhi(oldToNewMap[(*oldIt)->prevInPhi()]); + newEl->setOtherSide(oldToNewMap[(*oldIt)->otherSide()]); + oldIt++; + } + + // Apply alignment using readCdo passed to SiDetectorElement + for (InDetDD::SiDetectorElement* newEl: *writeCdo) { + newEl->updateCache(); + } + + // Record WriteCondHandle + const std::size_t size{writeCdo->size()}; + if (writeHandle.record(rangeW, std::move(writeCdo)).isFailure()) { + ATH_MSG_ERROR("Could not record " << writeHandle.key() + << " with EventRange " << rangeW + << " into Conditions Store"); + return StatusCode::FAILURE; + } + ATH_MSG_INFO("recorded new CDO " << writeHandle.key() << " with range " << rangeW << " with size of " << size << " into Conditions Store"); + + return StatusCode::SUCCESS; +} + +StatusCode SCT_DetectorElementCondAlg::finalize() +{ + ATH_MSG_DEBUG("finalize " << name()); + + delete m_commonItems; + + return StatusCode::SUCCESS; +} diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.h new file mode 100644 index 000000000000..32dae576a0b9 --- /dev/null +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.h @@ -0,0 +1,41 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef SCT_CONDITIONSALGORITHMS_SCT_DETECTORELEMENTCONDALG_H +#define SCT_CONDITIONSALGORITHMS_SCT_DETECTORELEMENTCONDALG_H + +#include "AthenaBaseComps/AthAlgorithm.h" +#include "StoreGate/ReadCondHandleKey.h" +#include "StoreGate/WriteCondHandleKey.h" + +#include "GaudiKernel/ICondSvc.h" + +#include "GeoModelUtilities/GeoAlignmentStore.h" +#include "InDetReadoutGeometry/SiDetectorElementCollection.h" + +namespace InDetDD { + class SCT_DetectorManager; + class SiCommonItems; +} + +class SCT_DetectorElementCondAlg : public AthAlgorithm +{ + public: + SCT_DetectorElementCondAlg(const std::string& name, ISvcLocator* pSvcLocator); + virtual ~SCT_DetectorElementCondAlg() override = default; + + virtual StatusCode initialize() override; + virtual StatusCode execute() override; + virtual StatusCode finalize() override; + + private: + SG::ReadCondHandleKey<GeoAlignmentStore> m_readKey; + SG::WriteCondHandleKey<InDetDD::SiDetectorElementCollection> m_writeKey{this, "WriteKey", "SCT_DetectorElementCollection", "Key of output SiDetectorElementCollection for SCT"}; + + ServiceHandle<ICondSvc> m_condSvc; + const InDetDD::SCT_DetectorManager* m_detManager; + InDetDD::SiCommonItems* m_commonItems; +}; + +#endif // SCT_CONDITIONSALGORITHMS_SCT_DETECTORELEMENTCONDALG_H diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/components/SCT_ConditionsAlgorithms_entries.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/components/SCT_ConditionsAlgorithms_entries.cxx index 5568eb77490a..842b54212583 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/components/SCT_ConditionsAlgorithms_entries.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/components/SCT_ConditionsAlgorithms_entries.cxx @@ -1,3 +1,4 @@ +#include "../SCT_AlignCondAlg.h" #include "../SCT_ConditionsParameterCondAlg.h" #include "../SCT_ConditionsParameterTestAlg.h" #include "../SCT_ConditionsSummaryTestAlg.h" @@ -7,6 +8,7 @@ #include "../SCT_DCSConditionsStatCondAlg.h" #include "../SCT_DCSConditionsTempCondAlg.h" #include "../SCT_DCSConditionsTestAlg.h" +#include "../SCT_DetectorElementCondAlg.h" #include "../SCT_LinkMaskingCondAlg.h" #include "../SCT_LinkMaskingTestAlg.h" #include "../SCT_MajorityCondAlg.h" @@ -32,6 +34,7 @@ #include "../SCT_TdaqEnabledCondAlg.h" #include "../SCT_TdaqEnabledTestAlg.h" +DECLARE_COMPONENT( SCT_AlignCondAlg ) DECLARE_COMPONENT( SCT_ConditionsParameterCondAlg ) DECLARE_COMPONENT( SCT_ConditionsParameterTestAlg ) DECLARE_COMPONENT( SCT_ConditionsSummaryTestAlg ) @@ -41,6 +44,7 @@ DECLARE_COMPONENT( SCT_DCSConditionsHVCondAlg ) DECLARE_COMPONENT( SCT_DCSConditionsStatCondAlg ) DECLARE_COMPONENT( SCT_DCSConditionsTempCondAlg ) DECLARE_COMPONENT( SCT_DCSConditionsTestAlg ) +DECLARE_COMPONENT( SCT_DetectorElementCondAlg ) DECLARE_COMPONENT( SCT_LinkMaskingCondAlg ) DECLARE_COMPONENT( SCT_LinkMaskingTestAlg ) DECLARE_COMPONENT( SCT_MajorityCondAlg ) diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/CMakeLists.txt b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/CMakeLists.txt index 2c1c703a7060..96c746766144 100644 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/CMakeLists.txt @@ -14,6 +14,7 @@ atlas_depends_on_subdirs( PUBLIC Control/StoreGate DetectorDescription/AtlasDetDescr DetectorDescription/GeoModel/GeoModelKernel + DetectorDescription/GeoModel/GeoModelUtilities DetectorDescription/GeoPrimitives DetectorDescription/Identifier GaudiKernel @@ -38,6 +39,6 @@ atlas_add_library( InDetReadoutGeometry PUBLIC_HEADERS InDetReadoutGeometry INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaKernel SGTools AtlasDetDescr GeoModelKernel GeoPrimitives Identifier GaudiKernel InDetCondServices InDetIdentifier TrkDetElementBase TrkSurfaces TrkEventPrimitives StoreGateLib SGtests AthenaBaseComps - PRIVATE_LINK_LIBRARIES AthenaPoolUtilities DetDescrConditions IdDictDetDescr TRT_ConditionsData ) + LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaKernel SGTools AtlasDetDescr GeoModelKernel GeoModelUtilities GeoPrimitives Identifier GaudiKernel InDetCondServices InDetIdentifier TrkDetElementBase TrkSurfaces TrkEventPrimitives StoreGateLib SGtests AthenaBaseComps DetDescrConditions + PRIVATE_LINK_LIBRARIES AthenaPoolUtilities IdDictDetDescr TRT_ConditionsData ) diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/InDetDetectorManager.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/InDetDetectorManager.h index 397ddb21c810..f78d94baa0d4 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/InDetDetectorManager.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/InDetDetectorManager.h @@ -24,17 +24,24 @@ // IOV SVC for alignment: #include "AthenaKernel/IIOVSvc.h" +#include "DetDescrConditions/AlignableTransformContainer.h" + class StoreGateSvc; class AlignableTransform; class Identifier; class AtlasDetectorID; +class GeoVAlignmentStore; +class CondAttrListCollection; #include <string> #include <map> #include <set> +#include <list> namespace InDetDD { + typedef std::map<std::string, const void*> RawAlignmentObjects; + /** @class InDetDetectorManager Virtual base class for all ID detector managers. @@ -72,7 +79,10 @@ namespace InDetDD { void addSpecialFolder(const std::string & key); void addGlobalFolder(const std::string & key); void addAlignFolderType(const AlignFolderType alignfolder); + StatusCode align( IOVSVC_CALLBACK_ARGS ) const; + + StatusCode align(const RawAlignmentObjects& alignObjects, GeoVAlignmentStore* alignStore) const; /** Invalidate cache for all detector elements */ virtual void invalidateAll() const = 0; @@ -85,11 +95,11 @@ namespace InDetDD { /** Declaring the Message method for further use */ MsgStream& msg (MSG::Level lvl) const { return m_msg.get() << lvl; } - + /** Declaring the Method providing Verbosity Level */ bool msgLvl (MSG::Level lvl) const { return m_msg.get().level() <= lvl; } - AlignFolderType m_alignfoldertype; + AlignFolderType m_alignfoldertype; protected: StoreGateSvc * m_detStore; @@ -119,13 +129,13 @@ namespace InDetDD { class AlignInfo { private: - AlignFolderType m_aligntype; + AlignFolderType m_aligntype; public: AlignInfo(): m_aligntype(InDetDD::none) {}; AlignInfo(AlignFolderType alignfolder): m_aligntype(alignfolder) {}; - AlignFolderType AlignFolder() const {return m_aligntype;} - bool isValidAlign() const {return (m_aligntype != InDetDD::none);} + AlignFolderType AlignFolder() const {return m_aligntype;} + bool isValidAlign() const {return (m_aligntype != InDetDD::none);} }; @@ -138,24 +148,31 @@ namespace InDetDD { /** Process the alignment container, calls processKey */ bool processAlignmentContainer(const std::string & key) const; - + bool processAlignmentContainer(const AlignableTransformContainer* container, GeoVAlignmentStore* alignStore) const; + /** Called by processAlignmentContainer, applies only one key on the transform Collections */ bool processKey(const std::string key, - const AlignableTransform* transformCollection) const; + const AlignableTransform* transformCollection, + GeoVAlignmentStore* alignStore=nullptr) const; /** Set method applying the delta transform (in global or local frame) onto the geoModel transform : CLHEP <--> Amg interface */ virtual bool setAlignableTransformDelta(int level, - const Identifier & id, - const Amg::Transform3D & delta, - FrameType frame) const = 0; + const Identifier & id, + const Amg::Transform3D & delta, + FrameType frame, + GeoVAlignmentStore* alignStore=nullptr) const = 0; virtual bool processSpecialAlignment(const std::string & key, InDetDD::AlignFolderType alignfolder) const; - bool processGlobalAlignmentContainer(const std::string & key) const; + bool processGlobalAlignmentContainer(const std::string & key, + const CondAttrListCollection* obj=nullptr, + GeoVAlignmentStore* alignStore=nullptr) const; - virtual bool processGlobalAlignment(const std::string & key, int level, FrameType frame) const; + virtual bool processGlobalAlignment(const std::string & key, int level, FrameType frame, + const CondAttrListCollection* obj=nullptr, + GeoVAlignmentStore* alignStore=nullptr) const; virtual const AtlasDetectorID* getIdHelper() const = 0; diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/PixelDetectorManager.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/PixelDetectorManager.h index c16bc3cc391d..655bf65c5520 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/PixelDetectorManager.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/PixelDetectorManager.h @@ -27,6 +27,8 @@ class IdentifierHash; class GeoAlignableTransform; class GeoVFullPhysVol; class GeoVPhysVol; +class GeoVAlignmentStore; +class CondAttrListCollection; namespace InDetDD { @@ -74,7 +76,18 @@ namespace InDetDD { int layer_wheel, int phi_module, int eta_module) const; - + + /** access to individual elements using Identifier using SiDetectorElementCollection */ + virtual const SiDetectorElement* getDetectorElement(const Identifier &id, const SiDetectorElementCollection* coll) const; + /** access to individual elements using IdentiferHash using SiDetectorElementCollection */ + virtual const SiDetectorElement* getDetectorElement(const IdentifierHash &idHash, const SiDetectorElementCollection* coll) const; + /** access to individual elements : via element identification using SiDetectorElementCollection */ + const SiDetectorElement* getDetectorElement(int barrel_endcap, + int layer_wheel, + int phi_module, + int eta_module, + const SiDetectorElementCollection* coll) const; + /** access to whole collection via Iterators */ virtual const SiDetectorElementCollection * getDetectorElementCollection() const; virtual SiDetectorElementCollection::const_iterator getDetectorElementBegin() const; @@ -128,7 +141,9 @@ namespace InDetDD { bool processSpecialAlignment(const std::string &, InDetDD::AlignFolderType) const; /** Process new global DB folders for L1 and L2 **/ - bool processGlobalAlignment(const std::string &, int level, FrameType frame) const; + bool processGlobalAlignment(const std::string &, int level, FrameType frame, + const CondAttrListCollection* obj, + GeoVAlignmentStore* alignStore) const; private: @@ -136,9 +151,10 @@ namespace InDetDD { it translates into the LocalDelta or GlobalDelta function of SiDetectorManager */ virtual bool setAlignableTransformDelta(int level, - const Identifier & id, - const Amg::Transform3D & delta, - FrameType frame) const; + const Identifier & id, + const Amg::Transform3D & delta, + FrameType frame, + GeoVAlignmentStore* alignStore) const; /** prevent copy and assignment */ diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SCT_DetectorManager.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SCT_DetectorManager.h index cc3aaa508860..d1b678c967f6 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SCT_DetectorManager.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SCT_DetectorManager.h @@ -27,6 +27,8 @@ class IdentifierHash; class GeoAlignableTransform; class GeoVFullPhysVol; class GeoVPhysVol; +class GeoVAlignmentStore; +class CondAttrListCollection; namespace InDetDD { @@ -73,6 +75,16 @@ namespace InDetDD { /** access to individual elements via module numbering schema */ SiDetectorElement * getDetectorElement(int barrel_endcap, int layer_wheel, int phi_module, int eta_module, int side) const; + /** access to individual elements using Identifier using SiDetectorElementCollection */ + virtual const SiDetectorElement* getDetectorElement(const Identifier &id, const SiDetectorElementCollection* coll) const; + + /** access to individual elements using IdentiferHash using SiDetectorElementCollection */ + virtual const SiDetectorElement* getDetectorElement(const IdentifierHash &idHash, const SiDetectorElementCollection* coll) const; + + /** access to individual elements via module numbering schema using IdentiferHash using SiDetectorElementCollection */ + const SiDetectorElement* getDetectorElement(int barrel_endcap, int layer_wheel, int phi_module, int eta_module, int side, + const SiDetectorElementCollection* coll) const; + /** access to whole collectiom via iterators */ virtual const SiDetectorElementCollection * getDetectorElementCollection() const; virtual SiDetectorElementCollection::const_iterator getDetectorElementBegin() const; @@ -109,16 +121,19 @@ namespace InDetDD { const SCT_ModuleSideDesign * getSCT_Design(int i) const; /** Process new global DB folders for L1 and L2 **/ - bool processGlobalAlignment(const std::string &, int level, FrameType frame) const; + bool processGlobalAlignment(const std::string &, int level, FrameType frame, + const CondAttrListCollection* obj, + GeoVAlignmentStore* alignStore) const; private: /** implements the main alignment update for delta transforms in different frames, it translates into the LocalDelta or GlobalDelta function of SiDetectorManager */ virtual bool setAlignableTransformDelta(int level, - const Identifier & id, - const Amg::Transform3D & delta, - FrameType frame) const; + const Identifier & id, + const Amg::Transform3D & delta, + FrameType frame, + GeoVAlignmentStore* alignStore) const; /** Prevent copy and assignment */ const SCT_DetectorManager & operator=(const SCT_DetectorManager &right); diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h index 8bf282a7dbc4..8f967fbfaae4 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h @@ -27,6 +27,7 @@ class AtlasDetectorID; class GeoVFullPhysVol; +class GeoAlignmentStore; namespace Trk{ class Surface; @@ -110,9 +111,10 @@ namespace InDetDD { /// Constructor: SiDetectorElement(const Identifier &id, - const SiDetectorDesign *design, - const GeoVFullPhysVol *geophysvol, - SiCommonItems * commonItems); + const SiDetectorDesign *design, + const GeoVFullPhysVol *geophysvol, + SiCommonItems * commonItems, + const GeoAlignmentStore* geoAlignStore=nullptr); /// Destructor: virtual ~SiDetectorElement(); @@ -567,6 +569,8 @@ namespace InDetDD { void setOtherSide(const SiDetectorElement *); // For SCT only //@} + + const SiCommonItems* getCommonItems() const; /////////////////////////////////////////////////////////////////// // Private methods: @@ -679,6 +683,7 @@ namespace InDetDD { mutable Trk::Surface * m_surface; mutable std::vector<const Trk::Surface*> m_surfaces; + const GeoAlignmentStore* m_geoAlignStore; }; /////////////////////////////////////////////////////////////////// @@ -931,6 +936,11 @@ namespace InDetDD { { m_otherSide = element; } + + inline const SiCommonItems* SiDetectorElement::getCommonItems() const + { + return m_commonItems; + } inline bool SiDetectorElement::swapPhiReadoutDirection() const { diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElementCollection.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElementCollection.h index a4fbe702d932..7ebd98063ee5 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElementCollection.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElementCollection.h @@ -30,4 +30,9 @@ namespace InDetDD { } // namespace InDetDD +#include "AthenaKernel/CLASS_DEF.h" +CLASS_DEF( InDetDD::SiDetectorElementCollection , 1330395642 , 1 ) +#include "AthenaKernel/CondCont.h" +CONDCONT_DEF( InDetDD::SiDetectorElementCollection, 1098715294 ); + #endif // INDETREADOUTGEOMETRY_SIDETECTORELEMENTCOLLECTION_H diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorManager.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorManager.h index abd135a68115..6e62f0908fb4 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorManager.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorManager.h @@ -30,6 +30,7 @@ class Identifier; class IdentifierHash; class AtlasDetectorID; class GeoAlignableTransform; +class GeoVAlignmentStore; namespace InDetDD { @@ -74,6 +75,10 @@ class SiNumerology; virtual SiDetectorElement * getDetectorElement(const Identifier &id) const = 0; virtual SiDetectorElement * getDetectorElement(const IdentifierHash &idHash) const = 0; + /** access to individual elements using Identifier or IdentiferHash using SiDetectorElementCollection */ + virtual const SiDetectorElement* getDetectorElement(const Identifier &id, const SiDetectorElementCollection* coll) const = 0; + virtual const SiDetectorElement* getDetectorElement(const IdentifierHash &idHash, const SiDetectorElementCollection* coll) const = 0; + /** access to whole collectiom */ virtual const SiDetectorElementCollection * getDetectorElementCollection() const = 0; virtual SiDetectorElementCollection::const_iterator getDetectorElementBegin() const = 0; @@ -105,12 +110,14 @@ class SiNumerology; /** Helper method to set delta transform from a global delta - Amg interface*/ bool setAlignableTransformGlobalDelta(ExtendedAlignableTransform * extXF, - const Amg::Transform3D & delta) const; + const Amg::Transform3D & delta, + GeoVAlignmentStore* alignStore=nullptr) const; /** Helper method to set delta transform from a local delta - Amg interface */ bool setAlignableTransformLocalDelta(ExtendedAlignableTransform * extXF, - const Amg::Transform3D & localToGlobalXF, - const Amg::Transform3D & delta) const; + const Amg::Transform3D & localToGlobalXF, + const Amg::Transform3D & delta, + GeoVAlignmentStore* alignStore=nullptr) const; /** Access to module design */ void addDesign(const SiDetectorDesign *); @@ -128,9 +135,10 @@ class SiNumerology; /** This method is called by the InDetDetectorManager */ virtual bool setAlignableTransformDelta(int level, - const Identifier & id, - const Amg::Transform3D & delta, - FrameType frame) const = 0; + const Identifier & id, + const Amg::Transform3D & delta, + FrameType frame, + GeoVAlignmentStore* alignStore) const = 0; diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_DetectorManager.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_DetectorManager.h index d31695354171..c4615b1dbc2d 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_DetectorManager.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_DetectorManager.h @@ -32,7 +32,9 @@ class Identifier; class GeoAlignableTransform; +class GeoVAlignmentStore; class StoreGateSvc; +class CondAttrListCollection; namespace InDetDD { @@ -187,14 +189,16 @@ namespace InDetDD { /** Set alignable transforms: Amg based */ virtual bool setAlignableTransformDelta(int level, - const Identifier & id, - const Amg::Transform3D & delta, - FrameType frame) const; + const Identifier & id, + const Amg::Transform3D & delta, + FrameType frame, + GeoVAlignmentStore* alignStore) const; /** Set alignable transforms: Amg based */ bool setAlignableTransformAnyFrameDelta(ExtendedAlignableTransform * extXF, - const Amg::Transform3D & delta, - FrameType frame) const; + const Amg::Transform3D & delta, + FrameType frame, + GeoVAlignmentStore* alignStore) const; /** Invalidate cache for all detector elements */ @@ -211,7 +215,9 @@ namespace InDetDD { StatusCode alignmentCallback( IOVSVC_CALLBACK_ARGS ); /** Process new global DB folders for L1 and L2 **/ - bool processGlobalAlignment(const std::string &, int level, FrameType frame) const; + bool processGlobalAlignment(const std::string &, int level, FrameType frame, + const CondAttrListCollection* obj, + GeoVAlignmentStore* alignStore) const; private: diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/InDetDetectorManager.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/InDetDetectorManager.cxx index 6c89d191abeb..8cc33a73c7bc 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/InDetDetectorManager.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/InDetDetectorManager.cxx @@ -6,10 +6,11 @@ #include "InDetReadoutGeometry/InDetDetectorManager.h" #include "StoreGate/StoreGateSvc.h" -#include "DetDescrConditions/AlignableTransformContainer.h" #include "DetDescrConditions/AlignableTransform.h" #include "AtlasDetDescr/AtlasDetectorID.h" #include "GeoPrimitives/CLHEPtoEigenConverter.h" +#include "AthenaPoolUtilities/CondAttrListCollection.h" +#include "AthenaBaseComps/AthMsgStreamMacros.h" namespace InDetDD { @@ -52,13 +53,11 @@ namespace InDetDD void InDetDetectorManager::addChannel(const std::string & key, int level, FrameType frame) { - //if (msgLvl(MSG::DEBUG)) { - std::string frameStr = "other"; - if (frame == InDetDD::global) frameStr = "global"; - if (frame == InDetDD::local) frameStr = "local"; - msg(MSG::INFO) << "Registering alignment channel with key " << key << ", level " << level - << ", with frame " << frameStr << "." <<endmsg; - //} + std::string frameStr = "other"; + if (frame == InDetDD::global) frameStr = "global"; + if (frame == InDetDD::local) frameStr = "local"; + ATH_MSG_INFO("Registering alignment channel with key " << key << ", level " << level + << ", with frame " << frameStr << "."); m_keys[key] = LevelInfo(level, frame); } @@ -94,14 +93,15 @@ namespace InDetDD StatusCode InDetDetectorManager::align( IOVSVC_CALLBACK_ARGS_P(I,keys) ) const { + (void) I; // avoid warning about unused parameter - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "AlignmentCallback called " << endmsg; + ATH_MSG_DEBUG("AlignmentCallback called "); if (!getIdHelper()) return StatusCode::SUCCESS; bool alignmentChange = false; - const AlignInfo &aligninfo = AlignInfo(m_alignfoldertype); + const AlignInfo &aligninfo = AlignInfo(m_alignfoldertype); // If dummy arguments if (keys.empty()) { @@ -111,13 +111,14 @@ namespace InDetDD for (std::set<std::string>::const_iterator iterFolders = m_globalFolders.begin(); iterFolders != m_globalFolders.end(); ++iterFolders) { + try { bool status = processGlobalAlignmentContainer(*iterFolders); alignmentChange = (alignmentChange || status); } catch(std::runtime_error& err) { // keys are empty when running simualtion. It is normal for detector specific aligments not to exist. - msg(MSG::FATAL) << err.what() << endmsg; - return StatusCode::FAILURE; + ATH_MSG_FATAL(err.what()); + return StatusCode::FAILURE; } } @@ -125,13 +126,14 @@ namespace InDetDD for (std::set<std::string>::const_iterator iterFolders = m_folders.begin(); iterFolders != m_folders.end(); ++iterFolders) { + try { bool status = processAlignmentContainer(*iterFolders); alignmentChange = (alignmentChange || status); } catch(std::runtime_error& err) { // alignments should always exist so we return fatal if we could not process the alignment for this key - msg(MSG::FATAL) << err.what() << endmsg; + ATH_MSG_FATAL(err.what()); return StatusCode::FAILURE; } } @@ -140,11 +142,11 @@ namespace InDetDD iterFolders != m_specialFolders.end(); ++iterFolders) { try { - bool status = processSpecialAlignment(*iterFolders, aligninfo.AlignFolder()); + bool status = processSpecialAlignment(*iterFolders, aligninfo.AlignFolder()); alignmentChange = (alignmentChange || status); } catch(std::runtime_error& err) { // keys are empty when running simualtion. It is normal for detector specific aligments not to exist. - if (msgLvl(MSG::INFO)) msg(MSG::INFO) << err.what() << endmsg; + ATH_MSG_INFO(err.what()); // We continue as detector specific aligments don't always exist. } } @@ -155,9 +157,9 @@ namespace InDetDD const std::string & key = *itr; - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " Processing call back key " << key << endmsg; + ATH_MSG_DEBUG(" Processing call back key " << key); - if ( m_globalFolders.find(key) != m_globalFolders.end() ) { + if ( m_globalFolders.find(key) != m_globalFolders.end() ) { try { // New global alignemnts @@ -165,11 +167,11 @@ namespace InDetDD alignmentChange = (alignmentChange || status); } catch(std::runtime_error& err) { // alignments should always exist so we return fatal if we could not process the alignment for this key - msg(MSG::FATAL) << err.what() << endmsg; + ATH_MSG_FATAL(err.what()); return StatusCode::FAILURE; } - } else if ( m_folders.find(key) != m_folders.end() ) { + } else if ( m_folders.find(key) != m_folders.end() ) { try { // Regular alignemnts @@ -177,25 +179,25 @@ namespace InDetDD alignmentChange = (alignmentChange || status); } catch(std::runtime_error& err) { // alignments should always exist so we return fatal if we could not process the alignment for this key - msg(MSG::FATAL) << err.what() << endmsg; + ATH_MSG_FATAL(err.what()); return StatusCode::FAILURE; } } else if ( m_specialFolders.find(key) != m_specialFolders.end() ) { try { // Detector specific alignments - bool status = processSpecialAlignment(key, aligninfo.AlignFolder()); + bool status = processSpecialAlignment(key, aligninfo.AlignFolder()); alignmentChange = (alignmentChange || status); } catch(std::runtime_error& err) { // Should always exist if the folder was requested so we return fatal if we could not process the alignment for this key - msg(MSG::FATAL) << err.what() << endmsg; + ATH_MSG_FATAL(err.what()); return StatusCode::FAILURE; } } else { // Should not be any other keys specified in call back. - msg(MSG::ERROR) << "Unrecognized key in call back." << endmsg; - return StatusCode::SUCCESS; + ATH_MSG_ERROR("Unrecognized key in call back."); + return StatusCode::RECOVERABLE; } } } @@ -208,96 +210,183 @@ namespace InDetDD return StatusCode::SUCCESS; } + StatusCode InDetDetectorManager::align(const RawAlignmentObjects& alignObjects, GeoVAlignmentStore* alignStore) const + { + + ATH_MSG_DEBUG("align() called from an alignment CondAlg"); + if (!getIdHelper()) return StatusCode::SUCCESS; // To Do: is it really a success? + + bool alignmentChange = false; + // const AlignInfo &aligninfo = AlignInfo(m_alignfoldertype); + + for(const auto& alignObj : alignObjects) { + const std::string& key = alignObj.first; + + ATH_MSG_DEBUG(" Processing folder " << key); + + if(m_globalFolders.find(key)!=m_globalFolders.end()) { + try { + // New global alignemnts + const CondAttrListCollection* obj = static_cast<const CondAttrListCollection*>(alignObj.second); + bool status = processGlobalAlignmentContainer(key,obj,alignStore); + alignmentChange = (alignmentChange || status); + } catch(std::runtime_error& err) { + // alignments should always exist so we return fatal if we could not process the alignment for this key + ATH_MSG_FATAL(err.what()); + return StatusCode::FAILURE; + } + } + else if(m_folders.find(key)!=m_folders.end()) { + try { + // Regular alignemnts + const AlignableTransformContainer* container = static_cast<const AlignableTransformContainer*>(alignObj.second); + bool status = processAlignmentContainer(container,alignStore); + alignmentChange = (alignmentChange || status); + } catch(std::runtime_error& err) { + // alignments should always exist so we return fatal if we could not process the alignment for this key + ATH_MSG_FATAL(err.what()); + return StatusCode::FAILURE; + } + } + else if(m_specialFolders.find(key)!=m_specialFolders.end()) { + // To Do: do we really need this? + + /* + try { + // Detector specific alignments + bool status = processSpecialAlignment(key, aligninfo.AlignFolder(),alignStore); + alignmentChange = (alignmentChange || status); + } + catch(std::runtime_error& err) { + // Should always exist if the folder was requested so we return fatal if we could not process the alignment for this key + ATH_MSG_FATAL(err.what()); + return StatusCode::FAILURE; + } + */ + } + else { + // Should not be any other keys specified in call back. + ATH_MSG_ERROR("Unrecognized folder name."); + return StatusCode::RECOVERABLE; + } + } + // To Do: custom caching is not going to work in MT + /* + if(alignmentChange) invalidateAll(); + */ + + return StatusCode::SUCCESS; + } bool InDetDetectorManager::processAlignmentContainer(const std::string & key) const { bool alignmentChange = false; - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Dealing with key as container" << endmsg; + ATH_MSG_DEBUG("Dealing with key as container"); const AlignableTransformContainer* container; if (StatusCode::SUCCESS!=m_detStore->retrieve(container, key)) { - msg(MSG::ERROR) << "Cannot find AlignableTransformContainer for key " - << key << " - no misalignment" << endmsg; + ATH_MSG_ERROR("Cannot find AlignableTransformContainer for key " + << key << " - no misalignment"); // This should not occur in normal situations so we force job to abort. throw std::runtime_error("Unable to apply Inner Detector alignments"); } // Check if container is empty - this can occur if it is an invalid IOV. if (container->empty()) { - msg(MSG::ERROR) << "AlignableTransformContainer for key " - << key << " is empty. Probably due to out of range IOV" << endmsg; + ATH_MSG_ERROR("AlignableTransformContainer for key " + << key << " is empty. Probably due to out of range IOV"); // This should not occur in normal situations so we force job to abort. throw std::runtime_error("Unable to apply Inner Detector alignments."); } // loop over all the AlignableTransform objects in the collection for (DataVector<AlignableTransform>::const_iterator pat=container->begin(); pat!=container->end();++pat) { - + bool status = processKey((*pat)->tag(),*pat); alignmentChange = (alignmentChange || status); } return alignmentChange; } - bool InDetDetectorManager::processKey(const std::string key, const AlignableTransform* transformCollection) const + bool InDetDetectorManager::processAlignmentContainer(const AlignableTransformContainer* container, GeoVAlignmentStore* alignStore) const + { + bool alignmentChange = false; + + // Check if container is empty - this can occur if it is an invalid IOV. + if (container->empty()) { + ATH_MSG_ERROR("AlignableTransformContainer " + << " is empty. Probably due to out of range IOV"); // To Do: add key to this printout for making it more informative + // This should not occur in normal situations so we force job to abort. + throw std::runtime_error("Unable to apply Inner Detector alignments."); + } + // loop over all the AlignableTransform objects in the collection + bool isFirstL3SCTECA9 = true; + for (DataVector<AlignableTransform>::const_iterator pat=container->begin(); + pat!=container->end();++pat) { + // /Indet/AlignL3/SCTEA9 appear repeatedly in tags of the /Indet/AlignL3 folder + if ((*pat)->tag()=="/Indet/AlignL3/SCTEA9") { + if (not isFirstL3SCTECA9) continue; + else isFirstL3SCTECA9 = false; + } + bool status = processKey((*pat)->tag(),*pat,alignStore); + alignmentChange = (alignmentChange || status); + } + return alignmentChange; + } + + bool InDetDetectorManager::processKey(const std::string key, + const AlignableTransform* transformCollection, + GeoVAlignmentStore* alignStore) const { bool alignmentChange = false; // From the key determine what level in hierarchy we are dealing with. // returns -1 if unrecognized. const LevelInfo & levelInfo = getLevel(key); - if (msgLvl(MSG::DEBUG)) { - if (levelInfo.isValid()) { - if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Processing channel: " << key << endmsg; - } else { - msg(MSG::DEBUG) << "Channel " << key << " not registered in this manager" << endmsg; - } + if (levelInfo.isValid()) { + ATH_MSG_VERBOSE("Processing channel: " << key); + } else { + ATH_MSG_DEBUG("Channel " << key << " not registered in this manager"); } // return silently if unrecognised - this can happen in container mode // when a single container holds transforms for both pixel and SCT if (!levelInfo.isValid() ) return false; - //Loop over the effected nodes. for (AlignableTransform::AlignTransMem_citr trans_iter = transformCollection->begin(); - trans_iter != transformCollection->end(); - ++trans_iter) { - if (msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << "Get alignment for identifier " - << getIdHelper()->show_to_string(trans_iter->identify()) - << " at level " << levelInfo.level() << endmsg; + trans_iter != transformCollection->end(); + ++trans_iter) { + ATH_MSG_DEBUG( "Get alignment for identifier " + << getIdHelper()->show_to_string(trans_iter->identify()) + << " at level " << levelInfo.level()); - } // The delta in the conditions DB is not necessarily the same as what is needed in the // alignable transform. At the moment we support global frame, local frame or an alternative frame // The setAlignableTransformDelta method takes care of this correction - this is CLHEP <--> Amg interfaced bool status = setAlignableTransformDelta(levelInfo.level(), trans_iter->identify(), - Amg::CLHEPTransformToEigen(trans_iter->transform()), - levelInfo.frame()); + Amg::CLHEPTransformToEigen(trans_iter->transform()), + levelInfo.frame(), + alignStore); alignmentChange = (alignmentChange || status); if (!status) { if (!identifierBelongs(trans_iter->identify())) { // Its probably OK. Eg /Indet/Align/ID contains alse pixel and sct ids. - if (msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << "Cannot set AlignableTransform for identifier." - << " Probably OK if its /Indet/Align/ID folder. " - << getIdHelper()->show_to_string(trans_iter->identify()) - << " at level " << levelInfo.level() << endmsg; - } + ATH_MSG_DEBUG("Cannot set AlignableTransform for identifier." + << " Probably OK if its /Indet/Align/ID folder. " + << getIdHelper()->show_to_string(trans_iter->identify()) + << " at level " << levelInfo.level()); } else { if (m_suppressWarnings) { - if (msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << "WARNING: Cannot set AlignableTransform for identifier " - << getIdHelper()->show_to_string(trans_iter->identify()) - << " at level " << levelInfo.level() << endmsg; - } + ATH_MSG_DEBUG("WARNING: Cannot set AlignableTransform for identifier " + << getIdHelper()->show_to_string(trans_iter->identify()) + << " at level " << levelInfo.level()); } else { - msg(MSG::WARNING) << "Cannot set AlignableTransform for identifier " - << getIdHelper()->show_to_string(trans_iter->identify()) - << " at level " << levelInfo.level() << endmsg; - msg(MSG::WARNING) << "Subsequent WARNINGS will be printed at DEBUG level." << endmsg; + ATH_MSG_WARNING("Cannot set AlignableTransform for identifier " + << getIdHelper()->show_to_string(trans_iter->identify()) + << " at level " << levelInfo.level()); + ATH_MSG_WARNING("Subsequent WARNINGS will be printed at DEBUG level."); m_suppressWarnings = true; } } @@ -307,27 +396,27 @@ namespace InDetDD } // We provide a default implementation of any detector specific alignment. - bool InDetDetectorManager::processGlobalAlignmentContainer(const std::string & key) const + bool InDetDetectorManager::processGlobalAlignmentContainer(const std::string & key, + const CondAttrListCollection* obj, + GeoVAlignmentStore* alignStore) const { bool alignmentChange = false; - msg(MSG::DEBUG) << "processing GlobalAlignmentContainer with key: " << key << endmsg; + ATH_MSG_DEBUG("processing GlobalAlignmentContainer with key: " << key); // From the key determine what level in hierarchy we are dealing with. // returns -1 if unrecognized. const LevelInfo & levelInfo = getLevel(key); - if (msgLvl(MSG::DEBUG)) { - if (levelInfo.isValid()) { - if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Processing channel: " << key << endmsg; - } else { - msg(MSG::DEBUG) << "Channel " << key << " not registered in this manager" << endmsg; - } + if (levelInfo.isValid()) { + ATH_MSG_VERBOSE("Processing channel: " << key); + } else { + ATH_MSG_DEBUG("Channel " << key << " not registered in this manager"); } // return silently if unrecognised - this can happen in container mode // when a single container holds transforms for both pixel and SCT if (!levelInfo.isValid() ) return false; // Within detector specific code - bool status = processGlobalAlignment(key, levelInfo.level(), levelInfo.frame()); + bool status = processGlobalAlignment(key, levelInfo.level(), levelInfo.frame(), obj, alignStore); alignmentChange = (alignmentChange || status); @@ -336,7 +425,8 @@ namespace InDetDD } // We provide a default implementation of any detector specific alignment. - bool InDetDetectorManager::processGlobalAlignment(const std::string &, int /*level*/, FrameType /*frame*/) const + bool InDetDetectorManager::processGlobalAlignment(const std::string &, int /*level*/, FrameType /*frame*/, + const CondAttrListCollection* /*obj*/, GeoVAlignmentStore* /*alignStore*/) const { return false; } diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/PixelDetectorManager.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/PixelDetectorManager.cxx index b12ff1f18390..4cadd37353f5 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/PixelDetectorManager.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/PixelDetectorManager.cxx @@ -117,11 +117,28 @@ namespace InDetDD { return m_elementCollection[idHash]; } + const SiDetectorElement* PixelDetectorManager::getDetectorElement(const Identifier &id, + const SiDetectorElementCollection* /*coll*/) const + { + return getDetectorElement(id); + } + + const SiDetectorElement* PixelDetectorManager::getDetectorElement(const IdentifierHash &idHash, + const SiDetectorElementCollection* /*coll*/) const + { + return getDetectorElement(idHash); + } + SiDetectorElement* PixelDetectorManager::getDetectorElement(int barrel_endcap, int layer_wheel, int phi_module, int eta_module) const { return getDetectorElement(m_idHelper->wafer_id(barrel_endcap, layer_wheel, phi_module, eta_module)); } + const SiDetectorElement* PixelDetectorManager::getDetectorElement(int barrel_endcap, int layer_wheel, int phi_module, int eta_module, + const SiDetectorElementCollection* /*coll*/) const + { + return getDetectorElement(barrel_endcap, layer_wheel, phi_module, eta_module); + } const SiDetectorElementCollection* PixelDetectorManager::getDetectorElementCollection() const { @@ -205,9 +222,10 @@ namespace InDetDD { bool PixelDetectorManager::setAlignableTransformDelta(int level, - const Identifier & id, - const Amg::Transform3D & delta, - FrameType frame) const + const Identifier & id, + const Amg::Transform3D & delta, + FrameType frame, + GeoVAlignmentStore* /*alignStore*/) const { if (level == 0) { // At the element level - local shift @@ -443,9 +461,10 @@ namespace InDetDD { // Set the new transform; Will replace existing one with updated transform bool status = setAlignableTransformDelta(0, - trans_iter->identify(), - Amg::CLHEPTransformToEigen(newtrans), - InDetDD::local); + trans_iter->identify(), + Amg::CLHEPTransformToEigen(newtrans), + InDetDD::local, + nullptr); if (!status) { if (msgLvl(MSG::DEBUG)) { @@ -464,7 +483,7 @@ namespace InDetDD { } // New global alignment folders - bool PixelDetectorManager::processGlobalAlignment(const std::string & key, int level, FrameType frame) const + bool PixelDetectorManager::processGlobalAlignment(const std::string & key, int level, FrameType frame, const CondAttrListCollection* /*obj*/, GeoVAlignmentStore* alignStore) const { bool alignmentChange = false; @@ -520,7 +539,8 @@ namespace InDetDD { bool status = setAlignableTransformDelta(level, ident, newtrans, - frame); + frame, + alignStore); if (!status) { if (msgLvl(MSG::DEBUG)) { diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SCT_DetectorManager.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SCT_DetectorManager.cxx index e57bed11c4c5..d663737522c0 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SCT_DetectorManager.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SCT_DetectorManager.cxx @@ -2,23 +2,22 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -//#include "DetDescrConditions/AlignableTransformContainer.h" -//#include "DetDescrConditions/AlignableTransform.h" -#include "AthenaPoolUtilities/CondAttrListCollection.h" - #include "InDetReadoutGeometry/SCT_DetectorManager.h" -#include "InDetIdentifier/SCT_ID.h" + +#include "AthenaBaseComps/AthMsgStreamMacros.h" +#include "AthenaPoolUtilities/CondAttrListCollection.h" +#include "GeoPrimitives/CLHEPtoEigenConverter.h" #include "Identifier/Identifier.h" #include "Identifier/IdentifierHash.h" +#include "InDetIdentifier/SCT_ID.h" #include "InDetReadoutGeometry/SiDetectorElementCollection.h" #include "InDetReadoutGeometry/SiDetectorElement.h" #include "InDetReadoutGeometry/ExtendedAlignableTransform.h" #include "InDetReadoutGeometry/SCT_ModuleSideDesign.h" #include "StoreGate/StoreGateSvc.h" -#include "GeoPrimitives/CLHEPtoEigenConverter.h" - #include <iostream> + namespace InDetDD { const int FIRST_HIGHER_LEVEL = 2; @@ -32,8 +31,8 @@ namespace InDetDD { // Initialized the Identifier helper. // StatusCode sc = detStore->retrieve(m_idHelper, "SCT_ID"); - if (sc.isFailure() ) { - msg(MSG::ERROR) << "Could not retrieve SCT id helper" << endmsg; + if (sc.isFailure()) { + ATH_MSG_ERROR("Could not retrieve SCT id helper"); } // Initialize the collections. if (m_idHelper) { @@ -60,8 +59,8 @@ namespace InDetDD { 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) { + iterMap != m_higherAlignableTransforms[j].end(); + ++iterMap) { delete iterMap->second; } } @@ -115,6 +114,33 @@ namespace InDetDD { return getDetectorElement(m_idHelper->wafer_id(barrel_endcap, layer_wheel, phi_module, eta_module, side)); } + const SiDetectorElement* SCT_DetectorManager::getDetectorElement(const Identifier &id, const SiDetectorElementCollection* coll) const + { + if (coll) { + Identifier waferId = m_idHelper->wafer_id(id); + IdentifierHash idHash = m_idHelper->wafer_hash(waferId); + if (idHash.is_valid()) { + return (*coll)[idHash]; + } else { + return nullptr; + } + } + return getDetectorElement(id); + } + + const SiDetectorElement* SCT_DetectorManager::getDetectorElement(const IdentifierHash &idHash, const SiDetectorElementCollection* coll) const + { + if (coll) { + return (*coll)[idHash]; + } + return getDetectorElement(idHash); + } + + const SiDetectorElement* SCT_DetectorManager::getDetectorElement(int barrel_endcap, int layer_wheel, int phi_module, int eta_module, int side, + const SiDetectorElementCollection* coll) const + { + return getDetectorElement(m_idHelper->wafer_id(barrel_endcap, layer_wheel, phi_module, eta_module, side), coll); + } const SiDetectorElementCollection* SCT_DetectorManager::getDetectorElementCollection() const { @@ -181,9 +207,10 @@ namespace InDetDD { bool SCT_DetectorManager::setAlignableTransformDelta(int level, - const Identifier & id, - const Amg::Transform3D & delta, - FrameType frame) const + const Identifier & id, + const Amg::Transform3D & delta, + FrameType frame, + GeoVAlignmentStore* alignStore) const { if (level == 0) { // 0 - At the element level @@ -194,7 +221,7 @@ namespace InDetDD { if (frame == InDetDD::global) { // global shift // Its a global transform - return setAlignableTransformGlobalDelta(m_alignableTransforms[idHash], delta); + return setAlignableTransformGlobalDelta(m_alignableTransforms[idHash], delta, alignStore); } else if (frame == InDetDD::local) { // local shift @@ -205,16 +232,16 @@ namespace InDetDD { // Its a local transform //See header file for definition of m_isLogical if( m_isLogical ){ - //Ensure cache is up to date and use the alignment corrected local to global transform - element->updateCache(); - return setAlignableTransformLocalDelta(m_alignableTransforms[idHash], element->transform(), delta); + //Ensure cache is up to date and use the alignment corrected local to global transform + element->updateCache(); + return setAlignableTransformLocalDelta(m_alignableTransforms[idHash], element->transform(), delta, alignStore); } else - //Use default local to global transform - return setAlignableTransformLocalDelta(m_alignableTransforms[idHash], element->defTransform(), delta); + //Use default local to global transform + return setAlignableTransformLocalDelta(m_alignableTransforms[idHash], element->defTransform(), delta, alignStore); } else { // other not supported - msg(MSG::WARNING) << "Frames other than global or local are not supported." << endmsg; + ATH_MSG_WARNING("Frames other than global or local are not supported."); return false; } @@ -227,13 +254,13 @@ namespace InDetDD { int idModuleHash = idHash / 2; if (idHash%2) { - msg(MSG::WARNING) << "Side 1 wafer id used for module id" << endmsg; + ATH_MSG_WARNING("Side 1 wafer id used for module id"); return false; } if (frame == InDetDD::global) { // global shift // Its a global transform - return setAlignableTransformGlobalDelta(m_moduleAlignableTransforms[idModuleHash], delta); + return setAlignableTransformGlobalDelta(m_moduleAlignableTransforms[idModuleHash], delta, alignStore); } else if (frame == InDetDD::local) { // local shift const SiDetectorElement * element = m_elementCollection[idHash]; if (!element) return false; @@ -241,23 +268,23 @@ namespace InDetDD { // Its a local transform //See header file for definition of m_isLogical if( m_isLogical ){ - //Ensure cache is up to date and use the alignment corrected local to global transform - element->updateCache(); - return setAlignableTransformLocalDelta(m_moduleAlignableTransforms[idModuleHash], element->moduleTransform(), delta); + //Ensure cache is up to date and use the alignment corrected local to global transform + element->updateCache(); + return setAlignableTransformLocalDelta(m_moduleAlignableTransforms[idModuleHash], element->moduleTransform(), delta, alignStore); } else - //Use default local to global transform - return setAlignableTransformLocalDelta(m_moduleAlignableTransforms[idModuleHash],element->defModuleTransform(), delta); + //Use default local to global transform + return setAlignableTransformLocalDelta(m_moduleAlignableTransforms[idModuleHash],element->defModuleTransform(), delta, alignStore); } else { // other not supported - msg(MSG::WARNING) << "Frames other than global or local are not supported." << endmsg; + ATH_MSG_WARNING("Frames other than global or local are not supported."); return false; } } else { // higher level if (frame != InDetDD::global) { - msg(MSG::WARNING) << "Non global shift at higher levels is not supported." << endmsg; + ATH_MSG_WARNING("Non global shift at higher levels is not supported."); return false; } @@ -270,22 +297,21 @@ namespace InDetDD { if (iter == m_higherAlignableTransforms[index].end()) return false; // Its a global transform - return setAlignableTransformGlobalDelta(iter->second, delta); + return setAlignableTransformGlobalDelta(iter->second, delta, alignStore); } } void SCT_DetectorManager::addAlignableTransform (int level, - const Identifier & id, - GeoAlignableTransform *transform, - const GeoVPhysVol * child) + const Identifier & id, + GeoAlignableTransform *transform, + const GeoVPhysVol * child) { if (m_idHelper) { const GeoVFullPhysVol * childFPV = dynamic_cast<const GeoVFullPhysVol *>(child); if (!childFPV) { - msg(MSG::ERROR) << "Child of alignable transform is not a full physical volume" - << endmsg; + ATH_MSG_ERROR("Child of alignable transform is not a full physical volume"); } else { addAlignableTransform (level, id, transform, childFPV); } @@ -293,9 +319,9 @@ namespace InDetDD { } void SCT_DetectorManager::addAlignableTransform (int level, - const Identifier & id, - GeoAlignableTransform *transform, - const GeoVFullPhysVol * child) + const Identifier & id, + GeoAlignableTransform *transform, + const GeoVFullPhysVol * child) { if (m_idHelper) { if (level == 0) { @@ -322,7 +348,7 @@ namespace InDetDD { } bool - SCT_DetectorManager::identifierBelongs(const Identifier & id) const + SCT_DetectorManager::identifierBelongs(const Identifier & id) const { return getIdHelper()->is_sct(id); } @@ -334,72 +360,68 @@ namespace InDetDD { } // New global alignment folders - bool SCT_DetectorManager::processGlobalAlignment(const std::string & key, int level, FrameType frame) const + bool SCT_DetectorManager::processGlobalAlignment(const std::string & key, int level, FrameType frame, + const CondAttrListCollection* obj, GeoVAlignmentStore* alignStore) const { + ATH_MSG_INFO("Processing new global alignment containers with key " << key << " in the " << frame << " frame at level "); - bool alignmentChange = false; - - if(msgLvl(MSG::INFO)) - msg(MSG::INFO) << "Processing new global alignment containers with key " << key << " in the " << frame << " frame at level " << level << endmsg; + const CondAttrListCollection* atrlistcol=obj; + if(atrlistcol==nullptr and m_detStore->retrieve(atrlistcol,key)!=StatusCode::SUCCESS) { + ATH_MSG_INFO("Cannot find new global align Container for key " + << key << " - no new global alignment "); + return false; + } + bool alignmentChange = false; Identifier ident=Identifier(); - const CondAttrListCollection* atrlistcol=0; - if (StatusCode::SUCCESS==m_detStore->retrieve(atrlistcol,key)) { - // loop over objects in collection - for (CondAttrListCollection::const_iterator citr=atrlistcol->begin(); citr!=atrlistcol->end();++citr) { - const coral::AttributeList& atrlist=citr->second; - // SCT manager, therefore ignore all that is not a SCT Identifier - if (atrlist["det"].data<int>()!=2) continue; - - ident = getIdHelper()->wafer_id(atrlist["bec"].data<int>(), - atrlist["layer"].data<int>(), - atrlist["ring"].data<int>(), - atrlist["sector"].data<int>(), - 0); // The last is the module side which is at this ident-level always the 0-side - - // construct new transform - // Order of rotations is defined as around z, then y, then x. - Amg::Translation3D newtranslation(atrlist["Tx"].data<float>(),atrlist["Ty"].data<float>(),atrlist["Tz"].data<float>()); - Amg::Transform3D newtrans = newtranslation * Amg::RotationMatrix3D::Identity(); - newtrans *= Amg::AngleAxis3D(atrlist["Rz"].data<float>()*CLHEP::mrad, Amg::Vector3D(0.,0.,1.)); - newtrans *= Amg::AngleAxis3D(atrlist["Ry"].data<float>()*CLHEP::mrad, Amg::Vector3D(0.,1.,0.)); - newtrans *= Amg::AngleAxis3D(atrlist["Rx"].data<float>()*CLHEP::mrad, Amg::Vector3D(1.,0.,0.)); - - msg(MSG::DEBUG) << "New global DB -- channel: " << citr->first - << " ,det: " << atrlist["det"].data<int>() - << " ,bec: " << atrlist["bec"].data<int>() - << " ,layer: " << atrlist["layer"].data<int>() - << " ,ring: " << atrlist["ring"].data<int>() - << " ,sector: " << atrlist["sector"].data<int>() - << " ,Tx: " << atrlist["Tx"].data<float>() - << " ,Ty: " << atrlist["Ty"].data<float>() - << " ,Tz: " << atrlist["Tz"].data<float>() - << " ,Rx: " << atrlist["Rx"].data<float>() - << " ,Ry: " << atrlist["Ry"].data<float>() - << " ,Rz: " << atrlist["Rz"].data<float>() << endmsg; - - // Set the new transform; Will replace existing one with updated transform - bool status = setAlignableTransformDelta(level, - ident, - newtrans, - frame); - - if (!status) { - if (msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << "Cannot set AlignableTransform for identifier." - << getIdHelper()->show_to_string(ident) - << " at level " << level << " for new global DB " << endmsg; - } - } - - alignmentChange = (alignmentChange || status); + + // loop over objects in collection + for (CondAttrListCollection::const_iterator citr=atrlistcol->begin(); citr!=atrlistcol->end();++citr) { + const coral::AttributeList& atrlist=citr->second; + // SCT manager, therefore ignore all that is not a SCT Identifier + if (atrlist["det"].data<int>()!=2) continue; + + ident = getIdHelper()->wafer_id(atrlist["bec"].data<int>(), + atrlist["layer"].data<int>(), + atrlist["ring"].data<int>(), + atrlist["sector"].data<int>(), + 0); // The last is the module side which is at this ident-level always the 0-side + + // construct new transform + // Order of rotations is defined as around z, then y, then x. + Amg::Translation3D newtranslation(atrlist["Tx"].data<float>(),atrlist["Ty"].data<float>(),atrlist["Tz"].data<float>()); + Amg::Transform3D newtrans = newtranslation * Amg::RotationMatrix3D::Identity(); + newtrans *= Amg::AngleAxis3D(atrlist["Rz"].data<float>()*CLHEP::mrad, Amg::Vector3D(0.,0.,1.)); + newtrans *= Amg::AngleAxis3D(atrlist["Ry"].data<float>()*CLHEP::mrad, Amg::Vector3D(0.,1.,0.)); + newtrans *= Amg::AngleAxis3D(atrlist["Rx"].data<float>()*CLHEP::mrad, Amg::Vector3D(1.,0.,0.)); + + ATH_MSG_DEBUG("New global DB -- channel: " << citr->first + << " ,det: " << atrlist["det"].data<int>() + << " ,bec: " << atrlist["bec"].data<int>() + << " ,layer: " << atrlist["layer"].data<int>() + << " ,ring: " << atrlist["ring"].data<int>() + << " ,sector: " << atrlist["sector"].data<int>() + << " ,Tx: " << atrlist["Tx"].data<float>() + << " ,Ty: " << atrlist["Ty"].data<float>() + << " ,Tz: " << atrlist["Tz"].data<float>() + << " ,Rx: " << atrlist["Rx"].data<float>() + << " ,Ry: " << atrlist["Ry"].data<float>() + << " ,Rz: " << atrlist["Rz"].data<float>()); + + // Set the new transform; Will replace existing one with updated transform + bool status = setAlignableTransformDelta(level, + ident, + newtrans, + frame, + alignStore); + + if (!status) { + ATH_MSG_DEBUG("Cannot set AlignableTransform for identifier." + << getIdHelper()->show_to_string(ident) + << " at level " << level << " for new global DB "); } - } - else { - if (msgLvl(MSG::INFO)) - msg(MSG::INFO) << "Cannot find new global align Container for key " - << key << " - no new global alignment " << endmsg; - return alignmentChange; + + alignmentChange = (alignmentChange || status); } return alignmentChange; } diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx index 9200e00d3b86..8da438e4cd62 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx @@ -15,6 +15,7 @@ #include "InDetIdentifier/SCT_ID.h" #include "GeoModelKernel/GeoVFullPhysVol.h" +#include "GeoModelUtilities/GeoAlignmentStore.h" #include "AtlasDetDescr/AtlasDetectorID.h" #include "CLHEP/Geometry/Point3D.h" @@ -46,9 +47,10 @@ using Trk::distDepth; // Constructor with parameters: SiDetectorElement::SiDetectorElement(const Identifier &id, - const SiDetectorDesign *design, - const GeoVFullPhysVol *geophysvol, - SiCommonItems * commonItems) : + const SiDetectorDesign *design, + const GeoVFullPhysVol *geophysvol, + SiCommonItems * commonItems, + const GeoAlignmentStore* geoAlignStore) : TrkDetElementBase(geophysvol), m_id(id), m_design(design), @@ -65,7 +67,8 @@ SiDetectorElement::SiDetectorElement(const Identifier &id, m_tanLorentzAnglePhi(0), m_tanLorentzAngleEta(0), m_lorentzCorrection(0), - m_surface(0) + m_surface(0), + m_geoAlignStore(geoAlignStore) { //The following are fixes for coverity bug 11955, uninitialized scalars: const bool boolDefault(true); @@ -390,6 +393,10 @@ SiDetectorElement::updateConditionsCache() const const HepGeom::Transform3D & SiDetectorElement::transformHit() const { + if (m_geoAlignStore) { + const HepGeom::Transform3D* ptrXf = m_geoAlignStore->getAbsPosition(getMaterialGeom()); + if(ptrXf) return *ptrXf; + } return getMaterialGeom()->getAbsoluteTransform(); } @@ -410,16 +417,21 @@ SiDetectorElement::transformCLHEP() const return m_transformCLHEP; } + const HepGeom::Transform3D SiDetectorElement::defTransformCLHEP() const { + if (m_geoAlignStore) { + const HepGeom::Transform3D* ptrXf = m_geoAlignStore->getDefAbsPosition(getMaterialGeom()); + if(ptrXf) return *ptrXf * recoToHitTransform(); + } return getMaterialGeom()->getDefAbsoluteTransform() * recoToHitTransform(); } const Amg::Transform3D SiDetectorElement::defTransform() const { - HepGeom::Transform3D tmpTransform = getMaterialGeom()->getDefAbsoluteTransform() * recoToHitTransform(); + HepGeom::Transform3D tmpTransform = defTransformCLHEP(); return Amg::CLHEPTransformToEigen(tmpTransform); } diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorManager.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorManager.cxx index 847ace84ed86..4b7980893c11 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorManager.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorManager.cxx @@ -60,7 +60,8 @@ namespace InDetDD bool SiDetectorManager::setAlignableTransformLocalDelta(ExtendedAlignableTransform * extXF, const Amg::Transform3D & localToGlobalXF, - const Amg::Transform3D & delta) const + const Amg::Transform3D & delta, + GeoVAlignmentStore* alignStore) const { // ATTENTION -------------------------------------------------------- (A.S.) // CLHEP < -- > AMG interface method @@ -90,7 +91,7 @@ namespace InDetDD HepGeom::Transform3D correctedDelta = transform.inverse()*localToGlobalXFCLHEP // (A*B*C).inverse() * T * Amg::EigenTransformToCLHEP(delta) // l * localToGlobalXFCLHEP.inverse() * transform; // T.inverse() * (A*B*C) - extXF->alignableTransform()->setDelta(correctedDelta); + extXF->alignableTransform()->setDelta(correctedDelta, alignStore); return true; } else { return false; @@ -98,7 +99,8 @@ namespace InDetDD } bool SiDetectorManager::setAlignableTransformGlobalDelta(ExtendedAlignableTransform * extXF, - const Amg::Transform3D& delta) const { + const Amg::Transform3D& delta, + GeoVAlignmentStore* alignStore) const { // ATTENTION -------------------------------------------------------- (A.S.) // CLHEP < -- > AMG interface method @@ -122,7 +124,7 @@ namespace InDetDD if (child && extXF->alignableTransform()) { // do the calculation in CLHEP const HepGeom::Transform3D& transform = child->getDefAbsoluteTransform(); - extXF->alignableTransform()->setDelta(transform.inverse() * Amg::EigenTransformToCLHEP(delta) * transform); + extXF->alignableTransform()->setDelta(transform.inverse() * Amg::EigenTransformToCLHEP(delta) * transform, alignStore); return true; } else { return false; diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_DetectorManager.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_DetectorManager.cxx index 0f0ced4adfd3..ee177c8e7033 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_DetectorManager.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_DetectorManager.cxx @@ -444,7 +444,8 @@ namespace InDetDD { bool TRT_DetectorManager::setAlignableTransformDelta(int level, const Identifier & id, const Amg::Transform3D & delta, - FrameType frame) const + FrameType frame, + GeoVAlignmentStore* alignStore) const { if (level == 0) { // Nothing implemented. Reserved in case we want alignable straws @@ -459,14 +460,15 @@ namespace InDetDD { iter = m_alignableTransforms[index].find(id); if (iter == m_alignableTransforms[index].end()) return false; - return setAlignableTransformAnyFrameDelta(iter->second, delta, frame); + return setAlignableTransformAnyFrameDelta(iter->second, delta, frame, alignStore); } } bool TRT_DetectorManager::setAlignableTransformAnyFrameDelta(ExtendedAlignableTransform * extXF, const Amg::Transform3D & delta, - FrameType frame) const + FrameType frame, + GeoVAlignmentStore* /*alignStore*/) const { //--------------------- // For Local: @@ -644,7 +646,8 @@ namespace InDetDD { } // New global alignment filders - bool TRT_DetectorManager::processGlobalAlignment(const std::string & key, int level, FrameType frame) const + bool TRT_DetectorManager::processGlobalAlignment(const std::string & key, int level, FrameType frame, + const CondAttrListCollection* /*obj*/, GeoVAlignmentStore* alignStore) const { bool alignmentChange = false; @@ -684,7 +687,8 @@ namespace InDetDD { bool status = setAlignableTransformDelta(level, ident, Amg::CLHEPTransformToEigen(newtransform), - frame); + frame, + alignStore); if (!status) { if (msgLvl(MSG::DEBUG)) { diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/src/TestTRT_Alignment.cxx b/InnerDetector/InDetExample/InDetDetDescrExample/src/TestTRT_Alignment.cxx index f54a69312b2a..7389d13a7da4 100755 --- a/InnerDetector/InDetExample/InDetDetDescrExample/src/TestTRT_Alignment.cxx +++ b/InnerDetector/InDetExample/InDetDetDescrExample/src/TestTRT_Alignment.cxx @@ -147,7 +147,7 @@ TestTRT_Alignment::addShiftModule(int bec, int phiMod, int layer, const Amg::Tra void TestTRT_Alignment::addShift(int level, const Identifier & id, const Amg::Transform3D & transform) { - m_manager->setAlignableTransformDelta(level, id, transform, InDetDD::other); + m_manager->setAlignableTransformDelta(level, id, transform, InDetDD::other, nullptr); } -- GitLab From 87cdbbbe559f84f27279b20dca7fa19a18fb4e21 Mon Sep 17 00:00:00 2001 From: charles leggett <leggett@cern.ch> Date: Mon, 25 Jun 2018 08:43:25 -0700 Subject: [PATCH 370/562] Introduce AthCommonMsg and AthCommonDataStore wrapper classes these template classes wrap Algorithm, AlgTool and Service to provide extra functionality to the AthAlgorithm, AthAlgTool and AthService classes with minimal code duplication. Former-commit-id: 01a11b087431838e56063312ea8cf8d6de6f4113 --- .../AthAlgStartVisitor.h | 7 + .../AthenaBaseComps/AthAlgTool.h | 353 +--------------- .../AthenaBaseComps/AthAlgorithm.h | 390 +---------------- .../AthenaBaseComps/AthCommonDataStore.h | 400 ++++++++++++++++++ .../AthenaBaseComps/AthCommonDataStore.icc | 103 +++++ .../AthenaBaseComps/AthCommonMsg.h | 37 ++ .../AthenaBaseComps/AthReentrantAlgorithm.h | 361 +--------------- .../AthenaBaseComps/AthService.h | 67 +-- .../{src => AthenaBaseComps}/VHKASupport.h | 0 .../AthenaBaseComps/share/AthAlgTool_test.ref | 3 +- .../share/AthAlgorithm_test.ref | 2 +- .../src/AthAlgStartVisitor.cxx | 26 +- Control/AthenaBaseComps/src/AthAlgTool.cxx | 182 +------- Control/AthenaBaseComps/src/AthAlgorithm.cxx | 178 +------- .../src/AthReentrantAlgorithm.cxx | 182 +------- Control/AthenaBaseComps/src/AthService.cxx | 50 --- Control/AthenaBaseComps/src/VHKASupport.cxx | 3 +- .../test/AthAlgStartVisitor_test.cxx | 4 +- .../Root/PileupReweightingTool.cxx | 1 - .../Root/TrigDecisionTool.cxx | 1 - .../TriggerMatchingTool/Root/MatchingTool.cxx | 1 - 21 files changed, 600 insertions(+), 1751 deletions(-) rename Control/AthenaBaseComps/{src => AthenaBaseComps}/AthAlgStartVisitor.h (79%) create mode 100644 Control/AthenaBaseComps/AthenaBaseComps/AthCommonDataStore.h create mode 100644 Control/AthenaBaseComps/AthenaBaseComps/AthCommonDataStore.icc create mode 100644 Control/AthenaBaseComps/AthenaBaseComps/AthCommonMsg.h rename Control/AthenaBaseComps/{src => AthenaBaseComps}/VHKASupport.h (100%) diff --git a/Control/AthenaBaseComps/src/AthAlgStartVisitor.h b/Control/AthenaBaseComps/AthenaBaseComps/AthAlgStartVisitor.h similarity index 79% rename from Control/AthenaBaseComps/src/AthAlgStartVisitor.h rename to Control/AthenaBaseComps/AthenaBaseComps/AthAlgStartVisitor.h index e1c35f862089..a181387773e4 100644 --- a/Control/AthenaBaseComps/src/AthAlgStartVisitor.h +++ b/Control/AthenaBaseComps/AthenaBaseComps/AthAlgStartVisitor.h @@ -30,6 +30,9 @@ * conditions object. * * We use @c IDataHandleVisitor to do this recursively for all owned tools as well. + * + * FIXME: this should probably be moved to GaudiKernel, and have all AlgTools + * started by their parent Algorithms */ class AthAlgStartVisitor : public IDataHandleVisitor @@ -41,10 +44,14 @@ public: */ virtual void visit (const IDataHandleHolder* holder) override; + AthAlgStartVisitor() = default; + AthAlgStartVisitor(INamedInterface*); /// figure out where we're called from private: /// Keep track of components we've already processed. std::unordered_set<const IDataHandleHolder*> m_seen; + bool m_recursive {true}; /// process recursively (for Algs) + bool m_ignore {false}; /// don't do anything (if Sequence) }; diff --git a/Control/AthenaBaseComps/AthenaBaseComps/AthAlgTool.h b/Control/AthenaBaseComps/AthenaBaseComps/AthAlgTool.h index ea0a3762c84f..974dcacce23d 100644 --- a/Control/AthenaBaseComps/AthenaBaseComps/AthAlgTool.h +++ b/Control/AthenaBaseComps/AthenaBaseComps/AthAlgTool.h @@ -1,5 +1,3 @@ -///////////////////////// -*- C++ -*- ///////////////////////////// - /* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ @@ -15,50 +13,20 @@ #include <string> #include <type_traits> -// Need to do this very early so parser for VarHandleKey picked up -#include <string> -#include "GaudiKernel/StatusCode.h" -namespace SG { - class VarHandleKey; - class VarHandleKeyArray; - class VarHandleBase; -} -namespace Gaudi { - namespace Parsers { - StatusCode parse(SG::VarHandleKey& v, const std::string& s); - StatusCode parse(SG::VarHandleKeyArray& v, const std::string& s); - StatusCode parse(SG::VarHandleBase& v, const std::string& s); - } -} // Framework includes -#include "GaudiKernel/AlgTool.h" -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/ServiceHandle.h" +#include "AthenaBaseComps/AthCommonDataStore.h" +#include "AthenaBaseComps/AthCommonMsg.h" #include "AthenaBaseComps/AthMemMacros.h" -#include "AthenaBaseComps/AthMsgStreamMacros.h" -#include "AthenaBaseComps/AthCheckMacros.h" -#include "AthenaBaseComps/HandleClassifier.h" -#include "StoreGate/StoreGateSvc.h" -#include "StoreGate/VarHandleProperty.h" -#include "StoreGate/VarHandleKeyProperty.h" -#include "StoreGate/VarHandleKey.h" -#include "StoreGate/VarHandleBase.h" -#include "StoreGate/VarHandleKeyArray.h" -#include "StoreGate/VarHandleKeyArrayProperty.h" +#include "GaudiKernel/AlgTool.h" class AthAlgTool : - public ::AlgTool + public AthCommonDataStore<AthCommonMsg<AlgTool>> { - /////////////////////////////////////////////////////////////////// - // Public methods: - /////////////////////////////////////////////////////////////////// public: - // Copy constructor: - /// Constructor with parameters: AthAlgTool( const std::string& type, const std::string& name, @@ -67,299 +35,6 @@ public: /// Destructor: virtual ~AthAlgTool(); - /////////////////////////////////////////////////////////////////// - // Const methods: - /////////////////////////////////////////////////////////////////// - - /** @brief The standard @c StoreGateSvc (event store) - * Returns (kind of) a pointer to the @c StoreGateSvc - */ - ServiceHandle<StoreGateSvc>& evtStore() const; - - /** @brief The standard @c StoreGateSvc/DetectorStore - * Returns (kind of) a pointer to the @c StoreGateSvc - */ - ServiceHandle<StoreGateSvc>& detStore() const; - - -private: - // to keep track of VarHandleKeyArrays for data dep registration - mutable std::vector<SG::VarHandleKeyArray*> m_vhka; - -public: - ///////////////////////////////////////////////////////////////// - // - //// Enable use of Gaudi::Property<Foo> m_foo {this,"NAME",init,"doc"}; - // style properties in AthAlgorithms - // - - template <class T> - Property& declareProperty(Gaudi::Property<T> &t) { - typedef typename SG::HandleClassifier<T>::type htype; - return AthAlgTool::declareGaudiProperty(t, htype()); - } - -private: - /** - * @brief specialization for handling Gaudi::Property<SG::VarHandleKey> - * - */ - template <class T> - Property& declareGaudiProperty(Gaudi::Property<T> &hndl, - const SG::VarHandleKeyType&) - { - return *AthAlgTool::declareProperty(hndl.name(), hndl.value(), hndl.documentation()); - } - - /** - * @brief specialization for handling Gaudi::Property<SG::VarHandleKeyArray> - * - */ - template <class T> - Property& declareGaudiProperty(Gaudi::Property<T> &hndl, - const SG::VarHandleKeyArrayType&) - { - return *AthAlgTool::declareProperty(hndl.name(), hndl.value(), hndl.documentation()); - } - - /** - * @brief specialization for handling Gaudi::Property<SG::VarHandleBase> - * - */ - template <class T> - Property& declareGaudiProperty(Gaudi::Property<T> &hndl, - const SG::VarHandleType&) - { - return *AthAlgTool::declareProperty(hndl.name(), hndl.value(), - hndl.documentation()); - - } - - /** - * @brief specialization for handling everything that's not a - * Gaudi::Property<SG::VarHandleKey> or <SG::VarHandleKeyArray> - * - */ - template <class T> - Property& declareGaudiProperty(Gaudi::Property<T> &t, const SG::NotHandleType&) { - return AlgTool::declareProperty(t); - } - - ///////////////////////////////////////////////////////////////// - // - //// For automatic registration of Handle data products - // - -public: - /** - * @brief Declare a new Gaudi property. - * @param name Name of the property. - * @param hndl Object holding the property value. - * @param doc Documentation string for the property. - * - * This is the version for types that derive from @c SG::VarHandleKey. - * The property value object is put on the input and output lists as - * appropriate; then we forward to the base class. - */ - Property* declareProperty(const std::string& name, - SG::VarHandleKey& hndl, - const std::string& doc, - const SG::VarHandleKeyType&) - { - this->declare(hndl); - hndl.setOwner(this); - - return AlgTool::declareProperty(name,hndl,doc); - } - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - - - /** - * @brief Declare a new Gaudi property. - * @param name Name of the property. - * @param hndl Object holding the property value. - * @param doc Documentation string for the property. - * - * This is the version for types that derive from @c SG::VarHandleBase. - * The property value object is put on the input and output lists as - * appropriate; then we forward to the base class. - */ - Property* declareProperty(const std::string& name, - SG::VarHandleBase& hndl, - const std::string& doc, - const SG::VarHandleType&) - { - this->declare(hndl.vhKey()); - hndl.vhKey().setOwner(this); - - return AlgTool::declareProperty(name,hndl,doc); - } - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - - Property* declareProperty(const std::string& name, - SG::VarHandleKeyArray& hndArr, - const std::string& doc, - const SG::VarHandleKeyArrayType&) - { - - m_vhka.push_back(&hndArr); - - Property* p = AlgTool::declareProperty(name, hndArr, doc); - if (p != 0) { - p->declareUpdateHandler(&AthAlgTool::updateVHKA, this); - } else { - ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray " - << name); - } - - return p; - - } - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - - // Since the contents of the VarHandleKeyArrays have not been read - // in from the configurables by the time that declareProperty is - // executed, we must cache them and loop through them later to - // register the data dependencies. - // - // However, we cannot actually call declare() on the key instances - // until we know that the vector cannot change size anymore --- otherwise, - // the pointers given to declare() may become invalid. That basically means - // that we can't call declare() until the derived class's initialize() - // completes. So instead of doing it here (which would be too early), - // we override sysInitialize() and do it at the end of that. But, - // AlgTool::sysInitialize() wants to have the handle lists after initialize() - // completes in order to do dependency analysis. It gets these lists - // solely by calling inputHandles() and outputHandles(), so we can get this - // to work by overriding those methods and adding in the current contents - // of the arrays. - - void updateVHKA(Property& /*p*/) { - // debug() << "updateVHKA for property " << p.name() << " " << p.toString() - // << " size: " << m_vhka.size() << endmsg; - for (auto &a : m_vhka) { - std::vector<SG::VarHandleKey*> keys = a->keys(); - for (auto k : keys) { - k->setOwner(this); - } - } - } - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - - /** - * @brief Declare a new Gaudi property. - * @param name Name of the property. - * @param property Object holding the property value. - * @param doc Documentation string for the property. - * - * This is the generic version, for types that do not derive - * from @c SG::VarHandleKey. It just forwards to the base class version - * of @c declareProperty. - */ - template <class T> - Property* declareProperty(const std::string& name, - T& property, - const std::string& doc, - const SG::NotHandleType&) - { - return AlgTool::declareProperty(name, property, doc); - } - - - /** - * @brief Declare a new Gaudi property. - * @param name Name of the property. - * @param property Object holding the property value. - * @param doc Documentation string for the property. - * - * This dispatches to either the generic @c declareProperty or the one - * for VarHandle/Key/KeyArray. - */ - template <class T> - Property* declareProperty(const std::string& name, - T& property, - const std::string& doc="none") - { - typedef typename SG::HandleClassifier<T>::type htype; - return declareProperty (name, property, doc, htype()); - } - - - /** - * @brief Perform system initialization for a tool. - * - * We override this to declare all the elements of handle key arrays - * at the end of initialization. - * See comments on updateVHKA. - */ - virtual StatusCode sysInitialize() override; - - - /** - * @brief Handle START transition. - * - * We override this in order to make sure that conditions handle keys - * can cache a pointer to the conditions container. - */ - virtual StatusCode sysStart() override; - - - /** - * @brief Return this tool's input handles. - * - * We override this to include handle instances from key arrays - * if they have not yet been declared. - * See comments on updateVHKA. - */ - virtual std::vector<Gaudi::DataHandle*> inputHandles() const override; - - - /** - * @brief Return this tools's output handles. - * - * We override this to include handle instances from key arrays - * if they have not yet been declared. - * See comments on updateVHKA. - */ - virtual std::vector<Gaudi::DataHandle*> outputHandles() const override; - - - // forward to CommonMessaging - inline MsgStream& msg() const { - return msgStream(); - } - inline MsgStream& msg(const MSG::Level lvl) const { - return msgStream(lvl); - } - inline bool msgLvl(const MSG::Level lvl) const { - return msgLevel(lvl); - } - - /////////////////////////////////////////////////////////////////// - // Non-const methods: - /////////////////////////////////////////////////////////////////// - - /////////////////////////////////////////////////////////////////// - // Protected methods: - /////////////////////////////////////////////////////////////////// -protected: - /// callback for output level property - void msg_update_handler(Property& outputLevel); - /// callback to add storeName to ExtraInputs/Outputs data deps - void extraDeps_update_handler(Property&); - - /// remove all handles from I/O resolution - void renounceArray( SG::VarHandleKeyArray& handlesArray ); - - /////////////////////////////////////////////////////////////////// - // Private data: - /////////////////////////////////////////////////////////////////// private: /// Default constructor: @@ -367,26 +42,6 @@ private: AthAlgTool (const AthAlgTool&); //> not implemented AthAlgTool& operator= (const AthAlgTool&); //> not implemented - typedef ServiceHandle<StoreGateSvc> StoreGateSvc_t; - /// Pointer to StoreGate (event store by default) - mutable StoreGateSvc_t m_evtStore; - - /// Pointer to StoreGate (detector store by default) - mutable StoreGateSvc_t m_detStore; - - bool m_varHandleArraysDeclared; }; -/////////////////////////////////////////////////////////////////// -// Inline methods: -/////////////////////////////////////////////////////////////////// - -inline -ServiceHandle<StoreGateSvc>& AthAlgTool::evtStore() const -{ return m_evtStore; } - -inline -ServiceHandle<StoreGateSvc>& AthAlgTool::detStore() const -{ return m_detStore; } - #endif //> ATHENABASECOMPS_ATHALGTOOL_H diff --git a/Control/AthenaBaseComps/AthenaBaseComps/AthAlgorithm.h b/Control/AthenaBaseComps/AthenaBaseComps/AthAlgorithm.h index 0ede9cfbdb1a..d320441882ba 100644 --- a/Control/AthenaBaseComps/AthenaBaseComps/AthAlgorithm.h +++ b/Control/AthenaBaseComps/AthenaBaseComps/AthAlgorithm.h @@ -1,5 +1,3 @@ -///////////////////////// -*- C++ -*- ///////////////////////////// - /* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ @@ -15,44 +13,16 @@ #include <string> #include <type_traits> -// Need to do this very early so parser for VarHandleKey picked up -#include <string> -#include "GaudiKernel/StatusCode.h" -namespace SG { - class VarHandleKey; - class VarHandleKeyArray; - class VarHandleBase; -} -namespace Gaudi { - namespace Parsers { - StatusCode parse(SG::VarHandleKey& v, const std::string& s); - StatusCode parse(SG::VarHandleKeyArray& v, const std::string& s); - StatusCode parse(SG::VarHandleBase& v, const std::string& s); - } -} - // Framework includes -#include "GaudiKernel/Algorithm.h" -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/ServiceHandle.h" -#include "AthenaBaseComps/AthCheckMacros.h" +#include "AthenaBaseComps/AthCommonDataStore.h" +#include "AthenaBaseComps/AthCommonMsg.h" #include "AthenaBaseComps/AthMemMacros.h" -#include "AthenaBaseComps/AthMsgStreamMacros.h" -#include "AthenaBaseComps/HandleClassifier.h" -#include "StoreGate/StoreGateSvc.h" -#include "StoreGate/VarHandleProperty.h" -#include "StoreGate/VarHandleKeyProperty.h" -#include "StoreGate/VarHandleKeyArrayProperty.h" -#include "StoreGate/VarHandleKey.h" -#include "StoreGate/VarHandleBase.h" -#include "StoreGate/VarHandleKeyArray.h" - -// Forward declaration +#include "GaudiKernel/Algorithm.h" /** @class AthAlgorithm AthAlgorithm.h AthenaBaseComps/AthAlgorithm.h * - * Base class from which all concrete algorithm classes should + * Base class from which all concrete Athena algorithm classes should * be derived. * In order for a concrete algorithm class to do anything * useful the methods initialize(), execute() and finalize() @@ -72,16 +42,11 @@ namespace Gaudi { * @date 2008 */ -class AthAlgorithm - : public ::Algorithm +class AthAlgorithm + : public AthCommonDataStore<AthCommonMsg< Algorithm >> { - /////////////////////////////////////////////////////////////////// - // Public methods: - /////////////////////////////////////////////////////////////////// public: - // Copy constructor: - /// Constructor with parameters: AthAlgorithm(const std::string& name, ISvcLocator* pSvcLocator, @@ -90,291 +55,6 @@ class AthAlgorithm /// Destructor: virtual ~AthAlgorithm(); - /////////////////////////////////////////////////////////////////// - // Const methods: - /////////////////////////////////////////////////////////////////// - - /** @brief The standard @c StoreGateSvc - * Returns (kind of) a pointer to the @c StoreGateSvc - * @warning: deprecated. please use @c evtStore() instead - */ - ServiceHandle<StoreGateSvc>& sgSvc() const; - - /** @brief The standard @c StoreGateSvc (event store) - * Returns (kind of) a pointer to the @c StoreGateSvc - */ - ServiceHandle<StoreGateSvc>& evtStore() const; - - /** @brief The standard @c StoreGateSvc/DetectorStore - * Returns (kind of) a pointer to the @c StoreGateSvc - */ - ServiceHandle<StoreGateSvc>& detStore() const; - - -private: - // to keep track of VarHandleKeyArrays for data dep registration - mutable std::vector<SG::VarHandleKeyArray*> m_vhka; - - -public: - ///////////////////////////////////////////////////////////////// - // - //// Enable use of Gaudi::Property<Foo> m_foo {this,"NAME",init,"doc"}; - // style properties in AthAlgorithms - // - - template <class T> - Property& declareProperty(Gaudi::Property<T> &t) { - typedef typename SG::HandleClassifier<T>::type htype; - return AthAlgorithm::declareGaudiProperty(t, htype()); - } - -private: - /** - * @brief specialization for handling Gaudi::Property<SG::VarHandleKey> - * - */ - template <class T> - Property& declareGaudiProperty(Gaudi::Property<T> &hndl, - const SG::VarHandleKeyType&) - { - return *AthAlgorithm::declareProperty(hndl.name(), hndl.value(), - hndl.documentation()); - - } - - /** - * @brief specialization for handling Gaudi::Property<SG::VarHandleKeyArray> - * - */ - template <class T> - Property& declareGaudiProperty(Gaudi::Property<T> &hndl, - const SG::VarHandleKeyArrayType&) - { - return *AthAlgorithm::declareProperty(hndl.name(), hndl.value(), - hndl.documentation()); - - } - - /** - * @brief specialization for handling Gaudi::Property<SG::VarHandleBase> - * - */ - template <class T> - Property& declareGaudiProperty(Gaudi::Property<T> &hndl, - const SG::VarHandleType&) - { - return *AthAlgorithm::declareProperty(hndl.name(), hndl.value(), - hndl.documentation()); - } - - - /** - * @brief specialization for handling everything that's not a - * Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> - * - */ - template <class T> - Property& declareGaudiProperty(Gaudi::Property<T> &t, const SG::NotHandleType&) - { - return Algorithm::declareProperty(t); - } - - - ///////////////////////////////////////////////////////////////// - // - //// For automatic registration of Handle data products - // - -public: - /** - * @brief Declare a new Gaudi property. - * @param name Name of the property. - * @param hndl Object holding the property value. - * @param doc Documentation string for the property. - * - * This is the version for types that derive from @c SG::VarHandleKey. - * The property value object is put on the input and output lists as - * appropriate; then we forward to the base class. - */ - Property* declareProperty(const std::string& name, - SG::VarHandleKey& hndl, - const std::string& doc, - const SG::VarHandleKeyType&) - { - this->declare(hndl); - hndl.setOwner(this); - - return Algorithm::declareProperty(name,hndl,doc); - } - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - - /** - * @brief Declare a new Gaudi property. - * @param name Name of the property. - * @param hndl Object holding the property value. - * @param doc Documentation string for the property. - * - * This is the version for types that derive from @c SG::VarHandleBase. - * The property value object is put on the input and output lists as - * appropriate; then we forward to the base class. - */ - Property* declareProperty(const std::string& name, - SG::VarHandleBase& hndl, - const std::string& doc, - const SG::VarHandleType&) - { - this->declare(hndl.vhKey()); - hndl.vhKey().setOwner(this); - - return Algorithm::declareProperty(name,hndl,doc); - } - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - - Property* declareProperty(const std::string& name, - SG::VarHandleKeyArray& hndArr, - const std::string& doc, - const SG::VarHandleKeyArrayType&) - { - - // std::ostringstream ost; - // ost << Algorithm::name() << " VHKA declareProp: " << name - // << " size: " << hndArr.keys().size() - // << " mode: " << hndArr.mode() - // << " vhka size: " << m_vhka.size() - // << "\n"; - // debug() << ost.str() << endmsg; - - m_vhka.push_back(&hndArr); - - Property* p = Algorithm::declareProperty(name, hndArr, doc); - if (p != 0) { - p->declareUpdateHandler(&AthAlgorithm::updateVHKA, this); - } else { - ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray " - << name); - } - - return p; - - } - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - - // Since the contents of the VarHandleKeyArrays have not been read - // in from the configurables by the time that declareProperty is - // executed, we must cache them and loop through them later to - // register the data dependencies. - // - // However, we cannot actually call declare() on the key instances - // until we know that the vector cannot change size anymore --- otherwise, - // the pointers given to declare() may become invalid. That basically means - // that we can't call declare() until the derived class's initialize() - // completes. So instead of doing it here (which would be too early), - // we override sysInitialize() and do it at the end of that. But, - // Algorithm::sysInitialize() wants to have the handle lists after initialize() - // completes in order to do dependency analysis. It gets these lists - // solely by calling inputHandles() and outputHandles(), so we can get this - // to work by overriding those methods and adding in the current contents - // of the arrays. - - void updateVHKA(Property& /*p*/) { - // debug() << "updateVHKA for property " << p.name() << " " << p.toString() - // << " size: " << m_vhka.size() << endmsg; - for (auto &a : m_vhka) { - std::vector<SG::VarHandleKey*> keys = a->keys(); - for (auto k : keys) { - k->setOwner(this); - } - } - } - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - - - /** - * @brief Declare a new Gaudi property. - * @param name Name of the property. - * @param property Object holding the property value. - * @param doc Documentation string for the property. - * - * This is the generic version, for types that do not derive - * from @c SG::VarHandleKey. It just forwards to the base class version - * of @c declareProperty. - */ - template <class T> - Property* declareProperty(const std::string& name, - T& property, - const std::string& doc, - const SG::NotHandleType&) - { - return Algorithm::declareProperty(name, property, doc); - } - - - /** - * @brief Declare a new Gaudi property. - * @param name Name of the property. - * @param property Object holding the property value. - * @param doc Documentation string for the property. - * - * This dispatches to either the generic @c declareProperty or the one - * for VarHandle/Key/KeyArray. - */ - template <class T> - Property* declareProperty(const std::string& name, - T& property, - const std::string& doc="none") - { - typedef typename SG::HandleClassifier<T>::type htype; - return declareProperty (name, property, doc, htype()); - } - - - /** - * @brief Perform system initialization for an algorithm. - * - * We override this to declare all the elements of handle key arrays - * at the end of initialization. - * See comments on updateVHKA. - */ - virtual StatusCode sysInitialize() override; - - - /** - * @brief Handle START transition. - * - * We override this in order to make sure that conditions handle keys - * can cache a pointer to the conditions container. - */ - virtual StatusCode sysStart() override; - - - /** - * @brief Return this algorithm's input handles. - * - * We override this to include handle instances from key arrays - * if they have not yet been declared. - * See comments on updateVHKA. - */ - virtual std::vector<Gaudi::DataHandle*> inputHandles() const override; - - - /** - * @brief Return this algorithm's output handles. - * - * We override this to include handle instances from key arrays - * if they have not yet been declared. - * See comments on updateVHKA. - */ - virtual std::vector<Gaudi::DataHandle*> outputHandles() const override; - - /** * @brief Return the list of extra output dependencies. * @@ -383,39 +63,7 @@ public: */ virtual const DataObjIDColl& extraOutputDeps() const override; - - // forward to CommonMessaging - inline MsgStream& msg() const { - return msgStream(); - } - inline MsgStream& msg(const MSG::Level lvl) const { - return msgStream(lvl); - } - inline bool msgLvl(const MSG::Level lvl) const { - return msgLevel(lvl); - } - - /////////////////////////////////////////////////////////////////// - // Non-const methods: - /////////////////////////////////////////////////////////////////// - - /////////////////////////////////////////////////////////////////// - // Protected methods: - /////////////////////////////////////////////////////////////////// - protected: - - /// callback for output level property - void msg_update_handler(Property& outputLevel); - /// callback to add storeName to ExtraInputs/Outputs data deps - void extraDeps_update_handler(Property&); - - /// remove all handles from I/O resolution - void renounceArray( SG::VarHandleKeyArray& handlesArray ); - - /////////////////////////////////////////////////////////////////// - // Private data: - /////////////////////////////////////////////////////////////////// private: /// Default constructor: @@ -423,34 +71,8 @@ public: AthAlgorithm (const AthAlgorithm& ); //> not implemented AthAlgorithm& operator= (const AthAlgorithm&); //> not implemented - typedef ServiceHandle<StoreGateSvc> StoreGateSvc_t; - /// Pointer to StoreGate (event store by default) - mutable StoreGateSvc_t m_evtStore; - - /// Pointer to StoreGate (detector store by default) - mutable StoreGateSvc_t m_detStore; - - /// Extra output dependency collection, extended by AthAlgorithmDHUpdate - /// to add symlinks. Empty if no symlinks were found. DataObjIDColl m_extendedExtraObjects; - bool m_varHandleArraysDeclared; }; -/////////////////////////////////////////////////////////////////// -// Inline methods: -/////////////////////////////////////////////////////////////////// - -inline -ServiceHandle<StoreGateSvc>& AthAlgorithm::sgSvc() const -{ return m_evtStore; } - -inline -ServiceHandle<StoreGateSvc>& AthAlgorithm::evtStore() const -{ return m_evtStore; } - -inline -ServiceHandle<StoreGateSvc>& AthAlgorithm::detStore() const -{ return m_detStore; } - #endif //> !ATHENABASECOMPS_ATHALGORITHM_H diff --git a/Control/AthenaBaseComps/AthenaBaseComps/AthCommonDataStore.h b/Control/AthenaBaseComps/AthenaBaseComps/AthCommonDataStore.h new file mode 100644 index 000000000000..38c2771a8eb5 --- /dev/null +++ b/Control/AthenaBaseComps/AthenaBaseComps/AthCommonDataStore.h @@ -0,0 +1,400 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/** @class AthCommonDataStore + * @file AthenaBaseComps/AthCommonDataStore.h + * @author Charles Leggett + * @date June 2018 + * @brief Templated class that provides access to Athena event stores + * and ability to set data dependencies via Properites. + * Implemented to reduce code duplication in AthAlgorithm, + * AthAlgTool, and AthReEntrantAlgorithm + */ + +#ifndef ATHENABASECOMPS_ATHCOMMONDATASTORE_H +#define ATHENABASECOMPS_ATHCOMMONDATASTORE_H + +#include <string> +#include <type_traits> + +// Need to do this very early so parser for VarHandleKey picked up +#include "GaudiKernel/StatusCode.h" +namespace SG { + class VarHandleKey; + class VarHandleKeyArray; + class VarHandleBase; +} +namespace Gaudi { + namespace Parsers { + StatusCode parse(SG::VarHandleKey& v, const std::string& s); + StatusCode parse(SG::VarHandleKeyArray& v, const std::string& s); + StatusCode parse(SG::VarHandleBase& v, const std::string& s); + } +} + +#include "AthenaBaseComps/AthMsgStreamMacros.h" +#include "AthenaBaseComps/AthCheckMacros.h" +#include "AthenaBaseComps/HandleClassifier.h" + +#include "GaudiKernel/ServiceHandle.h" +#include "StoreGate/StoreGateSvc.h" +#include "StoreGate/VarHandleKeyArray.h" +#include "StoreGate/VarHandleProperty.h" +#include "StoreGate/VarHandleKeyProperty.h" +#include "StoreGate/VarHandleKey.h" +#include "StoreGate/VarHandleBase.h" +#include "StoreGate/VarHandleKeyArray.h" +#include "StoreGate/VarHandleKeyArrayProperty.h" + + + +template <class PBASE> +class AthCommonDataStore : public PBASE { +public: + template <typename... T> + AthCommonDataStore(const std::string& name, T... args) + : PBASE(name, args...), + m_evtStore ( "StoreGateSvc/StoreGateSvc", name ), + m_detStore ( "StoreGateSvc/DetectorStore", name ), + m_varHandleArraysDeclared (false) + { + + this->declareProperty( "EvtStore", + m_evtStore = StoreGateSvc_t ("StoreGateSvc", name), + "Handle to a StoreGateSvc instance: it will be used to " + "retrieve data during the course of the job" ); + + this->declareProperty( "DetStore", + m_detStore = StoreGateSvc_t ("StoreGateSvc/DetectorStore", name), + "Handle to a StoreGateSvc/DetectorStore instance: it will be used to " + "retrieve data during the course of the job" ); + + auto props = this->getProperties(); + for( Property* prop : props ) { + if (prop->name() == "ExtraOutputs" || prop->name() == "ExtraInputs") { + prop->declareUpdateHandler + (&AthCommonDataStore<PBASE>::extraDeps_update_handler, this); + } + } + } + + // using PBASE::PBASE; + + /** @brief The standard @c StoreGateSvc + * Returns (kind of) a pointer to the @c StoreGateSvc + * @warning: deprecated. please use @c evtStore() instead + */ + ServiceHandle<StoreGateSvc>& sgSvc() const { return m_evtStore; } + + /** @brief The standard @c StoreGateSvc (event store) + * Returns (kind of) a pointer to the @c StoreGateSvc + */ + ServiceHandle<StoreGateSvc>& evtStore() const { return m_evtStore; } + + /** @brief The standard @c StoreGateSvc/DetectorStore + * Returns (kind of) a pointer to the @c StoreGateSvc + */ + ServiceHandle<StoreGateSvc>& detStore() const { return m_detStore; } + + + /** + * @brief Perform system initialization for an algorithm. + * + * We override this to declare all the elements of handle key arrays + * at the end of initialization. + * See comments on updateVHKA. + */ + virtual StatusCode sysInitialize() override; + + /** + * @brief Handle START transition. + * + * We override this in order to make sure that conditions handle keys + * can cache a pointer to the conditions container. + */ + virtual StatusCode sysStart() override; + + /** + * @brief Return this algorithm's input handles. + * + * We override this to include handle instances from key arrays + * if they have not yet been declared. + * See comments on updateVHKA. + */ + virtual std::vector<Gaudi::DataHandle*> inputHandles() const override; + + + /** + * @brief Return this algorithm's output handles. + * + * We override this to include handle instances from key arrays + * if they have not yet been declared. + * See comments on updateVHKA. + */ + virtual std::vector<Gaudi::DataHandle*> outputHandles() const override; + + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + public: + ///////////////////////////////////////////////////////////////// + // + //// Enable use of Gaudi::Property<Foo> m_foo {this,"NAME",init,"doc"}; + // style properties in AthAlgorithms + // + + template <class T> + Property& declareProperty(Gaudi::Property<T> &t) { + typedef typename SG::HandleClassifier<T>::type htype; + return AthCommonDataStore<PBASE>::declareGaudiProperty(t, htype()); + } + + private: + /** + * @brief specialization for handling Gaudi::Property<SG::VarHandleKey> + * + */ + template <class T> + Property& declareGaudiProperty(Gaudi::Property<T> &hndl, + const SG::VarHandleKeyType&) + { + return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(), + hndl.value(), + hndl.documentation()); + + } + + /** + * @brief specialization for handling Gaudi::Property<SG::VarHandleKeyArray> + * + */ + template <class T> + Property& declareGaudiProperty(Gaudi::Property<T> &hndl, + const SG::VarHandleKeyArrayType&) + { + return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(), + hndl.value(), + hndl.documentation()); + + } + + /** + * @brief specialization for handling Gaudi::Property<SG::VarHandleBase> + * + */ + template <class T> + Property& declareGaudiProperty(Gaudi::Property<T> &hndl, + const SG::VarHandleType&) + { + return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(), + hndl.value(), + hndl.documentation()); + } + + + /** + * @brief specialization for handling everything that's not a + * Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> + * + */ + template <class T> + Property& declareGaudiProperty(Gaudi::Property<T> &t, const SG::NotHandleType&) + { + return PBASE::declareProperty(t); + } + + + ///////////////////////////////////////////////////////////////// + // + //// For automatic registration of Handle data products + // + +public: + /** + * @brief Declare a new Gaudi property. + * @param name Name of the property. + * @param hndl Object holding the property value. + * @param doc Documentation string for the property. + * + * This is the version for types that derive from @c SG::VarHandleKey. + * The property value object is put on the input and output lists as + * appropriate; then we forward to the base class. + */ + Property* declareProperty(const std::string& name, + SG::VarHandleKey& hndl, + const std::string& doc, + const SG::VarHandleKeyType&) + { + this->declare(hndl); + hndl.setOwner(this); + + return PBASE::declareProperty(name,hndl,doc); + } + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /** + * @brief Declare a new Gaudi property. + * @param name Name of the property. + * @param hndl Object holding the property value. + * @param doc Documentation string for the property. + * + * This is the version for types that derive from @c SG::VarHandleBase. + * The property value object is put on the input and output lists as + * appropriate; then we forward to the base class. + */ + Property* declareProperty(const std::string& name, + SG::VarHandleBase& hndl, + const std::string& doc, + const SG::VarHandleType&) + { + this->declare(hndl.vhKey()); + hndl.vhKey().setOwner(this); + + return PBASE::declareProperty(name,hndl,doc); + } + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + Property* declareProperty(const std::string& name, + SG::VarHandleKeyArray& hndArr, + const std::string& doc, + const SG::VarHandleKeyArrayType&) + { + + // std::ostringstream ost; + // ost << Algorithm::name() << " VHKA declareProp: " << name + // << " size: " << hndArr.keys().size() + // << " mode: " << hndArr.mode() + // << " vhka size: " << m_vhka.size() + // << "\n"; + // debug() << ost.str() << endmsg; + + m_vhka.push_back(&hndArr); + + Property* p = PBASE::declareProperty(name, hndArr, doc); + if (p != 0) { + p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this); + } else { + ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray " + << name); + } + + return p; + + } + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + // Since the contents of the VarHandleKeyArrays have not been read + // in from the configurables by the time that declareProperty is + // executed, we must cache them and loop through them later to + // register the data dependencies. + // + // However, we cannot actually call declare() on the key instances + // until we know that the vector cannot change size anymore --- otherwise, + // the pointers given to declare() may become invalid. That basically means + // that we can't call declare() until the derived class's initialize() + // completes. So instead of doing it here (which would be too early), + // we override sysInitialize() and do it at the end of that. But, + // Algorithm::sysInitialize() wants to have the handle lists after initialize() + // completes in order to do dependency analysis. It gets these lists + // solely by calling inputHandles() and outputHandles(), so we can get this + // to work by overriding those methods and adding in the current contents + // of the arrays. + + void updateVHKA(Property& /*p*/) { + // debug() << "updateVHKA for property " << p.name() << " " << p.toString() + // << " size: " << m_vhka.size() << endmsg; + for (auto &a : m_vhka) { + std::vector<SG::VarHandleKey*> keys = a->keys(); + for (auto k : keys) { + k->setOwner(this); + } + } + } + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + + /** + * @brief Declare a new Gaudi property. + * @param name Name of the property. + * @param property Object holding the property value. + * @param doc Documentation string for the property. + * + * This is the generic version, for types that do not derive + * from @c SG::VarHandleKey. It just forwards to the base class version + * of @c declareProperty. + */ + template <class T> + Property* declareProperty(const std::string& name, + T& property, + const std::string& doc, + const SG::NotHandleType&) + { + return PBASE::declareProperty(name, property, doc); + } + + + /** + * @brief Declare a new Gaudi property. + * @param name Name of the property. + * @param property Object holding the property value. + * @param doc Documentation string for the property. + * + * This dispatches to either the generic @c declareProperty or the one + * for VarHandle/Key/KeyArray. + */ + template <class T> + Property* declareProperty(const std::string& name, + T& property, + const std::string& doc="none") + { + typedef typename SG::HandleClassifier<T>::type htype; + return declareProperty (name, property, doc, htype()); + } + + + +protected: + /// remove all handles from I/O resolution + void renounceArray( SG::VarHandleKeyArray& handlesArray ) { + handlesArray.renounce(); + } + +private: + typedef ServiceHandle<StoreGateSvc> StoreGateSvc_t; + /// Pointer to StoreGate (event store by default) + mutable StoreGateSvc_t m_evtStore; + + /// Pointer to StoreGate (detector store by default) + mutable StoreGateSvc_t m_detStore; + + +private: + // to keep track of VarHandleKeyArrays for data dep registration + mutable std::vector<SG::VarHandleKeyArray*> m_vhka; + bool m_varHandleArraysDeclared; + + +protected: + /** + * @brief Add StoreName to extra input/output deps as needed + * + * use the logic of the VarHandleKey to parse the DataObjID keys + * supplied via the ExtraInputs and ExtraOuputs Properties to add + * the StoreName if it's not explicitly given + */ + void extraDeps_update_handler( Property& ExtraDeps ); + + +}; + +#include "AthCommonDataStore.icc" + +#endif diff --git a/Control/AthenaBaseComps/AthenaBaseComps/AthCommonDataStore.icc b/Control/AthenaBaseComps/AthenaBaseComps/AthCommonDataStore.icc new file mode 100644 index 000000000000..450b269cc2fe --- /dev/null +++ b/Control/AthenaBaseComps/AthenaBaseComps/AthCommonDataStore.icc @@ -0,0 +1,103 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/** @class AthCommonDataStore + * @file AthenaBaseComps/AthCommonDataStore.icc + * @author Charles Leggett + * @date June 2018 + * @brief Templated class that provides access to Athena event stores + * and ability to set data dependencies via Properites. + * Implemented to reduce code duplication in AthAlgorithm, + * AthAlgTool, and AthReEntrantAlgorithm + */ + +#ifndef ATHENABASECOMPS_ATHCOMMONDATASTORE_ICC +#define ATHENABASECOMPS_ATHCOMMONDATASTORE_ICC + +#include "AthenaBaseComps/VHKASupport.h" +#include "AthenaBaseComps/AthAlgStartVisitor.h" + +template <class PBASE> +void AthCommonDataStore<PBASE>::extraDeps_update_handler( Property& ExtraDeps ) + { + DataObjIDColl newColl; + Gaudi::Property<DataObjIDColl> *prop = dynamic_cast<Gaudi::Property<DataObjIDColl>*> (&ExtraDeps); + if ( prop ) { + for (auto id : prop->value()) { + SG::VarHandleKey vhk(id.clid(), id.key(), Gaudi::DataHandle::Reader); + id.updateKey( vhk.objKey() ); + newColl.emplace( id ); + } + if (newColl.size() != 0) prop->setValue( newColl ); + } else { + ATH_MSG_ERROR("unable to dcast ExtraInput/Output Property"); + } + } + +/** + * @brief Perform system initialization for an algorithm. + */ +template <class PBASE> +StatusCode AthCommonDataStore<PBASE>::sysInitialize() { + ATH_CHECK( PBASE::sysInitialize() ); + + for ( SG::VarHandleKeyArray* a: m_vhka ) { + a->declare( this ); + } + + m_varHandleArraysDeclared = true; + + return StatusCode::SUCCESS; +} + +/** + * @brief Handle START transition. + */ +template <class PBASE> +StatusCode AthCommonDataStore<PBASE>::sysStart() { + ATH_CHECK( PBASE::sysStart() ); + + // Call start() on all input handles. + // This allows CondHandleKeys to cache pointers to their conditions containers. + // (CondInputLoader makes the containers that it creates during start(), + // so initialize() is too early for this.) + + AthAlgStartVisitor visitor(this); + this->acceptDHVisitor (&visitor); + + return StatusCode::SUCCESS; +} + +/** + * @brief Return this algorithm's input handles. + */ +template <class PBASE> +std::vector<Gaudi::DataHandle*> AthCommonDataStore<PBASE>::inputHandles() const +{ + std::vector<Gaudi::DataHandle*> v = PBASE::inputHandles(); + + if (!m_varHandleArraysDeclared) { + VHKASupport::insertInput( m_vhka, v ); + } + + return v; +} + +/** + * @brief Return this algorithm's output handles. + */ +template <class PBASE> +std::vector<Gaudi::DataHandle*> AthCommonDataStore<PBASE>::outputHandles() const +{ + std::vector<Gaudi::DataHandle*> v = PBASE::outputHandles(); + + if (!m_varHandleArraysDeclared) { + VHKASupport::insertOutput( m_vhka, v ); + } + + return v; +} + + +#endif diff --git a/Control/AthenaBaseComps/AthenaBaseComps/AthCommonMsg.h b/Control/AthenaBaseComps/AthenaBaseComps/AthCommonMsg.h new file mode 100644 index 000000000000..7ea2be5b0ac3 --- /dev/null +++ b/Control/AthenaBaseComps/AthenaBaseComps/AthCommonMsg.h @@ -0,0 +1,37 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +/** @class AthCommonMsg + * @file AthenaBaseComps/AthCommonMsg.h + * @author Charles Leggett + * @date June 2018 + * @brief Templated class that provides backwards compatibility for + * legacy MsgService manipulation methods + */ + +#ifndef ATHENABASECOMPS_ATHCOMMONMSG_H +#define ATHENABASECOMPS_ATHCOMMONMSG_H + +#include "GaudiKernel/MsgStream.h" + +template <class PBASE> +class AthCommonMsg : public PBASE { +public: + using PBASE::PBASE; + + // forward to CommonMessaging + inline MsgStream& msg() const { + return this->msgStream(); + } + inline MsgStream& msg(const MSG::Level lvl) const { + return this->msgStream(lvl); + } + inline bool msgLvl(const MSG::Level lvl) const { + return this->msgLevel(lvl); + } + +}; + + +#endif diff --git a/Control/AthenaBaseComps/AthenaBaseComps/AthReentrantAlgorithm.h b/Control/AthenaBaseComps/AthenaBaseComps/AthReentrantAlgorithm.h index 7ba3aa35ed35..99398dfa1a57 100644 --- a/Control/AthenaBaseComps/AthenaBaseComps/AthReentrantAlgorithm.h +++ b/Control/AthenaBaseComps/AthenaBaseComps/AthReentrantAlgorithm.h @@ -16,24 +16,10 @@ #include <string> #include <type_traits> -// Need to do this very early so parser for VarHandleKey picked up -#include <string> -#include "GaudiKernel/StatusCode.h" -#include "StoreGate/VarHandleKeyArray.h" -namespace SG { - class VarHandleKey; - class VarHandleKeyArray; - class VarHandleBase; -} -namespace Gaudi { - namespace Parsers { - StatusCode parse(SG::VarHandleKey& v, const std::string& s); - StatusCode parse(SG::VarHandleKeyArray& v, const std::string& s); - StatusCode parse(SG::VarHandleBase& v, const std::string& s); - } -} - - +#include "AthenaBaseComps/AthCommonDataStore.h" +#include "AthenaBaseComps/AthCommonMsg.h" +#include "AthenaBaseComps/AthCheckMacros.h" +#include "AthenaBaseComps/AthMemMacros.h" // Framework includes @@ -44,19 +30,6 @@ namespace Gaudi { #include "GaudiKernel/ReEntAlgorithm.h" #endif -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/ServiceHandle.h" -#include "AthenaBaseComps/AthCheckMacros.h" -#include "AthenaBaseComps/AthMemMacros.h" -#include "AthenaBaseComps/AthMsgStreamMacros.h" -#include "AthenaBaseComps/HandleClassifier.h" -#include "StoreGate/StoreGateSvc.h" -#include "StoreGate/VarHandleProperty.h" -#include "StoreGate/VarHandleKeyProperty.h" -#include "StoreGate/VarHandleKeyArrayProperty.h" -#include "StoreGate/VarHandleKey.h" -#include "StoreGate/VarHandleBase.h" -#include "StoreGate/VarHandleKeyArray.h" /** * @brief An algorithm that can be simultaneously executed in multiple threads. @@ -112,7 +85,7 @@ namespace Gaudi { class AthReentrantAlgorithm - : public ::ReEntAlgorithm + : public AthCommonDataStore<AthCommonMsg<ReEntAlgorithm>> { /////////////////////////////////////////////////////////////////// // Public methods: @@ -129,26 +102,6 @@ class AthReentrantAlgorithm /// Destructor: virtual ~AthReentrantAlgorithm() override; - /////////////////////////////////////////////////////////////////// - // Const methods: - /////////////////////////////////////////////////////////////////// - - /** @brief The standard @c StoreGateSvc - * Returns (kind of) a pointer to the @c StoreGateSvc - * @warning: deprecated. please use @c evtStore() instead - */ - ServiceHandle<StoreGateSvc>& sgSvc() const; - - /** @brief The standard @c StoreGateSvc (event store) - * Returns (kind of) a pointer to the @c StoreGateSvc - */ - ServiceHandle<StoreGateSvc>& evtStore() const; - - /** @brief The standard @c StoreGateSvc/DetectorStore - * Returns (kind of) a pointer to the @c StoreGateSvc - */ - ServiceHandle<StoreGateSvc>& detStore() const; - #ifndef REENTRANT_GAUDI /** @@ -194,254 +147,6 @@ class AthReentrantAlgorithm virtual const EventContext& getContext() const override; -private: - // to keep track of VarHandleKeyArrays for data dep registration - - mutable std::vector<SG::VarHandleKeyArray*> m_vhka; - -public: - ///////////////////////////////////////////////////////////////// - // - //// Enable use of Gaudi::Property<Foo> m_foo {this,"NAME",init,"doc"}; - // style properties in AthReentrantAlgorithms - // - - template <class T> - Property& declareProperty(Gaudi::Property<T> &t) { - typedef typename SG::HandleClassifier<T>::type htype; - return AthReentrantAlgorithm::declareGaudiProperty(t, htype()); - } - -private: - /** - * @brief specialization for handling Gaudi::Property<SG::VarHandleKey> - * - */ - template <class T> - Property& declareGaudiProperty(Gaudi::Property<T> &hndl, - const SG::VarHandleKeyType&) - { - return *AthReentrantAlgorithm::declareProperty(hndl.name(), hndl.value(), hndl.documentation()); - } - - /** - * @brief specialization for handling Gaudi::Property<SG::VarHandleKeyArray> - * - */ - template <class T> - Property& declareGaudiProperty(Gaudi::Property<T> &hndl, - const SG::VarHandleKeyArrayType&) - { - return *AthReentrantAlgorithm::declareProperty(hndl.name(), hndl.value(), hndl.documentation()); - } - - /** - * @brief specialization for handling Gaudi::Property<SG::VarHandleBase> - * - */ - template <class T> - Property& declareGaudiProperty(Gaudi::Property<T> &hndl, - const SG::VarHandleType&) - { - return *AthReentrantAlgorithm::declareProperty(hndl.name(), hndl.value(), - hndl.documentation()); - - } - - /** - * @brief specialization for handling everything that's not a - * Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> - * - */ - template <class T> - Property& declareGaudiProperty(Gaudi::Property<T> &t, const SG::NotHandleType&) { - return Algorithm::declareProperty(t); - } - - ///////////////////////////////////////////////////////////////// - // - //// For automatic registration of Handle data products - // - -public: - /** - * @brief Declare a new Gaudi property. - * @param name Name of the property. - * @param hndl Object holding the property value. - * @param doc Documentation string for the property. - * - * This is the version for types that derive from @c SG::VarHandleKey. - * The property value object is put on the input and output lists as - * appropriate; then we forward to the base class. - */ - Property* declareProperty(const std::string& name, - SG::VarHandleKey& hndl, - const std::string& doc, - const SG::VarHandleKeyType&) - { - this->declare(hndl); - hndl.setOwner(this); - - return Algorithm::declareProperty(name,hndl,doc); - } - - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - - - /** - * @brief Declare a new Gaudi property. - * @param name Name of the property. - * @param hndl Object holding the property value. - * @param doc Documentation string for the property. - * - * This is the version for types that derive from @c SG::VarHandleBase. - * The property value object is put on the input and output lists as - * appropriate; then we forward to the base class. - */ - Property* declareProperty(const std::string& name, - SG::VarHandleBase& hndl, - const std::string& doc, - const SG::VarHandleType&) - { - this->declare(hndl.vhKey()); - hndl.vhKey().setOwner(this); - - return Algorithm::declareProperty(name,hndl,doc); - } - - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - - Property* declareProperty(const std::string& name, - SG::VarHandleKeyArray& hndArr, - const std::string& doc, - const SG::VarHandleKeyArrayType&) - { - - m_vhka.push_back(&hndArr); - - Property* p = Algorithm::declareProperty(name, hndArr, doc); - if (p != 0) { - p->declareUpdateHandler(&AthReentrantAlgorithm::updateVHKA, this); - } else { - ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray " - << name); - } - - return p; - - } - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - - // Since the contents of the VarHandleKeyArrays have not been read - // in from the configurables by the time that declareProperty is - // executed, we must cache them and loop through them later to - // register the data dependencies. - // - // However, we cannot actually call declare() on the key instances - // until we know that the vector cannot change size anymore --- otherwise, - // the pointers given to declare() may become invalid. That basically means - // that we can't call declare() until the derived class's initialize() - // completes. So instead of doing it here (which would be too early), - // we override sysInitialize() and do it at the end of that. But, - // ReEntAlgorithm::sysInitialize() wants to have the handle lists after initialize() - // completes in order to do dependency analysis. It gets these lists - // solely by calling inputHandles() and outputHandles(), so we can get this - // to work by overriding those methods and adding in the current contents - // of the arrays. - - void updateVHKA(Property& /*p*/) { - // debug() << "updateVHKA for property " << p.name() << " " << p.toString() - // << " size: " << m_vhka.size() << endmsg; - for (auto &a : m_vhka) { - std::vector<SG::VarHandleKey*> keys = a->keys(); - for (auto k : keys) { - k->setOwner(this); - } - } - } - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - - - /** - * @brief Declare a new Gaudi property. - * @param name Name of the property. - * @param property Object holding the property value. - * @param doc Documentation string for the property. - * - * This is the generic version, for types that do not derive - * from @c SG::VarHandleKey. It just forwards to the base class version - * of @c declareProperty. - */ - template <class T> - Property* declareProperty(const std::string& name, - T& property, - const std::string& doc, - const SG::NotHandleType&) - { - return Algorithm::declareProperty(name, property, doc); - } - - - /** - * @brief Declare a new Gaudi property. - * @param name Name of the property. - * @param property Object holding the property value. - * @param doc Documentation string for the property. - * - * This dispatches to either the generic @c declareProperty or the one - * for VarHandle/Key/KeyArray. - */ - template <class T> - Property* declareProperty(const std::string& name, - T& property, - const std::string& doc="none") - { - typedef typename SG::HandleClassifier<T>::type htype; - return declareProperty (name, property, doc, htype()); - } - - - /** - * @brief Perform system initialization for an algorithm. - * - * We override this to declare all the elements of handle key arrays - * at the end of initialization. - * See comments on updateVHKA. - */ - virtual StatusCode sysInitialize() override; - - - /** - * @brief Handle START transition. - * - * We override this in order to make sure that conditions handle keys - * can cache a pointer to the conditions container. - */ - virtual StatusCode sysStart() override; - - - /** - * @brief Return this algorithm's input handles. - * - * We override this to include handle instances from key arrays - * if they have not yet been declared. - * See comments on updateVHKA. - */ - virtual std::vector<Gaudi::DataHandle*> inputHandles() const override; - - - /** - * @brief Return this algorithm's output handles. - * - * We override this to include handle instances from key arrays - * if they have not yet been declared. - * See comments on updateVHKA. - */ - virtual std::vector<Gaudi::DataHandle*> outputHandles() const override; - /** * @brief Return the list of extra output dependencies. @@ -452,38 +157,6 @@ public: virtual const DataObjIDColl& extraOutputDeps() const override; - // forward to CommonMessaging - inline MsgStream& msg() const { - return msgStream(); - } - inline MsgStream& msg(const MSG::Level lvl) const { - return msgStream(lvl); - } - inline bool msgLvl(const MSG::Level lvl) const { - return msgLevel(lvl); - } - - /////////////////////////////////////////////////////////////////// - // Non-const methods: - /////////////////////////////////////////////////////////////////// - - /////////////////////////////////////////////////////////////////// - // Protected methods: - /////////////////////////////////////////////////////////////////// - protected: - - /// callback for output level property - void msg_update_handler(Property& outputLevel); - /// callback to add storeName to ExtraInputs/Outputs data deps - void extraDeps_update_handler(Property&); - - - /// remove all handles in array from I/O resolution - void renounceArray( SG::VarHandleKeyArray& handlesArray ); - - /////////////////////////////////////////////////////////////////// - // Private data: - /////////////////////////////////////////////////////////////////// private: /// Default constructor: @@ -491,34 +164,10 @@ public: AthReentrantAlgorithm (const AthReentrantAlgorithm& ); //> not implemented AthReentrantAlgorithm& operator= (const AthReentrantAlgorithm&); //> not implemented - typedef ServiceHandle<StoreGateSvc> StoreGateSvc_t; - /// Pointer to StoreGate (event store by default) - mutable StoreGateSvc_t m_evtStore; - - /// Pointer to StoreGate (detector store by default) - mutable StoreGateSvc_t m_detStore; - /// Extra output dependency collection, extended by AthAlgorithmDHUpdate /// to add symlinks. Empty if no symlinks were found. DataObjIDColl m_extendedExtraObjects; - bool m_varHandleArraysDeclared; }; -/////////////////////////////////////////////////////////////////// -// Inline methods: -/////////////////////////////////////////////////////////////////// - -inline -ServiceHandle<StoreGateSvc>& AthReentrantAlgorithm::sgSvc() const -{ return m_evtStore; } - -inline -ServiceHandle<StoreGateSvc>& AthReentrantAlgorithm::evtStore() const -{ return m_evtStore; } - -inline -ServiceHandle<StoreGateSvc>& AthReentrantAlgorithm::detStore() const -{ return m_detStore; } - #endif //> !ATHENABASECOMPS_ATHREENTRANTALGORITHM_H diff --git a/Control/AthenaBaseComps/AthenaBaseComps/AthService.h b/Control/AthenaBaseComps/AthenaBaseComps/AthService.h index da5ca8087a61..66f16fe4b31d 100644 --- a/Control/AthenaBaseComps/AthenaBaseComps/AthService.h +++ b/Control/AthenaBaseComps/AthenaBaseComps/AthService.h @@ -16,13 +16,11 @@ // Framework includes #include "GaudiKernel/Service.h" -#include "GaudiKernel/MsgStream.h" #include "AthenaBaseComps/AthMsgStreamMacros.h" #include "AthenaBaseComps/AthCheckMacros.h" -#include "StoreGate/ReadHandle.h" -#include "StoreGate/UpdateHandle.h" -#include "StoreGate/WriteHandle.h" +#include "AthenaBaseComps/AthCommonMsg.h" + #include "StoreGate/VarHandleProperty.h" // Forward declaration @@ -30,69 +28,14 @@ class ISvcLocator; template <class TYPE> class SvcFactory; class AthService : - public ::Service + public AthCommonMsg<Service> { - protected: - friend class SvcFactory<AthService>; - - /////////////////////////////////////////////////////////////////// - // Public methods: - /////////////////////////////////////////////////////////////////// public: - // Copy constructor: - - /// Constructor with parameters: - AthService( const std::string& name, ISvcLocator* pSvcLocator ); - - /// Destructor: - virtual ~AthService(); - - /// Initialize @c AthService - virtual StatusCode sysInitialize(); - virtual StatusCode initialize(); - - /// Reinitialize @c AthService - virtual StatusCode sysReinitialize(); - virtual StatusCode reinitialize(); - - /// Finalize @c AthService - virtual StatusCode sysFinalize(); - virtual StatusCode finalize(); - - virtual StatusCode queryInterface( const InterfaceID& riid, - void** ppvInterface ); - - // forward to CommonMessaging - inline MsgStream& msg() const { - return msgStream(); - } - inline MsgStream& msg(const MSG::Level lvl) const { - return msgStream(lvl); - } - inline bool msgLvl(const MSG::Level lvl) const { - return msgLevel(lvl); - } - - /////////////////////////////////////////////////////////////////// - // Const methods: - /////////////////////////////////////////////////////////////////// - - /////////////////////////////////////////////////////////////////// - // Non-const methods: - /////////////////////////////////////////////////////////////////// - - /////////////////////////////////////////////////////////////////// - // Protected methods: - /////////////////////////////////////////////////////////////////// - protected: + using AthCommonMsg<Service>::AthCommonMsg; - /////////////////////////////////////////////////////////////////// - // Private data: - /////////////////////////////////////////////////////////////////// - private: +private: - /// Default constructor: AthService(); AthService (const AthService&); AthService& operator= (const AthService&); diff --git a/Control/AthenaBaseComps/src/VHKASupport.h b/Control/AthenaBaseComps/AthenaBaseComps/VHKASupport.h similarity index 100% rename from Control/AthenaBaseComps/src/VHKASupport.h rename to Control/AthenaBaseComps/AthenaBaseComps/VHKASupport.h diff --git a/Control/AthenaBaseComps/share/AthAlgTool_test.ref b/Control/AthenaBaseComps/share/AthAlgTool_test.ref index 05343ba41882..47a7495f4bf2 100644 --- a/Control/AthenaBaseComps/share/AthAlgTool_test.ref +++ b/Control/AthenaBaseComps/share/AthAlgTool_test.ref @@ -62,4 +62,5 @@ obj 293847295 StoreGateSvc+tee obj 293847295 StoreGateSvc+thh.rrr test2 arrtool2 ERROR Explicit circular data dependency found for id ( 'AthenaBaseCompsTest::MyObj' , 'StoreGateSvc+aaa' ) -arrtool2 FATAL /home/leggett/work/v30r1.002/src/Control/AthenaBaseComps/src/AthAlgTool.cxx:73 (StatusCode AthAlgTool::sysInitialize()): code 0: AlgTool::sysInitialize() +arrtool2 FATAL ../AthCommonDataStore.icc (StatusCode AthCommonDataStore<PBASE>::sysInitialize() [with PBASE = AthCommonMsg<AlgTool>]): code 0: PBASE::sysInitialize() + diff --git a/Control/AthenaBaseComps/share/AthAlgorithm_test.ref b/Control/AthenaBaseComps/share/AthAlgorithm_test.ref index acf9504e8d3e..461a626ff4c6 100644 --- a/Control/AthenaBaseComps/share/AthAlgorithm_test.ref +++ b/Control/AthenaBaseComps/share/AthAlgorithm_test.ref @@ -60,4 +60,4 @@ ClassIDSvc INFO getRegistryEntries: read 754 CLIDRegistry entries for ClassIDSvc INFO getRegistryEntries: read 401 CLIDRegistry entries for module ALL test2 arralg2 ERROR Explicit circular data dependency detected for id ( 'AthenaBaseCompsTest::MyObj' , 'StoreGateSvc+aaa' ) -arralg2 FATAL /home/leggett/work/v30r1.002/src/Control/AthenaBaseComps/src/AthAlgorithm.cxx:142 (StatusCode AthAlgorithm::sysInitialize()): code 0: Algorithm::sysInitialize() +arralg2 FATAL ../AthCommonDataStore.icc (StatusCode AthCommonDataStore<PBASE>::sysInitialize() [with PBASE = AthCommonMsg<Algorithm>]): code 0: PBASE::sysInitialize() diff --git a/Control/AthenaBaseComps/src/AthAlgStartVisitor.cxx b/Control/AthenaBaseComps/src/AthAlgStartVisitor.cxx index f6699ccd30fc..a0805c843680 100644 --- a/Control/AthenaBaseComps/src/AthAlgStartVisitor.cxx +++ b/Control/AthenaBaseComps/src/AthAlgStartVisitor.cxx @@ -10,8 +10,26 @@ */ -#include "AthAlgStartVisitor.h" +#include "AthenaBaseComps/AthAlgStartVisitor.h" #include "StoreGate/VarHandleKey.h" +#include "GaudiKernel/IAlgorithm.h" + +/** + * @brief Figure out where we're called from. Only want to process holders + * recursively if caller is a real Algorithm. If it's an AlgTool, don't + * recurse. If it's a Sequence, don't do anything. + * @param n back pointer to parent + */ +AthAlgStartVisitor::AthAlgStartVisitor(INamedInterface *n) { + // only do recursive traversal if we are called from a real Algorithm + IAlgorithm* ia = dynamic_cast<IAlgorithm*>(n); + if ( ia == nullptr) { + m_recursive = false; + } else if ( ia->isSequence() ) { + m_recursive = false; + m_ignore = true; + } +} /** @@ -20,6 +38,8 @@ */ void AthAlgStartVisitor::visit (const IDataHandleHolder* holder) { + if (m_ignore) return; + // Make sure we process a component only once. if (m_seen.insert (holder).second) { // Call start() on all read conditions handle keys. @@ -30,6 +50,8 @@ void AthAlgStartVisitor::visit (const IDataHandleHolder* holder) } } } - holder->acceptDHVisitor (this); + if (m_recursive) { + holder->acceptDHVisitor (this); + } } } diff --git a/Control/AthenaBaseComps/src/AthAlgTool.cxx b/Control/AthenaBaseComps/src/AthAlgTool.cxx index ee50d14a7ce0..4a9ef11f3220 100644 --- a/Control/AthenaBaseComps/src/AthAlgTool.cxx +++ b/Control/AthenaBaseComps/src/AthAlgTool.cxx @@ -10,199 +10,19 @@ /////////////////////////////////////////////////////////////////// -// STL includes - -// Framework includes - // AthenaBaseComps includes #include "AthenaBaseComps/AthAlgTool.h" -#include "./VHKASupport.h" -/////////////////////////////////////////////////////////////////// -// Public methods: -/////////////////////////////////////////////////////////////////// -// Constructors -//////////////// AthAlgTool::AthAlgTool( const std::string& type, const std::string& name, const IInterface* parent ) : - ::AlgTool ( type, name, parent ), - m_evtStore ( "StoreGateSvc/StoreGateSvc", name ), - m_detStore ( "StoreGateSvc/DetectorStore", name ), - m_varHandleArraysDeclared (false) + AthCommonDataStore<AthCommonMsg<AlgTool>> ( type, name, parent ) { - // - // Property declaration - // - - auto props = getProperties(); - for( Property* prop : props ) { - if (prop->name() == "ExtraOutputs" || prop->name() == "ExtraInputs") { - prop->declareUpdateHandler - (&AthAlgTool::extraDeps_update_handler, this); - } - } - - declareProperty( "EvtStore", - m_evtStore = StoreGateSvc_t ("StoreGateSvc", name), - "Handle to a StoreGateSvc instance: it will be used to " - "retrieve data during the course of the job" ); - - declareProperty( "DetStore", - m_detStore = StoreGateSvc_t ("StoreGateSvc/DetectorStore", name), - "Handle to a StoreGateSvc/DetectorStore instance: it will be used to " - "retrieve data during the course of the job" ); } -// Destructor -/////////////// AthAlgTool::~AthAlgTool() { } -/** - * @brief Perform system initialization for a tool. - * - * We override this to declare all the elements of handle key arrays - * at the end of initialization. - * See comments on updateVHKA. - */ -StatusCode AthAlgTool::sysInitialize() -{ - ATH_CHECK( AlgTool::sysInitialize() ); - - for ( SG::VarHandleKeyArray* a: m_vhka ) { - a->declare( this ); - } - m_varHandleArraysDeclared = true; - - return StatusCode::SUCCESS; -} - - -/** - * @brief Handle START transition. - * - * We override this in order to make sure that conditions handle keys - * can cache a pointer to the conditions container. - */ -StatusCode AthAlgTool::sysStart() -{ - ATH_CHECK( AlgTool::sysStart() ); - - // Call start() on all input handles. - // This allows CondHandleKeys to cache pointers to their conditions containers. - // (CondInputLoader makes the containers that it creates during start(), - // so initialize() is too early for this.) - for (Gaudi::DataHandle* h : inputHandles()) { - if (h->isCondition()) { - if (SG::VarHandleKey* k = dynamic_cast<SG::VarHandleKey*> (h)) { - ATH_CHECK( k->start() ); - } - } - } - - return StatusCode::SUCCESS; -} - - -/** - * @brief Return this tool's input handles. - * - * We override this to include handle instances from key arrays - * if they have not yet been declared. - * See comments on updateVHKA. - */ -std::vector<Gaudi::DataHandle*> AthAlgTool::inputHandles() const -{ - std::vector<Gaudi::DataHandle*> v = AlgTool::inputHandles(); - - if (!m_varHandleArraysDeclared) { - VHKASupport::insertInput( m_vhka, v ); - } - - return v; -} - -void AthAlgTool::renounceArray( SG::VarHandleKeyArray& vh ) { - vh.renounce(); -} - -/** - * @brief Return this tool's output handles. - * - * We override this to include handle instances from key arrays - * if they have not yet been declared. - * See comments on updateVHKA. - */ -std::vector<Gaudi::DataHandle*> AthAlgTool::outputHandles() const -{ - std::vector<Gaudi::DataHandle*> v = AlgTool::outputHandles(); - if (!m_varHandleArraysDeclared) { - VHKASupport::insertOutput( m_vhka, v ); - } - return v; -} - - -/////////////////////////////////////////////////////////////////// -// Const methods: -/////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////// -// Non-const methods: -/////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////// -// Protected methods: -/////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////// -// Const methods: -/////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////// -// Non-const methods: -/////////////////////////////////////////////////////////////////// - -void -AthAlgTool::msg_update_handler( Property& outputLevel ) -{ - // We can't just rely on the return value of msgLevel() here. Since it's - // not well defined whether the base class gets updated with the new - // output level first, or this class. So by default just use the property - // itself. The fallback is only there in case Gaudi changes its property - // type at one point, to be able to fall back on something. - IntegerProperty* iprop = dynamic_cast< IntegerProperty* >( &outputLevel ); - if( iprop ) { - msgStream().setLevel( static_cast<MSG::Level> (iprop->value()) ); - } else { - msgStream().setLevel( msgLevel() ); - } -} - -/** - * @brief Add StoreName to extra input/output deps as needed - * - * use the logic of the VarHandleKey to parse the DataObjID keys - * supplied via the ExtraInputs and ExtraOuputs Properties to add - * the StoreName if it's not explicitly given - */ -void -AthAlgTool::extraDeps_update_handler( Property& ExtraDeps ) -{ - DataObjIDColl newColl; - Gaudi::Property<DataObjIDColl> *prop = dynamic_cast<Gaudi::Property<DataObjIDColl>*> (&ExtraDeps); - if ( prop ) { - for (auto id : prop->value()) { - SG::VarHandleKey vhk(id.clid(), id.key(), Gaudi::DataHandle::Reader); - id.updateKey( vhk.objKey() ); - newColl.emplace( id ); - } - if (newColl.size() != 0) prop->setValue( newColl ); - } else { - ATH_MSG_ERROR("unable to dcast ExtraInput/Output Property"); - } -} diff --git a/Control/AthenaBaseComps/src/AthAlgorithm.cxx b/Control/AthenaBaseComps/src/AthAlgorithm.cxx index 23e3596341b9..5b82e493be62 100644 --- a/Control/AthenaBaseComps/src/AthAlgorithm.cxx +++ b/Control/AthenaBaseComps/src/AthAlgorithm.cxx @@ -12,13 +12,6 @@ // AthenaBaseComps includes #include "AthenaBaseComps/AthAlgorithm.h" #include "AthAlgorithmDHUpdate.h" -#include "AthAlgStartVisitor.h" - -// STL includes - -// Framework includes -#include "GaudiKernel/Property.h" -#include "./VHKASupport.h" /////////////////////////////////////////////////////////////////// // Public methods: @@ -29,33 +22,8 @@ AthAlgorithm::AthAlgorithm( const std::string& name, ISvcLocator* pSvcLocator, const std::string& version ) : - ::Algorithm ( name, pSvcLocator, version ), - m_evtStore ( "StoreGateSvc/StoreGateSvc", name ), - m_detStore ( "StoreGateSvc/DetectorStore", name ), - m_varHandleArraysDeclared (false) + ::AthCommonDataStore<AthCommonMsg<Algorithm>> ( name, pSvcLocator, version ) { - // - // Property declaration - // - - auto props = getProperties(); - for( Property* prop : props ) { - if (prop->name() == "ExtraOutputs" || prop->name() == "ExtraInputs") { - prop->declareUpdateHandler - (&AthAlgorithm::extraDeps_update_handler, this); - } - } - - declareProperty( "EvtStore", - m_evtStore = StoreGateSvc_t ("StoreGateSvc", name), - "Handle to a StoreGateSvc instance: it will be used to " - "retrieve data during the course of the job" ); - - declareProperty( "DetStore", - m_detStore = StoreGateSvc_t ("StoreGateSvc/DetectorStore", name), - "Handle to a StoreGateSvc/DetectorStore instance: it will be used to " - "retrieve data during the course of the job" ); - // Set up to run AthAlgorithmDHUpdate in sysInitialize before // merging dependency lists. This extends the output dependency // list with any symlinks implied by inheritance relations. @@ -71,150 +39,6 @@ AthAlgorithm::~AthAlgorithm() { } -/////////////////////////////////////////////////////////////////// -// Const methods: -/////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////// -// Non-const methods: -/////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////// -// Protected methods: -/////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////// -// Const methods: -/////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////// -// Non-const methods: -/////////////////////////////////////////////////////////////////// - -void -AthAlgorithm::msg_update_handler( Property& outputLevel ) -{ - // We can't just rely on the return value of msgLevel() here. Since it's - // not well defined whether the base class gets updated with the new - // output level first, or this class. So by default just use the property - // itself. The fallback is only there in case Gaudi changes its property - // type at one point, to be able to fall back on something. - IntegerProperty* iprop = dynamic_cast< IntegerProperty* >( &outputLevel ); - if( iprop ) { - msgStream().setLevel( static_cast<MSG::Level> (iprop->value()) ); - } else { - msgStream().setLevel( msgLevel() ); - } -} - -/** - * @brief Add StoreName to extra input/output deps as needed - * - * use the logic of the VarHandleKey to parse the DataObjID keys - * supplied via the ExtraInputs and ExtraOuputs Properties to add - * the StoreName if it's not explicitly given - */ -void -AthAlgorithm::extraDeps_update_handler( Property& ExtraDeps ) -{ - DataObjIDColl newColl; - Gaudi::Property<DataObjIDColl> *prop = dynamic_cast<Gaudi::Property<DataObjIDColl>*> (&ExtraDeps); - if ( prop ) { - for (auto id : prop->value()) { - SG::VarHandleKey vhk(id.clid(), id.key(), Gaudi::DataHandle::Reader); - id.updateKey( vhk.objKey() ); - newColl.emplace( id ); - } - if (newColl.size() != 0) prop->setValue( newColl ); - } else { - ATH_MSG_ERROR("unable to dcast ExtraInput/Output Property"); - } -} - -/** - * @brief Perform system initialization for an algorithm. - * - * We override this to declare all the elements of handle key arrays - * at the end of initialization. - * See comments on updateVHKA. - */ -StatusCode AthAlgorithm::sysInitialize() -{ - ATH_CHECK( Algorithm::sysInitialize() ); - - for ( SG::VarHandleKeyArray* a: m_vhka ) { - a->declare( this ); - } - - m_varHandleArraysDeclared = true; - - return StatusCode::SUCCESS; -} - - -/** - * @brief Handle START transition. - * - * We override this in order to make sure that conditions handle keys - * can cache a pointer to the conditions container. - */ -StatusCode AthAlgorithm::sysStart() -{ - ATH_CHECK( Algorithm::sysStart() ); - - // Call start() on all input handles. - // This allows CondHandleKeys to cache pointers to their conditions containers. - // (CondInputLoader makes the containers that it creates during start(), - // so initialize() is too early for this.) - AthAlgStartVisitor visitor; - acceptDHVisitor (&visitor); - - return StatusCode::SUCCESS; -} - - -void AthAlgorithm::renounceArray( SG::VarHandleKeyArray& vh ) { - vh.renounce(); -} - - -/** - * @brief Return this algorithm's input handles. - * - * We override this to include handle instances from key arrays - * if they have not yet been declared. - * See comments on updateVHKA. - */ -std::vector<Gaudi::DataHandle*> AthAlgorithm::inputHandles() const -{ - std::vector<Gaudi::DataHandle*> v = Algorithm::inputHandles(); - - if (!m_varHandleArraysDeclared) { - VHKASupport::insertInput( m_vhka, v ); - } - - return v; -} - - -/** - * @brief Return this algorithm's output handles. - * - * We override this to include handle instances from key arrays - * if they have not yet been declared. - * See comments on updateVHKA. - */ -std::vector<Gaudi::DataHandle*> AthAlgorithm::outputHandles() const -{ - std::vector<Gaudi::DataHandle*> v = Algorithm::outputHandles(); - - if (!m_varHandleArraysDeclared) { - VHKASupport::insertOutput( m_vhka, v ); - } - - return v; -} - /** * @brief Return the list of extra output dependencies. diff --git a/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx b/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx index 5fe57b5c0a4e..1d733128172f 100644 --- a/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx +++ b/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx @@ -12,53 +12,15 @@ // AthenaBaseComps includes #include "AthenaBaseComps/AthReentrantAlgorithm.h" #include "AthAlgorithmDHUpdate.h" -#include "AthAlgStartVisitor.h" // Framework includes -#include "GaudiKernel/Property.h" #include "GaudiKernel/ThreadLocalContext.h" - -#include "./VHKASupport.h" -/////////////////////////////////////////////////////////////////// -// Public methods: -/////////////////////////////////////////////////////////////////// - -// Constructors -//////////////// AthReentrantAlgorithm::AthReentrantAlgorithm( const std::string& name, ISvcLocator* pSvcLocator, const std::string& version ) : - ::ReEntAlgorithm ( name, pSvcLocator, version ), - m_evtStore ( "StoreGateSvc/StoreGateSvc", name ), - m_detStore ( "StoreGateSvc/DetectorStore", name ), - m_varHandleArraysDeclared (false) + ::AthCommonDataStore<AthCommonMsg<ReEntAlgorithm>> ( name, pSvcLocator, version ) { - // - // Property declaration - // - //declareProperty( "Property", m_nProperty ); - setUpMessaging(); - auto props = getProperties(); - for( Property* prop : props ) { - if( prop->name() == "OutputLevel" ) { - // prop->declareUpdateHandler - // (&AthReentrantAlgorithm::msg_update_handler, this); - } else if (prop->name() == "ExtraOutputs" || prop->name() == "ExtraInputs") { - prop->declareUpdateHandler - (&AthReentrantAlgorithm::extraDeps_update_handler, this); - } - } - - declareProperty( "EvtStore", - m_evtStore = StoreGateSvc_t ("StoreGateSvc", name), - "Handle to a StoreGateSvc instance: it will be used to " - "retrieve data during the course of the job" ); - - declareProperty( "DetStore", - m_detStore = StoreGateSvc_t ("StoreGateSvc/DetectorStore", name), - "Handle to a StoreGateSvc/DetectorStore instance: it will be used to " - "retrieve data during the course of the job" ); // Set up to run AthAlgorithmDHUpdate in sysInitialize before // merging depedency lists. This extends the output dependency @@ -76,66 +38,6 @@ AthReentrantAlgorithm::~AthReentrantAlgorithm() ATH_MSG_DEBUG ("Calling destructor"); } -/////////////////////////////////////////////////////////////////// -// Const methods: -/////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////// -// Non-const methods: -/////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////// -// Protected methods: -/////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////// -// Const methods: -/////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////// -// Non-const methods: -/////////////////////////////////////////////////////////////////// - -void -AthReentrantAlgorithm::msg_update_handler( Property& outputLevel ) -{ - // We can't just rely on the return value of msgLevel() here. Since it's - // not well defined whether the base class gets updated with the new - // output level first, or this class. So by default just use the property - // itself. The fallback is only there in case Gaudi changes its property - // type at one point, to be able to fall back on something. - IntegerProperty* iprop = dynamic_cast< IntegerProperty* >( &outputLevel ); - if( iprop ) { - msgStream().setLevel( static_cast<MSG::Level> (iprop->value()) ); - } else { - msgStream().setLevel( msgLevel() ); - } -} - -/** - * @brief Add StoreName to extra input/output deps as needed - * - * use the logic of the VarHandleKey to parse the DataObjID keys - * supplied via the ExtraInputs and ExtraOuputs Properties to add - * the StoreName if it's not explicitly given - */ -void -AthReentrantAlgorithm::extraDeps_update_handler( Property& ExtraDeps ) -{ - DataObjIDColl newColl; - Gaudi::Property<DataObjIDColl> *prop = dynamic_cast<Gaudi::Property<DataObjIDColl>*> (&ExtraDeps); - if ( prop ) { - for (auto id : prop->value()) { - SG::VarHandleKey vhk(id.clid(), id.key(), Gaudi::DataHandle::Reader); - id.updateKey( vhk.objKey() ); - newColl.emplace( id ); - } - if (newColl.size() != 0) prop->setValue( newColl ); - } else { - ATH_MSG_ERROR("unable to dcast ExtraInput/Output Property"); - } -} - #ifndef REENTRANT_GAUDI /** * @brief Standard Gaudi execute method. @@ -167,7 +69,6 @@ unsigned int AthReentrantAlgorithm::cardinality() const return 0; } - /** * @brief Return the current event context. * @@ -180,87 +81,6 @@ const EventContext& AthReentrantAlgorithm::getContext() const return Gaudi::Hive::currentContext(); } - -/** - * @brief Perform system initialization for an algorithm. - * - * We override this to declare all the elements of handle key arrays - * at the end of initialization. - * See comments on updateVHKA. - */ -StatusCode AthReentrantAlgorithm::sysInitialize() -{ - ATH_CHECK( ReEntAlgorithm::sysInitialize() ); - - for ( SG::VarHandleKeyArray* a: m_vhka ) { - a->declare( this ); - } - m_varHandleArraysDeclared = true; - - return StatusCode::SUCCESS; -} - - -/** - * @brief Handle START transition. - * - * We override this in order to make sure that conditions handle keys - * can cache a pointer to the conditions container. - */ -StatusCode AthReentrantAlgorithm::sysStart() -{ - ATH_CHECK( ReEntAlgorithm::sysStart() ); - - // Call start() on all input handles. - // This allows CondHandleKeys to cache pointers to their conditions containers. - // (CondInputLoader makes the containers that it creates during start(), - // so initialize() is too early for this.) - AthAlgStartVisitor visitor; - acceptDHVisitor (&visitor); - - return StatusCode::SUCCESS; -} - - -void AthReentrantAlgorithm::renounceArray( SG::VarHandleKeyArray& vh ) { - vh.renounce(); -} - -/** - * @brief Return this algorithm's input handles. - * - * We override this to include handle instances from key arrays - * if they have not yet been declared. - * See comments on updateVHKA. - */ -std::vector<Gaudi::DataHandle*> AthReentrantAlgorithm::inputHandles() const -{ - std::vector<Gaudi::DataHandle*> v = ReEntAlgorithm::inputHandles(); - if (!m_varHandleArraysDeclared) { - VHKASupport::insertInput( m_vhka, v ); - } - return v; -} - - -/** - * @brief Return this algorithm's output handles. - * - * We override this to include handle instances from key arrays - * if they have not yet been declared. - * See comments on updateVHKA. - */ -std::vector<Gaudi::DataHandle*> AthReentrantAlgorithm::outputHandles() const -{ - std::vector<Gaudi::DataHandle*> v = ReEntAlgorithm::outputHandles(); - if (!m_varHandleArraysDeclared) { - VHKASupport::insertOutput( m_vhka, v ); - } - - return v; -} - - /** * @brief Return the list of extra output dependencies. * diff --git a/Control/AthenaBaseComps/src/AthService.cxx b/Control/AthenaBaseComps/src/AthService.cxx index 669233bcdcbc..a2616243ee98 100644 --- a/Control/AthenaBaseComps/src/AthService.cxx +++ b/Control/AthenaBaseComps/src/AthService.cxx @@ -21,53 +21,3 @@ // Public methods: /////////////////////////////////////////////////////////////////// -// Constructors -//////////////// -AthService::AthService( const std::string& name, - ISvcLocator* pSvcLocator ) : - ::Service ( name, pSvcLocator ) -{ -} - -// Destructor -/////////////// -AthService::~AthService() -{ -} - -StatusCode AthService::sysInitialize() -{ - return Service::sysInitialize(); -} - -StatusCode AthService::initialize() -{ - return StatusCode::SUCCESS; -} - -StatusCode AthService::sysReinitialize() -{ - return Service::sysReinitialize(); -} - -StatusCode AthService::reinitialize() -{ - return StatusCode::SUCCESS; -} - -StatusCode AthService::sysFinalize() -{ - return Service::sysFinalize(); -} - -StatusCode AthService::finalize() -{ - return StatusCode::SUCCESS; -} - -StatusCode -AthService::queryInterface( const InterfaceID& riid, - void** ppvi ) -{ - return Service::queryInterface( riid, ppvi ); -} diff --git a/Control/AthenaBaseComps/src/VHKASupport.cxx b/Control/AthenaBaseComps/src/VHKASupport.cxx index 9573e1ee1e64..cdbbff842879 100644 --- a/Control/AthenaBaseComps/src/VHKASupport.cxx +++ b/Control/AthenaBaseComps/src/VHKASupport.cxx @@ -2,8 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "./VHKASupport.h" - +#include "AthenaBaseComps/VHKASupport.h" namespace VHKASupport { diff --git a/Control/AthenaBaseComps/test/AthAlgStartVisitor_test.cxx b/Control/AthenaBaseComps/test/AthAlgStartVisitor_test.cxx index 46234e30e17c..6547a7718787 100644 --- a/Control/AthenaBaseComps/test/AthAlgStartVisitor_test.cxx +++ b/Control/AthenaBaseComps/test/AthAlgStartVisitor_test.cxx @@ -9,7 +9,7 @@ */ #undef NDEBUG -#include "../src/AthAlgStartVisitor.h" +#include "AthenaBaseComps/AthAlgStartVisitor.h" #include "AthenaBaseComps/AthAlgorithm.h" #include "AthenaBaseComps/AthAlgTool.h" #include "TestTools/initGaudi.h" @@ -89,7 +89,7 @@ void test1 (ISvcLocator* svcLoc) assert (h4.m_started == 0); assert (h5.m_started == 0); - AthAlgStartVisitor v; + AthAlgStartVisitor v( &alg ); alg.acceptDHVisitor (&v); assert (h1.m_started == 1); diff --git a/PhysicsAnalysis/AnalysisCommon/PileupReweighting/Root/PileupReweightingTool.cxx b/PhysicsAnalysis/AnalysisCommon/PileupReweighting/Root/PileupReweightingTool.cxx index 7c8a6f6c90a2..9b5985e8cb3c 100644 --- a/PhysicsAnalysis/AnalysisCommon/PileupReweighting/Root/PileupReweightingTool.cxx +++ b/PhysicsAnalysis/AnalysisCommon/PileupReweighting/Root/PileupReweightingTool.cxx @@ -79,7 +79,6 @@ PileupReweightingTool::PileupReweightingTool( const std::string& name ) :CP::TPi //rootcore can't do this yet! void PileupReweightingTool::updateHandler(Property& p) { //call the original update handler - this->msg_update_handler(p); EnableDebugging(this->msgLvl(MSG::DEBUG)); } #endif diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/Root/TrigDecisionTool.cxx b/Trigger/TrigAnalysis/TrigDecisionTool/Root/TrigDecisionTool.cxx index ae32c13b4d8e..117226b86ba3 100644 --- a/Trigger/TrigAnalysis/TrigDecisionTool/Root/TrigDecisionTool.cxx +++ b/Trigger/TrigAnalysis/TrigDecisionTool/Root/TrigDecisionTool.cxx @@ -86,7 +86,6 @@ Trig::TrigDecisionTool::TrigDecisionTool(const std::string& name) : #ifdef ASGTOOL_ATHENA void Trig::TrigDecisionTool::outputlevelupdateHandler(Property& p) { //call the original update handler - this->msg_update_handler(p); Logger::msg().setLevel(AthMessaging::msg().level()); } #endif diff --git a/Trigger/TrigAnalysis/TriggerMatchingTool/Root/MatchingTool.cxx b/Trigger/TrigAnalysis/TriggerMatchingTool/Root/MatchingTool.cxx index 4a1936a7a2a3..48e8caea582f 100644 --- a/Trigger/TrigAnalysis/TriggerMatchingTool/Root/MatchingTool.cxx +++ b/Trigger/TrigAnalysis/TriggerMatchingTool/Root/MatchingTool.cxx @@ -38,7 +38,6 @@ namespace Trig { #ifndef XAOD_STANDALONE void MatchingTool::updateOutputLevel(Property& p) { - this->msg_update_handler(p); //calls original handler impl()->msg().setLevel(msgLevel()); //pass on our message level to the matchingimplementation } #endif -- GitLab From 9491dcc12850a5006cd8ce59d79c83c0042a0a87 Mon Sep 17 00:00:00 2001 From: "Vincent R. Pascuzzi" <vpascuzz@cern.ch> Date: Thu, 5 Jul 2018 16:22:14 -0400 Subject: [PATCH 371/562] Update FastCaloSimSvc.cxx: fixed mixing enum types Instead of direct assignment, we use a `static_cast` to convert between enum types. See 8): https://en.cppreference.com/w/cpp/language/static_cast Addresses Coverity defect 29025 (part of the ATLASSIM-3738 saga). Former-commit-id: b297100d66d236cfa4978e3fab7690645ba3d411 --- .../ISF_FastCaloSimServices/src/FastCaloSimSvc.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvc.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvc.cxx index 81c5955b0e21..ae120e2f5854 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvc.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvc.cxx @@ -421,7 +421,7 @@ std::vector<Trk::HitInfo>* ISF::FastCaloSimSvc::caloHits(const ISF::ISFParticle& Trk::PathLimit pathLim(-1.,0); //if (absPdg!=999 && pHypothesis<99) pathLim = m_samplingTool->sampleProcess(mom,isp.charge(),pHypothesis); - Trk::GeometrySignature nextGeoID=Trk::GeometrySignature(isp.nextGeoID()); + Trk::GeometrySignature nextGeoID = static_cast<Trk::GeometrySignature>(isp.nextGeoID()); // save Calo entry hit (fallback info) hitVector->push_back(Trk::HitInfo(inputPar.clone(),isp.timeStamp(),nextGeoID,0.)); -- GitLab From 63e33f777bdb7efc33d6c8a83a77c96ce4b76364 Mon Sep 17 00:00:00 2001 From: "Vincent R. Pascuzzi" <vpascuzz@cern.ch> Date: Thu, 5 Jul 2018 16:37:17 -0400 Subject: [PATCH 372/562] Update FastCaloSimSvcPU.cxx: fix mixing enum types Instead of direct assignment, we use a `static_cast` to convert between enum types. See 8): https://en.cppreference.com/w/cpp/language/static_cast Addresses Coverity defect 115210 (part of the ATLASSIM-3738 saga). Former-commit-id: 2c47af9d0ea8e81142f9c3e0d8976f3724357fc2 --- .../ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx index b344efcce0f8..d8001e6ee332 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx @@ -682,7 +682,7 @@ std::vector<Trk::HitInfo>* ISF::FastCaloSimSvcPU::caloHits(const ISF::ISFParticl Trk::PathLimit pathLim(-1.,0); //if (absPdg!=999 && pHypothesis<99) pathLim = m_samplingTool->sampleProcess(mom,isp.charge(),pHypothesis); - Trk::GeometrySignature nextGeoID=Trk::GeometrySignature(isp.nextGeoID()); + Trk::GeometrySignature nextGeoID = static_cast<Trk::GeometrySignature>(isp.nextGeoID()); // save Calo entry hit (fallback info) hitVector->push_back(Trk::HitInfo(inputPar.clone(),isp.timeStamp(),nextGeoID,0.)); -- GitLab From 7d629b69c0fb8f7b94f518474e76f11f9e0be44d Mon Sep 17 00:00:00 2001 From: "Vincent R. Pascuzzi" <vpascuzz@cern.ch> Date: Thu, 5 Jul 2018 16:39:07 -0400 Subject: [PATCH 373/562] Update FastCaloSimSvcPU.cxx: fix unchecked return value Check for non-zero exit code. Since there was no error-checking before this change, we simply print a warning message to provide a means to debug should issues arise in the future. Addresses Coverity defect 115090 (part of the ATLASSIM-3738 saga). Former-commit-id: e000c4ddc7b37e57396c6e5be28c917c06d31dcc --- .../ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx index d8001e6ee332..fc54e1167dff 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx @@ -99,12 +99,19 @@ StatusCode ISF::FastCaloSimSvcPU::initialize() detID=new AtlasDetectorID(); IdDictParser* parser = new IdDictParser; IdDictMgr& idd = parser->parse ("IdDictParser/ATLAS_IDS.xml"); - detID->initialize_from_dictionary(idd); + if (detID->initialize_from_dictionary(idd)) + { + ATH_MSG_WARNING ("detID->initialize_from_dictionary returned non-zero return code."); + } larID=new LArEM_ID(); //IdDictMgr& lar_idd = parser->parse("IdDictParser/IdDictLArCalorimeter.xml"); IdDictMgr& lar_idd = parser->parse("IdDictParser/ATLAS_IDS.xml"); - larID->initialize_from_dictionary(lar_idd); + if (larID->initialize_from_dictionary(lar_idd)) + { + ATH_MSG_WARNING ("larID->initialize_from_dictionary returned non-zero return code."); + } + delete parser; // access tools and store them -- GitLab From 1c50cbacd71903c688ab4b65bc342de068a14d0e Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Thu, 5 Jul 2018 10:29:58 +0200 Subject: [PATCH 374/562] xAODBTaggingEfficiency: Fix clang warnings. clang warnings: unused variables. Former-commit-id: cba6a5648f3d218f55a49ddb89dcbc8e40ab91fb --- .../xAODBTaggingEfficiency/Root/BTaggingEfficiencyTool.cxx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingEfficiencyTool.cxx b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingEfficiencyTool.cxx index 89e0b745fe95..b16a5725fc5f 100644 --- a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingEfficiencyTool.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingEfficiencyTool.cxx @@ -647,8 +647,6 @@ BTaggingEfficiencyTool::getInefficiencyScaleFactor( const xAOD::Jet & jet, float // get the btag label int flavour = jetFlavourLabel(jet, m_coneFlavourLabel, m_oldConeFlavourLabel); - CalibResult result; - Analysis::CalibrationDataVariables vars; if (! fillVariables(jet, vars)) { ATH_MSG_ERROR("unable to fill variables required for scale factor evaluation"); @@ -725,8 +723,6 @@ BTaggingEfficiencyTool::getMCEfficiency( const xAOD::Jet & jet, float & eff) con // get the btag label int flavour = jetFlavourLabel(jet, m_coneFlavourLabel, m_oldConeFlavourLabel); - CalibResult result; - Analysis::CalibrationDataVariables vars; if (! fillVariables(jet, vars)) { ATH_MSG_ERROR("unable to fill variables required for scale factor evaluation"); -- GitLab From 8f09960aee0deed581c57a75f19c6ea60f9a6498 Mon Sep 17 00:00:00 2001 From: "Vincent R. Pascuzzi" <vpascuzz@cern.ch> Date: Thu, 5 Jul 2018 16:51:02 -0400 Subject: [PATCH 375/562] Update FastCaloSimSvcPU.cxx: raw to smart pointer Although this Coverity defect has already been addressed, moving forward we prefer to use smart over raw pointers. Migrated `parser` from raw to unique pointer. Former-commit-id: d578bb0cd4532199c1c4233a82fc2669bdf566bf --- .../ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx index fc54e1167dff..aa82a7f2e790 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx @@ -97,7 +97,7 @@ StatusCode ISF::FastCaloSimSvcPU::initialize() ATH_MSG_INFO ( m_screenOutputPrefix << "Initializing FastCaloSimSvcPU ..."); detID=new AtlasDetectorID(); - IdDictParser* parser = new IdDictParser; + std::unique_ptr<IdDictParser> parser(new IdDictParser()); IdDictMgr& idd = parser->parse ("IdDictParser/ATLAS_IDS.xml"); if (detID->initialize_from_dictionary(idd)) { @@ -112,8 +112,6 @@ StatusCode ISF::FastCaloSimSvcPU::initialize() ATH_MSG_WARNING ("larID->initialize_from_dictionary returned non-zero return code."); } - delete parser; - // access tools and store them if ( retrieveTools<ICaloCellMakerTool>(m_caloCellMakerTools_setup).isFailure() ) return StatusCode::FAILURE; -- GitLab From 1f1ae71aa3260209298f3efaa43fab0d5487ea38 Mon Sep 17 00:00:00 2001 From: "Vincent R. Pascuzzi" <vpascuzz@cern.ch> Date: Thu, 5 Jul 2018 16:54:09 -0400 Subject: [PATCH 376/562] Update FastCaloSimSvcPU.cxx: initialise pointer fields to nullptr Previously `detID` and `larID` were uninitialised -- fixed. (Addresses Coverity defect 115410; part of the ATLASSIM-3738 saga). Took this opportunity to properly initialise `m_theContainer` to `nullptr` instead of zero. Former-commit-id: f2d5b1d47b10c1e349ed99ddaa911650bcf9e906 --- .../ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx index aa82a7f2e790..6ad08409c5e8 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx @@ -51,6 +51,8 @@ /** Constructor **/ ISF::FastCaloSimSvcPU::FastCaloSimSvcPU(const std::string& name,ISvcLocator* svc) : BaseSimulationSvc(name, svc), + detID(nullptr), + larID(nullptr), m_extrapolator(), m_ownPolicy(static_cast<int>(SG::VIEW_ELEMENTS)), m_batchProcessMcTruth(false), @@ -62,7 +64,7 @@ ISF::FastCaloSimSvcPU::FastCaloSimSvcPU(const std::string& name,ISvcLocator* svc m_caloCellMakerTools_simulate(), m_caloCellMakerTools_release(), m_punchThroughTool(""), - m_theContainer(0), + m_theContainer(nullptr), m_particleBroker ("ISF_ParticleBroker",name) { // where to go -- GitLab From 52fb560e2d9c63961843bcd44a0fc33279bbb701 Mon Sep 17 00:00:00 2001 From: "Vincent R. Pascuzzi" <vpascuzz@cern.ch> Date: Thu, 5 Jul 2018 17:04:21 -0400 Subject: [PATCH 377/562] Update FastCaloSimSvcV2.cxx: initialise pointer fields Previously unitialised pointers now initialised. (Addresses Coverity defect 115414; part of the ATLASSIM-3738 saga). Took this opportunity to properly initialise `m_param` to `nullptr` instead of zero. Former-commit-id: 3122dd907f1eab70bc8885fc1b65390ca7e0e251 --- .../ISF_FastCaloSimServices/src/FastCaloSimSvcV2.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcV2.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcV2.cxx index 15abf85e6e9a..7111db031acc 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcV2.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcV2.cxx @@ -46,8 +46,12 @@ using std::atan2; /** Constructor **/ ISF::FastCaloSimSvcV2::FastCaloSimSvcV2(const std::string& name, ISvcLocator* svc) : - BaseSimulationSvc(name, svc),m_param(0), - m_rndGenSvc("AtRndmGenSvc", name) + BaseSimulationSvc(name, svc), + m_param(nullptr), + m_theContainer(nullptr), + m_rndGenSvc("AtRndmGenSvc", name), + m_randomEngine(nullptr), + m_caloGeo(nullptr) { declareProperty("ParamsInputFilename" , m_paramsFilename,"TFCSparam.root"); declareProperty("ParamsInputObject" , m_paramsObject,"SelPDGID"); -- GitLab From 3d1d38fde5d858b44494697ed3ac26bad492f455 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Thu, 5 Jul 2018 10:30:15 +0200 Subject: [PATCH 378/562] TrigEFMissingET: Fix clang warning. clang warning: missing override keyword. Former-commit-id: 51189af314cb9ccf95c087c223bfef7ef0427dfa --- .../TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.h b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.h index 18089672c45f..e6e0ff42047f 100644 --- a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.h +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromCellsMT.h @@ -31,7 +31,7 @@ class EFMissingETFromCellsMT: public extends<AthAlgTool, IMissingETTool> { virtual ~EFMissingETFromCellsMT(){} - virtual StatusCode initialize(); + virtual StatusCode initialize() override; virtual StatusCode update( xAOD::TrigMissingET *met, TrigEFMissingEtHelper *metHelper ) const override; -- GitLab From 10c8114ef5576c839fc55f05fa38826b238c2a8b Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Thu, 5 Jul 2018 10:30:42 +0200 Subject: [PATCH 379/562] AthAsgExUnittest: cmake fixes. Add missing dependencies. Remove object file duplication between lib/component libraries. Former-commit-id: 35cbe1d59138a0746948f0f97be6636a4c858120 --- Control/AthenaExamples/AthAsgExUnittest/CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Control/AthenaExamples/AthAsgExUnittest/CMakeLists.txt b/Control/AthenaExamples/AthAsgExUnittest/CMakeLists.txt index f1efd507ca9f..b17cbb203655 100644 --- a/Control/AthenaExamples/AthAsgExUnittest/CMakeLists.txt +++ b/Control/AthenaExamples/AthAsgExUnittest/CMakeLists.txt @@ -17,19 +17,17 @@ atlas_depends_on_subdirs( PUBLIC Control/AthenaBaseComps Control/AthAnalysisBaseComps Control/AthToolSupport/AsgTools + Event/xAOD/xAODJet + AtlasTest/GoogleTestTools TestPolicy ) # Libraries in the package: atlas_add_library( AthAsgExUnittestLib MyPackage/*.h src/*.cxx - src/components/*.cxx Root/*.cxx - PUBLIC_HEADERS MyPackage LINK_LIBRARIES GaudiKernel AsgTools AthAnalysisBaseCompsLib ) atlas_add_component( AthAsgExUnittest - MyPackage/*.h src/*.cxx src/components/*.cxx - Root/*.cxx LINK_LIBRARIES GaudiKernel AsgTools AthAsgExUnittestLib ) # Add tests: -- GitLab From 5078f006ca49a20cfb776208322882e862336d60 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Thu, 5 Jul 2018 10:31:13 +0200 Subject: [PATCH 380/562] TrigCaloRec: Fix clang warnings. clang warnings: unused private data members. Former-commit-id: 658b78a134725bd5fe41d856c4cfa51181b97021 --- .../TrigCaloRec/src/TrigCaloCellMakerMT.cxx | 2 -- .../TrigAlgorithms/TrigCaloRec/src/TrigCaloCellMakerMT.h | 9 --------- .../TrigCaloRec/src/TrigCaloClusterMakerMT.cxx | 3 +-- .../TrigCaloRec/src/TrigCaloClusterMakerMT.h | 1 - 4 files changed, 1 insertion(+), 14 deletions(-) diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloCellMakerMT.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloCellMakerMT.cxx index 11687e7dc14d..f7e96d53eb0a 100755 --- a/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloCellMakerMT.cxx +++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloCellMakerMT.cxx @@ -57,8 +57,6 @@ TrigCaloCellMakerMT::TrigCaloCellMakerMT(const std::string& name, ISvcLocator* p : AthAlgorithm(name, pSvcLocator), m_counter(0), m_dataAccessSvc( "TrigCaloDataAccessSvc/TrigCaloDataAccessSvc", name ), - m_caloCellContainer(NULL), - m_trigCaloQuality(NULL), m_fullScanEnabled(false), m_trustRoiLimits(false), m_createRoiForID(false), diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloCellMakerMT.h b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloCellMakerMT.h index 196f733c96af..87b1eee3d9dc 100755 --- a/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloCellMakerMT.h +++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloCellMakerMT.h @@ -65,7 +65,6 @@ class TrigCaloCellMakerMT : public AthAlgorithm { int m_neta, m_nphi; /** Prescale factor for persistency **/ - unsigned int m_persistencyPSF; std::string m_persistencyKey; unsigned int m_counter; @@ -112,14 +111,6 @@ class TrigCaloCellMakerMT : public AthAlgorithm { "output TrigCaloQuality"}; - /** Produced Calorimeter Cell Container. */ - CaloCellContainer* m_caloCellContainer; - - - /** data preparation error */ - // unsigned int m_conversionError[6]; - TrigCaloQuality * m_trigCaloQuality; - // double m_EtaL2, m_PhiL2; bool m_fullScanEnabled; diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloClusterMakerMT.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloClusterMakerMT.cxx index d284d1d363c9..0dbb0a15a931 100644 --- a/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloClusterMakerMT.cxx +++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloClusterMakerMT.cxx @@ -59,8 +59,7 @@ class ISvcLocator; // TrigCaloClusterMakerMT::TrigCaloClusterMakerMT(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator), - m_pCaloClusterContainer(NULL), - m_pTrigCaloQuality(NULL) + m_pCaloClusterContainer(NULL) { // Eta and Phi size of the RoI window... diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloClusterMakerMT.h b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloClusterMakerMT.h index aeff6f449608..18ad1df9a59e 100644 --- a/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloClusterMakerMT.h +++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigCaloClusterMakerMT.h @@ -58,7 +58,6 @@ class TrigCaloClusterMakerMT : public AthAlgorithm { std::vector<CaloClusterCollectionProcessor*> m_clusterMakerPointers; //pointers to tools std::vector<CaloClusterProcessor*> m_clusterCorrectionPointers; //pointers to tools xAOD::CaloClusterContainer* m_pCaloClusterContainer; - TrigCaloQuality* m_pTrigCaloQuality; // double m_Eta; // double m_Phi; -- GitLab From 0e9c91e9fc3af3407b659b29505aba7b6b0d06ff Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Thu, 5 Jul 2018 17:11:57 +0000 Subject: [PATCH 381/562] Merge branch 'my-reco-rm-test_recotf_kvvalidation' into '21.0' rm test_recotf_kvvalidation See merge request atlas/athena!12354 (cherry picked from commit 5ddee06c02ae83ab456321c9e6730db5fef7309e [formerly f5661040a04492272f74ff359391f34d110a7944]) e2dfb383 rm test_recotf_kvvalidation Former-commit-id: 5bf96e238cb96a8904ea9db32ca79e3fd6f7bd6f --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../RecJobTransformTests/test/test_recotf_kvvalidation.sh | 8 -------- 2 files changed, 8 deletions(-) mode change 100755 => 100644 Event/EventContainers/test/ID_ContainerTest.h delete mode 100755 Reconstruction/RecExample/RecJobTransformTests/test/test_recotf_kvvalidation.sh diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100755 new mode 100644 diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_recotf_kvvalidation.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_recotf_kvvalidation.sh deleted file mode 100755 index 1f810a2d157e..000000000000 --- a/Reconstruction/RecExample/RecJobTransformTests/test/test_recotf_kvvalidation.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# -# art-description: Alessandro.de.Salvo@cern.ch, KV validation -# art-type: build - -Reco_tf.py '--inputRDOFile' '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/KitValidation-MC12digitZeePyJT-20.20.8.5.pool.root' '--outputESDFile' 'KitValidation-RecoESDZeeJet-20.20.8.5.pool.root' '--outputAODFile' 'KitValidation-RecoAODZeeJet-20.20.8.5.pool.root' '--maxEvents' '10' '--autoConfiguration' 'everything' '--conditionsTag=OFLCOND-RUN12-SDR-32' '--postInclude' 'KitValidation/kv_reflex.py’ - - -- GitLab From 29f50cf2cac3965a92d9b2b3054c7e61276306c1 Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Thu, 5 Jul 2018 17:14:06 +0000 Subject: [PATCH 382/562] Merge branch '21.0-DeMoUpdateJuly18' into '21.0' Major DeMo update See merge request atlas/athena!12521 (cherry picked from commit 0e9990fba1def035f1722b14b33ffc336d8b53cf [formerly 40f7617c8dd41e3043f4f56e230f5735fef9e3ec]) a6cbf0f0 Major DeMo update Former-commit-id: 85eb194f58a0c140690f2548a86c01ced6329abc --- .../DataQualityUtils/scripts/DeMoDaemon-p.exe | 34 ++ .../DataQualityUtils/scripts/DeMoDaemon.exe | 16 +- .../DataQualityUtils/scripts/DeMoLib.py | 574 ++++++++++++++---- .../DataQualityUtils/scripts/DeMoScan.py | 171 ++++-- .../DataQualityUtils/scripts/DeMoStatus.py | 29 +- .../DataQualityUtils/scripts/DeMoUpdate.py | 194 ++++-- Event/EventContainers/test/ID_ContainerTest.h | 0 7 files changed, 784 insertions(+), 234 deletions(-) create mode 100755 DataQuality/DataQualityUtils/scripts/DeMoDaemon-p.exe mode change 100755 => 100644 Event/EventContainers/test/ID_ContainerTest.h diff --git a/DataQuality/DataQualityUtils/scripts/DeMoDaemon-p.exe b/DataQuality/DataQualityUtils/scripts/DeMoDaemon-p.exe new file mode 100755 index 000000000000..160006a16d2a --- /dev/null +++ b/DataQuality/DataQualityUtils/scripts/DeMoDaemon-p.exe @@ -0,0 +1,34 @@ +#!/bin/bash +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# Author : Benjamin Trocme (LPSC - Grenoble) - 2017 +# Daemon job to update daily the DQ stats for a single system +# This script can replace the default DeMoDaemon to debug or prepare +# special request (especially for longtasks) +# Arguments: +# -$1 : directory when to run the daemon (a priori ~atlasdqm/w1/DeMo +# -$2 : DeMo year +# -$3 : DeMo tag +# -$4 : System +################################################################## + +date + +cd $1 + +export AtlasSetup=/afs/cern.ch/atlas/software/dist/AtlasSetup +source $AtlasSetup/scripts/asetup.sh 21.0.66,Athena,gcc62 + +system=$4 + +echo "=====================================================================================" +echo "=====================================================================================" +echo "Processing "$system +echo "=====================================================================================" +echo "=====================================================================================" + +python DeMoUpdate.py -b -y $2 -t $3 -s $system --allRuns --resetYS --vetoLumiEvol &> YearStats-$system/daemon-allruns.out +python DeMoUpdate.py -b -y $2 -t $3 -s $system --grlUpdate &> YearStats-$system/daemon-grl.out +python DeMoStatus.py -y $2 -t $3 -s $system --savePlots &> YearStats-$system/daemon-grl2.out +python DeMoScan.py -y $2 -t $3 -s $system --recapDefects &> YearStats-$system/daemon-recapdefects.out + +/afs/cern.ch/user/a/atlasdqm/www/DeMo/generate.exe diff --git a/DataQuality/DataQualityUtils/scripts/DeMoDaemon.exe b/DataQuality/DataQualityUtils/scripts/DeMoDaemon.exe index 553ca4fbba55..84a9507edca1 100755 --- a/DataQuality/DataQualityUtils/scripts/DeMoDaemon.exe +++ b/DataQuality/DataQualityUtils/scripts/DeMoDaemon.exe @@ -2,6 +2,10 @@ # Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # Author : Benjamin Trocme (LPSC - Grenoble) - 2017 # Daemon job to update daily the DQ stats +# Arguments: +# -$1 : directory when to run the daemon (a priori ~atlasdqm/w1/DeMo +# -$2 : DeMo year +# -$3 : DeMo tag ################################################################## date @@ -11,11 +15,10 @@ cd $1 export AtlasSetup=/afs/cern.ch/atlas/software/dist/AtlasSetup source $AtlasSetup/scripts/asetup.sh 21.0.66,Athena,gcc62 - echo "First, looking for new runs..." python DeMoUpdate.py --runListUpdate -systems='TRT LAr Tile CaloCP' +systems='Pixel SCT TRT LAr Tile MDT TGC RPC CSC IDGlobal BTag CaloCP MuonCP Trig_L1 Trig_HLT' for system in $systems do @@ -25,9 +28,10 @@ echo "Processing "$system echo "=====================================================================================" echo "=====================================================================================" -python DeMoUpdate.py -b --onlineLumiNorm -t $2.onlDelivNorm -s $system --weekly --vetoLumiEvol -python DeMoUpdate.py -b --onlineLumiNorm -t $2.onlDelivNorm -s $system --grlUpdate -python DeMoScan.py -t $2.onlDelivNorm -s $system --recapDefects +python DeMoUpdate.py -b -y $2 -t $3 -s $system --weekly --vetoLumiEvol &> YearStats-$system/daemon-weekly.out +python DeMoUpdate.py -b -y $2 -t $3 -s $system --grlUpdate &> YearStats-$system/daemon-GRL.out +python DeMoStatus.py -y $2 -t $3 -s $system --savePlots &> YearStats-$system/daemon-GRL-2.out +python DeMoScan.py -y $2 -t $3 -s $system --recapDefects &> YearStats-$system/daemon-recapDefects.out done - +/afs/cern.ch/user/a/atlasdqm/www/DeMo/generate.exe diff --git a/DataQuality/DataQualityUtils/scripts/DeMoLib.py b/DataQuality/DataQualityUtils/scripts/DeMoLib.py index b419367307e8..5efa69354aad 100644 --- a/DataQuality/DataQualityUtils/scripts/DeMoLib.py +++ b/DataQuality/DataQualityUtils/scripts/DeMoLib.py @@ -5,7 +5,7 @@ from ROOT import THStack from ROOT import TCanvas,TLegend -from ROOT import kYellow,kOrange,kRed,kBlue,kPink,kMagenta,kGreen,kSpring,kViolet,kAzure,kCyan +from ROOT import kYellow,kOrange,kRed,kBlue,kPink,kMagenta,kGreen,kSpring,kViolet,kAzure,kCyan,kTeal,kBlack #import gb from gb import MakeLegend,MakeTH1 @@ -168,7 +168,8 @@ def plotStack(name,histo,index,indexName,histoIntLumi,lumiBool,resStack,resCanva return totalIneff # totalIneff is used only with the savePage1 option in DeMoStatus -######################################################################## +######################################################################################### +######################################################################################### def initialize(system,yearTag,partitions,defects0,defectVeto,veto,signOff,year = "2017"): # Description used in TLegend and TAxis @@ -188,24 +189,138 @@ def initialize(system,yearTag,partitions,defects0,defectVeto,veto,signOff,year = "Reproc_2018":"HEAD", "Tier0_2018":"HEAD"} - yearTag["offlineLumiTag"] = "OflLumi-13TeV-010" + # Condition tag for the veto database - defined later per system when relevant + yearTag["veto"] = {} + + # Tags below are derived from the regular ones. + # They have the same defect/veto tags but have different options/GRL + # The defect/veto tags are derived from the ones defined in the standard tags given before "." + # These tags are common to all system but some additional ones may be defined later. + # This is why the defect/veto tags are defined after the system definitions + similarTags = {"Tier0_2015.onlDelivNorm":"/Tier0 (onl. deliv. lumi.)", + "Reproc_2016.onlDelivNorm":"/2016 reproc. (onl. deliv. lumi.)", + "Tier0_2016.onlDelivNorm":"/Tier0 (onl. deliv. lumi.)", + "Reproc_2017.onlDelivNorm":"/2017 reproc. (onl. deliv. lumi.)", + "Tier0_2017.onlDelivNorm":"/Tier0 (onl. deliv. lumi.)", + "Reproc_2018.onlDelivNorm":"/2018 reproc. (onl. deliv. lumi.)", + "Tier0_2018.onlDelivNorm":"/Tier0 (onl. deliv. lumi.)"} + + + yearTag["offlineLumiTag"] = {"preliminary":"OflPrefLumi-RUN2-UPD4-10","grl":"OflLumi-13TeV-001"} + + +#################################### NEWSYSTEM defects +### if system == "NEWSYSTEM": +### partitions["color"] = {} +### partitions["list"] = partitions["color"].keys() +### +### defects0["prefix"] = ["NEWSYSTEM"] +### # Partition intolerable and tolerable defects - Order determines what defect is proeminent +### defects0["partIntol"] = [] +### defects0["partTol"] = [] +### # Global intolerable and tolerable defects +### defects0["globIntol"] = [""] +### defects0["globTol"] = [] +### +### veto["all"] = [] # Veto name as defined in the COOL database +### veto["COOL"] = {} # Veto name as defined in the COOL database +### +### defectVeto["description"] = {"":""} +### +### signOff["EXPR."] = ["NEWSYSTEM_UNCHECKED"] +### signOff["BULK"] = ["NEWSYSTEM_BULK_UNCHECKED"] +### signOff["FINAL"] = [] + +#################################### Pixel defects + if system == "Pixel": + partitions["color"] = {'IBL':kYellow-9,'LAYER0':kYellow,'BARREL':kOrange,'ENDCAPC':kOrange-3,'ENDCAPA':kRed-3} + partitions["list"] = partitions["color"].keys() -################################# TRT defects -# DB tag for the (veto) condition database -# So far, only LAr use event veto -# can be found with the twiki: https://twiki.cern.ch/twiki/bin/viewauth/AtlasComputing/CoolProdTags#Tags_for_RUN_2_Bulk_Data_Process - if system == "TRT": - yearTag["veto"] = {} + defects0["prefix"] = ["PIXEL"] + # Partition intolerable and tolerable defects - Order determines what defect is proeminent + defects0["partIntol"] = ["DISABLED", + "GT30pct_NOTREADY", + "READOUT_PROBLEM", + "HVSCAN","TIMING", + "STANDBY"] + defects0["partTol"] = [] + # Global intolerable and tolerable defects + defects0["globIntol"] = [] + defects0["globTol"] = [] + + veto["all"] = [] # Veto name as defined in the COOL database + veto["COOL"] = {} # Veto name as defined in the COOL database - # Tags below are derived from the regular ones. - # They have the same defect/veto tags but have different options/GRL - # The defect/veto tags are derived from the ones defined in the standard tags given before "." - similarTags = {"Tier0_2018.onlDelivNorm":"/Tier0 (onl. deliv. lumi.)"} - for iSimilar in similarTags.keys(): - baseTag = iSimilar.split(".")[0] - yearTag["description"][iSimilar] = similarTags[iSimilar] - yearTag["defect"][iSimilar] = yearTag["defect"][baseTag] + defectVeto["description"] = {"DISABLED":"One layer disabled", + "GT30pct_NOTREADY":">30% modules in error", + "READOUT_PROBLEM":"Readout problem", + "HVSCAN":"HV scan", + "TIMING":"Timing scan", + "STANDBY":"Standby"} + signOff["EXPR."] = ["PIXEL_UNCHECKED"] + signOff["BULK"] = ["PIXEL_BULK_UNCHECKED"] + signOff["FINAL"] = [] + + + +################################# SCT defects +# https://twiki.cern.ch/twiki/bin/view/Atlas/SCTOfflineMonitoringShifts#List_of_Defects + if system == "SCT": + partitions["color"] = {} + partitions["list"] = partitions["color"].keys() + + defects0["prefix"] = ["SCT"] + # Partition intolerable and tolerable defects - Order determines what defect is proeminent + defects0["partIntol"] = [] + defects0["partTol"] = [] + # Global intolerable and tolerable defects + defects0["globIntol"] = ["GLOBAL_STANDBY", + "CRATE_OUT", + "ROD_OUT_MAJOR", + "PERIOD_ERR_MAJOR", + "GLOBAL_DESYNC", + "GLOBAL_RECONFIG", + "GLOBAL_UNKNOWN"] + defects0["globTol"] = ["MOD_OUT_GT40", + "MOD_ERR_GT40", + "MOD_NOISE_GT40", + "PERIOD_ERR_GT40", + "ROD_OUT", + "EFF_LT99", + "NOTNOMINAL_HV", + "NOTNOMINAL_THRESHOLD", + "NOTNOMINAL_TIMING", + "COOLINGLOOP_OUT_1"] + + defectVeto["description"] = {"GLOBAL_STANDBY":"Standby (HV < 1.5kV)", # Intolerable defects + "CRATE_OUT":">=1 crate out", + "ROD_OUT_MAJOR":"Large inefficency (ROD)", + "PERIOD_ERR_MAJOR":"Large inefficiency (PERIOD)", + "GLOBAL_DESYNC":"Global desync", + "GLOBAL_RECONFIG":"Global reconfig", + "GLOBAL_UNKNOWN":"Unknown", + "MOD_OUT_GT40":"More than 40 modules excluded in DAQ in addition to the permanent disabled modules (37 modules as of June 2017)", # Tolerable defects + "MOD_ERR_GT40":"More than 40 modules with bytestream errors ", + "MOD_NOISE_GT40":"More than 40 noisy modules", + "PERIOD_ERR_GT40":"More than 80 links with errors in a short period of time (fine for the rest of the run), corresponding to about 40 modules", + "ROD_OUT":"One or more ROD(s) excluded from readout, however less than 5% region in eta-phi plane have masked link errors among more than two layers.", + "EFF_LT99":"Less than 99% efficiency for 1st BC and less than 98% efficiency for all bunches in one or more DQ regions", + "NOTNOMINAL_HV":"SCT neither at 150 V nor at 50 V", + "NOTNOMINAL_THRESHOLD":"SCT threshold not at 1 fC", + "NOTNOMINAL_TIMING":"Unusual timing settings, e.g. timing scan", + "COOLINGLOOP_OUT_1":"Loss of a single cooling loop"} + + veto["all"] = [] # Veto name as defined in the COOL database + veto["COOL"] = {} # Veto name as defined in the COOL database + + signOff["EXPR."] = ["SCT_UNCHECKED"] + signOff["BULK"] = ["SCT_BULK_UNCHECKED"] + signOff["FINAL"] = [] + +################################# TRT defects +# https://twiki.cern.ch/twiki/bin/view/Atlas/TRTDQDefects + if system == "TRT": partitions["color"] = {} partitions["list"] = partitions["color"].keys() @@ -214,18 +329,29 @@ def initialize(system,yearTag,partitions,defects0,defectVeto,veto,signOff,year = defects0["partIntol"] = [] defects0["partTol"] = [] # Global intolerable and tolerable defects - defects0["globIntol"] = ["BADGAS", + defects0["globIntol"] = ["BADCALIBRATION", + "BADSTRAWLIST", + "BADGAS", + "DAQPROBLEMS_OTHER", + "DESYNC", "NODATA_06"] - defects0["globTol"] = [] + defects0["globTol"] = ["BADCALIBRATION_MINOR", + "BADGAS_MINOR", + "BYTESTREAM_BITFLIPS", + "DAQPROBLEMS_OTHER_MINOR", + "NODATA_01", + "NONNOMINAL_HT", + "NONNOMINAL_LT"] # Some defects may not exist in past years. Remove them to avoid crashes # WARNING: this fix does not work with multiple year plot - defectVeto["description"] = {"BADGAS":"Bad gas mixture", # First per partition TRT defects + defectVeto["description"] = {"BADCALIBRATION":"Bad calibration", + "BADSTRAWLIST":"Bad dead stram list", + "BADGAS":"Bad gas mixture", + "DAQPROBLEMS_OTHER":"DAQ problems", + "DESYNC":"Desynchronisation", "NODATA_06":"Large part of TRT off"} - defectVeto["color"]= {"BADGAS":kBlue-4, # First per partition LAr defects - "NODATA_06":kOrange-7,} # Color only for intolerable defects and veto - veto["all"] = [] # Veto name as defined in the COOL database veto["COOL"] = {} # Veto name as defined in the COOL database @@ -244,24 +370,11 @@ def initialize(system,yearTag,partitions,defects0,defectVeto,veto,signOff,year = "Reproc_2017":"LARBadChannelsOflEventVeto-RUN2-UPD4-06", "Tier0_2017":"LARBadChannelsOflEventVeto-RUN2-UPD4-06", "Reproc_2018":"LARBadChannelsOflEventVeto-RUN2-UPD4-08", - "Tier0_2018":"LARBadChannelsOflEventVeto-RUN2-UPD4-09" + "Tier0_2018":"LARBadChannelsOflEventVeto-RUN2-UPD4-10" } - # Tags below are derived from the regular ones. - # They have the same defect/veto tags but have different options/GRL - # The defect/veto tags are derived from the ones defined in the standard tags given before "." - similarTags = {"Tier0_2015.onlDelivNorm":"/Tier0 (onl. deliv. lumi.)", - "Reproc_2016.onlDelivNorm":"/2016 reproc. (onl. deliv. lumi.)", - "Tier0_2016.onlDelivNorm":"/Tier0 (onl. deliv. lumi.)", - "Reproc_2017.onlDelivNorm":"/2017 reproc. (onl. deliv. lumi.)", - "Tier0_2017.onlDelivNorm":"/Tier0 (onl. deliv. lumi.)", - "Reproc_2018.onlDelivNorm":"/2016 reproc. (onl. deliv. lumi.)", - "Tier0_2018.onlDelivNorm":"/Tier0 (onl. deliv. lumi.)"} - for iSimilar in similarTags.keys(): - baseTag = iSimilar.split(".")[0] - yearTag["description"][iSimilar] = similarTags[iSimilar] - yearTag["defect"][iSimilar] = yearTag["defect"][baseTag] - yearTag["veto"][iSimilar] = yearTag["veto"][baseTag] + # Additional similar tags specific to LAr + similarTags["Reproc_2018.roughVeto"]="/2018 Reproc. (rough veto)" partitions["color"] = { 'EMBA':kYellow-9,'EMBC':kYellow,'EMECA':kOrange,'EMECC':kOrange-3,'HECA':kRed-3,'HECC':kRed+2,'FCALA':kBlue-3,'FCALC':kBlue+2} partitions["list"] = partitions["color"].keys() @@ -269,7 +382,7 @@ def initialize(system,yearTag,partitions,defects0,defectVeto,veto,signOff,year = defects0["prefix"] = ["LAR","CALO_ONLINEDB"] # Partition intolerable and tolerable defects - Order determines what defect is proeminent defects0["partIntol"] = ["HVTRIP","SEVNOISEBURST","SEVCOVERAGE","HVNONNOMINAL","SEVNOISYCHANNEL","SEVMISCALIB","SEVUNKNOWN"] # LAR Prefix - LAR_[PART]_[NAME] - defects0["partTol"] = ["NOISEBURST"] + defects0["partTol"] = ["COVERAGE","HVNONNOM_CORRECTED"]#["NOISEBURST"] # Global intolerable and tolerable defects defects0["globIntol"] = ["DATACORRUPT","RECOCORRUPT","SPECIALSTUDIES","BADTIMING", # LAR Prefix - LAR_[NAME] "ONLINEDB_LOWMUCONFIG_IN_HIGHMU_EmergencyMeasures"] # CALO Prefix - CALO_[NAME] @@ -293,10 +406,17 @@ def initialize(system,yearTag,partitions,defects0,defectVeto,veto,signOff,year = "RECOCORRUPT":"corrupted reconstruction", "SPECIALSTUDIES":"Special studies (on purpose)", "BADTIMING":"Bad timing", + "COVERAGE":"coverage (tolerable)", "ONLINEDB_LOWMUCONFIG_IN_HIGHMU_EmergencyMeasures":"trigger misconfiguration", # And the global CALO defects "noiseBurst":"noise burst", # And finally the LAr veto "miniNoiseBurst":"mini noise burst", "corruption":"data corruption"} + + veto["all"] = ["noiseBurst","miniNoiseBurst","corruption"] # Veto name as defined in the COOL database + veto["COOL"] = {"noiseBurst":"allNoise", + "miniNoiseBurst":"MNBNoise", + "corruption":"allCorruption"} # Veto name as defined in the COOL database + defectVeto["color"]= {"HVTRIP":kBlue-4, # First per partition LAr defects "HVNONNOMINAL":kOrange-7, "SEVNOISEBURST":kOrange, @@ -313,50 +433,36 @@ def initialize(system,yearTag,partitions,defects0,defectVeto,veto,signOff,year = "miniNoiseBurst":kMagenta+1, "corruption":kAzure+9} # Color only for intolerable defects and veto - veto["all"] = ["noiseBurst","miniNoiseBurst","corruption"] # Veto name as defined in the COOL database - veto["COOL"] = {"noiseBurst":"allNoise", - "miniNoiseBurst":"MNBNoise", - "corruption":"allCorruption"} # Veto name as defined in the COOL database - signOff["EXPR."] = ["LAR_UNCHECKED"] signOff["BULK"] = ["LAR_BULK_UNCHECKED"] signOff["FINAL"] = ["LAR_UNCHECKED_FINAL"] ################################# Tile defects -# DB tag for the (veto) condition database -# So far, only LAr use event veto -# can be found with the twiki: https://twiki.cern.ch/twiki/bin/viewauth/AtlasComputing/CoolProdTags#Tags_for_RUN_2_Bulk_Data_Process +# https://twiki.cern.ch/twiki/bin/view/Atlas/TileDQLeaderManual#Global_Tile_Defects if system == "Tile": - yearTag["veto"] = {} - - # Tags below are derived from the regular ones. - # They have the same defect/veto tags but have different options/GRL - # The defect/veto tags are derived from the ones defined in the standard tags given before "." - similarTags = {"Tier0_2018.onlDelivNorm":"/Tier0 (onl. deliv. lumi.)"} - for iSimilar in similarTags.keys(): - baseTag = iSimilar.split(".")[0] - yearTag["description"][iSimilar] = similarTags[iSimilar] - yearTag["defect"][iSimilar] = yearTag["defect"][baseTag] - partitions["color"] = { 'EBA':kYellow-9,'EBC':kYellow,'LBA':kOrange,'LBC':kOrange-3} partitions["list"] = partitions["color"].keys() defects0["prefix"] = ["TILE"] # Partition intolerable and tolerable defects - Order determines what defect is proeminent - defects0["partIntol"] = ["DAQ_PRB", # TILE Prefix - TILE_[PART]_[NAME] + defects0["partIntol"] = ["BAD_COVER", + "DAQ_PRB", + "DB_SEVERE", + "TIMING_SEVERE", "UNSPECIFIED_SEVERE"] - defects0["partTol"] = [] + defects0["partTol"] = ["DB_MINOR","TIMING_MINOR","TRIP","UNSPECIFIED_MINOR"] # Global intolerable and tolerable defects - defects0["globIntol"] = [] - defects0["globTol"] = [] + defects0["globIntol"] = ["LOWSTAT"] + defects0["globTol"] = ["TIMEJUMPS_UNDEFINED"] # Some defects may not exist in past years. Remove them to avoid crashes # WARNING: this fix does not work with multiple year plot - defectVeto["description"] = {"DAQ_PRB":"DAQ problem", # First per partition Tile defects - "UNSPECIFIED_SEVERE":"Severe unspecified"} - - defectVeto["color"]= {"DAQ_PRB":kBlue-4, # First per partition LAr defects - "UNSPECIFIED_SEVERE":kOrange-7,} # Color only for intolerable defects and veto + defectVeto["description"] = {"BAD_COVER":"Coverage", + "DAQ_PRB":"DAQ problem", + "DB_SEVERE":"DB issue", + "TIMING_SEVERE":"Timing issue", + "UNSPECIFIED_SEVERE":"Severe unspecified", + "LOWSTAT":"Low stats"} veto["all"] = [] # Veto name as defined in the COOL database veto["COOL"] = {} # Veto name as defined in the COOL database @@ -365,19 +471,195 @@ def initialize(system,yearTag,partitions,defects0,defectVeto,veto,signOff,year = signOff["BULK"] = ["TILE_UNCHECKED"] signOff["FINAL"] = [] -################################# Jet/MET/EGamma/Tau/CaloGlobal defects - if system == "CaloCP": - yearTag["veto"] = {} +#################################### MUON-CSC defects +# https://twiki.cern.ch/twiki/bin/view/Atlas/MuonMCPDefectList + if system == "CSC": + partitions["color"] = {"EA":kYellow-9,'EC':kRed-3} + + partitions["list"] = partitions["color"].keys() + + defects0["prefix"] = ["MS_CSC"] + # Partition intolerable and tolerable defects - Order determines what defect is proeminent + defects0["partIntol"] = ["STANDBY_HV", + "PROBLEM", + "ROD_DISABLED"] + + defects0["partTol"] = ["DISCONNECTED2","LATENCY_MINOR","THRESHOLD"] + # Global intolerable and tolerable defects + defects0["globIntol"] = [] + defects0["globTol"] = [] + + veto["all"] = [] # Veto name as defined in the COOL database + veto["COOL"] = {} # Veto name as defined in the COOL database + + defectVeto["description"] = {"STANDBY_HV":"Standby HV", + "PROBLEM":"Coverage loss > 10%%", + "ROD_DISABLED":">=1 ROD not readout"} + + signOff["EXPR."] = ["MS_UNCHECKED"] + signOff["BULK"] = ["MS_BULK_UNCHECKED"] + signOff["FINAL"] = [] + + +#################################### MUON-MDT defects +# https://twiki.cern.ch/twiki/bin/view/Atlas/MuonMCPDefectList + if system == "MDT": + partitions["color"] = {"EA":kYellow-9,'EC':kRed-3,'BA':kBlue-3,'BC':kOrange-3} + + partitions["list"] = partitions["color"].keys() + + defects0["prefix"] = ["MS_MDT"] + # Partition intolerable and tolerable defects - Order determines what defect is proeminent + defects0["partIntol"] = ["STANDBY_HV", + "PROBLEM", + "ROD_PROBLEM_5orMore"] + + defects0["partTol"] = ["ROD_PROBLEM_1","ROD_PROBLEM_2to4"] + # Global intolerable and tolerable defects + defects0["globIntol"] = [] + defects0["globTol"] = [] + + veto["all"] = [] # Veto name as defined in the COOL database + veto["COOL"] = {} # Veto name as defined in the COOL database + + defectVeto["description"] = {"STANDBY_HV":"Standby HV", + "PROBLEM":"Coverage loss > 10%%", + "ROD_PROBLEM_5orMore":">=5 RODs not readout"} + + signOff["EXPR."] = ["MS_UNCHECKED"] + signOff["BULK"] = ["MS_BULK_UNCHECKED"] + signOff["FINAL"] = [] + + +#################################### MUON-RPC defects +# https://twiki.cern.ch/twiki/bin/view/Atlas/MuonMCPDefectList + if system == "RPC": + partitions["color"] = {'BA':kBlue-3,'BC':kOrange-3} + + partitions["list"] = partitions["color"].keys() + + defects0["prefix"] = ["MS_RPC"] + # Partition intolerable and tolerable defects - Order determines what defect is proeminent + defects0["partIntol"] = ["STANDBY_HV", + "PROBLEM", + "PROBLEM_10to15percent", + "PROBLEM_MoreThan15percent", + "OutOfSync_3orMore", + "LowEfficiency_MoreThan10percent"] + + defects0["partTol"] = ["LowEfficiency_5to10percent","OutOfSync_2","OutOfSync_1","PROBLEM_1","PROBLEM_5to10percent"] + # Global intolerable and tolerable defects + defects0["globIntol"] = [] + defects0["globTol"] = [] + + veto["all"] = [] # Veto name as defined in the COOL database + veto["COOL"] = {} # Veto name as defined in the COOL database + + defectVeto["description"] = {"STANDBY_HV":"Standby HV", + "PROBLEM":"Coverage loss > 10%%", + "PROBLEM_10to15percent":"Coverage loss > 10%%", + "PROBLEM_MoreThan15percent":"Coverage loss > 15%%", + "OutOfSync_3orMore":">3 Out of sync", + "LowEfficiency_MoreThan10percent":"Low efficiency > 10%%"} + + signOff["EXPR."] = ["MS_UNCHECKED"] + signOff["BULK"] = ["MS_BULK_UNCHECKED"] + signOff["FINAL"] = [] + + +#################################### MUON-TGC defects +# https://twiki.cern.ch/twiki/bin/view/Atlas/MuonMCPDefectList + if system == "TGC": + partitions["color"] = {"EA":kYellow-9,'EC':kRed-3} + + partitions["list"] = partitions["color"].keys() + + defects0["prefix"] = ["MS_TGC"] + # Partition intolerable and tolerable defects - Order determines what defect is proeminent + defects0["partIntol"] = ["STANDBY_HV", + "PROBLEM", + "ROD_PROBLEM-2orMore"] + + defects0["partTol"] = ["PROBLEM_1"] + # Global intolerable and tolerable defects + defects0["globIntol"] = [] + defects0["globTol"] = [] + + veto["all"] = [] # Veto name as defined in the COOL database + veto["COOL"] = {} # Veto name as defined in the COOL database + + defectVeto["description"] = {"STANDBY_HV":"Standby HV", + "PROBLEM":"Coverage loss > 10%%", + "ROD_PROBLEM_2orMore":">=2 RODs not readout"} + + signOff["EXPR."] = ["MS_UNCHECKED"] + signOff["BULK"] = ["MS_BULK_UNCHECKED"] + signOff["FINAL"] = [] + + +#################################### MUON CP defects +# https://twiki.cern.ch/twiki/bin/view/Atlas/MuonMCPDefectList + if system == "MuonCP": + defects0["prefix"] = ["MCP"] + # Partition intolerable and tolerable defects - Order determines what defect is proeminent + defects0["partIntol"] = [] + + defects0["partTol"] = [] + # Global intolerable and tolerable defects + defects0["globIntol"] = ["ALIGN_GEO", + "LOW_EFFICIENCY_MAJOR"] + defects0["globTol"] = ["CHI2_PROBLEM", + "ID_PROBLEM", + "LOW_EFFICIENCY_MINOR", + "MS_PROBLEM"] + + veto["all"] = [] # Veto name as defined in the COOL database + veto["COOL"] = {} # Veto name as defined in the COOL database + + defectVeto["description"] = {"ALIGN_GEO":"[MCP] Bad alignment/geometry)", + "LOW_EFFICIENCY_MAJOR":"[MCP] Low reconstruction efficiency" } + + signOff["EXPR."] = ["MS_UNCHECKED"] + signOff["BULK"] = ["MS_BULK_UNCHECKED"] + signOff["FINAL"] = [] + + +#################################### ID defects + if system == "IDGlobal": + partitions["color"] = {} + partitions["list"] = partitions["color"].keys() + + defects0["prefix"] = ["ID"] + # Partition intolerable and tolerable defects - Order determines what defect is proeminent + defects0["partIntol"] = [] + defects0["partTol"] = [] + # Global intolerable and tolerable defects + defects0["globIntol"] = ["NOTRACKS","x_TRACKCOVERAGE_SEVERE","UNKNOWN","BS_RUNAVERAGE","BS_PARAMETERSTEP","BS_NOTNOMINAL"] + defects0["globTol"] = ["ALIGN_DEGRADED","LOWSTAT","x_TRACKCOVERAGE","VERTEXBUG"] + + veto["all"] = [] # Veto name as defined in the COOL database + veto["COOL"] = {} # Veto name as defined in the COOL database - # Tags below are derived from the regular ones. - # They have the same defect/veto tags but have different options/GRL - # The defect/veto tags are derived from the ones defined in the standard tags given before "." - similarTags = {"Tier0_2018.onlDelivNorm":"/Tier0 (onl. deliv. lumi.)"} - for iSimilar in similarTags.keys(): - baseTag = iSimilar.split(".")[0] - yearTag["description"][iSimilar] = similarTags[iSimilar] - yearTag["defect"][iSimilar] = yearTag["defect"][baseTag] + defectVeto["description"] = {"NOTRACKS":"No tracks", + "x_TRACKCOVERAGE_SEVERE":"> 10 %% coverage loss", + "UNKNOWN":"Unknown", + "BS_RUNAVERAGE":"Problematic BS determination", + "BS_PARAMETERSTEP":"Large changes in BS", + "BS_NOTNOMINAL":"Sizable modulation in d0 vs phi", + "ALIGN_DEGRADED":"Degarded alignment", + "LOWSTAT":"Low statistics", + "x_TRACKCOVERAGE":"Significant change in coverage, but not severe (between 5-10% coverage loss)", + "VERTEXBUG":"Problems in the determination of the primary vertex"} + + signOff["EXPR."] = ["ID_UNCHECKED"] + signOff["BULK"] = ["ID_BULK_UNCHECKED"] + signOff["FINAL"] = [] +################################# Jet/MET/EGamma/Tau/CaloGlobal defects +# https://twiki.cern.ch/twiki/bin/view/AtlasProtected/EgammaShifts +# https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/JetEtMissDataQuality2016#Jets_defects +# https://twiki.cern.ch/twiki/bin/view/Atlas/TauDataQualityMonitoringRun2#Frequent_problems_or_defects + if system == "CaloCP": partitions["color"] = { 'BARREL':kYellow-9,'CRACK':kRed-3,'ENDCAP':kBlue-3, # EGamma partitions 'B':kYellow-9,'CR':kRed-3,'E':kBlue-3, # Tau partitions 'CALB':kYellow-9,'CALEA':kRed-3,'CALC':kBlue-3} # CaloGlobal partitions @@ -387,7 +669,7 @@ def initialize(system,yearTag,partitions,defects0,defectVeto,veto,signOff,year = defects0["prefix"] = ["JET","EGAMMA","MET","TAU","CALO_"] # Partition intolerable and tolerable defects - Order determines what defect is proeminent defects0["partIntol"] = ["LARNOISE","ENERGY", # EGAMMA Prefix - EGAMMA_[NAME]_[PART] - "CALO", # TAU Prefix- TAU_[PART]_[NAME] + "CALO","TRK","KIN","ID", # TAU Prefix- TAU_[PART]_[NAME] "TopoClusterNoiseSevere"] # CaloGlobal Prefix - CALO_[PART]_[NAME] defects0["partTol"] = [] @@ -396,7 +678,7 @@ def initialize(system,yearTag,partitions,defects0,defectVeto,veto,signOff,year = "BEAMSPOT",# EGAMMA Prefix - EGAMMA_[NAME] "Ex_largeshift","Ey_largeshift","SumEt_largeshift"] # MET Prefix - MET_[NAME] - defects0["globTol"] = [] + defects0["globTol"] = ["ETAPHI_SPIKES"] defectVeto["description"] = {"NOJETSREGION":"[Jet] cold region", @@ -404,21 +686,15 @@ def initialize(system,yearTag,partitions,defects0,defectVeto,veto,signOff,year = "LARNOISE":"[EGamma] noise in LAr", "ENERGY":"[EGamma] problem in energy", "BEAMSPOT":"[EGamma] problem in beam spot", + "ETAPHI_SPIKES":"[Egamma] eta/phi spikes", "Ex_largeshift":"[MEt] Ex large shift", "Ey_largeshift":"[MEt] EY large shift", "SumEt_largeshift":"[MEt] SumEt large shift", "CALO":"[Tau] calo problem", + "TRK":"[Tau] track problem", + "KIN":"[Tau] kinetic problem", + "ID":"[Tau] identification problem", "TopoClusterNoiseSevere":"[TopoCluster] hot spot"} - defectVeto["color"]= {"NOJETSREGION":kBlue-4, - "SEVERE_HOTSPOT":kOrange-7, - "LARNOISE":kOrange, - "ENERGY":kRed+1, - "BEAMSPOT":kMagenta+2, - "Ex_largeshift":kPink-3, - "Ey_largeshift":kGreen-2, - "SumEt_largeshift":kSpring-6, - "CALO":kYellow+1, - "TopoClusterNoiseSevere":kCyan+1} # Color only for intolerable defects and veto veto["all"] = [] # Veto name as defined in the COOL database veto["COOL"] = {} # Veto name as defined in the COOL database @@ -427,19 +703,9 @@ def initialize(system,yearTag,partitions,defects0,defectVeto,veto,signOff,year = signOff["BULK"] = ['CALO_BULK_UNCHECKED','EGAMMA_BULK_UNCHECKED','JET_BULK_UNCHECKED','MET_BULK_UNCHECKED','TAU_BULK_UNCHECKED'] signOff["FINAL"] = [] -################################# Jet/MET/EGamma/Tau/CaloGlobal defects +################################# BTAG defects +# https://twiki.cern.ch/twiki/bin/view/Atlas/FlavourTaggingDataQualityMonitoringShifterInstructions#Run_signoff if system == "BTag": - yearTag["veto"] = {} - - # Tags below are derived from the regular ones. - # They have the same defect/veto tags but have different options/GRL - # The defect/veto tags are derived from the ones defined in the standard tags given before "." - similarTags = {"Tier0_2018.onlDelivNorm":"/Tier0 (onl. deliv. lumi.)"} - for iSimilar in similarTags.keys(): - baseTag = iSimilar.split(".")[0] - yearTag["description"][iSimilar] = similarTags[iSimilar] - yearTag["defect"][iSimilar] = yearTag["defect"][baseTag] - partitions["color"] = { } # No partition needed partitions["list"] = partitions["color"].keys() @@ -450,18 +716,25 @@ def initialize(system,yearTag,partitions,defects0,defectVeto,veto,signOff,year = defects0["partTol"] = [] # Global intolerable and tolerable defects - defects0["globIntol"] = ["BLAYER_SERIOUS_PROBLEM"] + defects0["globIntol"] = ["BLAYER_SERIOUS_PROBLEM", + "BTAG_SCT_SERIOUS_PROBLEM", + "BTAG_TRT_SERIOUS_PROBLEM", + "BTAG_JET_SEVHOTSPOT" + ] defects0["globTol"] = ["BEAMSPOT_SHIFT", + "BTAG_BLAYER_PROBLEM", + "BTAG_SCT_PROBLEM", + "BTAG_TRT_PROBLEM", "NOJETS"] defectVeto["description"] = {"BLAYER_SERIOUS_PROBLEM":"B layer problem", + "BTAG_SCT_SERIOUS_PROBLEM":"SCT problem", + "BTAG_TRT_SERIOUS_PROBLEM":"TRT problem", + "BTAG_JET_SEVHOTSPOT":"Jet hot spot", "BEAMSPOT_SHIFT":"Beamspot shift", "BTAG_NOJETS":"No jets in monitoring"} - defectVeto["color"]= {"BLAYER_SERIOUS_PROBLEM":kBlue-4, - "BEAMSPOT_SHIFT":kOrange-7, - "BTAG_NOJETS":kOrange} # Color only for intolerable defects and veto veto["all"] = [] # Veto name as defined in the COOL database veto["COOL"] = {} # Veto name as defined in the COOL database @@ -470,7 +743,69 @@ def initialize(system,yearTag,partitions,defects0,defectVeto,veto,signOff,year = signOff["BULK"] = ['BTAG_BULK_UNCHECKED'] signOff["FINAL"] = [] +#################################### TRIG_L1 defects +# https://twiki.cern.ch/twiki/bin/view/Atlas/DataQualityTriggerDefects + if system == "Trig_L1": + partitions["color"] = {} + partitions["list"] = partitions["color"].keys() + defects0["prefix"] = ["TRIG_L1"] + # Partition intolerable and tolerable defects - Order determines what defect is proeminent + defects0["partIntol"] = [] + defects0["partTol"] = [] + # Global intolerable and tolerable defects + defects0["globIntol"] = ["CAL_coverage","CAL_misconf_calib","CAL_misconf_electronics","CAL_misconf_satBCID","CAL_off","MUB_busy","MUB_coverage","MUB_failed_electronics","MUB_lost_sync","MUB_misconf_electronics","MUE_busy","MUE_coverage","MUE_misconf_electronics","MUE_pt15GeV","MUE_pt20GeV","CTP_CTP_MuCTPI_bcid","CTP_CTP_ROD_bcid","CTP_CTPsim","CTP_TAPnoTBP","CTP_TAVnoTAP","CTP_UNKNOWN","CTP_bcid","CTP_bcidrange","CTP_candnumber","CTP_clock","CTP_counter","CTP_lumiblockrange","CTP_lumiblocktime","CTP_multpt","CTP_nanosectime","CTP_prescale_error","CTP_roiCand","CTP_roiNum","CTP_wrong_BGK","CTP_CTPIN_MU","CTP_CTPIN_JET2","TOPO_inputs","TOPO_outputs","TOPO_misconf_calib","TOPO_misconf_electronics","TOPO_off","TOPO_readout"] + defects0["globTol"] = ["CAL_coverage_tolerable","CAL_misconf_calib_tolerable","CAL_misconf_electronics_tolerable","CAL_misconf_satBCID_tolerable","CAL_misconf_tile_drawer","CAL_readout_cpjep_tolerable","CAL_readout_pp_tolerable","CAL_mistimed_larTBB_SEU_tolerable","CTP_NONSTANDARD_CONFIG","MUB_lost_sync_tolerable","MUB_failed_electronics_tolerable","MUB_coverage_tolerable","MUB_misconf_electronics_tolerable","MUB_LOWER_EFFICIENCY_TOLERABLE","MUE_coverage_tolerable","MUE_pt15GeV_tolerable","MUE_pt20GeV_tolerable","MUE_FakeBurst","TOPO_inputs_tolerable","TOPO_outputs_tolerable","TOPO_misconf_calib_tolerable","TOPO_misconf_electronics_tolerable","TOPO_readout_tolerable","TOPO_readout_roib","TOPO_not_good_for_physics"] + + veto["all"] = [] # Veto name as defined in the COOL database + veto["COOL"] = {} # Veto name as defined in the COOL database + + defectVeto["description"] = {"CAL_coverage":"", + "CAL_misconf_calib":"", + "CAL_misconf_electronics":"", + "CAL_misconf_satBCID":"", + "CAL_off":"", + "CAL_mistimed_larTBB_SEU_tolerable":"LAr TBB SEU leading to mistiming", + "MUB_busy":"MUB - busy", + "MUB_coverage":"MUB - coverage", + "MUB_failed_electronics":"MUB - electronics failure", + "MUB_lost_sync":"MUB - lost sync", + "MUB_misconf_electronics":"MUB - electronics misconfig", + "MUE_busy":"MUE - busy", + "MUE_coverage":"MUE - coverage", + "MUE_misconf_electronics":"MUB - electronics misconfig", + "MUE_pt15GeV":"MUE - PT15GeV", + "MUE_pt20GeV":"MUE - PT20GeV"} + + signOff["EXPR."] = ["TRIG_L1_CAL_UNCHECKED","TRIG_L1_CTP_UNCHECKED","TRIG_L1_MUB_UNCHECKED","TRIG_L1_MUE_UNCHECKED","TRIG_L1_TOPO_UNCHECKED"] + signOff["BULK"] = [] + signOff["FINAL"] = [] + + +#################################### Trig_HLT defects + if system == "Trig_HLT": + partitions["color"] = {} + partitions["list"] = partitions["color"].keys() + + defects0["prefix"] = ["TRIG_HLT"] + # Partition intolerable and tolerable defects - Order determines what defect is proeminent + defects0["partIntol"] = [] + defects0["partTol"] = [] + # Global intolerable and tolerable defects + defects0["globIntol"] = ["BJT_beam_spot_flag","BJT_no_secvtx","BJT_no_tracking","BJT_INACCURATE_ONLINE_BEAMSPOT","BJT_ONLINE_BEAMSPOT_GT1p6MM","BJT_ONLINE_BEAMSPOT_GT2MM","BJT_NO_MULTIBJET","BPH_no_muon","BPH_no_tracking","CAL_LAR_SourceMajor","CAL_TILE_SourceMajor","CAL_missing_data","ELE_no_clustering","ELE_no_tracking","ELE_primary_chain_misconfigured","ELE_unknown","ELE_tracking_issue","GAM_no_clustering","GAM_partial_clustering","GAM_primary_chain_misconfigured","GAM_unknown","GENERAL_debugstream","GENERAL_no_primaries","GENERAL_prescale_problem","GENERAL_standby","GENERAL_xpu_misconf","IDT_EF_FAIL","IDT_IDS_FAIL","IDT_SIT_FAIL","IDT_PRIVX_INEFF","JET_algo_problem","JET_menu_misconf","JET_unknown","MBI_no_tracking","MET_missing_data","MUO_Upstream_Barrel_problem","MUO_Upstream_Endcap_problem","TAU_misconf","TAU_caloIssue","TAU_nocalo","TAU_no_tracking","TRG_HLT_TAU_tracking_issue","TAU_dbIssue_BeamSpot"] + defects0["globTol"] = ["BJT_partial_tracking","BJT_unknown","BPH_algcrash","BPH_misconf","BPH_partial_muon","BPH_partial_tracking","BPH_unknown","CAL_LAR_SourceMinor","CAL_ROI_EXCESS","CAL_TILE_SourceMinor","CAL_partial_missing_data","CAL_spike","CAL_incorrect_BCID_correction","CAL_unknown","ELE_chain_misconfigured","ELE_clustering_issue","ELE_lowEfficiency_all_electrons","ELE_non_primary_poor_performance_e15_HLTtighter","ELE_non_primary_poor_performance_e15_tight","ELE_nonprimary_misconfigured","ELE_partial_clustering","ELE_partial_tracking","ELE_primary_poor_performance_e20_medium1","ELE_primary_poor_performance_e22_medium1","ELE_tracking_issue_Tolerable","GAM_chain_misconfigured","GAM_clustering_issue","GAM_nonprimary_misconfigured","GENERAL_streaming","GENERAL_tolerableDebugstream","GENERAL_no_1e34_primaries","GENERAL_no_12e33_primaries","GENERAL_no_15e33_primaries","GENERAL_no_17e33_primaries","IDT_BSPOT_FAILUR","IDT_BSPOT_INVALID_STATUS","IDT_BSPOT_INVALIDATOR_PROBLEM","IDT_EFT_FAIL","IDT_LOWSTAT","IDT_SCT_OUTOFTIMEHITS","IDT_TRT_DATA_LOST","IDT_TRT_OUTOFTIMEHITS","IDT_TSF_FAIL","IDT_unknown","JET_calib_issue","JET_energy_excess","JET_GSC_BEAMSPOT_PROBLEM","JET_hotspot","JET_partialscan_issue","MBI_HI_time_shift_mbts","MBI_partial_tracking","MBI_unknown","MBI_spacepoint_noise","MET_XS_Triggers_OFF","MET_missingEt_spike","MET_partial_missing_data","MET_phi_spike","MET_sumEt_spike","MET_unknown","MUO_EFMSonly_problem","MUO_Fullscan_problem","MUO_L2Iso_problem","MUO_L2muonSA_problem","MUO_MSonly_Barrel_problem","MUO_MSonly_Endcapl_problem","MUO_MuComb_problem","MUO_MuGirl_problem","MUO_Multi_Muon_problemchains","MUO_MuonEFTrackIso_problem","MUO_MuonEF_problem","MUO_Slow_problem","MUO_unknown","MUO_chain_misconfigured","TAU_unknown","TAU_dbIssue_mu","TAU_tracking_issue_Tolerable"] + + veto["all"] = [] # Veto name as defined in the COOL database + veto["COOL"] = {} # Veto name as defined in the COOL database + + defectVeto["description"] = {"":""} + + signOff["EXPR."] = ["TRIG_HLT_BJT_UNCHECKED","TRIG_HLT_BPH_UNCHECKED","TRIG_HLT_CAL_UNCHECKED","TRIG_HLT_ELE_UNCHECKED","TRIG_HLT_GAM_UNCHECKED","TRIG_HLT_IDT_UNCHECKED","TRIG_HLT_JET_UNCHECKED","TRIG_HLT_MBI_UNCHECKED","TRIG_HLT_MET_UNCHECKED","TRIG_HLT_MUO_UNCHECKED","TRIG_HLT_TAU_UNCHECKED"] + signOff["BULK"] = [] + signOff["FINAL"] = [] + + +######################################################################################### ################ Definitions common to all systems defects0["part"] = defects0["partIntol"] + defects0["partTol"] defects0["glob"] = defects0["globIntol"] + defects0["globTol"] @@ -486,4 +821,29 @@ def initialize(system,yearTag,partitions,defects0,defectVeto,veto,signOff,year = defects0["globIntol_recov"].append("%s__recov"%idef) defects0["intol_recov"] = defects0["partIntol_recov"] + defects0["globIntol_recov"] +# If the description is not available, define it with the defect name + for iDef in defects0["intol"]+defects0["tol"]: + if iDef not in defectVeto["description"].keys(): + defectVeto["description"][iDef] = iDef + +# Define color if not yet done + if not (defectVeto.has_key("color")): + colors = [kBlue-4,kOrange-7,kTeal+1,kRed+1,kMagenta+2,kPink-3,kYellow+1,kGreen-2,kSpring-6,kViolet-4,kAzure-8,kCyan+1, + kBlue-2,kOrange+1,kTeal+7,kRed+3,kMagenta-2,kPink+1,kYellow-1,kGreen+4,kSpring-2,kViolet+1,kAzure-2,kCyan-5, + kBlue+2,kOrange+5,kTeal-4,kRed-5,kMagenta-6,kPink+6,kYellow-5,kGreen-6,kSpring+4,kViolet+6,kAzure+4,kCyan+4,] + defectVeto["color"] = {} + for iColor,iDefectVeto in enumerate(defectVeto["description"].keys()): + if (iColor<len(colors)): + defectVeto["color"][iDefectVeto] = colors[iColor] + else: + defectVeto["color"][iDefectVeto] = kBlack + +# Similar tags + for iSimilar in similarTags.keys(): + baseTag = iSimilar.split(".")[0] + yearTag["description"][iSimilar] = similarTags[iSimilar] + yearTag["defect"][iSimilar] = yearTag["defect"][baseTag] + if (yearTag["veto"].has_key(baseTag)): + yearTag["veto"][iSimilar] = yearTag["veto"][baseTag] + return True diff --git a/DataQuality/DataQualityUtils/scripts/DeMoScan.py b/DataQuality/DataQualityUtils/scripts/DeMoScan.py index 7815cef95914..ed40dabc3608 100644 --- a/DataQuality/DataQualityUtils/scripts/DeMoScan.py +++ b/DataQuality/DataQualityUtils/scripts/DeMoScan.py @@ -18,6 +18,7 @@ from ROOT import gStyle,gROOT,gPad sys.path.append("/afs/cern.ch/user/l/larmon/public/prod/Misc") +from LArMonCoolLib import GetReadyFlag from DeMoLib import strLumi, initialize from gb import MakeTH1,SetXLabel,MakeLegend @@ -36,13 +37,13 @@ from argparse import RawTextHelpFormatter,ArgumentParser from DQDefects import DefectsDB parser = ArgumentParser(description='',formatter_class=RawTextHelpFormatter) -parser.add_argument('-r','--run',type=int,dest='parser_run',help='Run or run range (relevant only for lossPerRun)',nargs='*',action='store') parser.add_argument('-y','--year',dest='parser_year',default = ["2018"],nargs='*',help='Year [Default: 2018]',action='store') parser.add_argument('-t','--tag',dest='parser_tag',default = ["Tier0_2018"],nargs='*',help='Defect tag [Default: "Tier0_2018"]',action='store') -parser.add_argument('-v','--veto',type=str,dest='parser_veto',default="",help='Veto to consider (if not specified: all)',action='store') parser.add_argument('-s','--system',dest='parser_system',default="LAr",help='System: LAr, CaloCP [Default: "LAr"]',action='store') parser.add_argument('-d','--directory',dest='parser_directory',default=".",help='Directory to display',action='store') +parser.add_argument('--run',type=int,dest='parser_run',help='Run or run range (relevant only for lossPerRun)',nargs='*',action='store') parser.add_argument('--defect',type=str,dest='parser_defect',default="",help='Defect to consider (if not specified: all)',action='store') +parser.add_argument('--veto',type=str,dest='parser_veto',default="",help='Veto to consider (if not specified: all)',action='store') parser.add_argument('--noRecovPlot',dest='parser_noRecovPlot',help='Do not plot the recoverable histograms',action='store_false') parser.add_argument('--lossPerRun',dest='parser_plotLPR',help='Plot the loss run and per type',action='store_true') parser.add_argument('--diffTwoTags',dest='parser_diff2tags',help='Compare run by run the data losses for two tags (same year necessary)',action='store_true') @@ -80,13 +81,16 @@ for iYear in args.parser_year: yearTagDir[yearTag] = directory yearTagTag[yearTag] = iTag # Used only to retrieve comments - RunListDat = "RunList/grl-%s.dat"%(iYear) + RunListDat = "%s/RunList/grl-%s.dat"%(args.parser_directory,iYear) if os.path.exists(RunListDat): fRunList = open(RunListDat,'r') runGRL[yearTag] = [] for iRun in fRunList.readlines(): runGRL[yearTag].append(int(iRun)) # used only to determine if a run belongs to GRL in recap defects - Data in loss*.txt file NOT reliable fRunList.close() + else: + print "No GRL list found... Please create it" + sys.exit() if len(args.parser_year) == 1: singleYear = True @@ -106,7 +110,7 @@ options = {} options['defect'] = [args.parser_defect] options['veto'] = [args.parser_veto] if options['defect'] == [""] and options['veto'] == [""]: - options['defect'] = grlDef["intol"] + options['defect'] = grlDef["intol"]+grlDef["tol"] options['veto'] = veto["all"] else: if options['defect'][0] not in grlDef["intol"] and options['veto'][0] not in veto["all"]: @@ -119,6 +123,17 @@ else: if options['veto'] == [""]: options['veto'] = [] +defVetoType = {} +for iDefVeto in options['defect']+options['veto']: + if iDefVeto in options['defect']: + if (iDefVeto in grlDef["intol"]): + defVetoType[iDefVeto] = "Intolerable defect" + else: + defVetoType[iDefVeto] = "Tolerable defect" + else: + defVetoType[iDefVeto] = "Veto" + + options['recovPlot'] = args.parser_noRecovPlot options['plotLossPerRun'] = args.parser_plotLPR options['plotDiff2tags'] = args.parser_diff2tags @@ -152,9 +167,21 @@ if options['prepareReproc']: if options['retrieveComments']: defRecap = {} + defRecapHtml = {} for iDef in options['defect']: defRecap[iDef] = "\n\n===== Recap for %s================================================================================================================================\n"%(iDef.ljust(15)) - defRecap[iDef] +=" Run| Tot lumi|GRL|Lost lumi|Recov. L.| LB range | Author | " + defRecap[iDef] += "Description: %s - %s\n"%(defectVeto["description"][iDef],defVetoType[iDefVeto]) + if (defVetoType[iDef] == "Intolerable defect"): + defRecap[iDef] +=" Run| Tot lumi|GRL|Lost lumi|Recov. L.| LB range | Author | " + else: + defRecap[iDef] +=" Run| Tot lumi|GRL|Aff. lumi|Recov. L.| LB range | Author | " + + defRecapHtml[iDef] ='<tr class="out0" id="%s"> <th colspan="8"> %s - LUMILOSTTOBEREPLACED affected </th></tr>'%(iDef,iDef) + defRecapHtml[iDef] +='<tr class="out0"> <th colspan="8"> Description: %s - %s</th></tr>'%(defectVeto["description"][iDef],defVetoType[iDef]) + if (defVetoType[iDef] == "Intolerable defect"): + defRecapHtml[iDef] +='<tr class="out0"> <th> Run </th><th> Tot lumi </th><th> GRL </th><th> Lost lumi </th><th> Recov. L. </th><th> LB range </th><th> Author </th><th> Comment </th></tr> ' + else: + defRecapHtml[iDef] +='<tr class="out0"> <th> Run </th><th> Tot lumi </th><th> GRL </th><th> Aff. lumi </th><th> Recov. L. </th><th> LB range </th><th> Author </th><th> Comment </th></tr> ' if options['prepareReproc']: defReproc = {} @@ -183,6 +210,8 @@ loss_rLPR = {} h1_lossLPR = {} h1_loss_rLPR = {} +atlasReady = {} + for iYT in yearTagList: print "I am treating the following year/tag:%s"%iYT @@ -190,75 +219,83 @@ for iYT in yearTagList: legendResults[iYT] = {} stackResults[iYT] = {} - yearStatsArchiveFilename = '%s/TProfiles.root'%(yearTagDir[iYT]) - if not (os.path.exists(yearStatsArchiveFilename)): - print "No %s found - > Skipping"%yearStatsArchiveFilename - continue + # Open the Archive filename to compare the luminosity of each period + if options['plotDiff2tags']: + yearStatsArchiveFilename = '%s/TProfiles.root'%(yearTagDir[iYT]) + if not (os.path.exists(yearStatsArchiveFilename)): + print "No %s found - > Skipping"%yearStatsArchiveFilename + continue + + file[iYT] = TFile(yearStatsArchiveFilename) + h1Period_IntLuminosity[iYT] = file[iYT].Get("h1Period_IntLuminosity_archive") + subperiodNb[iYT] = h1Period_IntLuminosity[iYT].GetNbinsX() - file[iYT] = TFile(yearStatsArchiveFilename) - h1Period_IntLuminosity[iYT] = file[iYT].Get("h1Period_IntLuminosity_archive") - subperiodNb[iYT] = h1Period_IntLuminosity[iYT].GetNbinsX() - if options['plotLossPerRun'] or options['plotDiff2tags']: runsLPR[iYT] = {} lossLPR[iYT] = {} loss_rLPR[iYT] = {} h1_lossLPR[iYT] = {} h1_loss_rLPR[iYT] = {} - boolDefect = {} # Loop on defect+veto (all or single ones) - for iDefVeto in options['defect']+options['veto']: - if iDefVeto in options['defect']: - boolDefect[iDefVeto] = True - else: - boolDefect[iDefVeto] = False - + for iDefVeto in options['defect']+options['veto']: + # Define the file name containing the loss per run for this defect - if boolDefect[iDefVeto]: + if "defect" in defVetoType[iDefVeto]: lossFileName = "%s/loss-%s.dat"%(yearTagDir[iYT],iDefVeto) xAxisTitle = "#splitline{Luminosity loss due to}{%s [pb^{-1}]}"%(defectVeto["description"][iDefVeto]) - color = defectVeto["color"][iDefVeto] + if defVetoType[iDefVeto] == "Intolerable defect": + color = defectVeto["color"][iDefVeto] + else: + color = kTeal else: lossFileName = "%s/loss-%sVETO.dat"%(yearTagDir[iYT],iDefVeto) xAxisTitle = "Luminosity loss due to %s[Veto] [pb^{-1}]"%(defectVeto["description"][iDefVeto]) color = defectVeto["color"][iDefVeto] - + # Check if a dat loss file is associated to this veto/defect if os.path.exists(lossFileName): + print "I am reading the %s file"%lossFileName runsLPR[iYT][iDefVeto] = [] lossLPR[iYT][iDefVeto] = [] loss_rLPR[iYT][iDefVeto] = [] f2 = open(lossFileName,'r') tmpLines = f2.readlines() tmpLines.sort() - for iline in tmpLines: - if boolDefect[iDefVeto]: + for iline in tmpLines: # Loop on all lines of the loss-[defect/veto].dat files + if defVetoType[iDefVeto] == "Intolerable defect": read = match("(\d+) \((\d+) ub-1.*\) -> (\d+.\d+) pb-1 \D+(\d+.\d+)\D+",iline) - else:# Veto loss is never recoverable + else:# Veto loss is never recoverable (not tolerable defects) read = match("(\d+) \((\d+) ub-1.*\) -> (\d+.\d+) pb-1",iline) - # retrieve the run number and lost luminosity + # retrieve the run number runnumber = int(read.group(1)) - luminosity = int(read.group(2)) # If the runs filter is activated (i.e. runsFilter != 0), check if the runs must be filtered if (len(runsFilter) != 0 and runnumber not in runsFilter): continue + # retrieve the total luminosity and the lost luminosity + luminosity = int(read.group(2)) lostLumi = float(read.group(3)) - # If defect, look for potential recovaerable lumi - if boolDefect[iDefVeto]: + # If defect, look for potential recoverable luminosity + if defVetoType[iDefVeto] == "Intolerable defect": recovLumi = float(read.group(4)) else: # Veto loss is never recoverable recovLumi = 0. + if runnumber not in atlasReady.keys(): + atlasready_tmp=GetReadyFlag(runnumber) + atlasReady[runnumber] = [] + for lb in atlasready_tmp.keys(): + if atlasready_tmp[lb]>0: atlasReady[runnumber] += [lb] + # if the loss is above the required minimum (0 by default), store it if (runnumber>options['runMinLossPerRun'] and runnumber<=options['runMaxLossPerRun'] and lostLumi > options['minLumiYearStatsDefect']): runsLPR[iYT][iDefVeto].append(runnumber) lossLPR[iYT][iDefVeto].append(lostLumi) loss_rLPR[iYT][iDefVeto].append(recovLumi) - if options['retrieveComments'] and boolDefect[iDefVeto]: # retrieve comments for defects + if options['retrieveComments'] and "defect" in defVetoType[iDefVeto]: # retrieve comments for defects print "@%d"%(runnumber) db = DefectsDB(tag=yearTagProperties["defect"][yearTagTag[iYT]]) system_defects = [] for iPrefix in grlDef["prefix"]: - system_defects += [d for d in (db.defect_names | db.virtual_defect_names) if (d.startswith(iPrefix))] + system_defects += [d for d in (db.defect_names | db.virtual_defect_names) if (d.startswith(iPrefix) and iDefVeto in d)] #lar_defects = [d for d in (db.defect_names | db.virtual_defect_names) if ((d.startswith("LAR") or d.startswith("CALO_ONLINEDB")) and iDefVeto in d)] defects = db.retrieve((runnumber, 1), (runnumber+1, 0), system_defects) defectCompact = {} @@ -266,19 +303,32 @@ for iYT in yearTagList: if ("SEVNOISEBURST" in defect.channel and ("HEC" in defect.channel or "FCAL" in defect.channel)): # Skip the HEC/FCAL SEVNOISEBURST defect as they also appear in EMEC continue for iDef in options['defect']: - if (iDef in defect.channel): - if defect.since.lumi == defect.until.lumi-1: - lbRange = "%10d"%(defect.since.lumi) - lbRangeReproc = defect.since.lumi + if (iDef in defect.channel): # NB : some problem may arise from this incomplete test (if similar name for 2 defects) but there is a protection later when recaping + defectSinceLumiAtlasReady = -1 + defectUntilLumiAtlasReady = -1 + for iLumiBlock in range(defect.since.lumi,defect.until.lumi): + if iLumiBlock in atlasReady[runnumber]: + defectUntilLumiAtlasReady = iLumiBlock+1 + if defectSinceLumiAtlasReady == -1: + defectSinceLumiAtlasReady = iLumiBlock + print defectSinceLumiAtlasReady,defectUntilLumiAtlasReady + if defectSinceLumiAtlasReady == -1: # Whole defect was outside ATLAS ready - Skip it + continue + + if defectSinceLumiAtlasReady == defectUntilLumiAtlasReady-1: + lbRange = "%10d"%(defectSinceLumiAtlasReady) + lbRangeReproc = defectSinceLumiAtlasReady else: - lbRange = "%4d->%4d"%(defect.since.lumi,defect.until.lumi-1) - lbRangeReproc = "%d-%d"%(defect.since.lumi,defect.until.lumi-1) + lbRange = "%4d->%4d"%(defectSinceLumiAtlasReady,defectUntilLumiAtlasReady-1) + lbRangeReproc = "%d-%d"%(defectSinceLumiAtlasReady,defectUntilLumiAtlasReady-1) if ("\n %d |"%runnumber not in defRecap[iDef]): defRecap[iDef] += "\n %d |%s|%3d|%s|%s|%s |%s| %s"%(runnumber,strLumi(luminosity,"ub",False).rjust(9),(runnumber in runGRL[iYT]),(strLumi(lostLumi,"pb",False)).rjust(9),(strLumi(recovLumi,"pb",False)).rjust(9),lbRange,defect.user.rjust(12),defect.comment) + defRecapHtml[iDef] += '<tr class="out1"><th> %d </th> <th> %s </th><th> %3d </th><th> %s </th><th> %s </th><th> %s </th><th> %s </th><th> %s </th><tr>'%(runnumber,strLumi(luminosity,"ub",False).rjust(9),(runnumber in runGRL[iYT]),(strLumi(lostLumi,"pb",False)).rjust(9),(strLumi(recovLumi,"pb",False)).rjust(9),lbRange,defect.user.rjust(12),defect.comment) if (options['prepareReproc'] and recovLumi>0.): defReproc[iDef] += "\n@%d"%runnumber else: defRecap[iDef] += "\n -----------------------------------------|%s |%s| %s"%(lbRange,defect.user.rjust(12),defect.comment) + defRecapHtml[iDef] += '<tr class="out1"><th colspan="5"><th> %s </th><th> %s </th><th> %s </th><tr>'%(lbRange,defect.user.rjust(12),defect.comment) for iPart in ["EMBA","EMBC","EMECA","EMECC","HECA","HECC","FCALA","FCALC"]: if iPart in defect.channel and "SEVNOISEBURST" not in defect.channel: # Add the affected partition (except for SEVNOISEBURST, where the comment should contain it) defRecap[iDef] += " - %s"%iPart @@ -303,13 +353,13 @@ for iYT in yearTagList: else: h1_lossLPR[iYT][iDefVeto].GetXaxis().SetBinLabel(iX,"%d"%runsLPR[iYT][iDefVeto][iX-1]) - if boolDefect[iDefVeto]: # recoverable loss for defect + if defVetoType[iDefVeto] == "Intolerable defect": # recoverable loss for defect h1_loss_rLPR[iYT][iDefVeto] = MakeTH1("h1_loss_rLPR_%s_%s"%(iYT,iDefVeto),"Run Number",xAxisTitle,-0.5,-0.5+len(runsLPR[iYT][iDefVeto]),len(runsLPR[iYT][iDefVeto]),kTeal-7) # Fill the new histogram(s) for irun in range(len(runsLPR[iYT][iDefVeto])): h1_lossLPR[iYT][iDefVeto].Fill(irun,lossLPR[iYT][iDefVeto][irun]) - if boolDefect[iDefVeto]: + if defVetoType[iDefVeto] == "Intolerable defect": h1_loss_rLPR[iYT][iDefVeto].Fill(irun,loss_rLPR[iYT][iDefVeto][irun]) # Display the new histograms @@ -319,18 +369,21 @@ for iYT in yearTagList: h1_lossLPR[iYT][iDefVeto].SetTitle("") h1_lossLPR[iYT][iDefVeto].SetMinimum(0.) h1_lossLPR[iYT][iDefVeto].Draw("HIST") - if (options['recovPlot'] and boolDefect[iDefVeto]): + if (options['recovPlot'] and defVetoType[iDefVeto] == "Intolerable defect"): h1_lossLPR[iYT][iDefVeto].Draw("HIST SAME") legendResults[iYT][index] = MakeLegend(0.855,0.75,0.95,0.95) legendResults[iYT][index].SetHeader("%s"%iYT) legendResults[iYT][index].AddEntry(h1_lossLPR[iYT][iDefVeto],"Total:%s"%(strLumi(h1_lossLPR[iYT][iDefVeto].Integral(),"pb^{-1}")),"f") - if (options['recovPlot'] and boolDefect[iDefVeto]): + if (options['recovPlot'] and defVetoType[iDefVeto] == "Intolerable defect"): legendResults[iYT][index].AddEntry(h1_lossLPR[iYT][iDefVeto],"Recov:%s"%(strLumi(h1_loss_rLPR[iYT][iDefVeto].Integral(),"pb^{-1}")),"f") legendResults[iYT][index].Draw() # Enf of comment recap if options['plotLossPerRun'] and options['retrieveComments']: - f = open("YearStats-%s/%s/%s/recapDefects.txt"%(args.parser_system,args.parser_year[0],args.parser_tag[0]),'w') + f = open("%s/YearStats-%s/%s/%s/recapDefects.txt"%(args.parser_directory,args.parser_system,args.parser_year[0],args.parser_tag[0]),'w') + fHtml = open("%s/YearStats-%s/%s/%s/recapDefects.html"%(args.parser_directory,args.parser_system,args.parser_year[0],args.parser_tag[0]),'w') + fHtml.write('<table class="report">') + fHtml.write('<tr class="out0"> <th width="60pix"></th><th width="90pix"></th><th width="45pix"></th><th width="90pix"></th><th width="90pix"></th><th width="90pix"></th><th width="90pix"></th><th></th></tr>') if options['savePage1']: fPage1 = open("../LArPage1/DeMoPlots/recapDefects.txt",'w') fPage1.write("This list contains all defect in LAr calorimeter, including all for runs not used in GRL\n") @@ -339,17 +392,29 @@ if options['plotLossPerRun'] and options['retrieveComments']: if options['prepareReproc']: fReproc = open("YearStats-%s/%s/%s/defectsForReproc.txt"%(args.parser_system,args.parser_year[0],args.parser_tag[0]),'w') + defTocHtml = '<div style="text-align:left" class="rectangle">' + for iDef in options['defect']: + if (iDef in h1_lossLPR[iYT].keys()): # This protection is needed as defRecap may have duplication in some rare cases. See Muon system with "MDT_ROD_PROBLEM_1" and "RPC_PROBLEM_1" + if ("b-1" in defRecap[iDef]):# At least one data loss in the whole YearStats for this defect + defTocHtml += "Direct link to <a href='#%s' target='_self'> %s </a> (%s - %s affected) <br>"%(iDef,iDef,defVetoType[iDef],strLumi(h1_lossLPR[iYT][iDef].Integral(),"pb^{-1}")) + defTocHtml += '</div>' + + fHtml.write(defTocHtml) for iDef in options['defect']: - if ("-1" in defRecap[iDef]):# At least one data loss in the whole YearStats for this defect - print defRecap[iDef] - f.write(defRecap[iDef]) - if options['savePage1']: - fPage1.write(defRecap[iDef]) - fPage1.write("\nTotal loss: %s (recov:%s)"%(strLumi(h1_lossLPR[iYT][iDef].Integral(),"pb^{-1}"),strLumi(h1_loss_rLPR[iYT][iDef].Integral(),"pb^{-1}"))) - if options['prepareReproc']: - fReproc.write(defReproc[iDef]) + if (iDef in h1_lossLPR[iYT].keys()): # This protection is needed as defRecap may have duplication in some rare cases. See Muon system with "MDT_ROD_PROBLEM_1" and "RPC_PROBLEM_1" + if ("b-1" in defRecap[iDef]):# At least one data loss in the whole YearStats for this defect + print defRecap[iDef] + f.write(defRecap[iDef]) + fHtml.write("%s</tr>"%defRecapHtml[iDef].replace("LUMILOSTTOBEREPLACED",strLumi(h1_lossLPR[iYT][iDef].Integral(),"pb^{-1}"))) + if options['savePage1']: + fPage1.write(defRecap[iDef]) + fPage1.write("\nTotal loss: %s (recov:%s)"%(strLumi(h1_lossLPR[iYT][iDef].Integral(),"pb^{-1}"),strLumi(h1_loss_rLPR[iYT][iDef].Integral(),"pb^{-1}"))) + if options['prepareReproc']: + fReproc.write(defReproc[iDef]) f.close() + fHtml.write('</table>') + fHtml.close() if options['savePage1']: fPage1.close() if options['prepareReproc']: @@ -382,7 +447,7 @@ if (len(yearTagList) == 2 and options['plotDiff2tags'] and singleYear): for iSuffix in suffixList: lumi_diff2tags["%s_%s"%(iDefVeto,iSuffix)] = {} - if boolDefect[iDefVeto]: + if "defect" in defVetoType[iDefVeto]: defOrVeto = "defect" else: defOrVeto = "veto" @@ -437,7 +502,7 @@ if (len(yearTagList) == 2 and options['plotDiff2tags'] and singleYear): maxAbsLumiDiff["%s_%s"%(iDefOrVeto,iSuffix)] = 0. for iDefVeto in options['defect']+options['veto']: - if boolDefect[iDefVeto]: + if "defect" in defVetoType[iDefVeto]: defOrVeto = "defect" color = defectVeto["color"][iDefVeto] else: diff --git a/DataQuality/DataQualityUtils/scripts/DeMoStatus.py b/DataQuality/DataQualityUtils/scripts/DeMoStatus.py index 3cd9671c0ff8..b60b2a756e32 100644 --- a/DataQuality/DataQualityUtils/scripts/DeMoStatus.py +++ b/DataQuality/DataQualityUtils/scripts/DeMoStatus.py @@ -71,12 +71,12 @@ parser = ArgumentParser(description='',formatter_class=RawTextHelpFormatter) parser.add_argument('-y','--year',dest='parser_year',default = ["2018"],nargs='*',help='Year [Default: 2018]',action='store') parser.add_argument('-t','--tag',dest='parser_tag',default = ["Tier0_2018"],nargs='*',help='Defect tag [Default: "Tier0_2018"]',action='store') parser.add_argument('-s','--system',dest='parser_system',default="LAr",help='System: LAr, CaloCP [Default: "LAr"]',action='store') -parser.add_argument('-d','--directory',dest='parser_directory',default="/afs/cern.ch/user/l/larmon/public/prod/LADIeS",help='Directory to display',action='store') +parser.add_argument('-d','--directory',dest='parser_directory',default="./",help='Directory to display',action='store') parser.add_argument('--yearStats',dest='parser_plotYS',help='Plot the year stats per period',action='store_true') parser.add_argument('--yearStatsLarge',dest='parser_letterYS',help='Plot the year stats as a function of the letter (large) periods',action='store_true') parser.add_argument('--lumiNotPercent',dest='parser_lumiNotPercent',help='Display results in term of lumi and not percent',action='store_true') parser.add_argument('--noRecovPlot',dest='parser_noRecovPlot',help='Do not plot the recoverable histograms',action='store_false') -parser.add_argument('--savePage1',dest='parser_savePage1',help='Save yearStats results in ~larmon/public/prod/LADIeS/DeMoPlots',action='store_true') +parser.add_argument('--savePlots',dest='parser_savePlots',help='Save yearStats results in ~larmon/public/prod/LADIeS/DeMoPlots',action='store_true') parser.add_argument('--approvedPlots',dest='parser_approvedPlots',help='Cosmetics to get the approved plots',action='store_true') args = parser.parse_args() @@ -113,10 +113,10 @@ options['plotYearStats'] = args.parser_plotYS options['plotYearStatsLarge'] = args.parser_letterYS # Plot results as a function of letter period (A,B,C...) and not only as a function of subperiod (A1,A2,B1,B2,B3...) options['lumiNotPercent'] = args.parser_lumiNotPercent options['recovPlot'] = args.parser_noRecovPlot -options['savePage1'] = args.parser_savePage1 +options['savePlots'] = args.parser_savePlots options['approvedPlots'] = args.parser_approvedPlots -if options['savePage1']: +if options['savePlots']: options['plotYearStats'] = True options['plotYearStatsLarge'] = False options['lumiNotPercent'] = False @@ -127,7 +127,7 @@ if options['approvedPlots']: options['lumiNotPercent'] = False options['recovPlot'] = False -if not (options['plotYearStats'] or options['plotYearStatsLarge'] or options['savePage1']): +if not (options['plotYearStats'] or options['plotYearStatsLarge'] or options['savePlots']): options['plotYearStats'] = True gStyle.SetOptStat(0) @@ -265,21 +265,20 @@ for iYT in yearTagList: canvasResults[iYT]['intLumi'].SetGridy(1) # On request, save the plot in LArPage1/DeMoPlots to be displayed in Page1 - if options["savePage1"]: - print "I am updating the LArPage1 statistics..." + if options["savePlots"]: for iCanvas in canvasResults[iYT].keys(): canvasResults[iYT][iCanvas].Update() if ("defects" in iCanvas): - canvasResults[iYT][iCanvas].Print("../LArPage1/DeMoPlots/defects.png") + canvasResults[iYT][iCanvas].Print("%s/grl-defects.png"%yearTagDir[yearTag]) if ("veto" in iCanvas): - canvasResults[iYT][iCanvas].Print("../LArPage1/DeMoPlots/veto.png") + canvasResults[iYT][iCanvas].Print("%s/grl-veto.png"%yearTagDir[yearTag]) if ("intLumi" in iCanvas): - canvasResults[iYT][iCanvas].Print("../LArPage1/DeMoPlots/lumi.png") - f0 = open("../LArPage1/DeMoPlots/ineff.dat",'w') - f0.write("%.3f %.3f %s\n"%(totalIneffDef,totalIneffVeto,strLumi(h1Period_IntLuminosity[iYT].GetBinContent(subperiodNb[iYT]),"pb"))) - f0.write(strftime("%d %b-%H:%M",localtime())) - f0.close() - os.system("cp %s/runs-ALL.dat ../LArPage1/DeMoPlots/"%(directory)) + canvasResults[iYT][iCanvas].Print("%s/grl-lumi.png"%yearTagDir[yearTag]) +# f0 = open("../LArPage1/DeMoPlots/ineff.dat",'w') +# f0.write("%.3f %.3f %s\n"%(totalIneffDef,totalIneffVeto,strLumi(h1Period_IntLuminosity[iYT].GetBinContent(subperiodNb[iYT]),"pb"))) +# f0.write(strftime("%d %b-%H:%M",localtime())) +# f0.close() +# os.system("cp %s/runs-ALL.dat ../LArPage1/DeMoPlots/"%(directory)) yearTagNb = len(yearTagList) diff --git a/DataQuality/DataQualityUtils/scripts/DeMoUpdate.py b/DataQuality/DataQualityUtils/scripts/DeMoUpdate.py index 93b3c7d65969..92c25863c972 100644 --- a/DataQuality/DataQualityUtils/scripts/DeMoUpdate.py +++ b/DataQuality/DataQualityUtils/scripts/DeMoUpdate.py @@ -120,6 +120,7 @@ parser.add_argument('-b','--batch',dest='parser_batchMode',help='Batch mode',act parser.add_argument('-s','--system',dest='parser_system',default="LAr",help='System: LAr, CaloCP [Default: "LAr"]',action='store') parser.add_argument('--runListUpdate',dest='parser_runListUpdate',help='Run list update. No other action allowed. Exit when done',action='store_true') parser.add_argument('--weekly',dest='parser_weekly',help='Weekly report. No run range to specify',action='store_true') +parser.add_argument('--allRuns',dest='parser_allRuns',help='All year runs. No run range to specify',action='store_true') parser.add_argument('--grlUpdate',dest='parser_grlUpdate',help='GRL update. No run range to specify',action='store_true') parser.add_argument('--noPlot',dest='parser_noPlot',help='Do not plot the results',action='store_false') parser.add_argument('--resetYS',dest='parser_resetYS',help='Reset year stats',action='store_true') @@ -138,6 +139,8 @@ args = parser.parse_args() parser.print_help() # Token to avoid having multiple update in the same time +print "Current time: %s"%(time.strftime("%a, %d %b %Y %H:%M:%S", time.localtime())) + options = {} options['system'] = args.parser_system tokenName = "DeMo-%s-%s.token"%(options['system'],args.parser_tag) @@ -196,7 +199,7 @@ if args.parser_runListUpdate: for iRun in fRunList.readlines(): # Look for the latest run in RunList/all.dat if int(iRun)>latestRun: latestRun = int(iRun) - recentRuns = s.get_run_beamluminfo({'low_run':"%d"%(latestRun+1),'high_run':"%s"%(latestRun+1000)}) + recentRuns = s.get_run_beamluminfo({'low_run':"%d"%(latestRun+1),'high_run':"%s"%(latestRun+5000)}) for iRecentRun in sorted(recentRuns.keys()): if (recentRuns[iRecentRun][2]): # ATLAS ready @@ -259,9 +262,11 @@ if (options['updateYearStats'] and options['resetYearStats']): os.system("rm -f %s/runs*.dat"%options['yearStatsDir']) os.system("rm -f %s/errors.log"%options['yearStatsDir']) if (args.parser_resetYS): # The loss files are deleted only if explicit request by the user. Relevant when no GRL run found yet (hence reset forced) but defect already set - print "However, I did NOT delete the loss files to preserve defects set in non-GRL runs" os.system("rm -f %s/loss*.dat"%options['yearStatsDir']) os.system("rm -f %s/Run/*.txt"%options['yearStatsDir']) + else: + print "However, I did NOT delete the loss files to preserve defects set in non-GRL runs" + # Delete the root file that contains the TProfiles os.system("rm -f %s"%(yearStatsArchiveFilename)) else: @@ -272,14 +277,16 @@ if (options['updateYearStats'] and options['resetYearStats']): runSpec = {} # Characteristics of each run: start, stop, data period, luminosity, computed inefficiencies # Fill the list of runs to be considered -if args.parser_weekly: # Weekly report - Look for the last 7-days runs + unsigned off +if args.parser_allRuns: # all year runs + runlist['toprocess'] = runlist['all'] +elif args.parser_weekly: # Weekly report - Look for the last 7-days runs + unsigned off print "I am looking for all runs signed off in the past week and the older ones not yet signed off..." options['savePlots'] = True runlist['toprocess'] = [] oneWeek = 7*24*3600 # Nb of seconds in one week - nbOfSignedBeyondOneWeek = 0 + runSignedOffBeyondOneWeek = [] for iRun in range(len(runlist['all'])): - if nbOfSignedBeyondOneWeek >= 5: + if len(runSignedOffBeyondOneWeek) >= 5: # Do not look too far in the past for unsigned off runs... continue runNb = runlist['all'][-iRun-1] # Start by the most recent run if len(signOff['FINAL']) != 0: @@ -302,8 +309,10 @@ if args.parser_weekly: # Weekly report - Look for the last 7-days runs + unsigne signOffTime = retrievedDefects["%d"%runNb][iDef][0][3] if (fullySignedOff and time.time()-signOffTime > oneWeek): - nbOfSignedBeyondOneWeek += 1 + runSignedOffBeyondOneWeek.append(runNb) runlist['toprocess'].append(runNb) + for iRun in runSignedOffBeyondOneWeek: + runlist['toprocess'].remove(iRun) runlist['toprocess'].reverse() print "I will process these runs :",runlist['toprocess'] @@ -545,6 +554,7 @@ for irun,runNb in enumerate(runlist['toprocess']): lbAffected = {} for idef in grlDef["part"]+grlDef["partIntol_recov"]: # All partition defects lbAffected[idef] = {} + lbAffected[idef]["AllPartitions"] = [] for idef in grlDef["glob"]+grlDef["globIntol_recov"]: # All global defects lbAffected[idef] = [] # Global defect - Simple list and not dictionnary @@ -576,7 +586,10 @@ for irun,runNb in enumerate(runlist['toprocess']): if options['onlineLumiNorm']: thisRunPerLB["deliveredLumi"] = GetOnlineLumiFromCOOL(runNb,0) else: - thisRunPerLB["deliveredLumi"] = GetOfflineLumiFromCOOL(runNb,0,yearTagProperties["offlineLumiTag"]) + if runNb in runlist['grl']: + thisRunPerLB["deliveredLumi"] = GetOfflineLumiFromCOOL(runNb,0,yearTagProperties["offlineLumiTag"]["grl"]) + else: + thisRunPerLB["deliveredLumi"] = GetOfflineLumiFromCOOL(runNb,0,yearTagProperties["offlineLumiTag"]["preliminary"]) # Look for peak lumi runSpec[runNb]['peakLumi'] = 0. for lb in thisRunPerLB['deliveredLumi'].keys(): @@ -627,7 +640,7 @@ for irun,runNb in enumerate(runlist['toprocess']): runSpec[runNb]['exprSignedOff'] = True runSpec[runNb]['bulkSignedOff'] = True runSpec[runNb]['signoff'] = 'FINAL OK' - # Look over all defects and store in list (1 per partition and type) the affected LB + # Loop over all defects and store in list (1 per partition and type) the affected LB # Consider only LB in runSpec[runNb]["readyLB"] for iRetrievedDefects in retrievedDefects: if debug: @@ -649,36 +662,101 @@ for irun,runNb in enumerate(runlist['toprocess']): runSpec[runNb]['newInYearStats'] = False # Checks if the defect corresponds to a defect in the system list - defectFound = [] - if (iRetrievedDefects.channel.startswith("CALO_ONLINEDB") or iRetrievedDefects.channel.startswith("TRT")):# CALO_[NAME] (only for CALO_ONLINEDB_LOWMU) - defectSplitted = iRetrievedDefects.channel.split("_",1) - if len(defectSplitted) == 2: # CALO_[NAME] + defectFound = "" + if (iRetrievedDefects.channel.startswith("PIXEL")): # [PIXEL]_[PARTITION]_[NAME] + defectSplitted = iRetrievedDefects.channel.split("_",2) + if len(defectSplitted) > 2: + partAffected=defectSplitted[1] + defectFound=defectSplitted[2] + elif (iRetrievedDefects.channel.startswith("SCT")): # SCT_[NAME] + defectSplitted = iRetrievedDefects.channel.split("_",1) + if len(defectSplitted) > 1: + defectFound=defectSplitted[1] + elif (iRetrievedDefects.channel.startswith("TRT")): # TRT_[NAME] + defectSplitted = iRetrievedDefects.channel.split("_",1) + if len(defectSplitted) > 1: + defectFound=defectSplitted[1] + elif (iRetrievedDefects.channel.startswith("LAR")): # [LAR]_[PART]_[Name] or [LAR]_[Name] - No "_" in any [NAME] + defectSplitted = iRetrievedDefects.channel.split("_",2) + if len(defectSplitted) == 2: # LAR_[NAME] defectFound=defectSplitted[1] - elif (iRetrievedDefects.channel.startswith("LAR") or iRetrievedDefects.channel.startswith("TAU") or iRetrievedDefects.channel.startswith("CALO") or iRetrievedDefects.channel.startswith("TILE")):# LAR_[PART]_[NAME], LAR_[NAME], TAU_[PART]_[NAME], CALO_[NAME] or CALO_[PART]_[NAME] + elif len(defectSplitted) == 3: # LAR_[PART]_[NAME] + partAffected=defectSplitted[1] + defectFound=defectSplitted[2] + elif (iRetrievedDefects.channel.startswith("CALO_ONLINEDB")):# CALO_ONLINEDB_[NAME] (only for CALO_ONLINEDB_LOWMU) - Accounted to LAr + defectSplitted = iRetrievedDefects.channel.split("_",2) + if len(defectSplitted) > 2: + defectFound=defectSplitted[2] + elif (iRetrievedDefects.channel.startswith("TILE")): # [TILE]_[PART]_[Name] defectSplitted = iRetrievedDefects.channel.split("_",2) - if len(defectSplitted) == 2: # LAR_[NAME] or CALO_[NAME] or TRT_[NAME] + if len(defectSplitted) > 2: + partAffected=defectSplitted[1] + defectFound=defectSplitted[2] + elif (iRetrievedDefects.channel.startswith("MS")): # MS_[SUBDETECTOR]_[PARTITION]_[NAME] + defectSplitted = iRetrievedDefects.channel.split("_",3) + if len(defectSplitted) > 3: + systemAffected=defectSplitted[1] + partAffected=defectSplitted[2] + defectFound=defectSplitted[3] + elif (iRetrievedDefects.channel.startswith("MCP")): # MCP_[NAME] + defectSplitted = iRetrievedDefects.channel.split("_",1) + if len(defectSplitted) > 1: + defectFound=defectSplitted[1] + elif (iRetrievedDefects.channel.startswith("ID")):# ID_[NAME] + defectSplitted = iRetrievedDefects.channel.split("_",1) + if len(defectSplitted) > 1: + defectFound=defectSplitted[1] + elif (iRetrievedDefects.channel.startswith("JET")):# JET_[NAME] + defectSplitted = iRetrievedDefects.channel.split("_",1) + if len(defectSplitted) > 1: defectFound=defectSplitted[1] - elif len(defectSplitted) == 3: # LAR_[PART]_[NAME] or CALO_[PART]_[NAME] or TAU_[PART]_[NAME] or TILE_[PART]_[NAME] + elif (iRetrievedDefects.channel.startswith("MET")):# MET_[NAME] + defectSplitted = iRetrievedDefects.channel.split("_",1) + if len(defectSplitted) > 1: + defectFound=defectSplitted[1] + elif (iRetrievedDefects.channel.startswith("EGAMMA")):# EGAMMA_[NAME]_[PART] or EGAMMA_[NAME] + if ("BARREL" in iRetrievedDefects.channel or "ENDCAP" in iRetrievedDefects.channel or "FORWARD" in iRetrievedDefects.channel): #EGAMMA_[NAME]_[PART] + defectSplitted = iRetrievedDefects.channel.split("_",2) + if len(defectSplitted) > 2: + defectFound=defectSplitted[1] + partAffected=defectSplitted[2] + else: + defectSplitted = iRetrievedDefects.channel.split("_",1) + if len(defectSplitted) > 1: + defectFound=defectSplitted[1] + elif (iRetrievedDefects.channel.startswith("TAU")): # TAU_[PART]_[NAME] + defectSplitted = iRetrievedDefects.channel.split("_",2) + if len(defectSplitted) > 2: partAffected=defectSplitted[1] defectFound=defectSplitted[2] - elif (iRetrievedDefects.channel.startswith("JET") or iRetrievedDefects.channel.startswith("MET") or iRetrievedDefects.channel.startswith("BTAG")):# Defect is of type JET_[NAME] or MET_[NAME] or BTAG_[NAME] + elif (iRetrievedDefects.channel.startswith("CALO")): # CALO_[PART]_[NAME] + defectSplitted = iRetrievedDefects.channel.split("_",2) + if len(defectSplitted) > 2: + partAffected=defectSplitted[1] + defectFound=defectSplitted[2] + elif (iRetrievedDefects.channel.startswith("BTAG")):# BTAG_[NAME] defectSplitted = iRetrievedDefects.channel.split("_",1) - if len(defectSplitted)>1: + if len(defectSplitted) > 1: defectFound=defectSplitted[1] - elif (iRetrievedDefects.channel.startswith("EGAMMA")):# Defect is of type EGAMMA_[NAME]_[PART] + elif (iRetrievedDefects.channel.startswith("TRIG")): # TRIG_L1_[NAME] TRIG_HLT_[NAME] defectSplitted = iRetrievedDefects.channel.split("_",2) - if len(defectSplitted)>2: - defectFound=defectSplitted[1] - partAffected=defectSplitted[2] - + if len(defectSplitted) > 2: + defectFound=defectSplitted[2] + + # Now stored the affected - Duplication are now treated here and no longer later if defectFound in grlDef["part"]: for lb in range(iRetrievedDefects.since.lumi,iRetrievedDefects.until.lumi): - if((lb in runSpec[runNb]['readyLB']) or runSpec[runNb]['nLBready']==0): - if not lbAffected[defectFound].has_key(partAffected): + if((lb in runSpec[runNb]['readyLB']) or runSpec[runNb]['nLBready']==0):# The LB is with ATLAS ready + + if not lbAffected[defectFound].has_key(partAffected): # Store the affected partitions lbAffected[defectFound][partAffected]=[] lbAffected[defectFound][partAffected].append(lb) + + if (defectFound in grlDef["partTol"]): # For tolerable defect, do not removate duplicated betwen defects + lbAffected[defectFound]["AllPartitions"].append(lb) if (defectFound in grlDef["partIntol"]):# Update the LBs affected by an intolerable defect if (lb not in lbAffected['IntolDefect']): + lbAffected[defectFound]["AllPartitions"].append(lb) lbAffected['IntolDefect'].append(lb) if (not iRetrievedDefects.recoverable and lb not in lbAffected['irrecov']): # Update the LBs affected by an intolerable irrecoverable defect lbAffected['irrecov'].append(lb) @@ -686,12 +764,15 @@ for irun,runNb in enumerate(runlist['toprocess']): if defectFound in grlDef["glob"]: for lb in range(iRetrievedDefects.since.lumi,iRetrievedDefects.until.lumi): if((lb in runSpec[runNb]["readyLB"]) or runSpec[runNb]['nLBready']==0): - lbAffected[defectFound].append(lb) - if (defectFound in grlDef["globIntol"]):# Update the LBs affected by an intolerable irrecoverable defect - if (lb not in lbAffected['IntolDefect']): - lbAffected['IntolDefect'].append(lb) - if (not iRetrievedDefects.recoverable and lb not in lbAffected['irrecov']): - lbAffected['irrecov'].append(lb) + + if (defectFound in grlDef["globTol"]): # For tolerable defect, do not removate duplicated betwen defects + lbAffected[defectFound].append(lb) + if (defectFound in grlDef["globIntol"]):# Update the LBs affected by an intolerable irrecoverable defect + if (lb not in lbAffected['IntolDefect']): + lbAffected[defectFound].append(lb) + lbAffected['IntolDefect'].append(lb) + if (not iRetrievedDefects.recoverable and lb not in lbAffected['irrecov']): + lbAffected['irrecov'].append(lb) # By default, an unsignedoff runs is kept in the final table/plots such that the LADIeS can use the plot. On # request, they can be also ignored. @@ -701,26 +782,26 @@ for irun,runNb in enumerate(runlist['toprocess']): runSpec.pop(runNb) continue -# Now remove duplication between partition/defects (intolerable only!) -# lbAffected[idef]["AllPartition"] are referred to all partition for this run -# WARNING : the duplication between global and partition defect is not properly treated. Negligible impact though... - lbAffectedPrevDef = [] # Used to remove duplicate between defects - for idef in grlDef["partIntol"]: - lbAffected[idef]["AllPartitions"]=[] - for ipart in partitions["list"]: - if lbAffected[idef].has_key(ipart): - for lumiBlock in lbAffected[idef][ipart]: - if (lumiBlock not in lbAffected[idef]["AllPartitions"]) and (lumiBlock not in lbAffectedPrevDef): - lbAffected[idef]["AllPartitions"].append(lumiBlock) - lbAffectedPrevDef.append(lumiBlock) - - for idef in grlDef["partTol"]: # In tolerable defect, do not remove overlap with previous defects - lbAffected[idef]["AllPartitions"]=[] - for ipart in partitions["list"]: - if lbAffected[idef].has_key(ipart): - for lumiBlock in lbAffected[idef][ipart]: - if (lumiBlock not in lbAffected[idef]["AllPartitions"]): - lbAffected[idef]["AllPartitions"].append(lumiBlock) +### Now remove duplication between partition/defects (intolerable only!) +### lbAffected[idef]["AllPartition"] are referred to all partition for this run +### WARNING : the duplication between global and partition defect is not properly treated. Negligible impact though... +## lbAffectedPrevDef = [] # Used to remove duplicate between defects +## for idef in grlDef["partIntol"]: +## lbAffected[idef]["AllPartitions"]=[] +## for ipart in partitions["list"]: +## if lbAffected[idef].has_key(ipart): +## for lumiBlock in lbAffected[idef][ipart]: +## if (lumiBlock not in lbAffected[idef]["AllPartitions"]) and (lumiBlock not in lbAffectedPrevDef): +## lbAffected[idef]["AllPartitions"].append(lumiBlock) +## lbAffectedPrevDef.append(lumiBlock) +## +## for idef in grlDef["partTol"]: # In tolerable defect, do not remove overlap with previous defects +## lbAffected[idef]["AllPartitions"]=[] +## for ipart in partitions["list"]: +## if lbAffected[idef].has_key(ipart): +## for lumiBlock in lbAffected[idef][ipart]: +## if (lumiBlock not in lbAffected[idef]["AllPartitions"]): +## lbAffected[idef]["AllPartitions"].append(lumiBlock) # Now treat recoverability - Storing all irrecoverable lb per defect (not partition wise as useless) for idef in grlDef["partIntol"]: @@ -876,7 +957,9 @@ if (len(runSpec.keys())>2 and runSpec['AllRuns']['Lumi']!=0): continue # Protection in case of the runs was not yet signed off and removed (with Unsignedoff option) from the list if newCanvas: - c1[canvasIndex] = TCanvas("runSummary_%s"%canvasIndex,"Run collection - %s"%canvasIndex,10,10,1000,600) + #c1[canvasIndex] = TCanvas("runSummary_%s"%canvasIndex,"Run collection - %s"%canvasIndex,10,10,1000,600) + # NewCanvas facility almost removed (50 runs cut) Size of the last TCanvas not properly computed + c1[canvasIndex] = TCanvas("runSummary_%s"%canvasIndex,"Run collection - %s"%canvasIndex,10,10,1000,(len(runlist['toprocess'])+1)*22) column[canvasIndex] = [] lineNb[canvasIndex] = 0 labels_col = ["Run","Run start / stop","LB ready","Peak lumi","Int. lumi","GRL ineff.","Veto ineff.","Period","Status"] @@ -884,7 +967,8 @@ if (len(runSpec.keys())>2 and runSpec['AllRuns']['Lumi']!=0): labels_xlow = [0.01,0.08,0.41,0.49,0.575,0.655,0.74,0.835,0.9,0.99] for i in xrange(len(labels_col)): - column[canvasIndex].append(TPaveText(labels_xlow[i],max(.99-0.08*len(runlist['toprocess']),0.01),labels_xlow[i+1],0.99)) +# column[canvasIndex].append(TPaveText(labels_xlow[i],max(.99-0.08*len(runlist['toprocess']),0.01),labels_xlow[i+1],0.99)) + column[canvasIndex].append(TPaveText(labels_xlow[i],0.01,labels_xlow[i+1],0.99)) column[canvasIndex][i].AddText(labels_col[i]) if (i%2 == 0): column[canvasIndex][i].SetFillColor(kOrange-3) @@ -904,8 +988,12 @@ if (len(runSpec.keys())>2 and runSpec['AllRuns']['Lumi']!=0): column[canvasIndex][7].AddText("%s"%(runSpec[runNb]["period"])) column[canvasIndex][8].AddText("%10s"%(runSpec[runNb]["signoff"])) lineNb[canvasIndex] += 1 - if (lineNb[canvasIndex]==25 or runNb == "AllRuns"): + if (lineNb[canvasIndex]==50 or runNb == "AllRuns"): for i in xrange(len(column[canvasIndex])): + if i == 1: + column[canvasIndex][i].AddText("Completed at %s"%(time.strftime("%H:%M (%d %b)", time.localtime()))) + else: + column[canvasIndex][i].AddText("") column[canvasIndex][i].Draw() c1[canvasIndex].SetWindowSize(1000,lineNb[canvasIndex]*40) c1[canvasIndex].Update() diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100755 new mode 100644 -- GitLab From 2d115efc7cc021e19ec4701f85ca0076d68d50c5 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Thu, 5 Jul 2018 10:31:29 +0200 Subject: [PATCH 383/562] ElectronPhotonSelectorTools: cmake fix This package has headers that include headers from xAODHIEvent, so the dependence on xAODHIEvent should be public, not private. Former-commit-id: bc838f943a1cbb3d214b80f28e78ab3f94856c57 --- .../ElectronPhotonID/ElectronPhotonSelectorTools/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/CMakeLists.txt b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/CMakeLists.txt index 553a3411410e..e5d09c5a10ef 100644 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/CMakeLists.txt +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/CMakeLists.txt @@ -19,13 +19,13 @@ atlas_depends_on_subdirs( Control/AthToolSupport/AsgTools Event/xAOD/xAODEgamma Event/xAOD/xAODTracking + Event/xAOD/xAODHIEvent Reconstruction/MVAUtils PhysicsAnalysis/AnalysisCommon/PATCore PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces PRIVATE Control/CxxUtils Event/FourMomUtils - Event/xAOD/xAODHIEvent Event/xAOD/xAODCaloEvent Event/xAOD/xAODCore Event/xAOD/xAODEventInfo -- GitLab From f7079b9a931cd066b55d77b9795f6f6e85141233 Mon Sep 17 00:00:00 2001 From: Will Leight <wleight@cern.ch> Date: Fri, 6 Jul 2018 10:02:34 +0200 Subject: [PATCH 384/562] Fix for ATLASSIM-3262 Manual sweep of !12566 (stop using deprecated HepMC::GenParticle interface to MCTruthClassifier), please see that for more details. Former-commit-id: 8f9e51e87245d1ac0898e61bd6325cac1e089fd8 --- .../src/MuonTruthDecorationAlg.cxx | 28 ++++--------------- .../src/MuonTruthDecorationAlg.h | 1 - 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx b/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx index b6613d24733d..61df21da58b6 100644 --- a/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx +++ b/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx @@ -52,8 +52,6 @@ namespace Muon { //remove NSW by default for now, can always be changed in the configuration declareProperty("SDOs", m_SDO_TruthNames={"RPC_SDO","TGC_SDO","MDT_SDO"}); - declareProperty("xAODTruthLinkVector",m_truthLinkVecName="xAODTruthLinks"); - declareProperty("MCTruthClassifier", m_truthClassifier); declareProperty("MuonIdHelperTool", m_idHelper); declareProperty("MuonEDMPrinterTool", m_printer); @@ -72,7 +70,6 @@ namespace Muon { ATH_CHECK(m_PRD_TruthNames.initialize()); ATH_CHECK(m_SDO_TruthNames.initialize()); ATH_CHECK(m_CSC_SDO_TruthNames.initialize()); - ATH_CHECK(m_truthLinkVecName.initialize()); ATH_CHECK(m_idHelper.retrieve()); ATH_CHECK(m_printer.retrieve()); ATH_CHECK(m_truthClassifier.retrieve()); @@ -97,14 +94,6 @@ namespace Muon { return StatusCode::FAILURE; } - // get truth links - SG::ReadHandle<xAODTruthParticleLinkVector> truthParticleLinkVec(m_truthLinkVecName); - if(!truthParticleLinkVec.isValid()){ - ATH_MSG_WARNING("link vec container "<<truthParticleLinkVec.name()<<" not valid"); - return StatusCode::FAILURE; - } - - // create output container SG::WriteHandle<xAOD::TruthParticleContainer> muonTruthContainer(m_muonTruthParticleContainerName); ATH_CHECK(muonTruthContainer.record(std::make_unique<xAOD::TruthParticleContainer>(),std::make_unique<xAOD::TruthParticleAuxContainer>())); @@ -142,18 +131,11 @@ namespace Muon { // if configured look up truth classification if( !m_truthClassifier.empty() ){ - for( const auto& entry : *truthParticleLinkVec ){ - if( !entry->second.isValid() || *entry->second != truth ) continue; - - // if configured also get truth classification - if( entry->first.cptr() ){ - auto truthClass = m_truthClassifier->particleTruthClassifier(entry->first.cptr()); - type = truthClass.first; - origin = truthClass.second; - ATH_MSG_VERBOSE("Got truth type " << static_cast<int>(type) << " origin " << static_cast<int>(origin)); - } - break; - } + // if configured also get truth classification + auto truthClass = m_truthClassifier->particleTruthClassifier(truth); + type = truthClass.first; + origin = truthClass.second; + ATH_MSG_VERBOSE("Got truth type " << static_cast<int>(type) << " origin " << static_cast<int>(origin)); int& theType = const_cast<xAOD::TruthParticle*>(truthParticle)->auxdata<int>("truthType"); int& theOrigin = const_cast<xAOD::TruthParticle*>(truthParticle)->auxdata<int>("truthOrigin"); theType = static_cast<int>(type); diff --git a/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.h b/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.h index 7dda6393a2d5..fdefd356fe08 100755 --- a/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.h +++ b/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.h @@ -72,7 +72,6 @@ private: SG::ReadHandleKeyArray<PRD_MultiTruthCollection> m_PRD_TruthNames; SG::ReadHandleKeyArray<MuonSimDataCollection> m_SDO_TruthNames; SG::ReadHandleKey<CscSimDataCollection> m_CSC_SDO_TruthNames; - SG::ReadHandleKey<xAODTruthParticleLinkVector> m_truthLinkVecName; ToolHandle<Muon::MuonIdHelperTool> m_idHelper; ToolHandle<Muon::MuonEDMPrinterTool> m_printer; ToolHandle<IMCTruthClassifier> m_truthClassifier; -- GitLab From 7ecae61ecc0770e0d5ceb3af4313cb9d79610e1b Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Fri, 6 Jul 2018 09:22:51 +0000 Subject: [PATCH 385/562] 22.0 coverity InDetSecVxFinderTool Former-commit-id: 8615fe4d39f06a146d1122aa8eef4dc23b02e61b --- .../InDetImprovedJetFitterVxFinder.h | 3 - .../InDetJetFitterUtils.h | 5 +- .../src/InDetImprovedJetFitterVxFinder.cxx | 416 +++++++----------- .../src/InDetJetFitterVxFinder.cxx | 352 ++++++--------- 4 files changed, 283 insertions(+), 493 deletions(-) diff --git a/InnerDetector/InDetRecTools/InDetSecVxFinderTool/InDetSecVxFinderTool/InDetImprovedJetFitterVxFinder.h b/InnerDetector/InDetRecTools/InDetSecVxFinderTool/InDetSecVxFinderTool/InDetImprovedJetFitterVxFinder.h index 7294d31843cb..886bf1d2a2b3 100755 --- a/InnerDetector/InDetRecTools/InDetSecVxFinderTool/InDetSecVxFinderTool/InDetImprovedJetFitterVxFinder.h +++ b/InnerDetector/InDetRecTools/InDetSecVxFinderTool/InDetSecVxFinderTool/InDetImprovedJetFitterVxFinder.h @@ -154,9 +154,6 @@ namespace InDet { double m_cutIPD0BothTracksCriteriumOneForKsAndLambda; double m_cutIPZ0BothTracksCriteriumOneForKsAndLambda; double m_cutTransverseTwoTrkVtxDistanceCriteriumTwoForKsAndLambda; - //double m_cutCompatibilityToPrimaryNeutralTrackFromConversion; - //double m_cutCompatibilityToPrimaryNeutralTrackFromKs; - //double m_cutCompatibilityToPrimaryNeutralTrackFromLambda; double m_cutCompatibilityChi2ToPrimaryNeutralTrackFromConversion; double m_cutCompatibilityChi2ToPrimaryNeutralTrackFromKs; double m_cutCompatibilityChi2ToPrimaryNeutralTrackFromLambda; diff --git a/InnerDetector/InDetRecTools/InDetSecVxFinderTool/InDetSecVxFinderTool/InDetJetFitterUtils.h b/InnerDetector/InDetRecTools/InDetSecVxFinderTool/InDetSecVxFinderTool/InDetJetFitterUtils.h index b126a9c81580..a85555615768 100644 --- a/InnerDetector/InDetRecTools/InDetSecVxFinderTool/InDetSecVxFinderTool/InDetJetFitterUtils.h +++ b/InnerDetector/InDetRecTools/InDetSecVxFinderTool/InDetSecVxFinderTool/InDetJetFitterUtils.h @@ -27,10 +27,7 @@ #include "CLHEP/Matrix/SymMatrix.h" #include "CLHEP/Matrix/Matrix.h" #include "CLHEP/Vector/LorentzVector.h" -//#include "TrkParticleBase/LinkToTrackParticleBase.h" -//#include "TrkParticleBase/TrackParticleBaseCollection.h" -//#include "TrkParticleBase/TrackParticleBase.h" -//#include "TrkNeutralParameters/NeutralParameters.h" + #include "TrkParameters/TrackParameters.h" #include "xAODTracking/Vertex.h" diff --git a/InnerDetector/InDetRecTools/InDetSecVxFinderTool/src/InDetImprovedJetFitterVxFinder.cxx b/InnerDetector/InDetRecTools/InDetSecVxFinderTool/src/InDetImprovedJetFitterVxFinder.cxx index 38e755de09c3..65acebc345c8 100755 --- a/InnerDetector/InDetRecTools/InDetSecVxFinderTool/src/InDetImprovedJetFitterVxFinder.cxx +++ b/InnerDetector/InDetRecTools/InDetSecVxFinderTool/src/InDetImprovedJetFitterVxFinder.cxx @@ -361,81 +361,51 @@ namespace InDet } - const Trk::VxSecVertexInfo* InDetImprovedJetFitterVxFinder::findSecVertex(const xAOD::Vertex & primaryVertex, - const TLorentzVector & jetMomentum, - const std::vector<const xAOD::IParticle*> & inputTracks) const - { - + const Trk::VxSecVertexInfo* + InDetImprovedJetFitterVxFinder::findSecVertex(const xAOD::Vertex & primaryVertex, + const TLorentzVector & jetMomentum, + const std::vector<const xAOD::IParticle*> & inputTracks) const{ + std::vector<const Trk::ITrackLink*> selectedTracks; - std::vector<const xAOD::IParticle*>::const_iterator trk_iter; - //std::vector<const xAOD::IParticle*>::const_iterator trk_end=inputTracks.end(); - - double sumpT=0; - - for (trk_iter= inputTracks.begin(); trk_iter != inputTracks.end(); ++trk_iter) - { - + for (trk_iter= inputTracks.begin(); trk_iter != inputTracks.end(); ++trk_iter){ const xAOD::TrackParticle * tmp=dynamic_cast<const xAOD::TrackParticle *> ((*trk_iter)); - - if (!m_trkFilter->decision(*tmp,&primaryVertex)) - { + if (!tmp or !m_trkFilter->decision(*tmp,&primaryVertex)){ continue; } - - if (!m_usepTDepTrackSel) - { - + if (!m_usepTDepTrackSel){ ElementLink<xAOD::TrackParticleContainer> linkTP; linkTP.setElement(const_cast<xAOD::TrackParticle*>(tmp)); - Trk::LinkToXAODTrackParticle* link= new Trk::LinkToXAODTrackParticle(linkTP); selectedTracks.push_back(link); - - } - else - { + }else{ sumpT+=tmp->pt(); } } - - if (m_usepTDepTrackSel) - { - for (trk_iter= inputTracks.begin(); trk_iter != inputTracks.end(); ++trk_iter) - { - + if (m_usepTDepTrackSel){ + for (trk_iter= inputTracks.begin(); trk_iter != inputTracks.end(); ++trk_iter){ const xAOD::TrackParticle * tmp=dynamic_cast<const xAOD::TrackParticle *> ((*trk_iter)); - - if (!m_trkFilter->decision(*tmp,&primaryVertex)) - { + if (!tmp or !m_trkFilter->decision(*tmp,&primaryVertex)){ continue; } - if (!((tmp->pt()>m_pTMinOffset + sumpT * m_pTMinSlope) || - (sumpT > m_pTMax && tmp->pt()>m_pTMinOffset+m_pTMax* m_pTMinSlope))) - { + (sumpT > m_pTMax && tmp->pt()>m_pTMinOffset+m_pTMax* m_pTMinSlope))){ continue; } - ElementLink<xAOD::TrackParticleContainer> linkTP; linkTP.setElement(const_cast<xAOD::TrackParticle*>(tmp)); - Trk::LinkToXAODTrackParticle* link= new Trk::LinkToXAODTrackParticle(linkTP); selectedTracks.push_back(link); - } } - Trk::RecVertex dummy; - const Trk::VxSecVertexInfo* secVxInfo=doTheFinding(primaryVertex, jetMomentum, selectedTracks); return secVxInfo; - } @@ -2066,25 +2036,11 @@ namespace InDet } - //there shouldn't be much more... - // int numberFirstBeamInteractions=0; - // int numberSecondBeamInteractions=0; - // int numberFirstLayerInteractions=0; - // int numberSecondLayerInteractions=0; - - //for the moment do not store material interactions... - - //now create the output object - //MU std::vector<Trk::VxCandidate*> myCandidates; std::vector<Trk::VxJetCandidate*> myCandidates; // This push_back is problematic for the migration to xAOD::Vertex, it works simply because VxJetCandidate inherits from VxCandidate myCandidates.push_back(myJetCandidate); - /* SERIOUS PROBLEM */ - /* 17.05.2014 Problem here: can't store jetfitter vertex in xAOD:VxCandidate! */ -// const Trk::VxJetFitterVertexInfo* myOutputInfo=new Trk::VxJetFitterVertexInfo(myCandidates, -// myTwoTrackVerticesInJet, -// mySelectedTracksInJet); + Trk::VxJetFitterVertexInfo* myOutputInfo=new Trk::VxJetFitterVertexInfo(myCandidates, myTwoTrackVerticesInJet, @@ -2100,262 +2056,193 @@ namespace InDet } - Trk::VxJetCandidate* InDetImprovedJetFitterVxFinder::findSecVertex(const Trk::RecVertex & primaryVertex, - const TLorentzVector & jetMomentum, - const std::vector<const Trk::ITrackLink*> & firstInputTracks, - const std::vector<const Trk::ITrackLink*> & secondInputTracks, - const Amg::Vector3D & vtxSeedDirection) const - { - - - if (msgLvl(MSG::VERBOSE)) msg() << " entered findSecVertex(). Applying JetFitter finding to the found sets of tracks and performing clustering (pattern recognition) " << endmsg; - + Trk::VxJetCandidate* + InDetImprovedJetFitterVxFinder::findSecVertex(const Trk::RecVertex & primaryVertex, + const TLorentzVector & jetMomentum, + const std::vector<const Trk::ITrackLink*> & firstInputTracks, + const std::vector<const Trk::ITrackLink*> & secondInputTracks, + const Amg::Vector3D & vtxSeedDirection) const { + ATH_MSG_VERBOSE( " entered findSecVertex(). Applying JetFitter finding to the found sets of tracks and performing clustering (pattern recognition) " ); Amg::Vector3D myDirection(jetMomentum.X(),jetMomentum.Y(),jetMomentum.Z()); - std::vector<std::vector<const Trk::ITrackLink*> > bunchesOfTracks; - std::vector<const Trk::ITrackLink*> tracksToAdd; - std::vector<const Trk::ITrackLink*>::const_iterator tracks2Begin=firstInputTracks.begin(); std::vector<const Trk::ITrackLink*>::const_iterator tracks2End=firstInputTracks.end(); for (std::vector<const Trk::ITrackLink*>::const_iterator tracks2Iter=tracks2Begin; - tracks2Iter!=tracks2End;++tracks2Iter) { - if (msgLvl(MSG::VERBOSE)) msg() <<" adding track to fit " << endmsg; + tracks2Iter!=tracks2End;++tracks2Iter) { + ATH_MSG_VERBOSE(" adding track to fit " ); tracksToAdd.push_back(*tracks2Iter); } - bunchesOfTracks.push_back(tracksToAdd); tracksToAdd.clear(); - std::vector<const Trk::ITrackLink*>::const_iterator tracks3Begin=secondInputTracks.begin(); std::vector<const Trk::ITrackLink*>::const_iterator tracks3End=secondInputTracks.end(); for (std::vector<const Trk::ITrackLink*>::const_iterator tracks3Iter=tracks3Begin; - tracks3Iter!=tracks3End;++tracks3Iter) { - if (msgLvl(MSG::VERBOSE)) msg() <<" adding track to fit " << endmsg; + tracks3Iter!=tracks3End;++tracks3Iter) { + ATH_MSG_VERBOSE(" adding track to fit "); tracksToAdd.push_back(*tracks3Iter); } - - if (tracksToAdd.size()!=0) - { + if (not tracksToAdd.empty()) { bunchesOfTracks.push_back(tracksToAdd); } tracksToAdd.clear(); - - //now it just uses these bunches... //now I have just to make sure that no clustering is done at first iteration //while it needs to be done at second iteration (there will be only two iterations) - - std::vector<std::vector<const Trk::ITrackLink*> >::const_iterator BunchesBegin=bunchesOfTracks.begin(); std::vector<std::vector<const Trk::ITrackLink*> >::const_iterator BunchesEnd=bunchesOfTracks.end(); - std::vector<const Trk::ITrackLink*>::const_iterator tracksToAddBegin; std::vector<const Trk::ITrackLink*>::const_iterator tracksToAddEnd; std::vector<const Trk::ITrackLink*>::const_iterator tracksToAddIter; - - - Trk::VxJetCandidate* myJetCandidate=0; - + Trk::VxJetCandidate* myJetCandidate=nullptr; for (std::vector<std::vector<const Trk::ITrackLink*> >::const_iterator BunchesIter=BunchesBegin; - BunchesIter!=BunchesEnd;++BunchesIter) { - + BunchesIter!=BunchesEnd;++BunchesIter) { if (BunchesIter==BunchesBegin) { - if (msgLvl(MSG::VERBOSE)) msg() <<" initial fit with " << (*BunchesIter).size() << " tracks " << endmsg; - myJetCandidate=m_initializationHelper->initializeJetCandidate(*BunchesIter,&primaryVertex,&myDirection,&vtxSeedDirection); - m_routines->initializeToMinDistancesToJetAxis(myJetCandidate); - if ((*BunchesIter).size()>0) - { + ATH_MSG_VERBOSE(" initial fit with " << (*BunchesIter).size() << " tracks " ); + myJetCandidate=m_initializationHelper->initializeJetCandidate(*BunchesIter,&primaryVertex,&myDirection,&vtxSeedDirection); + if (not myJetCandidate) continue; + m_routines->initializeToMinDistancesToJetAxis(myJetCandidate); + if (not BunchesIter->empty()){ doTheFit(myJetCandidate,true); } } else { - if (msgLvl(MSG::VERBOSE)) msg() <<" other fit with " << (*BunchesIter).size() << " tracks " << endmsg; - std::vector<Trk::VxVertexOnJetAxis*> setOfVertices=myJetCandidate->getVerticesOnJetAxis(); - std::vector<Trk::VxTrackAtVertex*>* setOfTracks=myJetCandidate->vxTrackAtVertex(); - tracksToAddBegin=(*BunchesIter).begin(); - tracksToAddEnd=(*BunchesIter).end(); - for (tracksToAddIter=tracksToAddBegin;tracksToAddIter!=tracksToAddEnd;++tracksToAddIter) { - std::vector<Trk::VxTrackAtVertex*> temp_vector_tracksAtVertex; - Trk::VxTrackAtVertex* newVxTrack=new Trk::VxTrackAtVertex((*tracksToAddIter)->clone()); - temp_vector_tracksAtVertex.push_back(newVxTrack); - setOfTracks->push_back(newVxTrack); - setOfVertices.push_back(new Trk::VxVertexOnJetAxis(temp_vector_tracksAtVertex)); - } - if (msgLvl(MSG::VERBOSE)) msg() <<" new overall number of tracks to fit : " << setOfVertices.size() << endmsg; - myJetCandidate->setVerticesOnJetAxis(setOfVertices); - m_initializationHelper->updateTrackNumbering(myJetCandidate); + if (not myJetCandidate) continue; + ATH_MSG_VERBOSE(" other fit with " << (*BunchesIter).size() << " tracks " ); + std::vector<Trk::VxVertexOnJetAxis*> setOfVertices=myJetCandidate->getVerticesOnJetAxis(); + std::vector<Trk::VxTrackAtVertex*>* setOfTracks=myJetCandidate->vxTrackAtVertex(); + tracksToAddBegin=(*BunchesIter).begin(); + tracksToAddEnd=(*BunchesIter).end(); + for (tracksToAddIter=tracksToAddBegin;tracksToAddIter!=tracksToAddEnd;++tracksToAddIter) { + std::vector<Trk::VxTrackAtVertex*> temp_vector_tracksAtVertex; + Trk::VxTrackAtVertex* newVxTrack=new Trk::VxTrackAtVertex((*tracksToAddIter)->clone()); + temp_vector_tracksAtVertex.push_back(newVxTrack); + setOfTracks->push_back(newVxTrack); + setOfVertices.push_back(new Trk::VxVertexOnJetAxis(temp_vector_tracksAtVertex)); + } + ATH_MSG_VERBOSE(" new overall number of tracks to fit : " << setOfVertices.size() ); + myJetCandidate->setVerticesOnJetAxis(setOfVertices); + m_initializationHelper->updateTrackNumbering(myJetCandidate); //question: should this be done??? - m_routines->initializeToMinDistancesToJetAxis(myJetCandidate); - doTheFit(myJetCandidate); + m_routines->initializeToMinDistancesToJetAxis(myJetCandidate); + doTheFit(myJetCandidate); } } - - - // std::vector<Trk::VxCandidate*> myCandidates; - // myCandidates.push_back(myJetCandidate); - //return new Trk::VxSecVertexInfo(myCandidates);//ownership of the single objects is taken over! - return myJetCandidate; - } - void InDetImprovedJetFitterVxFinder::doTheFit(Trk::VxJetCandidate* myJetCandidate, - bool performClustering) const { - - + void + InDetImprovedJetFitterVxFinder::doTheFit(Trk::VxJetCandidate* myJetCandidate, + bool performClustering) const { int numClusteringLoops=0; bool noMoreVerticesToCluster(false); - do {//reguards clustering - - if (msgLvl(MSG::VERBOSE)) msg() <<"InDetImprovedJetFitterVxFinder: ------>>>> new cycle of fit" << endmsg; - + ATH_MSG_VERBOSE("InDetImprovedJetFitterVxFinder: ------>>>> new cycle of fit" ); int numLoops=0; bool noMoreTracksToDelete(false); do {//reguards eliminating incompatible tracks... - - m_routines->performTheFit(myJetCandidate,15,false,30,0.001); - - const std::vector<Trk::VxVertexOnJetAxis*> & vertices=myJetCandidate->getVerticesOnJetAxis(); - - std::vector<Trk::VxVertexOnJetAxis*>::const_iterator verticesBegin=vertices.begin(); - std::vector<Trk::VxVertexOnJetAxis*>::const_iterator verticesEnd=vertices.end(); - - - //delete incompatible tracks... - float max_prob(1.); - Trk::VxVertexOnJetAxis* worseVertex(0); - for (std::vector<Trk::VxVertexOnJetAxis*>::const_iterator verticesIter=verticesBegin; - verticesIter!=verticesEnd;++verticesIter) { - if (*verticesIter==0) { - msg(MSG::WARNING) << "One vertex is empy. Problem when trying to delete incompatible vertices. No further vertices deleted." << endmsg; - } else { - const Trk::FitQuality & fitQuality=(*verticesIter)->fitQuality(); - if (TMath::Prob(fitQuality.chiSquared(),(int)std::floor(fitQuality.numberDoF()+0.5))<max_prob) { - max_prob=TMath::Prob(fitQuality.chiSquared(),(int)std::floor(fitQuality.numberDoF()+0.5)); - worseVertex=*verticesIter; - } - } - } - if (max_prob<m_vertexProbCut) { - if (msgLvl(MSG::DEBUG)) msg() << "Deleted vertex " << worseVertex->getNumVertex() << " with probability " << max_prob << endmsg; - // std::cout << "Deleted vertex " << worseVertex->getNumVertex() << " with probability " << max_prob << std::endl; - if (worseVertex==myJetCandidate->getPrimaryVertex()) { - if (msgLvl(MSG::VERBOSE)) msg() << " It's the primary" << endmsg; - } - - m_routines->deleteVertexFromJetCandidate(worseVertex,myJetCandidate); - - } else { - noMoreTracksToDelete=true; - if (msgLvl(MSG::VERBOSE)) msg() <<"No tracks to delete: maximum probability is " << max_prob << endmsg; - } - - numLoops+=1; + m_routines->performTheFit(myJetCandidate,15,false,30,0.001); + const std::vector<Trk::VxVertexOnJetAxis*> & vertices=myJetCandidate->getVerticesOnJetAxis(); + std::vector<Trk::VxVertexOnJetAxis*>::const_iterator verticesBegin=vertices.begin(); + std::vector<Trk::VxVertexOnJetAxis*>::const_iterator verticesEnd=vertices.end(); + //delete incompatible tracks... + float max_prob(1.); + Trk::VxVertexOnJetAxis* worseVertex(nullptr); + for (std::vector<Trk::VxVertexOnJetAxis*>::const_iterator verticesIter=verticesBegin; + verticesIter!=verticesEnd;++verticesIter) { + if (*verticesIter==0) { + ATH_MSG_WARNING( "One vertex is empy. Problem when trying to delete incompatible vertices. No further vertices deleted."); + } else { + const Trk::FitQuality & fitQuality=(*verticesIter)->fitQuality(); + if (TMath::Prob(fitQuality.chiSquared(),(int)std::floor(fitQuality.numberDoF()+0.5))<max_prob) { + max_prob=TMath::Prob(fitQuality.chiSquared(),(int)std::floor(fitQuality.numberDoF()+0.5)); + worseVertex=*verticesIter; + } + } + } + if (worseVertex and (max_prob<m_vertexProbCut)) { + ATH_MSG_DEBUG( "Deleted vertex " << worseVertex->getNumVertex() << " with probability " << max_prob ); + if (worseVertex==myJetCandidate->getPrimaryVertex()) { + ATH_MSG_VERBOSE( " It's the primary" ); + } + m_routines->deleteVertexFromJetCandidate(worseVertex,myJetCandidate); + } else { + noMoreTracksToDelete=true; + ATH_MSG_VERBOSE("No tracks to delete: maximum probability is " << max_prob ); + } + numLoops+=1; } while (numLoops<m_maxNumDeleteIterations&&!(noMoreTracksToDelete)); - if (!performClustering) break; - if (!m_useFastClustering && (int)myJetCandidate->getVerticesOnJetAxis().size()<m_maxTracksForDetailedClustering) { - m_routines->fillTableWithFullProbOfMerging(myJetCandidate,8,false,10,0.01); + m_routines->fillTableWithFullProbOfMerging(myJetCandidate,8,false,10,0.01); } else { - m_routines->fillTableWithFastProbOfMerging(myJetCandidate); + m_routines->fillTableWithFastProbOfMerging(myJetCandidate); } const Trk::VxClusteringTable* clusteringTablePtr(myJetCandidate->getClusteringTable()); - - - - - if (clusteringTablePtr==0) { - msg(MSG::WARNING) << " No Clustering Table while it should have been calculated... no more clustering performed during vertexing " << endmsg; - noMoreVerticesToCluster=true; + if (not clusteringTablePtr) { + ATH_MSG_WARNING( " No Clustering Table while it should have been calculated... no more clustering performed during vertexing " ); + noMoreVerticesToCluster=true; } else { - - if (msgLvl(MSG::VERBOSE)) msg() <<" clustering table is " << *clusteringTablePtr << endmsg; - - //now iterate over the full map and decide wether you want to do the clustering OR not... - float probVertex(0.); - Trk::PairOfVxVertexOnJetAxis pairOfVxVertexOnJetAxis=clusteringTablePtr->getMostCompatibleVertices(probVertex); - //a PairOfVxVertexOnJetAxis is a std::pair<VxVertexOnJetAxis*,VxVertexOnJetAxis*> - - float probVertexExcludingPrimary(0.); - Trk::PairOfVxVertexOnJetAxis pairOfVxVertexOnJetAxisExcludingPrimary=clusteringTablePtr->getMostCompatibleVerticesExcludingPrimary(probVertexExcludingPrimary); - - bool firstProbIsWithPrimary= ( fabs(probVertex-probVertexExcludingPrimary)>1e-6 ); - - if (probVertex>0.&&probVertex>m_vertexClusteringProbabilityCut&&firstProbIsWithPrimary) { - if (msgLvl(MSG::VERBOSE)) msg() <<" merging vtx number " << (*pairOfVxVertexOnJetAxis.first).getNumVertex() << - " and " << (*pairOfVxVertexOnJetAxis.second).getNumVertex() << " (should be PV)." << endmsg; - // const Trk::VxVertexOnJetAxis & mergedVertex= - m_helper->mergeVerticesInJetCandidate(*pairOfVxVertexOnJetAxis.first, - *pairOfVxVertexOnJetAxis.second, - *myJetCandidate); - //now you need to update the numbering scheme - m_initializationHelper->updateTrackNumbering(myJetCandidate);//maybe this should be moved to a lower level... - continue; - } - - if (probVertexExcludingPrimary>0.) - { - - //GP suggested by Marco Battaglia, use vertex mass in order to decide wether to split or not, so derive vertex masses first - const Trk::VxVertexOnJetAxis* firstVertex=pairOfVxVertexOnJetAxisExcludingPrimary.first; - const Trk::VxVertexOnJetAxis* secondVertex=pairOfVxVertexOnJetAxisExcludingPrimary.second; - - CLHEP::HepLorentzVector massVector1=m_jetFitterUtils->fourMomentumAtVertex(*firstVertex);//MeV - CLHEP::HepLorentzVector massVector2=m_jetFitterUtils->fourMomentumAtVertex(*secondVertex);//MeV - - CLHEP::HepLorentzVector sumMassVector=massVector1+massVector2; - - double massTwoVertex=sumMassVector.mag();//MeV - - bool doMerge(false); - - double vertexClusteringProbabilityCutWithMass; - - if(massTwoVertex< 1000.){ - vertexClusteringProbabilityCutWithMass = m_vertexClusteringProbabilityCutWithMass0010; - }else if(massTwoVertex< 1500.){ - vertexClusteringProbabilityCutWithMass = m_vertexClusteringProbabilityCutWithMass1015; - }else if(massTwoVertex< 2000.){ - vertexClusteringProbabilityCutWithMass = m_vertexClusteringProbabilityCutWithMass1520; - }else if(massTwoVertex< 2500.){ - vertexClusteringProbabilityCutWithMass = m_vertexClusteringProbabilityCutWithMass2025; - }else if(massTwoVertex< 3000.){ - vertexClusteringProbabilityCutWithMass = m_vertexClusteringProbabilityCutWithMass2530; - }else if(massTwoVertex< 4000.){ - vertexClusteringProbabilityCutWithMass = m_vertexClusteringProbabilityCutWithMass3040; - }else if(massTwoVertex< 5000.){ - vertexClusteringProbabilityCutWithMass = m_vertexClusteringProbabilityCutWithMass4050; - }else if(massTwoVertex< 6000.){ - vertexClusteringProbabilityCutWithMass = m_vertexClusteringProbabilityCutWithMass5060; - }else{ - vertexClusteringProbabilityCutWithMass = m_vertexClusteringProbabilityCutWithMass6070; - } - - if (probVertexExcludingPrimary>vertexClusteringProbabilityCutWithMass) - { + ATH_MSG_VERBOSE(" clustering table is " << *clusteringTablePtr ); + //now iterate over the full map and decide wether you want to do the clustering OR not... + float probVertex(0.); + Trk::PairOfVxVertexOnJetAxis pairOfVxVertexOnJetAxis=clusteringTablePtr->getMostCompatibleVertices(probVertex); + //a PairOfVxVertexOnJetAxis is a std::pair<VxVertexOnJetAxis*,VxVertexOnJetAxis*> + float probVertexExcludingPrimary(0.); + Trk::PairOfVxVertexOnJetAxis pairOfVxVertexOnJetAxisExcludingPrimary=clusteringTablePtr->getMostCompatibleVerticesExcludingPrimary(probVertexExcludingPrimary); + bool firstProbIsWithPrimary= ( std::fabs(probVertex-probVertexExcludingPrimary)>1e-6 ); + if (probVertex>0.&&probVertex>m_vertexClusteringProbabilityCut&&firstProbIsWithPrimary) { + ATH_MSG_VERBOSE(" merging vtx number " << (*pairOfVxVertexOnJetAxis.first).getNumVertex() << + " and " << (*pairOfVxVertexOnJetAxis.second).getNumVertex() << " (should be PV)." ); + m_helper->mergeVerticesInJetCandidate(*pairOfVxVertexOnJetAxis.first, + *pairOfVxVertexOnJetAxis.second, + *myJetCandidate); + //now you need to update the numbering scheme + m_initializationHelper->updateTrackNumbering(myJetCandidate);//maybe this should be moved to a lower level... + continue; + } + if (probVertexExcludingPrimary>0.){ + //GP suggested by Marco Battaglia, use vertex mass in order to decide wether to split or not, so derive vertex masses first + const Trk::VxVertexOnJetAxis* firstVertex=pairOfVxVertexOnJetAxisExcludingPrimary.first; + const Trk::VxVertexOnJetAxis* secondVertex=pairOfVxVertexOnJetAxisExcludingPrimary.second; + CLHEP::HepLorentzVector massVector1=m_jetFitterUtils->fourMomentumAtVertex(*firstVertex);//MeV + CLHEP::HepLorentzVector massVector2=m_jetFitterUtils->fourMomentumAtVertex(*secondVertex);//MeV + CLHEP::HepLorentzVector sumMassVector=massVector1+massVector2; + double massTwoVertex=sumMassVector.mag();//MeV + bool doMerge(false); + double vertexClusteringProbabilityCutWithMass; + if(massTwoVertex< 1000.){ + vertexClusteringProbabilityCutWithMass = m_vertexClusteringProbabilityCutWithMass0010; + }else if(massTwoVertex< 1500.){ + vertexClusteringProbabilityCutWithMass = m_vertexClusteringProbabilityCutWithMass1015; + }else if(massTwoVertex< 2000.){ + vertexClusteringProbabilityCutWithMass = m_vertexClusteringProbabilityCutWithMass1520; + }else if(massTwoVertex< 2500.){ + vertexClusteringProbabilityCutWithMass = m_vertexClusteringProbabilityCutWithMass2025; + }else if(massTwoVertex< 3000.){ + vertexClusteringProbabilityCutWithMass = m_vertexClusteringProbabilityCutWithMass2530; + }else if(massTwoVertex< 4000.){ + vertexClusteringProbabilityCutWithMass = m_vertexClusteringProbabilityCutWithMass3040; + }else if(massTwoVertex< 5000.){ + vertexClusteringProbabilityCutWithMass = m_vertexClusteringProbabilityCutWithMass4050; + }else if(massTwoVertex< 6000.){ + vertexClusteringProbabilityCutWithMass = m_vertexClusteringProbabilityCutWithMass5060; + }else{ + vertexClusteringProbabilityCutWithMass = m_vertexClusteringProbabilityCutWithMass6070; + } + if (probVertexExcludingPrimary>vertexClusteringProbabilityCutWithMass) { doMerge=true; } - - if (doMerge) - { - - if (msgLvl(MSG::VERBOSE)) msg() <<" merging vtx number " << (*pairOfVxVertexOnJetAxis.first).getNumVertex() << - " and " << (*pairOfVxVertexOnJetAxis.second).getNumVertex() << " mass merged vertex: " << massTwoVertex << endmsg; - - m_helper->mergeVerticesInJetCandidate(*pairOfVxVertexOnJetAxisExcludingPrimary.first, - *pairOfVxVertexOnJetAxisExcludingPrimary.second, - *myJetCandidate); - - m_initializationHelper->updateTrackNumbering(myJetCandidate);//maybe this should be moved to a lower level... - continue;//go to next cycle, after a succesful merging - } - } - - noMoreVerticesToCluster=true; - - + if (doMerge){ + ATH_MSG_VERBOSE(" merging vtx number " << (*pairOfVxVertexOnJetAxis.first).getNumVertex() << + " and " << (*pairOfVxVertexOnJetAxis.second).getNumVertex() << " mass merged vertex: " << massTwoVertex ); + m_helper->mergeVerticesInJetCandidate(*pairOfVxVertexOnJetAxisExcludingPrimary.first, + *pairOfVxVertexOnJetAxisExcludingPrimary.second, + *myJetCandidate); + m_initializationHelper->updateTrackNumbering(myJetCandidate);//maybe this should be moved to a lower level... + continue;//go to next cycle, after a succesful merging + } + } + noMoreVerticesToCluster=true; } numClusteringLoops+=1; } while (numClusteringLoops<m_maxClusteringIterations&&!(noMoreVerticesToCluster)); @@ -2363,10 +2250,5 @@ namespace InDet //now a section should follow where the "complicate" VxJetCandidate is transformed in a conventional "VxCandidate" //so that it can be used also by the normal B-Tagging algorithms... //TO BE COMPLETED - - //return myJetCandidate; - } - - }//end namespace Rec diff --git a/InnerDetector/InDetRecTools/InDetSecVxFinderTool/src/InDetJetFitterVxFinder.cxx b/InnerDetector/InDetRecTools/InDetSecVxFinderTool/src/InDetJetFitterVxFinder.cxx index cb0218917394..3b2535d3515d 100755 --- a/InnerDetector/InDetRecTools/InDetSecVxFinderTool/src/InDetJetFitterVxFinder.cxx +++ b/InnerDetector/InDetRecTools/InDetSecVxFinderTool/src/InDetJetFitterVxFinder.cxx @@ -93,140 +93,96 @@ namespace InDet StatusCode InDetJetFitterVxFinder::initialize() { - - - StatusCode sc = AthAlgTool::initialize(); - if(sc.isFailure()) - { - msg(MSG::ERROR) << " Unable to initialize the AlgTool" << endmsg; - return sc; - } - //retrieving the udator itself - sc = m_helper.retrieve(); - if(sc.isFailure()) { - msg(MSG::ERROR) << " Unable to retrieve "<<m_helper<<endmsg; - return StatusCode::FAILURE; - }else msg(MSG::INFO) << "JetFitter Helper retrieved"<<endmsg; - - - sc = m_initializationHelper.retrieve(); - if(sc.isFailure()) { - msg(MSG::ERROR) << " Unable to retrieve "<<m_initializationHelper<<endmsg; - return StatusCode::FAILURE; - }else msg(MSG::INFO) << "JetFitter Initialization Helper retrieved"<<endmsg; - - sc = m_routines.retrieve(); - if(sc.isFailure()) { - msg(MSG::ERROR) << " Unable to retrieve the JetFitter routines"<<m_routines<<endmsg; - return StatusCode::FAILURE; - }else msg(MSG::INFO) << "JetFitter Routines class retrieved"<<endmsg; - - if(m_trkFilter.retrieve().isFailure()) { - msg(MSG::ERROR) << " Unable to retrieve "<<m_trkFilter<<endmsg; - return StatusCode::FAILURE; - } else msg(MSG::INFO) << "Track filter retrieved"<<endmsg; - - msg(MSG::INFO) << "Initialize successful" << endmsg; + ATH_CHECK(m_helper.retrieve()); + ATH_CHECK(m_initializationHelper.retrieve()); + ATH_CHECK(m_routines.retrieve()); + ATH_CHECK(m_trkFilter.retrieve()); return StatusCode::SUCCESS; } StatusCode InDetJetFitterVxFinder::finalize() { - - msg(MSG::INFO) << "Finalize successful" << endmsg; - return StatusCode::SUCCESS; - + ATH_MSG_DEBUG("Finalize ok"); + return StatusCode::SUCCESS; } - const Trk::VxSecVertexInfo* InDetJetFitterVxFinder::findSecVertex(const Trk::RecVertex & primaryVertex, - const TLorentzVector & jetMomentum, - const std::vector<const Trk::TrackParticleBase*> & myTracks) const { + const Trk::VxSecVertexInfo* + InDetJetFitterVxFinder::findSecVertex(const Trk::RecVertex & primaryVertex, + const TLorentzVector & jetMomentum, + const std::vector<const Trk::TrackParticleBase*> & myTracks) const { + Amg::Vector3D myDirection(jetMomentum.Vect().X(),jetMomentum.Vect().Y(),jetMomentum.Vect().Z()); - std::vector<TrackParticle_pair> tracks; - std::vector<const Trk::TrackParticleBase*>::const_iterator tracksBegin=myTracks.begin(); std::vector<const Trk::TrackParticleBase*>::const_iterator tracksEnd=myTracks.end(); for (std::vector<const Trk::TrackParticleBase*>::const_iterator tracksIter=tracksBegin; - tracksIter!=tracksEnd;++tracksIter) { + tracksIter!=tracksEnd;++tracksIter) { if (m_trkFilter->decision(**tracksIter,&primaryVertex)==true) { - tracks.push_back(TrackParticle_pair((*tracksIter)->perigee()->momentum().perp(),*tracksIter)); + tracks.push_back(TrackParticle_pair((*tracksIter)->perigee()->momentum().perp(),*tracksIter)); } } - std::vector<std::vector<const Trk::TrackParticleBase*> > bunchesOfTracks; - std::sort(tracks.begin(),tracks.end()); - std::vector<const Trk::TrackParticleBase*> tracksToAdd; - std::vector<TrackParticle_pair>::const_iterator tracks2Begin=tracks.begin(); std::vector<TrackParticle_pair>::const_iterator tracks2End=tracks.end(); for (std::vector<TrackParticle_pair>::const_iterator tracks2Iter=tracks2Begin; - tracks2Iter!=tracks2End;++tracks2Iter) { - if (msgLvl(MSG::VERBOSE)) msg() << " track: " << (*tracks2Iter).first << " and : " << (*tracks2Iter).second << endmsg; - + tracks2Iter!=tracks2End;++tracks2Iter) { + ATH_MSG_VERBOSE( " track: " << (*tracks2Iter).first << " and : " << (*tracks2Iter).second ); tracksToAdd.push_back((*tracks2Iter).second); if (tracksToAdd.size() % m_maxTracksToFitAtOnce == 0) { - if (msgLvl(MSG::VERBOSE)) msg() << " new bunch " << endmsg; - bunchesOfTracks.push_back(tracksToAdd); - tracksToAdd.clear(); + ATH_MSG_VERBOSE( " new bunch " ); + bunchesOfTracks.push_back(tracksToAdd); + tracksToAdd.clear(); } } - bunchesOfTracks.push_back(tracksToAdd); - std::vector<std::vector<const Trk::TrackParticleBase*> >::const_iterator BunchesBegin=bunchesOfTracks.begin(); std::vector<std::vector<const Trk::TrackParticleBase*> >::const_iterator BunchesEnd=bunchesOfTracks.end(); - std::vector<const Trk::TrackParticleBase*>::const_iterator tracksToAddBegin; std::vector<const Trk::TrackParticleBase*>::const_iterator tracksToAddEnd; std::vector<const Trk::TrackParticleBase*>::const_iterator tracksToAddIter; - - - Trk::VxJetCandidate* myJetCandidate=0; - + Trk::VxJetCandidate* myJetCandidate=nullptr; for (std::vector<std::vector<const Trk::TrackParticleBase*> >::const_iterator BunchesIter=BunchesBegin; - BunchesIter!=BunchesEnd;++BunchesIter) { - + BunchesIter!=BunchesEnd;++BunchesIter) { if (BunchesIter==BunchesBegin) { - if (msgLvl(MSG::VERBOSE)) msg() << " initial fit with " << (*BunchesIter).size() << " tracks " << endmsg; - myJetCandidate=m_initializationHelper->initializeJetCandidate(*BunchesIter,&primaryVertex,&myDirection); - m_routines->initializeToMinDistancesToJetAxis(myJetCandidate); - doTheFit(myJetCandidate); + if (not myJetCandidate) continue; + ATH_MSG_VERBOSE( " initial fit with " << (*BunchesIter).size() << " tracks " ); + myJetCandidate=m_initializationHelper->initializeJetCandidate(*BunchesIter,&primaryVertex,&myDirection); + m_routines->initializeToMinDistancesToJetAxis(myJetCandidate); + doTheFit(myJetCandidate); } else { - if (msgLvl(MSG::VERBOSE)) msg() << " other fit with " << (*BunchesIter).size() << " tracks " << endmsg; - std::vector<Trk::VxVertexOnJetAxis*> setOfVertices=myJetCandidate->getVerticesOnJetAxis(); - std::vector<Trk::VxTrackAtVertex*>* setOfTracks=myJetCandidate->vxTrackAtVertex(); - tracksToAddBegin=(*BunchesIter).begin(); - tracksToAddEnd=(*BunchesIter).end(); - for (tracksToAddIter=tracksToAddBegin;tracksToAddIter!=tracksToAddEnd;++tracksToAddIter) { - std::vector<Trk::VxTrackAtVertex*> temp_vector_tracksAtVertex; - ElementLink<Trk::TrackParticleBaseCollection> link; - link.setElement(const_cast<Trk::TrackParticleBase*>(*tracksToAddIter)); - Trk::LinkToTrackParticleBase * linkTT = new Trk::LinkToTrackParticleBase(link); - Trk::VxTrackAtVertex* newVxTrack=new Trk::VxTrackAtVertex(linkTT); - temp_vector_tracksAtVertex.push_back(newVxTrack); - setOfTracks->push_back(newVxTrack); - setOfVertices.push_back(new Trk::VxVertexOnJetAxis(temp_vector_tracksAtVertex)); - } - if (msgLvl(MSG::VERBOSE)) msg() << " new overall number of tracks to fit : " << setOfVertices.size() << endmsg; - myJetCandidate->setVerticesOnJetAxis(setOfVertices); - m_initializationHelper->updateTrackNumbering(myJetCandidate); - doTheFit(myJetCandidate); + if (not myJetCandidate) continue; + ATH_MSG_VERBOSE(" other fit with " << (*BunchesIter).size() << " tracks " ); + std::vector<Trk::VxVertexOnJetAxis*> setOfVertices=myJetCandidate->getVerticesOnJetAxis(); + std::vector<Trk::VxTrackAtVertex*>* setOfTracks=myJetCandidate->vxTrackAtVertex(); + tracksToAddBegin=(*BunchesIter).begin(); + tracksToAddEnd=(*BunchesIter).end(); + for (tracksToAddIter=tracksToAddBegin;tracksToAddIter!=tracksToAddEnd;++tracksToAddIter) { + std::vector<Trk::VxTrackAtVertex*> temp_vector_tracksAtVertex; + ElementLink<Trk::TrackParticleBaseCollection> link; + link.setElement(const_cast<Trk::TrackParticleBase*>(*tracksToAddIter)); + Trk::LinkToTrackParticleBase * linkTT = new Trk::LinkToTrackParticleBase(link); + Trk::VxTrackAtVertex* newVxTrack=new Trk::VxTrackAtVertex(linkTT); + temp_vector_tracksAtVertex.push_back(newVxTrack); + setOfTracks->push_back(newVxTrack); + setOfVertices.push_back(new Trk::VxVertexOnJetAxis(temp_vector_tracksAtVertex)); + } + ATH_MSG_VERBOSE( " new overall number of tracks to fit : " << setOfVertices.size() ); + myJetCandidate->setVerticesOnJetAxis(setOfVertices); + m_initializationHelper->updateTrackNumbering(myJetCandidate); + doTheFit(myJetCandidate); } } - std::vector<Trk::VxCandidate*> myCandidates; myCandidates.push_back(myJetCandidate); - -// return new Trk::VxSecVertexInfo(myCandidates);//ownership of the single objects is taken over! return 0; } - const Trk::VxSecVertexInfo* InDetJetFitterVxFinder::findSecVertex(const Trk::RecVertex & primaryVertex, + const Trk::VxSecVertexInfo* + InDetJetFitterVxFinder::findSecVertex(const Trk::RecVertex & primaryVertex, const TLorentzVector & jetMomentum, const std::vector<const Trk::TrackParticleBase*> & firstInputTracks, const std::vector<const Trk::TrackParticleBase*> & secondInputTracks, @@ -234,191 +190,149 @@ namespace InDet { Amg::Vector3D myDirection(jetMomentum.Vect().X(),jetMomentum.Vect().Y(),jetMomentum.Vect().Z()); - std::vector<std::vector<const Trk::TrackParticleBase*> > bunchesOfTracks; - std::vector<const Trk::TrackParticleBase*> tracksToAdd; - std::vector<const Trk::TrackParticleBase*>::const_iterator tracks2Begin=firstInputTracks.begin(); std::vector<const Trk::TrackParticleBase*>::const_iterator tracks2End=firstInputTracks.end(); for (std::vector<const Trk::TrackParticleBase*>::const_iterator tracks2Iter=tracks2Begin; - tracks2Iter!=tracks2End;++tracks2Iter) { - if (msgLvl(MSG::VERBOSE)) msg() << " adding track to fit " << endmsg; + tracks2Iter!=tracks2End;++tracks2Iter) { + ATH_MSG_VERBOSE( " adding track to fit " ); tracksToAdd.push_back(*tracks2Iter); } - bunchesOfTracks.push_back(tracksToAdd); tracksToAdd.clear(); - std::vector<const Trk::TrackParticleBase*>::const_iterator tracks3Begin=secondInputTracks.begin(); std::vector<const Trk::TrackParticleBase*>::const_iterator tracks3End=secondInputTracks.end(); for (std::vector<const Trk::TrackParticleBase*>::const_iterator tracks3Iter=tracks3Begin; - tracks3Iter!=tracks3End;++tracks3Iter) { - if (msgLvl(MSG::VERBOSE)) msg() << " adding track to fit " << endmsg; + tracks3Iter!=tracks3End;++tracks3Iter) { + ATH_MSG_VERBOSE( " adding track to fit " ); tracksToAdd.push_back(*tracks3Iter); } - - if (tracksToAdd.size()!=0) - { + if (not tracksToAdd.empty()) { bunchesOfTracks.push_back(tracksToAdd); } tracksToAdd.clear(); - - //now it just uses these bunches... //now I have just to make sure that no clustering is done at first iteration //while it needs to be done at second iteration (there will be only two iterations) - - std::vector<std::vector<const Trk::TrackParticleBase*> >::const_iterator BunchesBegin=bunchesOfTracks.begin(); std::vector<std::vector<const Trk::TrackParticleBase*> >::const_iterator BunchesEnd=bunchesOfTracks.end(); - std::vector<const Trk::TrackParticleBase*>::const_iterator tracksToAddBegin; std::vector<const Trk::TrackParticleBase*>::const_iterator tracksToAddEnd; std::vector<const Trk::TrackParticleBase*>::const_iterator tracksToAddIter; - - Trk::VxJetCandidate* myJetCandidate=0; - for (std::vector<std::vector<const Trk::TrackParticleBase*> >::const_iterator BunchesIter=BunchesBegin; - BunchesIter!=BunchesEnd;++BunchesIter) { - + BunchesIter!=BunchesEnd;++BunchesIter) { if (BunchesIter==BunchesBegin) { - if (msgLvl(MSG::VERBOSE)) msg() << " initial fit with " << (*BunchesIter).size() << " tracks " << endmsg; - myJetCandidate=m_initializationHelper->initializeJetCandidate(*BunchesIter,&primaryVertex,&myDirection,&vtxSeedDirection); - m_routines->initializeToMinDistancesToJetAxis(myJetCandidate); - if ((*BunchesIter).size()>0) - { + ATH_MSG_VERBOSE( " initial fit with " << (*BunchesIter).size() << " tracks " ); + myJetCandidate=m_initializationHelper->initializeJetCandidate(*BunchesIter,&primaryVertex,&myDirection,&vtxSeedDirection); + if (not myJetCandidate) continue; + m_routines->initializeToMinDistancesToJetAxis(myJetCandidate); + if (not BunchesIter->empty()) { doTheFit(myJetCandidate,true); } } else { - if (msgLvl(MSG::VERBOSE)) msg() << " other fit with " << (*BunchesIter).size() << " tracks " << endmsg; - std::vector<Trk::VxVertexOnJetAxis*> setOfVertices=myJetCandidate->getVerticesOnJetAxis(); - std::vector<Trk::VxTrackAtVertex*>* setOfTracks=myJetCandidate->vxTrackAtVertex(); - tracksToAddBegin=(*BunchesIter).begin(); - tracksToAddEnd=(*BunchesIter).end(); - for (tracksToAddIter=tracksToAddBegin;tracksToAddIter!=tracksToAddEnd;++tracksToAddIter) { - std::vector<Trk::VxTrackAtVertex*> temp_vector_tracksAtVertex; - ElementLink<Trk::TrackParticleBaseCollection> link; - link.setElement(const_cast<Trk::TrackParticleBase*>(*tracksToAddIter)); - Trk::LinkToTrackParticleBase * linkTT = new Trk::LinkToTrackParticleBase(link); - Trk::VxTrackAtVertex* newVxTrack=new Trk::VxTrackAtVertex(linkTT); - temp_vector_tracksAtVertex.push_back(newVxTrack); - setOfTracks->push_back(newVxTrack); - setOfVertices.push_back(new Trk::VxVertexOnJetAxis(temp_vector_tracksAtVertex)); - } - if (msgLvl(MSG::VERBOSE)) msg() << " new overall number of tracks to fit : " << setOfVertices.size() << endmsg; - myJetCandidate->setVerticesOnJetAxis(setOfVertices); - m_initializationHelper->updateTrackNumbering(myJetCandidate); - m_routines->initializeToMinDistancesToJetAxis(myJetCandidate); - doTheFit(myJetCandidate); + if (not myJetCandidate) continue; + ATH_MSG_VERBOSE( " other fit with " << BunchesIter->size() << " tracks " ); + std::vector<Trk::VxVertexOnJetAxis*> setOfVertices=myJetCandidate->getVerticesOnJetAxis(); + std::vector<Trk::VxTrackAtVertex*>* setOfTracks=myJetCandidate->vxTrackAtVertex(); + tracksToAddBegin=(*BunchesIter).begin(); + tracksToAddEnd=(*BunchesIter).end(); + for (tracksToAddIter=tracksToAddBegin;tracksToAddIter!=tracksToAddEnd;++tracksToAddIter) { + std::vector<Trk::VxTrackAtVertex*> temp_vector_tracksAtVertex; + ElementLink<Trk::TrackParticleBaseCollection> link; + link.setElement(const_cast<Trk::TrackParticleBase*>(*tracksToAddIter)); + Trk::LinkToTrackParticleBase * linkTT = new Trk::LinkToTrackParticleBase(link); + Trk::VxTrackAtVertex* newVxTrack=new Trk::VxTrackAtVertex(linkTT); + temp_vector_tracksAtVertex.push_back(newVxTrack); + setOfTracks->push_back(newVxTrack); + setOfVertices.push_back(new Trk::VxVertexOnJetAxis(temp_vector_tracksAtVertex)); + } + ATH_MSG_VERBOSE( " new overall number of tracks to fit : " << setOfVertices.size() ); + myJetCandidate->setVerticesOnJetAxis(setOfVertices); + m_initializationHelper->updateTrackNumbering(myJetCandidate); + m_routines->initializeToMinDistancesToJetAxis(myJetCandidate); + doTheFit(myJetCandidate); } } - std::vector<Trk::VxCandidate*> myCandidates; myCandidates.push_back(myJetCandidate); - -// return new Trk::VxSecVertexInfo(myCandidates);//ownership of the single objects is taken over! return 0; } - void InDetJetFitterVxFinder::doTheFit(Trk::VxJetCandidate* myJetCandidate, - bool performClustering) const { + void + InDetJetFitterVxFinder::doTheFit(Trk::VxJetCandidate* myJetCandidate, + bool performClustering) const { - int numClusteringLoops=0; bool noMoreVerticesToCluster(false); - do {//reguards clustering - - if (msgLvl(MSG::VERBOSE)) msg() << "InDetJetFitterVxFinder: ------>>>> new cycle of fit" << endmsg; - + ATH_MSG_VERBOSE( "InDetJetFitterVxFinder: ------>>>> new cycle of fit" ); int numLoops=0; bool noMoreTracksToDelete(false); do {//reguards eliminating incompatible tracks... - - m_routines->performTheFit(myJetCandidate,10,false,30,0.001); - - const std::vector<Trk::VxVertexOnJetAxis*> & vertices=myJetCandidate->getVerticesOnJetAxis(); - - std::vector<Trk::VxVertexOnJetAxis*>::const_iterator verticesBegin=vertices.begin(); - std::vector<Trk::VxVertexOnJetAxis*>::const_iterator verticesEnd=vertices.end(); - - - //delete incompatible tracks... - float max_prob(1.); - Trk::VxVertexOnJetAxis* worseVertex(0); - for (std::vector<Trk::VxVertexOnJetAxis*>::const_iterator verticesIter=verticesBegin; - verticesIter!=verticesEnd;++verticesIter) { - if (*verticesIter==0) { - if (msgLvl(MSG::WARNING)) msg() << "One vertex is empy. Problem when trying to delete incompatible vertices. No further vertices deleted." << endmsg; - } else { - const Trk::FitQuality & fitQuality=(*verticesIter)->fitQuality(); - if (TMath::Prob(fitQuality.chiSquared(),(int)std::floor(fitQuality.numberDoF()+0.5))<max_prob) { - max_prob=TMath::Prob(fitQuality.chiSquared(),(int)std::floor(fitQuality.numberDoF()+0.5)); - worseVertex=*verticesIter; - } - } - } - if (max_prob<m_vertexProbCut) { - if (msgLvl(MSG::DEBUG)) msg() << "Deleted vertex " << worseVertex->getNumVertex() << " with probability " << max_prob << endmsg; - // std::cout << "Deleted vertex " << worseVertex->getNumVertex() << " with probability " << max_prob << std::endl; - if (worseVertex==myJetCandidate->getPrimaryVertex()) { - if (msgLvl(MSG::INFO)) msg() << " The most incompatible vertex is the primary vertex. Please check..." << endmsg; - } - - m_routines->deleteVertexFromJetCandidate(worseVertex,myJetCandidate); - - } else { - noMoreTracksToDelete=true; - if (msgLvl(MSG::VERBOSE)) msg() << "No tracks to delete: maximum probability is " << max_prob << endmsg; - } - - numLoops+=1; + m_routines->performTheFit(myJetCandidate,10,false,30,0.001); + const std::vector<Trk::VxVertexOnJetAxis*> & vertices=myJetCandidate->getVerticesOnJetAxis(); + std::vector<Trk::VxVertexOnJetAxis*>::const_iterator verticesBegin=vertices.begin(); + std::vector<Trk::VxVertexOnJetAxis*>::const_iterator verticesEnd=vertices.end(); + //delete incompatible tracks... + float max_prob(1.); + Trk::VxVertexOnJetAxis* worseVertex(0); + for (std::vector<Trk::VxVertexOnJetAxis*>::const_iterator verticesIter=verticesBegin; + verticesIter!=verticesEnd;++verticesIter) { + if (*verticesIter==0) { + ATH_MSG_WARNING( "One vertex is empy. Problem when trying to delete incompatible vertices. No further vertices deleted." ); + } else { + const Trk::FitQuality & fitQuality=(*verticesIter)->fitQuality(); + if (TMath::Prob(fitQuality.chiSquared(),(int)std::floor(fitQuality.numberDoF()+0.5))<max_prob) { + max_prob=TMath::Prob(fitQuality.chiSquared(),(int)std::floor(fitQuality.numberDoF()+0.5)); + worseVertex=*verticesIter; + } + } + } + if (worseVertex and (max_prob<m_vertexProbCut)) { + ATH_MSG_DEBUG( "Deleted vertex " << worseVertex->getNumVertex() << " with probability " << max_prob ); + if (worseVertex==myJetCandidate->getPrimaryVertex()) { + ATH_MSG_INFO( " The most incompatible vertex is the primary vertex. Please check..." ); + } + m_routines->deleteVertexFromJetCandidate(worseVertex,myJetCandidate); + } else { + noMoreTracksToDelete=true; + ATH_MSG_VERBOSE( "No tracks to delete: maximum probability is " << max_prob ); + } + numLoops+=1; } while (numLoops<m_maxNumDeleteIterations&&!(noMoreTracksToDelete)); - if (!performClustering) break; - if (!m_useFastClustering) { - m_routines->fillTableWithFullProbOfMerging(myJetCandidate,5,false,10,0.01); + m_routines->fillTableWithFullProbOfMerging(myJetCandidate,5,false,10,0.01); } else { - m_routines->fillTableWithFastProbOfMerging(myJetCandidate); + m_routines->fillTableWithFastProbOfMerging(myJetCandidate); } const Trk::VxClusteringTable* clusteringTablePtr(myJetCandidate->getClusteringTable()); - - - - if (clusteringTablePtr==0) { - if (msgLvl(MSG::WARNING)) msg() << " No Clustering Table while it should have been calculated... no more clustering performed during vertexing " << endmsg; - noMoreVerticesToCluster=true; + ATH_MSG_WARNING( " No Clustering Table while it should have been calculated... no more clustering performed during vertexing " ); + noMoreVerticesToCluster=true; } else { - - if (msgLvl(MSG::VERBOSE)) msg() << " clustering table is " << *clusteringTablePtr << endmsg; - - //now iterate over the full map and decide wether you want to do the clustering OR not... - float probVertex(0.); - Trk::PairOfVxVertexOnJetAxis pairOfVxVertexOnJetAxis=clusteringTablePtr->getMostCompatibleVertices(probVertex); - //a PairOfVxVertexOnJetAxis is a std::pair<VxVertexOnJetAxis*,VxVertexOnJetAxis*> - - if (probVertex>0.&&probVertex>m_vertexClusteringProbabilityCut) { - if (msgLvl(MSG::VERBOSE)) msg() << " merging vtx number " << (*pairOfVxVertexOnJetAxis.first).getNumVertex() << - " and " << (*pairOfVxVertexOnJetAxis.second).getNumVertex() << endmsg; - // const Trk::VxVertexOnJetAxis & mergedVertex= - m_helper->mergeVerticesInJetCandidate(*pairOfVxVertexOnJetAxis.first, - *pairOfVxVertexOnJetAxis.second, - *myJetCandidate); - //now you need to update the numbering scheme - m_initializationHelper->updateTrackNumbering(myJetCandidate);//maybe this should be moved to a lower level... - - } else { - noMoreVerticesToCluster=true; - } + ATH_MSG_VERBOSE( " clustering table is " << *clusteringTablePtr ); + //now iterate over the full map and decide wether you want to do the clustering OR not... + float probVertex(0.); + Trk::PairOfVxVertexOnJetAxis pairOfVxVertexOnJetAxis=clusteringTablePtr->getMostCompatibleVertices(probVertex); + //a PairOfVxVertexOnJetAxis is a std::pair<VxVertexOnJetAxis*,VxVertexOnJetAxis*> + if (probVertex>0.&&probVertex>m_vertexClusteringProbabilityCut) { + ATH_MSG_VERBOSE( " merging vtx number " << (*pairOfVxVertexOnJetAxis.first).getNumVertex() << + " and " << (*pairOfVxVertexOnJetAxis.second).getNumVertex() ); + m_helper->mergeVerticesInJetCandidate(*pairOfVxVertexOnJetAxis.first, + *pairOfVxVertexOnJetAxis.second, + *myJetCandidate); + //now you need to update the numbering scheme + m_initializationHelper->updateTrackNumbering(myJetCandidate);//maybe this should be moved to a lower level... + } else { + noMoreVerticesToCluster=true; + } } numClusteringLoops+=1; } while (numClusteringLoops<m_maxClusteringIterations&&!(noMoreVerticesToCluster)); - //now a section should follow where the "complicate" VxJetCandidate is transformed in a conventional "VxCandidate" //so that it can be used also by the normal B-Tagging algorithms... //TO BE COMPLETED -- GitLab From 5591acfba6197803950c5f01cbef8925ededcf58 Mon Sep 17 00:00:00 2001 From: Jovan Mitrevski <Jovan.Mitrevski@cern.ch> Date: Fri, 6 Jul 2018 15:47:04 +0200 Subject: [PATCH 386/562] Fixing some bugs in the new egammaMVASvc; still not functional Former-commit-id: 11b1ce449a4b6521dc92002c5587427c3b4b518a --- .../python/egammaSuperClusterBuilder.py | 6 +- .../egammaMVACalib/egammaMVATreeHelpers.h | 58 ++++++++-- .../egammaMVACalib/src/egammaMVACalibTool.cxx | 105 ++++++++++++++---- .../egammaMVACalib/src/egammaMVASvc.cxx | 3 +- .../egamma/egammaMVACalib/src/egammaMVASvc.h | 10 +- .../egamma/egammaRec/python/Factories.py | 40 ++++++- .../python/egammaToolsFactories.py | 26 ++++- 7 files changed, 203 insertions(+), 45 deletions(-) diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py b/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py index d1081903d187..144685fb1c78 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py @@ -9,14 +9,14 @@ from egammaRec.egammaRecFlags import jobproperties # to set jobproperties.egamma from egammaRec import egammaKeys from egammaTools.egammaToolsFactories import \ - EMTrackMatchBuilder, EMConversionBuilder, egammaSwTool, egammaMVATool + EMTrackMatchBuilder, EMConversionBuilder, egammaSwTool, egammaMVASvc electronSuperClusterBuilder = AlgFactory( egammaAlgsConf.electronSuperClusterBuilder, name = 'electronSuperClusterBuilder', InputEgammaRecContainerName=egammaKeys.EgammaRecKey(), SuperElectronRecCollectionName=egammaKeys.ElectronSuperRecKey(), ClusterCorrectionTool=egammaSwTool, - MVACalibTool=egammaMVATool, + MVACalibSvc=egammaMVASvc, EtThresholdCut=1000, TrackMatchBuilderTool = EMTrackMatchBuilder ) @@ -26,6 +26,6 @@ photonSuperClusterBuilder = AlgFactory( egammaAlgsConf.photonSuperClusterBuilder InputEgammaRecContainerName=egammaKeys.EgammaRecKey(), SuperPhotonRecCollectionName=egammaKeys.PhotonSuperRecKey(), ClusterCorrectionTool=egammaSwTool, - MVACalibTool= egammaMVATool, + MVACalibSvc= egammaMVASvc, ConversionBuilderTool = EMConversionBuilder ) diff --git a/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVATreeHelpers.h b/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVATreeHelpers.h index ff064f0188d7..1227d1f764cc 100644 --- a/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVATreeHelpers.h +++ b/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVATreeHelpers.h @@ -133,6 +133,54 @@ namespace egammaMVATreeHelpers else return original; } + // a utility function + inline float getPtAtFirstMeasurement(const xAOD::TrackParticle* tp) + { + if (!tp) return 0; + for (unsigned int i = 0; i < tp->numberOfParameters(); ++i) { + if (tp->parameterPosition(i) == xAOD::FirstMeasurement) { + return hypot(tp->parameterPX(i), tp->parameterPY(i)); + } + } + return tp->pt(); + } + + // define a few without using conversion helper + inline float compute_ptconv(const xAOD::Photon* ph) + { + static const SG::AuxElement::Accessor<float> accPx("px"); + static const SG::AuxElement::Accessor<float> accPy("py"); + + auto vx = ph->vertex(); + return vx ? std::hypot(accPx(*vx), accPy(*vx)) : 0.0; + } + + inline float compute_pt1conv(const xAOD::Photon* ph) + { + static const SG::AuxElement::Accessor<float> accPt1("pt1"); + + const xAOD::Vertex* vx = ph->vertex(); + if (!vx) return 0.0; + if (accPt1.isAvailable(*vx)) { + return accPt1(*vx); + } else { + return getPtAtFirstMeasurement(vx->trackParticle(0)); + } + } + + inline float compute_pt2conv(const xAOD::Photon* ph) + { + static const SG::AuxElement::Accessor<float> accPt2("pt2"); + + const xAOD::Vertex* vx = ph->vertex(); + if (!vx) return 0.0; + if (accPt2.isAvailable(*vx)) { + return accPt2(*vx); + } else { + return getPtAtFirstMeasurement(vx->trackParticle(1)); + } + } + struct ConversionHelper { ConversionHelper(const xAOD::Photon* ph) @@ -217,16 +265,6 @@ namespace egammaMVATreeHelpers return sum.Perp(); } private: - float getPtAtFirstMeasurement(const xAOD::TrackParticle* tp) const - { - if (!tp) return 0; - for (unsigned int i = 0; i < tp->numberOfParameters(); ++i) - if (tp->parameterPosition(i) == xAOD::FirstMeasurement) - return hypot(tp->parameterPX(i), tp->parameterPY(i)); - static asg::AsgMessaging static_msg("ConversionHelper"); - static_msg.msg(MSG::WARNING) << "Could not find first parameter, return pt at perigee"; - return tp->pt(); - } const xAOD::Vertex* m_vertex; const xAOD::TrackParticle* m_tp0; const xAOD::TrackParticle* m_tp1; diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx index be07a9e1283b..82be8cf889d0 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx @@ -10,6 +10,7 @@ #include "xAODEgamma/PhotonxAODHelpers.h" #include "TFile.h" +#include "TMath.h" #include <cmath> @@ -224,34 +225,64 @@ StatusCode egammaMVACalibTool::initializeConvertedPhotonFuncs(std::unordered_map ATH_CHECK(initializeClusterFuncs(funcLibrary, "ph")); ATH_CHECK(initializeEgammaFuncs(funcLibrary, "ph")); - funcLibrary["ph_Rconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + using namespace egammaMVATreeHelpers; + + funcLibrary["ph_Rconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float { return xAOD::EgammaHelpers::conversionRadius(static_cast<const xAOD::Photon*>(eg)); }; + + funcLibrary["convR"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float + { + auto ph = static_cast<const xAOD::Photon*>(eg); + if (compute_ptconv(ph) > 3*CLHEP::GeV) { + return xAOD::EgammaHelpers::conversionRadius(ph); + } else { + return 799.0; + } + }; funcLibrary["ph_zconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) { return static_cast<const xAOD::Photon*>(eg)->vertex()->position().z(); }; - funcLibrary["ph_pt1conv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { - static const SG::AuxElement::Accessor<float> accPt1("pt1"); + funcLibrary["ph_pt1conv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float + { return compute_pt1conv(static_cast<const xAOD::Photon*>(eg)); }; + funcLibrary["ph_pt2conv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float + { return compute_pt2conv(static_cast<const xAOD::Photon*>(eg)); }; + funcLibrary["ph_ptconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return compute_ptconv(static_cast<const xAOD::Photon*>(eg)); }; - auto vx = static_cast<const xAOD::Photon*>(eg)->vertex(); - return accPt1(*vx); - }; - funcLibrary["ph_pt2conv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + funcLibrary["convPtRatio"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float { - static const SG::AuxElement::Accessor<float> accPt2("pt2"); - - auto vx = static_cast<const xAOD::Photon*>(eg)->vertex(); - return accPt2(*vx); + auto ph = static_cast<const xAOD::Photon*>(eg); + if (xAOD::EgammaHelpers::numberOfSiTracks(ph) == 2) { + auto pt1 = compute_pt1conv(ph); + auto pt2 = compute_pt2conv(ph); + return std::max(pt1, pt2)/(pt1+pt2); + } else { + return 1.0f; + } }; - - funcLibrary["ph_ptconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { - static const SG::AuxElement::Accessor<float> accPx("px"); - static const SG::AuxElement::Accessor<float> accPy("py"); - auto vx = static_cast<const xAOD::Photon*>(eg)->vertex(); - return std::hypot(accPx(*vx), accPy(*vx)); - }; - + if (m_use_layer_corrected) { + funcLibrary["convEtOverPt"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*cl)->float + { + auto ph = static_cast<const xAOD::Photon*>(eg); + + float rv = 0.0; + if (xAOD::EgammaHelpers::numberOfSiTracks(ph) == 2) { + rv = std::max(0.0f, compute_correctedcl_Eacc(*cl)/std::cosh(compute_cl_eta(*cl)*compute_ptconv(ph))); + } + return std::min(rv, 2.0f); + }; + } else { + funcLibrary["convEtOverPt"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*cl)->float + { + auto ph = static_cast<const xAOD::Photon*>(eg); + + float rv = 0.0; + if (xAOD::EgammaHelpers::numberOfSiTracks(ph) == 2) { + rv = std::max(0.0f, compute_rawcl_Eacc(*cl)/std::cosh(compute_cl_eta(*cl)*compute_ptconv(ph))); + } + return std::min(rv, 2.0f); + }; + } return StatusCode::SUCCESS; } @@ -276,6 +307,18 @@ StatusCode egammaMVACalibTool::initializeClusterFuncs(std::unordered_map<std::st funcLibrary[prefix + "_cl_E_TileGap3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return cl->eSample(CaloSampling::TileGap3); }; + funcLibrary["cellIndexCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return std::floor(std::abs(compute_cl_etaCalo(*cl))/0.025); }; + funcLibrary["phiModCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return ((abs(compute_cl_eta(*cl)) < 1.425) ? + std::fmod(compute_cl_phiCalo(*cl), TMath::Pi()/512) : + std::fmod(compute_cl_phiCalo(*cl), TMath::Pi()/384)); + }; + funcLibrary["etaModCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return std::fmod(std::abs(compute_cl_etaCalo(*cl)), 0.025); }; + funcLibrary["dPhiTG3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return std::fmod(2.*TMath::Pi()+compute_cl_phi(*cl),TMath::Pi()/32.)-TMath::Pi()/64.0; }; + if (m_use_layer_corrected) { funcLibrary[prefix + "_rawcl_Es0"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return compute_correctedcl_Es0(*cl); }; @@ -285,8 +328,16 @@ StatusCode egammaMVACalibTool::initializeClusterFuncs(std::unordered_map<std::st { return compute_correctedcl_Es2(*cl); }; funcLibrary[prefix + "_rawcl_Es3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return compute_correctedcl_Es3(*cl); }; + funcLibrary[prefix + "_rawcl_Eacc"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_correctedcl_Eacc(*cl); }; + funcLibrary[prefix + "_rawcl_f0"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_correctedcl_f0(*cl); }; funcLibrary[prefix + "_rawcl_calibHitsShowerDepth"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return compute_correctedcl_calibHitsShowerDepth(*cl); }; + funcLibrary["R12"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_correctedcl_Es1(*cl)/compute_correctedcl_Es2(*cl); }; + funcLibrary["fTG3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return cl->eSample(CaloSampling::TileGap3)/compute_correctedcl_Eacc(*cl); }; } else { funcLibrary[prefix + "_rawcl_Es0"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return compute_rawcl_Es0(*cl); }; @@ -296,10 +347,18 @@ StatusCode egammaMVACalibTool::initializeClusterFuncs(std::unordered_map<std::st { return compute_rawcl_Es2(*cl); }; funcLibrary[prefix + "_rawcl_Es3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return compute_rawcl_Es3(*cl); }; + funcLibrary[prefix + "_rawcl_Eacc"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_rawcl_Eacc(*cl); }; + funcLibrary[prefix + "_rawcl_f0"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_rawcl_f0(*cl); }; // and everything that depends on // static cast here is needed to resolve overload (std::function is not able to) funcLibrary[prefix + "_rawcl_calibHitsShowerDepth"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) { return compute_rawcl_calibHitsShowerDepth(*cl); }; + funcLibrary["R12"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_rawcl_Es1(*cl)/compute_rawcl_Es2(*cl); }; + funcLibrary["fTG3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return cl->eSample(CaloSampling::TileGap3)/compute_rawcl_Eacc(*cl); }; } return StatusCode::SUCCESS; @@ -424,7 +483,9 @@ float egammaMVACalibTool::getEnergy(const xAOD::Egamma* eg, // find the bin of BDT - const auto initEnergy = clus->energyBE(1) + clus->energyBE(2) + clus->energyBE(3); + const auto initEnergy = (m_use_layer_corrected ? + egammaMVATreeHelpers::compute_correctedcl_Eacc(*clus) : + egammaMVATreeHelpers::compute_rawcl_Eacc(*clus)); const auto energyVarGeV = (initEnergy / std::cosh(clus->eta())) / CLHEP::GeV; const auto etaVar = std::abs(clus->eta()); diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx index d290eba171b6..42f93c8f16e6 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx @@ -69,7 +69,8 @@ StatusCode egammaMVASvc::execute(xAOD::CaloCluster* cluster, ATH_MSG_FATAL("Trying to calibrate an electron, but disabled"); return StatusCode::FAILURE; } - } else if (xAOD::EgammaHelpers::isConvertedPhoton(eg)) { + } else if (xAOD::EgammaHelpers::isConvertedPhoton(eg) && + xAOD::EgammaHelpers::conversionRadius(static_cast<const xAOD::Photon*>(eg)) < m_maxConvR) { if (m_mvaConvertedPhoton.isEnabled()) { mvaE = m_mvaConvertedPhoton->getEnergy(eg, cluster); } else { diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h index 54719dddfb52..17f6ddac968a 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h @@ -48,15 +48,19 @@ private: /// MVA tool for electron ToolHandle<IegammaMVACalibTool> m_mvaElectron {this, - "MVAElectronTool", "", "Tool to handle MVA trees for electrons"}; + "ElectronTool", "", "Tool to handle MVA trees for electrons"}; /// MVA tool for uncovnerted photon ToolHandle<IegammaMVACalibTool> m_mvaUnconvertedPhoton {this, - "MVAElectronTool", "", "Tool to handle MVA trees for unconverted photons"}; + "UnconvertedPhotonTool", "", "Tool to handle MVA trees for unconverted photons"}; /// MVA tool for converted photon ToolHandle<IegammaMVACalibTool> m_mvaConvertedPhoton {this, - "MVAElectronTool", "", "Tool to handle MVA trees for converted photons"}; + "ConvertedPhotonTool", "", "Tool to handle MVA trees for converted photons"}; + + Gaudi::Property<float> m_maxConvR {this, + "MaxConvRadius", 800.0, + "The maximum conversion radius for a photon to be considered converted"}; }; diff --git a/Reconstruction/egamma/egammaRec/python/Factories.py b/Reconstruction/egamma/egammaRec/python/Factories.py index b055df233560..9f1cf598be2f 100644 --- a/Reconstruction/egamma/egammaRec/python/Factories.py +++ b/Reconstruction/egamma/egammaRec/python/Factories.py @@ -9,8 +9,9 @@ def factoriesInfo ( log): logFactories = logging.getLogger( 'Factories' ) logFactories.info(log) +# tools def isAlreadyInToolSvc( name ): - "isAlreadyInToolSvc ( mane of the tool ) --> check if the tool with name is already in the service" + "isAlreadyInToolSvc ( name of the tool ) --> check if the tool with name is already in the service" from AthenaCommon.AppMgr import ToolSvc if hasattr(ToolSvc, name): return True @@ -28,6 +29,27 @@ def addToToolSvc( tool ): ToolSvc += tool return tool +# services +def isAlreadyInServiceMgr( name ): + "isAlreadyInServiceMgr ( mane of the service ) --> check if the service with name is already in the manager" + from AthenaCommon.AppMgr import ServiceMgr + if hasattr(ServiceMgr, name): + return True + else: + return False + +def getFromServiceMgr( name ): + "getFromServiceMgr ( name of the service ) --> Get the service from manager by name " + from AthenaCommon.AppMgr import ServiceMgr + return getattr (ServiceMgr,name) + +def addToServiceMgr( service ): + "addToServiceMgr( service ) --> add service to ServiceMgr" + from AthenaCommon.AppMgr import ServiceMgr + ServiceMgr += service + return service + +# algs def isAlreadyInTopSequence( name ): "isAlreadyInTopSequence ( mane of the alg ) --> check if the alg with name is already in the Alg sequence" from AthenaCommon.AlgSequence import AlgSequence @@ -146,7 +168,7 @@ class Factory: # Call FcnWrapper or ToolFactory parameters # (or if they are inside a list, for ToolHandleArray) - classes = (FcnWrapper, ToolFactory, PublicToolFactory) + classes = (FcnWrapper, ToolFactory, PublicToolFactory, ServiceFactory) for paramName, value in params.items(): if isinstance(value, classes) or \ (isinstance(value, list) and any(isinstance(v, classes) for v in value) ): @@ -221,6 +243,20 @@ class PublicToolFactory( Factory ): else : factoriesInfo("Tool with name ==> %s already in ToolSvc, use existing instance" % obj.getFullName() ) +class ServiceFactory( Factory ): + """ServiceFactory: to instantiate services. Adds to ServiceMgr. See Factory""" + + def __init__(self, iclass, **defaults ): + self.iclass = iclass + self.defaults = dict({'doAdd': True}, **defaults) + + def add(self, obj): + if not isAlreadyInServiceMgr(obj.getName()): + factoriesInfo("Adding new Service ===> %s" % obj.getFullName()) + addToServiceMgr(obj) + else : + factoriesInfo("Service with name ==> %s already in ServiceMgr, use existing instance" % obj.getFullName() ) + class AlgFactory( Factory ): """AlgFactory: to instantiate algs and add them to TopSequence. See Factory""" def __init__(self, iclass, **defaults ): diff --git a/Reconstruction/egamma/egammaTools/python/egammaToolsFactories.py b/Reconstruction/egamma/egammaTools/python/egammaToolsFactories.py index db7a1494b7f7..61dce1c3a9ff 100644 --- a/Reconstruction/egamma/egammaTools/python/egammaToolsFactories.py +++ b/Reconstruction/egamma/egammaTools/python/egammaToolsFactories.py @@ -4,7 +4,7 @@ __doc__ = "ToolFactories to instantiate all egammaTools with default configurati __author__ = "Bruno Lenzi" import egammaToolsConf -from egammaRec.Factories import FcnWrapper, ToolFactory, PublicToolFactory, FullNameWrapper +from egammaRec.Factories import FcnWrapper, ToolFactory, ServiceFactory, FullNameWrapper from egammaRec import egammaKeys from egammaRec.egammaRecFlags import jobproperties # to set jobproperties.egammaRecFlags from RecExConfig.RecFlags import rec @@ -48,16 +48,34 @@ def configureClusterCorrections(swTool): egammaSwTool = ToolFactory(egammaToolsConf.egammaSwTool, postInit=[configureClusterCorrections]) -from egammaMVACalib import egammaMVACalibConf -egammaMVATool = PublicToolFactory(egammaMVACalibConf.egammaMVATool, +from egammaMVACalib import egammaMVACalibConf +import cppyy +cppyy.loadDictionary('xAODEgammaDict') +from ROOT import xAOD + +electronMVATool = ToolFactory(egammaMVACalibConf.egammaMVACalibTool, + ParticleType = xAOD.EgammaParameters.electron, folder=jobproperties.egammaRecFlags.calibMVAVersion()) +unconvPhotonMVATool = ToolFactory(egammaMVACalibConf.egammaMVACalibTool, + ParticleType = xAOD.EgammaParameters.unconvertedPhoton, + folder=jobproperties.egammaRecFlags.calibMVAVersion()) + +convertedPhotonMVATool = ToolFactory(egammaMVACalibConf.egammaMVACalibTool, + ParticleType = xAOD.EgammaParameters.convertedPhoton, + folder=jobproperties.egammaRecFlags.calibMVAVersion()) + +egammaMVASvc = ServiceFactory(egammaMVACalibConf.egammaMVASvc, + ElectronTool = electronMVATool, + UnconvertedPhotonTool = unconvPhotonMVATool, + ConvertedPhotonTool = convertedPhotonMVATool) + EMClusterTool = ToolFactory(egammaToolsConf.EMClusterTool, OutputClusterContainerName = egammaKeys.outputClusterKey(), OutputTopoSeededClusterContainerName = egammaKeys.outputTopoSeededClusterKey(), ClusterCorrectionTool = egammaSwTool, doSuperCluster = jobproperties.egammaRecFlags.doSuperclusters(), - MVACalibTool= egammaMVATool + MVACalibSvc = egammaMVASvc ) -- GitLab From d5b86ef6ca3f66a33615020a5b130098de4aa987 Mon Sep 17 00:00:00 2001 From: Christos Anastopoulos <christos.anastopoulos@cern.ch> Date: Fri, 6 Jul 2018 14:00:59 +0000 Subject: [PATCH 387/562] Remove dead code from the Electron LH Former-commit-id: f9a0c8e5cda19f571491bc6675ee1dcbc03e61b1 --- .../Root/AsgElectronLikelihoodTool.cxx | 26 ++---- .../Root/TElectronLikelihoodTool.cxx | 83 ++++--------------- .../Root/TElectronLikelihoodTool.h | 16 +--- .../python/ElectronLikelihoodMenuDefs.py | 14 +--- 4 files changed, 29 insertions(+), 110 deletions(-) diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronLikelihoodTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronLikelihoodTool.cxx index 6365e9a0e22a..08029de31b98 100644 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronLikelihoodTool.cxx +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronLikelihoodTool.cxx @@ -1,15 +1,14 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ /** @class AsgElectronLikelihoodTool - @brief Electron selector tool to select objects in Asgena using an underlying pure ROOT tool. + @brief Electron selector tool to select objects in Athena using an underlying pure ROOT tool. @author Karsten Koeneke @date October 2012 - - 09-APR-2014, convert to ASGTool (Jovan Mitrevski) + @update April 2014, converted to ASGTool by Jovan Mitrevski */ @@ -73,8 +72,6 @@ AsgElectronLikelihoodTool::AsgElectronLikelihoodTool(std::string myname) : declareProperty("CutLikelihood4GeV",m_rootTool->m_cutLikelihood4GeV,"Cut on likelihood discriminant, 4 GeV special bin"); // The pileup-correction part of the likelihood cut values - 4 GeV declareProperty("CutLikelihoodPileupCorrection4GeV",m_rootTool->m_cutLikelihoodPileupCorrection4GeV,"Pileup correction for LH discriminant, 4 GeV special bin"); - // do the conversion cut - declareProperty("doCutConversion",m_rootTool->m_doCutConversion,"Apply the conversion bit cut"); // do the ambiguity cut declareProperty("CutAmbiguity" ,m_rootTool->m_cutAmbiguity ,"Apply a cut on the ambiguity bit"); // cut on b-layer @@ -95,8 +92,6 @@ AsgElectronLikelihoodTool::AsgElectronLikelihoodTool(std::string myname) : declareProperty("doRemoveTRTPIDAtHighEt",m_rootTool->m_doRemoveTRTPIDAtHighEt,"Turn off TRTPID at high Et"); // use smooth interpolation between LH bins declareProperty("doSmoothBinInterpolation",m_rootTool->m_doSmoothBinInterpolation,"use smooth interpolation between LH bins"); - // use binning for high ET LH - declareProperty("useHighETLHBinning",m_rootTool->m_useHighETLHBinning,"Use binning for high ET LH"); // use one extra bin for high ET LH declareProperty("useOneExtraHighETLHBin",m_rootTool->m_useOneExtraHighETLHBin,"Use one extra bin for high ET LH"); // cut on Wstot above HighETBinThreshold @@ -206,8 +201,6 @@ StatusCode AsgElectronLikelihoodTool::initialize() m_rootTool->m_cutLikelihoodPileupCorrection = AsgConfigHelper::HelperDouble("CutLikelihoodPileupCorrection", env); m_rootTool->m_cutLikelihood4GeV = AsgConfigHelper::HelperDouble("CutLikelihood4GeV",env); m_rootTool->m_cutLikelihoodPileupCorrection4GeV = AsgConfigHelper::HelperDouble("CutLikelihoodPileupCorrection4GeV", env); - // do the conversion cut - m_rootTool->m_doCutConversion = env.GetValue("doCutConversion", false); // do the ambiguity cut m_rootTool->m_cutAmbiguity = AsgConfigHelper::HelperInt("CutAmbiguity", env); // cut on b-layer @@ -230,7 +223,6 @@ StatusCode AsgElectronLikelihoodTool::initialize() m_rootTool->m_doSmoothBinInterpolation = env.GetValue("doSmoothBinInterpolation", false); m_caloOnly = env.GetValue("caloOnly", false); - m_rootTool->m_useHighETLHBinning = env.GetValue("useHighETLHBinning", false); m_rootTool->m_useOneExtraHighETLHBin = env.GetValue("useOneExtraHighETLHBin", false); // cut on Wstot above HighETBinThreshold m_rootTool->m_cutWstotAtHighET = AsgConfigHelper::HelperDouble("CutWstotAtHighET", env); @@ -342,7 +334,6 @@ asg::AcceptData AsgElectronLikelihoodTool::accept( const xAOD::Electron* eg, dou float d0(0.0); float deltaEta=0, deltaPhiRescaled2=0; float wstot=0, EoverP=0; - int convBit(0); // this no longer works uint8_t ambiguityBit(0); double ip(0); @@ -405,11 +396,11 @@ asg::AcceptData AsgElectronLikelihoodTool::accept( const xAOD::Electron* eg, dou // for now don't cache. double likelihood = calculate(eg, ip); - ATH_MSG_VERBOSE( Form("PassVars: LH=%8.5f, eta=%8.5f, et=%8.5f, nSiHitsPlusDeadSensors=%i, nHitsPlusPixDeadSensors=%i, passBLayerRequirement=%i, convBit=%i, ambiguityBit=%i, d0=%8.5f, deltaEta=%8.5f, deltaphires=%5.8f, wstot=%8.5f, EoverP=%8.5f, ip=%8.5f", + ATH_MSG_VERBOSE( Form("PassVars: LH=%8.5f, eta=%8.5f, et=%8.5f, nSiHitsPlusDeadSensors=%i, nHitsPlusPixDeadSensors=%i, passBLayerRequirement=%i, ambiguityBit=%i, d0=%8.5f, deltaEta=%8.5f, deltaphires=%5.8f, wstot=%8.5f, EoverP=%8.5f, ip=%8.5f", likelihood, eta, et, nSiHitsPlusDeadSensors, nPixHitsPlusDeadSensors, passBLayerRequirement, - convBit, ambiguityBit, d0, deltaEta, deltaPhiRescaled2, + ambiguityBit, d0, deltaEta, deltaPhiRescaled2, wstot, EoverP, ip )); if (!allFound) { @@ -424,7 +415,6 @@ asg::AcceptData AsgElectronLikelihoodTool::accept( const xAOD::Electron* eg, dou nSiHitsPlusDeadSensors, nPixHitsPlusDeadSensors, passBLayerRequirement, - convBit, ambiguityBit, d0, deltaEta, @@ -477,7 +467,6 @@ asg::AcceptData AsgElectronLikelihoodTool::accept( const xAOD::Egamma* eg, doubl uint8_t nSiHitsPlusDeadSensors(0); uint8_t nPixHitsPlusDeadSensors(0); bool passBLayerRequirement(false); - int convBit(0); // this no longer works uint8_t ambiguityBit(0); // Get the pileup or centrality information @@ -507,11 +496,11 @@ asg::AcceptData AsgElectronLikelihoodTool::accept( const xAOD::Egamma* eg, doubl notFoundList += "wtots1 "; } - ATH_MSG_VERBOSE( Form("PassVars: LH=%8.5f, eta=%8.5f, et=%8.5f, nSiHitsPlusDeadSensors=%i, nPixHitsPlusDeadSensors=%i, passBLayerRequirement=%i, convBit=%i, ambiguityBit=%i, ip=%8.5f, wstot=%8.5f", + ATH_MSG_VERBOSE( Form("PassVars: LH=%8.5f, eta=%8.5f, et=%8.5f, nSiHitsPlusDeadSensors=%i, nPixHitsPlusDeadSensors=%i, passBLayerRequirement=%i, ambiguityBit=%i, ip=%8.5f, wstot=%8.5f", likelihood, eta, et, nSiHitsPlusDeadSensors, nPixHitsPlusDeadSensors, passBLayerRequirement, - convBit, ambiguityBit, ip, wstot)); + ambiguityBit, ip, wstot)); if (!allFound) { @@ -526,7 +515,6 @@ asg::AcceptData AsgElectronLikelihoodTool::accept( const xAOD::Egamma* eg, doubl nSiHitsPlusDeadSensors, nPixHitsPlusDeadSensors, passBLayerRequirement, - convBit, ambiguityBit, d0, deltaEta, diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronLikelihoodTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronLikelihoodTool.cxx index e5083ff8a972..dc8390f2626c 100644 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronLikelihoodTool.cxx +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronLikelihoodTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #include "TElectronLikelihoodTool.h" @@ -27,11 +27,9 @@ //---------------------------------------------------------------------------------------- Root::TElectronLikelihoodTool::TElectronLikelihoodTool(const char* name) : asg::AsgMessaging(std::string(name)), - m_doCutConversion(false), m_doRemoveF3AtHighEt(false), m_doRemoveTRTPIDAtHighEt(false), m_doSmoothBinInterpolation(false), - m_useHighETLHBinning(false), m_useOneExtraHighETLHBin(false), m_highETBinThreshold(125), m_doPileupTransform(false), @@ -48,7 +46,6 @@ Root::TElectronLikelihoodTool::TElectronLikelihoodTool(const char* name) : m_cutPosition_NSilicon(-9), m_cutPosition_NPixel(-9), m_cutPosition_NBlayer(-9), - m_cutPosition_conversion(-9), m_cutPosition_ambiguity(-9), m_cutPosition_LH(-9), m_cutPositionTrackA0(-9), @@ -110,10 +107,9 @@ StatusCode Root::TElectronLikelihoodTool::initialize() } unsigned int number_of_expected_bin_combinedLH ; - if(m_useHighETLHBinning) number_of_expected_bin_combinedLH = s_fnDiscEtBins*s_fnEtaBins ; - else if(m_useOneExtraHighETLHBin) number_of_expected_bin_combinedLH = s_fnDiscEtBinsOneExtra*s_fnEtaBins ; - else number_of_expected_bin_combinedLH = s_fnDiscEtBinsOrig*s_fnEtaBins ; - unsigned int number_of_expected_bin_combinedOther = s_fnDiscEtBinsOrig*s_fnEtaBins ; + if(m_useOneExtraHighETLHBin) number_of_expected_bin_combinedLH = s_fnDiscEtBinsOneExtra*s_fnEtaBins ; + else number_of_expected_bin_combinedLH = s_fnDiscEtBins*s_fnEtaBins ; + unsigned int number_of_expected_bin_combinedOther = s_fnDiscEtBins*s_fnEtaBins ; if( m_cutLikelihood.size() != number_of_expected_bin_combinedLH){ @@ -196,10 +192,6 @@ StatusCode Root::TElectronLikelihoodTool::initialize() m_cutPosition_NBlayer = m_acceptInfo.addCut( "NBlayer", "pass NBlayer" ); if ( m_cutPosition_NBlayer < 0 ) {sc = StatusCode::FAILURE;} - // Conversion - m_cutPosition_conversion = m_acceptInfo.addCut( "conversion", "pass conversion" ); - if ( m_cutPosition_conversion < 0 ) {sc = StatusCode::FAILURE;} - // Ambiguity m_cutPosition_ambiguity = m_acceptInfo.addCut( "ambiguity", "pass ambiguity" ); if ( m_cutPosition_ambiguity < 0 ) {sc = StatusCode::FAILURE;} @@ -277,12 +269,10 @@ StatusCode Root::TElectronLikelihoodTool::initialize() << "\n - (bool)CutBL (yes/no) : " << (m_cutBL.size() ? "yes" : "no") << "\n - (bool)CutPi (yes/no) : " << (m_cutPi.size() ? "yes" : "no") << "\n - (bool)CutSi (yes/no) : " << (m_cutSi.size() ? "yes" : "no") - << "\n - (bool)doCutConversion (yes/no) : " << (m_doCutConversion ? "yes" : "no") << "\n - (bool)CutAmbiguity (yes/no) : " << (m_cutAmbiguity.size() ? "yes" : "no") << "\n - (bool)doRemoveF3AtHighEt (yes/no) : " << (m_doRemoveF3AtHighEt ? "yes" : "no") << "\n - (bool)doRemoveTRTPIDAtHighEt (yes/no) : " << (m_doRemoveTRTPIDAtHighEt ? "yes" : "no") << "\n - (bool)doSmoothBinInterpolation (yes/no) : " << (m_doSmoothBinInterpolation ? "yes" : "no") - << "\n - (bool)useHighETLHBinning (yes/no) : " << (m_useHighETLHBinning ? "yes" : "no") << "\n - (bool)useOneExtraHighETLHBin(yes/no) : " << (m_useOneExtraHighETLHBin ? "yes" : "no") << "\n - (double)HighETBinThreshold : " << m_highETBinThreshold << "\n - (bool)doPileupTransform (yes/no) : " << (m_doPileupTransform ? "yes" : "no") @@ -338,10 +328,9 @@ int Root::TElectronLikelihoodTool::loadVarHistograms(std::string vstr,unsigned i return 1; } - // For backwards compatibility: - // If we are not using the high ET LH binning, we only need to load PDFs + // We only need to load PDFs // up to a certain ET value (40 GeV) - if(!m_useHighETLHBinning && et > s_fnEtBinsHistOrig-1){ + if(et > s_fnEtBinsHist-1){ continue; } @@ -378,7 +367,6 @@ Root::TElectronLikelihoodTool::accept( double likelihood, int nSiHitsPlusDeadSensors, int nPixHitsPlusDeadSensors, bool passBLayerRequirement, - int convBit, uint8_t ambiguityBit, double d0, double deltaEta, @@ -396,7 +384,6 @@ Root::TElectronLikelihoodTool::accept( double likelihood, vars.nSiHitsPlusDeadSensors = nSiHitsPlusDeadSensors; vars.nPixHitsPlusDeadSensors = nPixHitsPlusDeadSensors; vars.passBLayerRequirement = passBLayerRequirement; - vars.convBit = convBit; vars.ambiguityBit = ambiguityBit; vars.d0 = d0; vars.deltaEta = deltaEta; @@ -420,7 +407,6 @@ Root::TElectronLikelihoodTool::accept( LikeEnum::LHAcceptVars_t& vars_struct ) c bool passNSilicon(true); bool passNPixel(true); bool passNBlayer(true); - bool passConversion(true); bool passAmbiguity(true); bool passLH(true); bool passTrackA0(true); @@ -440,12 +426,12 @@ Root::TElectronLikelihoodTool::accept( LikeEnum::LHAcceptVars_t& vars_struct ) c //unsigned int ipbin = 0; // sanity - if (etbinLH >= s_fnDiscEtBins) { + if (etbinLH >= s_fnDiscEtBinsOneExtra) { ATH_MSG_WARNING( "Cannot evaluate likelihood for Et " << vars_struct.eT<< ". Returning false.."); passKine = false; } // sanity - if (etbinOther >= s_fnDiscEtBinsOrig) { + if (etbinOther >= s_fnDiscEtBins) { ATH_MSG_WARNING( "Cannot evaluate likelihood for Et " << vars_struct.eT<< ". Returning false.."); passKine = false; } @@ -455,12 +441,6 @@ Root::TElectronLikelihoodTool::accept( LikeEnum::LHAcceptVars_t& vars_struct ) c acceptData.setCutResult( m_cutPosition_kinematic, passKine ); if ( !passKine ){ return acceptData; } - // conversion bit - if (m_doCutConversion && vars_struct.convBit){ - ATH_MSG_DEBUG("Likelihood macro: Conversion Bit Failed." ); - passConversion = false; - } - // ambiguity bit if (m_cutAmbiguity.size()) { if ( !ElectronSelectorHelpers::passAmbiguity((xAOD::AmbiguityTool::AmbiguityType)vars_struct.ambiguityBit, @@ -579,7 +559,6 @@ Root::TElectronLikelihoodTool::accept( LikeEnum::LHAcceptVars_t& vars_struct ) c acceptData.setCutResult( m_cutPosition_NSilicon, passNSilicon ); acceptData.setCutResult( m_cutPosition_NPixel, passNPixel ); acceptData.setCutResult( m_cutPosition_NBlayer, passNBlayer ); - acceptData.setCutResult( m_cutPosition_conversion, passConversion ); acceptData.setCutResult( m_cutPosition_ambiguity, passAmbiguity ); acceptData.setCutResult( m_cutPosition_LH, passLH ); acceptData.setCutResult( m_cutPositionTrackA0, passTrackA0 ); @@ -889,28 +868,15 @@ unsigned int Root::TElectronLikelihoodTool::getLikelihoodEtaBin(double eta) cons unsigned int Root::TElectronLikelihoodTool::getLikelihoodEtHistBin(double eT) const { const double GeV = 1000; - if(m_useHighETLHBinning){ - const unsigned int nEtBins = s_fnEtBinsHist; - const double eTBins[nEtBins] = {7*GeV,10*GeV,15*GeV,20*GeV,30*GeV,40*GeV,100*GeV,6000*GeV}; + const unsigned int nEtBins = s_fnEtBinsHist; + const double eTBins[nEtBins] = {7*GeV,10*GeV,15*GeV,20*GeV,30*GeV,40*GeV,50*GeV}; - for(unsigned int eTBin = 0; eTBin < nEtBins; ++eTBin){ - if(eT < eTBins[eTBin]) - return eTBin; - } - - return nEtBins-1; // Return the last bin if > the last bin. + for(unsigned int eTBin = 0; eTBin < nEtBins; ++eTBin){ + if(eT < eTBins[eTBin]) + return eTBin; } - else{ - const unsigned int nEtBins = s_fnEtBinsHistOrig; - const double eTBins[nEtBins] = {7*GeV,10*GeV,15*GeV,20*GeV,30*GeV,40*GeV,50*GeV}; - for(unsigned int eTBin = 0; eTBin < nEtBins; ++eTBin){ - if(eT < eTBins[eTBin]) - return eTBin; - } - - return nEtBins-1; // Return the last bin if > the last bin. - } + return nEtBins-1; // Return the last bin if > the last bin. } //--------------------------------------------------------------------------------------- @@ -918,22 +884,7 @@ unsigned int Root::TElectronLikelihoodTool::getLikelihoodEtHistBin(double eT) co unsigned int Root::TElectronLikelihoodTool::getLikelihoodEtDiscBin(double eT, const bool isLHbinning) const{ const double GeV = 1000; - if(m_useHighETLHBinning && isLHbinning){ - const unsigned int nEtBins = s_fnDiscEtBins; - const double eTBins[nEtBins] = {10*GeV,15*GeV,20*GeV,25*GeV,30*GeV,35*GeV,40*GeV,45*GeV - ,100*GeV,150*GeV,200*GeV,250*GeV,300*GeV,350*GeV,400*GeV - ,450*GeV,500*GeV,600*GeV,700*GeV,800*GeV,900*GeV,1000*GeV - ,1200*GeV,1400*GeV,1600*GeV,1800*GeV,2000*GeV,2200*GeV - ,2400*GeV,2600*GeV,2800*GeV,3000*GeV,6000*GeV}; - - for(unsigned int eTBin = 0; eTBin < nEtBins; ++eTBin){ - if(eT < eTBins[eTBin]) - return eTBin; - } - - return nEtBins-1; // Return the last bin if > the last bin. - } - else if(m_useOneExtraHighETLHBin && isLHbinning){ + if(m_useOneExtraHighETLHBin && isLHbinning){ const unsigned int nEtBins = s_fnDiscEtBinsOneExtra; const double eTBins[nEtBins] = {10*GeV,15*GeV,20*GeV,25*GeV,30*GeV,35*GeV,40*GeV,45*GeV,m_highETBinThreshold*GeV,6000*GeV}; @@ -946,7 +897,7 @@ unsigned int Root::TElectronLikelihoodTool::getLikelihoodEtDiscBin(double eT, co } else{ - const unsigned int nEtBins = s_fnDiscEtBinsOrig; + const unsigned int nEtBins = s_fnDiscEtBins; const double eTBins[nEtBins] = {10*GeV,15*GeV,20*GeV,25*GeV,30*GeV,35*GeV,40*GeV,45*GeV,50*GeV}; for(unsigned int eTBin = 0; eTBin < nEtBins; ++eTBin){ @@ -964,7 +915,7 @@ unsigned int Root::TElectronLikelihoodTool::getLikelihoodEtDiscBin(double eT, co // Gets the bin name. Given the HISTOGRAM binning (fnEtBinsHist) void Root::TElectronLikelihoodTool::getBinName(char* buffer, int etbin,int etabin, int ipbin, std::string iptype) const{ double eta_bounds[9] = {0.0,0.6,0.8,1.15,1.37,1.52,1.81,2.01,2.37}; - int et_bounds[s_fnEtBinsHist] = {4,7,10,15,20,30,40,100}; + int et_bounds[s_fnEtBinsHist] = {4,7,10,15,20,30,40}; if (!iptype.empty()){ snprintf(buffer, 200,"%s%det%02deta%0.2f", iptype.c_str(), int(fIpBounds[ipbin]), et_bounds[etbin], eta_bounds[etabin]); } diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronLikelihoodTool.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronLikelihoodTool.h index b1b548c680c4..5f0017183e2b 100644 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronLikelihoodTool.h +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronLikelihoodTool.h @@ -109,7 +109,6 @@ namespace LikeEnum { int nSiHitsPlusDeadSensors; int nPixHitsPlusDeadSensors; bool passBLayerRequirement; - int convBit; uint8_t ambiguityBit; double d0; double deltaEta; @@ -185,7 +184,7 @@ namespace Root { double eta, double eT, int nSiHitsPlusDeadSensors, int nPixHitsPlusDeadSensors, bool passBLayerRequirement, - int convBit, uint8_t ambiguityBit, double d0, double deltaEta, double deltaphires, + uint8_t ambiguityBit, double d0, double deltaEta, double deltaphires, double wstot, double EoverP, double ip ) const; /** Return dummy accept with only info */ asg::AcceptData accept() const { return asg::AcceptData(&m_acceptInfo); } @@ -251,8 +250,6 @@ namespace Root { std::vector<double> m_cutDeltaEta; // /** @brief do cut on delta phi bit*/ std::vector<double> m_cutDeltaPhiRes; - /** @brief do cut on conversion bit*/ - bool m_doCutConversion; /** @brief do cut on ambiguity bit*/ std::vector<int> m_cutAmbiguity; /** @brief do remove f3 variable from likelihood at high Et (>80 GeV)*/ @@ -261,8 +258,6 @@ namespace Root { bool m_doRemoveTRTPIDAtHighEt; /** @brief do smooth interpolation between bins */ bool m_doSmoothBinInterpolation; - /** @brief use binning for high ET LH*/ - bool m_useHighETLHBinning; /** @brief use one extra bin for high ET LH*/ bool m_useOneExtraHighETLHBin; /** @brief ET threshold for using high ET cuts and bin */ @@ -352,9 +347,6 @@ namespace Root { /// The position of the NBlayer cut bit in the AcceptInfo return object int m_cutPosition_NBlayer; - /// The position of the conversion cut bit in the AcceptInfo return object - int m_cutPosition_conversion; - /// The position of the ambiguity cut bit in the AcceptInfo return object int m_cutPosition_ambiguity; @@ -377,10 +369,8 @@ namespace Root { int m_cutPositionEoverPAtHighET; static const double fIpBounds[IP_BINS+1]; - static const unsigned int s_fnEtBinsHist = 8; // number of hists stored for LH with many high ET bins (useHighETLHBinning), including 4GeV bin - static const unsigned int s_fnDiscEtBins = 33; // number of discs stored for LH with many high ET bins (useHighETLHBinning), excluding 4GeV bin - static const unsigned int s_fnEtBinsHistOrig = 7; // number of hists stored for original LH, including 4GeV bin (for backwards compatibility) - static const unsigned int s_fnDiscEtBinsOrig = 9; // number of discs stored for original LH, excluding 4GeV bin (for backwards compatibility) + static const unsigned int s_fnEtBinsHist = 7; // number of hists stored for original LH, including 4GeV bin (for backwards compatibility) + static const unsigned int s_fnDiscEtBins = 9; // number of discs stored for original LH, excluding 4GeV bin (for backwards compatibility) static const unsigned int s_fnDiscEtBinsOneExtra = 10; // number of discs stored for original LH plus one for HighETBinThreshold (useOneExtraHighETLHBin), excluding 4GeV bin static const unsigned int s_fnEtaBins = 10; static const unsigned int s_fnVariables = 13; diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ElectronLikelihoodMenuDefs.py b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ElectronLikelihoodMenuDefs.py index 00900caa12fa..f82c4e27eed7 100755 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ElectronLikelihoodMenuDefs.py +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ElectronLikelihoodMenuDefs.py @@ -1,8 +1,5 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -# default configuration of the ElectronLikelihoodMenuDefs -# - +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + import cppyy try : cppyy.loadDictionary('ElectronPhotonSelectorToolsDict') @@ -19,7 +16,6 @@ std.vector('int') # Import a needed helper from PATCore.HelperUtils import * - def ElectronLikelihoodCUSTOMMediumConfig(theTool) : ''' This is for the custom implementation of the MediumLLH definitions. @@ -33,9 +29,6 @@ def ElectronLikelihoodCUSTOMMediumConfig(theTool) : # PdfFileName theTool.inputPDFFileName = "ElectronPhotonSelectorTools/v1/ElectronLikelihoodPdfs.root" - # do cut on conversion - theTool.doCutConversion = 0 - # do remove f3 at high Et theTool.doRemoveF3AtHighEt = 0 @@ -88,9 +81,6 @@ def ElectronLikelihoodCUSTOMMediumNoGSFConfig(theTool) : # PdfFileName theTool.inputPDFFileName = "ElectronPhotonSelectorTools/v1/ElectronLikelihoodPdfs.root" - # do cut on conversion - theTool.doCutConversion = 0 - # do remove f3 at high Et theTool.doRemoveF3AtHighEt = 0 -- GitLab From 3b30ac26dd9f9e119a296a6ca6b7127e46df0269 Mon Sep 17 00:00:00 2001 From: Edward Moyse <edward.moyse@cern.ch> Date: Fri, 6 Jul 2018 14:01:54 +0000 Subject: [PATCH 388/562] Master vp1 miscfixes Former-commit-id: 7168881c2428a2c73a23c2ace4ef69d288bfb725 --- graphics/VP1/VP1Algs/share/vp1 | 12 +- graphics/VP1/VP1Algs/share/vp1.py | 276 ++++++++---------- .../VP1AODSystems/src/VertexCollHandle.cxx | 5 - 3 files changed, 126 insertions(+), 167 deletions(-) diff --git a/graphics/VP1/VP1Algs/share/vp1 b/graphics/VP1/VP1Algs/share/vp1 index 748820e9c941..9d167ec2ced7 100755 --- a/graphics/VP1/VP1Algs/share/vp1 +++ b/graphics/VP1/VP1Algs/share/vp1 @@ -157,7 +157,6 @@ FLAG_CAVERN=0 FLAG_TOYDETECTOR=0 FLAG_GEOMODELSTATS=0 FLAG_EXTRAPOLATOR=0 -FLAG_SPACEPOINTS=0 FLAG_NOEXTRAPOLATOR=0 FLAG_FITTER=0 FLAG_MC=0 @@ -286,8 +285,6 @@ while [ $i -le $# ]; do FLAG_TOYDETECTOR=1 elif [ "x${arg}" == "x-geomodel-stats" ]; then FLAG_GEOMODELSTATS=1 - elif [ "x${arg}" == "x-spacepoints" ]; then - FLAG_SPACEPOINTS=1 elif [ "x${arg}" == "x-extrapolator" ]; then FLAG_EXTRAPOLATOR=1 elif [ "x${arg}" == "x-noextrapolator" ]; then @@ -537,9 +534,6 @@ fi if [ "x$FLAG_NOID" == "x1" -a "x$FLAG_NOMUON" == "x1" -a "x$FLAG_EXTRAPOLATOR" == "x1" ]; then ERRORS="$ERRORS\nOptions -extrapolator can not be used when both -noid and -nomuon are specified" fi -if [ "x$FLAG_NOID" == "x1" -a "x$FLAG_SPACEPOINTS" == "x1" ]; then - ERRORS="$ERRORS\nOptions -spacepoints can not be used when -noid is specified" -fi if [ "x$FLAG_EXTRAPOLATOR" == "x1" -a "x$FLAG_NOEXTRAPOLATOR" == "x1" ]; then ERRORS="$ERRORS\nOptions -extrapolator and -noextrapolator are incompatible" @@ -962,10 +956,6 @@ if [ "x$FLAG_GEOMODELSTATS" != "x0" ]; then if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi OPTS="${OPTS}vp1GeoModelStats=True" fi -if [ "x$FLAG_SPACEPOINTS" != "x0" ]; then - if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi - OPTS="${OPTS}vp1SpacePoints=True" -fi if [ "x$FLAG_EXTRAPOLATOR" != "x0" ]; then if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi OPTS="${OPTS}vp1Extrapolator=True" @@ -980,7 +970,7 @@ if [ "x$FLAG_NOAUTOCONF" != "x0" ]; then fi if [ "x$FLAG_FITTER" != "x0" ]; then if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi - OPTS="${OPTS}vp1Fitter=True" + ERRORS="$ERRORS\nOption -refit is not currently supported." fi if [ "x$FLAG_FATRAS" != "x0" ]; then if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi diff --git a/graphics/VP1/VP1Algs/share/vp1.py b/graphics/VP1/VP1Algs/share/vp1.py index f3d499089be3..93b547cbeacc 100644 --- a/graphics/VP1/VP1Algs/share/vp1.py +++ b/graphics/VP1/VP1Algs/share/vp1.py @@ -8,7 +8,7 @@ if not 'vp1ALFA' in dir(): vp1ALFA=False if not 'vp1ForwardRegion' in dir(): vp1ForwardRegion=False if not 'vp1ZDC' in dir(): vp1ZDC=False if not 'vp1Extrapolator' in dir(): vp1Extrapolator=True -if not 'vp1Fitter' in dir(): vp1Fitter=False +# if not 'vp1Fitter' in dir(): vp1Fitter=False if not 'vp1Fatras' in dir(): vp1Fatras=False if not 'vp1FatrasMuon' in dir(): vp1FatrasMuon=(vp1Fatras and vp1Muon) if not 'vp1FatrasCalo' in dir(): vp1FatrasCalo=(vp1Fatras and vp1Calo) @@ -252,18 +252,7 @@ else: DetFlags.ZDC_setOff() if (vp1NSW): DetFlags.Micromegas_setOn() DetFlags.sTGC_setOn() - from GeoModelSvc.GeoModelSvcConf import GeoModelSvc - GeoModelSvc = GeoModelSvc() - GeoModelSvc.MuonVersionOverride="MuonSpectrometer-R.08.01-NSW" - from MuonAGDD.MuonAGDDConf import NSWAGDDTool - nTool=NSWAGDDTool('NewSmallWheel') - nTool.ReadAGDD=False - nTool.XMLFiles += ["stations.v2.03.xml"] - nTool.DefaultDetector="Muon" - nTool.Locked=False - nTool.Volumes += ["NewSmallWheel"] - ToolSvc+=nTool DetFlags.Print() @@ -284,7 +273,25 @@ if vp1Cavern: if (vp1Muon): if (vp1NSW): #DetDescrVersion="ATLAS-GEO-21-00-01" - include('MuonGeoModelTest/NSWGeoSetup.py') + # include('MuonGeoModelTest/NSWGeoSetup.py') + from GeoModelSvc.GeoModelSvcConf import GeoModelSvc + GeoModelSvc = GeoModelSvc() + GeoModelSvc.MuonVersionOverride="MuonSpectrometer-R.08.01-NSW" + + from MuonAGDD.MuonAGDDConf import NSWAGDDTool + nTool=NSWAGDDTool('NewSmallWheel') + nTool.ReadAGDD=False + nTool.XMLFiles += ["stations.v2.03.xml"] + nTool.DefaultDetector="Muon" + nTool.Locked=False + nTool.Volumes += ["NewSmallWheel"] + ToolSvc+=nTool + + from AGDD2GeoSvc.AGDD2GeoSvcConf import AGDDtoGeoSvc + Agdd2Geo=AGDDtoGeoSvc() + Agdd2Geo.Builders += ["NSWAGDDTool/NewSmallWheel"] + theApp.CreateSvc += ["AGDDtoGeoSvc"] + svcMgr += Agdd2Geo from AtlasGeoModel import Agdd2Geo @@ -326,39 +333,6 @@ if (vp1InputFiles != []): import AthenaPoolCnvSvc.ReadAthenaPool if (vp1ID): - from InDetRecExample.InDetJobProperties import InDetFlags - InDetFlags.loadTools = (vp1Extrapolator or vp1SpacePoints) - InDetFlags.preProcessing = vp1SpacePoints - InDetFlags.doPRDFormation = False - InDetFlags.doSpacePointFormation = vp1SpacePoints - InDetFlags.doNewTracking = False - InDetFlags.doiPatRec = False - InDetFlags.doxKalman = False - InDetFlags.doLowPt = False - InDetFlags.doLowBetaFinder = False - InDetFlags.doBackTracking = False - InDetFlags.doTRTStandalone = False - InDetFlags.doTrtSegments = False - InDetFlags.postProcessing = False - InDetFlags.doSlimming = False - InDetFlags.doVertexFinding = False - InDetFlags.doParticleCreation = False - InDetFlags.doConversions = False - InDetFlags.doSecVertexFinder = False - InDetFlags.doV0Finder = False - InDetFlags.doTrkNtuple = False - InDetFlags.doPixelTrkNtuple = False - InDetFlags.doSctTrkNtuple = False - InDetFlags.doTrtTrkNtuple = False - InDetFlags.doVtxNtuple = False - InDetFlags.doConvVtxNtuple = False - InDetFlags.doV0VtxNtuple = False - InDetFlags.doRefit = False - - InDetFlags.doStatistics = False - InDetFlags.useDCS = False - include( "InDetRecExample/InDetRec_jobOptions.py" ) - if (vp1Fatras and vp1FatrasTruthKey!=""): from FatrasExample.FatrasKeys import FatrasKeyFlags FatrasKeyFlags.InputMcEventCollection.set_Value(vp1FatrasTruthKey) @@ -452,111 +426,111 @@ if vp1Extrapolator and (vp1ID or vp1Muon): os.putenv("VP1_JOBCFG_EXTRA_VP1_EXTRAPOLATORS","Trk::Extrapolator/"+VP1ExtraPolatorName) #Fitter: -if vp1Fitter and vp1Extrapolator and (vp1ID or vp1Muon): - VP1TrkInitializer.ForceFitterTools = True - os.putenv("VP1_DEVEL_ENABLEREFIT","1") - ########################################################## - # The Extrapolator - include('TrkDetDescrSvc/AtlasTrackingGeometrySvc.py') - - from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import Trk__RungeKuttaPropagator as Propagator - VP1Propagator = Propagator(name = 'VP1Propagator') - ToolSvc += VP1Propagator - - # the Navigator has to get this one - from TrkExTools.TrkExToolsConf import Trk__Navigator - VP1Navigator = Trk__Navigator(name = 'VP1Navigator') - VP1Navigator.TrackingGeometrySvc = svcMgr.AtlasTrackingGeometrySvc - ToolSvc += VP1Navigator - - from TrkExTools.TrkExToolsConf import Trk__MaterialEffectsUpdator as MatUpdator - VP1MaterialUpdator = MatUpdator(name='VP1MaterialEffectsUpdator') - ToolSvc += VP1MaterialUpdator - - from TrkMeasurementUpdator_xk.TrkMeasurementUpdator_xkConf import Trk__KalmanUpdator_xk - VP1Updator = Trk__KalmanUpdator_xk(name = 'VP1Updator') - ToolSvc += VP1Updator - - from TrkDynamicNoiseAdjustor.TrkDynamicNoiseAdjustorConf import Trk__InDetDynamicNoiseAdjustment - VP1DNAdjustor = Trk__InDetDynamicNoiseAdjustment(name = 'VP1DNAdjustor') - #yminmax = 100.0) - ToolSvc += VP1DNAdjustor - from TrkKalmanFitter.TrkKalmanFitterConf import Trk__ForwardKalmanFitter as PublicFKF - VP1FKF = PublicFKF(name = 'VP1FKF', - StateChi2PerNDFPreCut = 25.0) - ToolSvc += VP1FKF - - from TrkKalmanFitter.TrkKalmanFitterConf import Trk__KalmanSmoother as PublicBKS - VP1BKS = PublicBKS(name = 'VP1BKS', - InitialCovarianceSeedFactor = 200.) - ToolSvc += VP1BKS - - from TrkKalmanFitter.TrkKalmanFitterConf import Trk__KalmanOutlierLogic as PublicKOL - VP1KOL = PublicKOL(name = 'VP1KOL', - StateChi2PerNDFCut = 12.5) - ToolSvc += VP1KOL - - #FIXME! Only do this for Muons? - from MuonRecExample import MuonRecTools - MdtTubeHitOnTrackCreator = MuonRecTools.getPublicTool("MdtTubeHitOnTrackCreator") - - from TrkRIO_OnTrackCreator.TrkRIO_OnTrackCreatorConf import Trk__RIO_OnTrackCreator - VP1RotCreator = Trk__RIO_OnTrackCreator(name = 'VP1RotCreator', - ToolMuonDriftCircle = MdtTubeHitOnTrackCreator , - Mode = 'all') - ToolSvc += VP1RotCreator - print VP1RotCreator - print MdtTubeHitOnTrackCreator - - from TrkKalmanFitter.TrkKalmanFitterConf import Trk__KalmanFitter as ConfiguredKalmanFitter - VP1KalmanFitter = ConfiguredKalmanFitter(name = 'VP1KalmanFitter', - ExtrapolatorHandle = VP1Extrapolator, - RIO_OnTrackCreatorHandle = VP1RotCreator, - MeasurementUpdatorHandle = VP1Updator, - ForwardKalmanFitterHandle = VP1FKF, - KalmanSmootherHandle = VP1BKS, - KalmanOutlierLogicHandle = VP1KOL, - DynamicNoiseAdjustorHandle = None, - AlignableSurfaceProviderHandle = None) - - ToolSvc += VP1KalmanFitter - - print VP1KalmanFitter - os.putenv("VP1_JOBCFG_EXTRA_VP1_FITTERS",VP1KalmanFitter.name()) - - - VP1KalmanFitterDNA = ConfiguredKalmanFitter(name = 'VP1KalmanFitterDNA', - ExtrapolatorHandle = VP1Extrapolator, - RIO_OnTrackCreatorHandle = VP1RotCreator, - MeasurementUpdatorHandle = VP1Updator, - ForwardKalmanFitterHandle = VP1FKF, - KalmanSmootherHandle = VP1BKS, - KalmanOutlierLogicHandle = VP1KOL, - DynamicNoiseAdjustorHandle = VP1DNAdjustor, - AlignableSurfaceProviderHandle = None) - - ToolSvc += VP1KalmanFitterDNA - os.putenv("VP1_JOBCFG_EXTRA_VP1_FITTERS",VP1KalmanFitterDNA.name()) - - - from TrkGlobalChi2Fitter.TrkGlobalChi2FitterConf import Trk__GlobalChi2Fitter - VP1GlobalChi2Fitter = Trk__GlobalChi2Fitter(name = 'VP1GlobalChi2Fitter', - ExtrapolationTool = VP1Extrapolator, - NavigatorTool = VP1Navigator, - PropagatorTool = VP1Propagator, - RotCreatorTool = VP1RotCreator, - MeasurementUpdateTool = VP1Updator, - StraightLine = False, - OutlierCut = 3.0, - SignedDriftRadius = True, - RecalculateDerivatives= True - ) - print VP1GlobalChi2Fitter - ToolSvc += VP1GlobalChi2Fitter - - VP1GlobalChi2Fitter.OutputLevel=DEBUG - - os.putenv("VP1_JOBCFG_EXTRA_VP1_FITTERS","Trk::KalmanFitter/"+VP1KalmanFitter.name()+";"+"Trk::KalmanFitter/"+VP1KalmanFitterDNA.name()+";"+"Trk::GlobalChi2Fitter/"+VP1GlobalChi2Fitter.name()) +# if vp1Fitter and vp1Extrapolator and (vp1ID or vp1Muon): +# VP1TrkInitializer.ForceFitterTools = True +# os.putenv("VP1_DEVEL_ENABLEREFIT","1") +# ########################################################## +# # The Extrapolator +# include('TrkDetDescrSvc/AtlasTrackingGeometrySvc.py') +# +# from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import Trk__RungeKuttaPropagator as Propagator +# VP1Propagator = Propagator(name = 'VP1Propagator') +# ToolSvc += VP1Propagator +# +# # the Navigator has to get this one +# from TrkExTools.TrkExToolsConf import Trk__Navigator +# VP1Navigator = Trk__Navigator(name = 'VP1Navigator') +# VP1Navigator.TrackingGeometrySvc = svcMgr.AtlasTrackingGeometrySvc +# ToolSvc += VP1Navigator +# +# from TrkExTools.TrkExToolsConf import Trk__MaterialEffectsUpdator as MatUpdator +# VP1MaterialUpdator = MatUpdator(name='VP1MaterialEffectsUpdator') +# ToolSvc += VP1MaterialUpdator +# +# from TrkMeasurementUpdator_xk.TrkMeasurementUpdator_xkConf import Trk__KalmanUpdator_xk +# VP1Updator = Trk__KalmanUpdator_xk(name = 'VP1Updator') +# ToolSvc += VP1Updator +# +# from TrkDynamicNoiseAdjustor.TrkDynamicNoiseAdjustorConf import Trk__InDetDynamicNoiseAdjustment +# VP1DNAdjustor = Trk__InDetDynamicNoiseAdjustment(name = 'VP1DNAdjustor') +# #yminmax = 100.0) +# ToolSvc += VP1DNAdjustor +# from TrkKalmanFitter.TrkKalmanFitterConf import Trk__ForwardKalmanFitter as PublicFKF +# VP1FKF = PublicFKF(name = 'VP1FKF', +# StateChi2PerNDFPreCut = 25.0) +# ToolSvc += VP1FKF +# +# from TrkKalmanFitter.TrkKalmanFitterConf import Trk__KalmanSmoother as PublicBKS +# VP1BKS = PublicBKS(name = 'VP1BKS', +# InitialCovarianceSeedFactor = 200.) +# ToolSvc += VP1BKS +# +# from TrkKalmanFitter.TrkKalmanFitterConf import Trk__KalmanOutlierLogic as PublicKOL +# VP1KOL = PublicKOL(name = 'VP1KOL', +# StateChi2PerNDFCut = 12.5) +# ToolSvc += VP1KOL +# +# #FIXME! Only do this for Muons? +# from MuonRecExample import MuonRecTools +# MdtTubeHitOnTrackCreator = MuonRecTools.getPublicTool("MdtTubeHitOnTrackCreator") +# +# from TrkRIO_OnTrackCreator.TrkRIO_OnTrackCreatorConf import Trk__RIO_OnTrackCreator +# VP1RotCreator = Trk__RIO_OnTrackCreator(name = 'VP1RotCreator', +# ToolMuonDriftCircle = MdtTubeHitOnTrackCreator , +# Mode = 'all') +# ToolSvc += VP1RotCreator +# print VP1RotCreator +# print MdtTubeHitOnTrackCreator +# +# from TrkKalmanFitter.TrkKalmanFitterConf import Trk__KalmanFitter as ConfiguredKalmanFitter +# VP1KalmanFitter = ConfiguredKalmanFitter(name = 'VP1KalmanFitter', +# ExtrapolatorHandle = VP1Extrapolator, +# RIO_OnTrackCreatorHandle = VP1RotCreator, +# MeasurementUpdatorHandle = VP1Updator, +# ForwardKalmanFitterHandle = VP1FKF, +# KalmanSmootherHandle = VP1BKS, +# KalmanOutlierLogicHandle = VP1KOL, +# DynamicNoiseAdjustorHandle = None, +# AlignableSurfaceProviderHandle = None) +# +# ToolSvc += VP1KalmanFitter +# +# print VP1KalmanFitter +# os.putenv("VP1_JOBCFG_EXTRA_VP1_FITTERS",VP1KalmanFitter.name()) +# +# +# VP1KalmanFitterDNA = ConfiguredKalmanFitter(name = 'VP1KalmanFitterDNA', +# ExtrapolatorHandle = VP1Extrapolator, +# RIO_OnTrackCreatorHandle = VP1RotCreator, +# MeasurementUpdatorHandle = VP1Updator, +# ForwardKalmanFitterHandle = VP1FKF, +# KalmanSmootherHandle = VP1BKS, +# KalmanOutlierLogicHandle = VP1KOL, +# DynamicNoiseAdjustorHandle = VP1DNAdjustor, +# AlignableSurfaceProviderHandle = None) +# +# ToolSvc += VP1KalmanFitterDNA +# os.putenv("VP1_JOBCFG_EXTRA_VP1_FITTERS",VP1KalmanFitterDNA.name()) +# +# +# from TrkGlobalChi2Fitter.TrkGlobalChi2FitterConf import Trk__GlobalChi2Fitter +# VP1GlobalChi2Fitter = Trk__GlobalChi2Fitter(name = 'VP1GlobalChi2Fitter', +# ExtrapolationTool = VP1Extrapolator, +# NavigatorTool = VP1Navigator, +# PropagatorTool = VP1Propagator, +# RotCreatorTool = VP1RotCreator, +# MeasurementUpdateTool = VP1Updator, +# StraightLine = False, +# OutlierCut = 3.0, +# SignedDriftRadius = True, +# RecalculateDerivatives= True +# ) +# print VP1GlobalChi2Fitter +# ToolSvc += VP1GlobalChi2Fitter +# +# VP1GlobalChi2Fitter.OutputLevel=DEBUG +# +# os.putenv("VP1_JOBCFG_EXTRA_VP1_FITTERS","Trk::KalmanFitter/"+VP1KalmanFitter.name()+";"+"Trk::KalmanFitter/"+VP1KalmanFitterDNA.name()+";"+"Trk::GlobalChi2Fitter/"+VP1GlobalChi2Fitter.name()) #On a machine where the hostname does not indicate domain, pool will #fail if trying to find nearest replica. In any case, dblookup.xml diff --git a/graphics/VP1/VP1Systems/VP1AODSystems/src/VertexCollHandle.cxx b/graphics/VP1/VP1Systems/VP1AODSystems/src/VertexCollHandle.cxx index 7e6482b4d485..70f7e932c6a8 100644 --- a/graphics/VP1/VP1Systems/VP1AODSystems/src/VertexCollHandle.cxx +++ b/graphics/VP1/VP1Systems/VP1AODSystems/src/VertexCollHandle.cxx @@ -114,11 +114,6 @@ VertexCollHandle::~VertexCollHandle() // clean the vector<handle> cleanupPtrContainer(m_d->handles); - // clean the QList<handle> - foreach(AODHandleBase* handle, m_d->handlesList) { - delete handle; - } - // delete the Imp instance delete m_d; -- GitLab From 0dd4292ff7c4d9219474efda55bd8f6aab72d080 Mon Sep 17 00:00:00 2001 From: Batool Safarzadeh Samani <batool.safarzadeh.samani@cern.ch> Date: Fri, 6 Jul 2018 15:01:38 +0000 Subject: [PATCH 389/562] Photon_menu with debugged Fex and Hypo Former-commit-id: bdce5497123c902599d07658b636516b93cccac8 --- .../python/TrigL2PhotonHypoTool.py | 18 +++ .../TrigEgammaHypo/src/TrigL2PhotonFexMT.cxx | 92 +++++--------- .../TrigEgammaHypo/src/TrigL2PhotonHypo.cxx | 6 +- .../src/TrigL2PhotonHypoTool.cxx | 59 +++++---- .../TrigEgammaHypo/src/TrigL2PhotonHypoTool.h | 24 ++-- .../TrigUpgradeTest/python/MenuHypoTools.py | 12 +- .../TrigUpgradeTest/python/photonMenuDefs.py | 120 ++++++++++++++++++ .../TrigUpgradeTest/share/photon.menu.py | 64 ++++++++++ .../test/test_photon_run_data.sh | 2 +- 9 files changed, 293 insertions(+), 104 deletions(-) create mode 100644 Trigger/TrigValidation/TrigUpgradeTest/python/photonMenuDefs.py create mode 100644 Trigger/TrigValidation/TrigUpgradeTest/share/photon.menu.py diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2PhotonHypoTool.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2PhotonHypoTool.py index db4f2d7e90fd..c74fb84f6984 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2PhotonHypoTool.py +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2PhotonHypoTool.py @@ -1,4 +1,5 @@ + def TrigL2PhotonHypoToolFromName( name ): """ provides configuration of the hypo tool giben the chain name The argument will be replaced by "parsed" chain dict. For now it only serves simplest chain HLT_eXYZ. @@ -26,6 +27,23 @@ def TrigL2PhotonHypoToolFromName( name ): tool.MonTool = monTool tool += monTool + from AthenaCommon.SystemOfUnits import GeV + nt = len( thresholds ) + tool.ETthr = [ [0.*GeV, 0.*GeV, 0.*GeV, 0.*GeV, 0.*GeV, 0.*GeV, 0.*GeV, 0.*GeV, 0.*GeV] ] *nt + tool.CARCOREthr = [ [0., 0., 0., 0., 0., 0., 0., 0., 0.] ] *nt + tool.CAERATIOthr = [ [0., 0., 0., 0., 0., 0., 0., 0., 0.] ] *nt + tool.EtaBins = [0, 0.6, 0.8, 1.15, 1.37, 1.52, 1.81, 2.01, 2.37, 2.47] *nt + tool.dETACLUSTERthr = [0.1] * nt + tool.dPHICLUSTERthr = [0.1] *nt + tool.F1thr = [0.005] *nt + tool.ET2thr = [ [90.0*GeV, 90.0*GeV, 90.0*GeV, 90.0*GeV, 90.0*GeV, 90.0*GeV, 90.0*GeV, 90.0*GeV, 90.0*GeV] ] *nt + tool.HADET2thr = [ [999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0] ] *nt + tool.HADETthr = [ [0.035, 0.035, 0.035, 0.035, 0.035, 0.035, 0.035, 0.035, 0.035] ] *nt + +# for th, thvalue in enumerate(thresholds): +# print th, thvalue +# tool.ETthr [ th ] = [(float(thvalue)-1.)*GeV]*9 + return tool diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonFexMT.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonFexMT.cxx index f2a6cda62371..cced6a9addf4 100755 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonFexMT.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonFexMT.cxx @@ -7,24 +7,14 @@ /************************************************************************** ** - ** Original Author: R.Goncalo - ** - ** File: Trigger/TrigHypothesis/TrigEgammaHypo/TrigL2PhotonHypo.cxx - ** - ** Description: Fex algo for TrigPhotons - ** - ** Modified by: R.Goncalo - ** V. Perez-Reale - ** A.Hamilton - ** V. Dao (new TrigPhoton constructor used) - ** - ** Created: Thu Jun 06 16:01:12 BST 2006 + ** Original Author: B.Safarzadeh + **************************************************************************/ #include "TrigL2PhotonFexMT.h" #include "xAODTrigCalo/TrigEMClusterContainer.h" #include "xAODTrigCalo/TrigEMClusterAuxContainer.h" -#include "xAODTrigEgamma/TrigPhotonAuxContainer.h" +#include "xAODTrigEgamma/TrigPhotonContainer.h" class ISvcLocator; @@ -33,7 +23,6 @@ class ISvcLocator; TrigL2PhotonFexMT::TrigL2PhotonFexMT(const std::string & name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator) { - m_trigPhotonContainer =0; } @@ -44,46 +33,37 @@ TrigL2PhotonFexMT::~TrigL2PhotonFexMT() StatusCode TrigL2PhotonFexMT::initialize() { -ATH_CHECK( m_roiCollectionKey.initialize() ); -ATH_CHECK( m_TrigEMClusterContainerKey.initialize() ); + ATH_CHECK( m_roiCollectionKey.initialize() ); + ATH_CHECK( m_TrigEMClusterContainerKey.initialize() ); + ATH_CHECK(m_outputPhotonsKey.initialize()); ATH_MSG_DEBUG("Initialization:"); - return StatusCode::SUCCESS; + return StatusCode::SUCCESS; } StatusCode TrigL2PhotonFexMT::finalize() { - ATH_MSG_INFO("in finalize()"); - return StatusCode::SUCCESS; + ATH_MSG_INFO("in finalize()"); + return StatusCode::SUCCESS; } StatusCode TrigL2PhotonFexMT::execute() { - using namespace xAOD; - auto ctx = getContext(); - - // xAOD::TrigPhotonAuxContainer trigPhotonAuxContainer; + using namespace xAOD; + auto ctx = getContext(); + // xAOD::TrigPhotonAuxContainer trigPhotonAuxContainer; auto trigPhotoColl = SG::makeHandle (m_outputPhotonsKey, ctx); ATH_CHECK( trigPhotoColl.record (std::make_unique<xAOD::TrigPhotonContainer>(), - std::make_unique<xAOD::TrigEMClusterAuxContainer>()) ); + std::make_unique<xAOD::TrigEMClusterAuxContainer>()) ); ATH_MSG_DEBUG( "Made WriteHandle " << m_outputPhotonsKey ); ATH_MSG_INFO( name() << " running with store " << getContext().getExtension<Atlas::ExtendedEventContext>()->proxy()->name() ); - // always create a TrigPhotonContainer, even if it will be empty - // if(!m_trigPhotonContainer) { - // m_trigPhotonContainer = new xAOD::TrigPhotonContainer(); - // m_trigPhotonContainer->setStore(&trigPhotonAuxContainer); - // } - // else { - // m_trigPhotonContainer->clear(); - //} - - auto roiCollection = SG::makeHandle(m_roiCollectionKey, ctx); + auto roiCollection = SG::makeHandle(m_roiCollectionKey, ctx); if (roiCollection->size()==0) { ATH_MSG_DEBUG(" RoI collection size = 0"); return StatusCode::SUCCESS; @@ -114,45 +94,39 @@ StatusCode TrigL2PhotonFexMT::execute() // retrieve the TrigEMCluster from the ElementLink - const xAOD::TrigEMCluster* pClus = elink_cluster; + const xAOD::TrigEMCluster* pClus = elink_cluster; if(pClus == 0){ - ATH_MSG_ERROR("Failed to retieve TrigEMCluster from the ElementLink"); - return StatusCode::SUCCESS; //HLT::MISSING_FEATURE; + ATH_MSG_ERROR("Failed to retieve TrigEMCluster from the ElementLink"); + return StatusCode::SUCCESS; //HLT::MISSING_FEATURE; } float dEta = pClus->eta() - etaRef; // Deal with angle diferences greater than Pi float dPhi = fabs(pClus->phi() - phiRef); dPhi = (dPhi < M_PI ? dPhi : 2*M_PI - dPhi ); - ATH_MSG_DEBUG("TrigPhoton will be built with: dEta=" << dEta - << " and dPhi= " << dPhi); - - + ATH_MSG_DEBUG("TrigPhoton will be built with: dEta=" << dEta + << " and dPhi= " << dPhi); // create TrigPhoton from TrigEMCluster xAOD::TrigPhoton* p_trigPhoton = new xAOD::TrigPhoton(); // push TrigPhoton into TrigPhotonContainer - m_trigPhotonContainer->push_back(p_trigPhoton); - p_trigPhoton->init( roiDescriptor->roiId(), dPhi, dEta, EClus); -// elink_cluster.getStorableObjectPointer(), -// elink_cluster.index() ); + trigPhotoColl->push_back(p_trigPhoton); + p_trigPhoton->init( roiDescriptor->roiId(), dPhi, dEta, EClus); - -ATH_MSG_DEBUG("REGTEST: TrigPhotonContainer has " << m_trigPhotonContainer->size() - << " element"); - if (!m_trigPhotonContainer->empty()) { - xAOD::TrigPhoton* p_tp = m_trigPhotonContainer->front(); - ATH_MSG_DEBUG("REGTEST: TrigPhoton: RoI=" << p_tp->roiWord() - << "; eta=" << p_tp->eta() - << "; phi=" << p_tp->phi() - << "; Et=" << p_tp->emCluster()->et() - << "; Had Et=" << p_tp->etHad() - << "; EnergyRatio=" << p_tp->eratio() - << "; rCore=" << p_tp->rcore()); - } - return StatusCode::SUCCESS; + ATH_MSG_DEBUG("REGTEST: TrigPhotonContainer has " << trigPhotoColl->size()<< " element"); + if (!trigPhotoColl->empty()) { + xAOD::TrigPhoton* p_tp = trigPhotoColl->front(); + ATH_MSG_DEBUG("REGTEST: TrigPhoton: RoI=" << p_tp->roiWord() + << "; eta=" << p_tp->eta() + << "; phi=" << p_tp->phi() + << "; Et=" << p_tp->emCluster()->et() + << "; Had Et=" << p_tp->etHad() + << "; EnergyRatio=" << p_tp->eratio() + << "; rCore=" << p_tp->rcore()); + } + return StatusCode::SUCCESS; } diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypo.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypo.cxx index ad8d0ec79758..d93f1a8166ab 100755 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypo.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypo.cxx @@ -1,5 +1,4 @@ // -*- C++ -*- - /* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ @@ -319,10 +318,7 @@ HLT::ErrorCode TrigL2PhotonHypo::hltExecute(const HLT::TriggerElement* outputTE, msg() << MSG::DEBUG << "TrigPhoton: ET_em=" << EmET << " cut in etaBin " << etaBin << " is ET_em >= " << m_eTthr[etaBin] << endmsg; } - if ( EmET < m_eTthr[etaBin]) return HLT::OK; - m_PassedCuts++; - - + if ( EmET < m_eTthr[etaBin]) return HLT::OK; m_PassedCuts++; // ET_had // find which ET_had to apply : this depends on the ET_em and the eta bin float hadET_cut=-1; diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.cxx index e56367e97506..de3982fb644b 100755 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.cxx @@ -1,3 +1,4 @@ + /* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ @@ -48,8 +49,7 @@ if ( *std::min_element( sizes.begin(), sizes.end() ) != *std::max_element( sizes TrigL2PhotonHypoTool::~TrigL2PhotonHypoTool() {} -bool TrigL2PhotonHypoTool::decideOnSingleObject( const xAOD::TrigPhoton* photon, - size_t cutIndex ) const { +bool TrigL2PhotonHypoTool::decideOnSingleObject( const xAOD::TrigPhoton* photon,size_t cutIndex ) const { using namespace Monitored; auto cutCounter = MonitoredScalar::declare<int>( "CutCounter", -1 ); @@ -79,16 +79,18 @@ bool TrigL2PhotonHypoTool::decideOnSingleObject( const xAOD::TrigPhoton* photon, double f1 = -99.0; double HadET = -99.0; - if ( photon == 0 ) - return false; - cutCounter++; + if(photon == 0) return false; + cutCounter++; + // Determine which eta bin to apply the cuts double absEta = fabs( photon->eta() ); + + int etaBin = -1; for (std::size_t iBin = 0; iBin < m_etabin.size()-1; iBin++) if ( absEta > m_etabin[iBin] && absEta < m_etabin[iBin+1] ) etaBin = iBin; - + // getting photon variable dEta = photon->dEta(); dPhi = photon->dPhi(); @@ -97,40 +99,46 @@ bool TrigL2PhotonHypoTool::decideOnSingleObject( const xAOD::TrigPhoton* photon, EmET = photon->pt(); HadET = photon->etHad(); f1 = photon->f1(); + + + if(m_etCutOnly) { ATH_MSG_DEBUG ( "EtCutOnly property is set: TrigPhoton: ET_em=" << EmET << " cut in etaBin " << etaBin << " is ET_em >= " << m_eTthr[0] ); - } - //now use the ratio, not the absolute HadEt (this is not yet persistified in the TrigPhoton) + + return true; + } HadEmRatio = (EmET!=0) ? HadET/EmET : -1.0; ATH_MSG_VERBOSE( "Cut index " << cutIndex ); + + if ( fabs(dEta) < m_detacluster[cutIndex] ){ ATH_MSG_VERBOSE( "Fails dEta cut " << fabs(dEta) << " < " << m_detacluster[cutIndex] ); return false; } cutCounter++; - + if ( fabs(dPhi) < m_dphicluster[cutIndex] ){ ATH_MSG_VERBOSE( "Fails dphi cut " << fabs(dPhi) << " < " << m_dphicluster[cutIndex] ); return false; } cutCounter++; - + // eta range if ( etaBin==-1 ) { ATH_MSG_VERBOSE( "Photon eta: " << absEta << " outside eta range " << m_etabin[m_etabin.size()-1] ); - return false; + return true; } else { ATH_MSG_VERBOSE( "eta bin used for cuts " << etaBin ); } cutCounter++; // passed eta cut // Reta (was previously called Rcore) - if ( Reta > m_carcorethr[etaBin][cutIndex] ){ + if ( Reta > m_carcorethr[cutIndex][etaBin] ){ ATH_MSG_VERBOSE( "TrigPhoton Reta=" << Reta - << " cut in etaBin " << etaBin << " is Reta >= " << m_carcorethr[etaBin][cutIndex] ); + << " cut in etaBin " << etaBin << " is Reta >= " << m_carcorethr[cutIndex][etaBin] ); return false; } cutCounter++; @@ -140,43 +148,41 @@ bool TrigL2PhotonHypoTool::decideOnSingleObject( const xAOD::TrigPhoton* photon, ATH_MSG_VERBOSE( "TrigPhoton: InCrack= " << inCrack << " F1=" << f1 << " Eratio cut not being applied" ); } else { - if ( Eratio > m_caeratiothr[etaBin][cutIndex] ) return false; + if ( Eratio > m_caeratiothr[cutIndex][etaBin] ) return false; } cutCounter++; if(inCrack) Eratio = -1; //Set default value in crack for monitoring. // ET_em - if ( EmET > m_eTthr[etaBin][cutIndex]) { + if ( EmET < m_eTthr[cutIndex][etaBin]) { ATH_MSG_VERBOSE( "TrigPhoton: ET_em=" << EmET - << " not in etaBin " << etaBin << " is ET_em < " << m_eTthr[etaBin][cutIndex] ); + << " not in etaBin " << etaBin << " is ET_em < " << m_eTthr[cutIndex][etaBin] ); return false; } cutCounter++; - // ET_had // find which ET_had to apply : this depends on the ET_em and the eta bin std::vector<double> hadET_cut={-1}; - if ( EmET > m_eT2thr[etaBin][cutIndex] ) { - hadET_cut[etaBin] = m_hadeT2thr[etaBin][cutIndex] ; - ATH_MSG_VERBOSE( "ET_em>" << m_eT2thr[etaBin][cutIndex] - << ": use high ET_had cut: <" << hadET_cut[etaBin] ); + if ( EmET > m_eT2thr[cutIndex][etaBin] ) { + hadET_cut[etaBin] = m_hadeT2thr[cutIndex][etaBin] ; + ATH_MSG_VERBOSE( "ET_em>" << m_eT2thr[cutIndex][etaBin] ); } else { - hadET_cut[etaBin] = m_hadeTthr[etaBin][cutIndex]; - ATH_MSG_VERBOSE( "ET_em<" << m_eT2thr[etaBin][cutIndex] - << ": use low ET_had cut: <" << hadET_cut[etaBin] ); + hadET_cut[etaBin] = m_hadeTthr[cutIndex][etaBin]; + ATH_MSG_VERBOSE( "ET_em<" << m_eT2thr[cutIndex][etaBin] ); } if ( HadEmRatio < hadET_cut[etaBin] ){ ATH_MSG_VERBOSE( "TrigPhoton: ET_had=" << HadEmRatio - << " not in etaBin " << etaBin << " is ET_had <=" << hadET_cut[etaBin] ); + << " not in etaBin " << etaBin ); return false; } cutCounter++; + return true; - + } StatusCode TrigL2PhotonHypoTool::inclusiveSelection( std::vector<PhotonInfo>& input ) const { @@ -200,6 +206,7 @@ StatusCode TrigL2PhotonHypoTool::markPassing( std::vector<PhotonInfo>& input, co return StatusCode::SUCCESS; } + StatusCode TrigL2PhotonHypoTool::decide( std::vector<PhotonInfo>& input ) const { if ( m_multiplicity == 1 ) { return inclusiveSelection( input ); diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.h index ea24e7187812..93e3d6c0f4b6 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.h +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoTool.h @@ -60,18 +60,18 @@ class TrigL2PhotonHypoTool : virtual public ::AthAlgTool Gaudi::Property<bool> m_respectPreviousDecision{ this, "RespectPreviousDecision", false, "If false, ( do not even check ), the decision made for the cluster" }; Gaudi::Property<bool> m_acceptAll{ this, "AcceptAll", false, "Ignore selection" }; - Gaudi::Property<bool> m_etCutOnly{ this, "EtCutOnly", false, "" }; - Gaudi::Property< std::vector<double> > m_etabin{ this, "EtaBins", {}, "Eta bins" }; - - Gaudi::Property< std::vector<double> > m_detacluster{ this, "dETACLUSTERthr", {0.2}, "Delta Eta to Cluster" }; - Gaudi::Property< std::vector<double> > m_dphicluster{ this, "dPHICLUSTERthr", {0.2}, "Delta Phi to Cluster" }; - Gaudi::Property< std::vector<double> > m_F1thr{ this, "F1thr", {}, "F1 Threshold" }; - Gaudi::Property< std::vector<std::vector<double>> > m_eTthr{this, "m_eTthr", {{}}, "et threshold"}; - Gaudi::Property< std::vector<std::vector<double>> > m_eT2thr{this, "m_eT2thr", {{}}, "eT2 threshold"}; - Gaudi::Property< std::vector<std::vector<double>> > m_hadeTthr{this, "m_hadeTthr", {{}}, "hadet threshold"}; - Gaudi::Property< std::vector<std::vector<double>> > m_hadeT2thr{this, "m_hadeT2thr", {{}}, "hadet2 threshold"}; - Gaudi::Property< std::vector<std::vector<double>> > m_carcorethr{this, "m_carcorethr", {{}}, "car core threshold"}; - Gaudi::Property< std::vector<std::vector<double>> > m_caeratiothr{this, "m_caeratiothr", {{}}, " cera ratio threshold"}; + Gaudi::Property<bool> m_etCutOnly{ this, "EtCutOnly", true, "" }; + Gaudi::Property< std::vector<double> > m_etabin{ this, "EtaBins", {0, 0.6, 0.8, 1.15, 1.37, 1.52, 1.81, 2.01, 2.37, 2.47}, "Eta bins" }; + + Gaudi::Property< std::vector<double> > m_detacluster{ this, "dETACLUSTERthr", {0.1}, "Delta Eta to Cluster" }; + Gaudi::Property< std::vector<double> > m_dphicluster{ this, "dPHICLUSTERthr", {0.1}, "Delta Phi to Cluster" }; + Gaudi::Property< std::vector<double> > m_F1thr{ this, "F1thr", {0.005}, "F1 Threshold" }; + Gaudi::Property< std::vector<std::vector<double>> > m_eTthr{this, "ETthr", {{0.*CLHEP::GeV}}, "et threshold"}; + Gaudi::Property< std::vector<std::vector<double>> > m_eT2thr{this, "ET2thr", {{90.0*CLHEP::GeV}}, "eT2 threshold"}; + Gaudi::Property< std::vector<std::vector<double>> > m_hadeTthr{this, "HADETthr", {{0.}}, "hadet threshold"}; + Gaudi::Property< std::vector<std::vector<double>> > m_hadeT2thr{this, "HADET2thr", {{0.}}, "hadet2 threshold"}; + Gaudi::Property< std::vector<std::vector<double>> > m_carcorethr{this, "CARCOREthr", {{0.}}, "car core threshold"}; + Gaudi::Property< std::vector<std::vector<double>> > m_caeratiothr{this, "CAERATIOthr", {{0.}}, " cera ratio threshold"}; size_t m_multiplicity = 1; diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/MenuHypoTools.py b/Trigger/TrigValidation/TrigUpgradeTest/python/MenuHypoTools.py index 2481a465d5cf..2e5752709e26 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/MenuHypoTools.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/MenuHypoTools.py @@ -1,8 +1,9 @@ from TrigUpgradeTest.HLTSignatureConfig import TestHypoTool, MuTestHypoTool, ElTestHypoTool -from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2CaloHypoToolInc, TrigL2CaloHypoToolMult, TrigL2ElectronHypoTool +from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2CaloHypoToolInc, TrigL2CaloHypoToolMult, TrigL2ElectronHypoTool, TrigL2PhotonHypoTool #from TrigEgammaHypo.TrigL2CaloHypoTool import * from TrigMuonHypo.TrigMuonHypoConf import TrigMufastHypoTool +from AthenaCommon.Constants import VERBOSE,INFO,DEBUG def createHypoTool(hypoToolClassName, hypoToolName): try: @@ -27,6 +28,15 @@ def TrigL2ElectronHypoToolConf(name): hypotool.OutputLevel = DEBUG return hypotool +def TrigL2PhotonHypoToolConf(name): + from AthenaCommon.Constants import DEBUG + from TrigEgammaHypo.TrigL2PhotonHypoTool import TrigL2PhotonHypoToolFromName + hypotool= TrigL2PhotonHypoToolFromName(name) + hypotool.OutputLevel = VERBOSE + return hypotool + + + def TrigMufastHypoToolConf(name): from AthenaCommon.Constants import DEBUG diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/photonMenuDefs.py b/Trigger/TrigValidation/TrigUpgradeTest/python/photonMenuDefs.py new file mode 100644 index 000000000000..218c357f6eb0 --- /dev/null +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/photonMenuDefs.py @@ -0,0 +1,120 @@ +# +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# + +from AthenaCommon.Include import include +from AthenaCommon.Constants import VERBOSE,DEBUG +from AthenaCommon.AppMgr import ServiceMgr as svcMgr +import AthenaCommon.CfgMgr as CfgMgr + +# menu components +from TrigUpgradeTest.MenuComponents import HLTRecoSequence, MenuSequence + +# =============================================================================================== +# L2 Calo +# =============================================================================================== + +from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import T2CaloEgamma_FastAlgo +theFastCaloAlgo=T2CaloEgamma_FastAlgo("FastCaloAlgo" ) +theFastCaloAlgo.OutputLevel=VERBOSE +theFastCaloAlgo.ClustersName="L2CaloClusters" +svcMgr.ToolSvc.TrigDataAccess.ApplyOffsetCorrection=False + + +from TrigMultiVarHypo.TrigL2CaloRingerFexMTInit import init_ringer +trigL2CaloRingerFexMT = init_ringer() +trigL2CaloRingerFexMT.OutputLevel = DEBUG + + + +from AthenaCommon.CFElements import parOR, seqOR, seqAND, stepSeq +from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm + +fastCaloInViewAlgs = seqAND("fastCaloInViewAlgs", [theFastCaloAlgo, trigL2CaloRingerFexMT]) + + + +fastCaloViewsMaker = EventViewCreatorAlgorithm("fastCaloViewsMaker", OutputLevel=DEBUG) +fastCaloViewsMaker.ViewFallThrough = True +fastCaloViewsMaker.RoIsLink = "initialRoI" # -||- +fastCaloViewsMaker.InViewRoIs = "EMCaloRoIs" # contract with the fastCalo +fastCaloViewsMaker.Views = "EMCaloViews" +fastCaloViewsMaker.ViewNodeName = "fastCaloInViewAlgs" +theFastCaloAlgo.RoIs = fastCaloViewsMaker.InViewRoIs + +# are these needed? +CaloViewVerify = CfgMgr.AthViews__ViewDataVerifier("FastCaloViewDataVerifier") +CaloViewVerify.DataObjects = [('TrigRoiDescriptorCollection' , 'StoreGateSvc+fastCaloViewsMaker_InViewRoIs_out')] + + +from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2CaloHypoAlgMT +theFastCaloHypo = TrigL2CaloHypoAlgMT("L2CaloHypo") +theFastCaloHypo.OutputLevel = DEBUG +theFastCaloHypo.CaloClusters = theFastCaloAlgo.ClustersName + + +fastCaloSequence = seqAND("fastCaloSequence",[fastCaloViewsMaker, fastCaloInViewAlgs ]) + +fastCalo_HLTSequence = HLTRecoSequence("fastCalo_HLTSequence", + Sequence=fastCaloSequence, + Maker=fastCaloViewsMaker, + Seed="L1EM") + +fastCaloSequence = MenuSequence("egammaCaloStep", + recoSeqList=[fastCalo_HLTSequence], + Hypo=theFastCaloHypo, + HypoToolClassName="TrigL2CaloHypoToolConf") + + + +ViewVerify = CfgMgr.AthViews__ViewDataVerifier("photonViewDataVerifier") +ViewVerify.DataObjects = [('xAOD::TrigEMClusterContainer','StoreGateSvc+L2CaloClusters')] +ViewVerify.OutputLevel = DEBUG + +from TrigEgammaHypo.TrigL2PhotonFexMTConfig import L2PhotonFex_1 +thePhotonFex= L2PhotonFex_1() +thePhotonFex.TrigEMClusterName = theFastCaloAlgo.ClustersName +thePhotonFex.PhotonsName="Photons" +thePhotonFex.OutputLevel=VERBOSE +#thePhotonFex.RoIs="EMIDRoIs" + + + +l2PhotonViewsMaker = EventViewCreatorAlgorithm("l2PhotonViewsMaker", OutputLevel=DEBUG) +l2PhotonViewsMaker.RoIsLink = "roi" +l2PhotonViewsMaker.InViewRoIs = "EMIDRoIs" +#l2PhotonViewsMaker.InViewRoIs = "EMCaloRoIs" +l2PhotonViewsMaker.Views = "EMPhotonViews" +l2PhotonViewsMaker.ViewFallThrough = True +thePhotonFex.RoIs = l2PhotonViewsMaker.InViewRoIs + + +photonInViewAlgs = parOR("photonInViewAlgs", [ViewVerify, thePhotonFex ]) + +l2PhotonViewsMaker.ViewNodeName = "photonInViewAlgs" + + +from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2PhotonHypoAlgMT +thePhotonHypo = TrigL2PhotonHypoAlgMT() +thePhotonHypo.Photons = thePhotonFex.PhotonsName +thePhotonHypo.RunInView=True +thePhotonHypo.OutputLevel = VERBOSE + +# this needs to be added: +#electronDecisionsDumper = DumpDecisions("electronDecisionsDumper", OutputLevel=DEBUG, Decisions = theElectronHypo.Output ) + + + +photonSequence = seqAND("photonSequence", [l2PhotonViewsMaker, photonInViewAlgs] ) + + +photon_HLTSequence = HLTRecoSequence("photon_HLTSequence", + Maker=l2PhotonViewsMaker, + Sequence=photonSequence, + Seed="L1EM") + +photonSequence = MenuSequence("photonStep", + recoSeqList=[photon_HLTSequence], + Hypo=thePhotonHypo, + HypoToolClassName="TrigL2PhotonHypoToolConf") + diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/photon.menu.py b/Trigger/TrigValidation/TrigUpgradeTest/share/photon.menu.py new file mode 100644 index 000000000000..cc02501e4d5e --- /dev/null +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/photon.menu.py @@ -0,0 +1,64 @@ +# +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# + +include("TrigUpgradeTest/testHLT_MT.py") +# provide a minimal menu information +if globalflags.InputFormat.is_bytestream(): + topSequence.L1DecoderTest.ctpUnpacker.OutputLevel=DEBUG + topSequence.L1DecoderTest.roiUnpackers[0].OutputLevel=DEBUG + +# map L1 decisions for menu +for unpack in topSequence.L1DecoderTest.roiUnpackers: + if unpack.name() is "EMRoIsUnpackingTool": + unpack.Decisions="L1EM" + if unpack.name() is "MURoIsUnpackingTool": + unpack.Decisions="L1MU" + +for unpack in topSequence.L1DecoderTest.rerunRoiUnpackers: + if unpack.name() is "EMRerunRoIsUnpackingTool": + unpack.Decisions="RerunL1EM" + unpack.SourceDecisions="L1EM" + +for unpack in topSequence.L1DecoderTest.rerunRoiUnpackers: + if unpack.name() is "EMRerunRoIsUnpackingTool": + unpack.SourceDecisions="L1EM" + if unpack.name() is "MURerunRoIsUnpackingTool": + unpack.SourceDecisions="L1MU" + + + +########################################## +# menu +########################################## +from TrigUpgradeTest.MenuComponents import Chain, ChainStep +from TrigUpgradeTest.photonMenuDefs import fastCaloSequence, photonSequence + + +photonChains = [ + Chain(name='HLT_g5_etcut', Seed="L1_EM3", \ + ChainSteps=[ ChainStep("Step1_g5_etcut", [fastCaloSequence]), + ChainStep("Step2_g5_etcut", [photonSequence])] ) + ] + +testChains = photonChains +#topSequence.L1DecoderTest.prescaler.Prescales = ["HLT_g5_etcut:2"] + +########################################## +# CF construction +########################################## + +##### Make all HLT ####### +from TrigUpgradeTest.HLTCFConfig import makeHLTTree +makeHLTTree(testChains) + + + +########################################## +# Some debug +########################################## +from AthenaCommon.AlgSequence import dumpSequence +dumpSequence(topSequence) + + + diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_photon_run_data.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_photon_run_data.sh index a66201f9e6ac..e78fdccb34cb 100755 --- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_photon_run_data.sh +++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_photon_run_data.sh @@ -2,4 +2,4 @@ # art-type: build # art-ci: master -athena --threads=1 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/photon.withViews.py +athena --threads=1 --evtMax=10 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/photon.menu.py -- GitLab From 5b5bfdf36c2f92e0297e118646c2039b80c16e2c Mon Sep 17 00:00:00 2001 From: Peter van Gemmeren <gemmeren@anl.gov> Date: Fri, 6 Jul 2018 15:43:38 -0500 Subject: [PATCH 390/562] Remove outdated container specific storage optimization Former-commit-id: e8c0fb548188dfdb1bf22c2be5ecc83f497a0cbe --- .../RecExample/RecExCommon/share/RecoUtils.py | 29 +------------------ Simulation/Digitization/share/Digitization.py | 5 ---- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/Reconstruction/RecExample/RecExCommon/share/RecoUtils.py b/Reconstruction/RecExample/RecExCommon/share/RecoUtils.py index 545b5838a1b1..e84a97dffce0 100644 --- a/Reconstruction/RecExample/RecExCommon/share/RecoUtils.py +++ b/Reconstruction/RecExample/RecExCommon/share/RecoUtils.py @@ -160,11 +160,6 @@ if rec.doPersistencyOptimization() and hasattr(svcMgr, 'AthenaPoolCnvSvc'): ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() + "'; COMPRESSION_ALGORITHM = '2'" ] ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() + "'; COMPRESSION_LEVEL = '1'" ] svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() + "'; ContainerName = 'TTree=CollectionTree'; TREE_AUTO_FLUSH = '1'" ] - # Switch on splitting for the 4 largest container (default off) - ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() + "'; ContainerName = 'TTree=CollectionTree(InDetSimDataCollection_p1/PixelSDO_Map)'; CONTAINER_SPLITLEVEL = '99'" ] - ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() + "'; ContainerName = 'TTree=CollectionTree(InDetSimDataCollection_p1/SCT_SDO_Map)'; CONTAINER_SPLITLEVEL = '99'" ] - ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() + "'; ContainerName = 'TTree=CollectionTree(InDetSimDataCollection_p1/TRT_SDO_Map)'; CONTAINER_SPLITLEVEL = '99'" ] - ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() + "'; ContainerName = 'TTree=CollectionTree(LArRawChannelContainer_p4/LArRawChannels)'; CONTAINER_SPLITLEVEL = '99'" ] if rec.doWriteESD(): from AthenaCommon.AthenaCommonFlags import athenaCommonFlags @@ -172,36 +167,14 @@ if rec.doPersistencyOptimization() and hasattr(svcMgr, 'AthenaPoolCnvSvc'): svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolESDOutput() + "'; COMPRESSION_LEVEL = '1'" ] # Optimize Basket Sizes to store data for 10 entries/events svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolESDOutput() + "'; ContainerName = 'TTree=CollectionTree'; TREE_AUTO_FLUSH = '10'" ] - # Switch on splitting for the largest container (default off) - svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolESDOutput() + "'; ContainerName = 'TTree=CollectionTree(Trk::TrackCollection_tlp3/Tracks)'; CONTAINER_SPLITLEVEL = '99'" ] - svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolESDOutput() + "'; ContainerName = 'TTree=CollectionTree(Trk::TrackCollection_tlp3/CombinedInDetTracks)'; CONTAINER_SPLITLEVEL = '99'" ] - # Increase basket size for largest auxiliary containers and switch off basket optimization - svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolESDOutput() + "'; ContainerName = 'CollectionTreeAnalysis::JetTagInfo_tlp3'; BRANCH_BASKET_SIZE = '256000'" ] - svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolESDOutput() + "'; ContainerName = 'CollectionTreeAnalysis::JetTagInfo_tlp3'; TREE_AUTO_FLUSH = '0'" ] - svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "ContainerName = 'CollectionTreeAnalysis::JetTagInfo_tlp3'; BRANCH_COMPRESSION_LEVEL = '1'" ] - svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolESDOutput() + "'; ContainerName = 'CollectionTreeInDet::Track_tlp1'; BRANCH_BASKET_SIZE = '256000'" ] - svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolESDOutput() + "'; ContainerName = 'CollectionTreeInDet::Track_tlp1'; TREE_AUTO_FLUSH = '0'" ] - svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "ContainerName = 'CollectionTreeInDet::Track_tlp1'; BRANCH_COMPRESSION_LEVEL = '1'" ] - svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolESDOutput() + "'; ContainerName = 'CollectionTreeTPCnv::MuonMeasurements_tlp2'; TREE_AUTO_FLUSH = '0'" ] - svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "ContainerName = 'CollectionTreeTPCnv::MuonMeasurements_tlp2'; BRANCH_COMPRESSION_LEVEL = '1'" ] - svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolESDOutput() + "'; ContainerName = 'CollectionTreeMuonCaloEnergyContainer_tlp1'; TREE_AUTO_FLUSH = '0'" ] - svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "ContainerName = 'CollectionTreeMuonCaloEnergyContainer_tlp1'; BRANCH_COMPRESSION_LEVEL = '1'" ] if rec.doWriteAOD(): from AthenaCommon.AthenaCommonFlags import athenaCommonFlags svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolAODOutput() + "'; COMPRESSION_ALGORITHM = '2'" ] svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolAODOutput() + "'; COMPRESSION_LEVEL = '1'" ] # Optimize Basket Sizes to store data for 100 entries/events - svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolAODOutput() + "'; ContainerName = 'TTree=CollectionTree'; TREE_AUTO_FLUSH = '100';"] + svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolAODOutput() + "'; ContainerName = 'TTree=CollectionTree'; TREE_AUTO_FLUSH = '100'"] - # Switch on splitting for the 2-3 largest container (default off) - if rec.doTruth(): - svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolAODOutput() + "'; ContainerName = 'TTree=CollectionTree(TruthParticlesAux.)'; CONTAINER_SPLITLEVEL = '99'" ] - - svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolAODOutput() + "'; ContainerName = 'TTree=CollectionTree(InDetTrackParticlesAux.)'; CONTAINER_SPLITLEVEL = '99'" ] - svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolAODOutput() + "'; ContainerName = 'TTree=CollectionTree(CaloCalTopoClustersAux.)'; CONTAINER_SPLITLEVEL = '99'" ] - - svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolAODOutput() + "'; ContainerName = 'CollectionTreeInDet::Track_tlp2'; TREE_AUTO_FLUSH = '0'" ] # Base the xAOD branch names just on the SG keys: StreamAOD.WritingTool.SubLevelBranchName = "<key>" diff --git a/Simulation/Digitization/share/Digitization.py b/Simulation/Digitization/share/Digitization.py index 712eee889b9a..69331e2004a5 100755 --- a/Simulation/Digitization/share/Digitization.py +++ b/Simulation/Digitization/share/Digitization.py @@ -126,11 +126,6 @@ if DetFlags.writeRDOPool.any_on(): ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() + "'; COMPRESSION_ALGORITHM = '2'" ] ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() + "'; COMPRESSION_LEVEL = '1'" ] ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() + "'; ContainerName = 'TTree=CollectionTree'; TREE_AUTO_FLUSH = '1'" ] - # Switch on splitting for the 4 largest container (default off) - ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() + "'; ContainerName = 'TTree=CollectionTree(InDetSimDataCollection_p1/PixelSDO_Map)'; CONTAINER_SPLITLEVEL = '99'" ] - ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() + "'; ContainerName = 'TTree=CollectionTree(InDetSimDataCollection_p1/SCT_SDO_Map)'; CONTAINER_SPLITLEVEL = '99'" ] - ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() + "'; ContainerName = 'TTree=CollectionTree(InDetSimDataCollection_p1/TRT_SDO_Map)'; CONTAINER_SPLITLEVEL = '99'" ] - ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() + "'; ContainerName = 'TTree=CollectionTree(LArRawChannelContainer_p4/LArRawChannels)'; CONTAINER_SPLITLEVEL = '99'" ] #-------------------------------------------------------------- # Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL ) #-------------------------------------------------------------- -- GitLab From 0e762d5946e53eb9b2794eb04e06f90a1dcb11d3 Mon Sep 17 00:00:00 2001 From: Benjamin Michael Wynne <b.m.wynne@ed.ac.uk> Date: Sat, 7 Jul 2018 05:34:03 +0000 Subject: [PATCH 391/562] Test Conditions data in views Former-commit-id: c67bda99c9764a6602167af250eb24d1ae9ef135 --- Control/AthViews/CMakeLists.txt | 3 +- Control/AthViews/share/ViewScheduling.py | 6 + .../AthViews/src_dflow/ConditionTestAlg.cxx | 118 ++++++++++++++++++ Control/AthViews/src_dflow/ConditionTestAlg.h | 78 ++++++++++++ Control/AthViews/src_dflow/DFlowAlg3.cxx | 5 + Control/AthViews/src_dflow/DFlowAlg3.h | 2 + .../components/AthViewsDFlow_entries.cxx | 2 + Control/AthViews/test/test_view_scheduling.sh | 12 +- 8 files changed, 223 insertions(+), 3 deletions(-) create mode 100644 Control/AthViews/src_dflow/ConditionTestAlg.cxx create mode 100644 Control/AthViews/src_dflow/ConditionTestAlg.h diff --git a/Control/AthViews/CMakeLists.txt b/Control/AthViews/CMakeLists.txt index 367cd4611b4c..23898667338d 100644 --- a/Control/AthViews/CMakeLists.txt +++ b/Control/AthViews/CMakeLists.txt @@ -57,8 +57,7 @@ atlas_add_test( ViewCollectionMerge_test atlas_add_test( SimpleViews SCRIPT test/test_simple_view_example.sh PROPERTIES PASS_REGULAR_EXPRESSION "INFO view_test running with store view9" ) -atlas_add_test( ViewScheduling SCRIPT test/test_view_scheduling.sh - PROPERTIES PASS_REGULAR_EXPRESSION "INFO 109" ) +atlas_add_test( ViewScheduling SCRIPT test/test_view_scheduling.sh ) atlas_add_test( ViewNestFail SCRIPT test/test_view_nest_fail.sh PROPERTIES PASS_REGULAR_EXPRESSION "Execution of algorithm nest_alg failed" ) diff --git a/Control/AthViews/share/ViewScheduling.py b/Control/AthViews/share/ViewScheduling.py index fc639b39934c..6c4aa88a71db 100644 --- a/Control/AthViews/share/ViewScheduling.py +++ b/Control/AthViews/share/ViewScheduling.py @@ -66,6 +66,12 @@ makeViewSequence += CfgMgr.AthViews__ViewMergeAlg("merge_alg") job += makeViewSequence +# Conditions alg - creates an object that dflow_alg3 will retrieve +condSeq = AthSequencer("AthCondSeq") +condSeq += CfgMgr.AthViews__ConditionTestAlg( "condTestAlg" ) + +svcMgr.ConditionStore.OutputLevel = VERBOSE + #-------------------------------------------------------------- # Event related parameters #-------------------------------------------------------------- diff --git a/Control/AthViews/src_dflow/ConditionTestAlg.cxx b/Control/AthViews/src_dflow/ConditionTestAlg.cxx new file mode 100644 index 000000000000..e019b1379fe4 --- /dev/null +++ b/Control/AthViews/src_dflow/ConditionTestAlg.cxx @@ -0,0 +1,118 @@ +///////////////////////// -*- C++ -*- ///////////////////////////// + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// ConditionTestAlg.cxx +// Implementation file for class ConditionTestAlg +// Author: B. Wynne <bwynne@cern.ch> +/////////////////////////////////////////////////////////////////// + +#include "ConditionTestAlg.h" + +// STL includes + +// FrameWork includes +#include "AthenaKernel/ExtendedEventContext.h" +#include "GaudiKernel/ICondSvc.h" + +namespace AthViews { + +/////////////////////////////////////////////////////////////////// +// Public methods: +/////////////////////////////////////////////////////////////////// + +// Constructors +//////////////// +ConditionTestAlg::ConditionTestAlg( const std::string& name, + ISvcLocator* pSvcLocator ) : + ::AthAlgorithm( name, pSvcLocator ) +{ + // + // Property declaration + // + //declareProperty( "Property", m_nProperty ); +} + +// Destructor +/////////////// +ConditionTestAlg::~ConditionTestAlg() +{} + +// Athena Algorithm's Hooks +//////////////////////////// +StatusCode ConditionTestAlg::initialize() +{ + ATH_MSG_INFO ("Initializing " << name() << "..."); + + CHECK( m_condKeyTest.initialize() ); + + // Register the handle with conditions svc + ServiceHandle<ICondSvc> condSvc{"CondSvc", name()}; + CHECK( condSvc.retrieve() ); + CHECK( condSvc->regHandle(this, m_condKeyTest) ); + + return StatusCode::SUCCESS; +} + +StatusCode ConditionTestAlg::finalize() +{ + ATH_MSG_INFO ("Finalizing " << name() << "..."); + + return StatusCode::SUCCESS; +} + +StatusCode ConditionTestAlg::execute() +{ + ATH_MSG_DEBUG ("Executing " << name() << "..."); + +#ifdef GAUDI_SYSEXECUTE_WITHCONTEXT + const EventContext& ctx = getContext(); +#else + const EventContext& ctx = *getContext(); +#endif + + ATH_MSG_INFO( name() << " running with store " << ctx.getExtension<Atlas::ExtendedEventContext>()->proxy()->name() ); + + // Make a (large) validity range + EventIDBase begin (0, + EventIDBase::UNDEFEVT, // event + EventIDBase::UNDEFNUM, // timestamp + EventIDBase::UNDEFNUM, // timestamp ns + 0); + EventIDBase end (10000, + EventIDBase::UNDEFEVT, // event + EventIDBase::UNDEFNUM, // timestamp + EventIDBase::UNDEFNUM, // timestamp ns + 10000); + EventIDRange range( begin, end ); + + // Write a dummy object with this validity range + SG::WriteCondHandle< CondDataObj > condHandleTest( m_condKeyTest, ctx ); + ATH_CHECK( condHandleTest.record( range, std::make_unique< CondDataObj >( 987 ) ) ); + + return StatusCode::SUCCESS; +} + +/////////////////////////////////////////////////////////////////// +// Const methods: +/////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////// +// Non-const methods: +/////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////// +// Protected methods: +/////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////// +// Const methods: +/////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////// +// Non-const methods: +/////////////////////////////////////////////////////////////////// + +} //> end namespace AthViews diff --git a/Control/AthViews/src_dflow/ConditionTestAlg.h b/Control/AthViews/src_dflow/ConditionTestAlg.h new file mode 100644 index 000000000000..975a1ab7febb --- /dev/null +++ b/Control/AthViews/src_dflow/ConditionTestAlg.h @@ -0,0 +1,78 @@ +///////////////////////// -*- C++ -*- ///////////////////////////// + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// ConditionTestAlg.h +// Header file for class ConditionTestAlg +// Author: B. Wynne <bwynne@cern.ch> +/////////////////////////////////////////////////////////////////// +#ifndef ATHVIEWS_CONDITIONTESTALG_H +#define ATHVIEWS_CONDITIONTESTALG_H 1 + +// STL includes +#include <string> + +// FrameWork includes +#include "AthenaBaseComps/AthAlgorithm.h" +#include "AthExHive/CondDataObj.h" + +namespace AthViews { + +class ConditionTestAlg + : public ::AthAlgorithm +{ + + /////////////////////////////////////////////////////////////////// + // Public methods: + /////////////////////////////////////////////////////////////////// + public: + + // Copy constructor: + + /// Constructor with parameters: + ConditionTestAlg( const std::string& name, ISvcLocator* pSvcLocator ); + + /// Destructor: + virtual ~ConditionTestAlg(); + + // Assignment operator: + //ConditionTestAlg &operator=(const ConditionTestAlg &alg); + + // Athena algorithm's Hooks + virtual StatusCode initialize(); + virtual StatusCode execute(); + virtual StatusCode finalize(); + + /////////////////////////////////////////////////////////////////// + // Const methods: + /////////////////////////////////////////////////////////////////// + + /////////////////////////////////////////////////////////////////// + // Non-const methods: + /////////////////////////////////////////////////////////////////// + + /////////////////////////////////////////////////////////////////// + // Private data: + /////////////////////////////////////////////////////////////////// + private: + + /// Default constructor: + ConditionTestAlg(); + + /// Containers + SG::WriteCondHandleKey<CondDataObj> m_condKeyTest{ this, "TestConditionsData", "testConditionsData", "" }; + + // vars +}; + +// I/O operators +////////////////////// + +/////////////////////////////////////////////////////////////////// +// Inline methods: +/////////////////////////////////////////////////////////////////// + +} //> end namespace AthViews +#endif //> !ATHVIEWS_CONDITIONTESTALG_H diff --git a/Control/AthViews/src_dflow/DFlowAlg3.cxx b/Control/AthViews/src_dflow/DFlowAlg3.cxx index b7cf1cab30db..9c0fac8c4dcc 100644 --- a/Control/AthViews/src_dflow/DFlowAlg3.cxx +++ b/Control/AthViews/src_dflow/DFlowAlg3.cxx @@ -68,6 +68,7 @@ StatusCode DFlowAlg3::initialize() CHECK( m_r_ints.initialize() ); CHECK( m_w_dflowDummy.initialize() ); CHECK( m_testUpdate.initialize() ); + CHECK( m_condKeyTest.initialize() ); return StatusCode::SUCCESS; } @@ -172,6 +173,10 @@ StatusCode DFlowAlg3::execute() SG::ReadHandle< HiveDataObj > testUpdate( m_testUpdate, ctx ); ATH_MSG_INFO( "Update handle final: " << testUpdate->val() ); + // Test conditions handles + SG::ReadCondHandle< CondDataObj > testConditions( m_condKeyTest, ctx ); + ATH_MSG_INFO( "Conditions handle test: " << **testConditions << " from key " << testConditions.fullKey() ); + return StatusCode::SUCCESS; } diff --git a/Control/AthViews/src_dflow/DFlowAlg3.h b/Control/AthViews/src_dflow/DFlowAlg3.h index df18ee73b383..4424fb70e776 100644 --- a/Control/AthViews/src_dflow/DFlowAlg3.h +++ b/Control/AthViews/src_dflow/DFlowAlg3.h @@ -19,6 +19,7 @@ #include "StoreGate/ReadHandleKey.h" #include "StoreGate/WriteHandleKey.h" #include "AthExHive/HiveDataObj.h" +#include "AthExHive/CondDataObj.h" namespace AthViews { @@ -70,6 +71,7 @@ class DFlowAlg3 SG::ReadHandleKey<std::vector<int> > m_r_ints; SG::WriteHandleKey<int> m_w_dflowDummy; SG::ReadHandleKey<HiveDataObj> m_testUpdate; + SG::ReadCondHandleKey<CondDataObj> m_condKeyTest{ this, "TestConditionsData", "testConditionsData", "" }; }; diff --git a/Control/AthViews/src_dflow/components/AthViewsDFlow_entries.cxx b/Control/AthViews/src_dflow/components/AthViewsDFlow_entries.cxx index bc9adb373242..393de53d1465 100644 --- a/Control/AthViews/src_dflow/components/AthViewsDFlow_entries.cxx +++ b/Control/AthViews/src_dflow/components/AthViewsDFlow_entries.cxx @@ -4,6 +4,7 @@ #include "../ViewMergeAlg.h" #include "../ViewSubgraphAlg.h" #include "../DigiDemoSetupAlg.h" +#include "../ConditionTestAlg.h" DECLARE_COMPONENT( AthViews::DFlowAlg1 ) @@ -12,4 +13,5 @@ DECLARE_COMPONENT( AthViews::DFlowAlg3 ) DECLARE_COMPONENT( AthViews::ViewMergeAlg ) DECLARE_COMPONENT( AthViews::ViewSubgraphAlg ) DECLARE_COMPONENT( AthViews::DigiDemoSetupAlg ) +DECLARE_COMPONENT( AthViews::ConditionTestAlg ) diff --git a/Control/AthViews/test/test_view_scheduling.sh b/Control/AthViews/test/test_view_scheduling.sh index 99db2e07108b..bd09f63c3f66 100755 --- a/Control/AthViews/test/test_view_scheduling.sh +++ b/Control/AthViews/test/test_view_scheduling.sh @@ -2,4 +2,14 @@ # art-type: build # art-ci: master -athena.py --threads=1 AthViews/ViewScheduling.py +athena.py --threads=1 AthViews/ViewScheduling.py | tee ViewScheduling.log +if grep "INFO condTestAlg running with store view1" ViewScheduling.log; then + exit 1 +fi +if ! grep "INFO condTestAlg running with store view0" ViewScheduling.log; then + exit 1 +fi +if ! grep "INFO 109" ViewScheduling.log; then + exit 1 +fi +exit 0 -- GitLab From 3787f455aa97f4603b87e16ae36e3b2222408251 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Fri, 6 Jul 2018 10:55:02 +0200 Subject: [PATCH 392/562] AthLinks: Allow making links to pointers with no StoreGateSvc. It has been possible to initialize a DataLink directly from a pointer. However, this was crashing if no StoreGateSvc was available, even though that wasn't actually required. Protect against that. This is useful for unit tests. Former-commit-id: 2d02a1e9d26e08d5be6822e179226c4a673ba86b --- Control/AthLinks/src/DataProxyHolder.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Control/AthLinks/src/DataProxyHolder.cxx b/Control/AthLinks/src/DataProxyHolder.cxx index 0164d52e5c0c..f28b6963cf7a 100644 --- a/Control/AthLinks/src/DataProxyHolder.cxx +++ b/Control/AthLinks/src/DataProxyHolder.cxx @@ -68,7 +68,9 @@ DataProxyHolder::toStorableObject (const_pointer_t obj, if (sg == 0) sg = SG::CurrentEventStore::store(); - m_proxy = sg->proxy (obj); + if (sg) { + m_proxy = sg->proxy (obj); + } if (m_proxy == 0) { // Didn't find a proxy for this object. // Store the object pointer directly, and return 0. -- GitLab From 138ac0e0005a54d9d6ba641375001dfd7e2d23b2 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Fri, 29 Jun 2018 10:56:01 +0200 Subject: [PATCH 393/562] CaloJiveXML: Coverity 118717, 118720. Fix coverity warnings: Possible null pointer dereference. Former-commit-id: 09e41abbf3cb11b7b04bde42b919ca5dca28809e --- Calorimeter/CaloCnv/CaloJiveXML/src/CaloMBTSRetriever.cxx | 2 +- Calorimeter/CaloCnv/CaloJiveXML/src/CaloTileRetriever.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloMBTSRetriever.cxx b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloMBTSRetriever.cxx index 0611bcea8cfd..c1a44e70b4d3 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloMBTSRetriever.cxx +++ b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloMBTSRetriever.cxx @@ -239,7 +239,7 @@ namespace JiveXML { if (m_mbtsdigit) { - if (scTileDigit.isSuccess()) { + if (scTileDigit.isSuccess() && tileDigits) { //----- get tile digits-------------------------- TileDigitsContainer::const_iterator itColl = tileDigits->begin(); diff --git a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloTileRetriever.cxx b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloTileRetriever.cxx index 53b4f52221f5..603660929d74 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloTileRetriever.cxx +++ b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloTileRetriever.cxx @@ -301,7 +301,7 @@ namespace JiveXML { //Loop over TileDigitsContainer to retrieve digits. Keep the digits values in a map - if (scTileDigit.isSuccess()) { + if (scTileDigit.isSuccess() && tileDigits) { //----- get tile digits-------------------------- TileDigitsContainer::const_iterator itColl = tileDigits->begin(); -- GitLab From 7216408b20abf5af8eb7e3a00624eee876ea894d Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Fri, 6 Jul 2018 10:56:50 +0200 Subject: [PATCH 394/562] MuonEventAthenaPool: Fix clang warnings. clang warnings: unused private data members. These, however, are in _p classes, so don't remove them. Instead, just suppress the warnings we get from clang. Former-commit-id: c532461cbe782f90604d412127f09a7abfdc012c --- MuonSpectrometer/MuonCnv/MuonEventAthenaPool/CMakeLists.txt | 1 + .../MuonEventAthenaPool/MuonEventAthenaPool/TgcRdo_p2.h | 4 +++- .../MuonEventAthenaPool/MuonEventAthenaPool/TgcRdo_p3.h | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/CMakeLists.txt b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/CMakeLists.txt index 4a752c7a9e46..8e9abc47c0ed 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/CMakeLists.txt +++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/CMakeLists.txt @@ -13,6 +13,7 @@ atlas_depends_on_subdirs( PUBLIC MuonSpectrometer/MuonRDO MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment + Control/CxxUtils PRIVATE AtlasTest/TestTools Control/AthenaKernel diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/MuonEventAthenaPool/TgcRdo_p2.h b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/MuonEventAthenaPool/TgcRdo_p2.h index 6419166638b6..98359b0daa7c 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/MuonEventAthenaPool/TgcRdo_p2.h +++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/MuonEventAthenaPool/TgcRdo_p2.h @@ -15,6 +15,7 @@ Author: Zvi Tarem #include <vector> #include "MuonEventAthenaPool/TgcRawData_p2.h" +#include "CxxUtils/unused.h" class TgcRdo_p2 : public std::vector<TgcRawData_p2> { @@ -45,7 +46,8 @@ private: // ID of this instance uint16_t m_id; - uint32_t m_idHash; + // Unused, but shouldn't delete it since it's part of the persistent data. + uint32_t ATH_UNUSED_MEMBER(m_idHash); // online IDs diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/MuonEventAthenaPool/TgcRdo_p3.h b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/MuonEventAthenaPool/TgcRdo_p3.h index ff3efe8e1da9..a707c0c3d0d6 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/MuonEventAthenaPool/TgcRdo_p3.h +++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/MuonEventAthenaPool/TgcRdo_p3.h @@ -7,6 +7,7 @@ #include <vector> #include "MuonEventAthenaPool/TgcRawData_p3.h" +#include "CxxUtils/unused.h" class TgcRdo_p3 : public std::vector<TgcRawData_p3> { @@ -37,7 +38,8 @@ private: // ID of this instance uint16_t m_id; - uint32_t m_idHash; + // Unused, but shouldn't delete it since it's part of the persistent data. + uint32_t ATH_UNUSED_MEMBER(m_idHash); // online IDs -- GitLab From a4865a9df6eda17852f2ff54e592ccb0626f7057 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Fri, 6 Jul 2018 10:57:39 +0200 Subject: [PATCH 395/562] LumiCalc: Fix clang warning. clang warning: unused variable. Former-commit-id: 15ddf6ba22f5c065bcb7a866af1b0ee26c5adc6a --- LumiBlock/LumiCalc/src/LumiCalculator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LumiBlock/LumiCalc/src/LumiCalculator.cxx b/LumiBlock/LumiCalc/src/LumiCalculator.cxx index 7917b135926d..480dcaf89f7b 100644 --- a/LumiBlock/LumiCalc/src/LumiCalculator.cxx +++ b/LumiBlock/LumiCalc/src/LumiCalculator.cxx @@ -1431,7 +1431,7 @@ LumiCalculator::MakePlots(const std::string& triggerchain) this->SetHistogramStyle(m_intlumitrigrateruns_recorded, Form("Delivered luminosity = %.1f /#mub, Recorded luminosity = %.1f /#mub", //, Efficiency * x-sec = %.1f #mub", total_l1ratediveffxsec,total_l1ratediveffxsec_recorded/*,m_effxsec*/), "Run number", Form("%s Luminosity (#mu b^{-1})",triggerchain.c_str())); - std::vector<TH1F*>::iterator itr, itr2; + std::vector<TH1F*>::iterator itr; /* // MB 20100115: turn off for now, RootGraphics lib crashes on some non-cern sites. -- GitLab From 043e31a82c0bb043cc8494c211cfda12a9fc3921 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Fri, 6 Jul 2018 10:57:58 +0200 Subject: [PATCH 396/562] TrigNavigation: Fix clang warning. clang warning: unused variable. Former-commit-id: 0eef2a78a2da1048fc6c754252df14ddb3465735 --- Trigger/TrigEvent/TrigNavigation/src/NavigationCore.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/Trigger/TrigEvent/TrigNavigation/src/NavigationCore.cxx b/Trigger/TrigEvent/TrigNavigation/src/NavigationCore.cxx index 857f53124c00..68e870663343 100644 --- a/Trigger/TrigEvent/TrigNavigation/src/NavigationCore.cxx +++ b/Trigger/TrigEvent/TrigNavigation/src/NavigationCore.cxx @@ -365,7 +365,6 @@ void NavigationCore::prepare() { MLOG( VERBOSE ) << "NavigationCore::prepare Preregistering objects #:" << m_classesToPreregister.size()<< endmsg; // populate structure with "must have" features - std::vector<std::pair<CLID, std::string> >::const_iterator confIt; for ( const CSPair& conf : m_classesToPreregister ) { CLID clid = conf.first; std::string label = conf.second; -- GitLab From 3df40d8f1d8c6e6a711afde988ccc4c8b3fc644f Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Fri, 6 Jul 2018 10:58:13 +0200 Subject: [PATCH 397/562] CoWTools: Fix clang warning. clang warning: Unused private data member. Former-commit-id: d00be01a862ef749b3f475a16c782d49bd4d42f4 --- Control/CoWTools/CoWTools/CoWRecord.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Control/CoWTools/CoWTools/CoWRecord.h b/Control/CoWTools/CoWTools/CoWRecord.h index b69c5d6bedcd..3a5d7f87c51c 100644 --- a/Control/CoWTools/CoWTools/CoWRecord.h +++ b/Control/CoWTools/CoWTools/CoWRecord.h @@ -19,8 +19,7 @@ namespace CoWTools{ inode(0), m_ms(summary), dmin(0), - dmaj(0), - m_summary(summary) + dmaj(0) {} unsigned long addrStart,addrEnd; short perms; @@ -29,8 +28,6 @@ namespace CoWTools{ CoWRecordStats m_ms; unsigned int dmin,dmaj; void parseRecord(std::istream& in); - private: - bool m_summary; public: friend CoWRecord operator-(CoWRecord lhs, const CoWRecord& rhs){ return lhs-=rhs; -- GitLab From 165b1078cb9f094d6eeaf72926e250e87afa2621 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Wed, 4 Jul 2018 10:28:11 +0200 Subject: [PATCH 398/562] AthViews: Coverity 118568-118571. Coverity warnings: unchecked results of dynamic_cast. Former-commit-id: d5644dbfbec511591ba518949ff4933f96ee875a --- .../test/ViewCollectionMerge_test.cxx | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/Control/AthViews/test/ViewCollectionMerge_test.cxx b/Control/AthViews/test/ViewCollectionMerge_test.cxx index 986fa8b7afd5..d223f791f0e0 100644 --- a/Control/AthViews/test/ViewCollectionMerge_test.cxx +++ b/Control/AthViews/test/ViewCollectionMerge_test.cxx @@ -94,6 +94,9 @@ protected: m_jobOptionsSvc = m_svcLoc->service("JobOptionsSvc"); ASSERT_TRUE( m_jobOptionsSvc.isValid() ); + + m_sg = nullptr; + ASSERT_TRUE( m_svcLoc->service ("StoreGateSvc", m_sg).isSuccess() ); } void TearDownGaudi() { @@ -105,6 +108,11 @@ protected: Gaudi::setInstance( static_cast<IAppMgrUI*>(nullptr) ); } + StoreGateSvc* evtStore() + { + return m_sg; + } + // protected member variables for Core Gaudi components IAppMgrUI* m_appMgr = nullptr; SmartIF<ISvcLocator> m_svcLoc; @@ -112,6 +120,7 @@ protected: SmartIF<IJobOptionsSvc> m_jobOptionsSvc; SmartIF<IToolSvc> m_toolSvc; SmartIF<IProperty> m_propMgr; + StoreGateSvc* m_sg; }; @@ -393,8 +402,7 @@ TEST_F( ViewCollectionMerge_test, elementLinkRemapTest ) { ASSERT_TRUE( outputDataHandle2.isValid() ); // Declare remapping - StoreGateSvc * storeGate = dynamic_cast< StoreGateSvc* >( m_svcLoc->service( "StoreGateSvc" ).get() ); - storeGate->remap( ClassID_traits< DataVector< int > >::ID(), DATA_NAME, DATA_NAME + "2", 0 ); + evtStore()->remap( ClassID_traits< DataVector< int > >::ID(), DATA_NAME, DATA_NAME + "2", 0 ); // Test the link again - should not have changed ASSERT_TRUE( dataLink.isValid() ); @@ -447,8 +455,7 @@ TEST_F( ViewCollectionMerge_test, elementLinkViewRemapTest ) { ASSERT_TRUE( outputDataHandle2.isValid() ); // Declare remapping - pretty hacky, have to specify view object names explicitly - StoreGateSvc * storeGate = dynamic_cast< StoreGateSvc* >( m_svcLoc->service( "StoreGateSvc" ).get() ); - storeGate->remap( ClassID_traits< DataVector< int > >::ID(), "testView_" + DATA_NAME, "testView_" + DATA_NAME + "2", 0 ); + evtStore()->remap( ClassID_traits< DataVector< int > >::ID(), "testView_" + DATA_NAME, "testView_" + DATA_NAME + "2", 0 ); // Test the link again - should not have changed ASSERT_TRUE( dataLink.isValid() ); @@ -537,9 +544,8 @@ TEST_F( ViewCollectionMerge_test, elementLinkMergeRemapTest ) { ASSERT_TRUE( outputDataHandle.isValid() ); // Declare remapping - pretty hacky, have to specify view object names explicitly - StoreGateSvc * storeGate = dynamic_cast< StoreGateSvc* >( m_svcLoc->service( "StoreGateSvc" ).get() ); - storeGate->remap( ClassID_traits< DataVector< int > >::ID(), "testView1_" + DATA_NAME, DATA_NAME, 0 ); - storeGate->remap( ClassID_traits< DataVector< int > >::ID(), "testView2_" + DATA_NAME, DATA_NAME, 1 ); + evtStore()->remap( ClassID_traits< DataVector< int > >::ID(), "testView1_" + DATA_NAME, DATA_NAME, 0 ); + evtStore()->remap( ClassID_traits< DataVector< int > >::ID(), "testView2_" + DATA_NAME, DATA_NAME, 1 ); // Element link should still be pointing to view container ASSERT_TRUE( dataLink.isValid() ); @@ -638,9 +644,8 @@ TEST_F( ViewCollectionMerge_test, elementLinkMergeRemapBookkeepTest ) { ASSERT_TRUE( auxHandle.isValid() ); // Declare remapping - pretty hacky, have to specify view object names explicitly - StoreGateSvc * storeGate = dynamic_cast< StoreGateSvc* >( m_svcLoc->service( "StoreGateSvc" ).get() ); - storeGate->remap( ClassID_traits< DataVector< DummyData > >::ID(), "testView1_" + DATA_NAME, DATA_NAME, 0 ); - storeGate->remap( ClassID_traits< DataVector< DummyData > >::ID(), "testView2_" + DATA_NAME, DATA_NAME, 1 ); + evtStore()->remap( ClassID_traits< DataVector< DummyData > >::ID(), "testView1_" + DATA_NAME, DATA_NAME, 0 ); + evtStore()->remap( ClassID_traits< DataVector< DummyData > >::ID(), "testView2_" + DATA_NAME, DATA_NAME, 1 ); // Element link should still be pointing to view container ASSERT_TRUE( dataLink.isValid() ); @@ -667,8 +672,7 @@ TEST_F( ViewCollectionMerge_test, mergeHelperTest ) { // Make a dummy event context EventContext dummyContext( 0, 0 ); - StoreGateSvc * storeGate = dynamic_cast< StoreGateSvc* >( m_svcLoc->service( "StoreGateSvc" ).get() ); - dummyContext.setExtension( Atlas::ExtendedEventContext( storeGate, 0 ) ); + dummyContext.setExtension( Atlas::ExtendedEventContext( evtStore(), 0 ) ); // Parcel the view data auto viewData = std::vector< DataVector< DummyData > >( 2 ); @@ -707,7 +711,7 @@ TEST_F( ViewCollectionMerge_test, mergeHelperTest ) { inputDataHandleKey.initialize(); MsgStream log(Athena::getMessageSvc(), "ViewCollectionMerge_test"); - ViewHelper::ViewMerger merger( storeGate, log); + ViewHelper::ViewMerger merger( evtStore(), log); ASSERT_TRUE( merger.mergeViewCollection( *inputViewsHandle, inputDataHandleKey, dummyContext, *mergedData ).isSuccess() ); // Verify merging -- GitLab From 6e5a759c4ed0f4a6b3a6e1e81dbb8b1d508d2c2c Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Thu, 28 Jun 2018 11:11:48 +0200 Subject: [PATCH 399/562] CaloRec: Preparing to make CaloCellFastCopyTool const. Remove writes to member variables from process(). This was used to cache the decision about which strategy to use to do the copy. However, this is only a couple logical tests to begin with, so hardly anything to be gained by caching it, and the cache spoils constness. Make all internal methods called by process() const. Former-commit-id: cc2e1fd7e23cb4e7737ad5e9931c42a8dca63fd2 --- .../share/CaloCellFastCopyTool_test.ref | 73 +++++++++---------- .../CaloRec/src/CaloCellFastCopyTool.cxx | 57 ++++++++------- .../CaloRec/src/CaloCellFastCopyTool.h | 51 +++++-------- .../test/CaloCellFastCopyTool_test.cxx | 44 ++++++----- 4 files changed, 108 insertions(+), 117 deletions(-) diff --git a/Calorimeter/CaloRec/share/CaloCellFastCopyTool_test.ref b/Calorimeter/CaloRec/share/CaloCellFastCopyTool_test.ref index 7929803bf6f5..f23499c4a601 100644 --- a/Calorimeter/CaloRec/share/CaloCellFastCopyTool_test.ref +++ b/Calorimeter/CaloRec/share/CaloCellFastCopyTool_test.ref @@ -4,12 +4,12 @@ Initializing Gaudi ApplicationMgr using job opts ./CaloCellFastCopyTool_test_gen JobOptionsSvc INFO Job options successfully read in from ./CaloCellFastCopyTool_test_generated.txt ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99) - running on karma on Wed Mar 8 12:09:08 2017 + Welcome to ApplicationMgr (GaudiCoreSvc v30r2) + running on spar0101.usatlas.bnl.gov on Thu Jun 14 13:12:06 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : StoreGate ApplicationMgr INFO Application Manager Configured successfully -ClassIDSvc INFO getRegistryEntries: read 6701 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 6546 CLIDRegistry entries for module ALL StoreGateSvc DEBUG Property update for OutputLevel : new value = 2 StoreGateSvc DEBUG Service base class initialized successfully StoreGateSvc DEBUG trying to create store SGImplSvc/StoreGateSvc_Impl @@ -94,132 +94,131 @@ AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionar AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! AtlasDetectorID DEBUG Could not get value for label 'no_side' of field 'DetZside' in dictionary Calorimeter AtlasDetectorID::initialize_from_dictionary - OK -ClassIDSvc INFO getRegistryEntries: read 357 CLIDRegistry entries for module ALL -StoreGateSvc_Impl DEBUG Recorded object @0x1cc8810 with key AllCalo of type CaloCellContainer(CLID 2802) - in DataObject @0x172f440 +ClassIDSvc INFO getRegistryEntries: read 372 CLIDRegistry entries for module ALL +StoreGateSvc_Impl DEBUG Recorded object @0x1d45700 with key AllCalo of type CaloCellContainer(CLID 2802) + in DataObject @0x1d70020 object not modifiable when retrieved StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +CopyToolTest[1] DEBUG Property update for OutputLevel : new value = 1 CopyToolTest[1] INFO In initialize CopyToolTest[1] DEBUG Accepted calo samplings: 17; CopyToolTest[1] DEBUG Accepted sub calos: 3; CopyToolTest[1] DEBUG CaloCell hash max: 187652 CopyToolTest[1] DEBUG Number of accepted hashes: 0 -CopyToolTest[1] DEBUG Calling destructor StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) CopyToolTest[1] INFO In initialize CopyToolTest[1] DEBUG Accepted calo samplings: 17; CopyToolTest[1] DEBUG Accepted sub calos: 3; CopyToolTest[1] DEBUG CaloCell hash max: 187652 CopyToolTest[1] DEBUG Number of accepted hashes: 512 -CopyToolTest[1] DEBUG Calling destructor StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +CopyToolTest[3] DEBUG Property update for OutputLevel : new value = 1 CopyToolTest[3] INFO In initialize CopyToolTest[3] DEBUG Accepted calo samplings: 17; CopyToolTest[3] DEBUG Accepted sub calos: 3; CopyToolTest[3] DEBUG CaloCell hash max: 187652 CopyToolTest[3] DEBUG Number of accepted hashes: 0 -CopyToolTest[3] DEBUG Calling destructor StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +CopyToolTest[4] DEBUG Property update for OutputLevel : new value = 1 CopyToolTest[4] INFO In initialize CopyToolTest[4] DEBUG Accepted calo samplings: 17; CopyToolTest[4] DEBUG Accepted sub calos: 3; CopyToolTest[4] DEBUG CaloCell hash max: 187652 CopyToolTest[4] DEBUG Number of accepted hashes: 512 -CopyToolTest[4] DEBUG Calling destructor StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +CopyToolTest[13] DEBUG Property update for OutputLevel : new value = 1 CopyToolTest[13] INFO In initialize CopyToolTest[13] DEBUG Accepted calo samplings: 17; CopyToolTest[13] DEBUG Accepted sub calos: 3; CopyToolTest[13] DEBUG CaloCell hash max: 187652 CopyToolTest[13] DEBUG Number of accepted hashes: 0 -CopyToolTest[13] ERROR ../src/CaloCellFastCopyTool.cxx:336 (StatusCode CaloCellFastCopyTool::dispatchCopy(const CaloCellContainer*, CaloCellContainer*)): code 0: Can't copy to a non-const view container. -CopyToolTest[13] FATAL ../src/CaloCellFastCopyTool.cxx:123 (StatusCode CaloCellFastCopyTool::process(CaloCellContainer*)): code 0: (this->*m_copyCells)(srcCont.cptr(), theCont) -CopyToolTest[13] DEBUG Calling destructor +CopyToolTest[13] ERROR /usatlas/u/snyder/usatlasdata/atlas-master-mt/Calorimeter/CaloRec/src/CaloCellFastCopyTool.cxx:333 (StatusCode CaloCellFastCopyTool::dispatchCopy(const CaloCellContainer*, CaloCellContainer*) const): code 0: Can't copy to a non-const view container. +CopyToolTest[13] FATAL /usatlas/u/snyder/usatlasdata/atlas-master-mt/Calorimeter/CaloRec/src/CaloCellFastCopyTool.cxx:116 (StatusCode CaloCellFastCopyTool::process(CaloCellContainer*)): code 0: dispatchCopy (srcCont.cptr(), theCont) StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +CopyToolTest[14] DEBUG Property update for OutputLevel : new value = 1 CopyToolTest[14] INFO In initialize CopyToolTest[14] DEBUG Accepted calo samplings: 17; CopyToolTest[14] DEBUG Accepted sub calos: 3; CopyToolTest[14] DEBUG CaloCell hash max: 187652 CopyToolTest[14] DEBUG Number of accepted hashes: 512 -CopyToolTest[14] ERROR ../src/CaloCellFastCopyTool.cxx:325 (StatusCode CaloCellFastCopyTool::dispatchCopy(const CaloCellContainer*, CaloCellContainer*)): code 0: Can't copy to a non-const view container. -CopyToolTest[14] FATAL ../src/CaloCellFastCopyTool.cxx:123 (StatusCode CaloCellFastCopyTool::process(CaloCellContainer*)): code 0: (this->*m_copyCells)(srcCont.cptr(), theCont) -CopyToolTest[14] DEBUG Calling destructor +CopyToolTest[14] ERROR /usatlas/u/snyder/usatlasdata/atlas-master-mt/Calorimeter/CaloRec/src/CaloCellFastCopyTool.cxx:322 (StatusCode CaloCellFastCopyTool::dispatchCopy(const CaloCellContainer*, CaloCellContainer*) const): code 0: Can't copy to a non-const view container. +CopyToolTest[14] FATAL /usatlas/u/snyder/usatlasdata/atlas-master-mt/Calorimeter/CaloRec/src/CaloCellFastCopyTool.cxx:116 (StatusCode CaloCellFastCopyTool::process(CaloCellContainer*)): code 0: dispatchCopy (srcCont.cptr(), theCont) StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +CopyToolTest[15] DEBUG Property update for OutputLevel : new value = 1 CopyToolTest[15] INFO In initialize CopyToolTest[15] DEBUG Accepted calo samplings: 17; CopyToolTest[15] DEBUG Accepted sub calos: 3; CopyToolTest[15] DEBUG CaloCell hash max: 187652 CopyToolTest[15] DEBUG Number of accepted hashes: 0 -CopyToolTest[15] ERROR ../src/CaloCellFastCopyTool.cxx:336 (StatusCode CaloCellFastCopyTool::dispatchCopy(const CaloCellContainer*, CaloCellContainer*)): code 0: Can't copy to a non-const view container. -CopyToolTest[15] FATAL ../src/CaloCellFastCopyTool.cxx:123 (StatusCode CaloCellFastCopyTool::process(CaloCellContainer*)): code 0: (this->*m_copyCells)(srcCont.cptr(), theCont) -CopyToolTest[15] DEBUG Calling destructor +CopyToolTest[15] ERROR /usatlas/u/snyder/usatlasdata/atlas-master-mt/Calorimeter/CaloRec/src/CaloCellFastCopyTool.cxx:333 (StatusCode CaloCellFastCopyTool::dispatchCopy(const CaloCellContainer*, CaloCellContainer*) const): code 0: Can't copy to a non-const view container. +CopyToolTest[15] FATAL /usatlas/u/snyder/usatlasdata/atlas-master-mt/Calorimeter/CaloRec/src/CaloCellFastCopyTool.cxx:116 (StatusCode CaloCellFastCopyTool::process(CaloCellContainer*)): code 0: dispatchCopy (srcCont.cptr(), theCont) StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +CopyToolTest[16] DEBUG Property update for OutputLevel : new value = 1 CopyToolTest[16] INFO In initialize CopyToolTest[16] DEBUG Accepted calo samplings: 17; CopyToolTest[16] DEBUG Accepted sub calos: 3; CopyToolTest[16] DEBUG CaloCell hash max: 187652 CopyToolTest[16] DEBUG Number of accepted hashes: 512 -CopyToolTest[16] ERROR ../src/CaloCellFastCopyTool.cxx:325 (StatusCode CaloCellFastCopyTool::dispatchCopy(const CaloCellContainer*, CaloCellContainer*)): code 0: Can't copy to a non-const view container. -CopyToolTest[16] FATAL ../src/CaloCellFastCopyTool.cxx:123 (StatusCode CaloCellFastCopyTool::process(CaloCellContainer*)): code 0: (this->*m_copyCells)(srcCont.cptr(), theCont) -CopyToolTest[16] DEBUG Calling destructor +CopyToolTest[16] ERROR /usatlas/u/snyder/usatlasdata/atlas-master-mt/Calorimeter/CaloRec/src/CaloCellFastCopyTool.cxx:322 (StatusCode CaloCellFastCopyTool::dispatchCopy(const CaloCellContainer*, CaloCellContainer*) const): code 0: Can't copy to a non-const view container. +CopyToolTest[16] FATAL /usatlas/u/snyder/usatlasdata/atlas-master-mt/Calorimeter/CaloRec/src/CaloCellFastCopyTool.cxx:116 (StatusCode CaloCellFastCopyTool::process(CaloCellContainer*)): code 0: dispatchCopy (srcCont.cptr(), theCont) StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +CopyToolTest[5] DEBUG Property update for OutputLevel : new value = 1 CopyToolTest[5] INFO In initialize CopyToolTest[5] DEBUG Accepted calo samplings: 17; CopyToolTest[5] DEBUG Accepted sub calos: 3; CopyToolTest[5] DEBUG CaloCell hash max: 187652 CopyToolTest[5] DEBUG Number of accepted hashes: 0 -CopyToolTest[5] DEBUG Calling destructor StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +CopyToolTest[6] DEBUG Property update for OutputLevel : new value = 1 CopyToolTest[6] INFO In initialize CopyToolTest[6] DEBUG Accepted calo samplings: 17; CopyToolTest[6] DEBUG Accepted sub calos: 3; CopyToolTest[6] DEBUG CaloCell hash max: 187652 CopyToolTest[6] DEBUG Number of accepted hashes: 512 -CopyToolTest[6] DEBUG Calling destructor StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +CopyToolTest[7] DEBUG Property update for OutputLevel : new value = 1 CopyToolTest[7] INFO In initialize CopyToolTest[7] DEBUG Accepted calo samplings: 17; CopyToolTest[7] DEBUG Accepted sub calos: 3; CopyToolTest[7] DEBUG CaloCell hash max: 187652 CopyToolTest[7] DEBUG Number of accepted hashes: 0 -CopyToolTest[7] DEBUG Calling destructor StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +CopyToolTest[8] DEBUG Property update for OutputLevel : new value = 1 CopyToolTest[8] INFO In initialize CopyToolTest[8] DEBUG Accepted calo samplings: 17; CopyToolTest[8] DEBUG Accepted sub calos: 3; CopyToolTest[8] DEBUG CaloCell hash max: 187652 CopyToolTest[8] DEBUG Number of accepted hashes: 512 -CopyToolTest[8] DEBUG Calling destructor StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +CopyToolTest[9] DEBUG Property update for OutputLevel : new value = 1 CopyToolTest[9] INFO In initialize CopyToolTest[9] DEBUG Accepted calo samplings: 17; CopyToolTest[9] DEBUG Accepted sub calos: 3; CopyToolTest[9] DEBUG CaloCell hash max: 187652 CopyToolTest[9] DEBUG Number of accepted hashes: 0 -CopyToolTest[9] DEBUG Calling destructor StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +CopyToolTest[10] DEBUG Property update for OutputLevel : new value = 1 CopyToolTest[10] INFO In initialize CopyToolTest[10] DEBUG Accepted calo samplings: 17; CopyToolTest[10] DEBUG Accepted sub calos: 3; CopyToolTest[10] DEBUG CaloCell hash max: 187652 CopyToolTest[10] DEBUG Number of accepted hashes: 512 -CopyToolTest[10] DEBUG Calling destructor StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +CopyToolTest[11] DEBUG Property update for OutputLevel : new value = 1 CopyToolTest[11] INFO In initialize CopyToolTest[11] DEBUG Accepted calo samplings: 17; CopyToolTest[11] DEBUG Accepted sub calos: 3; CopyToolTest[11] DEBUG CaloCell hash max: 187652 CopyToolTest[11] DEBUG Number of accepted hashes: 0 -CopyToolTest[11] DEBUG Calling destructor StoreGateSvc_Impl DEBUG Retrieved const handle to object AllCalo of type CaloCellContainer(CLID 2802) +CopyToolTest[12] DEBUG Property update for OutputLevel : new value = 1 CopyToolTest[12] INFO In initialize CopyToolTest[12] DEBUG Accepted calo samplings: 17; CopyToolTest[12] DEBUG Accepted sub calos: 3; CopyToolTest[12] DEBUG CaloCell hash max: 187652 CopyToolTest[12] DEBUG Number of accepted hashes: 512 -CopyToolTest[12] DEBUG Calling destructor -StoreGateSvc_Impl DEBUG Recorded object @0x1c979e0 with key AllCalloFull of type CaloCellContainer(CLID 2802) - in DataObject @0x43c32d0 +StoreGateSvc_Impl DEBUG Recorded object @0x1d38210 with key AllCalloFull of type CaloCellContainer(CLID 2802) + in DataObject @0x4456c40 object not modifiable when retrieved CopyToolTest[9] INFO In initialize CopyToolTest[9] DEBUG Accepted calo samplings: 17; @@ -231,12 +230,10 @@ CopyToolTest[9] DEBUG Accepted calo samplings: 17; 15; CopyToolTest[9] DEBUG Accepted sub calos: 3; CopyToolTest[9] DEBUG CaloCell hash max: 187652 CopyToolTest[9] DEBUG Number of accepted hashes: 0 -CopyToolTest[9] DEBUG Calling destructor -CopyToolTest[9] DEBUG Calling destructor StoreGateSvc_Impl WARNING setupProxy:: error setting up proxy for key AllCalloFull and clid 2802 - Pre-existing valid DataProxy @0x43c3460 found in Store for key AllCalloFull with clid 2802 -StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x43c35a0 - recorded with key AllCalloFull of type CaloCellContainer (CLID 2802) in DataObject @0x68fce90 + Pre-existing valid DataProxy @0x4456d10 found in Store for key AllCalloFull with clid 2802 +StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x4456f10 + recorded with key AllCalloFull of type CaloCellContainer (CLID 2802) in DataObject @0x6990780 CopyToolTest[10] INFO In initialize CopyToolTest[10] DEBUG Accepted calo samplings: 17; CopyToolTest[10] DEBUG Accepted sub calos: 3; @@ -247,5 +244,3 @@ CopyToolTest[10] DEBUG Accepted calo samplings: 17; 15; CopyToolTest[10] DEBUG Accepted sub calos: 3; CopyToolTest[10] DEBUG CaloCell hash max: 187652 CopyToolTest[10] DEBUG Number of accepted hashes: 640 -CopyToolTest[10] DEBUG Calling destructor -CopyToolTest[10] DEBUG Calling destructor diff --git a/Calorimeter/CaloRec/src/CaloCellFastCopyTool.cxx b/Calorimeter/CaloRec/src/CaloCellFastCopyTool.cxx index a29d2d8d22b1..d40a92a50333 100644 --- a/Calorimeter/CaloRec/src/CaloCellFastCopyTool.cxx +++ b/Calorimeter/CaloRec/src/CaloCellFastCopyTool.cxx @@ -29,16 +29,12 @@ CaloCellFastCopyTool::CaloCellFastCopyTool(const std::string& type, const std::string& name, const IInterface* parent) - : AthAlgTool(type, name, parent) - , m_copyCells(nullptr) - , m_copyConstCells(nullptr) + : base_class(type, name, parent) , m_srcCellContainerKey("AllCalo") , m_avoidDuplicates(false) , m_isFindCellFast(false) , m_caloID(0) { - declareInterface<ICaloCellMakerTool>(this); - declareInterface<ICaloConstCellMakerTool>(this); declareProperty("InputName", m_srcCellContainerKey); declareProperty("IncludeSamplings", m_acceptedSampleNames); declareProperty("AvoidDuplicates", m_avoidDuplicates); @@ -108,9 +104,6 @@ StatusCode CaloCellFastCopyTool::initialize() { ATH_MSG_DEBUG( "Number of accepted hashes: " << m_acceptedCellHashes.size() ); - m_copyCells = &CaloCellFastCopyTool::dispatchCopy; - m_copyConstCells = &CaloCellFastCopyTool::dispatchCopyConst; - return StatusCode::SUCCESS; } @@ -120,7 +113,7 @@ StatusCode CaloCellFastCopyTool::process(CaloCellContainer* theCont) // Retrieve source cell container SG::ReadHandle<CaloCellContainer> srcCont(m_srcCellContainerKey); - ATH_CHECK( (this->*m_copyCells)(srcCont.cptr(), theCont) ); + ATH_CHECK( dispatchCopy (srcCont.cptr(), theCont) ); std::vector<CaloCell_ID::SUBCALO>::const_iterator it = m_acceptedCalos.begin(); for (; it != m_acceptedCalos.end(); ++it) { @@ -136,7 +129,7 @@ StatusCode CaloCellFastCopyTool::process(CaloConstCellContainer* theCont) // Retrieve source cell container SG::ReadHandle<CaloCellContainer> srcCont(m_srcCellContainerKey); - ATH_CHECK( (this->*m_copyConstCells)(srcCont.cptr(), theCont) ); + ATH_CHECK( dispatchCopyConst (srcCont.cptr(), theCont) ); std::vector<CaloCell_ID::SUBCALO>::const_iterator it = m_acceptedCalos.begin(); for (; it != m_acceptedCalos.end(); ++it) { @@ -149,7 +142,7 @@ StatusCode CaloCellFastCopyTool::process(CaloConstCellContainer* theCont) StatusCode CaloCellFastCopyTool::viewNotAvoidingDuplicatesFindCellIsFast (const CaloCellContainer* srcCont, - CaloConstCellContainer* destCont) + CaloConstCellContainer* destCont) const { const CaloCell* cell; std::vector<IdentifierHash>::const_iterator it = m_acceptedCellHashes.begin(); @@ -164,7 +157,7 @@ StatusCode CaloCellFastCopyTool::viewNotAvoidingDuplicatesFindCellIsFast StatusCode CaloCellFastCopyTool::viewAvoidingDuplicatesFindCellIsFast (const CaloCellContainer* srcCont, - CaloConstCellContainer* destCont) + CaloConstCellContainer* destCont) const { std::vector<bool> notInContainer(m_hashMax, true); CaloCellContainer::const_iterator itCell = destCont->begin(); @@ -187,7 +180,7 @@ StatusCode CaloCellFastCopyTool::viewAvoidingDuplicatesFindCellIsFast StatusCode CaloCellFastCopyTool::viewNotAvoidingDuplicatesFindCellIsNotFast (const CaloCellContainer* srcCont, - CaloConstCellContainer* destCont) + CaloConstCellContainer* destCont) const { IdentifierHash cellHash; const CaloCell* cell; @@ -204,7 +197,7 @@ StatusCode CaloCellFastCopyTool::viewNotAvoidingDuplicatesFindCellIsNotFast StatusCode CaloCellFastCopyTool::viewAvoidingDuplicatesFindCellIsNotFast (const CaloCellContainer* srcCont, - CaloConstCellContainer* destCont) + CaloConstCellContainer* destCont) const { std::vector<bool> notInContainer(m_hashMax, true); CaloCellContainer::const_iterator itCell = destCont->begin(); @@ -229,7 +222,7 @@ StatusCode CaloCellFastCopyTool::viewAvoidingDuplicatesFindCellIsNotFast template <class CONTAINER> StatusCode CaloCellFastCopyTool::cloneNotAvoidingDuplicatesFindCellIsFast (const CaloCellContainer* srcCont, - CONTAINER* destCont) + CONTAINER* destCont) const { const CaloCell* cell; std::vector<IdentifierHash>::const_iterator it = m_acceptedCellHashes.begin(); @@ -245,7 +238,7 @@ StatusCode CaloCellFastCopyTool::cloneNotAvoidingDuplicatesFindCellIsFast template <class CONTAINER> StatusCode CaloCellFastCopyTool::cloneAvoidingDuplicatesFindCellIsFast (const CaloCellContainer* srcCont, - CONTAINER* destCont) + CONTAINER* destCont) const { std::vector<bool> notInContainer(m_hashMax, true); @@ -270,7 +263,7 @@ StatusCode CaloCellFastCopyTool::cloneAvoidingDuplicatesFindCellIsFast template <class CONTAINER> StatusCode CaloCellFastCopyTool::cloneNotAvoidingDuplicatesFindCellIsNotFast (const CaloCellContainer* srcCont, - CONTAINER* destCont) + CONTAINER* destCont) const { IdentifierHash cellHash; const CaloCell* cell; @@ -289,7 +282,7 @@ StatusCode CaloCellFastCopyTool::cloneNotAvoidingDuplicatesFindCellIsNotFast template <class CONTAINER> StatusCode CaloCellFastCopyTool::cloneAvoidingDuplicatesFindCellIsNotFast (const CaloCellContainer* srcCont, - CONTAINER* destCont) + CONTAINER* destCont) const { std::vector<bool> notInContainer(m_hashMax, true); CaloCellContainer::const_iterator itCell = destCont->begin(); @@ -313,11 +306,15 @@ StatusCode CaloCellFastCopyTool::cloneAvoidingDuplicatesFindCellIsNotFast StatusCode CaloCellFastCopyTool::dispatchCopy(const CaloCellContainer* srcCont, - CaloCellContainer* destCont) + CaloCellContainer* destCont) const { + typedef StatusCode (CaloCellFastCopyTool::*COPY_CELLS)(const CaloCellContainer* srcCont + , CaloCellContainer* destCont) const; + + COPY_CELLS copyCells; if (m_isFindCellFast) { if (destCont->ownPolicy() == SG::OWN_ELEMENTS) { - m_copyCells = (m_avoidDuplicates) ? + copyCells = (m_avoidDuplicates) ? (&CaloCellFastCopyTool::cloneAvoidingDuplicatesFindCellIsFast<CaloCellContainer>) : (&CaloCellFastCopyTool::cloneNotAvoidingDuplicatesFindCellIsFast<CaloCellContainer>); } @@ -328,7 +325,7 @@ StatusCode CaloCellFastCopyTool::dispatchCopy(const CaloCellContainer* srcCont, } else { if (destCont->ownPolicy() == SG::OWN_ELEMENTS) { - m_copyCells = (m_avoidDuplicates) ? + copyCells = (m_avoidDuplicates) ? (&CaloCellFastCopyTool::cloneAvoidingDuplicatesFindCellIsNotFast<CaloCellContainer>) : (&CaloCellFastCopyTool::cloneNotAvoidingDuplicatesFindCellIsNotFast<CaloCellContainer>); } @@ -338,35 +335,39 @@ StatusCode CaloCellFastCopyTool::dispatchCopy(const CaloCellContainer* srcCont, } } - return (this->*m_copyCells)(srcCont, destCont); + return (this->*copyCells)(srcCont, destCont); } StatusCode CaloCellFastCopyTool::dispatchCopyConst (const CaloCellContainer* srcCont, - CaloConstCellContainer* destCont) + CaloConstCellContainer* destCont) const { + typedef StatusCode (CaloCellFastCopyTool::*COPY_CONST_CELLS)(const CaloCellContainer* srcCont + , CaloConstCellContainer* destCont) const; + + COPY_CONST_CELLS copyConstCells; if (m_isFindCellFast) { if (destCont->ownPolicy() == SG::OWN_ELEMENTS) { - m_copyConstCells = (m_avoidDuplicates) ? + copyConstCells = (m_avoidDuplicates) ? (&CaloCellFastCopyTool::cloneAvoidingDuplicatesFindCellIsFast<CaloConstCellContainer>) : (&CaloCellFastCopyTool::cloneNotAvoidingDuplicatesFindCellIsFast<CaloConstCellContainer>); } else { - m_copyConstCells = (m_avoidDuplicates) ? + copyConstCells = (m_avoidDuplicates) ? (&CaloCellFastCopyTool::viewAvoidingDuplicatesFindCellIsFast) : (&CaloCellFastCopyTool::viewNotAvoidingDuplicatesFindCellIsFast); } } else { if (destCont->ownPolicy() == SG::OWN_ELEMENTS) { - m_copyConstCells = (m_avoidDuplicates) ? + copyConstCells = (m_avoidDuplicates) ? (&CaloCellFastCopyTool::cloneAvoidingDuplicatesFindCellIsNotFast<CaloConstCellContainer>) : (&CaloCellFastCopyTool::cloneNotAvoidingDuplicatesFindCellIsNotFast<CaloConstCellContainer>); } else { - m_copyConstCells = (m_avoidDuplicates) ? + copyConstCells = (m_avoidDuplicates) ? (&CaloCellFastCopyTool::viewAvoidingDuplicatesFindCellIsNotFast) : (&CaloCellFastCopyTool::viewNotAvoidingDuplicatesFindCellIsNotFast); } } - return (this->*m_copyConstCells)(srcCont, destCont); + return (this->*copyConstCells)(srcCont, destCont); } diff --git a/Calorimeter/CaloRec/src/CaloCellFastCopyTool.h b/Calorimeter/CaloRec/src/CaloCellFastCopyTool.h index e2f9ba9f830f..833baa5cbf7e 100644 --- a/Calorimeter/CaloRec/src/CaloCellFastCopyTool.h +++ b/Calorimeter/CaloRec/src/CaloCellFastCopyTool.h @@ -49,62 +49,50 @@ class CaloCell_ID; -class CaloCellFastCopyTool: public AthAlgTool, - virtual public ICaloCellMakerTool, - virtual public ICaloConstCellMakerTool +class CaloCellFastCopyTool + : public extends<AthAlgTool,ICaloCellMakerTool, ICaloConstCellMakerTool> { public: /// AthAlgTool constructor - CaloCellFastCopyTool(const std::string& name, const std::string& type, - const IInterface* parent); + CaloCellFastCopyTool(const std::string& name, + const std::string& type, + const IInterface* parent); - // virtual ~TileGapScintilatorsCopyTool(); - - virtual StatusCode initialize(); - virtual StatusCode process(CaloCellContainer* theCellContainer); - virtual StatusCode process(CaloConstCellContainer* theCellContainer); - - - private: - - typedef StatusCode (CaloCellFastCopyTool::*COPY_CELLS)(const CaloCellContainer* srcCont - , CaloCellContainer* destCont); - typedef StatusCode (CaloCellFastCopyTool::*COPY_CONST_CELLS)(const CaloCellContainer* srcCont - , CaloConstCellContainer* destCont); + virtual StatusCode initialize() override; + virtual StatusCode process(CaloCellContainer* theCellContainer) override; + virtual StatusCode process(CaloConstCellContainer* theCellContainer) override; +private: StatusCode viewNotAvoidingDuplicatesFindCellIsFast(const CaloCellContainer* srcCont, - CaloConstCellContainer* destCont); + CaloConstCellContainer* destCont) const; StatusCode viewAvoidingDuplicatesFindCellIsFast(const CaloCellContainer* srcCont, - CaloConstCellContainer* destCont); + CaloConstCellContainer* destCont) const; StatusCode viewNotAvoidingDuplicatesFindCellIsNotFast(const CaloCellContainer* srcCont, - CaloConstCellContainer* destCont); + CaloConstCellContainer* destCont) const; StatusCode viewAvoidingDuplicatesFindCellIsNotFast(const CaloCellContainer* srcCont, - CaloConstCellContainer* destCont); + CaloConstCellContainer* destCont) const; template <class CONTAINER> StatusCode cloneNotAvoidingDuplicatesFindCellIsFast(const CaloCellContainer* srcCont, - CONTAINER* destCont); + CONTAINER* destCont) const; template <class CONTAINER> StatusCode cloneAvoidingDuplicatesFindCellIsFast(const CaloCellContainer* srcCont, - CONTAINER* destCont); + CONTAINER* destCont) const; template <class CONTAINER> StatusCode cloneNotAvoidingDuplicatesFindCellIsNotFast(const CaloCellContainer* srcCont, - CONTAINER* destCont); + CONTAINER* destCont) const; template <class CONTAINER> StatusCode cloneAvoidingDuplicatesFindCellIsNotFast(const CaloCellContainer* srcCont, - CONTAINER* destCont); + CONTAINER* destCont) const; StatusCode dispatchCopy(const CaloCellContainer* srcCont, - CaloCellContainer* destCont); + CaloCellContainer* destCont) const; StatusCode dispatchCopyConst(const CaloCellContainer* srcCont, - CaloConstCellContainer* destCont); - - COPY_CELLS m_copyCells; - COPY_CONST_CELLS m_copyConstCells; + CaloConstCellContainer* destCont) const; SG::ReadHandleKey<CaloCellContainer> m_srcCellContainerKey; bool m_avoidDuplicates; @@ -118,7 +106,6 @@ class CaloCellFastCopyTool: public AthAlgTool, // Calo cell hashes std::vector<IdentifierHash> m_acceptedCellHashes; std::vector<bool> m_cellsToBeCopied; - }; diff --git a/Calorimeter/CaloRec/test/CaloCellFastCopyTool_test.cxx b/Calorimeter/CaloRec/test/CaloCellFastCopyTool_test.cxx index 308adb80aed5..c1b33c3d39c0 100644 --- a/Calorimeter/CaloRec/test/CaloCellFastCopyTool_test.cxx +++ b/Calorimeter/CaloRec/test/CaloCellFastCopyTool_test.cxx @@ -234,6 +234,14 @@ public: } + template <class CONT> + StatusCode testProcess (CaloCellFastCopyTool* tool, + CONT* destCont) + { + return tool->process (destCont); + } + + void testViewNotAvoidingDuplicatesFindCellIsNotFast() { testViewNotAvoidingDuplicatesIsFindCellFast("CopyToolTest[1]", false); @@ -263,7 +271,7 @@ public: CxxUtils::make_unique<CaloConstCellContainer>(SG::OwnershipPolicy::VIEW_ELEMENTS); // Test tool - assert(tool->process(destCont.get()).isSuccess()); + assert(testProcess (tool.get(), destCont.get()).isSuccess()); // Test that all TileGap3 cells from source container has // been copied in destination container. @@ -289,7 +297,7 @@ public: } // Test next event (imitated); - assert(tool->process(destCont.get()).isSuccess()); + assert(testProcess (tool.get(), destCont.get()).isSuccess()); // Not avoiding duplicates, therefore // size of destination container has been doubled assert( destCont->size() == (2 * m_tileGap3Hashes.size()) ); @@ -332,7 +340,7 @@ public: destCont->push_back(cell.get()); // Test tool - assert(tool->process(destCont.get()).isSuccess()); + assert(testProcess (tool.get(), destCont.get()).isSuccess()); // Test that all TileGap3 cells from source container // has been copied to destination container @@ -359,7 +367,7 @@ public: } // Test the next event (imitated) - assert( tool->process(destCont.get()).isSuccess() ); + assert(testProcess (tool.get(), destCont.get()).isSuccess()); // Test that size of destination container has not been changed, // because avoiding duplicates. assert( destCont->size() == m_tileGap3Hashes.size() ); @@ -395,7 +403,7 @@ public: CxxUtils::make_unique<CaloCellContainer>(SG::OwnershipPolicy::VIEW_ELEMENTS); // Test tool - assert(tool->process(destCont.get()).isFailure()); + assert(testProcess (tool.get(), destCont.get()).isFailure()); } @@ -430,7 +438,7 @@ public: std::unique_ptr<CaloCellContainer> destCont = CxxUtils::make_unique<CaloCellContainer>(SG::OwnershipPolicy::VIEW_ELEMENTS); // Test tool - assert(tool->process(destCont.get()).isFailure()); + assert(testProcess (tool.get(), destCont.get()).isFailure()); } @@ -466,7 +474,7 @@ public: CxxUtils::make_unique<CaloCellContainer>(SG::OwnershipPolicy::OWN_ELEMENTS); // Test tool - assert(tool->process(destCont.get()).isSuccess()); + assert(testProcess (tool.get(), destCont.get()).isSuccess()); // Test that all TileGap3 cells has been copied to destination container. assert( destCont->size() == m_tileGap3Hashes.size() ); @@ -496,7 +504,7 @@ public: } // Test the next event (imitated) - assert( tool->process(destCont.get()).isSuccess() ); + assert(testProcess (tool.get(), destCont.get()).isSuccess()); // Test that size of destination container has been doubled // because of not avoiding duplicates @@ -540,7 +548,7 @@ public: destCont->push_back(cell); // Test tool - assert(tool->process(destCont.get()).isSuccess()); + assert(testProcess (tool.get(), destCont.get()).isSuccess()); // Test that all TileGap3 cells has been copied to destination container. assert( destCont->size() == m_tileGap3Hashes.size() ); @@ -571,7 +579,7 @@ public: } // Test the next event (imitated) - assert( tool->process(destCont.get()).isSuccess() ); + assert(testProcess (tool.get(), destCont.get()).isSuccess()); // Test that size of destination container has not been changed, // because avoiding duplicates. @@ -611,7 +619,7 @@ public: CxxUtils::make_unique<CaloConstCellContainer>(SG::OwnershipPolicy::OWN_ELEMENTS); // Test tool - assert(tool->process(destCont.get()).isSuccess()); + assert(testProcess (tool.get(), destCont.get()).isSuccess()); // Test that all TileGap3 cells has been copied to destination container. assert( destCont->size() == m_tileGap3Hashes.size() ); @@ -641,7 +649,7 @@ public: } // Test the next event (imitated) - assert( tool->process(destCont.get()).isSuccess() ); + assert(testProcess (tool.get(), destCont.get()).isSuccess()); // Test that size of destination container has been doubled // because of not avoiding duplicates @@ -685,7 +693,7 @@ public: destCont->push_back(cell); // Test tool - assert(tool->process(destCont.get()).isSuccess()); + assert(testProcess (tool.get(), destCont.get()).isSuccess()); // Test that all TileGap3 cells has been copied to destination container. assert( destCont->size() == m_tileGap3Hashes.size() ); @@ -716,7 +724,7 @@ public: } // Test the next event (imitated) - assert( tool->process(destCont.get()).isSuccess() ); + assert(testProcess (tool.get(), destCont.get()).isSuccess()); // Test that size of destination container has not been changed, // because avoiding duplicates. @@ -769,13 +777,13 @@ public: caloCellName)); // Test tool - assert(tool->process(destCont.get()).isSuccess()); + assert(testProcess (tool.get(), destCont.get()).isSuccess()); // Test that all TileGap3 cells has been copied to destination container. assert( destCont->size() == nTileGap3 ); // Test next event (imitated) - assert(tool->process(destCont.get()).isSuccess()); + assert(testProcess (tool.get(), destCont.get()).isSuccess()); // Test that size of destination container has been doubled // because of not avoiding duplicates @@ -799,14 +807,14 @@ public: caloCellName)); // Test tool - assert(tool->process(destCont.get()).isSuccess()); + assert(testProcess (tool.get(), destCont.get()).isSuccess()); // Test that all TileGap1 + TileGap3 cells has been copied to destination container. unsigned int nTileGap1AndTileGap3((nTileGap1 + nTileGap3)); assert( destCont->size() == nTileGap1AndTileGap3 ); // Test next event (imitated) - assert(tool->process(destCont.get()).isSuccess()); + assert(testProcess (tool.get(), destCont.get()).isSuccess()); // Test that size of destination container has not been changed, // because avoiding duplicates. -- GitLab From 34c9f474a6bee032882792c0c6898916c37f4915 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Sat, 7 Jul 2018 13:14:50 +0200 Subject: [PATCH 400/562] LArCellRec: Move headers to src. Headers in this package are not used from any other package. Move them to src. Former-commit-id: 99fc052b2d1f0a1a86a997d25cd008c94db0bdae --- LArCalorimeter/LArCellRec/CMakeLists.txt | 1 - .../LArCellRec/src/LArBadFebMaskingTool.cxx | 10 +---- .../LArBadFebMaskingTool.h | 0 .../src/LArCellBuilderFromLArHitTool.cxx | 2 +- .../LArCellBuilderFromLArHitTool.h | 16 ++++---- .../LArCellBuilderFromLArRawChannelTool.cxx | 2 +- .../LArCellBuilderFromLArRawChannelTool.h | 0 .../LArCellRec/src/LArCellDeadOTXCorr.cxx | 2 +- .../{LArCellRec => src}/LArCellDeadOTXCorr.h | 4 +- .../LArCellRec/src/LArCellEmMiscalib.cxx | 2 +- .../{LArCellRec => src}/LArCellEmMiscalib.h | 0 .../LArCellRec/src/LArCellGainPathology.cxx | 7 +--- .../LArCellGainPathology.h | 4 +- .../LArCellRec/src/LArCellHVCorr.cxx | 2 +- .../{LArCellRec => src}/LArCellHVCorr.h | 4 +- .../LArCellRec/src/LArCellMaskingTool.cxx | 2 +- .../{LArCellRec => src}/LArCellMaskingTool.h | 4 +- .../LArCellRec/src/LArCellMerger.cxx | 2 +- .../{LArCellRec => src}/LArCellMerger.h | 4 +- .../src/LArCellNoiseMaskingTool.cxx | 7 +--- .../LArCellNoiseMaskingTool.h | 4 +- .../LArCellRec/src/LArCellRecalibration.cxx | 4 +- .../LArCellRecalibration.h | 4 +- .../LArCellRec/src/LArCellRescaler.cxx | 4 +- .../{LArCellRec => src}/LArCellRescaler.h | 0 .../LArCellRec/src/LArCollisionTimeAlg.cxx | 6 +-- .../{LArCellRec => src}/LArCollisionTimeAlg.h | 4 +- LArCalorimeter/LArCellRec/src/LArG3Escale.cxx | 2 +- .../{LArCellRec => src}/LArG3Escale.h | 0 .../LArCellRec/src/LArG3Escale_TDR.cxx | 2 +- .../{LArCellRec => src}/LArG3Escale_TDR.h | 0 .../{LArCellRec => src}/LArHitInfo.h | 0 .../LArCellRec/src/LArNoisyROAlg.cxx | 2 +- .../{LArCellRec => src}/LArNoisyROAlg.h | 6 +-- .../LArCellRec/src/LArNoisyROTool.cxx | 2 +- .../{LArCellRec => src}/LArNoisyROTool.h | 0 .../LArCellRec/src/LArNonLinearity.cxx | 3 +- .../{LArCellRec => src}/LArNonLinearity.h | 0 .../LArCellRec/src/LArTimeVetoAlg.cxx | 2 +- .../{LArCellRec => src}/LArTimeVetoAlg.h | 4 +- .../src/components/LArCellRec_entries.cxx | 38 +++++++++---------- 41 files changed, 67 insertions(+), 95 deletions(-) mode change 100755 => 100644 LArCalorimeter/LArCellRec/src/LArBadFebMaskingTool.cxx rename LArCalorimeter/LArCellRec/{LArCellRec => src}/LArBadFebMaskingTool.h (100%) mode change 100755 => 100644 mode change 100755 => 100644 LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArHitTool.cxx rename LArCalorimeter/LArCellRec/{LArCellRec => src}/LArCellBuilderFromLArHitTool.h (99%) mode change 100755 => 100644 mode change 100755 => 100644 LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.cxx rename LArCalorimeter/LArCellRec/{LArCellRec => src}/LArCellBuilderFromLArRawChannelTool.h (100%) mode change 100755 => 100644 rename LArCalorimeter/LArCellRec/{LArCellRec => src}/LArCellDeadOTXCorr.h (98%) mode change 100755 => 100644 LArCalorimeter/LArCellRec/src/LArCellEmMiscalib.cxx rename LArCalorimeter/LArCellRec/{LArCellRec => src}/LArCellEmMiscalib.h (100%) mode change 100755 => 100644 mode change 100755 => 100644 LArCalorimeter/LArCellRec/src/LArCellGainPathology.cxx rename LArCalorimeter/LArCellRec/{LArCellRec => src}/LArCellGainPathology.h (95%) mode change 100755 => 100644 mode change 100755 => 100644 LArCalorimeter/LArCellRec/src/LArCellHVCorr.cxx rename LArCalorimeter/LArCellRec/{LArCellRec => src}/LArCellHVCorr.h (95%) mode change 100755 => 100644 rename LArCalorimeter/LArCellRec/{LArCellRec => src}/LArCellMaskingTool.h (93%) mode change 100755 => 100644 LArCalorimeter/LArCellRec/src/LArCellMerger.cxx rename LArCalorimeter/LArCellRec/{LArCellRec => src}/LArCellMerger.h (95%) mode change 100755 => 100644 mode change 100755 => 100644 LArCalorimeter/LArCellRec/src/LArCellNoiseMaskingTool.cxx rename LArCalorimeter/LArCellRec/{LArCellRec => src}/LArCellNoiseMaskingTool.h (90%) mode change 100755 => 100644 mode change 100755 => 100644 LArCalorimeter/LArCellRec/src/LArCellRecalibration.cxx rename LArCalorimeter/LArCellRec/{LArCellRec => src}/LArCellRecalibration.h (92%) mode change 100755 => 100644 mode change 100755 => 100644 LArCalorimeter/LArCellRec/src/LArCellRescaler.cxx rename LArCalorimeter/LArCellRec/{LArCellRec => src}/LArCellRescaler.h (100%) mode change 100755 => 100644 rename LArCalorimeter/LArCellRec/{LArCellRec => src}/LArCollisionTimeAlg.h (95%) mode change 100755 => 100644 LArCalorimeter/LArCellRec/src/LArG3Escale.cxx rename LArCalorimeter/LArCellRec/{LArCellRec => src}/LArG3Escale.h (100%) mode change 100755 => 100644 mode change 100755 => 100644 LArCalorimeter/LArCellRec/src/LArG3Escale_TDR.cxx rename LArCalorimeter/LArCellRec/{LArCellRec => src}/LArG3Escale_TDR.h (100%) mode change 100755 => 100644 rename LArCalorimeter/LArCellRec/{LArCellRec => src}/LArHitInfo.h (100%) mode change 100755 => 100644 rename LArCalorimeter/LArCellRec/{LArCellRec => src}/LArNoisyROAlg.h (93%) rename LArCalorimeter/LArCellRec/{LArCellRec => src}/LArNoisyROTool.h (100%) mode change 100755 => 100644 LArCalorimeter/LArCellRec/src/LArNonLinearity.cxx rename LArCalorimeter/LArCellRec/{LArCellRec => src}/LArNonLinearity.h (100%) mode change 100755 => 100644 rename LArCalorimeter/LArCellRec/{LArCellRec => src}/LArTimeVetoAlg.h (91%) diff --git a/LArCalorimeter/LArCellRec/CMakeLists.txt b/LArCalorimeter/LArCellRec/CMakeLists.txt index ff44d3b84186..d98a7ada9fea 100644 --- a/LArCalorimeter/LArCellRec/CMakeLists.txt +++ b/LArCalorimeter/LArCellRec/CMakeLists.txt @@ -50,7 +50,6 @@ atlas_add_component( LArCellRec LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} CaloConditions CaloDetDescrLib CaloEvent CaloIdentifier CaloRecLib CaloUtilsLib AthAllocators AthenaBaseComps AthenaKernel StoreGateLib SGtests AtlasDetDescr Identifier GaudiKernel LArIdentifier LArRawEvent LArRecConditions LArSimEvent CaloTriggerToolLib AthenaPoolUtilities xAODEventInfo xAODTrigL1Calo GeneratorObjects LArRecEvent LArCablingLib TrigT1CaloCalibConditions TrigT1CaloCondSvcLib ) # Install files from the package: -atlas_install_headers( LArCellRec ) atlas_install_python_modules( python/*.py ) atlas_install_joboptions( share/*.py ) diff --git a/LArCalorimeter/LArCellRec/src/LArBadFebMaskingTool.cxx b/LArCalorimeter/LArCellRec/src/LArBadFebMaskingTool.cxx old mode 100755 new mode 100644 index 9be7d01d8052..1ae050759c2e --- a/LArCalorimeter/LArCellRec/src/LArBadFebMaskingTool.cxx +++ b/LArCalorimeter/LArCellRec/src/LArBadFebMaskingTool.cxx @@ -14,14 +14,8 @@ PURPOSE: ********************************************************************/ -#include "LArCellRec/LArBadFebMaskingTool.h" - -#include "GaudiKernel/Service.h" -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/Property.h" -#include "GaudiKernel/ListItem.h" -#include "GaudiKernel/StatusCode.h" -#include "StoreGate/StoreGateSvc.h" +#include "LArBadFebMaskingTool.h" + #include "CaloEvent/CaloCellContainer.h" #include "Identifier/Identifier.h" #include "Identifier/IdentifierHash.h" diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArBadFebMaskingTool.h b/LArCalorimeter/LArCellRec/src/LArBadFebMaskingTool.h old mode 100755 new mode 100644 similarity index 100% rename from LArCalorimeter/LArCellRec/LArCellRec/LArBadFebMaskingTool.h rename to LArCalorimeter/LArCellRec/src/LArBadFebMaskingTool.h diff --git a/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArHitTool.cxx b/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArHitTool.cxx old mode 100755 new mode 100644 index 3a614c0327a8..ee4bee8bf978 --- a/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArHitTool.cxx +++ b/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArHitTool.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArCellRec/LArCellBuilderFromLArHitTool.h" +#include "LArCellBuilderFromLArHitTool.h" #include "LArSimEvent/LArHit.h" #include "LArSimEvent/LArHitContainer.h" diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArCellBuilderFromLArHitTool.h b/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArHitTool.h old mode 100755 new mode 100644 similarity index 99% rename from LArCalorimeter/LArCellRec/LArCellRec/LArCellBuilderFromLArHitTool.h rename to LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArHitTool.h index 85b68f5f4b63..a31a565b763a --- a/LArCalorimeter/LArCellRec/LArCellRec/LArCellBuilderFromLArHitTool.h +++ b/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArHitTool.h @@ -47,13 +47,6 @@ process(CaloCellContainer * theCellContainer) #include "GaudiKernel/IIncidentSvc.h" #include "GaudiKernel/Incident.h" -class CaloDetDescrManager; -class Identifier; -class StoreGateSvc; -class CaloDetDescrElement; -class IAtRndmGenSvc; -class LArG3Escale ; - #include "AtlasDetDescr/AtlasDetectorID.h" #include "CaloIdentifier/LArID.h" #include "Identifier/IdContext.h" @@ -65,7 +58,7 @@ class LArG3Escale ; #include "Identifier/IdentifierHash.h" #include "CaloIdentifier/CaloCell_ID.h" //#include "LArCellRec/LArHitMap.h" -#include "LArCellRec/LArHitInfo.h" +#include "LArHitInfo.h" #include "CaloInterface/ICaloNoiseTool.h" #include "CaloEvent/CaloCellContainer.h" #include "LArElecCalib/ILArfSampl.h" @@ -73,6 +66,13 @@ class LArG3Escale ; #include <CLHEP/Random/Randomize.h> +class CaloDetDescrManager; +class Identifier; +class StoreGateSvc; +class CaloDetDescrElement; +class IAtRndmGenSvc; +class LArG3Escale ; + class LArCellBuilderFromLArHitTool: public AthAlgTool, public IIncidentListener, virtual public ICaloCellMakerTool diff --git a/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.cxx b/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.cxx old mode 100755 new mode 100644 index 4578087d1ff8..bf30de902c57 --- a/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.cxx +++ b/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.cxx @@ -12,8 +12,8 @@ // Migrate to athenaMT, March 2018, W.Lampl +#include "LArCellBuilderFromLArRawChannelTool.h" #include "LArRecEvent/LArCell.h" -#include "LArCellRec/LArCellBuilderFromLArRawChannelTool.h" #include "LArRawEvent/LArRawChannelContainer.h" #include "LArCabling/LArOnOffIdMapping.h" #include "CaloEvent/CaloCellContainer.h" diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArCellBuilderFromLArRawChannelTool.h b/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.h old mode 100755 new mode 100644 similarity index 100% rename from LArCalorimeter/LArCellRec/LArCellRec/LArCellBuilderFromLArRawChannelTool.h rename to LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.h diff --git a/LArCalorimeter/LArCellRec/src/LArCellDeadOTXCorr.cxx b/LArCalorimeter/LArCellRec/src/LArCellDeadOTXCorr.cxx index 0ef9c9499dd2..5595b9fb2548 100644 --- a/LArCalorimeter/LArCellRec/src/LArCellDeadOTXCorr.cxx +++ b/LArCalorimeter/LArCellRec/src/LArCellDeadOTXCorr.cxx @@ -31,7 +31,7 @@ -#include "LArCellRec/LArCellDeadOTXCorr.h" //Needs to be changed to correct package +#include "LArCellDeadOTXCorr.h" //Needs to be changed to correct package #include "CLHEP/Units/SystemOfUnits.h" diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArCellDeadOTXCorr.h b/LArCalorimeter/LArCellRec/src/LArCellDeadOTXCorr.h similarity index 98% rename from LArCalorimeter/LArCellRec/LArCellRec/LArCellDeadOTXCorr.h rename to LArCalorimeter/LArCellRec/src/LArCellDeadOTXCorr.h index 2f3ad05ee191..5b97a1b6b7b1 100644 --- a/LArCalorimeter/LArCellRec/LArCellRec/LArCellDeadOTXCorr.h +++ b/LArCalorimeter/LArCellRec/src/LArCellDeadOTXCorr.h @@ -20,8 +20,8 @@ */ -#ifndef LARCELLDEADOTXCORR_H -#define LARCELLDEADOTXCORR_H +#ifndef LARCELLREC_LARCELLDEADOTXCORR_H +#define LARCELLREC_LARCELLDEADOTXCORR_H // CaloCell Energy Correction Tool for Missing FEBs // by Deepak Kar with help from Guillaume Unal and Damien Prieur diff --git a/LArCalorimeter/LArCellRec/src/LArCellEmMiscalib.cxx b/LArCalorimeter/LArCellRec/src/LArCellEmMiscalib.cxx old mode 100755 new mode 100644 index 90e3fcc15aab..477b48f3e192 --- a/LArCalorimeter/LArCellRec/src/LArCellEmMiscalib.cxx +++ b/LArCalorimeter/LArCellRec/src/LArCellEmMiscalib.cxx @@ -14,7 +14,7 @@ CREATED: 25 October 2006 PURPOSE: applies miscalibration in EM calorimeter ********************************************************************/ -#include "LArCellRec/LArCellEmMiscalib.h" +#include "LArCellEmMiscalib.h" #include "CaloEvent/CaloCellContainer.h" #include "CaloIdentifier/CaloIdManager.h" #include "CaloIdentifier/CaloCell_ID.h" diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArCellEmMiscalib.h b/LArCalorimeter/LArCellRec/src/LArCellEmMiscalib.h old mode 100755 new mode 100644 similarity index 100% rename from LArCalorimeter/LArCellRec/LArCellRec/LArCellEmMiscalib.h rename to LArCalorimeter/LArCellRec/src/LArCellEmMiscalib.h diff --git a/LArCalorimeter/LArCellRec/src/LArCellGainPathology.cxx b/LArCalorimeter/LArCellRec/src/LArCellGainPathology.cxx old mode 100755 new mode 100644 index 4942d3b68d02..9eb09605cf52 --- a/LArCalorimeter/LArCellRec/src/LArCellGainPathology.cxx +++ b/LArCalorimeter/LArCellRec/src/LArCellGainPathology.cxx @@ -14,13 +14,8 @@ PURPOSE: ********************************************************************/ -#include "LArCellRec/LArCellGainPathology.h" +#include "LArCellGainPathology.h" -#include "GaudiKernel/Service.h" -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/Property.h" -#include "GaudiKernel/ListItem.h" -#include "GaudiKernel/StatusCode.h" #include "StoreGate/StoreGateSvc.h" #include "CaloEvent/CaloCellContainer.h" #include "Identifier/Identifier.h" diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArCellGainPathology.h b/LArCalorimeter/LArCellRec/src/LArCellGainPathology.h old mode 100755 new mode 100644 similarity index 95% rename from LArCalorimeter/LArCellRec/LArCellRec/LArCellGainPathology.h rename to LArCalorimeter/LArCellRec/src/LArCellGainPathology.h index 73552520902d..d5df7db06032 --- a/LArCalorimeter/LArCellRec/LArCellRec/LArCellGainPathology.h +++ b/LArCalorimeter/LArCellRec/src/LArCellGainPathology.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef LARCELLREC_LArCellGainPathology_H -#define LARCELLREC_LArCellGainPathology_H +#ifndef LARCELLREC_LARCELLGAINPATHOLOGY_H +#define LARCELLREC_LARCELLGAINPATHOLOGY_H /** @class LArCellGainPathology diff --git a/LArCalorimeter/LArCellRec/src/LArCellHVCorr.cxx b/LArCalorimeter/LArCellRec/src/LArCellHVCorr.cxx old mode 100755 new mode 100644 index bd221f2ea8a1..56eeac7b5318 --- a/LArCalorimeter/LArCellRec/src/LArCellHVCorr.cxx +++ b/LArCalorimeter/LArCellRec/src/LArCellHVCorr.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArCellRec/LArCellHVCorr.h" +#include "LArCellHVCorr.h" #include "CaloEvent/CaloCell.h" diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArCellHVCorr.h b/LArCalorimeter/LArCellRec/src/LArCellHVCorr.h old mode 100755 new mode 100644 similarity index 95% rename from LArCalorimeter/LArCellRec/LArCellRec/LArCellHVCorr.h rename to LArCalorimeter/LArCellRec/src/LArCellHVCorr.h index 091e88ccb2d1..658c1d5e6715 --- a/LArCalorimeter/LArCellRec/LArCellRec/LArCellHVCorr.h +++ b/LArCalorimeter/LArCellRec/src/LArCellHVCorr.h @@ -4,8 +4,8 @@ //Dear emacs, this is -*-c++-*- -#ifndef LARCELLREC_LArCellHVCorr_H -#define LARCELLREC_LArCellHVCorr_H +#ifndef LARCELLREC_LARCELLHVCORR_H +#define LARCELLREC_LARCELLHVCORR_H #include "CaloUtils/CaloCellCorrection.h" diff --git a/LArCalorimeter/LArCellRec/src/LArCellMaskingTool.cxx b/LArCalorimeter/LArCellRec/src/LArCellMaskingTool.cxx index 677259852c4d..5f8697e1b53c 100644 --- a/LArCalorimeter/LArCellRec/src/LArCellMaskingTool.cxx +++ b/LArCalorimeter/LArCellRec/src/LArCellMaskingTool.cxx @@ -9,7 +9,7 @@ PACKAGE: offline/Calorimeter/CaloRec ********************************************************************/ -#include "LArCellRec/LArCellMaskingTool.h" +#include "LArCellMaskingTool.h" #include "StoreGate/StoreGateSvc.h" #include "CaloEvent/CaloCellContainer.h" #include "LArCabling/LArCablingService.h" diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArCellMaskingTool.h b/LArCalorimeter/LArCellRec/src/LArCellMaskingTool.h similarity index 93% rename from LArCalorimeter/LArCellRec/LArCellRec/LArCellMaskingTool.h rename to LArCalorimeter/LArCellRec/src/LArCellMaskingTool.h index 589bdf6557e7..2d60d284bbeb 100644 --- a/LArCalorimeter/LArCellRec/LArCellRec/LArCellMaskingTool.h +++ b/LArCalorimeter/LArCellRec/src/LArCellMaskingTool.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef LARCELLMASKINGTOOL_H -#define LARCELLMASKINGTOOL_H +#ifndef LARCELLREC_LARCELLMASKINGTOOL_H +#define LARCELLREC_LARCELLMASKINGTOOL_H #include "AthenaBaseComps/AthAlgTool.h" diff --git a/LArCalorimeter/LArCellRec/src/LArCellMerger.cxx b/LArCalorimeter/LArCellRec/src/LArCellMerger.cxx old mode 100755 new mode 100644 index 0f5278b4ced6..1ac5c7c3ec32 --- a/LArCalorimeter/LArCellRec/src/LArCellMerger.cxx +++ b/LArCalorimeter/LArCellRec/src/LArCellMerger.cxx @@ -14,7 +14,7 @@ PURPOSE: ********************************************************************/ -#include "LArCellRec/LArCellMerger.h" +#include "LArCellMerger.h" #include "LArRawEvent/LArRawChannelContainer.h" #include "CaloEvent/CaloCellContainer.h" diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArCellMerger.h b/LArCalorimeter/LArCellRec/src/LArCellMerger.h old mode 100755 new mode 100644 similarity index 95% rename from LArCalorimeter/LArCellRec/LArCellRec/LArCellMerger.h rename to LArCalorimeter/LArCellRec/src/LArCellMerger.h index 7d32acffc4fc..6e5e2e41aec6 --- a/LArCalorimeter/LArCellRec/LArCellRec/LArCellMerger.h +++ b/LArCalorimeter/LArCellRec/src/LArCellMerger.h @@ -3,8 +3,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef LARCELLREC_LArCellMerger_H -#define LARCELLREC_LArCellMerger_H +#ifndef LARCELLREC_LARCELLMERGER_H +#define LARCELLREC_LARCELLMERGER_H /** @class LArCellMerger diff --git a/LArCalorimeter/LArCellRec/src/LArCellNoiseMaskingTool.cxx b/LArCalorimeter/LArCellRec/src/LArCellNoiseMaskingTool.cxx old mode 100755 new mode 100644 index c90107b48ec6..4cbb8907f463 --- a/LArCalorimeter/LArCellRec/src/LArCellNoiseMaskingTool.cxx +++ b/LArCalorimeter/LArCellRec/src/LArCellNoiseMaskingTool.cxx @@ -14,12 +14,7 @@ PURPOSE: ********************************************************************/ -#include "LArCellRec/LArCellNoiseMaskingTool.h" - -#include "GaudiKernel/Service.h" -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/Property.h" -#include "GaudiKernel/ListItem.h" +#include "LArCellNoiseMaskingTool.h" #include "CaloEvent/CaloCellContainer.h" #include "CaloIdentifier/CaloCell_ID.h" diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArCellNoiseMaskingTool.h b/LArCalorimeter/LArCellRec/src/LArCellNoiseMaskingTool.h old mode 100755 new mode 100644 similarity index 90% rename from LArCalorimeter/LArCellRec/LArCellRec/LArCellNoiseMaskingTool.h rename to LArCalorimeter/LArCellRec/src/LArCellNoiseMaskingTool.h index 72ac2de1ea7a..def55d245564 --- a/LArCalorimeter/LArCellRec/LArCellRec/LArCellNoiseMaskingTool.h +++ b/LArCalorimeter/LArCellRec/src/LArCellNoiseMaskingTool.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef LARCELLREC_LArCellNoiseMaskingTool_H -#define LARCELLREC_LArCellNoiseMaskingTool_H +#ifndef LARCELLREC_LARCELLNOISEMASKINGTOOL_H +#define LARCELLREC_LARCELLNOISEMASKINGTOOL_H #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" diff --git a/LArCalorimeter/LArCellRec/src/LArCellRecalibration.cxx b/LArCalorimeter/LArCellRec/src/LArCellRecalibration.cxx old mode 100755 new mode 100644 index aafe7d5fd5be..7fbe71475778 --- a/LArCalorimeter/LArCellRec/src/LArCellRecalibration.cxx +++ b/LArCalorimeter/LArCellRec/src/LArCellRecalibration.cxx @@ -2,9 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArCellRec/LArCellRecalibration.h" -#include "GaudiKernel/MsgStream.h" -#include "StoreGate/StoreGateSvc.h" +#include "LArCellRecalibration.h" #include "CaloEvent/CaloCell.h" #include "CaloIdentifier/CaloGain.h" diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArCellRecalibration.h b/LArCalorimeter/LArCellRec/src/LArCellRecalibration.h old mode 100755 new mode 100644 similarity index 92% rename from LArCalorimeter/LArCellRec/LArCellRec/LArCellRecalibration.h rename to LArCalorimeter/LArCellRec/src/LArCellRecalibration.h index 50f3c93ef247..0f2d373bad5b --- a/LArCalorimeter/LArCellRec/LArCellRec/LArCellRecalibration.h +++ b/LArCalorimeter/LArCellRec/src/LArCellRecalibration.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef LARCELLREC_LArCellRecalibration_H -#define LARCELLREC_LArCellRecalibration_H +#ifndef LARCELLREC_LARCELLRECALIBRATION_H +#define LARCELLREC_LARCELLRECALIBRATION_H #include "CaloUtils/CaloCellCorrection.h" diff --git a/LArCalorimeter/LArCellRec/src/LArCellRescaler.cxx b/LArCalorimeter/LArCellRec/src/LArCellRescaler.cxx old mode 100755 new mode 100644 index d4ad94ab41b1..82466aad58a3 --- a/LArCalorimeter/LArCellRec/src/LArCellRescaler.cxx +++ b/LArCalorimeter/LArCellRec/src/LArCellRescaler.cxx @@ -2,9 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArCellRec/LArCellRescaler.h" -#include "GaudiKernel/MsgStream.h" -#include "StoreGate/StoreGateSvc.h" +#include "LArCellRescaler.h" #include "CaloEvent/CaloCell.h" #include "CaloIdentifier/CaloCell_ID.h" diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArCellRescaler.h b/LArCalorimeter/LArCellRec/src/LArCellRescaler.h old mode 100755 new mode 100644 similarity index 100% rename from LArCalorimeter/LArCellRec/LArCellRec/LArCellRescaler.h rename to LArCalorimeter/LArCellRec/src/LArCellRescaler.h diff --git a/LArCalorimeter/LArCellRec/src/LArCollisionTimeAlg.cxx b/LArCalorimeter/LArCellRec/src/LArCollisionTimeAlg.cxx index 43beec499a3d..2f79a4dbb9cb 100644 --- a/LArCalorimeter/LArCellRec/src/LArCollisionTimeAlg.cxx +++ b/LArCalorimeter/LArCellRec/src/LArCollisionTimeAlg.cxx @@ -2,11 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArCellRec/LArCollisionTimeAlg.h" -#include "GaudiKernel/Property.h" -#include "GaudiKernel/MsgStream.h" - -#include "StoreGate/StoreGateSvc.h" +#include "LArCollisionTimeAlg.h" #include "Identifier/Identifier.h" #include "CaloIdentifier/CaloCell_ID.h" diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArCollisionTimeAlg.h b/LArCalorimeter/LArCellRec/src/LArCollisionTimeAlg.h similarity index 95% rename from LArCalorimeter/LArCellRec/LArCellRec/LArCollisionTimeAlg.h rename to LArCalorimeter/LArCellRec/src/LArCollisionTimeAlg.h index 681c7c9ca623..9d383ca5ca42 100644 --- a/LArCalorimeter/LArCellRec/LArCellRec/LArCollisionTimeAlg.h +++ b/LArCalorimeter/LArCellRec/src/LArCollisionTimeAlg.h @@ -5,8 +5,8 @@ // TheLArCollisionsAlg.h // -#ifndef _LArCollisionTimeAlg_LArCollisionTimeAlg_H -#define _LArCollisionTimeAlg_LArCollisionTimeAlg_H +#ifndef LARCELLREC_LARCOLLISIONTIMEALG_H +#define LARCELLREC_LARCOLLISIONTIMEALG_H #include <string> diff --git a/LArCalorimeter/LArCellRec/src/LArG3Escale.cxx b/LArCalorimeter/LArCellRec/src/LArG3Escale.cxx old mode 100755 new mode 100644 index a5704ed28e71..9acfd59445b7 --- a/LArCalorimeter/LArCellRec/src/LArG3Escale.cxx +++ b/LArCalorimeter/LArCellRec/src/LArG3Escale.cxx @@ -26,7 +26,7 @@ Updated : Jul 2003 (DR) ********************************************************************/ // INCLUDE LAr header files: -#include "LArCellRec/LArG3Escale.h" +#include "LArG3Escale.h" #include "CaloIdentifier/CaloIdManager.h" #include "CaloDetDescr/CaloDetDescrManager.h" diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArG3Escale.h b/LArCalorimeter/LArCellRec/src/LArG3Escale.h old mode 100755 new mode 100644 similarity index 100% rename from LArCalorimeter/LArCellRec/LArCellRec/LArG3Escale.h rename to LArCalorimeter/LArCellRec/src/LArG3Escale.h diff --git a/LArCalorimeter/LArCellRec/src/LArG3Escale_TDR.cxx b/LArCalorimeter/LArCellRec/src/LArG3Escale_TDR.cxx old mode 100755 new mode 100644 index d9a5d6a83a61..f90aac69a4b0 --- a/LArCalorimeter/LArCellRec/src/LArG3Escale_TDR.cxx +++ b/LArCalorimeter/LArCellRec/src/LArG3Escale_TDR.cxx @@ -21,7 +21,7 @@ Updated: Jan. 7, 2001 (SR) ********************************************************************/ // INCLUDE LAr header files: -#include "LArCellRec/LArG3Escale_TDR.h" +#include "LArG3Escale_TDR.h" #include "CaloIdentifier/CaloIdManager.h" #include "CaloDetDescr/CaloDetDescrManager.h" #include "CaloEvent/CaloCell.h" diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArG3Escale_TDR.h b/LArCalorimeter/LArCellRec/src/LArG3Escale_TDR.h old mode 100755 new mode 100644 similarity index 100% rename from LArCalorimeter/LArCellRec/LArCellRec/LArG3Escale_TDR.h rename to LArCalorimeter/LArCellRec/src/LArG3Escale_TDR.h diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArHitInfo.h b/LArCalorimeter/LArCellRec/src/LArHitInfo.h old mode 100755 new mode 100644 similarity index 100% rename from LArCalorimeter/LArCellRec/LArCellRec/LArHitInfo.h rename to LArCalorimeter/LArCellRec/src/LArHitInfo.h diff --git a/LArCalorimeter/LArCellRec/src/LArNoisyROAlg.cxx b/LArCalorimeter/LArCellRec/src/LArNoisyROAlg.cxx index fdc24800f076..d74cce45d1c4 100644 --- a/LArCalorimeter/LArCellRec/src/LArNoisyROAlg.cxx +++ b/LArCalorimeter/LArCellRec/src/LArNoisyROAlg.cxx @@ -3,7 +3,7 @@ */ -#include "LArCellRec/LArNoisyROAlg.h" +#include "LArNoisyROAlg.h" #include "CaloEvent/CaloCellContainer.h" #include "CaloEvent/CaloCell.h" diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArNoisyROAlg.h b/LArCalorimeter/LArCellRec/src/LArNoisyROAlg.h similarity index 93% rename from LArCalorimeter/LArCellRec/LArCellRec/LArNoisyROAlg.h rename to LArCalorimeter/LArCellRec/src/LArNoisyROAlg.h index e0b78e331e90..446910f5a3a1 100644 --- a/LArCalorimeter/LArCellRec/LArCellRec/LArNoisyROAlg.h +++ b/LArCalorimeter/LArCellRec/src/LArNoisyROAlg.h @@ -2,10 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef LARNOISYROALG_H -#define LARNOISYROALG_H - - +#ifndef LARCELLREC_LARNOISYROALG_H +#define LARCELLREC_LARNOISYROALG_H /** @class LArNoisyROAlg diff --git a/LArCalorimeter/LArCellRec/src/LArNoisyROTool.cxx b/LArCalorimeter/LArCellRec/src/LArNoisyROTool.cxx index 709369729ed4..9034ead574aa 100644 --- a/LArCalorimeter/LArCellRec/src/LArNoisyROTool.cxx +++ b/LArCalorimeter/LArCellRec/src/LArNoisyROTool.cxx @@ -9,7 +9,7 @@ /////////////////////////////////////////////////////////////////// // LArCellRec includes -#include "LArCellRec/LArNoisyROTool.h" +#include "LArNoisyROTool.h" #include "CaloEvent/CaloCellContainer.h" #include "LArRecEvent/LArNoisyROSummary.h" diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArNoisyROTool.h b/LArCalorimeter/LArCellRec/src/LArNoisyROTool.h similarity index 100% rename from LArCalorimeter/LArCellRec/LArCellRec/LArNoisyROTool.h rename to LArCalorimeter/LArCellRec/src/LArNoisyROTool.h diff --git a/LArCalorimeter/LArCellRec/src/LArNonLinearity.cxx b/LArCalorimeter/LArCellRec/src/LArNonLinearity.cxx old mode 100755 new mode 100644 index 915c1b581030..e9d731e0dad5 --- a/LArCalorimeter/LArCellRec/src/LArNonLinearity.cxx +++ b/LArCalorimeter/LArCellRec/src/LArNonLinearity.cxx @@ -16,12 +16,11 @@ PURPOSE: non linearity if only linear calibration fit is used ********************************************************************/ // INCLUDE LAr header files: -#include "LArCellRec/LArNonLinearity.h" +#include "LArNonLinearity.h" #include "CaloIdentifier/CaloIdManager.h" #include "CaloDetDescr/CaloDetDescrManager.h" #include "CaloEvent/CaloCell.h" -#include "StoreGate/StoreGateSvc.h" // Units #include "CLHEP/Units/SystemOfUnits.h" diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArNonLinearity.h b/LArCalorimeter/LArCellRec/src/LArNonLinearity.h old mode 100755 new mode 100644 similarity index 100% rename from LArCalorimeter/LArCellRec/LArCellRec/LArNonLinearity.h rename to LArCalorimeter/LArCellRec/src/LArNonLinearity.h diff --git a/LArCalorimeter/LArCellRec/src/LArTimeVetoAlg.cxx b/LArCalorimeter/LArCellRec/src/LArTimeVetoAlg.cxx index d794dea90858..9a1418d38ae6 100644 --- a/LArCalorimeter/LArCellRec/src/LArTimeVetoAlg.cxx +++ b/LArCalorimeter/LArCellRec/src/LArTimeVetoAlg.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArCellRec/LArTimeVetoAlg.h" +#include "LArTimeVetoAlg.h" #include "AthenaPoolUtilities/AthenaAttributeList.h" #include "LArRecEvent/LArEventBitInfo.h" #include "GaudiKernel/Property.h" diff --git a/LArCalorimeter/LArCellRec/LArCellRec/LArTimeVetoAlg.h b/LArCalorimeter/LArCellRec/src/LArTimeVetoAlg.h similarity index 91% rename from LArCalorimeter/LArCellRec/LArCellRec/LArTimeVetoAlg.h rename to LArCalorimeter/LArCellRec/src/LArTimeVetoAlg.h index 3bca36164580..3e37fa3a6bdc 100644 --- a/LArCalorimeter/LArCellRec/LArCellRec/LArTimeVetoAlg.h +++ b/LArCalorimeter/LArCellRec/src/LArTimeVetoAlg.h @@ -5,8 +5,8 @@ // TheLArCollisionsAlg.h // -#ifndef _LArTimeVetoAlg_LArTimeVetoAlg_H -#define _LArTimeVetoAlg_LArTimeVetoAlg_H +#ifndef LARCELLREC_LARTIMEVETOALG_H +#define LARCELLREC_LARTIMEVETOALG_H #include <string> diff --git a/LArCalorimeter/LArCellRec/src/components/LArCellRec_entries.cxx b/LArCalorimeter/LArCellRec/src/components/LArCellRec_entries.cxx index f9c98e8bfb38..4997767738c7 100644 --- a/LArCalorimeter/LArCellRec/src/components/LArCellRec_entries.cxx +++ b/LArCalorimeter/LArCellRec/src/components/LArCellRec_entries.cxx @@ -1,22 +1,22 @@ -#include "LArCellRec/LArG3Escale.h" -#include "LArCellRec/LArG3Escale_TDR.h" -#include "LArCellRec/LArNonLinearity.h" -#include "LArCellRec/LArCellBuilderFromLArHitTool.h" -#include "LArCellRec/LArCellBuilderFromLArRawChannelTool.h" -#include "LArCellRec/LArCellEmMiscalib.h" -#include "LArCellRec/LArCellRescaler.h" -#include "LArCellRec/LArCellMaskingTool.h" -#include "LArCellRec/LArCellHVCorr.h" -#include "LArCellRec/LArCellRecalibration.h" -#include "LArCellRec/LArCellNoiseMaskingTool.h" -#include "LArCellRec/LArBadFebMaskingTool.h" -#include "LArCellRec/LArCellGainPathology.h" -#include "LArCellRec/LArCellMerger.h" -#include "LArCellRec/LArCellDeadOTXCorr.h" -#include "LArCellRec/LArNoisyROAlg.h" -#include "LArCellRec/LArNoisyROTool.h" -#include "LArCellRec/LArCollisionTimeAlg.h" -#include "LArCellRec/LArTimeVetoAlg.h" +#include "../LArG3Escale.h" +#include "../LArG3Escale_TDR.h" +#include "../LArNonLinearity.h" +#include "../LArCellBuilderFromLArHitTool.h" +#include "../LArCellBuilderFromLArRawChannelTool.h" +#include "../LArCellEmMiscalib.h" +#include "../LArCellRescaler.h" +#include "../LArCellMaskingTool.h" +#include "../LArCellHVCorr.h" +#include "../LArCellRecalibration.h" +#include "../LArCellNoiseMaskingTool.h" +#include "../LArBadFebMaskingTool.h" +#include "../LArCellGainPathology.h" +#include "../LArCellMerger.h" +#include "../LArCellDeadOTXCorr.h" +#include "../LArNoisyROAlg.h" +#include "../LArNoisyROTool.h" +#include "../LArCollisionTimeAlg.h" +#include "../LArTimeVetoAlg.h" DECLARE_COMPONENT( LArNoisyROAlg ) -- GitLab From 85417ce8eb9163eb9c9169dfc5fc85f239c92204 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Sat, 7 Jul 2018 13:15:12 +0200 Subject: [PATCH 401/562] LArRecUtils: Move headers to src. Most headers in this package are not used from any other package. Move those to src. Former-commit-id: c3184d5f081351da9d1ce6950a12c90621d8830a --- .../LArRecUtils/src/LArADC2MeVCondAlg.cxx | 2 +- .../{LArRecUtils => src}/LArADC2MeVCondAlg.h | 4 ++-- .../LArRecUtils/src/LArADC2MeVTool.cxx | 3 +-- .../{LArRecUtils => src}/LArADC2MeVTool.h | 4 ++-- .../LArRecUtils/src/LArAutoCorrNoiseTool.cxx | 3 +-- .../LArAutoCorrNoiseTool.h | 4 ++-- .../LArRecUtils/src/LArAutoCorrTotalTool.cxx | 3 +-- .../LArAutoCorrTotalTool.h | 4 ++-- .../LArRecUtils/src/LArCalibLineMappingAlg.h | 4 ++-- .../src/LArCellFakeProbElectronics.cxx | 5 +---- .../LArCellFakeProbElectronics.h | 4 ++-- .../src/LArFCalTowerBuilderTool.cxx | 6 ++---- .../LArRecUtils/src/LArFCalTowerBuilderTool.h | 3 +-- .../LArRecUtils/src/LArFCalTowerStore.cxx | 10 ++++------ .../{LArRecUtils => src}/LArFCalTowerStore.h | 4 ++-- .../LArRecUtils/src/LArFEBConfigReader.cxx | 2 +- .../{LArRecUtils => src}/LArFEBConfigReader.h | 4 ++-- .../LArRecUtils/src/LArFlatConditionSvc.cxx | 4 +--- .../{LArRecUtils => src}/LArFlatConditionSvc.h | 4 ++-- .../LArRecUtils/src/LArHVCorrTool.cxx | 2 +- .../{LArRecUtils => src}/LArHVCorrTool.h | 4 ++-- LArCalorimeter/LArRecUtils/src/LArOFCTool.cxx | 3 +-- .../{LArRecUtils => src}/LArOFCTool.h | 4 ++-- .../LArRecUtils/src/LArOFPeakRecoTool.cxx | 0 .../src/LArParabolaPeakRecoTool.cxx | 0 .../LArRecUtils/src/LArShapePeakRecoTool.cxx | 0 .../LArRecUtils/src/LArTowerBuilderTool.cxx | 0 .../LArRecUtils/src/LArTowerBuilderTool.h | 0 .../LArRecUtils/src/MakeLArCellFromRaw.cxx | 0 .../src/components/LArRecUtils_entries.cxx | 18 +++++++++--------- 30 files changed, 47 insertions(+), 61 deletions(-) rename LArCalorimeter/LArRecUtils/{LArRecUtils => src}/LArADC2MeVCondAlg.h (95%) mode change 100755 => 100644 LArCalorimeter/LArRecUtils/src/LArADC2MeVTool.cxx rename LArCalorimeter/LArRecUtils/{LArRecUtils => src}/LArADC2MeVTool.h (97%) mode change 100755 => 100644 mode change 100755 => 100644 LArCalorimeter/LArRecUtils/src/LArAutoCorrNoiseTool.cxx rename LArCalorimeter/LArRecUtils/{LArRecUtils => src}/LArAutoCorrNoiseTool.h (96%) mode change 100755 => 100644 mode change 100755 => 100644 LArCalorimeter/LArRecUtils/src/LArAutoCorrTotalTool.cxx rename LArCalorimeter/LArRecUtils/{LArRecUtils => src}/LArAutoCorrTotalTool.h (97%) mode change 100755 => 100644 mode change 100755 => 100644 LArCalorimeter/LArRecUtils/src/LArCellFakeProbElectronics.cxx rename LArCalorimeter/LArRecUtils/{LArRecUtils => src}/LArCellFakeProbElectronics.h (94%) mode change 100755 => 100644 mode change 100755 => 100644 LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.cxx mode change 100755 => 100644 LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.h mode change 100755 => 100644 LArCalorimeter/LArRecUtils/src/LArFCalTowerStore.cxx rename LArCalorimeter/LArRecUtils/{LArRecUtils => src}/LArFCalTowerStore.h (96%) mode change 100755 => 100644 rename LArCalorimeter/LArRecUtils/{LArRecUtils => src}/LArFEBConfigReader.h (95%) rename LArCalorimeter/LArRecUtils/{LArRecUtils => src}/LArFlatConditionSvc.h (96%) mode change 100755 => 100644 LArCalorimeter/LArRecUtils/src/LArHVCorrTool.cxx rename LArCalorimeter/LArRecUtils/{LArRecUtils => src}/LArHVCorrTool.h (98%) mode change 100755 => 100644 mode change 100755 => 100644 LArCalorimeter/LArRecUtils/src/LArOFCTool.cxx rename LArCalorimeter/LArRecUtils/{LArRecUtils => src}/LArOFCTool.h (98%) mode change 100755 => 100644 mode change 100755 => 100644 LArCalorimeter/LArRecUtils/src/LArOFPeakRecoTool.cxx mode change 100755 => 100644 LArCalorimeter/LArRecUtils/src/LArParabolaPeakRecoTool.cxx mode change 100755 => 100644 LArCalorimeter/LArRecUtils/src/LArShapePeakRecoTool.cxx mode change 100755 => 100644 LArCalorimeter/LArRecUtils/src/LArTowerBuilderTool.cxx mode change 100755 => 100644 LArCalorimeter/LArRecUtils/src/LArTowerBuilderTool.h mode change 100755 => 100644 LArCalorimeter/LArRecUtils/src/MakeLArCellFromRaw.cxx diff --git a/LArCalorimeter/LArRecUtils/src/LArADC2MeVCondAlg.cxx b/LArCalorimeter/LArRecUtils/src/LArADC2MeVCondAlg.cxx index 410fdda3cfcf..9299c40f58e0 100644 --- a/LArCalorimeter/LArRecUtils/src/LArADC2MeVCondAlg.cxx +++ b/LArCalorimeter/LArRecUtils/src/LArADC2MeVCondAlg.cxx @@ -3,7 +3,7 @@ */ -#include "LArRecUtils/LArADC2MeVCondAlg.h" +#include "LArADC2MeVCondAlg.h" #include "LArRawConditions/LArADC2MeV.h" #include "LArCabling/LArOnOffIdMapping.h" diff --git a/LArCalorimeter/LArRecUtils/LArRecUtils/LArADC2MeVCondAlg.h b/LArCalorimeter/LArRecUtils/src/LArADC2MeVCondAlg.h similarity index 95% rename from LArCalorimeter/LArRecUtils/LArRecUtils/LArADC2MeVCondAlg.h rename to LArCalorimeter/LArRecUtils/src/LArADC2MeVCondAlg.h index abed17bd2a09..6a8a5c6808b6 100644 --- a/LArCalorimeter/LArRecUtils/LArRecUtils/LArADC2MeVCondAlg.h +++ b/LArCalorimeter/LArRecUtils/src/LArADC2MeVCondAlg.h @@ -6,8 +6,8 @@ -#ifndef LARADC2MEVCONDALG_H -#define LARADC2MEVCONDALG_H +#ifndef LARRECUTILS_LARADC2MEVCONDALG_H +#define LARRECUTILS_LARADC2MEVCONDALG_H #include "AthenaBaseComps/AthAlgorithm.h" #include "StoreGate/ReadCondHandleKey.h" diff --git a/LArCalorimeter/LArRecUtils/src/LArADC2MeVTool.cxx b/LArCalorimeter/LArRecUtils/src/LArADC2MeVTool.cxx old mode 100755 new mode 100644 index 5fc3bc72d67e..a84e433ddc65 --- a/LArCalorimeter/LArRecUtils/src/LArADC2MeVTool.cxx +++ b/LArCalorimeter/LArRecUtils/src/LArADC2MeVTool.cxx @@ -2,8 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArRecUtils/LArADC2MeVTool.h" -#include "GaudiKernel/MsgStream.h" +#include "LArADC2MeVTool.h" #include "AthenaKernel/errorcheck.h" #include "GaudiKernel/IIncidentSvc.h" #include "LArIdentifier/LArOnlineID.h" diff --git a/LArCalorimeter/LArRecUtils/LArRecUtils/LArADC2MeVTool.h b/LArCalorimeter/LArRecUtils/src/LArADC2MeVTool.h old mode 100755 new mode 100644 similarity index 97% rename from LArCalorimeter/LArRecUtils/LArRecUtils/LArADC2MeVTool.h rename to LArCalorimeter/LArRecUtils/src/LArADC2MeVTool.h index 41a025520fee..129e7741e54c --- a/LArCalorimeter/LArRecUtils/LArRecUtils/LArADC2MeVTool.h +++ b/LArCalorimeter/LArRecUtils/src/LArADC2MeVTool.h @@ -12,8 +12,8 @@ * @version 0-0-1, 28/01/2004 * */ -#ifndef LARCALIBUTILS_LARADC2MEVTOOL_H -#define LARCALIBUTILS_LARADC2MEVTOOL_H +#ifndef LARRECUTILS_LARADC2MEVTOOL_H +#define LARRECUTILS_LARADC2MEVTOOL_H #include "LArElecCalib/ILArADC2MeVTool.h" #include "GaudiKernel/IIncidentListener.h" diff --git a/LArCalorimeter/LArRecUtils/src/LArAutoCorrNoiseTool.cxx b/LArCalorimeter/LArRecUtils/src/LArAutoCorrNoiseTool.cxx old mode 100755 new mode 100644 index 5428b5655598..70032738db29 --- a/LArCalorimeter/LArRecUtils/src/LArAutoCorrNoiseTool.cxx +++ b/LArCalorimeter/LArRecUtils/src/LArAutoCorrNoiseTool.cxx @@ -2,10 +2,9 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArRecUtils/LArAutoCorrNoiseTool.h" +#include "LArAutoCorrNoiseTool.h" #include "GaudiKernel/IIncidentSvc.h" #include "LArElecCalib/LArConditionsException.h" -#include "StoreGate/StoreGateSvc.h" #include <cmath> diff --git a/LArCalorimeter/LArRecUtils/LArRecUtils/LArAutoCorrNoiseTool.h b/LArCalorimeter/LArRecUtils/src/LArAutoCorrNoiseTool.h old mode 100755 new mode 100644 similarity index 96% rename from LArCalorimeter/LArRecUtils/LArRecUtils/LArAutoCorrNoiseTool.h rename to LArCalorimeter/LArRecUtils/src/LArAutoCorrNoiseTool.h index 91dfaece5f76..c47ccf966036 --- a/LArCalorimeter/LArRecUtils/LArRecUtils/LArAutoCorrNoiseTool.h +++ b/LArCalorimeter/LArRecUtils/src/LArAutoCorrNoiseTool.h @@ -15,8 +15,8 @@ Interfaces defined in ILArAutoCorrNoiseTool.h */ -#ifndef LARCALIBUTILS_LARAUTOCORRNOISETOOL_H -#define LARCALIBUTILS_LARAUTOCORRNOISETOOL_H +#ifndef LARRECUTILS_LARAUTOCORRNOISETOOL_H +#define LARRECUTILS_LARAUTOCORRNOISETOOL_H #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" diff --git a/LArCalorimeter/LArRecUtils/src/LArAutoCorrTotalTool.cxx b/LArCalorimeter/LArRecUtils/src/LArAutoCorrTotalTool.cxx old mode 100755 new mode 100644 index 6287bc261fc0..456bfa6c1de3 --- a/LArCalorimeter/LArRecUtils/src/LArAutoCorrTotalTool.cxx +++ b/LArCalorimeter/LArRecUtils/src/LArAutoCorrTotalTool.cxx @@ -2,10 +2,9 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArRecUtils/LArAutoCorrTotalTool.h" +#include "LArAutoCorrTotalTool.h" #include "GaudiKernel/IIncidentSvc.h" #include "LArElecCalib/LArConditionsException.h" -#include "StoreGate/StoreGateSvc.h" #include "LArIdentifier/LArOnlineID.h" #include "LArIdentifier/LArOnline_SuperCellID.h" #include "LArCabling/LArCablingService.h" diff --git a/LArCalorimeter/LArRecUtils/LArRecUtils/LArAutoCorrTotalTool.h b/LArCalorimeter/LArRecUtils/src/LArAutoCorrTotalTool.h old mode 100755 new mode 100644 similarity index 97% rename from LArCalorimeter/LArRecUtils/LArRecUtils/LArAutoCorrTotalTool.h rename to LArCalorimeter/LArRecUtils/src/LArAutoCorrTotalTool.h index ac07041d53ff..a36512a46f84 --- a/LArCalorimeter/LArRecUtils/LArRecUtils/LArAutoCorrTotalTool.h +++ b/LArCalorimeter/LArRecUtils/src/LArAutoCorrTotalTool.h @@ -17,8 +17,8 @@ * */ -#ifndef LARCALIBUTILS_LARAUTOCORRTOTALTOOL_H -#define LARCALIBUTILS_LARAUTOCORRTOTALTOOL_H +#ifndef LARRECUTILS_LARAUTOCORRTOTALTOOL_H +#define LARRECUTILS_LARAUTOCORRTOTALTOOL_H #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" diff --git a/LArCalorimeter/LArRecUtils/src/LArCalibLineMappingAlg.h b/LArCalorimeter/LArRecUtils/src/LArCalibLineMappingAlg.h index 675dce4b6cc6..7d15f577b1af 100644 --- a/LArCalorimeter/LArRecUtils/src/LArCalibLineMappingAlg.h +++ b/LArCalorimeter/LArRecUtils/src/LArCalibLineMappingAlg.h @@ -4,8 +4,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef LARRECCONDITIONS_LARCALIBLINEMAPPINGALG_H -#define LARRECCONDITIONS_LARCALIBLINEMAPPINGALG_H +#ifndef LARRECUTILS_LARCALIBLINEMAPPINGALG_H +#define LARRECUTILS_LARCALIBLINEMAPPINGALG_H #include "AthenaBaseComps/AthAlgorithm.h" #include "StoreGate/ReadCondHandleKey.h" diff --git a/LArCalorimeter/LArRecUtils/src/LArCellFakeProbElectronics.cxx b/LArCalorimeter/LArRecUtils/src/LArCellFakeProbElectronics.cxx old mode 100755 new mode 100644 index 369734669917..7a7c4c65ba17 --- a/LArCalorimeter/LArRecUtils/src/LArCellFakeProbElectronics.cxx +++ b/LArCalorimeter/LArRecUtils/src/LArCellFakeProbElectronics.cxx @@ -15,10 +15,7 @@ PURPOSE: Scales down the energy of cells due to simulated failure of the readout ********************************************************************/ -#include "LArRecUtils/LArCellFakeProbElectronics.h" - -#include "StoreGate/StoreGateSvc.h" - +#include "LArCellFakeProbElectronics.h" #include "CaloEvent/CaloCellContainer.h" #include "CaloIdentifier/CaloIdManager.h" diff --git a/LArCalorimeter/LArRecUtils/LArRecUtils/LArCellFakeProbElectronics.h b/LArCalorimeter/LArRecUtils/src/LArCellFakeProbElectronics.h old mode 100755 new mode 100644 similarity index 94% rename from LArCalorimeter/LArRecUtils/LArRecUtils/LArCellFakeProbElectronics.h rename to LArCalorimeter/LArRecUtils/src/LArCellFakeProbElectronics.h index e87ee5c2306c..7a975108c6d7 --- a/LArCalorimeter/LArRecUtils/LArRecUtils/LArCellFakeProbElectronics.h +++ b/LArCalorimeter/LArRecUtils/src/LArCellFakeProbElectronics.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef CALOREC_LARCELLFAKEPROBELECTRONICS_H -#define CALOREC_LARCELLFAKEPROBELECTRONICS_H +#ifndef LARRECUTILS_LARCELLFAKEPROBELECTRONICS_H +#define LARRECUTILS_LARCELLFAKEPROBELECTRONICS_H /*! \class LArCellFakeProbElectronics * diff --git a/LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.cxx b/LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.cxx old mode 100755 new mode 100644 index c8d784d7016c..cc6edfaa6f19 --- a/LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.cxx +++ b/LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.cxx @@ -3,7 +3,8 @@ */ -#include "StoreGate/StoreGateSvc.h" +#include "LArFCalTowerBuilderTool.h" +#include "LArFCalTowerStore.h" #include "CaloIdentifier/CaloCell_ID.h" #include "CaloIdentifier/CaloIdManager.h" @@ -16,9 +17,6 @@ #include "CaloEvent/CaloTower.h" #include "CaloEvent/CaloTowerContainer.h" -#include "LArRecUtils/LArFCalTowerStore.h" -#include "LArFCalTowerBuilderTool.h" - #include <string> #include <cmath> diff --git a/LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.h b/LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.h old mode 100755 new mode 100644 index 5e0651f55866..d4a298769516 --- a/LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.h +++ b/LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.h @@ -18,12 +18,11 @@ */ -#include "LArRecUtils/LArFCalTowerStore.h" +#include "LArFCalTowerStore.h" #include "CaloUtils/CaloTowerBuilderToolBase.h" #include "CaloIdentifier/CaloCell_ID.h" -#include <list> class LArFCalTowerStore; diff --git a/LArCalorimeter/LArRecUtils/src/LArFCalTowerStore.cxx b/LArCalorimeter/LArRecUtils/src/LArFCalTowerStore.cxx old mode 100755 new mode 100644 index 884d07cbc66d..35cde60f2d59 --- a/LArCalorimeter/LArRecUtils/src/LArFCalTowerStore.cxx +++ b/LArCalorimeter/LArRecUtils/src/LArFCalTowerStore.cxx @@ -15,10 +15,8 @@ PURPOSE: Intermediate store for cell/tower maps Updated: ********************************************************************/ -#include "GaudiKernel/Bootstrap.h" -#include "GaudiKernel/Service.h" -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/IMessageSvc.h" +#include "LArFCalTowerStore.h" + // include header files #include "Identifier/IdentifierHash.h" @@ -30,8 +28,8 @@ Updated: #include "CaloGeoHelpers/CaloPhiRange.h" #include "CaloEvent/CaloTowerContainer.h" - -#include "LArRecUtils/LArFCalTowerStore.h" +#include "GaudiKernel/Bootstrap.h" +#include "GaudiKernel/Service.h" #include <cmath> diff --git a/LArCalorimeter/LArRecUtils/LArRecUtils/LArFCalTowerStore.h b/LArCalorimeter/LArRecUtils/src/LArFCalTowerStore.h old mode 100755 new mode 100644 similarity index 96% rename from LArCalorimeter/LArRecUtils/LArRecUtils/LArFCalTowerStore.h rename to LArCalorimeter/LArRecUtils/src/LArFCalTowerStore.h index cebbc2bb1d3c..089b24b54e92 --- a/LArCalorimeter/LArRecUtils/LArRecUtils/LArFCalTowerStore.h +++ b/LArCalorimeter/LArRecUtils/src/LArFCalTowerStore.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef LARFCALTOWERSTORE_H -#define LARFCALTOWERSTORE_H +#ifndef LARRECUTILS_LARFCALTOWERSTORE_H +#define LARRECUTILS_LARFCALTOWERSTORE_H /** @class LArFCalTowerStore diff --git a/LArCalorimeter/LArRecUtils/src/LArFEBConfigReader.cxx b/LArCalorimeter/LArRecUtils/src/LArFEBConfigReader.cxx index b92cb6b84eef..1baed3e5bf3c 100644 --- a/LArCalorimeter/LArRecUtils/src/LArFEBConfigReader.cxx +++ b/LArCalorimeter/LArRecUtils/src/LArFEBConfigReader.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArRecUtils/LArFEBConfigReader.h" +#include "LArFEBConfigReader.h" #include "LArIdentifier/LArOnlineID.h" LArFEBConfigReader::LArFEBConfigReader(const std::string& type, const std::string& name, const IInterface* parent) : diff --git a/LArCalorimeter/LArRecUtils/LArRecUtils/LArFEBConfigReader.h b/LArCalorimeter/LArRecUtils/src/LArFEBConfigReader.h similarity index 95% rename from LArCalorimeter/LArRecUtils/LArRecUtils/LArFEBConfigReader.h rename to LArCalorimeter/LArRecUtils/src/LArFEBConfigReader.h index 1da5758c7146..6ba3a618e3f0 100644 --- a/LArCalorimeter/LArRecUtils/LArRecUtils/LArFEBConfigReader.h +++ b/LArCalorimeter/LArRecUtils/src/LArFEBConfigReader.h @@ -3,8 +3,8 @@ */ //Dear emacs, this is -*-c++-*- -#ifndef LARFEBCONFIGREADERTOOL -#define LARFEBCONFIGREADERTOOL +#ifndef LARRECUTILS_LARFEBCONFIGREADERTOOL +#define LARRECUTILS_LARFEBCONFIGREADERTOOL #include "AthenaBaseComps/AthAlgTool.h" #include "LArElecCalib/ILArFEBConfigReader.h" diff --git a/LArCalorimeter/LArRecUtils/src/LArFlatConditionSvc.cxx b/LArCalorimeter/LArRecUtils/src/LArFlatConditionSvc.cxx index 0c56ea0293ed..8220bea7ac0b 100644 --- a/LArCalorimeter/LArRecUtils/src/LArFlatConditionSvc.cxx +++ b/LArCalorimeter/LArRecUtils/src/LArFlatConditionSvc.cxx @@ -2,10 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArRecUtils/LArFlatConditionSvc.h" +#include "LArFlatConditionSvc.h" -#include "StoreGate/StoreGateSvc.h" -#include "StoreGate/StoreClearedIncident.h" #include "AthenaKernel/IOVRange.h" #include "AthenaPoolUtilities/CondAttrListCollection.h" diff --git a/LArCalorimeter/LArRecUtils/LArRecUtils/LArFlatConditionSvc.h b/LArCalorimeter/LArRecUtils/src/LArFlatConditionSvc.h similarity index 96% rename from LArCalorimeter/LArRecUtils/LArRecUtils/LArFlatConditionSvc.h rename to LArCalorimeter/LArRecUtils/src/LArFlatConditionSvc.h index 83e94605d0f9..19ba09537b4f 100644 --- a/LArCalorimeter/LArRecUtils/LArRecUtils/LArFlatConditionSvc.h +++ b/LArCalorimeter/LArRecUtils/src/LArFlatConditionSvc.h @@ -4,8 +4,8 @@ //Dear emacs, this is -*-c++-*- -#ifndef LARCALORIMETER_LARFLATCONDITIONSVC_H -#define LARCALORIMETER_LARFLATCONDITIONSVC_H +#ifndef LARRECUTILS_LARFLATCONDITIONSVC_H +#define LARRECUTILS_LARFLATCONDITIONSVC_H #include "GaudiKernel/ServiceHandle.h" #include "AthenaBaseComps/AthService.h" diff --git a/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.cxx b/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.cxx old mode 100755 new mode 100644 index f17a0f17de63..e24d95cc884a --- a/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.cxx +++ b/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArRecUtils/LArHVCorrTool.h" +#include "LArHVCorrTool.h" #include "AthenaKernel/errorcheck.h" #include "GaudiKernel/IIncidentSvc.h" #include "CaloDetDescr/CaloDetDescrElement.h" diff --git a/LArCalorimeter/LArRecUtils/LArRecUtils/LArHVCorrTool.h b/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.h old mode 100755 new mode 100644 similarity index 98% rename from LArCalorimeter/LArRecUtils/LArRecUtils/LArHVCorrTool.h rename to LArCalorimeter/LArRecUtils/src/LArHVCorrTool.h index 24fc0c6e0846..22fc264aad8c --- a/LArCalorimeter/LArRecUtils/LArRecUtils/LArHVCorrTool.h +++ b/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.h @@ -4,8 +4,8 @@ //Dear emacs, this is -*-c++-*- -#ifndef LARCALIBUTILS_LARHVCORRTOOL_H -#define LARCALIBUTILS_LARHVCORRTOOL_H +#ifndef LARRECUTILS_LARHVCORRTOOL_H +#define LARRECUTILS_LARHVCORRTOOL_H //#include "GaudiKernel/AlgTool.h" #include "AthenaBaseComps/AthAlgTool.h" diff --git a/LArCalorimeter/LArRecUtils/src/LArOFCTool.cxx b/LArCalorimeter/LArRecUtils/src/LArOFCTool.cxx old mode 100755 new mode 100644 index e6c2a1fd67c9..6f6787b217ff --- a/LArCalorimeter/LArRecUtils/src/LArOFCTool.cxx +++ b/LArCalorimeter/LArRecUtils/src/LArOFCTool.cxx @@ -2,11 +2,10 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "LArRecUtils/LArOFCTool.h" +#include "LArOFCTool.h" #include "GaudiKernel/IToolSvc.h" #include "GaudiKernel/IIncidentSvc.h" #include "LArElecCalib/LArConditionsException.h" -#include "StoreGate/StoreGateSvc.h" #include "CLHEP/Matrix/Matrix.h" #include "CLHEP/Matrix/Vector.h" diff --git a/LArCalorimeter/LArRecUtils/LArRecUtils/LArOFCTool.h b/LArCalorimeter/LArRecUtils/src/LArOFCTool.h old mode 100755 new mode 100644 similarity index 98% rename from LArCalorimeter/LArRecUtils/LArRecUtils/LArOFCTool.h rename to LArCalorimeter/LArRecUtils/src/LArOFCTool.h index 9068ef91bcf8..bf79b47bbcc1 --- a/LArCalorimeter/LArRecUtils/LArRecUtils/LArOFCTool.h +++ b/LArCalorimeter/LArRecUtils/src/LArOFCTool.h @@ -22,8 +22,8 @@ * */ -#ifndef LARCALIBUTILS_LAROFCTOOL_H -#define LARCALIBUTILS_LAROFCTOOL_H +#ifndef LARRECUTILS_LAROFCTOOL_H +#define LARRECUTILS_LAROFCTOOL_H #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" diff --git a/LArCalorimeter/LArRecUtils/src/LArOFPeakRecoTool.cxx b/LArCalorimeter/LArRecUtils/src/LArOFPeakRecoTool.cxx old mode 100755 new mode 100644 diff --git a/LArCalorimeter/LArRecUtils/src/LArParabolaPeakRecoTool.cxx b/LArCalorimeter/LArRecUtils/src/LArParabolaPeakRecoTool.cxx old mode 100755 new mode 100644 diff --git a/LArCalorimeter/LArRecUtils/src/LArShapePeakRecoTool.cxx b/LArCalorimeter/LArRecUtils/src/LArShapePeakRecoTool.cxx old mode 100755 new mode 100644 diff --git a/LArCalorimeter/LArRecUtils/src/LArTowerBuilderTool.cxx b/LArCalorimeter/LArRecUtils/src/LArTowerBuilderTool.cxx old mode 100755 new mode 100644 diff --git a/LArCalorimeter/LArRecUtils/src/LArTowerBuilderTool.h b/LArCalorimeter/LArRecUtils/src/LArTowerBuilderTool.h old mode 100755 new mode 100644 diff --git a/LArCalorimeter/LArRecUtils/src/MakeLArCellFromRaw.cxx b/LArCalorimeter/LArRecUtils/src/MakeLArCellFromRaw.cxx old mode 100755 new mode 100644 diff --git a/LArCalorimeter/LArRecUtils/src/components/LArRecUtils_entries.cxx b/LArCalorimeter/LArRecUtils/src/components/LArRecUtils_entries.cxx index 854473d4c79f..336b0aeb0527 100644 --- a/LArCalorimeter/LArRecUtils/src/components/LArRecUtils_entries.cxx +++ b/LArCalorimeter/LArRecUtils/src/components/LArRecUtils_entries.cxx @@ -1,18 +1,18 @@ -#include "LArRecUtils/LArADC2MeVTool.h" -#include "LArRecUtils/LArAutoCorrNoiseTool.h" -#include "LArRecUtils/LArAutoCorrTotalTool.h" -#include "LArRecUtils/LArCellFakeProbElectronics.h" +#include "../LArADC2MeVTool.h" +#include "../LArAutoCorrNoiseTool.h" +#include "../LArAutoCorrTotalTool.h" +#include "../LArCellFakeProbElectronics.h" //#include "LArRecUtils/LArCellFakeProbHV.h" -#include "LArRecUtils/LArHVCorrTool.h" +#include "../LArHVCorrTool.h" //#include "LArRecUtils/LArHVGeometryTool.h" -#include "LArRecUtils/LArOFCTool.h" +#include "../LArOFCTool.h" #include "LArRecUtils/LArOFPeakRecoTool.h" #include "LArRecUtils/LArParabolaPeakRecoTool.h" #include "LArRecUtils/LArShapePeakRecoTool.h" #include "../LArTowerBuilderTool.h" #include "../LArFCalTowerBuilderTool.h" -#include "LArRecUtils/LArFEBConfigReader.h" -#include "LArRecUtils/LArFlatConditionSvc.h" +#include "../LArFEBConfigReader.h" +#include "../LArFlatConditionSvc.h" #include "../LArFCalTowerBuilderToolTestAlg.h" #include "../LArHVScaleRetriever.h" #include "../LArFlatConditionsAlg.h" @@ -21,7 +21,7 @@ #include "../LArFebRodMappingAlg.h" #include "../LArSymConditionsAlg.h" #include "../LArMCSymCondAlg.h" -#include "LArRecUtils/LArADC2MeVCondAlg.h" +#include "../LArADC2MeVCondAlg.h" DECLARE_COMPONENT( LArADC2MeVTool ) DECLARE_COMPONENT( LArAutoCorrNoiseTool ) -- GitLab From 09c1dd9aa668905c742422f81b5a2323dde87839 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Sat, 7 Jul 2018 13:14:09 +0200 Subject: [PATCH 402/562] CaloCellCorrection: Move headers to src. Headers in this package are not used from any other package. Move them to src. Former-commit-id: d7909eb7fbef839f2540bfbdfa5c8742e40a4c0c --- Calorimeter/CaloCellCorrection/CMakeLists.txt | 1 - .../src/CaloCellEnergyRescaler.cxx | 2 +- .../CaloCellEnergyRescaler.h | 0 .../src/CaloCellMBAverageCorr.cxx | 3 +-- .../CaloCellMBAverageCorr.h | 5 ++--- .../src/CaloCellNeighborsAverageCorr.cxx | 4 +--- .../CaloCellNeighborsAverageCorr.h | 4 ++-- .../src/CaloCellPedestalCorr.cxx | 6 +----- .../CaloCellPedestalCorr.h | 4 ++-- .../CaloCellCorrection/src/CaloCellRandomizer.cxx | 2 +- .../CaloCellRandomizer.h | 0 .../CaloCellCorrection/src/CaloCellRescaler.cxx | 3 +-- .../{CaloCellCorrection => src}/CaloCellRescaler.h | 4 ++-- .../src/CaloCellTimeCorrTool.cxx | 2 +- .../CaloCellTimeCorrTool.h | 4 ++-- .../src/components/CaloCellCorrection_entries.cxx | 14 +++++++------- 16 files changed, 24 insertions(+), 34 deletions(-) rename Calorimeter/CaloCellCorrection/{CaloCellCorrection => src}/CaloCellEnergyRescaler.h (100%) rename Calorimeter/CaloCellCorrection/{CaloCellCorrection => src}/CaloCellMBAverageCorr.h (86%) mode change 100755 => 100644 rename Calorimeter/CaloCellCorrection/{CaloCellCorrection => src}/CaloCellNeighborsAverageCorr.h (91%) mode change 100755 => 100644 rename Calorimeter/CaloCellCorrection/{CaloCellCorrection => src}/CaloCellPedestalCorr.h (93%) mode change 100755 => 100644 rename Calorimeter/CaloCellCorrection/{CaloCellCorrection => src}/CaloCellRandomizer.h (100%) rename Calorimeter/CaloCellCorrection/{CaloCellCorrection => src}/CaloCellRescaler.h (93%) mode change 100755 => 100644 rename Calorimeter/CaloCellCorrection/{CaloCellCorrection => src}/CaloCellTimeCorrTool.h (90%) diff --git a/Calorimeter/CaloCellCorrection/CMakeLists.txt b/Calorimeter/CaloCellCorrection/CMakeLists.txt index b1175624421c..dc5e7573e31a 100644 --- a/Calorimeter/CaloCellCorrection/CMakeLists.txt +++ b/Calorimeter/CaloCellCorrection/CMakeLists.txt @@ -33,6 +33,5 @@ atlas_add_component( CaloCellCorrection LINK_LIBRARIES ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} CaloCondBlobObjs CaloIdentifier CaloUtilsLib AthenaBaseComps AthenaKernel StoreGateLib SGtests AthenaPoolUtilities GaudiKernel CaloDetDescrLib CaloEvent Identifier ) # Install files from the package: -atlas_install_headers( CaloCellCorrection ) atlas_install_python_modules( python/*.py ) diff --git a/Calorimeter/CaloCellCorrection/src/CaloCellEnergyRescaler.cxx b/Calorimeter/CaloCellCorrection/src/CaloCellEnergyRescaler.cxx index 0237add4e80c..6492ec557b22 100644 --- a/Calorimeter/CaloCellCorrection/src/CaloCellEnergyRescaler.cxx +++ b/Calorimeter/CaloCellCorrection/src/CaloCellEnergyRescaler.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "CaloCellCorrection/CaloCellEnergyRescaler.h" +#include "CaloCellEnergyRescaler.h" #include "CaloEvent/CaloCellContainer.h" #include "CaloCondBlobObjs/CaloCondBlobFlt.h" diff --git a/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellEnergyRescaler.h b/Calorimeter/CaloCellCorrection/src/CaloCellEnergyRescaler.h similarity index 100% rename from Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellEnergyRescaler.h rename to Calorimeter/CaloCellCorrection/src/CaloCellEnergyRescaler.h diff --git a/Calorimeter/CaloCellCorrection/src/CaloCellMBAverageCorr.cxx b/Calorimeter/CaloCellCorrection/src/CaloCellMBAverageCorr.cxx index 9b0f43fd0f95..c84049ae94f1 100755 --- a/Calorimeter/CaloCellCorrection/src/CaloCellMBAverageCorr.cxx +++ b/Calorimeter/CaloCellCorrection/src/CaloCellMBAverageCorr.cxx @@ -12,9 +12,8 @@ // // **************************************************************************************** -#include "CaloCellCorrection/CaloCellMBAverageCorr.h" +#include "CaloCellMBAverageCorr.h" #include "CaloEvent/CaloCell.h" -#include "GaudiKernel/MsgStream.h" // ====================================================== diff --git a/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellMBAverageCorr.h b/Calorimeter/CaloCellCorrection/src/CaloCellMBAverageCorr.h old mode 100755 new mode 100644 similarity index 86% rename from Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellMBAverageCorr.h rename to Calorimeter/CaloCellCorrection/src/CaloCellMBAverageCorr.h index 13b738e13067..0c7bccad54a7 --- a/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellMBAverageCorr.h +++ b/Calorimeter/CaloCellCorrection/src/CaloCellMBAverageCorr.h @@ -2,12 +2,11 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef CALOREC_CaloCellMBAverageCorr_H -#define CALOREC_CaloCellMBAverageCorr_H +#ifndef CALOCELLCORRECTION_CALOCELLMBAVERAGECORR_H +#define CALOCELLCORRECTION_CALOCELLMBAVERAGECORR_H #include "CaloUtils/CaloCellCorrection.h" #include "CaloInterface/ICaloMBAverageTool.h" -#include "StoreGate/DataHandle.h" #include "GaudiKernel/ToolHandle.h" class CaloCell; diff --git a/Calorimeter/CaloCellCorrection/src/CaloCellNeighborsAverageCorr.cxx b/Calorimeter/CaloCellCorrection/src/CaloCellNeighborsAverageCorr.cxx index 06458ab11a4f..8366f111416c 100755 --- a/Calorimeter/CaloCellCorrection/src/CaloCellNeighborsAverageCorr.cxx +++ b/Calorimeter/CaloCellCorrection/src/CaloCellNeighborsAverageCorr.cxx @@ -10,7 +10,7 @@ // // **************************************************************************************** -#include "CaloCellCorrection/CaloCellNeighborsAverageCorr.h" +#include "CaloCellNeighborsAverageCorr.h" #include "CaloEvent/CaloCell.h" #include "CaloEvent/CaloCellContainer.h" @@ -22,8 +22,6 @@ #include "CaloDetDescr/CaloDetDescrElement.h" #include "Identifier/Identifier.h" #include "Identifier/IdentifierHash.h" -#include "StoreGate/StoreGateSvc.h" -#include "GaudiKernel/MsgStream.h" #include <map> //useful in testMode // ====================================================== diff --git a/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellNeighborsAverageCorr.h b/Calorimeter/CaloCellCorrection/src/CaloCellNeighborsAverageCorr.h old mode 100755 new mode 100644 similarity index 91% rename from Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellNeighborsAverageCorr.h rename to Calorimeter/CaloCellCorrection/src/CaloCellNeighborsAverageCorr.h index 632bbf23c61b..b26a051c5db7 --- a/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellNeighborsAverageCorr.h +++ b/Calorimeter/CaloCellCorrection/src/CaloCellNeighborsAverageCorr.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef CALOREC_CALOCELLNEIGHBORSAVERAGECORR_H -#define CALOREC_CALOCELLNEIGHBORSAVERAGECORR_H +#ifndef CALOCELLCORRECTION_CALOCELLNEIGHBORSAVERAGECORR_H +#define CALOCELLCORRECTION_CALOCELLNEIGHBORSAVERAGECORR_H #include "AthenaBaseComps/AthAlgTool.h" #include "CaloInterface/ICaloCellMakerTool.h" diff --git a/Calorimeter/CaloCellCorrection/src/CaloCellPedestalCorr.cxx b/Calorimeter/CaloCellCorrection/src/CaloCellPedestalCorr.cxx index d3208ad3fd91..dff345771620 100755 --- a/Calorimeter/CaloCellCorrection/src/CaloCellPedestalCorr.cxx +++ b/Calorimeter/CaloCellCorrection/src/CaloCellPedestalCorr.cxx @@ -11,7 +11,7 @@ // // **************************************************************************************** -#include "CaloCellCorrection/CaloCellPedestalCorr.h" +#include "CaloCellPedestalCorr.h" #include "CaloEvent/CaloCell.h" #include "CaloDetDescr/CaloDetDescrElement.h" @@ -23,10 +23,6 @@ #include "CaloCondBlobObjs/CaloCondBlobFlt.h" #include "CaloCondBlobObjs/CaloCondUtils.h" -#include "GaudiKernel/MsgStream.h" -#include "StoreGate/StoreGateSvc.h" - - #include "CaloIdentifier/CaloCell_ID.h" // ====================================================== diff --git a/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellPedestalCorr.h b/Calorimeter/CaloCellCorrection/src/CaloCellPedestalCorr.h old mode 100755 new mode 100644 similarity index 93% rename from Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellPedestalCorr.h rename to Calorimeter/CaloCellCorrection/src/CaloCellPedestalCorr.h index c77eedecb3a7..bc022c07ddd9 --- a/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellPedestalCorr.h +++ b/Calorimeter/CaloCellCorrection/src/CaloCellPedestalCorr.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef CALOREC_CALOCELLPEDESTALCORR_H -#define CALOREC_CALOCELLPEDESTALCORR_H +#ifndef CALOCELLCORRECTION_CALOCELLPEDESTALCORR_H +#define CALOCELLCORRECTION_CALOCELLPEDESTALCORR_H #include "CaloUtils/CaloCellCorrection.h" #include "CaloIdentifier/CaloGain.h" diff --git a/Calorimeter/CaloCellCorrection/src/CaloCellRandomizer.cxx b/Calorimeter/CaloCellCorrection/src/CaloCellRandomizer.cxx index 80355e2805a8..a1b8c4031723 100644 --- a/Calorimeter/CaloCellCorrection/src/CaloCellRandomizer.cxx +++ b/Calorimeter/CaloCellCorrection/src/CaloCellRandomizer.cxx @@ -9,7 +9,7 @@ // // **************************************************************************************** -#include "CaloCellCorrection/CaloCellRandomizer.h" +#include "CaloCellRandomizer.h" #include "CaloEvent/CaloCell.h" #include "CaloDetDescr/CaloDetDescrElement.h" #include "CaloInterface/ICalorimeterNoiseTool.h" diff --git a/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellRandomizer.h b/Calorimeter/CaloCellCorrection/src/CaloCellRandomizer.h similarity index 100% rename from Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellRandomizer.h rename to Calorimeter/CaloCellCorrection/src/CaloCellRandomizer.h diff --git a/Calorimeter/CaloCellCorrection/src/CaloCellRescaler.cxx b/Calorimeter/CaloCellCorrection/src/CaloCellRescaler.cxx index 588babd92936..3e93523bd681 100755 --- a/Calorimeter/CaloCellCorrection/src/CaloCellRescaler.cxx +++ b/Calorimeter/CaloCellCorrection/src/CaloCellRescaler.cxx @@ -2,8 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "CaloCellCorrection/CaloCellRescaler.h" -#include "GaudiKernel/MsgStream.h" +#include "CaloCellRescaler.h" #include "CaloEvent/CaloCell.h" #include "CaloDetDescr/CaloDetDescrElement.h" diff --git a/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellRescaler.h b/Calorimeter/CaloCellCorrection/src/CaloCellRescaler.h old mode 100755 new mode 100644 similarity index 93% rename from Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellRescaler.h rename to Calorimeter/CaloCellCorrection/src/CaloCellRescaler.h index 2daaeeca2649..4a97c6e4712d --- a/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellRescaler.h +++ b/Calorimeter/CaloCellCorrection/src/CaloCellRescaler.h @@ -4,8 +4,8 @@ //Dear emacs, this is -*-c++-*- -#ifndef CALOREC_CaloCellRescaler_H -#define CALOREC_CaloCellRescaler_H +#ifndef CALOCELLCORRECTION_CALOCELLRESCALER_H +#define CALOCELLCORRECTION_CALOCELLRESCALER_H #include "CaloUtils/CaloCellCorrection.h" diff --git a/Calorimeter/CaloCellCorrection/src/CaloCellTimeCorrTool.cxx b/Calorimeter/CaloCellCorrection/src/CaloCellTimeCorrTool.cxx index fee98be0c191..1d7b3edea124 100644 --- a/Calorimeter/CaloCellCorrection/src/CaloCellTimeCorrTool.cxx +++ b/Calorimeter/CaloCellCorrection/src/CaloCellTimeCorrTool.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "CaloCellCorrection/CaloCellTimeCorrTool.h" +#include "CaloCellTimeCorrTool.h" #include "CaloEvent/CaloCell.h" #include "CaloCondBlobObjs/CaloCondBlobFlt.h" diff --git a/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellTimeCorrTool.h b/Calorimeter/CaloCellCorrection/src/CaloCellTimeCorrTool.h similarity index 90% rename from Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellTimeCorrTool.h rename to Calorimeter/CaloCellCorrection/src/CaloCellTimeCorrTool.h index c5f762067935..f7cb36f6d326 100644 --- a/Calorimeter/CaloCellCorrection/CaloCellCorrection/CaloCellTimeCorrTool.h +++ b/Calorimeter/CaloCellCorrection/src/CaloCellTimeCorrTool.h @@ -4,8 +4,8 @@ //Dear emacs, this is -*-c++-*- -#ifndef CALOCELLTIMECORRTOOL -#define CALOCELLTIMECORRTOOL +#ifndef CALOCELLCORRECTION_CALOCELLTIMECORRTOOL_H +#define CALOCELLCORRECTION_CALOCELLTIMECORRTOOL_H #include "CaloUtils/CaloCellCorrection.h" #include "AthenaPoolUtilities/AthenaAttributeList.h" diff --git a/Calorimeter/CaloCellCorrection/src/components/CaloCellCorrection_entries.cxx b/Calorimeter/CaloCellCorrection/src/components/CaloCellCorrection_entries.cxx index 7fbf72ded7fd..c2bfa8a1febf 100644 --- a/Calorimeter/CaloCellCorrection/src/components/CaloCellCorrection_entries.cxx +++ b/Calorimeter/CaloCellCorrection/src/components/CaloCellCorrection_entries.cxx @@ -1,10 +1,10 @@ -#include "CaloCellCorrection/CaloCellPedestalCorr.h" -#include "CaloCellCorrection/CaloCellMBAverageCorr.h" -#include "CaloCellCorrection/CaloCellNeighborsAverageCorr.h" -#include "CaloCellCorrection/CaloCellRandomizer.h" -#include "CaloCellCorrection/CaloCellRescaler.h" -#include "CaloCellCorrection/CaloCellEnergyRescaler.h" -#include "CaloCellCorrection/CaloCellTimeCorrTool.h" +#include "../CaloCellPedestalCorr.h" +#include "../CaloCellMBAverageCorr.h" +#include "../CaloCellNeighborsAverageCorr.h" +#include "../CaloCellRandomizer.h" +#include "../CaloCellRescaler.h" +#include "../CaloCellEnergyRescaler.h" +#include "../CaloCellTimeCorrTool.h" DECLARE_COMPONENT( CaloCellPedestalCorr ) -- GitLab From b0ab96e89b889ef9cc9de77f984ce6ddee6bab78 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Sat, 7 Jul 2018 13:15:29 +0200 Subject: [PATCH 403/562] TBRec: Move headers to src. Headers in this package are not used from any other package. Move those to src. Former-commit-id: dcf4b3416bc83b1785d962b0edbbb41760aa5230 --- .../TBRec/src/CBNTAA_BeamInstrumentation.cxx | 9 +- .../CBNTAA_BeamInstrumentation.h | 6 +- TestBeam/TBRec/src/CBNTAA_TBADCRaw.cxx | 9 +- .../TBRec/{TBRec => src}/CBNTAA_TBADCRaw.h | 4 +- TestBeam/TBRec/src/CBNTAA_TBInfo.cxx | 5 +- TestBeam/TBRec/{TBRec => src}/CBNTAA_TBInfo.h | 5 +- TestBeam/TBRec/src/CBNTAA_TBScint.cxx | 5 +- .../TBRec/{TBRec => src}/CBNTAA_TBScint.h | 4 +- TestBeam/TBRec/src/CBNTAA_TBTDCRaw.cxx | 9 +- .../TBRec/{TBRec => src}/CBNTAA_TBTDCRaw.h | 4 +- TestBeam/TBRec/src/CBNTAA_TBTPValidation.cxx | 8 +- .../{TBRec => src}/CBNTAA_TBTPValidation.h | 4 +- TestBeam/TBRec/src/CBNTAA_TBTrack.cxx | 10 +- .../TBRec/{TBRec => src}/CBNTAA_TBTrack.h | 4 +- .../TBRec/src/CBNT_BeamInstrumentation.cxx | 5 +- .../{TBRec => src}/CBNT_BeamInstrumentation.h | 5 +- TestBeam/TBRec/src/CBNT_CaloH6.cxx | 11 +-- TestBeam/TBRec/{TBRec => src}/CBNT_CaloH6.h | 5 +- TestBeam/TBRec/src/CBNT_TBRecBase.cxx | 3 +- .../TBRec/{TBRec => src}/CBNT_TBRecBase.h | 6 +- TestBeam/TBRec/src/CBNT_Timing.cxx | 4 +- TestBeam/TBRec/{TBRec => src}/CBNT_Timing.h | 5 +- TestBeam/TBRec/src/CBNT_UpstreamMat.cxx | 3 +- .../TBRec/{TBRec => src}/CBNT_UpstreamMat.h | 5 +- TestBeam/TBRec/src/ImpactInCalo.cxx | 2 +- TestBeam/TBRec/{TBRec => src}/ImpactInCalo.h | 4 +- TestBeam/TBRec/src/ImpactInCaloCollection.cxx | 4 +- .../{TBRec => src}/ImpactInCaloCollection.h | 6 +- TestBeam/TBRec/src/TBAlgoSequencer.cxx | 7 +- .../TBRec/{TBRec => src}/TBAlgoSequencer.h | 0 TestBeam/TBRec/src/TBBPCRec.cxx | 6 +- TestBeam/TBRec/{TBRec => src}/TBBPCRec.h | 4 +- TestBeam/TBRec/src/TBBeamQuality.cxx | 12 +-- TestBeam/TBRec/{TBRec => src}/TBBeamQuality.h | 0 .../TBRec/src/TBBeamQualityDoubleHitsTool.cxx | 8 +- .../TBBeamQualityDoubleHitsTool.h | 6 +- .../TBRec/src/TBBeamQualityEMFractionTool.cxx | 13 +-- .../TBBeamQualityEMFractionTool.h | 2 +- TestBeam/TBRec/src/TBBeamQualityMC.cxx | 5 +- .../TBRec/{TBRec => src}/TBBeamQualityMC.h | 4 +- .../TBRec/src/TBBeamQualityMuonToolH6.cxx | 8 +- .../{TBRec => src}/TBBeamQualityMuonToolH6.h | 6 +- TestBeam/TBRec/src/TBBeamQualityTool.cxx | 7 +- .../TBRec/{TBRec => src}/TBBeamQualityTool.h | 4 +- .../TBRec/src/TBBeamQualityTrackingTool.cxx | 10 +- .../TBBeamQualityTrackingTool.h | 6 +- .../TBRec/src/TBCellContainerFillerTool.cxx | 9 +- .../TBCellContainerFillerTool.h | 4 +- TestBeam/TBRec/src/TBCellNoiseCorrection.cxx | 4 +- .../{TBRec => src}/TBCellNoiseCorrection.h | 4 +- TestBeam/TBRec/src/TBClusterMaker.cxx | 11 +-- .../TBRec/{TBRec => src}/TBClusterMaker.h | 4 +- TestBeam/TBRec/src/TBDMContainerSplitter.cxx | 8 +- .../{TBRec => src}/TBDMContainerSplitter.h | 4 +- .../TBRec/src/TBECLArRawChannelBuilder.cxx | 3 +- .../{TBRec => src}/TBECLArRawChannelBuilder.h | 4 +- .../TBRec/src/TBEMECCellEtaCorrection.cxx | 2 +- .../{TBRec => src}/TBEMECCellEtaCorrection.h | 0 TestBeam/TBRec/src/TBEMECXTalkToyModel.cxx | 5 +- .../{TBRec => src}/TBEMECXTalkToyModel.h | 4 +- .../TBRec/src/TBEventInfoStreamerTool.cxx | 7 +- .../{TBRec => src}/TBEventInfoStreamerTool.h | 2 +- TestBeam/TBRec/src/TBEventStreamer.cxx | 10 +- .../TBRec/{TBRec => src}/TBEventStreamer.h | 0 TestBeam/TBRec/src/TBEventStreamerTool.cxx | 8 +- .../{TBRec => src}/TBEventStreamerTool.h | 0 .../TBRec/src/TBExtrapolTrackToCaloTool.cxx | 5 +- .../TBExtrapolTrackToCaloTool.h | 4 +- TestBeam/TBRec/src/TBLArRawChannelBuilder.cxx | 3 +- .../{TBRec => src}/TBLArRawChannelBuilder.h | 4 +- TestBeam/TBRec/src/TBMWPCRec.cxx | 12 +-- TestBeam/TBRec/{TBRec => src}/TBMWPCRec.h | 0 TestBeam/TBRec/src/TBNoiseWrite.cxx | 8 +- TestBeam/TBRec/{TBRec => src}/TBNoiseWrite.h | 4 +- TestBeam/TBRec/src/TBPartIDCherenkovMuTag.cxx | 2 +- .../{TBRec => src}/TBPartIDCherenkovMuTag.h | 5 +- .../TBRec/src/TBPatternUnitStreamerTool.cxx | 10 +- .../TBPatternUnitStreamerTool.h | 2 +- .../TBRec/src/TBPatternUnitStreamerToolH8.cxx | 13 +-- .../TBPatternUnitStreamerToolH8.h | 2 +- TestBeam/TBRec/src/TBPhaseRec.cxx | 6 +- TestBeam/TBRec/{TBRec => src}/TBPhaseRec.h | 0 TestBeam/TBRec/src/TBPhaseStreamerTool.cxx | 7 +- .../{TBRec => src}/TBPhaseStreamerTool.h | 2 +- TestBeam/TBRec/src/TBPlaneTrackingAlgo.cxx | 7 +- .../{TBRec => src}/TBPlaneTrackingAlgo.h | 5 +- .../TBRec/src/TBPreScalerStreamerTool.cxx | 9 +- .../{TBRec => src}/TBPreScalerStreamerTool.h | 2 +- TestBeam/TBRec/src/TBScintillatorRec.cxx | 10 +- .../TBRec/{TBRec => src}/TBScintillatorRec.h | 4 +- TestBeam/TBRec/src/TBTailCatcherRec.cxx | 13 +-- .../TBRec/{TBRec => src}/TBTailCatcherRec.h | 4 +- TestBeam/TBRec/src/TBTrackInfoFromTag.cxx | 6 +- .../TBRec/{TBRec => src}/TBTrackInfoFromTag.h | 8 +- TestBeam/TBRec/src/TBTrackToCaloAlg.cxx | 8 +- .../TBRec/{TBRec => src}/TBTrackToCaloAlg.h | 4 +- TestBeam/TBRec/src/TBTree_CaloClusterH6.cxx | 10 +- .../{TBRec => src}/TBTree_CaloClusterH6.h | 0 TestBeam/TBRec/src/TBXCryYTableRead.cxx | 8 +- .../TBRec/{TBRec => src}/TBXCryYTableRead.h | 4 +- .../TBRec/src/TBXMLCaloCellWriterTool.cxx | 10 +- .../{TBRec => src}/TBXMLCaloCellWriterTool.h | 2 +- TestBeam/TBRec/src/TBXMLEventWriterTool.cxx | 8 +- .../{TBRec => src}/TBXMLEventWriterTool.h | 2 +- TestBeam/TBRec/src/TBXMLWriter.cxx | 12 +-- TestBeam/TBRec/{TBRec => src}/TBXMLWriter.h | 0 TestBeam/TBRec/src/TBXMLWriterToolBase.cxx | 2 +- .../{TBRec => src}/TBXMLWriterToolBase.h | 5 - TestBeam/TBRec/src/TB_tree.cxx | 3 +- TestBeam/TBRec/{TBRec => src}/TB_tree.h | 4 +- TestBeam/TBRec/src/TileRec_h1000.cxx | 3 +- TestBeam/TBRec/{TBRec => src}/TileRec_h1000.h | 4 +- .../TBRec/src/components/TBRec_entries.cxx | 96 +++++++++---------- 113 files changed, 216 insertions(+), 481 deletions(-) mode change 100755 => 100644 TestBeam/TBRec/src/CBNTAA_BeamInstrumentation.cxx rename TestBeam/TBRec/{TBRec => src}/CBNTAA_BeamInstrumentation.h (93%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/CBNTAA_TBADCRaw.cxx rename TestBeam/TBRec/{TBRec => src}/CBNTAA_TBADCRaw.h (94%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/CBNTAA_TBInfo.cxx rename TestBeam/TBRec/{TBRec => src}/CBNTAA_TBInfo.h (96%) mode change 100755 => 100644 rename TestBeam/TBRec/{TBRec => src}/CBNTAA_TBScint.h (92%) mode change 100755 => 100644 TestBeam/TBRec/src/CBNTAA_TBTDCRaw.cxx rename TestBeam/TBRec/{TBRec => src}/CBNTAA_TBTDCRaw.h (94%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/CBNTAA_TBTPValidation.cxx rename TestBeam/TBRec/{TBRec => src}/CBNTAA_TBTPValidation.h (98%) mode change 100755 => 100644 rename TestBeam/TBRec/{TBRec => src}/CBNTAA_TBTrack.h (95%) mode change 100755 => 100644 TestBeam/TBRec/src/CBNT_BeamInstrumentation.cxx rename TestBeam/TBRec/{TBRec => src}/CBNT_BeamInstrumentation.h (95%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/CBNT_CaloH6.cxx rename TestBeam/TBRec/{TBRec => src}/CBNT_CaloH6.h (96%) mode change 100755 => 100644 rename TestBeam/TBRec/{TBRec => src}/CBNT_TBRecBase.h (94%) mode change 100755 => 100644 TestBeam/TBRec/src/CBNT_Timing.cxx rename TestBeam/TBRec/{TBRec => src}/CBNT_Timing.h (96%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/CBNT_UpstreamMat.cxx rename TestBeam/TBRec/{TBRec => src}/CBNT_UpstreamMat.h (89%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/ImpactInCalo.cxx rename TestBeam/TBRec/{TBRec => src}/ImpactInCalo.h (98%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/ImpactInCaloCollection.cxx rename TestBeam/TBRec/{TBRec => src}/ImpactInCaloCollection.h (80%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBAlgoSequencer.cxx rename TestBeam/TBRec/{TBRec => src}/TBAlgoSequencer.h (100%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBBPCRec.cxx rename TestBeam/TBRec/{TBRec => src}/TBBPCRec.h (97%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBBeamQuality.cxx rename TestBeam/TBRec/{TBRec => src}/TBBeamQuality.h (100%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBBeamQualityDoubleHitsTool.cxx rename TestBeam/TBRec/{TBRec => src}/TBBeamQualityDoubleHitsTool.h (91%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBBeamQualityEMFractionTool.cxx rename TestBeam/TBRec/{TBRec => src}/TBBeamQualityEMFractionTool.h (97%) mode change 100755 => 100644 rename TestBeam/TBRec/{TBRec => src}/TBBeamQualityMC.h (92%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBBeamQualityMuonToolH6.cxx rename TestBeam/TBRec/{TBRec => src}/TBBeamQualityMuonToolH6.h (91%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBBeamQualityTool.cxx rename TestBeam/TBRec/{TBRec => src}/TBBeamQualityTool.h (94%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBBeamQualityTrackingTool.cxx rename TestBeam/TBRec/{TBRec => src}/TBBeamQualityTrackingTool.h (91%) mode change 100755 => 100644 rename TestBeam/TBRec/{TBRec => src}/TBCellContainerFillerTool.h (92%) rename TestBeam/TBRec/{TBRec => src}/TBCellNoiseCorrection.h (95%) rename TestBeam/TBRec/{TBRec => src}/TBClusterMaker.h (98%) rename TestBeam/TBRec/{TBRec => src}/TBDMContainerSplitter.h (92%) rename TestBeam/TBRec/{TBRec => src}/TBECLArRawChannelBuilder.h (97%) rename TestBeam/TBRec/{TBRec => src}/TBEMECCellEtaCorrection.h (100%) mode change 100755 => 100644 TestBeam/TBRec/src/TBEMECXTalkToyModel.cxx rename TestBeam/TBRec/{TBRec => src}/TBEMECXTalkToyModel.h (94%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBEventInfoStreamerTool.cxx rename TestBeam/TBRec/{TBRec => src}/TBEventInfoStreamerTool.h (94%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBEventStreamer.cxx rename TestBeam/TBRec/{TBRec => src}/TBEventStreamer.h (100%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBEventStreamerTool.cxx rename TestBeam/TBRec/{TBRec => src}/TBEventStreamerTool.h (100%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBExtrapolTrackToCaloTool.cxx rename TestBeam/TBRec/{TBRec => src}/TBExtrapolTrackToCaloTool.h (99%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBLArRawChannelBuilder.cxx rename TestBeam/TBRec/{TBRec => src}/TBLArRawChannelBuilder.h (95%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBMWPCRec.cxx rename TestBeam/TBRec/{TBRec => src}/TBMWPCRec.h (100%) mode change 100755 => 100644 rename TestBeam/TBRec/{TBRec => src}/TBNoiseWrite.h (97%) mode change 100755 => 100644 TestBeam/TBRec/src/TBPartIDCherenkovMuTag.cxx rename TestBeam/TBRec/{TBRec => src}/TBPartIDCherenkovMuTag.h (85%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBPatternUnitStreamerTool.cxx rename TestBeam/TBRec/{TBRec => src}/TBPatternUnitStreamerTool.h (98%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBPatternUnitStreamerToolH8.cxx rename TestBeam/TBRec/{TBRec => src}/TBPatternUnitStreamerToolH8.h (98%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBPhaseRec.cxx rename TestBeam/TBRec/{TBRec => src}/TBPhaseRec.h (100%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBPhaseStreamerTool.cxx rename TestBeam/TBRec/{TBRec => src}/TBPhaseStreamerTool.h (96%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBPlaneTrackingAlgo.cxx rename TestBeam/TBRec/{TBRec => src}/TBPlaneTrackingAlgo.h (97%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBPreScalerStreamerTool.cxx rename TestBeam/TBRec/{TBRec => src}/TBPreScalerStreamerTool.h (96%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBScintillatorRec.cxx rename TestBeam/TBRec/{TBRec => src}/TBScintillatorRec.h (95%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBTailCatcherRec.cxx rename TestBeam/TBRec/{TBRec => src}/TBTailCatcherRec.h (94%) mode change 100755 => 100644 rename TestBeam/TBRec/{TBRec => src}/TBTrackInfoFromTag.h (95%) mode change 100755 => 100644 TestBeam/TBRec/src/TBTrackToCaloAlg.cxx rename TestBeam/TBRec/{TBRec => src}/TBTrackToCaloAlg.h (98%) mode change 100755 => 100644 rename TestBeam/TBRec/{TBRec => src}/TBTree_CaloClusterH6.h (100%) rename TestBeam/TBRec/{TBRec => src}/TBXCryYTableRead.h (94%) mode change 100755 => 100644 TestBeam/TBRec/src/TBXMLCaloCellWriterTool.cxx rename TestBeam/TBRec/{TBRec => src}/TBXMLCaloCellWriterTool.h (97%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBXMLEventWriterTool.cxx rename TestBeam/TBRec/{TBRec => src}/TBXMLEventWriterTool.h (96%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBXMLWriter.cxx rename TestBeam/TBRec/{TBRec => src}/TBXMLWriter.h (100%) mode change 100755 => 100644 mode change 100755 => 100644 TestBeam/TBRec/src/TBXMLWriterToolBase.cxx rename TestBeam/TBRec/{TBRec => src}/TBXMLWriterToolBase.h (97%) mode change 100755 => 100644 rename TestBeam/TBRec/{TBRec => src}/TB_tree.h (99%) rename TestBeam/TBRec/{TBRec => src}/TileRec_h1000.h (99%) diff --git a/TestBeam/TBRec/src/CBNTAA_BeamInstrumentation.cxx b/TestBeam/TBRec/src/CBNTAA_BeamInstrumentation.cxx old mode 100755 new mode 100644 index 9442df20423c..32f0013dbdd2 --- a/TestBeam/TBRec/src/CBNTAA_BeamInstrumentation.cxx +++ b/TestBeam/TBRec/src/CBNTAA_BeamInstrumentation.cxx @@ -2,10 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "TBRec/CBNTAA_BeamInstrumentation.h" -#include "StoreGate/StoreGateSvc.h" -#include "GaudiKernel/IToolSvc.h" -#include "GaudiKernel/INTupleSvc.h" +#include "CBNTAA_BeamInstrumentation.h" #include "TBEvent/TBScintillatorCont.h" #include "TBEvent/TBBPCCont.h" @@ -75,10 +72,6 @@ StatusCode CBNTAA_BeamInstrumentation::CBNT_initialize() { ATH_MSG_DEBUG ( "in initialize()" ); - IToolSvc* toolSvc = nullptr; - ATH_CHECK( service( "ToolSvc",toolSvc ) ); - - const unsigned nScint=m_scint_names.size(); addBranch("Beam_sNames",m_scint_ntnames); for (unsigned i=0;i<nScint;i++) { diff --git a/TestBeam/TBRec/TBRec/CBNTAA_BeamInstrumentation.h b/TestBeam/TBRec/src/CBNTAA_BeamInstrumentation.h old mode 100755 new mode 100644 similarity index 93% rename from TestBeam/TBRec/TBRec/CBNTAA_BeamInstrumentation.h rename to TestBeam/TBRec/src/CBNTAA_BeamInstrumentation.h index e426c5401ae5..bc824fbb86c3 --- a/TestBeam/TBRec/TBRec/CBNTAA_BeamInstrumentation.h +++ b/TestBeam/TBRec/src/CBNTAA_BeamInstrumentation.h @@ -2,11 +2,9 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef CBNT_BEAM_H -#define CBNT_BEAM_H +#ifndef TBREC_CBNTAA_BEAMINSTRUMENTATION_H +#define TBREC_CBNTAA_BEAMINSTRUMENTATION_H -#include "GaudiKernel/NTuple.h" -#include "GaudiKernel/SmartDataPtr.h" #include "CBNT_TBRecBase.h" #include <fstream> #include <string> diff --git a/TestBeam/TBRec/src/CBNTAA_TBADCRaw.cxx b/TestBeam/TBRec/src/CBNTAA_TBADCRaw.cxx old mode 100755 new mode 100644 index 9f222c13379d..736f13869e74 --- a/TestBeam/TBRec/src/CBNTAA_TBADCRaw.cxx +++ b/TestBeam/TBRec/src/CBNTAA_TBADCRaw.cxx @@ -2,11 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "TBRec/CBNTAA_TBADCRaw.h" -#include "StoreGate/StoreGateSvc.h" -#include "GaudiKernel/IToolSvc.h" -#include "GaudiKernel/INTupleSvc.h" -#include "GaudiKernel/MsgStream.h" +#include "CBNTAA_TBADCRaw.h" #include "TBEvent/TBADCRawCont.h" #include <vector> @@ -27,9 +23,6 @@ StatusCode CBNTAA_TBADCRaw::CBNT_initialize() { ATH_MSG_DEBUG ( "in initialize()" ); - IToolSvc* toolSvc = nullptr; - ATH_CHECK( service( "ToolSvc",toolSvc ) ); - addBranch("TBADCRaw",m_adc); return StatusCode::SUCCESS; diff --git a/TestBeam/TBRec/TBRec/CBNTAA_TBADCRaw.h b/TestBeam/TBRec/src/CBNTAA_TBADCRaw.h old mode 100755 new mode 100644 similarity index 94% rename from TestBeam/TBRec/TBRec/CBNTAA_TBADCRaw.h rename to TestBeam/TBRec/src/CBNTAA_TBADCRaw.h index 171d39abb136..836c4b894247 --- a/TestBeam/TBRec/TBRec/CBNTAA_TBADCRaw.h +++ b/TestBeam/TBRec/src/CBNTAA_TBADCRaw.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef CBNT_TBADCRAW_H -#define CBNT_TBADCRAW_H +#ifndef TBREC_CBNTAA_TBADCRAW_H +#define TBREC_CBNTAA_TBADCRAW_H #include "GaudiKernel/NTuple.h" #include "GaudiKernel/SmartDataPtr.h" diff --git a/TestBeam/TBRec/src/CBNTAA_TBInfo.cxx b/TestBeam/TBRec/src/CBNTAA_TBInfo.cxx old mode 100755 new mode 100644 index 918e78476c12..413f1fbc2333 --- a/TestBeam/TBRec/src/CBNTAA_TBInfo.cxx +++ b/TestBeam/TBRec/src/CBNTAA_TBInfo.cxx @@ -2,15 +2,12 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "TBRec/CBNTAA_TBInfo.h" +#include "CBNTAA_TBInfo.h" -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/ISvcLocator.h" #include "GaudiKernel/IToolSvc.h" #include "StoreGate/StoreGate.h" #include "StoreGate/StoreGateSvc.h" -#include "StoreGate/DataHandle.h" #include "CaloGeoHelpers/CaloPhiRange.h" #include "TBCaloGeometry/TBCaloCoordinate.h" diff --git a/TestBeam/TBRec/TBRec/CBNTAA_TBInfo.h b/TestBeam/TBRec/src/CBNTAA_TBInfo.h old mode 100755 new mode 100644 similarity index 96% rename from TestBeam/TBRec/TBRec/CBNTAA_TBInfo.h rename to TestBeam/TBRec/src/CBNTAA_TBInfo.h index b282f8d0853a..3e06d50bcca4 --- a/TestBeam/TBRec/TBRec/CBNTAA_TBInfo.h +++ b/TestBeam/TBRec/src/CBNTAA_TBInfo.h @@ -2,11 +2,10 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef CBNTAA_TBInfo_H -#define CBNTAA_TBInfo_H +#ifndef TBREC_CBNTAA_TBINFO_H +#define TBREC_CBNTAA_TBINFO_H #include "CBNT_TBRecBase.h" -#include "GaudiKernel/NTuple.h" #include <vector> class TBCaloCoordinate; diff --git a/TestBeam/TBRec/src/CBNTAA_TBScint.cxx b/TestBeam/TBRec/src/CBNTAA_TBScint.cxx index bd7cf6c85603..cbdec9f48670 100644 --- a/TestBeam/TBRec/src/CBNTAA_TBScint.cxx +++ b/TestBeam/TBRec/src/CBNTAA_TBScint.cxx @@ -2,10 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "TBRec/CBNTAA_TBScint.h" -#include "StoreGate/StoreGateSvc.h" -#include "GaudiKernel/IToolSvc.h" -#include "GaudiKernel/INTupleSvc.h" +#include "CBNTAA_TBScint.h" #include "LArG4TBSimEvent/LArG4H6FrontHitCollection.h" #include <fstream> diff --git a/TestBeam/TBRec/TBRec/CBNTAA_TBScint.h b/TestBeam/TBRec/src/CBNTAA_TBScint.h similarity index 92% rename from TestBeam/TBRec/TBRec/CBNTAA_TBScint.h rename to TestBeam/TBRec/src/CBNTAA_TBScint.h index 7dac53375b14..730afc207fe7 100644 --- a/TestBeam/TBRec/TBRec/CBNTAA_TBScint.h +++ b/TestBeam/TBRec/src/CBNTAA_TBScint.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef CBNTAA_TBSCINT_H -#define CBNTAA_TBSCINT_H +#ifndef TBREC_CBNTAA_TBSCINT_H +#define TBREC_CBNTAA_TBSCINT_H #include "GaudiKernel/NTuple.h" #include "GaudiKernel/SmartDataPtr.h" diff --git a/TestBeam/TBRec/src/CBNTAA_TBTDCRaw.cxx b/TestBeam/TBRec/src/CBNTAA_TBTDCRaw.cxx old mode 100755 new mode 100644 index 2bd9a1c9722a..c61cd95d7bdf --- a/TestBeam/TBRec/src/CBNTAA_TBTDCRaw.cxx +++ b/TestBeam/TBRec/src/CBNTAA_TBTDCRaw.cxx @@ -2,11 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "TBRec/CBNTAA_TBTDCRaw.h" -#include "StoreGate/StoreGateSvc.h" -#include "GaudiKernel/IToolSvc.h" -#include "GaudiKernel/INTupleSvc.h" - +#include "CBNTAA_TBTDCRaw.h" #include "TBEvent/TBTDCRawCont.h" #include <vector> @@ -30,9 +26,6 @@ StatusCode CBNTAA_TBTDCRaw::CBNT_initialize() { ATH_MSG_DEBUG ( "in initialize()" ); - IToolSvc* toolSvc = nullptr; - ATH_CHECK( service( "ToolSvc",toolSvc ) ); - addBranch("TBTDCRaw",m_tdc); addBranch("TBTDCRaw_underThreshold",m_underThreshold); diff --git a/TestBeam/TBRec/TBRec/CBNTAA_TBTDCRaw.h b/TestBeam/TBRec/src/CBNTAA_TBTDCRaw.h old mode 100755 new mode 100644 similarity index 94% rename from TestBeam/TBRec/TBRec/CBNTAA_TBTDCRaw.h rename to TestBeam/TBRec/src/CBNTAA_TBTDCRaw.h index 4f688a1c3380..9e7d267d68a2 --- a/TestBeam/TBRec/TBRec/CBNTAA_TBTDCRaw.h +++ b/TestBeam/TBRec/src/CBNTAA_TBTDCRaw.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef CBNT_TBTDCRAW_H -#define CBNT_TBTDCRAW_H +#ifndef TBREC_CBNTAA_TBTDCRAW_H +#define TBREC_CBNTAA_TBTDCRAW_H #include "GaudiKernel/NTuple.h" #include "GaudiKernel/SmartDataPtr.h" diff --git a/TestBeam/TBRec/src/CBNTAA_TBTPValidation.cxx b/TestBeam/TBRec/src/CBNTAA_TBTPValidation.cxx old mode 100755 new mode 100644 index ccc5cc79375f..2300e08b95f4 --- a/TestBeam/TBRec/src/CBNTAA_TBTPValidation.cxx +++ b/TestBeam/TBRec/src/CBNTAA_TBTPValidation.cxx @@ -2,10 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "TBRec/CBNTAA_TBTPValidation.h" -#include "StoreGate/StoreGateSvc.h" -#include "GaudiKernel/IToolSvc.h" -#include "GaudiKernel/INTupleSvc.h" +#include "CBNTAA_TBTPValidation.h" #include "TBEvent/TBADCRawCont.h" #include "TBEvent/TBTDCRawCont.h" @@ -231,9 +228,6 @@ StatusCode CBNTAA_TBTPValidation::CBNT_initialize() { ATH_MSG_DEBUG ( "in initialize()" ); - IToolSvc* toolSvc = nullptr; - ATH_CHECK( service( "ToolSvc",toolSvc ) ); - // TBADCRawCont addBranch("TBTPValid_TBADCRaw_m_adc",m_adc); addBranch("TBTPValid_TBADCRaw_tbDetectorName",m_tbDetectorName_TBADCRawCont); diff --git a/TestBeam/TBRec/TBRec/CBNTAA_TBTPValidation.h b/TestBeam/TBRec/src/CBNTAA_TBTPValidation.h old mode 100755 new mode 100644 similarity index 98% rename from TestBeam/TBRec/TBRec/CBNTAA_TBTPValidation.h rename to TestBeam/TBRec/src/CBNTAA_TBTPValidation.h index 30386d7a3ce8..0b620e90f3a9 --- a/TestBeam/TBRec/TBRec/CBNTAA_TBTPValidation.h +++ b/TestBeam/TBRec/src/CBNTAA_TBTPValidation.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef CBNTAA_TBTPVALIDATION_H -#define CBNTAA_TBTPVALIDATION_H +#ifndef TBREC_CBNTAA_TBTPVALIDATION_H +#define TBREC_CBNTAA_TBTPVALIDATION_H #include "GaudiKernel/NTuple.h" #include "GaudiKernel/SmartDataPtr.h" diff --git a/TestBeam/TBRec/src/CBNTAA_TBTrack.cxx b/TestBeam/TBRec/src/CBNTAA_TBTrack.cxx index a4a623f1a643..c799eafd540b 100644 --- a/TestBeam/TBRec/src/CBNTAA_TBTrack.cxx +++ b/TestBeam/TBRec/src/CBNTAA_TBTrack.cxx @@ -2,16 +2,13 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "TBRec/CBNTAA_TBTrack.h" -#include "StoreGate/StoreGateSvc.h" -#include "GaudiKernel/IToolSvc.h" -#include "GaudiKernel/INTupleSvc.h" +#include "CBNTAA_TBTrack.h" #include "TBEvent/TBEventInfo.h" #include "TBEvent/TBTrack.h" +#include "PathResolver/PathResolver.h" #include <fstream> #include <string> -#include "PathResolver/PathResolver.h" CBNTAA_TBTrack::CBNTAA_TBTrack(const std::string & name, ISvcLocator * pSvcLocator) : @@ -33,9 +30,6 @@ CBNTAA_TBTrack::CBNTAA_TBTrack(const std::string & name, ISvcLocator * pSvcLocat StatusCode CBNTAA_TBTrack::CBNT_initialize() { ATH_MSG_DEBUG ( "in initialize()" ); - IToolSvc* toolSvc = nullptr; - ATH_CHECK( service("ToolSvc",toolSvc) ); - // Add beam track parameters addBranch("bm_x", m_beam_coor_x, "bm_x/f"); addBranch("bm_y", m_beam_coor_y, "bm_y/f"); diff --git a/TestBeam/TBRec/TBRec/CBNTAA_TBTrack.h b/TestBeam/TBRec/src/CBNTAA_TBTrack.h similarity index 95% rename from TestBeam/TBRec/TBRec/CBNTAA_TBTrack.h rename to TestBeam/TBRec/src/CBNTAA_TBTrack.h index 42c0b919b73e..6d46a2593869 100644 --- a/TestBeam/TBRec/TBRec/CBNTAA_TBTrack.h +++ b/TestBeam/TBRec/src/CBNTAA_TBTrack.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef CBNTAA_TBTRACK_H -#define CBNTAA_TBTRACK_H +#ifndef TBREC_CBNTAA_TBTRACK_H +#define TBREC_CBNTAA_TBTRACK_H #include "GaudiKernel/NTuple.h" #include "GaudiKernel/SmartDataPtr.h" diff --git a/TestBeam/TBRec/src/CBNT_BeamInstrumentation.cxx b/TestBeam/TBRec/src/CBNT_BeamInstrumentation.cxx old mode 100755 new mode 100644 index eeb0646b0ca3..81313b272680 --- a/TestBeam/TBRec/src/CBNT_BeamInstrumentation.cxx +++ b/TestBeam/TBRec/src/CBNT_BeamInstrumentation.cxx @@ -2,10 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "TBRec/CBNT_BeamInstrumentation.h" -#include "StoreGate/StoreGateSvc.h" -#include "GaudiKernel/IToolSvc.h" -#include "GaudiKernel/INTupleSvc.h" +#include "CBNT_BeamInstrumentation.h" #include "TBEvent/TBScintillatorCont.h" #include "TBEvent/TBBPCCont.h" diff --git a/TestBeam/TBRec/TBRec/CBNT_BeamInstrumentation.h b/TestBeam/TBRec/src/CBNT_BeamInstrumentation.h old mode 100755 new mode 100644 similarity index 95% rename from TestBeam/TBRec/TBRec/CBNT_BeamInstrumentation.h rename to TestBeam/TBRec/src/CBNT_BeamInstrumentation.h index 59ab41d2d181..c44a17a89069 --- a/TestBeam/TBRec/TBRec/CBNT_BeamInstrumentation.h +++ b/TestBeam/TBRec/src/CBNT_BeamInstrumentation.h @@ -2,10 +2,9 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef CBNT_BEAM_H -#define CBNT_BEAM_H +#ifndef TBREC_CBNT_BEAM_H +#define TBREC_CBNT_BEAM_H -#include "GaudiKernel/SmartDataPtr.h" #include "CBNT_TBRecBase.h" #include <fstream> #include <string> diff --git a/TestBeam/TBRec/src/CBNT_CaloH6.cxx b/TestBeam/TBRec/src/CBNT_CaloH6.cxx old mode 100755 new mode 100644 index 704b211d090a..1429de8253d3 --- a/TestBeam/TBRec/src/CBNT_CaloH6.cxx +++ b/TestBeam/TBRec/src/CBNT_CaloH6.cxx @@ -12,15 +12,7 @@ //# # //##################################################### -#include "TBRec/CBNT_CaloH6.h" - -#include "GaudiKernel/SmartDataPtr.h" -#include "GaudiKernel/INTupleSvc.h" -#include "GaudiKernel/ISvcLocator.h" -#include "GaudiKernel/ListItem.h" - -#include "StoreGate/StoreGate.h" -#include "StoreGate/StoreGateSvc.h" +#include "CBNT_CaloH6.h" #include "CaloIdentifier/CaloCell_ID.h" #include "CaloEvent/CaloCellContainer.h" @@ -33,7 +25,6 @@ #include "Identifier/Identifier.h" -#include <list> CBNT_CaloH6::CBNT_CaloH6(const std::string & name, ISvcLocator * pSvcLocator) : CBNT_TBRecBase(name, pSvcLocator), diff --git a/TestBeam/TBRec/TBRec/CBNT_CaloH6.h b/TestBeam/TBRec/src/CBNT_CaloH6.h old mode 100755 new mode 100644 similarity index 96% rename from TestBeam/TBRec/TBRec/CBNT_CaloH6.h rename to TestBeam/TBRec/src/CBNT_CaloH6.h index 633ddfcfc0fd..3bb767da063c --- a/TestBeam/TBRec/TBRec/CBNT_CaloH6.h +++ b/TestBeam/TBRec/src/CBNT_CaloH6.h @@ -12,10 +12,9 @@ //# # //###################################################### -#ifndef CBNT_CALOH6_H -#define CBNT_CALOH6_H +#ifndef TBREC_CBNT_CALOH6_H +#define TBREC_CBNT_CALOH6_H -#include "GaudiKernel/NTuple.h" #include "GaudiKernel/ToolHandle.h" #include "CBNT_TBRecBase.h" diff --git a/TestBeam/TBRec/src/CBNT_TBRecBase.cxx b/TestBeam/TBRec/src/CBNT_TBRecBase.cxx index b2fd2501c5ba..a78ea0731619 100644 --- a/TestBeam/TBRec/src/CBNT_TBRecBase.cxx +++ b/TestBeam/TBRec/src/CBNT_TBRecBase.cxx @@ -2,10 +2,11 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "TBRec/CBNT_TBRecBase.h" +#include "CBNT_TBRecBase.h" #include "LArIdentifier/LArOnlineID.h" #include "CaloIdentifier/CaloIdManager.h" +#include "GaudiKernel/ITHistSvc.h" CBNT_TBRecBase::CBNT_TBRecBase(const std::string& name, ISvcLocator* pSvcLocator): diff --git a/TestBeam/TBRec/TBRec/CBNT_TBRecBase.h b/TestBeam/TBRec/src/CBNT_TBRecBase.h similarity index 94% rename from TestBeam/TBRec/TBRec/CBNT_TBRecBase.h rename to TestBeam/TBRec/src/CBNT_TBRecBase.h index e8c2e2fcfc9e..4cf7ba0c65a4 100644 --- a/TestBeam/TBRec/TBRec/CBNT_TBRecBase.h +++ b/TestBeam/TBRec/src/CBNT_TBRecBase.h @@ -3,12 +3,10 @@ */ //Dear emacs, this is -*-c++-*- -#ifndef CBNT_TBRECBASE_H -#define CBNT_TBRECBASE_H +#ifndef TBREC_CBNT_TBRECBASE_H +#define TBREC_CBNT_TBRECBASE_H #include "AthenaBaseComps/AthAlgorithm.h" -//#include "GaudiKernel/NTuple.h" -#include "GaudiKernel/ITHistSvc.h" #include "GaudiKernel/ToolHandle.h" #include "LArCabling/LArCablingService.h" diff --git a/TestBeam/TBRec/src/CBNT_Timing.cxx b/TestBeam/TBRec/src/CBNT_Timing.cxx old mode 100755 new mode 100644 index 52480759fefd..9136e9c703eb --- a/TestBeam/TBRec/src/CBNT_Timing.cxx +++ b/TestBeam/TBRec/src/CBNT_Timing.cxx @@ -2,11 +2,9 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "TBRec/CBNT_Timing.h" +#include "CBNT_Timing.h" #include "CLHEP/Units/SystemOfUnits.h" -#include "StoreGate/StoreGateSvc.h" -#include "GaudiKernel/NTuple.h" #include "CaloEvent/CaloCell.h" #include "CaloEvent/CaloCellContainer.h" diff --git a/TestBeam/TBRec/TBRec/CBNT_Timing.h b/TestBeam/TBRec/src/CBNT_Timing.h old mode 100755 new mode 100644 similarity index 96% rename from TestBeam/TBRec/TBRec/CBNT_Timing.h rename to TestBeam/TBRec/src/CBNT_Timing.h index 1cae276e107e..5ac2a4d31b2e --- a/TestBeam/TBRec/TBRec/CBNT_Timing.h +++ b/TestBeam/TBRec/src/CBNT_Timing.h @@ -2,10 +2,9 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef CBNT_TIMING_H -#define CBNT_TIMING_H +#ifndef TBREC_CBNT_TIMING_H +#define TBREC_CBNT_TIMING_H -#include "GaudiKernel/NTuple.h" #include "GaudiKernel/ToolHandle.h" #include "CBNT_TBRecBase.h" #include "CaloGeoHelpers/CaloSampling.h" diff --git a/TestBeam/TBRec/src/CBNT_UpstreamMat.cxx b/TestBeam/TBRec/src/CBNT_UpstreamMat.cxx old mode 100755 new mode 100644 index 12249dd71fc5..d0539d0fee9a --- a/TestBeam/TBRec/src/CBNT_UpstreamMat.cxx +++ b/TestBeam/TBRec/src/CBNT_UpstreamMat.cxx @@ -2,9 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "TBRec/CBNT_UpstreamMat.h" +#include "CBNT_UpstreamMat.h" -#include "StoreGate/StoreGate.h" #include "StoreGate/StoreGateSvc.h" #include "GaudiKernel/MsgStream.h" diff --git a/TestBeam/TBRec/TBRec/CBNT_UpstreamMat.h b/TestBeam/TBRec/src/CBNT_UpstreamMat.h old mode 100755 new mode 100644 similarity index 89% rename from TestBeam/TBRec/TBRec/CBNT_UpstreamMat.h rename to TestBeam/TBRec/src/CBNT_UpstreamMat.h index b1d901ce41bc..74eba111a8ff --- a/TestBeam/TBRec/TBRec/CBNT_UpstreamMat.h +++ b/TestBeam/TBRec/src/CBNT_UpstreamMat.h @@ -2,11 +2,10 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef CBNT_UPSTREAMMAT_H -#define CBNT_UPSTREAMMAT_H +#ifndef TBREC_CBNT_UPSTREAMMAT_H +#define TBREC_CBNT_UPSTREAMMAT_H #include "CBNT_TBRecBase.h" -#include "GaudiKernel/NTuple.h" #include <string> class StoreGateSvc; diff --git a/TestBeam/TBRec/src/ImpactInCalo.cxx b/TestBeam/TBRec/src/ImpactInCalo.cxx old mode 100755 new mode 100644 index bab95c27e923..03019859034d --- a/TestBeam/TBRec/src/ImpactInCalo.cxx +++ b/TestBeam/TBRec/src/ImpactInCalo.cxx @@ -3,7 +3,7 @@ */ -#include "TBRec/ImpactInCalo.h" +#include "ImpactInCalo.h" #include <iostream> diff --git a/TestBeam/TBRec/TBRec/ImpactInCalo.h b/TestBeam/TBRec/src/ImpactInCalo.h old mode 100755 new mode 100644 similarity index 98% rename from TestBeam/TBRec/TBRec/ImpactInCalo.h rename to TestBeam/TBRec/src/ImpactInCalo.h index 8a31996edf30..785ceb29310b --- a/TestBeam/TBRec/TBRec/ImpactInCalo.h +++ b/TestBeam/TBRec/src/ImpactInCalo.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef IMPACTINCALO_H -#define IMPACTINCALO_H +#ifndef TBREC_IMPACTINCALO_H +#define TBREC_IMPACTINCALO_H /************************************************************************* Package: File: ImpactInCalo.h diff --git a/TestBeam/TBRec/src/ImpactInCaloCollection.cxx b/TestBeam/TBRec/src/ImpactInCaloCollection.cxx old mode 100755 new mode 100644 index 0f5763826777..89fd87101249 --- a/TestBeam/TBRec/src/ImpactInCaloCollection.cxx +++ b/TestBeam/TBRec/src/ImpactInCaloCollection.cxx @@ -3,8 +3,8 @@ */ -#include "TBRec/ImpactInCaloCollection.h" -#include "TBRec/ImpactInCalo.h" +#include "ImpactInCaloCollection.h" +#include "ImpactInCalo.h" void ImpactInCaloCollection::print() const{ ImpactInCaloCollection::const_iterator iter; diff --git a/TestBeam/TBRec/TBRec/ImpactInCaloCollection.h b/TestBeam/TBRec/src/ImpactInCaloCollection.h old mode 100755 new mode 100644 similarity index 80% rename from TestBeam/TBRec/TBRec/ImpactInCaloCollection.h rename to TestBeam/TBRec/src/ImpactInCaloCollection.h index db872843c3c4..5f4317b4396b --- a/TestBeam/TBRec/TBRec/ImpactInCaloCollection.h +++ b/TestBeam/TBRec/src/ImpactInCaloCollection.h @@ -2,12 +2,12 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef IMPACTINCALOCOLLECTION_H -#define IMPACTINCALOCOLLECTION_H +#ifndef TBREC_IMPACTINCALOCOLLECTION_H +#define TBREC_IMPACTINCALOCOLLECTION_H #include "AthContainers/DataVector.h" #include "AthenaKernel/CLASS_DEF.h" -#include "TBRec/ImpactInCalo.h" +#include "ImpactInCalo.h" //class ImpactInCalo; class ImpactInCaloCollection : public DataVector<ImpactInCalo> { diff --git a/TestBeam/TBRec/src/TBAlgoSequencer.cxx b/TestBeam/TBRec/src/TBAlgoSequencer.cxx old mode 100755 new mode 100644 index e446f1ea79ae..f10becf0d506 --- a/TestBeam/TBRec/src/TBAlgoSequencer.cxx +++ b/TestBeam/TBRec/src/TBAlgoSequencer.cxx @@ -3,14 +3,9 @@ */ -#include "StoreGate/StoreGateSvc.h" - -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/Property.h" +#include "TBAlgoSequencer.h" #include "GaudiKernel/ListItem.h" -#include "TBRec/TBAlgoSequencer.h" - #include <string> #include <map> #include <iostream> diff --git a/TestBeam/TBRec/TBRec/TBAlgoSequencer.h b/TestBeam/TBRec/src/TBAlgoSequencer.h old mode 100755 new mode 100644 similarity index 100% rename from TestBeam/TBRec/TBRec/TBAlgoSequencer.h rename to TestBeam/TBRec/src/TBAlgoSequencer.h diff --git a/TestBeam/TBRec/src/TBBPCRec.cxx b/TestBeam/TBRec/src/TBBPCRec.cxx old mode 100755 new mode 100644 index 0afe4bd65ffb..2d56d0015f4d --- a/TestBeam/TBRec/src/TBBPCRec.cxx +++ b/TestBeam/TBRec/src/TBBPCRec.cxx @@ -3,9 +3,7 @@ */ -#include "StoreGate/StoreGateSvc.h" - -#include "GaudiKernel/Property.h" +#include "TBBPCRec.h" #include "PathResolver/PathResolver.h" @@ -16,8 +14,6 @@ #include <fstream> #include <math.h> -#include "TBRec/TBBPCRec.h" - // static const AlgFactory<TBBPCRec> s_factory; // const IAlgFactory& TBBPCRecFactory = s_factory; diff --git a/TestBeam/TBRec/TBRec/TBBPCRec.h b/TestBeam/TBRec/src/TBBPCRec.h old mode 100755 new mode 100644 similarity index 97% rename from TestBeam/TBRec/TBRec/TBBPCRec.h rename to TestBeam/TBRec/src/TBBPCRec.h index 917f1ab88b79..76d12acd6643 --- a/TestBeam/TBRec/TBRec/TBBPCRec.h +++ b/TestBeam/TBRec/src/TBBPCRec.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef TBREC_TBBPCREC -#define TBREC_TBBPCREC +#ifndef TBREC_TBBPCREC_H +#define TBREC_TBBPCREC_H /////////////////////////////////////////////////////////////////////////////// // // // This algorithm controls event flow and reconstruction and monitoring // diff --git a/TestBeam/TBRec/src/TBBeamQuality.cxx b/TestBeam/TBRec/src/TBBeamQuality.cxx old mode 100755 new mode 100644 index 8ae8c9ee36ad..e3f49973828e --- a/TestBeam/TBRec/src/TBBeamQuality.cxx +++ b/TestBeam/TBRec/src/TBBeamQuality.cxx @@ -13,18 +13,10 @@ //##################################################### -#include "GaudiKernel/Algorithm.h" -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/Property.h" -#include "GaudiKernel/ListItem.h" - -#include "StoreGate/StoreGate.h" -#include "StoreGate/StoreGateSvc.h" +#include "TBBeamQuality.h" +#include "TBBeamQualityTool.h" #include "TBEvent/TBEventInfo.h" -#include "TBRec/TBBeamQualityTool.h" -#include "TBRec/TBBeamQuality.h" - TBBeamQuality::TBBeamQuality(const std::string& name, ISvcLocator* pService) diff --git a/TestBeam/TBRec/TBRec/TBBeamQuality.h b/TestBeam/TBRec/src/TBBeamQuality.h old mode 100755 new mode 100644 similarity index 100% rename from TestBeam/TBRec/TBRec/TBBeamQuality.h rename to TestBeam/TBRec/src/TBBeamQuality.h diff --git a/TestBeam/TBRec/src/TBBeamQualityDoubleHitsTool.cxx b/TestBeam/TBRec/src/TBBeamQualityDoubleHitsTool.cxx old mode 100755 new mode 100644 index ab71de0924b8..ece802cfa872 --- a/TestBeam/TBRec/src/TBBeamQualityDoubleHitsTool.cxx +++ b/TestBeam/TBRec/src/TBBeamQualityDoubleHitsTool.cxx @@ -13,16 +13,10 @@ //##################################################### -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/Service.h" -#include "GaudiKernel/AlgTool.h" - -#include "StoreGate/StoreGateSvc.h" -#include "GaudiKernel/Property.h" +#include "TBBeamQualityDoubleHitsTool.h" #include "TBEvent/TBScintillatorCont.h" #include "TBEvent/TBScintillator.h" -#include "TBRec/TBBeamQualityDoubleHitsTool.h" #include <string> #include <ios> diff --git a/TestBeam/TBRec/TBRec/TBBeamQualityDoubleHitsTool.h b/TestBeam/TBRec/src/TBBeamQualityDoubleHitsTool.h old mode 100755 new mode 100644 similarity index 91% rename from TestBeam/TBRec/TBRec/TBBeamQualityDoubleHitsTool.h rename to TestBeam/TBRec/src/TBBeamQualityDoubleHitsTool.h index e8edf152d21e..b5a4492356a1 --- a/TestBeam/TBRec/TBRec/TBBeamQualityDoubleHitsTool.h +++ b/TestBeam/TBRec/src/TBBeamQualityDoubleHitsTool.h @@ -12,10 +12,10 @@ //# Last Modified: Feb 7/2005 # //##################################################### -#ifndef TBBEAMQUALITYDOUBLEHITSTOOL_H -#define TBBEAMQUALITYDOUBLEHITSTOOL_H +#ifndef TBREC_TBBEAMQUALITYDOUBLEHITSTOOL_H +#define TBREC_TBBEAMQUALITYDOUBLEHITSTOOL_H -#include "TBRec/TBBeamQualityTool.h" +#include "TBBeamQualityTool.h" #include <string> #include <vector> diff --git a/TestBeam/TBRec/src/TBBeamQualityEMFractionTool.cxx b/TestBeam/TBRec/src/TBBeamQualityEMFractionTool.cxx old mode 100755 new mode 100644 index bbca3303ce25..88d4fb110275 --- a/TestBeam/TBRec/src/TBBeamQualityEMFractionTool.cxx +++ b/TestBeam/TBRec/src/TBBeamQualityEMFractionTool.cxx @@ -12,23 +12,12 @@ //# # //##################################################### -#include "TBRec/TBBeamQualityEMFractionTool.h" - -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/Service.h" -#include "GaudiKernel/AlgTool.h" - -#include "GaudiKernel/ListItem.h" -#include "GaudiKernel/Property.h" - -#include "StoreGate/StoreGate.h" -#include "StoreGate/StoreGateSvc.h" +#include "TBBeamQualityEMFractionTool.h" #include "CaloIdentifier/CaloCell_ID.h" #include "CaloEvent/CaloCellContainer.h" #include "Identifier/Identifier.h" -#include <list> TBBeamQualityEMFractionTool::TBBeamQualityEMFractionTool(const std::string& name, const std::string& type, diff --git a/TestBeam/TBRec/TBRec/TBBeamQualityEMFractionTool.h b/TestBeam/TBRec/src/TBBeamQualityEMFractionTool.h old mode 100755 new mode 100644 similarity index 97% rename from TestBeam/TBRec/TBRec/TBBeamQualityEMFractionTool.h rename to TestBeam/TBRec/src/TBBeamQualityEMFractionTool.h index a6cd7cddf2df..27c67b0191e6 --- a/TestBeam/TBRec/TBRec/TBBeamQualityEMFractionTool.h +++ b/TestBeam/TBRec/src/TBBeamQualityEMFractionTool.h @@ -15,7 +15,7 @@ #ifndef TBBEAMQUALITYEMFRACTIONTOOL_H #define TBBEAMQUALITYEMFRACTIONTOOL_H -#include "TBRec/TBBeamQualityTool.h" +#include "TBBeamQualityTool.h" //#include "LArDetDescr/LArDetDescrManager.h" diff --git a/TestBeam/TBRec/src/TBBeamQualityMC.cxx b/TestBeam/TBRec/src/TBBeamQualityMC.cxx index 52479b4c2508..e6aa098e864f 100644 --- a/TestBeam/TBRec/src/TBBeamQualityMC.cxx +++ b/TestBeam/TBRec/src/TBBeamQualityMC.cxx @@ -2,17 +2,16 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "TBRec/TBBeamQualityMC.h" -#include "StoreGate/StoreGateSvc.h" +#include "TBBeamQualityMC.h" #include "TBEvent/TBEventInfo.h" #include "TBEvent/TBTrack.h" #include "LArG4TBSimEvent/LArG4H6FrontHitCollection.h" #include "CaloEvent/CaloClusterContainer.h" +#include "PathResolver/PathResolver.h" #include <fstream> #include <string> #include <math.h> -#include "PathResolver/PathResolver.h" TBBeamQualityMC::TBBeamQualityMC(const std::string & name, ISvcLocator * pSvcLocator) : diff --git a/TestBeam/TBRec/TBRec/TBBeamQualityMC.h b/TestBeam/TBRec/src/TBBeamQualityMC.h old mode 100755 new mode 100644 similarity index 92% rename from TestBeam/TBRec/TBRec/TBBeamQualityMC.h rename to TestBeam/TBRec/src/TBBeamQualityMC.h index 1caea4f57a7e..3b5ff9278c61 --- a/TestBeam/TBRec/TBRec/TBBeamQualityMC.h +++ b/TestBeam/TBRec/src/TBBeamQualityMC.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef TBBEAMQUALITYMC_H -#define TBBEAMQUALITYMC_H +#ifndef TBREC_TBBEAMQUALITYMC_H +#define TBREC_TBBEAMQUALITYMC_H #include "AthenaBaseComps/AthAlgorithm.h" #include <vector> diff --git a/TestBeam/TBRec/src/TBBeamQualityMuonToolH6.cxx b/TestBeam/TBRec/src/TBBeamQualityMuonToolH6.cxx old mode 100755 new mode 100644 index cabca65d2cde..1516c5b3f62f --- a/TestBeam/TBRec/src/TBBeamQualityMuonToolH6.cxx +++ b/TestBeam/TBRec/src/TBBeamQualityMuonToolH6.cxx @@ -12,17 +12,11 @@ //# Last Modofied: Nov 18/2004 # //##################################################### -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/Service.h" -#include "GaudiKernel/AlgTool.h" - -#include "StoreGate/StoreGateSvc.h" -#include "GaudiKernel/Property.h" +#include "TBBeamQualityMuonToolH6.h" // TRIGGERS #include "TBEvent/TBTriggerPatternUnit.h" -#include "TBRec/TBBeamQualityMuonToolH6.h" #include <string> #include <ios> diff --git a/TestBeam/TBRec/TBRec/TBBeamQualityMuonToolH6.h b/TestBeam/TBRec/src/TBBeamQualityMuonToolH6.h old mode 100755 new mode 100644 similarity index 91% rename from TestBeam/TBRec/TBRec/TBBeamQualityMuonToolH6.h rename to TestBeam/TBRec/src/TBBeamQualityMuonToolH6.h index 577a6c802382..a85f39c2b49f --- a/TestBeam/TBRec/TBRec/TBBeamQualityMuonToolH6.h +++ b/TestBeam/TBRec/src/TBBeamQualityMuonToolH6.h @@ -12,10 +12,10 @@ //# Last Modified: Nov 18/2004 # //##################################################### -#ifndef TBBEAMQUALITYMUONTOOLH6_H -#define TBBEAMQUALITYMUONTOOLH6_H +#ifndef TBREC_TBBEAMQUALITYMUONTOOLH6_H +#define TBREC_TBBEAMQUALITYMUONTOOLH6_H -#include "TBRec/TBBeamQualityTool.h" +#include "TBBeamQualityTool.h" #include <string> #include <vector> diff --git a/TestBeam/TBRec/src/TBBeamQualityTool.cxx b/TestBeam/TBRec/src/TBBeamQualityTool.cxx old mode 100755 new mode 100644 index dceb40f4e1e9..d05f6e2af113 --- a/TestBeam/TBRec/src/TBBeamQualityTool.cxx +++ b/TestBeam/TBRec/src/TBBeamQualityTool.cxx @@ -13,12 +13,7 @@ //##################################################### -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/Service.h" - -#include "StoreGate/StoreGateSvc.h" - -#include "TBRec/TBBeamQualityTool.h" +#include "TBBeamQualityTool.h" #include <string> #include <vector> diff --git a/TestBeam/TBRec/TBRec/TBBeamQualityTool.h b/TestBeam/TBRec/src/TBBeamQualityTool.h old mode 100755 new mode 100644 similarity index 94% rename from TestBeam/TBRec/TBRec/TBBeamQualityTool.h rename to TestBeam/TBRec/src/TBBeamQualityTool.h index 6e57d18d2642..05c856c7a837 --- a/TestBeam/TBRec/TBRec/TBBeamQualityTool.h +++ b/TestBeam/TBRec/src/TBBeamQualityTool.h @@ -12,8 +12,8 @@ //# Last Modified: Nov 18/2004 # //##################################################### -#ifndef TBBEAMQUALITYTOOL_H -#define TBBEAMQUALITYTOOL_H +#ifndef TBREC_TBBEAMQUALITYTOOL_H +#define TBREC_TBBEAMQUALITYTOOL_H #include "AthenaBaseComps/AthAlgTool.h" diff --git a/TestBeam/TBRec/src/TBBeamQualityTrackingTool.cxx b/TestBeam/TBRec/src/TBBeamQualityTrackingTool.cxx old mode 100755 new mode 100644 index d060cebbacd8..2bd0968d5824 --- a/TestBeam/TBRec/src/TBBeamQualityTrackingTool.cxx +++ b/TestBeam/TBRec/src/TBBeamQualityTrackingTool.cxx @@ -12,17 +12,9 @@ //# Last Modified: Jun 30/2005 # //##################################################### -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/Service.h" -#include "GaudiKernel/AlgTool.h" - -#include "StoreGate/StoreGateSvc.h" -#include "GaudiKernel/Property.h" - +#include "TBBeamQualityTrackingTool.h" #include "TBEvent/TBTrack.h" -#include "TBRec/TBBeamQualityTrackingTool.h" - #include <string> #include <ios> #include <algorithm> diff --git a/TestBeam/TBRec/TBRec/TBBeamQualityTrackingTool.h b/TestBeam/TBRec/src/TBBeamQualityTrackingTool.h old mode 100755 new mode 100644 similarity index 91% rename from TestBeam/TBRec/TBRec/TBBeamQualityTrackingTool.h rename to TestBeam/TBRec/src/TBBeamQualityTrackingTool.h index 0f2e80a93fa7..e3db4890befb --- a/TestBeam/TBRec/TBRec/TBBeamQualityTrackingTool.h +++ b/TestBeam/TBRec/src/TBBeamQualityTrackingTool.h @@ -12,10 +12,10 @@ //# Last Modified: Jun 30/2005 # //##################################################### -#ifndef TBBEAMQUALITYTRACKINGTOOL_H -#define TBBEAMQUALITYTRACKINGTOOL_H +#ifndef TBREC_TBBEAMQUALITYTRACKINGTOOL_H +#define TBREC_TBBEAMQUALITYTRACKINGTOOL_H -#include "TBRec/TBBeamQualityTool.h" +#include "TBBeamQualityTool.h" #include <string> #include <vector> diff --git a/TestBeam/TBRec/src/TBCellContainerFillerTool.cxx b/TestBeam/TBRec/src/TBCellContainerFillerTool.cxx index 2686f895e1c9..46cbfa08febf 100644 --- a/TestBeam/TBRec/src/TBCellContainerFillerTool.cxx +++ b/TestBeam/TBRec/src/TBCellContainerFillerTool.cxx @@ -2,14 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "TBRec/TBCellContainerFillerTool.h" - -#include "GaudiKernel/Service.h" -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/Property.h" -#include "GaudiKernel/ListItem.h" - -#include "StoreGate/StoreGateSvc.h" +#include "TBCellContainerFillerTool.h" #include "CaloEvent/CaloCellContainer.h" #include "CaloIdentifier/CaloCell_ID.h" diff --git a/TestBeam/TBRec/TBRec/TBCellContainerFillerTool.h b/TestBeam/TBRec/src/TBCellContainerFillerTool.h similarity index 92% rename from TestBeam/TBRec/TBRec/TBCellContainerFillerTool.h rename to TestBeam/TBRec/src/TBCellContainerFillerTool.h index 1089b5c2c70b..a9d19e210851 100644 --- a/TestBeam/TBRec/TBRec/TBCellContainerFillerTool.h +++ b/TestBeam/TBRec/src/TBCellContainerFillerTool.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef CALOREC_TBCellContainerFillerTool_H -#define CALOREC_TBCellContainerFillerTool_H +#ifndef TBREC_TBCELLCONTAINERFILLERTOOL_H +#define TBREC_TBCELLCONTAINERFILLERTOOL_H #include "AthenaBaseComps/AthAlgTool.h" //#include "CaloUtils/ICaloCellMakerTool.h" diff --git a/TestBeam/TBRec/src/TBCellNoiseCorrection.cxx b/TestBeam/TBRec/src/TBCellNoiseCorrection.cxx index 4d1ad9683f43..b0732dda36d2 100644 --- a/TestBeam/TBRec/src/TBCellNoiseCorrection.cxx +++ b/TestBeam/TBRec/src/TBCellNoiseCorrection.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "TBRec/TBCellNoiseCorrection.h" +#include "TBCellNoiseCorrection.h" #include "CaloDetDescr/CaloDetDescrElement.h" #include "CaloEvent/CaloCell.h" @@ -10,8 +10,6 @@ #include "PathResolver/PathResolver.h" -#include "GaudiKernel/IIncidentSvc.h" -#include "GaudiKernel/Incident.h" #include "CLHEP/Random/RandFlat.h" #include <TFile.h> diff --git a/TestBeam/TBRec/TBRec/TBCellNoiseCorrection.h b/TestBeam/TBRec/src/TBCellNoiseCorrection.h similarity index 95% rename from TestBeam/TBRec/TBRec/TBCellNoiseCorrection.h rename to TestBeam/TBRec/src/TBCellNoiseCorrection.h index 8c650eb42781..b5c053e1e9b4 100644 --- a/TestBeam/TBRec/TBRec/TBCellNoiseCorrection.h +++ b/TestBeam/TBRec/src/TBCellNoiseCorrection.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef TBREC_TBCellNoiseCorrection_H -#define TBREC_TBCellNoiseCorrection_H +#ifndef TBREC_TBCELLNOISECORRECTION_H +#define TBREC_TBCELLNOISECORRECTION_H /******************************************************************** NAME: TBCellNoiseCorrection.cxx PACKAGE: offline/TestBeam/TBRec diff --git a/TestBeam/TBRec/src/TBClusterMaker.cxx b/TestBeam/TBRec/src/TBClusterMaker.cxx index 61927bfa32c4..68150d459904 100644 --- a/TestBeam/TBRec/src/TBClusterMaker.cxx +++ b/TestBeam/TBRec/src/TBClusterMaker.cxx @@ -2,14 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -// Gaudi -#include "GaudiKernel/ISvcLocator.h" -#include "GaudiKernel/StatusCode.h" -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/IToolSvc.h" -#include "GaudiKernel/ListItem.h" +#include "TBClusterMaker.h" -#include "StoreGate/StoreGateSvc.h" #include "CLHEP/Units/SystemOfUnits.h" #include "CaloDetDescr/CaloDetDescrManager.h" #include "CaloGeoHelpers/CaloPhiRange.h" @@ -24,8 +18,7 @@ #include "xAODCaloEvent/CaloClusterKineHelper.h" #include "CaloGeoHelpers/proxim.h" #include "CaloUtils/CaloClusterStoreHelper.h" - -#include "TBRec/TBClusterMaker.h" +#include "GaudiKernel/ListItem.h" //############################################################################# diff --git a/TestBeam/TBRec/TBRec/TBClusterMaker.h b/TestBeam/TBRec/src/TBClusterMaker.h similarity index 98% rename from TestBeam/TBRec/TBRec/TBClusterMaker.h rename to TestBeam/TBRec/src/TBClusterMaker.h index 24d42760d1fe..324934822271 100644 --- a/TestBeam/TBRec/TBRec/TBClusterMaker.h +++ b/TestBeam/TBRec/src/TBClusterMaker.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef TBCLUSTERMAKER_H -#define TBCLUSTERMAKER_H +#ifndef TBREC_TBCLUSTERMAKER_H +#define TBREC_TBCLUSTERMAKER_H /** * @class TBClusterMaker * @version \$Id: TBClusterMaker.h,v 1.2 2009-04-17 09:51:30 pavol Exp $ diff --git a/TestBeam/TBRec/src/TBDMContainerSplitter.cxx b/TestBeam/TBRec/src/TBDMContainerSplitter.cxx index 488c26f6b073..efc9fe09836e 100644 --- a/TestBeam/TBRec/src/TBDMContainerSplitter.cxx +++ b/TestBeam/TBRec/src/TBDMContainerSplitter.cxx @@ -2,17 +2,11 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "GaudiKernel/ISvcLocator.h" -#include "GaudiKernel/StatusCode.h" -#include "GaudiKernel/IToolSvc.h" -#include "GaudiKernel/ListItem.h" +#include "TBDMContainerSplitter.h" -#include "StoreGate/StoreGateSvc.h" #include "CaloDmDetDescr/CaloDmDescrManager.h" #include "CaloSimEvent/CaloCalibrationHitContainer.h" -#include "TBRec/TBDMContainerSplitter.h" - TBDMContainerSplitter::TBDMContainerSplitter(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator), diff --git a/TestBeam/TBRec/TBRec/TBDMContainerSplitter.h b/TestBeam/TBRec/src/TBDMContainerSplitter.h similarity index 92% rename from TestBeam/TBRec/TBRec/TBDMContainerSplitter.h rename to TestBeam/TBRec/src/TBDMContainerSplitter.h index 43ebdf455f19..eaaa0562ba0a 100644 --- a/TestBeam/TBRec/TBRec/TBDMContainerSplitter.h +++ b/TestBeam/TBRec/src/TBDMContainerSplitter.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef TBDMCONTAINERSPLITTER -#define TBDMCONTAINERSPLITTER +#ifndef TBREC_TBDMCONTAINERSPLITTER_H +#define TBREC_TBDMCONTAINERSPLITTER_H // // class TBDMContainerSplitter diff --git a/TestBeam/TBRec/src/TBECLArRawChannelBuilder.cxx b/TestBeam/TBRec/src/TBECLArRawChannelBuilder.cxx index 0d1048456770..c5a1cf2a50b6 100644 --- a/TestBeam/TBRec/src/TBECLArRawChannelBuilder.cxx +++ b/TestBeam/TBRec/src/TBECLArRawChannelBuilder.cxx @@ -2,8 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "TBRec/TBECLArRawChannelBuilder.h" -#include "StoreGate/StoreGateSvc.h" +#include "TBECLArRawChannelBuilder.h" #include "CaloDetDescr/CaloDetDescrManager.h" #include "CaloIdentifier/CaloCell_ID.h" diff --git a/TestBeam/TBRec/TBRec/TBECLArRawChannelBuilder.h b/TestBeam/TBRec/src/TBECLArRawChannelBuilder.h similarity index 97% rename from TestBeam/TBRec/TBRec/TBECLArRawChannelBuilder.h rename to TestBeam/TBRec/src/TBECLArRawChannelBuilder.h index b2313b2ceffc..348042fe0d22 100644 --- a/TestBeam/TBRec/TBRec/TBECLArRawChannelBuilder.h +++ b/TestBeam/TBRec/src/TBECLArRawChannelBuilder.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef TBECLARRAWCHANNELBUILDER -#define TBECLARRAWCHANNELBUILDER +#ifndef TBREC_TBECLARRAWCHANNELBUILDER_H +#define TBREC_TBECLARRAWCHANNELBUILDER_H #include "AthenaBaseComps/AthAlgorithm.h" #include "GaudiKernel/ToolHandle.h" diff --git a/TestBeam/TBRec/src/TBEMECCellEtaCorrection.cxx b/TestBeam/TBRec/src/TBEMECCellEtaCorrection.cxx index ffe7d5934120..eaeab8c89ae0 100644 --- a/TestBeam/TBRec/src/TBEMECCellEtaCorrection.cxx +++ b/TestBeam/TBRec/src/TBEMECCellEtaCorrection.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "TBRec/TBEMECCellEtaCorrection.h" +#include "TBEMECCellEtaCorrection.h" // INCLUDE LAr header files: diff --git a/TestBeam/TBRec/TBRec/TBEMECCellEtaCorrection.h b/TestBeam/TBRec/src/TBEMECCellEtaCorrection.h similarity index 100% rename from TestBeam/TBRec/TBRec/TBEMECCellEtaCorrection.h rename to TestBeam/TBRec/src/TBEMECCellEtaCorrection.h diff --git a/TestBeam/TBRec/src/TBEMECXTalkToyModel.cxx b/TestBeam/TBRec/src/TBEMECXTalkToyModel.cxx old mode 100755 new mode 100644 index 7c06f6e901ed..59ea1221a4bd --- a/TestBeam/TBRec/src/TBEMECXTalkToyModel.cxx +++ b/TestBeam/TBRec/src/TBEMECXTalkToyModel.cxx @@ -16,10 +16,7 @@ PURPOSE: A simple toy model to simulate longitudinal cross-talk ********************************************************************/ -#include "TBRec/TBEMECXTalkToyModel.h" - -#include "StoreGate/StoreGateSvc.h" - +#include "TBEMECXTalkToyModel.h" #include "CaloEvent/CaloCellContainer.h" #include "CaloEvent/CaloCell.h" diff --git a/TestBeam/TBRec/TBRec/TBEMECXTalkToyModel.h b/TestBeam/TBRec/src/TBEMECXTalkToyModel.h old mode 100755 new mode 100644 similarity index 94% rename from TestBeam/TBRec/TBRec/TBEMECXTalkToyModel.h rename to TestBeam/TBRec/src/TBEMECXTalkToyModel.h index f4713b0031bb..18252de837f6 --- a/TestBeam/TBRec/TBRec/TBEMECXTalkToyModel.h +++ b/TestBeam/TBRec/src/TBEMECXTalkToyModel.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef CALOREC_TBEMECXTALKTOYMODEL_H -#define CALOREC_TBEMECXTALKTOYMODEL_H +#ifndef TBREC_TBEMECXTALKTOYMODEL_H +#define TBREC_TBEMECXTALKTOYMODEL_H class StoreGateSvc; #include "AthenaBaseComps/AthAlgTool.h" diff --git a/TestBeam/TBRec/src/TBEventInfoStreamerTool.cxx b/TestBeam/TBRec/src/TBEventInfoStreamerTool.cxx old mode 100755 new mode 100644 index 86c38d2b4abb..7476e2799fe8 --- a/TestBeam/TBRec/src/TBEventInfoStreamerTool.cxx +++ b/TestBeam/TBRec/src/TBEventInfoStreamerTool.cxx @@ -2,12 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/Service.h" - -#include "StoreGate/StoreGateSvc.h" - -#include "TBRec/TBEventInfoStreamerTool.h" +#include "TBEventInfoStreamerTool.h" #include "TBEvent/TBEventInfo.h" #include <string> diff --git a/TestBeam/TBRec/TBRec/TBEventInfoStreamerTool.h b/TestBeam/TBRec/src/TBEventInfoStreamerTool.h old mode 100755 new mode 100644 similarity index 94% rename from TestBeam/TBRec/TBRec/TBEventInfoStreamerTool.h rename to TestBeam/TBRec/src/TBEventInfoStreamerTool.h index 0c5c8c820b93..22a5590edd1a --- a/TestBeam/TBRec/TBRec/TBEventInfoStreamerTool.h +++ b/TestBeam/TBRec/src/TBEventInfoStreamerTool.h @@ -5,7 +5,7 @@ #ifndef TBREC_TBEVENTINFOSTREAMERTOOL_H #define TBREC_TBEVENTINFOSTREAMERTOOL_H -#include "TBRec/TBEventStreamerTool.h" +#include "TBEventStreamerTool.h" #include <string> #include <vector> diff --git a/TestBeam/TBRec/src/TBEventStreamer.cxx b/TestBeam/TBRec/src/TBEventStreamer.cxx old mode 100755 new mode 100644 index 5ae7572bb386..e2c7c22986e2 --- a/TestBeam/TBRec/src/TBEventStreamer.cxx +++ b/TestBeam/TBRec/src/TBEventStreamer.cxx @@ -3,14 +3,8 @@ */ -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/Property.h" -#include "GaudiKernel/ListItem.h" - -#include "StoreGate/StoreGateSvc.h" - -#include "TBRec/TBEventStreamerTool.h" -#include "TBRec/TBEventStreamer.h" +#include "TBEventStreamerTool.h" +#include "TBEventStreamer.h" TBEventStreamer::TBEventStreamer(const std::string& name, ISvcLocator* pService) diff --git a/TestBeam/TBRec/TBRec/TBEventStreamer.h b/TestBeam/TBRec/src/TBEventStreamer.h old mode 100755 new mode 100644 similarity index 100% rename from TestBeam/TBRec/TBRec/TBEventStreamer.h rename to TestBeam/TBRec/src/TBEventStreamer.h diff --git a/TestBeam/TBRec/src/TBEventStreamerTool.cxx b/TestBeam/TBRec/src/TBEventStreamerTool.cxx old mode 100755 new mode 100644 index c41587ca2694..026db7824546 --- a/TestBeam/TBRec/src/TBEventStreamerTool.cxx +++ b/TestBeam/TBRec/src/TBEventStreamerTool.cxx @@ -2,13 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/Service.h" - -#include "StoreGate/StoreGateSvc.h" - -#include "TBRec/TBEventStreamerTool.h" - +#include "TBEventStreamerTool.h" #include <string> TBEventStreamerTool::TBEventStreamerTool(const std::string& name, diff --git a/TestBeam/TBRec/TBRec/TBEventStreamerTool.h b/TestBeam/TBRec/src/TBEventStreamerTool.h old mode 100755 new mode 100644 similarity index 100% rename from TestBeam/TBRec/TBRec/TBEventStreamerTool.h rename to TestBeam/TBRec/src/TBEventStreamerTool.h diff --git a/TestBeam/TBRec/src/TBExtrapolTrackToCaloTool.cxx b/TestBeam/TBRec/src/TBExtrapolTrackToCaloTool.cxx old mode 100755 new mode 100644 index bec48ed2bbe1..b8085890e1af --- a/TestBeam/TBRec/src/TBExtrapolTrackToCaloTool.cxx +++ b/TestBeam/TBRec/src/TBExtrapolTrackToCaloTool.cxx @@ -8,10 +8,7 @@ // //**************************************************************************** -#include "TBRec/TBExtrapolTrackToCaloTool.h" - -#include "GaudiKernel/Property.h" - +#include "TBExtrapolTrackToCaloTool.h" #include <vector> // Stuff needed for the extrapolation : diff --git a/TestBeam/TBRec/TBRec/TBExtrapolTrackToCaloTool.h b/TestBeam/TBRec/src/TBExtrapolTrackToCaloTool.h old mode 100755 new mode 100644 similarity index 99% rename from TestBeam/TBRec/TBRec/TBExtrapolTrackToCaloTool.h rename to TestBeam/TBRec/src/TBExtrapolTrackToCaloTool.h index 7e09da8c5c38..6da14524e866 --- a/TestBeam/TBRec/TBRec/TBExtrapolTrackToCaloTool.h +++ b/TestBeam/TBRec/src/TBExtrapolTrackToCaloTool.h @@ -10,8 +10,8 @@ // // *************************************************************************** -#ifndef TRACKTOCALO_TBEXTRAPOLTRACKTOCALO_H -#define TRACKTOCALO_TBEXTRAPOLTRACKTOCALO_H +#ifndef TBREC_TBEXTRAPOLTRACKTOCALO_H +#define TBREC_TBEXTRAPOLTRACKTOCALO_H //#include "ITrackToCalo/IExtrapolTrackToCaloTool.h" //#include "RecoToolInterfaces/IExtrapolateToCaloTool.h" diff --git a/TestBeam/TBRec/src/TBLArRawChannelBuilder.cxx b/TestBeam/TBRec/src/TBLArRawChannelBuilder.cxx old mode 100755 new mode 100644 index 4379693e1d1c..647517b037be --- a/TestBeam/TBRec/src/TBLArRawChannelBuilder.cxx +++ b/TestBeam/TBRec/src/TBLArRawChannelBuilder.cxx @@ -2,8 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "TBRec/TBLArRawChannelBuilder.h" -#include "StoreGate/StoreGateSvc.h" +#include "TBLArRawChannelBuilder.h" #include "LArIdentifier/LArOnlineID.h" #include <cmath> diff --git a/TestBeam/TBRec/TBRec/TBLArRawChannelBuilder.h b/TestBeam/TBRec/src/TBLArRawChannelBuilder.h old mode 100755 new mode 100644 similarity index 95% rename from TestBeam/TBRec/TBRec/TBLArRawChannelBuilder.h rename to TestBeam/TBRec/src/TBLArRawChannelBuilder.h index be2e8cdc8e97..57ef0dbd68e7 --- a/TestBeam/TBRec/TBRec/TBLArRawChannelBuilder.h +++ b/TestBeam/TBRec/src/TBLArRawChannelBuilder.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef TBLARRAWCHANNELBUILDER -#define TBLARRAWCHANNELBUILDER +#ifndef TBREC_TBLARRAWCHANNELBUILDER_H +#define TBREC_TBLARRAWCHANNELBUILDER_H #include "AthenaBaseComps/AthAlgorithm.h" #include "GaudiKernel/IToolSvc.h" diff --git a/TestBeam/TBRec/src/TBMWPCRec.cxx b/TestBeam/TBRec/src/TBMWPCRec.cxx old mode 100755 new mode 100644 index 2303357e1030..105c2df2b596 --- a/TestBeam/TBRec/src/TBMWPCRec.cxx +++ b/TestBeam/TBRec/src/TBMWPCRec.cxx @@ -3,17 +3,7 @@ */ -#include "StoreGate/StoreGateSvc.h" - -#include "GaudiKernel/Property.h" - -#include "TBRec/TBMWPCRec.h" - -// static const AlgFactory<TBMWPCRec> s_factory; -// const IAlgFactory& TBMWPCRecFactory = s_factory; - - - +#include "TBMWPCRec.h" TBMWPCRec::TBMWPCRec(const std::string& name, diff --git a/TestBeam/TBRec/TBRec/TBMWPCRec.h b/TestBeam/TBRec/src/TBMWPCRec.h old mode 100755 new mode 100644 similarity index 100% rename from TestBeam/TBRec/TBRec/TBMWPCRec.h rename to TestBeam/TBRec/src/TBMWPCRec.h diff --git a/TestBeam/TBRec/src/TBNoiseWrite.cxx b/TestBeam/TBRec/src/TBNoiseWrite.cxx index 266dadd64434..decaa9becc08 100644 --- a/TestBeam/TBRec/src/TBNoiseWrite.cxx +++ b/TestBeam/TBRec/src/TBNoiseWrite.cxx @@ -8,24 +8,18 @@ // author: A.Minaenko // date: 08/05/2008 -#include "GaudiKernel/ISvcLocator.h" -#include "GaudiKernel/StatusCode.h" -#include "GaudiKernel/IToolSvc.h" -#include "GaudiKernel/ListItem.h" +#include "TBNoiseWrite.h" #include "PathResolver/PathResolver.h" #include <TFile.h> #include <TTree.h> -#include "StoreGate/StoreGate.h" #include "CaloEvent/CaloCell.h" #include "CaloEvent/CaloCellContainer.h" #include "TBEvent/TBEventInfo.h" -#include "TBRec/TBNoiseWrite.h" - #include <fstream> TBNoiseWrite::TBNoiseWrite(const std::string& name, diff --git a/TestBeam/TBRec/TBRec/TBNoiseWrite.h b/TestBeam/TBRec/src/TBNoiseWrite.h similarity index 97% rename from TestBeam/TBRec/TBRec/TBNoiseWrite.h rename to TestBeam/TBRec/src/TBNoiseWrite.h index fbb90e524827..417deb409910 100644 --- a/TestBeam/TBRec/TBRec/TBNoiseWrite.h +++ b/TestBeam/TBRec/src/TBNoiseWrite.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef TBNOISEWRITE -#define TBNOISEWRITE +#ifndef TBREC_TBNOISEWRITE_H +#define TBREC_TBNOISEWRITE_H // // class TBNoiseWrite diff --git a/TestBeam/TBRec/src/TBPartIDCherenkovMuTag.cxx b/TestBeam/TBRec/src/TBPartIDCherenkovMuTag.cxx old mode 100755 new mode 100644 index ec5200ddf9d4..2f66c7aad7a7 --- a/TestBeam/TBRec/src/TBPartIDCherenkovMuTag.cxx +++ b/TestBeam/TBRec/src/TBPartIDCherenkovMuTag.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "TBRec/TBPartIDCherenkovMuTag.h" +#include "TBPartIDCherenkovMuTag.h" #include "TBEvent/TBIdentifiedParticle.h" #include "TBEvent/TBScintillatorCont.h" diff --git a/TestBeam/TBRec/TBRec/TBPartIDCherenkovMuTag.h b/TestBeam/TBRec/src/TBPartIDCherenkovMuTag.h old mode 100755 new mode 100644 similarity index 85% rename from TestBeam/TBRec/TBRec/TBPartIDCherenkovMuTag.h rename to TestBeam/TBRec/src/TBPartIDCherenkovMuTag.h index fe7ced1a6f3c..af136d4cca5c --- a/TestBeam/TBRec/TBRec/TBPartIDCherenkovMuTag.h +++ b/TestBeam/TBRec/src/TBPartIDCherenkovMuTag.h @@ -4,11 +4,10 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef TBPARTICLEIDCHERENKOVMUTAG -#define TBPARTICLEIDCHERENKOVMUTAG +#ifndef TBREC_TBPARTICLEIDCHERENKOVMUTAG_H +#define TBREC_TBPARTICLEIDCHERENKOVMUTAG_H #include "AthenaBaseComps/AthAlgorithm.h" -#include "StoreGate/StoreGateSvc.h" class TBPartIDCherenkovMuTag : public AthAlgorithm { diff --git a/TestBeam/TBRec/src/TBPatternUnitStreamerTool.cxx b/TestBeam/TBRec/src/TBPatternUnitStreamerTool.cxx old mode 100755 new mode 100644 index c46375a0cd87..b7865f70450d --- a/TestBeam/TBRec/src/TBPatternUnitStreamerTool.cxx +++ b/TestBeam/TBRec/src/TBPatternUnitStreamerTool.cxx @@ -2,21 +2,13 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/Service.h" - -#include "StoreGate/StoreGateSvc.h" +#include "TBPatternUnitStreamerTool.h" #include "TBEvent/TBTriggerPatternUnit.h" #include "TBEvent/TBEventInfo.h" -#include "TBRec/TBPatternUnitStreamerTool.h" - #include <string> - -//#include <iomanip> #include <ios> -//#include <iomanip> TBPatternUnitStreamerTool::TBPatternUnitStreamerTool(const std::string& name, const std::string& type, diff --git a/TestBeam/TBRec/TBRec/TBPatternUnitStreamerTool.h b/TestBeam/TBRec/src/TBPatternUnitStreamerTool.h old mode 100755 new mode 100644 similarity index 98% rename from TestBeam/TBRec/TBRec/TBPatternUnitStreamerTool.h rename to TestBeam/TBRec/src/TBPatternUnitStreamerTool.h index 867ed5241bd3..d82e35f54959 --- a/TestBeam/TBRec/TBRec/TBPatternUnitStreamerTool.h +++ b/TestBeam/TBRec/src/TBPatternUnitStreamerTool.h @@ -24,7 +24,7 @@ * \date June 20, 2004 - first implementation */ -#include "TBRec/TBEventStreamerTool.h" +#include "TBEventStreamerTool.h" #include <string> #include <map> diff --git a/TestBeam/TBRec/src/TBPatternUnitStreamerToolH8.cxx b/TestBeam/TBRec/src/TBPatternUnitStreamerToolH8.cxx old mode 100755 new mode 100644 index 4dcbd680c334..687b3e0be329 --- a/TestBeam/TBRec/src/TBPatternUnitStreamerToolH8.cxx +++ b/TestBeam/TBRec/src/TBPatternUnitStreamerToolH8.cxx @@ -2,20 +2,11 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/Service.h" - -#include "StoreGate/StoreGateSvc.h" - +#include "TBPatternUnitStreamerToolH8.h" #include "TBEvent/TBTriggerPatternUnit.h" - -#include "TBRec/TBPatternUnitStreamerToolH8.h" - #include <string> - -//#include <iomanip> #include <ios> -//#include <iomanip> + TBPatternUnitStreamerToolH8::TBPatternUnitStreamerToolH8( const std::string& name, diff --git a/TestBeam/TBRec/TBRec/TBPatternUnitStreamerToolH8.h b/TestBeam/TBRec/src/TBPatternUnitStreamerToolH8.h old mode 100755 new mode 100644 similarity index 98% rename from TestBeam/TBRec/TBRec/TBPatternUnitStreamerToolH8.h rename to TestBeam/TBRec/src/TBPatternUnitStreamerToolH8.h index 67555b208c15..e3a2c04af8b4 --- a/TestBeam/TBRec/TBRec/TBPatternUnitStreamerToolH8.h +++ b/TestBeam/TBRec/src/TBPatternUnitStreamerToolH8.h @@ -24,7 +24,7 @@ * \date July 28, 2004 - copy of TBPatternUnitStreamerTool adapted for H8 */ -#include "TBRec/TBEventStreamerTool.h" +#include "TBEventStreamerTool.h" #include <string> #include <map> diff --git a/TestBeam/TBRec/src/TBPhaseRec.cxx b/TestBeam/TBRec/src/TBPhaseRec.cxx old mode 100755 new mode 100644 index 2989133e8be1..f2c6cc12ac45 --- a/TestBeam/TBRec/src/TBPhaseRec.cxx +++ b/TestBeam/TBRec/src/TBPhaseRec.cxx @@ -3,15 +3,11 @@ */ -#include "StoreGate/StoreGateSvc.h" - -#include "GaudiKernel/Property.h" +#include "TBPhaseRec.h" #include "EventInfo/EventInfo.h" #include "EventInfo/EventID.h" -#include "TBRec/TBPhaseRec.h" - #include "TBEvent/TBTDCRaw.h" #include "TBEvent/TBTDCRawCont.h" #include "TBEvent/TBPhase.h" diff --git a/TestBeam/TBRec/TBRec/TBPhaseRec.h b/TestBeam/TBRec/src/TBPhaseRec.h old mode 100755 new mode 100644 similarity index 100% rename from TestBeam/TBRec/TBRec/TBPhaseRec.h rename to TestBeam/TBRec/src/TBPhaseRec.h diff --git a/TestBeam/TBRec/src/TBPhaseStreamerTool.cxx b/TestBeam/TBRec/src/TBPhaseStreamerTool.cxx old mode 100755 new mode 100644 index 7d2f5f17bbfe..27f74eb3c3da --- a/TestBeam/TBRec/src/TBPhaseStreamerTool.cxx +++ b/TestBeam/TBRec/src/TBPhaseStreamerTool.cxx @@ -2,13 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/Service.h" - -#include "StoreGate/StoreGateSvc.h" +#include "TBPhaseStreamerTool.h" #include "TBEvent/TBPhase.h" -#include "TBRec/TBPhaseStreamerTool.h" - #include <string> #include <ios> diff --git a/TestBeam/TBRec/TBRec/TBPhaseStreamerTool.h b/TestBeam/TBRec/src/TBPhaseStreamerTool.h old mode 100755 new mode 100644 similarity index 96% rename from TestBeam/TBRec/TBRec/TBPhaseStreamerTool.h rename to TestBeam/TBRec/src/TBPhaseStreamerTool.h index d916924a909b..728162d3e832 --- a/TestBeam/TBRec/TBRec/TBPhaseStreamerTool.h +++ b/TestBeam/TBRec/src/TBPhaseStreamerTool.h @@ -19,7 +19,7 @@ * \date February 10, 2005 - first implementation */ -#include "TBRec/TBEventStreamerTool.h" +#include "TBEventStreamerTool.h" #include <string> #include <map> diff --git a/TestBeam/TBRec/src/TBPlaneTrackingAlgo.cxx b/TestBeam/TBRec/src/TBPlaneTrackingAlgo.cxx old mode 100755 new mode 100644 index b2a1218bf8cb..11c249d5b36b --- a/TestBeam/TBRec/src/TBPlaneTrackingAlgo.cxx +++ b/TestBeam/TBRec/src/TBPlaneTrackingAlgo.cxx @@ -2,11 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "GaudiKernel/StatusCode.h" - -#include "PathResolver/PathResolver.h" - -#include "TBRec/TBPlaneTrackingAlgo.h" +#include "TBPlaneTrackingAlgo.h" #include "TBEvent/TBHitPlaneCont.h" #include "TBEvent/TBBPCCont.h" #include "TBEvent/TBHitPlane.h" @@ -15,6 +11,7 @@ #include "EventInfo/EventInfo.h" #include "EventInfo/EventID.h" +#include "PathResolver/PathResolver.h" #include <vector> #include <iostream> diff --git a/TestBeam/TBRec/TBRec/TBPlaneTrackingAlgo.h b/TestBeam/TBRec/src/TBPlaneTrackingAlgo.h old mode 100755 new mode 100644 similarity index 97% rename from TestBeam/TBRec/TBRec/TBPlaneTrackingAlgo.h rename to TestBeam/TBRec/src/TBPlaneTrackingAlgo.h index 1574c9380efc..711cb606a6b6 --- a/TestBeam/TBRec/TBRec/TBPlaneTrackingAlgo.h +++ b/TestBeam/TBRec/src/TBPlaneTrackingAlgo.h @@ -2,11 +2,10 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef TBPLANETRACKINGALGO_H -#define TBPLANETRACKINGALGO_H +#ifndef TBREC_TBPLANETRACKINGALGO_H +#define TBREC_TBPLANETRACKINGALGO_H #include "AthenaBaseComps/AthAlgorithm.h" -#include "StoreGate/StoreGateSvc.h" #include "TBEvent/TBHitPlaneCont.h" diff --git a/TestBeam/TBRec/src/TBPreScalerStreamerTool.cxx b/TestBeam/TBRec/src/TBPreScalerStreamerTool.cxx old mode 100755 new mode 100644 index 9a1a5317ab41..d86120a46d87 --- a/TestBeam/TBRec/src/TBPreScalerStreamerTool.cxx +++ b/TestBeam/TBRec/src/TBPreScalerStreamerTool.cxx @@ -2,13 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/Service.h" - -#include "StoreGate/StoreGateSvc.h" - -#include "TBRec/TBEventStreamerTool.h" -#include "TBRec/TBPreScalerStreamerTool.h" +#include "TBEventStreamerTool.h" +#include "TBPreScalerStreamerTool.h" // already included in TBPreScalerStreamerTool.h //#include "CLHEP/Random/RanluxEngine.h" diff --git a/TestBeam/TBRec/TBRec/TBPreScalerStreamerTool.h b/TestBeam/TBRec/src/TBPreScalerStreamerTool.h old mode 100755 new mode 100644 similarity index 96% rename from TestBeam/TBRec/TBRec/TBPreScalerStreamerTool.h rename to TestBeam/TBRec/src/TBPreScalerStreamerTool.h index 249ca9a609f0..56a18444425e --- a/TestBeam/TBRec/TBRec/TBPreScalerStreamerTool.h +++ b/TestBeam/TBRec/src/TBPreScalerStreamerTool.h @@ -5,7 +5,7 @@ #ifndef TBREC_TBPRESCALERSTREAMERTOOL_H #define TBREC_TBPRESCALERSTREAMERTOOL_H -#include "TBRec/TBEventStreamerTool.h" +#include "TBEventStreamerTool.h" // This is needed for migration to CLHEP 1.9 // (Forward declarations of CLHEP classes will give rise to an error...) diff --git a/TestBeam/TBRec/src/TBScintillatorRec.cxx b/TestBeam/TBRec/src/TBScintillatorRec.cxx old mode 100755 new mode 100644 index e2e904f17769..114d5fe1a25f --- a/TestBeam/TBRec/src/TBScintillatorRec.cxx +++ b/TestBeam/TBRec/src/TBScintillatorRec.cxx @@ -3,19 +3,11 @@ */ -#include "StoreGate/StoreGateSvc.h" - -#include "GaudiKernel/Property.h" - -#include "TBRec/TBScintillatorRec.h" +#include "TBScintillatorRec.h" #include "TBEvent/TBScintillatorCont.h" #include "TBEvent/TBScintillatorRawCont.h" -// static const AlgFactory<TBScintillatorRec> s_factory; -// const IAlgFactory& TBScintillatorRecFactory = s_factory; - - TBScintillatorRec::TBScintillatorRec(const std::string& name, ISvcLocator* pSvcLocator) : diff --git a/TestBeam/TBRec/TBRec/TBScintillatorRec.h b/TestBeam/TBRec/src/TBScintillatorRec.h old mode 100755 new mode 100644 similarity index 95% rename from TestBeam/TBRec/TBRec/TBScintillatorRec.h rename to TestBeam/TBRec/src/TBScintillatorRec.h index b0a63af49ebf..50e7ca3bf670 --- a/TestBeam/TBRec/TBRec/TBScintillatorRec.h +++ b/TestBeam/TBRec/src/TBScintillatorRec.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef TBREC_TBSCINTREC -#define TBREC_TBSCINTREC +#ifndef TBREC_TBSCINTREC_H +#define TBREC_TBSCINTREC_H /////////////////////////////////////////////////////////////////////////////// // // // This algorithm controls event flow and reconstruction and monitoring // diff --git a/TestBeam/TBRec/src/TBTailCatcherRec.cxx b/TestBeam/TBRec/src/TBTailCatcherRec.cxx old mode 100755 new mode 100644 index 262566a7185c..cb87906e5bfb --- a/TestBeam/TBRec/src/TBTailCatcherRec.cxx +++ b/TestBeam/TBRec/src/TBTailCatcherRec.cxx @@ -2,18 +2,9 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#define WTC_ADC_MAX 1024 -#include "StoreGate/StoreGateSvc.h" - -#include "GaudiKernel/Property.h" - -#include "TBRec/TBTailCatcherRec.h" - -// static const AlgFactory<TBObjectRecoAlgo> s_factory; -// const IAlgFactory& TBObjectRecoAlgoFactory = s_factory; - - +#include "TBTailCatcherRec.h" +#define WTC_ADC_MAX 1024 TBTailCatcherRec::TBTailCatcherRec(const std::string& name, diff --git a/TestBeam/TBRec/TBRec/TBTailCatcherRec.h b/TestBeam/TBRec/src/TBTailCatcherRec.h old mode 100755 new mode 100644 similarity index 94% rename from TestBeam/TBRec/TBRec/TBTailCatcherRec.h rename to TestBeam/TBRec/src/TBTailCatcherRec.h index ebf776183fe5..37963627f0e2 --- a/TestBeam/TBRec/TBRec/TBTailCatcherRec.h +++ b/TestBeam/TBRec/src/TBTailCatcherRec.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef TBREC_TBTAILCATCHERREC -#define TBREC_TBTAILCATCHERREC +#ifndef TBREC_TBTAILCATCHERREC_H +#define TBREC_TBTAILCATCHERREC_H /////////////////////////////////////////////////////////////////////////////// // // // This algorithm controls event flow and reconstruction and monitoring // diff --git a/TestBeam/TBRec/src/TBTrackInfoFromTag.cxx b/TestBeam/TBRec/src/TBTrackInfoFromTag.cxx index 7ab588b3cd3e..05cc2ea64dff 100644 --- a/TestBeam/TBRec/src/TBTrackInfoFromTag.cxx +++ b/TestBeam/TBRec/src/TBTrackInfoFromTag.cxx @@ -3,11 +3,7 @@ */ -#include "StoreGate/StoreGateSvc.h" - -#include "GaudiKernel/Property.h" - -#include "TBRec/TBTrackInfoFromTag.h" +#include "TBTrackInfoFromTag.h" // template functions for copying the contents of a 1- and 2-dim array into a vector diff --git a/TestBeam/TBRec/TBRec/TBTrackInfoFromTag.h b/TestBeam/TBRec/src/TBTrackInfoFromTag.h similarity index 95% rename from TestBeam/TBRec/TBRec/TBTrackInfoFromTag.h rename to TestBeam/TBRec/src/TBTrackInfoFromTag.h index 733c980ca862..0b93269bc2d0 100644 --- a/TestBeam/TBRec/TBRec/TBTrackInfoFromTag.h +++ b/TestBeam/TBRec/src/TBTrackInfoFromTag.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef TBTrackInfoFromTag_H -#define TBTrackInfoFromTag_H +#ifndef TBREC_TBTRACKINFOFROMTAG_H +#define TBREC_TBTRACKINFOFROMTAG_H /////////////////////////////////////////////////////////////////////////////// // // // MWPC Reconstruction algorithm. Based on code for 2002 TestBeam // @@ -45,8 +45,8 @@ class TChain; class TFile; class TString; -#include "TBRec/TileRec_h1000.h" -#include "TBRec/TB_tree.h" +#include "TileRec_h1000.h" +#include "TB_tree.h" class TBTrackInfoFromTag : public AthAlgorithm diff --git a/TestBeam/TBRec/src/TBTrackToCaloAlg.cxx b/TestBeam/TBRec/src/TBTrackToCaloAlg.cxx old mode 100755 new mode 100644 index 718fafc34220..24600bfffc99 --- a/TestBeam/TBRec/src/TBTrackToCaloAlg.cxx +++ b/TestBeam/TBRec/src/TBTrackToCaloAlg.cxx @@ -7,12 +7,10 @@ // Implementation file for class TBTrackToCaloAlg /////////////////////////////////////////////////////////////////// -#include "TBRec/TBTrackToCaloAlg.h" -#include "TBRec/TBExtrapolTrackToCaloTool.h" +#include "TBTrackToCaloAlg.h" +#include "TBExtrapolTrackToCaloTool.h" // Gaudi includes -#include "StoreGate/StoreGate.h" -#include "StoreGate/StoreGateSvc.h" #include "GaudiKernel/IToolSvc.h" // Tracking includes @@ -37,7 +35,7 @@ //#include "ITrackToCalo/IExtrapolTrackToCaloTool.h" //#include "RecoToolInterfaces/IExtrapolateToCaloTool.h" -#include "TBRec/ImpactInCaloCollection.h" +#include "ImpactInCaloCollection.h" #include "AthenaKernel/Units.h" diff --git a/TestBeam/TBRec/TBRec/TBTrackToCaloAlg.h b/TestBeam/TBRec/src/TBTrackToCaloAlg.h old mode 100755 new mode 100644 similarity index 98% rename from TestBeam/TBRec/TBRec/TBTrackToCaloAlg.h rename to TestBeam/TBRec/src/TBTrackToCaloAlg.h index 708e4d6a59ba..d1091ab64ddc --- a/TestBeam/TBRec/TBRec/TBTrackToCaloAlg.h +++ b/TestBeam/TBRec/src/TBTrackToCaloAlg.h @@ -10,8 +10,8 @@ /////////////////////////////////////////////////////////////////// -#ifndef TESTLARDETDESCR_TESTTRACKTOCALO_H -#define TESTLARDETDESCR_TESTTRACKTOCALO_H +#ifndef TBREC_TBTRACKTOCALOALG_H +#define TBREC_TBTRACKTOCALOALG_H // Base class #include "AthenaBaseComps/AthAlgorithm.h" diff --git a/TestBeam/TBRec/src/TBTree_CaloClusterH6.cxx b/TestBeam/TBRec/src/TBTree_CaloClusterH6.cxx index d85bc684b62e..9b0d22af3072 100644 --- a/TestBeam/TBRec/src/TBTree_CaloClusterH6.cxx +++ b/TestBeam/TBRec/src/TBTree_CaloClusterH6.cxx @@ -7,8 +7,9 @@ // author: A.Minaenko // date: 25/07/2006 -#include "GaudiKernel/ISvcLocator.h" -#include "GaudiKernel/StatusCode.h" +#include "TBTree_CaloClusterH6.h" +#include "TBRec/TBH6RunHeader.h" + #include "GaudiKernel/IToolSvc.h" #include "GaudiKernel/ListItem.h" @@ -17,8 +18,6 @@ #include <TFile.h> #include <TTree.h> -#include "StoreGate/StoreGate.h" - #include "CaloDetDescr/CaloDetDescrManager.h" #include "CaloIdentifier/CaloCell_ID.h" #include "CaloIdentifier/CaloIdManager.h" @@ -41,9 +40,6 @@ #include "TBEvent/TBTrack.h" #include "TBEvent/TBTailCatcher.h" -#include "TBRec/TBH6RunHeader.h" -#include "TBRec/TBTree_CaloClusterH6.h" - #include <fstream> TBTree_CaloClusterH6::TBTree_CaloClusterH6(const std::string& name, diff --git a/TestBeam/TBRec/TBRec/TBTree_CaloClusterH6.h b/TestBeam/TBRec/src/TBTree_CaloClusterH6.h similarity index 100% rename from TestBeam/TBRec/TBRec/TBTree_CaloClusterH6.h rename to TestBeam/TBRec/src/TBTree_CaloClusterH6.h diff --git a/TestBeam/TBRec/src/TBXCryYTableRead.cxx b/TestBeam/TBRec/src/TBXCryYTableRead.cxx index 907cd83f4f00..4b751997f8d5 100644 --- a/TestBeam/TBRec/src/TBXCryYTableRead.cxx +++ b/TestBeam/TBRec/src/TBXCryYTableRead.cxx @@ -4,15 +4,9 @@ // class TBXCryYTableRead -#include "GaudiKernel/ISvcLocator.h" -#include "GaudiKernel/StatusCode.h" -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/IToolSvc.h" -#include "GaudiKernel/ListItem.h" +#include "TBXCryYTableRead.h" #include "PathResolver/PathResolver.h" -#include "StoreGate/StoreGate.h" #include "TBEvent/TBEventInfo.h" -#include "TBRec/TBXCryYTableRead.h" #include <fstream> TBXCryYTableRead::TBXCryYTableRead(const std::string& name, diff --git a/TestBeam/TBRec/TBRec/TBXCryYTableRead.h b/TestBeam/TBRec/src/TBXCryYTableRead.h similarity index 94% rename from TestBeam/TBRec/TBRec/TBXCryYTableRead.h rename to TestBeam/TBRec/src/TBXCryYTableRead.h index 9cb58647db98..b0e75692a5d7 100644 --- a/TestBeam/TBRec/TBRec/TBXCryYTableRead.h +++ b/TestBeam/TBRec/src/TBXCryYTableRead.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef TBXCRYYTABLEREAD -#define TBXCRYYTABLEREAD +#ifndef TBREC_TBXCRYYTABLEREAD_H +#define TBREC_TBXCRYYTABLEREAD_H // // class TBXCryYTableRead // diff --git a/TestBeam/TBRec/src/TBXMLCaloCellWriterTool.cxx b/TestBeam/TBRec/src/TBXMLCaloCellWriterTool.cxx old mode 100755 new mode 100644 index 9231fdb27274..6c584eecfb5f --- a/TestBeam/TBRec/src/TBXMLCaloCellWriterTool.cxx +++ b/TestBeam/TBRec/src/TBXMLCaloCellWriterTool.cxx @@ -3,16 +3,17 @@ */ +#include "TBXMLWriterToolBase.h" +#include "TBXMLCaloCellWriterTool.h" +#include "TBXMLWriter.h" + #include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/AlgTool.h" #include "CLHEP/Units/SystemOfUnits.h" #include "Identifier/Identifier.h" #include "Identifier/IdentifierHash.h" -#include "StoreGate/StoreGateSvc.h" - #include "CaloDetDescr/CaloDetDescrManager.h" #include "CaloDetDescr/CaloDetDescrElement.h" @@ -23,9 +24,6 @@ #include "CaloEvent/CaloCell.h" #include "CaloEvent/CaloCellContainer.h" -#include "TBRec/TBXMLWriterToolBase.h" -#include "TBRec/TBXMLCaloCellWriterTool.h" -#include "TBRec/TBXMLWriter.h" #include "boost/io/ios_state.hpp" #include <iostream> diff --git a/TestBeam/TBRec/TBRec/TBXMLCaloCellWriterTool.h b/TestBeam/TBRec/src/TBXMLCaloCellWriterTool.h old mode 100755 new mode 100644 similarity index 97% rename from TestBeam/TBRec/TBRec/TBXMLCaloCellWriterTool.h rename to TestBeam/TBRec/src/TBXMLCaloCellWriterTool.h index 82d068682b2c..c4afbb7d363a --- a/TestBeam/TBRec/TBRec/TBXMLCaloCellWriterTool.h +++ b/TestBeam/TBRec/src/TBXMLCaloCellWriterTool.h @@ -11,7 +11,7 @@ #include "CaloIdentifier/CaloCell_ID.h" #include "CaloGeoHelpers/CaloSampling.h" -#include "TBRec/TBXMLWriterToolBase.h" +#include "TBXMLWriterToolBase.h" #include <iostream> #include <vector> diff --git a/TestBeam/TBRec/src/TBXMLEventWriterTool.cxx b/TestBeam/TBRec/src/TBXMLEventWriterTool.cxx old mode 100755 new mode 100644 index 5bf10c4353b2..630320f32067 --- a/TestBeam/TBRec/src/TBXMLEventWriterTool.cxx +++ b/TestBeam/TBRec/src/TBXMLEventWriterTool.cxx @@ -3,11 +3,9 @@ */ -#include "GaudiKernel/AlgTool.h" - -#include "TBRec/TBXMLWriterToolBase.h" -#include "TBRec/TBXMLEventWriterTool.h" -#include "TBRec/TBXMLWriter.h" +#include "TBXMLWriterToolBase.h" +#include "TBXMLEventWriterTool.h" +#include "TBXMLWriter.h" #include <string> diff --git a/TestBeam/TBRec/TBRec/TBXMLEventWriterTool.h b/TestBeam/TBRec/src/TBXMLEventWriterTool.h old mode 100755 new mode 100644 similarity index 96% rename from TestBeam/TBRec/TBRec/TBXMLEventWriterTool.h rename to TestBeam/TBRec/src/TBXMLEventWriterTool.h index efb411e36497..2d54842ece1c --- a/TestBeam/TBRec/TBRec/TBXMLEventWriterTool.h +++ b/TestBeam/TBRec/src/TBXMLEventWriterTool.h @@ -8,7 +8,7 @@ /// \brief writes out event header /////////////////////////////////////////////////////////////////////////////// -#include "TBRec/TBXMLWriterToolBase.h" +#include "TBXMLWriterToolBase.h" #include <iostream> #include <string> diff --git a/TestBeam/TBRec/src/TBXMLWriter.cxx b/TestBeam/TBRec/src/TBXMLWriter.cxx old mode 100755 new mode 100644 index 99e03e8be4f4..cb43e1baf02f --- a/TestBeam/TBRec/src/TBXMLWriter.cxx +++ b/TestBeam/TBRec/src/TBXMLWriter.cxx @@ -3,21 +3,15 @@ */ -// Gaudi -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/Property.h" -#include "GaudiKernel/ListItem.h" +#include "TBXMLWriterToolBase.h" +#include "TBXMLWriter.h" -// StoreGate services -#include "StoreGate/StoreGateSvc.h" // event #include "EventInfo/EventInfo.h" #include "EventInfo/EventID.h" -// TBRec includes -#include "TBRec/TBXMLWriterToolBase.h" -#include "TBRec/TBXMLWriter.h" +#include "GaudiKernel/ListItem.h" #include <string> #include <vector> diff --git a/TestBeam/TBRec/TBRec/TBXMLWriter.h b/TestBeam/TBRec/src/TBXMLWriter.h old mode 100755 new mode 100644 similarity index 100% rename from TestBeam/TBRec/TBRec/TBXMLWriter.h rename to TestBeam/TBRec/src/TBXMLWriter.h diff --git a/TestBeam/TBRec/src/TBXMLWriterToolBase.cxx b/TestBeam/TBRec/src/TBXMLWriterToolBase.cxx old mode 100755 new mode 100644 index 78fcb75cbd41..89d679c689ea --- a/TestBeam/TBRec/src/TBXMLWriterToolBase.cxx +++ b/TestBeam/TBRec/src/TBXMLWriterToolBase.cxx @@ -3,7 +3,7 @@ */ -#include "TBRec/TBXMLWriterToolBase.h" +#include "TBXMLWriterToolBase.h" #include <iostream> #include <string> diff --git a/TestBeam/TBRec/TBRec/TBXMLWriterToolBase.h b/TestBeam/TBRec/src/TBXMLWriterToolBase.h old mode 100755 new mode 100644 similarity index 97% rename from TestBeam/TBRec/TBRec/TBXMLWriterToolBase.h rename to TestBeam/TBRec/src/TBXMLWriterToolBase.h index 88e2be4c8972..764fbc18ec09 --- a/TestBeam/TBRec/TBRec/TBXMLWriterToolBase.h +++ b/TestBeam/TBRec/src/TBXMLWriterToolBase.h @@ -8,13 +8,8 @@ /// \brief base class for XML writer tools for 2004 event display /////////////////////////////////////////////////////////////////////////////// -#include "GaudiKernel/MsgStream.h" #include "AthenaBaseComps/AthAlgTool.h" - -#include "StoreGate/StoreGateSvc.h" - #include <iostream> - #include <vector> #include <string> diff --git a/TestBeam/TBRec/src/TB_tree.cxx b/TestBeam/TBRec/src/TB_tree.cxx index f23ce3e28d66..5c2dcc1a8fe0 100644 --- a/TestBeam/TBRec/src/TB_tree.cxx +++ b/TestBeam/TBRec/src/TB_tree.cxx @@ -2,8 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#define TB_tree_cxx -#include "TBRec/TB_tree.h" +#include "TB_tree.h" TB_tree::TB_tree(TTree *tree) : fChain(0), diff --git a/TestBeam/TBRec/TBRec/TB_tree.h b/TestBeam/TBRec/src/TB_tree.h similarity index 99% rename from TestBeam/TBRec/TBRec/TB_tree.h rename to TestBeam/TBRec/src/TB_tree.h index 67b1390cac68..c0c9c6a4b776 100644 --- a/TestBeam/TBRec/TBRec/TB_tree.h +++ b/TestBeam/TBRec/src/TB_tree.h @@ -9,8 +9,8 @@ // found on file: cbnt_RecExTB_Combined_1207_2102095.0.root ////////////////////////////////////////////////////////// -#ifndef TB_tree_h -#define TB_tree_h +#ifndef TBREC_TB_TREE_H +#define TBREC_TB_TREE_H #include "AthenaKernel/CLASS_DEF.h" diff --git a/TestBeam/TBRec/src/TileRec_h1000.cxx b/TestBeam/TBRec/src/TileRec_h1000.cxx index 09db502f34c6..c8ea33320a58 100644 --- a/TestBeam/TBRec/src/TileRec_h1000.cxx +++ b/TestBeam/TBRec/src/TileRec_h1000.cxx @@ -2,8 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#define TileRec_h1000_cxx -#include "TBRec/TileRec_h1000.h" +#include "TileRec_h1000.h" TileRec_h1000::TileRec_h1000(TTree *tree) : fChain(0), diff --git a/TestBeam/TBRec/TBRec/TileRec_h1000.h b/TestBeam/TBRec/src/TileRec_h1000.h similarity index 99% rename from TestBeam/TBRec/TBRec/TileRec_h1000.h rename to TestBeam/TBRec/src/TileRec_h1000.h index 3ab6f91eeb09..4c1e1a0e6647 100644 --- a/TestBeam/TBRec/TBRec/TileRec_h1000.h +++ b/TestBeam/TBRec/src/TileRec_h1000.h @@ -9,8 +9,8 @@ // found on file: cbnt_RecExTB_Combined_1207_2102095.0.root ////////////////////////////////////////////////////////// -#ifndef TileRec_h1000_h -#define TileRec_h1000_h +#ifndef TBREC_TILEREC_H1000_H +#define TBREC_TILEREC_H1000_H #include "AthenaKernel/CLASS_DEF.h" diff --git a/TestBeam/TBRec/src/components/TBRec_entries.cxx b/TestBeam/TBRec/src/components/TBRec_entries.cxx index ad9244c67477..541cc7dd3646 100644 --- a/TestBeam/TBRec/src/components/TBRec_entries.cxx +++ b/TestBeam/TBRec/src/components/TBRec_entries.cxx @@ -1,52 +1,52 @@ -#include "TBRec/TBAlgoSequencer.h" +#include "../TBAlgoSequencer.h" -#include "TBRec/TBXMLWriter.h" -#include "TBRec/TBXMLEventWriterTool.h" -#include "TBRec/TBXMLCaloCellWriterTool.h" -#include "TBRec/TBBPCRec.h" -#include "TBRec/TBMWPCRec.h" -#include "TBRec/TBScintillatorRec.h" -#include "TBRec/TBTailCatcherRec.h" -#include "TBRec/TBPlaneTrackingAlgo.h" -#include "TBRec/TBPhaseRec.h" -#include "TBRec/TBLArRawChannelBuilder.h" -#include "TBRec/TBECLArRawChannelBuilder.h" -#include "TBRec/TBEventStreamer.h" -#include "TBRec/TBPatternUnitStreamerTool.h" -#include "TBRec/TBPatternUnitStreamerToolH8.h" -#include "TBRec/TBEventInfoStreamerTool.h" -#include "TBRec/TBPreScalerStreamerTool.h" -#include "TBRec/CBNTAA_BeamInstrumentation.h" -#include "TBRec/CBNTAA_TBADCRaw.h" -#include "TBRec/CBNTAA_TBTDCRaw.h" -#include "TBRec/CBNTAA_TBInfo.h" -#include "TBRec/CBNTAA_TBTrack.h" -#include "TBRec/CBNTAA_TBScint.h" -#include "TBRec/CBNT_Timing.h" -#include "TBRec/CBNT_CaloH6.h" -#include "TBRec/CBNT_UpstreamMat.h" -#include "TBRec/TBPartIDCherenkovMuTag.h" -#include "TBRec/TBBeamQuality.h" -#include "TBRec/TBBeamQualityTool.h" -#include "TBRec/TBBeamQualityDoubleHitsTool.h" -#include "TBRec/TBBeamQualityMuonToolH6.h" -#include "TBRec/TBBeamQualityEMFractionTool.h" -#include "TBRec/TBBeamQualityTrackingTool.h" -#include "TBRec/TBPhaseStreamerTool.h" -#include "TBRec/TBEMECCellEtaCorrection.h" -#include "TBRec/TBClusterMaker.h" -#include "TBRec/TBTree_CaloClusterH6.h" -#include "TBRec/TBNoiseWrite.h" -#include "TBRec/TBCellNoiseCorrection.h" -#include "TBRec/TBCellContainerFillerTool.h" -#include "TBRec/CBNTAA_TBTPValidation.h" -#include "TBRec/TBTrackInfoFromTag.h" -#include "TBRec/TBBeamQualityMC.h" -#include "TBRec/TBXCryYTableRead.h" -#include "TBRec/TBDMContainerSplitter.h" -#include "TBRec/TBEMECXTalkToyModel.h" -#include "TBRec/TBExtrapolTrackToCaloTool.h" -#include "TBRec/TBTrackToCaloAlg.h" +#include "../TBXMLWriter.h" +#include "../TBXMLEventWriterTool.h" +#include "../TBXMLCaloCellWriterTool.h" +#include "../TBBPCRec.h" +#include "../TBMWPCRec.h" +#include "../TBScintillatorRec.h" +#include "../TBTailCatcherRec.h" +#include "../TBPlaneTrackingAlgo.h" +#include "../TBPhaseRec.h" +#include "../TBLArRawChannelBuilder.h" +#include "../TBECLArRawChannelBuilder.h" +#include "../TBEventStreamer.h" +#include "../TBPatternUnitStreamerTool.h" +#include "../TBPatternUnitStreamerToolH8.h" +#include "../TBEventInfoStreamerTool.h" +#include "../TBPreScalerStreamerTool.h" +#include "../CBNTAA_BeamInstrumentation.h" +#include "../CBNTAA_TBADCRaw.h" +#include "../CBNTAA_TBTDCRaw.h" +#include "../CBNTAA_TBInfo.h" +#include "../CBNTAA_TBTrack.h" +#include "../CBNTAA_TBScint.h" +#include "../CBNT_Timing.h" +#include "../CBNT_CaloH6.h" +#include "../CBNT_UpstreamMat.h" +#include "../TBPartIDCherenkovMuTag.h" +#include "../TBBeamQuality.h" +#include "../TBBeamQualityTool.h" +#include "../TBBeamQualityDoubleHitsTool.h" +#include "../TBBeamQualityMuonToolH6.h" +#include "../TBBeamQualityEMFractionTool.h" +#include "../TBBeamQualityTrackingTool.h" +#include "../TBPhaseStreamerTool.h" +#include "../TBEMECCellEtaCorrection.h" +#include "../TBClusterMaker.h" +#include "../TBTree_CaloClusterH6.h" +#include "../TBNoiseWrite.h" +#include "../TBCellNoiseCorrection.h" +#include "../TBCellContainerFillerTool.h" +#include "../CBNTAA_TBTPValidation.h" +#include "../TBTrackInfoFromTag.h" +#include "../TBBeamQualityMC.h" +#include "../TBXCryYTableRead.h" +#include "../TBDMContainerSplitter.h" +#include "../TBEMECXTalkToyModel.h" +#include "../TBExtrapolTrackToCaloTool.h" +#include "../TBTrackToCaloAlg.h" DECLARE_COMPONENT( TBXMLWriter ) DECLARE_COMPONENT( TBAlgoSequencer ) -- GitLab From 56b75d666b9c2dbfd3010500195680bd36d83db6 Mon Sep 17 00:00:00 2001 From: Peter Onyisi <ponyisi@utexas.edu> Date: Tue, 3 Jul 2018 14:46:21 +0200 Subject: [PATCH 404/562] Move DQDefects tests to CTest Former-commit-id: 88d8b2b039aa058c14bf1f54dd98279b9fe368e2 --- DataQuality/DQDefects/CMakeLists.txt | 4 +++ .../DQDefects/python/tests/__init__.py | 3 +- DataQuality/DQDefects/share/DQDefects.ref | 36 +++++++++++++++++++ DataQuality/DQDefects/test/DQDefects.xml | 14 -------- DataQuality/DQDefects/test/DQDefects_test.sh | 3 ++ 5 files changed, 44 insertions(+), 16 deletions(-) create mode 100644 DataQuality/DQDefects/share/DQDefects.ref delete mode 100755 DataQuality/DQDefects/test/DQDefects.xml create mode 100755 DataQuality/DQDefects/test/DQDefects_test.sh diff --git a/DataQuality/DQDefects/CMakeLists.txt b/DataQuality/DQDefects/CMakeLists.txt index c0b3e8273535..45d4b66efb12 100644 --- a/DataQuality/DQDefects/CMakeLists.txt +++ b/DataQuality/DQDefects/CMakeLists.txt @@ -17,3 +17,7 @@ find_package( pytools ) atlas_install_python_modules( python/*.py python/tests python/data ) atlas_install_scripts( share/*.py share/*.sh ) +# Add tests +atlas_add_test( DQDefects SCRIPT test/DQDefects_test.sh + EXTRA_PATTERNS "^Ran .* tests in" + PROPERTIES TIMEOUT 300 ) diff --git a/DataQuality/DQDefects/python/tests/__init__.py b/DataQuality/DQDefects/python/tests/__init__.py index 6df8968d2d19..e1b98518a190 100644 --- a/DataQuality/DQDefects/python/tests/__init__.py +++ b/DataQuality/DQDefects/python/tests/__init__.py @@ -1,6 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - +# -*- coding: utf-8 -*- from os import unlink, environ from os.path import exists from nose import with_setup diff --git a/DataQuality/DQDefects/share/DQDefects.ref b/DataQuality/DQDefects/share/DQDefects.ref new file mode 100644 index 000000000000..0a6d4f2f829b --- /dev/null +++ b/DataQuality/DQDefects/share/DQDefects.ref @@ -0,0 +1,36 @@ +DQDefects.tests.test_database_creation ... ok +DQDefects.tests.test_database_creation_unicode ... ok +DQDefects.tests.test_database_retrieval ... ok +DQDefects.tests.test_defect_creation ... ok +Testing virtual defects involving inversion ... ok +DQDefects.tests.test_defect_insertion_retrieval ... ok +DQDefects.tests.test_defect_insertion_retrieval_unicode ... ok +DQDefects.tests.test_defect_empty_retrieval ... ok +DQDefects.tests.test_virtual_defect_creation ... ok +DQDefects.tests.test_virtual_defect_creation_unicode ... ok +DQDefects.tests.test_nonpresent ... ok +Testing many virtual channels with sparsely placed IoVs ... ok +Testing virtual defect basics ... ok +DQDefects.tests.test_virtual_defects_deep ... ok +DQDefects.tests.test_virtual_defects_stress ... ok +DQDefects.tests.test_virtual_defect_hiding ... ok +DQDefects.tests.test_update_virtual_defect ... ok +DQDefects.tests.test_tagging_unicode ... ok +DQDefects.tests.test_rename_defects ... ok +DQDefects.tests.test_ignore_defects ... ok +DQDefects.tests.test_query_with_primary_dependencies ... ok +DQDefects.tests.test_independent_tags ... ok +Checking with_primary_dependencies + ignore ... ok +Checking that virtual flags don't depend on non-existent flags ... ok +DQDefects.tests.test_iov_tag_defects ... ok +DQDefects.tests.test_intersect ... ok +DQDefects.tests.test_normalize_defect_names ... ok +DQDefects.tests.test_reject_duplicate_names ... ok +Check that the intolerable defect listing function works ... ok +Checking that listing a tag works even if the tag is empty ... ok +Test that defects are inserted correctly into non-contiguous ranges ... ok + +---------------------------------------------------------------------- +Ran 31 tests in 26.579s + +OK diff --git a/DataQuality/DQDefects/test/DQDefects.xml b/DataQuality/DQDefects/test/DQDefects.xml deleted file mode 100755 index 1ad19ab5dd88..000000000000 --- a/DataQuality/DQDefects/test/DQDefects.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0"?> -<atn> - <TEST name="DQDefects" type="script"> - <options_atn>nosetests -v DQDefects</options_atn> - <timelimit>30</timelimit> - <author>Peter Waller</author> - <mailto>peter.waller@cern.ch</mailto> - <expectations> - <errorMessage>FAILED </errorMessage> - <successMessage>OK</successMessage> - <returnValue>0</returnValue> - </expectations> - </TEST> -</atn> diff --git a/DataQuality/DQDefects/test/DQDefects_test.sh b/DataQuality/DQDefects/test/DQDefects_test.sh new file mode 100755 index 000000000000..c536ff179b0b --- /dev/null +++ b/DataQuality/DQDefects/test/DQDefects_test.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +nosetests -v DQDefects \ No newline at end of file -- GitLab From d4ecefe4631cc1dadb8b3b3c205e285717d0da32 Mon Sep 17 00:00:00 2001 From: Peter Onyisi <ponyisi@utexas.edu> Date: Sun, 8 Jul 2018 10:14:31 +0200 Subject: [PATCH 405/562] Update copyright Former-commit-id: 695890b7d1f2f6d1a4c12bae94e2a6fc260a0731 --- DataQuality/DQDefects/python/tests/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DataQuality/DQDefects/python/tests/__init__.py b/DataQuality/DQDefects/python/tests/__init__.py index e1b98518a190..2219017fa4f0 100644 --- a/DataQuality/DQDefects/python/tests/__init__.py +++ b/DataQuality/DQDefects/python/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # -*- coding: utf-8 -*- from os import unlink, environ from os.path import exists -- GitLab From e686f04653152cc191676cc7630ae7d66de1ad08 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Sun, 8 Jul 2018 10:10:31 +0200 Subject: [PATCH 406/562] EventContainers: Fix clang warning. clang warning: polymorphic class with a non-virtual destructor. Former-commit-id: 614ff2ee9381329ed023bd6af4d1c31aa75b0f86 --- Event/EventContainers/test/IDC_Realistic_Test.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Event/EventContainers/test/IDC_Realistic_Test.cxx b/Event/EventContainers/test/IDC_Realistic_Test.cxx index e4ee1f86e664..f02173df531c 100644 --- a/Event/EventContainers/test/IDC_Realistic_Test.cxx +++ b/Event/EventContainers/test/IDC_Realistic_Test.cxx @@ -208,7 +208,7 @@ public: PseudoView(int s, int r, EventContainers::IdentifiableCache<MyCollection>* inIDC, int i) : IDC(inIDC), RoIStart(s), RoIEnd(r), threads(i), c() {} - + virtual ~PseudoView() {} }; class PseudoViewNoLock : public PseudoView { -- GitLab From d64362687af8dd7aee9aa76c0667910c1c777c17 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Sun, 8 Jul 2018 10:07:27 +0200 Subject: [PATCH 407/562] CaloDetDescr: Add an overload of CaloDetDescrManager::add taking a unique_ptr. Code modernization. Former-commit-id: fa82da1dcccc309b3e7414e31d7483c2b1d1923c --- Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrManager.h | 6 ++++++ Calorimeter/CaloDetDescr/src/CaloDetDescrManager.cxx | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrManager.h b/Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrManager.h index c20404c50f4b..cb360f2f43cc 100755 --- a/Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrManager.h +++ b/Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrManager.h @@ -386,8 +386,14 @@ class CaloDetDescrManager_Base */ void add(CaloDetDescrElement* element); /** @brief add new LAr descriptor to the descriptors vector + * Takes ownership of the object. + * For new code, prefer the next version that takes + * a unique_ptr. */ void add(CaloDetDescriptor* descr); + /** @brief add new LAr descriptor to the descriptors vector + */ + void add(std::unique_ptr<CaloDetDescriptor> descr); /** @brief add tile descriptor to the tile descriptors vector */ void add_tile(CaloDetDescriptor* descr); diff --git a/Calorimeter/CaloDetDescr/src/CaloDetDescrManager.cxx b/Calorimeter/CaloDetDescr/src/CaloDetDescrManager.cxx index 8a019744dd33..f032dc83340c 100755 --- a/Calorimeter/CaloDetDescr/src/CaloDetDescrManager.cxx +++ b/Calorimeter/CaloDetDescr/src/CaloDetDescrManager.cxx @@ -759,6 +759,12 @@ void CaloDetDescrManager_Base::add(CaloDetDescriptor* descr) m_descr_vec[descr->calo_hash()] = descr; } +void CaloDetDescrManager_Base::add(std::unique_ptr<CaloDetDescriptor> descr) +{ + IdentifierHash idhash = descr->calo_hash(); + m_descr_vec[idhash] = descr.release(); +} + void CaloDetDescrManager_Base::add_tile(CaloDetDescriptor* descr) { m_tile_descr_vec.push_back(descr); -- GitLab From cfb01431e191171b7407f46b7f9391f36508d5f8 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Sun, 8 Jul 2018 16:40:32 +0200 Subject: [PATCH 408/562] TrigEgammaHypo: Fix compilation warning. Compilation warning: indentation. Former-commit-id: 6c0b8dc568df05c5ada79c63e308aef879cd687f --- Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypo.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypo.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypo.cxx index d93f1a8166ab..c8818b4f5738 100755 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypo.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypo.cxx @@ -318,7 +318,8 @@ HLT::ErrorCode TrigL2PhotonHypo::hltExecute(const HLT::TriggerElement* outputTE, msg() << MSG::DEBUG << "TrigPhoton: ET_em=" << EmET << " cut in etaBin " << etaBin << " is ET_em >= " << m_eTthr[etaBin] << endmsg; } - if ( EmET < m_eTthr[etaBin]) return HLT::OK; m_PassedCuts++; + if ( EmET < m_eTthr[etaBin]) return HLT::OK; + m_PassedCuts++; // ET_had // find which ET_had to apply : this depends on the ET_em and the eta bin float hadET_cut=-1; -- GitLab From 424b83e2c61a192ee5cb23ca5b5dad634ad41c1b Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Sun, 8 Jul 2018 16:35:44 +0200 Subject: [PATCH 409/562] TBDetDescr: DataModel -> AthContainers. Remove references to obsolete package DataModel. Also remove references to CLIDSvc and SGTools. Former-commit-id: df6e02e06d5357e99b5ad5b1956259392692f931 --- TestBeam/TBDetDescr/CMakeLists.txt | 9 ++++----- TestBeam/TBDetDescr/TBDetDescr/TBDetDescrManager.h | 2 +- TestBeam/TBDetDescr/TBDetDescr/TBElementContainer.h | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/TestBeam/TBDetDescr/CMakeLists.txt b/TestBeam/TBDetDescr/CMakeLists.txt index 4c0e60e44a94..54cdcb7961a5 100644 --- a/TestBeam/TBDetDescr/CMakeLists.txt +++ b/TestBeam/TBDetDescr/CMakeLists.txt @@ -7,9 +7,8 @@ atlas_subdir( TBDetDescr ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - Control/CLIDSvc - Control/DataModel - Control/SGTools + Control/AthenaKernel + Control/AthContainers DetectorDescription/GeoPrimitives PRIVATE GaudiKernel ) @@ -24,12 +23,12 @@ atlas_add_library( TBDetDescr PUBLIC_HEADERS TBDetDescr INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${EIGEN_LIBRARIES} DataModel SGTools GeoPrimitives + LINK_LIBRARIES ${EIGEN_LIBRARIES} AthContainers GeoPrimitives PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel ) atlas_add_dictionary( TBDetDescrDict TBDetDescr/TBDetDescrDict.h TBDetDescr/selection.xml INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} DataModel SGTools GeoPrimitives GaudiKernel TBDetDescr ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} AthContainers GeoPrimitives GaudiKernel TBDetDescr ) diff --git a/TestBeam/TBDetDescr/TBDetDescr/TBDetDescrManager.h b/TestBeam/TBDetDescr/TBDetDescr/TBDetDescrManager.h index 16bb98f4cba3..22b3a1b63199 100755 --- a/TestBeam/TBDetDescr/TBDetDescr/TBDetDescrManager.h +++ b/TestBeam/TBDetDescr/TBDetDescr/TBDetDescrManager.h @@ -9,7 +9,7 @@ #ifndef TBDetDescrManager_H #define TBDetDescrManager_H -#include "CLIDSvc/CLASS_DEF.h" +#include "AthenaKernel/CLASS_DEF.h" #include "TBDetDescr/TBElement.h" class TBElementContainer; diff --git a/TestBeam/TBDetDescr/TBDetDescr/TBElementContainer.h b/TestBeam/TBDetDescr/TBDetDescr/TBElementContainer.h index 2411ca8888f3..848dc3bcaeb3 100755 --- a/TestBeam/TBDetDescr/TBDetDescr/TBElementContainer.h +++ b/TestBeam/TBDetDescr/TBDetDescr/TBElementContainer.h @@ -9,8 +9,8 @@ #ifndef TBElementContainer_H #define TBElementContainer_H -#include "DataModel/DataVector.h" -#include "CLIDSvc/CLASS_DEF.h" +#include "AthContainers/DataVector.h" +#include "AthenaKernel/CLASS_DEF.h" #include "TBDetDescr/TBElement.h" -- GitLab From c8a12fdae5c927e2d3d04b7ed2b9c9a5b3f092e3 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Sun, 8 Jul 2018 16:37:36 +0200 Subject: [PATCH 410/562] L1TopoRDO: DataModel -> AthContainers. Remove references to obsolete package DataModel. Also remove references to CLIDSvc and SGTools. Former-commit-id: 0c228d0d40f337909b374130721082ad38af7fce --- Trigger/TrigT1/L1Topo/L1TopoRDO/CMakeLists.txt | 9 ++++----- Trigger/TrigT1/L1Topo/L1TopoRDO/L1TopoRDO/L1TopoRDO.h | 2 +- .../L1Topo/L1TopoRDO/L1TopoRDO/L1TopoRDOCollection.h | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Trigger/TrigT1/L1Topo/L1TopoRDO/CMakeLists.txt b/Trigger/TrigT1/L1Topo/L1TopoRDO/CMakeLists.txt index 9c1a31c7cfda..0f37746ce4f3 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoRDO/CMakeLists.txt +++ b/Trigger/TrigT1/L1Topo/L1TopoRDO/CMakeLists.txt @@ -8,9 +8,8 @@ atlas_subdir( L1TopoRDO ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC AtlasTest/TestTools - Control/CLIDSvc - Control/DataModel - Control/SGTools ) + Control/AthenaKernel + Control/AthContainers) # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) @@ -20,12 +19,12 @@ atlas_add_library( L1TopoRDO src/*.cxx PUBLIC_HEADERS L1TopoRDO PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} - LINK_LIBRARIES TestTools DataModel SGTools + LINK_LIBRARIES TestTools AthContainers AthenaKernel PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ) atlas_add_test( L1TopoRDO_test SOURCES test/L1TopoRDO_test.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} TestTools DataModel SGTools L1TopoRDO ) + LINK_LIBRARIES ${Boost_LIBRARIES} TestTools AthContainers AthenaKernel L1TopoRDO ) diff --git a/Trigger/TrigT1/L1Topo/L1TopoRDO/L1TopoRDO/L1TopoRDO.h b/Trigger/TrigT1/L1Topo/L1TopoRDO/L1TopoRDO/L1TopoRDO.h index a41a3c03039a..51d9b48878cc 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoRDO/L1TopoRDO/L1TopoRDO.h +++ b/Trigger/TrigT1/L1Topo/L1TopoRDO/L1TopoRDO/L1TopoRDO.h @@ -79,7 +79,7 @@ class L1TopoRDO { uint32_t m_sourceID; }; -#include "CLIDSvc/CLASS_DEF.h" +#include "AthenaKernel/CLASS_DEF.h" CLASS_DEF(L1TopoRDO, 138978439, 0) #endif // L1TOPORDO_L1TOPORDO_H diff --git a/Trigger/TrigT1/L1Topo/L1TopoRDO/L1TopoRDO/L1TopoRDOCollection.h b/Trigger/TrigT1/L1Topo/L1TopoRDO/L1TopoRDO/L1TopoRDOCollection.h index 688aa5e0d546..086e73825c06 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoRDO/L1TopoRDO/L1TopoRDOCollection.h +++ b/Trigger/TrigT1/L1Topo/L1TopoRDO/L1TopoRDO/L1TopoRDOCollection.h @@ -6,8 +6,8 @@ #define L1TOPORDO_L1TOPORDOCOLLECTION_H #include "L1TopoRDO/L1TopoRDO.h" -#include "DataModel/DataVector.h" -#include "SGTools/BaseInfo.h" +#include "AthContainers/DataVector.h" +#include "AthenaKernel/BaseInfo.h" //! Container of L1TopoRDOs (standard Athena boilerplate) class L1TopoRDOCollection : public DataVector<L1TopoRDO> { -- GitLab From 1ed8bb7c985815dd22a6e19301229d3a7a68b427 Mon Sep 17 00:00:00 2001 From: Peter Onyisi <ponyisi@utexas.edu> Date: Sun, 8 Jul 2018 22:52:43 +0200 Subject: [PATCH 411/562] Pull R21.0 changes into master Former-commit-id: 848fdd4a3917099d736cd77fd65671035061e933 --- DataQuality/DQDefects/CMakeLists.txt | 4 ++ DataQuality/DQDefects/python/db.py | 5 +- DataQuality/DQDefects/python/tags.py | 7 +++ .../DQDefects/python/tests/__init__.py | 60 ++++++++++++++++++- DataQuality/DQDefects/python/virtual_mixin.py | 7 +++ .../DQDefects/share/dq_defect_list_iovs.py | 6 +- .../DQDefects/share/dq_defect_summary.py | 4 +- 7 files changed, 84 insertions(+), 9 deletions(-) diff --git a/DataQuality/DQDefects/CMakeLists.txt b/DataQuality/DQDefects/CMakeLists.txt index 45d4b66efb12..6b97aa9c67bd 100644 --- a/DataQuality/DQDefects/CMakeLists.txt +++ b/DataQuality/DQDefects/CMakeLists.txt @@ -5,6 +5,10 @@ # Declare the package name: atlas_subdir( DQDefects ) +# Declare the package's dependencies: +atlas_depends_on_subdirs( PRIVATE + DataQuality/DQUtils ) + # External dependencies: find_package( Oracle ) find_package( pytools ) diff --git a/DataQuality/DQDefects/python/db.py b/DataQuality/DQDefects/python/db.py index 586e49c3950c..6c18f7a1f3a5 100644 --- a/DataQuality/DQDefects/python/db.py +++ b/DataQuality/DQDefects/python/db.py @@ -91,7 +91,8 @@ class DefectsDB(DefectsDBVirtualDefectsMixin, if len(tag) != 2: raise TypeError('tag argument must be a 2-element sequence') self._tag = tag - + self._tag = tagtype(self._tag[0].encode('ascii'), self._tag[1].encode('ascii')) + # COOL has no way of emptying a storage buffer. Creating a new storage # buffer flushes the old one. Therefore, if an exception happens # halfway through setting up a storage buffer, subsequent operations @@ -149,7 +150,7 @@ class DefectsDB(DefectsDBVirtualDefectsMixin, if already_exists: raise DefectExistsError('Defect %s already exists' % oldname) - self.defects_folder.createChannel(did, name, + self.defects_folder.createChannel(did, name.encode('ascii'), description.encode('utf-8')) self._new_defect(did, name) diff --git a/DataQuality/DQDefects/python/tags.py b/DataQuality/DQDefects/python/tags.py index 13b16c04f2a1..3e136fae0b3b 100644 --- a/DataQuality/DQDefects/python/tags.py +++ b/DataQuality/DQDefects/python/tags.py @@ -47,6 +47,8 @@ class DefectsDBTagsMixin(object): Give the current HEAD of `folder` a new tag and lock it. """ LOCKED = cool.HvsTagLock.LOCKED + name = name.encode('ascii') + description = description.encode('utf-8') folder.cloneTagAsUserTag('HEAD', name, description) folder.setTagLockStatus(name, LOCKED) @@ -59,6 +61,8 @@ class DefectsDBTagsMixin(object): and has description "(v%i) blah" """ + defects_tag = defects_tag.encode('ascii') + logics_tag = logics_tag.encode('ascii') logic_revision = int(logics_tag.split("-")[-1]) defect_part = "-".join(defects_tag.split("-")[1:]) hierarchical_tag = "DetStatus-v%02i-%s" % (logic_revision, defect_part) @@ -152,6 +156,7 @@ class DefectsDBTagsMixin(object): Parameters: `description` : What changed in this tag? (optional, default "") """ + description = description.encode('utf-8') assert self.logics_tag == "HEAD", NONHEAD_MODIFICATION_MSG new_tag_name = self.next_logics_tag @@ -169,6 +174,8 @@ class DefectsDBTagsMixin(object): `name` : Name of the new tag `description` : Description of the contents of this tag """ + name = name.encode('ascii') + description = description.encode('utf-8') if name.startswith("DetStatus"): raise RuntimeError("Only specify the last part of the defect tag") diff --git a/DataQuality/DQDefects/python/tests/__init__.py b/DataQuality/DQDefects/python/tests/__init__.py index 2219017fa4f0..937495d1b3ce 100644 --- a/DataQuality/DQDefects/python/tests/__init__.py +++ b/DataQuality/DQDefects/python/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration # -*- coding: utf-8 -*- from os import unlink, environ from os.path import exists @@ -48,6 +48,11 @@ def test_database_creation(): assert exists("test_defects.db") log.info("Created database %s", TEST_DATABASE) +@with_setup(create_database, teardown_database) +def test_database_creation_unicode(): + assert exists("test_defects.db") + log.info("Created database %s", unicode(TEST_DATABASE)) + @with_setup(create_database, teardown_database) def test_database_retrieval(): ddb = DefectsDB(TEST_DATABASE) @@ -212,6 +217,28 @@ def test_virtual_defect_creation(): assert len(ddb.virtual_defect_ids) == 1 assert "DQD_TEST_VIRTUAL_DEFECT" in ddb.virtual_defect_names +@with_setup(create_database, teardown_database) +def test_virtual_defect_creation_unicode(): + + ddb = DefectsDB(TEST_DATABASE, read_only=False) + + # Create two defects + create_defect_type(ddb, 0) + create_defect_type(ddb, 1) + + # Make a virtual defect whose result is the combination of the above + ddb.new_virtual_defect(u"DQD_TEST_VIRTUAL_DEFECT", + u"Comment", u"DQD_TEST_DEFECT_0 DQD_TEST_DEFECT_1") + + # First test ensures internals are correct + assert len(ddb.virtual_defect_ids) == 1 + assert "DQD_TEST_VIRTUAL_DEFECT" in ddb.virtual_defect_names + + # Second test to ensure database is in correct state + ddb = DefectsDB(TEST_DATABASE) + assert len(ddb.virtual_defect_ids) == 1 + assert "DQD_TEST_VIRTUAL_DEFECT" in ddb.virtual_defect_names + @with_setup(create_database, teardown_database) def test_nonpresent(): ddb = DefectsDB(TEST_DATABASE, read_only=False) @@ -423,7 +450,36 @@ def test_update_virtual_defect(): db3 = Databases.get_instance(TEST_DATABASE, read_only=True) pfs = db3.getFolderSet('/GLOBAL/DETSTATUS') assert pfs.tagDescription(new_htag) != '', 'Hierarchical tag description not created' + +@with_setup(create_database, teardown_database) +def test_tagging_unicode(): + + ddb = DefectsDB(TEST_DATABASE, read_only=False) + + # Create two defects + create_defect_type(ddb, 0) + create_defect_type(ddb, 1) + ddb.insert(u"DQD_TEST_DEFECT_0", 0, 100, u"", u"") + ddb.insert(u"DQD_TEST_DEFECT_1", 100, 200, u"", u"") + + defects_tag = ddb.new_defects_tag("dqd-test", u"New iov tag") + + # Make a virtual defect whose result is the combination of the above + ddb.new_virtual_defect(u"DQD_TEST_VIRTUAL_DEFECT", u"", + u"DQD_TEST_DEFECT_0 DQD_TEST_DEFECT_1") + + original_tag = ddb.new_logics_tag() + original_htag = ddb.new_hierarchical_tag(defects_tag, original_tag) + + what = {"channels": [u"DQD_TEST_VIRTUAL_DEFECT"]} + + orig_iovs = DefectsDB((TEST_DATABASE), tag=unicode(original_htag)).retrieve(**what) + + assert len(orig_iovs) == 2 + assert (orig_iovs[0].since, orig_iovs[0].until) == ( 0, 100) + assert (orig_iovs[1].since, orig_iovs[1].until) == (100, 200) + @with_setup(create_database, teardown_database) def test_rename_defects(): @@ -625,7 +681,7 @@ def test_virtual_defect_consistency(): """ Checking that virtual flags don't depend on non-existent flags """ - DefectsDB('oracle://ATLAS_COOLPROD;schema=ATLAS_COOLOFL_GLOBAL;dbname=COMP200')._virtual_defect_consistency_check() + DefectsDB('oracle://ATLAS_COOLPROD;schema=ATLAS_COOLOFL_GLOBAL;dbname=CONDBR2')._virtual_defect_consistency_check() @with_setup(create_database, teardown_database) def test_iov_tag_defects(): diff --git a/DataQuality/DQDefects/python/virtual_mixin.py b/DataQuality/DQDefects/python/virtual_mixin.py index 5ebeac9c99bc..5fce12fa9c56 100644 --- a/DataQuality/DQDefects/python/virtual_mixin.py +++ b/DataQuality/DQDefects/python/virtual_mixin.py @@ -54,6 +54,8 @@ class DefectsDBVirtualDefectsMixin(object): # change other tags in a known manner with _update_virtual_defect assert self.logics_tag == "HEAD", NONHEAD_MODIFICATION_MSG assert not self._read_only, "Insertion on read-only database" + clauses = clauses.encode('ascii') + comment = comment.encode('utf-8') if comment is not None else comment self._update_virtual_defect(defect_name, clauses, comment) def _update_virtual_defect(self, defect_name, clauses, comment=None, tag=None): @@ -80,6 +82,8 @@ class DefectsDBVirtualDefectsMixin(object): Will fix up all virtual defect dependencies in all tags. """ assert not self._read_only, "Channel rename on read-only database" + defect_name = defect_name.encode('ascii') + new_defect_name = new_defect_name.encode('ascii') try: oldname = self.normalize_defect_names(new_defect_name) @@ -144,6 +148,9 @@ class DefectsDBVirtualDefectsMixin(object): assert self.logics_tag == "HEAD", NONHEAD_MODIFICATION_MSG assert not self._read_only, "Insertion on read-only database" from DQUtils.channel_mapping import get_channel_ids_names + clauses = clauses.encode('ascii') + defect_name = defect_name.encode('ascii') + comment = comment.encode('utf-8') if comment is not None else comment # Force load of defects_folder to populate _defect_payload store = self.defect_logic_folder.storeObject diff --git a/DataQuality/DQDefects/share/dq_defect_list_iovs.py b/DataQuality/DQDefects/share/dq_defect_list_iovs.py index 7298e07696fc..5a1537ff9b6c 100755 --- a/DataQuality/DQDefects/share/dq_defect_list_iovs.py +++ b/DataQuality/DQDefects/share/dq_defect_list_iovs.py @@ -52,8 +52,8 @@ def main(): add_arg = parser.add_argument # Specify range to process - add_arg('-p', '--project', default='data12_8TeV', - help='Data project (default: data12_8TeV)') + add_arg('-p', '--project', default='data15_13TeV', + help='Data project (default: data15_13TeV)') add_arg('-P', '--period', default=None, nargs='*', help='Data period(s)') #add_arg('-r', '--run', default=None, nargs='*', help='Run number(s) to process') add_arg('-r', '--run', default=None, type=int, help='Run number to process') @@ -93,7 +93,7 @@ def main(): period_dict = project_dict[args.project] run_set = set() # Use periods if specified - if len(args.period) > 0: + if args.period and len(args.period) > 0: for period in args.period: run_set.update(period_dict[period]) # Otherwise use all periods in project diff --git a/DataQuality/DQDefects/share/dq_defect_summary.py b/DataQuality/DQDefects/share/dq_defect_summary.py index 17a285fb8baf..58f9d810df51 100755 --- a/DataQuality/DQDefects/share/dq_defect_summary.py +++ b/DataQuality/DQDefects/share/dq_defect_summary.py @@ -79,8 +79,8 @@ def main(): add_group = parser.add_argument_group # Specify range to process - a("-p", "--project", default="data12_8TeV", - help="Data project (default: data12_8TeV)") + a("-p", "--project", default="data15_13TeV", + help="Data project (default: data15_13TeV)") a("-P", "--period", default=None, nargs="*", help="Data period(s)") a("-r", "--run", default=None, nargs="*", help="Run number(s) to process") a("-R", "--range", help="Inclusive run range: e.g. 150000-151000") -- GitLab From a912b21abcb1dd1ed70631aedfd3848e15a8e045 Mon Sep 17 00:00:00 2001 From: bnachman <bnachman@cern.ch> Date: Sun, 8 Jul 2018 23:36:55 +0200 Subject: [PATCH 412/562] fixed typos and added end of Run 3 option Former-commit-id: ef33d22bbae40eb885f47f9317bba842fe31bae4 --- .../src/SensorSimPlanarTool.cxx | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.cxx index a8c8aa005d31..7e210990019b 100644 --- a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.cxx +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.cxx @@ -122,7 +122,7 @@ StatusCode SensorSimPlanarTool::initialize() { mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_IBL_PL_80V_fl2e14.root") ); mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_PIX_150V_fl1.7e14.root") ); mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_PIX_150V_fl7e13.root") ); - mapsPath_list.push_back( PathResolverFindCalibFile("maps_PIX_150V_fl4e13.root") ); + mapsPath_list.push_back( PathResolverFindCalibFile("PixelDigitization/maps_PIX_150V_fl4e13.root") ); m_fluence_layers.push_back(2e14); m_fluence_layers.push_back(1.7e14); @@ -155,17 +155,30 @@ StatusCode SensorSimPlanarTool::initialize() { }else if(m_fluence==6){ - mapsPath_list.push_back( PathResolver::find_file("maps_IBL_400V_fl8_7e14.root", "DATAPATH") ); - mapsPath_list.push_back( PathResolver::find_file("maps_PIX_400V_fl4_6e14.root", "DATAPATH") ); + mapsPath_list.push_back( PathResolver::find_file("PixelDigitization/maps_IBL_400V_fl8_7e14.root", "DATAPATH") ); + mapsPath_list.push_back( PathResolver::find_file("PixelDigitization/maps_PIX_400V_fl4_6e14.root", "DATAPATH") ); - mapsPath_list.push_back( PathResolver::find_file("maps_PIX_250V_fl2_1e14.root", "DATAPATH") ); - mapsPath_list.push_back( PathResolver::find_file("maps_PIX_150V_fl1_3e14.root", "DATAPATH") ); + mapsPath_list.push_back( PathResolver::find_file("PixelDigitization/maps_PIX_250V_fl2_1e14.root", "DATAPATH") ); + mapsPath_list.push_back( PathResolver::find_file("PixelDigitization/maps_PIX_150V_fl1_3e14.root", "DATAPATH") ); m_fluence_layers.push_back(8.7e14); m_fluence_layers.push_back(4.6e14); m_fluence_layers.push_back(2.1e14); m_fluence_layers.push_back(1.3e14); + }else if(m_fluence==7){ + + mapsPath_list.push_back( PathResolver::find_file("PixelDigitization/maps_IBL_endLHC.root", "DATAPATH") ); + mapsPath_list.push_back( PathResolver::find_file("PixelDigitization/maps_PIX_blayer_endLHC.root", "DATAPATH") ); + + mapsPath_list.push_back( PathResolver::find_file("PixelDigitization/maps_PIX_L1_endLHC.root", "DATAPATH") ); + mapsPath_list.push_back( PathResolver::find_file("PixelDigitization/maps_PIX_L2_endLHC.root", "DATAPATH") ); + + m_fluence_layers.push_back(2*8.7e14); + m_fluence_layers.push_back(2*4.6e14); + m_fluence_layers.push_back(2*2.1e14); + m_fluence_layers.push_back(2*1.3e14); + } // ***************************** -- GitLab From 276c793a7d3cde677c12660e62432264b02c79d4 Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Sun, 8 Jul 2018 20:22:03 +0000 Subject: [PATCH 413/562] Merge branch 'Fixing_empty_egammavalidtion_histograms' into '21.0' ART egamma: removing histograms and rebinning some basic ones See merge request atlas/athena!12278 (cherry picked from commit f8290a2ca3bd1edd493c70fb7d35f9007b9f9132 [formerly 3834e448087205f9665640c2fbc50c478aeffcdf]) ae337b16 Removing unnecessary histograms and rebinning some basic ones 8a3ca980 removing forward electron plots Former-commit-id: 7b3551d43bce3cfd3d0cd6106fc6933179012002 --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../egammaValidation/src/EgammaMonitoring.cxx | 108 +----------------- .../egammaValidation/src/EgammaMonitoring.h | 6 - .../egammaValidation/src/ParticlePlots.cxx | 6 +- 4 files changed, 4 insertions(+), 116 deletions(-) mode change 100755 => 100644 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100755 new mode 100644 diff --git a/Reconstruction/egamma/egammaValidation/src/EgammaMonitoring.cxx b/Reconstruction/egamma/egammaValidation/src/EgammaMonitoring.cxx index 09959de7fa4a..e42d7a04d7bb 100644 --- a/Reconstruction/egamma/egammaValidation/src/EgammaMonitoring.cxx +++ b/Reconstruction/egamma/egammaValidation/src/EgammaMonitoring.cxx @@ -57,7 +57,6 @@ StatusCode EgammaMonitoring :: initialize () evtNmb->SetBins(2000, 85000, 87000); - ssp_fe.initializePlots(); ep_a.initializePlots(); ep_L.initializePlots(); ep_M.initializePlots(); ep_T.initializePlots(); CHECK(rootHistSvc->regHist("/MONITORING/All/pT_prtcl" , ep_a.pT_prtcl )); @@ -80,17 +79,6 @@ StatusCode EgammaMonitoring :: initialize () CHECK(rootHistSvc->regHist("/MONITORING/TLH/phi_prtcl", ep_T.phi_prtcl)); CHECK(rootHistSvc->regHist("/MONITORING/TLH/TrkToEl" , ep_T.TrkToEl )); - CHECK(rootHistSvc->regHist("/MONITORING/FrwdEl_ShowerShapes/hadleak", ssp_fe.hadleak)); - CHECK(rootHistSvc->regHist("/MONITORING/FrwdEl_ShowerShapes/reta" , ssp_fe.reta )); - CHECK(rootHistSvc->regHist("/MONITORING/FrwdEl_ShowerShapes/rphi" , ssp_fe.rphi )); - CHECK(rootHistSvc->regHist("/MONITORING/FrwdEl_ShowerShapes/weta2" , ssp_fe.weta2 )); - CHECK(rootHistSvc->regHist("/MONITORING/FrwdEl_ShowerShapes/eratio" , ssp_fe.eratio )); - CHECK(rootHistSvc->regHist("/MONITORING/FrwdEl_ShowerShapes/deltae" , ssp_fe.deltae )); - CHECK(rootHistSvc->regHist("/MONITORING/FrwdEl_ShowerShapes/f1" , ssp_fe.f1 )); - CHECK(rootHistSvc->regHist("/MONITORING/FrwdEl_ShowerShapes/fside" , ssp_fe.fside )); - CHECK(rootHistSvc->regHist("/MONITORING/FrwdEl_ShowerShapes/wtots1" , ssp_fe.wtots1 )); - CHECK(rootHistSvc->regHist("/MONITORING/FrwdEl_ShowerShapes/ws3" , ssp_fe.ws3 )); - CHECK(rootHistSvc->regHist("/MONITORING/Eff_ID/LLH_pT_Eff", Eff_ID.LLH_pT_Eff)); CHECK(rootHistSvc->regHist("/MONITORING/Eff_ID/MLH_pT_Eff", Eff_ID.MLH_pT_Eff)); CHECK(rootHistSvc->regHist("/MONITORING/Eff_ID/TLH_pT_Eff", Eff_ID.TLH_pT_Eff)); @@ -113,7 +101,7 @@ StatusCode EgammaMonitoring :: initialize () pp_truthConvPhoton.initializePlots(); pp_truthConvRecoConv.initializePlots(); pp_truthConvRecoConv1Si.initializePlots(); pp_truthConvRecoConv1TRT.initializePlots(); pp_truthConvRecoConv2Si.initializePlots(); pp_truthConvRecoConv2TRT.initializePlots(); pp_truthConvRecoConv2SiTRT.initializePlots(); pp_truthConvRecoUnconv.initializePlots(); - pp_truthUnconvPhoton.initializePlots(); pp_truthUnconvRecoConv.initializePlots(); pp_truthUnconvRecoConv1Si.initializePlots(); pp_truthUnconvRecoConv1TRT.initializePlots(); pp_truthUnconvRecoConv2Si.initializePlots(); pp_truthUnconvRecoConv2TRT.initializePlots(); pp_truthUnconvRecoConv2SiTRT.initializePlots(); pp_truthUnconvRecoUnconv.initializePlots(); + pp_truthUnconvPhoton.initializePlots(); pp_truthUnconvRecoConv.initializePlots(); pp_truthUnconvRecoUnconv.initializePlots(); Eff_Reco.initializePlots(); @@ -183,40 +171,6 @@ StatusCode EgammaMonitoring :: initialize () CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv/convRadius", pp_truthUnconvRecoConv.convRadius)); CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv/mu" , pp_truthUnconvRecoConv.mu)); - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv1Si/pT_prtcl" , pp_truthUnconvRecoConv1Si.pT_prtcl )); - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv1Si/eta_prtcl" , pp_truthUnconvRecoConv1Si.eta_prtcl )); - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv1Si/phi_prtcl" , pp_truthUnconvRecoConv1Si.phi_prtcl )); - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv1Si/convRadius", pp_truthUnconvRecoConv1Si.convRadius)); - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv1Si/mu" , pp_truthUnconvRecoConv1Si.mu)); - - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv1TRT/pT_prtcl" , pp_truthUnconvRecoConv1TRT.pT_prtcl )); - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv1TRT/eta_prtcl" , pp_truthUnconvRecoConv1TRT.eta_prtcl )); - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv1TRT/phi_prtcl" , pp_truthUnconvRecoConv1TRT.phi_prtcl )); - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv1TRT/convRadius", pp_truthUnconvRecoConv1TRT.convRadius)); - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv1TRT/mu" , pp_truthUnconvRecoConv1TRT.mu)); - - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv2Si/pT_prtcl" , pp_truthUnconvRecoConv2Si.pT_prtcl )); - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv2Si/eta_prtcl" , pp_truthUnconvRecoConv2Si.eta_prtcl )); - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv2Si/phi_prtcl" , pp_truthUnconvRecoConv2Si.phi_prtcl )); - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv2Si/convRadius", pp_truthUnconvRecoConv2Si.convRadius)); - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv2Si/mu" , pp_truthUnconvRecoConv2Si.mu)); - - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv2TRT/pT_prtcl" , pp_truthUnconvRecoConv2TRT.pT_prtcl )); - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv2TRT/eta_prtcl" , pp_truthUnconvRecoConv2TRT.eta_prtcl )); - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv2TRT/phi_prtcl" , pp_truthUnconvRecoConv2TRT.phi_prtcl )); - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv2TRT/convRadius", pp_truthUnconvRecoConv2TRT.convRadius)); - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv2TRT/mu" , pp_truthUnconvRecoConv2TRT.mu)); - - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv2SiTRT/pT_prtcl" , pp_truthUnconvRecoConv2SiTRT.pT_prtcl )); - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv2SiTRT/eta_prtcl" , pp_truthUnconvRecoConv2SiTRT.eta_prtcl )); - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv2SiTRT/phi_prtcl" , pp_truthUnconvRecoConv2SiTRT.phi_prtcl )); - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv2SiTRT/convRadius", pp_truthUnconvRecoConv2SiTRT.convRadius)); - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoConv2SiTRT/mu" , pp_truthUnconvRecoConv2SiTRT.mu)); - - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoUnconv/pT_prtcl" , pp_truthUnconvRecoUnconv.pT_prtcl )); - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoUnconv/eta_prtcl" , pp_truthUnconvRecoUnconv.eta_prtcl )); - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoUnconv/phi_prtcl" , pp_truthUnconvRecoUnconv.phi_prtcl )); - CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoUnconv/convRadius", pp_truthUnconvRecoUnconv.convRadius)); CHECK(rootHistSvc->regHist("/MONITORING/truthUnconvRecoUnconv/mu" , pp_truthUnconvRecoUnconv.mu)); CHECK(rootHistSvc->regHist("/MONITORING/Efficiency_Reco/tConvRConv_pT_Eff" , Eff_Reco.tConvRConv_pT_Eff )); @@ -371,21 +325,6 @@ StatusCode EgammaMonitoring :: execute () return StatusCode::FAILURE; } - // Retrieve forward electrons - /* - const xAOD::ElectronContainer* ElectronsFrwd = evtStore()->retrieve<const xAOD::ElectronContainer>("FwdElectrons"); - if(!ElectronsFrwd ) { - ATH_MSG_ERROR("Failed to retrieve forward electron container. Exiting."); - return StatusCode::FAILURE; - } - - const xAOD::ElectronContainer* ElectronsFrwd = nullptr; - if( !evtStore()->retrieve(ElectronsFrwd, "ForwardElectrons").isSuccess()) { - ATH_MSG_ERROR("Failed to retrieve forward electron container. Exiting."); - return StatusCode::FAILURE; - } - */ - for(auto elrec : *RecoEl) { if(!elrec) continue; @@ -398,15 +337,9 @@ StatusCode EgammaMonitoring :: execute () ssp.fill(*elrec); if((elrec->pt())/1000. > 10.) ssp_10cut.fill(*elrec); - if(xAOD::EgammaHelpers::isFwdElectron(elrec)) ssp_fe.fill(*elrec); } // RecoEl Loop - /* - for(auto frwdelectron : *ElectronsFrwd){ - if(frwdelectron && frwdelectron->isGoodOQ(xAOD::EgammaParameters::BADCLUSELECTRON)) ssp_fe.fill(*frwdelectron); - } // ElectronsFrwd Loop - */ } // if electron @@ -470,11 +403,6 @@ StatusCode EgammaMonitoring :: execute () pp_truthUnconvRecoConv.fill(*egtruth, mu); - if(convType == xAOD::EgammaParameters::singleSi ) pp_truthUnconvRecoConv1Si .fill(*egtruth, mu); - if(convType == xAOD::EgammaParameters::singleTRT ) pp_truthUnconvRecoConv1TRT .fill(*egtruth, mu); - if(convType == xAOD::EgammaParameters::doubleSi ) pp_truthUnconvRecoConv2Si .fill(*egtruth, mu); - if(convType == xAOD::EgammaParameters::doubleTRT ) pp_truthUnconvRecoConv2TRT .fill(*egtruth, mu); - if(convType == xAOD::EgammaParameters::doubleSiTRT) pp_truthUnconvRecoConv2SiTRT.fill(*egtruth, mu); } // isRecoConv else { @@ -554,44 +482,10 @@ StatusCode EgammaMonitoring :: finalize () Eff_Reco.divide("tConvRUnconv_CR" , pp_truthConvRecoUnconv.convRadius , pp_truthConvPhoton.convRadius); Eff_Reco.divide("tUnconvRConv_pT" , pp_truthUnconvRecoConv.pT_prtcl , pp_truthUnconvPhoton.pT_prtcl); - Eff_Reco.divide("tUnconvRC1Si_pT" , pp_truthUnconvRecoConv1Si.pT_prtcl , pp_truthUnconvPhoton.pT_prtcl); - Eff_Reco.divide("tUnconvRC1TRT_pT" , pp_truthUnconvRecoConv1TRT.pT_prtcl , pp_truthUnconvPhoton.pT_prtcl); - Eff_Reco.divide("tUnconvRC2Si_pT" , pp_truthUnconvRecoConv2Si.pT_prtcl , pp_truthUnconvPhoton.pT_prtcl); - Eff_Reco.divide("tUnconvRC2TRT_pT" , pp_truthUnconvRecoConv2TRT.pT_prtcl , pp_truthUnconvPhoton.pT_prtcl); - Eff_Reco.divide("tUnconvRC2SiTRT_pT", pp_truthUnconvRecoConv2SiTRT.pT_prtcl, pp_truthUnconvPhoton.pT_prtcl); - Eff_Reco.divide("tUnconvRUnconv_pT" , pp_truthUnconvRecoUnconv.pT_prtcl , pp_truthUnconvPhoton.pT_prtcl); - Eff_Reco.divide("tUnconvRConv_eta" , pp_truthUnconvRecoConv.eta_prtcl , pp_truthUnconvPhoton.eta_prtcl); - Eff_Reco.divide("tUnconvRC1Si_eta" , pp_truthUnconvRecoConv1Si.eta_prtcl , pp_truthUnconvPhoton.eta_prtcl); - Eff_Reco.divide("tUnconvRC1TRT_eta" , pp_truthUnconvRecoConv1TRT.eta_prtcl , pp_truthUnconvPhoton.eta_prtcl); - Eff_Reco.divide("tUnconvRC2Si_eta" , pp_truthUnconvRecoConv2Si.eta_prtcl , pp_truthUnconvPhoton.eta_prtcl); - Eff_Reco.divide("tUnconvRC2TRT_eta" , pp_truthUnconvRecoConv2TRT.eta_prtcl , pp_truthUnconvPhoton.eta_prtcl); - Eff_Reco.divide("tUnconvRC2SiTRT_eta", pp_truthUnconvRecoConv2SiTRT.eta_prtcl, pp_truthUnconvPhoton.eta_prtcl); - Eff_Reco.divide("tUnconvRUnconv_eta" , pp_truthUnconvRecoUnconv.eta_prtcl , pp_truthUnconvPhoton.eta_prtcl); - Eff_Reco.divide("tUnconvRConv_phi" , pp_truthUnconvRecoConv.phi_prtcl , pp_truthUnconvPhoton.phi_prtcl); - Eff_Reco.divide("tUnconvRC1Si_phi" , pp_truthUnconvRecoConv1Si.phi_prtcl , pp_truthUnconvPhoton.phi_prtcl); - Eff_Reco.divide("tUnconvRC1TRT_phi" , pp_truthUnconvRecoConv1TRT.phi_prtcl , pp_truthUnconvPhoton.phi_prtcl); - Eff_Reco.divide("tUnconvRC2Si_phi" , pp_truthUnconvRecoConv2Si.phi_prtcl , pp_truthUnconvPhoton.phi_prtcl); - Eff_Reco.divide("tUnconvRC2TRT_phi" , pp_truthUnconvRecoConv2TRT.phi_prtcl , pp_truthUnconvPhoton.phi_prtcl); - Eff_Reco.divide("tUnconvRC2SiTRT_phi", pp_truthUnconvRecoConv2SiTRT.phi_prtcl, pp_truthUnconvPhoton.phi_prtcl); - Eff_Reco.divide("tUnconvRUnconv_phi" , pp_truthUnconvRecoUnconv.phi_prtcl , pp_truthUnconvPhoton.phi_prtcl); - Eff_Reco.divide("tUnconvRConv_mu" , pp_truthUnconvRecoConv.mu , pp_truthUnconvPhoton.mu); - Eff_Reco.divide("tUnconvRC1Si_mu" , pp_truthUnconvRecoConv1Si.mu , pp_truthUnconvPhoton.mu); - Eff_Reco.divide("tUnconvRC1TRT_mu" , pp_truthUnconvRecoConv1TRT.mu , pp_truthUnconvPhoton.mu); - Eff_Reco.divide("tUnconvRC2Si_mu" , pp_truthUnconvRecoConv2Si.mu , pp_truthUnconvPhoton.mu); - Eff_Reco.divide("tUnconvRC2TRT_mu" , pp_truthUnconvRecoConv2TRT.mu , pp_truthUnconvPhoton.mu); - Eff_Reco.divide("tUnconvRC2SiTRT_mu", pp_truthUnconvRecoConv2SiTRT.mu, pp_truthUnconvPhoton.mu); - Eff_Reco.divide("tUnconvRUnconv_mu" , pp_truthUnconvRecoUnconv.mu , pp_truthUnconvPhoton.mu); - Eff_Reco.divide("tUnconvRConv_CR" , pp_truthUnconvRecoConv.convRadius , pp_truthUnconvPhoton.convRadius); - Eff_Reco.divide("tUnconvRC1Si_CR" , pp_truthUnconvRecoConv1Si.convRadius , pp_truthUnconvPhoton.convRadius); - Eff_Reco.divide("tUnconvRC1TRT_CR" , pp_truthUnconvRecoConv1TRT.convRadius , pp_truthUnconvPhoton.convRadius); - Eff_Reco.divide("tUnconvRC2Si_CR" , pp_truthUnconvRecoConv2Si.convRadius , pp_truthUnconvPhoton.convRadius); - Eff_Reco.divide("tUnconvRC2TRT_CR" , pp_truthUnconvRecoConv2TRT.convRadius , pp_truthUnconvPhoton.convRadius); - Eff_Reco.divide("tUnconvRC2SiTRT_CR", pp_truthUnconvRecoConv2SiTRT.convRadius, pp_truthUnconvPhoton.convRadius); - Eff_Reco.divide("tUnconvRUnconv_CR" , pp_truthUnconvRecoUnconv.convRadius , pp_truthUnconvPhoton.convRadius); } // if gamma sampleType diff --git a/Reconstruction/egamma/egammaValidation/src/EgammaMonitoring.h b/Reconstruction/egamma/egammaValidation/src/EgammaMonitoring.h index 31263799a815..f53fa1d06f77 100644 --- a/Reconstruction/egamma/egammaValidation/src/EgammaMonitoring.h +++ b/Reconstruction/egamma/egammaValidation/src/EgammaMonitoring.h @@ -51,7 +51,6 @@ class EgammaMonitoring : public AthAlgorithm egammaMonitoring::EffRecPlots Eff_Reco; egammaMonitoring::ShowerShapesPlots ssp ; - egammaMonitoring::ShowerShapesPlots ssp_fe ; egammaMonitoring::ShowerShapesPlots ssp_10cut; @@ -73,11 +72,6 @@ class EgammaMonitoring : public AthAlgorithm egammaMonitoring::PhotonPlots pp_truthUnconvPhoton ; egammaMonitoring::PhotonPlots pp_truthUnconvRecoConv ; - egammaMonitoring::PhotonPlots pp_truthUnconvRecoConv1Si ; - egammaMonitoring::PhotonPlots pp_truthUnconvRecoConv1TRT ; - egammaMonitoring::PhotonPlots pp_truthUnconvRecoConv2Si ; - egammaMonitoring::PhotonPlots pp_truthUnconvRecoConv2TRT ; - egammaMonitoring::PhotonPlots pp_truthUnconvRecoConv2SiTRT; egammaMonitoring::PhotonPlots pp_truthUnconvRecoUnconv ; // Histos diff --git a/Reconstruction/egamma/egammaValidation/src/ParticlePlots.cxx b/Reconstruction/egamma/egammaValidation/src/ParticlePlots.cxx index 96edf4ac6fa4..57e31f7e99cd 100644 --- a/Reconstruction/egamma/egammaValidation/src/ParticlePlots.cxx +++ b/Reconstruction/egamma/egammaValidation/src/ParticlePlots.cxx @@ -11,9 +11,9 @@ namespace egammaMonitoring { void ParticlePlots::initializePlots() { - pT_prtcl = new TH1D("pT_prtcl" , ";p_{T} [GeV]; Track p_{T} Events", 200, 0, 200); - eta_prtcl = new TH1D("eta_prtcl" , ";#eta; Track #eta Events" , 120, -3, 3); - phi_prtcl = new TH1D("phi_prtcl" , ";#phi; Track #phi Events" , 50, -TMath::Pi(), TMath::Pi()); + pT_prtcl = new TH1D("pT_prtcl" , ";p_{T} [GeV]; Track p_{T} Events", 40, 0, 200); + eta_prtcl = new TH1D("eta_prtcl" , ";#eta; Track #eta Events" , 40, -3, 3); + phi_prtcl = new TH1D("phi_prtcl" , ";#phi; Track #phi Events" , 20, -TMath::Pi(), TMath::Pi()); } // initializePlots -- GitLab From 56ce24dc03b46ab1d792f32e72ce96ee404c8a5a Mon Sep 17 00:00:00 2001 From: James Beacham <j.beacham@cern.ch> Date: Sun, 8 Jul 2018 20:20:33 +0000 Subject: [PATCH 414/562] Merge branch '21.0_NoUnusedParticlesInRHadrons' into '21.0' Not defining unknown PDG IDs for ATLASSIM-3007 See merge request atlas/athena!12553 (cherry picked from commit c8a0f9f5b067ac84c31e55d596e2cf0163858b07 [formerly 36e10c3dcb649eb96d897d375cb94a774e9a1f1f]) ee3be378 Not defining unknown PDG IDs for ATLASSIM-3007 Former-commit-id: 27eb349d134711fbe3877eaa8da08c8be0e46965 --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../RHadrons/src/RHadronsPhysicsTool.cxx | 21 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) mode change 100755 => 100644 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100755 new mode 100644 diff --git a/Simulation/G4Extensions/RHadrons/src/RHadronsPhysicsTool.cxx b/Simulation/G4Extensions/RHadrons/src/RHadronsPhysicsTool.cxx index 5e0e708b6785..89c408afbc26 100644 --- a/Simulation/G4Extensions/RHadrons/src/RHadronsPhysicsTool.cxx +++ b/Simulation/G4Extensions/RHadrons/src/RHadronsPhysicsTool.cxx @@ -171,16 +171,17 @@ void RHadronsPhysicsTool::ConstructProcess() standardpdgidtodecay.push_back(-541); standardpdgidtodecay.push_back(553); - standardpdgidtodecay.push_back(423); - standardpdgidtodecay.push_back(-423); - standardpdgidtodecay.push_back(433); - standardpdgidtodecay.push_back(-433); - standardpdgidtodecay.push_back(513); - standardpdgidtodecay.push_back(-513); - standardpdgidtodecay.push_back(523); - standardpdgidtodecay.push_back(-523); - standardpdgidtodecay.push_back(551); - standardpdgidtodecay.push_back(-551); +// Unknown to Geant4, so removed for the time being +// standardpdgidtodecay.push_back(423); +// standardpdgidtodecay.push_back(-423); +// standardpdgidtodecay.push_back(433); +// standardpdgidtodecay.push_back(-433); +// standardpdgidtodecay.push_back(513); +// standardpdgidtodecay.push_back(-513); +// standardpdgidtodecay.push_back(523); +// standardpdgidtodecay.push_back(-523); +// standardpdgidtodecay.push_back(551); +// standardpdgidtodecay.push_back(-551); for (unsigned int i=0; i<standardpdgidtodecay.size(); ++i) { -- GitLab From 1a6bcf9a29c61839805a4718329859832e4b1d78 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Mon, 9 Jul 2018 10:40:30 +0200 Subject: [PATCH 415/562] Remove unneeded CaloCellCorrection dependency from TileRecAlgs. Former-commit-id: 564b31a6ee2bdb5f270d3766df9f5d0dcb55161b --- TileCalorimeter/TileRecAlgs/CMakeLists.txt | 1 - TileCalorimeter/TileRecAlgs/src/TileCellCorrection.cxx | 1 - 2 files changed, 2 deletions(-) diff --git a/TileCalorimeter/TileRecAlgs/CMakeLists.txt b/TileCalorimeter/TileRecAlgs/CMakeLists.txt index fc40c6bddc17..74f94363d28e 100644 --- a/TileCalorimeter/TileRecAlgs/CMakeLists.txt +++ b/TileCalorimeter/TileRecAlgs/CMakeLists.txt @@ -14,7 +14,6 @@ atlas_depends_on_subdirs( PUBLIC TileCalorimeter/TileIdentifier PRIVATE AtlasTest/TestTools - Calorimeter/CaloCellCorrection Calorimeter/CaloDetDescr Calorimeter/CaloEvent Control/AthenaKernel diff --git a/TileCalorimeter/TileRecAlgs/src/TileCellCorrection.cxx b/TileCalorimeter/TileRecAlgs/src/TileCellCorrection.cxx index 0d2d8dd4de85..0a599e843378 100644 --- a/TileCalorimeter/TileRecAlgs/src/TileCellCorrection.cxx +++ b/TileCalorimeter/TileRecAlgs/src/TileCellCorrection.cxx @@ -15,7 +15,6 @@ // Calo includes #include "CaloEvent/CaloCellContainer.h" #include "Identifier/IdentifierHash.h" -#include "CaloCellCorrection/CaloCellNeighborsAverageCorr.h" // Tile includes #include "CaloIdentifier/TileID.h" -- GitLab From 7bc427a80dcf009a443988ce32c24ad76a5e895c Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Mon, 9 Jul 2018 11:07:41 +0200 Subject: [PATCH 416/562] AtlasDetDescr: Add quiet flag to AtlasDetectorID. Add a flag to AtlasDetectorID to suppress some informational messages. Intended to be used for unit tests, where these messages are both uninteresting and also get emitted directly to cout. Former-commit-id: cda48c3d66f8ba8fda4573df40e18c90cd10703a --- .../AtlasDetDescr/AtlasDetectorID.h | 8 +++- .../AtlasDetDescr/src/AtlasDetectorID.cxx | 38 +++++++++++++------ .../src/AtlasDetectorIDHelper.cxx | 19 ++++++---- .../AtlasDetDescr/src/AtlasDetectorIDHelper.h | 2 +- 4 files changed, 46 insertions(+), 21 deletions(-) diff --git a/DetectorDescription/AtlasDetDescr/AtlasDetDescr/AtlasDetectorID.h b/DetectorDescription/AtlasDetDescr/AtlasDetDescr/AtlasDetectorID.h index 46f6c7505156..4e1eac43b637 100755 --- a/DetectorDescription/AtlasDetDescr/AtlasDetDescr/AtlasDetectorID.h +++ b/DetectorDescription/AtlasDetDescr/AtlasDetDescr/AtlasDetectorID.h @@ -58,7 +58,7 @@ public: /// @name strutors //@{ - AtlasDetectorID(void); + AtlasDetectorID(); AtlasDetectorID(const AtlasDetectorID& other); ~AtlasDetectorID(void); AtlasDetectorID& operator= (const AtlasDetectorID& other); @@ -240,6 +240,9 @@ public: virtual void setMessageSvc (IMessageSvc* msgSvc); //@} + /// Set flag for suppressing informational output. + void set_quiet (bool quiet); + protected: @@ -319,6 +322,9 @@ protected: /// pointer to the message service IMessageSvc* m_msgSvc; + /// If true, suppress DEBUG/INFO messages. + bool m_quiet; + /// List of dictionary names used by this helper std::vector<std::string> m_dict_names; diff --git a/DetectorDescription/AtlasDetDescr/src/AtlasDetectorID.cxx b/DetectorDescription/AtlasDetDescr/src/AtlasDetectorID.cxx index c8292763e0ae..ba06031682dd 100755 --- a/DetectorDescription/AtlasDetDescr/src/AtlasDetectorID.cxx +++ b/DetectorDescription/AtlasDetDescr/src/AtlasDetectorID.cxx @@ -30,11 +30,12 @@ //<<<<<< PUBLIC FUNCTION DEFINITIONS >>>>>> //<<<<<< MEMBER FUNCTION DEFINITIONS >>>>>> -AtlasDetectorID::AtlasDetectorID(void) +AtlasDetectorID::AtlasDetectorID() : m_do_checks(false), m_do_neighbours(true), m_msgSvc(0), + m_quiet(false), m_is_initialized_from_dict(false), m_DET_INDEX(999), m_SUBDET_INDEX(999), @@ -84,6 +85,7 @@ AtlasDetectorID::AtlasDetectorID(const AtlasDetectorID& other) m_do_checks (other.m_do_checks), m_do_neighbours (other.m_do_neighbours), m_msgSvc (other.m_msgSvc), + m_quiet (other.m_quiet), m_dict_version (other.m_dict_version), m_is_initialized_from_dict(other.m_is_initialized_from_dict), m_DET_INDEX (other.m_DET_INDEX), @@ -149,6 +151,7 @@ AtlasDetectorID::operator= (const AtlasDetectorID& other) m_do_checks = other.m_do_checks; m_do_neighbours = other.m_do_neighbours; m_msgSvc = other.m_msgSvc; + m_quiet = other.m_quiet; m_dict_version = other.m_dict_version; m_is_initialized_from_dict = other.m_is_initialized_from_dict; m_DET_INDEX = other.m_DET_INDEX; @@ -510,19 +513,21 @@ AtlasDetectorID::initialize_from_dictionary(const IdDictMgr& dict_mgr) m_helper->setMsgSvc(m_msgSvc); } - if(m_helper->initialize_from_dictionary(dict_mgr)) return (1); + if(m_helper->initialize_from_dictionary(dict_mgr, m_quiet)) return (1); // Initialize level indices and id values from dicts if(initLevelsFromDict(dict_mgr)) return (1); m_is_initialized_from_dict = true; - if(m_msgSvc) { + if (!m_quiet) { + if(m_msgSvc) { MsgStream log(m_msgSvc, "AtlasDetectorID" ); log << MSG::INFO << "initialize_from_dictionary - OK" << endmsg; - } - else { + } + else { std::cout << " AtlasDetectorID::initialize_from_dictionary - OK " << std::endl; + } } return (0); @@ -918,6 +923,11 @@ void AtlasDetectorID::setMessageSvc (IMessageSvc* msgSvc) m_msgSvc = msgSvc ; } +void AtlasDetectorID::set_quiet (bool quiet) +{ + m_quiet = quiet ; +} + void AtlasDetectorID::setDictVersion (const IdDictMgr& dict_mgr, const std::string& name) { @@ -1729,14 +1739,16 @@ AtlasDetectorID::initLevelsFromDict(const IdDictMgr& dict_mgr) } } else { - if(m_msgSvc) { + if (!m_quiet) { + if(m_msgSvc) { MsgStream log(m_msgSvc, "AtlasDetectorID" ); log << MSG::DEBUG << "initLevelsFromDict - there are no sTGC entries in the dictionary! " << endmsg; - } - else { + } + else { std::cout << "AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! " << std::endl; + } } } label = field->find_label("MM"); @@ -1758,14 +1770,16 @@ AtlasDetectorID::initLevelsFromDict(const IdDictMgr& dict_mgr) } } else { - if(m_msgSvc) { + if (!m_quiet) { + if(m_msgSvc) { MsgStream log(m_msgSvc, "AtlasDetectorID" ); log << MSG::DEBUG << "initLevelsFromDict - there are no MM entries in the dictionary! " << endmsg; - } - else { + } + else { std::cout << "AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! " << std::endl; + } } } label = field->find_label("CSC"); @@ -1922,7 +1936,7 @@ AtlasDetectorID::initLevelsFromDict(const IdDictMgr& dict_mgr) m_lvl1_onl_field.clear(); int notok = m_calo_dict->get_label_value("DetZside", "no_side", value); - if (notok) { + if (notok && !m_quiet) { if(m_msgSvc) { MsgStream log(m_msgSvc, "AtlasDetectorID" ); log << MSG::DEBUG << "initLevelsFromDict - Could not get value for label 'no_side' of field 'DetZside' in dictionary " diff --git a/DetectorDescription/AtlasDetDescr/src/AtlasDetectorIDHelper.cxx b/DetectorDescription/AtlasDetDescr/src/AtlasDetectorIDHelper.cxx index aa996827d489..c6097206e00b 100755 --- a/DetectorDescription/AtlasDetDescr/src/AtlasDetectorIDHelper.cxx +++ b/DetectorDescription/AtlasDetDescr/src/AtlasDetectorIDHelper.cxx @@ -84,7 +84,8 @@ AtlasDetectorIDHelper::~AtlasDetectorIDHelper(void) int -AtlasDetectorIDHelper::initialize_from_dictionary(const IdDictMgr& dict_mgr) +AtlasDetectorIDHelper::initialize_from_dictionary(const IdDictMgr& dict_mgr, + bool quiet) { if(m_initialized) return(0); @@ -452,16 +453,18 @@ AtlasDetectorIDHelper::initialize_from_dictionary(const IdDictMgr& dict_mgr) if (group) { size = group->regions().size(); } - if(m_msgSvc) { + if (!quiet) { + if(m_msgSvc) { MsgStream log(m_msgSvc, "AtlasDetectorIDHelper" ); log << MSG::DEBUG << "initialize_from_dictionary - unable to find mm region index: group, region size " << group << " " << size << endmsg; - } - else { + } + else { std::cout << "AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size " << group << " " << size << std::endl; + } } } @@ -477,16 +480,18 @@ AtlasDetectorIDHelper::initialize_from_dictionary(const IdDictMgr& dict_mgr) if (group) { size = group->regions().size(); } - if(m_msgSvc) { + if (!quiet) { + if(m_msgSvc) { MsgStream log(m_msgSvc, "AtlasDetectorIDHelper" ); log << MSG::DEBUG << "initialize_from_dictionary - unable to find stgc region index: group, region size " << group << " " << size << endmsg; - } - else { + } + else { std::cout << "AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size " << group << " " << size << std::endl; + } } } } diff --git a/DetectorDescription/AtlasDetDescr/src/AtlasDetectorIDHelper.h b/DetectorDescription/AtlasDetDescr/src/AtlasDetectorIDHelper.h index 68e61980e315..1302c606d06c 100755 --- a/DetectorDescription/AtlasDetDescr/src/AtlasDetectorIDHelper.h +++ b/DetectorDescription/AtlasDetDescr/src/AtlasDetectorIDHelper.h @@ -46,7 +46,7 @@ public: // static AtlasDetectorIDHelper* instance(); /// Initialization from the identifier dictionary - int initialize_from_dictionary(const IdDictMgr& dict_mgr); + int initialize_from_dictionary(const IdDictMgr& dict_mgr, bool quiet); ~AtlasDetectorIDHelper(void); -- GitLab From e88c044207e00fa198a7a8452cb4d8babedfeab7 Mon Sep 17 00:00:00 2001 From: Jyoti Prakash Biswal <jyoti.prakash.biswal@cern.ch> Date: Mon, 9 Jul 2018 13:19:41 +0200 Subject: [PATCH 417/562] With default in the definition. Coverity issue# 113718 Former-commit-id: 70ff2098f3e59659b91a818aae24d36f1d4c2e6e --- Tracking/TrkEvent/VxJetVertex/VxJetVertex/VertexPositions.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Tracking/TrkEvent/VxJetVertex/VxJetVertex/VertexPositions.h b/Tracking/TrkEvent/VxJetVertex/VxJetVertex/VertexPositions.h index d28ab71a18fb..1980e800c881 100644 --- a/Tracking/TrkEvent/VxJetVertex/VxJetVertex/VertexPositions.h +++ b/Tracking/TrkEvent/VxJetVertex/VxJetVertex/VertexPositions.h @@ -27,8 +27,10 @@ namespace Trk { public: VertexPositions(); //!< default constructor VertexPositions(const Amg::VectorX &p); //!< constructor with variable-size vector - VertexPositions(const VertexPositions& ); //!< copy constructor - VertexPositions &operator= (const VertexPositions &); //!< Assignment operator + VertexPositions(const VertexPositions& ) = default; //!< copy constructor + VertexPositions(VertexPositions&& ) = default; //!< move constructor + VertexPositions &operator= (const VertexPositions &) = default; //!< Assignment operator + VertexPositions &operator= (VertexPositions &&) = default; //!< move Assignment operator /** Output Method for MsgStream, to be overloaded by child classes */ virtual MsgStream& dump(MsgStream& sl) const; -- GitLab From 1bd100df1a2c281854bd225de3a66234e4e1495f Mon Sep 17 00:00:00 2001 From: John Chapman <jchapman@cern.ch> Date: Mon, 9 Jul 2018 13:19:26 +0200 Subject: [PATCH 418/562] Revert "Merge branch 'metaDataToolsPrivateFollowUp' into 'master'" This reverts commit db6957c67d11736986c22f9a50393ddfce3f4b4b [formerly 1d6ddc38e6b1d7528818661ceab4a0c68d4f9562], reversing changes made to 60b806b2881c9d5a61a5ea7fac55798439059681 [formerly 5aaf0270062ca4b809414364fbdced1c12861aed]. Former-commit-id: b3a468a807979443f04ed5710b901be29ce54058 --- .../AthenaPoolCnvSvc/python/ReadAthenaPool.py | 4 ++++ .../share/g4runnumber.py | 16 +++++----------- .../python/DigitizationWriteMetaData.py | 13 +++++-------- .../Digitization/share/LumiBlockOverrides.py | 10 ++-------- .../Digitization/share/RunNumberOverride.py | 11 +++-------- .../G4AtlasApps/python/G4Atlas_Metadata.py | 9 +++------ .../ISF/ISF_Example/python/ISF_Metadata.py | 9 +++------ .../ISF_Example/share/jobOptions_PhysValMon.py | 3 ++- .../TrigConfigSvc/python/TriggerConfig.py | 2 +- 9 files changed, 28 insertions(+), 49 deletions(-) diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/python/ReadAthenaPool.py b/Database/AthenaPOOL/AthenaPoolCnvSvc/python/ReadAthenaPool.py index bbc5cba2eb4d..7748a115c4b9 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/python/ReadAthenaPool.py +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/python/ReadAthenaPool.py @@ -51,6 +51,10 @@ def _configureReadAthenaPool(): svcMgr.MetaDataSvc.MetaDataContainer = "MetaDataHdr" svcMgr.MetaDataSvc.MetaDataTools += [ CfgMgr.IOVDbMetaDataTool() ] + #svcMgr.MetaDataSvc.MetaDataTools += [ "IOVDbMetaDataTool" ] + #if not hasattr (svcMgr.ToolSvc, 'IOVDbMetaDataTool'): + # svcMgr.ToolSvc += CfgMgr.IOVDbMetaDataTool() + # Add in EventSelector svcMgr += CfgMgr.EventSelectorAthenaPool ("EventSelector") #default InputCollections to FilesInput value of AthenaCommonFlags diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/g4runnumber.py b/Event/EventOverlay/EventOverlayJobTransforms/share/g4runnumber.py index e42c36e2c8e9..8315efefd235 100644 --- a/Event/EventOverlay/EventOverlayJobTransforms/share/g4runnumber.py +++ b/Event/EventOverlay/EventOverlayJobTransforms/share/g4runnumber.py @@ -38,18 +38,12 @@ from AthenaCommon.AthenaCommonFlags import athenaCommonFlags athenaCommonFlags.EvtMax.unlock() athenaCommonFlags.EvtMax.set_Value_and_Lock(num_lines) - #fix iov metadata -try: - svcMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"] -except IndexError: - from IOVDbMetaDataTools.IOVDbMetaDataToolsConf import IOVDbMetaDataTool - svcMgr.MetaDataSvc.MetaDataTools+=[IOVDbMetaDataTool()] - pass - -svcMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"].MinMaxRunNumbers = [svcMgr.EvtIdModifierSvc.Modifiers[0], 2147483647] - ## FIXME need to use maxRunNumber = 2147483647 for now to keep overlay working but in the future this should be set properly. - +if not hasattr(ServiceMgr.ToolSvc, 'IOVDbMetaDataTool'): + from AthenaCommon import CfgMgr + svcMgr.ToolSvc += CfgMgr.IOVDbMetaDataTool() + svcMgr.ToolSvc.IOVDbMetaDataTool.MinMaxRunNumbers = [svcMgr.EvtIdModifierSvc.Modifiers[0], 2147483647] + ## FIXME need to use maxRunNumber = 2147483647 for now to keep overlay working but in the future this should be set properly. #use conditions from this run number and timestamp svcMgr.EventSelector.RunNumber = svcMgr.EvtIdModifierSvc.Modifiers[0] diff --git a/Simulation/Digitization/python/DigitizationWriteMetaData.py b/Simulation/Digitization/python/DigitizationWriteMetaData.py index c1f848b95367..0cf229f825d6 100644 --- a/Simulation/Digitization/python/DigitizationWriteMetaData.py +++ b/Simulation/Digitization/python/DigitizationWriteMetaData.py @@ -11,15 +11,12 @@ def ModifyingEventIdBySvc(): if digitizationFlags.RunAndLumiOverrideList.statusOn or digitizationFlags.dataRunNumber.statusOn: from AthenaCommon.AppMgr import ServiceMgr if hasattr(ServiceMgr, 'EvtIdModifierSvc'): - try: - #GaudiHandleArray implements __geitem__ but no has_key functionality - ServiceMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"] - except IndexError: + if hasattr(ServiceMgr.ToolSvc, 'IOVDbMetaDataTool'): + return True + else: logDigitizationWriteMetadata.error('Found the EvtIdModifierSvc, but not the IOVDbMetaDataTool. \ It will not be possible to set the min and max run number of the job.') raise SystemExit("Found the EvtIdModifierSvc, but not the IOVDbMetaDataTool.") - else: - pass else: raise SystemExit("jobProperties.Digitization.RunAndLumiOverrideList is set, but no EvtIdModifierSvc found!") else : @@ -42,8 +39,8 @@ def getRunNumberRangeForOutputMetadata(): if ModifyingEventIdBySvc(): logDigitizationWriteMetadata.info('Setting the Digitization MetaData IOV from the IOVDbMetaDataTool') from AthenaCommon.AppMgr import ServiceMgr - myRunNumber=ServiceMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"].MinMaxRunNumbers[0] - myEndRunNumber=ServiceMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"].MinMaxRunNumbers[1] + myRunNumber=ServiceMgr.ToolSvc.IOVDbMetaDataTool.MinMaxRunNumbers[0] + myEndRunNumber=ServiceMgr.ToolSvc.IOVDbMetaDataTool.MinMaxRunNumbers[1] else : if myRunNumber > 0 : logDigitizationWriteMetadata.info('Found Run Number %s in hits file metadata.', str(myRunNumber) ) diff --git a/Simulation/Digitization/share/LumiBlockOverrides.py b/Simulation/Digitization/share/LumiBlockOverrides.py index d2df88521f25..31f25aff7747 100644 --- a/Simulation/Digitization/share/LumiBlockOverrides.py +++ b/Simulation/Digitization/share/LumiBlockOverrides.py @@ -23,11 +23,5 @@ if digitizationFlags.RunAndLumiOverrideList.get_Value(): getService("EvtIdModifierSvc") #fix iov metadata - try: - ServiceMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"] - except IndexError: - from IOVDbMetaDataTools.IOVDbMetaDataToolsConf import IOVDbMetaDataTool - ServiceMgr.MetaDataSvc.MetaDataTools+=[IOVDbMetaDataTool()] - pass - - svcMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"].MinMaxRunNumbers = list(digitizationFlags.RunAndLumiOverrideList.getMinMaxRunNumbers()) + if not hasattr(svcMgr.ToolSvc, 'IOVDbMetaDataTool'): svcMgr.ToolSvc += CfgMgr.IOVDbMetaDataTool() + svcMgr.ToolSvc.IOVDbMetaDataTool.MinMaxRunNumbers = list(digitizationFlags.RunAndLumiOverrideList.getMinMaxRunNumbers()) diff --git a/Simulation/Digitization/share/RunNumberOverride.py b/Simulation/Digitization/share/RunNumberOverride.py index 0b957bff474e..3f6b9a073f9f 100644 --- a/Simulation/Digitization/share/RunNumberOverride.py +++ b/Simulation/Digitization/share/RunNumberOverride.py @@ -20,14 +20,9 @@ if digitizationFlags.dataRunNumber.get_Value(): from Digitization.RunDependentConfig import buildListOfModifiers ServiceMgr.EvtIdModifierSvc.Modifiers += buildListOfModifiers() #fix iov metadata - try: - ServiceMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"] - except IndexError: - from IOVDbMetaDataTools.IOVDbMetaDataToolsConf import IOVDbMetaDataTool - ServiceMgr.MetaDataSvc.MetaDataTools+=[IOVDbMetaDataTool()] - pass - - ServiceMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"].MinMaxRunNumbers = [myRunNumber, myRunNumber+1]#2147483647] + if not hasattr(ServiceMgr.ToolSvc, 'IOVDbMetaDataTool'): + ServiceMgr.ToolSvc += CfgMgr.IOVDbMetaDataTool() + ServiceMgr.ToolSvc.IOVDbMetaDataTool.MinMaxRunNumbers = [myRunNumber, myRunNumber+1]#2147483647] myInitialTimeStamp=ServiceMgr.EvtIdModifierSvc.Modifiers[2] ServiceMgr.EventSelector.OverrideRunNumberFromInput=True diff --git a/Simulation/G4Atlas/G4AtlasApps/python/G4Atlas_Metadata.py b/Simulation/G4Atlas/G4AtlasApps/python/G4Atlas_Metadata.py index 140298777e55..8d6096a43f06 100644 --- a/Simulation/G4Atlas/G4AtlasApps/python/G4Atlas_Metadata.py +++ b/Simulation/G4Atlas/G4AtlasApps/python/G4Atlas_Metadata.py @@ -282,13 +282,10 @@ def configureRunNumberOverrides(): else: simMDlog.warning('Will override the settings of the EvtIdModifierSvc that was previously set up!') #fix iov metadata - try: - ServiceMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"] - except IndexError: + if not hasattr(ServiceMgr.ToolSvc, 'IOVDbMetaDataTool'): from AthenaCommon import CfgMgr - ServiceMgr.MetaDataSvc.MetaDataTools += [CfgMgr.IOVDbMetaDataTool()] - pass - ServiceMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"].MinMaxRunNumbers = [myRunNumber, 2147483647] + ServiceMgr.ToolSvc += CfgMgr.IOVDbMetaDataTool() + ServiceMgr.ToolSvc.IOVDbMetaDataTool.MinMaxRunNumbers = [myRunNumber, 2147483647] ## FIXME need to use maxRunNumber = 2147483647 for now to keep overlay working but in the future this should be set properly. # Using event numbers to avoid "some very large number" setting from AthenaCommon.AthenaCommonFlags import athenaCommonFlags diff --git a/Simulation/ISF/ISF_Example/python/ISF_Metadata.py b/Simulation/ISF/ISF_Example/python/ISF_Metadata.py index 9ec7cc901510..800684b1dc80 100644 --- a/Simulation/ISF/ISF_Example/python/ISF_Metadata.py +++ b/Simulation/ISF/ISF_Example/python/ISF_Metadata.py @@ -279,13 +279,10 @@ def configureRunNumberOverrides(): else: simMDlog.warning('Will override the settings of the EvtIdModifierSvc that was previously set up!') #fix iov metadata - try: - ServiceMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"] - except IndexError: + if not hasattr(ServiceMgr.ToolSvc, 'IOVDbMetaDataTool'): from AthenaCommon import CfgMgr - ServiceMgr.MetaDataSvc.MetaDataTools += [CfgMgr.IOVDbMetaDataTool()] - pass - ServiceMgr.MetaDataSvc.MetaDataTools["IOVDbMetaDataTool"].MinMaxRunNumbers = [myRunNumber, 2147483647] + ServiceMgr.ToolSvc += CfgMgr.IOVDbMetaDataTool() + ServiceMgr.ToolSvc.IOVDbMetaDataTool.MinMaxRunNumbers = [myRunNumber, 2147483647] ## FIXME need to use maxRunNumber = 2147483647 for now to keep overlay working but in the future this should be set properly. # Using event numbers to avoid "some very large number" setting from AthenaCommon.AthenaCommonFlags import athenaCommonFlags diff --git a/Simulation/ISF/ISF_Example/share/jobOptions_PhysValMon.py b/Simulation/ISF/ISF_Example/share/jobOptions_PhysValMon.py index 602af3b2bf30..ad88b7cbfb00 100644 --- a/Simulation/ISF/ISF_Example/share/jobOptions_PhysValMon.py +++ b/Simulation/ISF/ISF_Example/share/jobOptions_PhysValMon.py @@ -68,10 +68,11 @@ if TriggerOn == 1: ServiceMgr += TagInfoMgr() #ServiceMgr.TagInfoMgr.AddGeoModelTags = False from IOVDbMetaDataTools.IOVDbMetaDataToolsConf import IOVDbMetaDataTool + ToolSvc += IOVDbMetaDataTool( "IOVDbMetaDataTool" ) from AthenaServices.AthenaServicesConf import MetaDataSvc ServiceMgr += MetaDataSvc( "MetaDataSvc" ) ServiceMgr.MetaDataSvc.MetaDataContainer = "MetaDataHdr" - ServiceMgr.MetaDataSvc.MetaDataTools += [IOVDbMetaDataTool() ] + ServiceMgr.MetaDataSvc.MetaDataTools += [ "IOVDbMetaDataTool" ] import IOVDbSvc.IOVDb diff --git a/Trigger/TrigConfiguration/TrigConfigSvc/python/TriggerConfig.py b/Trigger/TrigConfiguration/TrigConfigSvc/python/TriggerConfig.py index 5e55dcccdffe..49932159d721 100644 --- a/Trigger/TrigConfiguration/TrigConfigSvc/python/TriggerConfig.py +++ b/Trigger/TrigConfiguration/TrigConfigSvc/python/TriggerConfig.py @@ -189,8 +189,8 @@ def _setupConfig(): # for debugging uncomment the following three lines from AthenaCommon.Constants import VERBOSE + ToolSvc.IOVDbMetaDataTool.OutputLevel = VERBOSE svcMgr.MetaDataSvc.OutputLevel = VERBOSE - svcMgr.MetaDataSvc.MetaDataTools[ "IOVDbMetaDataTool"].OutputLevel = VERBOSE dbConnection = "<dbConnection>impl=cool;techno=oracle;schema=ATLAS_COOLONL_READER;devdb10:COOLTEST:atlas_trig_stelzer</dbConnection>" -- GitLab From cb9edf34fdd10d2e31556bc0857dc2824bde354d Mon Sep 17 00:00:00 2001 From: John Chapman <jchapman@cern.ch> Date: Mon, 9 Jul 2018 13:20:15 +0200 Subject: [PATCH 419/562] Revert "Merge branch 'MDTools_private' into 'master'" This reverts commit 6533f40aedd7916b359793216804e88e874f262c [formerly 70dab50a2814b321ce2c5adb1dee1166b15e5a09], reversing changes made to 52156ba0374c370c9f8160f5e28bf03557a0f103 [formerly e4d29188dd304fa1a96f0e86905decf67734337b]. Former-commit-id: eb92c6ec0d86a369213def802443f4f15cd47113 --- Control/AthenaServices/src/MetaDataSvc.cxx | 3 +- .../AthenaPoolCnvSvc/python/ReadAthenaPool.py | 8 ++---- .../ByteStreamCnvSvc/python/ReadByteStream.py | 9 ++++-- .../python/CutFlowHelpers.py | 3 ++ .../share/RecExCommon_topOptions.py | 28 ++++++++++--------- .../share/skeleton.RAWtoESD_tf.py | 4 ++- .../TrigConfigSvc/python/TriggerConfig.py | 8 ++++-- 7 files changed, 38 insertions(+), 25 deletions(-) diff --git a/Control/AthenaServices/src/MetaDataSvc.cxx b/Control/AthenaServices/src/MetaDataSvc.cxx index abf3ab0ce842..89769199fd03 100644 --- a/Control/AthenaServices/src/MetaDataSvc.cxx +++ b/Control/AthenaServices/src/MetaDataSvc.cxx @@ -39,8 +39,7 @@ MetaDataSvc::MetaDataSvc(const std::string& name, ISvcLocator* pSvcLocator) : :: m_allowMetaDataStop(false), m_persToClid(), m_toolForClid(), - m_streamForKey(), - m_metaDataTools(this){ + m_streamForKey() { // declare properties declareProperty("MetaDataContainer", m_metaDataCont = ""); declareProperty("MetaDataTools", m_metaDataTools); diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/python/ReadAthenaPool.py b/Database/AthenaPOOL/AthenaPoolCnvSvc/python/ReadAthenaPool.py index 7748a115c4b9..bc645a681acf 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/python/ReadAthenaPool.py +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/python/ReadAthenaPool.py @@ -49,11 +49,9 @@ def _configureReadAthenaPool(): # Enable IOVDbSvc to read MetaData svcMgr.MetaDataSvc.MetaDataContainer = "MetaDataHdr" - svcMgr.MetaDataSvc.MetaDataTools += [ CfgMgr.IOVDbMetaDataTool() ] - - #svcMgr.MetaDataSvc.MetaDataTools += [ "IOVDbMetaDataTool" ] - #if not hasattr (svcMgr.ToolSvc, 'IOVDbMetaDataTool'): - # svcMgr.ToolSvc += CfgMgr.IOVDbMetaDataTool() + svcMgr.MetaDataSvc.MetaDataTools += [ "IOVDbMetaDataTool" ] + if not hasattr (svcMgr.ToolSvc, 'IOVDbMetaDataTool'): + svcMgr.ToolSvc += CfgMgr.IOVDbMetaDataTool() # Add in EventSelector svcMgr += CfgMgr.EventSelectorAthenaPool ("EventSelector") diff --git a/Event/ByteStreamCnvSvc/python/ReadByteStream.py b/Event/ByteStreamCnvSvc/python/ReadByteStream.py index 5ff19fd6cf4c..301a7b47fad9 100644 --- a/Event/ByteStreamCnvSvc/python/ReadByteStream.py +++ b/Event/ByteStreamCnvSvc/python/ReadByteStream.py @@ -58,10 +58,15 @@ if not hasattr (svcMgr, 'MetaDataStore'): # enable IOVDbSvc to read metadata svcMgr.MetaDataSvc.MetaDataContainer = "MetaDataHdr" -svcMgr.MetaDataSvc.MetaDataTools += [ CfgMgr.IOVDbMetaDataTool() ] +svcMgr.MetaDataSvc.MetaDataTools += [ "IOVDbMetaDataTool" ] + +if not hasattr (svcMgr.ToolSvc, 'IOVDbMetaDataTool'): + svcMgr.ToolSvc += CfgMgr.IOVDbMetaDataTool() # Enable ByteStream to read MetaData -svcMgr.MetaDataSvc.MetaDataTools += [ CfgMgr.ByteStreamMetadataTool() ] +svcMgr.MetaDataSvc.MetaDataTools += [ "ByteStreamMetadataTool" ] +if not hasattr (svcMgr.ToolSvc, 'ByteStreamMetadataTool'): + svcMgr.ToolSvc += CfgMgr.ByteStreamMetadataTool() # User metadata in FMD if not hasattr (svcMgr, 'ByteStreamAttListMetadataSvc'): diff --git a/Event/EventBookkeeperTools/python/CutFlowHelpers.py b/Event/EventBookkeeperTools/python/CutFlowHelpers.py index 8534bf81ca27..98b28176bd21 100644 --- a/Event/EventBookkeeperTools/python/CutFlowHelpers.py +++ b/Event/EventBookkeeperTools/python/CutFlowHelpers.py @@ -80,6 +80,8 @@ def CreateCutFlowSvc( svcName="CutFlowSvc", athFile=None, seq=None, addAlgInPlac cutflowtool = BookkeeperTool(outname+"Tool", InputCollName = inname, OutputCollName= outname) + svcMgr.ToolSvc += cutflowtool + # Add tool to MetaDataSvc svcMgr.MetaDataSvc.MetaDataTools += [cutflowtool] @@ -94,6 +96,7 @@ def CreateCutFlowSvc( svcName="CutFlowSvc", athFile=None, seq=None, addAlgInPlac pdfweighttool = BookkeeperTool(name, OutputCollName= name, InputCollName = name) + svcMgr.ToolSvc += pdfweighttool # Add tool to MetaDataSvc svcMgr.MetaDataSvc.MetaDataTools += [pdfweighttool] diff --git a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py index 391be9044e56..d59cba6d3e74 100644 --- a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py +++ b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py @@ -1008,8 +1008,8 @@ if globalflags.InputFormat()=='bytestream': # enable IOVDbSvc to read metadata svcMgr.MetaDataSvc.MetaDataContainer = "MetaDataHdr" - from IOVDbMetaDataTools.IOVDbMetaDataToolsConf import IOVDbMetaDataTool - svcMgr.MetaDataSvc.MetaDataTools += [ IOVDbMetaDataTool() ] + if not hasattr (svcMgr.ToolSvc, 'IOVDbMetaDataTool'): + svcMgr.MetaDataSvc.MetaDataTools += [ "IOVDbMetaDataTool" ] MetaDataStore=svcMgr.MetaDataStore @@ -1027,11 +1027,13 @@ if rec.doFileMetaData(): else: #ok to use the metadata tool if single process from LumiBlockComps.LumiBlockCompsConf import LumiBlockMetaDataTool - svcMgr.MetaDataSvc.MetaDataTools += [ LumiBlockMetaDataTool() ] + svcMgr.MetaDataSvc.MetaDataTools += [ "LumiBlockMetaDataTool" ] # Trigger tool - svcMgr.MetaDataSvc.MetaDataTools += [ CfgMgr.xAODMaker__TriggerMenuMetaDataTool( "TriggerMenuMetaDataTool" ) ] + ToolSvc += CfgMgr.xAODMaker__TriggerMenuMetaDataTool( "TriggerMenuMetaDataTool" ) + svcMgr.MetaDataSvc.MetaDataTools += [ ToolSvc.TriggerMenuMetaDataTool ] # EventFormat tool - svcMgr.MetaDataSvc.MetaDataTools += [ CfgMgr.xAODMaker__EventFormatMetaDataTool( "EventFormatMetaDataTool" ) ] + ToolSvc += CfgMgr.xAODMaker__EventFormatMetaDataTool( "EventFormatMetaDataTool" ) + svcMgr.MetaDataSvc.MetaDataTools += [ ToolSvc.EventFormatMetaDataTool ] else: # Create LumiBlock meta data containers *before* creating the output StreamESD/AOD @@ -1052,7 +1054,8 @@ if rec.doFileMetaData(): try: # ByteStreamMetadata from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamMetadataTool - svcMgr.MetaDataSvc.MetaDataTools += [ ByteStreamMetadataTool() ] + if not hasattr (svcMgr.ToolSvc, 'ByteStreamMetadataTool'): + svcMgr.MetaDataSvc.MetaDataTools += [ "ByteStreamMetadataTool" ] except Exception: treatException("Could not load ByteStreamMetadataTool") @@ -1430,14 +1433,13 @@ if rec.doWriteAOD(): if rec.doFileMetaData(): # Trigger tool - trigMDTool= CfgMgr.xAODMaker__TriggerMenuMetaDataTool( "TriggerMenuMetaDataTool") - if not trigMDTool in svcMgr.MetaDataSvc.MetaDataTools: - svcMgr.MetaDataSvc.MetaDataTools += [ trigMDTool ] + ToolSvc += CfgMgr.xAODMaker__TriggerMenuMetaDataTool( "TriggerMenuMetaDataTool") + + svcMgr.MetaDataSvc.MetaDataTools += [ ToolSvc.TriggerMenuMetaDataTool ] # EventFormat tool - - efMDTool=CfgMgr.xAODMaker__EventFormatMetaDataTool( "EventFormatMetaDataTool") - if not efMDTool in svcMgr.MetaDataSvc.MetaDataTools: - svcMgr.MetaDataSvc.MetaDataTools += [ efMDTool ] + ToolSvc += CfgMgr.xAODMaker__EventFormatMetaDataTool( "EventFormatMetaDataTool") + + svcMgr.MetaDataSvc.MetaDataTools += [ ToolSvc.EventFormatMetaDataTool ] # Put MetaData in AOD stream via AugmentedPoolStream_ # Write all meta data containers StreamAOD_Augmented.AddMetaDataItem(dfMetadataItemList()) diff --git a/Reconstruction/RecJobTransforms/share/skeleton.RAWtoESD_tf.py b/Reconstruction/RecJobTransforms/share/skeleton.RAWtoESD_tf.py index d050a148d1c6..59c331a419e8 100644 --- a/Reconstruction/RecJobTransforms/share/skeleton.RAWtoESD_tf.py +++ b/Reconstruction/RecJobTransforms/share/skeleton.RAWtoESD_tf.py @@ -200,7 +200,9 @@ if hasattr(runArgs,"topOptions"): include(runArgs.topOptions) else: include( "RecExCommon/RecExCommon_topOptions.py" ) if hasattr(runArgs,"inputRDO_TRIGFile") and rec.doFileMetaData(): - svcMgr.MetaDataSvc.MetaDataTools += [ CfgMgr.xAODMaker__TriggerMenuMetaDataTool( "TriggerMenuMetaDataTool") ] + ToolSvc += CfgMgr.xAODMaker__TriggerMenuMetaDataTool( "TriggerMenuMetaDataTool", + OutputLevel = 3 ) + svcMgr.MetaDataSvc.MetaDataTools += [ ToolSvc.TriggerMenuMetaDataTool ] #========================================================== # Use LZIB for compression of temporary outputs of AthenaMP diff --git a/Trigger/TrigConfiguration/TrigConfigSvc/python/TriggerConfig.py b/Trigger/TrigConfiguration/TrigConfigSvc/python/TriggerConfig.py index 49932159d721..16be1649eceb 100644 --- a/Trigger/TrigConfiguration/TrigConfigSvc/python/TriggerConfig.py +++ b/Trigger/TrigConfiguration/TrigConfigSvc/python/TriggerConfig.py @@ -180,12 +180,16 @@ def _setupConfig(): from AthenaCommon.AppMgr import ServiceMgr as svcMgr from AthenaCommon.AppMgr import ToolSvc - if not hasattr( svcMgr, 'MetaDataSvc' ): + if not hasattr( ToolSvc, 'IOVDbMetaDataTool' ): from IOVDbMetaDataTools.IOVDbMetaDataToolsConf import IOVDbMetaDataTool + ToolSvc += IOVDbMetaDataTool( "IOVDbMetaDataTool" ) + + + if not hasattr( svcMgr, 'MetaDataSvc' ): from AthenaServices.AthenaServicesConf import MetaDataSvc svcMgr += MetaDataSvc( "MetaDataSvc" ) svcMgr.MetaDataSvc.MetaDataContainer = "MetaDataHdr" - svcMgr.MetaDataSvc.MetaDataTools += [ IOVDbMetaDataTool() ] + svcMgr.MetaDataSvc.MetaDataTools += [ "IOVDbMetaDataTool" ] # for debugging uncomment the following three lines from AthenaCommon.Constants import VERBOSE -- GitLab From 58fa82731491d613a4a3d7b4adb75de4151f852d Mon Sep 17 00:00:00 2001 From: John Chapman <jchapman@cern.ch> Date: Mon, 9 Jul 2018 13:49:58 +0200 Subject: [PATCH 420/562] Revert "Merge branch 'config.ByteStreamCnvSvc-20180619' into 'master'" This reverts commit 05908ffaba7783bad9cd8d0fe5328343b0b9bd1e [formerly a8b54d55c1f0242d245a0a12c12fbc58ad93daa7], reversing changes made to b2a24b9e310a3d8a0a95f27926fdaee7da8b6a33 [formerly ad7dbb4f2172198e1aab149c2b216c715cbbc440]. Former-commit-id: 1da4678a9627c5841fa86d9bf690c7fec0e63c33 --- Event/ByteStreamCnvSvc/python/ByteStreamConfig.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py b/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py index ba2f8f51f92c..4da7c633c0f6 100644 --- a/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py +++ b/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py @@ -46,9 +46,11 @@ def TrigBSReadCfg( inputFlags ): from IOVDbMetaDataTools.IOVDbMetaDataToolsConf import IOVDbMetaDataTool iovMetaDataTool = IOVDbMetaDataTool() + acc.addPublicTool( iovMetaDataTool ) from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamMetadataTool bsMetaDataTool = ByteStreamMetadataTool() + acc.addPublicTool( bsMetaDataTool ) from StoreGate.StoreGateConf import ProxyProviderSvc, StoreGateSvc metaDataStore = StoreGateSvc("MetaDataStore") -- GitLab From 82397439b2bcccd9fed62236c6eefac5f4071236 Mon Sep 17 00:00:00 2001 From: Jovan Mitrevski <Jovan.Mitrevski@cern.ch> Date: Mon, 9 Jul 2018 15:12:20 +0200 Subject: [PATCH 421/562] Fixed configuration, so this is the first working version of egammaMVASvc. Former-commit-id: 1173d188845adc070e9c07def56136ab9a9c93df --- .../egammaInterfaces/IegammaMVASvc.h | 9 ++++- .../python/TrigEgammaMVACalibFactories.py | 40 +++++++++++++++++++ .../python/egammaMVACalibFactories.py | 33 +++++++++++++++ .../egammaMVACalib/src/egammaMVACalibTool.cxx | 12 +++++- .../egammaMVACalib/src/egammaMVACalibTool.h | 4 +- .../egammaMVACalib/src/egammaMVASvc.cxx | 24 +++++++---- .../egamma/egammaMVACalib/src/egammaMVASvc.h | 2 +- .../python/egammaToolsFactories.py | 24 +---------- .../python/TrigEgammaToolFactories.py | 3 -- .../python/TrigEFCaloCalibFexConfig.py | 8 ++-- 10 files changed, 118 insertions(+), 41 deletions(-) create mode 100644 Reconstruction/egamma/egammaMVACalib/python/TrigEgammaMVACalibFactories.py create mode 100644 Reconstruction/egamma/egammaMVACalib/python/egammaMVACalibFactories.py diff --git a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVASvc.h b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVASvc.h index 9eb2ec6d3d01..b30174fc6cd1 100644 --- a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVASvc.h +++ b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVASvc.h @@ -22,10 +22,17 @@ public: virtual ~IegammaMVASvc() override {}; + /// Standard execute when you have both cluster and eg object virtual StatusCode execute(xAOD::CaloCluster* cluster, const xAOD::Egamma* eg) const = 0; + + /// An execute that just has cluster and egType. A converted photon + /// is treated like an unconverted photon since no access to vertex. virtual StatusCode execute(xAOD::CaloCluster* cluster, - const xAOD::EgammaParameters::EgammaType egType) const = 0; + xAOD::EgammaParameters::EgammaType egType) const = 0; + + /// The old hlt interface. Consider migrating to the one above + /// since it's more efficient to use enums instead of strings. virtual StatusCode hltexecute(xAOD::CaloCluster* cluster, const std::string& egType) const =0; diff --git a/Reconstruction/egamma/egammaMVACalib/python/TrigEgammaMVACalibFactories.py b/Reconstruction/egamma/egammaMVACalib/python/TrigEgammaMVACalibFactories.py new file mode 100644 index 000000000000..1071ebe87711 --- /dev/null +++ b/Reconstruction/egamma/egammaMVACalib/python/TrigEgammaMVACalibFactories.py @@ -0,0 +1,40 @@ +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + +__doc__ = "Tool and service factories to instantiate MVA calibration for trigger" +__author__ = "Jovan Mitrevski" + + +from egammaRec.Factories import ToolFactory, ServiceFactory + +import logging +mlog = logging.getLogger ('TrigEgammaMVACalibFactories') + +from egammaMVACalib import egammaMVACalibConf +from TriggerMenu.egamma.EgammaSliceFlags import EgammaSliceFlags +mlog.info("MVA version version %s"%EgammaSliceFlags.calibMVAVersion() ) +mlog.info("Cluster Correction version %s"%EgammaSliceFlags.clusterCorrectionVersion() ) +EgammaSliceFlags.calibMVAVersion.set_On() + +import cppyy +cppyy.loadDictionary('xAODEgammaDict') +from ROOT import xAOD + + +TrigElectronMVATool = ToolFactory(egammaMVACalibConf.egammaMVACalibTool, + name = "TrigElectronMVATool", + ParticleType = xAOD.EgammaParameters.electron, + folder=EgammaSliceFlags.calibMVAVersion(), + use_layer_corrected = False) + +TrigPhotonMVATool = ToolFactory(egammaMVACalibConf.egammaMVACalibTool, + name = "TrigPhotonMVATool", + ParticleType = xAOD.EgammaParameters.unconvertedPhoton, + folder=EgammaSliceFlags.calibMVAVersion(), + use_layer_corrected = False) + + +TrigEgammaMVASvc = ServiceFactory(egammaMVACalibConf.egammaMVASvc, name = "TrigEgammaMVASvc", + ElectronTool = TrigElectronMVATool, + UnconvertedPhotonTool = TrigPhotonMVATool) + +del mlog diff --git a/Reconstruction/egamma/egammaMVACalib/python/egammaMVACalibFactories.py b/Reconstruction/egamma/egammaMVACalib/python/egammaMVACalibFactories.py new file mode 100644 index 000000000000..bf1b8081a07c --- /dev/null +++ b/Reconstruction/egamma/egammaMVACalib/python/egammaMVACalibFactories.py @@ -0,0 +1,33 @@ +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + +__doc__ = "Tool and service factories to instantiate MVA calibration" +__author__ = "Jovan Mitrevski" + + +from egammaRec.Factories import ToolFactory, ServiceFactory + +from egammaMVACalib import egammaMVACalibConf +from egammaRec.egammaRecFlags import jobproperties +import cppyy +cppyy.loadDictionary('xAODEgammaDict') +from ROOT import xAOD + +electronMVATool = ToolFactory(egammaMVACalibConf.egammaMVACalibTool, + name = "electronMVATool", + ParticleType = xAOD.EgammaParameters.electron, + folder=jobproperties.egammaRecFlags.calibMVAVersion()) + +unconvPhotonMVATool = ToolFactory(egammaMVACalibConf.egammaMVACalibTool, + name = "unconvPhotonMVATool", + ParticleType = xAOD.EgammaParameters.unconvertedPhoton, + folder=jobproperties.egammaRecFlags.calibMVAVersion()) + +convertedPhotonMVATool = ToolFactory(egammaMVACalibConf.egammaMVACalibTool, + name = "convertePhotonMVATool", + ParticleType = xAOD.EgammaParameters.convertedPhoton, + folder=jobproperties.egammaRecFlags.calibMVAVersion()) + +egammaMVASvc = ServiceFactory(egammaMVACalibConf.egammaMVASvc, + ElectronTool = electronMVATool, + UnconvertedPhotonTool = unconvPhotonMVATool, + ConvertedPhotonTool = convertedPhotonMVATool) diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx index 82be8cf889d0..2300fbc754c7 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx @@ -27,6 +27,8 @@ egammaMVACalibTool::~egammaMVACalibTool() StatusCode egammaMVACalibTool::initialize() { + ATH_MSG_DEBUG("Initializing with particle " << m_particleType); + if (m_shiftType == MEAN10TOTRUE) { ATH_MSG_DEBUG("Using Mean10 shift"); } else if (m_shiftType == NOSHIFT) { @@ -77,6 +79,9 @@ StatusCode egammaMVACalibTool::setupBDT(const std::unordered_map<std::string, const xAOD::CaloCluster*)> >& funcLibrary, std::string fileName) { + + ATH_MSG_DEBUG("Trying to open " << fileName); + std::unique_ptr<TFile> f(TFile::Open(fileName.c_str())); if (!f || f->IsZombie() ) { ATH_MSG_FATAL("Could not open file: " << fileName); @@ -472,6 +477,9 @@ float egammaMVACalibTool::getEnergy(const xAOD::Egamma* eg, const xAOD::CaloCluster* clus) const { + ATH_MSG_DEBUG("calling getEnergy with cluster (" << clus << ") and eg (" << eg <<")"); + + if (!clus && eg) { clus = eg->caloCluster(); } @@ -492,12 +500,14 @@ float egammaMVACalibTool::getEnergy(const xAOD::Egamma* eg, const auto bin = m_hPoly->FindBin(etaVar, energyVarGeV) - 1; // poly bins are shifted by one + ATH_MSG_DEBUG("Using bin: " << bin); + // select the bdt and funcsions. (shifts are done later if needed) const auto& bdt = m_BDTs[bin]; const auto& funcs = m_funcs[bin]; const size_t sz = funcs.size(); - + // could consider adding std::array support to the BDTs std::vector<float> vars(sz); diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h index 316a89fef179..fa3f61be30d8 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h @@ -66,11 +66,11 @@ private: /// string with folder for weight files Gaudi::Property<std::string> m_folder {this, - "folder", "egammaMVACalib/offline/v3", + "folder", "", "string with folder for weight files"}; Gaudi::Property<bool> m_use_layer_corrected {this, - "use_layer_corrected", true, + "use_layer_corrected", false, "whether to use layer corrections"}; /// A TH2Poly used to extract bin numbers. Note there is an offset of 1 diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx index 42f93c8f16e6..b260b931c149 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx @@ -26,20 +26,26 @@ StatusCode egammaMVASvc::initialize() ATH_MSG_DEBUG("In initialize of " << name() << "..." ); if (m_mvaElectron.isEnabled()) { + ATH_MSG_DEBUG("Retrieving mvaElectron"); ATH_CHECK(m_mvaElectron.retrieve()); } else { + ATH_MSG_DEBUG("Disabling mvaElectron"); m_mvaElectron.disable(); } if (m_mvaUnconvertedPhoton.isEnabled()) { + ATH_MSG_DEBUG("Retrieving mvaUnconvertedPhoton"); ATH_CHECK(m_mvaUnconvertedPhoton.retrieve()); } else { + ATH_MSG_DEBUG("Disabling mvaUnconvertedPhoton"); m_mvaUnconvertedPhoton.disable(); } if (m_mvaConvertedPhoton.isEnabled()) { + ATH_MSG_DEBUG("Retrieving mvaConvertedPhoton"); ATH_CHECK(m_mvaConvertedPhoton.retrieve()); } else { + ATH_MSG_DEBUG("Disabling mvaConvertedPhoton"); m_mvaConvertedPhoton.disable(); } @@ -55,6 +61,9 @@ StatusCode egammaMVASvc::finalize(){ StatusCode egammaMVASvc::execute(xAOD::CaloCluster* cluster, const xAOD::Egamma* eg) const { + + ATH_MSG_DEBUG("calling execute with cluster (" << cluster << ") and eg (" << eg <<")"); + if (!eg || !cluster) { ATH_MSG_FATAL("Invalid Pointer to egamma or cluster object"); return StatusCode::FAILURE; @@ -102,8 +111,11 @@ StatusCode egammaMVASvc::execute(xAOD::CaloCluster* cluster, } StatusCode egammaMVASvc::execute(xAOD::CaloCluster* cluster, - const xAOD::EgammaParameters::EgammaType egType) const + xAOD::EgammaParameters::EgammaType egType) const { + + ATH_MSG_DEBUG("calling execute with cluster (" << cluster << ") and egType (" << egType <<")"); + if (!cluster) { ATH_MSG_ERROR("Invalid Pointer to egamma or cluster object"); return StatusCode::FAILURE; @@ -119,14 +131,8 @@ StatusCode egammaMVASvc::execute(xAOD::CaloCluster* cluster, } break; case xAOD::EgammaParameters::convertedPhoton: - if (m_mvaConvertedPhoton.isEnabled()) { - mvaE = m_mvaConvertedPhoton->getEnergy(nullptr, cluster); - } else { - ATH_MSG_FATAL("Trying to calibrate a converted photon, but disabled"); - return StatusCode::FAILURE; - } - break; case xAOD::EgammaParameters::unconvertedPhoton: + // treat converted photons like unconverted photons since don't have access to vertex if (m_mvaUnconvertedPhoton.isEnabled()) { mvaE = m_mvaUnconvertedPhoton->getEnergy(nullptr, cluster); } else { @@ -151,6 +157,8 @@ StatusCode egammaMVASvc::execute(xAOD::CaloCluster* cluster, return StatusCode::SUCCESS; } +// I wonder if this should be removed, and the user should just use the execute +// with egType passed as an xAOD::EgammaParameters::EgammaType instead of a string StatusCode egammaMVASvc::hltexecute(xAOD::CaloCluster* cluster, const std::string& egType) const { if (egType == "Electron") { diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h index 17f6ddac968a..92e1602e0850 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h @@ -39,7 +39,7 @@ public: const xAOD::Egamma* eg) const override final; StatusCode execute(xAOD::CaloCluster* cluster, - const xAOD::EgammaParameters::EgammaType egType) const override final; + xAOD::EgammaParameters::EgammaType egType) const override final; StatusCode hltexecute(xAOD::CaloCluster* cluster, const std::string& egType) const override final; diff --git a/Reconstruction/egamma/egammaTools/python/egammaToolsFactories.py b/Reconstruction/egamma/egammaTools/python/egammaToolsFactories.py index 61dce1c3a9ff..9c52a1e9c838 100644 --- a/Reconstruction/egamma/egammaTools/python/egammaToolsFactories.py +++ b/Reconstruction/egamma/egammaTools/python/egammaToolsFactories.py @@ -4,7 +4,7 @@ __doc__ = "ToolFactories to instantiate all egammaTools with default configurati __author__ = "Bruno Lenzi" import egammaToolsConf -from egammaRec.Factories import FcnWrapper, ToolFactory, ServiceFactory, FullNameWrapper +from egammaRec.Factories import FcnWrapper, ToolFactory, FullNameWrapper from egammaRec import egammaKeys from egammaRec.egammaRecFlags import jobproperties # to set jobproperties.egammaRecFlags from RecExConfig.RecFlags import rec @@ -48,27 +48,7 @@ def configureClusterCorrections(swTool): egammaSwTool = ToolFactory(egammaToolsConf.egammaSwTool, postInit=[configureClusterCorrections]) -from egammaMVACalib import egammaMVACalibConf -import cppyy -cppyy.loadDictionary('xAODEgammaDict') -from ROOT import xAOD - -electronMVATool = ToolFactory(egammaMVACalibConf.egammaMVACalibTool, - ParticleType = xAOD.EgammaParameters.electron, - folder=jobproperties.egammaRecFlags.calibMVAVersion()) - -unconvPhotonMVATool = ToolFactory(egammaMVACalibConf.egammaMVACalibTool, - ParticleType = xAOD.EgammaParameters.unconvertedPhoton, - folder=jobproperties.egammaRecFlags.calibMVAVersion()) - -convertedPhotonMVATool = ToolFactory(egammaMVACalibConf.egammaMVACalibTool, - ParticleType = xAOD.EgammaParameters.convertedPhoton, - folder=jobproperties.egammaRecFlags.calibMVAVersion()) - -egammaMVASvc = ServiceFactory(egammaMVACalibConf.egammaMVASvc, - ElectronTool = electronMVATool, - UnconvertedPhotonTool = unconvPhotonMVATool, - ConvertedPhotonTool = convertedPhotonMVATool) +from egammaMVACalib.egammaMVACalibFactories import egammaMVASvc EMClusterTool = ToolFactory(egammaToolsConf.EMClusterTool, OutputClusterContainerName = egammaKeys.outputClusterKey(), diff --git a/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaToolFactories.py b/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaToolFactories.py index c1d7f4297289..3c3f60136a59 100644 --- a/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaToolFactories.py +++ b/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaToolFactories.py @@ -136,12 +136,9 @@ TrigEMShowerBuilder = EMShowerBuilder.copyPublic( ) from TriggerMenu.egamma.EgammaSliceFlags import EgammaSliceFlags -from egammaMVACalib import egammaMVACalibConf mlog.info("MVA version version %s"%EgammaSliceFlags.calibMVAVersion() ) mlog.info("Cluster Correction version %s"%EgammaSliceFlags.clusterCorrectionVersion() ) EgammaSliceFlags.calibMVAVersion.set_On() -TrigEgammaMVACalibTool = PublicToolFactory(egammaMVACalibConf.egammaMVATool,name="TrigEgammaMVACalibTool", - folder=EgammaSliceFlags.calibMVAVersion(),use_layer_corrected = False) from TrigCaloRec.TrigCaloRecConf import TrigCaloClusterMaker diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEFCaloCalibFexConfig.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEFCaloCalibFexConfig.py index d3491d181dc2..70fc0b369e2b 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEFCaloCalibFexConfig.py +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEFCaloCalibFexConfig.py @@ -12,7 +12,9 @@ from AthenaCommon.SystemOfUnits import GeV, mm from AthenaCommon.AppMgr import ToolSvc from egammaRec.Factories import Factory, ToolFactory -from TrigEgammaRec.TrigEgammaToolFactories import TrigEgammaMVACalibTool + +from egammaMVACalib.TrigEgammaMVACalibFactories import TrigEgammaMVASvc + def configureTrigEFCaloCalibFexMonitoring(tool): from TrigEgammaHypo.TrigEFCaloHypoMonitoring import TrigEFCaloCalibFexValidationMonitoring, TrigEFCaloCalibFexOnlineMonitoring @@ -26,7 +28,7 @@ def configureTrigEFCaloCalibFexMonitoring(tool): TrigEFCaloCalibFex_Electron = Factory(TrigEgammaHypoConf.TrigEFCaloCalibFex, name = "TrigEFCaloCalibFex_Electron", doAdd=False, AcceptAll = True, ApplyMVACalib = True, - MVACalibTool = TrigEgammaMVACalibTool, + MVACalibSvc = TrigEgammaMVASvc, egType = 'Electron', ClusterContainerKey = 'TrigEFCaloCalibFex', postInit = [configureTrigEFCaloCalibFexMonitoring], @@ -35,7 +37,7 @@ TrigEFCaloCalibFex_Electron = Factory(TrigEgammaHypoConf.TrigEFCaloCalibFex, nam TrigEFCaloCalibFex_Photon = Factory(TrigEgammaHypoConf.TrigEFCaloCalibFex, name = "TrigEFCaloCalibFex_Photon", doAdd=False, AcceptAll = True, ApplyMVACalib = True, - MVACalibTool = TrigEgammaMVACalibTool, + MVACalibSvc = TrigEgammaMVASvc, egType = 'Photon', ClusterContainerKey = 'TrigEFCaloCalibFex', postInit = [configureTrigEFCaloCalibFexMonitoring], -- GitLab From 8b7f033a7f2c1842cf1f1e4971bff9aedf7dbdf5 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Mon, 9 Jul 2018 18:37:07 +0200 Subject: [PATCH 422/562] Solve coverity 14679 and 113075 Former-commit-id: de78b363f394fbed2302f026d794eefa9970d19e --- .../SiTools_xk.h | 44 ++----------- .../SiTrajectoryElement_xk.h | 4 +- .../src/SiTrajectoryElement_xk.cxx | 65 ++++++++++--------- 3 files changed, 42 insertions(+), 71 deletions(-) diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTools_xk.h b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTools_xk.h index 9ffe946c03c6..2c9bd32c8898 100755 --- a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTools_xk.h +++ b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTools_xk.h @@ -34,9 +34,9 @@ namespace InDet{ public: SiTools_xk(); - SiTools_xk(const SiTools_xk&); + SiTools_xk(const SiTools_xk&) = default; ~SiTools_xk(); - SiTools_xk& operator = (const SiTools_xk&); + SiTools_xk& operator = (const SiTools_xk&) = default; /////////////////////////////////////////////////////////////////// // Main methods @@ -75,11 +75,8 @@ namespace InDet{ MagField::IMagFieldSvc* ); - void setTools - (const Trk::MagneticFieldProperties&); - + void setTools(const Trk::MagneticFieldProperties&); void setTools(IInDetConditionsTool*,IInDetConditionsTool*); - void setXi2pTmin(const double&,const double&,const double&,const double&); void setHolesClusters(const int&,const int&,const int&); void setAssociation(const int&); @@ -130,6 +127,7 @@ namespace InDet{ inline SiTools_xk::SiTools_xk() { m_assoTool = 0 ; + m_fieldService= 0 ; m_proptool = 0 ; m_updatortool = 0 ; m_riotool = 0 ; @@ -148,42 +146,10 @@ namespace InDet{ m_multitrack = false; m_bremnoise = false; m_electron = false; - m_fieldService= 0 ; + m_heavyion = false; } - inline SiTools_xk::SiTools_xk(const SiTools_xk& T) - { - *this = T; - } - inline SiTools_xk& SiTools_xk::operator = - (const SiTools_xk& T) - { - if(&T!=this) { - m_assoTool = T.m_assoTool ; - m_fieldtool = T.m_fieldtool ; - m_fieldService= T.m_fieldService; - m_proptool = T.m_proptool ; - m_updatortool = T.m_updatortool; - m_riotool = T.m_riotool ; - m_pixcond = T.m_pixcond ; - m_sctcond = T.m_sctcond ; - m_xi2max = T.m_xi2max ; - m_xi2maxBrem = T.m_xi2maxBrem ; - m_xi2maxlink = T.m_xi2maxlink ; - m_xi2multi = T.m_xi2multi ; - m_pTmin = T.m_pTmin ; - m_nholesmax = T.m_nholesmax ; - m_dholesmax = T.m_dholesmax ; - m_nclusmin = T.m_nclusmin ; - m_useassoTool = T.m_useassoTool; - m_multitrack = T.m_multitrack ; - m_bremnoise = T.m_bremnoise ; - m_electron = T.m_electron ; - m_heavyion = T.m_heavyion ; - } - return(*this); - } inline SiTools_xk::~SiTools_xk() {} diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTrajectoryElement_xk.h b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTrajectoryElement_xk.h index f5720d7f013b..ce86080e791a 100755 --- a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTrajectoryElement_xk.h +++ b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTrajectoryElement_xk.h @@ -16,7 +16,6 @@ #define SiTrajectoryElement_xk_H #include "InDetPrepRawData/SiClusterCollection.h" -#include "TrkTrack/TrackStateOnSurface.h" #include "TrkPatternParameters/PatternTrackParameters.h" #include "TrkPatternParameters/NoiseOnSurface.h" @@ -24,6 +23,9 @@ #include "SiCombinatorialTrackFinderTool_xk/SiClusterLink_xk.h" #include "SiCombinatorialTrackFinderTool_xk/SiDetElementBoundaryLink_xk.h" +#include "TrkTrack/TrackStateOnSurface.h" + + namespace InDet{ class SiTrajectoryElement_xk diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiTrajectoryElement_xk.cxx b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiTrajectoryElement_xk.cxx index dfda6f280504..adc7fa4d43d9 100755 --- a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiTrajectoryElement_xk.cxx +++ b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiTrajectoryElement_xk.cxx @@ -2,8 +2,6 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include <iostream> -#include <iomanip> #include "TrkSurfaces/PerigeeSurface.h" #include "TrkSurfaces/AnnulusBounds.h" @@ -15,6 +13,8 @@ #include "InDetRIO_OnTrack/PixelClusterOnTrack.h" #include "InDetRIO_OnTrack/SCT_ClusterOnTrack.h" +#include <stdexcept> +#include <math.h>//for sincos function /////////////////////////////////////////////////////////////////// // Set trajectory element @@ -28,7 +28,8 @@ bool InDet::SiTrajectoryElement_xk::set const InDet::SiCluster* si ) { - m_fieldMode = false; if(m_tools->fieldTool().magneticFieldMode()!=0) m_fieldMode = true; + m_fieldMode = false; + if(m_tools->fieldTool().magneticFieldMode()!=0) m_fieldMode = true; m_status = 0 ; m_detstatus = st ; m_ndist = 0 ; @@ -1457,18 +1458,16 @@ double InDet::SiTrajectoryElement_xk::quality(int& holes) const // to PlaneSurface Ta->pSu = Tb with step to surface calculation ///////////////////////////////////////////////////////////////////////////////// -bool InDet::SiTrajectoryElement_xk::propagate -(Trk::PatternTrackParameters & Ta, +bool +InDet::SiTrajectoryElement_xk::propagate(Trk::PatternTrackParameters & Ta, Trk::PatternTrackParameters & Tb, - double & S ) -{ - bool useJac = true; if(!Ta.iscovariance()) useJac = false; - - double P[64]; transformPlaneToGlobal(useJac,Ta,P); - + double & S ) { + bool useJac = true; + if(!Ta.iscovariance()) useJac = false; + double P[64]; + transformPlaneToGlobal(useJac,Ta,P); if( m_fieldMode) {if(!rungeKuttaToPlane (useJac,P)) return false;} else {if(!straightLineStepToPlane(useJac,P)) return false;} - S = P[45]; return transformGlobalToPlane(useJac,P,Ta,Tb); } @@ -1477,32 +1476,36 @@ bool InDet::SiTrajectoryElement_xk::propagate // to PlaneSurface Ta->pSu = Tb with step to surface calculation ///////////////////////////////////////////////////////////////////////////////// -bool InDet::SiTrajectoryElement_xk::propagateParameters -(Trk::PatternTrackParameters & Ta, - Trk::PatternTrackParameters & Tb, - double & S ) -{ +bool +InDet::SiTrajectoryElement_xk::propagateParameters(Trk::PatternTrackParameters & Ta, + Trk::PatternTrackParameters & Tb, double & S ) { bool useJac = false; - - double P[64]; transformPlaneToGlobal(useJac,Ta,P); - - if( m_fieldMode) {if(!rungeKuttaToPlane (useJac,P)) return false;} - else {if(!straightLineStepToPlane(useJac,P)) return false;} - - S = P[45]; return transformGlobalToPlane(useJac,P,Ta,Tb); + double P[64]; + transformPlaneToGlobal(useJac,Ta,P); + if( m_fieldMode) { + if(!rungeKuttaToPlane (useJac,P)) return false; + } else { + if(!straightLineStepToPlane(useJac,P)) return false; + } + S = P[45]; + return transformGlobalToPlane(useJac,P,Ta,Tb); } ///////////////////////////////////////////////////////////////////////////////// // Tramsform from plane to global ///////////////////////////////////////////////////////////////////////////////// -void InDet::SiTrajectoryElement_xk::transformPlaneToGlobal -(bool useJac,Trk::PatternTrackParameters& Tp,double* P) -{ - double Sf,Cf,Ce,Se; sincos(Tp.par()[2],&Sf,&Cf); sincos(Tp.par()[3],&Se,&Ce); - - const Amg::Transform3D& T = Tp.associatedSurface()->transform(); - +void InDet::SiTrajectoryElement_xk::transformPlaneToGlobal(bool useJac, + Trk::PatternTrackParameters& Tp,double* P) { + double Sf,Cf,Ce,Se; + sincos(Tp.par()[2],&Sf,&Cf); + sincos(Tp.par()[3],&Se,&Ce); + const auto pSurface=Tp.associatedSurface(); + if (not pSurface){ + throw(std::runtime_error("TrackParameters associated surface is null pointer in InDet::SiTrajectoryElement_xk::transformPlaneToGlobal")); + } + const Amg::Transform3D& T = pSurface->transform(); + double Ax[3] = {T(0,0),T(1,0),T(2,0)}; double Ay[3] = {T(0,1),T(1,1),T(2,1)}; -- GitLab From 7f00fd587152f156be165f9e7147d9509250e845 Mon Sep 17 00:00:00 2001 From: Peter van Gemmeren <gemmeren@anl.gov> Date: Mon, 9 Jul 2018 13:02:34 -0500 Subject: [PATCH 423/562] Switch on ROOT implicit multithreadin for AthenaMT jobs. Former-commit-id: 794836268a56670b877dba461853d24f5226daf4 --- .../APR/RootStorageSvc/src/RootDomain.cpp | 26 ++++++++++++------- Database/AthenaPOOL/PoolSvc/src/PoolSvc.cxx | 13 ++++++++-- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/Database/APR/RootStorageSvc/src/RootDomain.cpp b/Database/APR/RootStorageSvc/src/RootDomain.cpp index 36081a7593f4..6fe0734c1fc2 100755 --- a/Database/APR/RootStorageSvc/src/RootDomain.cpp +++ b/Database/APR/RootStorageSvc/src/RootDomain.cpp @@ -89,6 +89,22 @@ DbStatus RootDomain::setOption(const DbOption& opt) { } return sc; } + else if ( !strcasecmp(n, "ENABLE_THREADSAFETY") ) { + bool multithreaded = false; + DbStatus sc = opt._getValue(multithreaded); + if ( sc.isSuccess() && multithreaded ) { + ROOT::EnableThreadSafety(); + } + return sc; + } + else if ( !strcasecmp(n, "ENABLE_IMPLICITMT") ) { + bool implicitMT = false; + DbStatus sc = opt._getValue(implicitMT); + if ( sc.isSuccess() && implicitMT ) { + ROOT::EnableImplicitMT(); + } + return sc; + } break; case 'F': if ( !strncasecmp(n+5, "READSTREAMERINFO",15) ) { @@ -100,16 +116,6 @@ DbStatus RootDomain::setOption(const DbOption& opt) { return sc; } break; - case 'M': - if( !strcasecmp(n, "MultiThreaded") ) { - bool multithreaded = false; - DbStatus sc = opt._getValue(multithreaded); - if( sc.isSuccess() && multithreaded ) { - ROOT::EnableThreadSafety(); - } - return sc; - } - break; case 'S': if ( !strcasecmp(n,"STREAM_MEMBER_WISE") ) { // int int val = 1; diff --git a/Database/AthenaPOOL/PoolSvc/src/PoolSvc.cxx b/Database/AthenaPOOL/PoolSvc/src/PoolSvc.cxx index 72c16c081292..f2a7ed230244 100644 --- a/Database/AthenaPOOL/PoolSvc/src/PoolSvc.cxx +++ b/Database/AthenaPOOL/PoolSvc/src/PoolSvc.cxx @@ -10,6 +10,7 @@ #include "PoolSvc.h" #include "GaudiKernel/IIoComponentMgr.h" +#include "GaudiKernel/ConcurrencyFlags.h" #include "PathResolver/PathResolver.h" @@ -198,10 +199,18 @@ StatusCode PoolSvc::setupPersistencySvc() { // Setup a persistency services m_persistencySvcVec.push_back(pool::IPersistencySvc::create(*m_catalog).release()); // Read Service m_pers_mut.push_back(new CallMutex); - if (!m_persistencySvcVec[IPoolSvc::kInputStream]->session().technologySpecificAttributes(pool::ROOT_StorageType.type()).setAttribute<bool>("MultiThreaded", true)) { - ATH_MSG_FATAL("Failed to enable multithreaded ROOT via PersistencySvc."); + if (!m_persistencySvcVec[IPoolSvc::kInputStream]->session().technologySpecificAttributes(pool::ROOT_StorageType.type()).setAttribute<bool>("ENABLE_THREADSAFETY", true)) { + ATH_MSG_FATAL("Failed to enable thread safety in ROOT via PersistencySvc."); return(StatusCode::FAILURE); } + // Switiching on ROOT implicit multi threading for AthenaMT + if (Gaudi::Concurrency::ConcurrencyFlags::numThreads() > 1) { + + if (!m_persistencySvcVec[IPoolSvc::kInputStream]->session().technologySpecificAttributes(pool::ROOT_StorageType.type()).setAttribute<bool>("ENABLE_IMPLICITMT", true)) { + ATH_MSG_FATAL("Failed to enable implicit multithreading in ROOT via PersistencySvc."); + return(StatusCode::FAILURE); + } + } m_contextMaxFile.insert(std::pair<unsigned int, int>(IPoolSvc::kInputStream, m_dbAgeLimit)); if (!connect(pool::ITransaction::READ).isSuccess()) { ATH_MSG_FATAL("Failed to connect Input PersistencySvc."); -- GitLab From 92895fe58c03047287e4980b6ed4c7183e138e4b Mon Sep 17 00:00:00 2001 From: Susumu Oda <Susumu.Oda@cern.ch> Date: Mon, 9 Jul 2018 22:08:00 +0200 Subject: [PATCH 424/562] Define BadErrors in SCT_ByteStreamErrors.h and use it in SCT_ByteStreamErrorsTool.cxx Former-commit-id: 27fc063e97e74706ec077465528c0aa260ce9bfd --- .../SCT_ConditionsData/SCT_ByteStreamErrors.h | 69 +++++++++++++++++++ .../src/SCT_ByteStreamErrorsTool.cxx | 16 +---- 2 files changed, 72 insertions(+), 13 deletions(-) diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ByteStreamErrors.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ByteStreamErrors.h index 467651a988b5..1d55c0fa6f8d 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ByteStreamErrors.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ByteStreamErrors.h @@ -60,12 +60,81 @@ #endif // SCT_DO_DESCRIPTION namespace SCT_ByteStreamErrors { + // Define enumerators enum errorTypes { SCT_ERRORTYPELIST(SCT_DO_ENUM) }; + // Define strings of enumerator static const std::string errorTypesDescription[]{ SCT_ERRORTYPELIST(SCT_DO_DESCRIPTION) }; + + // Define bad errors to be used in reconstruction and monitoring + static const std::vector<errorTypes> BadErrors = { + TimeOutError, + BCIDError, + LVL1IDError, + HeaderTrailerLimitError, + MaskedLink, + TruncatedROD, + ROBFragmentError, + MissingLinkHeaderError, + MaskedROD + }; + // Define bad errors in FE-link level to be used in monitoring + static const std::vector<errorTypes> LinkLevelBadErrors = { + TimeOutError, + BCIDError, + LVL1IDError, + HeaderTrailerLimitError, + MaskedLink + }; + // Define bad errors in ROD level to be used in monitoring + static const std::vector<errorTypes> RodLevelBadErrors = { + TruncatedROD, + ROBFragmentError, + MissingLinkHeaderError, // We cannot know which FE-link does not have header. We assign this error to all the FE-links of the ROD. + MaskedROD + }; + // Define errors in FE-link level to be used in monitoring (assigned by SCT_RodDecoder::addSingleError) + static const std::vector<errorTypes> LinkLevelErrors = { + ByteStreamParseError, + TimeOutError, + BCIDError, + LVL1IDError, + PreambleError, + FormatterError, + TrailerError, + TrailerOverflowError, + HeaderTrailerLimitError, + ABCDError, + RawError, + MaskedLink, + ABCDError_Chip0, + ABCDError_Chip1, + ABCDError_Chip2, + ABCDError_Chip3, + ABCDError_Chip4, + ABCDError_Chip5, + ABCDError_Error1, + ABCDError_Error2, + ABCDError_Error4, + TempMaskedChip0, + TempMaskedChip1, + TempMaskedChip2, + TempMaskedChip3, + TempMaskedChip4, + TempMaskedChip5, + ABCDError_Error7 + }; + // Define errors in ROD level to be used in monitoring (assigned by SCT_RodDecoder::addRODError) + static const std::vector<errorTypes> RodLevelErrors = { + RODClockError, + TruncatedROD, + ROBFragmentError, + MissingLinkHeaderError, // We cannot know which FE-link does not have header. We assign this error to all the FE-links of the ROD. + MaskedROD + }; } #endif // SCT_ByteStreamErrors_h diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx index c7c37e8cf89e..53c2c7ad5783 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx @@ -119,19 +119,9 @@ SCT_ByteStreamErrorsTool::isGood(const IdentifierHash& elementIdHash) const { bool result{true}; - const std::vector<SCT_ByteStreamErrors::errorTypes> errorsToBeChecked{ - SCT_ByteStreamErrors::TimeOutError, - SCT_ByteStreamErrors::BCIDError, - SCT_ByteStreamErrors::LVL1IDError, - SCT_ByteStreamErrors::MaskedLink, - SCT_ByteStreamErrors::ROBFragmentError, - SCT_ByteStreamErrors::MissingLinkHeaderError, - SCT_ByteStreamErrors::HeaderTrailerLimitError, - SCT_ByteStreamErrors::MaskedROD, - SCT_ByteStreamErrors::TruncatedROD}; - for (unsigned int i{0}; i<errorsToBeChecked.size(); i++) { - const std::set<IdentifierHash>& errorSet{getErrorSet(errorsToBeChecked[i], ctx)}; - result = (std::find(errorSet.begin(), errorSet.end(), elementIdHash) == errorSet.end()); + for (SCT_ByteStreamErrors::errorTypes badError: SCT_ByteStreamErrors::BadErrors) { + const std::set<IdentifierHash>& errorSet{getErrorSet(badError, ctx)}; + result = (errorSet.count(elementIdHash)==0); if (not result) return result; } -- GitLab From bbe0b31fb323544fae988b3af160dca07e3a2e7d Mon Sep 17 00:00:00 2001 From: Susumu Oda <susumu.oda@cern.ch> Date: Mon, 9 Jul 2018 21:24:40 +0000 Subject: [PATCH 425/562] Do not use std::unique_ptr after std::move in SCT_ReadCalibDataCondAlg (ATLASRECTS-4515) Former-commit-id: 39b818b4fe4ee3f5cd9c2a302b5577934e68ad40 --- .../SCT_ConditionsAlgorithms/src/SCT_ReadCalibDataCondAlg.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibDataCondAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibDataCondAlg.cxx index 8fa2a24b660b..8efc80cc669b 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibDataCondAlg.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibDataCondAlg.cxx @@ -325,20 +325,20 @@ StatusCode SCT_ReadCalibDataCondAlg::execute() { } // Record the output cond objects + ATH_MSG_DEBUG("There are " << writeCdoInfo->size() << " elements in " << writeHandleInfo.key()); if (writeHandleInfo.record(rangeW, std::move(writeCdoInfo)).isFailure()) { ATH_MSG_FATAL("Could not record SCT_AllGoodStripInfo " << writeHandleInfo.key() << " with EventRange " << rangeW << " into Conditions Store"); return StatusCode::FAILURE; } - ATH_MSG_DEBUG("There are " << writeCdoInfo->size() << " elements in " << writeHandleInfo.key()); ATH_MSG_INFO("recorded new CDO " << writeHandleInfo.key() << " with range " << rangeW << " into Conditions Store"); for (unsigned int i{GAIN}; i<NFEATURES; i++) { + ATH_MSG_DEBUG("There are " << writeCdoData[i]->size() << " elements in " << writeHandleData[i].key()); if (writeHandleData[i].record(rangeW, std::move(writeCdoData[i])).isFailure()) { ATH_MSG_FATAL("Could not record SCT_CalibDefectData " << writeHandleData[i].key() << " with EventRange " << rangeW << " into Conditions Store"); return StatusCode::FAILURE; } - ATH_MSG_DEBUG("There are " << writeCdoData[i]->size() << " elements in " << writeHandleData[i].key()); ATH_MSG_INFO("recorded new CDO " << writeHandleData[i].key() << " with range " << rangeW << " into Conditions Store"); } -- GitLab From af55bcdde3e838e70fbb713fc77cafe0264fdc74 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Mon, 9 Jul 2018 21:25:56 +0000 Subject: [PATCH 426/562] 22.0 coverity InDetVKalVxInJetTool Former-commit-id: bf3ca2d63e5c52d84fddef16292cb0ed9d5dcb43 --- .../InDetVKalVxInJetTool.h | 23 ++++++------ .../InDetVKalVxInJetTool/src/BTagVrtSec.cxx | 16 ++++----- .../src/BTagVrtSecMulti.cxx | 23 +++++++----- .../InDetVKalVxInJetTool/src/CutTrk.cxx | 15 +++----- .../src/InDetVKalVxInJetTool.cxx | 7 +++- .../InDetVKalVxInJetTool/src/Utilities.cxx | 35 +++---------------- 6 files changed, 48 insertions(+), 71 deletions(-) diff --git a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/InDetVKalVxInJetTool/InDetVKalVxInJetTool.h b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/InDetVKalVxInJetTool/InDetVKalVxInJetTool.h index ca2ecd3d8c7e..3f9491b17fdf 100755 --- a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/InDetVKalVxInJetTool/InDetVKalVxInJetTool.h +++ b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/InDetVKalVxInJetTool/InDetVKalVxInJetTool.h @@ -44,24 +44,27 @@ // Gaudi includes #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" -#include <boost/graph/undirected_graph.hpp> -#include <boost/graph/bron_kerbosch_all_cliques.hpp> +#include "boost/graph/adjacency_list.hpp" // #include "Particle/TrackParticle.h" #include "xAODTracking/TrackParticleContainer.h" // -#include "TrkVKalVrtFitter/TrkVKalVrtFitter.h" // -#include "TH1D.h" -#include "TH2D.h" -#include "TProfile.h" #include "InDetRecToolInterfaces/ISecVertexInJetFinder.h" -//#include "InDetMaterialRejTool/InDetMaterialRejTool.h" +class TH1D; +class TH2D; +class TH1F; +class TProfile; +namespace Trk{ + class TrkVKalVrtFitter; + class IVertexFitter; +} - typedef std::vector<double> dvect; + +typedef std::vector<double> dvect; //------------------------------------------------------------------------ @@ -239,15 +242,12 @@ namespace InDet { bool m_getNegativeTail; bool m_getNegativeTag; bool m_MultiWithOneTrkVrt; - //bool m_killHighPtIBLFakes; double m_VertexMergeCut; double m_TrackDetachCut; ToolHandle < Trk::IVertexFitter > m_fitterSvc; -// ToolHandle < Trk::ITrkVKalVrtFitter > m_fitSvc; -// ToolHandle< IInDetMaterialRejection > m_materialMap; Trk::TrkVKalVrtFitter* m_fitSvc; @@ -525,7 +525,6 @@ namespace InDet { void clique(const Clique& clq, Graph& ) { std::vector<int> new_clique(0); - //for(auto i = clq.begin(); i != clq.end(); ++i) std::cout<< *i << ","; std::cout<<'\n'; //For debugging for(auto i = clq.begin(); i != clq.end(); ++i) new_clique.push_back(*i); m_allCliques.push_back(new_clique); } diff --git a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/BTagVrtSec.cxx b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/BTagVrtSec.cxx index 623011ed8680..780819de28b0 100755 --- a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/BTagVrtSec.cxx +++ b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/BTagVrtSec.cxx @@ -9,9 +9,12 @@ // Other stuff #include "AnalysisUtils/AnalysisMisc.h" #include "TrkToolInterfaces/ITrackSummaryTool.h" +#include "TrkVKalVrtFitter/TrkVKalVrtFitter.h" + +#include "TProfile.h" +#include "TH2D.h" #include "TMath.h" // -#include<iostream> //---------------------------------------------------------------------------------------- // GetVrtSec resurns the vector Results with the following @@ -22,7 +25,7 @@ // 5) Number of track in secondary vertex // 6) 3D SV-PV significance with sign // 7) Jet energy used in (2) calculation -// 8) Mininal distance between vertex and any material layer +// 8) Minimal distance between vertex and any material layer // 9) Transverse vertex/jet energy fraction. Jet pT independent. // 10) "Product" variable // 11) "Boost" variable @@ -1054,9 +1057,7 @@ for (auto atrk : AdditionalTracks)ListSecondTracks.push_back(atrk.second); sc=VKalVrtFitBase(TracksForFit, FitVertexV0, MomentumV0, Charge, ErrorMatrix,Chi2PerTrk,TrkAtVrt0,Chi2_0); if(sc.isSuccess()) { - //std::cout<<" cnst result="<< massV0( TrkAtVrt,m_massPi,m_massPi)<<", " - // << massV0( TrkAtVrt,m_massP,m_massPi)<<", " - // << massV0( TrkAtVrt,m_massE,m_massE)<<", "<<i<<", "<<j<<'\n'; + sc=m_fitSvc->VKalVrtCvtTool(FitVertexV0,MomentumV0,ErrorMatrix,0,VKPerigee,CovPerigee); if(sc.isSuccess()) { const Trk::Track* TT = m_fitSvc->CreateTrkTrack(VKPerigee,CovPerigee); @@ -1074,10 +1075,7 @@ for (auto atrk : AdditionalTracks)ListSecondTracks.push_back(atrk.second); if(m_FillHist){ m_hb_r2d->Fill( FitVertex.perp(), m_w_1); } if(m_useMaterialRejection && Dist2D>m_Rbeampipe-2.){ float ptLim=TMath::Max(m_hadronIntPtCut,m_JetPtFractionCut*JetDir.Perp()); - //if(m_materialMap){ - // if(m_materialMap->inMaterial(FitVertex)) BadTracks=4; - // if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" MaterialMap test="<< BadTracks<<endreq; - //}else{ + if( TMath::Min(TrackPt[i],TrackPt[j])<ptLim ){ if( insideMatLayer(FitVertex.x(), FitVertex.y()) ) BadTracks = 4; } diff --git a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/BTagVrtSecMulti.cxx b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/BTagVrtSecMulti.cxx index 9025e7a09890..615e19706a2b 100755 --- a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/BTagVrtSecMulti.cxx +++ b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/BTagVrtSecMulti.cxx @@ -8,12 +8,16 @@ // Other stuff #include "AnalysisUtils/AnalysisMisc.h" #include "TrkParticleBase/TrackParticleBaseCollection.h" -//#include "TrkParticleCreator/TrackParticleCreatorTool.h" #include "GeoPrimitives/GeoPrimitivesHelpers.h" +#include "TrkVKalVrtFitter/TrkVKalVrtFitter.h" + +#include "boost/graph/bron_kerbosch_all_cliques.hpp" #include "TMath.h" +#include "TH1D.h" +#include "TProfile.h" + #include <algorithm> // -//#include<iostream> //---------------------------------------------------------------------------------------- // GetVrtSecMulti resurns the vector Results with the following @@ -170,7 +174,8 @@ const double VrtBCMassLimit=6000.; // Mass limit to consider a vertex not comom // newvrt.SelTrk.clear(); // for(i=0;i<NPTR;i++) { newvrt.SelTrk.push_back(Solution[i]-1);}//std::cout<<"Solution="<<Solution[i]<<'\n'; //================================================== Boost version (don't forget to uncomment addEdge in Select2TrVrt() - long int* weit=0; long int* Solution=0; + const long int* weit=0; + const long int* Solution=0; std::vector< std::vector<int> > allCliques; bron_kerbosch_all_cliques(*m_compatibilityGraph, clique_visitor(allCliques)); for(int cq=0; cq<(int)allCliques.size();cq++){ @@ -522,7 +527,6 @@ const double VrtBCMassLimit=6000.; // Mass limit to consider a vertex not comom nth=(*WrkVrtSet)[iv].SelTrk.size(); if(nth == 1) continue; // 1track vertices are treated already //Signif3Dproj=VrtVrtDist(PrimVrt, curVrt.vertex, curVrt.vertexCov, JetDir); VrtVrtDist(PrimVrt,curVrt.vertex, curVrt.vertexCov, Signif3D); //VK non-projected Signif3D is worse - //std::cout<<" Solution="<<iv<<" Ntrk="<<nth<<'\n'; if(xAODwrk)xAODwrk->tmpListTracks.resize(nth); else if(RECwork)RECwork->tmpListTracks.resize(nth); for(i=0;i<nth;i++) { if (xAODwrk)xAODwrk->tmpListTracks[i]=xAODwrk->listJetTracks[curVrt.SelTrk[i]]; @@ -808,7 +812,6 @@ const double VrtBCMassLimit=6000.; // Mass limit to consider a vertex not comom // // double totMass = VertexMom.M(); - //double totE = VertexMom.E(); Results.push_back(totMass); //1st double eRatio = VertexMom.E()/MomentumJet.E(); Results.push_back( eRatio<1. ? eRatio : 1.); //2nd @@ -816,8 +819,6 @@ const double VrtBCMassLimit=6000.; // Mass limit to consider a vertex not comom Results.push_back((double)NTracks); //4th if (xAODwrk) Results.push_back((double)xAODwrk->listSecondTracks.size()); //5th else if(RECwork) Results.push_back((double)RECwork->listSecondTracks.size()); //5th -// Dist3D=VrtVrtDist(PrimVrt, FitVertex, ErrorMatrix, Signif3D); -// Results.push_back(Signif3D); Results.push_back(0.); //6th - not clear what to use here -> return 0. Results.push_back(MomentumJet.E()); //7th @@ -1228,7 +1229,13 @@ const double VrtBCMassLimit=6000.; // Mass limit to consider a vertex not comom NTrk=(*WrkVrtSet)[V].SelTrk.size(); if(NTrk==2)return Prob; int SelT=-1; double Chi2Max=0.; - for(int i=0; i<NTrk; i++){ if( (*WrkVrtSet)[V].Chi2PerTrk[i]>Chi2Max) { Chi2Max=(*WrkVrtSet)[V].Chi2PerTrk[i]; SelT=i;}} + for(int i=0; i<NTrk; i++){ + if( (*WrkVrtSet)[V].Chi2PerTrk[i]>Chi2Max) { + Chi2Max=(*WrkVrtSet)[V].Chi2PerTrk[i]; + SelT=i; + } + } + if (SelT<0) return 0; (*WrkVrtSet)[V].detachedTrack=(*WrkVrtSet)[V].SelTrk[SelT]; (*WrkVrtSet)[V].SelTrk.erase( (*WrkVrtSet)[V].SelTrk.begin() + SelT ); //remove track StatusCode sc = RefitVertex( WrkVrtSet, V, AllTrackList); diff --git a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/CutTrk.cxx b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/CutTrk.cxx index b3f1e142c4ca..eec26c539129 100755 --- a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/CutTrk.cxx +++ b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/CutTrk.cxx @@ -5,16 +5,13 @@ // Header include #include "InDetVKalVxInJetTool/InDetVKalVxInJetTool.h" #include "AnalysisUtils/AnalysisMisc.h" -//#include <iostream> +#include "TrkVKalVrtFitter/TrkVKalVrtFitter.h" + +#include "TH1F.h" + //------------------------------------------------- namespace InDet{ -//double getConeSize(double pt){ //Variable cone size from b-tagging for reference -// double m_coneSizeFitPar1 = +0.239; -// double m_coneSizeFitPar2 = -1.220; -// double m_coneSizeFitPar3 = -1.64e-5; -// return (m_coneSizeFitPar1 + exp(m_coneSizeFitPar2 + m_coneSizeFitPar3*pt)); -//} StatusCode InDetVKalVxInJetTool::CutTrk(double PInvVert,double ThetaVert, @@ -25,9 +22,7 @@ namespace InDet{ double Pt = sin(ThetaVert)/fabs(PInvVert); //- Track quality if(Pt < m_CutPt) return StatusCode::FAILURE; -//std::cout<<" ZVert="<<ZVert<<", "<<sin(ThetaVert)<<'\n'; -//std::cout<<" Chi2="<<Chi2<<'\n'; -//std::cout<<" A0Vert="<<A0Vert<<'\n'; + if(!m_MultiWithPrimary){ //Must not be used for primary vertex search if(fabs(ZVert) > m_CutZVrt/sin(ThetaVert)) return StatusCode::FAILURE; } diff --git a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/InDetVKalVxInJetTool.cxx b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/InDetVKalVxInJetTool.cxx index 67c82265d505..522aed13051f 100755 --- a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/InDetVKalVxInJetTool.cxx +++ b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/InDetVKalVxInJetTool.cxx @@ -6,12 +6,17 @@ #include "InDetVKalVxInJetTool/InDetVKalVxInJetTool.h" #include "VxSecVertex/VxSecVertexInfo.h" #include "VxSecVertex/VxSecVKalVertexInfo.h" +#include "TrkVKalVrtFitter/TrkVKalVrtFitter.h" + #include "GaudiKernel/ITHistSvc.h" +#include "TH1D.h" +#include "TH2D.h" +#include "TProfile.h" + #include "TMath.h" // //------------------------------------------------- // Other stuff -//#include "GaudiKernel/MsgStream.h" // #include<iostream> diff --git a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/Utilities.cxx b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/Utilities.cxx index ec39dc155791..ddd1cff33020 100755 --- a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/Utilities.cxx +++ b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/Utilities.cxx @@ -6,10 +6,11 @@ #include "InDetVKalVxInJetTool/InDetVKalVxInJetTool.h" #include "TrkNeutralParameters/NeutralParameters.h" #include "TrkTrackSummary/TrackSummary.h" +#include "TrkVKalVrtFitter/TrkVKalVrtFitter.h" + //------------------------------------------------- // Other stuff #include <cmath> -#include<iostream> namespace InDet{ @@ -21,11 +22,7 @@ namespace InDet{ const { // B hadron flight direction based on 2 separate tracks and PV. Calculated via plane-plane crossing Amg::Vector3D PVRT(PrimVrt.x(),PrimVrt.y(),PrimVrt.z()); - ////double d01=trk1->d0(); double d02=trk2->d0(); - ////double z01=trk1->z0(); double z02=trk2->z0(); - ////double phi1=trk1->phi0(); double phi2=trk2->phi0(); - ////Amg::Vector3D new1(trk1->vx()-d01*sin(phi1),trk1->vy()+d01*cos(phi1),trk1->vz()+z01); // Wrong sign!!!!! - ////Amg::Vector3D new2(trk2->vx()-d02*sin(phi2),trk2->vy()+d02*cos(phi2),trk2->vz()+z02); + //---------------------------------------------------------------------------- Amg::Vector3D pnt1=trk1->perigeeParameters().position()-PVRT; Amg::Vector3D mom1((trk1->p4()).Px(),(trk1->p4()).Py(),(trk1->p4()).Pz()); @@ -58,28 +55,7 @@ namespace InDet{ } void InDetVKalVxInJetTool::printWrkSet(const std::vector<WrkVrt> *, const std::string ) const { -/* void InDetVKalVxInJetTool::printWrkSet(const std::vector<WrkVrt> *WrkVrtSet, const std::string name) const { - int nGoodV=0; - for(int iv=0; iv<(int)WrkVrtSet->size(); iv++) { - std::cout<<name - <<"= "<<(*WrkVrtSet)[iv].vertex[0] - <<", "<<(*WrkVrtSet)[iv].vertex[1] - <<", "<<(*WrkVrtSet)[iv].vertex[2] - <<" NTrk="<<(*WrkVrtSet)[iv].SelTrk.size() - <<" is good="<<std::boolalpha<<(*WrkVrtSet)[iv].Good<<std::noboolalpha - <<" Chi2="<<(*WrkVrtSet)[iv].Chi2 - <<" Mass="<<(*WrkVrtSet)[iv].vertexMom.M() - <<" detached="<<(*WrkVrtSet)[iv].detachedTrack - <<" proj.dist="<<(*WrkVrtSet)[iv].ProjectedVrt - <<" trk="; - for(int kk=0; kk<(int)(*WrkVrtSet)[iv].SelTrk.size(); kk++) { - std::cout<<", "<<(*WrkVrtSet)[iv].SelTrk[kk];} - //for(int kk=0; kk<(int)(*WrkVrtSet)[iv].SelTrk.size(); kk++) { - // std::cout<<", "<<MomAtVrt((*WrkVrtSet)[iv].TrkAtVrt[kk]).Perp();} - std::cout<<'\n'; - if((*WrkVrtSet)[iv].Good)nGoodV++; - } - std::cout<<name<<" N="<<nGoodV<<'\n';*/ + } /* Technicalities */ @@ -277,7 +253,6 @@ namespace InDet{ AmgSymMatrix(3) WgtMtx = PrimCovMtx.inverse(); -// std::cout << " Inversion ="<<iFail<<'\n'; Signif = distx*WgtMtx(0,0)*distx +disty*WgtMtx(1,1)*disty @@ -287,8 +262,6 @@ namespace InDet{ +2.*disty*WgtMtx(1,2)*distz; Signif=sqrt(Signif); if(Signif != Signif) Signif = 0.; -// std::cout << " Inversion signif="<<Signif<<", "<<sqrt(distx*distx+disty*disty+distz*distz)<<'\n'; -// return sqrt(distx*distx+disty*disty+distz*distz); return Signif; } // -- GitLab From 3014c86928be3e5ab5f2ceb12c46b17150cc281a Mon Sep 17 00:00:00 2001 From: Sara Alderweireldt <sara.alderweireldt@cern.ch> Date: Mon, 9 Jul 2018 14:37:37 +0000 Subject: [PATCH 427/562] Merge branch '21.1-dev-2018-05-15' into '21.1-dev' Add histograms of spacepoint vs pT, fix bug in trigger significance histogram See merge request atlas/athena!12594 (cherry picked from commit 0dd21a8c8c825a3d3cae4eadebd11683bc8444cd [formerly 1b43c6ab03175d96281e3d1d9a7e49b22f7b4d0d]) f8fbf496 Add histograms of spacepoint vs pT, fix bug in trigger significance histogram Former-commit-id: 9db7b19930e647123a4adb70a6e8fdd46db3759a --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../TrigInDetAnalysisExample/Analysis_Tier0.h | 4 +++ .../src/Analysis_Tier0.cxx | 35 ++++++++++++++----- 3 files changed, 30 insertions(+), 9 deletions(-) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisExample/TrigInDetAnalysisExample/Analysis_Tier0.h b/Trigger/TrigAnalysis/TrigInDetAnalysisExample/TrigInDetAnalysisExample/Analysis_Tier0.h index 9ebca8aff1cd..37097169b4ef 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisExample/TrigInDetAnalysisExample/Analysis_Tier0.h +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisExample/TrigInDetAnalysisExample/Analysis_Tier0.h @@ -93,10 +93,12 @@ class Analysis_Tier0 : public TrackAnalysis { TProfile* h_npixvseta; TProfile* h_npixvsphi; TProfile* h_npixvsd0; + TProfile* h_npixvspT; TProfile* h_nsctvseta; TProfile* h_nsctvsphi; TProfile* h_nsctvsd0; + TProfile* h_nsctvspT; TProfile* h_ntrtvseta; TProfile* h_ntrtvsphi; @@ -106,10 +108,12 @@ class Analysis_Tier0 : public TrackAnalysis { TProfile* h_npixvseta_rec; TProfile* h_npixvsphi_rec; TProfile* h_npixvsd0_rec; + TProfile* h_npixvspT_rec; TProfile* h_nsctvseta_rec; TProfile* h_nsctvsphi_rec; TProfile* h_nsctvsd0_rec; + TProfile* h_nsctvspT_rec; TProfile* h_ntrtvseta_rec; TProfile* h_ntrtvsphi_rec; diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisExample/src/Analysis_Tier0.cxx b/Trigger/TrigAnalysis/TrigInDetAnalysisExample/src/Analysis_Tier0.cxx index 96ce3dd7c4bc..a4232e5edd1a 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisExample/src/Analysis_Tier0.cxx +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisExample/src/Analysis_Tier0.cxx @@ -191,29 +191,34 @@ void Analysis_Tier0::initialise() { /// han config too stufid to deal with spaces in histogram names h_npixvseta = new TProfile("npix_vs_eta", "offline npix vs eta;offline #eta;# mean number of offline pixel hits", 30, -2.5, 2.5); - h_npixvseta_rec = new TProfile("npix_vs_eta_rec", "trigger npix vs eta;trigger #eta;# mean number of trigger pixel hits", 30, -2.5, 2.5); + h_npixvseta_rec = new TProfile("npix_vs_eta_rec", "trigger npix vs eta;offline #eta;# mean number of trigger pixel hits", 30, -2.5, 2.5); h_nsctvseta = new TProfile("nsct_vs_eta", "offline nsct vs eta;offline #eta;# mean number of offline sct hits", 30, -2.5, 2.5); - h_nsctvseta_rec = new TProfile("nsct_vs_eta_rec", "trigger nsct vs eta;trigger #eta;# mean number of trigger sct hits", 30, -2.5, 2.5); + h_nsctvseta_rec = new TProfile("nsct_vs_eta_rec", "trigger nsct vs eta;offline #eta;# mean number of trigger sct hits", 30, -2.5, 2.5); h_ntrtvseta = new TProfile("ntrt_vs_eta", "offline ntrt vs eta;offline #eta;# mean number of offline trt hits", 30, -2.5, 2.5 ); - h_ntrtvseta_rec = new TProfile("ntrt_vs_eta_rec", "trigger ntrt vs eta;trigger #eta;# mean number of trigger trt hits", 30, -2.5, 2.5 ); + h_ntrtvseta_rec = new TProfile("ntrt_vs_eta_rec", "trigger ntrt vs eta;offline #eta;# mean number of trigger trt hits", 30, -2.5, 2.5 ); h_npixvsphi = new TProfile("npix_vs_phi", "offline npix vs phi;offline #phi;# mean number of offline pixel hits", 30, -M_PI, M_PI); - h_npixvsphi_rec = new TProfile("npix_vs_phi_rec", "trigger npix vs phi;trigger #phi;# mean number of trigger pixel hits", 30, -M_PI, M_PI); + h_npixvsphi_rec = new TProfile("npix_vs_phi_rec", "trigger npix vs phi;offline #phi;# mean number of trigger pixel hits", 30, -M_PI, M_PI); h_nsctvsphi = new TProfile("nsct_vs_phi", "offline nsct vs phi;offline #phi;# mean number of offline sct hits", 30, -M_PI, M_PI); - h_nsctvsphi_rec = new TProfile("nsct_vs_phi_rec", "trigger nsct vs phi;trigger #phi;# mean number of trigger sct hits", 30, -M_PI, M_PI); + h_nsctvsphi_rec = new TProfile("nsct_vs_phi_rec", "trigger nsct vs phi;offline #phi;# mean number of trigger sct hits", 30, -M_PI, M_PI); h_ntrtvsphi = new TProfile("ntrt_vs_phi", "offline ntrt vs phi;offline #phi;# mean number of offline trt hits", 30, -M_PI, M_PI ); - h_ntrtvsphi_rec = new TProfile("ntrt_vs_phi_rec", "trigger ntrt vs phi;trigger #phi;# mean number of trigger trt hits", 30, -M_PI, M_PI ); + h_ntrtvsphi_rec = new TProfile("ntrt_vs_phi_rec", "trigger ntrt vs phi;offline #phi;# mean number of trigger trt hits", 30, -M_PI, M_PI ); h_npixvsd0 = new TProfile("npix_vs_d0", "offline npix vs d0;offline #d0;# mean number of offline pixel hits", 39, d0bins ); - h_npixvsd0_rec = new TProfile("npix_vs_d0_rec", "trigger npix vs d0;trigger #d0;# mean number of trigger pixel hits", 39, d0bins ); + h_npixvsd0_rec = new TProfile("npix_vs_d0_rec", "trigger npix vs d0;offline #d0;# mean number of trigger pixel hits", 39, d0bins ); h_nsctvsd0 = new TProfile("nsct_vs_d0", "offline nsct vs d0;offline #d0;# mean number of offline sct hits", 39, d0bins ); - h_nsctvsd0_rec = new TProfile("nsct_vs_d0_rec", "trigger nsct vs d0;trigger #d0;# mean number of trigger sct hits", 39, d0bins ); + h_nsctvsd0_rec = new TProfile("nsct_vs_d0_rec", "trigger nsct vs d0;offline #d0;# mean number of trigger sct hits", 39, d0bins ); + h_npixvspT = new TProfile("npix_vs_pT", "offline npix vs pT;offline #p_{T};# mean number of offline pixel hits", 25, &ptbins[0] ); + h_npixvspT_rec = new TProfile("npix_vs_pT_rec", "trigger npix vs pT;offline #p_{T};# mean number of trigger pixel hits", 25, &ptbins[0] ); + + h_nsctvspT = new TProfile("nsct_vs_pT", "offline nsct vs pT;offline #p_{T} [GeV];# mean number of offline pixel hits", 25, &ptbins[0] ); + h_nsctvspT_rec = new TProfile("nsct_vs_pT_rec", "trigger nsct vs pT;offline #p_{T} [GeV];# mean number of trigger pixel hits", 25, &ptbins[0] ); h_nsihits_lb = new TProfile( "nsihits_lb", "offline n sihits vs lumiblock", 301, -0.5, 3009.5 ); @@ -258,6 +263,12 @@ void Analysis_Tier0::initialise() { addHistogram( h_nsctvsd0 ); addHistogram( h_nsctvsd0_rec ); + addHistogram( h_npixvspT ); + addHistogram( h_npixvspT_rec ); + + addHistogram( h_nsctvspT ); + addHistogram( h_nsctvspT_rec ); + /// trigger tracking differential resolutions /// change all these residiuals to be vs eta, rather than vs themselves @@ -450,6 +461,9 @@ void Analysis_Tier0::execute(const std::vector<TIDA::Track*>& referenceTracks, h_npixvsd0->Fill( referenceD0, int(((*reference)->pixelHits()+0.5)*0.5) ); h_nsctvsd0->Fill( referenceD0, (*reference)->sctHits() ); + h_npixvspT->Fill( std::fabs(referencePT)*0.001, int(((*reference)->pixelHits()+0.5)*0.5) ); + h_nsctvspT->Fill( std::fabs(referencePT)*0.001, (*reference)->sctHits() ); + h_npix->Fill( int(((*reference)->pixelHits()+0.5)*0.5) ); h_nsct->Fill( (*reference)->sctHits() ); @@ -513,7 +527,7 @@ void Analysis_Tier0::execute(const std::vector<TIDA::Track*>& referenceTracks, h_trkdd0_rec->Fill( test->da0() ); h_trkdz0_rec->Fill( test->dz0() ); - if ( test->da0()!=0 ) h_trkd0sig_rec->Fill( test->da0()/test->a0() ); + if ( test->da0()!=0 ) h_trkd0sig_rec->Fill( test->a0()/test->da0() ); /// 1d residual distributions @@ -537,6 +551,9 @@ void Analysis_Tier0::execute(const std::vector<TIDA::Track*>& referenceTracks, h_npixvsd0_rec->Fill( referenceD0, int((test->pixelHits()+0.5)*0.5) ); h_nsctvsd0_rec->Fill( referenceD0, test->sctHits() ); + h_npixvspT_rec->Fill( std::fabs(referencePT)*0.001, int((test->pixelHits()+0.5)*0.5) ); + h_nsctvspT_rec->Fill( std::fabs(referencePT)*0.001, test->sctHits() ); + h_npix_rec->Fill( int((test->pixelHits()+0.5)*0.5) ); h_nsct_rec->Fill( test->sctHits() ); h_nsihits_rec->Fill( test->siHits() ); -- GitLab From 852b864a954dc252ab665960dd0d52c2457016c9 Mon Sep 17 00:00:00 2001 From: John Chapman <jchapman@cern.ch> Date: Tue, 10 Jul 2018 10:12:18 +0200 Subject: [PATCH 428/562] Switch off use of Intel Math Library in NSWSimTest ART jobs (ATLASSIM-3779) Using `libm` rather than `libimf` should help reproducibility of the output of the two NSWSimTest ART jobs when running on different Intel architectures. This should fix ATLASSIM-3779. Former-commit-id: 77e05dc1b3fd875a2893119b79a389c48a6845b4 --- .../SimCoreTests/test/test_AtlasG4_NSWSimTest_NewGeoConf.sh | 3 ++- .../SimCoreTests/test/test_AtlasG4_NSWSimTest_OldGeoConf.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_NSWSimTest_NewGeoConf.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_NSWSimTest_NewGeoConf.sh index a4356f216076..f02e88366293 100755 --- a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_NSWSimTest_NewGeoConf.sh +++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_NSWSimTest_NewGeoConf.sh @@ -17,7 +17,8 @@ AtlasG4_tf.py \ --conditionsTag 'OFLCOND-RUN12-SDR-25' \ --physicsList 'FTFP_BERT' \ --postInclude 'G4AtlasTests/postInclude.DCubeTest.py,PyJobTransforms/UseFrontier.py' \ ---preExec 'simFlags.ReleaseGeoModel=False;' +--preExec 'simFlags.ReleaseGeoModel=False;' \ +--imf False echo "art-result: $? simulation" diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_NSWSimTest_OldGeoConf.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_NSWSimTest_OldGeoConf.sh index 9d15ba016951..5dd057181b7c 100755 --- a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_NSWSimTest_OldGeoConf.sh +++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_NSWSimTest_OldGeoConf.sh @@ -18,7 +18,8 @@ AtlasG4_tf.py \ --physicsList 'FTFP_BERT' \ --DBRelease 'current' \ --postInclude 'G4AtlasTests/postInclude.DCubeTest.py,G4AtlasTests/postInclude.NSW.config.simu.py' \ ---preExec 'simFlags.ReleaseGeoModel=False;simFlags.SimulateNewSmallWheel=True;' +--preExec 'simFlags.ReleaseGeoModel=False;simFlags.SimulateNewSmallWheel=True;' \ +--imf False echo "art-result: $? simulation" -- GitLab From 5550462f9856e9e9664721634412610d2374caba Mon Sep 17 00:00:00 2001 From: Tulay Cuhadar Donszelmann <tcuhadar@cern.ch> Date: Tue, 10 Jul 2018 12:00:44 +0200 Subject: [PATCH 429/562] sweeping MR 12251 to master Former-commit-id: b24e88d086f397409406a1749086f5c6dc1f2532 --- Tools/ART/ARTEnvironmentConfig.cmake | 12 + Tools/ART/CMakeLists.txt | 13 +- Tools/ART/python/ART/__init__.py | 6 +- Tools/ART/python/ART/art_base.py | 20 +- Tools/ART/python/ART/art_build.py | 16 +- Tools/ART/python/ART/art_grid.py | 672 ++++++++++++++++----------- Tools/ART/python/ART/art_header.py | 12 +- Tools/ART/python/ART/art_misc.py | 104 ++++- Tools/ART/python/ART/art_rucio.py | 124 ++--- Tools/ART/python/ART/docopt.py | 45 +- Tools/ART/scripts/art-clean.py | 208 +++++++++ Tools/ART/scripts/art-diff.py | 46 +- Tools/ART/scripts/art-download.sh | 1 + Tools/ART/scripts/art-internal.py | 13 +- Tools/ART/scripts/art-share.py | 2 +- Tools/ART/scripts/art-task-build.sh | 7 +- Tools/ART/scripts/art-task-grid.sh | 28 +- Tools/ART/scripts/art.py | 46 +- 18 files changed, 949 insertions(+), 426 deletions(-) create mode 100644 Tools/ART/ARTEnvironmentConfig.cmake create mode 100755 Tools/ART/scripts/art-clean.py diff --git a/Tools/ART/ARTEnvironmentConfig.cmake b/Tools/ART/ARTEnvironmentConfig.cmake new file mode 100644 index 000000000000..f448229bf523 --- /dev/null +++ b/Tools/ART/ARTEnvironmentConfig.cmake @@ -0,0 +1,12 @@ +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# +# This module is used to set up the environment for ART inputs +# +# author : Attila Krasznahorkay <attila.krasznahorkay@cern.ch>, Tulay Cuhadar Donszelmann <tcuhadar@cern.ch> + +# Set the environment variable(s): +set( ARTENVIRONMENT_ENVIRONMENT + APPEND DATAPATH "/eos/atlas/atlascerngroupdisk/data-art/grid-input" ) + +# Silently declare the module found: +set( ARTENVIRONMENT_FOUND TRUE ) diff --git a/Tools/ART/CMakeLists.txt b/Tools/ART/CMakeLists.txt index 402a3c7f3908..ef6eee55e8c1 100644 --- a/Tools/ART/CMakeLists.txt +++ b/Tools/ART/CMakeLists.txt @@ -1,6 +1,8 @@ -################################################################################ -# Package: ART -################################################################################ +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# +# CMake configuration file for the ART package. +# +# author : Tulay Cuhadar Donszelmann <tcuhadar@cern.ch>, Attila Krasznahorkay <attila.krasznahorkay@cern.ch> # Declare the package name: atlas_subdir( ART ) @@ -13,4 +15,7 @@ atlas_depends_on_subdirs( PRIVATE atlas_install_python_modules( python/ART/*.py ) atlas_install_scripts( scripts/*.py scripts/*.sh ) - +# Set up the general runtime environment (by Attila Krasznahorkay <attila.krasznahorkay@cern.ch>): +set( ARTEnvironment_DIR ${CMAKE_CURRENT_SOURCE_DIR} + CACHE PATH "Location of ARTEnvironmentConfig.cmake" ) +find_package( ARTEnvironment ) diff --git a/Tools/ART/python/ART/__init__.py b/Tools/ART/python/ART/__init__.py index 83f3adc32ad2..4662af8a69f7 100644 --- a/Tools/ART/python/ART/__init__.py +++ b/Tools/ART/python/ART/__init__.py @@ -7,6 +7,6 @@ Allows one to do: from ART import ArtBase """ -from art_base import ArtBase -from art_build import ArtBuild -from art_grid import ArtGrid +from art_base import ArtBase # noqa: F401 +from art_build import ArtBuild # noqa: F401 +from art_grid import ArtGrid # noqa: F401 diff --git a/Tools/ART/python/ART/art_base.py b/Tools/ART/python/ART/art_base.py index 1175dae2956d..fb7d57d2ce3b 100755 --- a/Tools/ART/python/ART/art_base.py +++ b/Tools/ART/python/ART/art_base.py @@ -110,7 +110,7 @@ class ArtBase(object): # # Default implementations # - def compare_ref(self, path, ref_path, entries=-1): + def compare_ref(self, path, ref_path, files, entries=-1, mode='detailed'): """TBD.""" result = 0 @@ -120,7 +120,7 @@ class ArtBase(object): print err print out - (exit_code, out, err, command, start_time, end_time) = run_command(' '.join(("art-diff.py", "--diff-type=diff-root", "--entries=" + str(entries), path, ref_path))) + (exit_code, out, err, command, start_time, end_time) = run_command(' '.join(("art-diff.py", "--diff-type=diff-root", "--mode=" + mode, "--entries=" + str(entries), (' '.join(('--file=' + s for s in files))), path, ref_path))) if exit_code != 0: result |= exit_code print err @@ -171,26 +171,30 @@ class ArtBase(object): files = os.listdir(directory) files.sort() for fname in files: + # is not a test ? if not fnmatch.fnmatch(fname, 'test_*.sh') and not fnmatch.fnmatch(fname, 'test_*.py'): continue test_name = os.path.join(directory, fname) - # is not of correct type + has_art_input = ArtHeader(test_name).get(ArtHeader.ART_INPUT) is not None + has_art_athena_mt = ArtHeader(test_name).get(ArtHeader.ART_ATHENA_MT) > 0 + + # SKIP if is not of correct type if job_type is not None and ArtHeader(test_name).get(ArtHeader.ART_TYPE) != job_type: continue - # is not included in nightly_release, project, platform + # SKIP if is not included in nightly_release, project, platform if nightly_release is not None and not self.is_included(test_name, nightly_release, project, platform): continue - # batch and does specify art-input - if index_type == "batch" and ArtHeader(test_name).get(ArtHeader.ART_INPUT) is not None: + # SKIP if batch and does specify art-input or art-athena-mt + if index_type == "batch" and (has_art_input or has_art_athena_mt): continue - # single and does not specify art-input - if index_type == "single" and ArtHeader(test_name).get(ArtHeader.ART_INPUT) is None: + # SKIP if single and does NOT specify art-input or art-athena-mt + if index_type == "single" and not (has_art_input or has_art_athena_mt): continue result.append(fname) diff --git a/Tools/ART/python/ART/art_build.py b/Tools/ART/python/ART/art_build.py index 67f9aecdcb9c..500b264600c3 100644 --- a/Tools/ART/python/ART/art_build.py +++ b/Tools/ART/python/ART/art_build.py @@ -11,8 +11,9 @@ import json import logging import multiprocessing import os +import socket -from art_misc import run_command, mkdir_p +from art_misc import memory, mkdir, run_command, GByte from art_base import ArtBase from art_header import ArtHeader @@ -49,7 +50,10 @@ class ArtBuild(ArtBase): self.project = project self.platform = platform self.nightly_tag = nightly_tag - self.max_jobs = multiprocessing.cpu_count() if max_jobs <= 0 else max_jobs + mem = memory(GByte) + max_cores = min(mem / 4, multiprocessing.cpu_count()) + max_cores = max_cores if max_cores >= 4 else 1 + self.max_jobs = max_cores if max_jobs <= 0 else max_jobs self.ci = ci def task_list(self, job_type, sequence_tag): @@ -75,15 +79,13 @@ class ArtBuild(ArtBase): status['release_info']['nightly_tag'] = self.nightly_tag status['release_info']['project'] = self.project status['release_info']['platform'] = self.platform + status['release_info']['hostname'] = socket.gethostname() # Package information with all tests in each package for future in concurrent.futures.as_completed(future_set): (package, test_name, exit_code, out, err, start_time, end_time) = future.result() log.debug("Handling job for %s %s", package, test_name) status[package][test_name]['exit_code'] = exit_code - # Removed, seem to give empty lines - # status[package][test_name]['out'] = out - # status[package][test_name]['err'] = err status[package][test_name]['start_time'] = start_time.strftime('%Y-%m-%dT%H:%M:%S') status[package][test_name]['end_time'] = end_time.strftime('%Y-%m-%dT%H:%M:%S') status[package][test_name]['start_epoch'] = start_time.strftime('%s') @@ -111,7 +113,7 @@ class ArtBuild(ArtBase): status[package][test_name]['result'] = result - mkdir_p(sequence_tag) + mkdir(sequence_tag) with open(os.path.join(sequence_tag, "status.json"), 'w') as outfile: json.dump(status, outfile, sort_keys=True, indent=4, ensure_ascii=False) @@ -161,7 +163,7 @@ class ArtBuild(ArtBase): test_name = self.get_files(test_directory, job_type, "all", self.nightly_release, self.project, self.platform)[int(job_index)] work_directory = os.path.join(sequence_tag, package, os.path.splitext(test_name)[0]) - mkdir_p(work_directory) + mkdir(work_directory) log.debug("Work dir %s", work_directory) # Tests are called with arguments: PACKAGE TEST_NAME SCRIPT_DIRECTORY TYPE diff --git a/Tools/ART/python/ART/art_grid.py b/Tools/ART/python/ART/art_grid.py index ea938ebe9e3b..750a7f2dc4ba 100644 --- a/Tools/ART/python/ART/art_grid.py +++ b/Tools/ART/python/ART/art_grid.py @@ -6,19 +6,21 @@ __author__ = "Tulay Cuhadar Donszelmann <tcuhadar@cern.ch>" import atexit import concurrent.futures +import exceptions import glob +import httplib import json import logging import multiprocessing import os import re -import requests +# requests not available on lxplus, import only when needed +# import requests import shutil import sys import tarfile import tempfile import time -import urllib2 from datetime import datetime from datetime import timedelta @@ -27,26 +29,26 @@ from art_base import ArtBase from art_configuration import ArtConfiguration from art_header import ArtHeader from art_rucio import ArtRucio -from art_misc import mkdir_p, make_executable, run_command, run_command_parallel +from art_misc import count_files, cp, ls, mkdir, make_executable, rm, run_command, run_command_parallel, touch MODULE = "art.grid" -def copy_job(art_directory, indexed_package, dst): +def copy_job(art_directory, indexed_package, dst, no_unpack, tmp, seq): """ Copy job to be run by executor. Needs to be defined outside a class. - Names of arguments are important, see call to scheduler. """ log = logging.getLogger(MODULE) - log.info("job started %s %s %s", art_directory, indexed_package, dst) - (exit_code, out, err, command, start_time, end_time) = run_command(' '.join((os.path.join(art_directory, './art.py'), "copy", "--dst=" + dst, indexed_package))) - log.info("job ended %s %s %s", art_directory, indexed_package, dst) + log.debug("job started %s %s %s %s %d", art_directory, indexed_package, dst, no_unpack, tmp, seq) + (exit_code, out, err, command, start_time, end_time) = run_command(' '.join((os.path.join(art_directory, './art.py'), "copy", "--dst=" + dst, "--no-unpack" if no_unpack else "", "--tmp=" + tmp, "--seq=" + str(seq), indexed_package))) + log.debug("job ended %s %s %s %s %d", art_directory, indexed_package, dst, no_unpack, tmp, seq) - print "Exit Code:", exit_code - print "Out: ", out - print "Err: ", err + print "Copy job run with Exit Code:", exit_code + print out + print err + sys.stdout.flush() return (indexed_package, exit_code, out, err, start_time, end_time) @@ -55,13 +57,14 @@ class ArtGrid(ArtBase): """Class for grid submission.""" CVMFS_DIRECTORY = '/cvmfs/atlas-nightlies.cern.ch/repo/sw' - EOS_MGM_URL = 'root://eosatlas.cern.ch/' EOS_OUTPUT_DIR = '/eos/atlas/atlascerngroupdisk/data-art/grid-output' ARTPROD = 'artprod' JOB_REPORT = 'jobReport.json' JOB_REPORT_ART_KEY = 'art' - RESULT_WAIT_INTERVAL = 5 * 60 + INITIAL_RESULT_WAIT_INTERVAL = 30 * 60 # seconds, 30 mins + RESULT_WAIT_INTERVAL = 5 * 60 # seconds, 5 mins + KINIT_WAIT = 12 # 12 * RESULT_WAIT_INTERVAL, 1 hour def __init__(self, art_directory, nightly_release, project, platform, nightly_tag, script_directory=None, skip_setup=False, submit_directory=None, max_jobs=0): """Keep arguments.""" @@ -121,7 +124,7 @@ class ArtGrid(ArtBase): """Copy all art files to the the run directory. Returns final script directory to be used.""" log = logging.getLogger(MODULE) ART = os.path.join(run_dir, "ART") - mkdir_p(ART) + mkdir(ART) # get the path of the python classes and support scripts art_python_directory = os.path.join(self.art_directory, art_python, 'ART') @@ -164,12 +167,14 @@ class ArtGrid(ArtBase): match = re.search(r"jediTaskID=(\d+)", text) return match.group(1) if match else -1 - def copy(self, indexed_package, dst=None, user=None): + def copy(self, indexed_package, dst=None, user=None, no_unpack=False, tmp=None, seq=0, keep_tmp=False): """Copy output from scratch area to eos area.""" log = logging.getLogger(MODULE) + tmp = tempfile.mkdtemp(prefix=indexed_package + '-') if tmp is None else tmp + mkdir(tmp) if indexed_package is not None: - return self.copy_package(indexed_package, dst, user) + return self.copy_package(indexed_package, dst, user, no_unpack, tmp, seq, keep_tmp) # make sure script directory exist self.exit_if_no_script_directory() @@ -184,10 +189,10 @@ class ArtGrid(ArtBase): for indexed_package, root in test_directories.items(): number_of_tests = len(self.get_files(root, "grid", "all", self.nightly_release, self.project, self.platform)) if number_of_tests > 0: - result |= self.copy_package(indexed_package, dst, user) + result |= self.copy_package(indexed_package, dst, user, no_unpack, tmp, seq, keep_tmp) return result - def copy_package(self, indexed_package, dst, user): + def copy_package(self, indexed_package, dst, user, no_unpack, tmp, seq, keep_tmp): """Copy package to dst.""" log = logging.getLogger(MODULE) real_user = os.getenv('USER', ArtGrid.ARTPROD) @@ -195,49 +200,68 @@ class ArtGrid(ArtBase): default_dst = ArtGrid.EOS_OUTPUT_DIR if real_user == ArtGrid.ARTPROD else '.' dst = default_dst if dst is None else dst - # for debugging - cleanup = True - result = 0 + log.debug("Indexed Package %s", indexed_package) + package = indexed_package.split('.')[0] - dst_dir = os.path.join(dst, self.nightly_release, self.project, self.platform, self.nightly_tag, package) + nightly_tag = self.nightly_tag if seq == 0 else '-'.join((self.nightly_tag, str(seq))) + dst_dir = os.path.join(dst, self.nightly_release, self.project, self.platform, nightly_tag, package) log.info("dst_dir %s", dst_dir) - tmp_dir = tempfile.mkdtemp() - if cleanup: - atexit.register(shutil.rmtree, tmp_dir, ignore_errors=True) + table = self.rucio.get_table(user, indexed_package, tmp=tmp) + if not table: + log.warning("Nothing to be copied") + return result + + for entry in table: + grid_index = entry['grid_index'] + log.debug("Grid Index %d", grid_index) - for entry in self.rucio.get_table(user, indexed_package): - index = entry['grid_index'] - log.debug("Index %d", index) # get the test name test_name = entry['job_name'] if test_name is None: - log.error("JSON Lookup Error for test %d", index) - result = 1 + log.warning("JSON TestName not found for test with grid_index %d", grid_index) continue log.debug("Test_name %s", test_name) - # create tmp test directory - test_dir = os.path.join(tmp_dir, test_name) - mkdir_p(test_dir) + json_file = os.path.join(tmp, entry['outfile'] + "_EXT0", self.__get_rucio_name(user, entry, 'json')) + json_dst = dst_dir.replace('/', '.') + json_copying = json_file + ".copying_to" + json_dst + json_copied = json_file + ".copied_to" + json_dst + + if os.path.isfile(json_copied): + log.debug("Already copied: %d %s", grid_index, test_name) + elif os.path.isfile(json_copying): + log.debug("Still copying: %d %s", grid_index, test_name) + else: + touch(json_copying) - # copy art-job.json - result |= self.copy_json(os.path.join(tempfile.gettempdir(), entry['outfile'] + "_EXT0", self.__get_rucio_name(user, entry, 'json')), test_dir) + # create test directory + test_dir = os.path.join(tmp, test_name) + suffix = '-' + str(entry['grid_index'] - 1) if entry['single_index'] > 0 and entry['grid_index'] > 1 else '' + test_dir += suffix + mkdir(test_dir) - # copy and unpack log - result |= self.copy_log(user, package, test_name, test_dir) + # copy art-job.json + result |= self.copy_json(json_file, test_dir) - # copy results and unpack - result |= self.copy_results(user, package, test_name, test_dir) + # copy and unpack log + result |= self.copy_log(user, package, test_name, grid_index, test_dir, no_unpack, tmp) - # copy to eos - result |= self.copy_to_eos(index, test_name, test_dir, dst_dir) + # copy results and unpack + result |= self.copy_results(user, package, test_name, grid_index, test_dir, no_unpack, tmp) - # cleanup - if cleanup: - shutil.rmtree(test_dir) + # copy to eos + result |= self.copy_to_dst(test_name + suffix, test_dir, dst_dir) + + if result == 0: + rm(json_copying) + touch(json_copied) + + # cleanup + if not keep_tmp: + shutil.rmtree(test_dir) return result @@ -248,84 +272,81 @@ class ArtGrid(ArtBase): shutil.copyfile(json_file, os.path.join(test_dir, ArtRucio.ART_JOB)) return 0 - def copy_log(self, user, package, test_name, test_dir): + def copy_log(self, user, package, test_name, grid_index, test_dir, no_unpack, tmp): """Copy and unpack log file.""" log = logging.getLogger(MODULE) log.info("Copying LOG: %s %s", package, test_name) - tar = self.__open_tar(user, package, test_name, tar=False) - if tar is not None: - log.info("Unpacking LOG: %s", test_dir) - logdir = None - for member in tar.getmembers(): - # does not work: tar.extractall() - tar.extract(member, path=test_dir) - logdir = member.name.split('/', 2)[0] - - tar.close() - - # rename top level log dir to logs - if logdir is not None: - os.chdir(test_dir) - os.rename(logdir, "tarball_logs") + if no_unpack: + tmp_tar = self.__get_tar(user, package, test_name, grid_index=grid_index, tmp=tmp, tar=False) + cp(tmp_tar, test_dir) + os.remove(tmp_tar) + else: + tmp_tar = self.__get_tar(user, package, test_name, grid_index=grid_index, tmp=tmp, tar=False) + if tmp_tar is not None: + tar = tarfile.open(tmp_tar) + log.info("Unpacking LOG: %s", test_dir) + logdir = None + for member in tar.getmembers(): + # does not work: tar.extractall() + tar.extract(member, path=test_dir) + logdir = member.name.split('/', 2)[0] + + tar.close() + + # rename top level log dir to logs + if logdir is not None: + os.chdir(test_dir) + os.rename(logdir, "tarball_logs") + + os.remove(tmp_tar) return 0 - def copy_results(self, user, package, test_name, test_dir): + def copy_results(self, user, package, test_name, grid_index, test_dir, no_unpack, tmp): """Copy results and unpack.""" log = logging.getLogger(MODULE) log.info("Copying TAR: %s %s", package, test_name) - tar = self.__open_tar(user, package, test_name) - if tar is not None: - log.info("Unpacking TAR: %s", test_dir) - tar.extractall(path=test_dir) - tar.close() + if no_unpack: + tmp_tar = self.__get_tar(user, package, test_name, grid_index=grid_index, tmp=tmp) + cp(tmp_tar, test_dir) + os.remove(tmp_tar) + else: + tmp_tar = self.__get_tar(user, package, test_name, grid_index=grid_index, tmp=tmp) + if tmp_tar is not None: + tar = tarfile.open(tmp_tar) + log.info("Unpacking TAR: %s", test_dir) + tar.extractall(path=test_dir) + tar.close() + os.remove(tmp_tar) + return 0 - def copy_to_eos(self, index, test_name, test_dir, dst_dir): - """Copy to eos.""" + def copy_to_dst(self, test_name, test_dir, dst_dir): + """Copy to dst.""" log = logging.getLogger(MODULE) + + # extra check if dst is already made dst_target = os.path.join(dst_dir, test_name) - if dst_target.startswith('/eos'): - # mkdir_cmd = 'eos ' + ArtGrid.EOS_MGM_URL + ' mkdir -p' - mkdir_cmd = None - xrdcp_target = ArtGrid.EOS_MGM_URL + dst_target + '/' + + # create the directory + if mkdir(dst_target) != 0: + return 1 + + exit_code = cp(test_dir, dst_target) + + # check number of source files + nSrc = count_files(test_dir) + nDst = count_files(dst_target) + + if nDst == nSrc: + log.info("Number of files in Src (%d) and Dst (%d) are equal for %s", nSrc, nDst, test_name) else: - mkdir_cmd = 'mkdir -p' - xrdcp_target = dst_target - log.info("Copying to DST: %d %s", index, xrdcp_target) - - if mkdir_cmd is not None: - (exit_code, out, err, command, start_time, end_time) = run_command(' '.join((mkdir_cmd, dst_target))) - if exit_code != 0: - log.error("Mkdir Error: %d %s %s", exit_code, out, err) - return 1 - - cmd = ' '.join(('xrdcp -N -r -p -v', test_dir, xrdcp_target)) - max_trials = 6 - wait_time = 4 * 60 # seconds - trial = 1 - while True: - log.info("Trial %d, using: %s", trial, cmd) - (exit_code, out, err, command, start_time, end_time) = run_command(cmd) - if exit_code in [0, 50, 51, 54]: - # 0 all is ok - # 50 File exists - # 51 File exists - # 54 is already copied - return 0 - - # 3010 connection problem - if exit_code != 3010 or trial >= max_trials: - log.error("XRDCP to EOS Error: %d %s %s", exit_code, out, err) - return 1 - - log.error("Possibly recoverable EOS Error: %d %s %s", exit_code, out, err) - log.info("Waiting for %d seconds", wait_time) - time.sleep(wait_time) - trial += 1 - - def task_package(self, root, package, job_type, sequence_tag, no_action, config_file): + log.warning("Number of files in Src (%d) and Dst (%d) differ for %s", nSrc, nDst, test_name) + + return exit_code + + def task_package(self, root, package, job_type, sequence_tag, inform_panda, no_action, config_file): """Submit a single package.""" log = logging.getLogger(MODULE) result = {} @@ -333,115 +354,165 @@ class ArtGrid(ArtBase): if number_of_tests > 0: print 'art-package:', package self.status('included') - log.info('root %s', root) + log.info('root %s with %d jobs', root, number_of_tests) log.info('Handling %s for %s project %s on %s', package, self.nightly_release, self.project, self.platform) - log.info("Number of tests: %d", number_of_tests) run_dir = os.path.join(self.submit_directory, package, 'run') script_directory = self.copy_art('../python', run_dir) - result = self.task(script_directory, package, job_type, sequence_tag, no_action, config_file) + result = self.task(script_directory, package, job_type, sequence_tag, inform_panda, no_action, config_file) return result - def task_list(self, job_type, sequence_tag, package=None, no_action=False, wait_and_copy=True, config_file=None): + def task_list(self, job_type, sequence_tag, inform_panda, package=None, no_action=False, wait_and_copy=True, config_file=None): """Submit a list of packages.""" log = logging.getLogger(MODULE) + log.info("Inform Panda %s", inform_panda) - test_copy = False + # job will be submitted from tmp directory + self.submit_directory = tempfile.mkdtemp(dir='.') - if test_copy: - all_results = {} - all_results[0] = ('TrigAnalysisTest', "xxx", "yyy", 0) + # make sure tmp is removed afterwards + atexit.register(shutil.rmtree, self.submit_directory, ignore_errors=True) - else: - # job will be submitted from tmp directory - self.submit_directory = tempfile.mkdtemp(dir='.') - - # make sure tmp is removed afterwards - atexit.register(shutil.rmtree, self.submit_directory, ignore_errors=True) + # make sure script directory exist + self.exit_if_no_script_directory() - # make sure script directory exist - self.exit_if_no_script_directory() + # get the test_*.sh from the test directory + test_directories = self.get_test_directories(self.get_script_directory()) + if not test_directories: + log.warning('No tests found in directories ending in "test"') - # get the test_*.sh from the test directory - test_directories = self.get_test_directories(self.get_script_directory()) - if not test_directories: - log.warning('No tests found in directories ending in "test"') + configuration = None if self.skip_setup else ArtConfiguration(config_file) - configuration = None if self.skip_setup else ArtConfiguration(config_file) + all_results = {} - all_results = {} + if package is None: + # submit tasks for all packages + for package, root in test_directories.items(): + if configuration is not None and configuration.get(self.nightly_release, self.project, self.platform, package, 'exclude', False): + log.warning("Package %s is excluded", package) + else: + all_results.update(self.task_package(root, package, job_type, sequence_tag, inform_panda, no_action, config_file)) + else: + # Submit single package + root = test_directories[package] + all_results.update(self.task_package(root, package, job_type, sequence_tag, inform_panda, no_action, config_file)) - if package is None: - # submit tasks for all packages - for package, root in test_directories.items(): - if configuration is not None and configuration.get(self.nightly_release, self.project, self.platform, package, 'exclude', False): - log.warning("Package %s is excluded", package) - else: - all_results.update(self.task_package(root, package, job_type, sequence_tag, no_action, config_file)) - else: - # Submit single package - root = test_directories[package] - all_results.update(self.task_package(root, package, job_type, sequence_tag, no_action, config_file)) + if no_action: + log.info("--no-action specified, so not waiting for results") + return 0 - if no_action: - log.info("--no-action specified, so not waiting for results") - return 0 + if len(all_results) == 0: + log.warning('No tests found, nothing to submit.') + return 0 - if len(all_results) == 0: - log.warning('No tests found, nothing to submit.') - return 0 + if not wait_and_copy: + log.debug("No copying") + return 0 # wait for all results - if wait_and_copy: - configuration = ArtConfiguration(config_file) - - log.info("Executor started with %d threads", self.max_jobs) - executor = concurrent.futures.ThreadPoolExecutor(max_workers=self.max_jobs) - future_set = [] - - while len(all_results) > 0: - log.debug("No of Results %d", len(all_results)) - log.debug("Waiting...") - if not test_copy: - time.sleep(ArtGrid.RESULT_WAIT_INTERVAL) - log.debug("Done Waiting") - - # force a copy of all_results since we are modifying all_results - for jedi_id in list(all_results): - package = all_results[jedi_id][0] - # skip packages without copy - if not configuration.get(self.nightly_release, self.project, self.platform, package, "copy"): - log.info("Copy not configured for %s - skipped", package) + configuration = ArtConfiguration(config_file) + + executor = None + future_set = [] + seq = None + + kinit_interval = ArtGrid.KINIT_WAIT # ArtGrid.KINIT_WAIT * ArtGrid.RESULT_WAIT_INTERVAL + result_wait_interval = ArtGrid.INITIAL_RESULT_WAIT_INTERVAL + final_states = ["done", "finished", "failed", "aborted", "broken"] + tmp = tempfile.mkdtemp(prefix=sequence_tag + '-') + while len(all_results) > 0: + log.debug("No of Results %d", len(all_results)) + log.debug("Waiting...") + time.sleep(result_wait_interval) + log.debug("Done Waiting") + result_wait_interval = ArtGrid.RESULT_WAIT_INTERVAL + kinit_interval -= 1 + if kinit_interval <= 0: + os.system("kinit -R") + kinit_interval = ArtGrid.KINIT_WAIT + + # force a copy of all_results since we are modifying all_results + for jedi_id in list(all_results): + package = all_results[jedi_id][0] + # skip packages without copy + if not configuration.get(self.nightly_release, self.project, self.platform, package, "copy"): + log.info("Copy not configured for %s - skipped", package) + del all_results[jedi_id] + continue + + # figure out the destination for the copy based on if the directory already exists, keep seq + if seq is None: + dst = configuration.get(self.nightly_release, self.project, self.platform, package, "dst", ArtGrid.EOS_OUTPUT_DIR) + dst_dir = os.path.join(dst, self.nightly_release, self.project, self.platform, self.nightly_tag) + final_target = dst_dir + max_seq = 10 + seq = 0 + while ls(final_target) == 0 and seq < max_seq: + seq += 1 + final_target = '-'.join((dst_dir, str(seq))) + + if seq >= max_seq: + log.warning("Too many retries (>%d) to copy, removing job %d", max_seq, jedi_id) del all_results[jedi_id] continue - log.debug("Checking package %s for %s", package, str(jedi_id)) - status = self.task_status(jedi_id) - if status is not None: + # create the directory + if mkdir(final_target) != 0: + log.warning("Could not create output dir %s, retrying later", final_target) + continue + + log.debug("Checking package %s for %s", package, str(jedi_id)) + status = self.task_status(jedi_id) + if status is not None: + + # job_name = all_results[jedi_id][1] + # outfile = all_results[jedi_id][2] + index = all_results[jedi_id][3] + + # skip single jobs if status is not final + if (index > 0) and (status not in final_states): + continue + + # create executor if not already done + if executor is None: + log.info("Executor started with %d threads", self.max_jobs) + executor = concurrent.futures.ThreadPoolExecutor(max_workers=self.max_jobs) + + no_unpack = configuration.get(self.nightly_release, self.project, self.platform, package, "no_unpack", False) + indexed_package = package + ('.' + str(index) if index > 0 else '') + log.debug("Copy whatever ready from %s to %s using seq %d", indexed_package, dst, seq) + future_set.append(executor.submit(copy_job, self.art_directory, indexed_package, dst, no_unpack, tmp, seq)) + + # job in final state + if status in final_states: + # remove job from waiting queue log.info("JediID %s finished with status %s", str(jedi_id), status) - if status in ['finished', 'done']: - # job_name = all_results[jedi_id][1] - # outfile = all_results[jedi_id][2] - index = all_results[jedi_id][3] - dst = configuration.get(self.nightly_release, self.project, self.platform, package, "dst", ArtGrid.EOS_OUTPUT_DIR) - indexed_package = package + ('.' + str(index) if index > 0 else '') - log.info("Copy %s to %s", indexed_package, dst) - future_set.append(executor.submit(copy_job, self.art_directory, indexed_package, dst)) del all_results[jedi_id] + log.info("Still waiting for results of %d jobs %s", len(all_results), all_results.keys()) - # wait for all copy jobs to finish - log.info("Waiting for copy jobs to finish...") - for future in concurrent.futures.as_completed(future_set): - (indexed_package, exit_code, out, err, start_time, end_time) = future.result() - if exit_code == 0: - log.info("Copied %s exit_code: %d", indexed_package, exit_code) - log.info(" starting %s until %s", start_time.strftime('%Y-%m-%dT%H:%M:%S'), end_time.strftime('%Y-%m-%dT%H:%M:%S')) - else: - log.error("Failed to copy: %s exit_code: %d", indexed_package, exit_code) - print err - print out + log.debug("Still waiting for results of %d jobs %s", len(all_results), all_results.keys()) + + if len(future_set) <= 0: + log.info("No need to wait for any copy jobs") + return 0 + + # wait for all copy jobs to finish + number_of_copy_jobs = len(future_set) + log.info("Waiting for %d copy jobs to finish...", number_of_copy_jobs) + for future in concurrent.futures.as_completed(future_set): + (indexed_package, exit_code, out, err, start_time, end_time) = future.result() + if exit_code == 0: + log.debug("Copied %s exit_code: %d", indexed_package, exit_code) + log.debug(" starting %s until %s", start_time.strftime('%Y-%m-%dT%H:%M:%S'), end_time.strftime('%Y-%m-%dT%H:%M:%S')) + else: + log.error("Failed to copy: %s exit_code: %d", indexed_package, exit_code) + print err + print out + number_of_copy_jobs -= 1 + log.info("Still waiting for %d copy jobs to finish...", number_of_copy_jobs) + log.info("All copy jobs finished.") return 0 def task_status(self, jedi_id): @@ -450,6 +521,10 @@ class ArtGrid(ArtBase): Return final status of a task, or None if not finished """ + import requests + import urllib3 + urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) + log = logging.getLogger(MODULE) # fake return for simulation @@ -457,29 +532,33 @@ class ArtGrid(ArtBase): return "done" try: - url = 'https://bigpanda.cern.ch/task/' + str(jedi_id) + '?json=true' - r = urllib2.urlopen(url) - s = json.load(r) - if (s is not None) and ('task' in s): - task = s['task'] - if (task is not None) and ('status' in task): - status = task['status'] - if status in ["done", "finished", "failed", "aborted", "broken"]: - log.info("Task: %s %s", str(jedi_id), str(status)) + payload = {'json': 'true'} + url = 'https://bigpanda.cern.ch/task/' + str(jedi_id) + r = requests.get(url, params=payload, verify=False) + if r.status_code == requests.codes.ok: + s = r.json() + if (s is not None) and ('task' in s): + task = s['task'] + if (task is not None) and ('status' in task): + status = task['status'] + # if status in ["done", "finished", "failed", "aborted", "broken"]: + log.debug("Task: %s %s", str(jedi_id), str(status)) return status - except urllib2.HTTPError, e: - log.error('%s for %s status: %s', str(e.code), str(jedi_id), url) + except requests.exceptions.RequestException, e: + log.error('%s for %s status: %s', e, str(jedi_id), url) + except httplib.IncompleteRead, e: + log.error('%s for %s status: %s', e, str(jedi_id), url) return None - def task_job(self, grid_options, sub_cmd, script_directory, sequence_tag, package, outfile, job_type='', number_of_tests=0, split=0, job_name='', inds='', n_files=0, in_file=False, ncores=1, no_action=False): + def task_job(self, grid_options, sub_cmd, script_directory, sequence_tag, package, outfile, inform_panda, job_type='', number_of_tests=0, split=0, job_name='', inds=None, n_files=0, in_file=False, ncores=1, athena_mt=0, no_action=False): """ - Submit a single job. + Submit a batch or single job. Returns jedi_id or 0 if submission failed. - # art-task-grid.sh [--no-action] batch <submit_directory> <script_directory> <sequence_tag> <package> <outfile> <job_type> <number_of_tests> + # art-task-grid.sh [--no-action] batch <submit_directory> <script_directory> <sequence_tag> <package> <outfile> <inform_panda> <job_type> <number_of_tests> # - # art-task-grid.sh [--no-action] single [--inds <input_file> --n-files <number_of_files> --split <split> --in] <submit_directory> <script_directory> <sequence_tag> <package> <outfile> <job_name> + # art-task-grid.sh [--no-action] single [--inds <input_file> --n-files <number_of_files> --split <split> --in] <submit_directory> <script_directory> <sequence_tag> <package> <outfile> <inform_panda> <job_name> """ log = logging.getLogger(MODULE) cmd = ' '.join((os.path.join(self.art_directory, 'art-task-grid.sh'), @@ -488,18 +567,20 @@ class ArtGrid(ArtBase): if sub_cmd == 'single': cmd = ' '.join((cmd, - '--inds ' + inds if inds != '' else '', - '--n-files ' + str(n_files) if n_files > 0 else '', - '--split ' + str(split) if split > 0 else '', - '--in' if in_file else '', - '--ncore ' + str(ncores) if ncores > 1 else '')) + '--inds ' + str(inds) if inds is not None else '', + '--n-files ' + str(n_files) if inds is not None and n_files > 0 else '', + '--split ' + str(split) if inds is not None and split > 0 else '', + '--in' if inds is not None and str(in_file) else '', + '--ncore ' + str(ncores) if athena_mt == 0 and ncores > 1 else '', + '--athena_mt ' + str(athena_mt) if ncores == 1 and athena_mt > 0 else '')) cmd = ' '.join((cmd, self.submit_directory, script_directory, sequence_tag, package, - outfile)) + outfile, + str(inform_panda))) if sub_cmd == 'batch': cmd = ' '.join((cmd, @@ -515,12 +596,12 @@ class ArtGrid(ArtBase): log.info("cmd: %s", cmd) # run task from Bash Script as is needed in ATLAS setup - log.info("Grid_options: %s", grid_options) + log.debug("Grid_options: %s", grid_options) env = os.environ.copy() env['PATH'] = '.:' + env['PATH'] env['ART_GRID_OPTIONS'] = grid_options - log.info("ART_GRID_OPTIONS %s", env['ART_GRID_OPTIONS']) + log.debug("ART_GRID_OPTIONS %s", env['ART_GRID_OPTIONS']) jedi_id = -1 # run the command, no_action is forwarded and used inside the script @@ -547,12 +628,12 @@ class ArtGrid(ArtBase): log.info('grid_options: %s', grid_options) return grid_options - def task(self, script_directory, package, job_type, sequence_tag, no_action=False, config_file=None): + def task(self, script_directory, package, job_type, sequence_tag, inform_panda, no_action=False, config_file=None): """ Submit a task, consisting of multiple jobs. For 'single' jobs each task contains exactly one job. - Returns a map of jedi_id to (package, test_name, out_file) + Returns a map of jedi_id to (package, test_name, out_file, seq) """ log = logging.getLogger(MODULE) log.info('Running art task') @@ -568,17 +649,17 @@ class ArtGrid(ArtBase): result = {} - # submit batch tests + # submit batch tests, index = 0 if number_of_batch_tests > 0: self.exit_if_outfile_too_long(outfile) # Batch log.info("Batch") - jedi_id = self.task_job(grid_options, "batch", script_directory, sequence_tag, package, outfile, job_type=job_type, number_of_tests=number_of_batch_tests, no_action=no_action) + jedi_id = self.task_job(grid_options, "batch", script_directory, sequence_tag, package, outfile, inform_panda, job_type=job_type, number_of_tests=number_of_batch_tests, no_action=no_action) if jedi_id > 0: - result[jedi_id] = (package, "", outfile, 0) + result[jedi_id] = (package, "", outfile, 0, None) - # submit single tests + # submit single tests, index > 1 index = 1 for job_name in self.get_files(test_directory, job_type, "single", self.nightly_release, self.project, self.platform): job = os.path.join(test_directory, job_name) @@ -587,26 +668,27 @@ class ArtGrid(ArtBase): n_files = header.get(ArtHeader.ART_INPUT_NFILES) split = header.get(ArtHeader.ART_INPUT_SPLIT) ncores = header.get(ArtHeader.ART_CORES) + athena_mt = header.get(ArtHeader.ART_ATHENA_MT) outfile_test = self.rucio.get_outfile_name(user, package, sequence_tag, str(index)) self.exit_if_outfile_too_long(outfile_test) # Single log.info("Single") - jedi_id = self.task_job(grid_options, "single", script_directory, sequence_tag, package, outfile_test, split=split, job_name=job_name, inds=inds, n_files=n_files, in_file=True, ncores=ncores, no_action=no_action) + jedi_id = self.task_job(grid_options, "single", script_directory, sequence_tag, package, outfile_test, inform_panda, split=split, job_name=job_name, inds=inds, n_files=n_files, in_file=True, ncores=ncores, athena_mt=athena_mt, no_action=no_action) if jedi_id > 0: - result[jedi_id] = (package, job_name, outfile_test, index) + result[jedi_id] = (package, job_name, outfile_test, index, None) index += 1 return result - def batch(self, sequence_tag, package, out, job_type, job_index): + def batch(self, sequence_tag, package, out, inform_panda, job_type, job_index): """Run a single job by job_index of a 'batch' submission.""" log = logging.getLogger(MODULE) log.info('Running art grid batch') - log.info("%s %s %s %s %s %s %s %s", self.nightly_release, self.project, self.platform, self.nightly_tag, package, job_type, str(job_index), out) + log.info("%s %s %s %s %s %s %s %s %s", self.nightly_release, self.project, self.platform, self.nightly_tag, package, job_type, str(job_index), out, inform_panda) test_directories = self.get_test_directories(self.get_script_directory()) test_directory = test_directories[package] @@ -619,29 +701,30 @@ class ArtGrid(ArtBase): in_file = None - return self.job(test_directory, package, job_name, job_type, out, in_file) + return self.job(test_directory, package, job_name, job_type, out, inform_panda, in_file) - def single(self, sequence_tag, package, out, job_name, in_file): + def single(self, sequence_tag, package, out, inform_panda, job_name, in_file): """Run a single job by name of a 'single' submission.""" log = logging.getLogger(MODULE) log.info('Running art grid single') - log.info("%s %s %s %s %s %s %s %s", self.nightly_release, self.project, self.platform, self.nightly_tag, package, job_name, out, in_file) + log.info("%s %s %s %s %s %s %s %s %s", self.nightly_release, self.project, self.platform, self.nightly_tag, package, job_name, out, inform_panda, in_file) test_directories = self.get_test_directories(self.get_script_directory()) test_directory = test_directories[package] job_type = 'grid' - return self.job(test_directory, package, job_name, job_type, out, in_file) + return self.job(test_directory, package, job_name, job_type, out, inform_panda, in_file) - def job(self, test_directory, package, job_name, job_type, out, in_file): + def job(self, test_directory, package, job_name, job_type, out, inform_panda, in_file): """Run a job.""" log = logging.getLogger(MODULE) - # informing panda, ignoring errors for now - panda_id = os.getenv('PandaID', '0') - log.info("art-job-name: %s", job_name) + panda_id = os.getenv('PandaID', '0') + if inform_panda == 'True': + # informing panda, ignoring errors for now + self.inform_panda(panda_id, job_name, package) test_file = os.path.join(test_directory, job_name) @@ -664,8 +747,9 @@ class ArtGrid(ArtBase): env['ArtInFile'] = in_file header = ArtHeader(test_file) + athena_mt = header.get(ArtHeader.ART_ATHENA_MT) ncores = header.get(ArtHeader.ART_CORES) - if ncores > 1: + if athena_mt == 0 and ncores > 1: nthreads = header.get(ArtHeader.ART_INPUT_NFILES) (exit_code, output, error, command, start_time, end_time) = run_command_parallel(command, nthreads, ncores, env=env) else: @@ -708,7 +792,7 @@ class ArtGrid(ArtBase): log.info("Updated %s", ArtGrid.JOB_REPORT) # pick up the outputs - tar_file = tarfile.open(out, mode='w') + files = set() # pick up explicitly named output files with open(test_file, "r") as f: @@ -720,19 +804,63 @@ class ArtGrid(ArtBase): for out_name in out_names: out_name = out_name.strip('\'"') if os.path.exists(out_name): - log.info('Tar file contain: %s', out_name) - tar_file.add(out_name) + files.add(out_name) # pick up art-header named outputs for path_name in ArtHeader(test_file).get(ArtHeader.ART_OUTPUT): for out_name in glob.glob(path_name): - log.info('Tar file contains: %s', out_name) - tar_file.add(out_name) + files.add(out_name) + + tar_file = tarfile.open(out, mode='w') + for file in files: + log.info('Tar file contains: %s', file) + tar_file.add(file) tar_file.close() # Always return 0 return 0 + def inform_panda(self, panda_id, job_name, package): + """Inform panda about the job we are running using panda ID.""" + log = logging.getLogger(MODULE) + import requests + + url = "http://bigpanda.cern.ch/art/registerarttest/?json" + n_attempts = 3 + timeout = 10 + + payload = {} + payload['pandaid'] = panda_id + payload['testname'] = job_name + payload['nightly_release_short'] = self.nightly_release_short + payload['platform'] = self.platform + payload['project'] = self.project + payload['package'] = package + payload['nightly_tag'] = self.nightly_tag + + headers = {'User-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36'} + + for i in range(0, n_attempts): + reply = requests.post(url, data=payload, headers=headers, timeout=timeout, verify=False) + try: + reply = requests.post(url, data=payload, timeout=timeout, verify=False) + log.info('Informed panda about %s %s %s', panda_id, job_name, package) + except: + log.warning('Exception occured for %s %s %s', panda_id, job_name, package) + continue + + if reply.status_code == 200: + try: + reply = reply.json() + except: + log.error('The panda inform response was corrupted for %s %s %s', panda_id, job_name, package) + raise + if 'exit_code' in reply and reply['exit_code'] == 0: + return True + + log.error('Panda could not be informed about %s %s %s', panda_id, job_name, package) + return False + def list(self, package, job_type, index_type, json_format, user): """List all jobs available.""" user = ArtGrid.ARTPROD if user is None else user @@ -788,11 +916,12 @@ class ArtGrid(ArtBase): # make sure script directory exist self.exit_if_no_script_directory() - tar = self.__open_tar(user, package, test_name, tar=False) - if tar is None: + tmp_tar = self.__get_tar(user, package, test_name, tar=False) + if tmp_tar is None: log.error("No log tar file found") return 1 + tar = tarfile.open(tmp_tar) for name in tar.getnames(): if ArtRucio.ATHENA_STDOUT in name: f = tar.extractfile(name) @@ -800,6 +929,7 @@ class ArtGrid(ArtBase): print content break tar.close() + os.remove(tmp_tar) return 0 def output(self, package, test_name, user): @@ -816,20 +946,23 @@ class ArtGrid(ArtBase): outfile = os.path.splitext(outfile)[0] job_name = os.path.splitext(test_name)[0] tar_dir = os.path.join(tempfile.gettempdir(), outfile, job_name) - mkdir_p(tar_dir) + mkdir(tar_dir) - tar = self.__open_tar(user, package, test_name) - if tar is None: + tmp_tar = self.__get_tar(user, package, test_name) + if tmp_tar is None: log.error("No output tar file found") return 1 + tar = tarfile.open(tmp_tar) tar.extractall(path=tar_dir) tar.close() + os.remove(tmp_tar) + print "Output extracted in", tar_dir return 0 - def compare(self, package, test_name, days, user, entries=-1, shell=False): + def compare(self, package, test_name, days, user, files, entries=-1, mode='detailed', shell=False): """Compare current output against a job of certain days ago.""" log = logging.getLogger(MODULE) user = ArtGrid.ARTPROD if user is None else user @@ -842,45 +975,64 @@ class ArtGrid(ArtBase): return 1 ref_dir = os.path.join('.', 'ref-' + previous_nightly_tag) - mkdir_p(ref_dir) + mkdir(ref_dir) log.info("Shell = %s", shell) - tar = self.__open_tar(user, package, test_name, nightly_tag=previous_nightly_tag, shell=shell) - if tar is None: + tmp_tar = self.__get_tar(user, package, test_name, nightly_tag=previous_nightly_tag, shell=shell) + if tmp_tar is None: log.error("No comparison tar file found") return 1 + tar = tarfile.open(tmp_tar) for member in tar.getmembers(): tar.extractall(path=ref_dir, members=[member]) tar.close() + os.remove(tmp_tar) - return self.compare_ref('.', ref_dir, entries) + return self.compare_ref('.', ref_dir, files, entries, mode) - def __open_tar(self, user, package, test_name, tar=True, nightly_tag=None, shell=False): + def __get_tar(self, user, package, test_name, grid_index=-1, tmp=None, tar=True, nightly_tag=None, shell=False): """Open tar file for particular release.""" log = logging.getLogger(MODULE) - log.info("Tar: %s", tar) + log.debug("Tar: %s", tar) + tmp = tempfile.gettempdir() if tmp is None else tmp nightly_tag = self.nightly_tag if nightly_tag is None else nightly_tag job_name = os.path.splitext(test_name)[0] - for entry in self.rucio.get_table(user, package, nightly_tag, shell): - if entry['job_name'] == job_name: + max_tries = 3 + wait_time = 5 # mins + + tries = max_tries + while tries > 0: + try: + for entry in self.rucio.get_table(user, package, nightly_tag, shell, tmp): + if entry['job_name'] == job_name and (grid_index < 0 or entry['grid_index'] == grid_index): + + log.debug("index %d", entry['grid_index']) + rucio_name = self.__get_rucio_name(user, entry, 'tar' if tar else 'log') - rucio_name = self.__get_rucio_name(user, entry, 'tar' if tar else 'log') + log.debug("RUCIO: %s", rucio_name) - log.info("RUCIO: %s", rucio_name) + tmp_dir = tempfile.mkdtemp() + atexit.register(shutil.rmtree, tmp_dir, ignore_errors=True) - # tmp_dir = tempfile.gettempdir() - tmp_dir = tempfile.mkdtemp() - atexit.register(shutil.rmtree, tmp_dir, ignore_errors=True) + log.debug("Shell = %s", shell) + exit_code = self.rucio.download(rucio_name, tmp_dir, shell) + if exit_code == 0: + tmp_tar = os.path.join(tmp_dir, 'user.' + user, rucio_name) + return tmp_tar + + except exceptions.Exception, e: + log.warning('(Rucio) Exception: %s in %s', str(e.code), str(e)) + log.info("Waiting %d mins", wait_time) + tries -= 1 + time.sleep(wait_time * 60) + continue - log.info("Shell = %s", shell) - exit_code = self.rucio.download(rucio_name, tmp_dir, shell) - if exit_code == 0: - tmp_tar = os.path.join(tmp_dir, 'user.' + user, rucio_name) - return tarfile.open(tmp_tar) + log.error("No log or tar found for package %s or test %s", package, test_name) + return None - log.error("No log or tar found for package %s or test %s", package, test_name) + log.error("Too many (%d) (Rucio) Exceptions", max_tries) return None def __get_rucio_name(self, user, entry, file_type): diff --git a/Tools/ART/python/ART/art_header.py b/Tools/ART/python/ART/art_header.py index 737c377f956e..f9e9f1aa0be7 100644 --- a/Tools/ART/python/ART/art_header.py +++ b/Tools/ART/python/ART/art_header.py @@ -17,6 +17,8 @@ MODULE = "art.header" class ArtHeader(object): """Class to handle art-headers.""" + # headers in alphabetical order + ART_ATHENA_MT = 'art-athena-mt' ART_CI = 'art-ci' ART_CORES = 'art-cores' ART_DESCRIPTION = 'art-description' @@ -52,6 +54,7 @@ class ArtHeader(object): self.add(ArtHeader.ART_INPUT, StringType, None) self.add(ArtHeader.ART_INPUT_NFILES, IntType, 1) self.add(ArtHeader.ART_INPUT_SPLIT, IntType, 0) + self.add(ArtHeader.ART_ATHENA_MT, IntType, 0) self.read(filename) @@ -75,12 +78,9 @@ class ArtHeader(object): if line_match: try: key = line_match.group(1) - value = line_match.group(2) - if key in self.header: - if self.header[key]['type'] == StringType: - value = value.strip() - elif self.header[key]['type'] == IntType: - value = int(value) + value = line_match.group(2).strip() + if key in self.header and self.header[key]['type'] == IntType: + value = int(value) if self.is_list(key): # handle list types diff --git a/Tools/ART/python/ART/art_misc.py b/Tools/ART/python/ART/art_misc.py index 41e4707f5309..0e187b8a9bae 100644 --- a/Tools/ART/python/ART/art_misc.py +++ b/Tools/ART/python/ART/art_misc.py @@ -5,7 +5,6 @@ __author__ = "Tulay Cuhadar Donszelmann <tcuhadar@cern.ch>" import concurrent.futures -import errno import logging import os import shlex @@ -15,6 +14,11 @@ import sys from datetime import datetime MODULE = "art.misc" +EOS_MGM_URL = 'root://eosatlas.cern.ch/' + +KByte = 1024 +MByte = KByte * 1024 +GByte = MByte * 1024 def set_log(kwargs): @@ -166,15 +170,94 @@ def make_executable(path): os.chmod(path, mode) -def mkdir_p(path): +def mkdir(path): """Make (missing) directories.""" + log = logging.getLogger(MODULE) + if path.startswith('/eos'): + mkdir_cmd = 'eos ' + EOS_MGM_URL + ' mkdir -p' + else: + mkdir_cmd = 'mkdir -p' + + if mkdir_cmd is not None: + (exit_code, out, err, command, start_time, end_time) = run_command(' '.join((mkdir_cmd, path))) + if exit_code != 0: + log.error("Mkdir Error: %d %s %s", exit_code, out, err) + return exit_code + + return 0 + + +def ls(path): + """List files in directroy.""" + if path.startswith('/eos'): + ls_cmd = 'eos ' + EOS_MGM_URL + ' ls ' + path + '/' + else: + ls_cmd = 'ls ' + path + '/' + + (exit_code, out, err, command, start_time, end_time) = run_command(ls_cmd) + if exit_code == 0: + print out + print err + + return exit_code + + +def cp(src, dst): + """Copy files to directory.""" + log = logging.getLogger(MODULE) + if dst.startswith('/eos'): + # check which xrdcp we are running + (exit_code, out, err, command, start_time, end_time) = run_command('which xrdcp') + print out + print err + + # check which version of xrdcp we are running + (exit_code, out, err, command, start_time, end_time) = run_command('xrdcp --version') + print out + print err + + cmd = ' '.join(('xrdcp -f -N -r -p -v', src, EOS_MGM_URL + dst + '/')) + else: + cmd = ' '.join(('xrdcp -f -N -r -p -v', src, dst + '/')) + + # run the actual command + log.info("Using: %s", cmd) + (exit_code, exit_out, exit_err, command, start_time, end_time) = run_command(cmd) + if exit_code != 0: + log.error("COPY to DST Error: %d %s %s", exit_code, exit_out, exit_err) + + return exit_code + + +def count_files(path): + """Count number of files.""" + log = logging.getLogger(MODULE) + if path.startswith('/eos'): + cmd = ' '.join(('eos', EOS_MGM_URL, 'find', path, '|', 'wc', '-l')) + else: + cmd = ' '.join(('find', path, '|', 'wc', '-l')) + + (exit_code, out, err, command, start_time, end_time) = run_command(cmd) + if exit_code == 0: + nFiles = int(out) + return nFiles + + log.error("Error retrieving number of files on %s, %s", path, err) + return -1 + + +def touch(fname, times=None): + """Touch a file.""" + with open(fname, 'a'): + os.utime(fname, times) + + +def rm(fname): + """Remove a file.""" try: - os.makedirs(path) - except OSError as exc: # Python >2.5 - if exc.errno == errno.EEXIST and os.path.isdir(path): - pass - else: - raise + os.remove(fname) + except OSError: + pass def which(program): @@ -191,3 +274,8 @@ def which(program): return exe_file return None + + +def memory(scale=1): + """Return free memory.""" + return os.sysconf('SC_PHYS_PAGES') * os.sysconf('SC_PAGE_SIZE') / scale diff --git a/Tools/ART/python/ART/art_rucio.py b/Tools/ART/python/ART/art_rucio.py index 037dae10d3b9..f099d80921bf 100755 --- a/Tools/ART/python/ART/art_rucio.py +++ b/Tools/ART/python/ART/art_rucio.py @@ -55,7 +55,8 @@ class ArtRucio(object): self.exit_if_no_rucio() # rucio downloads cache properly - log.info("Shell = %s", shell) + log.debug("DID = %s", did) + log.debug("Shell = %s", shell) env = os.environ.copy() if shell: cmd = ' '.join((os.path.join(self.art_directory, 'art-download.sh'), did, dst_dir)) @@ -152,6 +153,7 @@ class ArtRucio(object): pattern = self.get_outfile_name(user, package, '*', None, nightly_tag) outfile = None sequence = None + log.debug("Pattern 1 %s", pattern) for out in rucio_client.list_dids(self.get_scope(user), {'name': '.'.join((pattern, 'log'))}): sequence_tag = self.get_sequence_tag(out) if sequence is None or sequence_tag > sequence: @@ -159,14 +161,13 @@ class ArtRucio(object): sequence = sequence_tag if outfile is not None: - log.debug("Adding 'batch': %s", outfile) result.append(outfile) # look for "single" outfile, deduce sequence_tag pattern = self.get_outfile_name(user, package, '*', '*', nightly_tag) - log.debug("Trying pattern %s", pattern) outfile = None sequence = None + log.debug("Pattern 2 %s", pattern) for out in rucio_client.list_dids(self.get_scope(user), {'name': '.'.join((pattern, 'log'))}): sequence_tag = self.get_sequence_tag(out) if sequence is None or sequence_tag > sequence: @@ -179,6 +180,7 @@ class ArtRucio(object): if sequence_tag is not None: # found sequence_tag, find all 'single' outfiles pattern = self.get_outfile_name(user, package, sequence_tag, '*', nightly_tag) + log.debug("Pattern 3 %s", pattern) for out in rucio_client.list_dids(self.get_scope(user), {'name': '.'.join((pattern, 'log'))}): outfile = os.path.splitext(out)[0] log.debug("Adding 'single': %s", outfile) @@ -186,7 +188,7 @@ class ArtRucio(object): return result - def get_table(self, user, package, nightly_tag=None, shell=False): + def get_table(self, user, package, nightly_tag=None, shell=False, tmp=None): """Get full table with grid_index, single_index and test_name for particular package and nightly_tag.""" log = logging.getLogger(MODULE) @@ -195,6 +197,8 @@ class ArtRucio(object): self.exit_if_no_rucio() + tmp = tempfile.gettempdir() if tmp is None else tmp + table = [] nightly_tag = self.nightly_tag if nightly_tag is None else nightly_tag @@ -202,61 +206,63 @@ class ArtRucio(object): outfiles = self.get_outfiles(user, package, nightly_tag) outfiles_str = [x + ArtRucio.JSON for x in outfiles] - outfiles_str = ' '.join(outfiles_str) - - tmp_dir = tempfile.gettempdir() - dst_dir = tmp_dir - - log.info("Shell = %s", shell) - exit_code = self.download(outfiles_str, dst_dir, shell) - if exit_code != 0: - log.error("Failed to execute rucio download %d", exit_code) - return table - - for outfile in outfiles: - single_index = self.get_single_index(outfile) - - json_directory = os.path.join(dst_dir, outfile + ArtRucio.JSON) - if not os.path.isdir(json_directory): - # print single_index, rucio_name - table.append({ - 'single_index': single_index, - 'grid_index': -1, - 'file_index': -1, - 'job_index': -1, - 'outfile': outfile, - 'job_name': None - }) - continue - - for json_file in os.listdir(json_directory): - json_path = os.path.join(json_directory, json_file) - if os.path.isfile(json_path): - with open(json_path) as json_fd: - info = json.load(json_fd) - job_name = os.path.splitext(info['name'])[0] - - # Match: user.artprod.13199077.EXT0._000002.art-job.json - # Match: user.artprod.13199077.EXT0._000003.art-job.json.4 - # job_index = 13199077, grid_index = 3, file_index = 4 - match = re.search(r"user\.([^\.]+)\.(\d+)\.EXT0\._(\d+)\.art-job.json(?:\.(\d+))?", json_file) - if match: - job_index = int(match.group(2)) - grid_index = int(match.group(3)) - file_index = -1 if match.group(4) is None else int(match.group(4)) - else: - job_index = -1 - grid_index = -1 - file_index = -1 - - table.append({ - 'single_index': single_index, - 'grid_index': grid_index, - 'file_index': file_index, - 'job_index': job_index, - 'outfile': outfile, - 'job_name': job_name - }) + if outfiles_str: + outfiles_str = ' '.join(outfiles_str) + + dst_dir = tmp + + log.debug("Shell = %s", shell) + exit_code = self.download(outfiles_str, dst_dir, shell) + if exit_code != 0: + log.error("Failed to execute rucio download %d", exit_code) + return table + + for outfile in outfiles: + single_index = self.get_single_index(outfile) + + json_directory = os.path.join(dst_dir, outfile + ArtRucio.JSON) + if not os.path.isdir(json_directory): + log.debug("Adding, single_index: %d, outfile: %s", single_index, outfile) + table.append({ + 'single_index': single_index, + 'grid_index': -1, + 'file_index': -1, + 'job_index': -1, + 'outfile': outfile, + 'job_name': None + }) + continue + + for json_file in os.listdir(json_directory): + if json_file.endswith(".json"): + json_path = os.path.join(json_directory, json_file) + if os.path.isfile(json_path): + with open(json_path) as json_fd: + info = json.load(json_fd) + job_name = os.path.splitext(info['name'])[0] + + # Match: user.artprod.13199077.EXT0._000002.art-job.json + # Match: user.artprod.13199077.EXT0._000003.art-job.json.4 + # job_index = 13199077, grid_index = 3, file_index = 4 + match = re.search(r"user\.([^\.]+)\.(\d+)\.EXT0\._(\d+)\.art-job.json(?:\.(\d+))?", json_file) + if match: + job_index = int(match.group(2)) + grid_index = int(match.group(3)) + file_index = -1 if match.group(4) is None else int(match.group(4)) + else: + job_index = -1 + grid_index = -1 + file_index = -1 + + log.debug("Adding, single_index: %d, grid_index: %d, file_index: %d, job_index %d, outfile: %s, job_name: %s", single_index, grid_index, file_index, job_index, outfile, job_name) + table.append({ + 'single_index': single_index, + 'grid_index': grid_index, + 'file_index': file_index, + 'job_index': job_index, + 'outfile': outfile, + 'job_name': job_name + }) self.table = table return table diff --git a/Tools/ART/python/ART/docopt.py b/Tools/ART/python/ART/docopt.py index 7c6a52df58a5..4cb99026f86d 100644 --- a/Tools/ART/python/ART/docopt.py +++ b/Tools/ART/python/ART/docopt.py @@ -1,4 +1,5 @@ -"""Pythonic command-line interface parser that will make you smile. +""" +Pythonic command-line interface parser that will make you smile. * http://docopt.org * Repository and issue-tracker: https://github.com/docopt/docopt @@ -10,17 +11,15 @@ import sys import re -__all__ = ['docopt'] +__all__ = ('docopt') __version__ = '0.6.2' class DocoptLanguageError(Exception): - """Error in construction of usage-message by developer.""" class DocoptExit(SystemExit): - """Exit in case user invoked program with incorrect arguments.""" usage = '' @@ -97,7 +96,6 @@ def transform(pattern): class LeafPattern(Pattern): - """Leaf/terminal node of a pattern tree.""" def __init__(self, name, value=None): @@ -131,7 +129,6 @@ class LeafPattern(Pattern): class BranchPattern(Pattern): - """Branch/inner node of a pattern tree.""" def __init__(self, *children): @@ -239,7 +236,6 @@ class Optional(BranchPattern): class OptionsShortcut(Optional): - """Marker/placeholder for [options] shortcut.""" @@ -299,7 +295,10 @@ class Tokens(list): def parse_long(tokens, options): - """long ::= '--' chars [ ( ' ' | '=' ) chars ] ;""" + """Parse long according to definition. + + long ::= '--' chars [ ( ' ' | '=' ) chars ] ; + """ long, eq, value = tokens.move().partition('=') assert long.startswith('--') value = None if eq == value == '' else value @@ -332,7 +331,10 @@ def parse_long(tokens, options): def parse_shorts(tokens, options): - """shorts ::= '-' ( chars )* [ [ ' ' ] chars ] ;""" + """Parse shorts according to definition. + + shorts ::= '-' ( chars )* [ [ ' ' ] chars ] ; + """ token = tokens.move() assert token.startswith('-') and not token.startswith('--') left = token.lstrip('-') @@ -375,7 +377,10 @@ def parse_pattern(source, options): def parse_expr(tokens, options): - """expr ::= seq ( '|' seq )* ;""" + """Parse expr according to definition. + + expr ::= seq ( '|' seq )* ; + """ seq = parse_seq(tokens, options) if tokens.current() != '|': return seq @@ -388,7 +393,10 @@ def parse_expr(tokens, options): def parse_seq(tokens, options): - """seq ::= ( atom [ '...' ] )* ;""" + """Parse seq according to definition. + + seq ::= ( atom [ '...' ] )* ; + """ result = [] while tokens.current() not in [None, ']', ')', '|']: atom = parse_atom(tokens, options) @@ -400,8 +408,10 @@ def parse_seq(tokens, options): def parse_atom(tokens, options): - """atom ::= '(' expr ')' | '[' expr ']' | 'options' - | long | shorts | argument | command ; + """Parse atom according to definition. + + atom ::= '(' expr ')' | '[' expr ']' | 'options' + | long | shorts | argument | command ; """ token = tokens.current() result = [] @@ -426,13 +436,12 @@ def parse_atom(tokens, options): def parse_argv(tokens, options, options_first=False): - """Parse command-line argument vector. + """Parse argv argument vector. If options_first: argv ::= [ long | shorts ]* [ argument ]* [ '--' [ argument ]* ] ; else: argv ::= [ long | shorts | argument ]* [ '--' [ argument ]* ] ; - """ parsed = [] while tokens.current() is not None: @@ -456,7 +465,7 @@ def parse_defaults(doc): _, _, s = s.partition(':') # get rid of "options:" split = re.split('\n[ \t]*(-\S+?)', '\n' + s)[1:] split = [s1 + s2 for s1, s2 in zip(split[::2], split[1::2])] - options = [Option.parse(s) for s in split if s.startswith('-')] + options = [Option.parse(t) for t in split if t.startswith('-')] defaults += options return defaults @@ -562,7 +571,7 @@ def docopt(doc, argv=None, help=True, version=None, options_first=False): options = parse_defaults(doc) pattern = parse_pattern(formal_usage(DocoptExit.usage), options) # [default] syntax for argument is disabled - #for a in pattern.flat(Argument): + # for a in pattern.flat(Argument): # same_name = [d for d in arguments if d.name == a.name] # if same_name: # a.value = same_name[0].value @@ -571,7 +580,7 @@ def docopt(doc, argv=None, help=True, version=None, options_first=False): for options_shortcut in pattern.flat(OptionsShortcut): doc_options = parse_defaults(doc) options_shortcut.children = list(set(doc_options) - pattern_options) - #if any_options: + # if any_options: # options_shortcut.children += [Option(o.short, o.long, o.argcount) # for o in argv if type(o) is Option] extras(help, version, argv, doc) diff --git a/Tools/ART/scripts/art-clean.py b/Tools/ART/scripts/art-clean.py new file mode 100755 index 000000000000..3f714b72146e --- /dev/null +++ b/Tools/ART/scripts/art-clean.py @@ -0,0 +1,208 @@ +#!/usr/bin/env python +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +""" +ART - ATLAS Release Tester - Clean. + +Usage: + art-clean.py [-v -q --base-dir=<base_dir> --delete --days=<days> --eos --config=<file> --release --package=<package>] [<nightly_release> <project> [<platform>]] + +Options: + --base-dir=<base_dir> Start search from basedir [default: /eos/atlas/atlascerngroupdisk/data-art/grid-output] + --config=<file> art-configuration to retrieve packages and days [default: art-configuration.yml] + --delete Actually delete the directories to be cleaned + --days=<days> Number of nighlies to keep [default: 7] + --eos Use eos commands + -h --help Show this screen + --package=<package> Package to be cleaned up, no configuration + --release Clean up full release, no configuration + -q --quiet Show less information, only warnings and errors + -v --verbose Show more information, debug level + --version Show version + +Arguments: + nightly_release Name of the nightly release (e.g. 21.0) + project Project to clean (e.g. Athena) + platform Platform to clean [default: x86_64-slc6-gcc62-opt] + +Environment: + AtlasBuildBranch Name of the nightly release (e.g. 21.0) + AtlasProject Name of the project (e.g. Athena) + <AtlasProject>_PLATFORM Platform (e.g. x86_64-slc6-gcc62-opt) +""" + +__author__ = "Tulay Cuhadar Donszelmann <tcuhadar@cern.ch>" + +import datetime +import logging +import os +import re +import shutil +import sys + +from ART.docopt import docopt +from ART.art_misc import get_atlas_env, run_command +from ART.art_configuration import ArtConfiguration + +MODULE = "art.clean" + + +class ArtClean(object): + """Class to cleanup eos area.""" + + EOS_MGM_URL = 'root://eosatlas.cern.ch' + + def __init__(self, arguments): + """Clean when more than 'days' old.""" + log = logging.getLogger(MODULE) + self.verbose = arguments['--verbose'] + self.eos = arguments['--eos'] + default_days = int(arguments['--days']) + self.delete = arguments['--delete'] + nightly_release = arguments['<nightly_release>'] + project = arguments['<project>'] + platform = arguments['<platform>'] + base_dir = arguments['--base-dir'] + + # Check for missing arguments + if nightly_release is None: + (nightly_release, project, platform, dummy) = get_atlas_env() + + if platform is None: + platform = 'x86_64-slc6-gcc62-opt' + log.info("Defaulting to platform %s", platform) + + if self.eos: + # Test if we have access to kerberos + (code, out, err, command, start_time, end_time) = run_command('klist', verbose=self.verbose) + if code != 0: + log.critical("%s", err) + exit(1) + + package = arguments['--package'] + if package is not None: + self.clean_release(os.path.join(base_dir, nightly_release, project, platform), default_days, package) + return + + if arguments['--release']: + self.clean_release(os.path.join(base_dir, nightly_release, project, platform), default_days) + return + + config_file = arguments['--config'] + config = ArtConfiguration(config_file) + for package in config.packages(): + copy = config.get(nightly_release, project, platform, package, 'copy', False) + if copy: + days = config.get(nightly_release, project, platform, package, 'days', default_days) + self.clean_release(os.path.join(base_dir, nightly_release, project, platform), days, package) + return + + def clean_release(self, release, days, package=None): + """Clean a release dir.""" + log = logging.getLogger(MODULE) + log.debug("Starting to clean up release, keeping %d days, for %s in %s", days, "All" if package is None else package, release) + now = datetime.datetime.now() + count = 0 + date = '1970-01-01' + for entry in reversed(self.listdirs(release)): + # Matches 2018-12-05T0345 + match = re.match(r"(\d{4}-\d{2}-\d{2})T\d{4}", entry) + if match: + tag = os.path.join(release, entry) + # package_dir = tag for full release cleanup + package_dir = tag if package is None else os.path.join(tag, package) + + # only count entries on different dates and where package actually exist + if self.isdir(package_dir) and match.group(1) != date: + count += 1 + date = match.group(1) + + if count > days: + # compare times + dir_time = datetime.datetime.strptime(match.group(0), '%Y-%m-%dT%H%M') + time_diff = now - dir_time + if time_diff.days > days: + log.info("- Nightly tag %d days old, removing %s for package %s", time_diff.days, package_dir, package if package is not None else 'All') + self.remove_dir(package_dir) + if package is not None and self.isempty(tag): + log.info("- Nightly tag contains no more packages, removing %s for package %s", tag, package if package is not None else 'All') + self.remove_dir(tag) + else: + log.debug("- Tag within %d days, keeping %s for package %s", days, tag, package if package is not None else 'All') + else: + log.debug("- Tag within %d entries, keeping %s for package %s", days, tag, package if package is not None else 'All') + + if package is not None and count == 0: + log.debug("No package %s found in any available nightly tag for %s", package, release) + + def listdirs(self, directory): + """Return list of directories in directory.""" + dirs = [] + if self.isdir(directory): + for entry in self.listdir(directory): + path = os.path.join(directory, entry) + if self.isdir(path): + dirs.append(entry) + return dirs + + def isempty(self, directory): + """Return true if directory is empty.""" + if self.isdir(directory): + for entry in self.listdir(directory): + return False + return True + + def listdir(self, directory): + """Return list of entries in directory.""" + log = logging.getLogger(MODULE) + if self.eos: + (code, out, err, command, start_time, end_time) = run_command('eos ' + ArtClean.EOS_MGM_URL + ' ls ' + directory, verbose=self.verbose) + if code == 0: + return out.splitlines() + log.info("eos listdir %d %s", code, err) + return [] + else: + return os.listdir(directory) + + def isdir(self, path): + """Return true is path is directory.""" + log = logging.getLogger(MODULE) + if self.eos: + (code, out, err, command, start_time, end_time) = run_command('eos ' + ArtClean.EOS_MGM_URL + ' stat -d ' + path, verbose=self.verbose) + if code == 0: + return True + log.debug("eos isdir(%s) %d %s", path, code, err) + return False + else: + return os.path.isdir(path) + + def remove_dir(self, directory): + """Remove directory and all below.""" + log = logging.getLogger(MODULE) + if not self.isdir(directory): + return + + if self.delete: + if self.eos: + (code, out, err, command, start_time, end_time) = run_command('eos ' + ArtClean.EOS_MGM_URL + ' rm -r ' + directory, verbose=self.verbose) + if code == 0: + return True + log.info("eos rm -r (%s) %d %s", directory, code, err) + else: + shutil.rmtree(directory) + + +if __name__ == '__main__': + if sys.version_info < (2, 7, 0): + sys.stderr.write("You need python 2.7 or later to run this script\n") + exit(1) + + # NOTE: import should be here, to keep the order of the decorators (module first, art last and unused) + from art import __version__ + + logging.basicConfig() + log = logging.getLogger('art') + + arguments = docopt(__doc__, version=os.path.splitext(os.path.basename(__file__))[0] + ' ' + __version__) + level = logging.DEBUG if arguments['--verbose'] else logging.WARN if arguments['--quiet'] else logging.INFO + log.setLevel(level) + ArtClean(arguments) diff --git a/Tools/ART/scripts/art-diff.py b/Tools/ART/scripts/art-diff.py index 8a3b9340934a..31281893548f 100755 --- a/Tools/ART/scripts/art-diff.py +++ b/Tools/ART/scripts/art-diff.py @@ -4,14 +4,16 @@ ART - ATLAS Release Tester - Diff. Usage: - art-diff.py [--diff-type=<diff_type> --exclude=<pattern>... --platform-ref=<platform> --entries=<entries>] <nightly_release_ref> <project_ref> <nightly_tag_ref> <package> - art-diff.py [--diff-type=<diff_type> --exclude=<pattern>... --entries=<entries>] <path> <ref_path> + art-diff.py [--diff-type=<diff_type> --file=<pattern>... --exclude=<pattern>... --platform-ref=<platform> --entries=<entries> --mode=<mode>] <nightly_release_ref> <project_ref> <nightly_tag_ref> <package> + art-diff.py [--diff-type=<diff_type> --file=<pattern>... --exclude=<pattern>... --entries=<entries> --mode=<mode>] <path> <ref_path> Options: --diff-type=<diff_type> Type of diff (e.g. diff-pool or diff-root) [default: diff-pool] --entries=<entries> Only diff over number of entries [default: -1] --exclude=<pattern>... Exclude test files according to pattern + --file=<pattern>... Compare the following file patterns for diff-root [default: *AOD*.pool.root *ESD*.pool.root *HITS*.pool.root *RDO*.pool.root *TAG*.root] -h --help Show this screen + --mode=<mode> Sets the mode for diff-root {summary, detailed} [default: detailed] --platform-ref=<platform> Reference Platform [default: x86_64-slc6-gcc62-opt] --test-name=<test_name> Test name to compare --version Show version @@ -43,9 +45,10 @@ import sys from ART.docopt import docopt -VERSION = "0.7.8" +VERSION = "0.10.16" ATHENA_STDOUT = "athena_stdout.txt" DEFAULT_ENTRIES = -1 +DEFAULT_MODE = "detailed" class ArtDiff(object): @@ -55,11 +58,14 @@ class ArtDiff(object): def __init__(self): """Constructor of ArtDiff.""" + self.default_file_patterns = ['*AOD*.pool.root', '*ESD*.pool.root', '*HITS*.pool.root', '*RDO*.pool.root', '*TAG*.root'] def parse(self, arguments): """Called from comandline.""" diff_type = arguments['--diff-type'] + files = self.default_file_patterns if diff_type == 'diff-pool' else list(set(arguments['--file'])) entries = arguments['--entries'] + mode = arguments['--mode'] excludes = arguments['--exclude'] if arguments['<nightly_release_ref>'] is not None: try: @@ -67,7 +73,6 @@ class ArtDiff(object): project = os.environ['AtlasProject'] platform = os.environ[project + '_PLATFORM'] nightly_tag = os.environ['AtlasBuildStamp'] - return (nightly_release, project, platform, nightly_tag) except KeyError, e: print "Environment variable not set", e sys.exit(1) @@ -78,8 +83,8 @@ class ArtDiff(object): nightly_tag_ref = arguments['<nightly_tag_ref>'] package = arguments['<package>'] - print nightly_release, project, platform, nightly_tag, nightly_release_ref, project_ref, platform_ref, nightly_tag_ref - exit(self.diff(nightly_release, project, platform, nightly_tag, nightly_release_ref, project_ref, platform_ref, nightly_tag_ref, package, diff_type, excludes, entries=entries)) + print nightly_release, project, platform, nightly_tag, nightly_release_ref, project_ref, platform_ref, nightly_tag_ref + exit(self.diff(nightly_release, project, platform, nightly_tag, nightly_release_ref, project_ref, platform_ref, nightly_tag_ref, package, diff_type, files, excludes, entries=entries, mode=mode)) # directory compare path = arguments['<path>'] @@ -91,7 +96,7 @@ class ArtDiff(object): print "Error: <ref_path> should be a file, if <path> is a file." sys.exit(1) - exit(self.diff_file(path, ref_path, diff_type, entries=entries)) + exit(self.diff_file(path, ref_path, diff_type, entries=entries, mode=mode)) if os.path.isfile(ref_path): print "Error: <ref_path> should be a directory, if <path> is a directory." @@ -100,18 +105,18 @@ class ArtDiff(object): # check if path contains "test_" entries if len(glob.glob(os.path.join(path, 'test_*'))) > 0: # directory compare - exit(self.diff_dirs(path, ref_path, diff_type, excludes, entries=entries)) + exit(self.diff_dirs(path, ref_path, diff_type, files, excludes, entries=entries, mode=mode)) # single test compare - exit(self.diff_test(path, ref_path, diff_type, entries=entries)) + exit(self.diff_test(path, ref_path, diff_type, files, entries=entries, mode=mode)) - def diff(self, nightly_release, project, platform, nightly_tag, nightly_release_ref, project_ref, platform_ref, nightly_tag_ref, package, diff_type, excludes=[], entries=DEFAULT_ENTRIES): + def diff(self, nightly_release, project, platform, nightly_tag, nightly_release_ref, project_ref, platform_ref, nightly_tag_ref, package, diff_type, files, excludes=[], entries=DEFAULT_ENTRIES, mode=DEFAULT_MODE): """Run difference between two results.""" path = os.path.join(ArtDiff.EOS_OUTPUT_DIR, nightly_release, project, platform, nightly_tag, package) ref_path = os.path.join(ArtDiff.EOS_OUTPUT_DIR, nightly_release_ref, project_ref, platform_ref, nightly_tag_ref, package) - return self.diff_dirs(path, ref_path, diff_type, excludes, entries=entries) + return self.diff_dirs(path, ref_path, diff_type, files, excludes, entries=entries, mode=mode) - def diff_dirs(self, path, ref_path, diff_type, excludes=[], entries=DEFAULT_ENTRIES): + def diff_dirs(self, path, ref_path, diff_type, files, excludes=[], entries=DEFAULT_ENTRIES, mode=DEFAULT_MODE): """Run difference between two directories.""" print " path: %s" % path print "ref_path: %s" % ref_path @@ -131,7 +136,7 @@ class ArtDiff(object): print "******************************************" print "Test: %s" % test_name print "******************************************" - stat_per_chain[test_name] = self.diff_test(os.path.join(path, test_name), os.path.join(ref_path, test_name), diff_type, entries=entries) + stat_per_chain[test_name] = self.diff_test(os.path.join(path, test_name), os.path.join(ref_path, test_name), diff_type, files, entries=entries, mode=mode) result = 0 for test_name, status in stat_per_chain.iteritems(): @@ -143,7 +148,7 @@ class ArtDiff(object): return result - def diff_test(self, path, ref_path, diff_type, entries=DEFAULT_ENTRIES): + def diff_test(self, path, ref_path, diff_type, files, entries=DEFAULT_ENTRIES, mode=DEFAULT_MODE): """Run differences between two directories.""" result = self.get_result(path) ref_result = self.get_result(ref_path) @@ -152,10 +157,9 @@ class ArtDiff(object): print "%-10s: ref: %d events, val: %d events" % (key, int(ref_result[key][1]), int(result[key][1])) test_dir = path - test_patterns = ['*AOD*.pool.root', '*ESD*.pool.root', '*HITS*.pool.root', '*RDO*.pool.root', '*TAG*.root'] # get files in all patterns test_files = [] - for test_pattern in test_patterns: + for test_pattern in files: test_files.extend(glob.glob(os.path.join(test_dir, test_pattern))) # run test over all files result = 0 @@ -166,11 +170,11 @@ class ArtDiff(object): print "val_file: %s" % val_file print "ref_file: %s" % ref_file - result |= self.diff_file(val_file, ref_file, diff_type, entries=entries) + result |= self.diff_file(val_file, ref_file, diff_type, entries=entries, mode=mode) return result - def diff_file(self, path, ref_path, diff_type, entries=DEFAULT_ENTRIES): + def diff_file(self, path, ref_path, diff_type, entries=DEFAULT_ENTRIES, mode=DEFAULT_MODE): """Compare two files.""" if not os.path.exists(ref_path): print "no test found in ref_dir to compare: %s" % ref_path @@ -182,7 +186,7 @@ class ArtDiff(object): if diff_type == 'diff-pool': return self.diff_pool(path, ref_path) - return self.diff_root(path, ref_path, entries) + return self.diff_root(path, ref_path, entries, mode) def get_result(self, directory): """ @@ -226,10 +230,10 @@ class ArtDiff(object): return stat - def diff_root(self, file_name, ref_file, entries): + def diff_root(self, file_name, ref_file, entries, mode): """TBD.""" # diff-root - (code, out, err) = self.run_command("acmd.py diff-root " + file_name + " " + ref_file + " --error-mode resilient --ignore-leaves RecoTimingObj_p1_HITStoRDO_timings RecoTimingObj_p1_RAWtoESD_mems RecoTimingObj_p1_RAWtoESD_timings RAWtoESD_mems RAWtoESD_timings ESDtoAOD_mems ESDtoAOD_timings HITStoRDO_timings RAWtoALL_mems RAWtoALL_timings RecoTimingObj_p1_RAWtoALL_mems RecoTimingObj_p1_RAWtoALL_timings RecoTimingObj_p1_EVNTtoHITS_timings --entries " + str(entries)) + (code, out, err) = self.run_command("acmd.py diff-root " + file_name + " " + ref_file + " --error-mode resilient --ignore-leaves RecoTimingObj_p1_HITStoRDO_timings RecoTimingObj_p1_RAWtoESD_mems RecoTimingObj_p1_RAWtoESD_timings RAWtoESD_mems RAWtoESD_timings ESDtoAOD_mems ESDtoAOD_timings HITStoRDO_timings RAWtoALL_mems RAWtoALL_timings RecoTimingObj_p1_RAWtoALL_mems RecoTimingObj_p1_RAWtoALL_timings RecoTimingObj_p1_EVNTtoHITS_timings --entries " + str(entries) + " --mode " + mode) if code != 0: print "Error: %d" % code print err diff --git a/Tools/ART/scripts/art-download.sh b/Tools/ART/scripts/art-download.sh index b852dc8d7534..89ed645c4f6f 100755 --- a/Tools/ART/scripts/art-download.sh +++ b/Tools/ART/scripts/art-download.sh @@ -25,6 +25,7 @@ source "${ATLAS_LOCAL_ROOT_BASE}"/user/atlasLocalSetup.sh --quiet unset ALRB_noGridMW lsetup -f rucio +lsetup -f "xrootd 4.7.1" echo "Name: ${NAME}" echo "Directory: ${DIRECTORY}" diff --git a/Tools/ART/scripts/art-internal.py b/Tools/ART/scripts/art-internal.py index 7eb30f679131..ec313bd86aac 100755 --- a/Tools/ART/scripts/art-internal.py +++ b/Tools/ART/scripts/art-internal.py @@ -5,8 +5,8 @@ ART-internal - ATLAS Release Tester (internal command). Usage: art-internal.py build job [-v -q] <script_directory> <sequence_tag> <package> <outfile> <job_type> <job_index> - art-internal.py grid batch [-v -q --skip-setup -n] <script_directory> <sequence_tag> <package> <outfile> <job_type> <job_index> - art-internal.py grid single [-v -q --skip-setup --in=<in_file> -n] <script_directory> <sequence_tag> <package> <outfile> <job_name> + art-internal.py grid batch [-v -q --skip-setup -n] <script_directory> <sequence_tag> <package> <outfile> <inform_panda> <job_type> <job_index> + art-internal.py grid single [-v -q --skip-setup --in=<in_file> -n] <script_directory> <sequence_tag> <package> <outfile> <inform_panda> <job_name> Options: -h --help Show this screen. @@ -18,6 +18,7 @@ Options: --version Show version. Arguments: + inform_panda Inform Big Panda about job job_index Index of the test inside the package job_name Index of the test (batch), or its name (single) job_type Type of job (e.g. grid, ci, build) @@ -63,7 +64,7 @@ def build_job(script_directory, sequence_tag, package, outfile, job_type, job_in @dispatch.on('grid', 'batch') -def grid_batch(script_directory, sequence_tag, package, outfile, job_type, job_index, **kwargs): +def grid_batch(script_directory, sequence_tag, package, outfile, inform_panda, job_type, job_index, **kwargs): """Run a batch job, given a particular index. Tests are called with the following parameters: @@ -73,11 +74,11 @@ def grid_batch(script_directory, sequence_tag, package, outfile, job_type, job_i art_directory = os.path.dirname(os.path.realpath(sys.argv[0])) (nightly_release, project, platform, nightly_tag) = get_atlas_env() skip_setup = kwargs['skip_setup'] - exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag, script_directory, skip_setup).batch(sequence_tag, package, outfile, job_type, job_index)) + exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag, script_directory, skip_setup).batch(sequence_tag, package, outfile, inform_panda, job_type, job_index)) @dispatch.on('grid', 'single') -def grid_single(script_directory, sequence_tag, package, outfile, job_name, **kwargs): +def grid_single(script_directory, sequence_tag, package, outfile, inform_panda, job_name, **kwargs): """Run a single job, given a particular name. Tests are called with the following parameters: @@ -88,7 +89,7 @@ def grid_single(script_directory, sequence_tag, package, outfile, job_name, **kw (nightly_release, project, platform, nightly_tag) = get_atlas_env() skip_setup = kwargs['skip_setup'] in_file = kwargs['in'] - exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag, script_directory, skip_setup).single(sequence_tag, package, outfile, job_name, in_file)) + exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag, script_directory, skip_setup).single(sequence_tag, package, outfile, inform_panda, job_name, in_file)) if __name__ == '__main__': diff --git a/Tools/ART/scripts/art-share.py b/Tools/ART/scripts/art-share.py index 46732ebc00f8..003fe7bfd6d6 100755 --- a/Tools/ART/scripts/art-share.py +++ b/Tools/ART/scripts/art-share.py @@ -170,7 +170,7 @@ if __name__ == '__main__': from art import __version__ logging.basicConfig() - log = logging.getLogger(MODULE) + log = logging.getLogger('art') arguments = docopt(__doc__, version=os.path.splitext(os.path.basename(__file__))[0] + ' ' + __version__) level = logging.DEBUG if arguments['--verbose'] else logging.WARN if arguments['--quiet'] else logging.INFO diff --git a/Tools/ART/scripts/art-task-build.sh b/Tools/ART/scripts/art-task-build.sh index c8c505c3cfcb..d8b5c1d925ad 100755 --- a/Tools/ART/scripts/art-task-build.sh +++ b/Tools/ART/scripts/art-task-build.sh @@ -21,7 +21,7 @@ else fi export ATLAS_LOCAL_ROOT_BASE="${ATLAS_LOCAL_ROOT_BASE:-/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase}" -# shellcheck source=/dev/null +# shellcheck source=/dev/null source "${ATLAS_LOCAL_ROOT_BASE}"/user/atlasLocalSetup.sh --quiet if [ "${BRANCH}" == "master" ]; then lsetup -a testing asetup @@ -48,7 +48,10 @@ ART_DIRECTORY=$(command -v art.py) ART_VERSION=$(art.py --version) echo "INFO: Using ART version ${ART_VERSION} in ${ART_DIRECTORY} directory" -# configure MGM_URL +# automatic clean-up build-output EOS area +art-clean.py --eos --release --base-dir=/eos/atlas/atlascerngroupdisk/data-art/build-output --delete "${AtlasBuildBranch}" "${AtlasProject}" "${PLATFORM}" || true & + +# configure EOS_MGM_URL if [ -z "${EOS_MGM_URL}" ]; then echo "WARNING: EOS_MGM_URL variable is empty, setting it to root://eosatlas.cern.ch" export EOS_MGM_URL="root://eosatlas.cern.ch" diff --git a/Tools/ART/scripts/art-task-grid.sh b/Tools/ART/scripts/art-task-grid.sh index 0ad216bbc9b9..e459d17a8f2f 100755 --- a/Tools/ART/scripts/art-task-grid.sh +++ b/Tools/ART/scripts/art-task-grid.sh @@ -5,9 +5,9 @@ # # Example command lines for three types: # -# art-task-grid.sh [--no-action] batch <submit_directory> <script_directory> <sequence_tag> <package> <outfile> <job_type> <number_of_tests> +# art-task-grid.sh [--no-action] batch <submit_directory> <script_directory> <sequence_tag> <package> <outfile> <inform_panda> <job_type> <number_of_tests> # -# art-task-grid.sh [--no-action] single [--inds <input_file> --n-files <number_of_files> --split <split>] <submit_directory> <script_directory> <sequence_tag> <package> <outfile> <job_name> +# art-task-grid.sh [--no-action] single [--inds <input_file> --n-files <number_of_files> --split <split>] <submit_directory> <script_directory> <sequence_tag> <package> <outfile> <inform_panda> <job_name> # # env: ART_GRID_OPTIONS # @@ -50,6 +50,7 @@ case ${TYPE} in if [ "$1" == "--n-files" ]; then NFILES="--nFiles $2" NFILES_PER_JOB="--nFilesPerJob $2" + NCORE_NFILES_PER_JOB="--nFilesPerJob $2" shift shift fi @@ -70,7 +71,15 @@ case ${TYPE} in NCORES="" if [ "$1" == "--ncore" ]; then NCORES="--nCore $2" - NFILES_PER_JOB="" + NFILES_PER_JOB="${NCORE_NFILES_PER_JOB}" + LARGE_JOB="" + shift + shift + fi + ATHENA_MT="" + if [ "$1" == "--athena_mt" ]; then + NCORES="--nCore $2" + LARGE_JOB="" shift shift fi @@ -101,6 +110,10 @@ OUTFILE=$1 shift echo "OUTFILE=${OUTFILE}" +INFORM_PANDA=$1 +shift +echo "INFORM_PANDA=${INFORM_PANDA}" + case ${TYPE} in 'batch') @@ -123,7 +136,7 @@ case ${TYPE} in esac # general options -PATHENA_OPTIONS="--destSE=CERN-PROD_SCRATCHDISK" +PATHENA_OPTIONS="--noBuild --expertOnly_skipScout --noEmail --maxAttempt 2" OUT="%OUT.tar" # we seem to have to copy the env variables locally @@ -144,7 +157,7 @@ case ${TYPE} in 'single') # <script_directory> <sequence_tag> <package> <outfile> <job_name> INTERNAL_COMMAND="grid single" - PATHENA_TYPE_OPTIONS="${LARGE_JOB} ${INDS} ${NFILES} ${NFILES_PER_JOB} ${NCORES}" + PATHENA_TYPE_OPTIONS="${LARGE_JOB} ${INDS} ${NFILES} ${NFILES_PER_JOB} ${NCORES} ${ATHENA_MT}" ARGS="${JOB_NAME}" echo "PATHENA_TYPE_OPTIONS=${PATHENA_TYPE_OPTIONS}" echo "ARGS=${ARGS}" @@ -154,13 +167,12 @@ esac # NOTE: for art-internal.py the current dir can be used as it is copied there cd "${SUBMIT_DIRECTORY}"/"${PACKAGE}"/run -SUBCOMMAND="./art-internal.py ${INTERNAL_COMMAND} ${IN_FILE} ${SCRIPT_DIRECTORY} ${SEQUENCE_TAG} ${PACKAGE} ${OUT} ${ARGS}" -CMD="pathena ${GRID_OPTIONS} ${PATHENA_OPTIONS} ${PATHENA_TYPE_OPTIONS} --noBuild --expertOnly_skipScout --trf \"${SUBCOMMAND}\" ${SPLIT} --outDS ${OUTFILE} --extOutFile art-job.json" +SUBCOMMAND="./art-internal.py ${INTERNAL_COMMAND} ${IN_FILE} ${SCRIPT_DIRECTORY} ${SEQUENCE_TAG} ${PACKAGE} ${OUT} ${INFORM_PANDA} ${ARGS}" +CMD="pathena ${GRID_OPTIONS} ${PATHENA_OPTIONS} ${PATHENA_TYPE_OPTIONS} --trf \"${SUBCOMMAND}\" ${SPLIT} --outDS ${OUTFILE} --extOutFile art-job.json" #--disableAutoRetry #--excludedSite=ANALY_TECHNION-HEP-CREAM #--site=ANALY_NIKHEF-ELPROD_SHORT,ANALY_NIKHEF-ELPROD" -#--site=ANALY_FZK,ANALY_BNL,ANALY_RAL" echo "Command: ${CMD}" diff --git a/Tools/ART/scripts/art.py b/Tools/ART/scripts/art.py index 04b4c72f7598..b364ee9af212 100755 --- a/Tools/ART/scripts/art.py +++ b/Tools/ART/scripts/art.py @@ -7,13 +7,13 @@ You need to setup for an ATLAS release before using ART. Usage: art.py run [-v -q --type=<T> --max-jobs=<N> --ci] <script_directory> <sequence_tag> - art.py grid [-v -q --type=<T> --max-jobs=<N> --config=<file> --copy -n] <script_directory> <sequence_tag> + art.py grid [-v -q --type=<T> --max-jobs=<N> -n] <script_directory> <sequence_tag> art.py submit [-v -q --type=<T> --max-jobs=<N> --config=<file> -n] <sequence_tag> [<package>] - art.py copy [-v -q --user=<user> --dst=<dir>] <indexed_package> + art.py copy [-v -q --user=<user> --dst=<dir> --no-unpack --tmp=<dir> --seq=<N> --keep-tmp] <indexed_package> art.py validate [-v -q] <script_directory> art.py included [-v -q --type=<T> --test-type=<TT>] <script_directory> - art.py compare grid [-v -q --days=<D> --user=<user> --entries=<entries>] <package> <test_name> - art.py compare ref [-v -q --entries=<entries>] <path> <ref_path> + art.py compare grid [-v -q --days=<D> --user=<user> --entries=<entries> --file=<pattern>... --mode=<mode>] <package> <test_name> + art.py compare ref [-v -q --entries=<entries> --file=<pattern>... --mode=<mode>] <path> <ref_path> art.py list grid [-v -q --user=<user> --json --test-type=<TT>] <package> art.py log grid [-v -q --user=<user>] <package> <test_name> art.py output grid [-v -q --user=<user>] <package> <test_name> @@ -23,16 +23,21 @@ Usage: Options: --ci Run Continuous Integration tests only (using env: AtlasBuildBranch) --config=<file> Use specific config file [default: art-configuration.yml] - --copy Run the copy after running the jobs --days=<D> Number of days ago to pick up reference for compare [default: 1] --dst=<dir> Destination directory for downloaded files --entries=<entries> Number of entries to compare [default: 10] + --file=<pattern>... Compare the following file patterns for diff-root [default: *AOD*.pool.root *ESD*.pool.root *HITS*.pool.root *RDO*.pool.root *TAG*.root] -h --help Show this screen. --json Output in json format + --keep-tmp Keep temporary directory while copying --max-jobs=<N> Maximum number of concurrent jobs to run [default: 0] + --mode=<mode> Sets the mode for diff-root {summary, detailed} [default: detailed] -n --no-action No real submit will be done + --no-unpack Do not unpack downloaded tar files -q --quiet Show less information, only warnings and errors + --seq=<N> Use N as postfix on destination nightly-tag (for retries) [default: 0] --test-type=<TT> Type of test (e.g. all, batch or single) [default: all] + --tmp=<dir> Temporary directory for downloaded files and caching of EXT0 --type=<T> Type of job (e.g. grid, build) --user=<user> User to use for RUCIO -v --verbose Show more information, debug level @@ -41,7 +46,7 @@ Options: Sub-commands: run Run jobs from a package in a local build (needs release and grid setup) grid Run jobs from a package on the grid (needs release and grid setup) - submit Submit nightly jobs to the grid (NOT for users) + submit Submit nightly jobs to the grid and informs big panda (NOT for users) copy Copy outputs and logs from RUCIO validate Check headers in tests included Show list of files which will be included for art submit/art grid @@ -73,7 +78,7 @@ Tests are called with: """ __author__ = "Tulay Cuhadar Donszelmann <tcuhadar@cern.ch>" -__version__ = '0.9.5' +__version__ = '0.10.21' import logging import os @@ -97,8 +102,10 @@ def compare_ref(path, ref_path, **kwargs): """Compare the output of a job.""" set_log(kwargs) art_directory = os.path.dirname(os.path.realpath(sys.argv[0])) + files = kwargs['file'] entries = kwargs['entries'] - exit(ArtBase(art_directory).compare_ref(path, ref_path, entries)) + mode = kwargs['mode'] + exit(ArtBase(art_directory).compare_ref(path, ref_path, files, entries, mode)) @dispatch.on('compare', 'grid') @@ -108,9 +115,11 @@ def compare_grid(package, test_name, **kwargs): art_directory = os.path.dirname(os.path.realpath(sys.argv[0])) (nightly_release, project, platform, nightly_tag) = get_atlas_env() days = int(kwargs['days']) - entries = kwargs['entries'] user = kwargs['user'] - exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag).compare(package, test_name, days, user, entries=entries, shell=True)) + files = kwargs['file'] + entries = kwargs['entries'] + mode = kwargs['mode'] + exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag).compare(package, test_name, days, user, files, entries=entries, mode=mode, shell=True)) @dispatch.on('list', 'grid') @@ -153,11 +162,13 @@ def submit(sequence_tag, **kwargs): art_directory = os.path.dirname(os.path.realpath(sys.argv[0])) (nightly_release, project, platform, nightly_tag) = get_atlas_env() job_type = 'grid' if kwargs['type'] is None else kwargs['type'] + user = os.getenv('USER', 'artprod') + inform_panda = user == 'artprod' package = kwargs['package'] config = kwargs['config'] no_action = kwargs['no_action'] wait_and_copy = True - exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag, max_jobs=int(kwargs['max_jobs'])).task_list(job_type, sequence_tag, package, no_action, wait_and_copy, config)) + exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag, max_jobs=int(kwargs['max_jobs'])).task_list(job_type, sequence_tag, inform_panda, package, no_action, wait_and_copy, config)) @dispatch.on('grid') @@ -167,11 +178,12 @@ def grid(script_directory, sequence_tag, **kwargs): art_directory = os.path.dirname(os.path.realpath(sys.argv[0])) (nightly_release, project, platform, nightly_tag) = get_atlas_env() job_type = 'grid' if kwargs['type'] is None else kwargs['type'] + inform_panda = False package = None - config = kwargs['config'] + config = None no_action = kwargs['no_action'] - wait_and_copy = kwargs['copy'] - exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag, script_directory=script_directory, skip_setup=True, max_jobs=int(kwargs['max_jobs'])).task_list(job_type, sequence_tag, package, no_action, wait_and_copy, config)) + wait_and_copy = False + exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag, script_directory=script_directory, skip_setup=True, max_jobs=int(kwargs['max_jobs'])).task_list(job_type, sequence_tag, inform_panda, package, no_action, wait_and_copy, config)) @dispatch.on('run') @@ -193,7 +205,11 @@ def copy(indexed_package, **kwargs): # NOTE: default depends on USER, not set it here but in ArtGrid.copy dst = kwargs['dst'] user = kwargs['user'] - exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag).copy(indexed_package, dst=dst, user=user)) + no_unpack = kwargs['no_unpack'] + tmp = kwargs['tmp'] + seq = int(kwargs['seq']) + keep_tmp = kwargs['keep_tmp'] + exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag).copy(indexed_package, dst=dst, user=user, no_unpack=no_unpack, tmp=tmp, seq=seq, keep_tmp=keep_tmp)) @dispatch.on('validate') -- GitLab From 11b80b6fb7d8cf52ef138b114f8b8dca04940f1b Mon Sep 17 00:00:00 2001 From: Jyoti Prakash Biswal <jyoti.prakash.biswal@cern.ch> Date: Tue, 10 Jul 2018 14:47:16 +0200 Subject: [PATCH 430/562] Solution to move assignment operator. Coverity issue# 113718 Former-commit-id: 7943ef31d20e696241558c5cca95421eed63264c --- .../VxJetVertex/src/VertexPositions.cxx | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/Tracking/TrkEvent/VxJetVertex/src/VertexPositions.cxx b/Tracking/TrkEvent/VxJetVertex/src/VertexPositions.cxx index ee25843b1b17..0c26348d7ee9 100644 --- a/Tracking/TrkEvent/VxJetVertex/src/VertexPositions.cxx +++ b/Tracking/TrkEvent/VxJetVertex/src/VertexPositions.cxx @@ -34,24 +34,6 @@ namespace Trk { #endif } - VertexPositions::VertexPositions(const VertexPositions& rhs) : m_position(rhs.m_position), - m_useWeightTimesPosition(rhs.m_useWeightTimesPosition) - { -#ifndef NDEBUG - s_numberOfInstantiations++; // new Vertex, so increment total count -#endif - } - - VertexPositions & VertexPositions::operator= (const VertexPositions& rhs) - { - if (this!=&rhs) - { - m_position = rhs.m_position; - m_useWeightTimesPosition=rhs.m_useWeightTimesPosition; - } - return *this; - } - MsgStream& VertexPositions::dump(MsgStream& sl) const { if (m_useWeightTimesPosition) { sl << "Trk::VertexPositions weight times position: (" ; -- GitLab From 23f408da12f0fce5c252ad5ba5917f97dea4099b Mon Sep 17 00:00:00 2001 From: Jovan Mitrevski <Jovan.Mitrevski@cern.ch> Date: Tue, 10 Jul 2018 16:45:33 +0200 Subject: [PATCH 431/562] Remove special hltexecute interfaces to IegammaMVASvc and use references. The hltexecute interface was just a wrapper to one of the other interfaces but used strings instead of enums. There seems to be no need for it. Also, I changed passing pointers to passing references in order to prevent a potential generic programming ambiguity if 0 was passed (int-> enum or ptr?) Former-commit-id: 35ca2e262dfe84e6683472c094cf96369f5cedb1 --- .../src/egammaSuperClusterBuilder.cxx | 2 +- .../egammaInterfaces/IegammaMVASvc.h | 10 +-- .../egammaMVACalib/src/egammaMVACalibTool.h | 2 +- .../egammaMVACalib/src/egammaMVASvc.cxx | 66 ++++++------------- .../egamma/egammaMVACalib/src/egammaMVASvc.h | 9 +-- .../egamma/egammaTools/src/EMClusterTool.cxx | 4 +- .../TrigEgammaHypo/TrigEFCaloCalibFex.h | 2 +- .../python/TrigEFCaloCalibFexConfig.py | 8 ++- .../TrigEgammaHypo/src/TrigEFCaloCalibFex.cxx | 4 +- 9 files changed, 40 insertions(+), 67 deletions(-) diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx index 6ebe3417e3a6..cdf36409929d 100644 --- a/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx +++ b/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx @@ -401,7 +401,7 @@ StatusCode egammaSuperClusterBuilder::CalibrateCluster(xAOD::CaloCluster* newClu //So We will need at the end to do the final update in the EMClusterTool //For now apply just cluster info only calibration. if (m_calibrateClusters) { - ATH_CHECK(m_MVACalibSvc->execute(newCluster,egType)); + ATH_CHECK(m_MVACalibSvc->execute(*newCluster,egType)); } ATH_MSG_DEBUG("========== cluster only calibration ==== "); ATH_MSG_DEBUG("Cluster Energy after cluster only calibration: "<<newCluster->e()); diff --git a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVASvc.h b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVASvc.h index b30174fc6cd1..14525a8bffc5 100644 --- a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVASvc.h +++ b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVASvc.h @@ -23,18 +23,14 @@ public: virtual ~IegammaMVASvc() override {}; /// Standard execute when you have both cluster and eg object - virtual StatusCode execute(xAOD::CaloCluster* cluster, - const xAOD::Egamma* eg) const = 0; + virtual StatusCode execute(xAOD::CaloCluster& cluster, + const xAOD::Egamma& eg) const = 0; /// An execute that just has cluster and egType. A converted photon /// is treated like an unconverted photon since no access to vertex. - virtual StatusCode execute(xAOD::CaloCluster* cluster, + virtual StatusCode execute(xAOD::CaloCluster& cluster, xAOD::EgammaParameters::EgammaType egType) const = 0; - /// The old hlt interface. Consider migrating to the one above - /// since it's more efficient to use enums instead of strings. - virtual StatusCode hltexecute(xAOD::CaloCluster* cluster, - const std::string& egType) const =0; }; diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h index fa3f61be30d8..b1fac11935e4 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h @@ -6,7 +6,7 @@ // Package includes #include "egammaInterfaces/IegammaMVACalibTool.h" -#include "xAODEgamma/EgammaDefs.h" +#include "xAODEgamma/EgammaEnums.h" #include "xAODEgamma/Electron.h" #include "xAODEgamma/Photon.h" #include "xAODCaloEvent/CaloCluster.h" diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx index b260b931c149..62d42a0dc5ea 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx @@ -58,37 +58,32 @@ StatusCode egammaMVASvc::finalize(){ return StatusCode::SUCCESS; } -StatusCode egammaMVASvc::execute(xAOD::CaloCluster* cluster, - const xAOD::Egamma* eg) const +StatusCode egammaMVASvc::execute(xAOD::CaloCluster& cluster, + const xAOD::Egamma& eg) const { - ATH_MSG_DEBUG("calling execute with cluster (" << cluster << ") and eg (" << eg <<")"); - - if (!eg || !cluster) { - ATH_MSG_FATAL("Invalid Pointer to egamma or cluster object"); - return StatusCode::FAILURE; - } + ATH_MSG_DEBUG("calling execute with cluster and eg"); float mvaE = 0.0; - if (xAOD::EgammaHelpers::isElectron(eg)) { + if (xAOD::EgammaHelpers::isElectron(&eg)) { if (m_mvaElectron.isEnabled()) { - mvaE = m_mvaElectron->getEnergy(eg, cluster); + mvaE = m_mvaElectron->getEnergy(&eg, &cluster); } else { ATH_MSG_FATAL("Trying to calibrate an electron, but disabled"); return StatusCode::FAILURE; } - } else if (xAOD::EgammaHelpers::isConvertedPhoton(eg) && - xAOD::EgammaHelpers::conversionRadius(static_cast<const xAOD::Photon*>(eg)) < m_maxConvR) { + } else if (xAOD::EgammaHelpers::isConvertedPhoton(&eg) && + xAOD::EgammaHelpers::conversionRadius(static_cast<const xAOD::Photon*>(&eg)) < m_maxConvR) { if (m_mvaConvertedPhoton.isEnabled()) { - mvaE = m_mvaConvertedPhoton->getEnergy(eg, cluster); + mvaE = m_mvaConvertedPhoton->getEnergy(&eg, &cluster); } else { ATH_MSG_FATAL("Trying to calibrate a converted photon, but disabled"); return StatusCode::FAILURE; } - } else if (xAOD::EgammaHelpers::isPhoton(eg)) { + } else if (xAOD::EgammaHelpers::isPhoton(&eg)) { if (m_mvaUnconvertedPhoton.isEnabled()) { - mvaE = m_mvaUnconvertedPhoton->getEnergy(eg, cluster); + mvaE = m_mvaUnconvertedPhoton->getEnergy(&eg, &cluster); } else { ATH_MSG_FATAL("Trying to calibrate an unconverted photon, but disabled"); return StatusCode::FAILURE; @@ -99,32 +94,28 @@ StatusCode egammaMVASvc::execute(xAOD::CaloCluster* cluster, } ATH_MSG_DEBUG( "Calculated MVA calibrated energy = " << mvaE ); - if (mvaE > eg->m()) { - cluster->setCalE(mvaE); + if (mvaE > eg.m()) { + cluster.setCalE(mvaE); } else { ATH_MSG_DEBUG("MVA energy (" << mvaE << ") < particle mass (" - << eg->m() << "), setting e = cluster energy (" << cluster->e() << ")"); - cluster->setCalE(cluster->e()); + << eg.m() << "), setting e = cluster energy (" << cluster.e() << ")"); + cluster.setCalE(cluster.e()); } return StatusCode::SUCCESS; } -StatusCode egammaMVASvc::execute(xAOD::CaloCluster* cluster, +StatusCode egammaMVASvc::execute(xAOD::CaloCluster& cluster, xAOD::EgammaParameters::EgammaType egType) const { - ATH_MSG_DEBUG("calling execute with cluster (" << cluster << ") and egType (" << egType <<")"); + ATH_MSG_DEBUG("calling execute with cluster and egType (" << egType <<")"); - if (!cluster) { - ATH_MSG_ERROR("Invalid Pointer to egamma or cluster object"); - return StatusCode::FAILURE; - } float mvaE = 0.0; switch (egType) { case xAOD::EgammaParameters::electron: if (m_mvaElectron.isEnabled()) { - mvaE = m_mvaElectron->getEnergy(nullptr, cluster); + mvaE = m_mvaElectron->getEnergy(nullptr, &cluster); } else { ATH_MSG_FATAL("Trying to calibrate an electron, but disabled"); return StatusCode::FAILURE; @@ -134,7 +125,7 @@ StatusCode egammaMVASvc::execute(xAOD::CaloCluster* cluster, case xAOD::EgammaParameters::unconvertedPhoton: // treat converted photons like unconverted photons since don't have access to vertex if (m_mvaUnconvertedPhoton.isEnabled()) { - mvaE = m_mvaUnconvertedPhoton->getEnergy(nullptr, cluster); + mvaE = m_mvaUnconvertedPhoton->getEnergy(nullptr, &cluster); } else { ATH_MSG_FATAL("Trying to calibrate an unconverted photon, but disabled"); return StatusCode::FAILURE; @@ -147,27 +138,12 @@ StatusCode egammaMVASvc::execute(xAOD::CaloCluster* cluster, ATH_MSG_DEBUG( "Calculated MVA calibrated energy = " << mvaE ); if (mvaE > 0) { - cluster->setCalE(mvaE); + cluster.setCalE(mvaE); } else { ATH_MSG_DEBUG("MVA energy (" << mvaE << ") < 0, setting e = cluster energy (" - << cluster->e() << ")"); - cluster->setCalE(cluster->e()); - } - return StatusCode::SUCCESS; -} - -// I wonder if this should be removed, and the user should just use the execute -// with egType passed as an xAOD::EgammaParameters::EgammaType instead of a string -StatusCode egammaMVASvc::hltexecute(xAOD::CaloCluster* cluster, const std::string& egType) const -{ - if (egType == "Electron") { - return execute(cluster, xAOD::EgammaParameters::electron); - } else if (egType == "Photon"){ - return execute(cluster, xAOD::EgammaParameters::unconvertedPhoton); - } else { - ATH_MSG_FATAL("The egType string is not Electron or Photon: " << egType); - return StatusCode::FAILURE; + << cluster.e() << ")"); + cluster.setCalE(cluster.e()); } return StatusCode::SUCCESS; } diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h index 92e1602e0850..728e6a58d5de 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h @@ -35,15 +35,12 @@ public: This method needs to be valid also for reconstruction */ - StatusCode execute(xAOD::CaloCluster* cluster, - const xAOD::Egamma* eg) const override final; + StatusCode execute(xAOD::CaloCluster& cluster, + const xAOD::Egamma& eg) const override final; - StatusCode execute(xAOD::CaloCluster* cluster, + StatusCode execute(xAOD::CaloCluster& cluster, xAOD::EgammaParameters::EgammaType egType) const override final; - StatusCode hltexecute(xAOD::CaloCluster* cluster, - const std::string& egType) const override final; - private: /// MVA tool for electron diff --git a/Reconstruction/egamma/egammaTools/src/EMClusterTool.cxx b/Reconstruction/egamma/egammaTools/src/EMClusterTool.cxx index f3569e3c91dd..5e51ea410505 100644 --- a/Reconstruction/egamma/egammaTools/src/EMClusterTool.cxx +++ b/Reconstruction/egamma/egammaTools/src/EMClusterTool.cxx @@ -205,7 +205,7 @@ xAOD::CaloCluster* EMClusterTool::makeNewCluster(const xAOD::CaloCluster& cluste } xAOD::CaloCluster *newCluster = makeNewCluster(cluster, cluSize); - if (newCluster && m_MVACalibSvc->execute(newCluster,eg).isFailure()){ + if (newCluster && m_MVACalibSvc->execute(*newCluster,*eg).isFailure()){ ATH_MSG_ERROR("Problem executing MVA cluster tool"); } return newCluster; @@ -242,7 +242,7 @@ xAOD::CaloCluster* EMClusterTool::makeNewSuperCluster(const xAOD::CaloCluster& c // xAOD::CaloCluster* newClus = new xAOD::CaloCluster(cluster); if(m_applySuperClusters){ - if (newClus && m_MVACalibSvc->execute(newClus,eg).isFailure()){ + if (newClus && m_MVACalibSvc->execute(*newClus,*eg).isFailure()){ ATH_MSG_ERROR("Problem executing MVA cluster tool"); } } diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/TrigEgammaHypo/TrigEFCaloCalibFex.h b/Trigger/TrigHypothesis/TrigEgammaHypo/TrigEgammaHypo/TrigEFCaloCalibFex.h index 95d1096b71bf..f2c25b87b077 100755 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/TrigEgammaHypo/TrigEFCaloCalibFex.h +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/TrigEgammaHypo/TrigEFCaloCalibFex.h @@ -62,7 +62,7 @@ class TrigEFCaloCalibFex : public HLT::FexAlgo { // to set Accept-All mode bool m_acceptAll; bool m_applyMVACalib; - std::string m_egType; + int m_egType; std::string m_persKey; // Cluster container key xAOD::CaloClusterContainer* m_pCaloClusterContainer; //!< pointer to CaloClusterContainer diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEFCaloCalibFexConfig.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEFCaloCalibFexConfig.py index 70fc0b369e2b..a1c7447d7f4b 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEFCaloCalibFexConfig.py +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEFCaloCalibFexConfig.py @@ -25,11 +25,15 @@ def configureTrigEFCaloCalibFexMonitoring(tool): tool.AthenaMonTools = [ time, validation, online ] +import cppyy +cppyy.loadDictionary('xAODEgammaDict') +from ROOT import xAOD + TrigEFCaloCalibFex_Electron = Factory(TrigEgammaHypoConf.TrigEFCaloCalibFex, name = "TrigEFCaloCalibFex_Electron", doAdd=False, AcceptAll = True, ApplyMVACalib = True, MVACalibSvc = TrigEgammaMVASvc, - egType = 'Electron', + egType = xAOD.EgammaParameters.electron, ClusterContainerKey = 'TrigEFCaloCalibFex', postInit = [configureTrigEFCaloCalibFexMonitoring], ) @@ -38,7 +42,7 @@ TrigEFCaloCalibFex_Photon = Factory(TrigEgammaHypoConf.TrigEFCaloCalibFex, name AcceptAll = True, ApplyMVACalib = True, MVACalibSvc = TrigEgammaMVASvc, - egType = 'Photon', + egType = xAOD.EgammaParameters.unconvertedPhoton, ClusterContainerKey = 'TrigEFCaloCalibFex', postInit = [configureTrigEFCaloCalibFexMonitoring], ) diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEFCaloCalibFex.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEFCaloCalibFex.cxx index 44239385a9b3..0e29c02124f6 100755 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEFCaloCalibFex.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEFCaloCalibFex.cxx @@ -31,7 +31,7 @@ TrigEFCaloCalibFex::TrigEFCaloCalibFex(const std::string & name, ISvcLocator* pS { // Read cuts - should probably get these from an xml file declareProperty( "AcceptAll", m_acceptAll = false ); - declareProperty( "egType", m_egType = "Electron"); + declareProperty( "egType", m_egType = xAOD::EgammaParameters::electron); //declareProperty("MVACalibSvc", m_MVACalibSvc); declareProperty("ApplyMVACalib", m_applyMVACalib=true); declareProperty("ClusterContainerKey", m_persKey="TrigEFCaloCalibFex"); @@ -258,7 +258,7 @@ HLT::ErrorCode TrigEFCaloCalibFex::hltExecute(const HLT::TriggerElement* inputTE ATH_MSG_DEBUG("Applying MVA Calib"); if (timerSvc()) m_toolTimer->start(); - if(m_MVACalibSvc->hltexecute(newClus,m_egType).isFailure()) + if(m_MVACalibSvc->execute(*newClus,static_cast<xAOD::EgammaParameters::EgammaType>(m_egType)).isFailure()) ATH_MSG_DEBUG("MVACalib Fails"); if (timerSvc()) m_toolTimer->stop(); } -- GitLab From 042b4b763c9523d1ac2010308b5ef6aae25416d8 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Tue, 10 Jul 2018 16:39:08 +0000 Subject: [PATCH 432/562] 22.0 coverity SiDetElementsRoadTool_xk Former-commit-id: 5f530048ee7a3344af1cf4d6f7e0887dc52f3e7a --- .../SiDetElementsRoadMaker_xk.h | 23 ++-- .../src/SiDetElementsRoadMaker_xk.cxx | 114 +++++++----------- 2 files changed, 57 insertions(+), 80 deletions(-) diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h index 6aad00694cf3..3a9a72159f70 100755 --- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h +++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h @@ -28,6 +28,7 @@ #include "TrkSurfaces/CylinderBounds.h" #include "SiDetElementsRoadTool_xk/SiDetElementsLayer_xk.h" +#include <iosfwd> class MsgStream; class IMagFieldAthenaSvc; @@ -98,19 +99,19 @@ namespace InDet{ /////////////////////////////////////////////////////////////////// ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle; - MagField::IMagFieldSvc* m_fieldService ; + MagField::IMagFieldSvc* m_fieldService{} ; ToolHandle<Trk::IPropagator> m_proptool ; // Propagator tool - bool m_usePIX ; - bool m_useSCT ; - bool m_test ; - int m_outputlevel; - int m_nprint ; - int m_sizeroad ; - double m_zfield ; - float m_width ; // Width of the road - double m_step ; // Max step allowed - Trk::CylinderBounds m_bounds ; // + bool m_usePIX{} ; + bool m_useSCT{} ; + bool m_test{} ; + int m_outputlevel{}; + int m_nprint{} ; + int m_sizeroad{} ; + double m_zfield{} ; + float m_width{} ; // Width of the road + double m_step {} ; // Max step allowed + Trk::CylinderBounds m_bounds{} ; // int m_map [3] ; std::vector<SiDetElementsLayer_xk> m_layer[3] ; // Layers std::string m_pix ; // PIX manager location diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx index accf7b6abe78..04f114a650af 100755 --- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx +++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx @@ -11,9 +11,7 @@ // Version 1.0 21/04/2004 I.Gavrilenko /////////////////////////////////////////////////////////////////// -#include <iostream> -#include <iomanip> -#include <utility> + #include "AthenaPoolUtilities/CondAttrListCollection.h" #include "SiDetElementsRoadTool_xk/SiDetElementsRoadMaker_xk.h" #include "SiDetElementsRoadTool_xk/SiDetElementsComparison.h" @@ -22,6 +20,8 @@ #include "TrkExInterfaces/IPropagator.h" #include "TrkPrepRawData/PrepRawData.h" #include "EventInfo/TagInfo.h" +#include <ostream> +#include <iomanip> /////////////////////////////////////////////////////////////////// // Constructor @@ -67,7 +67,6 @@ InDet::SiDetElementsRoadMaker_xk::~SiDetElementsRoadMaker_xk() StatusCode InDet::SiDetElementsRoadMaker_xk::initialize() { - StatusCode sc = AlgTool::initialize(); if (!m_usePIX && !m_useSCT) { msg(MSG::FATAL) << "Please don't call this tool if usePixel and useSCT are false" << endmsg; @@ -78,22 +77,13 @@ StatusCode InDet::SiDetElementsRoadMaker_xk::initialize() // if(m_fieldmode != "NoField" ) { - if( !m_fieldServiceHandle.retrieve() ){ - ATH_MSG_FATAL("Failed to retrieve " << m_fieldServiceHandle ); - return StatusCode::FAILURE; - } - ATH_MSG_DEBUG("Retrieved " << m_fieldServiceHandle ); + ATH_CHECK( m_fieldServiceHandle.retrieve() ); m_fieldService = &*m_fieldServiceHandle; } // Get propagator tool // - if ( m_proptool.retrieve().isFailure() ) { - msg(MSG::FATAL) << "Failed to retrieve tool " << m_proptool << endmsg; - return StatusCode::FAILURE; - } else { - msg(MSG::INFO) << "Retrieved tool " << m_proptool << endmsg; - } + ATH_CHECK ( m_proptool.retrieve()); // Get output print level // @@ -108,7 +98,7 @@ StatusCode InDet::SiDetElementsRoadMaker_xk::initialize() std::vector< std::string > tagInfoKeys = detStore()->keys<TagInfo> (); std::string tagInfoKey = ""; - if(tagInfoKeys.size()==0) + if(tagInfoKeys.empty()) msg(MSG::WARNING) << " No TagInfo keys in DetectorStore "<< endmsg; else { if(tagInfoKeys.size() > 1) { @@ -123,37 +113,22 @@ StatusCode InDet::SiDetElementsRoadMaker_xk::initialize() // Setup call back for geometry // - sc = detStore()->regFcn(&InDet::SiDetElementsRoadMaker_xk::mapDetectorElementsUpdate, - this,tagInfoH,m_callbackString); - - if(sc==StatusCode::SUCCESS) { - msg(MSG::INFO) << "Registered callback for geometry " << name() << endmsg; - } else { - msg(MSG::ERROR) << "Could not book callback for geometry " << name () << endmsg; - return StatusCode::FAILURE; - } + ATH_CHECK( detStore()->regFcn(&InDet::SiDetElementsRoadMaker_xk::mapDetectorElementsUpdate, + this,tagInfoH,m_callbackString)); std::string folder( "/EXT/DCS/MAGNETS/SENSORDATA" ); const DataHandle<CondAttrListCollection> currentHandle; if (m_fieldmode != "NoField" && detStore()->contains<CondAttrListCollection>(folder)){ - - sc = detStore()->regFcn(&InDet::SiDetElementsRoadMaker_xk::magneticFieldInit, - this,currentHandle,folder); - - if(sc==StatusCode::SUCCESS) { - msg(MSG::INFO) << "Registered callback from MagneticFieldSvc for " << name() << endmsg; - } else { - msg(MSG::ERROR) << "Could not book callback from MagneticFieldSvc for " << name () << endmsg; - return StatusCode::FAILURE; - } + ATH_CHECK( detStore()->regFcn(&InDet::SiDetElementsRoadMaker_xk::magneticFieldInit, + this,currentHandle,folder)); } else { magneticFieldInit(); ATH_MSG_INFO("Folder " << folder << " not present, magnetic field callback not set up. Not a problem if AtlasFieldSvc.useDCS=False"); } - return sc; + return StatusCode::SUCCESS; } /////////////////////////////////////////////////////////////////// @@ -162,7 +137,7 @@ StatusCode InDet::SiDetElementsRoadMaker_xk::initialize() StatusCode InDet::SiDetElementsRoadMaker_xk::finalize() { - StatusCode sc = AlgTool::finalize(); return sc; + return StatusCode::SUCCESS; } @@ -172,7 +147,7 @@ StatusCode InDet::SiDetElementsRoadMaker_xk::finalize() MsgStream& InDet::SiDetElementsRoadMaker_xk::dump( MsgStream& out ) const { - out<<std::endl; + out<<"\n"; if(m_nprint) return dumpEvent(out); return dumpConditions(out); } @@ -208,21 +183,21 @@ MsgStream& InDet::SiDetElementsRoadMaker_xk::dumpConditions( MsgStream& out ) co if(m_layer[2].size()) ++maps; out<<"|----------------------------------------------------------------------" <<"-------------------|" - <<std::endl; + <<"\n"; if(m_useSCT) { - out<<"| SCT detector manager | "<<m_sct <<s5<<std::endl; + out<<"| SCT detector manager | "<<m_sct <<s5<<"\n"; } if(m_usePIX) { - out<<"| Pixel detector manager | "<<m_pix <<s6<<std::endl; + out<<"| Pixel detector manager | "<<m_pix <<s6<<"\n"; } - out<<"| Tool for propagation | "<<m_proptool.type() <<s1<<std::endl; - out<<"| Magnetic field mode | "<<fieldmode[mode] <<s3<<std::endl; + out<<"| Tool for propagation | "<<m_proptool.type() <<s1<<"\n"; + out<<"| Magnetic field mode | "<<fieldmode[mode] <<s3<<"\n"; out<<"| Width of the road (mm) | " <<std::setw(12)<<std::setprecision(5)<<m_width - <<" |"<<std::endl; + <<" |"<<"\n"; out<<"|----------------------------------------------------------------------" <<"-------------------|" - <<std::endl; + <<"\n"; if(!maps || m_outputlevel==0) return out; @@ -231,17 +206,17 @@ MsgStream& InDet::SiDetElementsRoadMaker_xk::dumpConditions( MsgStream& out ) co int nc = 0; for(unsigned int i=0; i!=m_layer[1].size(); ++i) nc+=m_layer[1][i].nElements(); out<<"|----------------------------------------------------------------|" - <<std::endl; + <<"\n"; out<<"| Barrel map containt " <<std::setw(3)<<nl<<" layers and" <<std::setw(5)<<nc<<" elements |" - <<std::endl; + <<"\n"; out<<"|------|-----------|------------|------------|------------|------|" - <<std::endl; + <<"\n"; out<<"| n | R | Z min | Z max | max dF | nEl |" - <<std::endl; + <<"\n"; out<<"|------|-----------|------------|------------|------------|------|" - <<std::endl; + <<"\n"; for(unsigned int i=0; i!=m_layer[1].size(); ++i) { double zmin = m_layer[1][i].z()-m_layer[1][i].dz(); double zmax = m_layer[1][i].z()+m_layer[1][i].dz(); @@ -252,10 +227,10 @@ MsgStream& InDet::SiDetElementsRoadMaker_xk::dumpConditions( MsgStream& out ) co <<std::setw(10)<<std::setprecision(4)<< zmax<<" | " <<std::setw(10)<<std::setprecision(4)<< m_layer[1][i].dfe()<<" | " <<std::setw(4)<<m_layer[1][i].nElements()<<" | " - <<std::endl; + <<"\n"; } out<<"|------|-----------|------------|------------|------------|------|" - <<std::endl; + <<"\n"; } if(m_layer[0].size()) { @@ -264,18 +239,18 @@ MsgStream& InDet::SiDetElementsRoadMaker_xk::dumpConditions( MsgStream& out ) co int nc = 0; for(unsigned int i=0; i!=m_layer[0].size(); ++i) nc+=m_layer[0][i].nElements(); out<<"|----------------------------------------------------------------|" - <<std::endl; + <<"\n"; out<<"| L.Endcap map containt" <<std::setw(3)<<nl<<" layers and" <<std::setw(5)<<nc<<" elements |" - <<std::endl; + <<"\n"; out<<"|------|-----------|------------|------------|------------|------|" - <<std::endl; + <<"\n"; out<<"| n | Z | R min | R max | max dF | nEl |" - <<std::endl; + <<"\n"; out<<"|------|-----------|------------|------------|------------|------|" - <<std::endl; + <<"\n"; for(unsigned int i=0; i!=m_layer[0].size(); ++i) { double rmin = m_layer[0][i].r()-m_layer[0][i].dr(); double rmax = m_layer[0][i].r()+m_layer[0][i].dr(); @@ -286,27 +261,27 @@ MsgStream& InDet::SiDetElementsRoadMaker_xk::dumpConditions( MsgStream& out ) co <<std::setw(10)<<std::setprecision(4)<< rmax<<" | " <<std::setw(10)<<std::setprecision(4)<<m_layer[0][i].dfe()<<" | " <<std::setw(4)<<m_layer[0][i].nElements()<<" | " - <<std::endl; + <<"\n"; } out<<"|------|-----------|------------|------------|------------|------|" - <<std::endl; + <<"\n"; } if(m_layer[2].size()) { int nl = m_layer[2].size(); int nc = 0; for(unsigned int i=0; i!=m_layer[2].size(); ++i) nc+=m_layer[2][i].nElements(); out<<"|----------------------------------------------------------------|" - <<std::endl; + <<"\n"; out<<"| R.Endcap map containt" <<std::setw(3)<<nl<<" layers and" <<std::setw(5)<<nc<<" elements |" - <<std::endl; + <<"\n"; out<<"|------|-----------|------------|------------|------------|------|" - <<std::endl; + <<"\n"; out<<"| n | Z | R min | R max | max dF | nEl |" - <<std::endl; + <<"\n"; out<<"|------|-----------|------------|------------|------------|------|" - <<std::endl; + <<"\n"; for(unsigned int i=0; i!=m_layer[2].size(); ++i) { double rmin = m_layer[2][i].r()-m_layer[0][i].dr(); double rmax = m_layer[2][i].r()+m_layer[0][i].dr(); @@ -317,11 +292,12 @@ MsgStream& InDet::SiDetElementsRoadMaker_xk::dumpConditions( MsgStream& out ) co <<std::setw(10)<<std::setprecision(4)<< rmax<<" | " <<std::setw(10)<<std::setprecision(4)<<m_layer[2][i].dfe()<<" | " <<std::setw(4)<<m_layer[2][i].nElements()<<" | " - <<std::endl; + <<"\n"; } out<<"|------|-----------|------------|------------|------------|------|" - <<std::endl; + <<"\n"; } + out<<"\n"; return out; } @@ -332,11 +308,11 @@ MsgStream& InDet::SiDetElementsRoadMaker_xk::dumpConditions( MsgStream& out ) co MsgStream& InDet::SiDetElementsRoadMaker_xk::dumpEvent( MsgStream& out ) const { out<<"|---------------------------------------------------------------------|" - <<std::endl; + <<"\n"; out<<"| Road size | "<<std::setw(12)<<m_sizeroad - <<" |"<<std::endl; + <<" |"<<"\n"; out<<"|---------------------------------------------------------------------|" - <<std::endl; + <<"\n"; return out; } -- GitLab From a03b195838abec46585e95971bf46914c5b0f703 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Wed, 11 Jul 2018 15:02:04 +0200 Subject: [PATCH 433/562] Solve coverity 114686 by initialising variables in SiTrackMaker_xk.h Former-commit-id: b627550389b52f0d7a0c72d2c37136197fad5a03 --- .../SiTrackMakerTool_xk/SiTrackMaker_xk.h | 88 ++++++++++--------- .../src/SiTrackMaker_xk.cxx | 6 +- 2 files changed, 48 insertions(+), 46 deletions(-) diff --git a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h index bb8764c43265..bd3e460d3bdd 100755 --- a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h +++ b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/SiTrackMakerTool_xk/SiTrackMaker_xk.h @@ -15,8 +15,6 @@ #ifndef SiTrackMaker_xk_H #define SiTrackMaker_xk_H -#include <list> -#include <map> #include "GaudiKernel/ServiceHandle.h" #include "MagFieldInterfaces/IMagFieldSvc.h" @@ -27,10 +25,14 @@ #include "InDetRecToolInterfaces/ISiCombinatorialTrackFinder.h" #include "InDetRecToolInterfaces/ISeedToTrackConversionTool.h" #include "TrkGeometry/MagneticFieldProperties.h" -#include "InDetBeamSpotService/IBeamCondSvc.h" #include "TrkCaloClusterROI/CaloClusterROI_Collection.h" +#include <list> +#include <map> +#include <iosfwd> + class MsgStream; +class IBeamCondSvc; namespace InDet{ @@ -96,18 +98,18 @@ namespace InDet{ /////////////////////////////////////////////////////////////////// ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle ; - MagField::IMagFieldSvc* m_fieldService ; + MagField::IMagFieldSvc* m_fieldService {} ; ToolHandle<InDet::ISiDetElementsRoadMaker> m_roadmaker ; ToolHandle<InDet::ISiCombinatorialTrackFinder> m_tracksfinder; ToolHandle<InDet::ISeedToTrackConversionTool> m_seedtrack ; - IBeamCondSvc* m_beam ; - - int m_nprint ; // Kind output information - int m_inputseeds ; // Number input seeds - int m_goodseeds ; // Number good seeds - int m_findtracks ; // Numbe found tracks - int m_seedsfilter ; // Level of seeds filer - unsigned int m_wrongcluster ; // Max lentgh of thtrack + IBeamCondSvc* m_beam {} ; + + int m_nprint{} ; // Kind output information + int m_inputseeds{} ; // Number input seeds + int m_goodseeds{} ; // Number good seeds + int m_findtracks{} ; // Numbe found tracks + int m_seedsfilter{} ; // Level of seeds filer + unsigned int m_wrongcluster{} ; // Max lentgh of thtrack std::string m_fieldmode ; // Mode of magnetic field std::string m_patternName ; // Name of the pattern recognition // std::string m_inputClusterContainerName; @@ -116,36 +118,36 @@ namespace InDet{ SG::ReadHandleKey<CaloClusterROI_Collection> m_caloHad; std::string m_beamconditions; Trk::TrackInfo m_trackinfo ; - bool m_pix ; - bool m_sct ; - bool m_dbm ; - bool m_usePix ; //flags to set whether to use pixel/sct cluster, irrespective of what is in event - bool m_useSct ; - bool m_useassoTool ; // Use prd-track association tool - bool m_cosmicTrack ; // Is it cosmic track - bool m_simpleTrack ; // Is it simple output track - bool m_multitracks ; - bool m_useBremModel ; - bool m_useCaloSeeds ; - bool m_useSSSfilter ; - bool m_useHClusSeed ; // Hadronic Calorimeter Seeds - bool m_sss ; // True if SSS seed without filter - bool m_ITKGeomtry ; // ITK geometry - bool m_seedsegmentsWrite; // Call seed to track conversion - bool m_heavyion ; // Is it heavy ion events + bool m_pix{} ; + bool m_sct{} ; + bool m_dbm{} ; + bool m_usePix {} ; //flags to set whether to use pixel/sct cluster, irrespective of what is in event + bool m_useSct {} ; + bool m_useassoTool{} ; // Use prd-track association tool + bool m_cosmicTrack{} ; // Is it cosmic track + bool m_simpleTrack{} ; // Is it simple output track + bool m_multitracks{} ; + bool m_useBremModel{} ; + bool m_useCaloSeeds{} ; + bool m_useSSSfilter{} ; + bool m_useHClusSeed{} ; // Hadronic Calorimeter Seeds + bool m_sss{} ; // True if SSS seed without filter + bool m_ITKGeomtry{} ; // ITK geometry + bool m_seedsegmentsWrite{}; // Call seed to track conversion + bool m_heavyion{} ; // Is it heavy ion events Trk::MagneticFieldProperties m_fieldprop ; // Magnetic field properties - double m_xi2max ; // max Xi2 for updators - double m_xi2maxNoAdd ; // max Xi2 for clusters - double m_xi2maxlink ; // max Xi2 for clusters - double m_pTmin ; // min pT - double m_pTminBrem ; // min pT for Brem mode - double m_pTminSSS ; // min pT for SSS filtering - double m_distmax ; // - double m_xi2multitracks; // max Xi2 for multi tracks - int m_nholesmax ; // Max number holes - int m_dholesmax ; // Max holes gap - int m_nclusmin ; // Min number clusters - int m_nwclusmin ; // Min umber weighted clusters(pix=2 sct=1) + double m_xi2max{} ; // max Xi2 for updators + double m_xi2maxNoAdd{} ; // max Xi2 for clusters + double m_xi2maxlink{} ; // max Xi2 for clusters + double m_pTmin{} ; // min pT + double m_pTminBrem{} ; // min pT for Brem mode + double m_pTminSSS{} ; // min pT for SSS filtering + double m_distmax {} ; // + double m_xi2multitracks{}; // max Xi2 for multi tracks + int m_nholesmax {} ; // Max number holes + int m_dholesmax {} ; // Max holes gap + int m_nclusmin {} ; // Min number clusters + int m_nwclusmin {} ; // Min umber weighted clusters(pix=2 sct=1) InDet::TrackQualityCuts m_trackquality ; std::list<Trk::Track*> m_tracks ; // List found tracks std::multimap<const Trk::PrepRawData*,const Trk::Track*> m_clusterTrack; @@ -155,8 +157,8 @@ namespace InDet{ std::list<double> m_hadF ; std::list<double> m_hadR ; std::list<double> m_hadZ ; - double m_phiWidth ; - double m_etaWidth ; + double m_phiWidth {} ; + double m_etaWidth {} ; double m_p[9] ; double m_xybeam[2] ; diff --git a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/src/SiTrackMaker_xk.cxx b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/src/SiTrackMaker_xk.cxx index 5945a1e7bf10..a5a1b19b50c0 100755 --- a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/src/SiTrackMaker_xk.cxx +++ b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/src/SiTrackMaker_xk.cxx @@ -11,9 +11,8 @@ // Version 1.0 21/04/2004 I.Gavrilenko /////////////////////////////////////////////////////////////////// -#include <iostream> +#include <ostream> #include <iomanip> -#include <utility> #include "AthenaPoolUtilities/CondAttrListCollection.h" #include "TrkRIO_OnTrack/RIO_OnTrack.h" @@ -21,7 +20,8 @@ #include "SiTrackMakerTool_xk/SiTrackMaker_xk.h" #include "TrkCaloClusterROI/CaloClusterROI.h" -//#include "TrkCaloClusterROI/CaloClusterROI_Collection.h" +#include "InDetBeamSpotService/IBeamCondSvc.h" + /////////////////////////////////////////////////////////////////// // Constructor -- GitLab From 58fb9156d5057ed4dae460449a5c2970d774bfa2 Mon Sep 17 00:00:00 2001 From: Jovan Mitrevski <Jovan.Mitrevski@cern.ch> Date: Wed, 11 Jul 2018 15:03:14 +0200 Subject: [PATCH 434/562] Combine all the functions egammaMVAFunctions.{h|cxx} Before they were spread between egammaMVATreeHelper and egammaMVACalibTool, but this way they are put together into one unit that can be used more easily. Former-commit-id: 63a01b0e355ba7e27497d206a0ea6ddff74f83b1 --- .../Root/egammaMVAFunctions.cxx | 298 ++++++++++++++++ .../egammaMVACalib/Root/egammaMVATree.cxx | 2 +- ...aMVATreeHelpers.h => egammaMVAFunctions.h} | 67 ++-- .../egammaMVACalib/egammaMVATree.h | 6 +- .../egammaMVACalib/src/egammaMVACalibTool.cxx | 319 ++---------------- .../egammaMVACalib/src/egammaMVACalibTool.h | 34 +- 6 files changed, 376 insertions(+), 350 deletions(-) create mode 100644 Reconstruction/egamma/egammaMVACalib/Root/egammaMVAFunctions.cxx rename Reconstruction/egamma/egammaMVACalib/egammaMVACalib/{egammaMVATreeHelpers.h => egammaMVAFunctions.h} (87%) diff --git a/Reconstruction/egamma/egammaMVACalib/Root/egammaMVAFunctions.cxx b/Reconstruction/egamma/egammaMVACalib/Root/egammaMVAFunctions.cxx new file mode 100644 index 000000000000..6fc6cf4d4ea3 --- /dev/null +++ b/Reconstruction/egamma/egammaMVACalib/Root/egammaMVAFunctions.cxx @@ -0,0 +1,298 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + + +#include "egammaMVACalib/egammaMVAFunctions.h" + +/** + * These functions are for building the maps of functions + **/ + +namespace egammaMVAFunctions +{ + + // forward declarations + void initializeClusterFuncs(funcMap_t& funcLibrary, + const std::string& prefix, + bool useLayerCorrected); + + void initializeEgammaFuncs(funcMap_t& funcLibrary, + const std::string& prefix, + bool useLayerCorrected); + + /// A function to build the map for electrons + std::unique_ptr<funcMap_t> initializeElectronFuncs(bool useLayerCorrected) + { + auto funcLibraryPtr = std::make_unique<funcMap_t>(); + funcMap_t& funcLibrary = *funcLibraryPtr; + + initializeClusterFuncs(funcLibrary, "el", useLayerCorrected); + initializeEgammaFuncs(funcLibrary, "el", useLayerCorrected); + + funcLibrary["el_charge"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return compute_el_charge(*(static_cast<const xAOD::Electron*>(eg))); }; + funcLibrary["el_tracketa"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return compute_el_tracketa(*(static_cast<const xAOD::Electron*>(eg))); }; + funcLibrary["el_trackpt"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return compute_el_trackpt(*(static_cast<const xAOD::Electron*>(eg))); }; + funcLibrary["el_trackz0"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return compute_el_trackz0(*(static_cast<const xAOD::Electron*>(eg))); }; + funcLibrary["el_refittedTrack_qoverp"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return compute_el_refittedTrack_qoverp(*(static_cast<const xAOD::Electron*>(eg))); }; + + return funcLibraryPtr; + } + + /// A function to build the map for uncoverted photons + std::unique_ptr<funcMap_t> initializeUnconvertedPhotonFuncs(bool useLayerCorrected) + { + auto funcLibraryPtr = std::make_unique<funcMap_t>(); + funcMap_t& funcLibrary = *funcLibraryPtr; + + initializeClusterFuncs(funcLibrary, "ph", useLayerCorrected); + initializeEgammaFuncs(funcLibrary, "ph", useLayerCorrected); + + return funcLibraryPtr; + } + + + /// A function to build the map for converted photons + std::unique_ptr<funcMap_t> initializeConvertedPhotonFuncs(bool useLayerCorrected) + { + auto funcLibraryPtr = std::make_unique<funcMap_t>(); + funcMap_t& funcLibrary = *funcLibraryPtr; + + initializeClusterFuncs(funcLibrary, "ph", useLayerCorrected); + initializeEgammaFuncs(funcLibrary, "ph", useLayerCorrected); + + + funcLibrary["ph_Rconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float + { return xAOD::EgammaHelpers::conversionRadius(static_cast<const xAOD::Photon*>(eg)); }; + + funcLibrary["convR"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float + { + auto ph = static_cast<const xAOD::Photon*>(eg); + if (compute_ptconv(ph) > 3*CLHEP::GeV) { + return xAOD::EgammaHelpers::conversionRadius(ph); + } else { + return 799.0; + } + }; + funcLibrary["ph_zconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return static_cast<const xAOD::Photon*>(eg)->vertex()->position().z(); }; + funcLibrary["ph_pt1conv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float + { return compute_pt1conv(static_cast<const xAOD::Photon*>(eg)); }; + funcLibrary["ph_pt2conv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float + { return compute_pt2conv(static_cast<const xAOD::Photon*>(eg)); }; + funcLibrary["ph_ptconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return compute_ptconv(static_cast<const xAOD::Photon*>(eg)); }; + + funcLibrary["convPtRatio"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float + { + auto ph = static_cast<const xAOD::Photon*>(eg); + if (xAOD::EgammaHelpers::numberOfSiTracks(ph) == 2) { + auto pt1 = compute_pt1conv(ph); + auto pt2 = compute_pt2conv(ph); + return std::max(pt1, pt2)/(pt1+pt2); + } else { + return 1.0f; + } + }; + + if (useLayerCorrected) { + funcLibrary["convEtOverPt"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*cl)->float + { + auto ph = static_cast<const xAOD::Photon*>(eg); + + float rv = 0.0; + if (xAOD::EgammaHelpers::numberOfSiTracks(ph) == 2) { + rv = std::max(0.0f, compute_correctedcl_Eacc(*cl)/std::cosh(compute_cl_eta(*cl)*compute_ptconv(ph))); + } + return std::min(rv, 2.0f); + }; + } else { + funcLibrary["convEtOverPt"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*cl)->float + { + auto ph = static_cast<const xAOD::Photon*>(eg); + + float rv = 0.0; + if (xAOD::EgammaHelpers::numberOfSiTracks(ph) == 2) { + rv = std::max(0.0f, compute_rawcl_Eacc(*cl)/std::cosh(compute_cl_eta(*cl)*compute_ptconv(ph))); + } + return std::min(rv, 2.0f); + }; + } + + return funcLibraryPtr; + } + + + // Initialize the functions that just depend on the cluster. + // This helper function is not meant for external use. + void initializeClusterFuncs(funcMap_t& funcLibrary, + const std::string& prefix, + bool useLayerCorrected) + { + + funcLibrary[prefix + "_cl_eta"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_cl_eta(*cl); }; + funcLibrary[prefix + "_cl_phi"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_cl_phi(*cl); }; + funcLibrary[prefix + "_cl_E"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_cl_e(*cl); }; + funcLibrary[prefix + "_cl_etaCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_cl_etaCalo(*cl); }; + funcLibrary[prefix + "_cl_phiCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_cl_phiCalo(*cl); }; + funcLibrary[prefix + "_cl_E_TileGap3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return cl->eSample(CaloSampling::TileGap3); }; + + funcLibrary["cellIndexCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return std::floor(std::abs(compute_cl_etaCalo(*cl))/0.025); }; + funcLibrary["phiModCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return ((abs(compute_cl_eta(*cl)) < 1.425) ? + std::fmod(compute_cl_phiCalo(*cl), TMath::Pi()/512) : + std::fmod(compute_cl_phiCalo(*cl), TMath::Pi()/384)); + }; + funcLibrary["etaModCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return std::fmod(std::abs(compute_cl_etaCalo(*cl)), 0.025); }; + funcLibrary["dPhiTG3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return std::fmod(2.*TMath::Pi()+compute_cl_phi(*cl),TMath::Pi()/32.)-TMath::Pi()/64.0; }; + + if (useLayerCorrected) { + funcLibrary[prefix + "_rawcl_Es0"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_correctedcl_Es0(*cl); }; + funcLibrary[prefix + "_rawcl_Es1"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_correctedcl_Es1(*cl); }; + funcLibrary[prefix + "_rawcl_Es2"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_correctedcl_Es2(*cl); }; + funcLibrary[prefix + "_rawcl_Es3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_correctedcl_Es3(*cl); }; + funcLibrary[prefix + "_rawcl_Eacc"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_correctedcl_Eacc(*cl); }; + funcLibrary[prefix + "_rawcl_f0"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_correctedcl_f0(*cl); }; + funcLibrary[prefix + "_rawcl_calibHitsShowerDepth"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_correctedcl_calibHitsShowerDepth(*cl); }; + funcLibrary["R12"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_correctedcl_Es1(*cl)/compute_correctedcl_Es2(*cl); }; + funcLibrary["fTG3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return cl->eSample(CaloSampling::TileGap3)/compute_correctedcl_Eacc(*cl); }; + } else { + funcLibrary[prefix + "_rawcl_Es0"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_rawcl_Es0(*cl); }; + funcLibrary[prefix + "_rawcl_Es1"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_rawcl_Es1(*cl); }; + funcLibrary[prefix + "_rawcl_Es2"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_rawcl_Es2(*cl); }; + funcLibrary[prefix + "_rawcl_Es3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_rawcl_Es3(*cl); }; + funcLibrary[prefix + "_rawcl_Eacc"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_rawcl_Eacc(*cl); }; + funcLibrary[prefix + "_rawcl_f0"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_rawcl_f0(*cl); }; + funcLibrary[prefix + "_rawcl_calibHitsShowerDepth"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_rawcl_calibHitsShowerDepth(*cl); }; + funcLibrary["R12"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return compute_rawcl_Es1(*cl)/compute_rawcl_Es2(*cl); }; + funcLibrary["fTG3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) + { return cl->eSample(CaloSampling::TileGap3)/compute_rawcl_Eacc(*cl); }; + } + } + + // Initialize the variables that just depend on egamma. + // This helper function is not meant for external use. + void initializeEgammaFuncs(funcMap_t& funcLibrary, + const std::string& prefix, + bool /* useLayerCorrected */) + { + funcLibrary[prefix + "_e011"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e011); }; + funcLibrary[prefix + "_e033"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e033); }; + funcLibrary[prefix + "_e132"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e132); }; + funcLibrary[prefix + "_e1152"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e1152); }; + funcLibrary[prefix + "_ethad1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::ethad1); }; + funcLibrary[prefix + "_ethad"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::ethad); }; + funcLibrary[prefix + "_f1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::f1); }; + funcLibrary[prefix + "_f3"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::f3); }; + funcLibrary[prefix + "_f1core"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::f1core); }; + funcLibrary[prefix + "_f3core"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::f3core); }; + funcLibrary[prefix + "_e233"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e233); }; + funcLibrary[prefix + "_e235"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e235); }; + funcLibrary[prefix + "_e255"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e255); }; + funcLibrary[prefix + "_e237"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e237); }; + funcLibrary[prefix + "_e277"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e277); }; + funcLibrary[prefix + "_e333"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e333); }; + funcLibrary[prefix + "_e335"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e335); }; + funcLibrary[prefix + "_e337"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e337); }; + funcLibrary[prefix + "_e377"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e377); }; + funcLibrary[prefix + "_weta1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::weta1); }; + funcLibrary[prefix + "_weta2"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::weta2); }; + funcLibrary[prefix + "_e2ts1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e2ts1); }; + funcLibrary[prefix + "_e2tsts1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::e2tsts1); }; + funcLibrary[prefix + "_fracs1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::fracs1); }; + funcLibrary[prefix + "_widths1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::widths1); }; + funcLibrary[prefix + "_widths2"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::widths2); }; + funcLibrary[prefix + "_poscs1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::poscs1); }; + funcLibrary[prefix + "_poscs2"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::poscs2); }; + funcLibrary[prefix + "_asy1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::asy1); }; + funcLibrary[prefix + "_pos"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::pos); }; + funcLibrary[prefix + "_pos7"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::pos7); }; + funcLibrary[prefix + "_barys1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::barys1); }; + funcLibrary[prefix + "_wtots1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::wtots1); }; + funcLibrary[prefix + "_emins1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::emins1); }; + funcLibrary[prefix + "_emaxs1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::emaxs1); }; + funcLibrary[prefix + "_r33over37allcalo"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::r33over37allcalo); }; + funcLibrary[prefix + "_ecore"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::ecore); }; + funcLibrary[prefix + "_Reta"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::Reta); }; + funcLibrary[prefix + "_Rphi"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::Rphi); }; + funcLibrary[prefix + "_Eratio"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::Eratio); }; + funcLibrary[prefix + "_Rhad"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::Rhad); }; + funcLibrary[prefix + "_Rhad1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::Rhad1); }; + funcLibrary[prefix + "_DeltaE"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) + { return eg->showerShapeValue(xAOD::EgammaParameters::DeltaE); }; + + } +} diff --git a/Reconstruction/egamma/egammaMVACalib/Root/egammaMVATree.cxx b/Reconstruction/egamma/egammaMVACalib/Root/egammaMVATree.cxx index 616457074a21..2f924a55e220 100644 --- a/Reconstruction/egamma/egammaMVACalib/Root/egammaMVATree.cxx +++ b/Reconstruction/egamma/egammaMVACalib/Root/egammaMVATree.cxx @@ -21,7 +21,7 @@ #include "egammaMVACalib/egammaMVATree.h" -using namespace egammaMVATreeHelpers; +using namespace egammaMVAFunctions; //ClassImp(egammaMVATreeEgamma) //#ifdef ROOTCORE diff --git a/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVATreeHelpers.h b/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVAFunctions.h similarity index 87% rename from Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVATreeHelpers.h rename to Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVAFunctions.h index 1227d1f764cc..a66bd2ca6fb9 100644 --- a/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVATreeHelpers.h +++ b/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVAFunctions.h @@ -2,33 +2,28 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#ifndef EGAMMAMVACALIB_EGAMMAMVATREEHELPERS -#define EGAMMAMVACALIB_EGAMMAMVATREEHELPERS - -#include <functional> -#include <string> -#include <map> -#include <array> -#include <vector> -#include <tuple> -#include <cmath> -#include <set> -#include <cstdint> -#include <numeric> +#ifndef EGAMMAMVACALIB_EGAMMAMVAFUNCTIONS +#define EGAMMAMVACALIB_EGAMMAMVAFUNCTIONS #include "xAODEgamma/Egamma.h" #include "xAODEgamma/Electron.h" #include "xAODEgamma/Photon.h" #include "xAODEgamma/EgammaxAODHelpers.h" +#include "xAODEgamma/PhotonxAODHelpers.h" #include "xAODCaloEvent/CaloCluster.h" +#include "egammaMVALayerDepth.h" -#include <TTree.h> -#include <TLorentzVector.h> - +// for the ConversionHelper (deprecated?) #include <AsgTools/AsgMessaging.h> -#include <egammaMVACalib/egammaMVALayerDepth.h> +#include "TLorentzVector.h" +#include <functional> +#include <string> +#include <unordered_map> +#include <cmath> +#include <memory> +#include <stdexcept> /** @@ -36,7 +31,7 @@ * MVA calibration **/ -namespace egammaMVATreeHelpers +namespace egammaMVAFunctions { // inline functions to avoid duplicates problem during linking (and performance) // cluster functions @@ -146,7 +141,9 @@ namespace egammaMVATreeHelpers } // define a few without using conversion helper - inline float compute_ptconv(const xAOD::Photon* ph) + + /// This ptconv function uses the vertex decorations + inline float compute_ptconv_decor(const xAOD::Photon* ph) { static const SG::AuxElement::Accessor<float> accPx("px"); static const SG::AuxElement::Accessor<float> accPy("py"); @@ -155,6 +152,18 @@ namespace egammaMVATreeHelpers return vx ? std::hypot(accPx(*vx), accPy(*vx)) : 0.0; } + /// This ptconv is the old one used by MVACalib + inline float compute_ptconv(const xAOD::Photon* ph) + { + auto vx = ph->vertex(); + if (!vx) return 0.0; + + TLorentzVector sum; + if (vx->trackParticle(0)) sum += vx->trackParticle(0)->p4(); + if (vx->trackParticle(1)) sum += vx->trackParticle(1)->p4(); + return sum.Perp(); + } + inline float compute_pt1conv(const xAOD::Photon* ph) { static const SG::AuxElement::Accessor<float> accPt1("pt1"); @@ -181,6 +190,26 @@ namespace egammaMVATreeHelpers } } + // The functions to return the dictionaries of functions, + // i.e., the variable name to function + + /// Define the map type since it's long + using funcMap_t = std::unordered_map<std::string, + std::function<float(const xAOD::Egamma*, const xAOD::CaloCluster*)> >; + + /// A function to build the map for electrons + std::unique_ptr<funcMap_t> initializeElectronFuncs(bool useLayerCorrected); + + /// A function to build the map for uncoverted photons + std::unique_ptr<funcMap_t> initializeUnconvertedPhotonFuncs(bool useLayerCorrected); + + /// A function to build the map for converted photons + std::unique_ptr<funcMap_t> initializeConvertedPhotonFuncs(bool useLayerCorrected); + + + /// The ConversionHelper struct used by egammaMVATree + /// but not the functions in the dictionaries above. + /// (Might want to consider deprecating) struct ConversionHelper { ConversionHelper(const xAOD::Photon* ph) diff --git a/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVATree.h b/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVATree.h index cc124f57dd43..966aae7f6ed7 100644 --- a/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVATree.h +++ b/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVATree.h @@ -28,7 +28,7 @@ #include <AsgTools/AsgMessaging.h> #include "egammaMVACalib/egammaMVALayerDepth.h" -#include "egammaMVACalib/egammaMVATreeHelpers.h" +#include "egammaMVACalib/egammaMVAFunctions.h" @@ -173,8 +173,8 @@ private: void init_variables(const std::set<std::string>& variables); typedef std::tuple<std::string, std::function<float(const xAOD::Photon&)>, float> FloatElement; //! typedef std::tuple<std::string, std::function<int(const xAOD::Photon&)>, int> IntElement; //! - typedef std::tuple<std::string, std::function<float(const egammaMVATreeHelpers::ConversionHelper&)>, float> FloatElementConv; //! - typedef std::tuple<std::string, std::function<int(const egammaMVATreeHelpers::ConversionHelper&)>, int> IntElementConv; //! + typedef std::tuple<std::string, std::function<float(const egammaMVAFunctions::ConversionHelper&)>, float> FloatElementConv; //! + typedef std::tuple<std::string, std::function<int(const egammaMVAFunctions::ConversionHelper&)>, int> IntElementConv; //! std::vector<FloatElement> m_functions_float_from_photon; //! std::vector<IntElement> m_functions_int_from_photon; //! std::vector<FloatElementConv> m_functions_float_from_ConversionHelper; //! diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx index 2300fbc754c7..a7b84937cf19 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx @@ -4,10 +4,7 @@ #include "egammaMVACalibTool.h" -#include "egammaMVACalib/egammaMVALayerDepth.h" -#include "egammaMVACalib/egammaMVATreeHelpers.h" #include "PathResolver/PathResolver.h" -#include "xAODEgamma/PhotonxAODHelpers.h" #include "TFile.h" #include "TMath.h" @@ -38,28 +35,32 @@ StatusCode egammaMVACalibTool::initialize() return StatusCode::FAILURE; } - /// A dictionary of all available functions - std::unordered_map<std::string, - std::function<float(const xAOD::Egamma*, const xAOD::CaloCluster*)> > funcLibrary; - - // get the BDTs ATH_MSG_DEBUG("get BDTs in folder: " << m_folder); switch (m_particleType) { case xAOD::EgammaParameters::electron: - ATH_CHECK(initializeElectronFuncs(funcLibrary)); - ATH_CHECK(setupBDT(funcLibrary, - PathResolverFindCalibFile(m_folder + "/MVACalib_electron.weights.root"))); + { + std::unique_ptr<egammaMVAFunctions::funcMap_t> funcLibraryPtr = + egammaMVAFunctions::initializeElectronFuncs(m_useLayerCorrected); + ATH_CHECK(setupBDT(*funcLibraryPtr, + PathResolverFindCalibFile(m_folder + "/MVACalib_electron.weights.root"))); + } break; case xAOD::EgammaParameters::unconvertedPhoton: - ATH_CHECK(initializeUnconvertedPhotonFuncs(funcLibrary)); - ATH_CHECK(setupBDT(funcLibrary, - PathResolverFindCalibFile(m_folder + "/MVACalib_unconvertedPhoton.weights.root"))); + { + std::unique_ptr<egammaMVAFunctions::funcMap_t> funcLibraryPtr = + egammaMVAFunctions::initializeUnconvertedPhotonFuncs(m_useLayerCorrected); + ATH_CHECK(setupBDT(*funcLibraryPtr, + PathResolverFindCalibFile(m_folder + "/MVACalib_unconvertedPhoton.weights.root"))); + } break; case xAOD::EgammaParameters::convertedPhoton: - ATH_CHECK(initializeConvertedPhotonFuncs(funcLibrary)); - ATH_CHECK(setupBDT(funcLibrary, - PathResolverFindCalibFile(m_folder + "/MVACalib_convertedPhoton.weights.root"))); + { + std::unique_ptr<egammaMVAFunctions::funcMap_t> funcLibraryPtr = + egammaMVAFunctions::initializeConvertedPhotonFuncs(m_useLayerCorrected); + ATH_CHECK(setupBDT(*funcLibraryPtr, + PathResolverFindCalibFile(m_folder + "/MVACalib_convertedPhoton.weights.root"))); + } break; default: ATH_MSG_FATAL("Particle type not set properly: " << m_particleType); @@ -74,9 +75,7 @@ StatusCode egammaMVACalibTool::finalize() return StatusCode::SUCCESS; } -StatusCode egammaMVACalibTool::setupBDT(const std::unordered_map<std::string, - std::function<float(const xAOD::Egamma*, - const xAOD::CaloCluster*)> >& funcLibrary, +StatusCode egammaMVACalibTool::setupBDT(const egammaMVAFunctions::funcMap_t& funcLibrary, std::string fileName) { @@ -190,280 +189,6 @@ StatusCode egammaMVACalibTool::setupBDT(const std::unordered_map<std::string, } -StatusCode egammaMVACalibTool::initializeElectronFuncs(std::unordered_map<std::string, - std::function<float(const xAOD::Egamma*, - const xAOD::CaloCluster*)> >& funcLibrary) const -{ - ATH_CHECK(initializeClusterFuncs(funcLibrary, "el")); - ATH_CHECK(initializeEgammaFuncs(funcLibrary, "el")); - - using namespace egammaMVATreeHelpers; - - funcLibrary["el_charge"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return compute_el_charge(*(static_cast<const xAOD::Electron*>(eg))); }; - funcLibrary["el_tracketa"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return compute_el_tracketa(*(static_cast<const xAOD::Electron*>(eg))); }; - funcLibrary["el_trackpt"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return compute_el_trackpt(*(static_cast<const xAOD::Electron*>(eg))); }; - funcLibrary["el_trackz0"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return compute_el_trackz0(*(static_cast<const xAOD::Electron*>(eg))); }; - funcLibrary["el_refittedTrack_qoverp"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return compute_el_refittedTrack_qoverp(*(static_cast<const xAOD::Electron*>(eg))); }; - - return StatusCode::SUCCESS; -} - -StatusCode egammaMVACalibTool::initializeUnconvertedPhotonFuncs(std::unordered_map<std::string, - std::function<float(const xAOD::Egamma*, - const xAOD::CaloCluster*)> >& funcLibrary) const -{ - ATH_CHECK(initializeClusterFuncs(funcLibrary, "ph")); - ATH_CHECK(initializeEgammaFuncs(funcLibrary, "ph")); - - return StatusCode::SUCCESS; -} - -StatusCode egammaMVACalibTool::initializeConvertedPhotonFuncs(std::unordered_map<std::string, - std::function<float(const xAOD::Egamma*, - const xAOD::CaloCluster*)> >& funcLibrary) const -{ - ATH_CHECK(initializeClusterFuncs(funcLibrary, "ph")); - ATH_CHECK(initializeEgammaFuncs(funcLibrary, "ph")); - - using namespace egammaMVATreeHelpers; - - funcLibrary["ph_Rconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float - { return xAOD::EgammaHelpers::conversionRadius(static_cast<const xAOD::Photon*>(eg)); }; - - funcLibrary["convR"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float - { - auto ph = static_cast<const xAOD::Photon*>(eg); - if (compute_ptconv(ph) > 3*CLHEP::GeV) { - return xAOD::EgammaHelpers::conversionRadius(ph); - } else { - return 799.0; - } - }; - funcLibrary["ph_zconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return static_cast<const xAOD::Photon*>(eg)->vertex()->position().z(); }; - funcLibrary["ph_pt1conv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float - { return compute_pt1conv(static_cast<const xAOD::Photon*>(eg)); }; - funcLibrary["ph_pt2conv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float - { return compute_pt2conv(static_cast<const xAOD::Photon*>(eg)); }; - funcLibrary["ph_ptconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return compute_ptconv(static_cast<const xAOD::Photon*>(eg)); }; - - funcLibrary["convPtRatio"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float - { - auto ph = static_cast<const xAOD::Photon*>(eg); - if (xAOD::EgammaHelpers::numberOfSiTracks(ph) == 2) { - auto pt1 = compute_pt1conv(ph); - auto pt2 = compute_pt2conv(ph); - return std::max(pt1, pt2)/(pt1+pt2); - } else { - return 1.0f; - } - }; - - if (m_use_layer_corrected) { - funcLibrary["convEtOverPt"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*cl)->float - { - auto ph = static_cast<const xAOD::Photon*>(eg); - - float rv = 0.0; - if (xAOD::EgammaHelpers::numberOfSiTracks(ph) == 2) { - rv = std::max(0.0f, compute_correctedcl_Eacc(*cl)/std::cosh(compute_cl_eta(*cl)*compute_ptconv(ph))); - } - return std::min(rv, 2.0f); - }; - } else { - funcLibrary["convEtOverPt"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*cl)->float - { - auto ph = static_cast<const xAOD::Photon*>(eg); - - float rv = 0.0; - if (xAOD::EgammaHelpers::numberOfSiTracks(ph) == 2) { - rv = std::max(0.0f, compute_rawcl_Eacc(*cl)/std::cosh(compute_cl_eta(*cl)*compute_ptconv(ph))); - } - return std::min(rv, 2.0f); - }; - } - return StatusCode::SUCCESS; -} - -StatusCode egammaMVACalibTool::initializeClusterFuncs(std::unordered_map<std::string, - std::function<float(const xAOD::Egamma*, - const xAOD::CaloCluster*)> >& funcLibrary, - const std::string& prefix) const -{ - - using namespace egammaMVATreeHelpers; - - funcLibrary[prefix + "_cl_eta"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return compute_cl_eta(*cl); }; - funcLibrary[prefix + "_cl_phi"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return compute_cl_phi(*cl); }; - funcLibrary[prefix + "_cl_E"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return compute_cl_e(*cl); }; - funcLibrary[prefix + "_cl_etaCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return compute_cl_etaCalo(*cl); }; - funcLibrary[prefix + "_cl_phiCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return compute_cl_phiCalo(*cl); }; - funcLibrary[prefix + "_cl_E_TileGap3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return cl->eSample(CaloSampling::TileGap3); }; - - funcLibrary["cellIndexCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return std::floor(std::abs(compute_cl_etaCalo(*cl))/0.025); }; - funcLibrary["phiModCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return ((abs(compute_cl_eta(*cl)) < 1.425) ? - std::fmod(compute_cl_phiCalo(*cl), TMath::Pi()/512) : - std::fmod(compute_cl_phiCalo(*cl), TMath::Pi()/384)); - }; - funcLibrary["etaModCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return std::fmod(std::abs(compute_cl_etaCalo(*cl)), 0.025); }; - funcLibrary["dPhiTG3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return std::fmod(2.*TMath::Pi()+compute_cl_phi(*cl),TMath::Pi()/32.)-TMath::Pi()/64.0; }; - - if (m_use_layer_corrected) { - funcLibrary[prefix + "_rawcl_Es0"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return compute_correctedcl_Es0(*cl); }; - funcLibrary[prefix + "_rawcl_Es1"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return compute_correctedcl_Es1(*cl); }; - funcLibrary[prefix + "_rawcl_Es2"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return compute_correctedcl_Es2(*cl); }; - funcLibrary[prefix + "_rawcl_Es3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return compute_correctedcl_Es3(*cl); }; - funcLibrary[prefix + "_rawcl_Eacc"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return compute_correctedcl_Eacc(*cl); }; - funcLibrary[prefix + "_rawcl_f0"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return compute_correctedcl_f0(*cl); }; - funcLibrary[prefix + "_rawcl_calibHitsShowerDepth"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return compute_correctedcl_calibHitsShowerDepth(*cl); }; - funcLibrary["R12"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return compute_correctedcl_Es1(*cl)/compute_correctedcl_Es2(*cl); }; - funcLibrary["fTG3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return cl->eSample(CaloSampling::TileGap3)/compute_correctedcl_Eacc(*cl); }; - } else { - funcLibrary[prefix + "_rawcl_Es0"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return compute_rawcl_Es0(*cl); }; - funcLibrary[prefix + "_rawcl_Es1"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return compute_rawcl_Es1(*cl); }; - funcLibrary[prefix + "_rawcl_Es2"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return compute_rawcl_Es2(*cl); }; - funcLibrary[prefix + "_rawcl_Es3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return compute_rawcl_Es3(*cl); }; - funcLibrary[prefix + "_rawcl_Eacc"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return compute_rawcl_Eacc(*cl); }; - funcLibrary[prefix + "_rawcl_f0"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return compute_rawcl_f0(*cl); }; - // and everything that depends on - // static cast here is needed to resolve overload (std::function is not able to) - funcLibrary[prefix + "_rawcl_calibHitsShowerDepth"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return compute_rawcl_calibHitsShowerDepth(*cl); }; - funcLibrary["R12"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return compute_rawcl_Es1(*cl)/compute_rawcl_Es2(*cl); }; - funcLibrary["fTG3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) - { return cl->eSample(CaloSampling::TileGap3)/compute_rawcl_Eacc(*cl); }; - } - - return StatusCode::SUCCESS; -} - -StatusCode egammaMVACalibTool::initializeEgammaFuncs(std::unordered_map<std::string, - std::function<float(const xAOD::Egamma*, - const xAOD::CaloCluster*)> >& funcLibrary, - const std::string& prefix) const -{ - funcLibrary[prefix + "_e011"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::e011); }; - funcLibrary[prefix + "_e033"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::e033); }; - funcLibrary[prefix + "_e132"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::e132); }; - funcLibrary[prefix + "_e1152"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::e1152); }; - funcLibrary[prefix + "_ethad1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::ethad1); }; - funcLibrary[prefix + "_ethad"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::ethad); }; - funcLibrary[prefix + "_f1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::f1); }; - funcLibrary[prefix + "_f3"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::f3); }; - funcLibrary[prefix + "_f1core"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::f1core); }; - funcLibrary[prefix + "_f3core"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::f3core); }; - funcLibrary[prefix + "_e233"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::e233); }; - funcLibrary[prefix + "_e235"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::e235); }; - funcLibrary[prefix + "_e255"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::e255); }; - funcLibrary[prefix + "_e237"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::e237); }; - funcLibrary[prefix + "_e277"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::e277); }; - funcLibrary[prefix + "_e333"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::e333); }; - funcLibrary[prefix + "_e335"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::e335); }; - funcLibrary[prefix + "_e337"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::e337); }; - funcLibrary[prefix + "_e377"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::e377); }; - funcLibrary[prefix + "_weta1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::weta1); }; - funcLibrary[prefix + "_weta2"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::weta2); }; - funcLibrary[prefix + "_e2ts1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::e2ts1); }; - funcLibrary[prefix + "_e2tsts1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::e2tsts1); }; - funcLibrary[prefix + "_fracs1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::fracs1); }; - funcLibrary[prefix + "_widths1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::widths1); }; - funcLibrary[prefix + "_widths2"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::widths2); }; - funcLibrary[prefix + "_poscs1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::poscs1); }; - funcLibrary[prefix + "_poscs2"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::poscs2); }; - funcLibrary[prefix + "_asy1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::asy1); }; - funcLibrary[prefix + "_pos"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::pos); }; - funcLibrary[prefix + "_pos7"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::pos7); }; - funcLibrary[prefix + "_barys1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::barys1); }; - funcLibrary[prefix + "_wtots1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::wtots1); }; - funcLibrary[prefix + "_emins1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::emins1); }; - funcLibrary[prefix + "_emaxs1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::emaxs1); }; - funcLibrary[prefix + "_r33over37allcalo"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::r33over37allcalo); }; - funcLibrary[prefix + "_ecore"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::ecore); }; - funcLibrary[prefix + "_Reta"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::Reta); }; - funcLibrary[prefix + "_Rphi"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::Rphi); }; - funcLibrary[prefix + "_Eratio"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::Eratio); }; - funcLibrary[prefix + "_Rhad"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::Rhad); }; - funcLibrary[prefix + "_Rhad1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::Rhad1); }; - funcLibrary[prefix + "_DeltaE"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*) - { return eg->showerShapeValue(xAOD::EgammaParameters::DeltaE); }; - - return StatusCode::SUCCESS; -} - const TString& egammaMVACalibTool::getString(TObject* obj) const { TObjString *objS = dynamic_cast<TObjString*>(obj); @@ -491,9 +216,9 @@ float egammaMVACalibTool::getEnergy(const xAOD::Egamma* eg, // find the bin of BDT - const auto initEnergy = (m_use_layer_corrected ? - egammaMVATreeHelpers::compute_correctedcl_Eacc(*clus) : - egammaMVATreeHelpers::compute_rawcl_Eacc(*clus)); + const auto initEnergy = (m_useLayerCorrected ? + egammaMVAFunctions::compute_correctedcl_Eacc(*clus) : + egammaMVAFunctions::compute_rawcl_Eacc(*clus)); const auto energyVarGeV = (initEnergy / std::cosh(clus->eta())) / CLHEP::GeV; const auto etaVar = std::abs(clus->eta()); diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h index b1fac11935e4..6c04bf07461e 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h @@ -11,6 +11,7 @@ #include "xAODEgamma/Photon.h" #include "xAODCaloEvent/CaloCluster.h" #include "MVAUtils/BDT.h" +#include "egammaMVACalib/egammaMVAFunctions.h" // Framework includes #include "AthenaBaseComps/AthAlgTool.h" @@ -18,6 +19,7 @@ #include "TObject.h" #include "TString.h" #include "TFormula.h" +#include "TTree.h" // STL includes #include <string> @@ -69,7 +71,7 @@ private: "folder", "", "string with folder for weight files"}; - Gaudi::Property<bool> m_use_layer_corrected {this, + Gaudi::Property<bool> m_useLayerCorrected {this, "use_layer_corrected", false, "whether to use layer corrections"}; @@ -85,36 +87,8 @@ private: /// shifts for mean10 std::vector<TFormula> m_shifts; - - /// initialize the functions needed for electrons - StatusCode initializeElectronFuncs(std::unordered_map<std::string, - std::function<float(const xAOD::Egamma*, - const xAOD::CaloCluster*)> >& funcLibrary) const; - /// initialize the functions needed for unconverted photons - StatusCode initializeUnconvertedPhotonFuncs(std::unordered_map<std::string, - std::function<float(const xAOD::Egamma*, - const xAOD::CaloCluster*)> >& funcLibrary) const; - /// initialize the functions needed for converted photons - StatusCode initializeConvertedPhotonFuncs(std::unordered_map<std::string, - std::function<float(const xAOD::Egamma*, - const xAOD::CaloCluster*)> >& funcLibrary) const; - - /// a function called by the above functions to setup the cluster funcs - StatusCode initializeClusterFuncs(std::unordered_map<std::string, - std::function<float(const xAOD::Egamma*, - const xAOD::CaloCluster*)> >& funcLibrary, - const std::string& prefix) const; - - /// a function called by the above functions to setup the egamma funcs - StatusCode initializeEgammaFuncs(std::unordered_map<std::string, - std::function<float(const xAOD::Egamma*, - const xAOD::CaloCluster*)> >& funcLibrary, - const std::string& prefix) const; - /// a function called by initialize to setup the BDT, funcs, and shifts. - StatusCode setupBDT(const std::unordered_map<std::string, - std::function<float(const xAOD::Egamma*, - const xAOD::CaloCluster*)> >& funcLibrary, + StatusCode setupBDT(const egammaMVAFunctions::funcMap_t& funcLibrary, std::string fileName); /// a utility to get a TString out of an TObjString pointer -- GitLab From 32849b8a314a79226764848667fab3be62efddbb Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Wed, 11 Jul 2018 17:39:45 +0200 Subject: [PATCH 435/562] Solve coverity issue 114765 Former-commit-id: ce925e1de6e789d86951cc04be577a09d3f7fc6c --- .../SiZvertexTool_xk/SiZvertexMaker_xk.h | 33 ++++++++++++------- .../src/SiZvertexMaker_xk.cxx | 4 ++- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/InnerDetector/InDetRecTools/SiZvertexTool_xk/SiZvertexTool_xk/SiZvertexMaker_xk.h b/InnerDetector/InDetRecTools/SiZvertexTool_xk/SiZvertexTool_xk/SiZvertexMaker_xk.h index b42e20474aa6..8d0b9f046bd9 100755 --- a/InnerDetector/InDetRecTools/SiZvertexTool_xk/SiZvertexTool_xk/SiZvertexMaker_xk.h +++ b/InnerDetector/InDetRecTools/SiZvertexTool_xk/SiZvertexTool_xk/SiZvertexMaker_xk.h @@ -15,11 +15,20 @@ #ifndef SiZvertexMaker_xk_H #define SiZvertexMaker_xk_H -#include <list> + #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" #include "InDetRecToolInterfaces/ISiZvertexMaker.h" #include "InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h" +#include "Identifier/IdentifierHash.h" +#include <list> +#include <vector> +#include <iosfwd> + +namespace Trk{ + class Vertex; +} + class MsgStream; @@ -72,17 +81,17 @@ namespace InDet{ // Protected data and methods /////////////////////////////////////////////////////////////////// - int* m_histogram ; - double* m_z_histogram ; - int m_outputlevel ; - int m_nprint ; - int m_nspoint ; - int m_histsize ; - int m_mincontent ; - int m_maxcontent ; - double m_zmin ; - double m_zmax ; - double m_ratio ; + int* m_histogram{} ; + double* m_z_histogram{} ; + int m_outputlevel{} ; + int m_nprint {} ; + int m_nspoint{} ; + int m_histsize{} ; + int m_mincontent{} ; + int m_maxcontent{} ; + double m_zmin{} ; + double m_zmax {} ; + double m_ratio {} ; std::list<Trk::Vertex> m_vertex ; ToolHandle<InDet::ISiSpacePointsSeedMaker> m_seedsgenerator; diff --git a/InnerDetector/InDetRecTools/SiZvertexTool_xk/src/SiZvertexMaker_xk.cxx b/InnerDetector/InDetRecTools/SiZvertexTool_xk/src/SiZvertexMaker_xk.cxx index a8a54df87bec..8c2385afc4de 100755 --- a/InnerDetector/InDetRecTools/SiZvertexTool_xk/src/SiZvertexMaker_xk.cxx +++ b/InnerDetector/InDetRecTools/SiZvertexTool_xk/src/SiZvertexMaker_xk.cxx @@ -10,11 +10,13 @@ // Version 1.0 30/10/2004 I.Gavrilenko /////////////////////////////////////////////////////////////////// -#include <iostream> +#include <ostream> #include <iomanip> #include "SiZvertexTool_xk/SiZvertexMaker_xk.h" #include "SiSpacePointsSeed/SiSpacePointsSeed.h" +#include "VxVertex/Vertex.h" +#include <map> /////////////////////////////////////////////////////////////////// // Constructor -- GitLab From e9c705c2757120e4700cac519f9daebb80725a48 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Sat, 7 Jul 2018 13:17:40 +0200 Subject: [PATCH 436/562] AthenaServices: Fix clang warning. clang warning: unused private data member. Former-commit-id: 0fc27a49942ee30324ba7fc148fb7010a049e509 --- Control/AthenaServices/src/AthenaSummarySvc.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/Control/AthenaServices/src/AthenaSummarySvc.cxx b/Control/AthenaServices/src/AthenaSummarySvc.cxx index 2e0214c95ac4..5898b3133e4a 100644 --- a/Control/AthenaServices/src/AthenaSummarySvc.cxx +++ b/Control/AthenaServices/src/AthenaSummarySvc.cxx @@ -88,7 +88,6 @@ public: string dump() const { string x("{"); map<string,vector<string> >::const_iterator itr; - vector<string>::const_iterator itv; unsigned int iv; for (itr=m_dat.begin(); itr != m_dat.end(); ++itr) { if (x.length() > 1) { x+= ","; } -- GitLab From eb27c9c374071cfe6b0488d19ea97ed4e3471683 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Thu, 12 Jul 2018 01:01:44 +0000 Subject: [PATCH 437/562] 22.0 coverity InDetVKalPriVxFinderTool Former-commit-id: b1c231273356664039bb2cf37ab4d57766fdcc08 --- .../InDetVKalPriVxFinderTool.h | 25 +- .../src/InDetVKalPriVxFinder.cxx | 225 ++++-------------- .../src/Utilities.cxx | 98 +++----- 3 files changed, 84 insertions(+), 264 deletions(-) diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool.h b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool.h index 324eac22427d..cb06513d9d14 100755 --- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool.h +++ b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool.h @@ -28,7 +28,7 @@ // Normal STL and physical vectors #include "TrkToolInterfaces/ITrackSelectorTool.h" #include "TrkToolInterfaces/ITrackSummaryTool.h" -#include <vector> + // Gaudi includes #include "TrkTrack/TrackCollection.h" #include "TrkParameters/TrackParameters.h" @@ -41,17 +41,20 @@ // #include "TrkVKalVrtFitter/TrkVKalVrtFitter.h" #include "InDetRecToolInterfaces/IVertexFinder.h" -#include "xAODTracking/Vertex.h" -#include "xAODTracking/TrackParticle.h" -#include "xAODTracking/VertexContainer.h" +#include "xAODTracking/VertexContainerFwd.h" #include "xAODTracking/VertexAuxContainer.h" // +#include <vector> +#include <utility>//for std::pair class IBeamCondSvc; + + namespace Trk { + class TrackParticle; } namespace InDet { @@ -72,7 +75,6 @@ namespace InDet { std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const Trk::TrackParticleBaseCollection* trackTES); std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const xAOD::TrackParticleContainer* trackTES); // -//Old VxContainer* findVertex(const Rec::TrackParticleContainer* partTES); private: @@ -117,8 +119,6 @@ namespace InDet { PublicToolHandle< Trk::ITrackSummaryTool > m_sumSvc {this,"TrackSummaryTool","Trk::TrackSummaryTool/AtlasTrackSummaryTool",""}; //!< Pointer to the track summary tool ServiceHandle< IBeamCondSvc > m_iBeamCondSvc; //!< pointer to the beam condition service - //Trk::ITrkVKalVrtFitter* m_fitSvc; - //IBeamCondSvc* m_iBeamCondSvc; PublicToolHandle<Trk::ITrackSelectorTool> m_trkSelector {this,"DefaultTrackSelection","DefaultTrackSelection",""}; @@ -212,16 +212,7 @@ namespace InDet { const TrackCollection* trackTES = 0, const Trk::TrackParticleBaseCollection* partTES = 0); -// VxContainer* SaveResults( 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); + StatusCode CutTrk(double PInvVert, double ThetaVert, double A0Vert, double Chi2, long int PixelHits,long int SctHits,long int SharedHits, long int BLayHits); diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/InDetVKalPriVxFinder.cxx b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/InDetVKalPriVxFinder.cxx index 07d632429043..610d7baf787c 100644 --- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/InDetVKalPriVxFinder.cxx +++ b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/InDetVKalPriVxFinder.cxx @@ -6,7 +6,7 @@ #include "InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool.h" //------------------------------------------------- // Other stuff -//#include "GaudiKernel/MsgStream.h" + // #include "InDetBeamSpotService/IBeamCondSvc.h" //---- @@ -15,13 +15,14 @@ #include "TrkParticleBase/LinkToTrackParticleBase.h" #include "TrkTrackSummary/TrackSummary.h" #include "VxVertex/VxTrackAtVertex.h" -//#include "VxVertex/VxContainer.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" //---- -//#include <iostream> namespace InDet { @@ -123,25 +124,7 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type, // return StatusCode::SUCCESS; // } -//TrkVKalVrtFitter -// sc = toolSvc->retrieveTool("TrkVKalVrtFitter",m_fitSvc,this); -// if (sc.isFailure()) { -// if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << " No VKalVrtFitSvc for InDetVKalPriVxFinderTool !" << endmsg; -// return StatusCode::SUCCESS; -// } -// if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "VKalVrtPromCpp's VKalVrtFitSvc found" << endmsg; -//----------------------------------------------------------------------------------------- -// -// Temporary to use old VKalVrt interface -// -// Trk::IVertexFitter * tmp; -// sc = toolSvc->retrieveTool("Trk::TrkVKalVrtFitter",tmp,this); -// if (sc.isFailure()) { -// if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << " No Trk::TrkVKalVrtFitter for InDetVKalPriVxFinderTool !" << endmsg; -// }else{ -// m_fitSvc = dynamic_cast<Trk::TrkVKalVrtFitter*>(tmp); -// if(!m_fitSvc && msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" No Trk::TrkVKalVrtFitter" << endmsg; -// } + if (m_fitSvc.retrieve().isFailure()) { if(msgLvl(MSG::ERROR))msg(MSG::ERROR) << "No Trk::TrkVKalVrtFitter for InDetVKalPriVxFinderTool !" << endmsg; }else{ @@ -218,7 +201,6 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type, //__________________________________________________________________________ - //VxContainer* InDetVKalPriVxFinderTool::findVertex(const TrackCollection* trackTES) std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> InDetVKalPriVxFinderTool::findVertex(const TrackCollection* trackTES) { //............................................. @@ -332,9 +314,7 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type, double CovTrkMtx22 = (*(mPer->covariance()))(1,1); if ( CovTrkMtx11 > 4.*m_A0TrkErrorCut*m_A0TrkErrorCut ) continue; if ( CovTrkMtx22 > 4.*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) { @@ -406,7 +386,6 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type, //__________________________________________________________________________ - //VxContainer* InDetVKalPriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection* newPrtCol) std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> InDetVKalPriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection* newPrtCol) { //............................................. @@ -467,7 +446,6 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type, TrkQual = (*i_nprt)->fitQuality(); double CovTrkMtx11 = (*(mPer->covariance()))(0,0); double CovTrkMtx22 = (*(mPer->covariance()))(2,2); -//if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << " Error track matrix="<<CovTrkMtx11<<", "<<CovTrkMtx22<<endmsg; if ( CovTrkMtx11 > m_A0TrkErrorCut*m_A0TrkErrorCut ) continue; if ( CovTrkMtx22 > m_ZTrkErrorCut*m_ZTrkErrorCut ) continue; if( m_trkSelectorExist ) { @@ -483,10 +461,8 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type, if(PixelHits<0)PixelHits=0; if(SctHits<0)SctHits=0; if(BLayHits<0)BLayHits=0; - //double ImpactSignif = m_fitSvc->VKalGetImpact((*i_nprt), m_BeamCnst, 1, Impact, ImpactError); //VK ImpactSignif not needed m_fitSvc->VKalGetImpact((*i_nprt), m_BeamCnst, 1, Impact, ImpactError); double ImpactA0=VectPerig[0]; //double ImpactZ=VectPerig[1]; // Temporary -//if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << " Track impact="<<ImpactA0<<", "<<ImpactZ<<", "<<ImpactSignif<<endmsg; ImpactA0=Impact[0]; //ImpactZ=Impact[1]; StatusCode sc = CutTrk( VectPerig[4] , VectPerig[3] , ImpactA0 , @@ -508,9 +484,7 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type, double CovTrkMtx22 = (*(mPer->covariance()))(2,2); if ( CovTrkMtx11 > 4.*m_A0TrkErrorCut*m_A0TrkErrorCut ) continue; if ( CovTrkMtx22 > 4.*m_ZTrkErrorCut*m_ZTrkErrorCut ) continue; -// if( m_trkSelectorExist ) { -// if(!m_trkSelector->decision(**i_nprt,&selectionVertex)) continue; -// }else{ + long int PixelHits = 3, SctHits = 9, SharedHits = 0, BLayHits = 1; const Trk::TrackSummary* testSum = (*i_nprt)->trackSummary(); PixelHits = (long int) testSum->get(Trk::numberOfPixelHits); @@ -567,17 +541,18 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type, - std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> InDetVKalPriVxFinderTool::SaveResults( 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) - { + std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> + InDetVKalPriVxFinderTool::SaveResults( 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){ + xAOD::VertexContainer * vrtCont = new xAOD::VertexContainer; xAOD::VertexAuxContainer *vrtAuxCont = new xAOD::VertexAuxContainer; vrtCont->setStore(vrtAuxCont); @@ -587,54 +562,53 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type, 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(); + std::vector<Trk::VxTrackAtVertex> & tmpVTAV=tmpVertex->vxTrackAtVertex(); + tmpVTAV.clear(); for(ii=0; ii<NTrkPerVrt[i]; ii++) { AmgSymMatrix(5) * tmpCovMatr=new AmgSymMatrix(5)(m_fittedTrkCov.at(i).at(ii)); Trk::Perigee * tmpMeasPer = new Trk::Perigee( 0.,0., m_savedTrkFittedPerigees[i][ii][0] , /* Phi */ m_savedTrkFittedPerigees[i][ii][1] , /* Theta */ m_savedTrkFittedPerigees[i][ii][2] , /* 1/p */ - Trk::PerigeeSurface(PrimVrtList[i]), + Trk::PerigeeSurface(PrimVrtList[i]), tmpCovMatr ); Trk::VxTrackAtVertex * tmpPointer = new Trk::VxTrackAtVertex( 1., tmpMeasPer ) ; - if( (int)TrkPerVrt.size() > 0 ){ - 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 + 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 + 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 -// + // + //-Save to container + // vrtCont->push_back(tmpVertex); } -// -//-Defense against 0 found vertices -// + // + //-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 -// + // + //-Remove refitted track parameters from HEAP + // for( i=0; i< NFoundVrt; i++){ double** pntTracks=m_savedTrkFittedPerigees[i]; removeWorkArr2(pntTracks,(long int)NTrkPerVrt[i],3); @@ -643,122 +617,7 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type, m_fittedTrkCov.clear(); Trk::TrkVKalVrtFitter* vkalPnt = dynamic_cast<Trk::TrkVKalVrtFitter*>(&(*m_fitSvc)); if(vkalPnt)vkalPnt->clearMemory(); - return std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> (vrtCont,vrtAuxCont); } - - - - -/* VxContainer* InDetVKalPriVxFinderTool::SaveResults( 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) - { - int i,ii; - VxContainer* nVrtVx =new VxContainer; - 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 - } - - Trk::RecVertex * tmpRecV = new Trk::RecVertex( PrimVrtList[i], - Amg::MatrixX(ErrorMatrixPerVrt[i]), - NTrkPerVrt[i]*2-1, Chi2PerVrt[i]); -// Set up track list // - std::vector<Trk::VxTrackAtVertex*> * tmpVTAV = new std::vector<Trk::VxTrackAtVertex*>(); - for(ii=0; ii<NTrkPerVrt[i]; ii++) { - Trk::Perigee * tmpMeasPer; - AmgSymMatrix(5) * tmpCovMatr=new AmgSymMatrix(5)(m_fittedTrkCov.at(i).at(ii)); - tmpMeasPer = new Trk::Perigee( 0.,0., - m_savedTrkFittedPerigees[i][ii][0] , // Phi // - m_savedTrkFittedPerigees[i][ii][1] , // Theta // - m_savedTrkFittedPerigees[i][ii][2] , // 1/p // - Trk::PerigeeSurface(PrimVrtList[i]), - tmpCovMatr ); - - Trk::VxTrackAtVertex * tmpPointer = new Trk::VxTrackAtVertex( 1., tmpMeasPer ) ; - if( (int)TrkPerVrt.size() > 0 ){ - 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 ); - } - Trk::VxCandidate* tmpVx =new Trk::VxCandidate(*tmpRecV,*tmpVTAV); - delete tmpVTAV; delete tmpRecV; -// -// Save to container -// - nVrtVx->push_back(tmpVx); - } -// -// Defense against 0 found vertices -// - if( NFoundVrt == 0 ){ - Trk::RecVertex * tmpRecV = new Trk::RecVertex(Amg::Vector3D(0.,0.,0.)); - std::vector<Trk::VxTrackAtVertex*> * tmpVTAV = new std::vector<Trk::VxTrackAtVertex*>(); - Trk::VxCandidate* tmpVx =new Trk::VxCandidate(*tmpRecV,*tmpVTAV); - nVrtVx->push_back(tmpVx); - delete tmpVTAV; delete tmpRecV; - } -// -// Remove refitted track parameters from HEAP -// - for( i=0; i< NFoundVrt; i++){ - double** pntTracks=m_savedTrkFittedPerigees[i]; - removeWorkArr2(pntTracks,(long int)NTrkPerVrt[i],3); - } - m_savedTrkFittedPerigees.clear(); - m_fittedTrkCov.clear(); - Trk::TrkVKalVrtFitter* vkalPnt = dynamic_cast<Trk::TrkVKalVrtFitter*>(&(*m_fitSvc)); - if(vkalPnt)vkalPnt->clearMemory(); -//---------------------------------------------------------------------------------------------------- -// -// Additional stuff -// - if ( nVrtVx->size() >= 1 ) - { - Trk::VxCandidate * primaryVtx = nVrtVx->front(); - primaryVtx->setVertexType(Trk::PriVtx); - Trk::VxCandidate * dummyVxCandidate = new Trk::VxCandidate ( primaryVtx->recVertex(), - std::vector<Trk::VxTrackAtVertex*>()); - dummyVxCandidate->setVertexType(Trk::NoVtx); - nVrtVx->push_back ( dummyVxCandidate ); - } - //---- if no vertex is there let dummy be at beam spot - else if ( nVrtVx->size() == 0 ) - { - Trk::VxCandidate * dummyVxCandidate = new Trk::VxCandidate ( Trk::RecVertex( Amg::Vector3D(0.,0.,0.)), - std::vector<Trk::VxTrackAtVertex*>()); - dummyVxCandidate->setVertexType(Trk::NoVtx); - nVrtVx->push_back ( dummyVxCandidate ); - } - - // loop over the pile up to set it as pile up (EXCLUDE first and last vertex: loop from 1 to size-1) - for ( int i = 1 ; i < (int)nVrtVx->size()-1 ; i++) - { - (*nVrtVx)[i]->setVertexType(Trk::PileUp); - } - - // - return nVrtVx; - } -*/ - } // end of namespace bracket diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/Utilities.cxx b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/Utilities.cxx index b85ae1c93c5a..feed26190ed4 100755 --- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/Utilities.cxx +++ b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/Utilities.cxx @@ -9,7 +9,7 @@ //------------------------------------------------- // Other stuff #include <map> -//#include <iostream> +#include <cmath> @@ -28,26 +28,26 @@ namespace InDet { int Selector=2; // Initial choice int NTrkInList = 0; SelectedParticles.clear(); SelectedTracks.clear(); - if( ListParticles.size() == 0 && ListTracks.size() == 0 )return; - if( ListParticles.size() != 0 && ListTracks.size() == 0 ){ Selector =1; NTrkInList=ListParticles.size(); } - if( ListParticles.size() == 0 && ListTracks.size() != 0 ){ Selector =2; NTrkInList=ListTracks.size();} + 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 ( fabs(Impact[0])/sqrt(ImpactError[0]) > m_RImpSelCut) continue; - if ( fabs(Impact[1])/sqrt(ImpactError[2]) > m_ZImpSelCut) continue; - if ( Signif > m_SignifSelCut) continue; - if ( fabs(Impact[0]) > m_RDistSelCut) continue; - if ( 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)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 && msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "Chosen for vertex fit="<<SelectedParticles.size()<<endmsg; - if(Selector==2 && msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "Chosen for vertex fit="<<SelectedTracks.size()<<endmsg; + 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; } @@ -97,7 +97,6 @@ namespace InDet { // //-- Perigee in TrackParticle // -// return i_ntrk->Perigee(); const Trk::Perigee* mPer; mPer = dynamic_cast<const Trk::Perigee*>( &(i_ntrk->definingParameters()) ); return mPer; @@ -106,19 +105,7 @@ namespace InDet { const Trk::Perigee* InDetVKalPriVxFinderTool::GetPerigee( const Trk::Track* i_ntrk) { return i_ntrk->perigeeParameters(); -// -//-- Perigee in Trk::Track -// -// const Trk::Perigee* mPer=NULL; -// const DataVector<const Trk::TrackParameters>* AllTrkPar; -// DataVector<const Trk::TrackParameters>::const_iterator i_apar; -// AllTrkPar = i_ntrk->trackParameters(); -// i_apar=AllTrkPar->begin(); -// while( i_apar < AllTrkPar->end() ){ -// if( (mPer=dynamic_cast<const Trk::Perigee*>(*i_apar)) == 0 ){ i_apar++;} -// else { break;} -// } -// return mPer; + } //----------------------------------------------------------------------------------------------- void InDetVKalPriVxFinderTool::RemoveEntryInList(std::vector<const Trk::Track*>& ListTracks, int Outlier) @@ -181,15 +168,10 @@ namespace InDet { List.erase( TransfEnd,List.end()); } - - - - - - double InDetVKalPriVxFinderTool::GetLimitAngle(double Phi){ - while ( Phi < 0.) { Phi += 2.*3.1415926536;} - while ( Phi > 2.*3.1415926536) {Phi -=2.*3.1415926536;} + constexpr double twoPi (2.*M_PI); + while ( Phi < 0.) { Phi += twoPi;} + while ( Phi > twoPi) {Phi -=twoPi;} return Phi; } @@ -211,23 +193,6 @@ namespace InDet { List.erase( TransfEnd, List.end()); } - -/* const vector<const Trk::TrackParticleBase*> - InDetVKalPriVxFinderTool::Base(const vector<const Rec::TrackParticle*> & listPart) - { - vector <const Trk::TrackParticleBase*> listBase; - for(int i=0; i<(int)listPart.size(); i++) { - listBase.push_back( (const Trk::TrackParticleBase*)listPart[i]); - } - return listBase; - } - - const Trk::TrackParticleBase* InDetVKalPriVxFinderTool::Base(const Rec::TrackParticle* Part) - { - return (const Trk::TrackParticleBase*) Part; - } -*/ - double** InDetVKalPriVxFinderTool::getWorkArr2(long int dim1,long int dim2) { double **ppArr = new double*[dim1]; @@ -279,30 +244,35 @@ namespace InDet { - Amg::Vector3D InDetVKalPriVxFinderTool::findIniXY(const TrackCollection* trackTES) - { + Amg::Vector3D + InDetVKalPriVxFinderTool::findIniXY(const TrackCollection* trackTES){ //............................................. - AmgVector(5) VectPerig; VectPerig<<0.,0.,0.,0.,0.; - const Trk::Perigee* mPer=NULL; + 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( mPer == NULL )continue; + mPer=GetPerigee( (*i_ntrk) ); + if( not mPer )continue; VectPerig = mPer->parameters(); - double pmom = sin(VectPerig[3])/fabs(VectPerig[4]); + 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) continue; + 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); @@ -311,7 +281,7 @@ namespace InDet { Amg::Vector3D Vertex(0.,0.,0.); if(cnt>=2){ StatusCode sc=m_fitSvc->VKalVrtFitFast(SelectedTracks,Vertex); - if(sc.isFailure())Vertex<<0.,0.,0.; + if(sc.isFailure()) Vertex<<0.,0.,0.; } return Vertex; } -- GitLab From ca280502047980e6b3a18900b42b91766080e873 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Thu, 12 Jul 2018 01:04:05 +0000 Subject: [PATCH 438/562] 22.0 coverity InDetZVTOPVxFinder Former-commit-id: c117335e0d700276e5611ec2d19b47c8c6069b33 --- .../IZVTOP_AmbiguitySolver.h | 9 +-- .../ZVTOP_TrkPartBaseVertexState.h | 9 ++- .../ZVTOP_TrkPartVertexState.h | 7 ++- .../InDetZVTOPVxFinder/ZVTOP_VertexState.h | 8 ++- .../src/ZVTOP_AmbiguitySolver.cxx | 55 ++++------------- .../src/ZVTOP_SpatialPointFinder.cxx | 61 ++++++++++--------- .../src/ZVTOP_TrkPartBaseVertexState.cxx | 7 +-- .../src/ZVTOP_TrkPartVertexState.cxx | 6 +- .../src/ZVTOP_TrkProbTubeCalc.cxx | 30 ++++----- .../src/ZVTOP_VertexState.cxx | 6 +- 10 files changed, 83 insertions(+), 115 deletions(-) diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/IZVTOP_AmbiguitySolver.h b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/IZVTOP_AmbiguitySolver.h index 7471f1f60e22..be0a7690144f 100755 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/IZVTOP_AmbiguitySolver.h +++ b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/IZVTOP_AmbiguitySolver.h @@ -9,14 +9,10 @@ #define IINDETZVTOP_AMBIGUITYSOLVER_H #include "GaudiKernel/IAlgTool.h" - //xAOD includes --David S. -#include "xAODTracking/Vertex.h" +#include "xAODTracking/Vertex.h" //typedef +#include <vector> -//namespace Trk --David S. -//{ -// class VxCandidate; -//} namespace InDet { @@ -29,7 +25,6 @@ namespace InDet static const InterfaceID& interfaceID( ) ; // enter declaration of your interface-defining member functions here - //virtual std::vector<Trk::VxCandidate*> solveAmbiguities(std::vector<Trk::VxCandidate*> VxContainer) = 0; --David S. virtual std::vector< xAOD::Vertex* > solveAmbiguities(std::vector< xAOD::Vertex* > VertexContainer) = 0; }; diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_TrkPartBaseVertexState.h b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_TrkPartBaseVertexState.h index 945764981b68..f8ca7238b727 100644 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_TrkPartBaseVertexState.h +++ b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_TrkPartBaseVertexState.h @@ -6,7 +6,11 @@ #define IINDETZVTOP_TRKPARTBASEVERTEXSTATE_H #include "VxVertex/Vertex.h" -#include "TrkParticleBase/TrackParticleBase.h" +#include <vector> + +namespace Trk{ + class TrackParticleBase; +} /** * ZVTOP_Tool helper class @@ -32,8 +36,9 @@ public: /**Copy Constructor */ ZVTOP_TrkPartBaseVertexState (const ZVTOP_TrkPartBaseVertexState& vs); //copy-constructor - //ZVTOP_VertexState &operator= (const ZVTOP_VertexState &); //assignement operator + ZVTOP_TrkPartBaseVertexState &operator= (const ZVTOP_TrkPartBaseVertexState &) = default; + //(sroe): why do these return references to protected data? double& vtx_prob(void); Trk::Vertex& vertex(void); diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_TrkPartVertexState.h b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_TrkPartVertexState.h index 077b83a810cc..748ab31f5f36 100644 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_TrkPartVertexState.h +++ b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_TrkPartVertexState.h @@ -6,7 +6,10 @@ #define IINDETZVTOP_TRKPARTVERTEXSTATE_H #include "VxVertex/Vertex.h" -#include "Particle/TrackParticle.h" +#include <vector> +namespace Rec{ + class TrackParticle; +} /** * ZVTOP_Tool helper class * to store the full vertex/tracks & vtx_probability @@ -31,7 +34,7 @@ public: /**Copy Constructor */ ZVTOP_TrkPartVertexState (const ZVTOP_TrkPartVertexState& vs); //copy-constructor - //ZVTOP_VertexState &operator= (const ZVTOP_VertexState &); //assignement operator + ZVTOP_TrkPartVertexState &operator= (const ZVTOP_TrkPartVertexState &) = default; double& vtx_prob(void); diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_VertexState.h b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_VertexState.h index 96d0d74425c2..82733f11edd5 100755 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_VertexState.h +++ b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_VertexState.h @@ -6,13 +6,17 @@ #define IINDETZVTOP_VERTEXSTATE_H #include "VxVertex/Vertex.h" -#include "TrkTrack/Track.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 @@ -31,7 +35,7 @@ public: /**Copy Constructor */ ZVTOP_VertexState (const ZVTOP_VertexState& vs); //copy-constructor - //ZVTOP_VertexState &operator= (const ZVTOP_VertexState &); //assignement operator + ZVTOP_VertexState &operator= (const ZVTOP_VertexState &)= default; double& vtx_prob(void); diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_AmbiguitySolver.cxx b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_AmbiguitySolver.cxx index 3bca0e81397b..86403b1f88cf 100755 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_AmbiguitySolver.cxx +++ b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_AmbiguitySolver.cxx @@ -13,6 +13,7 @@ #include "TrkTrack/Track.h" #include "TrkParameters/TrackParameters.h" #include "VxVertex/VxTrackAtVertex.h" +#include <map> //================ Constructor ================================================= @@ -41,108 +42,78 @@ InDet::ZVTOP_AmbiguitySolver::~ZVTOP_AmbiguitySolver() StatusCode InDet::ZVTOP_AmbiguitySolver::initialize() { - - StatusCode sc = AlgTool::initialize(); - - if (sc.isFailure()) return sc; //Gaussian Probability Tube for the Track Trajectory - if ( m_TrkProbTubeCalc.retrieve().isFailure() ) { - msg(MSG::FATAL) << "Failed to retrieve tool " << m_TrkProbTubeCalc<< endmsg; - return StatusCode::FAILURE; - } else msg (MSG::INFO) << "Retrieved tool " << m_TrkProbTubeCalc << endmsg; - + ATH_CHECK( m_TrkProbTubeCalc.retrieve()); //Vertex Probability Function - if ( m_VtxProbCalc.retrieve().isFailure() ) { - msg (MSG::FATAL) << "Failed to retrieve tool " << m_VtxProbCalc<< endmsg; - return StatusCode::FAILURE; - } else msg (MSG::INFO) << "Retrieved tool " << m_VtxProbCalc << endmsg; - msg (MSG::INFO) << "initialize() successful in " << name() << endmsg; + ATH_CHECK( m_VtxProbCalc.retrieve() ); + ATH_MSG_DEBUG( "initialize() successful "); return StatusCode::SUCCESS; } -//std::vector<Trk::VxCandidate*> InDet::ZVTOP_AmbiguitySolver::solveAmbiguities(std::vector<Trk::VxCandidate*> VxContainer) --David S. std::vector<xAOD::Vertex*> InDet::ZVTOP_AmbiguitySolver::solveAmbiguities(std::vector<xAOD::Vertex*> VertexContainer) { - //std::vector<Trk::VxCandidate*> newVxContainer; --David S. std::vector<xAOD::Vertex*> newVertexContainer; - //std::vector<Trk::VxCandidate*>::iterator itr = VxContainer.begin(); --David S. std::vector<xAOD::Vertex*>::iterator itr = VertexContainer.begin(); - //std::map<double, Trk::VxCandidate*> vxprob_map; --David S. std::map<double, xAOD::Vertex*> vxprob_map; double sum_TrkProbTube = 0.; double sum2_TrkProbTube = 0.; - //for (; itr != VxContainer.end(); ++itr){ --David S. for (; itr != VertexContainer.end(); ++itr){ - //Amg::Vector3D pos = (*itr)->recVertex().position(); --David S. Amg::Vector3D pos = (*itr)->position(); Trk::Vertex vtx_pos(pos); - //std::vector<Trk::VxTrackAtVertex*> trksAtVtx = *((*itr)->vxTrackAtVertex()); --David S. std::vector<Trk::VxTrackAtVertex> trksAtVtx = (*itr)->vxTrackAtVertex(); - //std::vector<Trk::VxTrackAtVertex*>::iterator trk_itr = trksAtVtx.begin(); --David S. 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 += pow(TrkProbTube,2); + sum2_TrkProbTube += (TrkProbTube * TrkProbTube); } double vtx_prob = m_VtxProbCalc->calcVtxProb(sum_TrkProbTube, sum2_TrkProbTube); - //vxprob_map.insert(std::map<double, Trk::VxCandidate*>::value_type(vtx_prob,(*itr))); --David S. vxprob_map.insert(std::map<double, xAOD::Vertex*>::value_type(vtx_prob,(*itr))); } - //std::map<double, Trk::VxCandidate*>::reverse_iterator mapItr = vxprob_map.rbegin(); --David S. std::map<double, xAOD::Vertex*>::reverse_iterator mapItr = vxprob_map.rbegin(); - //std::map<double, Trk::VxCandidate*> initial_perigee_pos_map; --David S. std::map<double, xAOD::Vertex*> initial_perigee_pos_map; for(; mapItr!=vxprob_map.rend(); ++mapItr){ - //Trk::VxCandidate* vtx = (*mapItr).second; --David S. xAOD::Vertex* vtx = (*mapItr).second; - //std::vector< Trk::VxTrackAtVertex*> trkAtVtx = *(vtx->vxTrackAtVertex()); --David S. std::vector<Trk::VxTrackAtVertex> trkAtVtx = vtx->vxTrackAtVertex(); - //std::vector< Trk::VxTrackAtVertex*>::iterator trkAtVtx_Iter = trkAtVtx.begin(); --David S. 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, Trk::VxCandidate*>::value_type(pos.mag(),vtx)); --David S. 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){ - //Trk::VxCandidate* vtx = (*mapItr).second; --David S. xAOD::Vertex* vtx = (*mapItr).second; - //std::vector< Trk::VxTrackAtVertex*> trkAtVtx = *(vtx->vxTrackAtVertex()); --David S. std::vector<Trk::VxTrackAtVertex> trkAtVtx = vtx->vxTrackAtVertex(); - //std::vector< Trk::VxTrackAtVertex*>::iterator trkAtVtx_Iter = trkAtVtx.begin(); --David S. 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, Trk::VxCandidate*>::iterator pos_magItr = initial_perigee_pos_map.find(pos_mag); --David S. 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 (vtx != (*pos_magItr).second){ + trkAtVtx.erase(trkAtVtx_Iter); + if (trkAtVtx_Iter == trkAtVtx.end()) break; + } } } if (trkAtVtx.size() > 1) { - //newVxContainer.push_back(vtx); --David S. newVertexContainer.push_back(vtx); } } - //return newVxContainer; --David S. return newVertexContainer; } //================ Finalisation ================================================= StatusCode InDet::ZVTOP_AmbiguitySolver::finalize() { - StatusCode sc = AlgTool::finalize(); - return sc; + return StatusCode::SUCCESS; } //============================================================================================ diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SpatialPointFinder.cxx b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SpatialPointFinder.cxx index 09d8c3c2bb8a..e7fdd86fcc1c 100755 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SpatialPointFinder.cxx +++ b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SpatialPointFinder.cxx @@ -12,6 +12,7 @@ #include "Particle/TrackParticle.h" #include "EventPrimitives/EventPrimitives.h" #include "TrkParticleBase/TrackParticleBase.h" +#include <cmath> //================ Constructor ================================================= InDet::ZVTOP_SpatialPointFinder::ZVTOP_SpatialPointFinder(const std::string& t, @@ -36,12 +37,7 @@ InDet::ZVTOP_SpatialPointFinder::~ZVTOP_SpatialPointFinder() StatusCode InDet::ZVTOP_SpatialPointFinder::initialize() { - - StatusCode sc = AlgTool::initialize(); - - if (sc.isFailure()) return sc; - - msg (MSG::INFO) << "initialize() successful in " << name() << endmsg; + ATH_MSG_DEBUG( "initialize() successful" ); return StatusCode::SUCCESS; } @@ -49,16 +45,15 @@ StatusCode InDet::ZVTOP_SpatialPointFinder::initialize() StatusCode InDet::ZVTOP_SpatialPointFinder::finalize() { - StatusCode sc = AlgTool::finalize(); - return sc; + return StatusCode::SUCCESS; } //============================================================================================ Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Trk::Track* trk_1, const Trk::Track* trk_2) { 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::DEBUG)) msg() << "Dynamic cast to MeasuredPerigee failed. Skipping this pair" << endmsg; + if ((!perigee_1) or (!perigee_2)) { + ATH_MSG_DEBUG( "Dynamic cast to MeasuredPerigee failed. Skipping this pair" ); return 0; } else { Trk::Vertex * vertex = findSpatialPoint(perigee_1,perigee_2); @@ -71,8 +66,8 @@ Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Trk::RecVer { const Trk::TrackParameters *perigee_1(dynamic_cast<const Trk::TrackParameters*>(trk_1->perigeeParameters())); if (!perigee_1) { - if (msgLvl(MSG::DEBUG)) msg() << "Dynamic cast to MeasuredPerigee failed. Skipping this pair" << endmsg; - return 0; + ATH_MSG_DEBUG( "Dynamic cast to MeasuredPerigee failed. Skipping this pair" ); + return nullptr; } else { Trk::Vertex * vertex = findSpatialPoint(vtx,perigee_1); return vertex; @@ -84,8 +79,8 @@ Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Rec::TrackP { const Trk::TrackParameters* perigee_1(trk_1->measuredPerigee()); const Trk::TrackParameters* perigee_2(trk_2->measuredPerigee()); - if (!perigee_1 | !perigee_2) { - if (msgLvl(MSG::DEBUG)) msg() << "Dynamic cast to MeasuredPerigee failed. Skipping this pair" << endmsg; + if ((!perigee_1) or (!perigee_2)) { + ATH_MSG_DEBUG( "Dynamic cast to MeasuredPerigee failed. Skipping this pair" ); return 0; } else { Trk::Vertex * vertex = findSpatialPoint(perigee_1,perigee_2); @@ -98,7 +93,7 @@ Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Trk::RecVer { const Trk::TrackParameters* perigee_1(trk_1->measuredPerigee()); if (!perigee_1) { - if (msgLvl(MSG::DEBUG)) msg() << "Dynamic cast to MeasuredPerigee failed. Skipping this pair" << endmsg; + ATH_MSG_DEBUG( "Dynamic cast to MeasuredPerigee failed. Skipping this pair" ); return 0; } else { Trk::Vertex * vertex = findSpatialPoint(vtx,perigee_1); @@ -110,8 +105,8 @@ Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Trk::TrackP { 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::DEBUG)) msg() << "Dynamic cast to MeasuredPerigee failed. Skipping this pair" << endmsg; + if ((!perigee_1) or (!perigee_2)) { + ATH_MSG_DEBUG ("Dynamic cast to MeasuredPerigee failed. Skipping this pair" ); return 0; } else { Trk::Vertex * vertex = findSpatialPoint(perigee_1,perigee_2); @@ -124,7 +119,7 @@ Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Trk::RecVer { const Trk::TrackParameters* perigee_1 = dynamic_cast<const Trk::TrackParameters*>(&trk_1->definingParameters()); if (!perigee_1) { - if (msgLvl(MSG::DEBUG)) msg() << "Dynamic cast to MeasuredPerigee failed. Skipping this pair" << endmsg; + ATH_MSG_DEBUG( "Dynamic cast to MeasuredPerigee failed. Skipping this pair" ); return 0; } else { Trk::Vertex * vertex = findSpatialPoint(vtx,perigee_1); @@ -140,18 +135,22 @@ Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Trk::TrackP 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./tan(perigee_1->parameters()[Trk::theta]); - double sphi_1 = sin(perigee_1->parameters()[Trk::phi]); - double cphi_1 = cos(perigee_1->parameters()[Trk::phi]); + 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./tan(perigee_2->parameters()[Trk::theta]); - double sphi_2 = sin(perigee_2->parameters()[Trk::phi]); - double cphi_2 = cos(perigee_2->parameters()[Trk::phi]); + 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; @@ -190,11 +189,11 @@ Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Trk::TrackP chi2 = XpVec_sp_1.dot(DtWD_1*XpVec_sp_1) + XpVec_sp_2.dot(DtWD_2*XpVec_sp_2); if (chi2 <= m_chi2) { - if (msgLvl(MSG::DEBUG)) msg() <<"found spatial point = ("<<spatialPoint[0]<<", "<<spatialPoint[1]<<", "<<spatialPoint[2]<<")"<< endmsg; + ATH_MSG_DEBUG("found spatial point = ("<<spatialPoint[0]<<", "<<spatialPoint[1]<<", "<<spatialPoint[2]<<")"); return new Trk::Vertex(spatialPoint); } else { - if (msgLvl(MSG::DEBUG)) msg() <<"found spatial point candidate doesn't pass chi2_cut" << endmsg; + ATH_MSG_DEBUG("found spatial point candidate doesn't pass chi2_cut" ); return 0; } @@ -207,9 +206,13 @@ Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Trk::RecVer { Amg::Vector3D spatialPoint; const Trk::Perigee* perigee_1 =dynamic_cast<const Trk::Perigee*>(param_1); - double cot_theta_1 = 1./tan(perigee_1->parameters()[Trk::theta]); - double sphi_1 = sin(perigee_1->parameters()[Trk::phi]); - double cphi_1 = cos(perigee_1->parameters()[Trk::phi]); + 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; diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_TrkPartBaseVertexState.cxx b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_TrkPartBaseVertexState.cxx index ebd459a0bed6..a31df49cf99a 100644 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_TrkPartBaseVertexState.cxx +++ b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_TrkPartBaseVertexState.cxx @@ -8,9 +8,9 @@ authors : Tatjana Lenz <tatjana.lenz@cern.ch> ***************************************************************************/ #include "InDetZVTOPVxFinder/ZVTOP_TrkPartBaseVertexState.h" -#include "VxVertex/Vertex.h" #include "TrkParticleBase/TrackParticleBase.h" + namespace InDet { ZVTOP_TrkPartBaseVertexState::ZVTOP_TrkPartBaseVertexState():m_vtx_prob(),m_vertex(),m_beam_spot(), m_tracks(0){} @@ -21,10 +21,9 @@ namespace InDet { m_vtx_prob(vs.m_vtx_prob), m_vertex(vs.m_vertex), m_beam_spot(vs.m_beam_spot), - m_tracks(std::vector<const Trk::TrackParticleBase*>()) + m_tracks(vs.m_tracks) { - for (std::vector<const Trk::TrackParticleBase*>::const_iterator itr = vs.m_tracks.begin(); - itr != vs.m_tracks.end(); ++itr) m_tracks.push_back(*itr); + } 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 index dc606440fee7..6c05a6f4b897 100644 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_TrkPartVertexState.cxx +++ b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_TrkPartVertexState.cxx @@ -9,7 +9,6 @@ ***************************************************************************/ #include "InDetZVTOPVxFinder/ZVTOP_TrkPartVertexState.h" -#include "VxVertex/Vertex.h" #include "Particle/TrackParticle.h" namespace InDet { @@ -22,10 +21,9 @@ namespace InDet { m_vtx_prob(vs.m_vtx_prob), m_vertex(vs.m_vertex), m_IP(vs.m_IP), - m_tracks(std::vector<const Rec::TrackParticle*>()) + m_tracks(vs.m_tracks) { - for (std::vector<const Rec::TrackParticle*>::const_iterator itr = vs.m_tracks.begin(); - itr != vs.m_tracks.end(); ++itr) m_tracks.push_back(*itr); + } 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 index f78f8140dc1e..269b91481223 100755 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_TrkProbTubeCalc.cxx +++ b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_TrkProbTubeCalc.cxx @@ -14,6 +14,7 @@ #include "CLHEP/Matrix/Vector.h" #include "EventPrimitives/EventPrimitives.h" #include "TrkExInterfaces/IExtrapolator.h" +#include <cmath> //================ Constructor ================================================= @@ -37,20 +38,10 @@ InDet::ZVTOP_TrkProbTubeCalc::~ZVTOP_TrkProbTubeCalc() //================ Initialisation ================================================= StatusCode InDet::ZVTOP_TrkProbTubeCalc::initialize() -{ - - StatusCode sc = AlgTool::initialize(); - - if (sc.isFailure()) return sc; - +{ /* Get the right extrapolator tool from ToolSvc */ - if ( m_extrapolator.retrieve().isFailure() ) { - msg (MSG::FATAL) << "Failed to retrieve tool " << m_extrapolator << endmsg; - return StatusCode::FAILURE; - } else { - msg (MSG::INFO) << "Retrieved tool " << m_extrapolator << endmsg; - } - msg (MSG::INFO) << "initialize() successful in " << name() << endmsg; + ATH_CHECK( m_extrapolator.retrieve() ); + ATH_MSG_DEBUG( "initialize() successful"); return StatusCode::SUCCESS; } @@ -58,8 +49,7 @@ StatusCode InDet::ZVTOP_TrkProbTubeCalc::initialize() StatusCode InDet::ZVTOP_TrkProbTubeCalc::finalize() { - StatusCode sc = AlgTool::finalize(); - return sc; + return StatusCode::SUCCESS; } //============================================================================================ @@ -68,6 +58,7 @@ double InDet::ZVTOP_TrkProbTubeCalc::calcProbTube(const Trk::Track& trk, Trk::Ve 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; } @@ -81,7 +72,7 @@ double InDet::ZVTOP_TrkProbTubeCalc::calcProbTube(const Trk::RecVertex& beam_spo 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 = exp(-0.5*diff.transpose()*beam_spot_weight*diff); + probTube = std::exp(-0.5*diff.transpose()*beam_spot_weight*diff); return probTube; } //============================================================================================ @@ -98,6 +89,7 @@ double InDet::ZVTOP_TrkProbTubeCalc::calcProbTube(const Trk::TrackParticleBase& 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; } @@ -120,12 +112,12 @@ double InDet::ZVTOP_TrkProbTubeCalc::calcProbTube(const Trk::Perigee* trkPer, Tr diff[4]= extrapolatedPerigee->parameters()[Trk::qOverP] - f_qOverP; if (extrapolatedPerigee->covariance() != 0) { AmgMatrix(5,5) exp_perigee_weight = (*extrapolatedPerigee->covariance()).inverse(); - probTube = exp(-0.5*diff.transpose()*exp_perigee_weight*diff); + probTube = std::exp(-0.5*diff.transpose()*exp_perigee_weight*diff); } else { - if (msgLvl(MSG::DEBUG)) msg() << "extrapolateted perigee has NO information on the covariance matrix" << endmsg; + ATH_MSG_DEBUG( "extrapolateted perigee has NO information on the covariance matrix" ); } } else { - if (msgLvl(MSG::DEBUG)) msg() << "Perigee was not extrapolated!" << endmsg; + 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 index 353b6511d28e..2747211ab030 100755 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_VertexState.cxx +++ b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_VertexState.cxx @@ -9,7 +9,6 @@ ***************************************************************************/ #include "InDetZVTOPVxFinder/ZVTOP_VertexState.h" -#include "VxVertex/Vertex.h" #include "TrkTrack/Track.h" namespace InDet { @@ -22,10 +21,9 @@ namespace InDet { m_vtx_prob(vs.m_vtx_prob), m_vertex(vs.m_vertex), m_beam_spot(vs.m_beam_spot), - m_tracks(std::vector<const Trk::Track*>()) + m_tracks(vs.m_tracks) { - for (std::vector<const Trk::Track*>::const_iterator itr = vs.m_tracks.begin(); - itr != vs.m_tracks.end(); ++itr) m_tracks.push_back(*itr); + } ZVTOP_VertexState::~ZVTOP_VertexState() {} } // end of namespace -- GitLab From c4bce7d6cc9ce8e2c08e6e977e2a03f22a462856 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Tue, 10 Jul 2018 20:00:46 +0200 Subject: [PATCH 439/562] IOVDbSvc: Enable conditions garbage collection. Former-commit-id: 3b9bddd1c3266784bf0905e604ea7c594eb16a47 --- Database/IOVDbSvc/python/CondDB.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Database/IOVDbSvc/python/CondDB.py b/Database/IOVDbSvc/python/CondDB.py index d389d8bdaac3..75b18dbd1270 100644 --- a/Database/IOVDbSvc/python/CondDB.py +++ b/Database/IOVDbSvc/python/CondDB.py @@ -28,6 +28,8 @@ import os from AthenaCommon.AppMgr import ServiceMgr as svcMgr from IOVSvc.IOVSvcConf import CondSvc from IOVSvc.IOVSvcConf import CondInputLoader +from AthenaServices.AthenaServicesConf import Athena__ConditionsCleanerSvc +from AthenaServices.AthenaServicesConf import Athena__DelayedConditionsCleanerSvc from AthenaCommon.AlgSequence import AthSequencer import StoreGate.StoreGateConf as StoreGateConf @@ -38,6 +40,11 @@ svcMgr += CondSvc() svcMgr += StoreGateConf.StoreGateSvc("ConditionStore") condSeq += condInputLoader +# Enable conditions garbage collection. +cleaner = Athena__DelayedConditionsCleanerSvc() +svcMgr += cleaner +svcMgr += Athena__ConditionsCleanerSvc (CleanerSvc = cleaner) + class CondDB: "Class to hold configuration information for Athena conditions DB access" def __init__(self,doOldStyleConfig=False): -- GitLab From 824e24cc69c0a694a4163784983a14f599651003 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Thu, 12 Jul 2018 10:19:53 +0200 Subject: [PATCH 440/562] Solve coverity 114764 by initialising members in TRT_DriftCircleOnTrackRecalibrateTool.h Former-commit-id: 94c5c40450651abb3f09562ec4684bfdde9da7c0 --- .../TRT_DriftCircleOnTrackRecalibrateTool.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/InnerDetector/InDetRecTools/TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackRecalibrateTool.h b/InnerDetector/InDetRecTools/TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackRecalibrateTool.h index dc511fe2bd70..f5d4055c0478 100755 --- a/InnerDetector/InDetRecTools/TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackRecalibrateTool.h +++ b/InnerDetector/InDetRecTools/TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackRecalibrateTool.h @@ -60,9 +60,9 @@ public: ToolHandle<Trk::IRIO_OnTrackCreator> m_riontrackTube ; ToolHandle<ITRT_DriftFunctionTool> m_drifttool ; ToolHandle<Trk::IRIO_OnTrackErrorScalingTool> m_errorScalingTool; - bool m_scaleTrtCov ; - bool m_useToTCorrection; //!< Shall the Time over Threshold correction be used? - double m_scalefactor ; //scale factor for hit uncertainty + bool m_scaleTrtCov{} ; + bool m_useToTCorrection{}; //!< Shall the Time over Threshold correction be used? + double m_scalefactor{} ; //scale factor for hit uncertainty }; -- GitLab From 29e10e17279116e6a0e030eefbf15ec6da1cf6f9 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Thu, 12 Jul 2018 13:33:09 +0200 Subject: [PATCH 441/562] Moved boilerplate to helpers Former-commit-id: 74732cd67104e1a2c6a69d17e38aad7f14cce2af --- Control/AthViews/AthViews/ViewHelper.h | 30 ++++++++++++++++++- .../src/TrigL2CaloHypoAlgMT.cxx | 28 ++++++++--------- .../src/TrigL2ElectronHypoAlgMT.cxx | 11 +++---- .../src/TrigL2PhotonHypoAlgMT.cxx | 25 +++++++--------- 4 files changed, 55 insertions(+), 39 deletions(-) diff --git a/Control/AthViews/AthViews/ViewHelper.h b/Control/AthViews/AthViews/ViewHelper.h index 1378526b58e4..46e578ddfb0c 100644 --- a/Control/AthViews/AthViews/ViewHelper.h +++ b/Control/AthViews/AthViews/ViewHelper.h @@ -18,7 +18,6 @@ #include "AthContainers/DataVector.h" #include "AthContainers/AuxElement.h" #include "AthContainers/AuxStoreInternal.h" - #include "tbb/task.h" namespace ViewHelper @@ -298,6 +297,35 @@ namespace ViewHelper return handle.cptr(); } + /** + * navigate from the TrigComposite to nearest view and fetch object from it + * @return handle (can be invalid) + */ + + + template<typename T> + SG::ReadHandle<T> getHandleFromView( const SG::View* view , const SG::ReadHandleKey<T>& rhKey, const EventContext& context ) { + + SG::View* nview = const_cast<SG::View*>(view); // we need it until reading from const IProxyDict is not supported + + auto handle = SG::makeHandle( rhKey, context ); + if ( handle.setProxyDict( nview ).isFailure() ) { // we ignore it besause the handle will be invalid anyways if this call is unsuccesfull + return SG::ReadHandle<T>( "CantSetViewProxy" ); + } + return handle; + } + + + /** + * Create EL to a collection in view + * @warning no checks are made as to the validity of the created EL + */ + + template<typename T> + ElementLink<T> makeLink(const SG::View* view, const SG::ReadHandle<T>& handle, size_t index ) { + return ElementLink<T>( view->name()+"_"+handle.key(), index ); + } + } // EOF namspace ViewHelper #endif diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoAlgMT.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoAlgMT.cxx index 3d6d9691e264..90555be8dd8a 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoAlgMT.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoAlgMT.cxx @@ -6,7 +6,7 @@ #include "TrigL2CaloHypoAlgMT.h" #include "DecisionHandling/HLTIdentifier.h" #include "DecisionHandling/TrigCompositeUtils.h" - +#include "AthViews/ViewHelper.h" using namespace TrigCompositeUtils; @@ -20,9 +20,9 @@ StatusCode TrigL2CaloHypoAlgMT::initialize() { ATH_MSG_INFO ( "Initializing " << name() << "..." ); - CHECK( m_hypoTools.retrieve() ); + ATH_CHECK( m_hypoTools.retrieve() ); - CHECK( m_clustersKey.initialize() ); + ATH_CHECK( m_clustersKey.initialize() ); renounce( m_clustersKey );// clusters are made in views, so they are not in the EvtStore: hide them return StatusCode::SUCCESS; @@ -74,18 +74,14 @@ StatusCode TrigL2CaloHypoAlgMT::execute_r( const EventContext& context ) const { for ( auto previousDecision: *previousDecisionsHandle ) { //get RoI auto roiEL = previousDecision->objectLink<TrigRoiDescriptorCollection>( "initialRoI" ); - CHECK( roiEL.isValid() ); + ATH_CHECK( roiEL.isValid() ); const TrigRoiDescriptor* roi = *roiEL; // get View auto viewEL = previousDecision->objectLink< ViewContainer >( "view" ); - CHECK( viewEL.isValid() ); - const SG::View* view_const = *viewEL; - SG::View* view = const_cast<SG::View*>(view_const); // CHECK THIS! - - // get clusters of that view - auto clusterHandle = SG::makeHandle( m_clustersKey, context ); - CHECK( clusterHandle.setProxyDict( view ) ); + ATH_CHECK( viewEL.isValid() ); + auto clusterHandle = ViewHelper::getHandleFromView( *viewEL, m_clustersKey, context); + ATH_CHECK( clusterHandle.isValid() ); ATH_MSG_DEBUG ( "Cluster handle size: " << clusterHandle->size() << "..." ); // create new decision @@ -95,14 +91,14 @@ StatusCode TrigL2CaloHypoAlgMT::execute_r( const EventContext& context ) const { toolInput.emplace_back( d, roi, clusterHandle.cptr()->at(0), previousDecision ); { - auto el = ElementLink<xAOD::TrigEMClusterContainer>( view->name()+"_"+clusterHandle.key(), 0 ); // 0 because there is only one obj in per-view collection - CHECK( el.isValid() ); + auto el = ViewHelper::makeLink( *viewEL, clusterHandle, 0 ); + ATH_CHECK( el.isValid() ); d->setObjectLink( "feature", el ); } d->setObjectLink( "roi", roiEL ); d->setObjectLink( "view", viewEL ); TrigCompositeUtils::linkToPrevious( d, decisionInput().key(), counter ); - ATH_MSG_DEBUG( "Added view, roi, cluster, previous decision to new decision "<<counter <<" for view "<<view->name() ); + ATH_MSG_DEBUG( "Added view, roi, cluster, previous decision to new decision " << counter << " for view " << (*viewEL)->name() ); counter++; } @@ -111,12 +107,12 @@ StatusCode TrigL2CaloHypoAlgMT::execute_r( const EventContext& context ) const { for ( auto& tool: m_hypoTools ) { - CHECK( tool->decide( toolInput ) ); + ATH_CHECK( tool->decide( toolInput ) ); } {// make output handle and debug auto outputHandle = SG::makeHandle(decisionOutput(), context); - CHECK( outputHandle.record( std::move( decisions ), std::move( aux ) ) ); + ATH_CHECK( outputHandle.record( std::move( decisions ), std::move( aux ) ) ); ATH_MSG_DEBUG ( "Exit with "<<outputHandle->size() <<" decisions"); TrigCompositeUtils::DecisionIDContainer allPassingIDs; if ( outputHandle.isValid() ) { diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlgMT.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlgMT.cxx index 98faa1bfc656..82021ec75e18 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlgMT.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlgMT.cxx @@ -4,7 +4,7 @@ #include <map> #include "GaudiKernel/Property.h" #include "TrigL2ElectronHypoAlgMT.h" - +#include "AthViews/ViewHelper.h" using TrigCompositeUtils::DecisionContainer; @@ -76,19 +76,16 @@ StatusCode TrigL2ElectronHypoAlgMT::execute_r( const EventContext& context ) con // get View auto viewEL = previousDecision->objectLink< ViewContainer >( "view" ); CHECK( viewEL.isValid() ); - const SG::View* view_const = *viewEL; - SG::View* view = const_cast<SG::View*>(view_const); // CHECK THIS! (checked with Scott in the past, will be fixed but low prio) // get electron from that view: size_t electronCounter = 0; - auto electronsHandle = SG::makeHandle( m_electronsKey, context ); - CHECK( electronsHandle.setProxyDict( view ) ); - CHECK( electronsHandle.isValid() ); + auto electronsHandle = ViewHelper::getHandleFromView( *viewEL, m_electronsKey, context ); + ATH_CHECK( electronsHandle.isValid() ); ATH_MSG_DEBUG ( "electron handle size: " << electronsHandle->size() << "..." ); for ( auto electronIter = electronsHandle->begin(); electronIter != electronsHandle->end(); ++electronIter, electronCounter++ ) { auto d = newDecisionIn( decisions.get() ); - d->setObjectLink( "feature", ElementLink<xAOD::TrigElectronContainer>( view->name()+"_"+m_electronsKey.key(), electronCounter ) ); + d->setObjectLink( "feature", ViewHelper::makeLink<xAOD::TrigElectronContainer>( *viewEL, electronsHandle, electronCounter ) ); auto clusterPtr = (*electronIter)->emCluster(); CHECK( clusterPtr != nullptr ); diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.cxx index a7390176200b..28f065d636b5 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.cxx @@ -4,7 +4,7 @@ #include "GaudiKernel/Property.h" #include "TrigL2PhotonHypoAlgMT.h" - +#include "AthViews/ViewHelper.h" @@ -25,9 +25,9 @@ StatusCode TrigL2PhotonHypoAlgMT::initialize() { ATH_MSG_INFO ( "Initializing " << name() << "..." ); - CHECK( m_hypoTools.retrieve() ); + ATH_CHECK( m_hypoTools.retrieve() ); - CHECK( m_photonsKey.initialize() ); + ATH_CHECK( m_photonsKey.initialize() ); renounce( m_photonsKey );// clusters are made in views, so they are not in the EvtStore: hide them return StatusCode::SUCCESS; @@ -72,26 +72,21 @@ StatusCode TrigL2PhotonHypoAlgMT::execute_r( const EventContext& context ) const for ( auto previousDecision: *previousDecisionsHandle ) { auto viewEL = previousDecision->objectLink< ViewContainer >( "view" ); - CHECK( viewEL.isValid() ); - const SG::View* view_const = *viewEL; - SG::View* view = const_cast<SG::View*>(view_const); // CHECK THIS! - // get View - - + ATH_CHECK( viewEL.isValid() ); // get electron from that view: size_t photonCounter = 0; - auto photonsHandle = SG::makeHandle( m_photonsKey, context ); - CHECK( photonsHandle.setProxyDict( view ) ); - CHECK( photonsHandle.isValid() ); + auto photonsHandle = ViewHelper::getHandleFromView( *viewEL, m_photonsKey, context ); + + ATH_CHECK( photonsHandle.isValid() ); ATH_MSG_DEBUG ( "electron handle size: " << photonsHandle->size() << "..." ); for ( auto photonIter = photonsHandle->begin(); photonIter != photonsHandle->end(); ++photonIter, photonCounter++ ) { auto d = newDecisionIn( decisions.get() ); - d->setObjectLink( "feature", ElementLink<xAOD::TrigPhotonContainer>( view->name()+"_"+m_photonsKey.key(), photonCounter ) ); + d->setObjectLink( "feature", ViewHelper::makeLink<xAOD::TrigPhotonContainer>( *viewEL, photonsHandle, photonCounter ) ); auto clusterPtr = (*photonIter)->emCluster(); - CHECK( clusterPtr != nullptr ); + ATH_CHECK( clusterPtr != nullptr ); // now find matching cluster // could use geometric matching but in fact the cluster owned by the decision object and the cluster owned by the photon should be the same @@ -115,7 +110,7 @@ StatusCode TrigL2PhotonHypoAlgMT::execute_r( const EventContext& context ) const } auto outputHandle = SG::makeHandle(decisionOutput(), context); - CHECK( outputHandle.record(std::move(decisions), std::move(aux) ) ); + ATH_CHECK( outputHandle.record(std::move(decisions), std::move(aux) ) ); ATH_MSG_DEBUG( "Exiting with "<< outputHandle->size() <<" decisions"); //debug -- GitLab From 01ed6f73a587ae739f221c8612151d06b79c9d4f Mon Sep 17 00:00:00 2001 From: Jovan Mitrevski <Jovan.Mitrevski@cern.ch> Date: Thu, 12 Jul 2018 16:14:11 +0200 Subject: [PATCH 442/562] Fix a bug in convEtOverPt formula Former-commit-id: 5c2c68bda591f6b1cf007ed3ece971bba329f10f --- .../egamma/egammaMVACalib/Root/egammaMVAFunctions.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Reconstruction/egamma/egammaMVACalib/Root/egammaMVAFunctions.cxx b/Reconstruction/egamma/egammaMVACalib/Root/egammaMVAFunctions.cxx index 6fc6cf4d4ea3..238957c92769 100644 --- a/Reconstruction/egamma/egammaMVACalib/Root/egammaMVAFunctions.cxx +++ b/Reconstruction/egamma/egammaMVACalib/Root/egammaMVAFunctions.cxx @@ -107,7 +107,7 @@ namespace egammaMVAFunctions float rv = 0.0; if (xAOD::EgammaHelpers::numberOfSiTracks(ph) == 2) { - rv = std::max(0.0f, compute_correctedcl_Eacc(*cl)/std::cosh(compute_cl_eta(*cl)*compute_ptconv(ph))); + rv = std::max(0.0f, compute_correctedcl_Eacc(*cl)/(std::cosh(compute_cl_eta(*cl))*compute_ptconv(ph))); } return std::min(rv, 2.0f); }; @@ -118,7 +118,7 @@ namespace egammaMVAFunctions float rv = 0.0; if (xAOD::EgammaHelpers::numberOfSiTracks(ph) == 2) { - rv = std::max(0.0f, compute_rawcl_Eacc(*cl)/std::cosh(compute_cl_eta(*cl)*compute_ptconv(ph))); + rv = std::max(0.0f, compute_rawcl_Eacc(*cl)/(std::cosh(compute_cl_eta(*cl))*compute_ptconv(ph))); } return std::min(rv, 2.0f); }; -- GitLab From 99dcd99af95e3a10604831b086769ef6b030d89c Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Thu, 12 Jul 2018 17:00:01 +0200 Subject: [PATCH 443/562] Solve coverity 14349, restoring ostream precision Former-commit-id: fd06142ed37225610190f60b055dda7b8b634d9e --- .../TRT_SeededSpacePointFinder_ATL.h | 9 +++-- .../src/TRT_SeededSpacePointFinder_ATL.cxx | 38 +++++++++---------- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/TRT_SeededSpacePointFinderTool/TRT_SeededSpacePointFinder_ATL.h b/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/TRT_SeededSpacePointFinderTool/TRT_SeededSpacePointFinder_ATL.h index a6c795c47875..b154c275e3f6 100755 --- a/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/TRT_SeededSpacePointFinderTool/TRT_SeededSpacePointFinder_ATL.h +++ b/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/TRT_SeededSpacePointFinderTool/TRT_SeededSpacePointFinder_ATL.h @@ -14,7 +14,7 @@ #ifndef TRT_SeededSpacePointFinder_ATL_H #define TRT_SeededSpacePointFinder_ATL_H -#include <list> + //Tool Handle // @@ -24,18 +24,21 @@ #include "TrkSpacePoint/SpacePointContainer.h" #include "TrkSpacePoint/SpacePointOverlapCollection.h" -#include "SiSpacePointsSeed/SiSpacePointsSeed.h" #include "InDetRecToolInterfaces/ITRT_SeededSpacePointFinder.h" #include "TrkGeometry/MagneticFieldProperties.h" #include "MagFieldInterfaces/IMagFieldSvc.h" +#include <list> +#include <vector> +#include <iosfwd> + class MsgStream ; class SCT_ID ; +class SiSpacePointsSeed; namespace Trk{ - //class IMagFieldSvc; class IPRD_AssociationTool; } diff --git a/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/src/TRT_SeededSpacePointFinder_ATL.cxx b/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/src/TRT_SeededSpacePointFinder_ATL.cxx index ed468dd4b14c..fa6e47bf9c8f 100755 --- a/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/src/TRT_SeededSpacePointFinder_ATL.cxx +++ b/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/src/TRT_SeededSpacePointFinder_ATL.cxx @@ -10,16 +10,14 @@ // Version 1.0 04/15/2006 T.Koffas /////////////////////////////////////////////////////////////////// -#include <iostream> -#include <iomanip> -#include <set> + #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/ServiceHandle.h" #include "GaudiKernel/ToolHandle.h" #include "CLHEP/Vector/ThreeVector.h" #include "TrkSpacePoint/SpacePointCLASS_DEF.h" #include "TRT_SeededSpacePointFinderTool/TRT_SeededSpacePointFinder_ATL.h" -//#include "TrkParameters/MeasuredAtaStraightLine.h" +#include "SiSpacePointsSeed/SiSpacePointsSeed.h" //Cluster collections // @@ -28,18 +26,16 @@ // #include "InDetIdentifier/SCT_ID.h" -//Magnetic field -// -//#include "TrkMagFieldInterfaces/IMagneticFieldTool.h" -//#include "TrkMagFieldUtils/MagneticFieldMapSolenoid.h" -//#include "MagFieldInterfaces/IMagFieldSvc.h" - //Association tool // #include "TrkToolInterfaces/IPRD_AssociationTool.h" #include "StoreGate/ReadHandle.h" +#include <ostream> +#include <iomanip> +#include <set> + using namespace std; /////////////////////////////////////////////////////////////////// @@ -507,39 +503,41 @@ MsgStream& InDet::TRT_SeededSpacePointFinder_ATL::dumpEvent( MsgStream& out ) co { const double pi2 = 2.*M_PI; out<<"|---------------------------------------------------------------------|" - <<std::endl; + <<"\n"; out<<"| m_ns | " <<std::setw(12)<<m_ns - <<" |"<<std::endl; + <<" |"<<"\n"; out<<"|---------------------------------------------------------------------|" - <<std::endl; + <<"\n"; if(msgLvl(MSG::DEBUG)) return out; out<<"|-------------|--------|-------|-------|-------|-------|-------|"; out<<"-------|-------|-------|-------|-------|-------|" - <<std::endl; + <<"\n"; out<<"| Azimuthal | n | z[ 0] | z[ 1] | z[ 2] | z[ 3] | z[4] |"; out<<" z[ 5] | z[ 6] | z[ 7] | z[ 8] | z[ 9] | z[10] |" - <<std::endl; + <<"\n"; out<<"|-------------|--------|-------|-------|-------|-------|-------|"; out<<"-------|-------|-------|-------|-------|-------|" - <<std::endl; + <<"\n"; double sF1 = pi2/double(m_fNmax+1); - StreamState restore_precision(cout); + //StreamState restore_precision(out); + auto prec(out.precision()); for(int f=0; f<=m_fNmax; ++f) { out<<"| " <<std::setw(10)<<std::setprecision(4)<<sF1*double(f)<<" | " <<std::setw(6)<<m_rf_map[f]<<" |"; - out<<std::endl; + out<<"\n"; } out<<"|-------------|--------|-------|-------|-------|-------|-------|"; out<<"-------|-------|-------|-------|-------|-------|" - <<std::endl; - out<<std::endl; + <<"\n"; + out<<endmsg; + out.precision(prec); return out; } -- GitLab From 0479a0292eda73d0275f0a6131c848f41cf5e3b1 Mon Sep 17 00:00:00 2001 From: Susumu Oda <Susumu.Oda@cern.ch> Date: Thu, 12 Jul 2018 17:12:19 +0200 Subject: [PATCH 444/562] Make most of methods const Former-commit-id: 3c280a76e5f688c775cc7ee33be8a02309c1e56c --- .../SCT_Cabling/SCT_Cabling/ISCT_FillCabling.h | 2 +- .../SCT_Cabling/src/SCT_FillCablingFromCoraCool.cxx | 6 +++--- .../SCT_Cabling/src/SCT_FillCablingFromCoraCool.h | 8 ++++---- .../SCT_Cabling/src/SCT_FillCablingFromText.cxx | 4 ++-- .../SCT_Cabling/src/SCT_FillCablingFromText.h | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/ISCT_FillCabling.h b/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/ISCT_FillCabling.h index dd5c17876afb..71a502a5f9ee 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/ISCT_FillCabling.h +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/ISCT_FillCabling.h @@ -50,7 +50,7 @@ class ISCT_FillCabling:virtual public IInterface{ /**Fill the cabling maps * @param[in] @c SCT_CablingSvc& , reference to the underlying data service */ - virtual StatusCode fillMaps(ISCT_CablingSvc* cabling) = 0; + virtual StatusCode fillMaps(ISCT_CablingSvc* cabling) const = 0; /**Report whether the map was filled * @return @c bool diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromCoraCool.cxx b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromCoraCool.cxx index 58aa6a0a2a0e..aea3c0a58b6a 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromCoraCool.cxx +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromCoraCool.cxx @@ -229,7 +229,7 @@ SCT_FillCablingFromCoraCool::filled() const { // StatusCode -SCT_FillCablingFromCoraCool::fillMaps(ISCT_CablingSvc* cabling) { +SCT_FillCablingFromCoraCool::fillMaps(ISCT_CablingSvc* cabling) const { m_filled=false; if (readDataFromDb(cabling).isFailure()) { ATH_MSG_FATAL("Could not read cabling from database"); @@ -241,7 +241,7 @@ SCT_FillCablingFromCoraCool::fillMaps(ISCT_CablingSvc* cabling) { // StatusCode -SCT_FillCablingFromCoraCool::readDataFromDb(ISCT_CablingSvc* cabling) { +SCT_FillCablingFromCoraCool::readDataFromDb(ISCT_CablingSvc* cabling) const { const SCT_ID* idHelper{nullptr}; if (m_detStore->retrieve(idHelper,"SCT_ID").isFailure()) { ATH_MSG_ERROR("SCT mgr failed to retrieve"); @@ -492,7 +492,7 @@ SCT_FillCablingFromCoraCool::readDataFromDb(ISCT_CablingSvc* cabling) { return (numEntries==0) ? (StatusCode::FAILURE) : (StatusCode::SUCCESS); } -bool SCT_FillCablingFromCoraCool::successfulFolderRetrieve(const DataHandle<CondAttrListVec>& pDataVec, const std::string& folderName) { +bool SCT_FillCablingFromCoraCool::successfulFolderRetrieve(const DataHandle<CondAttrListVec>& pDataVec, const std::string& folderName) const { if (!m_detStore) { ATH_MSG_FATAL("The detector store pointer is NULL"); return false; diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromCoraCool.h b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromCoraCool.h index b3750736407f..67ad66c88f9f 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromCoraCool.h +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromCoraCool.h @@ -66,7 +66,7 @@ public: /**Fill the cabling maps * @param[in] @c SCT_CablingSvc& , reference to the underlying data service */ - virtual StatusCode fillMaps(ISCT_CablingSvc* cabling); + virtual StatusCode fillMaps(ISCT_CablingSvc* cabling) const; /**Report whether the map was filled * @return @c bool @@ -79,13 +79,13 @@ public: virtual bool canFillDuringInitialize() const {return false;} private: //read from db - StatusCode readDataFromDb(ISCT_CablingSvc* cabling); + StatusCode readDataFromDb(ISCT_CablingSvc* cabling) const; //determine which folder to use; COMP200 style or CONDBR2 style std::string determineFolder(const std::string& option1, const std::string& option2) const; //retrieve a IOVDbSvc coracool dataset, give error message if it is empty or the pointer is zero - bool successfulFolderRetrieve(const DataHandle<CondAttrListVec>& pDataVec, const std::string& folderName); - bool m_filled; + bool successfulFolderRetrieve(const DataHandle<CondAttrListVec>& pDataVec, const std::string& folderName) const; + mutable bool m_filled; std::string m_source; ServiceHandle<StoreGateSvc> m_detStore; };//end of class diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromText.cxx b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromText.cxx index 9097dd884650..bf83553a95c7 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromText.cxx +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromText.cxx @@ -116,7 +116,7 @@ SCT_FillCablingFromText::filled() const { // StatusCode -SCT_FillCablingFromText::fillMaps(ISCT_CablingSvc* cabling) { +SCT_FillCablingFromText::fillMaps(ISCT_CablingSvc* cabling) const { if (readDataFromFile(cabling).isFailure()) { ATH_MSG_FATAL("Could not read cabling from file"); return StatusCode::FAILURE; @@ -127,7 +127,7 @@ SCT_FillCablingFromText::fillMaps(ISCT_CablingSvc* cabling) { // StatusCode -SCT_FillCablingFromText::readDataFromFile(ISCT_CablingSvc* cabling) { +SCT_FillCablingFromText::readDataFromFile(ISCT_CablingSvc* cabling) const { ServiceHandle<StoreGateSvc> detStore{"DetectorStore", name()}; if (detStore.retrieve().isFailure()) { ATH_MSG_FATAL("Detector service not found !"); diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromText.h b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromText.h index 640851a44b35..7e0a53e79e7b 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromText.h +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_FillCablingFromText.h @@ -59,7 +59,7 @@ class SCT_FillCablingFromText: virtual public ISCT_FillCabling, public AthServic /**Fill the cabling maps * @param[in] @c ISCT_CablingSvc& , reference to the underlying data service */ - virtual StatusCode fillMaps(ISCT_CablingSvc* cabling); + virtual StatusCode fillMaps(ISCT_CablingSvc* cabling) const; /**Report whether the map was filled * @return @c bool @@ -71,8 +71,8 @@ class SCT_FillCablingFromText: virtual public ISCT_FillCabling, public AthServic */ virtual bool canFillDuringInitialize() const {return true;} private: - StatusCode readDataFromFile(ISCT_CablingSvc* cabling); - bool m_filled; + StatusCode readDataFromFile(ISCT_CablingSvc* cabling) const; + mutable bool m_filled; std::string m_source; };//end of class -- GitLab From d2de1ef11d701bf4d303ad02c20b06843dd7059e Mon Sep 17 00:00:00 2001 From: Dan Andrei Ciubotaru <dan.andrei.ciubotaru@cern.ch> Date: Thu, 12 Jul 2018 16:54:24 +0000 Subject: [PATCH 445/562] MetaReader performance improvements Former-commit-id: 5e6132493f4661b659fbb3583642d62782be3695 --- .../EventTPCnv/EventStreamInfo_p3.h | 2 +- Tools/PyUtils/bin/meta-reader.py | 22 +- Tools/PyUtils/python/MetaReader.py | 797 ++++++++++-------- 3 files changed, 473 insertions(+), 348 deletions(-) diff --git a/Event/EventTPCnv/EventTPCnv/EventStreamInfo_p3.h b/Event/EventTPCnv/EventTPCnv/EventStreamInfo_p3.h index 2caf8e786586..ec731f5c09b2 100644 --- a/Event/EventTPCnv/EventTPCnv/EventStreamInfo_p3.h +++ b/Event/EventTPCnv/EventTPCnv/EventStreamInfo_p3.h @@ -36,7 +36,7 @@ friend class EventStreamInfoCnv_p3; friend class PoolFilePeeker; -private: +public: unsigned int m_numberOfEvents; // Number of Events std::vector<unsigned int> m_runNumbers; // Run# std::vector<unsigned int> m_lumiBlockNumbers; // LumiBlock# diff --git a/Tools/PyUtils/bin/meta-reader.py b/Tools/PyUtils/bin/meta-reader.py index c740f34fdef4..08801b5fb03b 100755 --- a/Tools/PyUtils/bin/meta-reader.py +++ b/Tools/PyUtils/bin/meta-reader.py @@ -14,7 +14,7 @@ msg = logging.getLogger('MetaReader') from PyUtils.MetaReader import read_metadata -def __tree_print(content, indent = 2, pad = 0, list_max_items = -1, dict_sort=None, ascii=False): +def _tree_print(content, indent = 2, pad = 0, list_max_items = -1, dict_sort=None, ascii=False): s = '' if isinstance(content, dict): @@ -45,7 +45,7 @@ def __tree_print(content, indent = 2, pad = 0, list_max_items = -1, dict_sort=No else: s += ('|' if not last else '`') + '-' * indent + ' ' + skey + ': ' - lines = __tree_print(value, indent=indent, pad = pad, dict_sort = dict_sort, list_max_items = list_max_items, ascii = ascii).split('\n') + lines = _tree_print(value, indent=indent, pad = pad, dict_sort = dict_sort, list_max_items = list_max_items, ascii = ascii).split('\n') if len(lines) == 1: s += lines[0] + '\n' @@ -75,7 +75,7 @@ def __tree_print(content, indent = 2, pad = 0, list_max_items = -1, dict_sort=No return s -def __main(): +def _main(): # Parsing the arguments provided by user parser = argparse.ArgumentParser(description='This script reads metadata from a given file') parser.add_argument('filenames', @@ -115,6 +115,13 @@ def __main(): type=str, choices=['POOL', 'BS'], help="The file type of the input filename. By default, it tries to determine itself the file type of the input.") + parser.add_argument('-f', + '--filter', + default= [], + metavar='FILTER', + nargs = '+', + type=str, + help="The metadata keys to filter. ") args = parser.parse_args() verbose = args.verbose @@ -124,6 +131,7 @@ def __main(): indent = args.indent mode = args.mode file_type = args.type + meta_key_filter = args.filter msg.setLevel(logging.INFO if verbose else logging.WARNING) # create a stream handler @@ -139,13 +147,13 @@ def __main(): msg.info('Imported headers in: {0} miliseconds'.format((time.time() - startTime) * 1e3)) msg.info('The output file is: {0}'.format(output)) - metadata = read_metadata(filenames, file_type, mode= mode) + metadata = read_metadata(filenames, file_type, mode= mode, meta_key_filter= meta_key_filter) if output is None: if is_json: print(json.dumps(metadata, indent= indent)) else: - print(__tree_print(metadata, indent= indent, pad= 18, dict_sort='key', list_max_items = 8)) + print(_tree_print(metadata, indent= indent, pad= 18, dict_sort='key', list_max_items = 8)) else: if is_json: @@ -153,12 +161,12 @@ def __main(): print >> fd, json.dumps(metadata, indent=indent) else: with open(output, 'w') as fd: - print >> fd, __tree_print(metadata, indent = indent, pad = 18, dict_sort = 'key', list_max_items = 8, ascii = True) + print >> fd, _tree_print(metadata, indent = indent, pad = 18, dict_sort = 'key', list_max_items = 8, ascii = True) msg.info('Done!') if __name__ == '__main__': - __main() + _main() diff --git a/Tools/PyUtils/python/MetaReader.py b/Tools/PyUtils/python/MetaReader.py index 186cd6550fda..93aabdd20a3b 100644 --- a/Tools/PyUtils/python/MetaReader.py +++ b/Tools/PyUtils/python/MetaReader.py @@ -1,366 +1,483 @@ -import os +import os, re import logging msg = logging.getLogger('MetaReader') -import re -import sys - -from PyCool import coral - - -def read_metadata(filenames, file_type=None, mode='lite'): - """ - This tool is independent of Athena framework and returns the metadata from a given file. - :param filenames: the input file from which metadata needs to be extracted. - :param file_type: the type of file. POOL or BS (bytestream: RAW, DRAW) files. - :param mode: if true, will return all metadata associated with the filename. By default, is false and this will - return a "lite" version which have only the following keys: 'file_guid', 'file_size', 'file_type', 'nentries'. - :return: a dictionary of metadata for the given input file. - """ - - # Check if the input is a file or a list of files. - if isinstance(filenames, basestring): - filenames = [filenames] - - # Check if fil_type is an allowed value - if file_type not in ('POOL', 'BS'): - raise NameError('Allowed values for \'file_type\' parameter are: \'POOL\' or \'BS\'') - else: - msg.info('Forced file_type: {0}'.format(file_type)) - - # Check the value of mode parameter - if mode not in ('tiny', 'lite', 'full'): - raise NameError('Allowed values for \'mode\' parameter are: \'tiny\', \'lite\' or \'full\'') - msg.info('Current mode used: {0}'.format(mode)) - # create the storage object for metadata. - metaDict = {} - - for filename in filenames: - current_file_type = None - # Determine the file type of the input. - if not file_type: - with open(filename, 'rb') as binary_file: - magic_file = binary_file.read(4) - - if magic_file == 'root': - current_file_type = 'POOL' - else: - current_file_type = 'BS' - else: - current_file_type = file_type - - metaDict[filename] = { - 'file_size': os.path.getsize(filename), - } - - # ----------------------------------------------------------------------------------------------------------------# - # retrieves metadata from POOL files. - if current_file_type == 'POOL': - import ROOT - from CLIDComps.clidGenerator import clidGenerator - global clidgen - clidgen = clidGenerator(db = None) - - evt = ROOT.POOL.TEvent() - evt.readFrom(filename) - evt.getEntry(0) - - # add the missing keys from the basis "tiny" metadata dictionary - metaDict[filename]['file_guid'] = __read_guid(filename), - metaDict[filename]['file_type'] = 'pool' - metaDict[filename]['nentries'] = evt.getEntries() - - - # if the flag is not set to tiny them it will retrieve more metadata - # ----------------------------------------------------------------------------------------------------------------# - if mode != 'tiny': - # this information is duplicated but is used with the AthFile - metaDict[filename]['file_name'] = filename - # create a container for class name and instance name for metadata_items - metaDict[filename]['metadata_items'] = list() - - # search for metadata only in these keys - name_filter = ['StreamAOD', '/TagInfo'] - - meta_data_srv = __convert_DataHeader(evt.retrieveMetaInput('DataHeader', ';00;MetaDataSvc')) - # fill metadata_items - metaDict[filename]['metadata_items'].append(('DataHeader', ';00;MetaDataSvc')) - - metadata = {} - for name, cls in meta_data_srv: - - if mode == 'lite' and name not in name_filter: - continue - try: - a = evt.retrieveMetaInput(cls, name) - except LookupError: - continue - - # fill metadata_items - metaDict[filename]['metadata_items'].append((cls, name)) - # print("{0} {1}".format(cls, name)) - - if cls == 'IOVMetaDataContainer': - metadata[name] = __convert_IOVMetaDataContainer(a) - if cls == 'xAOD::EventFormat': - metadata[name] = __convert_EventFormat(a) - if cls == 'EventStreamInfo': - metadata[name] = __convert_EventStreamInfo(a) - - - # Aggregate common information who needs to be promoted up one level - promote_list = { - 'EventStreamInfo': [ - ('RunNumbers', 'run_number'), - ('ProcessingTags', 'stream_names'), - ('LumiBlockNumbers', 'lumi_block'), - ('mc_event_number', 'evt_number'), - ('mc_channel_number', 'mc_channel_number'), - ('mc_event_weight', 'mc_event_weight'), - ('evt_type', 'evt_type'), - ('detdescr_tags', 'detdescr_tags'), - ], - 'IOVMetaDataContainer': [ - ('beam_energy', 'beam_energy'), - ('beam_type', 'beam_type'), - ('GeoAtlas', 'geometry'), - ('IOVDbGlobalTag', 'conditions_tag') - ] - } - - for cls, cls_name in metaDict[filename]['metadata_items']: - if cls in promote_list: - for name_orig, name_new in promote_list[cls]: - - if name_new not in metaDict[filename]: - metaDict[filename][name_new] = [] - - if name_orig in metadata[cls_name]: - - value = metadata[cls_name][name_orig] - - if isinstance(value, (list, tuple)): - metaDict[filename][name_new] += value - else: - metaDict[filename][name_new].append(value) - - if mode == 'full': - metaDict[filename]['metadata'] = metadata - else: - metaDict[filename]['metadata'] = list(metadata.keys()) - - # ----------------------------------------------------------------------------------------------------------------# - # retrieves metadata from bytestream (BS) files (RAW, DRAW) - elif current_file_type == 'BS': - import eformat - - # store the file_type of the input filename - metaDict[filename]['file_type'] = 'bs' - - # store the number of entries - bs = eformat.istream(filename) - metaDict[filename]['nentries'] = bs.total_events - - # store the 'guid' value - data_reader = eformat.EventStorage.pickDataReader(filename) - assert data_reader, 'problem picking a data reader for file [%s]' % filename - - if hasattr(data_reader, 'GUID'): - metaDict[filename]['file_guid'] = getattr(data_reader, 'GUID')() - - # if the flag full is set to true then grab all metadata - # ----------------------------------------------------------------------------------------------------------------# - if mode != "tiny": - bs_metadata = {} - - for md in data_reader.freeMetaDataStrings(): - if md.startswith('Event type:'): - k = 'evt_type' - v = [] - if 'is sim' in md: - v.append('IS_SIMULATION') - else: - v.append('IS_DATA') - - if 'is atlas' in md: - v.append('IS_ATLAS') - else: - v.append('IS_TESTBEAM') - - if 'is physics' in md: - v.append('IS_PHYSICS') - else: - v.append('IS_CALIBRATION') - - bs_metadata[k] = tuple(v) - - elif md.startswith('GeoAtlas:'): - k = 'geometry' - v = md.split('GeoAtlas:')[1].strip() - bs_metadata[k] = v - - elif md.startswith('IOVDbGlobalTag:'): - k = 'conditions_tag' - v = md.split('IOVDbGlobalTag:')[1].strip() - bs_metadata[k] = v - - elif '=' in md: - k, v = md.split('=') - bs_metadata[k] = v - - - bs_metadata['runNumber'] = getattr(data_reader, 'runNumber')() - bs_metadata['lumiblockNumber'] = getattr(data_reader, 'lumiblockNumber')() - bs_metadata['projectTag'] = getattr(data_reader, 'projectTag')() - bs_metadata['stream'] = getattr(data_reader, 'stream')() - bs_metadata['beamType'] = getattr(data_reader, 'beamType')() - bs_metadata['beamEnergy'] = getattr(data_reader, 'beamEnergy')() - - metaDict[filename]['evt_type'] = bs_metadata.get('evt_type', []) - metaDict[filename]['geometry'] = bs_metadata.get('geometry', None) - metaDict[filename]['conditions_tag'] = bs_metadata.get('conditions_tag', None) - - # Promote up one level - metaDict[filename]['run_number'] = [bs_metadata.get('runNumber', None)] - metaDict[filename]['lumi_block'] = [bs_metadata.get('lumiblockNumber', None)] - metaDict[filename]['beam_type'] = [bs_metadata.get('beamType', None)] - metaDict[filename]['beam_energy'] = [bs_metadata.get('beamEnergy', None)] - - if not data_reader.good(): - # event-less file... - metaDict[filename]['run_number'].append(bs_metadata.get('run_number', 0)) - metaDict[filename]['lumi_block'].append(bs_metadata.get('LumiBlock', 0)) +def read_metadata(filenames, file_type=None, mode='lite', meta_key_filter= []): + """ + This tool is independent of Athena framework and returns the metadata from a given file. + :param filenames: the input file from which metadata needs to be extracted. + :param file_type: the type of file. POOL or BS (bytestream: RAW, DRAW) files. + :param mode: if true, will return all metadata associated with the filename. By default, is false and this will + return a "tiny" version which have only the following keys: 'file_guid', 'file_size', 'file_type', 'nentries'. + :return: a dictionary of metadata for the given input file. + """ + + # Check if the input is a file or a list of files. + if isinstance(filenames, basestring): + filenames = [filenames] + + # Check if file_type is an allowed value + if file_type is not None: + if file_type not in ('POOL', 'BS'): + raise NameError('Allowed values for \'file_type\' parameter are: \'POOL\' or \'BS\': you provided "' + file_type + '"' ) + else: + msg.info('Forced file_type: {0}'.format(file_type)) + + # Check the value of mode parameter + if mode not in ('tiny', 'lite', 'full'): + raise NameError('Allowed values for \'mode\' parameter are: \'tiny\', \'lite\' or \'full\'') + msg.info('Current mode used: {0}'.format(mode)) + + if mode != 'full' and len(meta_key_filter) > 0: + raise NameError('It is possible to use the meta_key_filter option only for full mode') + if len(meta_key_filter) > 0: + msg.info('Filter used: {0}'.format(meta_key_filter)) + + # create the storage object for metadata. + meta_dict = {} + + # ----- retrieve metadata from all filename or filenames --------------------------------------------------------# + for filename in filenames: + meta_dict[filename] = {} + current_file_type = None + # Determine the file_type of the input and store this information into meta_dict + if not file_type: + with open(filename, 'rb') as binary_file: + magic_file = binary_file.read(4) + + if magic_file == 'root': + current_file_type = 'POOL' + meta_dict[filename]['file_type'] = 'POOL' + + else: + current_file_type = 'BS' + meta_dict[filename]['file_type'] = 'BS' + + else: + current_file_type = file_type + + # add information about the file_size of the input filename + meta_dict[filename]['file_size'] = os.path.getsize(filename) + + # ----- retrieves metadata from POOL files ------------------------------------------------------------------# + if current_file_type == 'POOL': + import ROOT + # open the file using ROOT.TFile + current_file = ROOT.TFile(filename) + + # open the tree 'POOLContainer' to read the number of entries + meta_dict[filename]['nentries'] = current_file.Get('POOLContainer').GetEntriesFast() + + # read and add the 'GUID' value + meta_dict[filename]['file_guid'] = _read_guid(filename) + + # ----- read extra metadata required for 'lite' and 'full' modes ----------------------------------------# + if mode != 'tiny': + # selecting from all tree the only one which contains metadata, respectively "MetaData" + metadata_tree = current_file.Get('MetaData') + # read all list of branches stored in "MetaData" tree + metadata_branches = metadata_tree.GetListOfBranches() + nr_of_branches = metadata_branches.GetEntriesFast() + + # object to store the names of metadata containers and their corresponding class name. + meta_dict[filename]['metadata_items'] = {} + + # create a container for the list of filters used for the lite version + meta_filter = [] + # set the filters for name + if mode == 'lite': + meta_filter = ['StreamAOD', 'EventStreamInfo_p3_StreamRDO', '_TagInfo'] + if mode == 'full' and len(meta_key_filter) > 0: + meta_filter = [f.replace('/', '_') for f in meta_key_filter] + # store all persistent classes for metadata container existing in a POOL/ROOT file. + persistent_instances = {} + + for i in range(0, nr_of_branches): + branch = metadata_branches.At(i) + name = branch.GetName() + + class_name = branch.GetClassName() + + # fill the meta_dict with the name and the class_name of the object with metadata. + # If the class name is IOVMetaDataContainer, replace the name of metadata container with + # the name from 'folderName". All of this is done for consistency. ex. '_TagInfo' becomes '/TagInfo' + meta_dict[filename]['metadata_items'][name.replace('_', '/')] = class_name + + if len(meta_filter) > 0: + if name not in meta_filter: + continue + + # assign the corresponding persistent class based of the name of the metadata container + if class_name == 'EventStreamInfo_p3': + persistent_instances[name] = ROOT.EventStreamInfo_p3() + elif class_name == 'IOVMetaDataContainer_p1': + persistent_instances[name] = ROOT.IOVMetaDataContainer_p1() + elif class_name == 'xAOD::EventFormat_v1': + persistent_instances[name] = ROOT.xAOD.EventFormat_v1() + + if name in persistent_instances: + branch.SetAddress(ROOT.AddressOf(persistent_instances[name])) + + metadata_tree.GetEntry(0) + + # clean the meta-dict if the meta_key_filter flag is used, to return only the key of interest + if len(meta_key_filter) > 0: + meta_dict[filename] = {} + + # read the metadata + for name, content in persistent_instances.items(): + key = name + + if hasattr(content, 'm_folderName'): + key = getattr(content, 'm_folderName') + + meta_dict[filename][key] = _convert_value(content) + + + # Filter the data and create a prettier output for the 'lite' mode + if mode == 'lite': + meta_dict = make_lite(meta_dict) + + # ----- retrieves metadata from bytestream (BS) files (RAW, DRAW) ------------------------------------------# + elif current_file_type == 'BS': + import eformat + + # store the number of entries + bs = eformat.istream(filename) + meta_dict[filename]['nentries'] = bs.total_events + + # store the 'guid' value + data_reader = eformat.EventStorage.pickDataReader(filename) + assert data_reader, 'problem picking a data reader for file [%s]' % filename + + if hasattr(data_reader, 'GUID'): + meta_dict[filename]['file_guid'] = getattr(data_reader, 'GUID')() + + # if the flag full is set to true then grab all metadata + # ------------------------------------------------------------------------------------------------------# + if mode != "tiny": + bs_metadata = {} + + for md in data_reader.freeMetaDataStrings(): + if md.startswith('Event type:'): + k = 'evt_type' + v = [] + if 'is sim' in md: + v.append('IS_SIMULATION') + else: + v.append('IS_DATA') + + if 'is atlas' in md: + v.append('IS_ATLAS') + else: + v.append('IS_TESTBEAM') + + if 'is physics' in md: + v.append('IS_PHYSICS') + else: + v.append('IS_CALIBRATION') + + bs_metadata[k] = tuple(v) + + elif md.startswith('GeoAtlas:'): + k = 'geometry' + v = md.split('GeoAtlas:')[1].strip() + bs_metadata[k] = v + + elif md.startswith('IOVDbGlobalTag:'): + k = 'conditions_tag' + v = md.split('IOVDbGlobalTag:')[1].strip() + bs_metadata[k] = v + + elif '=' in md: + k, v = md.split('=') + bs_metadata[k] = v + + bs_metadata['runNumber'] = getattr(data_reader, 'runNumber')() + bs_metadata['lumiblockNumber'] = getattr(data_reader, 'lumiblockNumber')() + bs_metadata['projectTag'] = getattr(data_reader, 'projectTag')() + bs_metadata['stream'] = getattr(data_reader, 'stream')() + bs_metadata['beamType'] = getattr(data_reader, 'beamType')() + bs_metadata['beamEnergy'] = getattr(data_reader, 'beamEnergy')() + + meta_dict[filename]['evt_type'] = bs_metadata.get('evt_type', []) + meta_dict[filename]['geometry'] = bs_metadata.get('geometry', None) + meta_dict[filename]['conditions_tag'] = bs_metadata.get('conditions_tag', None) + + # Promote up one level + meta_dict[filename]['run_number'] = [bs_metadata.get('runNumber', None)] + meta_dict[filename]['lumi_block'] = [bs_metadata.get('lumiblockNumber', None)] + meta_dict[filename]['beam_type'] = [bs_metadata.get('beamType', None)] + meta_dict[filename]['beam_energy'] = [bs_metadata.get('beamEnergy', None)] + + if not data_reader.good(): + # event-less file... + meta_dict[filename]['run_number'].append(bs_metadata.get('run_number', 0)) + meta_dict[filename]['lumi_block'].append(bs_metadata.get('LumiBlock', 0)) + + ievt = iter(bs) + evt = ievt.next() + evt.check() # may raise a RuntimeError + stream_tags = [dict(stream_type = tag.type, stream_name = tag.name, obeys_lbk = bool(tag.obeys_lumiblock)) for tag in evt.stream_tag()] + meta_dict[filename]['stream_tags'] = stream_tags + meta_dict[filename]['evt_number'] = [evt.global_id()] + meta_dict[filename]['run_type'] = [eformat.helper.run_type2string(evt.run_type())] + + # fix for ATEAM-122 + if len(bs_metadata.get('evt_type', '')) == 0: # see: ATMETADATA-6 + evt_type = ['IS_DATA', 'IS_ATLAS'] + if bs_metadata.get('stream', '').startswith('physics_'): + evt_type.append('IS_PHYSICS') + elif bs_metadata.get('stream', '').startswith('calibration_'): + evt_type.append('IS_CALIBRATION') + elif bs_metadata.get('projectTag', '').endswith('_calib'): + evt_type.append('IS_CALIBRATION') + else: + evt_type.append('Unknown') + + meta_dict[filename]['evt_type'] = evt_type + + if mode == 'full': + meta_dict[filename]['bs_metadata'] = bs_metadata + + # ------ Throw an error if the user provide other file types -------------------------------------------------# + else: + msg.error('Unknown filetype for {0} - there is no metadata interface for type {1}'.format(filename, current_file_type)) + return None + + return meta_dict - ievt = iter(bs) - evt = ievt.next() - evt.check() # may raise a RuntimeError - stream_tags = [dict(stream_type = tag.type, stream_name = tag.name, obeys_lbk = bool(tag.obeys_lumiblock)) for tag in evt.stream_tag()] - metaDict[filename]['stream_tags'] = stream_tags - metaDict[filename]['evt_number'] = [evt.global_id()] - metaDict[filename]['run_type'] = [eformat.helper.run_type2string(evt.run_type())] - - - # fix for ATEAM-122 - if len(bs_metadata.get('evt_type', '')) == 0: # see: ATMETADATA-6 - evt_type = ['IS_DATA', 'IS_ATLAS'] - if bs_metadata.get('stream', '').startswith('physics_'): - evt_type.append('IS_PHYSICS') - elif bs_metadata.get('stream', '').startswith('calibration_'): - evt_type.append('IS_CALIBRATION') - elif bs_metadata.get('projectTag', '').endswith('_calib'): - evt_type.append('IS_CALIBRATION') - else: - evt_type.append('Unknown') - - metaDict[filename]['evt_type'] = evt_type - - - if mode == 'full': - metaDict[filename]['bs_metadata'] = bs_metadata - - - # ----------------------------------------------------------------------------------------------------------------# - # Thow an error if the user provide other file types - else: - msg.error('Unknown filetype for {0} - there is no metadata interface for type {1}'.format(filename, current_file_type)) - return None - - return metaDict - -# Methods for POOL -def __convert_EventStreamInfo(esi): - d = {} - d['RunNumbers'] = list(esi.getRunNumbers()) - d['ProcessingTags'] = list(esi.getProcessingTags()) - d['LumiBlockNumbers'] = list(esi.getLumiBlockNumbers()) - d['mc_event_number'] = list() - d['mc_channel_number'] = list() - d['mc_event_weight'] = list() - d['evt_type'] = list() - d['detdescr_tags'] = list() - for evt_type in esi.getEventTypes(): - d['mc_event_number'].append(evt_type.mc_event_number()) - d['mc_channel_number'].append(evt_type.mc_channel_number()) - d['mc_event_weight'].append(evt_type.mc_event_weight()) - d['detdescr_tags'].append(evt_type.get_detdescr_tags()) +# Currently not used +# def _md5(fname, block_size=2**20, do_fast_md5=True): +# import hashlib +# # do_fast_md5 is for compatibility with AthFile. +# # -- Sebastian Liem +# hash_md5 = hashlib.md5() +# with open(fname, 'rb') as f: +# for chunk in iter(lambda: f.read(block_size), b''): +# hash_md5.update(chunk) +# if do_fast_md5: +# break +# return hash_md5.hexdigest() - d['evt_type'].append('IS_SIMULATION' if evt_type.test(evt_type.IS_SIMULATION) else 'IS_DATA') - d['evt_type'].append('IS_TESTBEAM' if evt_type.test(evt_type.IS_TESTBEAM) else 'IS_ATLAS') - d['evt_type'].append('IS_CALIBRATION' if evt_type.test(evt_type.IS_CALIBRATION) else 'IS_PHYSICS') - d['eventdata_items'] = [] - for e in esi.getItemList(): - clid_name = clidgen.getNameFromClid(e.first) - if clid_name: - d['eventdata_items'].append((clid_name, e.second)) - else: - msg.info('Unable to find a name for clid {0} with value {1}.'.format(e.first, e.second)) - d['eventdata_items'].append(('clid_{0}'.format(e.first), e.second)) +def _read_guid(filename): + """ + Extracts the "guid" (Globally Unique Identfier in POOL files and Grid catalogs) value from a POOL file. + :param filename: the input file + :return: the guid value + """ + import ROOT + root_file = ROOT.TFile(filename) + params = root_file.Get('##Params') - return d + regex = re.compile(r'^\[NAME\=([a-zA-Z0-9\_]+)\]\[VALUE\=(.*)\]') + for i in range(params.GetEntries()): + params.GetEntry(i) + param = params.db_string -def __convert_IOVMetaDataContainer(iovmetadata): - data = {} + result = regex.match(param) + if result: + name = result.group(1) + value = result.group(2) - for cond_attr_list_collection in iovmetadata.payloadContainer(): + if name == 'FID': + return value - for pair_attr_list in cond_attr_list_collection: - # i = pair_attr_list.first - attr_list = pair_attr_list.second - spec = attr_list.specification() + return None - for i in range(len(spec)): - # print("{0}: {1} ({2})".format(spec[i].name(), attr_list[i], spec[i].typeName())) - data[spec[i].name()] = attr_list[i] - return data +def _extract_fields(obj): + result = {} + for meth in dir(obj): + if not meth.startswith('_'): + if meth.startswith('m_'): -def __convert_EventFormat(evfmt): - return [(e.first, e.second.className()) for e in evfmt] + field_name = str(meth)[2:] + field_value = getattr(obj, meth) + result[field_name] = _convert_value(field_value) -def __convert_DataHeader(dataHeader): - return [ (x.getKey(), clidgen.getNameFromClid(x.getPrimaryClassID())) for x in dataHeader] + return result -# Currently not used -# def __md5(fname, block_size=2**20, do_fast_md5=True): -# import hashlib -# # do_fast_md5 is for compatibility with AthFile. -# # -- Sebastian Liem -# hash_md5 = hashlib.md5() -# with open(fname, 'rb') as f: -# for chunk in iter(lambda: f.read(block_size), b''): -# hash_md5.update(chunk) -# if do_fast_md5: -# break -# return hash_md5.hexdigest() -def __read_guid(filename): - """ - Extracts the "guid" (Globally Unique Identfier in POOL files and Grid catalogs) value from a POOL file. - :param filename: the input file - :return: the guid value - """ - import ROOT +# compile the regex needed in _convert_value() outside it to optimize the code. +regex_cppname = re.compile(r'^([\w:]+)(<.*>)?$') +regex_persistent_class = re.compile(r'^([a-zA-Z]+_p\d+::)*[a-zA-Z]+_p\d+$') + + +def _convert_value(value): + if hasattr(value, '__cppname__'): + + result = regex_cppname.match(value.__cppname__) + + if result: + cpp_type = result.group(1) + if cpp_type == 'vector': + return [_convert_value(val) for val in value] + + elif cpp_type == 'pair': + return _convert_value(value.first), _convert_value(value.second) + + # elif cpp_type == 'long': + # return int(value) + + elif value.__cppname__ == "_Bit_reference": + return bool(value) + + # special case which extracts data in a better format from IOVPayloadContainer_p1 class + elif value.__cppname__ == 'IOVMetaDataContainer_p1': + return _extract_fields_iovmdc(value) + + elif value.__cppname__ == 'IOVPayloadContainer_p1': + return _extract_fields_iovpc(value) + + elif value.__cppname__ == 'xAOD::EventFormat_v1': + return _extract_fields_ef(value) + + elif value.__cppname__ == 'EventType_p3': + return _convert_event_type_bitmask( _extract_fields(value)) + + elif regex_persistent_class.match(value.__cppname__): + return _extract_fields(value) + + return value + + +def _extract_fields_iovmdc(value): + return _convert_value(value.m_payload) + - root_file = ROOT.TFile(filename) - params = root_file.Get('##Params') +def _extract_fields_iovpc(value): + result = {} - regex = re.compile(r'^\[NAME\=([a-zA-Z0-9\_]+)\]\[VALUE\=(.*)\]') + for attr_idx in value.m_attrIndexes: + name_idx = attr_idx.nameIndex() + type_idx = attr_idx.typeIndex() + obj_idx = attr_idx.objIndex() - for i in range(params.GetEntries()): - params.GetEntry(i) - param = params.db_string + attr_name = value.m_attrName[name_idx] + attr_value = None - result = regex.match(param) - if result: - name = result.group(1) - value = result.group(2) + if type_idx == 0: + attr_value = bool(value.m_bool[obj_idx]) + elif type_idx == 1: + attr_value = int(value.m_char[obj_idx]) + elif type_idx == 2: + attr_value = int(value.m_unsignedChar[obj_idx]) + elif type_idx == 3: + attr_value = int(value.m_short[obj_idx]) + elif type_idx == 4: + attr_value = int(value.m_unsignedShort[obj_idx]) + elif type_idx == 5: + attr_value = int(value.m_int[obj_idx]) + elif type_idx == 6: + attr_value = int(value.m_unsignedInt[obj_idx]) + elif type_idx == 7: + attr_value = int(value.m_long[obj_idx]) + elif type_idx == 8: + attr_value = int(value.m_unsignedLong[obj_idx]) + elif type_idx == 9: + attr_value = long(value.m_longLong[obj_idx]) + elif type_idx == 10: + attr_value = long(value.m_unsignedLongLong[obj_idx]) + elif type_idx == 11: + attr_value = float(value.m_float[obj_idx]) + elif type_idx == 12: + attr_value = float(value.m_double[obj_idx]) + elif type_idx == 13: + # skipping this type because is file IOVPayloadContainer_p1.h (line 120) is commented and not considered + pass + elif type_idx == 14: + attr_value = str(value.m_string[obj_idx]) + elif type_idx == 15: + attr_value = long(value.m_date[obj_idx]) + elif type_idx == 16: + attr_value = long(value.m_timeStamp[obj_idx]) + else: + raise ValueError('Unknown type id {0} for attribute {1}'.format(type_idx, attr_name)) - if name == 'FID': - return value + if attr_name not in result: + result[attr_name] = [] + result[attr_name].append(attr_value) - return None \ No newline at end of file + max_element_count = 0 + for name, content in result.items(): + if len(content) > max_element_count: + max_element_count = len(content) + + if max_element_count <= 1: + for name, content in result.items(): + if len(content) > 0: + result[name] = content[0] + else: + result[name] = None + + return result + + +def _extract_fields_ef(value): + result = {} + + for ef_element in value: + result[ef_element.first] = ef_element.second.className() + + return result + + +def _convert_event_type_bitmask(value): + + types = None + for key in value: + if key == 'bit_mask': + val = value[key] + + bitmask_lenght = len(val) + + is_simulation = False + is_testbeam = False + is_calibration = False + + if bitmask_lenght > 0: # ROOT.EventType.IS_SIMULATION + is_simulation = val[0] + + if bitmask_lenght > 1: # ROOT.EventType.IS_TESTBEAM + is_testbeam = val[1] + + if bitmask_lenght > 2: # ROOT.EventType.IS_CALIBRATION: + is_calibration = val[2] + + types = [ + 'IS_SIMULATION' if is_simulation else 'IS_DATA', + 'IS_TESTBEAM' if is_testbeam else 'IS_ATLAS', + 'IS_CALIBRATION' if is_calibration else 'IS_PHYSICS' + ] + + value['type'] = types + + return value + + +def make_lite(meta_dict): + for filename, file_content in meta_dict.items(): + key_list = ['StreamAOD', 'EventStreamInfo_p3_StreamRDO'] + for key in key_list: + if key in file_content and len(meta_dict[filename][key]) > 0: + meta_dict[filename]['lumi_block'] = meta_dict[filename][key]['lumiBlockNumbers'] + meta_dict[filename]['run_number'] = meta_dict[filename][key]['runNumbers'] + meta_dict[filename]['mc_event_number'] = meta_dict[filename][key]['eventTypes'][0]['mc_event_number'] + meta_dict[filename]['mc_channel_number'] = meta_dict[filename][key]['eventTypes'][0]['mc_channel_number'] + meta_dict[filename]['event_types'] = meta_dict[filename][key]['eventTypes'][0]['type'] + meta_dict[filename].pop(key) + + if '/TagInfo' in file_content: + meta_dict[filename]['beam_energy'] = float(meta_dict[filename]['/TagInfo']['beam_energy']) + meta_dict[filename]['beam_type'] = meta_dict[filename]['/TagInfo']['beam_type'] + meta_dict[filename]['geometry'] = meta_dict[filename]['/TagInfo']['GeoAtlas'] + meta_dict[filename]['conditions_tag'] = meta_dict[filename]['/TagInfo']['IOVDbGlobalTag'] + meta_dict[filename].pop('/TagInfo') + + return meta_dict -- GitLab From 2e60a26f4dc1b78ac376d93e663c27246a403424 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Thu, 12 Jul 2018 21:34:05 +0200 Subject: [PATCH 446/562] Fix for coverity 113553, 113590 by defaulting move assignment Former-commit-id: 31cfe50e6b3bbd8d2cf5d0fce69c188f3068edd4 --- InnerDetector/InDetSimEvent/InDetSimEvent/SiHit.h | 11 +++++++---- .../InDetSimEvent/InDetSimEvent/TRTUncompressedHit.h | 7 +++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/InnerDetector/InDetSimEvent/InDetSimEvent/SiHit.h b/InnerDetector/InDetSimEvent/InDetSimEvent/SiHit.h index b00a10afe83b..15acd0616814 100755 --- a/InnerDetector/InDetSimEvent/InDetSimEvent/SiHit.h +++ b/InnerDetector/InDetSimEvent/InDetSimEvent/SiHit.h @@ -12,7 +12,6 @@ #ifndef INDETSIMEVENT_SIHIT_H #define INDETSIMEVENT_SIHIT_H -#include <iostream> // Data members classes #include "CLHEP/Geometry/Point3D.h" #include "GeneratorObjects/HepMcParticleLink.h" @@ -69,6 +68,13 @@ public: // Destructor: virtual ~SiHit(); //temporary make it virtual for Pool! + + //move assignment defaulted + SiHit & operator = (SiHit &&) = default; + //assignment defaulted + SiHit & operator = (const SiHit &) = default; + //copy c'tor defaulted + SiHit(const SiHit &) = default; /////////////////////////////////////////////////////////////////// // Const methods: @@ -137,14 +143,11 @@ public: /////////////////////////////////////////////////////////////////// private: - // HepGeom::Point3D<double> m_localStartPosition; // local start position of the hit - // HepGeom::Point3D<double> m_localEndPosition; // local end position of the hit float m_stX, m_stY, m_stZ; float m_enX, m_enY, m_enZ; float m_energyLoss; // deposited energy float m_meanTime; // time of energy deposition HepMcParticleLink m_partLink; - // int m_trackNumber; // number of track which released this energy unsigned int m_ID; public: enum diff --git a/InnerDetector/InDetSimEvent/InDetSimEvent/TRTUncompressedHit.h b/InnerDetector/InDetSimEvent/InDetSimEvent/TRTUncompressedHit.h index ca6c7ab1c178..3b22798c5846 100755 --- a/InnerDetector/InDetSimEvent/InDetSimEvent/TRTUncompressedHit.h +++ b/InnerDetector/InDetSimEvent/InDetSimEvent/TRTUncompressedHit.h @@ -26,6 +26,13 @@ public: // Destructor: FIXME POOL inline virtual ~TRTUncompressedHit() {}; + + //copy c'tor defaulted + TRTUncompressedHit(const TRTUncompressedHit &) = default; + //assignment defaulted + TRTUncompressedHit & operator = (const TRTUncompressedHit &) =default; + //move assignment defaulted + TRTUncompressedHit & operator = (TRTUncompressedHit &&) = default; bool operator < (const TRTUncompressedHit& obj) const {return m_hitID < obj.m_hitID;} -- GitLab From e6a6ef0ae83ec06c8a10e1e27a49eb98a8bc347b Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Thu, 12 Jul 2018 21:49:07 +0200 Subject: [PATCH 447/562] Used simpler name for handle maker algorithm suited for views Former-commit-id: b370892d3060538f8acec9937842f3b08598b681 --- Control/AthViews/AthViews/ViewHelper.h | 2 +- .../TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoAlgMT.cxx | 2 +- .../TrigEgammaHypo/src/TrigL2ElectronHypoAlgMT.cxx | 2 +- .../TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.cxx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Control/AthViews/AthViews/ViewHelper.h b/Control/AthViews/AthViews/ViewHelper.h index 46e578ddfb0c..5c94284b84fd 100644 --- a/Control/AthViews/AthViews/ViewHelper.h +++ b/Control/AthViews/AthViews/ViewHelper.h @@ -304,7 +304,7 @@ namespace ViewHelper template<typename T> - SG::ReadHandle<T> getHandleFromView( const SG::View* view , const SG::ReadHandleKey<T>& rhKey, const EventContext& context ) { + SG::ReadHandle<T> makeHandle( const SG::View* view , const SG::ReadHandleKey<T>& rhKey, const EventContext& context ) { SG::View* nview = const_cast<SG::View*>(view); // we need it until reading from const IProxyDict is not supported diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoAlgMT.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoAlgMT.cxx index 90555be8dd8a..5e2bc0c256b7 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoAlgMT.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoAlgMT.cxx @@ -80,7 +80,7 @@ StatusCode TrigL2CaloHypoAlgMT::execute_r( const EventContext& context ) const { // get View auto viewEL = previousDecision->objectLink< ViewContainer >( "view" ); ATH_CHECK( viewEL.isValid() ); - auto clusterHandle = ViewHelper::getHandleFromView( *viewEL, m_clustersKey, context); + auto clusterHandle = ViewHelper::makeHandle( *viewEL, m_clustersKey, context); ATH_CHECK( clusterHandle.isValid() ); ATH_MSG_DEBUG ( "Cluster handle size: " << clusterHandle->size() << "..." ); diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlgMT.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlgMT.cxx index 82021ec75e18..469cf31e596e 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlgMT.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlgMT.cxx @@ -79,7 +79,7 @@ StatusCode TrigL2ElectronHypoAlgMT::execute_r( const EventContext& context ) con // get electron from that view: size_t electronCounter = 0; - auto electronsHandle = ViewHelper::getHandleFromView( *viewEL, m_electronsKey, context ); + auto electronsHandle = ViewHelper::makeHandle( *viewEL, m_electronsKey, context ); ATH_CHECK( electronsHandle.isValid() ); ATH_MSG_DEBUG ( "electron handle size: " << electronsHandle->size() << "..." ); diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.cxx index 28f065d636b5..9533820d92a1 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2PhotonHypoAlgMT.cxx @@ -76,7 +76,7 @@ StatusCode TrigL2PhotonHypoAlgMT::execute_r( const EventContext& context ) const // get electron from that view: size_t photonCounter = 0; - auto photonsHandle = ViewHelper::getHandleFromView( *viewEL, m_photonsKey, context ); + auto photonsHandle = ViewHelper::makeHandle( *viewEL, m_photonsKey, context ); ATH_CHECK( photonsHandle.isValid() ); ATH_MSG_DEBUG ( "electron handle size: " << photonsHandle->size() << "..." ); -- GitLab From 1bcc7708967f7493fafb70ce25ef70a1b481669f Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Tue, 10 Jul 2018 19:59:42 +0200 Subject: [PATCH 448/562] xAODCore: Enable shallow copy tests in non-standalone builds. Get the shallow copy unit test running in non-standalone builds. Add tests for passing the parent link directly to the ctor. Former-commit-id: 2923eb90930a20b07b67589ecf91f094f76a007f --- Event/xAOD/xAODCore/CMakeLists.txt | 8 +-- .../share/ut_xaodcore_shallowcopy_test.ref | 1 + .../xAODCore/test/ut_xaodcore_shallowcopy.cxx | 64 ++++++++++++++----- 3 files changed, 51 insertions(+), 22 deletions(-) create mode 100644 Event/xAOD/xAODCore/share/ut_xaodcore_shallowcopy_test.ref diff --git a/Event/xAOD/xAODCore/CMakeLists.txt b/Event/xAOD/xAODCore/CMakeLists.txt index fe6bd1ff0086..c4565de13bd3 100644 --- a/Event/xAOD/xAODCore/CMakeLists.txt +++ b/Event/xAOD/xAODCore/CMakeLists.txt @@ -81,11 +81,9 @@ atlas_add_test( ut_xaodcore_auxinfobase_test SOURCES test/ut_xaodcore_auxinfobase_test.cxx LINK_LIBRARIES AthContainers xAODCore ) -if( XAOD_STANDALONE ) - atlas_add_test( ut_xaodcore_shallowcopy_test - SOURCES test/ut_xaodcore_shallowcopy.cxx - LINK_LIBRARIES AthContainers AthLinks xAODCore ) -endif() +atlas_add_test( ut_xaodcore_shallowcopy_test + SOURCES test/ut_xaodcore_shallowcopy.cxx + LINK_LIBRARIES AthContainers AthLinks xAODCore ) # Declare the "include tests": foreach( header AddDVProxy AuxContainerBase AuxSelection BaseInfo CLASS_DEF diff --git a/Event/xAOD/xAODCore/share/ut_xaodcore_shallowcopy_test.ref b/Event/xAOD/xAODCore/share/ut_xaodcore_shallowcopy_test.ref new file mode 100644 index 000000000000..c2fbee20eb8d --- /dev/null +++ b/Event/xAOD/xAODCore/share/ut_xaodcore_shallowcopy_test.ref @@ -0,0 +1 @@ +All tests with xAOD::ShallowAuxContainer succeeded diff --git a/Event/xAOD/xAODCore/test/ut_xaodcore_shallowcopy.cxx b/Event/xAOD/xAODCore/test/ut_xaodcore_shallowcopy.cxx index a571c405dea2..29f49daf3b40 100644 --- a/Event/xAOD/xAODCore/test/ut_xaodcore_shallowcopy.cxx +++ b/Event/xAOD/xAODCore/test/ut_xaodcore_shallowcopy.cxx @@ -13,11 +13,15 @@ #include <cmath> // EDM include(s): +#ifdef XAOD_STANDALONE #define private public #define protected public # include "AthLinks/DataLink.h" #undef protected #undef private +#else +# include "AthLinks/DataLink.h" +#endif #include "AthContainers/AuxElement.h" #include "AthContainers/DataVector.h" @@ -36,24 +40,10 @@ } \ } while( 0 ) -int main() { - - // Create a test container that we'll make a copy of later on: - xAOD::AuxContainerBase origAux; - DataVector< SG::AuxElement > origVec; - origVec.setStore( &origAux ); - for( int i = 0; i < 10; ++i ) { - SG::AuxElement* e = new SG::AuxElement(); - origVec.push_back( e ); - e->auxdata< int >( "IntVar" ) = i; - e->auxdata< float >( "FloatVar" ) = i + 1; - } - // Make a shallow copy of it: - xAOD::ShallowAuxContainer copyAux; - DataLink< SG::IConstAuxStore > link; - link.m_object = &origAux; - copyAux.setParent( link ); +int testCopy (const DataVector<SG::AuxElement>& origVec, + xAOD::ShallowAuxContainer& copyAux) +{ DataVector< SG::AuxElement > copyVec; for( size_t i = 0; i < origVec.size(); ++i ) { copyVec.push_back( new SG::AuxElement() ); @@ -111,6 +101,46 @@ int main() { copyAux.setShallowIO( false ); SIMPLE_ASSERT( copyAux.getSelectedAuxIDs().size() == 2 ); + return 0; +} + + +int main() { + + // Create a test container that we'll make a copy of later on: + xAOD::AuxContainerBase origAux; + DataVector< SG::AuxElement > origVec; + origVec.setStore( &origAux ); + for( int i = 0; i < 10; ++i ) { + SG::AuxElement* e = new SG::AuxElement(); + origVec.push_back( e ); + e->auxdata< int >( "IntVar" ) = i; + e->auxdata< float >( "FloatVar" ) = i + 1; + } + +#ifdef XAOD_STANDALONE + DataLink< SG::IConstAuxStore > link; + link.m_object = &origAux; +#else + DataLink< SG::IConstAuxStore > link (&origAux); +#endif + + // Make a shallow copy of it: + { + xAOD::ShallowAuxContainer copyAux; + copyAux.setParent( link ); + if (testCopy (origVec, copyAux)) + return 1; + } + + { + xAOD::ShallowAuxContainer copyAux (link); + if (testCopy (origVec, copyAux)) + return 1; + xAOD::ShallowAuxContainer copyAux2 (copyAux); + SIMPLE_ASSERT( copyAux2.getAuxIDs().size() == 3 ); + } + // Tell the user that everything went okay: std::cout << "All tests with xAOD::ShallowAuxContainer succeeded" << std::endl; -- GitLab From b7dc269521c5c722d433aadb871ab85ef6e3a3d5 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Tue, 10 Jul 2018 19:54:17 +0200 Subject: [PATCH 449/562] xAODCaloEvent: Add unique_ptr version of addCellLink. Add overload of xAOD::CaloCluster::addCellLink taking a unique_ptr. Former-commit-id: 87feeb02137a339cb2421156481d909d48ad90f2 --- .../xAODCaloEvent/versions/CaloCluster_v1.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Event/xAOD/xAODCaloEvent/xAODCaloEvent/versions/CaloCluster_v1.h b/Event/xAOD/xAODCaloEvent/xAODCaloEvent/versions/CaloCluster_v1.h index 18dfb64ea9d0..02588d5253ce 100644 --- a/Event/xAOD/xAODCaloEvent/xAODCaloEvent/versions/CaloCluster_v1.h +++ b/Event/xAOD/xAODCaloEvent/xAODCaloEvent/versions/CaloCluster_v1.h @@ -577,6 +577,8 @@ namespace xAOD { /// @name Athena-only methods, used during building stage /// @{ /// Set up an ElementLink to a CaloClusterCellLink object + /// Takes ownership of CCCL. + /// Deprecated; use the unique_ptr version for new code. void addCellLink(CaloClusterCellLink* CCCL) { if (m_ownCellLinks && m_cellLinks) { //Delete link if there is one @@ -586,6 +588,17 @@ namespace xAOD { m_cellLinks=CCCL; m_ownCellLinks=true; } + + /// Set up an ElementLink to a CaloClusterCellLink object + void addCellLink(std::unique_ptr<CaloClusterCellLink> CCCL) { + if (m_ownCellLinks && m_cellLinks) { + //Delete link if there is one + delete m_cellLinks; + } + + m_cellLinks=CCCL.release(); + m_ownCellLinks=true; + } /**@brief Set up an ElementLink to a CaloClusterCellLink object * @param CCCL_key StoreGate key of the CaloClusterCellLinkContainer * @param index Index of inside the CaloClusterCellLinkContainer container @@ -606,7 +619,7 @@ namespace xAOD { */ const CaloClusterCellLink* getCellLinks() const; - /**@brief Get a pointer to the CaloClusterCellLink object (const version) + /**@brief Get a pointer to the CaloClusterCellLink object (non-const version) * @return ptr to CaloClusterCellLink obj, NULL if no valid link */ CaloClusterCellLink* getCellLinks() { -- GitLab From 447de12214fd853239c3ff46b893ff5fe956f8ac Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Thu, 28 Jun 2018 11:12:07 +0200 Subject: [PATCH 450/562] CaloRec: Preparing to make CaloCellContainerCheckerTool const. Base the event count check on the event index from EventContext, rather than maintaining a count as a member variable. Make everything called from process() const. Former-commit-id: 435bbe905094bfc247136ed7767325751cd44a06 --- .../src/CaloCellContainerCheckerTool.cxx | 24 +++++++++---------- .../src/CaloCellContainerCheckerTool.h | 18 +++++++------- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/Calorimeter/CaloRec/src/CaloCellContainerCheckerTool.cxx b/Calorimeter/CaloRec/src/CaloCellContainerCheckerTool.cxx index 749e3c41fd62..73391ac90394 100644 --- a/Calorimeter/CaloRec/src/CaloCellContainerCheckerTool.cxx +++ b/Calorimeter/CaloRec/src/CaloCellContainerCheckerTool.cxx @@ -37,13 +37,9 @@ CaloCellContainerCheckerTool::CaloCellContainerCheckerTool( const std::string& type, const std::string& name, const IInterface* parent) - :AthAlgTool(type, name, parent) , - m_eventsToCheck(5),m_eventsLeftToCheck(5) + :base_class(type, name, parent) { - declareInterface<ICaloCellMakerTool>(this); - declareInterface<ICaloConstCellMakerTool>(this); - - declareProperty ("EventsToCheck",m_eventsToCheck) ; + declareProperty ("EventsToCheck",m_eventsToCheck = 5); } @@ -55,29 +51,31 @@ CaloCellContainerCheckerTool::CaloCellContainerCheckerTool( ///////////////////////////////////////////////////////////////////// StatusCode CaloCellContainerCheckerTool::initialize() { - m_eventsLeftToCheck = m_eventsToCheck; return StatusCode::SUCCESS; } StatusCode -CaloCellContainerCheckerTool::process(CaloCellContainer * theCont ) +CaloCellContainerCheckerTool::process (CaloCellContainer* theCont) { - return doProcess (theCont); + return doProcess (theCont, Gaudi::Hive::currentContext()); } StatusCode -CaloCellContainerCheckerTool::process(CaloConstCellContainer * theCont ) +CaloCellContainerCheckerTool::process (CaloConstCellContainer* theCont) { - return doProcess (theCont->asDataVector()); + return doProcess (theCont->asDataVector(), Gaudi::Hive::currentContext()); } StatusCode -CaloCellContainerCheckerTool::doProcess(const CaloCellContainer * theCont ) +CaloCellContainerCheckerTool::doProcess (const CaloCellContainer* theCont, + const EventContext& ctx) const { - if (m_eventsLeftToCheck<0) return StatusCode::SUCCESS; else m_eventsLeftToCheck--; + if (ctx.evt() >= m_eventsToCheck) { + return StatusCode::SUCCESS; + } StatusCode returnSc = StatusCode::SUCCESS ; diff --git a/Calorimeter/CaloRec/src/CaloCellContainerCheckerTool.h b/Calorimeter/CaloRec/src/CaloCellContainerCheckerTool.h index 925bd8918718..3154b3e9ee58 100644 --- a/Calorimeter/CaloRec/src/CaloCellContainerCheckerTool.h +++ b/Calorimeter/CaloRec/src/CaloCellContainerCheckerTool.h @@ -10,10 +10,8 @@ #include "CaloInterface/ICaloCellMakerTool.h" #include "CaloInterface/ICaloConstCellMakerTool.h" -class CaloCellContainerCheckerTool: public AthAlgTool, - virtual public ICaloCellMakerTool, - virtual public ICaloConstCellMakerTool - +class CaloCellContainerCheckerTool + : public extends<AthAlgTool, ICaloCellMakerTool, ICaloConstCellMakerTool> { public: @@ -23,16 +21,16 @@ public: const IInterface* parent) ; - virtual StatusCode initialize() ; + virtual StatusCode initialize() override; - virtual StatusCode process( CaloCellContainer * theCellContainer) ; - virtual StatusCode process( CaloConstCellContainer * theCellContainer) ; + virtual StatusCode process (CaloCellContainer* theCellContainer) override; + virtual StatusCode process (CaloConstCellContainer* theCellContainer) override; private: - StatusCode doProcess( const CaloCellContainer * theCellContainer) ; + StatusCode doProcess (const CaloCellContainer* theCellContainer, + const EventContext& ctx) const; - int m_eventsToCheck; - int m_eventsLeftToCheck; + size_t m_eventsToCheck; }; #endif -- GitLab From 1a40d9c821c5fd2d938dc4112616ebca7418b2c2 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Fri, 13 Jul 2018 13:58:12 +0200 Subject: [PATCH 451/562] Minimal changes to solve coverity defects 29637, 113086,114723 Former-commit-id: 1943aa2570660f335b43cbaf29f780b852c72033 --- .../TrigConversionFinder.h | 22 +++++++++---------- .../src/TrigConversionFinder.cxx | 15 +++++++++---- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigConversionFinder/InDetTrigConversionFinder/TrigConversionFinder.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigConversionFinder/InDetTrigConversionFinder/TrigConversionFinder.h index 579a0c72248a..8e52356ab72d 100755 --- a/InnerDetector/InDetTrigRecAlgs/InDetTrigConversionFinder/InDetTrigConversionFinder/TrigConversionFinder.h +++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigConversionFinder/InDetTrigConversionFinder/TrigConversionFinder.h @@ -40,21 +40,21 @@ namespace InDet void analyzeResults(xAOD::VertexContainer*); protected: - int m_nTracks; - int m_nVertices; + int m_nTracks{}; + int m_nVertices{}; ToolHandle< IVertexFinder > m_VertexFinderTool; /** Statistics */ - long m_events_processed; //!< Number of events processed - long m_Gamma_stored; //!< Number of conversion vertices stored - long m_Double_Conversions; //!< Number of two-track conversions - long m_Single_Conversions; //!< Number of single-track conversions - long m_SiSi_Conversions; //!< Number of Si-Si track conversions - long m_SiTrt_Conversions; //!< Number of Si-TRT track conversions - long m_TrtTrt_Conversions; //!< Number of TRT-TRT track conversions - long m_Si_Conversions; //!< Number of Si single-track conversions - long m_Trt_Conversions; //!< Number of TRT single-track conversions + long m_events_processed{}; //!< Number of events processed + long m_Gamma_stored{}; //!< Number of conversion vertices stored + long m_Double_Conversions{}; //!< Number of two-track conversions + long m_Single_Conversions{}; //!< Number of single-track conversions + long m_SiSi_Conversions{}; //!< Number of Si-Si track conversions + long m_SiTrt_Conversions{}; //!< Number of Si-TRT track conversions + long m_TrtTrt_Conversions{}; //!< Number of TRT-TRT track conversions + long m_Si_Conversions{}; //!< Number of Si single-track conversions + long m_Trt_Conversions{}; //!< Number of TRT single-track conversions }; } diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigConversionFinder/src/TrigConversionFinder.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigConversionFinder/src/TrigConversionFinder.cxx index 799a8fe33ef3..a5417d547b6a 100755 --- a/InnerDetector/InDetTrigRecAlgs/InDetTrigConversionFinder/src/TrigConversionFinder.cxx +++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigConversionFinder/src/TrigConversionFinder.cxx @@ -127,11 +127,9 @@ namespace InDet #endif // Find conversions - // virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const xAOD::TrackParticleContainer* trackParticles) = 0; std::pair <xAOD::VertexContainer*, xAOD::VertexAuxContainer*> foo; foo = m_VertexFinderTool->findVertex(TPC); InDetTrigConversionContainer = foo.first; - //delete tpBaseColl; } @@ -151,7 +149,12 @@ namespace InDet if(outputLevel <= MSG::DEBUG){ msg() << MSG::DEBUG << "Container recorded in StoreGate." << endmsg; - msg() << MSG::DEBUG << "REGTEST: Output conversion container size :" << InDetTrigConversionContainer->size() << endmsg; + if (InDetTrigConversionContainer){ + msg() << MSG::DEBUG << "REGTEST: Output conversion container size :" << InDetTrigConversionContainer->size() << endmsg; + } else { + msg() << MSG::DEBUG << "InDetTrigConversionContainer ptr is null at "<<__LINE__<<endmsg; + } + } return HLT::OK; @@ -178,6 +181,10 @@ namespace InDet const Trk::LinkToTrackParticleBase * linkToTrackPB = dynamic_cast<const Trk::LinkToTrackParticleBase *>(trLink); if(0!= linkToTrackPB){ if(linkToTrackPB->isValid()) tempTrk = linkToTrackPB->cachedElement(); + if (not tempTrk) { + msg() << MSG::ERROR<<"tempTrk ptr is null at "<<__LINE__<<endmsg; + continue; + } const Trk::TrackSummary* summary = tempTrk->trackSummary(); int ncl = summary->get(Trk::numberOfPixelHits) + summary->get(Trk::numberOfSCTHits); int ntrt = summary->get(Trk::numberOfTRTHits); @@ -190,7 +197,7 @@ namespace InDet if(ncl==0 && ntrt>0) isTrt2 = true; } }//end of dynamic_cast check - }//end of ITrackLink existance check + }//end of ITrackLink existence check } -- GitLab From 23c002e33dd963100fdc33fbf9a08297ff888da2 Mon Sep 17 00:00:00 2001 From: John Derek Chapman <chapman@hep.phy.cam.ac.uk> Date: Wed, 11 Jul 2018 13:16:59 +0000 Subject: [PATCH 452/562] Merge branch 'ISF_Fatras_headers_to_src_21.3' into '21.3' Moving header files to src directory in ISF_Fatras packages (ATLASSIM-2389) See merge request atlas/athena!12137 Former-commit-id: 0678101fb41305f1d70fbee4078af330b4fe183a --- .../ISF_FatrasServices/CMakeLists.txt | 12 ++++---- .../ISF_FatrasServices/src/FatrasSimSvc.cxx | 10 ++----- .../FatrasSimSvc.h | 6 +--- .../components/ISF_FatrasServices_entries.cxx | 2 +- .../ISF_Fatras/ISF_FatrasTools/CMakeLists.txt | 29 ++++++++----------- .../src/EnergyLossSamplerBetheHeitler.cxx | 2 +- .../EnergyLossSamplerBetheHeitler.h | 0 .../src/HadIntProcessorParametric.cxx | 2 +- .../HadIntProcessorParametric.h | 0 .../src/McEnergyLossUpdator.cxx | 2 +- .../McEnergyLossUpdator.h | 0 .../src/McMaterialEffectsEngine.cxx | 2 +- .../McMaterialEffectsEngine.h | 0 .../McMaterialEffectsEngine.icc | 0 .../src/McMaterialEffectsUpdator.cxx | 2 +- .../McMaterialEffectsUpdator.h | 0 ...ltipleScatteringSamplerGaussianMixture.cxx | 2 +- ...MultipleScatteringSamplerGaussianMixture.h | 0 ...ultipleScatteringSamplerGeneralMixture.cxx | 2 +- .../MultipleScatteringSamplerGeneralMixture.h | 0 .../src/MultipleScatteringSamplerHighland.cxx | 2 +- .../MultipleScatteringSamplerHighland.h | 0 .../src/PhotonConversionTool.cxx | 2 +- .../PhotonConversionTool.h | 0 .../src/PhysicsValidationTool.cxx | 2 +- .../PhysicsValidationTool.h | 0 .../src/ProcessSamplingTool.cxx | 2 +- .../ProcessSamplingTool.h | 0 .../ISF_FatrasTools/src/TransportEngine.cxx | 2 +- .../TransportEngine.h | 0 .../ISF_FatrasTools/src/TransportTool.cxx | 2 +- .../{ISF_FatrasTools => src}/TransportTool.h | 0 .../components/ISF_FatrasTools_entries.cxx | 26 ++++++++--------- .../ISF_FatrasToolsID/CMakeLists.txt | 17 +++++------ .../src/HitCreatorSilicon.cxx | 2 +- .../HitCreatorSilicon.h | 0 .../ISF_FatrasToolsID/src/HitCreatorTRT.cxx | 2 +- .../HitCreatorTRT.h | 0 .../ISF_FatrasToolsID/src/SimHitCreatorID.cxx | 2 +- .../SimHitCreatorID.h | 0 .../components/ISF_FatrasToolsID_entries.cxx | 6 ++-- .../ISF_FatrasToolsMS/CMakeLists.txt | 17 +++++------ .../ISF_FatrasToolsMS/src/SimHitCreatorMS.cxx | 2 +- .../SimHitCreatorMS.h | 0 .../src/components/FatrasToolsMS_entries.cxx | 2 +- 45 files changed, 69 insertions(+), 92 deletions(-) rename Simulation/ISF/ISF_Fatras/ISF_FatrasServices/{ISF_FatrasServices => src}/FatrasSimSvc.h (88%) rename Simulation/ISF/ISF_Fatras/ISF_FatrasTools/{ISF_FatrasTools => src}/EnergyLossSamplerBetheHeitler.h (100%) rename Simulation/ISF/ISF_Fatras/ISF_FatrasTools/{ISF_FatrasTools => src}/HadIntProcessorParametric.h (100%) rename Simulation/ISF/ISF_Fatras/ISF_FatrasTools/{ISF_FatrasTools => src}/McEnergyLossUpdator.h (100%) rename Simulation/ISF/ISF_Fatras/ISF_FatrasTools/{ISF_FatrasTools => src}/McMaterialEffectsEngine.h (100%) rename Simulation/ISF/ISF_Fatras/ISF_FatrasTools/{ISF_FatrasTools => src}/McMaterialEffectsEngine.icc (100%) rename Simulation/ISF/ISF_Fatras/ISF_FatrasTools/{ISF_FatrasTools => src}/McMaterialEffectsUpdator.h (100%) rename Simulation/ISF/ISF_Fatras/ISF_FatrasTools/{ISF_FatrasTools => src}/MultipleScatteringSamplerGaussianMixture.h (100%) rename Simulation/ISF/ISF_Fatras/ISF_FatrasTools/{ISF_FatrasTools => src}/MultipleScatteringSamplerGeneralMixture.h (100%) rename Simulation/ISF/ISF_Fatras/ISF_FatrasTools/{ISF_FatrasTools => src}/MultipleScatteringSamplerHighland.h (100%) rename Simulation/ISF/ISF_Fatras/ISF_FatrasTools/{ISF_FatrasTools => src}/PhotonConversionTool.h (100%) rename Simulation/ISF/ISF_Fatras/ISF_FatrasTools/{ISF_FatrasTools => src}/PhysicsValidationTool.h (100%) rename Simulation/ISF/ISF_Fatras/ISF_FatrasTools/{ISF_FatrasTools => src}/ProcessSamplingTool.h (100%) rename Simulation/ISF/ISF_Fatras/ISF_FatrasTools/{ISF_FatrasTools => src}/TransportEngine.h (100%) rename Simulation/ISF/ISF_Fatras/ISF_FatrasTools/{ISF_FatrasTools => src}/TransportTool.h (100%) rename Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/{ISF_FatrasToolsID => src}/HitCreatorSilicon.h (100%) rename Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/{ISF_FatrasToolsID => src}/HitCreatorTRT.h (100%) rename Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/{ISF_FatrasToolsID => src}/SimHitCreatorID.h (100%) rename Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/{ISF_FatrasToolsMS => src}/SimHitCreatorMS.h (100%) diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/CMakeLists.txt b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/CMakeLists.txt index 0b991a0ad152..5d7fa6d075d7 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/CMakeLists.txt +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/CMakeLists.txt @@ -7,22 +7,20 @@ atlas_subdir( ISF_FatrasServices ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC + GaudiKernel + PRIVATE Control/AthenaBaseComps DetectorDescription/AtlasDetDescr - GaudiKernel + Simulation/ISF/ISF_Core/ISF_Event Simulation/ISF/ISF_Core/ISF_Interfaces - Tracking/TrkEvent/TrkTrack - PRIVATE - Control/StoreGate - Simulation/ISF/ISF_Core/ISF_Event ) + Tracking/TrkEvent/TrkTrack ) # Component(s) in the package: atlas_add_component( ISF_FatrasServices src/*.cxx src/components/*.cxx - LINK_LIBRARIES AthenaBaseComps AtlasDetDescr GaudiKernel ISF_Interfaces TrkTrack StoreGateLib SGtests ISF_Event ) + LINK_LIBRARIES AthenaBaseComps AtlasDetDescr GaudiKernel ISF_Interfaces TrkTrack ISF_Event ) # Install files from the package: -atlas_install_headers( ISF_FatrasServices ) atlas_install_python_modules( python/*.py ) diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/src/FatrasSimSvc.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/src/FatrasSimSvc.cxx index 85514beda5ce..319a19550669 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/src/FatrasSimSvc.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/src/FatrasSimSvc.cxx @@ -1,16 +1,10 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -/////////////////////////////////////////////////////////////////// -// TransportSimSvc.cxx, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - // class header include -#include "ISF_FatrasServices/FatrasSimSvc.h" +#include "FatrasSimSvc.h" -// StoreGate -#include "StoreGate/StoreGateSvc.h" // Remaining ISF include #include "ISF_Interfaces/IParticleBroker.h" #include "ISF_Interfaces/ITruthSvc.h" diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/ISF_FatrasServices/FatrasSimSvc.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/src/FatrasSimSvc.h similarity index 88% rename from Simulation/ISF/ISF_Fatras/ISF_FatrasServices/ISF_FatrasServices/FatrasSimSvc.h rename to Simulation/ISF/ISF_Fatras/ISF_FatrasServices/src/FatrasSimSvc.h index d5b90aade602..c53e33fe61f0 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/ISF_FatrasServices/FatrasSimSvc.h +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/src/FatrasSimSvc.h @@ -1,11 +1,7 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -/////////////////////////////////////////////////////////////////// -// FatrasSimSvc.h, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - #ifndef ISF_FATRASSIMSVC_H #define ISF_FATRASSIMSVC_H 1 diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/src/components/ISF_FatrasServices_entries.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/src/components/ISF_FatrasServices_entries.cxx index 7ccfb3c6d84b..b7fba9de56c7 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/src/components/ISF_FatrasServices_entries.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/src/components/ISF_FatrasServices_entries.cxx @@ -1,4 +1,4 @@ -#include "ISF_FatrasServices/FatrasSimSvc.h" +#include "../FatrasSimSvc.h" DECLARE_COMPONENT( iFatras::FatrasSimSvc ) diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/CMakeLists.txt b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/CMakeLists.txt index b41559930827..99d0352b1811 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/CMakeLists.txt +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/CMakeLists.txt @@ -7,31 +7,31 @@ atlas_subdir( ISF_FatrasTools ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC + GaudiKernel + PRIVATE Control/AthenaBaseComps Control/AthenaKernel + Control/StoreGate + DetectorDescription/AtlasDetDescr DetectorDescription/GeoPrimitives Event/EventPrimitives - GaudiKernel - Simulation/Barcode/BarcodeInterfaces + Simulation/Barcode/BarcodeEvent + Simulation/FastSimulation/FastSimulationEvent Simulation/ISF/ISF_Core/ISF_Event Simulation/ISF/ISF_Core/ISF_Interfaces Simulation/ISF/ISF_Fatras/ISF_FatrasInterfaces + Tracking/TrkDetDescr/TrkDetDescrInterfaces Tracking/TrkDetDescr/TrkDetDescrUtils Tracking/TrkDetDescr/TrkGeometry - Tracking/TrkEvent/TrkEventPrimitives - Tracking/TrkEvent/TrkParameters - Tracking/TrkExtrapolation/TrkExInterfaces - Tracking/TrkExtrapolation/TrkExUtils - PRIVATE - Control/StoreGate - DetectorDescription/AtlasDetDescr - Simulation/FastSimulation/FastSimulationEvent - Tracking/TrkDetDescr/TrkDetDescrInterfaces Tracking/TrkDetDescr/TrkSurfaces Tracking/TrkDetDescr/TrkVolumes + Tracking/TrkEvent/TrkEventPrimitives Tracking/TrkEvent/TrkMaterialOnTrack Tracking/TrkEvent/TrkNeutralParameters - Tracking/TrkEvent/TrkTrack ) + Tracking/TrkEvent/TrkParameters + Tracking/TrkEvent/TrkTrack + Tracking/TrkExtrapolation/TrkExInterfaces + Tracking/TrkExtrapolation/TrkExUtils ) # External dependencies: find_package( CLHEP ) @@ -44,8 +44,3 @@ atlas_add_component( ISF_FatrasTools src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel GeoPrimitives EventPrimitives GaudiKernel ISF_Event ISF_Interfaces ISF_FatrasInterfaces TrkDetDescrUtils TrkGeometry TrkEventPrimitives TrkParameters TrkExInterfaces TrkExUtils StoreGateLib SGtests AtlasDetDescr TrkDetDescrInterfaces TrkSurfaces TrkVolumes TrkMaterialOnTrack TrkNeutralParameters TrkTrack ) - -# Install files from the package: -atlas_install_headers( ISF_FatrasTools ) - - diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/EnergyLossSamplerBetheHeitler.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/EnergyLossSamplerBetheHeitler.cxx index 34f9d0ff55bc..95393d247010 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/EnergyLossSamplerBetheHeitler.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/EnergyLossSamplerBetheHeitler.cxx @@ -7,7 +7,7 @@ /////////////////////////////////////////////////////////////////// // class header include -#include "ISF_FatrasTools/EnergyLossSamplerBetheHeitler.h" +#include "EnergyLossSamplerBetheHeitler.h" #include "TrkGeometry/MaterialProperties.h" #include "TrkMaterialOnTrack/EnergyLoss.h" diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/EnergyLossSamplerBetheHeitler.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/EnergyLossSamplerBetheHeitler.h similarity index 100% rename from Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/EnergyLossSamplerBetheHeitler.h rename to Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/EnergyLossSamplerBetheHeitler.h diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/HadIntProcessorParametric.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/HadIntProcessorParametric.cxx index 97aa171bf8fa..5231ca399fbb 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/HadIntProcessorParametric.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/HadIntProcessorParametric.cxx @@ -7,7 +7,7 @@ /////////////////////////////////////////////////////////////////// // class header -#include "ISF_FatrasTools/HadIntProcessorParametric.h" +#include "HadIntProcessorParametric.h" // Gaudi Kernel #include "GaudiKernel/IRndmGenSvc.h" diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/HadIntProcessorParametric.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/HadIntProcessorParametric.h similarity index 100% rename from Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/HadIntProcessorParametric.h rename to Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/HadIntProcessorParametric.h diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McEnergyLossUpdator.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McEnergyLossUpdator.cxx index 85719ae4611e..14d76d2aa560 100755 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McEnergyLossUpdator.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McEnergyLossUpdator.cxx @@ -7,7 +7,7 @@ /////////////////////////////////////////////////////////////////// // class header -#include "ISF_FatrasTools/McEnergyLossUpdator.h" +#include "McEnergyLossUpdator.h" // Trk #include "TrkGeometry/MaterialProperties.h" diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/McEnergyLossUpdator.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McEnergyLossUpdator.h similarity index 100% rename from Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/McEnergyLossUpdator.h rename to Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McEnergyLossUpdator.h diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsEngine.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsEngine.cxx index e3a57797efd2..741e382213e2 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsEngine.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsEngine.cxx @@ -7,7 +7,7 @@ /////////////////////////////////////////////////////////////////// // class header -#include "ISF_FatrasTools/McMaterialEffectsEngine.h" +#include "McMaterialEffectsEngine.h" // Gaudi Kernel #include "GaudiKernel/DataSvc.h" diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/McMaterialEffectsEngine.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsEngine.h similarity index 100% rename from Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/McMaterialEffectsEngine.h rename to Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsEngine.h diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/McMaterialEffectsEngine.icc b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsEngine.icc similarity index 100% rename from Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/McMaterialEffectsEngine.icc rename to Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsEngine.icc diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsUpdator.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsUpdator.cxx index 4297514fde30..3216f49aa9e2 100755 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsUpdator.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsUpdator.cxx @@ -7,7 +7,7 @@ /////////////////////////////////////////////////////////////////// // class header -#include "ISF_FatrasTools/McMaterialEffectsUpdator.h" +#include "McMaterialEffectsUpdator.h" // Gaudi Kernel #include "GaudiKernel/IRndmGenSvc.h" diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/McMaterialEffectsUpdator.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsUpdator.h similarity index 100% rename from Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/McMaterialEffectsUpdator.h rename to Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/McMaterialEffectsUpdator.h diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/MultipleScatteringSamplerGaussianMixture.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/MultipleScatteringSamplerGaussianMixture.cxx index 4e1179dc4530..7603844b25ba 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/MultipleScatteringSamplerGaussianMixture.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/MultipleScatteringSamplerGaussianMixture.cxx @@ -9,7 +9,7 @@ // Trk include #include "TrkGeometry/MaterialProperties.h" -#include "ISF_FatrasTools/MultipleScatteringSamplerGaussianMixture.h" +#include "MultipleScatteringSamplerGaussianMixture.h" #include "CLHEP/Random/RandGaussZiggurat.h" diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/MultipleScatteringSamplerGaussianMixture.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/MultipleScatteringSamplerGaussianMixture.h similarity index 100% rename from Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/MultipleScatteringSamplerGaussianMixture.h rename to Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/MultipleScatteringSamplerGaussianMixture.h diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/MultipleScatteringSamplerGeneralMixture.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/MultipleScatteringSamplerGeneralMixture.cxx index ea1e844267fb..e0370add52c0 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/MultipleScatteringSamplerGeneralMixture.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/MultipleScatteringSamplerGeneralMixture.cxx @@ -9,7 +9,7 @@ // Trk include #include "TrkGeometry/MaterialProperties.h" -#include "ISF_FatrasTools/MultipleScatteringSamplerGeneralMixture.h" +#include "MultipleScatteringSamplerGeneralMixture.h" #include "CLHEP/Random/RandGaussZiggurat.h" // static particle masses diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/MultipleScatteringSamplerGeneralMixture.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/MultipleScatteringSamplerGeneralMixture.h similarity index 100% rename from Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/MultipleScatteringSamplerGeneralMixture.h rename to Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/MultipleScatteringSamplerGeneralMixture.h diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/MultipleScatteringSamplerHighland.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/MultipleScatteringSamplerHighland.cxx index be924a5c4a5f..4ba5f6613dde 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/MultipleScatteringSamplerHighland.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/MultipleScatteringSamplerHighland.cxx @@ -10,7 +10,7 @@ #include "TrkGeometry/MaterialProperties.h" #include "TrkExUtils/MaterialInteraction.h" -#include "ISF_FatrasTools/MultipleScatteringSamplerHighland.h" +#include "MultipleScatteringSamplerHighland.h" #include "CLHEP/Random/RandGaussZiggurat.h" diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/MultipleScatteringSamplerHighland.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/MultipleScatteringSamplerHighland.h similarity index 100% rename from Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/MultipleScatteringSamplerHighland.h rename to Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/MultipleScatteringSamplerHighland.h diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/PhotonConversionTool.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/PhotonConversionTool.cxx index 0556e87b46ac..68978e0f7eb4 100755 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/PhotonConversionTool.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/PhotonConversionTool.cxx @@ -7,7 +7,7 @@ /////////////////////////////////////////////////////////////////// // class header -#include "ISF_FatrasTools/PhotonConversionTool.h" +#include "PhotonConversionTool.h" // Gaudi Kernel #include "GaudiKernel/RndmGenerators.h" diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/PhotonConversionTool.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/PhotonConversionTool.h similarity index 100% rename from Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/PhotonConversionTool.h rename to Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/PhotonConversionTool.h diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/PhysicsValidationTool.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/PhysicsValidationTool.cxx index 68155a453ef1..18ffc3801b18 100755 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/PhysicsValidationTool.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/PhysicsValidationTool.cxx @@ -7,7 +7,7 @@ /////////////////////////////////////////////////////////////////// // class header -#include "ISF_FatrasTools/PhysicsValidationTool.h" +#include "PhysicsValidationTool.h" // Tracking #include "TrkParameters/TrackParameters.h" diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/PhysicsValidationTool.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/PhysicsValidationTool.h similarity index 100% rename from Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/PhysicsValidationTool.h rename to Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/PhysicsValidationTool.h diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/ProcessSamplingTool.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/ProcessSamplingTool.cxx index 0670b68872d0..c26dc4bb3749 100755 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/ProcessSamplingTool.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/ProcessSamplingTool.cxx @@ -7,7 +7,7 @@ /////////////////////////////////////////////////////////////////// // class header -#include "ISF_FatrasTools/ProcessSamplingTool.h" +#include "ProcessSamplingTool.h" // Tracking #include "TrkParameters/TrackParameters.h" diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/ProcessSamplingTool.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/ProcessSamplingTool.h similarity index 100% rename from Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/ProcessSamplingTool.h rename to Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/ProcessSamplingTool.h diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportEngine.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportEngine.cxx index 15d3c9cf1791..4cf9e151bff1 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportEngine.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportEngine.cxx @@ -7,7 +7,7 @@ /////////////////////////////////////////////////////////////////// // class header -#include "ISF_FatrasTools/TransportEngine.h" +#include "TransportEngine.h" // Tracking #include "TrkTrack/Track.h" diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/TransportEngine.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportEngine.h similarity index 100% rename from Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/TransportEngine.h rename to Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportEngine.h diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportTool.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportTool.cxx index 1202f66962ec..fcfdeeaf37af 100755 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportTool.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportTool.cxx @@ -7,7 +7,7 @@ /////////////////////////////////////////////////////////////////// // class header -#include "ISF_FatrasTools/TransportTool.h" +#include "TransportTool.h" // Tracking #include "TrkTrack/Track.h" diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/TransportTool.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportTool.h similarity index 100% rename from Simulation/ISF/ISF_Fatras/ISF_FatrasTools/ISF_FatrasTools/TransportTool.h rename to Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportTool.h diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/components/ISF_FatrasTools_entries.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/components/ISF_FatrasTools_entries.cxx index f0e4cc717256..66844392052c 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/components/ISF_FatrasTools_entries.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/components/ISF_FatrasTools_entries.cxx @@ -1,17 +1,17 @@ -#include "ISF_FatrasTools/TransportTool.h" -#include "ISF_FatrasTools/TransportEngine.h" -#include "ISF_FatrasTools/McMaterialEffectsUpdator.h" -#include "ISF_FatrasTools/McMaterialEffectsEngine.h" -#include "ISF_FatrasTools/HadIntProcessorParametric.h" -#include "ISF_FatrasTools/McEnergyLossUpdator.h" -#include "ISF_FatrasTools/EnergyLossSamplerBetheHeitler.h" -#include "ISF_FatrasTools/PhotonConversionTool.h" -#include "ISF_FatrasTools/ProcessSamplingTool.h" -#include "ISF_FatrasTools/PhysicsValidationTool.h" +#include "../TransportTool.h" +#include "../TransportEngine.h" +#include "../McMaterialEffectsUpdator.h" +#include "../McMaterialEffectsEngine.h" +#include "../HadIntProcessorParametric.h" +#include "../McEnergyLossUpdator.h" +#include "../EnergyLossSamplerBetheHeitler.h" +#include "../PhotonConversionTool.h" +#include "../ProcessSamplingTool.h" +#include "../PhysicsValidationTool.h" -#include "ISF_FatrasTools/MultipleScatteringSamplerHighland.h" -#include "ISF_FatrasTools/MultipleScatteringSamplerGaussianMixture.h" -#include "ISF_FatrasTools/MultipleScatteringSamplerGeneralMixture.h" +#include "../MultipleScatteringSamplerHighland.h" +#include "../MultipleScatteringSamplerGaussianMixture.h" +#include "../MultipleScatteringSamplerGeneralMixture.h" DECLARE_COMPONENT( iFatras::TransportTool ) DECLARE_COMPONENT( iFatras::TransportEngine ) diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/CMakeLists.txt b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/CMakeLists.txt index 5cf3a65ff979..8fc1f042a414 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/CMakeLists.txt +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/CMakeLists.txt @@ -7,19 +7,15 @@ atlas_subdir( ISF_FatrasToolsID ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC + GaudiKernel + PRIVATE Control/AthenaBaseComps Control/AthenaKernel Control/AthContainers - DetectorDescription/Identifier - GaudiKernel - InnerDetector/InDetSimEvent - Simulation/ISF/ISF_Fatras/ISF_FatrasInterfaces - Tracking/TrkEvent/TrkParameters - Tracking/TrkExtrapolation/TrkExInterfaces - PRIVATE Control/StoreGate DetectorDescription/AtlasDetDescr DetectorDescription/IdDictDetDescr + DetectorDescription/Identifier InnerDetector/InDetConditions/InDetConditionsSummaryService InnerDetector/InDetConditions/TRT_ConditionsServices InnerDetector/InDetDetDescr/InDetIdentifier @@ -27,15 +23,19 @@ atlas_depends_on_subdirs( PUBLIC InnerDetector/InDetRecEvent/InDetPrepRawData InnerDetector/InDetRecEvent/InDetRIO_OnTrack InnerDetector/InDetRecTools/SiClusterizationTool + InnerDetector/InDetSimEvent Simulation/ISF/ISF_Core/ISF_Event Simulation/ISF/ISF_Core/ISF_Interfaces Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel + Simulation/ISF/ISF_Fatras/ISF_FatrasInterfaces Tracking/TrkDetDescr/TrkDetElementBase Tracking/TrkDetDescr/TrkSurfaces Tracking/TrkEvent/TrkEventPrimitives Tracking/TrkEvent/TrkMeasurementBase + Tracking/TrkEvent/TrkParameters Tracking/TrkEvent/TrkRIO_OnTrack Tracking/TrkEvent/TrkTrack + Tracking/TrkExtrapolation/TrkExInterfaces Tracking/TrkExtrapolation/TrkExUtils Tracking/TrkTools/TrkToolInterfaces ) @@ -50,6 +50,3 @@ atlas_add_component( ISF_FatrasToolsID INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel AthContainers Identifier GaudiKernel InDetSimEvent ISF_FatrasInterfaces TrkParameters TrkExInterfaces StoreGateLib SGtests AtlasDetDescr IdDictDetDescr TRT_ConditionsServicesLib InDetIdentifier InDetReadoutGeometry InDetPrepRawData InDetRIO_OnTrack SiClusterizationToolLib ISF_Event ISF_Interfaces ISF_FatrasDetDescrModel TrkDetElementBase TrkSurfaces TrkEventPrimitives TrkMeasurementBase TrkRIO_OnTrack TrkTrack TrkExUtils TrkToolInterfaces ) -# Install files from the package: -atlas_install_headers( ISF_FatrasToolsID ) - diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorSilicon.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorSilicon.cxx index 21e814fe7616..60a60761571a 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorSilicon.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorSilicon.cxx @@ -7,7 +7,7 @@ /////////////////////////////////////////////////////////////////// // class header -#include "ISF_FatrasToolsID/HitCreatorSilicon.h" +#include "HitCreatorSilicon.h" // ISF #include "ISF_Event/ISFParticle.h" diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/ISF_FatrasToolsID/HitCreatorSilicon.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorSilicon.h similarity index 100% rename from Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/ISF_FatrasToolsID/HitCreatorSilicon.h rename to Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorSilicon.h diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorTRT.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorTRT.cxx index 4d3a050b5753..4eff6c174dfa 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorTRT.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorTRT.cxx @@ -7,7 +7,7 @@ /////////////////////////////////////////////////////////////////// // class header -#include "ISF_FatrasToolsID/HitCreatorTRT.h" +#include "HitCreatorTRT.h" // Framework #include "GaudiKernel/ISvcLocator.h" diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/ISF_FatrasToolsID/HitCreatorTRT.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorTRT.h similarity index 100% rename from Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/ISF_FatrasToolsID/HitCreatorTRT.h rename to Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorTRT.h diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/SimHitCreatorID.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/SimHitCreatorID.cxx index ec73b4705620..a3ce49f010e0 100755 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/SimHitCreatorID.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/SimHitCreatorID.cxx @@ -7,7 +7,7 @@ /////////////////////////////////////////////////////////////////// // class header -#include "ISF_FatrasToolsID/SimHitCreatorID.h" +#include "SimHitCreatorID.h" // iFatras && ISF #include "ISF_FatrasInterfaces/IHitCreator.h" diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/ISF_FatrasToolsID/SimHitCreatorID.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/SimHitCreatorID.h similarity index 100% rename from Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/ISF_FatrasToolsID/SimHitCreatorID.h rename to Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/SimHitCreatorID.h diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/components/ISF_FatrasToolsID_entries.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/components/ISF_FatrasToolsID_entries.cxx index 5f87ab8c189a..f9f71afc802f 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/components/ISF_FatrasToolsID_entries.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/components/ISF_FatrasToolsID_entries.cxx @@ -1,6 +1,6 @@ -#include "ISF_FatrasToolsID/SimHitCreatorID.h" -#include "ISF_FatrasToolsID/HitCreatorSilicon.h" -#include "ISF_FatrasToolsID/HitCreatorTRT.h" +#include "../SimHitCreatorID.h" +#include "../HitCreatorSilicon.h" +#include "../HitCreatorTRT.h" DECLARE_COMPONENT( iFatras::SimHitCreatorID ) DECLARE_COMPONENT( iFatras::HitCreatorSilicon ) diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/CMakeLists.txt b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/CMakeLists.txt index 4813143033f1..aff51d5f82ef 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/CMakeLists.txt +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/CMakeLists.txt @@ -7,21 +7,21 @@ atlas_subdir( ISF_FatrasToolsMS ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC + GaudiKernel + PRIVATE Control/AthenaBaseComps Control/AthenaKernel DetectorDescription/Identifier - GaudiKernel - MuonSpectrometer/MuonSimEvent - Simulation/ISF/ISF_Fatras/ISF_FatrasInterfaces - Tracking/TrkEvent/TrkParameters - Tracking/TrkExtrapolation/TrkExInterfaces - PRIVATE MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry MuonSpectrometer/MuonIdHelpers MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTGRecTools + MuonSpectrometer/MuonSimEvent Simulation/ISF/ISF_Core/ISF_Event Simulation/ISF/ISF_Core/ISF_Interfaces - Tracking/TrkEvent/TrkTrack ) + Simulation/ISF/ISF_Fatras/ISF_FatrasInterfaces + Tracking/TrkEvent/TrkParameters + Tracking/TrkEvent/TrkTrack + Tracking/TrkExtrapolation/TrkExInterfaces ) # External dependencies: find_package( CLHEP ) @@ -33,6 +33,3 @@ atlas_add_component( ISF_FatrasToolsMS INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel Identifier GaudiKernel MuonSimEvent ISF_FatrasInterfaces TrkParameters TrkExInterfaces MuonReadoutGeometry MuonIdHelpersLib ISF_Event ISF_Interfaces TrkTrack ) -# Install files from the package: -atlas_install_headers( ISF_FatrasToolsMS ) - diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/src/SimHitCreatorMS.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/src/SimHitCreatorMS.cxx index e4243da59403..ebaf8b73d094 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/src/SimHitCreatorMS.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/src/SimHitCreatorMS.cxx @@ -7,7 +7,7 @@ /////////////////////////////////////////////////////////////////// // class header -#include "ISF_FatrasToolsMS/SimHitCreatorMS.h" +#include "SimHitCreatorMS.h" // ISF includes #include "ISF_Event/ISFParticle.h" diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/ISF_FatrasToolsMS/SimHitCreatorMS.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/src/SimHitCreatorMS.h similarity index 100% rename from Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/ISF_FatrasToolsMS/SimHitCreatorMS.h rename to Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/src/SimHitCreatorMS.h diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/src/components/FatrasToolsMS_entries.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/src/components/FatrasToolsMS_entries.cxx index bced6b2e84dc..825c11062435 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/src/components/FatrasToolsMS_entries.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/src/components/FatrasToolsMS_entries.cxx @@ -1,4 +1,4 @@ -#include "ISF_FatrasToolsMS/SimHitCreatorMS.h" +#include "../SimHitCreatorMS.h" DECLARE_COMPONENT( iFatras::SimHitCreatorMS ) -- GitLab From f3190faae6535ba9116ac5969bc770b58136fca6 Mon Sep 17 00:00:00 2001 From: Tamara Vazquez Schroeder <tamara.vazquez.schroeder@cern.ch> Date: Thu, 12 Jul 2018 18:56:29 +0000 Subject: [PATCH 453/562] Merge branch '21.0-ConfigLumi-run310000-mc16e' into '21.0' High mu profile for mc16e as requested in ATLASSIM-3772 See merge request atlas/athena!12690 Former-commit-id: 9f3018b545eb7d6a411175440fcd2b5f15a09e46 --- .../share/configLumi_run310000.py | 124 ++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 Simulation/RunDependentSim/RunDependentSimData/share/configLumi_run310000.py diff --git a/Simulation/RunDependentSim/RunDependentSimData/share/configLumi_run310000.py b/Simulation/RunDependentSim/RunDependentSimData/share/configLumi_run310000.py new file mode 100644 index 000000000000..6ef4ed7b55e9 --- /dev/null +++ b/Simulation/RunDependentSim/RunDependentSimData/share/configLumi_run310000.py @@ -0,0 +1,124 @@ +#################### +## File configLumi_run310000.py: autogenerated configuration file from command +##../athena/Simulation/RunDependentSim/RunDependentSimComps/share/RunDepProfileGenerator.py -r 310000 -s 1550000000 -c 2000 -o configLumi_run310000.py -e {0.5:1,1.5:1,2.5:1,3.5:1,4.5:1,5.5:1,6.5:1,7.5:1,8.5:1,9.5:1,10.5:1,11.5:2,12.5:2,13.5:4,14.5:6,15.5:8,16.5:12,17.5:15,18.5:20,19.5:24,20.5:29,21.5:34,22.5:38,23.5:41,24.5:45,25.5:47,26.5:49,27.5:51,28.5:53,29.5:55,30.5:56,31.5:57,32.5:58,33.5:59,34.5:60,35.5:60,36.5:60,37.5:60,38.5:61,39.5:61,40.5:61,41.5:61,42.5:60,43.5:59,44.5:57,45.5:55,46.5:53,47.5:50,48.5:47,49.5:43,50.5:40,51.5:36,52.5:32,53.5:29,54.5:25,55.5:22,56.5:18,57.5:16,58.5:13,59.5:11,60.5:9,61.5:7,62.5:6,63.5:5,64.5:4,65.5:3,66.5:3,67.5:2,68.5:2,69.5:2,70.5:2,71.5:1,72.5:1,73.5:1,74.5:1,75.5:1,76.5:1,77.5:1,78.5:1,79.5:1,80.5:1,81.5:1,82.5:1,83.5:1,84.5:1,85.5:1,86.5:1,87.5:1,88.5:1,89.5:1,90.5:1,91.5:1,92.5:1,93.5:1,94.5:1,95.5:1,96.5:1,97.5:1,98.5:1,99.5:1} +## Created on Thu Jul 12 17:10:50 2018 +#################### +#Run-dependent digi job configuration file. +#RunDependentSimData/OverrideRunLBLumiDigitConfig.py + +#We need to be able to adjust for different dataset sizes. +if not 'ScaleTaskLength' in dir(): ScaleTaskLength = 1 +_evts = lambda x: int(ScaleTaskLength * x) + +if not 'logging' in dir(): import logging +digilog = logging.getLogger('Digi_trf') +digilog.info('doing RunLumiOverride configuration from file.') +JobMaker=[ + {'run':310000, 'lb':1, 'starttstamp':1550000000, 'dt':0.000, 'evts':_evts(1), 'mu':0.500, 'force_new':False}, + {'run':310000, 'lb':2, 'starttstamp':1550000060, 'dt':0.000, 'evts':_evts(1), 'mu':1.500, 'force_new':False}, + {'run':310000, 'lb':3, 'starttstamp':1550000120, 'dt':0.000, 'evts':_evts(1), 'mu':2.500, 'force_new':False}, + {'run':310000, 'lb':4, 'starttstamp':1550000180, 'dt':0.000, 'evts':_evts(1), 'mu':3.500, 'force_new':False}, + {'run':310000, 'lb':5, 'starttstamp':1550000240, 'dt':0.000, 'evts':_evts(1), 'mu':4.500, 'force_new':False}, + {'run':310000, 'lb':6, 'starttstamp':1550000300, 'dt':0.000, 'evts':_evts(1), 'mu':5.500, 'force_new':False}, + {'run':310000, 'lb':7, 'starttstamp':1550000360, 'dt':0.000, 'evts':_evts(1), 'mu':6.500, 'force_new':False}, + {'run':310000, 'lb':8, 'starttstamp':1550000420, 'dt':0.000, 'evts':_evts(1), 'mu':7.500, 'force_new':False}, + {'run':310000, 'lb':9, 'starttstamp':1550000480, 'dt':0.000, 'evts':_evts(1), 'mu':8.500, 'force_new':False}, + {'run':310000, 'lb':10, 'starttstamp':1550000540, 'dt':0.000, 'evts':_evts(1), 'mu':9.500, 'force_new':False}, + {'run':310000, 'lb':11, 'starttstamp':1550000600, 'dt':0.000, 'evts':_evts(1), 'mu':10.500, 'force_new':False}, + {'run':310000, 'lb':12, 'starttstamp':1550000660, 'dt':0.000, 'evts':_evts(2), 'mu':11.500, 'force_new':False}, + {'run':310000, 'lb':13, 'starttstamp':1550000720, 'dt':0.000, 'evts':_evts(2), 'mu':12.500, 'force_new':False}, + {'run':310000, 'lb':14, 'starttstamp':1550000780, 'dt':0.000, 'evts':_evts(4), 'mu':13.500, 'force_new':False}, + {'run':310000, 'lb':15, 'starttstamp':1550000840, 'dt':0.000, 'evts':_evts(6), 'mu':14.500, 'force_new':False}, + {'run':310000, 'lb':16, 'starttstamp':1550000900, 'dt':0.000, 'evts':_evts(8), 'mu':15.500, 'force_new':False}, + {'run':310000, 'lb':17, 'starttstamp':1550000960, 'dt':0.000, 'evts':_evts(12), 'mu':16.500, 'force_new':False}, + {'run':310000, 'lb':18, 'starttstamp':1550001020, 'dt':0.000, 'evts':_evts(15), 'mu':17.500, 'force_new':False}, + {'run':310000, 'lb':19, 'starttstamp':1550001080, 'dt':0.000, 'evts':_evts(20), 'mu':18.500, 'force_new':False}, + {'run':310000, 'lb':20, 'starttstamp':1550001140, 'dt':0.000, 'evts':_evts(24), 'mu':19.500, 'force_new':False}, + {'run':310000, 'lb':21, 'starttstamp':1550001200, 'dt':0.000, 'evts':_evts(29), 'mu':20.500, 'force_new':False}, + {'run':310000, 'lb':22, 'starttstamp':1550001260, 'dt':0.000, 'evts':_evts(34), 'mu':21.500, 'force_new':False}, + {'run':310000, 'lb':23, 'starttstamp':1550001320, 'dt':0.000, 'evts':_evts(38), 'mu':22.500, 'force_new':False}, + {'run':310000, 'lb':24, 'starttstamp':1550001380, 'dt':0.000, 'evts':_evts(41), 'mu':23.500, 'force_new':False}, + {'run':310000, 'lb':25, 'starttstamp':1550001440, 'dt':0.000, 'evts':_evts(45), 'mu':24.500, 'force_new':False}, + {'run':310000, 'lb':26, 'starttstamp':1550001500, 'dt':0.000, 'evts':_evts(47), 'mu':25.500, 'force_new':False}, + {'run':310000, 'lb':27, 'starttstamp':1550001560, 'dt':0.000, 'evts':_evts(49), 'mu':26.500, 'force_new':False}, + {'run':310000, 'lb':28, 'starttstamp':1550001620, 'dt':0.000, 'evts':_evts(51), 'mu':27.500, 'force_new':False}, + {'run':310000, 'lb':29, 'starttstamp':1550001680, 'dt':0.000, 'evts':_evts(53), 'mu':28.500, 'force_new':False}, + {'run':310000, 'lb':30, 'starttstamp':1550001740, 'dt':0.000, 'evts':_evts(55), 'mu':29.500, 'force_new':False}, + {'run':310000, 'lb':31, 'starttstamp':1550001800, 'dt':0.000, 'evts':_evts(56), 'mu':30.500, 'force_new':False}, + {'run':310000, 'lb':32, 'starttstamp':1550001860, 'dt':0.000, 'evts':_evts(57), 'mu':31.500, 'force_new':False}, + {'run':310000, 'lb':33, 'starttstamp':1550001920, 'dt':0.000, 'evts':_evts(58), 'mu':32.500, 'force_new':False}, + {'run':310000, 'lb':34, 'starttstamp':1550001980, 'dt':0.000, 'evts':_evts(59), 'mu':33.500, 'force_new':False}, + {'run':310000, 'lb':35, 'starttstamp':1550002040, 'dt':0.000, 'evts':_evts(60), 'mu':34.500, 'force_new':False}, + {'run':310000, 'lb':36, 'starttstamp':1550002100, 'dt':0.000, 'evts':_evts(60), 'mu':35.500, 'force_new':False}, + {'run':310000, 'lb':37, 'starttstamp':1550002160, 'dt':0.000, 'evts':_evts(60), 'mu':36.500, 'force_new':False}, + {'run':310000, 'lb':38, 'starttstamp':1550002220, 'dt':0.000, 'evts':_evts(60), 'mu':37.500, 'force_new':False}, + {'run':310000, 'lb':39, 'starttstamp':1550002280, 'dt':0.000, 'evts':_evts(61), 'mu':38.500, 'force_new':False}, + {'run':310000, 'lb':40, 'starttstamp':1550002340, 'dt':0.000, 'evts':_evts(61), 'mu':39.500, 'force_new':False}, + {'run':310000, 'lb':41, 'starttstamp':1550002400, 'dt':0.000, 'evts':_evts(61), 'mu':40.500, 'force_new':False}, + {'run':310000, 'lb':42, 'starttstamp':1550002460, 'dt':0.000, 'evts':_evts(61), 'mu':41.500, 'force_new':False}, + {'run':310000, 'lb':43, 'starttstamp':1550002520, 'dt':0.000, 'evts':_evts(60), 'mu':42.500, 'force_new':False}, + {'run':310000, 'lb':44, 'starttstamp':1550002580, 'dt':0.000, 'evts':_evts(59), 'mu':43.500, 'force_new':False}, + {'run':310000, 'lb':45, 'starttstamp':1550002640, 'dt':0.000, 'evts':_evts(57), 'mu':44.500, 'force_new':False}, + {'run':310000, 'lb':46, 'starttstamp':1550002700, 'dt':0.000, 'evts':_evts(55), 'mu':45.500, 'force_new':False}, + {'run':310000, 'lb':47, 'starttstamp':1550002760, 'dt':0.000, 'evts':_evts(53), 'mu':46.500, 'force_new':False}, + {'run':310000, 'lb':48, 'starttstamp':1550002820, 'dt':0.000, 'evts':_evts(50), 'mu':47.500, 'force_new':False}, + {'run':310000, 'lb':49, 'starttstamp':1550002880, 'dt':0.000, 'evts':_evts(47), 'mu':48.500, 'force_new':False}, + {'run':310000, 'lb':50, 'starttstamp':1550002940, 'dt':0.000, 'evts':_evts(43), 'mu':49.500, 'force_new':False}, + {'run':310000, 'lb':51, 'starttstamp':1550003000, 'dt':0.000, 'evts':_evts(40), 'mu':50.500, 'force_new':False}, + {'run':310000, 'lb':52, 'starttstamp':1550003060, 'dt':0.000, 'evts':_evts(36), 'mu':51.500, 'force_new':False}, + {'run':310000, 'lb':53, 'starttstamp':1550003120, 'dt':0.000, 'evts':_evts(32), 'mu':52.500, 'force_new':False}, + {'run':310000, 'lb':54, 'starttstamp':1550003180, 'dt':0.000, 'evts':_evts(29), 'mu':53.500, 'force_new':False}, + {'run':310000, 'lb':55, 'starttstamp':1550003240, 'dt':0.000, 'evts':_evts(25), 'mu':54.500, 'force_new':False}, + {'run':310000, 'lb':56, 'starttstamp':1550003300, 'dt':0.000, 'evts':_evts(22), 'mu':55.500, 'force_new':False}, + {'run':310000, 'lb':57, 'starttstamp':1550003360, 'dt':0.000, 'evts':_evts(18), 'mu':56.500, 'force_new':False}, + {'run':310000, 'lb':58, 'starttstamp':1550003420, 'dt':0.000, 'evts':_evts(16), 'mu':57.500, 'force_new':False}, + {'run':310000, 'lb':59, 'starttstamp':1550003480, 'dt':0.000, 'evts':_evts(13), 'mu':58.500, 'force_new':False}, + {'run':310000, 'lb':60, 'starttstamp':1550003540, 'dt':0.000, 'evts':_evts(11), 'mu':59.500, 'force_new':False}, + {'run':310000, 'lb':61, 'starttstamp':1550003600, 'dt':0.000, 'evts':_evts(9), 'mu':60.500, 'force_new':False}, + {'run':310000, 'lb':62, 'starttstamp':1550003660, 'dt':0.000, 'evts':_evts(7), 'mu':61.500, 'force_new':False}, + {'run':310000, 'lb':63, 'starttstamp':1550003720, 'dt':0.000, 'evts':_evts(6), 'mu':62.500, 'force_new':False}, + {'run':310000, 'lb':64, 'starttstamp':1550003780, 'dt':0.000, 'evts':_evts(5), 'mu':63.500, 'force_new':False}, + {'run':310000, 'lb':65, 'starttstamp':1550003840, 'dt':0.000, 'evts':_evts(4), 'mu':64.500, 'force_new':False}, + {'run':310000, 'lb':66, 'starttstamp':1550003900, 'dt':0.000, 'evts':_evts(3), 'mu':65.500, 'force_new':False}, + {'run':310000, 'lb':67, 'starttstamp':1550003960, 'dt':0.000, 'evts':_evts(3), 'mu':66.500, 'force_new':False}, + {'run':310000, 'lb':68, 'starttstamp':1550004020, 'dt':0.000, 'evts':_evts(2), 'mu':67.500, 'force_new':False}, + {'run':310000, 'lb':69, 'starttstamp':1550004080, 'dt':0.000, 'evts':_evts(2), 'mu':68.500, 'force_new':False}, + {'run':310000, 'lb':70, 'starttstamp':1550004140, 'dt':0.000, 'evts':_evts(2), 'mu':69.500, 'force_new':False}, + {'run':310000, 'lb':71, 'starttstamp':1550004200, 'dt':0.000, 'evts':_evts(2), 'mu':70.500, 'force_new':False}, + {'run':310000, 'lb':72, 'starttstamp':1550004260, 'dt':0.000, 'evts':_evts(1), 'mu':71.500, 'force_new':False}, + {'run':310000, 'lb':73, 'starttstamp':1550004320, 'dt':0.000, 'evts':_evts(1), 'mu':72.500, 'force_new':False}, + {'run':310000, 'lb':74, 'starttstamp':1550004380, 'dt':0.000, 'evts':_evts(1), 'mu':73.500, 'force_new':False}, + {'run':310000, 'lb':75, 'starttstamp':1550004440, 'dt':0.000, 'evts':_evts(1), 'mu':74.500, 'force_new':False}, + {'run':310000, 'lb':76, 'starttstamp':1550004500, 'dt':0.000, 'evts':_evts(1), 'mu':75.500, 'force_new':False}, + {'run':310000, 'lb':77, 'starttstamp':1550004560, 'dt':0.000, 'evts':_evts(1), 'mu':76.500, 'force_new':False}, + {'run':310000, 'lb':78, 'starttstamp':1550004620, 'dt':0.000, 'evts':_evts(1), 'mu':77.500, 'force_new':False}, + {'run':310000, 'lb':79, 'starttstamp':1550004680, 'dt':0.000, 'evts':_evts(1), 'mu':78.500, 'force_new':False}, + {'run':310000, 'lb':80, 'starttstamp':1550004740, 'dt':0.000, 'evts':_evts(1), 'mu':79.500, 'force_new':False}, + {'run':310000, 'lb':81, 'starttstamp':1550004800, 'dt':0.000, 'evts':_evts(1), 'mu':80.500, 'force_new':False}, + {'run':310000, 'lb':82, 'starttstamp':1550004860, 'dt':0.000, 'evts':_evts(1), 'mu':81.500, 'force_new':False}, + {'run':310000, 'lb':83, 'starttstamp':1550004920, 'dt':0.000, 'evts':_evts(1), 'mu':82.500, 'force_new':False}, + {'run':310000, 'lb':84, 'starttstamp':1550004980, 'dt':0.000, 'evts':_evts(1), 'mu':83.500, 'force_new':False}, + {'run':310000, 'lb':85, 'starttstamp':1550005040, 'dt':0.000, 'evts':_evts(1), 'mu':84.500, 'force_new':False}, + {'run':310000, 'lb':86, 'starttstamp':1550005100, 'dt':0.000, 'evts':_evts(1), 'mu':85.500, 'force_new':False}, + {'run':310000, 'lb':87, 'starttstamp':1550005160, 'dt':0.000, 'evts':_evts(1), 'mu':86.500, 'force_new':False}, + {'run':310000, 'lb':88, 'starttstamp':1550005220, 'dt':0.000, 'evts':_evts(1), 'mu':87.500, 'force_new':False}, + {'run':310000, 'lb':89, 'starttstamp':1550005280, 'dt':0.000, 'evts':_evts(1), 'mu':88.500, 'force_new':False}, + {'run':310000, 'lb':90, 'starttstamp':1550005340, 'dt':0.000, 'evts':_evts(1), 'mu':89.500, 'force_new':False}, + {'run':310000, 'lb':91, 'starttstamp':1550005400, 'dt':0.000, 'evts':_evts(1), 'mu':90.500, 'force_new':False}, + {'run':310000, 'lb':92, 'starttstamp':1550005460, 'dt':0.000, 'evts':_evts(1), 'mu':91.500, 'force_new':False}, + {'run':310000, 'lb':93, 'starttstamp':1550005520, 'dt':0.000, 'evts':_evts(1), 'mu':92.500, 'force_new':False}, + {'run':310000, 'lb':94, 'starttstamp':1550005580, 'dt':0.000, 'evts':_evts(1), 'mu':93.500, 'force_new':False}, + {'run':310000, 'lb':95, 'starttstamp':1550005640, 'dt':0.000, 'evts':_evts(1), 'mu':94.500, 'force_new':False}, + {'run':310000, 'lb':96, 'starttstamp':1550005700, 'dt':0.000, 'evts':_evts(1), 'mu':95.500, 'force_new':False}, + {'run':310000, 'lb':97, 'starttstamp':1550005760, 'dt':0.000, 'evts':_evts(1), 'mu':96.500, 'force_new':False}, + {'run':310000, 'lb':98, 'starttstamp':1550005820, 'dt':0.000, 'evts':_evts(1), 'mu':97.500, 'force_new':False}, + {'run':310000, 'lb':99, 'starttstamp':1550005880, 'dt':0.000, 'evts':_evts(1), 'mu':98.500, 'force_new':False}, + {'run':310000, 'lb':100, 'starttstamp':1550005940, 'dt':0.000, 'evts':_evts(1), 'mu':99.500, 'force_new':False}, +#--> end hiding +] + +include('RunDependentSimData/configCommon.py') + +#cleanup python memory +if not "RunDMC_testing_configuration" in dir(): + del JobMaker -- GitLab From a7f7c90802fe7e5e84db2da641d7c552b29fe6e8 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Fri, 13 Jul 2018 16:01:28 +0200 Subject: [PATCH 454/562] Implemented suggestions from @tamartin Former-commit-id: 3e1734a27cf653070d6d812fa4075707eab0e521 --- Control/AthViews/AthViews/ViewHelper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Control/AthViews/AthViews/ViewHelper.h b/Control/AthViews/AthViews/ViewHelper.h index 5c94284b84fd..13e720fd196a 100644 --- a/Control/AthViews/AthViews/ViewHelper.h +++ b/Control/AthViews/AthViews/ViewHelper.h @@ -310,7 +310,7 @@ namespace ViewHelper auto handle = SG::makeHandle( rhKey, context ); if ( handle.setProxyDict( nview ).isFailure() ) { // we ignore it besause the handle will be invalid anyways if this call is unsuccesfull - return SG::ReadHandle<T>( "CantSetViewProxy" ); + throw std::runtime_error("Can't make ReadHandle of key " + rhKey.key() + " type " + ClassID_traits<T>::typeName() + " in view " + view->name() ); } return handle; } -- GitLab From fba16cf5a23f7834e883a5fe22176edee822f14b Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Sat, 14 Jul 2018 00:23:57 +0200 Subject: [PATCH 455/562] Fix for coverity 114677 by initialising variables in InDetTrigTrackPRD_Association.h Former-commit-id: 95f7495eb865d9bb506350b164051ac4f97ae149 --- .../InDetTrigTrackPRD_Association.h | 6 ++++-- .../src/InDetTrigTrackPRD_Association.cxx | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackPRD_Association/InDetTrigTrackPRD_Association/InDetTrigTrackPRD_Association.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackPRD_Association/InDetTrigTrackPRD_Association/InDetTrigTrackPRD_Association.h index 9beda3c1d10a..9c8e1a4f87e2 100755 --- a/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackPRD_Association/InDetTrigTrackPRD_Association/InDetTrigTrackPRD_Association.h +++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackPRD_Association/InDetTrigTrackPRD_Association/InDetTrigTrackPRD_Association.h @@ -11,6 +11,8 @@ //!< Trigger specific stuff #include "TrigTimeAlgs/TrigTimerSvc.h" #include "TrigInterfaces/FexAlgo.h" +#include <vector> +#include <iosfwd> namespace InDet { @@ -52,10 +54,10 @@ namespace InDet { std::vector<std::string> m_tracksName ; // Name of track collections ToolHandle<Trk::IPRD_AssociationTool> m_assoTool ; // Assotiation tool - int m_outputlevel ; + int m_outputlevel{} ; int m_tracksPRD[10]; int m_tracksPRDn[10]; - int m_nprint; + int m_nprint{}; bool m_istracks[10]; /////////////////////////////////////////////////////////////////// diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackPRD_Association/src/InDetTrigTrackPRD_Association.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackPRD_Association/src/InDetTrigTrackPRD_Association.cxx index 91f1dbd6dc8f..7e83fced9a7e 100755 --- a/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackPRD_Association/src/InDetTrigTrackPRD_Association.cxx +++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackPRD_Association/src/InDetTrigTrackPRD_Association.cxx @@ -5,6 +5,7 @@ #include "InDetTrigTrackPRD_Association/InDetTrigTrackPRD_Association.h" #include "TrkTrack/TrackCollection.h" #include "TrkTrack/Track.h" +#include <ostream> /////////////////////////////////////////////////////////////////// -- GitLab From 061e30dffcadc8cc36dc5575b51d22cbedc58fe9 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Fri, 13 Jul 2018 22:27:36 +0000 Subject: [PATCH 456/562] 22.0 coverity SiSpacePointsSeedTool_xk Former-commit-id: d6ca4efbd5011ea2949d0c901e16bcb065e877df --- .../SiSpacePointsSeedMaker_ATLxk.h | 181 ++++++++-------- .../SiSpacePointsSeedMaker_BeamGas.h | 137 ++++++------ .../SiSpacePointsSeedMaker_Cosmic.h | 103 ++++----- .../SiSpacePointsSeedMaker_HeavyIon.h | 150 ++++++------- .../SiSpacePointsSeedMaker_ITK.h | 197 +++++++++--------- .../SiSpacePointsSeedMaker_LowMomentum.h | 138 ++++++------ .../SiSpacePointsSeedMaker_Trigger.h | 150 +++++++------ .../src/SiSpacePointsSeedMaker_ATLxk.cxx | 4 +- .../src/SiSpacePointsSeedMaker_BeamGas.cxx | 4 +- .../src/SiSpacePointsSeedMaker_Cosmic.cxx | 2 +- .../src/SiSpacePointsSeedMaker_HeavyIon.cxx | 3 +- .../src/SiSpacePointsSeedMaker_ITK.cxx | 43 ++-- .../SiSpacePointsSeedMaker_LowMomentum.cxx | 4 +- .../src/SiSpacePointsSeedMaker_Trigger.cxx | 3 +- 14 files changed, 565 insertions(+), 554 deletions(-) diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h index f603d96b4ed2..aa6566796631 100755 --- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h +++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h @@ -16,7 +16,7 @@ #ifndef SiSpacePointsSeedMaker_ATLxk_H #define SiSpacePointsSeedMaker_ATLxk_H -#include <list> + #include "GaudiKernel/ServiceHandle.h" #include "MagFieldInterfaces/IMagFieldSvc.h" #include "GaudiKernel/ToolHandle.h" @@ -24,10 +24,14 @@ #include "InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h" #include "TrkSpacePoint/SpacePointContainer.h" #include "TrkSpacePoint/SpacePointOverlapCollection.h" -#include "InDetBeamSpotService/IBeamCondSvc.h" #include "SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h" #include "SiSpacePointsSeedTool_xk/SiSpacePointsProSeed.h" +#include <iosfwd> +#include <list> +#include <set> +#include <map> +#include <vector> class MsgStream ; class IBeamCondSvc; @@ -117,71 +121,71 @@ namespace InDet { /////////////////////////////////////////////////////////////////// ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle ; - MagField::IMagFieldSvc* m_fieldService ; + MagField::IMagFieldSvc* m_fieldService{} ; IBeamCondSvc* p_beam ; - bool m_pixel ; - bool m_sct ; - bool m_endlist ; - bool m_useOverlap ; - bool m_useassoTool ; - bool m_trigger ; - bool m_checketa ; - bool m_isvertex ; - bool m_dbm ; - int m_outputlevel ; - int m_nprint ; - int m_state ; - int m_nspoint ; - int m_mode ; - int m_nlist ; - int m_maxsize ; - int m_iteration ; - unsigned int m_maxNumberVertices ; - float m_etamin, m_etamax ; - float m_r1min, m_r1minv ; - float m_r1max, m_r1maxv ; - float m_r2min, m_r2minv ; - float m_r2max, m_r2maxv ; - float m_r3min ; - float m_r3max ; - float m_drmin, m_drminv ; - float m_drmax ; - float m_rapcut ; - float m_dzdrmin0 ; - float m_dzdrmax0 ; - float m_dzdrmin ; - float m_dzdrmax ; - float m_zmin ; - float m_zmax ; - float m_zminU ; - float m_zmaxU ; - float m_zminB ; - float m_zmaxB ; - float m_ftrig ; - float m_ftrigW ; - float m_r_rmax ; - float m_r_rstep ; - float m_dzver ; - float m_dzdrver ; - float m_diver ; - float m_diverpps ; - float m_diversss ; - float m_divermax ; - float m_dazmax ; - float m_ptmin ; - float m_ipt ; - float m_ipt2 ; - float m_COF ; - float m_K ; - float m_ipt2K ; - float m_ipt2C ; - float m_COFK ; - float m_umax ; - int m_r_size ; - int m_r_first ; - int m_rf_size ; - int m_rfz_size ; + bool m_pixel{} ; + bool m_sct{} ; + bool m_endlist{} ; + bool m_useOverlap{} ; + bool m_useassoTool{} ; + bool m_trigger{} ; + bool m_checketa{} ; + bool m_isvertex{} ; + bool m_dbm{} ; + int m_outputlevel{} ; + int m_nprint{} ; + int m_state{} ; + int m_nspoint{} ; + int m_mode{} ; + int m_nlist{} ; + int m_maxsize{} ; + int m_iteration{} ; + unsigned int m_maxNumberVertices{} ; + float m_etamin{}, m_etamax{} ; + float m_r1min{}, m_r1minv{} ; + float m_r1max{}, m_r1maxv{} ; + float m_r2min{}, m_r2minv{} ; + float m_r2max{}, m_r2maxv{} ; + float m_r3min{} ; + float m_r3max{} ; + float m_drmin{}, m_drminv{} ; + float m_drmax{} ; + float m_rapcut{} ; + float m_dzdrmin0{} ; + float m_dzdrmax0{} ; + float m_dzdrmin{} ; + float m_dzdrmax{} ; + float m_zmin{} ; + float m_zmax{} ; + float m_zminU{} ; + float m_zmaxU{} ; + float m_zminB{} ; + float m_zmaxB{} ; + float m_ftrig{} ; + float m_ftrigW{} ; + float m_r_rmax{} ; + float m_r_rstep{} ; + float m_dzver{} ; + float m_dzdrver{} ; + float m_diver{} ; + float m_diverpps{} ; + float m_diversss{} ; + float m_divermax{} ; + float m_dazmax{} ; + float m_ptmin{} ; + float m_ipt{} ; + float m_ipt2 {} ; + float m_COF{} ; + float m_K{} ; + float m_ipt2K{} ; + float m_ipt2C{} ; + float m_COFK{} ; + float m_umax{} ; + int m_r_size {} ; + int m_r_first{} ; + int m_rf_size {} ; + int m_rfz_size{} ; std::list<InDet::SiSpacePointForSeed*>* m_r_Sorted ; std::list<InDet::SiSpacePointForSeed*> m_rfz_Sorted [ 583] ; std::list<InDet::SiSpacePointForSeed*> m_rfzv_Sorted[ 300] ; @@ -189,32 +193,32 @@ namespace InDet { std::list<InDet::SiSpacePointForSeed*>::iterator m_i_spforseed; std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin ; - int m_ns,m_nsaz,m_nsazv ; - int m_fNmax,m_fvNmax ; - int m_fNmin,m_fvNmin ; - int m_zMin ; - int m_nr ; int* m_r_index ; int* m_r_map ; - int m_nrfz , m_rfz_index [583], m_rfz_map [583] ; - int m_nrfzv , m_rfzv_index [300], m_rfzv_map [300] ; + int m_ns{},m_nsaz{},m_nsazv{} ; + int m_fNmax{},m_fvNmax{} ; + int m_fNmin{},m_fvNmin{} ; + int m_zMin{} ; + int m_nr{} ; int* m_r_index{} ; int* m_r_map{} ; + int m_nrfz{} , m_rfz_index [583], m_rfz_map [583] ; + int m_nrfzv{} , m_rfzv_index [300], m_rfzv_map [300] ; int m_rfz_b[583],m_rfz_t[593],m_rfz_ib[583][9],m_rfz_it[583][9] ; int m_rfzv_n[300],m_rfzv_i[300][6] ; - float m_sF ; - float m_sFv ; + float m_sF{} ; + float m_sFv{} ; /////////////////////////////////////////////////////////////////// // Tables for 3 space points seeds search /////////////////////////////////////////////////////////////////// - int m_maxsizeSP ; + int m_maxsizeSP{} ; InDet::SiSpacePointForSeed** m_SP ; - float * m_Zo ; - float * m_Tz ; - float * m_R ; - float * m_U ; - float * m_V ; - float * m_Er ; + float * m_Zo{} ; + float * m_Tz{} ; + float * m_R{} ; + float * m_U{} ; + float * m_V{} ; + float * m_Er{} ; - InDet::SiSpacePointsSeed* m_seedOutput ; + InDet::SiSpacePointsSeed* m_seedOutput{} ; std::list<InDet::SiSpacePointsProSeed*> m_l_seeds ; std::list<InDet::SiSpacePointsProSeed*>::iterator m_i_seed ; @@ -224,10 +228,10 @@ namespace InDet { std::multimap<float,InDet::SiSpacePointsProSeed*>::iterator m_seed ; std::multimap<float,InDet::SiSpacePointsProSeed*> m_mapOneSeeds; - InDet::SiSpacePointsProSeed* m_OneSeeds ; - int m_maxOneSize ; - int m_nOneSeeds ; - int m_fillOneSeeds; + InDet::SiSpacePointsProSeed* m_OneSeeds{} ; + int m_maxOneSize{} ; + int m_nOneSeeds{} ; + int m_fillOneSeeds{}; std::set<float> m_l_vertex ; std::vector<std::pair<float,InDet::SiSpacePointForSeed*>> m_CmSp; @@ -242,10 +246,7 @@ namespace InDet { /////////////////////////////////////////////////////////////////// // Space points container /////////////////////////////////////////////////////////////////// - -// std::string m_spacepointsSCTname ; -// std::string m_spacepointsPixelname ; -// std::string m_spacepointsOverlapname ; + std::string m_beamconditions ; SG::ReadHandle<SpacePointContainer> m_spacepointsSCT ; SG::ReadHandle<SpacePointContainer> m_spacepointsPixel ; diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_BeamGas.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_BeamGas.h index 104141d8a10a..544e2d29618f 100755 --- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_BeamGas.h +++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_BeamGas.h @@ -16,7 +16,7 @@ #ifndef SiSpacePointsSeedMaker_BeamGas_H #define SiSpacePointsSeedMaker_BeamGas_H -#include <list> + #include "GaudiKernel/ServiceHandle.h" #include "MagFieldInterfaces/IMagFieldSvc.h" #include "GaudiKernel/ToolHandle.h" @@ -24,9 +24,12 @@ #include "InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h" #include "TrkSpacePoint/SpacePointContainer.h" #include "TrkSpacePoint/SpacePointOverlapCollection.h" -#include "InDetBeamSpotService/IBeamCondSvc.h" #include "SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h" +#include <list> +#include <map> +#include <vector> +#include <iosfwd> class MsgStream ; class IBeamCondSvc; @@ -117,52 +120,52 @@ namespace InDet { /////////////////////////////////////////////////////////////////// ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle ; - MagField::IMagFieldSvc* m_fieldService ; + MagField::IMagFieldSvc* m_fieldService{} ; ToolHandle<Trk::IPRD_AssociationTool> m_assoTool ; - IBeamCondSvc* p_beam ; - - bool m_pixel ; - bool m_sct ; - bool m_endlist ; - bool m_useOverlap ; - bool m_useassoTool ; - int m_outputlevel ; - int m_nprint ; - int m_state ; - int m_nspoint ; - int m_mode ; - int m_nlist ; - int m_maxsize ; - float m_r1min ; - float m_r1max ; - float m_r2min ; - float m_r2max ; - float m_r3min ; - float m_r3max ; - float m_drmin ; - float m_drmax ; - float m_rapcut ; - float m_dzdrmin ; - float m_dzdrmax ; - float m_zmin ; - float m_zmax ; - float m_r_rmax ; - float m_r_rstep ; - float m_dzver ; - float m_dzdrver ; - float m_diver ; - float m_diverpps ; - float m_dazmax ; - float m_ptmin ; - float m_ipt ; - float m_ipt2 ; - float m_COF ; - float m_K ; - - int m_r_size ; - int m_rf_size ; - int m_rfz_size ; + IBeamCondSvc* p_beam {} ; + + bool m_pixel {} ; + bool m_sct {} ; + bool m_endlist {} ; + bool m_useOverlap{} ; + bool m_useassoTool {} ; + int m_outputlevel{} ; + int m_nprint {} ; + int m_state {} ; + int m_nspoint{} ; + int m_mode {} ; + int m_nlist{} ; + int m_maxsize {} ; + float m_r1min{} ; + float m_r1max {} ; + float m_r2min {} ; + float m_r2max {} ; + float m_r3min {} ; + float m_r3max {} ; + float m_drmin {} ; + float m_drmax {} ; + float m_rapcut {} ; + float m_dzdrmin{} ; + float m_dzdrmax{} ; + float m_zmin {} ; + float m_zmax {} ; + float m_r_rmax{} ; + float m_r_rstep {} ; + float m_dzver {} ; + float m_dzdrver {} ; + float m_diver {} ; + float m_diverpps {} ; + float m_dazmax{} ; + float m_ptmin {} ; + float m_ipt {} ; + float m_ipt2 {} ; + float m_COF {} ; + float m_K {} ; + + int m_r_size {} ; + int m_rf_size {} ; + int m_rfz_size {} ; std::list<InDet::SiSpacePointForSeed*>* m_r_Sorted ; std::list<InDet::SiSpacePointForSeed*> m_rf_Sorted [ 53] ; std::list<InDet::SiSpacePointForSeed*> m_rfz_Sorted [ 583] ; @@ -170,37 +173,37 @@ namespace InDet { std::list<InDet::SiSpacePointForSeed*>::iterator m_i_spforseed; std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin ; - int m_ns,m_nsaz ; - int m_fNmax ; - int m_fNmin ; - int m_zMin ; - int m_nr ; int* m_r_index ; int* m_r_map ; - int m_nrf , m_rf_index [ 53], m_rf_map [ 53] ; - int m_nrfz , m_rfz_index [583], m_rfz_map [583] ; + int m_ns{},m_nsaz {} ; + int m_fNmax {} ; + int m_fNmin {} ; + int m_zMin {} ; + int m_nr{} ; int* m_r_index{} ; int* m_r_map {} ; + int m_nrf {} , m_rf_index [ 53], m_rf_map [ 53] ; + int m_nrfz {} , m_rfz_index [583], m_rfz_map [583] ; int m_rfz_b[583],m_rfz_t[593],m_rfz_ib[583][12],m_rfz_it[583][12] ; - float m_sF ; + float m_sF {} ; /////////////////////////////////////////////////////////////////// // Tables for 3 space points seeds search /////////////////////////////////////////////////////////////////// - int m_maxsizeSP ; - InDet::SiSpacePointForSeed** m_SP ; - float * m_R ; - float * m_Tz ; - float * m_Er ; - float * m_U ; - float * m_V ; - float * m_Zo ; + int m_maxsizeSP{} ; + InDet::SiSpacePointForSeed** m_SP {} ; + float * m_R {} ; + float * m_Tz {} ; + float * m_Er {} ; + float * m_U {} ; + float * m_V {} ; + float * m_Zo{} ; std::list<InDet::SiSpacePointsSeed*> m_l_seeds ; std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seed ; std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seede ; std::multimap<float,InDet::SiSpacePointsSeed*> m_mapOneSeeds; - InDet::SiSpacePointsSeed* m_OneSeeds ; - int m_maxOneSize ; - int m_nOneSeeds ; + InDet::SiSpacePointsSeed* m_OneSeeds {} ; + int m_maxOneSize{} ; + int m_nOneSeeds{} ; /////////////////////////////////////////////////////////////////// // Beam geometry @@ -214,9 +217,7 @@ namespace InDet { // Space points container /////////////////////////////////////////////////////////////////// -// std::string m_spacepointsSCTname ; -// std::string m_spacepointsPixelname ; -// std::string m_spacepointsOverlapname ; + std::string m_beamconditions ; SG::ReadHandle<SpacePointContainer> m_spacepointsSCT ; SG::ReadHandle<SpacePointContainer> m_spacepointsPixel ; diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Cosmic.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Cosmic.h index d4427f2e4c4e..708c4f29f8c9 100755 --- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Cosmic.h +++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Cosmic.h @@ -16,7 +16,7 @@ #ifndef SiSpacePointsSeedMaker_Cosmic_H #define SiSpacePointsSeedMaker_Cosmic_H -#include <list> + #include "GaudiKernel/ServiceHandle.h" #include "MagFieldInterfaces/IMagFieldSvc.h" #include "GaudiKernel/ToolHandle.h" @@ -26,11 +26,14 @@ #include "TrkSpacePoint/SpacePointOverlapCollection.h" #include "SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h" +#include <iosfwd> +#include <list> +#include <map> +#include <vector> class MsgStream ; namespace Trk { - class IPRD_AssociationTool; } @@ -117,41 +120,41 @@ namespace InDet { /////////////////////////////////////////////////////////////////// ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle ; - MagField::IMagFieldSvc* m_fieldService ; + MagField::IMagFieldSvc* m_fieldService {} ; ToolHandle<Trk::IPRD_AssociationTool> m_assoTool ; - bool m_pixel ; - bool m_sct ; - bool m_endlist ; - bool m_useOverlap ; - bool m_useassoTool ; - bool m_checketa ; - int m_outputlevel ; - int m_nprint ; - int m_state ; - int m_nspoint ; - int m_mode ; - int m_nlist ; - int m_maxsize ; - int m_nseeds ; - float m_ptmin ; - float m_drmin ; - float m_drmax ; - float m_rapcut ; - float m_dzdrmin ; - float m_dzdrmax ; - float m_zmin ; - float m_zmax ; - float m_r_rmax ; - float m_r_rstep ; - float m_diver ; - float m_dazmax ; - float m_diverpps ; - float m_diversss ; - float m_etamin, m_etamax ; - int m_r_size ; - int m_rf_size ; - int m_rfz_size ; + bool m_pixel{} ; + bool m_sct {} ; + bool m_endlist {} ; + bool m_useOverlap {} ; + bool m_useassoTool {} ; + bool m_checketa {} ; + int m_outputlevel {} ; + int m_nprint {} ; + int m_state {} ; + int m_nspoint {} ; + int m_mode {} ; + int m_nlist {} ; + int m_maxsize {} ; + int m_nseeds {} ; + float m_ptmin {} ; + float m_drmin {} ; + float m_drmax {} ; + float m_rapcut {} ; + float m_dzdrmin {} ; + float m_dzdrmax {} ; + float m_zmin {} ; + float m_zmax {} ; + float m_r_rmax {} ; + float m_r_rstep {} ; + float m_diver {} ; + float m_dazmax {} ; + float m_diverpps {} ; + float m_diversss {} ; + float m_etamin{} , m_etamax {} ; + int m_r_size {} ; + int m_rf_size {} ; + int m_rfz_size {} ; std::list<InDet::SiSpacePointForSeed*>* m_r_Sorted ; std::list<InDet::SiSpacePointForSeed*> m_rf_Sorted [ 53] ; std::list<InDet::SiSpacePointForSeed*> m_rfz_Sorted [ 583] ; @@ -159,27 +162,27 @@ namespace InDet { std::list<InDet::SiSpacePointForSeed*>::iterator m_i_spforseed; std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin ; - int m_ns,m_nsaz ; - int m_fNmax ; - int m_fNmin ; - int m_zMin ; - int m_nr ; int* m_r_index ; int* m_r_map ; - int m_nrf , m_rf_index [ 53], m_rf_map [ 53] ; - int m_nrfz , m_rfz_index [583], m_rfz_map [583] ; + int m_ns{} ,m_nsaz {} ; + int m_fNmax {} ; + int m_fNmin{} ; + int m_zMin {} ; + int m_nr{} ; int* m_r_index{} ; int* m_r_map{} ; + int m_nrf{} , m_rf_index [ 53], m_rf_map [ 53] ; + int m_nrfz{} , m_rfz_index [583], m_rfz_map [583] ; int m_rfz_b[583],m_rfz_t[593],m_rfz_ib[583][12],m_rfz_it[583][12] ; - float m_sF ; + float m_sF {} ; /////////////////////////////////////////////////////////////////// // Tables for 3 space points seeds search /////////////////////////////////////////////////////////////////// - int m_maxsizeSP ; - InDet::SiSpacePointForSeed** m_SP ; - float * m_R ; - float * m_Tz ; - float * m_Er ; - float * m_U ; - float * m_V ; + int m_maxsizeSP {} ; + InDet::SiSpacePointForSeed** m_SP {} ; + float * m_R {} ; + float * m_Tz {} ; + float * m_Er {} ; + float * m_U {} ; + float * m_V {} ; std::multimap<float,InDet::SiSpacePointsSeed*> m_l_seeds; std::multimap<float,InDet::SiSpacePointsSeed*>::iterator m_i_seed ; diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_HeavyIon.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_HeavyIon.h index 07874b53764a..d448b2d8f3d6 100755 --- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_HeavyIon.h +++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_HeavyIon.h @@ -16,7 +16,7 @@ #ifndef SiSpacePointsSeedMaker_HeavyIon_H #define SiSpacePointsSeedMaker_HeavyIon_H -#include <list> + #include "GaudiKernel/ServiceHandle.h" #include "MagFieldInterfaces/IMagFieldSvc.h" #include "GaudiKernel/ToolHandle.h" @@ -24,9 +24,12 @@ #include "InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h" #include "TrkSpacePoint/SpacePointContainer.h" #include "TrkSpacePoint/SpacePointOverlapCollection.h" -#include "InDetBeamSpotService/IBeamCondSvc.h" #include "SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h" +#include <list> +#include <vector> +#include <map> +#include <iosfwd> class MsgStream ; class IBeamCondSvc; @@ -115,96 +118,96 @@ namespace InDet { /////////////////////////////////////////////////////////////////// ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle ; - MagField::IMagFieldSvc* m_fieldService ; + MagField::IMagFieldSvc* m_fieldService {} ; IBeamCondSvc* p_beam ; - bool m_pixel ; - bool m_sct ; - bool m_endlist ; - bool m_useOverlap ; - bool m_trigger ; - bool m_izvertex ; - int m_outputlevel ; - int m_nprint ; - int m_state ; - int m_nspoint ; - int m_mode ; - int m_nlist ; - int m_maxsize ; - unsigned int m_maxNumberVertices ; - float m_r1min, m_r1minv ; - float m_r1max, m_r1maxv ; - float m_r2min, m_r2minv ; - float m_r2max, m_r2maxv ; - float m_r3min ; - float m_r3max ; - float m_drmin, m_drminv ; - float m_drmax ; - float m_rapcut ; - float m_dzdrmin ; - float m_dzdrmax ; - float m_zmin ; - float m_zmax ; - float m_zminU ; - float m_zmaxU ; - float m_ftrig ; - float m_ftrigW ; - float m_r_rmax ; - float m_r_rstep ; - float m_dzver ; - float m_dzdrver ; - float m_diver ; - float m_diverpps ; - float m_diversss ; - float m_dazmax ; - float m_ptmin ; - float m_ipt ; - float m_ipt2 ; - float m_COF ; - float m_K ; - int m_r_size ; - int m_rf_size ; - int m_rfz_size ; - std::list<InDet::SiSpacePointForSeed*>* m_r_Sorted ; + bool m_pixel {} ; + bool m_sct {} ; + bool m_endlist {} ; + bool m_useOverlap {} ; + bool m_trigger {} ; + bool m_izvertex {} ; + int m_outputlevel {} ; + int m_nprint {} ; + int m_state {} ; + int m_nspoint {} ; + int m_mode {} ; + int m_nlist {} ; + int m_maxsize {} ; + unsigned int m_maxNumberVertices {} ; + float m_r1min{}, m_r1minv {} ; + float m_r1max{}, m_r1maxv {} ; + float m_r2min{}, m_r2minv {} ; + float m_r2max{}, m_r2maxv {} ; + float m_r3min{} ; + float m_r3max{} ; + float m_drmin{}, m_drminv {} ; + float m_drmax{} ; + float m_rapcut {} ; + float m_dzdrmin{} ; + float m_dzdrmax {} ; + float m_zmin{} ; + float m_zmax {} ; + float m_zminU {} ; + float m_zmaxU {} ; + float m_ftrig {} ; + float m_ftrigW {} ; + float m_r_rmax {} ; + float m_r_rstep {} ; + float m_dzver {} ; + float m_dzdrver {} ; + float m_diver {} ; + float m_diverpps {} ; + float m_diversss {} ; + float m_dazmax {} ; + float m_ptmin {} ; + float m_ipt {} ; + float m_ipt2 {} ; + float m_COF {} ; + float m_K {} ; + int m_r_size {} ; + int m_rf_size {} ; + int m_rfz_size {} ; + std::list<InDet::SiSpacePointForSeed*>* m_r_Sorted {} ; std::list<InDet::SiSpacePointForSeed*> m_rfz_Sorted [ 583] ; std::list<InDet::SiSpacePointForSeed*> m_rfzv_Sorted[ 300] ; std::list<InDet::SiSpacePointForSeed*> m_l_spforseed ; std::list<InDet::SiSpacePointForSeed*>::iterator m_i_spforseed; std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin ; - int m_ns,m_nsaz,m_nsazv ; - int m_fNmax,m_fvNmax ; - int m_fNmin,m_fvNmin ; - int m_zMin ; - int m_nr ; int* m_r_index ; int* m_r_map ; - int m_nrfz , m_rfz_index [583], m_rfz_map [583] ; - int m_nrfzv , m_rfzv_index [300], m_rfzv_map [300] ; + int m_ns{},m_nsaz{},m_nsazv {} ; + int m_fNmax{},m_fvNmax {} ; + int m_fNmin{},m_fvNmin {} ; + int m_zMin{} ; + int m_nr{} ; int* m_r_index{} ; int* m_r_map{} ; + int m_nrfz {} , m_rfz_index [583], m_rfz_map [583] ; + int m_nrfzv{} , m_rfzv_index [300], m_rfzv_map [300] ; int m_rfz_b[583],m_rfz_t[593],m_rfz_ib[583][9],m_rfz_it[583][9] ; int m_rfzv_n[300],m_rfzv_i[300][6] ; - float m_sF ; - float m_sFv ; + float m_sF{} ; + float m_sFv {} ; /////////////////////////////////////////////////////////////////// // Tables for 3 space points seeds search /////////////////////////////////////////////////////////////////// - int m_maxsizeSP ; - InDet::SiSpacePointForSeed** m_SP ; - float * m_Zo ; - float * m_Tz ; - float * m_R ; - float * m_U ; - float * m_V ; - float * m_Er ; + int m_maxsizeSP {} ; + InDet::SiSpacePointForSeed** m_SP {} ; + float * m_Zo {} ; + float * m_Tz {} ; + float * m_R {} ; + float * m_U {} ; + float * m_V {} ; + float * m_Er {} ; std::list<InDet::SiSpacePointsSeed*> m_l_seeds ; std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seed ; std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seede ; std::multimap<float,InDet::SiSpacePointsSeed*> m_mapOneSeeds; - InDet::SiSpacePointsSeed* m_OneSeeds ; - int m_maxOneSize ; - int m_nOneSeeds ; + InDet::SiSpacePointsSeed* m_OneSeeds {} ; + int m_maxOneSize {}; + int m_nOneSeeds {} ; std::list<float> m_l_vertex ; /////////////////////////////////////////////////////////////////// @@ -218,10 +221,7 @@ namespace InDet { /////////////////////////////////////////////////////////////////// // Space points container /////////////////////////////////////////////////////////////////// - -// std::string m_spacepointsSCTname ; -// std::string m_spacepointsPixelname ; -// std::string m_spacepointsOverlapname ; + std::string m_beamconditions ; SG::ReadHandle<SpacePointContainer> m_spacepointsSCT ; SG::ReadHandle<SpacePointContainer> m_spacepointsPixel ; diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h index 8a469ff1eefb..387b1a65b774 100755 --- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h +++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h @@ -16,7 +16,7 @@ #ifndef SiSpacePointsSeedMaker_ITK_H #define SiSpacePointsSeedMaker_ITK_H -#include <list> + #include "GaudiKernel/ServiceHandle.h" #include "MagFieldInterfaces/IMagFieldSvc.h" #include "GaudiKernel/ToolHandle.h" @@ -24,10 +24,14 @@ #include "InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h" #include "TrkSpacePoint/SpacePointContainer.h" #include "TrkSpacePoint/SpacePointOverlapCollection.h" -#include "InDetBeamSpotService/IBeamCondSvc.h" #include "SiSpacePointsSeedTool_xk/SiSpacePointForSeedITK.h" #include "SiSpacePointsSeedTool_xk/SiSpacePointsProSeedITK.h" +#include <list> +#include <vector> +#include <map> +#include <set> +#include <iosfwd> class MsgStream ; class IBeamCondSvc; @@ -112,74 +116,74 @@ namespace InDet { /////////////////////////////////////////////////////////////////// ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle ; - MagField::IMagFieldSvc* m_fieldService ; + MagField::IMagFieldSvc* m_fieldService{} ; - IBeamCondSvc* p_beam ; - bool m_pixel ; - bool m_sct ; - bool m_endlist ; - bool m_useOverlap ; - bool m_useassoTool ; - bool m_trigger ; - bool m_checketa ; - bool m_isvertex ; - bool m_dbm ; - int m_outputlevel ; - int m_nprint ; - int m_state ; - int m_nspoint ; - int m_mode ; - int m_nlist ; - int m_maxsize ; - int m_iteration ; - int m_iteration0 ; - unsigned int m_maxNumberVertices ; - float m_etamin, m_etamax ; - float m_r1min, m_r1minv ; - float m_r1max, m_r1maxv ; - float m_r2min, m_r2minv ; - float m_r2max, m_r2maxv ; - float m_r3min ; - float m_r3max ; - float m_drmin, m_drminv ; - float m_drmax ; - float m_rapcut ; - float m_dzdrmin0 ; - float m_dzdrmax0 ; - float m_dzdrmin ; - float m_dzdrmax ; - float m_zmin ; - float m_zmax ; - float m_zminU ; - float m_zmaxU ; - float m_zminB ; - float m_zmaxB ; - float m_ftrig ; - float m_ftrigW ; - float m_r_rmax ; - float m_r_rmin ; - float m_r_rstep ; - float m_dzver ; - float m_dzdrver ; - float m_diver ; - float m_diverpps ; - float m_diversss ; - float m_divermax ; - float m_dazmax ; - float m_ptmin ; - float m_ipt ; - float m_ipt2 ; - float m_COF ; - float m_K ; - float m_ipt2K ; - float m_ipt2C ; - float m_COFK ; - float m_umax ; - float m_dzmaxPPP ; - int m_r_size ; - int m_r_first ; - int m_rf_size ; - int m_rfz_size ; + IBeamCondSvc* p_beam {} ; + bool m_pixel {} ; + bool m_sct {} ; + bool m_endlist {} ; + bool m_useOverlap {} ; + bool m_useassoTool {} ; + bool m_trigger {} ; + bool m_checketa {} ; + bool m_isvertex {} ; + bool m_dbm {} ; + int m_outputlevel {} ; + int m_nprint {} ; + int m_state {} ; + int m_nspoint {} ; + int m_mode {} ; + int m_nlist {} ; + int m_maxsize {} ; + int m_iteration {} ; + int m_iteration0 {} ; + unsigned int m_maxNumberVertices {} ; + float m_etamin{}, m_etamax {} ; + float m_r1min{}, m_r1minv {} ; + float m_r1max{}, m_r1maxv {} ; + float m_r2min{}, m_r2minv {} ; + float m_r2max{}, m_r2maxv{} ; + float m_r3min {} ; + float m_r3max {} ; + float m_drmin{}, m_drminv {} ; + float m_drmax{} ; + float m_rapcut{} ; + float m_dzdrmin0 {} ; + float m_dzdrmax0 {} ; + float m_dzdrmin {} ; + float m_dzdrmax {} ; + float m_zmin {} ; + float m_zmax {} ; + float m_zminU {} ; + float m_zmaxU {} ; + float m_zminB {} ; + float m_zmaxB {} ; + float m_ftrig {} ; + float m_ftrigW {} ; + float m_r_rmax {} ; + float m_r_rmin {} ; + float m_r_rstep {} ; + float m_dzver {} ; + float m_dzdrver {} ; + float m_diver {} ; + float m_diverpps {} ; + float m_diversss {} ; + float m_divermax {} ; + float m_dazmax {} ; + float m_ptmin {} ; + float m_ipt {} ; + float m_ipt2 {} ; + float m_COF {} ; + float m_K {} ; + float m_ipt2K {} ; + float m_ipt2C {} ; + float m_COFK {} ; + float m_umax {} ; + float m_dzmaxPPP {} ; + int m_r_size {} ; + int m_r_first {} ; + int m_rf_size {} ; + int m_rfz_size {} ; std::list<InDet::SiSpacePointForSeedITK*>* m_r_Sorted ; std::list<InDet::SiSpacePointForSeedITK*> m_rfz_Sorted [ 583] ; std::list<InDet::SiSpacePointForSeedITK*> m_rfzv_Sorted[ 300] ; @@ -187,34 +191,34 @@ namespace InDet { std::list<InDet::SiSpacePointForSeedITK*>::iterator m_i_spforseed; std::list<InDet::SiSpacePointForSeedITK*>::iterator m_rMin ; - int m_ns,m_nsaz,m_nsazv ; - int m_fNmax,m_fvNmax ; - int m_fNmin,m_fvNmin ; - int m_zMin ; - int m_nr ; int* m_r_index ; int* m_r_map ; - int m_nrfz , m_rfz_index [583], m_rfz_map [583] ; - int m_nrfzv , m_rfzv_index [300], m_rfzv_map [300] ; + int m_ns{},m_nsaz{},m_nsazv {} ; + int m_fNmax{},m_fvNmax {} ; + int m_fNmin{},m_fvNmin {} ; + int m_zMin{} ; + int m_nr {} ; int* m_r_index{} ; int* m_r_map {} ; + int m_nrfz {} , m_rfz_index [583], m_rfz_map [583] ; + int m_nrfzv {} , m_rfzv_index [300], m_rfzv_map [300] ; int m_rfz_b[583],m_rfz_t[593],m_rfz_ib[583][9],m_rfz_it[583][9] ; int m_rfzv_n[300],m_rfzv_i[300][6] ; - float m_sF ; - float m_sFv ; + float m_sF {} ; + float m_sFv {} ; /////////////////////////////////////////////////////////////////// // Tables for 3 space points seeds search /////////////////////////////////////////////////////////////////// - int m_maxsizeSP ; - InDet::SiSpacePointForSeedITK** m_SP ; - float * m_Zo ; - float * m_Tz ; - float * m_R ; - float * m_U ; - float * m_V ; - float * m_X ; - float * m_Y ; - float * m_Er ; - - InDet::SiSpacePointsSeed* m_seedOutput ; + int m_maxsizeSP {} ; + InDet::SiSpacePointForSeedITK** m_SP {} ; + float * m_Zo {} ; + float * m_Tz {} ; + float * m_R {} ; + float * m_U {} ; + float * m_V {} ; + float * m_X {} ; + float * m_Y {} ; + float * m_Er {} ; + + InDet::SiSpacePointsSeed* m_seedOutput {} ; std::list<InDet::SiSpacePointsProSeedITK*> m_l_seeds; std::list<InDet::SiSpacePointsProSeedITK*>::iterator m_i_seed ; @@ -224,10 +228,10 @@ namespace InDet { std::multimap<float,InDet::SiSpacePointsProSeedITK*>::iterator m_seed ; std::multimap<float,InDet::SiSpacePointsProSeedITK*> m_mapOneSeeds; - InDet::SiSpacePointsProSeedITK* m_OneSeeds ; - int m_maxOneSize ; - int m_nOneSeeds ; - int m_fillOneSeeds; + InDet::SiSpacePointsProSeedITK* m_OneSeeds {} ; + int m_maxOneSize{} ; + int m_nOneSeeds {} ; + int m_fillOneSeeds{}; std::set<float> m_l_vertex ; std::vector<std::pair<float,InDet::SiSpacePointForSeedITK*>> m_CmSp; @@ -242,10 +246,7 @@ namespace InDet { /////////////////////////////////////////////////////////////////// // Space points container /////////////////////////////////////////////////////////////////// - -// std::string m_spacepointsSCTname ; -// std::string m_spacepointsPixelname ; -// std::string m_spacepointsOverlapname ; + std::string m_beamconditions ; SG::ReadHandle<SpacePointContainer> m_spacepointsSCT ; SG::ReadHandle<SpacePointContainer> m_spacepointsPixel ; diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_LowMomentum.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_LowMomentum.h index 7e9f1512c02c..78e0afef89dc 100755 --- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_LowMomentum.h +++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_LowMomentum.h @@ -16,7 +16,7 @@ #ifndef SiSpacePointsSeedMaker_LowMomentum_H #define SiSpacePointsSeedMaker_LowMomentum_H -#include <list> + #include "GaudiKernel/ServiceHandle.h" #include "MagFieldInterfaces/IMagFieldSvc.h" #include "GaudiKernel/ToolHandle.h" @@ -24,9 +24,11 @@ #include "InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h" #include "TrkSpacePoint/SpacePointContainer.h" #include "TrkSpacePoint/SpacePointOverlapCollection.h" -#include "InDetBeamSpotService/IBeamCondSvc.h" #include "SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h" +#include <list> +#include <map> +#include <vector> class MsgStream ; class IBeamCondSvc; @@ -119,88 +121,88 @@ namespace InDet { /////////////////////////////////////////////////////////////////// ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle ; - MagField::IMagFieldSvc* m_fieldService ; - - IBeamCondSvc* p_beam ; - bool m_pixel ; - bool m_sct ; - bool m_endlist ; - bool m_useOverlap ; - bool m_useassoTool ; - bool m_trigger ; - int m_outputlevel ; - int m_nprint ; - int m_state ; - int m_nspoint ; - int m_mode ; - int m_nlist ; - int m_maxsize ; - float m_r1min ; - float m_r1max ; - float m_r2min ; - float m_r2max ; - float m_r3min ; - float m_r3max ; - float m_drmin ; - float m_drmax ; - float m_rapcut ; - float m_dzdrmin ; - float m_dzdrmax ; - float m_zmin ; - float m_zmax ; - float m_zminU ; - float m_zmaxU ; - float m_r_rmax ; - float m_r_rstep ; - float m_dzver ; - float m_dzdrver ; - float m_diver ; - float m_diverpps ; - float m_dazmax ; - float m_ptmin ; - float m_ptmax ; - float m_iptmin ; - float m_iptmax ; - - int m_r_size ; - int m_rf_size ; - int m_rfz_size ; + MagField::IMagFieldSvc* m_fieldService {} ; + + IBeamCondSvc* p_beam {} ; + bool m_pixel {} ; + bool m_sct {} ; + bool m_endlist {} ; + bool m_useOverlap {} ; + bool m_useassoTool {} ; + bool m_trigger {} ; + int m_outputlevel {} ; + int m_nprint {} ; + int m_state {} ; + int m_nspoint {} ; + int m_mode {} ; + int m_nlist {} ; + int m_maxsize {} ; + float m_r1min {} ; + float m_r1max {} ; + float m_r2min {} ; + float m_r2max {} ; + float m_r3min {} ; + float m_r3max {} ; + float m_drmin {} ; + float m_drmax {} ; + float m_rapcut {} ; + float m_dzdrmin {} ; + float m_dzdrmax {} ; + float m_zmin {} ; + float m_zmax {} ; + float m_zminU {} ; + float m_zmaxU {} ; + float m_r_rmax {} ; + float m_r_rstep {} ; + float m_dzver {} ; + float m_dzdrver {} ; + float m_diver {} ; + float m_diverpps {} ; + float m_dazmax {} ; + float m_ptmin {} ; + float m_ptmax {} ; + float m_iptmin {} ; + float m_iptmax {} ; + + int m_r_size {} ; + int m_rf_size {} ; + int m_rfz_size {} ; std::list<InDet::SiSpacePointForSeed*>* m_r_Sorted ; std::list<InDet::SiSpacePointForSeed*> m_rfz_Sorted [ 220] ; std::list<InDet::SiSpacePointForSeed*> m_l_spforseed ; std::list<InDet::SiSpacePointForSeed*>::iterator m_i_spforseed; std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin ; - int m_ns,m_nsaz ; - int m_fNmax ; - int m_fNmin ; - int m_zMin ; - int m_nr ; int* m_r_index ; int* m_r_map ; - int m_nrfz , m_rfz_index [220], m_rfz_map [220] ; + int m_ns{},m_nsaz {} ; + int m_fNmax {} ; + int m_fNmin {} ; + int m_zMin {} ; + int m_nr {} ; int* m_r_index {} ; int* m_r_map {} ; + int m_nrfz {} , m_rfz_index [220], m_rfz_map [220] ; int m_rfz_b[220],m_rfz_t[220],m_rfz_ib[220][9],m_rfz_it[220][9] ; - float m_sF ; + float m_sF {} ; /////////////////////////////////////////////////////////////////// // Tables for 3 space points seeds search /////////////////////////////////////////////////////////////////// - int m_maxsizeSP ; - InDet::SiSpacePointForSeed** m_SP ; - float * m_R ; - float * m_Tz ; - float * m_Er ; - float * m_U ; - float * m_V ; - float * m_Zo ; + int m_maxsizeSP {} ; + InDet::SiSpacePointForSeed** m_SP {} ; + float * m_R {} ; + float * m_Tz {} ; + float * m_Er {} ; + float * m_U {} ; + float * m_V {} ; + float * m_Zo {} ; std::list<InDet::SiSpacePointsSeed*> m_l_seeds ; std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seed ; std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seede ; std::multimap<float,InDet::SiSpacePointsSeed*> m_mapOneSeeds; - InDet::SiSpacePointsSeed* m_OneSeeds ; - int m_maxOneSize; - int m_nOneSeeds ; + InDet::SiSpacePointsSeed* m_OneSeeds {} ; + int m_maxOneSize{}; + int m_nOneSeeds {}; std::list<float> m_l_vertex ; /////////////////////////////////////////////////////////////////// @@ -215,9 +217,7 @@ namespace InDet { // Space points container /////////////////////////////////////////////////////////////////// -// std::string m_spacepointsSCTname ; -// std::string m_spacepointsPixelname ; -// std::string m_spacepointsOverlapname ; + std::string m_beamconditions ; SG::ReadHandle<SpacePointContainer> m_spacepointsSCT ; SG::ReadHandle<SpacePointContainer> m_spacepointsPixel ; diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Trigger.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Trigger.h index e5dd983dbd51..9ea3f7eeecf7 100755 --- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Trigger.h +++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Trigger.h @@ -16,7 +16,7 @@ #ifndef SiSpacePointsSeedMaker_Trigger_H #define SiSpacePointsSeedMaker_Trigger_H -#include <list> + #include "GaudiKernel/ServiceHandle.h" #include "MagFieldInterfaces/IMagFieldSvc.h" #include "GaudiKernel/ToolHandle.h" @@ -24,10 +24,11 @@ #include "InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h" #include "TrkSpacePoint/SpacePointContainer.h" #include "TrkSpacePoint/SpacePointOverlapCollection.h" -#include "InDetBeamSpotService/IBeamCondSvc.h" #include "SiSpacePointsSeedTool_xk/SiSpacePointForSeed.h" - +#include <list> +#include <vector> +#include <map> class MsgStream ; class IBeamCondSvc; @@ -113,57 +114,57 @@ namespace InDet { /////////////////////////////////////////////////////////////////// ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle ; - MagField::IMagFieldSvc* m_fieldService ; + MagField::IMagFieldSvc* m_fieldService {} ; IBeamCondSvc* p_beam ; - bool m_pixel ; - bool m_sct ; - bool m_endlist ; - bool m_useOverlap ; - bool m_trigger ; - int m_outputlevel ; - int m_nprint ; - int m_state ; - int m_nspoint ; - int m_mode ; - int m_nlist ; - int m_maxsize ; - unsigned int m_maxNumberVertices ; - float m_r1min, m_r1minv ; - float m_r1max, m_r1maxv ; - float m_r2min, m_r2minv ; - float m_r2max, m_r2maxv ; - float m_r3min ; - float m_r3max ; - float m_drmin, m_drminv ; - float m_drmax ; - float m_rapcut ; - float m_dzdrmin ; - float m_dzdrmax ; - float m_zmin ; - float m_zmax ; - float m_zminU ; - float m_zmaxU ; - float m_zminB ; - float m_zmaxB ; - float m_ftrig ; - float m_ftrigW ; - float m_r_rmax ; - float m_r_rstep ; - float m_dzver ; - float m_dzdrver ; - float m_diver ; - float m_diverpps ; - float m_diversss ; - float m_dazmax ; - float m_ptmin ; - float m_ipt ; - float m_ipt2 ; - float m_COF ; - float m_K ; - int m_r_size ; - int m_rf_size ; - int m_rfz_size ; + bool m_pixel {} ; + bool m_sct {} ; + bool m_endlist {} ; + bool m_useOverlap {} ; + bool m_trigger {} ; + int m_outputlevel {} ; + int m_nprint {} ; + int m_state {} ; + int m_nspoint {} ; + int m_mode {} ; + int m_nlist {} ; + int m_maxsize {} ; + unsigned int m_maxNumberVertices {} ; + float m_r1min{}, m_r1minv {} ; + float m_r1max{}, m_r1maxv {} ; + float m_r2min{}, m_r2minv {} ; + float m_r2max{}, m_r2maxv {} ; + float m_r3min {} ; + float m_r3max {} ; + float m_drmin{}, m_drminv {} ; + float m_drmax {} ; + float m_rapcut {} ; + float m_dzdrmin {} ; + float m_dzdrmax {} ; + float m_zmin {} ; + float m_zmax {} ; + float m_zminU {} ; + float m_zmaxU {} ; + float m_zminB {} ; + float m_zmaxB {} ; + float m_ftrig {} ; + float m_ftrigW {} ; + float m_r_rmax {} ; + float m_r_rstep {} ; + float m_dzver {} ; + float m_dzdrver {} ; + float m_diver {} ; + float m_diverpps {} ; + float m_diversss {} ; + float m_dazmax {} ; + float m_ptmin {} ; + float m_ipt {} ; + float m_ipt2 {} ; + float m_COF {} ; + float m_K {} ; + int m_r_size {} ; + int m_rf_size {} ; + int m_rfz_size {} ; std::list<InDet::SiSpacePointForSeed*>* m_r_Sorted ; std::list<InDet::SiSpacePointForSeed*> m_rfz_Sorted [ 583] ; std::list<InDet::SiSpacePointForSeed*> m_rfzv_Sorted[ 300] ; @@ -171,30 +172,30 @@ namespace InDet { std::list<InDet::SiSpacePointForSeed*>::iterator m_i_spforseed; std::list<InDet::SiSpacePointForSeed*>::iterator m_rMin ; - int m_ns,m_nsaz,m_nsazv ; - int m_fNmax,m_fvNmax ; - int m_fNmin,m_fvNmin ; - int m_zMin ; - int m_nr ; int* m_r_index ; int* m_r_map ; - int m_nrfz , m_rfz_index [583], m_rfz_map [583] ; - int m_nrfzv , m_rfzv_index [300], m_rfzv_map [300] ; + int m_ns{},m_nsaz{},m_nsazv {} ; + int m_fNmax{},m_fvNmax {} ; + int m_fNmin{},m_fvNmin{} ; + int m_zMin {} ; + int m_nr {} ; int* m_r_index {} ; int* m_r_map {} ; + int m_nrfz {} , m_rfz_index [583], m_rfz_map [583] ; + int m_nrfzv {} , m_rfzv_index [300], m_rfzv_map [300] ; int m_rfz_b[583],m_rfz_t[593],m_rfz_ib[583][9],m_rfz_it[583][9] ; int m_rfzv_n[300],m_rfzv_i[300][6] ; - float m_sF ; - float m_sFv ; + float m_sF {} ; + float m_sFv {} ; /////////////////////////////////////////////////////////////////// // Tables for 3 space points seeds search /////////////////////////////////////////////////////////////////// - int m_maxsizeSP ; - InDet::SiSpacePointForSeed** m_SP ; - float * m_Zo ; - float * m_Tz ; - float * m_R ; - float * m_U ; - float * m_V ; - float * m_Er ; + int m_maxsizeSP {} ; + InDet::SiSpacePointForSeed** m_SP {} ; + float * m_Zo {} ; + float * m_Tz {} ; + float * m_R {} ; + float * m_U {} ; + float * m_V {} ; + float * m_Er {} ; std::list<InDet::SiSpacePointsSeed*> m_l_seeds ; std::list<InDet::SiSpacePointsSeed*>::iterator m_i_seed ; @@ -205,9 +206,9 @@ namespace InDet { std::multimap<float,InDet::SiSpacePointsSeed*>::iterator m_seed; std::multimap<float,InDet::SiSpacePointsSeed*>::iterator m_seede; - InDet::SiSpacePointsSeed* m_OneSeeds ; - int m_maxOneSize ; - int m_nOneSeeds ; + InDet::SiSpacePointsSeed* m_OneSeeds {} ; + int m_maxOneSize{} ; + int m_nOneSeeds {} ; std::list<float> m_l_vertex ; /////////////////////////////////////////////////////////////////// @@ -221,10 +222,7 @@ namespace InDet { /////////////////////////////////////////////////////////////////// // Space points container /////////////////////////////////////////////////////////////////// - -// std::string m_spacepointsSCTname ; -// std::string m_spacepointsPixelname ; -// std::string m_spacepointsOverlapname ; + std::string m_beamconditions ; SG::ReadHandle<SpacePointContainer> m_spacepointsSCT ; SG::ReadHandle<SpacePointContainer> m_spacepointsPixel ; diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx index d2ea32cc606a..4d2b0cd2865b 100755 --- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx +++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx @@ -13,11 +13,13 @@ // Version 1.0 21/04/2004 I.Gavrilenko /////////////////////////////////////////////////////////////////// -#include <iostream> +#include <ostream> #include <iomanip> #include "TrkToolInterfaces/IPRD_AssociationTool.h" #include "SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h" +#include "InDetBeamSpotService/IBeamCondSvc.h" + /////////////////////////////////////////////////////////////////// // Constructor diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_BeamGas.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_BeamGas.cxx index 97447571cd15..6798dd6873e6 100755 --- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_BeamGas.cxx +++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_BeamGas.cxx @@ -12,11 +12,13 @@ // Version 1.0 21/04/2004 I.Gavrilenko /////////////////////////////////////////////////////////////////// -#include <iostream> +#include <ostream> #include <iomanip> #include "TrkToolInterfaces/IPRD_AssociationTool.h" #include "SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_BeamGas.h" +#include "InDetBeamSpotService/IBeamCondSvc.h" + /////////////////////////////////////////////////////////////////// // Constructor diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Cosmic.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Cosmic.cxx index 3cfa94b391a4..75ae690abc8a 100755 --- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Cosmic.cxx +++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Cosmic.cxx @@ -12,7 +12,7 @@ // Version 1.0 21/04/2004 I.Gavrilenko /////////////////////////////////////////////////////////////////// -#include <iostream> +#include <ostream> #include <iomanip> #include "TrkToolInterfaces/IPRD_AssociationTool.h" diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_HeavyIon.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_HeavyIon.cxx index 889c819c6a12..92937e6fe9b0 100755 --- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_HeavyIon.cxx +++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_HeavyIon.cxx @@ -12,10 +12,11 @@ // Version 1.0 21/04/2004 I.Gavrilenko /////////////////////////////////////////////////////////////////// -#include <iostream> +#include <ostream> #include <iomanip> #include "SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_HeavyIon.h" +#include "InDetBeamSpotService/IBeamCondSvc.h" /////////////////////////////////////////////////////////////////// // Constructor diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ITK.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ITK.cxx index ff8b121a6a68..390085ee4f30 100755 --- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ITK.cxx +++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ITK.cxx @@ -13,11 +13,12 @@ // Version 1.0 21/04/2004 I.Gavrilenko /////////////////////////////////////////////////////////////////// -#include <iostream> +#include <ostream> #include <iomanip> #include "TrkToolInterfaces/IPRD_AssociationTool.h" #include "SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h" +#include "InDetBeamSpotService/IBeamCondSvc.h" /////////////////////////////////////////////////////////////////// // Constructor @@ -94,13 +95,9 @@ InDet::SiSpacePointsSeedMaker_ITK::SiSpacePointsSeedMaker_ITK m_ybeam[0] = 0. ; m_ybeam[1]= 0.; m_ybeam[2]=1.; m_ybeam[3]=0.; m_zbeam[0] = 0. ; m_zbeam[1]= 0.; m_zbeam[2]=0.; m_zbeam[3]=1.; -// m_spacepointsSCTname = "SCT_SpacePoints" ; -// m_spacepointsPixelname = "PixelSpacePoints" ; -// m_spacepointsOverlapname = "OverlapSpacePoints"; + m_beamconditions = "BeamCondSvc" ; -// m_spacepointsSCT = 0 ; -// m_spacepointsPixel = 0 ; -// m_spacepointsOverlap = 0 ; + declareInterface<ISiSpacePointsSeedMaker>(this); @@ -459,9 +456,6 @@ void InDet::SiSpacePointsSeedMaker_ITK::newRegion // if(m_sct && vSCT.size()) { -// m_spacepointsSCT = 0; -// StatusCode sc = evtStore()->retrieve(m_spacepointsSCT,m_spacepointsSCTname); - if(m_spacepointsSCT.isValid()) { SpacePointContainer::const_iterator spce = m_spacepointsSCT->end (); @@ -1744,7 +1738,6 @@ void InDet::SiSpacePointsSeedMaker_ITK::production3SpSSS for(int t=Nb; t!=Nt; ++t) { - //if(fabs(Tzb-m_Tz[t])*Se > 1.) continue; // Trigger point // @@ -1761,25 +1754,27 @@ void InDet::SiSpacePointsSeedMaker_ITK::production3SpSSS float Cb = (1.-B0*m_Y[b])*C0; float Sb = (A0+B0*m_X[b])*C0; float db[3] = {Sx*Cb-Sy*Sb,Sx*Sb+Sy*Cb,Ce}; - float rb[3]; if(!m_SP[b]->coordinates(db,rb)) continue; + float rbDup[3]; //a new and different rb + if(!m_SP[b]->coordinates(db,rbDup)) continue; // Top point // float Ct = (1.-B0*m_Y[t])*C0; float St = (A0+B0*m_X[t])*C0; float dt[3] = {Sx*Ct-Sy*St,Sx*St+Sy*Ct,Ce}; - float rt[3]; if(!m_SP[t]->coordinates(dt,rt)) continue; + float rtDup[3]; //doesnt hide previous declaration of rt + if(!m_SP[t]->coordinates(dt,rtDup)) continue; - float xb = rb[0]-rn[0]; - float yb = rb[1]-rn[1]; - float xt = rt[0]-rn[0]; - float yt = rt[1]-rn[1]; + float xb = rbDup[0]-rn[0]; + float yb = rbDup[1]-rn[1]; + float xt = rtDup[0]-rn[0]; + float yt = rtDup[1]-rn[1]; float rb2 = 1./(xb*xb+yb*yb); float rt2 = 1./(xt*xt+yt*yt); - float tb = (rn[2]-rb[2])*sqrt(rb2); - float tz = (rt[2]-rn[2])*sqrt(rt2); + float tb = (rn[2]-rbDup[2])*sqrt(rb2); + float tz = (rtDup[2]-rn[2])*sqrt(rt2); float dT = ((tb-tz)*(tb-tz)-m_R[t]*Rb2z-(Erb+m_Er[t]))-(m_R[t]*Rb2r)*((tb+tz)*(tb+tz)); if( dT > ICSA) continue; @@ -1793,7 +1788,8 @@ void InDet::SiSpacePointsSeedMaker_ITK::production3SpSSS float ut = (xt*Ax+yt*Ay)*rt2; float vt = (yt*Ax-xt*Ay)*rt2; - float dU = ut-ub; if(dU == 0.) continue; + float dU = ut-ub; + if(dU == 0.) continue; float A = (vt-vb)/dU; float S2 = 1.+A*A ; float B = vb-A*ub ; @@ -1803,8 +1799,11 @@ void InDet::SiSpacePointsSeedMaker_ITK::production3SpSSS float Im = fabs((A-B*Rn)*Rn) ; if(Im <= imax) { - float dr; m_R[t] < m_R[b] ? dr = m_R[t] : dr = m_R[b]; Im+=fabs((Tzb-m_Tz[t])/(dr*sTzb2)); - m_CmSp.push_back(std::make_pair(B/sqrt(S2),m_SP[t])); m_SP[t]->setParam(Im); + float dr; + m_R[t] < m_R[b] ? dr = m_R[t] : dr = m_R[b]; + Im+=fabs((Tzb-m_Tz[t])/(dr*sTzb2)); + m_CmSp.push_back(std::make_pair(B/sqrt(S2),m_SP[t])); + m_SP[t]->setParam(Im); } } diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_LowMomentum.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_LowMomentum.cxx index 3232dee41258..7bb8d21bb470 100755 --- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_LowMomentum.cxx +++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_LowMomentum.cxx @@ -12,11 +12,13 @@ // Version 1.0 21/04/2004 I.Gavrilenko /////////////////////////////////////////////////////////////////// -#include <iostream> +#include <ostream> #include <iomanip> #include "TrkToolInterfaces/IPRD_AssociationTool.h" #include "SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_LowMomentum.h" +#include "InDetBeamSpotService/IBeamCondSvc.h" + /////////////////////////////////////////////////////////////////// // Constructor diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Trigger.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Trigger.cxx index 6283630797e9..55f07888911e 100755 --- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Trigger.cxx +++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Trigger.cxx @@ -12,8 +12,9 @@ // Version 1.0 21/04/2004 I.Gavrilenko /////////////////////////////////////////////////////////////////// -#include <iostream> +#include <ostream> #include <iomanip> +#include "InDetBeamSpotService/IBeamCondSvc.h" #include "SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Trigger.h" -- GitLab From 924d08832df4159184a25490c4880678ec2b3d8d Mon Sep 17 00:00:00 2001 From: Olga Igonkina <olga.igonkina@cern.ch> Date: Fri, 13 Jul 2018 16:58:20 +0000 Subject: [PATCH 457/562] Merge branch 'art-v01020-b211' into '21.1' sweeping MR 12251 to 21.1 See merge request atlas/athena!12706 (cherry picked from commit cb7d1dfb53c7c0287e272ceff6f132389df5ade9 [formerly 5a738d047906c5b210f7cde69fcc7ebab6dbeea3]) ceb324ce sweeping MR 12251 to 21.1 Former-commit-id: f2c78d18fe083039b3740253948eec21fb471953 --- Event/EventContainers/test/ID_ContainerTest.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 -- GitLab From 9f2102e6ce8975d00ed3850b6ce3f17482de3a6b Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Fri, 13 Jul 2018 07:08:27 +0200 Subject: [PATCH 458/562] TrkGeometry: DataModel -> AthContainers Remove references to obsolete package DataModel. Also adjust for headers moved to AthenaKernel. Former-commit-id: 60c4aa24cb52c3ad6858aa210e00388888727b5f --- Tracking/TrkDetDescr/TrkGeometry/CMakeLists.txt | 8 +++----- .../TrkDetDescr/TrkGeometry/TrkGeometry/ElementTable.h | 2 +- .../TrkGeometry/TrkGeometry/LayerMaterialCollection.h | 6 +++--- .../TrkGeometry/TrkGeometry/LayerMaterialMap.h | 4 ++-- .../TrkGeometry/TrkGeometry/MaterialStepCollection.h | 4 ++-- .../TrkGeometry/TrkGeometry/TrackingGeometry.h | 2 +- .../TrkDetDescr/TrkGeometry/TrkGeometry/TrkGeometryDict.h | 2 +- 7 files changed, 13 insertions(+), 15 deletions(-) diff --git a/Tracking/TrkDetDescr/TrkGeometry/CMakeLists.txt b/Tracking/TrkDetDescr/TrkGeometry/CMakeLists.txt index 84207b9d4e21..5fca33de8b83 100644 --- a/Tracking/TrkDetDescr/TrkGeometry/CMakeLists.txt +++ b/Tracking/TrkDetDescr/TrkGeometry/CMakeLists.txt @@ -9,9 +9,7 @@ atlas_subdir( TrkGeometry ) atlas_depends_on_subdirs( PUBLIC Control/AthenaBaseComps Control/AthenaKernel - Control/CLIDSvc - Control/DataModel - Control/SGTools + Control/AthContainers DetectorDescription/GeoPrimitives GaudiKernel Tracking/TrkDetDescr/TrkDetDescrUtils @@ -34,12 +32,12 @@ atlas_add_library( TrkGeometry PUBLIC_HEADERS TrkGeometry INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel DataModel SGTools GeoPrimitives GaudiKernel TrkDetDescrUtils TrkGeometrySurfaces TrkSurfaces TrkVolumes TrkEventPrimitives TrkNeutralParameters TrkParameters + LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel AthContainers GeoPrimitives GaudiKernel TrkDetDescrUtils TrkGeometrySurfaces TrkSurfaces TrkVolumes TrkEventPrimitives TrkNeutralParameters TrkParameters PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} EventPrimitives ) atlas_add_dictionary( TrkGeometryDict TrkGeometry/TrkGeometryDict.h TrkGeometry/selection.xml INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel DataModel SGTools GeoPrimitives GaudiKernel TrkDetDescrUtils TrkGeometrySurfaces TrkSurfaces TrkVolumes TrkEventPrimitives TrkNeutralParameters TrkParameters EventPrimitives TrkGeometry ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel AthContainers GeoPrimitives GaudiKernel TrkDetDescrUtils TrkGeometrySurfaces TrkSurfaces TrkVolumes TrkEventPrimitives TrkNeutralParameters TrkParameters EventPrimitives TrkGeometry ) diff --git a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/ElementTable.h b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/ElementTable.h index bcaac9c8c7bc..1cc9007752da 100644 --- a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/ElementTable.h +++ b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/ElementTable.h @@ -11,10 +11,10 @@ #include "TrkGeometry/Material.h" +#include "AthenaKernel/CLASS_DEF.h" #include <vector> #include <climits> #include <memory> -#include "CLIDSvc/CLASS_DEF.h" class MsgStream; diff --git a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/LayerMaterialCollection.h b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/LayerMaterialCollection.h index 65c444b465b9..84da1e882aec 100644 --- a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/LayerMaterialCollection.h +++ b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/LayerMaterialCollection.h @@ -11,8 +11,8 @@ // Trk & Gaudi #include "TrkGeometry/LayerMaterialProperties.h" -#include "DataModel/DataVector.h" -#include "CLIDSvc/CLASS_DEF.h" +#include "AthContainers/DataVector.h" +#include "AthenaKernel/CLASS_DEF.h" namespace Trk { @@ -22,4 +22,4 @@ namespace Trk { CLASS_DEF( Trk::LayerMaterialCollection, 1264846423, 1 ) -#endif \ No newline at end of file +#endif diff --git a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/LayerMaterialMap.h b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/LayerMaterialMap.h index 179223b79331..c7963b00ceea 100644 --- a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/LayerMaterialMap.h +++ b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/LayerMaterialMap.h @@ -15,7 +15,7 @@ #include "TrkDetDescrUtils/SharedObject.h" #include "TrkGeometry/LayerMaterialProperties.h" #include "TrkGeometry/ElementTable.h" -#include "CLIDSvc/CLASS_DEF.h" +#include "AthenaKernel/CLASS_DEF.h" namespace Trk { @@ -101,4 +101,4 @@ CLASS_DEF( Trk::LayerMaterialMap, 142190734, 1 ) // 142190734 Trk::LayerMaterialMap None -#endif \ No newline at end of file +#endif diff --git a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/MaterialStepCollection.h b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/MaterialStepCollection.h index 503e4f8d71c1..e48a456d3a55 100755 --- a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/MaterialStepCollection.h +++ b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/MaterialStepCollection.h @@ -10,8 +10,8 @@ #define TRKGEOMETRY_MATERIALSTEPCOLLECTION_H #include "TrkGeometry/MaterialStep.h" -#include "DataModel/DataVector.h" -#include "CLIDSvc/CLASS_DEF.h" +#include "AthContainers/DataVector.h" +#include "AthenaKernel/CLASS_DEF.h" namespace Trk { typedef DataVector<Trk::MaterialStep> MaterialStepCollection; diff --git a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/TrackingGeometry.h b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/TrackingGeometry.h index 03c2858d573f..965a66b9fdbc 100755 --- a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/TrackingGeometry.h +++ b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/TrackingGeometry.h @@ -15,7 +15,7 @@ #include "TrkGeometry/TrackingVolume.h" #include "TrkDetDescrUtils/GeometrySignature.h" // CLASS DEF -#include "CLIDSvc/CLASS_DEF.h" +#include "AthenaKernel/CLASS_DEF.h" // STL #include <map> // ATH_MSG macros diff --git a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/TrkGeometryDict.h b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/TrkGeometryDict.h index 943c52d56de4..3eed20638111 100755 --- a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/TrkGeometryDict.h +++ b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/TrkGeometryDict.h @@ -7,7 +7,7 @@ #include "TrkGeometry/MaterialStep.h" #include "TrkGeometry/Layer.h" -#include "DataModel/DataVector.h" +#include "AthContainers/DataVector.h" namespace TrkDetDetDescrPoolRegister { /** the standard vector of MaterialStep */ -- GitLab From 44f6877f26da156e7ca6330fded79ea14ccbf877 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Fri, 13 Jul 2018 07:07:14 +0200 Subject: [PATCH 459/562] TrkCaloClusterROI: DataModel -> AthContainers Remove references to obsolete package DataModel. Also adjust for headers moved to AthenaKernel. Former-commit-id: d101b0bfe3538ee2b6334c970f32c2b58948f021 --- Tracking/TrkEvent/TrkCaloClusterROI/CMakeLists.txt | 7 +++---- .../TrkCaloClusterROI/CaloClusterROI_Collection.h | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Tracking/TrkEvent/TrkCaloClusterROI/CMakeLists.txt b/Tracking/TrkEvent/TrkCaloClusterROI/CMakeLists.txt index bbacb6928b0b..1b2f586192be 100644 --- a/Tracking/TrkEvent/TrkCaloClusterROI/CMakeLists.txt +++ b/Tracking/TrkEvent/TrkCaloClusterROI/CMakeLists.txt @@ -7,9 +7,8 @@ atlas_subdir( TrkCaloClusterROI ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - Control/CLIDSvc - Control/DataModel - Control/SGTools + Control/AthContainers + Control/AthenaKernel DetectorDescription/GeoPrimitives Event/EventPrimitives PRIVATE @@ -26,6 +25,6 @@ atlas_add_library( TrkCaloClusterROI PUBLIC_HEADERS TrkCaloClusterROI INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${EIGEN_LIBRARIES} DataModel SGTools GeoPrimitives EventPrimitives + LINK_LIBRARIES ${EIGEN_LIBRARIES} AthContainers GeoPrimitives EventPrimitives PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} TrkSurfaces TrkEventPrimitives ) diff --git a/Tracking/TrkEvent/TrkCaloClusterROI/TrkCaloClusterROI/CaloClusterROI_Collection.h b/Tracking/TrkEvent/TrkCaloClusterROI/TrkCaloClusterROI/CaloClusterROI_Collection.h index 15691e462e2d..76b28541c545 100644 --- a/Tracking/TrkEvent/TrkCaloClusterROI/TrkCaloClusterROI/CaloClusterROI_Collection.h +++ b/Tracking/TrkEvent/TrkCaloClusterROI/TrkCaloClusterROI/CaloClusterROI_Collection.h @@ -6,8 +6,8 @@ #define TRKCALOCLUSTERROI_COLLECTION_H -#include "DataModel/DataVector.h" -#include "CLIDSvc/CLASS_DEF.h" +#include "AthContainers/DataVector.h" +#include "AthenaKernel/CLASS_DEF.h" #include "TrkCaloClusterROI/CaloClusterROI.h" -- GitLab From aa46b7f03754c5d4ff8e6e563f7c1b7f0f6e308c Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Tue, 10 Jul 2018 20:01:38 +0200 Subject: [PATCH 460/562] LArCellRec: Fix clang warnings. clang warnings: missing override keywords. Former-commit-id: c5d761251efaa5d499e2111c51657135220d2d97 --- LArCalorimeter/LArCellRec/src/LArCellHVCorr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LArCalorimeter/LArCellRec/src/LArCellHVCorr.h b/LArCalorimeter/LArCellRec/src/LArCellHVCorr.h index 658c1d5e6715..427f9453c35f 100644 --- a/LArCalorimeter/LArCellRec/src/LArCellHVCorr.h +++ b/LArCalorimeter/LArCellRec/src/LArCellHVCorr.h @@ -45,9 +45,9 @@ public: //Implements the ILArCellHVCorrTool interface virtual float getCorrection(const Identifier id) override; - StatusCode LoadCalibration(IOVSVC_CALLBACK_ARGS); + virtual StatusCode LoadCalibration(IOVSVC_CALLBACK_ARGS) override; - bool updateOnLastCallback() {return m_updateOnLastCallback;} + virtual bool updateOnLastCallback() override {return m_updateOnLastCallback;} private: float getCorrection(const Identifier id) const; -- GitLab From 1596927e0d2655495618ba7825c7bcf43605ddca Mon Sep 17 00:00:00 2001 From: Tamara Vazquez Schroeder <tamara.vazquez.schroeder@cern.ch> Date: Sun, 15 Jul 2018 18:37:49 +0000 Subject: [PATCH 461/562] Merge branch '21.0-AddPROCTools2AthSimulation' into '21.0' Include PROCTools to AthSimulation build See merge request atlas/athena!12676 (cherry picked from commit 2d4412c6085b59fa58ce12e20cdf9d0cb5f8d823 [formerly 55618c486f7185b375612459ba4fab1274ed9885]) 8e1d720d Add Tools/PROCTools to Projects/AthSimulation/package_filters.txt Former-commit-id: c0a3a5d92985485f37a1b5a0c1a678111393d402 --- Projects/AthSimulation/package_filters.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Projects/AthSimulation/package_filters.txt b/Projects/AthSimulation/package_filters.txt index 21eae9182195..552cada7658d 100644 --- a/Projects/AthSimulation/package_filters.txt +++ b/Projects/AthSimulation/package_filters.txt @@ -330,6 +330,7 @@ + Tools/KitValidation + Tools/PathResolver + Tools/PmbCxxUtils ++ Tools/PROCTools + Tools/PyCmt + Tools/PyJobTransforms + Tools/PyUtils -- GitLab From 7b33e661184dc77ef5d06dd7d7226db232e83418 Mon Sep 17 00:00:00 2001 From: Tamara Vazquez Schroeder <tamara.vazquez.schroeder@cern.ch> Date: Sun, 15 Jul 2018 18:35:54 +0000 Subject: [PATCH 462/562] Merge branch '21.0-CalobaselineMon-fixBCID' into '21.0' Minor bug fixes in CaloMonitoring See merge request atlas/athena!12701 (cherry picked from commit 8eaae6047f581fe43eec0d2e1f290e0fad621fa3 [formerly db1aadbdcb549e58ea500a86a875abfb572beb9e]) 118cba1f Minor bug fixes Former-commit-id: 0650e8097284c361f156a080b1821a7763a6afbf --- Calorimeter/CaloMonitoring/src/CaloBaselineMon.cxx | 2 +- Calorimeter/CaloMonitoring/src/CaloMonToolBase.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Calorimeter/CaloMonitoring/src/CaloBaselineMon.cxx b/Calorimeter/CaloMonitoring/src/CaloBaselineMon.cxx index 5d26910d5bc9..bb368d53469e 100644 --- a/Calorimeter/CaloMonitoring/src/CaloBaselineMon.cxx +++ b/Calorimeter/CaloMonitoring/src/CaloBaselineMon.cxx @@ -246,7 +246,7 @@ StatusCode CaloBaselineMon::fillHistograms() { // Fill pedestalMon only when the bunch is empty and far away enough from the last train. if (m_bool_pedestalMon){ - if ((not m_bunchCrossingTool->isFilled(bcid)) and (m_bunchCrossingTool->gapAfterBunch(bcid) >= m_pedestalMon_BCIDmin*25.)) thisEvent_bool_pedestalMon = true; + if ((not m_bunchCrossingTool->isFilled(bcid)) and (m_bunchCrossingTool->gapAfterBunch(bcid) >= m_pedestalMon_BCIDmin*25.) and (m_bunchCrossingTool->gapBeforeBunch(bcid) >= m_pedestalMon_BCIDmin*25.)) thisEvent_bool_pedestalMon = true; } // Fill bcidtoolMon only when the bunch is in a bunch train and within accepted BCID range. if (m_bool_bcidtoolMon){ diff --git a/Calorimeter/CaloMonitoring/src/CaloMonToolBase.cxx b/Calorimeter/CaloMonitoring/src/CaloMonToolBase.cxx index 91db1fa12723..cec93a4e2ecc 100644 --- a/Calorimeter/CaloMonitoring/src/CaloMonToolBase.cxx +++ b/Calorimeter/CaloMonitoring/src/CaloMonToolBase.cxx @@ -81,7 +81,7 @@ StatusCode CaloMonToolBase::bookBaseHists(MonGroup* group) { m_h_EvtRejSumm->GetXaxis()->SetBinLabel(3,"Good LAr LB-OFF"); } if (!m_useCollisionFilterTool){ - m_h_EvtRejSumm->GetXaxis()->SetBinLabel(3,"LAr collision-OFF"); + m_h_EvtRejSumm->GetXaxis()->SetBinLabel(4,"LAr collision-OFF"); } if (!m_useBeamBackgroundRemoval){ m_h_EvtRejSumm->GetXaxis()->SetBinLabel(5,"Beam backgr.-OFF"); -- GitLab From 7df9220997e68abb30a6a364e788cf0c7d4a9e57 Mon Sep 17 00:00:00 2001 From: Tamara Vazquez Schroeder <tamara.vazquez.schroeder@cern.ch> Date: Sun, 15 Jul 2018 18:48:19 +0000 Subject: [PATCH 463/562] Merge branch 'art-v01020-bmc16d' into '21.0-mc16d' sweeping MR 12251 to 21.0-mc16d See merge request atlas/athena!12709 (cherry picked from commit f5a7f7519f34d01acbb24cdfde3446c5830bc46a [formerly dc4ef1744018a35b551c0f3845bc12df604910a9]) 01e2715e sweeping MR 12251 to 21.0-mc16d Former-commit-id: bc1ba880f7547d28d796237e74f46ba1a76293ee --- Control/AthenaKernel/share/ClassName_test.ref | 0 .../AthenaRootComps/share/test_athena_variable_shape3.ref | 0 .../AthenaRootComps/share/test_athena_variable_shape_merged.ref | 0 Event/EventContainers/test/ID_ContainerTest.h | 0 4 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 Control/AthenaKernel/share/ClassName_test.ref mode change 100755 => 100644 Database/AthenaRoot/AthenaRootComps/share/test_athena_variable_shape3.ref mode change 100755 => 100644 Database/AthenaRoot/AthenaRootComps/share/test_athena_variable_shape_merged.ref mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Control/AthenaKernel/share/ClassName_test.ref b/Control/AthenaKernel/share/ClassName_test.ref old mode 100755 new mode 100644 diff --git a/Database/AthenaRoot/AthenaRootComps/share/test_athena_variable_shape3.ref b/Database/AthenaRoot/AthenaRootComps/share/test_athena_variable_shape3.ref old mode 100755 new mode 100644 diff --git a/Database/AthenaRoot/AthenaRootComps/share/test_athena_variable_shape_merged.ref b/Database/AthenaRoot/AthenaRootComps/share/test_athena_variable_shape_merged.ref old mode 100755 new mode 100644 diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 -- GitLab From f28b70484f6c95335d56015612266fdd6fe7fbba Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Mon, 16 Jul 2018 08:58:11 +0200 Subject: [PATCH 464/562] Solve coverity 113099, 113078 by checking dynamic cast result Former-commit-id: e2222f68ba82ab051a72fef8ee5dace14dc46417 --- .../src/TrigVxSecondary.cxx | 129 +++++++----------- 1 file changed, 52 insertions(+), 77 deletions(-) diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigVxSecondary/src/TrigVxSecondary.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigVxSecondary/src/TrigVxSecondary.cxx index e65f6ecc5a67..2b3573b554c5 100644 --- a/InnerDetector/InDetTrigRecAlgs/InDetTrigVxSecondary/src/TrigVxSecondary.cxx +++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigVxSecondary/src/TrigVxSecondary.cxx @@ -7,7 +7,6 @@ #include "InDetRecToolInterfaces/ISecVertexInJetFinder.h" #include "TrkTrack/TrackCollection.h" #include "TrkParameters/TrackParameters.h" -//#include "VxVertex/VxContainer.h" #include "GeoPrimitives/GeoPrimitives.h" #include "InDetBeamSpotService/IBeamCondSvc.h" #include "TrigInDetEvent/TrigVertexCollection.h" @@ -15,7 +14,6 @@ #include "IRegionSelector/IRegSelSvc.h" #include <sstream> #include <TLorentzVector.h> -//#include "xAODTracking/Vertex.h" #include "xAODBase/IParticle.h" #include "xAODTracking/TrackParticleContainer.h" @@ -378,84 +376,61 @@ namespace InDet { m_secVertexInfoContainer = new Trk::VxSecVertexInfoContainer; m_secVertexInfo = 0; - for(; itSecVtxFinders != itSecVtxFindersEnd; ++itSecVtxFinders) { - std::string vxAuthor = (*itSecVtxFinders).name(); - if(*itSecVtxFinders != 0) { - if(outputLevel <= MSG::DEBUG) - msg() << MSG::DEBUG << "Running " << vxAuthor << endmsg; - - xAOD::Vertex* vertex = new xAOD::Vertex(); - vertex->makePrivateStore(); - vertex->setPosition(bestFitPriVertex->position()); - vertex->setCovariancePosition(bestFitPriVertex->covariancePosition()); - vertex->setFitQuality(bestFitPriVertex->chiSquared(), bestFitPriVertex->numberDoF () ); - - std::vector<const xAOD::IParticle*> inputIParticles; - - xAOD::TrackParticleContainer::const_iterator trackIt = trackTES->begin(); - xAOD::TrackParticleContainer::const_iterator lastTrackIt = trackTES->end(); - - for(; trackIt != lastTrackIt; ++trackIt) - inputIParticles.push_back(*trackIt); - - m_secVertexInfo = (*itSecVtxFinders)->findSecVertex(*vertex, *m_jetDirection, inputIParticles); - - delete vertex; - - if(m_secVertexInfo == 0) { - if(outputLevel <= MSG::DEBUG) - msg() << MSG::DEBUG << vxAuthor << " returned null pointer (no vertex)" << endmsg; - continue; - } - else { - if (m_secVertexInfo->vertices().size()) { - m_secVertexInfo->vertices().front()->setVertexType((xAOD::VxType::VertexType)2); - } - m_secVertexInfoContainer->push_back(const_cast<Trk::VxSecVertexInfo*>(m_secVertexInfo)); - m_secVertexInfoContainer->back()->getSVOwnership(true); - m_nVxSecVertexInfo++; - } - - if(outputLevel <= MSG::DEBUG) { - msg() << MSG::DEBUG << vxAuthor << " returned " << m_secVertexInfo->vertices().size() << " vertices" << endmsg; - } - - //* for monitoring *// - - const Trk::VxSecVKalVertexInfo* secVKalVertexInfo = dynamic_cast<const Trk::VxSecVKalVertexInfo*>(m_secVertexInfo); - const std::vector<xAOD::Vertex_v1*> & myVertices = secVKalVertexInfo->vertices(); - if(myVertices.size()>0) { - m_secVtx_twoTrkTot = secVKalVertexInfo->n2trackvertices(); - m_secVtx_mass = secVKalVertexInfo->mass(); - m_secVtx_energy = secVKalVertexInfo->energyFraction(); - - std::vector<xAOD::Vertex_v1*>::const_iterator verticesIt=myVertices.begin(); - std::vector<xAOD::Vertex_v1*>::const_iterator verticesEnd=myVertices.end(); - - for( ; verticesIt!=verticesEnd ; ++verticesIt) { - - if(!(*verticesIt)) { - msg() << MSG::DEBUG << "Secondary vertex from InDetVKalVxInJet has zero pointer. Skipping this vtx.." << endmsg; - continue; - } - - msg() << MSG::DEBUG << "xAOD::Vertex at (" - << (*verticesIt)->position().x() << "," - << (*verticesIt)->position().y() << "," - << (*verticesIt)->position().z() << endmsg; - - std::vector<Trk::VxTrackAtVertex> tracksAtVertex = (*verticesIt)->vxTrackAtVertex(); - - if(tracksAtVertex.size()) - m_secVtx_numTrkSV = tracksAtVertex.size(); - } - } - - //std::vector<xAOD::Vertex*>::const_iterator vertexIt = m_secVertexInfo->vertices().begin(); - //std::vector<xAOD::Vertex*>::const_iterator lastVertexIt = m_secVertexInfo->vertices().end(); + if(outputLevel <= MSG::DEBUG) msg() << MSG::DEBUG << "Running " << vxAuthor << endmsg; + xAOD::Vertex* vertex = new xAOD::Vertex(); + vertex->makePrivateStore(); + vertex->setPosition(bestFitPriVertex->position()); + vertex->setCovariancePosition(bestFitPriVertex->covariancePosition()); + vertex->setFitQuality(bestFitPriVertex->chiSquared(), bestFitPriVertex->numberDoF () ); + std::vector<const xAOD::IParticle*> inputIParticles; + xAOD::TrackParticleContainer::const_iterator trackIt = trackTES->begin(); + xAOD::TrackParticleContainer::const_iterator lastTrackIt = trackTES->end(); + for(; trackIt != lastTrackIt; ++trackIt) inputIParticles.push_back(*trackIt); + m_secVertexInfo = (*itSecVtxFinders)->findSecVertex(*vertex, *m_jetDirection, inputIParticles); + delete vertex; + if(m_secVertexInfo == 0) { + if(outputLevel <= MSG::DEBUG) msg() << MSG::DEBUG << vxAuthor << " returned null pointer (no vertex)" << endmsg; + continue; + } else { + if (m_secVertexInfo->vertices().size()) { + m_secVertexInfo->vertices().front()->setVertexType((xAOD::VxType::VertexType)2); + } + m_secVertexInfoContainer->push_back(const_cast<Trk::VxSecVertexInfo*>(m_secVertexInfo)); + m_secVertexInfoContainer->back()->getSVOwnership(true); + m_nVxSecVertexInfo++; + } + if(outputLevel <= MSG::DEBUG) { + msg() << MSG::DEBUG << vxAuthor << " returned " << m_secVertexInfo->vertices().size() << " vertices" << endmsg; + } + // + //* for monitoring *// + const Trk::VxSecVKalVertexInfo* secVKalVertexInfo = dynamic_cast<const Trk::VxSecVKalVertexInfo*>(m_secVertexInfo); + if (secVKalVertexInfo){ + const std::vector<xAOD::Vertex_v1*> & myVertices = secVKalVertexInfo->vertices(); + if(not myVertices.empty()) { + m_secVtx_twoTrkTot = secVKalVertexInfo->n2trackvertices(); + m_secVtx_mass = secVKalVertexInfo->mass(); + m_secVtx_energy = secVKalVertexInfo->energyFraction(); + std::vector<xAOD::Vertex_v1*>::const_iterator verticesIt=myVertices.begin(); + std::vector<xAOD::Vertex_v1*>::const_iterator verticesEnd=myVertices.end(); + for( ; verticesIt!=verticesEnd ; ++verticesIt) { + if(!(*verticesIt)) { + msg() << MSG::DEBUG << "Secondary vertex from InDetVKalVxInJet has zero pointer. Skipping this vtx.." << endmsg; + continue; + } + msg() << MSG::DEBUG << "xAOD::Vertex at (" + << (*verticesIt)->position().x() << "," + << (*verticesIt)->position().y() << "," + << (*verticesIt)->position().z() << endmsg; + std::vector<Trk::VxTrackAtVertex> tracksAtVertex = (*verticesIt)->vxTrackAtVertex(); + if(not tracksAtVertex.empty()) + m_secVtx_numTrkSV = tracksAtVertex.size(); + } + } + } } } -- GitLab From c91e259080588e164afd7fe909a6bbd012376ffd Mon Sep 17 00:00:00 2001 From: Olga Igonkina <olga.igonkina@cern.ch> Date: Tue, 10 Jul 2018 16:57:48 +0000 Subject: [PATCH 465/562] Merge branch 'fixTrigCostCombinatorics' into '21.1' Fix in trigger rates combinatorics See merge request atlas/athena!12633 (cherry picked from commit 40923a5a08fbab7ca95df187959796a50f434731 [formerly 072b8e215e23741cd5fffb9cb938fbb0c691e660]) bd8301d0 Reduce max multiseed back down to 15 (was changed back to 20 by mistake). Make it configurable. Former-commit-id: 5af197295dd44b9ae731059289636642f9cb5afe --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../TrigCostRootAnalysis/Root/Config.cxx | 18 ++++++++++++++++-- .../Root/CounterRatesUnion.cxx | 2 +- .../TrigCostRootAnalysis/Utility.h | 1 + 4 files changed, 18 insertions(+), 3 deletions(-) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 diff --git a/Trigger/TrigCost/TrigCostRootAnalysis/Root/Config.cxx b/Trigger/TrigCost/TrigCostRootAnalysis/Root/Config.cxx index f4d9d1abcc27..30e33c9db046 100644 --- a/Trigger/TrigCost/TrigCostRootAnalysis/Root/Config.cxx +++ b/Trigger/TrigCost/TrigCostRootAnalysis/Root/Config.cxx @@ -193,6 +193,7 @@ namespace TrigCostRootAnalysis { UInt_t maxNumberFullEvents = 10; UInt_t ratesOverlapWarning = 80; UInt_t maxMultiSeed = 1; + UInt_t maxMultiSeedForGroup = 15; UInt_t runNumber = 0; UInt_t messageWait = 10; Float_t rateFallbackPrescaleL1 = FLT_MIN; @@ -633,6 +634,9 @@ namespace TrigCostRootAnalysis { { "useOnlyTheseBCIDs", required_argument, 0, '8' }, // Hidden option + { + "maxMultiSeedForGroup", required_argument, 0, '9' + }, { 0, 0, 0, 0 @@ -895,7 +899,10 @@ namespace TrigCostRootAnalysis { "--scaleRatesByPS\t\t\t\tScale up chains by their L1 prescale to get their rate for L1 PS=1. Only for basic L1 and HLT chains, not combinations and global rates." << std::endl; std::cout << "--maxMultiSeed " << maxMultiSeed << - "\t\t\t\tMaximum number of L1 seeds a chain can have before it is dropped from Union rate groups due to exploding (2^nL1) computational complexity." + "\t\t\t\tMaximum number of L1 seeds a chain can have before it is dropped from global Union rate groups due to exploding (2^nL1) computational complexity." + << std::endl; + std::cout << "--maxMultiSeedForGroup " << maxMultiSeedForGroup << + "\t\t\tMaximum number of L1 seeds any individual Union group will allow due to exploding (2^nL1) computational complexity." << std::endl; std::cout << "--noOnlineDTCorrection\t\t\t\tFlag to prevent automated scaling to correct for L1 deadtime of EB data." << @@ -1231,11 +1238,17 @@ namespace TrigCostRootAnalysis { break; case 'X': - // Default lumiblock length + // Max multi seed for chains going into "big" groups such as total rates ss << optarg; ss >> maxMultiSeed; break; + case '9': + // Max multi seed for an individual grouo + ss << optarg; + ss >> maxMultiSeedForGroup; + break; + case 'q': // nHLTConfigSummary ss << optarg; @@ -1840,6 +1853,7 @@ namespace TrigCostRootAnalysis { set(kMaxMultiSeed, maxMultiSeed, "MaxMultiSeed"); + set(kMaxMultiSeedForGroup, maxMultiSeedForGroup, "MaxMultiSeedForGroup"); if (runNumber != 0) set(kRunNumber, runNumber, "RunNumber"); // Load files to be accessed diff --git a/Trigger/TrigCost/TrigCostRootAnalysis/Root/CounterRatesUnion.cxx b/Trigger/TrigCost/TrigCostRootAnalysis/Root/CounterRatesUnion.cxx index c782a9a4103f..33207a443e2f 100644 --- a/Trigger/TrigCost/TrigCostRootAnalysis/Root/CounterRatesUnion.cxx +++ b/Trigger/TrigCost/TrigCostRootAnalysis/Root/CounterRatesUnion.cxx @@ -271,7 +271,7 @@ namespace TrigCostRootAnalysis { } // Otherwise we have to use the general form - if (m_L1s.size() > 20) { // 32 is the technical maximim - but the this is already impractical + if (m_L1s.size() > (size_t) Config::config().getInt(kMaxMultiSeedForGroup)) { // 32 is the technical maximim - but the this is already impractical. kMaxMultiSeedForGroup defaults to 15 Warning("CounterRatesUnion::classify", "Union %s topology is Many-To-Many with NL1:%i (Complexity (2^NL1-1)=%e). Disabling (max L1 seeds is 20 for Many-To-Many).", getName().c_str(), (Int_t) m_L1s.size(), TMath::Power(2., (Double_t) m_L1s.size()) - 1.); diff --git a/Trigger/TrigCost/TrigCostRootAnalysis/TrigCostRootAnalysis/Utility.h b/Trigger/TrigCost/TrigCostRootAnalysis/TrigCostRootAnalysis/Utility.h index 97e1a4eeeffe..17bf31f6e6c2 100644 --- a/Trigger/TrigCost/TrigCostRootAnalysis/TrigCostRootAnalysis/Utility.h +++ b/Trigger/TrigCost/TrigCostRootAnalysis/TrigCostRootAnalysis/Utility.h @@ -163,6 +163,7 @@ namespace TrigCostRootAnalysis { kExtrapolate13To5, kLumiExtrapWeight, kMaxMultiSeed, + kMaxMultiSeedForGroup, kWroteProgressFile, kBasicEventWeight, kOnlinePeakMuAverage, -- GitLab From 9c5ab5da23fa7174225ae9a334892a79ee8d22e2 Mon Sep 17 00:00:00 2001 From: Tamara Vazquez Schroeder <tamara.vazquez.schroeder@cern.ch> Date: Wed, 11 Jul 2018 15:52:30 +0000 Subject: [PATCH 466/562] Merge branch 'DigiConfigurationUnitTests_21.0' into '21.0' Unit test to monitor changes in the configuration of MC16a Digitization jobs See merge request atlas/athena!12576 Former-commit-id: d57bf366eee6e45dee97334156c89783985003bc --- Simulation/Digitization/CMakeLists.txt | 4 + .../test/test_MC16a_Digi_tf_configuration.py | 345 ++++++++++++++++++ 2 files changed, 349 insertions(+) create mode 100755 Simulation/Digitization/test/test_MC16a_Digi_tf_configuration.py diff --git a/Simulation/Digitization/CMakeLists.txt b/Simulation/Digitization/CMakeLists.txt index d3d7351189b5..98037e1a5f72 100644 --- a/Simulation/Digitization/CMakeLists.txt +++ b/Simulation/Digitization/CMakeLists.txt @@ -14,3 +14,7 @@ atlas_install_python_modules( python/*.py ) atlas_install_joboptions( share/*.py share/jobOpts/*.py ) atlas_install_runtime( data/*.ascii test/Digitization_TestConfiguration.xml ) +atlas_add_test(test_MC16a_Digi_tf_configuration + SCRIPT test/test_MC16a_Digi_tf_configuration.py + PROPERTIES TIMEOUT 300 + PROPERTIES RESOURCE_LOCK DigiTf) diff --git a/Simulation/Digitization/test/test_MC16a_Digi_tf_configuration.py b/Simulation/Digitization/test/test_MC16a_Digi_tf_configuration.py new file mode 100755 index 000000000000..9e4525789d7d --- /dev/null +++ b/Simulation/Digitization/test/test_MC16a_Digi_tf_configuration.py @@ -0,0 +1,345 @@ +#!/usr/bin/env python + +import pickle +import subprocess +import unittest + + +class TestDigitizationMC16a(unittest.TestCase): + + @classmethod + def setUpClass(cls): + config_picklefilename = 'DigitizationMC16a_config.pkl' + command = [ + 'Digi_tf.py', + '--athenaopts', '"--config-only={}"'.format(config_picklefilename), + '--inputHITSFile', '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/HITS.10504490._000425.pool.root.1', + '--conditionsTag', 'default:OFLCOND-MC16-SDR-16', + '--geometryVersion', 'default:ATLAS-R2-2016-01-00-01', + '--inputHighPtMinbiasHitsFile', '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361239.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_high.merge.HITS.e4981_s3087_s3089/HITS.10501933._000005.pool.root.1', + '--inputLowPtMinbiasHitsFile', '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.merge.HITS.e4981_s3087_s3089/HITS.10501925._000003.pool.root.1', + '--jobNumber', '1', + '--maxEvents', '25', + '--numberOfCavernBkg', '0', + '--numberOfHighPtMinBias', '0.116075313', + '--numberOfLowPtMinBias', '44.3839246425', + '--outputRDOFile', 'mc16a_ttbar.RDO.pool.root', + '--digiSteeringConf', 'StandardSignalOnlyTruth', + '--postExec', 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]', 'ToolSvc.LArAutoCorrTotalToolDefault.deltaBunch=1', + '--postInclude', 'default:PyJobTransforms/UseFrontier.py', + '--pileupFinalBunch', '6', + '--preExec', 'all: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)', + '--preInclude', 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,RunDependentSimData/configLumi_run284500_mc16a.py', + '--skipEvents', '0', + # would otherwise fail due to missing RDO file: + '--outputFileValidation', 'False', + ] + subprocess.check_call(command) + + with open(config_picklefilename) as picklefile: + job_config_dict = pickle.load(picklefile) + + cls._job_config_dict = job_config_dict + + def _assert_Algorithm_property_unordered_equal(self, + algorithm_name, + property_name, + expected_property_value): + algconfigdict = self._job_config_dict[algorithm_name] + actual_property_value_as_str = algconfigdict[property_name] + # need to evaluate to obtain actual Python object + actual_property_value = eval(actual_property_value_as_str) + expected_property_value_sorted = sorted(expected_property_value) + actual_property_value_sorted = sorted(actual_property_value) + + failure_message = "{algorithm}.{property} has a different " \ + "value than expected!\n" \ + "expected (sorted):\n" \ + " {expected}\n" \ + "actual (sorted):\n" \ + " {actual}".format( + algorithm=algorithm_name, + property=property_name, + expected=expected_property_value_sorted, + actual=actual_property_value_sorted) + self.assertEqual(expected_property_value_sorted, + actual_property_value_sorted, + failure_message) + + + def _assert_Algorithm_property_ordered_equal(self, + algorithm_name, + property_name, + expected_property_value): + algconfigdict = self._job_config_dict[algorithm_name] + actual_property_value_as_str = algconfigdict[property_name] + # need to evaluate to obtain actual Python object + actual_property_value = eval(actual_property_value_as_str) + + failure_message = "{algorithm}.{property} has a different " \ + "value than expected!\n" \ + "expected:\n" \ + " {expected}\n" \ + "actual:\n" \ + " {actual}".format( + algorithm=algorithm_name, + property=property_name, + expected=str(expected_property_value), + actual=str(actual_property_value)) + self.assertEqual(expected_property_value, + actual_property_value, + failure_message) + + + def _assert_Algorithm_property_equal(self, + algorithm_name, + property_name, + expected_property_value): + algconfigdict = self._job_config_dict[algorithm_name] + actual_property_value = algconfigdict[property_name] + + failure_message = "{algorithm}.{property} has a different " \ + "value than expected!\n" \ + "expected:\n" \ + " {expected}\n" \ + "actual:\n" \ + " {actual}".format( + algorithm=algorithm_name, + property=property_name, + expected=str(expected_property_value), + actual=str(actual_property_value)) + self.assertEqual(str(expected_property_value), + str(actual_property_value), + failure_message) + + + def _detailed_ConfigurablePropertiesCheck(self, + tested_configurable_name, + expected_property_list, + expected_nonstring_properties, + expected_string_properties): + testedConfigurableDict = self._job_config_dict[tested_configurable_name] + actual_list = testedConfigurableDict.keys() + expected_property_value_sorted = sorted(expected_property_list) + actual_property_value_sorted = sorted(actual_list) + + failure_message = "{configurable}.keys() has a different " \ + "value than expected!\n" \ + "expected (sorted):\n" \ + " {expected}\n" \ + "actual (sorted):\n" \ + " {actual}".format( + configurable=tested_configurable_name, + expected=expected_property_value_sorted, + actual=actual_property_value_sorted) + self.assertEqual(expected_property_value_sorted, + actual_property_value_sorted, + failure_message) + + for key, value in expected_nonstring_properties.iteritems(): + expected_Property = eval(value) + self._assert_Algorithm_property_equal( + tested_configurable_name, + key, + expected_Property) + + for key, value in expected_string_properties.iteritems(): + expected_Property = value + self._assert_Algorithm_property_equal( + tested_configurable_name, + key, + expected_Property) + + + def test___PileUpToolsAlg_is_second_in_AthAlgSeq(self): + expected_AlgSequence = ['TimingAlg/DigiTimerBegin', 'PileUpToolsAlg/StandardSignalOnlyTruthPileUpToolsAlg', 'LArRawChannelBuilder/LArRawChannelBuilder', 'LArDigitThinner/LArDigitThinner', 'TileDigitsMaker/TileDigitsMaker', 'TileRawChannelMaker/TileRChMaker', 'TileRawChannelToL2/TileRawChannelToL2', 'CscDigitToCscRDO/CscDigitToCscRDO', 'MdtDigitToMdtRDO/MdtDigitToMdtRDO', 'RpcDigitToRpcRDO/RpcDigitToRpcRDO', 'TgcDigitToTgcRDO/TgcDigitToTgcRDO', 'LArTTL1Maker/LArTTL1Maker', 'TileHitToTTL1/TileHitToTTL1', 'TilePulseForTileMuonReceiver/TilePulseForTileMuonReceiver', 'TileMuonReceiverDecision/TileMuonReceiverDecision', 'AthenaOutputStream/StreamRDO'] + ath_alg_seqence_as_str = self._job_config_dict['AthAlgSeq']['Members'] + # need to evaluate to obtain actual Python object + ath_alg_seqence_list = eval(ath_alg_seqence_as_str) + + actual_2nd_ath_alg_sequence_entry = ath_alg_seqence_list[1] + print ath_alg_seqence_list + expected_2nd_ath_alg_sequence_entry = "PileUpToolsAlg/StandardSignalOnlyTruthPileUpToolsAlg" + self.assertEqual(expected_2nd_ath_alg_sequence_entry, + actual_2nd_ath_alg_sequence_entry) + self.assertEqual(expected_AlgSequence, ath_alg_seqence_list) + + + def test___StandardSignalOnlyTruthPileUpToolsAlg_PileUpTools(self): + expected_PileUpTools = ['MergeMcEventCollTool/SignalOnlyMcEventCollTool','MergeTruthJetsTool/MergeTruthJetsTool','MergeTrackRecordCollTool/MergeTrackRecordCollTool','MergeCalibHitsTool/MergeCalibHitsTool','BCM_DigitizationTool/BCM_DigitizationTool','PixelDigitizationTool/PixelDigitizationTool','SCT_DigitizationTool/SCT_DigitizationTool','TRTDigitizationTool/TRTDigitizationTool','LArPileUpTool/LArPileUpTool','TileHitVecToCntTool/TileHitVecToCntTool','CscDigitizationTool/CscDigitizationTool','MdtDigitizationTool/MdtDigitizationTool','RpcDigitizationTool/RpcDigitizationTool','TgcDigitizationTool/TgcDigitizationTool','MergeRecoTimingObjTool/MergeRecoTimingObjTool'] + self._assert_Algorithm_property_unordered_equal( + 'StandardSignalOnlyTruthPileUpToolsAlg', + 'PileUpTools', + expected_PileUpTools) + + + def test___MergeTruthJetsTool_properties(self): + tested_configurable_name = 'ToolSvc.MergeTruthJetsTool' + expected_property_list = ['DetStore', 'EvtStore', 'ExtraInputs', 'ExtraOutputs', 'FirstXing', 'LastXing'] + expected_nonstring_properties = {'LastXing': '100', 'FirstXing': '-500'} + expected_string_properties = {} # Not checking any specific property values + self._detailed_ConfigurablePropertiesCheck( + tested_configurable_name, + expected_property_list, + expected_nonstring_properties, + expected_string_properties) + + + def test___MergeTrackRecordCollTool_properties(self): + tested_configurable_name = 'ToolSvc.MergeTrackRecordCollTool' + expected_property_list = ['DetStore', 'EvtStore', 'ExtraInputs', 'ExtraOutputs', 'FirstXing', 'LastXing'] + expected_nonstring_properties = {'LastXing': '1', 'FirstXing': '-1'} + expected_string_properties = {} # Not checking any specific property values + self._detailed_ConfigurablePropertiesCheck( + tested_configurable_name, + expected_property_list, + expected_nonstring_properties, + expected_string_properties) + + + def test___MergeCalibHitsTool_properties(self): + tested_configurable_name = 'ToolSvc.MergeCalibHitsTool' + expected_property_list = ['DetStore', 'EvtStore', 'ExtraInputs', 'ExtraOutputs', 'FirstXing', 'LastXing'] + expected_nonstring_properties = {'LastXing': '1', 'FirstXing': '-1'} + expected_string_properties = {} # Not checking any specific property values + self._detailed_ConfigurablePropertiesCheck( + tested_configurable_name, + expected_property_list, + expected_nonstring_properties, + expected_string_properties) + + + def test___BCM_DigitizationTool_properties(self): + tested_configurable_name = 'ToolSvc.BCM_DigitizationTool' + expected_property_list = ['DetStore', 'EffDistanceParam', 'EffSharpnessParam', 'EvtStore', 'ExtraInputs', 'ExtraOutputs', 'FirstXing', 'HitCollName', 'LastXing', 'MIPDeposit', 'ModNoise', 'ModSignal', 'NinoThr', 'RndmSvc', 'TimeDelay'] + expected_nonstring_properties = {'LastXing': '0', 'FirstXing': '-25'} + expected_string_properties = {'HitCollName': 'BCMHits'} + self._detailed_ConfigurablePropertiesCheck( + tested_configurable_name, + expected_property_list, + expected_nonstring_properties, + expected_string_properties) + + + def test___SignalOnlyMcEventCollTool_properties(self): + tested_configurable_name = 'ToolSvc.SignalOnlyMcEventCollTool' + expected_property_list = ['KeepUnstable', 'SaveInTimeMinBias', 'AddBackgroundCollisionVertices', 'zRange', 'TruthCollKey', 'OnlySaveSignalTruth', 'OutOfTimeAbsEtaMax', 'rRange', 'CompressOutputCollection', 'ExtraOutputs', 'AbsEtaMax', 'LastXing', 'SaveOutOfTimeMinBias', 'ExtraInputs', 'DetStore', 'SaveCavernBackground', 'FirstXing', 'SaveRestOfMinBias', 'EvtStore', 'HighTimeToKeep', 'LowTimeToKeep'] + expected_nonstring_properties = {'KeepUnstable': 'False', 'SaveInTimeMinBias': 'True', 'AddBackgroundCollisionVertices': 'True', 'zRange': '200.0', 'OnlySaveSignalTruth': 'True', 'OutOfTimeAbsEtaMax': '3.0', 'rRange': '20.0', 'CompressOutputCollection': 'False', 'ExtraOutputs': '[]', 'AbsEtaMax': '5.0', 'LastXing': '0', 'SaveOutOfTimeMinBias': 'True', 'ExtraInputs': '[]', 'SaveCavernBackground': 'True', 'FirstXing': '0', 'SaveRestOfMinBias': 'False', 'HighTimeToKeep': '50.5', 'LowTimeToKeep': '-50.5'} + expected_string_properties = {'TruthCollKey': 'TruthEvent'} + self._detailed_ConfigurablePropertiesCheck( + tested_configurable_name, + expected_property_list, + expected_nonstring_properties, + expected_string_properties) + + + def test___PixelDigitizationTool_properties(self): + tested_configurable_name = 'ToolSvc.PixelDigitizationTool' + expected_property_list = ['ChargeTools', 'DetStore', 'EnergyDepositionTool', 'EvtStore', 'ExtraInputs', 'ExtraOutputs', 'FirstXing', 'FrontEndSimTools', 'HardScatterSplittingMode', 'InputObjectName', 'LastXing', 'MergeSvc', 'RndmEngine', 'RndmSvc'] + expected_nonstring_properties = {'LastXing': '25', 'FirstXing': '-25'} + expected_string_properties = {'InputObjectName': 'PixelHits'} + self._detailed_ConfigurablePropertiesCheck( + tested_configurable_name, + expected_property_list, + expected_nonstring_properties, + expected_string_properties) + + + def test___SCT_DigitizationTool_properties(self): + tested_configurable_name = 'ToolSvc.SCT_DigitizationTool' + expected_property_list = ['BarrelOnly', 'DetStore', 'EnableHits', 'EvtStore', 'ExtraInputs', 'ExtraOutputs', 'FirstXing', 'FrontEnd', 'HardScatterSplittingMode', 'InputObjectName', 'LastXing', 'MergeSvc', 'OutputObjectName', 'OutputSDOName', 'RndmSvc', 'SurfaceChargesGenerator'] + expected_nonstring_properties = {'LastXing': '25', 'FirstXing': '-50'} + expected_string_properties = {'InputObjectName': 'SCT_Hits', 'OutputObjectName': 'SCT_RDOs', 'OutputSDOName': 'SCT_SDO_Map'} + self._detailed_ConfigurablePropertiesCheck( + tested_configurable_name, + expected_property_list, + expected_nonstring_properties, + expected_string_properties) + + + def test___TRTDigitizationTool_properties(self): + tested_configurable_name = 'ToolSvc.TRTDigitizationTool' + expected_property_list = ['DetStore', 'EvtStore', 'ExtraInputs', 'ExtraOutputs', 'FirstXing', 'HardScatterSplittingMode', 'InDetTRTStrawStatusSummarySvc', 'LastXing', 'MergeSvc', 'OutputObjectName', 'OutputSDOName', 'Override_TrtRangeCutProperty', 'PAI_Tool_Ar', 'PAI_Tool_Kr', 'PAI_Tool_Xe', 'RndmSvc', 'SimDriftTimeTool', 'TRT_StrawNeighbourSvc'] + expected_nonstring_properties = {'LastXing': '50', 'FirstXing': '-50'} + expected_string_properties = {'OutputObjectName': 'TRT_RDOs', 'OutputSDOName': 'TRT_SDO_Map'} # No Input name property + self._detailed_ConfigurablePropertiesCheck( + tested_configurable_name, + expected_property_list, + expected_nonstring_properties, + expected_string_properties) + + + def test___LArPileUpTool_properties(self): + tested_configurable_name = 'ToolSvc.LArPileUpTool' + expected_property_list = ['ADC2MeVTool', 'AutoCorrNoiseTool', 'BadChannelTool', 'DetStore', 'DigitContainer', 'EmBarrelHitContainerName', 'EmEndCapHitContainerName', 'EvtStore', 'ExtraInputs', 'ExtraOutputs', 'FirstXing', 'ForWardHitContainerName', 'HecHitContainerName', 'HighGainThreshFCAL', 'LastXing', 'MaskingTool', 'NoiseOnOff', 'Nsamples', 'RndmEvtOverlay', 'RndmSvc', 'TriggerTimeToolName', 'firstSample', 'useLArFloat'] + expected_nonstring_properties = {'LastXing': '101', 'FirstXing': '-751', 'Nsamples': '4', 'EmBarrelHitContainerName': '["LArHitEMB"]', 'EmEndCapHitContainerName': '["LArHitEMEC"]', 'ForWardHitContainerName': '["LArHitFCAL"]', 'HecHitContainerName': '["LArHitHEC"]'} + expected_string_properties = {'DigitContainer': 'LArDigitContainer_MC'} + self._detailed_ConfigurablePropertiesCheck( + tested_configurable_name, + expected_property_list, + expected_nonstring_properties, + expected_string_properties) + + + def test___TileHitVecToCntTool_properties(self): + tested_configurable_name = 'ToolSvc.TileHitVecToCntTool' + expected_property_list = ['DetStore', 'EvtStore', 'ExtraInputs', 'ExtraOutputs', 'FirstXing', 'LastXing', 'PileUp', 'RndmSvc', 'TileHitContainer', 'TileHitVectors', 'TileInfoName', 'TriggerTimeTool'] + expected_nonstring_properties = {'LastXing': '150', 'FirstXing': '-200', 'TileHitVectors': '["TileHitVec", "MBTSHits"]'} + expected_string_properties = {'TileHitContainer': 'TileHitCnt'} + self._detailed_ConfigurablePropertiesCheck( + tested_configurable_name, + expected_property_list, + expected_nonstring_properties, + expected_string_properties) + + + def test___CscDigitizationTool_properties(self): + tested_configurable_name = 'ToolSvc.CscDigitizationTool' + expected_property_list = ['DetStore', 'DriftVelocity', 'ElectronEnergy', 'EvtStore', 'ExtraInputs', 'ExtraOutputs', 'FirstXing', 'InputObjectName', 'LastXing', 'NewDigitEDM', 'OutputObjectName', 'RndmEngine', 'RndmSvc', 'WindowLowerOffset', 'WindowUpperOffset', 'amplification', 'cscCalibTool', 'isPileUp', 'pedestal'] + expected_nonstring_properties = {'LastXing': '175', 'FirstXing': '-375'} + expected_string_properties = {'InputObjectName': 'CSC_Hits', 'OutputObjectName': 'CSC_DIGITS'} + self._detailed_ConfigurablePropertiesCheck( + tested_configurable_name, + expected_property_list, + expected_nonstring_properties, + expected_string_properties) + + + def test___MdtDigitizationTool_properties(self): + tested_configurable_name = 'ToolSvc.MdtDigitizationTool' + expected_property_list = ['DetStore', 'DigitizationTool', 'DiscardEarlyHits', 'DoQballCharge', 'EvtStore', 'ExtraInputs', 'ExtraOutputs', 'FirstXing', 'LastXing', 'MDTCondSummarySvc', 'MaskedStations', 'MdtCalibrationDbSvc', 'RndmEngine', 'RndmSvc', 'TwinRndmEngine', 'TwinRndmSvc', 'UseDeadChamberSvc', 'UseTof'] + expected_nonstring_properties = {'LastXing': '150', 'FirstXing': '-800'} + expected_string_properties = {} # Not checking any specific property values + self._detailed_ConfigurablePropertiesCheck( + tested_configurable_name, + expected_property_list, + expected_nonstring_properties, + expected_string_properties) + + + def test___RpcDigitizationTool_properties(self): + tested_configurable_name = 'ToolSvc.RpcDigitizationTool' + expected_property_list = ['ClusterSize1_2uncorr', 'ClusterSize_fromCOOL', 'CutProjectedTracks', 'DeadTime', 'DetStore', 'DumpFromDbFirst', 'EfficiencyPatchForBMShighEta', 'Efficiency_fromCOOL', 'EvtStore', 'ExtraInputs', 'ExtraOutputs', 'FirstXing', 'FracClusterSize1_A', 'FracClusterSize1_C', 'FracClusterSize2_A', 'FracClusterSize2_C', 'FracClusterSizeTail_A', 'FracClusterSizeTail_C', 'IgnoreRunDependentConfig', 'LastXing', 'MeanClusterSizeTail_A', 'MeanClusterSizeTail_C', 'OnlyEtaEff_A', 'OnlyEtaEff_C', 'OnlyPhiEff_A', 'OnlyPhiEff_C', 'PanelId_OFF_fromlist', 'PanelId_OK_fromlist', 'PatchForRpcTime', 'PatchForRpcTimeShift', 'PhiAndEtaEff_A', 'PhiAndEtaEff_C', 'PrintCalibrationVector', 'RPCCondSummarySvc', 'RPCInfoFromDb', 'RndmEngine', 'RndmSvc', 'testbeam_clustersize', 'turnON_clustersize', 'turnON_efficiency'] + expected_nonstring_properties = {'LastXing': '125', 'FirstXing': '-150'} + expected_string_properties = {} # Not checking any specific property values + self._detailed_ConfigurablePropertiesCheck( + tested_configurable_name, + expected_property_list, + expected_nonstring_properties, + expected_string_properties) + + + def test___TgcDigitizationTool_properties(self): + tested_configurable_name = 'ToolSvc.TgcDigitizationTool' + expected_property_list = ['DetStore', 'EvtStore', 'ExtraInputs', 'ExtraOutputs', 'FirstXing', 'LastXing', 'RndmEngine', 'RndmSvc'] + expected_nonstring_properties = {'LastXing': '75', 'FirstXing': '-50'} + expected_string_properties = {} # Not checking any specific property values + self._detailed_ConfigurablePropertiesCheck( + tested_configurable_name, + expected_property_list, + expected_nonstring_properties, + expected_string_properties) + + +if __name__ == '__main__': + unittest.main() -- GitLab From a9568859625adaf3fc42c2e87a062bec13dc225a Mon Sep 17 00:00:00 2001 From: Walter Lampl <walter.lampl@cern.ch> Date: Mon, 16 Jul 2018 09:16:21 +0000 Subject: [PATCH 467/562] ComponentAccumulator w/o addConfig Former-commit-id: 202103473e19508fdf01d3b277abbb311e0f613e --- .../CaloRec/python/CaloCellMakerConfig.py | 32 +- .../CaloRec/python/CaloTopoClusterConfig.py | 27 +- .../CaloTools/python/CaloNoiseToolConfig.py | 14 +- Control/AthenaCommon/python/Configurable.py | 19 +- .../python/ComponentAccumulator.py | 339 ++++++++++-------- .../python/UnifyProperties.py | 51 +++ Database/IOVDbSvc/python/IOVDbSvcConfig.py | 9 +- .../AtlasGeoModel/python/GeoModelConfig.py | 14 +- Event/EventInfoMgt/python/TagInfoMgrConfig.py | 35 ++ .../python/LArBadChannelConfig.py | 38 +- .../LArCabling/python/LArCablingConfig.py | 4 +- .../LArCellRec/python/LArCellBuilderConfig.py | 25 +- .../LArGeoAlgsNV/python/LArGMConfig.py | 13 +- .../TileGeoModel/python/TileGMConfig.py | 8 +- .../L1Decoder/python/L1DecoderConfig.py | 19 +- .../L1Decoder/python/L1MuonConfig.py | 19 +- .../TrigUpgradeTest/python/EgammaCaloMod.py | 72 ++-- .../TrigUpgradeTest/share/newJOtest.py | 32 +- 18 files changed, 469 insertions(+), 301 deletions(-) create mode 100644 Control/AthenaConfiguration/python/UnifyProperties.py create mode 100644 Event/EventInfoMgt/python/TagInfoMgrConfig.py diff --git a/Calorimeter/CaloRec/python/CaloCellMakerConfig.py b/Calorimeter/CaloRec/python/CaloCellMakerConfig.py index 6fb8d62c3ec6..01f35296ad0c 100644 --- a/Calorimeter/CaloRec/python/CaloCellMakerConfig.py +++ b/Calorimeter/CaloRec/python/CaloCellMakerConfig.py @@ -11,26 +11,31 @@ def CaloCellMakerCfg(configFlags): from LArGeoAlgsNV.LArGMConfig import LArGMCfg from TileGeoModel.TileGMConfig import TileGMCfg - result.addConfig(LArGMCfg,configFlags) - result.addConfig(TileGMCfg,configFlags) + + result.merge(LArGMCfg(configFlags)) + result.merge(TileGMCfg(configFlags)) - theLArCellMaker=result.addConfig(LArCellBuilderCfg,configFlags) + acc,theLArCellMaker=LArCellBuilderCfg(configFlags) + result.merge(acc) - theLArCellCorrectors=result.addConfig(LArCellCorrectorCfg,configFlags) + acc,theLArCellCorrectors=LArCellCorrectorCfg(configFlags) + result.merge(acc) theTileCellBuilder = TileCellBuilder() - result.addEventAlgo(CaloCellMaker(CaloCellMakerToolNames=theLArCellMaker+ - [CaloCellContainerFinalizerTool(),]+theLArCellCorrectors, - CaloCellsOutputName="AllCalo")) - return result + cellAlgo=(CaloCellMaker(CaloCellMakerToolNames=[theLArCellMaker,CaloCellContainerFinalizerTool()]+theLArCellCorrectors, + CaloCellsOutputName="AllCalo")) + return result,cellAlgo if __name__=="__main__": from AthenaCommon.Logging import log from AthenaCommon.Constants import DEBUG - log.setLevel(DEBUG) + + from AthenaCommon.Configurable import Configurable + Configurable.configurableRun3Behavior=1 + from AthenaConfiguration.AllConfigFlags import ConfigFlags ConfigFlags.set("global.InputFiles",["myRDO.pool.root"]) @@ -39,11 +44,14 @@ if __name__=="__main__": cfg=ComponentAccumulator() from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg - cfg.addConfig(PoolReadCfg,ConfigFlags) + cfg.merge(PoolReadCfg(ConfigFlags)) - cfg.addConfig(CaloCellMakerCfg,ConfigFlags) - cfg.getEventAlgo("CaloCellMaker").CaloCellsOutputName="AllCaloNew" + acc,cellMakerAlg=CaloCellMakerCfg(ConfigFlags) + cfg.merge(acc) + cellMakerAlg.CaloCellsOutputName="AllCaloNew" + cfg.addEventAlgo(cellMakerAlg) + f=open("CaloCellMaker.pkl","w") cfg.store(f) f.close() diff --git a/Calorimeter/CaloRec/python/CaloTopoClusterConfig.py b/Calorimeter/CaloRec/python/CaloTopoClusterConfig.py index afc21873354f..4d22be69453f 100644 --- a/Calorimeter/CaloRec/python/CaloTopoClusterConfig.py +++ b/Calorimeter/CaloRec/python/CaloTopoClusterConfig.py @@ -17,11 +17,12 @@ def CaloTopoClusterCfg(configFlags): from CaloRec.CaloRecConf import CaloTopoClusterMaker, CaloTopoClusterSplitter, CaloClusterMomentsMaker, CaloClusterMaker, CaloClusterSnapshot #, CaloClusterLockVars, CaloClusterPrinter - result.addConfig(LArGMCfg,configFlags) - result.addConfig(TileGMCfg,configFlags) - result.addConfig(CaloNoiseToolCfg,configFlags) + result.merge(LArGMCfg(configFlags)) + result.merge(TileGMCfg(configFlags)) - theCaloNoiseTool=result.getPublicTool("CaloNoiseTool") + #Get CaloNoiseTool + acc,theCaloNoiseTool=CaloNoiseToolCfg(configFlags) + result.merge(acc) # maker tools TopoMaker = CaloTopoClusterMaker("TopoMaker") @@ -94,13 +95,15 @@ def CaloTopoClusterCfg(configFlags): CaloTopoCluster.ClustersOutputName="CaloCalTopoClusters" CaloTopoCluster.ClusterMakerTools = [TopoMaker, TopoSplitter] - - result.addEventAlgo(CaloTopoCluster) - return result + + return result,CaloTopoCluster if __name__=="__main__": + from AthenaCommon.Configurable import Configurable + Configurable.configurableRun3Behavior=1 + from AthenaCommon.Logging import log from AthenaCommon.Constants import DEBUG from AthenaConfiguration.AllConfigFlags import ConfigFlags @@ -114,10 +117,14 @@ if __name__=="__main__": cfg=ComponentAccumulator() from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg - cfg.addConfig(PoolReadCfg,ConfigFlags) + cfg.merge(PoolReadCfg(ConfigFlags)) + + topoAcc,topoAlg=CaloTopoClusterCfg(ConfigFlags) + topoAlg.ClustersOutputName="CaloCalTopoClustersNew" - cfg.addConfig(CaloTopoClusterCfg,ConfigFlags) - cfg.getEventAlgo("CaloTopoCluster").ClustersOutputName="CaloCalTopoClustersNew" + cfg.merge(topoAcc) + cfg.addEventAlgo(topoAlg) + f=open("CaloTopoCluster.pkl","w") cfg.store(f) diff --git a/Calorimeter/CaloTools/python/CaloNoiseToolConfig.py b/Calorimeter/CaloTools/python/CaloNoiseToolConfig.py index a1dfb6a1f547..c3fe4f10e23e 100644 --- a/Calorimeter/CaloTools/python/CaloNoiseToolConfig.py +++ b/Calorimeter/CaloTools/python/CaloNoiseToolConfig.py @@ -18,7 +18,7 @@ def CaloNoiseToolCfg(configFlags): if configFlags.get("global.isOnline"): #online mode: folder = "/CALO/Noise/CellNoise" - result.addConfig(addFolders,configFlags,inputFlags,folder,'CALO_ONL') + result.merge(addFolders(configFlags,inputFlags,folder,'CALO_ONL')) caloNoiseToolDB.FolderNames=[folder,] if fixedLumi >= 0 : caloNoiseToolDB.Luminosity = fixedLumi @@ -26,7 +26,7 @@ def CaloNoiseToolCfg(configFlags): else: if useCaloLumi: lumiFolder='/CALO/Noise/PileUpNoiseLumi' - result.addConfig(addFolders,configFlags,lumiFolder,'CALO') + result.merge(addFolders(configFlags,lumiFolder,'CALO')) caloNoiseToolDB.LumiFolderName = lumiFolder caloNoiseToolDB.Luminosity = -1. log.info("online mode: use luminosity from /CALO/Noise/PileUpNoiseLumi to scale pileup noise") @@ -45,7 +45,7 @@ def CaloNoiseToolCfg(configFlags): else: if useCaloLumi: lumiFolder='/CALO/Ofl/Noise/PileUpNoiseLumi' - result.addConfig(addFolders,configFlags,lumiFolder,'CALO_OFL') + result.merge(addFolders(configFlags,lumiFolder,'CALO_OFL')) log.info("offline mode: use luminosity from /CALO/Ofl/Noise/PileuUpNoiseLumi to scale pileup noise") caloNoiseToolDB.LumiFolderName = lumiFolder caloNoiseToolDB.Luminosity=-1. @@ -69,11 +69,11 @@ def CaloNoiseToolCfg(configFlags): caloNoiseToolDB.Luminosity = -1 if useCaloLumi: lumiFolder='/CALO/Ofl/Noise/PileUpNoiseLumi' - result.addConfig(addFolders,configFlags,lumiFolder,'CALO_OFL') + result.merge(addFolders(configFlags,lumiFolder,'CALO_OFL')) log.info("offline mode: use luminosity from /CALO/Ofl/Noise/PileUpNoiseLumi to scale pileup noise") else: lumiFolder = '/TRIGGER/LUMI/LBLESTONL' - result.addConfig(addFolders,configFlags,lumiFolder,'TRIGGER_ONL') + result.merge(addFolders(configFlags,lumiFolder,'TRIGGER_ONL')) log.info("offline mode: use luminosity = f(Lumiblock) to scale pileup noise") caloNoiseToolDB.LumiFolderName = lumiFolder @@ -91,10 +91,10 @@ def CaloNoiseToolCfg(configFlags): pass #end of real data case for (db,fldr) in folders: - result.addConfig(addFolders,configFlags,fldr,db) + result.merge(addFolders(configFlags,fldr,db)) caloNoiseToolDB.FolderNames=[f[1] for f in folders] result.addPublicTool(caloNoiseToolDB) - return result + return result,caloNoiseToolDB diff --git a/Control/AthenaCommon/python/Configurable.py b/Control/AthenaCommon/python/Configurable.py index f0bd982aafe3..213e05f0a527 100755 --- a/Control/AthenaCommon/python/Configurable.py +++ b/Control/AthenaCommon/python/Configurable.py @@ -22,6 +22,7 @@ __all__ = [ 'Configurable', 'ConfigurableUser' ] + ## for messaging from Logging import logging log = logging.getLogger( 'Configurable' ) @@ -64,6 +65,8 @@ class Configurable( object ): _printOnce = 0 + configurableRun3Behavior=0 + def __new__ ( cls, *args, **kwargs ): """To Gaudi, any object with the same type/name is the same object. Hence, this is mimicked in the configuration: instantiating a new Configurable @@ -109,7 +112,9 @@ class Configurable( object ): raise NameError( '"%s": type separator "/" no allowed in component name, '\ 'typename is derived from configurable instead' % name ) - if 'AthenaConfiguration.ComponentAccumulator' not in sys.modules.keys(): + #Uncomment the following line for debugging: + #print "cls.configurableRun3Behavior=",cls.configurableRun3Behavior + if cls.configurableRun3Behavior==0: # ordinary recycle case try: conf = cls.configurables[ name ] @@ -165,7 +170,11 @@ class Configurable( object ): (name,conf.__class__.__name__,cls.__name__) ) except KeyError: pass - pass #end if not new configuration approach + else: + #Run 3 style config + #Uncomment this line to verify that RecExCommon doesn't use that + #print "Run 3 style config" + pass #end if not new configuration approach # still here: create a new instance ... conf = object.__new__( cls ) @@ -177,10 +186,12 @@ class Configurable( object ): cls.__init__( conf, *args, **kwargs ) # update normal, per-class cache - cls.configurables[ name ] = conf + if cls.configurableRun3Behavior==0: + cls.configurables[ name ] = conf # update generics super-cache - cls.allConfigurables[ name ] = conf + if cls.configurableRun3Behavior==0: + cls.allConfigurables[ name ] = conf return conf diff --git a/Control/AthenaConfiguration/python/ComponentAccumulator.py b/Control/AthenaConfiguration/python/ComponentAccumulator.py index 7e5fb79efd9d..ed445f6118ec 100644 --- a/Control/AthenaConfiguration/python/ComponentAccumulator.py +++ b/Control/AthenaConfiguration/python/ComponentAccumulator.py @@ -3,57 +3,33 @@ from AthenaCommon.Logging import logging from AthenaCommon.Configurable import Configurable,ConfigurableService,ConfigurableAlgorithm,ConfigurableAlgTool from AthenaCommon.CFElements import isSequence,findSubSequence,findAlgorithm,flatSequencers,findOwningSequence -from AthenaCommon.AlgSequence import AlgSequence +from AthenaCommon.AlgSequence import AthSequencer from AthenaConfiguration.AthConfigFlags import AthConfigFlags import GaudiKernel.GaudiHandles as GaudiHandles import ast import collections +from UnifyProperties import unifyProperty + class DeduplicationFailed(RuntimeError): pass class ConfigurationError(RuntimeError): pass -class CurrentSequence: - sequence = AlgSequence("AthAlgSeq") - - @staticmethod - def set( newseq ): - #print "CurrentSequence set.... ", newseq.name() - CurrentSequence.sequence = newseq - - @staticmethod - def get( ): - #print "CurrentSequence ....get %s " % CurrentSequence.sequence.name() - return CurrentSequence.sequence - - -_propsToUnify=frozenset(("GeoModelSvc.DetectorTools","CondInputLoader.Load", - "IOVDbSvc.Folders", - "IOVDbSvc.FoldersToMetaData", - "EvtPersistencySvc.CnvServices", - "PoolSvc.ReadCatalog","ProxyProviderSvc.ProviderNames" )) - -def unifyProp(prop1,prop2): - #May want to strip whitespace in case the params are lists of strings - s1=set(prop1) - s2=set(prop2) - su=s1 | s2 - return list(su) +_servicesToCreate=frozenset(('GeoModelSvc','TileInfoLoader')) class ComponentAccumulator(object): def __init__(self): self._msg=logging.getLogger('ComponentAccumulator') - self._sequence=CurrentSequence.get() # sequence of algorithms - self._eventAlgs={} #Unordered list of event processing algorithms per sequence + their private tools + self._sequence=AthSequencer() #(Nested) sequence of event processing algorithms per sequence + their private tools self._conditionsAlgs=[] #Unordered list of conditions algorithms + their private tools self._services=[] #List of service, not yet sure if the order matters here in the MT age self._conditionsInput=set() #List of database folder (as string), eventually passed to IOVDbSvc self._eventInputs=set() #List of items (as strings) to be read from the input (required at least for BS-reading). - self._outputPerStream={} #Dictionary of {streamName,set(items)}, all as strings + self._outputPerStream={} #Dictionary of {streamName,set(items)}, all as strings self._theAppProps=dict() #Properties of the ApplicationMgr @@ -94,31 +70,32 @@ class ComponentAccumulator(object): self._msg.info( self._outputPerStream ) - def addSequence(self, newseq, sequence = None ): + def addSequence(self, newseq, parentName = None ): """ Adds new sequence. If second argument is present then it is added under another sequence """ - seq = CurrentSequence.get() - if sequence: - seq = findSubSequence(seq, sequence ) - if seq is None: - raise ConfigurationError("Missing sequence %s to add new sequence to" % sequence ) + if parentName is None: + parent=self._sequence + else: + parent = findSubSequence(self._sequence, parentName ) + if parent is None: + raise ConfigurationError("Missing sequence %s to add new sequence to" % parentName ) - if findSubSequence( self._sequence, newseq.name() ): + if findSubSequence( parent, newseq.name() ): raise ConfigurationError("Sequence %s already present" % newseq.name() ) - seq += newseq + parent += newseq return newseq + def moveSequence(self, sequence, destination ): - """ moves seqeunce from one sub-sequence to another, primary use case HLT Control Flow """ - start = CurrentSequence.get() - seq = findSubSequence(start, sequence ) + """ moves sequence from one sub-sequence to another, primary use case HLT Control Flow """ + seq = findSubSequence(self._sequence, sequence ) if seq is None: raise ConfigurationError("Can not find sequence to move %s " % sequence ) - owner = findOwningSequence(start, sequence) + owner = findOwningSequence(self._sequence, sequence) if owner is None: raise ConfigurationError("Can not find the sequence owning the %s " % sequence ) - dest = findSubSequence(start, destination ) + dest = findSubSequence(self._sequence, destination ) if dest is None: raise ConfigurationError("Can not find destination sequence %s to move to " % destination ) @@ -126,32 +103,49 @@ class ComponentAccumulator(object): dest += seq return seq - def addEventAlgo(self, algo,sequence=None): - if not isinstance(algo, ConfigurableAlgorithm): - raise TypeError("Attempt to add wrong type: %s as event algorithm" % type( algo ).__name__) - pass - seq = CurrentSequence.get() - if sequence is not None: - seq = findSubSequence( seq, sequence ) - if seq is None: - raise ConfigurationError("Unable to add %s to sequence %s as it is missing", algo.getFullName(), seq.name() ) - - self._msg.debug("Adding %s to sequence %s", algo.getFullName(), seq.name() ) - seq += algo - return algo + def getSequence(self,sequenceName=None): + if sequenceName is None: + return self._sequence + else: + return findSubSequence(self._sequence,sequenceName) - def getEventAlgo(self,name): - """ Looks for an algorithm given the name in current sequence and in nested scopes - NB. Not sure that this is what we expect. Maybe we want to start from the top always? - Limiting to the current scope reduces risk of cross talk. Will see in real life and make adjustments. - """ - algo = findAlgorithm( CurrentSequence.get(), name ) + + def addEventAlgo(self, algorithms,sequenceName=None): + if not isinstance(algorithms,collections.Sequence): + #Swallow both single algorithms as well as lists or tuples of algorithms + algorithms=[algorithms,] + + if sequenceName is None: + seq=self._sequence + else: + seq = findSubSequence(self._sequence, sequenceName ) + if seq is None: + raise ConfigurationError("Can not find sequence %s" % sequenceName ) + + + for algo in algorithms: + if not isinstance(algo, ConfigurableAlgorithm): + raise TypeError("Attempt to add wrong type: %s as event algorithm" % type( algo ).__name__) + + seq+=algo #TODO: Deduplication necessary? + pass + return None + + + def getEventAlgo(self,name,seqName=None): + if seqName is None: + seq=self._sequence + else: + seq = findSubSequence(self._sequence, seqName ) + + algo = findAlgorithm( seq, name ) if algo is None: raise ConfigurationError("Can not find an algorithm of name %s "% name) return algo + def addCondAlgo(self,algo): if not isinstance(algo, ConfigurableAlgorithm): raise TypeError("Attempt to add wrong type: %s as conditions algorithm" % type( algo ).__name__) @@ -203,14 +197,22 @@ class ComponentAccumulator(object): #Note that getattr for a list property works, even if it's not in ValuedProperties if (oldprop!=newprop): #found property mismatch - if isinstance(oldprop,list): #if properties are concatinable, do that! + if isinstance(oldprop,list): #if properties are mergeable, do that! propid="%s.%s" % (comp.getType(),str(prop)) - if propid not in _propsToUnify: - raise DeduplicationFailed("List property %s defined multiple times with conflicting values.\n " % propid \ - +"If this property should be concatinated, consider adding it to the _propsToUnify set") - - mergeprop=unifyProp(oldprop,newprop) + #Try merging this property. Will raise on failure + mergeprop=unifyProperty(propid,oldprop,newprop) setattr(comp,prop,mergeprop) + elif isinstance(oldprop,dict): #Dicts/maps can be unified + #find conflicting keys + doubleKeys= set(oldprop.keys()) & set(prop.keys()) + for k in doubleKeys(): + if oldprop[k]!= prop[k]: + raise DeduplicationFailed("Map-property '%s.%s' defined multiple times with conflicting values for key %s" % \ + (comp.getJobOptName(),str(prop),k)) + pass + mergeprop=oldprop + mergeprop.update(prop) + else: #self._msg.error("component '%s' defined multiple times with mismatching configuration", svcs[i].getJobOptName()) raise DeduplicationFailed("component '%s' defined multiple times with mismatching property %s" % \ @@ -228,8 +230,13 @@ class ComponentAccumulator(object): #end loop over existing components #No component of the same type & name found, simply append - self._msg.debug("Adding service/Tool/CondAlog %s to the job", newComp.getFullName()) - compList.append(newComp) + self._msg.debug("Adding component %s to the job", newComp.getFullName()) + + #The following is to work with internal list of service as well as gobal svcMgr as second parameter + try: + compList.append(newComp) + except: + compList+=newComp return True #True means something got added def getService(self,name): @@ -273,19 +280,34 @@ class ComponentAccumulator(object): self._theAppProps[key]=value pass - def __merge(self,other): + def merge(self,other): """ Merging in the other accumulator """ + if other is None: + return + + if isinstance(other,collections.Sequence): #Check if we got more than one argument + if len(other)==0: + raise ConfigurationError("Merge called with empty sequence as argument") + for par in other[1:]: + if par is not None: #possible improvment: Check type of par and try to merge if applicable (service, public tool) + self._msg.warning("Merge called with a sequence of potentially un-merged components") + raise RuntimeError() + other=other[0] + if not isinstance(other,ComponentAccumulator): raise TypeError("Attempt merge wrong type %s. Only instances of ComponentAccumulator can be added" % type(other).__name__) + if not Configurable.configurableRun3Behavior: + raise ConfigurationError("discoverd Configurable.configurableRun3Behavior=False while working woth ComponentAccumulator") + #destSubSeq = findSubSequence(self._sequence, sequence) #if destSubSeq == None: # raise ConfigurationError( "Nonexistent sequence %s in %s (or its sub-sequences)" % ( sequence, self._sequence.name() ) ) # def mergeSequences( dest, src ): for c in src.getChildren(): if isSequence( c ): - sub = findSubSequence( dest, c.name() ) + sub = findSubSequence( dest, c.name() ) #depth=1 ??? if sub: mergeSequences(sub, c ) else: @@ -301,6 +323,8 @@ class ComponentAccumulator(object): dest += c + #Merge sequences: + mergeSequences(self._sequence,other._sequence) # Merge Conditions inputs self._conditionsInput|=other._conditionsInput @@ -327,50 +351,38 @@ class ComponentAccumulator(object): self.setAppProperty(k,v) #Will warn about overrides - def addConfig(self,fct,configFlags,*args,**kwargs): - """ The heart and soul of configuration system. You need to read the whole documentation. - This method eliminates possibility that a downstream configuration alters the upstream one. - It is done by a two-fold measures: - - the sub-accumulators can not access the upstream accumulators and thus alter any configuration. - The combination process is defined in the __merge method of this class. Less flexibility == robustness. - """ + def appendToGlobals(self): + from AthenaCommon.AppMgr import ToolSvc, ServiceMgr, theApp + + for s in self._services: + self._deduplicate(s,ServiceMgr) + + if s.getJobOptName() in _servicesToCreate \ + and s.getJobOptName() not in theApp.CreateSvc: + theApp.CreateSvc.append(s.getJobOptName()) - #Safety check: Verify that the ConfigFlags are indeed locked: - if not isinstance(configFlags,AthConfigFlags): - raise ConfigurationError("Expected an instance of AthConfigFlags as parameter") + - if not configFlags.locked(): - raise ConfigurationError("You are trying to create a job using unlocked configFlags!") + for t in self._publicTools: + self._deduplicate(t,ToolSvc) + + condseq=AthSequencer ("AthCondSeq") + for c in self._conditionsAlgs: + self._deduplicate(c,condseq) - - currentSeq = seq = CurrentSequence.get() - if 'sequence' in kwargs: - seq = findSubSequence(seq, kwargs['sequence'] ) - if seq is None: - raise ConfigurationError("Can not add algorithms to sequence %s as it does not exist" % kwargs['sequence'] ) - else: - del kwargs['sequence'] - CurrentSequence.set( seq ) + for seqName, algoList in flatSequencers( self._sequence ).iteritems(): + seq=AthSequencer(seqName) + for alg in algoList: + seq+=alg + - self._msg.info("Executing configuration function %s", fct.__name__) - retval=fct(configFlags,*args,**kwargs) - CurrentSequence.set( currentSeq ) + for (k,v) in self._theAppProps.iteritems(): + if k not in [ 'CreateSvc', 'ExtSvc']: + setattr(theApp,k,v) + return - if isinstance(retval,collections.Sequence) and len(retval)>0: - toMerge=retval[0] - toReturn=list(retval[1:]) - elif isinstance(retval,ComponentAccumulator): - toMerge=retval - toReturn=[] - else: - print retval - raise ConfigurationError("Return value of configuration methods must be instaces of ComponentAccumulator or tuples starting with an instance of ComponentAccumulator") - - - self.__merge(toMerge) - return toReturn def appendConfigurable(self,confElem): name=confElem.getJobOptName() # to be FIXED @@ -449,18 +461,13 @@ class ComponentAccumulator(object): #Hack for now: self._jocfg["ApplicationMgr"]["CreateSvc"]=['ToolSvc/ToolSvc', 'AthDictLoaderSvc/AthDictLoaderSvc', 'AthenaSealSvc/AthenaSealSvc', 'CoreDumpSvc/CoreDumpSvc'] - + svcList=ast.literal_eval(self._jocfg["ApplicationMgr"]["ExtSvc"]) - def __addif( name ): - for svc in self._services: - if name == svc.getJobOptName(): - self._jocfg["ApplicationMgr"]["CreateSvc"].append( svc.getFullName() ) - __addif('DetDescrCnvSvc') - __addif('GeoModelSvc') - __addif('TileInfoLoader') - for svc in self._services: + if svc.getJobOptName() in _servicesToCreate: + self._jocfg["ApplicationMgr"]["CreateSvc"].append( svc.getFullName() ) + svcList.append(svc.getFullName()) #for k, v in svc.getValuedProperties().items(): # self._jocat[svcname][k]=str(v) @@ -481,8 +488,25 @@ class ComponentAccumulator(object): pickle.dump( self._jocfg, outfile ) pickle.dump( self._pycomps, outfile ) + + +def CAtoGlobalWrapper(cfgmethod,flags): + Configurable.configurableRun3Behavior+=1 + result=cfgmethod(flags) + Configurable.configurableRun3Behavior-=1 + + result.appendToGlobals() + return + + + + + + + # self test if __name__ == "__main__": + Configurable.configurableRun3Behavior+=1 # trivial case without any nested sequences from AthenaCommon.Configurable import ConfigurablePyAlgorithm # guinea pig algorithms from AthenaCommon.CFElements import seqAND, seqOR, parOR @@ -500,56 +524,61 @@ if __name__ == "__main__": def AlgsConf1(flags): acc = ComponentAccumulator() - acc.addEventAlgo( Algo("Algo1") ) - acc.addEventAlgo( Algo("Algo2") ) - return acc + a1=Algo("Algo1") + a2=Algo("Algo2") + return acc,[a1,a2] def AlgsConf2(flags): acc = ComponentAccumulator() - acc.addConfig( AlgsConf1, flags ) - acc.addEventAlgo( Algo("Algo3") ) - return acc + result,algs=AlgsConf1( flags ) + acc.merge(result) + algs.append(Algo("Algo3")) + return acc,algs acc = ComponentAccumulator() # top level algs - acc.addConfig( AlgsConf2,dummyCfgFlags ) + acc1,algs=AlgsConf2(dummyCfgFlags) + acc.merge(acc1) + acc.addEventAlgo(algs) # checks - assert findAlgorithm(AlgSequence("AthAlgSeq"), "Algo1", 1), "Algorithm not added to a top sequence" - assert findAlgorithm(AlgSequence("AthAlgSeq"), "Algo2", 1), "Algorithm not added to a top sequence" - assert findAlgorithm(AlgSequence("AthAlgSeq"), "Algo3", 1), "Algorithm not added to a top sequence" + assert findAlgorithm(acc.getSequence(), "Algo1", 1), "Algorithm not added to a top sequence" + assert findAlgorithm(acc.getSequence(), "Algo2", 1), "Algorithm not added to a top sequence" + assert findAlgorithm(acc.getSequence(), "Algo3", 1), "Algorithm not added to a top sequence" print( "Simple Configuration construction OK ") def AlgsConf3(flags): acc = ComponentAccumulator() - acc.addEventAlgo( Algo("NestedAlgo1") ) - return acc + na1=Algo("NestedAlgo1") + return acc,na1 def AlgsConf4(flags): - acc = ComponentAccumulator() - acc.addConfig( AlgsConf3,flags ) + acc,na1= AlgsConf3( flags ) NestedAlgo2 = Algo("NestedAlgo2") NestedAlgo2.OutputLevel=7 - acc.addEventAlgo( NestedAlgo2 ) - return acc + return acc,na1,NestedAlgo2 acc.addSequence( seqAND("Nest") ) - acc.addSequence( seqAND("subSequence1"), sequence="Nest" ) - acc.addSequence( parOR("subSequence2"), sequence="Nest" ) - - assert findSubSequence( AlgSequence("AthAlgSeq"), "subSequence1" ), "Adding sub-sequence failed" - assert findSubSequence( AlgSequence("AthAlgSeq"), "subSequence2" ), "Adding sub-sequence failed" - - acc.addSequence( seqAND("sub2Sequence1"), "subSequence1") - acc.addSequence( seqAND("sub3Sequence1"), "subSequence1") - acc.addSequence( seqAND("sub4Sequence1"), "subSequence1") - assert findSubSequence(AlgSequence("AthAlgSeq"), "sub2Sequence1"), "Adding sub-sequence failed" - assert findSubSequence( findSubSequence(AlgSequence("AthAlgSeq"), "subSequence1"), "sub2Sequence1" ), "Adding sub-sequence done in a wrong place" - - acc.addConfig( AlgsConf4, dummyCfgFlags, sequence="sub2Sequence1" ) - assert findAlgorithm(AlgSequence("AthAlgSeq"), "NestedAlgo1" ), "Algorithm added to nested sequence" - assert findAlgorithm(AlgSequence("AthAlgSeq"), "NestedAlgo1", 1 ) is None, "Algorithm mistakenly in top sequence" - assert findAlgorithm( findSubSequence(AlgSequence("AthAlgSeq"), "sub2Sequence1"), "NestedAlgo1", 1 ), "Algorithm not in right sequence" + acc.addSequence( seqAND("subSequence1"), parentName="Nest" ) + acc.addSequence( parOR("subSequence2"), parentName="Nest" ) + + + assert acc.getSequence("subSequence1" ), "Adding sub-sequence failed" + assert acc.getSequence("subSequence2" ), "Adding sub-sequence failed" + + acc.addSequence( seqAND("sub2Sequence1"), parentName="subSequence1") + acc.addSequence( seqAND("sub3Sequence1"), parentName="subSequence1") + acc.addSequence( seqAND("sub4Sequence1"), parentName="subSequence1") + assert acc.getSequence("sub2Sequence1"), "Adding sub-sequence failed" + assert findSubSequence(acc.getSequence("subSequence1"), "sub2Sequence1"), "Adding sub-sequence done in a wrong place" + + accNA1=AlgsConf4(dummyCfgFlags) + acc.merge(accNA1[0]) + acc.addEventAlgo(accNA1[1:],"sub2Sequence1" ) + + assert findAlgorithm(acc.getSequence(), "NestedAlgo1" ), "Algorithm added to nested sequence" + assert findAlgorithm(acc.getSequence(), "NestedAlgo1", 1 ) is None, "Algorithm mistakenly in top sequence" + assert findAlgorithm( findSubSequence(acc.getSequence(), "sub2Sequence1"), "NestedAlgo1", 1 ), "Algorithm not in right sequence" print( "Complex sequences construction also OK ") #acc.printConfig(True) @@ -564,11 +593,13 @@ if __name__ == "__main__": # some of them (in this case hltSteps) did not have properties recorded acc = ComponentAccumulator() acc.addSequence( seqOR("hltTop") ) - acc.addConfig( AlgsConf2, dummyCfgFlags, sequence="hltTop" ) # some algo - acc.addSequence( seqAND("hltSteps"), sequence="hltTop" ) - acc.addSequence( parOR("hltStep_1"), sequence="hltSteps" ) + acc2,algos2=AlgsConf2(dummyCfgFlags) + acc.merge(acc2) + acc.addEventAlgo(algos2,sequenceName="hltTop") # some algo + acc.addSequence( seqAND("hltSteps"), parentName="hltTop" ) + acc.addSequence( parOR("hltStep_1"), parentName="hltSteps" ) acc.addSequence( seqAND("L2CaloEgammaSeq"), "hltStep_1" ) - acc.addSequence( parOR("hltStep_2"), sequence="hltSteps" ) + acc.addSequence( parOR("hltStep_2"), parentName="hltSteps" ) acc.moveSequence( "L2CaloEgammaSeq", "hltStep_2" ) acc.printConfig() diff --git a/Control/AthenaConfiguration/python/UnifyProperties.py b/Control/AthenaConfiguration/python/UnifyProperties.py new file mode 100644 index 000000000000..4649d4bb5ff5 --- /dev/null +++ b/Control/AthenaConfiguration/python/UnifyProperties.py @@ -0,0 +1,51 @@ +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + +# A collection of methods to unify/merge list-properties +# ToDo: Define the merging-method when defining the property + + +def unifySet(prop1,prop2): + #May want to strip whitespace in case the params are lists of strings + s1=set(prop1) + s2=set(prop2) + su=s1 | s2 + return list(su) + +def unifySetOfPairs(prop1,prop2): + + def getPairs(seq): + r=set() + nPairs=int(len(seq)/2) + if (2*nPairs!=len(seq)): + from AthenaConfiguration.ComponentAccumulator import ConfigurationError + raise ConfigurationError("Expected a sequence with even number of elements") + + for i in range(0,nPairs): + r.add((seq[2*i],seq[2*i+1])) + return r + + setOfPairs1=getPairs(prop1) + setOfPairs2=getPairs(prop2) + unionOfPairs=(setOfPairs1 | setOfPairs2) + finallist=[] + for p in unionOfPairs: + finallist+=p + return finallist + +_propsToUnify={"GeoModelSvc.DetectorTools":unifySet, + "CondInputLoader.Load":unifySet, + "IOVDbSvc.Folders":unifySet, + "IOVDbSvc.FoldersToMetaData":unifySet, + "EvtPersistencySvc.CnvServices":unifySet, + "PoolSvc.ReadCatalog":unifySet, + "ProxyProviderSvc.ProviderNames":unifySet, + "TagInfoMgr.ExtraTagValuePairs":unifySetOfPairs, + } + + +def unifyProperty(propname,prop1,prop2): + if propname not in _propsToUnify: + from AthenaConfiguration.ComponentAccumulator import DeduplicationFailed + raise DeduplicationFailed("List property %s defined multiple times with conflicting values.\n " % propname \ + +"If this property should be merged, consider adding it to AthenaConfiguration/UnifyProperties.py") + return _propsToUnify[propname](prop1,prop2) diff --git a/Database/IOVDbSvc/python/IOVDbSvcConfig.py b/Database/IOVDbSvc/python/IOVDbSvcConfig.py index a7c98165833c..2cf7568a56b4 100644 --- a/Database/IOVDbSvc/python/IOVDbSvcConfig.py +++ b/Database/IOVDbSvc/python/IOVDbSvcConfig.py @@ -72,7 +72,7 @@ def IOVDbSvcCfg(configFlags): result.addService(DBReplicaSvc(COOLSQLiteVetoPattern="/DBRelease/")) - return result + return result,iovDbSvc #Convenience method to add folders: @@ -83,8 +83,7 @@ def addFolders(configFlags,folderstrings,detDb=None,className=None): if isinstance(folderstrings,str): folderstrings=[folderstrings,] - result=ComponentAccumulator() - result.addConfig(IOVDbSvcCfg,configFlags) + result,iovDbSvc=IOVDbSvcCfg(configFlags) #Add class-name to CondInputLoader (if reqired) if className is not None: @@ -95,7 +94,7 @@ def addFolders(configFlags,folderstrings,detDb=None,className=None): #result.addCondAlgo(CondInputLoader(Load=loadFolders)) - iovDbSvc=result.getService("IOVDbSvc") + if detDb is not None: dbname=configFlags.get("IOVDb.DatabaseInstance") @@ -112,7 +111,7 @@ def addFolders(configFlags,folderstrings,detDb=None,className=None): else: iovDbSvc.Folders.append(fs) - return result + return result,None _dblist={ diff --git a/DetectorDescription/GeoModel/AtlasGeoModel/python/GeoModelConfig.py b/DetectorDescription/GeoModel/AtlasGeoModel/python/GeoModelConfig.py index 8853c7b5ee86..743a4bc47477 100644 --- a/DetectorDescription/GeoModel/AtlasGeoModel/python/GeoModelConfig.py +++ b/DetectorDescription/GeoModel/AtlasGeoModel/python/GeoModelConfig.py @@ -12,8 +12,10 @@ def GeoModelCfg(configFlags): result=ComponentAccumulator() from GeoModelSvc.GeoModelSvcConf import GeoModelSvc - result.addService(GeoModelSvc(AtlasVersion=version, - SupportedGeometry = int(relversion[0]))) + gms=GeoModelSvc(AtlasVersion=version, + SupportedGeometry = int(relversion[0])) + + result.addService(gms) from DetDescrCnvSvc.DetDescrCnvSvcConf import DetDescrCnvSvc from GaudiSvc.GaudiSvcConf import EvtPersistencySvc @@ -23,4 +25,10 @@ def GeoModelCfg(configFlags): result.addService(detDescrCnvSvc) result.addService(EvtPersistencySvc("EventPersistencySvc",CnvServices=[detDescrCnvSvc.getName(),])) #No service handle yet??? - return result + from EventInfoMgt.TagInfoMgrConfig import TagInfoMgrCfg + tim_ca,tagInfoMgr=TagInfoMgrCfg(configFlags) + result.addService(tagInfoMgr) + result.merge(tim_ca) + #TagInfoMgr used by GeoModelSvc but no ServiceHandle. Relies on string-name + + return result,gms diff --git a/Event/EventInfoMgt/python/TagInfoMgrConfig.py b/Event/EventInfoMgt/python/TagInfoMgrConfig.py new file mode 100644 index 000000000000..fdd3de9bd9da --- /dev/null +++ b/Event/EventInfoMgt/python/TagInfoMgrConfig.py @@ -0,0 +1,35 @@ +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator, ConfigurationError +import os +import collections + + +def TagInfoMgrCfg(configFlags,tagValuePairs=[]): + + #Sanity check: + if not isinstance(tagValuePairs,collections.Sequence) or len(tagValuePairs)%2!=0: + raise ConfigurationError("Parameter extraTagValuePairs is supposed to be an even-numbered list of strings") + + result=ComponentAccumulator() + + from EventInfoMgtConf import TagInfoMgr + from SGComps.SGCompsConf import ProxyProviderSvc + from GaudiSvc.GaudiSvcConf import EvtPersistencySvc + + #Build project-version string for the TagInfoMgr + project = os.getenv('AtlasProject',"Unknown") + version = os.getenv('AtlasVersion',"Unknown") + atlasRelease=project+"-"+version + + releasetag=["AtlasRelease", atlasRelease ] + + tagInfoMgr=TagInfoMgr(ExtraTagValuePairs = releasetag+list(tagValuePairs)) + result.addService(tagInfoMgr) + + #Add to EventPersistencySvc + result.addService(EvtPersistencySvc("EventPersistencySvc",CnvServices=[tagInfoMgr.getName(),])) + + #Add to ProxyProviderSvc + result.addService(ProxyProviderSvc(ProviderNames=[tagInfoMgr.getName(),])) + + return result,tagInfoMgr + diff --git a/LArCalorimeter/LArBadChannelTool/python/LArBadChannelConfig.py b/LArCalorimeter/LArBadChannelTool/python/LArBadChannelConfig.py index 558ab72a15e0..ef1f1001f026 100644 --- a/LArCalorimeter/LArBadChannelTool/python/LArBadChannelConfig.py +++ b/LArCalorimeter/LArBadChannelTool/python/LArBadChannelConfig.py @@ -4,9 +4,8 @@ from LArCabling.LArCablingConfig import LArOnOffIdMappingCfg from IOVDbSvc.IOVDbSvcConfig import addFolders def LArBadChannelCfg(configFlags): - result=ComponentAccumulator() - result.addConfig(LArOnOffIdMappingCfg,configFlags) + result=LArOnOffIdMappingCfg(configFlags)[0] if configFlags.get("global.isOnline") or configFlags.get("global.isMC"): foldername="/LAR/BadChannels/BadChannels" @@ -19,10 +18,11 @@ def LArBadChannelCfg(configFlags): else: dbname="LAR_OFL" - result.addConfig(addFolders,configFlags,foldername,detDb=dbname,className="CondAttrListCollection") - - result.addCondAlgo(LArBadChannelCondAlg(ReadKey=foldername)) - return result + result.merge(addFolders(configFlags,foldername,detDb=dbname,className="CondAttrListCollection")[0]) + + theLArBadChannelCondAlgo=LArBadChannelCondAlg(ReadKey=foldername) + result.addCondAlgo(theLArBadChannelCondAlgo) + return result,None def LArBadFebCfg(configFlags): @@ -39,21 +39,16 @@ def LArBadFebCfg(configFlags): else: dbname="LAR_OFL" - result.addConfig(addFolders,configFlags,foldername,detDb=dbname,className="AthenaAttributeList") - + result.merge(addFolders(configFlags,foldername,detDb=dbname,className="AthenaAttributeList")[0]) result.addCondAlgo(LArBadFebCondAlg(ReadKey=foldername)) - return result + return result,None -def LArBadChannelMaskerCfg(configFlags,problemsToMask,doMasking=True, - ToolName="LArBadChannelMasker"): - result=ComponentAccumulator() - result.addConfig(LArBadChannelCfg,configFlags) +def LArBadChannelMaskerCfg(configFlags,problemsToMask,doMasking=True,ToolName="LArBadChannelMasker"): + result=LArBadChannelCfg(configFlags)[0] - bcMasker=LArBadChannelMasker(ToolName,ProblemsToMask=problemsToMask, - DoMasking=doMasking) - - return result,bcMasker + bcMasker=LArBadChannelMasker(ToolName,ProblemsToMask=problemsToMask, DoMasking=doMasking) + return result,bcMasker @@ -62,6 +57,8 @@ if __name__=="__main__": from AthenaConfiguration.AllConfigFlags import ConfigFlags from AthenaCommon.Logging import log from AthenaCommon.Constants import DEBUG + from AthenaCommon.Configurable import Configurable + Configurable.configurableRun3Behavior=1 log.setLevel(DEBUG) ConfigFlags.set("global.isMC",False) @@ -70,9 +67,10 @@ if __name__=="__main__": cfg=ComponentAccumulator() - cfg.addConfig(LArBadChannelCfg,ConfigFlags) - cfg.addConfig(LArBadFebCfg,ConfigFlags) - cfg.addConfig(LArBadChannelMaskerCfg,ConfigFlags,["allDead",]) + cfg.merge(LArBadChannelCfg(ConfigFlags)) + cfg.merge(LArBadFebCfg(ConfigFlags)) + acc,privTool=LArBadChannelMaskerCfg(ConfigFlags,["allDead",]) + cfg.merge(acc) f=open("LArBCCondAlgos.pkl","w") cfg.store(f) f.close() diff --git a/LArCalorimeter/LArCabling/python/LArCablingConfig.py b/LArCalorimeter/LArCabling/python/LArCablingConfig.py index bd7c08478821..4df3f1846dc6 100644 --- a/LArCalorimeter/LArCabling/python/LArCablingConfig.py +++ b/LArCalorimeter/LArCabling/python/LArCablingConfig.py @@ -23,8 +23,8 @@ def _larCablingCfg(configFlags,algo,folder): folderwithtag=folder result.addCondAlgo(algo(ReadKey=folder)) - result.addConfig(addFolders,configFlags,folderwithtag,className="AthenaAttributeList",detDb=db) - return result + result.merge(addFolders(configFlags,folderwithtag,className="AthenaAttributeList",detDb=db)) + return result,None def LArOnOffIdMappingCfg(configFlags): diff --git a/LArCalorimeter/LArCellRec/python/LArCellBuilderConfig.py b/LArCalorimeter/LArCellRec/python/LArCellBuilderConfig.py index ac799e76f93b..877c338b8f1b 100644 --- a/LArCalorimeter/LArCellRec/python/LArCellBuilderConfig.py +++ b/LArCalorimeter/LArCellRec/python/LArCellBuilderConfig.py @@ -5,8 +5,7 @@ from LArCellRec.LArCellRecConf import LArCellBuilderFromLArRawChannelTool, LArCe from LArCabling.LArCablingConfig import LArOnOffIdMappingCfg def LArCellBuilderCfg(configFlags): - result=ComponentAccumulator() - result.addConfig(LArOnOffIdMappingCfg,configFlags) + result=LArOnOffIdMappingCfg(configFlags) theLArCellBuilder = LArCellBuilderFromLArRawChannelTool() theLArCellBuilder.addDeadOTX = False #Create flag? Requires bad-feb DB access @@ -20,31 +19,27 @@ def LArCellCorrectorCfg(configFlags): correctionTools=[] if configFlags.get("LAr.RawChannelSource")=="both": - theMerger=result.addConfig(LArCellMerger,configFlags,RawChannelsName="LArRawChannels_FromDigits") - correctionTools.append(theMerger[0]) + theMerger=LArCellMerger(RawChannelsName="LArRawChannels_FromDigits") + correctionTools.append(theMerger) if configFlags.get("LAr.doCellNoiseMasking") or configFlags.get("LAr.doCellSporadicNoiseMasking"): from LArBadChannelTool.LArBadChannelConfig import LArBadChannelMaskerCfg theNoiseMasker=LArCellNoiseMaskingTool() if configFlags.get("LAr.doCellNoiseMasking"): - cellNoiseMaskingTool=result.addConfig(LArBadChannelMaskerCfg,configFlags, - problemsToMask=["highNoiseHG","highNoiseMG","highNoiseLG","deadReadout","deadPhys"], - ToolName="CellNoiseMask") - theNoiseMasker.MaskingTool=cellNoiseMaskingTool[0] + acc,cellNoiseMaskingTool= LArBadChannelMaskerCfg(configFlags,problemsToMask=["highNoiseHG","highNoiseMG","highNoiseLG","deadReadout","deadPhys"],ToolName="CellNoiseMask") + result.merge(acc) + theNoiseMasker.MaskingTool=cellNoiseMaskingTool pass if configFlags.get("LAr.doCellSporadicNoiseMasking"): - sporadicNoiseMaskingTool=result.addConfig(LArBadChannelMaskerCfg,configFlags, - problemsToMask=["sporadicBurstNoise",], - ToolName="SporadicNoiseMask") - theNoiseMasker.MaskingSporadicTool=sporadicNoiseMaskingTool[0] + acc,sporadicNoiseMaskingTool=LArBadChannelMaskerCfg(configFlags,problemsToMask=["sporadicBurstNoise",],ToolName="SporadicNoiseMask") + result.merge(acc) + theNoiseMasker.MaskingSporadicTool=sporadicNoiseMaskingTool pass correctionTools.append(theNoiseMasker) - pass - #Many more tools to be added, eg HV correction - return [result,]+correctionTools + return result,correctionTools diff --git a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/python/LArGMConfig.py b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/python/LArGMConfig.py index 2eff7b7a9c58..58bf13fd062c 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/python/LArGMConfig.py +++ b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/python/LArGMConfig.py @@ -3,22 +3,23 @@ from AtlasGeoModel.GeoModelConfig import GeoModelCfg from IOVDbSvc.IOVDbSvcConfig import addFolders def LArGMCfg(configFlags): - result=ComponentAccumulator() - result.addConfig(GeoModelCfg,configFlags) + result,gms=GeoModelCfg(configFlags) doAlignment=configFlags("LAr.doAlign") from LArGeoAlgsNV.LArGeoAlgsNVConf import LArDetectorToolNV - result.getService("GeoModelSvc").DetectorTools += [ LArDetectorToolNV(ApplyAlignments=doAlignment) ] + gms.DetectorTools += [ LArDetectorToolNV(ApplyAlignments=doAlignment) ] + + result.addService(gms) if doAlignment: if configFlags.get("global.isMC"): #Monte Carlo case: - result.addConfig(addFolders,configFlags,["/LAR/Align","/LAR/LArCellPositionShift"],"LAR_OFL") + result.merge(addFolders(configFlags,["/LAR/Align","/LAR/LArCellPositionShift"],"LAR_OFL")[0]) else: #Regular offline data processing - result.addConfig(addFolders,configFlags,["/LAR/Align","/LAR/LArCellPositionShift"],"LAR_ONL") + result.merge(addFolders(configFlags,["/LAR/Align","/LAR/LArCellPositionShift"],"LAR_ONL")[0]) - + return result diff --git a/TileCalorimeter/TileGeoModel/python/TileGMConfig.py b/TileCalorimeter/TileGeoModel/python/TileGMConfig.py index 917e65ac7e6f..515493230275 100644 --- a/TileCalorimeter/TileGeoModel/python/TileGMConfig.py +++ b/TileCalorimeter/TileGeoModel/python/TileGMConfig.py @@ -2,11 +2,11 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AtlasGeoModel.GeoModelConfig import GeoModelCfg def TileGMCfg(configFlags): - result=ComponentAccumulator() - - result.addConfig(GeoModelCfg,configFlags) + result,gms=GeoModelCfg(configFlags) from TileGeoModel.TileGeoModelConf import TileDetectorTool - result.getService("GeoModelSvc").DetectorTools += [ TileDetectorTool() ] + gms.DetectorTools += [ TileDetectorTool() ] + + result.addService(gms) return result diff --git a/Trigger/TrigSteer/L1Decoder/python/L1DecoderConfig.py b/Trigger/TrigSteer/L1Decoder/python/L1DecoderConfig.py index 83b99608522d..b980719eed1a 100644 --- a/Trigger/TrigSteer/L1Decoder/python/L1DecoderConfig.py +++ b/Trigger/TrigSteer/L1Decoder/python/L1DecoderConfig.py @@ -26,8 +26,8 @@ def L1DecoderCfg(flags): if flags.get("Trigger.L1Decoder.doMuon") == True: from L1Decoder.L1MuonConfig import RPCCablingConfig, TGCCablingConfig - acc.addConfig( TGCCablingConfig, flags ) - acc.addConfig( RPCCablingConfig, flags ) + acc.merge(TGCCablingConfig(flags )) + acc.merge(RPCCablingConfig(flags )) decoderAlg.roiUnpackers += [ MURoIsUnpackingTool( Decisions = "MURoIDecisions", OutputTrigRoIs = "MURoIs", MonTool = RoIsUnpackingMonitoring( prefix="MU", maxCount=20 ) ) ] @@ -37,16 +37,16 @@ def L1DecoderCfg(flags): for u in decoderAlg.roiUnpackers: u.OutputLevel=DEBUG - acc.addEventAlgo(decoderAlg) - - from TrigConfigSvc.TrigConfigSvcConfig import TrigConfigSvcCfg - acc.addConfig( TrigConfigSvcCfg, flags ) + from TrigConfigSvc.TrigConfigSvcConfig import TrigConfigSvcCfg + acc.merge(TrigConfigSvcCfg(flags )) - return acc + return acc,decoderAlg if __name__ == "__main__": + from AthenaCommon.Configurable import Configurable + Configurable.configurableRun3Behavior=1 from AthenaConfiguration.AllConfigFlags import ConfigFlags ConfigFlags.set("Trigger.L1Decoder.doCalo",True) @@ -54,7 +54,8 @@ if __name__ == "__main__": ConfigFlags.set("Trigger.L1Decoder.forceEnableAllChains",True) ConfigFlags.set('global.InputFiles',["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1",]) ConfigFlags.lock() - l1 = L1DecoderCfg( ConfigFlags ) + acc, alg = L1DecoderCfg( ConfigFlags ) + acc.addEventAlgo(alg) f=open("L1DecoderConf.pkl","w") - l1.store(f) + acc.store(f) f.close() diff --git a/Trigger/TrigSteer/L1Decoder/python/L1MuonConfig.py b/Trigger/TrigSteer/L1Decoder/python/L1MuonConfig.py index df81b82e01a3..724b73bb2daa 100644 --- a/Trigger/TrigSteer/L1Decoder/python/L1MuonConfig.py +++ b/Trigger/TrigSteer/L1Decoder/python/L1MuonConfig.py @@ -25,14 +25,17 @@ def RPCCablingConfig(flags): # get the GeoModelSvc and add MuonDetectorTool from AtlasGeoModel.GeoModelConfig import GeoModelCfg - acc.addConfig( GeoModelCfg, flags ) + gmsAcc,gms=GeoModelCfg(flags ) + acc.merge(gmsAcc) + from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool detTool = MuonDetectorTool() detTool.UseConditionDb = 1 detTool.UseIlinesFromGM = 1 - acc.getService('GeoModelSvc').DetectorTools += [ detTool ] + gms.DetectorTools += [ detTool ] + acc.addService(gms) from MuonRPC_Cabling.MuonRPC_CablingConf import MuonRPC_CablingSvc rpcCablingSvc = MuonRPC_CablingSvc() @@ -47,10 +50,10 @@ def RPCCablingConfig(flags): #conddb.addFolderSplitMC('RPC','/RPC/TRIGGER/CM_THR_PHI', '/RPC/TRIGGER/CM_THR_PHI') - acc.addConfig( addFolders, flags, + acc.merge(addFolders(flags, [ '/RPC/TRIGGER/CM_THR_ETA', '/RPC/TRIGGER/CM_THR_ETA', '/RPC/TRIGGER/CM_THR_PHI', '/RPC/TRIGGER/CM_THR_PHI', '/RPC/CABLING/MAP_SCHEMA', '/RPC/CABLING/MAP_SCHEMA_CORR' ], - 'RPC' ) + 'RPC' )) # that should not be here??? acc.getService('IOVDbSvc').FoldersToMetaData += ['/GLOBAL/BField/Maps'] @@ -83,12 +86,14 @@ def TGCCablingConfig(flags): acc.addService( TGCCablingSvc ) from IOVDbSvc.IOVDbSvcConfig import addFolders - acc.addConfig( addFolders, flags, ['/TGC/CABLING/MAP_SCHEMA','/TGC/CABLING/MAP_SCHEMA'], 'TGC') + acc.merge(addFolders(flags, ['/TGC/CABLING/MAP_SCHEMA','/TGC/CABLING/MAP_SCHEMA'], 'TGC')) return acc # for reco running we need MDT and CSC, yet to come if __name__ == '__main__': + from AthenaCommon.Configurable import Configurable + Configurable.configurableRun3Behavior=1 from AthenaConfiguration.AllConfigFlags import ConfigFlags ConfigFlags.set('Trigger.L1Decoder.doCalo',True) @@ -100,8 +105,8 @@ if __name__ == '__main__': acc = ComponentAccumulator() - acc.addConfig( RPCCablingConfig, ConfigFlags ) - acc.addConfig( TGCCablingConfig, ConfigFlags ) + acc.merge(RPCCablingConfig(ConfigFlags )) + acc.merge(TGCCablingConfig(ConfigFlags )) f=open('MuonConfig.pkl','w') acc.store(f) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/EgammaCaloMod.py b/Trigger/TrigValidation/TrigUpgradeTest/python/EgammaCaloMod.py index e712198d8c17..d844880c0cc9 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/EgammaCaloMod.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/EgammaCaloMod.py @@ -18,11 +18,11 @@ def CaloLUMIBCIDTool( flags, name='CaloLumiBCIDToolDefault' ): if flags.get('global.isOnline'): - acc.addConfig(addFolders, flags, ['/LAR/LArPileup/LArPileupShape<key>LArShape32</key>', - '/LAR/LArPileup/LArPileupAverage'], 'LAR_ONL') + acc.merge(addFolders(flags, ['/LAR/LArPileup/LArPileupShape<key>LArShape32</key>', + '/LAR/LArPileup/LArPileupAverage'], 'LAR_ONL')) else: - acc.addConfig( addFolders, flags, ['/LAR/ElecCalibOfl/LArPileupShape<key>LArShape32</key>', - '/LAR/ElecCalibOfl/LArPileupAverage'], 'LAR_OFL') + acc.merge(addFolders(flags, ['/LAR/ElecCalibOfl/LArPileupShape<key>LArShape32</key>', + '/LAR/ElecCalibOfl/LArPileupAverage'], 'LAR_OFL')) theTool = CaloLumiBCIDTool(name, isMC=False, LumiTool=theLumiTool, keyShape='LArShape32') @@ -35,8 +35,8 @@ def CaloLUMIBCIDTool( flags, name='CaloLumiBCIDToolDefault' ): from TrigBunchCrossingTool.BunchCrossingTool import BunchCrossingTool theBunchCrossingTool = BunchCrossingTool() - acc.addConfig( addFolders, flags, ['/LAR/ElecCalibMC/Shape', - '/LAR/ElecCalibMC/LArPileupAverage'], 'LAR_OFL') + acc.merge(addFolders(flags, ['/LAR/ElecCalibMC/Shape', + '/LAR/ElecCalibMC/LArPileupAverage'], 'LAR_OFL')) theTool = CaloLumiBCIDTool(name, isMC=True, LArOFCTool = theOFCTool, BunchCrossingTool = theBunchCrossingTool) @@ -59,7 +59,7 @@ def TileCond( flags ): from IOVDbSvc.IOVDbSvcConfig import addFolders def __addFolder(f): - acc.addConfig( addFolders, flags, '%s <key>%s</key>' %(f,f), 'TILE_OFL' if '/OFL' in f else 'TILE_ONL') + acc.merge(addFolders(flags, '%s <key>%s</key>' %(f,f), 'TILE_OFL' if '/OFL' in f else 'TILE_ONL')) tool.ProxyOflCes = TileCondProxyCoolFlt('TileCondProxyCool_OflCes', Source = '/TILE/OFL02/CALIB/CES') tool.ProxyOflCisLin = TileCondProxyCoolFlt('TileCondProxyCool_OflCisLin', Source = '/TILE/OFL02/CALIB/CIS/LIN') @@ -109,8 +109,8 @@ def TileCond( flags ): __addFolder( '/TILE/ONL01/STATUS/ADC' ) acc.addPublicTool( badChanTool ) - acc.addConfig( addFolders, flags, ['/LAR/BadChannelsOfl/BadChannels <key>/LAR/BadChannels/BadChannels</key>', - '/LAR/BadChannelsOfl/MissingFEBs<key>/LAR/BadChannels/MissingFEBs</key>'], 'LAR_OFL') + acc.merge( addFolders(flags, ['/LAR/BadChannelsOfl/BadChannels <key>/LAR/BadChannels/BadChannels</key>', + '/LAR/BadChannelsOfl/MissingFEBs<key>/LAR/BadChannels/MissingFEBs</key>'], 'LAR_OFL')) @@ -133,21 +133,21 @@ def TrigCaloDataAccessConfig(flags): from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from IOVDbSvc.IOVDbSvcConfig import addFolders acc = ComponentAccumulator() - acc.addConfig(CaloLUMIBCIDTool, flags) + acc.merge(CaloLUMIBCIDTool(flags)) from TrigT2CaloCommon.TrigT2CaloCommonConf import TrigDataAccess da = TrigDataAccess() # ??? so we do not need the tools (quick hack) da.ApplyOffsetCorrection = False # ??? does not realy belong here - acc.addConfig( addFolders, flags, ['/LAR/Identifier/OnOffIdMap', '/LAR/Identifier/CalibIdMap', - '/LAR/Identifier/LArTTCellMapAtlas'], 'LAR') + acc.merge(addFolders(flags, ['/LAR/Identifier/OnOffIdMap', '/LAR/Identifier/CalibIdMap', + '/LAR/Identifier/LArTTCellMapAtlas'], 'LAR')) - acc.addConfig( addFolders, flags, ['/CALO/Identifier/CaloTTOnOffIdMapAtlas', '/CALO/Identifier/CaloTTOnAttrIdMapAtlas', - '/CALO/Identifier/CaloTTPpmRxIdMapAtlas'], 'CALO') + acc.merge(addFolders(flags, ['/CALO/Identifier/CaloTTOnOffIdMapAtlas', '/CALO/Identifier/CaloTTOnAttrIdMapAtlas', + '/CALO/Identifier/CaloTTPpmRxIdMapAtlas'], 'CALO')) # ??? should be moved to tile domain - acc.addConfig( TileCond, flags ) + acc.merge(TileCond(flags )) acc.addPublicTool( da ) @@ -165,19 +165,20 @@ def EgammaCaloMod( flags ): # load Calo geometry from LArGeoAlgsNV.LArGMConfig import LArGMCfg from TileGeoModel.TileGMConfig import TileGMCfg - acc.addConfig( LArGMCfg, flags ) - acc.addConfig( TileGMCfg, flags ) + acc.merge(LArGMCfg( flags )) + acc.merge(TileGMCfg( flags )) acc.getService('GeoModelSvc').DetectorTools['TileDetectorTool'].GeometryConfig = 'RECO' # ??? likely should be elsewhere from IOVDbSvc.IOVDbSvcConfig import addFolders - acc.addConfig( addFolders, flags, ['/LAR/Identifier/FebRodMap'], 'LAR' ) + acc.merge( addFolders(flags, ['/LAR/Identifier/FebRodMap'], 'LAR' )) - acc.addConfig( TrigCaloDataAccessConfig, flags ) + acc.merge(TrigCaloDataAccessConfig(flags )) # setup algorithms - acc.addSequence( seqAND('L2CaloEgamma') ) + #acc.addSequence( seqAND('L2CaloEgamma'), parentName=parentSeq ) + mainSeq=seqAND('L2CaloEgamma') from DecisionHandling.DecisionHandlingConf import RoRSeqFilter filterL1RoIsAlg = RoRSeqFilter('filterL1RoIsAlg') filterL1RoIsAlg.Input = ['EMRoIDecisions'] @@ -186,7 +187,8 @@ def EgammaCaloMod( flags ): filterL1RoIsAlg.Chains = [ m.split(':')[1].strip() for m in MenuTest.EMThresholdToChainMapping ] filterL1RoIsAlg.OutputLevel = DEBUG - acc.addEventAlgo( filterL1RoIsAlg, sequence='L2CaloEgamma' ) + #acc.addEventAlgo( filterL1RoIsAlg, sequenceName='L2CaloEgamma' ) + mainSeq+=filterL1RoIsAlg inViewAlgsSeqName = 'fastCaloInViewAlgs' from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm @@ -201,8 +203,8 @@ def EgammaCaloMod( flags ): fastCaloViewsMaker.ViewNodeName = inViewAlgsSeqName - acc.addEventAlgo( fastCaloViewsMaker, sequence='L2CaloEgamma' ) - + #acc.addEventAlgo( fastCaloViewsMaker, sequenceName='L2CaloEgamma' ) + mainSeq+=fastCaloViewsMaker from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import RingerFexConfig ringer = RingerFexConfig('RingsMaker') ringer.RingsKey='CaloRings' @@ -228,8 +230,9 @@ def EgammaCaloMod( flags ): __fex_tools = [ samp2, samp1, sampe, samph, ring ] - acc.addSequence( seqAND( inViewAlgsSeqName ), sequence='L2CaloEgamma' ) - + #acc.addSequence( seqAND( inViewAlgsSeqName ), parentName='L2CaloEgamma' ) + inViewSeq=seqAND( inViewAlgsSeqName ) + mainSeq+=inViewSeq from TrigT2CaloEgamma.TrigT2CaloEgammaConf import T2CaloEgammaFastAlgo fastCalo = T2CaloEgammaFastAlgo( 'FastCaloAlgo' ) @@ -245,6 +248,8 @@ def EgammaCaloMod( flags ): accessTool = TrigDataAccess() accessTool.ApplyOffsetCorrection = False + acc.addPublicTool(accessTool) + fastCalo.IAlgToolList = __fex_tools from TrigT2CaloCalibration.EgammaCalibrationConfig import EgammaHitsCalibrationBarrelConfig, EgammaHitsCalibrationEndcapConfig, EgammaGapCalibrationConfig from TrigT2CaloCalibration.EgammaCalibrationConfig import EgammaTransitionRegionsConfig @@ -267,8 +272,8 @@ def EgammaCaloMod( flags ): #[ acc.addAlgTool( t ) for t in __endcapTools ] fastCalo.CalibListEndcap= __endcapTools - acc.addEventAlgo( fastCalo, sequence=inViewAlgsSeqName ) - + #acc.addEventAlgo( fastCalo, sequenceName=inViewAlgsSeqName ) + inViewSeq+=fastCalo from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2CaloHypoAlgMT hypo = TrigL2CaloHypoAlgMT( 'L2CaloHypo' ) hypo.HypoInputDecisions = fastCaloViewsMaker.InputMakerOutputDecisions[0] @@ -289,15 +294,20 @@ def EgammaCaloMod( flags ): from TrigEgammaHypo.TrigL2CaloHypoTool import TrigL2CaloHypoToolFromName hypo.HypoTools = [ TrigL2CaloHypoToolFromName( c ) for c in chains ] - acc.addEventAlgo( hypo, sequence = 'L2CaloEgamma' ) - return acc,accessTool + #acc.addEventAlgo( hypo, sequenceName = 'L2CaloEgamma' ) + mainSeq+=hypo + + return acc,mainSeq if __name__ == '__main__': + from AthenaCommon.Configurable import Configurable + Configurable.configurableRun3Behavior=1 from AthenaConfiguration.AllConfigFlags import ConfigFlags + ConfigFlags.set( "global.InputFiles", + ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1"] ) ConfigFlags.lock() - - acc = EgammaCaloMod( ConfigFlags ) + acc,seq = EgammaCaloMod( ConfigFlags ) acc.printConfig() print 'All ok' diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/newJOtest.py b/Trigger/TrigValidation/TrigUpgradeTest/share/newJOtest.py index b77e663a9709..f18b3ebaf04f 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/newJOtest.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/newJOtest.py @@ -7,6 +7,10 @@ from AthenaConfiguration.AllConfigFlags import ConfigFlags from AthenaCommon.CFElements import parOR, seqOR, seqAND, stepSeq from AthenaCommon.AlgSequence import dumpMasterSequence from AthenaCommon.AppMgr import theApp + +from AthenaCommon.Configurable import Configurable +Configurable.configurableRun3Behavior=1 + #theApp.setup() flags = ConfigFlags @@ -42,24 +46,25 @@ inputLoader = SGInputLoader(DetStore = 'StoreGateSvc/DetectorStore', Load = [], NeededResources = []) -acc.addEventAlgo( inputLoader, sequence='AthAlgSeq' ) +acc.addEventAlgo( inputLoader) from ByteStreamCnvSvc.ByteStreamConfig import TrigBSReadCfg -acc.addConfig( TrigBSReadCfg, flags ) +acc.merge(TrigBSReadCfg(flags )) -from AtlasGeoModel.GeoModelConfig import GeoModelCfg -acc.addConfig( GeoModelCfg, flags ) +#from AtlasGeoModel.GeoModelConfig import GeoModelCfg +#acc.merge(GeoModelCfg(flags )) from TrigUpgradeTest.TriggerHistSvcConfig import TriggerHistSvcConfig -acc.addConfig( TriggerHistSvcConfig, flags ) +acc.merge(TriggerHistSvcConfig(flags )) acc.addSequence( seqOR( "hltTop") ) from L1Decoder.L1DecoderConfig import L1DecoderCfg -acc.addConfig( L1DecoderCfg, flags, sequence="hltTop" ) -l1 = acc.getEventAlgo( "L1Decoder" ) +accL1,l1=L1DecoderCfg(flags)# sequenc="hltTop" ) from TrigUpgradeTest.TestUtils import applyMenu applyMenu( l1 ) +acc.merge(accL1) +acc.addEventAlgo(l1,"hltTop") from EventInfoMgt.EventInfoMgtConf import TagInfoMgr tagInfoMgr = TagInfoMgr() @@ -77,17 +82,20 @@ athenaPoolSvcSvc.PoolAttributes = ["DEFAULT_SPLITLEVEL ='0'", "STREAM_MEMBER_WIS acc.addService( athenaPoolSvcSvc ) acc.getService("EventPersistencySvc").CnvServices += [ athenaPoolSvcSvc.getName() ] -acc.addSequence( seqAND("hltSteps"), sequence="hltTop" ) -acc.addSequence( parOR("hltStep_1"), sequence="hltSteps" ) -acc.addSequence( parOR("hltStep_2"), sequence="hltSteps" ) +acc.addSequence( seqAND("hltSteps"), parentName="hltTop" ) +acc.addSequence( parOR("hltStep_1"), parentName="hltSteps" ) +acc.addSequence( parOR("hltStep_2"), parentName="hltSteps" ) # setup algorithm sequences here, need few additional components from TrigUpgradeTest.RegSelConfig import RegSelConfig -acc.addConfig( RegSelConfig, flags ) +acc.merge(RegSelConfig(flags )) from TrigUpgradeTest.EgammaCaloMod import EgammaCaloMod -acc.addConfig( EgammaCaloMod, flags, sequence="hltStep_1" ) +accECM,seqECM=EgammaCaloMod(flags) + +acc.merge(accECM) +acc.addSequence(seqECM, parentName="hltStep_1" ) # adding calo requires more infrastructure than we actually have #from TrigUpgradeTest.EgammaCaloMod import EgammaCaloMod -- GitLab From 0a73a0e6ccfa43dc99317e49306a33f457630b20 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Mon, 16 Jul 2018 09:18:14 +0000 Subject: [PATCH 468/562] Add functionality to flags so that they can be accessed in a programatic way: flags.x.y.z Former-commit-id: 942086116627436b990e630713d483060d9da171 --- Control/AthenaConfiguration/CMakeLists.txt | 5 ++ .../python/AthConfigFlags.py | 77 +++++++++++++++++++ 2 files changed, 82 insertions(+) diff --git a/Control/AthenaConfiguration/CMakeLists.txt b/Control/AthenaConfiguration/CMakeLists.txt index 65c314772478..baded9912540 100644 --- a/Control/AthenaConfiguration/CMakeLists.txt +++ b/Control/AthenaConfiguration/CMakeLists.txt @@ -17,6 +17,11 @@ atlas_add_test( ComponentAccumulatorTest SCRIPT python -m AthenaConfiguration.ComponentAccumulator POST_EXEC_SCRIPT nopost.sh ) +atlas_add_test( AthConfigFlagsTest + SCRIPT python -m unittest AthenaConfiguration.AthConfigFlags + POST_EXEC_SCRIPT nopost.sh ) + + # Check python syntax: atlas_add_test( flake8 SCRIPT flake8 --select=F,E7,E9,W6 ${CMAKE_CURRENT_SOURCE_DIR}/python diff --git a/Control/AthenaConfiguration/python/AthConfigFlags.py b/Control/AthenaConfiguration/python/AthConfigFlags.py index 90f3204b5fe8..3e17b7b9d903 100644 --- a/Control/AthenaConfiguration/python/AthConfigFlags.py +++ b/Control/AthenaConfiguration/python/AthConfigFlags.py @@ -33,6 +33,36 @@ class CfgFlag(object): return repr(self._value) else: return "[function]" + + +class FlagAddress(object): + def __init__(self, f, name): + if isinstance(f, AthConfigFlags): + self._flags = f + self._name = name + + elif isinstance(f, FlagAddress): + self._flags = f._flags + self._name = f._name+"."+name + + def __getattr__(self, name): + merged = self._name + "." + name + if self._flags.hasFlag( merged ): + return self._flags._get( merged ) + return FlagAddress( self, name ) + + def __setattr__( self, name, value ): + if name.startswith("_"): + return object.__setattr__(self, name, value) + + merged = self._name + "." + name + return self._flags._set( merged, value ) + + def __cmp__(self, other): + raise RuntimeError( "No such a flag: "+ self._name+". Likely the name is incomplete " ) + + def __nonzero__(self): + raise RuntimeError( "No such a flag: "+ self._name+". Likely the name is incomplete " ) @@ -44,6 +74,8 @@ class AthConfigFlags(object): self._flagdict=dict() self._locked=False + def __getattr__(self, name): + return FlagAddress(self, name) def addFlag(self,name,setDef=None): if (self._locked): @@ -55,8 +87,14 @@ class AthConfigFlags(object): self._flagdict[name]=CfgFlag(setDef) return + def hasFlag(self, name): + return name in self._flagdict def set(self,name,value): + # add obsoletness message here + self._set(name,value) + + def _set(self,name,value): if (self._locked): raise RuntimeError("Attempt to set a flag of an already-locked container") try: @@ -70,6 +108,10 @@ class AthConfigFlags(object): raise KeyError(errString) def get(self,name): + # add obsoltness message here + return self._get(name) + + def _get(self,name): try: return self._flagdict[name].get(self) except KeyError: @@ -162,3 +204,38 @@ class AthConfigFlags(object): for n,f in self._flagdict.items(): f.get(self) return + +import unittest +class __TestFlagsSetup(unittest.TestCase): + def setUp(self): + self.flags = AthConfigFlags() + self.flags.addFlag("A", True) + self.flags.addFlag("A.One", True) + self.flags.addFlag("A.B.C", False) + self.flags.addFlag("A.dependentFlag", lambda prevFlags: ["FALSE VALUE", "TRUE VALUE"][prevFlags.A.B.C] ) + +class __TestAccess(__TestFlagsSetup): + def runTest(self): + self.assertFalse( self.flags.A.B.C, "Can't read A.B.C flag") + self.flags.A.B.C = True + self.assertTrue( self.flags.A.B.C, "Flag value not changed") + + +class __TestWrongAccess(__TestFlagsSetup): + def runTest(self): + """ access to the flags below should give an exception""" + with self.assertRaises(RuntimeError): + print self.flags.A is True + print self.flags.A.B == 6 + + + +class __TestDependentFlag(__TestFlagsSetup): + def runTest(self): + """ The dependent flags will use another flag value to establish its own value""" + self.flags.A.B.C= True + self.flags.lock() + self.assertEqual(self.flags.A.dependentFlag, "TRUE VALUE", " dependent flag setting does not work") + +if __name__ == "__main__": + unittest.main() -- GitLab From 2fc694f81417aa04dd757b4e2759ca5970d34fe5 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Mon, 16 Jul 2018 13:20:15 +0200 Subject: [PATCH 469/562] Updated to new flags access style Former-commit-id: 0553ab580664c41c1a375a3b2480970606e9cf8f --- .../TriggerJobOpts/CMakeLists.txt | 7 +++++ .../python/TriggerConfigFlags.py | 28 +++++++++++-------- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/Trigger/TriggerCommon/TriggerJobOpts/CMakeLists.txt b/Trigger/TriggerCommon/TriggerJobOpts/CMakeLists.txt index ae78b23df510..f8ecb38cc4c1 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/CMakeLists.txt +++ b/Trigger/TriggerCommon/TriggerJobOpts/CMakeLists.txt @@ -14,3 +14,10 @@ atlas_depends_on_subdirs( PUBLIC atlas_install_python_modules( python/*.py ) atlas_install_joboptions( share/*.py ) +atlas_add_test( TriggerConfigFlagsTest + SCRIPT python -m unittest TriggerJobOpts.TriggerConfigFlags + POST_EXEC_SCRIPT nopost.sh ) + +atlas_add_test( flake8 + SCRIPT flake8 --select=F,E7,E9,W6 ${CMAKE_CURRENT_SOURCE_DIR}/python/TriggerConfigFlags.py + POST_EXEC_SCRIPT nopost.sh ) diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py index f26ca4e3d690..4fa1dd7abba5 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py @@ -6,7 +6,7 @@ def createTriggerFlags(): flags = AthConfigFlags() # enables L1 simulation - flags.addFlag('Trigger.doLVL1', lambda prevFlags: prevFlags('global.isMC')) + flags.addFlag('Trigger.doLVL1', lambda prevFlags: prevFlags.get('global.isMC')) # enables L1 topological trigger simulation flags.addFlag('Trigger.doL1Topo', True ) @@ -92,14 +92,14 @@ def createTriggerFlags(): # L1 XML file name flags.addFlag('Trigger.LVL1ConfigFile', - lambda prevFlags: 'LVL1config_'+prevFlags.get('Trigger.triggerMenuSetup')+'_' + prevFlags.get('Trigger.menuVersion') + '.xml') + lambda prevFlags: 'LVL1config_'+prevFlags.Trigger.triggerMenuSetup+'_' + prevFlags.Trigger.menuVersion + '.xml') # generate or not the L1 topo configuration flags.addFlag('Trigger.generateLVL1TopoConfig', False) # L1 topo XML file name flags.addFlag('Trigger.LVL1TopoConfigFile', - lambda prevFlags: 'LVL1config_'+prevFlags.get('Trigger.triggerMenuSetup')+'_' + prevFlags.get('Trigger.menuVersion') + '.xml') + lambda prevFlags: 'LVL1config_'+prevFlags.Trigger.triggerMenuSetup+'_' + prevFlags.Trigger.menuVersion + '.xml') # trigger reconstruction @@ -120,7 +120,7 @@ def createTriggerFlags(): lambda prevFlags: __tunes(default='ElectronPhotonSelectorTools/trigger/rel21_mc16a/', ver2016='ElectronPhotonSelectorTools/trigger/rel21_mc16a/', - ver2017='ElectronPhotonSelectorTools/trigger/rel21_20170214/')( prevFlags.get('Trigger.run2Config') ) + ver2017='ElectronPhotonSelectorTools/trigger/rel21_20170214/')( prevFlags.Trigger.run2Config ) ) # cluster correction version, allowed value is: None or v12phiflip_noecorrnogap @@ -128,14 +128,14 @@ def createTriggerFlags(): lambda prevFlags: __tunes(default=None, ver2016=None, - ver2017='v12phiflip_noecorrnogap')( prevFlags.get('Trigger.run2Config') ) + ver2017='v12phiflip_noecorrnogap')( prevFlags.Trigger.run2Config ) ) # tune of MVA flags.addFlag('Trigger.egamma.calibMVAVersiona', lambda prevFlags: __tunes(default='egammaMVACalib/online/v3', ver2016='egammaMVACalib/online/v3', - ver2017='egammaMVACalib/online/v6')( prevFlags.get('Trigger.run2Config') ) + ver2017='egammaMVACalib/online/v6')( prevFlags.Trigger.run2Config ) ) # muons @@ -159,12 +159,16 @@ def createTriggerFlags(): # also not defined the Prescale sets yet # abortOnConfigurationError - never red # in signatures - # egamma: rinferVrsion - not used + # egamma: ringerVersion - not used # muon: doMuonCalibrationStream - not used # tau: doTrackingApproach - not used -if __name__ == '__main__': - flags = createTriggerFlags() - flags.set('Trigger.run2Config', '2017') - assert flags.get('Trigger.egamma.clusterCorrectionVersion') == 'v12phiflip_noecorrnogap' - flags.dump() + + +import unittest +class __YearDependentFlagTest(unittest.TestCase): + def runTest(self): + flags = createTriggerFlags() + flags.set('Trigger.run2Config', '2017') + self.assertEqual(flags.Trigger.egamma.clusterCorrectionVersion, "v12phiflip_noecorrnogap", " dependent flag setting does not work") + flags.dump() -- GitLab From 3a42a1ecc61d66a022e604649db78adbcf916280 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Mon, 16 Jul 2018 11:37:20 +0000 Subject: [PATCH 470/562] 22.0 coverity InDetRIO_OnTrack Former-commit-id: bdc39ee8931dabb86c6f8eea0895204e6abad968 --- .../InDetRIO_OnTrack/PixelClusterOnTrack.h | 17 +++--- .../InDetRIO_OnTrack/SCT_ClusterOnTrack.h | 9 +-- .../InDetRIO_OnTrack/TRT_DriftCircleOnTrack.h | 5 +- .../src/PixelClusterOnTrack.cxx | 27 --------- .../src/SCT_ClusterOnTrack.cxx | 23 +------- .../src/TRT_DriftCircleOnTrack.cxx | 21 ++++++- .../PrimaryDPDMaker/ThinContainers.h | 58 ++++++------------- .../PrimaryDPDMaker/src/ThinContainers.cxx | 21 +++---- 8 files changed, 69 insertions(+), 112 deletions(-) diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/PixelClusterOnTrack.h b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/PixelClusterOnTrack.h index 5aea8691936d..7d94549755eb 100755 --- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/PixelClusterOnTrack.h +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/PixelClusterOnTrack.h @@ -11,7 +11,6 @@ // Base classes #include "InDetRIO_OnTrack/SiClusterOnTrack.h" -#include "InDetPrepRawData/PixelCluster.h" #include "TrkEventPrimitives/LocalParameters.h" // for ElementLink to IdentifiableContainer PixelClusterContainer @@ -19,6 +18,8 @@ #include "AthLinks/ElementLink.h" class FakeTrackBuilder; +class PixelCluster; + namespace Trk { class Surface; class TrkDetElementBase; @@ -48,13 +49,14 @@ namespace InDet { public: friend class Trk::ITrkEventCnvTool; - /**Default constructor - needed for POOL */ + ///Default constructor - needed for POOL PixelClusterOnTrack(); - /**Copy constructor */ - PixelClusterOnTrack(const PixelClusterOnTrack &); - /**Assignment operator*/ - PixelClusterOnTrack &operator=(const PixelClusterOnTrack &); - + ///Copy constructor + PixelClusterOnTrack(const PixelClusterOnTrack &) = default; + ///Assignment operator + PixelClusterOnTrack &operator=(const PixelClusterOnTrack &) = default; + ///Move assignment + PixelClusterOnTrack &operator=(PixelClusterOnTrack &&) = default; /** Constructor with parameters : RIO/PrepRawData pointer, LocalPosition&, LocalErrorMatrix&, idDE& Everything else is owned elsewhere. */ @@ -147,7 +149,6 @@ namespace InDet { /** PixelCluster - the RIO (PRD, PrepRawData)*/ ElementLinkToIDCPixelClusterContainer m_rio; -// mutable const PixelCluster* m_rio; /** records whether there is an ambiguity about this cluster*/ bool m_hasClusterAmbiguity; diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/SCT_ClusterOnTrack.h b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/SCT_ClusterOnTrack.h index cc69db024cc8..80b7ed1384c6 100755 --- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/SCT_ClusterOnTrack.h +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/SCT_ClusterOnTrack.h @@ -11,12 +11,14 @@ // Base classes #include "InDetRIO_OnTrack/SiClusterOnTrack.h" -#include "InDetPrepRawData/SCT_Cluster.h" // for ElementLink to IdentifiableContainer SCT_ClusterContainer #include "InDetPrepRawData/SCT_ClusterContainer.h" #include "AthLinks/ElementLink.h" + +class SCT_Cluster; + namespace Trk { class Surface; class LocalParameters; @@ -45,7 +47,7 @@ namespace InDet{ /**For POOL only. Do not use*/ SCT_ClusterOnTrack(); /**Copy constructor*/ - SCT_ClusterOnTrack(const SCT_ClusterOnTrack &); + SCT_ClusterOnTrack(const SCT_ClusterOnTrack &) = default; /** Constructor with parameters : RIO/PrepRawData pointer, LocalPosition*, LocalErrorMatrix*, idDE& @@ -100,7 +102,7 @@ namespace InDet{ double positionAlongStrip); /**Assignment operator*/ - SCT_ClusterOnTrack &operator=(const SCT_ClusterOnTrack &); + SCT_ClusterOnTrack &operator=(const SCT_ClusterOnTrack &) = default; /**Default move assigment operator*/ SCT_ClusterOnTrack &operator=(SCT_ClusterOnTrack &&) = default; @@ -148,7 +150,6 @@ namespace InDet{ virtual void setValues(const Trk::TrkDetElementBase* detEl, const Trk::PrepRawData* prd); /** SCT_Cluster - the RIO (PRD, PrepRawData)*/ -// mutable const SCT_Cluster* m_rio; ElementLinkToIDCSCT_ClusterContainer m_rio; /** corresponding detector element*/ const InDetDD::SiDetectorElement* m_detEl; diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/TRT_DriftCircleOnTrack.h b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/TRT_DriftCircleOnTrack.h index 99a92eb4b5b1..d63ef19d1e4a 100755 --- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/TRT_DriftCircleOnTrack.h +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/TRT_DriftCircleOnTrack.h @@ -16,7 +16,6 @@ #include "GaudiKernel/GaudiException.h" // InDet -#include "InDetPrepRawData/TRT_DriftCircle.h" // for ElementLink to IdentifiableContainer PixelClusterContainer @@ -36,7 +35,7 @@ namespace InDetDD { typedef ElementLink<InDet::TRT_DriftCircleContainer> ElementLinkToIDCTRT_DriftCircleContainer; namespace InDet{ - + class TRT_DriftCircle; /**@class TRT_DriftCircleOnTrack Represents 'corrected' measurements from the TRT (for example, corrected for wire sag). The @@ -56,6 +55,8 @@ namespace InDet{ TRT_DriftCircleOnTrack(const TRT_DriftCircleOnTrack &); /**Assignment operator*/ TRT_DriftCircleOnTrack &operator=(const TRT_DriftCircleOnTrack &); + /**Move assignment operator*/ + TRT_DriftCircleOnTrack &operator=(TRT_DriftCircleOnTrack &&); /** Constructor with parameters and without externalPrediction: RIO pointer, LocalPosition*, LocalErrorMatrix*, diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/PixelClusterOnTrack.cxx b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/PixelClusterOnTrack.cxx index f2c13cf55e13..7df70ae44052 100755 --- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/PixelClusterOnTrack.cxx +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/PixelClusterOnTrack.cxx @@ -6,13 +6,11 @@ // PixelClusterOnTrack.cxx, (c) ATLAS Detector Software /////////////////////////////////////////////////////////////////// -#include <new> #include "InDetRIO_OnTrack/PixelClusterOnTrack.h" #include "InDetPrepRawData/PixelCluster.h" #include "InDetReadoutGeometry/SiDetectorElement.h" #include "GaudiKernel/MsgStream.h" #include <ostream> -#include <typeinfo> // Constructor with parameters - no global position specified @@ -31,7 +29,6 @@ InDet::PixelClusterOnTrack::PixelClusterOnTrack( m_energyLoss(RIO->energyLoss()), m_detEl( RIO->detectorElement() ) { - //m_rio = ElementLinkToIDCPixelClusterContainer("PixelClusters", RIO->getHashAndIndex().hashAndIndex(), RIO); m_rio.setElement(RIO); } @@ -52,7 +49,6 @@ InDet::PixelClusterOnTrack::PixelClusterOnTrack( m_energyLoss(RIO->energyLoss()), m_detEl( RIO->detectorElement() ) { - //m_rio = ElementLinkToIDCPixelClusterContainer("PixelClusters", RIO->getHashAndIndex().hashAndIndex(), RIO); m_rio.setElement(RIO); } @@ -93,29 +89,7 @@ InDet::PixelClusterOnTrack::PixelClusterOnTrack() m_detEl(0) {} -// copy constructor: -InDet::PixelClusterOnTrack::PixelClusterOnTrack( const InDet::PixelClusterOnTrack& rot) - : - InDet::SiClusterOnTrack(rot), - m_rio(rot.m_rio), - m_hasClusterAmbiguity(rot.m_hasClusterAmbiguity), - m_isFake(rot.m_isFake), - m_energyLoss(rot.m_energyLoss), - m_detEl(rot.m_detEl) -{} -// assignment operator: -InDet::PixelClusterOnTrack& InDet::PixelClusterOnTrack::operator=( const InDet::PixelClusterOnTrack& rot){ - if ( &rot != this) { - InDet::SiClusterOnTrack::operator=(rot);//base class ass. op. - m_rio = rot.m_rio; - m_hasClusterAmbiguity = rot.m_hasClusterAmbiguity; - m_detEl = rot.m_detEl; - m_isFake = rot.m_isFake; - m_energyLoss = rot.m_energyLoss; - } - return *this; -} const Trk::Surface& InDet::PixelClusterOnTrack::associatedSurface() const @@ -124,7 +98,6 @@ const Trk::Surface& InDet::PixelClusterOnTrack::associatedSurface() const void InDet::PixelClusterOnTrack::setValues(const Trk::TrkDetElementBase* detEl, const Trk::PrepRawData* /*prd*/) { - //m_rio = dynamic_cast< const PixelCluster* >(prd);//should check this really. m_detEl = dynamic_cast< const InDetDD::SiDetectorElement* >(detEl); } diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SCT_ClusterOnTrack.cxx b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SCT_ClusterOnTrack.cxx index de5f2464e72d..ee25b4ddc466 100755 --- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SCT_ClusterOnTrack.cxx +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SCT_ClusterOnTrack.cxx @@ -6,10 +6,10 @@ // SCT_ClusterOnTrack.cxx, (c) ATLAS Detector Software /////////////////////////////////////////////////////////////////// -#include <new> #include "InDetRIO_OnTrack/SCT_ClusterOnTrack.h" -#include "InDetPrepRawData/SCT_Cluster.h" #include "InDetReadoutGeometry/SiDetectorElement.h" +#include "InDetPrepRawData/SCT_Cluster.h" + #include "GaudiKernel/MsgStream.h" #include <ostream> #include <limits> @@ -24,7 +24,6 @@ InDet::SCT_ClusterOnTrack::SCT_ClusterOnTrack(const InDet::SCT_Cluster* RIO, bool isbroad) : SiClusterOnTrack(locpars, locerr, idDE, RIO->identify(),isbroad) //call base class constructor { - //m_rio = ElementLinkToIDCSCT_ClusterContainer("SCT_Clusters", RIO->getHashAndIndex().hashAndIndex(), RIO); m_detEl=nullptr; m_positionAlongStrip=std::numeric_limits<double>::quiet_NaN(); m_rio.setElement(RIO); @@ -77,24 +76,6 @@ InDet::SCT_ClusterOnTrack::SCT_ClusterOnTrack(): m_positionAlongStrip(std::numeric_limits<double>::quiet_NaN()) {} -// copy constructor: -InDet::SCT_ClusterOnTrack::SCT_ClusterOnTrack( const InDet::SCT_ClusterOnTrack& rot): - SiClusterOnTrack(rot), - m_rio(rot.m_rio), - m_detEl(rot.m_detEl), - m_positionAlongStrip(rot.m_positionAlongStrip) -{} - -// assignment operator: -InDet::SCT_ClusterOnTrack& InDet::SCT_ClusterOnTrack::operator=( const InDet::SCT_ClusterOnTrack& rot){ - if ( &rot != this) { - InDet::SiClusterOnTrack::operator=(rot);//base class ass. op. - m_rio = rot.m_rio; - m_detEl = rot.m_detEl; - m_positionAlongStrip = rot.m_positionAlongStrip; - } - return *this; -} const Trk::Surface& InDet::SCT_ClusterOnTrack::associatedSurface() const { diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/TRT_DriftCircleOnTrack.cxx b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/TRT_DriftCircleOnTrack.cxx index 23c2ac2bb98d..29317b2ee30a 100755 --- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/TRT_DriftCircleOnTrack.cxx +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/TRT_DriftCircleOnTrack.cxx @@ -16,7 +16,7 @@ #include <cassert> #include "GaudiKernel/MsgStream.h" #include <ostream> -#include<limits> +#include <limits> // Constructor with parameters: @@ -109,6 +109,25 @@ InDet::TRT_DriftCircleOnTrack::TRT_DriftCircleOnTrack( const InDet::TRT_DriftCir //assignment operator: InDet::TRT_DriftCircleOnTrack& InDet::TRT_DriftCircleOnTrack::operator=( const InDet::TRT_DriftCircleOnTrack& rot) +{ + if ( &rot != this) { + Trk::RIO_OnTrack::operator= (rot); + delete m_globalPosition; + m_globalPosition = (rot.m_globalPosition ? new Amg::Vector3D(*rot.m_globalPosition) : 0); + m_rio = rot.m_rio; + m_localAngle = rot.m_localAngle; + m_positionAlongWire = rot.m_positionAlongWire; + m_idDE = rot.m_idDE; + m_status = rot.m_status; + m_highLevel = rot.m_highLevel; + m_timeOverThreshold = rot.m_timeOverThreshold; + m_detEl = rot.m_detEl; + } + return *this; +} + +//move assignment operator: +InDet::TRT_DriftCircleOnTrack& InDet::TRT_DriftCircleOnTrack::operator=( InDet::TRT_DriftCircleOnTrack&& rot) { if ( &rot != this) { Trk::RIO_OnTrack::operator= (rot); diff --git a/PhysicsAnalysis/PrimaryDPDMaker/PrimaryDPDMaker/ThinContainers.h b/PhysicsAnalysis/PrimaryDPDMaker/PrimaryDPDMaker/ThinContainers.h index fe8c170d27c1..bd83e6931267 100644 --- a/PhysicsAnalysis/PrimaryDPDMaker/PrimaryDPDMaker/ThinContainers.h +++ b/PhysicsAnalysis/PrimaryDPDMaker/PrimaryDPDMaker/ThinContainers.h @@ -28,66 +28,46 @@ Description: This is a short algorithm to select calorimeter cells that are ******************************************************************************/ -#include <string> -#include <vector> + #include "AthenaBaseComps/AthAlgorithm.h" -#include "EventKernel/INavigable4Momentum.h" #include "AthenaKernel/IThinningSvc.h" -#include "GaudiKernel/Property.h" -#include "GaudiKernel/ServiceHandle.h" #include "StoreGate/StoreGateSvc.h" -#include "AthContainers/DataVector.h" - -#include "CLHEP/Vector/LorentzVector.h" -#include "CLHEP/Vector/ThreeVector.h" +#include "GaudiKernel/ToolHandle.h" -// Needed for TrackParticles -#include "Particle/TrackParticleContainer.h" // Needed for Tracks -#include "TrkTrack/TrackCollection.h" -#include "TrkTrack/Track.h" +#include "TrkTrack/TrackCollection.h" //typedef, cannot fwd include // Needed for the cell IDs #include "Identifier/Identifier.h" +#include "Identifier/IdentifierHash.h" +// #include "CaloEvent/CaloCellContainer.h" #include "CaloEvent/CaloClusterContainer.h" -// Needed for the pixel clusters -#include "InDetReadoutGeometry/PixelDetectorManager.h" -#include "InDetReadoutGeometry/SCT_DetectorManager.h" -#include "InDetReadoutGeometry/TRT_DetectorManager.h" +//following are typedef'ed, cannot fwd include #include "InDetPrepRawData/PixelClusterContainer.h" -#include "InDetPrepRawData/PixelClusterCollection.h" -#include "InDetPrepRawData/PixelCluster.h" #include "InDetPrepRawData/SCT_ClusterContainer.h" -#include "InDetPrepRawData/SCT_ClusterCollection.h" -#include "InDetPrepRawData/SCT_Cluster.h" #include "InDetPrepRawData/TRT_DriftCircleContainer.h" -#include "InDetPrepRawData/TRT_DriftCircleCollection.h" -#include "InDetPrepRawData/TRT_DriftCircle.h" -#include "InDetIdentifier/PixelID.h" // Needed for RegSelSvc -#include "GaudiKernel/ToolHandle.h" -#include "IRegionSelector/RegSelEnums.h" +#include "IRegionSelector/RegSelEnums.h" //contains the DETID enum -typedef InDet::PixelClusterContainer PixelClusterContainer; -typedef InDet::PixelClusterCollection PixelClusterCollection; -typedef InDet::PixelCluster PixelCluster; - -typedef InDet::SCT_ClusterContainer SCT_ClusterContainer; -typedef InDet::SCT_ClusterCollection SCT_ClusterCollection; -typedef InDet::SCT_Cluster SCT_Cluster; - -typedef InDet::TRT_DriftCircleContainer TRT_DriftCircleContainer; -typedef InDet::TRT_DriftCircleCollection TRT_DriftCircleCollection; -typedef InDet::TRT_DriftCircle TRT_DriftCircle; +// +#include <string> +#include <vector> +#include <set> -//class CaloClusterContainer; //Needed for RegSelSvc class IRegSelSvc; class I4Momentum; - +namespace Rec{ + class TrackParticleContainer; +} + +namespace CLHEP{ + class HepLorentzVector; + class Hep3Vector; +} class ThinContainers : public AthAlgorithm { diff --git a/PhysicsAnalysis/PrimaryDPDMaker/src/ThinContainers.cxx b/PhysicsAnalysis/PrimaryDPDMaker/src/ThinContainers.cxx index c2434e36e863..7d7d0ddd22c9 100644 --- a/PhysicsAnalysis/PrimaryDPDMaker/src/ThinContainers.cxx +++ b/PhysicsAnalysis/PrimaryDPDMaker/src/ThinContainers.cxx @@ -43,26 +43,27 @@ #include "tauEvent/TauJet.h" #include "JetEvent/JetCollection.h" #include "Particle/TrackParticleContainer.h" -#include "TrkTrack/TrackCollection.h" #include "TrkTrack/Track.h" #include "TrkParameters/TrackParameters.h" #include "TrkTrackSummary/TrackSummary.h" #include "AnalysisTriggerEvent/LVL1_ROI.h" #include "AnalysisTriggerEvent/EmTau_ROI.h" -#include "CaloEvent/CaloCellContainer.h" #include "CaloEvent/CaloCellLinkContainer.h" #include "CaloEvent/CaloCellLink.h" -#include "CaloEvent/CaloClusterContainer.h" #include "CaloEvent/CaloCluster.h" -#include "InDetPrepRawData/PixelClusterContainer.h" + +// Needed for the pixel clusters +#include "InDetReadoutGeometry/PixelDetectorManager.h" +#include "InDetReadoutGeometry/SCT_DetectorManager.h" +#include "InDetReadoutGeometry/TRT_DetectorManager.h" +// #include "InDetPrepRawData/PixelClusterCollection.h" #include "InDetPrepRawData/PixelCluster.h" -#include "InDetPrepRawData/SCT_ClusterContainer.h" #include "InDetPrepRawData/SCT_ClusterCollection.h" #include "InDetPrepRawData/SCT_Cluster.h" -#include "InDetPrepRawData/TRT_DriftCircleContainer.h" #include "InDetPrepRawData/TRT_DriftCircleCollection.h" #include "InDetPrepRawData/TRT_DriftCircle.h" +// #include "InDetReadoutGeometry/TRT_BaseElement.h" #include "InDetRIO_OnTrack/PixelClusterOnTrack.h" @@ -70,7 +71,7 @@ #include "InDetRIO_OnTrack/TRT_DriftCircleOnTrack.h" #include "TrkPseudoMeasurementOnTrack/PseudoMeasurementOnTrack.h" -#include "Identifier/IdentifierHash.h" + // Needed for deltaR calculation (really?) @@ -2109,7 +2110,7 @@ StatusCode ThinContainers::thinPixels(const InDet::PixelClusterContainer* pixelC ++nTotal; ATH_MSG_DEBUG( "There are " << (*pixelItr)->size() << " entries in the PixelClusterContainer!" ); - const PixelClusterCollection *colNext = (*pixelItr); + const InDet::PixelClusterCollection *colNext = (*pixelItr); if (!colNext){ continue; } @@ -2190,7 +2191,7 @@ StatusCode ThinContainers::thinSCTClusters(const InDet::SCT_ClusterContainer* sc ++nTotal; ATH_MSG_DEBUG( "There are " << (*sctItr)->size() << " entries in the SCT_ClusterContainer!" ); - const SCT_ClusterCollection *colNext = (*sctItr); + const InDet::SCT_ClusterCollection *colNext = (*sctItr); if (!colNext){ continue; } @@ -2276,7 +2277,7 @@ StatusCode ThinContainers::thinTRTDriftCircles(const InDet::TRT_DriftCircleConta ++nTotal; ATH_MSG_DEBUG( "There are " << (*trtItr)->size() << " entries in the TRT_DriftCircleContainer!" ); - const TRT_DriftCircleCollection *colNext = (*trtItr); + const InDet::TRT_DriftCircleCollection *colNext = (*trtItr); if (!colNext){ continue; } -- GitLab From 1d10a38eca2321e92ba717fbb10635aaafcb429f Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Mon, 16 Jul 2018 12:07:24 +0000 Subject: [PATCH 471/562] 22.0-coverity-InDetTrigParticleCreation Former-commit-id: 6d4dbd2dcd524ca84da891d1be07ac702fcb6980 --- .../src/TrigTrackingxAODCnv.cxx | 4 +- .../src/TrigTrackingxAODCnvMT.h | 68 +++++++++---------- 2 files changed, 35 insertions(+), 37 deletions(-) diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/src/TrigTrackingxAODCnv.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/src/TrigTrackingxAODCnv.cxx index d8ee613d58b6..35835c0c0580 100644 --- a/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/src/TrigTrackingxAODCnv.cxx +++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/src/TrigTrackingxAODCnv.cxx @@ -40,6 +40,8 @@ namespace InDet : HLT::FexAlgo (name, pSvcLocator), m_particleCreatorTool("Trk::ParticleCreatorTool"), m_residualCalc("Trk::ResidualPullCalculator"), + m_idHelper{}, + m_pixelId{}, m_tracks(0), m_doIBLresidual(false), m_slice_name(""), @@ -258,7 +260,7 @@ namespace InDet tpCont->setStore( &tpAuxCont ); - if(m_tracks && runAlg) { + if(runAlg) { //m_tracks should not be checked here, it has been dereferenced already for(unsigned int idtr=0; idtr< m_tracks->size(); ++idtr) { const ElementLink<TrackCollection> trackLink(*m_tracks, idtr); diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/src/TrigTrackingxAODCnvMT.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/src/TrigTrackingxAODCnvMT.h index 25819cb7c312..d0db3be90d85 100644 --- a/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/src/TrigTrackingxAODCnvMT.h +++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/src/TrigTrackingxAODCnvMT.h @@ -32,8 +32,8 @@ #include "TrigInterfaces/FexAlgo.h" // STL -#include <map> #include <string> +#include <vector> class StoreGateSvc; class TH1F; @@ -73,17 +73,17 @@ namespace InDet private: ToolHandle< Trk::ITrackParticleCreatorTool > m_particleCreatorTool; ToolHandle< Trk::IResidualPullCalculator > m_residualCalc; - const AtlasDetectorID* m_idHelper; - const PixelID* m_pixelId; + const AtlasDetectorID* m_idHelper{}; + const PixelID* m_pixelId{}; - bool m_doIBLresidual; + bool m_doIBLresidual{}; //Monitoring std::string m_slice_name; - bool m_mon_doSliceSpecific; - int m_mon_counter; - int m_mon_prescale; - float m_mon_ptmin; + bool m_mon_doSliceSpecific{}; + int m_mon_counter{}; + int m_mon_prescale{}; + float m_mon_ptmin{}; //Common Variables std::vector<float> m_dqm_d0; std::vector<float> m_dqm_z0; @@ -96,33 +96,33 @@ namespace InDet std::vector<float> m_dqm_chi2dof; std::vector<float> m_dqm_eta_roi; std::vector<float> m_dqm_phi_roi; - double m_roiPhi, m_roiEta, m_roiZ; - double m_roiPhiWidth, m_roiEtaWidth, m_roiZ_Width; - int m_dqm_ntrkpart; - int m_dqm_ntrk; - int m_dqm_nvertex; + double m_roiPhi{}, m_roiEta{}, m_roiZ{}; + double m_roiPhiWidth{}, m_roiEtaWidth{}, m_roiZ_Width{}; + int m_dqm_ntrkpart{}; + int m_dqm_ntrk{}; + int m_dqm_nvertex{}; //Bjet - float m_dqm_bj_sumpt; + float m_dqm_bj_sumpt{}; //Muon - float m_dqm_mu_d0; - float m_dqm_mu_z0; - float m_dqm_mu_eta; - float m_dqm_mu_phi; - float m_dqm_mu_qOverP; - float m_dqm_mu_pt; - int m_dqm_mu_npix_hits; - int m_dqm_mu_nsct_hits; - int m_dqm_mu_ntrt_hits; - float m_dqm_mu_chi2dof; - float m_dqm_mu_eta_roi; - float m_dqm_mu_phi_roi; + float m_dqm_mu_d0{}; + float m_dqm_mu_z0{}; + float m_dqm_mu_eta{}; + float m_dqm_mu_phi{}; + float m_dqm_mu_qOverP{}; + float m_dqm_mu_pt{}; + int m_dqm_mu_npix_hits{}; + int m_dqm_mu_nsct_hits{}; + int m_dqm_mu_ntrt_hits{}; + float m_dqm_mu_chi2dof{}; + float m_dqm_mu_eta_roi{}; + float m_dqm_mu_phi_roi{}; //Tau std::vector<float> m_dqm_ta_roidr; - float m_dqm_ta_L_pt; //+++ pT of leading (L) pT track - float m_dqm_ta_frac_pt; //+++ fraction pT_L/pT_NL, NL= next-to-leading - float m_dqm_ta_sum_ch; //+++ Charge sum all tracks - float m_dqm_ta_asy_ch; //+++ Charge asymmetry all tracks - float m_dqm_ta_m; //+++ Inv mass all tracks + float m_dqm_ta_L_pt{}; //+++ pT of leading (L) pT track + float m_dqm_ta_frac_pt{}; //+++ fraction pT_L/pT_NL, NL= next-to-leading + float m_dqm_ta_sum_ch{}; //+++ Charge sum all tracks + float m_dqm_ta_asy_ch{}; //+++ Charge asymmetry all tracks + float m_dqm_ta_m{}; //+++ Inv mass all tracks // std::vector<float> m_dqm_ibl_z; //IBL coordinate along z @@ -130,11 +130,7 @@ namespace InDet std::vector<float> m_dqm_ibl_res_y; std::vector<float> m_dqm_ibl_hit_expected_found; - //Timers - //TrigTimer* m_timerMemAlloc; - //TrigTimer* m_timerFeatureAttach; - //TrigTimer* m_timerTrackConversion; - + SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey; SG::ReadHandleKey<TrackCollection> m_trackKey; -- GitLab From 9833e57b8bbe784b49c9907e338b4d858e9ff67a Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Mon, 16 Jul 2018 12:10:55 +0000 Subject: [PATCH 472/562] 22.0-coverity-TRT_DetElementsRoadTool_xk Former-commit-id: 31a783668123057c972bf820f6f148044bb8cb06 --- .../TRT_DetElementsRoadMaker_xk.h | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/InnerDetector/InDetRecTools/TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadMaker_xk.h b/InnerDetector/InDetRecTools/TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadMaker_xk.h index a25bbb328dc9..9a13c8aeb6ec 100755 --- a/InnerDetector/InDetRecTools/TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadMaker_xk.h +++ b/InnerDetector/InDetRecTools/TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadMaker_xk.h @@ -16,8 +16,7 @@ #ifndef TRT_DetElementsRoadMaker_xk_H #define TRT_DetElementsRoadMaker_xk_H -#include <list> -#include <vector> + #include "GaudiKernel/ServiceHandle.h" #include "MagFieldInterfaces/IMagFieldSvc.h" @@ -33,6 +32,9 @@ #include "TrkSurfaces/CylinderBounds.h" #include "TRT_DetElementsRoadTool_xk/TRT_DetElementsLayer_xk.h" +#include <list> +#include <vector> +#include <iosfwd> class MsgStream; @@ -97,17 +99,17 @@ namespace InDet { /////////////////////////////////////////////////////////////////// ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle; - MagField::IMagFieldSvc* m_fieldService ; + MagField::IMagFieldSvc* m_fieldService{} ; ToolHandle<Trk::IPropagator> m_proptool ; // Propagator tool Trk::MagneticFieldProperties m_fieldprop; // Magnetic field properties - int m_outputlevel; - int m_nprint ; - int m_sizeroad ; - double m_zfield ; - float m_width ; // Width of the roadInnerDetector/InDetRecTools/ - double m_step ; // Max step allowed - double m_rminTRT ; + int m_outputlevel{}; + int m_nprint{} ; + int m_sizeroad{} ; + double m_zfield{} ; + float m_width{} ; // Width of the roadInnerDetector/InDetRecTools/ + double m_step{} ; // Max step allowed + double m_rminTRT{} ; Trk::CylinderBounds m_bounds ; // int m_map [3] ; std::vector<TRT_DetElementsLayer_xk> m_layer[3] ; // Layers -- GitLab From ff12e363d9669fc5af2d13931c50bb45f27ee994 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Mon, 16 Jul 2018 12:26:39 +0000 Subject: [PATCH 473/562] 22.0-coverity-InDetTrigTrackResidualMonitor Former-commit-id: fe80553d636354261c5c8d7bb3be13839d0b1d00 --- .../TrigTrackResidualMonitor.h | 33 +- .../src/TrigTrackResidualMonitor.cxx | 473 +++++++++--------- 2 files changed, 247 insertions(+), 259 deletions(-) diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/InDetTrigTrackResidualMonitor/TrigTrackResidualMonitor.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/InDetTrigTrackResidualMonitor/TrigTrackResidualMonitor.h index f6215fc43bb0..ba7c14465d50 100644 --- a/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/InDetTrigTrackResidualMonitor/TrigTrackResidualMonitor.h +++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/InDetTrigTrackResidualMonitor/TrigTrackResidualMonitor.h @@ -12,14 +12,10 @@ */ //////////////////////////////////////////////////////////////////////////// -#ifndef INDETTRIGTRACKSLIMMER_H -#define INDETTRIGTRACKSLIMMER_H +#ifndef TrigTrackResidualMonitor_H +#define TrigTrackResidualMonitor_H #include "GaudiKernel/ToolHandle.h" -#include "AthenaBaseComps/AthAlgTool.h" -#include "AthContainers/DataVector.h" -#include "GaudiKernel/ITHistSvc.h" - //typedef #include "TrkTrack/TrackCollection.h" @@ -27,21 +23,6 @@ //!< Trigger specific stuff #include "TrigInterfaces/FexAlgo.h" -#include "TrkParameters/TrackParameters.h" -#include "TrkToolInterfaces/IResidualPullCalculator.h" -#include "TrkEventPrimitives/TrackStateDefs.h" -#include "TrkEventPrimitives/FitQualityOnSurface.h" -#include "TrkTrack/TrackStateOnSurface.h" -#include "TrkValEvent/TrackStateData.h" -#include "Identifier/IdentifierHash.h" -#include "Identifier/Identifier.h" -#include "AtlasDetDescr/AtlasDetectorID.h" -#include "InDetPrepRawData/PixelClusterCollection.h" -#include "InDetPrepRawData/PixelClusterContainer.h" -#include "InDetReadoutGeometry/SCT_DetectorManager.h" -#include "InDetReadoutGeometry/PixelDetectorManager.h" -#include "InDetPrepRawData/SiClusterContainer.h" -#include "InDetPrepRawData/SCT_ClusterCollection.h" #include "TrkEventPrimitives/ParticleHypothesis.h" @@ -104,10 +85,10 @@ namespace InDet // tools - const AtlasDetectorID* m_idHelper; + const AtlasDetectorID* m_idHelper{}; - const PixelID* m_idHelperPixel; - const SCT_ID* m_idHelperSCT; + const PixelID* m_idHelperPixel{}; + const SCT_ID* m_idHelperSCT{}; @@ -129,8 +110,8 @@ namespace InDet ToolHandle<Trk::IResidualPullCalculator> m_residualPullCalculator; - const InDetDD::SCT_DetectorManager *m_SCT_Manager; - const InDetDD::PixelDetectorManager *m_Pixel_Manager; + const InDetDD::SCT_DetectorManager *m_SCT_Manager{}; + const InDetDD::PixelDetectorManager *m_Pixel_Manager{}; diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/src/TrigTrackResidualMonitor.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/src/TrigTrackResidualMonitor.cxx index 964b73a87de4..ef74b8dd2da2 100644 --- a/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/src/TrigTrackResidualMonitor.cxx +++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/src/TrigTrackResidualMonitor.cxx @@ -39,6 +39,9 @@ #include "TrkTrackSummaryTool/TrackSummaryTool.h" #include "TrkTrackSummary/TrackSummary.h" #include "TrkTrackSummary/MuonTrackSummary.h" +#include "InDetReadoutGeometry/SCT_DetectorManager.h" +#include "TrkToolInterfaces/IResidualPullCalculator.h" +#include "InDetReadoutGeometry/SiDetectorElement.h" namespace InDet { @@ -444,239 +447,243 @@ namespace InDet if (trkSum && npix >= 3 && nsct >= 6){ - const Trk::Perigee *trkPerig = track->perigeeParameters(); - double TrackPt = -1; - if(trkPerig){ - TrackPt = trkPerig->pT(); - m_TrackPt.push_back(TrackPt); - } - if (trkPerig->pT() > 5000){ - for( ; it!=itEnd; ++it ){ - tsos = *it; - if ((*it)->type(Trk::TrackStateOnSurface::Measurement) ){ - const Trk::MeasurementBase* mesb= - dynamic_cast <const Trk::MeasurementBase*>((*it)->measurementOnTrack()); - const Trk::TrackParameters* trackPars = (*it)->trackParameters(); - - const Trk::ResidualPull* resPullPixelBiased;// = 0; - const Trk::ResidualPull* resPullSCTBiased; //= 0; - - const Trk::ResidualPull* resPullPixelUnbiased;// = 0; - const Trk::ResidualPull* resPullSCTUnbiased; //= 0; - - int detType = 99; - - const Trk::MeasurementBase* mesh = (*it)->measurementOnTrack(); - const Trk::RIO_OnTrack* hitbec = dynamic_cast <const Trk::RIO_OnTrack*>(mesh); - const Identifier & hitIdbec = hitbec->identify(); - - - if (m_idHelper->is_pixel(hitIdbec)){ - detType = 0; - } - if (m_idHelper->is_sct(hitIdbec)) { - detType = 1; - } - - if((mesb) != 0 && (trackPars) !=0){ - const Trk::TrackParameters* TrackParams(0); - const Trk::TrackParameters* UnbiasedTrackParams(0); - const Trk::TrackParameters* PropagatedTrackParams(0); - const Trk::TrackParameters* OtherSideUnbiasedTrackParams(0); - const Trk::TrackParameters* PropagatedPixelUnbiasedTrackParams(0); - const Trk::TrackParameters* PixelUnbiasedTrackParams(0); - - const Trk::Surface* Surf = &(mesb->associatedSurface()); - const Identifier id = Surf->associatedDetectorElementIdentifier(); - - if ( id.is_valid()) { - int barrelECSCTUB = 99; - int barrelECSCTB = 99; - int barrelECPUB = 99; - int barrelECPB = 99; - if (detType == 1 ) { - // if (m_idHelperSCT->is_sct(id)) { //there's no TrueUnbiased for non-SCT (pixel) hits) - - // check if other module side was also hit and try to remove other hit as well - const Identifier& idbECSCTUB = m_idHelperSCT->wafer_id(hitIdbec); - barrelECSCTUB = m_idHelperSCT->barrel_ec(idbECSCTUB); - const Trk::TrackStateOnSurface* OtherModuleSideHit(0); - const Identifier& OtherModuleSideID = m_SCT_Manager->getDetectorElement(id)->otherSide()->identify(); - //const Trk::RIO_OnTrack* hit(0); - - for (const Trk::TrackStateOnSurface* TempTsos : *(*itResTrk)->trackStateOnSurfaces()) { - const Trk::RIO_OnTrack* hitOnTrack = dynamic_cast <const Trk::RIO_OnTrack*>(TempTsos->measurementOnTrack()); - //hit = hitOnTrack; - if (hitOnTrack != 0) { - const Identifier& trkID = hitOnTrack->identify(); - if (m_idHelperSCT->wafer_id(trkID) == OtherModuleSideID) { - OtherModuleSideHit = TempTsos; - } - } - } - - if (OtherModuleSideHit) { - if (OtherModuleSideHit->trackParameters()) { - OtherSideUnbiasedTrackParams = m_updator->removeFromState(*(OtherModuleSideHit->trackParameters()), - OtherModuleSideHit->measurementOnTrack()->localParameters(), - OtherModuleSideHit->measurementOnTrack()->localCovariance()); - - if (OtherSideUnbiasedTrackParams) { - const Trk::Surface* TempSurface = &(OtherModuleSideHit->measurementOnTrack()->associatedSurface()); - const Trk::MagneticFieldProperties* TempField = 0; - if (TempSurface){ - if (TempSurface->associatedLayer()){ - if (TempSurface->associatedLayer()->enclosingTrackingVolume()){ - TempField = dynamic_cast <const Trk::MagneticFieldProperties*>(TempSurface->associatedLayer()->enclosingTrackingVolume()); - } - } - } - - PropagatedTrackParams = m_propagator->propagate(*OtherSideUnbiasedTrackParams, - tsos->measurementOnTrack()->associatedSurface(), - Trk::anyDirection, false, - *TempField, - m_ParticleHypothesis); - - delete OtherSideUnbiasedTrackParams; - - UnbiasedTrackParams = m_updator->removeFromState(*PropagatedTrackParams, - tsos->measurementOnTrack()->localParameters(), - tsos->measurementOnTrack()->localCovariance()); - - delete PropagatedTrackParams; - if (UnbiasedTrackParams) { - TrackParams = UnbiasedTrackParams->clone(); - } - - resPullSCTUnbiased = m_residualPullCalculator->residualPull(mesb,TrackParams,Trk::ResidualPull::Unbiased); - if(barrelECSCTUB == 0) { // Barrel region - m_resSCTUnbiasedBarrel.push_back(resPullSCTUnbiased->residual()[Trk::loc1]); - m_pullSCTUnbiasedBarrel.push_back(resPullSCTUnbiased->pull()[Trk::loc1]); - } - else if (barrelECSCTUB == 2){ // EndCap A - m_resSCTUnbiasedEndCapA.push_back(resPullSCTUnbiased->residual()[Trk::loc1]); - m_pullSCTUnbiasedEndCapA.push_back(resPullSCTUnbiased->pull()[Trk::loc1]); - } - else if (barrelECSCTUB == -2 ) { // EndCap A - m_resSCTUnbiasedEndCapC.push_back(resPullSCTUnbiased->residual()[Trk::loc1]); - m_pullSCTUnbiasedEndCapC.push_back(resPullSCTUnbiased->pull()[Trk::loc1]); - } - delete UnbiasedTrackParams; - } - } - } - } // end of m_True Unbiased Loop - - - else if ( detType == 0 ) { - // else if (m_idHelperPixel->is_pixel(id) ) { - const Identifier& idbECPUB = m_idHelperPixel->wafer_id(hitIdbec); - barrelECPUB = m_idHelperPixel->barrel_ec(idbECPUB); - const Trk::TrackStateOnSurface* PixelSideHit(0); - PixelSideHit = *it; - - PropagatedPixelUnbiasedTrackParams = m_updator->removeFromState(*tsos->trackParameters(), - tsos->measurementOnTrack()->localParameters(), - tsos->measurementOnTrack()->localCovariance()); - // const Identifier& PixelID = m_Pixel_Manager->getDetectorElement(id)->identify(); - const Trk::Surface* TempSurfacePixel = &(PixelSideHit->measurementOnTrack()->associatedSurface()); - const Trk::MagneticFieldProperties* TempFieldPixel = 0; - - if (TempSurfacePixel){ - if (TempSurfacePixel->associatedLayer()){ - if (TempSurfacePixel->associatedLayer()->enclosingTrackingVolume()){ - TempFieldPixel = dynamic_cast <const Trk::MagneticFieldProperties*>(TempSurfacePixel->associatedLayer()->enclosingTrackingVolume()); - } - } - } - - PixelUnbiasedTrackParams = m_propagator->propagate(*PropagatedPixelUnbiasedTrackParams, - tsos->measurementOnTrack()->associatedSurface(), - Trk::anyDirection, false, - *TempFieldPixel, - m_ParticleHypothesis); - delete PropagatedPixelUnbiasedTrackParams; - - if (PixelUnbiasedTrackParams) { - TrackParams = PixelUnbiasedTrackParams->clone(); - } - - resPullPixelUnbiased = m_residualPullCalculator->residualPull(mesb,TrackParams,Trk::ResidualPull::Unbiased); - if (barrelECPUB == 0){ - m_resPixellocXUnbiasedBarrel.push_back(resPullPixelUnbiased->residual()[Trk::locX]); - m_resPixellocYUnbiasedBarrel.push_back(resPullPixelUnbiased->residual()[Trk::locY]); - m_pullPixellocXUnbiasedBarrel.push_back(resPullPixelUnbiased->pull()[Trk::locX]); - m_pullPixellocYUnbiasedBarrel.push_back(resPullPixelUnbiased->pull()[Trk::locY]); - } - else if (barrelECPUB == 2 ){ - m_resPixellocXUnbiasedEndCapA.push_back(resPullPixelUnbiased->residual()[Trk::locX]); - m_resPixellocYUnbiasedEndCapA.push_back(resPullPixelUnbiased->residual()[Trk::locY]); - m_pullPixellocXUnbiasedEndCapA.push_back(resPullPixelUnbiased->pull()[Trk::locX]); - m_pullPixellocYUnbiasedEndCapA.push_back(resPullPixelUnbiased->pull()[Trk::locY]); - } - else if (barrelECPUB == -2 ) { - m_resPixellocXUnbiasedEndCapC.push_back(resPullPixelUnbiased->residual()[Trk::locX]); - m_resPixellocYUnbiasedEndCapC.push_back(resPullPixelUnbiased->residual()[Trk::locY]); - m_pullPixellocXUnbiasedEndCapC.push_back(resPullPixelUnbiased->pull()[Trk::locX]); - m_pullPixellocYUnbiasedEndCapC.push_back(resPullPixelUnbiased->pull()[Trk::locY]); - } - } - - - if ( detType == 0 ){ - // if (m_idHelperPixel->is_pixel(id) ) { - const Identifier& idbECPB = m_idHelperPixel->wafer_id(hitIdbec); - barrelECPB = m_idHelperPixel->barrel_ec(idbECPB); - - resPullPixelBiased = m_residualPullCalculator->residualPull(mesb,trackPars,Trk::ResidualPull::Biased); - - if(barrelECPB == 0){ - m_resPixellocXBiasedBarrel.push_back(resPullPixelBiased->residual()[Trk::locX]); - m_resPixellocYBiasedBarrel.push_back(resPullPixelBiased->residual()[Trk::locY]); - m_pullPixellocXBiasedBarrel.push_back(resPullPixelBiased->pull()[Trk::locX]); - m_pullPixellocYBiasedBarrel.push_back(resPullPixelBiased->pull()[Trk::locY]); - } - else if (barrelECPB == 2 ){ - m_resPixellocXBiasedEndCapA.push_back(resPullPixelBiased->residual()[Trk::locX]); - m_resPixellocYBiasedEndCapA.push_back(resPullPixelBiased->residual()[Trk::locY]); - m_pullPixellocXBiasedEndCapA.push_back(resPullPixelBiased->pull()[Trk::locX]); - m_pullPixellocYBiasedEndCapA.push_back(resPullPixelBiased->pull()[Trk::locY]); - } - else if (barrelECPB == -2 ) { - m_resPixellocXBiasedEndCapC.push_back(resPullPixelBiased->residual()[Trk::locX]); - m_resPixellocYBiasedEndCapC.push_back(resPullPixelBiased->residual()[Trk::locY]); - m_pullPixellocXBiasedEndCapC.push_back(resPullPixelBiased->pull()[Trk::locX]); - m_pullPixellocYBiasedEndCapC.push_back(resPullPixelBiased->pull()[Trk::locY]); - } - - - } else if ( detType == 1 ) { - // } else if (m_idHelperSCT->is_sct(id)) { - const Identifier& idbECSCTB = m_idHelperSCT->wafer_id(hitIdbec); - barrelECSCTB = m_idHelperSCT->barrel_ec(idbECSCTB); - - resPullSCTBiased = m_residualPullCalculator->residualPull(mesb,trackPars,Trk::ResidualPull::Biased); - - if(barrelECSCTB == 0){ - m_resSCTBiasedBarrel.push_back(resPullSCTBiased->residual()[Trk::locX]); - m_pullSCTBiasedBarrel.push_back(resPullSCTBiased->pull()[Trk::locX]); - } - else if (barrelECSCTB == 2) { - m_resSCTBiasedEndCapA.push_back(resPullSCTBiased->residual()[Trk::locX]); - m_pullSCTBiasedEndCapA.push_back(resPullSCTBiased->pull()[Trk::locX]); - } - else if (barrelECSCTB == -2 ) { - m_resSCTBiasedEndCapC.push_back(resPullSCTBiased->residual()[Trk::locX]); - m_pullSCTBiasedEndCapC.push_back(resPullSCTBiased->pull()[Trk::locX]); - } - } - } // is_valid, for detector types - } // if loop, track parameters ! = 0 or trackPars !=0 - } // If loop Trk::measurement - } // end of for loop over trackStateOnSurfaces - } // end of the if loop for trkPerig->pT() - }// end of trkSum and npix and nsct + const Trk::Perigee *trkPerig = track->perigeeParameters(); + double TrackPt = -1; + if(trkPerig){ + TrackPt = trkPerig->pT(); + m_TrackPt.push_back(TrackPt); + if (trkPerig->pT() > 5000){ + for( ; it!=itEnd; ++it ){ + tsos = *it; + if ((*it)->type(Trk::TrackStateOnSurface::Measurement) ){ + const Trk::MeasurementBase* mesb=dynamic_cast <const Trk::MeasurementBase*>((*it)->measurementOnTrack()); + const Trk::TrackParameters* trackPars = (*it)->trackParameters(); + + const Trk::ResidualPull* resPullPixelBiased;// = 0; + const Trk::ResidualPull* resPullSCTBiased; //= 0; + + const Trk::ResidualPull* resPullPixelUnbiased;// = 0; + const Trk::ResidualPull* resPullSCTUnbiased; //= 0; + + int detType = 99; + + const Trk::MeasurementBase* mesh = (*it)->measurementOnTrack(); + const Trk::RIO_OnTrack* hitbec = dynamic_cast <const Trk::RIO_OnTrack*>(mesh); + if (not hitbec){ + msg() << MSG::WARNING << " Cast from MeasurementBase to RIO_OnTrack failed in line "<<__LINE__ << endmsg; + continue; + } + const Identifier & hitIdbec = hitbec->identify(); + + + if (m_idHelper->is_pixel(hitIdbec)){ + detType = 0; + } + if (m_idHelper->is_sct(hitIdbec)) { + detType = 1; + } + + if((mesb) != 0 && (trackPars) !=0){ + const Trk::TrackParameters* TrackParams(0); + const Trk::TrackParameters* UnbiasedTrackParams(0); + const Trk::TrackParameters* PropagatedTrackParams(0); + const Trk::TrackParameters* OtherSideUnbiasedTrackParams(0); + const Trk::TrackParameters* PropagatedPixelUnbiasedTrackParams(0); + const Trk::TrackParameters* PixelUnbiasedTrackParams(0); + + const Trk::Surface* Surf = &(mesb->associatedSurface()); + const Identifier id = Surf->associatedDetectorElementIdentifier(); + + if ( id.is_valid()) { + int barrelECSCTUB = 99; + int barrelECSCTB = 99; + int barrelECPUB = 99; + int barrelECPB = 99; + if (detType == 1 ) { + // if (m_idHelperSCT->is_sct(id)) { //there's no TrueUnbiased for non-SCT (pixel) hits) + + // check if other module side was also hit and try to remove other hit as well + const Identifier& idbECSCTUB = m_idHelperSCT->wafer_id(hitIdbec); + barrelECSCTUB = m_idHelperSCT->barrel_ec(idbECSCTUB); + const Trk::TrackStateOnSurface* OtherModuleSideHit(0); + const Identifier& OtherModuleSideID = m_SCT_Manager->getDetectorElement(id)->otherSide()->identify(); + //const Trk::RIO_OnTrack* hit(0); + + for (const Trk::TrackStateOnSurface* TempTsos : *(*itResTrk)->trackStateOnSurfaces()) { + const Trk::RIO_OnTrack* hitOnTrack = dynamic_cast <const Trk::RIO_OnTrack*>(TempTsos->measurementOnTrack()); + //hit = hitOnTrack; + if (hitOnTrack != 0) { + const Identifier& trkID = hitOnTrack->identify(); + if (m_idHelperSCT->wafer_id(trkID) == OtherModuleSideID) { + OtherModuleSideHit = TempTsos; + } + } + } + + if (OtherModuleSideHit) { + if (OtherModuleSideHit->trackParameters()) { + OtherSideUnbiasedTrackParams = m_updator->removeFromState(*(OtherModuleSideHit->trackParameters()), + OtherModuleSideHit->measurementOnTrack()->localParameters(), + OtherModuleSideHit->measurementOnTrack()->localCovariance()); + + if (OtherSideUnbiasedTrackParams) { + const Trk::Surface* TempSurface = &(OtherModuleSideHit->measurementOnTrack()->associatedSurface()); + const Trk::MagneticFieldProperties* TempField = 0; + if (TempSurface){ + if (TempSurface->associatedLayer()){ + if (TempSurface->associatedLayer()->enclosingTrackingVolume()){ + TempField = dynamic_cast <const Trk::MagneticFieldProperties*>(TempSurface->associatedLayer()->enclosingTrackingVolume()); + } + } + } + + PropagatedTrackParams = m_propagator->propagate(*OtherSideUnbiasedTrackParams, + tsos->measurementOnTrack()->associatedSurface(), + Trk::anyDirection, false, + *TempField, + m_ParticleHypothesis); + + delete OtherSideUnbiasedTrackParams; + + UnbiasedTrackParams = m_updator->removeFromState(*PropagatedTrackParams, + tsos->measurementOnTrack()->localParameters(), + tsos->measurementOnTrack()->localCovariance()); + + delete PropagatedTrackParams; + if (UnbiasedTrackParams) { + TrackParams = UnbiasedTrackParams->clone(); + } + + resPullSCTUnbiased = m_residualPullCalculator->residualPull(mesb,TrackParams,Trk::ResidualPull::Unbiased); + if(barrelECSCTUB == 0) { // Barrel region + m_resSCTUnbiasedBarrel.push_back(resPullSCTUnbiased->residual()[Trk::loc1]); + m_pullSCTUnbiasedBarrel.push_back(resPullSCTUnbiased->pull()[Trk::loc1]); + } + else if (barrelECSCTUB == 2){ // EndCap A + m_resSCTUnbiasedEndCapA.push_back(resPullSCTUnbiased->residual()[Trk::loc1]); + m_pullSCTUnbiasedEndCapA.push_back(resPullSCTUnbiased->pull()[Trk::loc1]); + } + else if (barrelECSCTUB == -2 ) { // EndCap A + m_resSCTUnbiasedEndCapC.push_back(resPullSCTUnbiased->residual()[Trk::loc1]); + m_pullSCTUnbiasedEndCapC.push_back(resPullSCTUnbiased->pull()[Trk::loc1]); + } + delete UnbiasedTrackParams; + } + } + } + } // end of m_True Unbiased Loop + + + else if ( detType == 0 ) { + // else if (m_idHelperPixel->is_pixel(id) ) { + const Identifier& idbECPUB = m_idHelperPixel->wafer_id(hitIdbec); + barrelECPUB = m_idHelperPixel->barrel_ec(idbECPUB); + const Trk::TrackStateOnSurface* PixelSideHit(0); + PixelSideHit = *it; + + PropagatedPixelUnbiasedTrackParams = m_updator->removeFromState(*tsos->trackParameters(), + tsos->measurementOnTrack()->localParameters(), + tsos->measurementOnTrack()->localCovariance()); + // const Identifier& PixelID = m_Pixel_Manager->getDetectorElement(id)->identify(); + const Trk::Surface* TempSurfacePixel = &(PixelSideHit->measurementOnTrack()->associatedSurface()); + const Trk::MagneticFieldProperties* TempFieldPixel = 0; + + if (TempSurfacePixel){ + if (TempSurfacePixel->associatedLayer()){ + if (TempSurfacePixel->associatedLayer()->enclosingTrackingVolume()){ + TempFieldPixel = dynamic_cast <const Trk::MagneticFieldProperties*>(TempSurfacePixel->associatedLayer()->enclosingTrackingVolume()); + } + } + } + + PixelUnbiasedTrackParams = m_propagator->propagate(*PropagatedPixelUnbiasedTrackParams, + tsos->measurementOnTrack()->associatedSurface(), + Trk::anyDirection, false, + *TempFieldPixel, + m_ParticleHypothesis); + delete PropagatedPixelUnbiasedTrackParams; + + if (PixelUnbiasedTrackParams) { + TrackParams = PixelUnbiasedTrackParams->clone(); + } + + resPullPixelUnbiased = m_residualPullCalculator->residualPull(mesb,TrackParams,Trk::ResidualPull::Unbiased); + if (barrelECPUB == 0){ + m_resPixellocXUnbiasedBarrel.push_back(resPullPixelUnbiased->residual()[Trk::locX]); + m_resPixellocYUnbiasedBarrel.push_back(resPullPixelUnbiased->residual()[Trk::locY]); + m_pullPixellocXUnbiasedBarrel.push_back(resPullPixelUnbiased->pull()[Trk::locX]); + m_pullPixellocYUnbiasedBarrel.push_back(resPullPixelUnbiased->pull()[Trk::locY]); + } + else if (barrelECPUB == 2 ){ + m_resPixellocXUnbiasedEndCapA.push_back(resPullPixelUnbiased->residual()[Trk::locX]); + m_resPixellocYUnbiasedEndCapA.push_back(resPullPixelUnbiased->residual()[Trk::locY]); + m_pullPixellocXUnbiasedEndCapA.push_back(resPullPixelUnbiased->pull()[Trk::locX]); + m_pullPixellocYUnbiasedEndCapA.push_back(resPullPixelUnbiased->pull()[Trk::locY]); + } + else if (barrelECPUB == -2 ) { + m_resPixellocXUnbiasedEndCapC.push_back(resPullPixelUnbiased->residual()[Trk::locX]); + m_resPixellocYUnbiasedEndCapC.push_back(resPullPixelUnbiased->residual()[Trk::locY]); + m_pullPixellocXUnbiasedEndCapC.push_back(resPullPixelUnbiased->pull()[Trk::locX]); + m_pullPixellocYUnbiasedEndCapC.push_back(resPullPixelUnbiased->pull()[Trk::locY]); + } + } + + + if ( detType == 0 ){ + // if (m_idHelperPixel->is_pixel(id) ) { + const Identifier& idbECPB = m_idHelperPixel->wafer_id(hitIdbec); + barrelECPB = m_idHelperPixel->barrel_ec(idbECPB); + + resPullPixelBiased = m_residualPullCalculator->residualPull(mesb,trackPars,Trk::ResidualPull::Biased); + + if(barrelECPB == 0){ + m_resPixellocXBiasedBarrel.push_back(resPullPixelBiased->residual()[Trk::locX]); + m_resPixellocYBiasedBarrel.push_back(resPullPixelBiased->residual()[Trk::locY]); + m_pullPixellocXBiasedBarrel.push_back(resPullPixelBiased->pull()[Trk::locX]); + m_pullPixellocYBiasedBarrel.push_back(resPullPixelBiased->pull()[Trk::locY]); + } + else if (barrelECPB == 2 ){ + m_resPixellocXBiasedEndCapA.push_back(resPullPixelBiased->residual()[Trk::locX]); + m_resPixellocYBiasedEndCapA.push_back(resPullPixelBiased->residual()[Trk::locY]); + m_pullPixellocXBiasedEndCapA.push_back(resPullPixelBiased->pull()[Trk::locX]); + m_pullPixellocYBiasedEndCapA.push_back(resPullPixelBiased->pull()[Trk::locY]); + } + else if (barrelECPB == -2 ) { + m_resPixellocXBiasedEndCapC.push_back(resPullPixelBiased->residual()[Trk::locX]); + m_resPixellocYBiasedEndCapC.push_back(resPullPixelBiased->residual()[Trk::locY]); + m_pullPixellocXBiasedEndCapC.push_back(resPullPixelBiased->pull()[Trk::locX]); + m_pullPixellocYBiasedEndCapC.push_back(resPullPixelBiased->pull()[Trk::locY]); + } + + + } else if ( detType == 1 ) { + // } else if (m_idHelperSCT->is_sct(id)) { + const Identifier& idbECSCTB = m_idHelperSCT->wafer_id(hitIdbec); + barrelECSCTB = m_idHelperSCT->barrel_ec(idbECSCTB); + + resPullSCTBiased = m_residualPullCalculator->residualPull(mesb,trackPars,Trk::ResidualPull::Biased); + + if(barrelECSCTB == 0){ + m_resSCTBiasedBarrel.push_back(resPullSCTBiased->residual()[Trk::locX]); + m_pullSCTBiasedBarrel.push_back(resPullSCTBiased->pull()[Trk::locX]); + } + else if (barrelECSCTB == 2) { + m_resSCTBiasedEndCapA.push_back(resPullSCTBiased->residual()[Trk::locX]); + m_pullSCTBiasedEndCapA.push_back(resPullSCTBiased->pull()[Trk::locX]); + } + else if (barrelECSCTB == -2 ) { + m_resSCTBiasedEndCapC.push_back(resPullSCTBiased->residual()[Trk::locX]); + m_pullSCTBiasedEndCapC.push_back(resPullSCTBiased->pull()[Trk::locX]); + } + } + } // is_valid, for detector types + } // if loop, track parameters ! = 0 or trackPars !=0 + } // If loop Trk::measurement + } // end of for loop over trackStateOnSurfaces + + } + }// end of the 'if trkPerig' + }//end of 'if trkSum and npix>=3 and nsct>=6 } // end of loop over all tracks -- GitLab From a75bf587aaeb2685eb81c1ba3fe6391babfc4556 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Mon, 16 Jul 2018 12:31:54 +0000 Subject: [PATCH 474/562] 22.0 coverity InDetTrackSelectorTool Former-commit-id: ab8131c23f3490b1f68ee22aca8fdad459115308 --- .../InDetTrackSelectorTool.h | 4 +- .../src/InDetConversionTrackSelectorTool.cxx | 190 +++--- .../src/InDetDetailedTrackSelectorTool.cxx | 567 +++++++----------- 3 files changed, 299 insertions(+), 462 deletions(-) diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/InDetTrackSelectorTool/InDetTrackSelectorTool.h b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/InDetTrackSelectorTool/InDetTrackSelectorTool.h index 3545328ac009..61e6889b7d20 100644 --- a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/InDetTrackSelectorTool/InDetTrackSelectorTool.h +++ b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/InDetTrackSelectorTool/InDetTrackSelectorTool.h @@ -8,8 +8,8 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" #include "TrkToolInterfaces/ITrackSelectorTool.h" -#include "TrkEventPrimitives/ParticleHypothesis.h" -#include "TrkParameters/TrackParameters.h" +#include "TrkEventPrimitives/ParticleHypothesis.h"//enum, do not fwd declare +#include "TrkParameters/TrackParameters.h" //typedef /** * @file InDetTrackSelectorTool.h diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetConversionTrackSelectorTool.cxx b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetConversionTrackSelectorTool.cxx index 996861d969a0..a9f0939579e0 100644 --- a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetConversionTrackSelectorTool.cxx +++ b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetConversionTrackSelectorTool.cxx @@ -3,7 +3,6 @@ */ #include "InDetTrackSelectorTool/InDetConversionTrackSelectorTool.h" -// forward declare #include "TrkToolInterfaces/ITrackSummaryTool.h" #include "TrkExInterfaces/IExtrapolator.h" #include "VxVertex/Vertex.h" @@ -16,6 +15,7 @@ #include "VxVertex/RecVertex.h" #include "TrkParameters/TrackParameters.h" #include "xAODTracking/Vertex.h" +#include <cmath> namespace InDet @@ -68,59 +68,38 @@ namespace InDet StatusCode InDetConversionTrackSelectorTool::initialize() { - StatusCode sc = AthAlgTool::initialize(); - if(sc.isFailure()){ - msg(MSG::ERROR)<<" Unable to initialize the AlgTool"<<endmsg; - return StatusCode::FAILURE; - } - /* Get the track summary tool from ToolSvc */ - if ( m_trkSumTool.retrieve().isFailure() ) { - msg(MSG::ERROR) << "Failed to retrieve tool " << m_trkSumTool << endmsg; - return StatusCode::FAILURE; - } else { - msg(MSG::INFO) << "Retrieved tool " << m_trkSumTool << endmsg; - } - + ATH_CHECK( m_trkSumTool.retrieve()); /* Get the extrapolator tool from ToolSvc */ - if ( m_extrapolator.retrieve().isFailure() ) { - msg(MSG::ERROR) << "Failed to retrieve tool " << m_extrapolator << endmsg; - return StatusCode::FAILURE; - } else { - msg(MSG::INFO) << "Retrieved tool " << m_extrapolator << endmsg; - } - + ATH_CHECK( m_extrapolator.retrieve() ); /* Get BeamCondSvc */ - sc = m_iBeamCondSvc.retrieve(); - if (sc.isFailure()) { - msg(MSG::INFO) << "Could not find BeamCondSvc. Will use (0,0,0) if no vertex is given and extrapolation is needed." << endmsg; + if (m_iBeamCondSvc.retrieve().isFailure()) { + ATH_MSG_INFO( "Could not find BeamCondSvc. Will use (0,0,0) if no vertex is given and extrapolation is needed." ); } - return StatusCode::SUCCESS; } StatusCode InDetConversionTrackSelectorTool::finalize() { - msg(MSG::INFO) << "Finalize successful" << endmsg; + ATH_MSG_DEBUG( "Finalize successful"); return StatusCode::SUCCESS; } bool InDetConversionTrackSelectorTool::decision(const Trk::Track& track,const Trk::Vertex* vx) const { bool pass = false; - const Trk::Perigee* perigee=dynamic_cast<const Trk::Perigee*>(track.perigeeParameters()); + const bool vertexSuppliedByUser{vx!=nullptr}; const Trk::Vertex* myVertex=vx; //in case no Vertex is provided by the user, beam position will be used if available - if (myVertex==0) { + if (not vertexSuppliedByUser) { if (!m_iBeamCondSvc.empty()) { myVertex=new Trk::RecVertex(m_iBeamCondSvc->beamVtx()); } else { - msg(MSG::WARNING) << " Cannot get beamSpot center from iBeamCondSvc. Using (0,0,0)... " << endmsg; + ATH_MSG_WARNING(" Cannot get beamSpot center from iBeamCondSvc. Using (0,0,0)... " ); myVertex=new Trk::Vertex(Amg::Vector3D(0,0,0)); } } - Trk::PerigeeSurface perigeeSurface(myVertex->position()); const Trk::TrackParameters *firstmeaspar=0; for (unsigned int i=0;i<track.trackParameters()->size();i++){ @@ -134,12 +113,9 @@ namespace InDet //no track selection if firstmeas + perigee does not exist ! firstmeaspar=track.perigeeParameters(); if (!firstmeaspar){ - msg(MSG::WARNING) << " First measurment on track is missing. Using perigee Parameters, but they are missing: 0 pointer! Track selection failed " << endmsg; + ATH_MSG_WARNING( " First measurment on track is missing. Using perigee Parameters, but they are missing: 0 pointer! Track selection failed " ); //clean up vertex - if (myVertex!=vx) { - delete myVertex; - myVertex=0; - } + if (not vertexSuppliedByUser) delete myVertex; return false; } } @@ -148,18 +124,19 @@ namespace InDet // const Trk::TrackParameters * extrapolatedParameters= firstmeaspar ? m_extrapolator->extrapolate(*firstmeaspar,perigeeSurface,Trk::anyDirection,true,track.info().particleHypothesis() ) : 0; perigee = extrapolatedParameters ? dynamic_cast<const Trk::Perigee*>(extrapolatedParameters) : 0; if (perigee==0 || !perigee->covariance() ) { - msg(MSG::WARNING) << "Track Selector failed to extrapolate track to the vertex: " << myVertex->position() << endmsg; + ATH_MSG_WARNING( "Track Selector failed to extrapolate track to the vertex: " << myVertex->position() ); if (extrapolatedParameters!=0) { - msg(MSG::WARNING) << "The return object of the extrapolator was not a perigee even if a perigeeSurface was used!" << endmsg; + ATH_MSG_WARNING( "The return object of the extrapolator was not a perigee even if a perigeeSurface was used!"); delete extrapolatedParameters; - if (myVertex!=vx) delete myVertex; + if (not vertexSuppliedByUser) delete myVertex; return false; } + if (not vertexSuppliedByUser) delete myVertex; return false; } double qOverP = perigee->parameters()[Trk::qOverP]; - double pt = fabs(1/qOverP)*sin(perigee->parameters()[Trk::theta]); + 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); @@ -170,65 +147,59 @@ namespace InDet int nTrtOutliers = tSum->get(Trk::numberOfTRTOutliers); int ntrt = nTrtHits + nTrtOutliers; int nTrtXenonHits = tSum->get(Trk::numberOfTRTXenonHits); - if(m_isConv) { - - if(ntrt > 0 && (!m_PIDonlyForXe || nTrtXenonHits==ntrt) ) // only check TRT PID if m_PIDonlyForXe is false or all TRT hits are Xenon hits - ratioTrk = tSum->getPID(Trk::eProbabilityHT); - + if(ntrt > 0 && (!m_PIDonlyForXe || nTrtXenonHits==ntrt) ){ // only check TRT PID if m_PIDonlyForXe is false or all TRT hits are Xenon hits + ratioTrk = tSum->getPID(Trk::eProbabilityHT); + } if ( pt >= m_minPt ) { - if ( (nclus==0 && fabs(d0)<=m_maxTrtD0) || (nclus>0 && fabs(d0)<=m_maxSiD0) ) { - if ( (nclus==0 && fabs(z0)<=m_maxTrtZ0) || (nclus>0 && fabs(z0)<=m_maxSiZ0) ) { - if (nclus>0) { - if((ntrt<=15 && ratioTrk>=m_trRatio1) || - (ntrt>15 && ntrt<=25 && ratioTrk>=m_trRatio2) || - (ntrt>25 && ratioTrk>=m_trRatio3)) pass = true; - } else if (ratioTrk>=m_trRatioTRT) pass = true; - } - } + if ( (nclus==0 && std::fabs(d0)<=m_maxTrtD0) || (nclus>0 && std::fabs(d0)<=m_maxSiD0) ) { + if ( (nclus==0 && std::fabs(z0)<=m_maxTrtZ0) || (nclus>0 && std::fabs(z0)<=m_maxSiZ0) ) { + if (nclus>0) { + if((ntrt<=15 && ratioTrk>=m_trRatio1) || + (ntrt>15 && ntrt<=25 && ratioTrk>=m_trRatio2) || + (ntrt>25 && ratioTrk>=m_trRatio3)) pass = true; + } else if (ratioTrk>=m_trRatioTRT) pass = true; + } + } } } else { //The cuts below are necessary for the V0 track selection const AmgSymMatrix(5)& err = *perigee->covariance(); double sd0sq = err(0,0); - double sd0 = (sd0sq>0.)?sqrt(sd0sq):0.; + double sd0 = (sd0sq>0.)?std::sqrt(sd0sq):0.; double sz0sq = err(1,1); - double sz0 = (sz0sq>0.)?sqrt(sz0sq):0.; + double sz0 = (sz0sq>0.)?std::sqrt(sz0sq):0.; if(nclus == 0){ - if(fabs(d0)>=m_sD0_Trt*sd0 && fabs(d0)<=m_maxTrtD0 && fabs(z0)<=m_sZ0_Trt*sz0 && pt>=m_minPt) pass = true; + if(std::fabs(d0)>=m_sD0_Trt*sd0 && std::fabs(d0)<=m_maxTrtD0 && std::fabs(z0)<=m_sZ0_Trt*sz0 && pt>=m_minPt) pass = true; }else{ - if(fabs(d0)>=m_sD0_Si*sd0 && fabs(z0)<=m_maxSiZ0 && pt>=m_minPt) pass = true; + if(std::fabs(d0)>=m_sD0_Si*sd0 && std::fabs(z0)<=m_maxSiZ0 && pt>=m_minPt) pass = true; } - ratioTrk = 1.0; if(ntrt > 0 && (!m_PIDonlyForXe || nTrtXenonHits==ntrt) ) // only check TRT PID if m_PIDonlyForXe is false or all TRT hits are Xenon hits - ratioTrk = tSum->getPID(Trk::eProbabilityHT); - + ratioTrk = tSum->getPID(Trk::eProbabilityHT); if(ratioTrk>m_trRatioV0) pass = false; } delete tSum; } else pass = false; - - if (myVertex!=vx) delete myVertex; + if (not vertexSuppliedByUser) delete myVertex; if (perigee!=track.perigeeParameters()) delete perigee; - return pass; } bool InDetConversionTrackSelectorTool::decision(const Trk::TrackParticleBase& track,const Trk::Vertex* vx) const { bool pass = false; - const Trk::TrackParameters* definintParameters=&(track.definingParameters()); const Trk::Perigee* perigee=dynamic_cast<const Trk::Perigee*>(definintParameters); const Trk::Vertex* myVertex=vx; + const bool vertexSuppliedByUser{vx!=nullptr}; //in case no Vertex is provided by the user, beam position will be used if available - if (myVertex==0) { + if (not vertexSuppliedByUser) { if (!m_iBeamCondSvc.empty()) { myVertex=new Trk::RecVertex(m_iBeamCondSvc->beamVtx()); } else { - msg(MSG::WARNING) << " Cannot get beamSpot center from iBeamCondSvc. Using (0,0,0)... " << endmsg; + ATH_MSG_WARNING( " Cannot get beamSpot center from iBeamCondSvc. Using (0,0,0)... " ); myVertex=new Trk::Vertex(Amg::Vector3D(0,0,0)); } } @@ -241,36 +212,31 @@ namespace InDet break; } } - if (!firstmeaspar) { //using perigee instead of firstmeasurement, since first measurement was not found... firstmeaspar=&(track.definingParameters()); if (!firstmeaspar){ - msg(MSG::DEBUG) << " Track Paraemters at first measurement not found. Perigee not found. Cannot do TrackSelection..." << endmsg; - if (myVertex!=vx) { - delete myVertex; - myVertex=0; - } + ATH_MSG_WARNING( " Track Paraemters at first measurement not found. Perigee not found. Cannot do TrackSelection..." ); + if (not vertexSuppliedByUser) delete myVertex; return false; } } - const Trk::TrackParameters * extrapolatedParameters= m_extrapolator->extrapolate(*firstmeaspar,perigeeSurface,Trk::anyDirection,true,Trk::pion ); - //const Trk::TrackParameters * extrapolatedParameters= firstmeaspar ? m_extrapolator->extrapolate(*firstmeaspar,perigeeSurface,Trk::anyDirection,true,Trk::pion ) : 0; perigee = extrapolatedParameters ? dynamic_cast<const Trk::Perigee*>(extrapolatedParameters) : 0; if (perigee==0 || !perigee->covariance()) { - msg(MSG::WARNING) << "Track Selector failed to extrapolate track to the vertex: " << myVertex->position() << endmsg; + ATH_MSG_WARNING( "Track Selector failed to extrapolate track to the vertex: " << myVertex->position() ); if (extrapolatedParameters!=0) { - msg(MSG::WARNING) << "The return object of the extrapolator was not a perigee even if a perigeeSurface was used!" << endmsg; + ATH_MSG_WARNING( "The return object of the extrapolator was not a perigee even if a perigeeSurface was used!" ); delete extrapolatedParameters; - if (myVertex!=vx) delete myVertex; + if (not vertexSuppliedByUser) delete myVertex; return false; } + if (not vertexSuppliedByUser) delete myVertex; return false; } double qOverP = perigee->parameters()[Trk::qOverP]; - double pt = fabs(1/qOverP)*sin(perigee->parameters()[Trk::theta]); + 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 = track.trackSummary(); @@ -283,42 +249,40 @@ namespace InDet int nTrtXenonHits = tSum->get(Trk::numberOfTRTXenonHits); if(m_isConv){ - - if(ntrt > 0 && (!m_PIDonlyForXe || nTrtXenonHits==ntrt) ) // only check TRT PID if m_PIDonlyForXe is false or all TRT hits are Xenon hits - ratioTrk = tSum->getPID(Trk::eProbabilityHT); - + if(ntrt > 0 && (!m_PIDonlyForXe || nTrtXenonHits==ntrt) ){ // only check TRT PID if m_PIDonlyForXe is false or all TRT hits are Xenon hits + ratioTrk = tSum->getPID(Trk::eProbabilityHT); + } if ( pt >= m_minPt ) { - if ( (nclus==0 && fabs(d0)<=m_maxTrtD0) || (nclus>0 && fabs(d0)<=m_maxSiD0) ) { - if ( (nclus==0 && fabs(z0)<=m_maxTrtZ0) || (nclus>0 && fabs(z0)<=m_maxSiZ0) ) { - if (nclus > 0) { - if((ntrt<=15 && ratioTrk>=m_trRatio1) || - (ntrt>15 && ntrt<=25 && ratioTrk>=m_trRatio2) || - (ntrt>25 && ratioTrk>=m_trRatio3)) pass = true; - } else if (ratioTrk>=m_trRatioTRT) pass = true; - } - } + if ( (nclus==0 && std::fabs(d0)<=m_maxTrtD0) || (nclus>0 && std::fabs(d0)<=m_maxSiD0) ) { + if ( (nclus==0 && std::fabs(z0)<=m_maxTrtZ0) || (nclus>0 && std::fabs(z0)<=m_maxSiZ0) ) { + if (nclus > 0) { + if((ntrt<=15 && ratioTrk>=m_trRatio1) || + (ntrt>15 && ntrt<=25 && ratioTrk>=m_trRatio2) || + (ntrt>25 && ratioTrk>=m_trRatio3)) pass = true; + } else if (ratioTrk>=m_trRatioTRT) pass = true; + } + } } } else { //The cuts below are necessary for the V0 track selection const AmgSymMatrix(5)& err = *perigee->covariance(); double sd0sq = err(0,0); - double sd0 = (sd0sq>0.)?sqrt(sd0sq):0.; + double sd0 = (sd0sq>0.)?std::sqrt(sd0sq):0.; double sz0sq = err(1,1); - double sz0 = (sz0sq>0.)?sqrt(sz0sq):0.; + double sz0 = (sz0sq>0.)?std::sqrt(sz0sq):0.; if(nclus == 0){ - if(fabs(d0)>=m_sD0_Trt*sd0 && fabs(d0)<= m_maxTrtD0 && fabs(z0)<=m_sZ0_Trt*sz0 && pt>=m_minPt) pass = true; + if(std::fabs(d0)>=m_sD0_Trt*sd0 && std::fabs(d0)<= m_maxTrtD0 && std::fabs(z0)<=m_sZ0_Trt*sz0 && pt>=m_minPt) pass = true; }else{ - if(fabs(d0)>=m_sD0_Si*sd0 && fabs(z0)<=m_maxSiZ0 && pt>=m_minPt) pass = true; + if(std::fabs(d0)>=m_sD0_Si*sd0 && std::fabs(z0)<=m_maxSiZ0 && pt>=m_minPt) pass = true; } ratioTrk = 1.0; if(ntrt > 0 && (!m_PIDonlyForXe || nTrtXenonHits==ntrt) ) // only check TRT PID if m_PIDonlyForXe is false or all TRT hits are Xenon hits - ratioTrk = tSum->getPID(Trk::eProbabilityHT); + ratioTrk = tSum->getPID(Trk::eProbabilityHT); if(ratioTrk>m_trRatioV0) pass = false; } } else pass = false; - - if (myVertex!=vx) delete myVertex; + if (not vertexSuppliedByUser) delete myVertex; if (perigee!=&(track.definingParameters())) delete perigee; return pass; @@ -328,26 +292,17 @@ namespace InDet // --------------------------------------------------------------------- bool InDetConversionTrackSelectorTool::decision(const xAOD::TrackParticle& tp,const xAOD::Vertex* vertex) const { - - - - bool pass = false; - const Trk::Perigee& perigee=tp.perigeeParameters(); - //in case no Vertex is provided by the user, beam position will be used if available - Trk::PerigeeSurface perigeeSurface( vertex ? vertex->position() : (!m_iBeamCondSvc.empty() ? m_iBeamCondSvc->beamVtx().position() : Amg::Vector3D(0,0,0) ) ); - const Trk::TrackParameters* extrapolatedParameters= m_extrapolator->extrapolate(perigee,perigeeSurface,Trk::anyDirection,false,Trk::pion ); if (extrapolatedParameters==0) { - ATH_MSG_WARNING( "Extrapolation to the vertex failed: " << perigeeSurface << std::endl << perigee ); + ATH_MSG_WARNING( "Extrapolation to the vertex failed: " << perigeeSurface << "\n" << perigee ); return false; } - double qOverP = perigee.parameters()[Trk::qOverP]; - double pt = fabs(1/qOverP)*sin(perigee.parameters()[Trk::theta]); + double pt = std::fabs(1./qOverP)*std::sin(perigee.parameters()[Trk::theta]); double d0 = extrapolatedParameters->parameters()[Trk::d0]; double z0 = extrapolatedParameters->parameters()[Trk::z0]; @@ -365,12 +320,12 @@ namespace InDet } if ( pt >= m_minPt ) { - if ( (nclus==0 && fabs(d0)<=m_maxTrtD0) || (nclus>0 && fabs(d0)<=m_maxSiD0) ) { - if ( (nclus==0 && fabs(z0)<=m_maxTrtZ0) || (nclus>0 && fabs(z0)<=m_maxSiZ0) ) { + if ( (nclus==0 && std::fabs(d0)<=m_maxTrtD0) || (nclus>0 && std::fabs(d0)<=m_maxSiD0) ) { + if ( (nclus==0 && std::fabs(z0)<=m_maxTrtZ0) || (nclus>0 && std::fabs(z0)<=m_maxSiZ0) ) { if (nclus > 0) { if((ntrt<=15 && ratioTrk>=m_trRatio1) || - (ntrt>15 && ntrt<=25 && ratioTrk>=m_trRatio2) || - (ntrt>25 && ratioTrk>=m_trRatio3)) pass = true; + (ntrt>15 && ntrt<=25 && ratioTrk>=m_trRatio2) || + (ntrt>25 && ratioTrk>=m_trRatio3)) pass = true; } else if (ratioTrk>=m_trRatioTRT) pass = true; } } @@ -379,15 +334,14 @@ namespace InDet //The cuts below are necessary for the V0 track selection const AmgSymMatrix(5)& err = *perigee.covariance(); double sd0sq = err(0,0); - double sd0 = (sd0sq>0.)?sqrt(sd0sq):0.; + double sd0 = (sd0sq>0.)?std::sqrt(sd0sq):0.; double sz0sq = err(1,1); - double sz0 = (sz0sq>0.)?sqrt(sz0sq):0.; + double sz0 = (sz0sq>0.)?std::sqrt(sz0sq):0.; if(nclus == 0){ - if(fabs(d0)>=m_sD0_Trt*sd0 && fabs(d0)<= m_maxTrtD0 && fabs(z0)<=m_sZ0_Trt*sz0 && pt>=m_minPt) pass = true; + if(std::fabs(d0)>=m_sD0_Trt*sd0 && std::fabs(d0)<= m_maxTrtD0 && std::fabs(z0)<=m_sZ0_Trt*sz0 && pt>=m_minPt) pass = true; }else{ - if(fabs(d0)>=m_sD0_Si*sd0 && fabs(z0)<=m_maxSiZ0 && pt>=m_minPt) pass = true; + if(std::fabs(d0)>=m_sD0_Si*sd0 && std::fabs(z0)<=m_maxSiZ0 && pt>=m_minPt) pass = true; } - ratioTrk = 1.0; float temp(0); if(ntrt > 0 && (!m_PIDonlyForXe || nTrtXenonHits==ntrt) ) // only check TRT PID if m_PIDonlyForXe is false or all TRT hits are Xenon hits diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetDetailedTrackSelectorTool.cxx b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetDetailedTrackSelectorTool.cxx index 7756461fc8e9..cfa203f2f252 100644 --- a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetDetailedTrackSelectorTool.cxx +++ b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetDetailedTrackSelectorTool.cxx @@ -26,7 +26,7 @@ #include "TrkSurfaces/PerigeeSurface.h" #include "GeoPrimitives/GeoPrimitives.h" #include "EventPrimitives/EventPrimitives.h" -#include <TMath.h> +#include <cmath> using CLHEP::GeV; using CLHEP::mm; @@ -42,12 +42,10 @@ namespace InDet , m_iBeamCondSvc ("BeamCondSvc",n) , m_magFieldSvc("AtlasFieldSvc",n) , m_trtDCTool("InDet::InDetTrtDriftCircleCutTool") - // , m_inDetTestBLayerTool("InDet::InDetTestBLayerTool") , m_inDetTestBLayerTool("") , m_trackSumToolAvailable(true) , m_usePtDependentCuts(false) - // , m_ptBenchmarks(1, 0) // create with dummy length 1 filled with 0 - // , m_nSCTValues(1, 0) // same + { declareInterface<ITrackSelectorTool>(this); @@ -115,19 +113,7 @@ namespace InDet declareProperty("TrtDCCutTool" , m_trtDCTool); declareProperty("InDetTestBLayerTool", m_inDetTestBLayerTool); - //pt-dependent cuts; default vector values (can be done much smarter, but I want - // to have an explicit code..) - - // std::vector<float> loc_bench; - // loc_bench.push_back(100.); - // loc_bench.push_back(200.); - // loc_bench.push_back(300.); - // std::vector<int> loc_nsct; - // loc_nsct.push_back(2); - // loc_nsct.push_back(4); - // loc_nsct.push_back(6); - declareProperty("UsePtDependentCuts", m_usePtDependentCuts = false); declareProperty("PtBenchmarks" , m_ptBenchmarks); declareProperty("SCTCutValues" , m_nSCTValues); @@ -138,126 +124,81 @@ namespace InDet {} // --------------------------------------------------------------------- - StatusCode InDetDetailedTrackSelectorTool::initialize() - { - StatusCode sc = AthAlgTool::initialize(); - if(sc.isFailure()) - { - msg(MSG::ERROR)<<" Unable to initialize the AlgTool"<<endmsg; - return StatusCode::FAILURE; - } - + StatusCode + InDetDetailedTrackSelectorTool::initialize(){ m_trackSumToolAvailable=false; - if (!m_trackSumTool.empty()) - { - if(m_trackSumTool.retrieve().isFailure()) - { - msg(MSG::INFO)<<" Unable to retrieve. OK if running on AOD. "<<m_trackSumTool<<endmsg; - } - else - { - msg(MSG::INFO)<<"Track summary tool retrieved"<<endmsg; - m_trackSumToolAvailable=true; - } - } - - if ( m_extrapolator.retrieve().isFailure() ) - { - msg(MSG::ERROR) << "Failed to retrieve tool " << m_extrapolator << endmsg; - return StatusCode::FAILURE; - } - ATH_MSG_INFO("Retrieved tool " << m_extrapolator); - - sc = m_iBeamCondSvc.retrieve(); - if (sc.isFailure()) + if (!m_trackSumTool.empty()) { + if(m_trackSumTool.retrieve().isFailure()){ + ATH_MSG_INFO(" Unable to retrieve. OK if running on AOD. "<<m_trackSumTool); + }else{ + ATH_MSG_INFO("Track summary tool retrieved"); + m_trackSumToolAvailable=true; + } + } + ATH_CHECK( m_extrapolator.retrieve() ); + if (m_iBeamCondSvc.retrieve().isFailure()){ ATH_MSG_INFO("Could not find BeamCondSvc. Will use (0,0,0) if no vertex is given and extrapolation is needed."); - - if (m_useEtaDepententMinHitTrt || m_useEtaDepententMinHitTrtWithOutliers) - { - if(m_trtDCTool.empty()) { - msg(MSG::ERROR)<<" Eta delendent cut on number of TRT hits requested but TrtDCCutTool not specified. "<<endmsg; - return StatusCode::FAILURE; - } - else if(m_trtDCTool.retrieve().isFailure()) { - msg(MSG::ERROR)<<" Unable to retrieve tool "<<m_trtDCTool<<endmsg; - return StatusCode::FAILURE; - } - ATH_MSG_INFO("Retrieved tool "<<m_trtDCTool); - - if(m_useEtaDepententMinHitTrt) - ATH_MSG_INFO("Using eta dependent cut on number of TRT hits."); - if(m_useEtaDepententMinHitTrtWithOutliers) - ATH_MSG_INFO("Using eta dependent cut on number of TRT hits + outliers."); - } - else{ + } + if (m_useEtaDepententMinHitTrt || m_useEtaDepententMinHitTrtWithOutliers){ + if(m_trtDCTool.empty()) { + ATH_MSG_ERROR(" Eta delendent cut on number of TRT hits requested but TrtDCCutTool not specified. "); + return StatusCode::FAILURE; + } else if(m_trtDCTool.retrieve().isFailure()) { + ATH_MSG_ERROR(" Unable to retrieve tool "<<m_trtDCTool); + return StatusCode::FAILURE; + } + ATH_MSG_INFO("Retrieved tool "<<m_trtDCTool); + if(m_useEtaDepententMinHitTrt){ + ATH_MSG_INFO("Using eta dependent cut on number of TRT hits."); + } + if(m_useEtaDepententMinHitTrtWithOutliers){ + ATH_MSG_INFO("Using eta dependent cut on number of TRT hits + outliers."); + } + }else{ m_trtDCTool.disable(); } - - if (m_magFieldSvc.retrieve().isFailure()) - { - msg(MSG::FATAL) << "Failed to retrieve " << m_magFieldSvc << endmsg; - return StatusCode::FAILURE; - } - ATH_MSG_INFO("Retrieved tool "<<m_magFieldSvc); - - if(m_inDetTestBLayerTool.empty()) - { - msg(MSG::INFO)<<" The BLayerTool not specified, turning off cut. "<<endmsg; - } - else if ( m_inDetTestBLayerTool.retrieve().isFailure() ) - { - msg(MSG::ERROR)<< "Failed to retrieve tool " << m_inDetTestBLayerTool<<endmsg; - return StatusCode::FAILURE; - } + ATH_CHECK(m_magFieldSvc.retrieve()); + if(m_inDetTestBLayerTool.empty()){ + ATH_MSG_INFO(" The BLayerTool not specified, turning off cut. "); + } else { + ATH_CHECK( m_inDetTestBLayerTool.retrieve()); + } ATH_MSG_INFO("Using cuts on the number of Silicon hits"); - - if(m_usePtDependentCuts) - { - //checking whether sizes of cuts and pt interval expressed in vectors match - if( m_ptBenchmarks.size() != m_nSCTValues.size()) - { - msg(MSG::ERROR)<< "Number of cuts DOES NOT match the number of intervals to apply. Please check jobOptions. "<<endmsg; - return StatusCode::FAILURE; - } else if (m_ptBenchmarks.size() == 0) - { - msg(MSG::ERROR)<< "Zero vectors for number of cuts and pt intervals. Please check jobOptions. "<<endmsg; - return StatusCode::FAILURE; - }//end of vector size protection block - }//end of memory protection - + if(m_usePtDependentCuts) { + //checking whether sizes of cuts and pt interval expressed in vectors match + if( m_ptBenchmarks.size() != m_nSCTValues.size()){ + ATH_MSG_ERROR( "Number of cuts DOES NOT match the number of intervals to apply. Please check jobOptions. "); + return StatusCode::FAILURE; + } else if (m_ptBenchmarks.empty()){ + ATH_MSG_ERROR( "Zero vectors for number of cuts and pt intervals. Please check jobOptions. "); + return StatusCode::FAILURE; + }//end of vector size protection block + }//end of memory protection return StatusCode::SUCCESS; } // --------------------------------------------------------------------- StatusCode InDetDetailedTrackSelectorTool::finalize() { - msg(MSG::INFO) << "Finalize successful" << endmsg; + ATH_MSG_DEBUG( "Finalize successful" ); return StatusCode::SUCCESS; } // --------------------------------------------------------------------- - bool InDetDetailedTrackSelectorTool::decision(const Trk::Track& track,const Trk::Vertex* vertex) const - { - const Trk::Perigee* perigeeBeforeExtrapolation= - dynamic_cast<const Trk::Perigee*>(track.perigeeParameters()); - - if (perigeeBeforeExtrapolation && m_usePreselectionCuts) - { - bool preselectionDecision=preselectionBeforeExtrapolation(*perigeeBeforeExtrapolation); - if (!preselectionDecision) { - ATH_MSG_DEBUG("Track rejected because of preselection decision!"); - return false; - } - } - else if (m_usePreselectionCuts) - { - ATH_MSG_INFO( " Preselection was requested but cannot be made since no Perigee in Track is available. This is not an error." ); - } - + bool + InDetDetailedTrackSelectorTool::decision(const Trk::Track& track,const Trk::Vertex* vertex) const{ + const Trk::Perigee* perigeeBeforeExtrapolation=dynamic_cast<const Trk::Perigee*>(track.perigeeParameters()); + if (perigeeBeforeExtrapolation && m_usePreselectionCuts){ + bool preselectionDecision=preselectionBeforeExtrapolation(*perigeeBeforeExtrapolation); + if (!preselectionDecision) { + ATH_MSG_DEBUG("Track rejected because of preselection decision!"); + return false; + } + } else if (m_usePreselectionCuts){ + ATH_MSG_INFO( " Preselection was requested but cannot be made since no Perigee in Track is available. This is not an error." ); + } const Trk::Vertex* myVertex=vertex; - //in case no Vertex is provided by the user, beam position will be used if available - if (myVertex==0) { //ATH_MSG_DEBUG( "No vertex given, using beam spot or 0,0,0" ); if (!m_iBeamCondSvc.empty()) { @@ -267,7 +208,6 @@ namespace InDet myVertex=new Trk::Vertex(Amg::Vector3D(0,0,0)); } } - Trk::PerigeeSurface perigeeSurface(myVertex->position()); const Trk::TrackParameters *firstmeaspar=0; for (unsigned int i=0;i<track.trackParameters()->size();i++){ @@ -276,204 +216,163 @@ namespace InDet break; } } - if (!firstmeaspar) { //assumes perigeeParameters exist... //no track selection if firstmeas + perigee does not exist ! firstmeaspar=track.perigeeParameters(); - if (!firstmeaspar) - { - ATH_MSG_WARNING( " First measurment on track is missing. Using perigee Parameters, but they are missing: 0 pointer! Track selection failed " ); - //clean up vertex - if (myVertex!=vertex) { - delete myVertex; - myVertex=0; - } - return false; - } + if (!firstmeaspar){ + ATH_MSG_WARNING( " First measurment on track is missing. Using perigee Parameters, but they are missing: 0 pointer! Track selection failed " ); + //clean up vertex + if (myVertex!=vertex) { + delete myVertex; + myVertex=0; + } + return false; + } } - const Trk::TrackParameters* extrapolatedParameters= m_extrapolator->extrapolate(*firstmeaspar,perigeeSurface,Trk::anyDirection,true,track.info().particleHypothesis() ); const Trk::Perigee* extrapolatedPerigee = extrapolatedParameters ? dynamic_cast<const Trk::Perigee*>(extrapolatedParameters) : 0; - if (!extrapolatedPerigee || !extrapolatedPerigee->covariance() ) { ATH_MSG_WARNING( "Track Selector failed to extrapolate track to the vertex: " << myVertex->position() ); - if (extrapolatedParameters!=0) { + if (extrapolatedParameters) { ATH_MSG_WARNING( "The return object of the extrapolator was not a perigee even if a perigeeSurface was used!" ); delete extrapolatedParameters; + extrapolatedParameters=nullptr; } } //decision based on the track parameters const Trk::RecVertex* recVertex = dynamic_cast<const Trk::RecVertex*>(myVertex); bool dec = decision(extrapolatedPerigee, recVertex ? &recVertex->covariancePosition() : 0 ); - if (myVertex!=vertex) { delete myVertex; myVertex=0; } - bool isInTrtAcceptance=true; - - if (!extrapolatedPerigee || fabs(extrapolatedPerigee->momentum().eta())>m_TrtMaxEtaAcceptance) { + if (!extrapolatedPerigee || std::fabs(extrapolatedPerigee->momentum().eta())>m_TrtMaxEtaAcceptance) { isInTrtAcceptance=false; } - if (extrapolatedPerigee!=track.perigeeParameters()) { delete extrapolatedPerigee; extrapolatedPerigee=0; } - if(!dec) { ATH_MSG_DEBUG("Track rejected because of perigee parameters!"); return false; } - if (m_useTrackQualityInfo) { - const Trk::FitQuality* TrkQuality=track.fitQuality(); - if (TrkQuality==0) { ATH_MSG_WARNING( "Requested cut on track quality was not possible. Track has no FitQuality object attached. Selection failed." ); return false; } - if (!decision(TrkQuality)) { return false; } } - if (m_useTrackSummaryInfo) { //number of hits, silicon hits, b-layer - const Trk::TrackSummary* summary = 0; - // first ask track for summary summary = track.trackSummary(); - if (m_trackSumToolAvailable && summary == 0) { // ugly but one needs to cast the const away because the method needs to update the track (the tool is a friend of track) Trk::Track& nonConstTrack = const_cast<Trk::Track&>(track); m_trackSumTool->updateTrack(nonConstTrack); summary = nonConstTrack.trackSummary(); } - if (!m_trackSumToolAvailable) { ATH_MSG_WARNING( " No Track Summary Tool available. This should be the case only when running on AOD" ); } - if (0==summary ) { ATH_MSG_WARNING( "Track preselection: cannot create a track summary (but useTrackSummary is true). Selection failed." ); return false; } - // get the minimum nimber of TRT hits based on eta of the track if(m_useEtaDepententMinHitTrt) { m_nHitTrt = m_trtDCTool->minNumberDCs( (*track.trackParameters())[0] ); - if(m_addToMinHitTrt!=0) + if(m_addToMinHitTrt!=0){ m_nHitTrt += m_addToMinHitTrt; - else + }else{ m_nHitTrt = (int)((double)m_nHitTrt*m_scaleMinHitTrt); + } } - // get the minimum nimber of TRT hits + outliers based on eta of the track if(m_useEtaDepententMinHitTrtWithOutliers) { m_nHitTrtPlusOutliers = m_trtDCTool->minNumberDCs( (*track.trackParameters())[0] ); - if(m_addToMinHitTrtWithOutliers!=0) + if(m_addToMinHitTrtWithOutliers!=0){ m_nHitTrtPlusOutliers += m_addToMinHitTrtWithOutliers; - else + }else{ m_nHitTrtPlusOutliers = (int)((double)m_nHitTrtPlusOutliers*m_scaleMinHitTrtWithOutliers); + } } - if (!decision(summary,m_useSharedHitInfo,isInTrtAcceptance, perigeeBeforeExtrapolation)) { summary=0; return false; } summary=0; } - - //all ok return true; } // --------------------------------------------------------------------- - bool InDetDetailedTrackSelectorTool::decision(const Trk::TrackParticleBase& track,const Trk::Vertex* vertex) const - { - + bool + InDetDetailedTrackSelectorTool::decision(const Trk::TrackParticleBase& track,const Trk::Vertex* vertex) const{ const Trk::TrackParameters* definintParameters=&(track.definingParameters()); - - const Trk::Perigee* perigeeBeforeExtrapolation= - dynamic_cast<const Trk::Perigee*>(definintParameters); - + const Trk::Perigee* perigeeBeforeExtrapolation=dynamic_cast<const Trk::Perigee*>(definintParameters); if (perigeeBeforeExtrapolation && m_usePreselectionCuts) { bool preselectionDecision=preselectionBeforeExtrapolation(*perigeeBeforeExtrapolation); if (!preselectionDecision) { ATH_MSG_DEBUG("Track rejected because of preselection decision!"); return false; } - } - else if (m_usePreselectionCuts) { + } else if (m_usePreselectionCuts) { ATH_MSG_WARNING( " Preselection was requested but cannot be made since the Perigee is not the defining Parameter of the TrackParticle. This is not an error." ); } - - bool isInTrtAcceptance=true; - if (!perigeeBeforeExtrapolation || fabs(perigeeBeforeExtrapolation->momentum().eta())>m_TrtMaxEtaAcceptance) { + if (!perigeeBeforeExtrapolation || std::fabs(perigeeBeforeExtrapolation->momentum().eta())>m_TrtMaxEtaAcceptance) { isInTrtAcceptance=false; } - - if (m_useTrackQualityInfo) { - const Trk::FitQuality* TrkQuality=track.fitQuality(); - if (TrkQuality==0) { ATH_MSG_WARNING( "Requested cut on track quality was not possible. TrackParticleBase has no FitQuality object attached. Selection failed." ); return false; } - if (!decision(TrkQuality)) { return false; } - } - if (m_useTrackSummaryInfo) { //number of hits, silicon hits, b-layer const Trk::TrackSummary* summary = track.trackSummary(); - if (0==summary ) { ATH_MSG_WARNING( "Track preselection: cannot create a track summary (but useTrackSummary is true). Selection failed." ); return false; } - if(m_useEtaDepententMinHitTrt) { m_nHitTrt = m_trtDCTool->minNumberDCs( (track.trackParameters())[0] ); - if(m_addToMinHitTrt!=0) + if(m_addToMinHitTrt!=0){ m_nHitTrt += m_addToMinHitTrt; - else + }else{ m_nHitTrt = (int)((double)m_nHitTrt*m_scaleMinHitTrt); + } } - if(m_useEtaDepententMinHitTrtWithOutliers) { m_nHitTrtPlusOutliers = m_trtDCTool->minNumberDCs( (track.trackParameters())[0] ); - if(m_addToMinHitTrtWithOutliers!=0) + if(m_addToMinHitTrtWithOutliers!=0){ m_nHitTrtPlusOutliers += m_addToMinHitTrtWithOutliers; - else + }else{ m_nHitTrtPlusOutliers = (int)((double)m_nHitTrtPlusOutliers*m_scaleMinHitTrtWithOutliers); + } } - - if (!decision(summary, m_useSharedHitInfo, isInTrtAcceptance, perigeeBeforeExtrapolation)) { - return false; + if ((!perigeeBeforeExtrapolation) or (!decision(summary, m_useSharedHitInfo, isInTrtAcceptance, perigeeBeforeExtrapolation))) { + return false; } } - const Trk::Perigee* extrapolatedPerigee=dynamic_cast<const Trk::Perigee*>(definintParameters); - const Trk::Vertex* myVertex=vertex; - if (vertex==0) { - //ATH_MSG_DEBUG( "No vertex given, using beam spot or 0,0,0" ); if (!m_iBeamCondSvc.empty()) { myVertex=new Trk::RecVertex(m_iBeamCondSvc->beamVtx()); } else { @@ -481,27 +380,23 @@ namespace InDet myVertex=new Trk::Vertex(Amg::Vector3D(0,0,0)); } } - Trk::PerigeeSurface perigeeSurface(myVertex->position()); - const Trk::TrackParameters *firstmeaspar=0; - for (unsigned int i=0;i<track.trackParameters().size();i++) { if ((track.trackParameters())[i]->covariance() && - !dynamic_cast<const Trk::Perigee*>((track.trackParameters())[i])) { + !dynamic_cast<const Trk::Perigee*>((track.trackParameters())[i])) { firstmeaspar=(track.trackParameters())[i]; break; } } - if (!firstmeaspar) { if (!extrapolatedPerigee || !extrapolatedPerigee->covariance() ) { - ATH_MSG_DEBUG( " Track Paraemters at first measurement not found. Perigee not found. Cannot do TrackSelection..." ); - if (myVertex!=vertex) { - delete myVertex; - myVertex=0; - } - return false; + ATH_MSG_DEBUG( " Track Paraemters at first measurement not found. Perigee not found. Cannot do TrackSelection..." ); + if (myVertex!=vertex) { + delete myVertex; + myVertex=0; + } + return false; } //using perigee instead of firstmeasurement, since first measurement was not found... firstmeaspar=&(track.definingParameters()); @@ -510,26 +405,20 @@ namespace InDet ATH_MSG_VERBOSE ("Input to extrapolation: " << *firstmeaspar); ATH_MSG_VERBOSE ("Extrapolating to position: " << myVertex->position()[0] << " , " << myVertex->position()[1] << " , " << myVertex->position()[2]); - const Trk::TrackParameters* extrapolatedParameters= firstmeaspar ? m_extrapolator->extrapolate(*firstmeaspar,perigeeSurface,Trk::anyDirection,true,Trk::pion ) : 0; - extrapolatedPerigee = extrapolatedParameters ? dynamic_cast<const Trk::Perigee*>(extrapolatedParameters) : 0; - - if (extrapolatedPerigee==0 || !extrapolatedPerigee->covariance()) { ATH_MSG_WARNING( "Track Selector failed to extrapolate track to the vertex: " << myVertex->position() ); - if (extrapolatedParameters!=0) { - ATH_MSG_WARNING( "The return object of the extrapolator was not a perigee even if a perigeeSurface was used!" ); - delete extrapolatedParameters; + if (extrapolatedParameters) { + ATH_MSG_WARNING( "The return object of the extrapolator was not a perigee even if a perigeeSurface was used!" ); + delete extrapolatedParameters; + extrapolatedParameters = nullptr; } } - - ATH_MSG_VERBOSE ("Result: " << *extrapolatedParameters); - + if (extrapolatedParameters) ATH_MSG_VERBOSE ("Result: " << *extrapolatedParameters); const Trk::RecVertex* recVertex = dynamic_cast<const Trk::RecVertex*>(myVertex); bool dec = decision(extrapolatedPerigee, recVertex ? &recVertex->covariancePosition() : 0 ); - if (myVertex!=vertex) { delete myVertex; myVertex=0; @@ -538,18 +427,17 @@ namespace InDet delete extrapolatedPerigee; extrapolatedPerigee=0; } - if(!dec) { ATH_MSG_DEBUG("Track rejected because of perigee parameters!"); return false; } - return true; } // --------------------------------------------------------------------- - bool InDetDetailedTrackSelectorTool::decision(const xAOD::TrackParticle& tp,const xAOD::Vertex* vertex) const + bool + InDetDetailedTrackSelectorTool::decision(const xAOD::TrackParticle& tp,const xAOD::Vertex* vertex) const { const Trk::Perigee& perigee=tp.perigeeParameters(); @@ -568,21 +456,20 @@ namespace InDet if(m_useEtaDepententMinHitTrt) { m_nHitTrt = m_trtDCTool->minNumberDCs( &perigee ); - if(m_addToMinHitTrt!=0) + if(m_addToMinHitTrt!=0){ m_nHitTrt += m_addToMinHitTrt; - else + }else{ m_nHitTrt = (int)((double)m_nHitTrt*m_scaleMinHitTrt); + } } - if(m_useEtaDepententMinHitTrtWithOutliers) { m_nHitTrtPlusOutliers = m_trtDCTool->minNumberDCs( &perigee ); - if(m_addToMinHitTrtWithOutliers!=0) + if(m_addToMinHitTrtWithOutliers!=0){ m_nHitTrtPlusOutliers += m_addToMinHitTrtWithOutliers; - else + }else{ m_nHitTrtPlusOutliers = (int)((double)m_nHitTrtPlusOutliers*m_scaleMinHitTrtWithOutliers); + } } - - int nb = getCount(tp,xAOD::numberOfInnermostPixelLayerHits ); int np = getCount(tp,xAOD::numberOfPixelHits ); int npd = getCount(tp,xAOD::numberOfPixelDeadSensors ); @@ -590,25 +477,22 @@ namespace InDet int nhp = getCount(tp,xAOD::numberOfPixelHoles ); int nhs = getCount(tp,xAOD::numberOfSCTHoles ); int ndhs = getCount(tp,xAOD::numberOfSCTDoubleHoles); - //**----------------------------------------------------------------------- if(m_usePtDependentCuts) { - - double pt = tp.pt(); - - unsigned int it = 0; - for(; it< m_ptBenchmarks.size()-1; ++it ) { - if(pt>m_ptBenchmarks[it] && pt <=m_ptBenchmarks[it+1] && ns < m_nSCTValues[it]) { - ATH_MSG_DEBUG("Track rejected because of Pt-Dependent SCT Hit cut (CAREFUL! Excludes dead modules)") ; - return false; - } - }//end of pt intervals loop + double pt = tp.pt(); + unsigned int it = 0; + for(; it< m_ptBenchmarks.size()-1; ++it ) { + if(pt>m_ptBenchmarks[it] && pt <=m_ptBenchmarks[it+1] && ns < m_nSCTValues[it]) { + ATH_MSG_DEBUG("Track rejected because of Pt-Dependent SCT Hit cut (CAREFUL! Excludes dead modules)") ; + return false; + } + }//end of pt intervals loop - //now cutting all the rest by the last value in the vector - if(pt>m_ptBenchmarks[it+1] && ns < m_nSCTValues[it+1]) { - ATH_MSG_DEBUG("Track rejected because of Pt-Dependent SCT Hit cut (CAREFUL! Excludes dead modules)") ; - return false; - } + //now cutting all the rest by the last value in the vector + if(pt>m_ptBenchmarks[it+1] && ns < m_nSCTValues[it+1]) { + ATH_MSG_DEBUG("Track rejected because of Pt-Dependent SCT Hit cut (CAREFUL! Excludes dead modules)") ; + return false; + } } //*-------------------------------------------------------------------------------- @@ -616,40 +500,40 @@ namespace InDet //normal cuts in all their variety if(nb == 0 && nb < m_nHitBLayer) { - ATH_MSG_DEBUG("Track rejected because of nHitBLayer "<<nb<<" < "<<m_nHitBLayer); - if(m_inDetTestBLayerTool.empty()) { - ATH_MSG_DEBUG("and no blayer tool configured, so will not try to recover track"); - return false; - } else if (m_inDetTestBLayerTool->expectHitInBLayer(&perigee)) { - ATH_MSG_DEBUG("and track rejected because of Number of b-layer hits ACCOUNTING for those expected") ; - return false; - }else ATH_MSG_DEBUG("recovered track as no b-layer expected") ; + ATH_MSG_DEBUG("Track rejected because of nHitBLayer "<<nb<<" < "<<m_nHitBLayer); + if(m_inDetTestBLayerTool.empty()) { + ATH_MSG_DEBUG("and no blayer tool configured, so will not try to recover track"); + return false; + } else if (m_inDetTestBLayerTool->expectHitInBLayer(&perigee)) { + ATH_MSG_DEBUG("and track rejected because of Number of b-layer hits ACCOUNTING for those expected") ; + return false; + }else ATH_MSG_DEBUG("recovered track as no b-layer expected") ; }//end of checking the b-layer if(np+npd < m_nHitPix) { - ATH_MSG_DEBUG("Track rejected because of nHitPix "<<np+npd<<" < "<<m_nHitPix); - return false; + ATH_MSG_DEBUG("Track rejected because of nHitPix "<<np+npd<<" < "<<m_nHitPix); + return false; } if(np < m_nHitPixPhysical) { - ATH_MSG_DEBUG("Track rejected because of nHitPixPhysical "<<np<<" < "<<m_nHitPixPhysical); - return false; + ATH_MSG_DEBUG("Track rejected because of nHitPixPhysical "<<np<<" < "<<m_nHitPixPhysical); + return false; } int nsd = getCount(tp,xAOD::numberOfSCTDeadSensors); if(ns+nsd < m_nHitSct) { - ATH_MSG_DEBUG("Track rejected because of nHitSct "<<ns+nsd<<" < "<<m_nHitSct); - return false; + ATH_MSG_DEBUG("Track rejected because of nHitSct "<<ns+nsd<<" < "<<m_nHitSct); + return false; } if(np+ns+npd+nsd < m_nHitSi) { - ATH_MSG_DEBUG("Track rejected because of nHitSi "<<np+npd+ns+nsd<<" < "<<m_nHitSi); - return false; + ATH_MSG_DEBUG("Track rejected because of nHitSi "<<np+npd+ns+nsd<<" < "<<m_nHitSi); + return false; } if(np+ns < m_nHitSiPhysical) { - ATH_MSG_DEBUG("Track rejected because of nHitSiPhysical "<<np+ns<<" < "<<m_nHitSiPhysical); - return false; + ATH_MSG_DEBUG("Track rejected because of nHitSiPhysical "<<np+ns<<" < "<<m_nHitSiPhysical); + return false; } if (nb+np+npd< m_nHitBLayerPlusPix){ @@ -669,69 +553,67 @@ namespace InDet } if(nhp > m_nHolesPix){ - ATH_MSG_DEBUG("Track rejected because of nHolesPix "<<nhp<<" > "<<m_nHolesPix); - return false; + ATH_MSG_DEBUG("Track rejected because of nHolesPix "<<nhp<<" > "<<m_nHolesPix); + return false; } if (nhs > m_nHolesSct){ - ATH_MSG_DEBUG("Track rejected because of nHolesSct "<<nhs<<" > "<<m_nHolesSct); - return false; + ATH_MSG_DEBUG("Track rejected because of nHolesSct "<<nhs<<" > "<<m_nHolesSct); + return false; } - if (fabs(tp.eta())>m_TrtMaxEtaAcceptance) { - int nh = getCount(tp,xAOD::numberOfTRTHits); - if(nh < m_nHitTrt) { - ATH_MSG_DEBUG("Track rejected because of nHitTrt "<<nh<<" < "<<m_nHitTrt); - return false; - } - - int nhh = getCount(tp, xAOD::numberOfTRTHits ) + getCount(tp, xAOD::numberOfTRTOutliers ); - if (nhh<m_nHitTrtPlusOutliers) { - ATH_MSG_DEBUG("Track rejected because of nHitTrtPlusOutliers "<<nhh<<" < "<<m_nHitTrtPlusOutliers); - return false; - } + if (std::fabs(tp.eta())>m_TrtMaxEtaAcceptance) { + int nh = getCount(tp,xAOD::numberOfTRTHits); + if(nh < m_nHitTrt) { + ATH_MSG_DEBUG("Track rejected because of nHitTrt "<<nh<<" < "<<m_nHitTrt); + return false; + } + + int nhh = getCount(tp, xAOD::numberOfTRTHits ) + getCount(tp, xAOD::numberOfTRTOutliers ); + if (nhh<m_nHitTrtPlusOutliers) { + ATH_MSG_DEBUG("Track rejected because of nHitTrtPlusOutliers "<<nhh<<" < "<<m_nHitTrtPlusOutliers); + return false; + } - int nhthits= getCount(tp,xAOD::numberOfTRTHighThresholdHits); - if (nhthits<m_nHitTrtHighE) { - ATH_MSG_DEBUG("Track rejected because of nHitTrtHighE "<<nhthits<<" < "<<m_nHitTrtHighE); - return false; - } + int nhthits= getCount(tp,xAOD::numberOfTRTHighThresholdHits); + if (nhthits<m_nHitTrtHighE) { + ATH_MSG_DEBUG("Track rejected because of nHitTrtHighE "<<nhthits<<" < "<<m_nHitTrtHighE); + return false; + } - int nhthitsWithOutliers= getCount(tp,xAOD::numberOfTRTHighThresholdHits) + getCount(tp,xAOD::numberOfTRTHighThresholdOutliers); - if (nhthitsWithOutliers<m_nHitTrtPlusOutliersHighE) { - ATH_MSG_DEBUG("Track rejected because of nHitTrtPlusOutliersHighE "<<nhthitsWithOutliers<<" < "<<m_nHitTrtPlusOutliersHighE); - return false; - } + int nhthitsWithOutliers= getCount(tp,xAOD::numberOfTRTHighThresholdHits) + getCount(tp,xAOD::numberOfTRTHighThresholdOutliers); + if (nhthitsWithOutliers<m_nHitTrtPlusOutliersHighE) { + ATH_MSG_DEBUG("Track rejected because of nHitTrtPlusOutliersHighE "<<nhthitsWithOutliers<<" < "<<m_nHitTrtPlusOutliersHighE); + return false; + } - if ( getCount(tp, xAOD::numberOfTRTHits )>0) { - double nhe = getCount(tp,xAOD::numberOfTRTHighThresholdHits); - nhe /= getCount(tp, xAOD::numberOfTRTHits); - if(nhe > m_nHitTrtHighEFraction ) { - ATH_MSG_DEBUG("Track rejected because of nHitTrtHighEFraction "<<nhe<<" < "<<m_nHitTrtHighEFraction); - return false; - } - } + if ( getCount(tp, xAOD::numberOfTRTHits )>0) { + double nhe = getCount(tp,xAOD::numberOfTRTHighThresholdHits); + nhe /= getCount(tp, xAOD::numberOfTRTHits); + if(nhe > m_nHitTrtHighEFraction ) { + ATH_MSG_DEBUG("Track rejected because of nHitTrtHighEFraction "<<nhe<<" < "<<m_nHitTrtHighEFraction); + return false; + } + } - if ( getCount(tp, xAOD::numberOfTRTHits ) + getCount(tp, xAOD::numberOfTRTOutliers ) > 0 ) { - double nheh = (double)(getCount(tp,xAOD::numberOfTRTHighThresholdHits) + getCount(tp,xAOD::numberOfTRTHighThresholdOutliers))/ - (double)(getCount(tp, xAOD::numberOfTRTHits) + getCount(tp, xAOD::numberOfTRTOutliers ) ); - if(nheh<0.) nheh=0.; - if (nheh>1.) nheh=1.; - if(nheh > m_nHitTrtHighEFractionWithOutliers ) { - ATH_MSG_DEBUG("Track rejected because of nHitTrtHighEFractionWithOutliers "<<nheh<<" < "<<m_nHitTrtHighEFractionWithOutliers); - return false; - } - } + if ( getCount(tp, xAOD::numberOfTRTHits ) + getCount(tp, xAOD::numberOfTRTOutliers ) > 0 ) { + double nheh = (double)(getCount(tp,xAOD::numberOfTRTHighThresholdHits) + getCount(tp,xAOD::numberOfTRTHighThresholdOutliers))/ + (double)(getCount(tp, xAOD::numberOfTRTHits) + getCount(tp, xAOD::numberOfTRTOutliers ) ); + if(nheh<0.) nheh=0.; + if (nheh>1.) nheh=1.; + if(nheh > m_nHitTrtHighEFractionWithOutliers ) { + ATH_MSG_DEBUG("Track rejected because of nHitTrtHighEFractionWithOutliers "<<nheh<<" < "<<m_nHitTrtHighEFractionWithOutliers); + return false; + } + } } - if (m_useSharedHitInfo) { - - int nbs = getCount(tp,xAOD::numberOfInnermostPixelLayerSharedHits); - if (nbs>1) nbs=1; - if(nbs>m_nSharedBLayer) { - ATH_MSG_DEBUG("Track rejected because of nSharedBLayer "<<nbs<<" < "<<m_nSharedBLayer); - return false; - } + int nbs = getCount(tp,xAOD::numberOfInnermostPixelLayerSharedHits); + if (nbs>1) nbs=1; + if(nbs>m_nSharedBLayer) { + ATH_MSG_DEBUG("Track rejected because of nSharedBLayer "<<nbs<<" < "<<m_nSharedBLayer); + return false; + } int nps = getCount(tp,xAOD::numberOfPixelSharedHits); if(nps>m_nSharedPix) { @@ -759,8 +641,9 @@ namespace InDet if (extrapolatedPerigee==0) { ATH_MSG_WARNING( "Extrapolation to the vertex failed: " << perigeeSurface << std::endl << perigee ); if (extrapolatedParameters!=0) { - ATH_MSG_WARNING( "The return object of the extrapolator was not a perigee even if a perigeeSurface was used!" ); - delete extrapolatedParameters; + ATH_MSG_WARNING( "The return object of the extrapolator was not a perigee even if a perigeeSurface was used!" ); + delete extrapolatedParameters; + extrapolatedParameters=nullptr; } return false; } @@ -800,35 +683,35 @@ namespace InDet ATH_MSG_DEBUG("Track rejected because of qOverP == 0."); return false; } - double p = fabs(1./perigeeParms[Trk::qOverP]); + double p = std::fabs(1./perigeeParms[Trk::qOverP]); if (p<m_pMin) { ATH_MSG_DEBUG("Track rejected because of p " << p << " < " << m_pMin); return false; } - double pt = p*sin(perigeeParms[Trk::theta]); + double pt = p*std::sin(perigeeParms[Trk::theta]); if (pt<m_pTMin) { ATH_MSG_DEBUG("Track rejected because of pt " << pt << " < " << m_pTMin); return false; } } - if (fabs(perigeeParms[Trk::d0]) > m_IPd0Max) { - ATH_MSG_DEBUG("Track rejected because of fabs(d0) " << fabs(perigeeParms[Trk::d0]) << " > " << m_IPd0Max); + if (std::fabs(perigeeParms[Trk::d0]) > m_IPd0Max) { + ATH_MSG_DEBUG("Track rejected because of fabs(d0) " << std::fabs(perigeeParms[Trk::d0]) << " > " << m_IPd0Max); return false; } - if (fabs(perigeeParms[Trk::z0]*sin(perigeeParms[Trk::theta])) > m_IPz0Max) { - ATH_MSG_DEBUG("Track rejected because of fabs(z0*sin(theta)) " << fabs(perigeeParms[Trk::z0]*sin(perigeeParms[Trk::theta])) << " > " << m_IPz0Max); + if (std::fabs(perigeeParms[Trk::z0]*std::sin(perigeeParms[Trk::theta])) > m_IPz0Max) { + ATH_MSG_DEBUG("Track rejected because of fabs(z0*sin(theta)) " << std::fabs(perigeeParms[Trk::z0]*std::sin(perigeeParms[Trk::theta])) << " > " << m_IPz0Max); return false; } - if (fabs(perigeeParms[Trk::z0]) > m_z0Max) { - ATH_MSG_DEBUG("Track rejected because of fabs(z0) " << fabs(perigeeParms[Trk::z0]) << " > " << m_z0Max); + if (std::fabs(perigeeParms[Trk::z0]) > m_z0Max) { + ATH_MSG_DEBUG("Track rejected because of fabs(z0) " << std::fabs(perigeeParms[Trk::z0]) << " > " << m_z0Max); return false; } - if (sqrt( (*track->covariance())(Trk::z0,Trk::z0) )*sin(perigeeParms[Trk::theta])>m_sigIPz0Max) { - ATH_MSG_DEBUG("Track rejected because of err(z0)*sin(theta) " << sqrt( (*track->covariance())(Trk::z0,Trk::z0) )*sin(perigeeParms[Trk::theta]) << " > " << m_sigIPz0Max); + if (sqrt( (*track->covariance())(Trk::z0,Trk::z0) )*std::sin(perigeeParms[Trk::theta])>m_sigIPz0Max) { + ATH_MSG_DEBUG("Track rejected because of err(z0)*sin(theta) " << sqrt( (*track->covariance())(Trk::z0,Trk::z0) )*std::sin(perigeeParms[Trk::theta]) << " > " << m_sigIPz0Max); return false; } @@ -839,8 +722,8 @@ namespace InDet if (m_d0significanceMax>0 || m_z0significanceMax>0) { - double sinTheta = sin(perigeeParms[Trk::theta]); - double cosTheta = cos(perigeeParms[Trk::theta]); + double sinTheta = std::sin(perigeeParms[Trk::theta]); + double cosTheta = std::cos(perigeeParms[Trk::theta]); double d0wrtPriVtx = perigeeParms[Trk::d0]; double deltaZ = perigeeParms[Trk::z0]; double z0wrtPriVtx = deltaZ*sinTheta; @@ -849,15 +732,15 @@ namespace InDet double testtrackSigTh = sqrt( (*track->covariance())(Trk::theta,Trk::theta) ); // error on IP: double trackPhi = perigeeParms[Trk::phi]; - double dIPdx = sin(trackPhi); - double dIPdy = -cos(trackPhi); + double dIPdx = std::sin(trackPhi); + double dIPdy = -std::cos(trackPhi); double DD0 = testtrackSigD0*testtrackSigD0; double newD0Err=0; if (covariancePosition) { - double DXX = dIPdx*dIPdx* (*covariancePosition)(0,0); - double DYY = dIPdy*dIPdy* (*covariancePosition)(1,1); - double DXY = 2.*dIPdx*dIPdy* (*covariancePosition)(0,1); - newD0Err = DD0 + DXX + DYY + DXY; + double DXX = dIPdx*dIPdx* (*covariancePosition)(0,0); + double DYY = dIPdy*dIPdy* (*covariancePosition)(1,1); + double DXY = 2.*dIPdx*dIPdy* (*covariancePosition)(0,1); + newD0Err = DD0 + DXX + DYY + DXY; } else { newD0Err = DD0; } @@ -869,8 +752,8 @@ namespace InDet } if (m_d0significanceMax>0) { - if (fabs(d0wrtPriVtx/d0ErrwrtPriVtx)>m_d0significanceMax) { - ATH_MSG_DEBUG("Track rejected because of fabs(d0wrtPriVtx/d0ErrwrtPriVtx) " << fabs(d0wrtPriVtx/d0ErrwrtPriVtx) << " > " << m_d0significanceMax); + if (std::fabs(d0wrtPriVtx/d0ErrwrtPriVtx)>m_d0significanceMax) { + ATH_MSG_DEBUG("Track rejected because of fabs(d0wrtPriVtx/d0ErrwrtPriVtx) " << std::fabs(d0wrtPriVtx/d0ErrwrtPriVtx) << " > " << m_d0significanceMax); return false; } } @@ -898,16 +781,16 @@ namespace InDet ATH_MSG_WARNING( " error on z0 is negative: numeric error... (not expected. please report!)" ); } - if (fabs(z0wrtPriVtx/z0ErrwrtPriVtx)>m_z0significanceMax) { - ATH_MSG_DEBUG("Track rejected because of fabs(z0wrtPriVtx/z0ErrwrtPriVtx) " << fabs(z0wrtPriVtx/z0ErrwrtPriVtx) << " > " << m_z0significanceMax); + if (std::fabs(z0wrtPriVtx/z0ErrwrtPriVtx)>m_z0significanceMax) { + ATH_MSG_DEBUG("Track rejected because of fabs(z0wrtPriVtx/z0ErrwrtPriVtx) " << std::fabs(z0wrtPriVtx/z0ErrwrtPriVtx) << " > " << m_z0significanceMax); return false; } } } - if (fabs(track->momentum().eta())>m_etaMax) { - ATH_MSG_DEBUG("Track rejected because of fabs(eta) " << fabs(track->momentum().eta()) << " > " << m_etaMax); + if (std::fabs(track->momentum().eta())>m_etaMax) { + ATH_MSG_DEBUG("Track rejected because of fabs(eta) " << std::fabs(track->momentum().eta()) << " > " << m_etaMax); return false; } @@ -989,8 +872,8 @@ namespace InDet return false; } const AmgVector(5)& perigeeParms = track->parameters(); - double p = fabs(1./perigeeParms[Trk::qOverP]); - double pt = p*sin(perigeeParms[Trk::theta]); + double p = std::fabs(1./perigeeParms[Trk::qOverP]); + double pt = p*std::sin(perigeeParms[Trk::theta]); unsigned int it = 0; for(; it< m_ptBenchmarks.size()-1; ++it ) { @@ -1183,20 +1066,20 @@ namespace InDet ATH_MSG_DEBUG("Track rejected because of perigee qOverP == 0."); return false; } - double p = fabs(1./perigeeParms[Trk::qOverP]); + double p = std::fabs(1./perigeeParms[Trk::qOverP]); if (p<m_pMin) { ATH_MSG_DEBUG("Track rejected because of p " << p << " < " << m_pMin); return false; } - double pt = p*sin(perigeeParms[Trk::theta]); + double pt = p*std::sin(perigeeParms[Trk::theta]); if (pt<m_pTMin) { ATH_MSG_DEBUG("Track rejected because of pt " << pt << " < " << m_pTMin); return false; } } - if (fabs(perigeeParms[Trk::d0]) > m_d0MaxPreselection) { - ATH_MSG_DEBUG("Track rejected because of fabs(d0) "<<fabs(perigeeParms[Trk::d0])<<" < "<<m_d0MaxPreselection); + if (std::fabs(perigeeParms[Trk::d0]) > m_d0MaxPreselection) { + ATH_MSG_DEBUG("Track rejected because of fabs(d0) "<<std::fabs(perigeeParms[Trk::d0])<<" < "<<m_d0MaxPreselection); return false; } -- GitLab From 79cf5599baf9d1df8b4fcbe1e2225f29a0c566bb Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Mon, 16 Jul 2018 12:40:01 +0000 Subject: [PATCH 475/562] 22.0 coverity SiClusterOnTrackTool Former-commit-id: c43d51631c7ae825e558a2f2c4c0a0f3784a3e31 --- .../PixelClusterOnTrackTool.h | 418 +++++++++--------- .../src/PixelClusterOnTrackTool.cxx | 98 ++-- 2 files changed, 251 insertions(+), 265 deletions(-) diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/PixelClusterOnTrackTool.h b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/PixelClusterOnTrackTool.h index dec8ebccb2cb..64fc07a87f0a 100755 --- a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/PixelClusterOnTrackTool.h +++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/PixelClusterOnTrackTool.h @@ -2,210 +2,214 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -/////////////////////////////////////////////////////////////////// -// Header file for class PixelClusterOnTrackTool -/////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// -// Interface for PixelClusterOnTrack production -/////////////////////////////////////////////////////////////////// -// started 1/05/2004 I.Gavrilenko - see ChangeLog for details -/////////////////////////////////////////////////////////////////// -#ifndef PixelClusterOnTrackTool_H -#define PixelClusterOnTrackTool_H - -#include "GaudiKernel/ToolHandle.h" -#include "AthenaBaseComps/AthAlgTool.h" - - -#include "TrkToolInterfaces/IRIO_OnTrackCreator.h" -#include "TrkToolInterfaces/IRIO_OnTrackErrorScalingTool.h" -#include "InDetRIO_OnTrack/PixelClusterOnTrack.h" - -#include "InDetPrepRawData/PixelGangedClusterAmbiguities.h" -#include "TrkParameters/TrackParameters.h" -//#include "InDetIdentifier/PixelID.h" -#include "GeoPrimitives/GeoPrimitives.h" -#include "TrkAmbiguityProcessor/dRMap.h" - -//#include "PixelConditionsServices/IPixelOfflineCalibSvc.h" -//#include "PixelConditionsTools/IModuleDistortionsTool.h" - -#include "AthenaPoolUtilities/CondAttrListCollection.h" -class PixelID; -class IPixelOfflineCalibSvc; -class IModuleDistortionsTool; - -class StoreGateSvc; -class IIBLParameterSvc; - -namespace InDet { - - /** @brief creates PixelClusterOnTrack objects allowing to - calibrate cluster position and error using a given track hypothesis. - - See doxygen of Trk::RIO_OnTrackCreator for details. - Different strategies to calibrate the cluster error can be chosen - by job Option. Also the handle to the general hit-error scaling - is implemented. - - Special strategies for correction can be invoked by calling the - correct method with an additional argument from the - PixelClusterStrategy enumeration - - */ - - class NnClusterizationFactory; - - enum PixelClusterStrategy { - PIXELCLUSTER_DEFAULT=0, - PIXELCLUSTER_OUTLIER=1, - PIXELCLUSTER_SHARED =2, - PIXELCLUSTER_SPLIT =3 - }; - - - class PixelClusterOnTrackTool: - public AthAlgTool, virtual public Trk::IRIO_OnTrackCreator -{ - /////////////////////////////////////////////////////////////////// - // Public methods: - /////////////////////////////////////////////////////////////////// - -public: - - //! AlgTool constructor - PixelClusterOnTrackTool(const std::string&,const std::string&, - const IInterface*); - virtual ~PixelClusterOnTrackTool (); - //! AlgTool initialisation - virtual StatusCode initialize() override; - //! AlgTool termination - virtual StatusCode finalize () override; - - - - void correctBow(const Identifier&, Amg::Vector2D& locpos, const double tanphi, const double taneta) const; - - double splineIBLPullX(float x, int layer) const; - - /** @brief produces a PixelClusterOnTrack (object factory!). - - Depending on job options it changes the pixel cluster position - and error according to the parameters (in particular, the angle) - of the intersecting track. - */ - virtual const InDet::PixelClusterOnTrack* correct(const Trk::PrepRawData&, - const Trk::TrackParameters&) const override; - - virtual const InDet::PixelClusterOnTrack* correctDefault(const Trk::PrepRawData&, - const Trk::TrackParameters&) const; - - virtual const InDet::PixelClusterOnTrack* correctNN(const Trk::PrepRawData&, const Trk::TrackParameters&) const; - - virtual bool getErrorsDefaultAmbi( const InDet::PixelCluster*, const Trk::TrackParameters&, - Amg::Vector2D&, Amg::MatrixX&) const; - - virtual bool getErrorsTIDE_Ambi( const InDet::PixelCluster*, const Trk::TrackParameters&, - Amg::Vector2D&, Amg::MatrixX&) const; - - virtual const InDet::PixelClusterOnTrack* correct - (const Trk::PrepRawData&, const Trk::TrackParameters&, - const InDet::PixelClusterStrategy) const; - - - /////////////////////////////////////////////////////////////////// - // Private methods: - /////////////////////////////////////////////////////////////////// - - private: - - /** @brief parametrizes the pixel cluster position error as a function of - the track angle alpha and the cluster width (number of rows) deltax */ - // double getBarrelPhiError(double& alpha, int& deltax) const; - // double getBarrelEtaError(double eta, int deltax, int deltay) const; - // double getEndcapPhiError(int etasize, int phisize) const; - // double getEndcapEtaError(int etasize, int phisize) const; - - void FillFromDataBase() const; - - /////////////////////////////////////////////////////////////////// - // Private data: - /////////////////////////////////////////////////////////////////// - - ToolHandle<IModuleDistortionsTool> m_pixDistoTool ; - ToolHandle<Trk::IRIO_OnTrackErrorScalingTool> m_errorScalingTool; - ServiceHandle<IPixelOfflineCalibSvc> m_calibSvc ; - StoreGateSvc* m_detStore ; - /* ME: Test histos have nothing to do with production code, use a flag - IHistogram1D* m_h_Resx; - IHistogram1D* m_h_Resy; - IHistogram1D* m_h_Locx; - IHistogram1D* m_h_Locy; - IHistogram1D* m_h_PhiTrack; - IHistogram1D* m_h_ThetaTrack; - IHistogram1D* m_h_Rad; - IHistogram1D* m_h_Slope; - */ - - //! toolhandle for central error scaling - //! flag storing if errors need scaling or should be kept nominal - bool m_scalePixelCov ; - bool m_disableDistortions; - bool m_rel13like ; - int m_positionStrategy ; - mutable int m_errorStrategy ; - - - /** @brief Flag controlling how module distortions are taken into account: - - case 0 -----> No distorsions implemented; - - case 1 -----> Set curvature (in 1/meter) and twist (in radiant) equal for all modules; - - case 2 -----> Read curvatures and twists from textfile containing Survey data; - - case 3 -----> Set curvature and twist from Gaussian random generator with mean and RMS coming from Survey data; - - case 4 -----> Read curvatures and twists from database (not ready yet); - */ - //! identifier-helper - const PixelID* m_pixelid; - - /** Enable NN based calibration (do only if NN calibration is applied) **/ - mutable bool m_applyNNcorrection; - mutable bool m_applydRcorrection; - bool m_NNIBLcorrection; - bool m_IBLAbsent; - - /** NN clusterizationi factory for NN based positions and errors **/ - ToolHandle<NnClusterizationFactory> m_NnClusterizationFactory; - ServiceHandle<StoreGateSvc> m_storeGate; //!< Event store - ServiceHandle<IIBLParameterSvc> m_IBLParameterSvc; - - - SG::ReadHandleKey<InDet::DRMap> m_dRMap; //!< the actual dR map - std::string m_dRMapName; - - bool m_doNotRecalibrateNN; - bool m_noNNandBroadErrors; - - /** Enable different treatment of cluster errors based on NN information (do only if TIDE ambi is run) **/ - bool m_usingTIDE_Ambi; - SG::ReadHandleKey<InDet::PixelGangedClusterAmbiguities> m_splitClusterHandle; - mutable std::vector< std::vector<float> > m_fX, m_fY, m_fB, m_fC, m_fD; - - //moved from static to member variable - static constexpr int s_nbinphi=9; - static constexpr int s_nbineta=6; - double m_calphi[s_nbinphi]; - double m_caleta[s_nbineta][3]; - double m_calerrphi[s_nbinphi][3]; - double m_calerreta[s_nbineta][3]; - double m_phix[s_nbinphi+1]; - double m_etax[s_nbineta+1]; -}; - -} // end of namespace InDet - -#endif // PixelClusterOnTrackTool_H +/////////////////////////////////////////////////////////////////// +// Header file for class PixelClusterOnTrackTool +/////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////// +// Interface for PixelClusterOnTrack production +/////////////////////////////////////////////////////////////////// +// started 1/05/2004 I.Gavrilenko - see ChangeLog for details +/////////////////////////////////////////////////////////////////// +#ifndef PixelClusterOnTrackTool_H +#define PixelClusterOnTrackTool_H + +#include "GaudiKernel/ToolHandle.h" +#include "AthenaBaseComps/AthAlgTool.h" + + +#include "TrkToolInterfaces/IRIO_OnTrackCreator.h" +/** The following cannot be fwd declared for interesting reason; the return type of + * 'correct' is InDet::PixelClusterOnTrack* here, but in the baseclass is + * Trk::RIO_OnTrack*. This works if the inheritance is known, but fwd declaration results + * in an error: + * invalid covariant return type for 'virtual const InDet::PixelClusterOnTrack* + InDet::PixelClusterOnTrackTool::correct(const Trk::PrepRawData&, + const TrackParameters&) const' + * because the return type has changed and the compiler has no information to cast. + **/ +#include "InDetRIO_OnTrack/PixelClusterOnTrack.h" + +#include "InDetPrepRawData/PixelGangedClusterAmbiguities.h" +#include "TrkParameters/TrackParameters.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "TrkAmbiguityProcessor/dRMap.h" +class PixelID; +class IPixelOfflineCalibSvc; +class IModuleDistortionsTool; +namespace Trk{ + class IRIO_OnTrackErrorScalingTool; +} + +class StoreGateSvc; +class IIBLParameterSvc; + +namespace InDet { + + /** @brief creates PixelClusterOnTrack objects allowing to + calibrate cluster position and error using a given track hypothesis. + + See doxygen of Trk::RIO_OnTrackCreator for details. + Different strategies to calibrate the cluster error can be chosen + by job Option. Also the handle to the general hit-error scaling + is implemented. + + Special strategies for correction can be invoked by calling the + correct method with an additional argument from the + PixelClusterStrategy enumeration + + */ + + class NnClusterizationFactory; + + enum PixelClusterStrategy { + PIXELCLUSTER_DEFAULT=0, + PIXELCLUSTER_OUTLIER=1, + PIXELCLUSTER_SHARED =2, + PIXELCLUSTER_SPLIT =3 + }; + + + class PixelClusterOnTrackTool: + public AthAlgTool, virtual public Trk::IRIO_OnTrackCreator +{ + /////////////////////////////////////////////////////////////////// + // Public methods: + /////////////////////////////////////////////////////////////////// + +public: + + //! AlgTool constructor + PixelClusterOnTrackTool(const std::string&,const std::string&, + const IInterface*); + virtual ~PixelClusterOnTrackTool (); + //! AlgTool initialisation + virtual StatusCode initialize() override; + //! AlgTool termination + virtual StatusCode finalize () override; + + + + void correctBow(const Identifier&, Amg::Vector2D& locpos, const double tanphi, const double taneta) const; + + double splineIBLPullX(float x, int layer) const; + + /** @brief produces a PixelClusterOnTrack (object factory!). + + Depending on job options it changes the pixel cluster position + and error according to the parameters (in particular, the angle) + of the intersecting track. + */ + virtual const InDet::PixelClusterOnTrack* correct(const Trk::PrepRawData&, + const Trk::TrackParameters&) const override; + + virtual const InDet::PixelClusterOnTrack* correctDefault(const Trk::PrepRawData&, + const Trk::TrackParameters&) const; + + virtual const InDet::PixelClusterOnTrack* correctNN(const Trk::PrepRawData&, const Trk::TrackParameters&) const; + + virtual bool getErrorsDefaultAmbi( const InDet::PixelCluster*, const Trk::TrackParameters&, + Amg::Vector2D&, Amg::MatrixX&) const; + + virtual bool getErrorsTIDE_Ambi( const InDet::PixelCluster*, const Trk::TrackParameters&, + Amg::Vector2D&, Amg::MatrixX&) const; + + virtual const InDet::PixelClusterOnTrack* correct + (const Trk::PrepRawData&, const Trk::TrackParameters&, + const InDet::PixelClusterStrategy) const; + + + /////////////////////////////////////////////////////////////////// + // Private methods: + /////////////////////////////////////////////////////////////////// + + private: + + /** @brief parametrizes the pixel cluster position error as a function of + the track angle alpha and the cluster width (number of rows) deltax */ + // double getBarrelPhiError(double& alpha, int& deltax) const; + // double getBarrelEtaError(double eta, int deltax, int deltay) const; + // double getEndcapPhiError(int etasize, int phisize) const; + // double getEndcapEtaError(int etasize, int phisize) const; + + void FillFromDataBase() const; + + /////////////////////////////////////////////////////////////////// + // Private data: + /////////////////////////////////////////////////////////////////// + + ToolHandle<IModuleDistortionsTool> m_pixDistoTool ; + ToolHandle<Trk::IRIO_OnTrackErrorScalingTool> m_errorScalingTool; + ServiceHandle<IPixelOfflineCalibSvc> m_calibSvc ; + StoreGateSvc* m_detStore ; + /* ME: Test histos have nothing to do with production code, use a flag + IHistogram1D* m_h_Resx; + IHistogram1D* m_h_Resy; + IHistogram1D* m_h_Locx; + IHistogram1D* m_h_Locy; + IHistogram1D* m_h_PhiTrack; + IHistogram1D* m_h_ThetaTrack; + IHistogram1D* m_h_Rad; + IHistogram1D* m_h_Slope; + */ + + //! toolhandle for central error scaling + //! flag storing if errors need scaling or should be kept nominal + bool m_scalePixelCov ; + bool m_disableDistortions; + bool m_rel13like ; + int m_positionStrategy ; + mutable int m_errorStrategy ; + + + /** @brief Flag controlling how module distortions are taken into account: + + case 0 -----> No distorsions implemented; + + case 1 -----> Set curvature (in 1/meter) and twist (in radiant) equal for all modules; + + case 2 -----> Read curvatures and twists from textfile containing Survey data; + + case 3 -----> Set curvature and twist from Gaussian random generator with mean and RMS coming from Survey data; + + case 4 -----> Read curvatures and twists from database (not ready yet); + */ + //! identifier-helper + const PixelID* m_pixelid; + + /** Enable NN based calibration (do only if NN calibration is applied) **/ + mutable bool m_applyNNcorrection; + mutable bool m_applydRcorrection; + bool m_NNIBLcorrection; + bool m_IBLAbsent; + + /** NN clusterizationi factory for NN based positions and errors **/ + ToolHandle<NnClusterizationFactory> m_NnClusterizationFactory; + ServiceHandle<StoreGateSvc> m_storeGate; //!< Event store + ServiceHandle<IIBLParameterSvc> m_IBLParameterSvc; + + + SG::ReadHandleKey<InDet::DRMap> m_dRMap; //!< the actual dR map + std::string m_dRMapName; + + bool m_doNotRecalibrateNN; + bool m_noNNandBroadErrors; + + /** Enable different treatment of cluster errors based on NN information (do only if TIDE ambi is run) **/ + bool m_usingTIDE_Ambi; + SG::ReadHandleKey<InDet::PixelGangedClusterAmbiguities> m_splitClusterHandle; + mutable std::vector< std::vector<float> > m_fX, m_fY, m_fB, m_fC, m_fD; + + //moved from static to member variable + static constexpr int s_nbinphi=9; + static constexpr int s_nbineta=6; + double m_calphi[s_nbinphi]; + double m_caleta[s_nbineta][3]; + double m_calerrphi[s_nbinphi][3]; + double m_calerreta[s_nbineta][3]; + double m_phix[s_nbinphi+1]; + double m_etax[s_nbineta+1]; +}; + +} // end of namespace InDet + +#endif // PixelClusterOnTrackTool_H diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/PixelClusterOnTrackTool.cxx b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/PixelClusterOnTrackTool.cxx index b9e289c724f6..0f43976e48eb 100755 --- a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/PixelClusterOnTrackTool.cxx +++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/PixelClusterOnTrackTool.cxx @@ -13,6 +13,7 @@ /////////////////////////////////////////////////////////////////// #include "SiClusterOnTrackTool/PixelClusterOnTrackTool.h" +#include "TrkToolInterfaces/IRIO_OnTrackErrorScalingTool.h" #include "InDetReadoutGeometry/SiDetectorManager.h" #include "InDetReadoutGeometry/PixelModuleDesign.h" #include "InDetIdentifier/PixelID.h" @@ -273,8 +274,8 @@ InDet::PixelClusterOnTrackTool::FillFromDataBase() const{ m_fD.emplace_back(std::move(fd)); } }else { - msg(MSG::ERROR) << "Cannot find covariance corrections for key " - << "/PIXEL/PixelClustering/PixelCovCorr" << " - no correction " << endmsg; + ATH_MSG_ERROR( "Cannot find covariance corrections for key " + << "/PIXEL/PixelClustering/PixelCovCorr" << " - no correction " ); } } @@ -300,11 +301,9 @@ InDet::PixelClusterOnTrackTool::correct m_applyNNcorrection = false; } #endif - - if (!m_applyNNcorrection || - ((dynamic_cast<const InDetDD::SiDetectorElement *>(rio.detectorElement()))->isBlayer() && !m_NNIBLcorrection && - !m_IBLAbsent)) { - return correctDefault(rio, trackPar); + auto element= dynamic_cast<const InDetDD::SiDetectorElement *>(rio.detectorElement()); + if ((not m_applyNNcorrection) or (element and element->isBlayer() and (not m_NNIBLcorrection) and (not m_IBLAbsent))){ + return correctDefault(rio, trackPar); }else { if (m_errorStrategy == 0 || m_errorStrategy == 1) { // version from Giacinto @@ -374,8 +373,8 @@ InDet::PixelClusterOnTrackTool::correctDefault float trkphicomp = my_track.dot(my_phiax); float trketacomp = my_track.dot(my_etaax); float trknormcomp = my_track.dot(my_normal); - double bowphi = atan2(trkphicomp, trknormcomp); - double boweta = atan2(trketacomp, trknormcomp); + double bowphi = std::atan2(trkphicomp, trknormcomp); + double boweta = std::atan2(trketacomp, trknormcomp); float etatrack = trackPar.eta(); float tanl = element->getTanLorentzAnglePhi(); @@ -391,7 +390,7 @@ InDet::PixelClusterOnTrackTool::correctDefault // finally, subtract the Lorentz angle effect // the readoutside term is needed because of a bug in old // geometry versions (CSC-01-* and CSC-02-*) - double angle = atan(tan(bowphi) - readoutside * tanl); + double angle = std::atan(std::tan(bowphi) - readoutside * tanl); // try to understand... const Identifier element_id = element->identify(); @@ -729,8 +728,8 @@ InDet::PixelClusterOnTrackTool::correctNN float trkphicomp = my_track.dot(my_phiax); float trketacomp = my_track.dot(my_etaax); float trknormcomp = my_track.dot(my_normal); - double bowphi = atan2(trkphicomp, trknormcomp); - double boweta = atan2(trketacomp, trknormcomp); + double bowphi = std::atan2(trkphicomp, trknormcomp); + double boweta = std::atan2(trketacomp, trknormcomp); Amg::Vector2D locpos = pixelPrepCluster->localPosition(); if (element->isBarrel() && !m_disableDistortions) { @@ -771,16 +770,14 @@ InDet::PixelClusterOnTrackTool::correctNN } } - if (msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << " Old position x: " << pixelPrepCluster->localPosition()[0] << - " +/- " << std::sqrt(pixelPrepCluster->localCovariance()(0, 0)) - << " y: " << pixelPrepCluster->localPosition()[1] << - " +/- " << std::sqrt(pixelPrepCluster->localCovariance()(1, 1)) << endmsg; - msg(MSG::DEBUG) << " Final position x: " << finalposition[0] << - " +/- " << std::sqrt(finalerrormatrix(0, 0)) << - " y: " << finalposition[1] << " +/- " << - std::sqrt(finalerrormatrix(1, 1)) << endmsg; - } + ATH_MSG_DEBUG( " Old position x: " << pixelPrepCluster->localPosition()[0] + << " +/- " << std::sqrt(pixelPrepCluster->localCovariance()(0, 0)) + << " y: " << pixelPrepCluster->localPosition()[1] + << " +/- " << std::sqrt(pixelPrepCluster->localCovariance()(1, 1)) <<"\n" + << " Final position x: " << finalposition[0] + << " +/- " << std::sqrt(finalerrormatrix(0, 0)) + << " y: " << finalposition[1] << " +/- " + <<std::sqrt(finalerrormatrix(1, 1)) ); Amg::Vector3D my_track = trackPar.momentum(); Amg::Vector3D my_normal = element->normal(); @@ -789,8 +786,8 @@ InDet::PixelClusterOnTrackTool::correctNN float trkphicomp = my_track.dot(my_phiax); float trketacomp = my_track.dot(my_etaax); float trknormcomp = my_track.dot(my_normal); - double bowphi = atan2(trkphicomp, trknormcomp); - double boweta = atan2(trketacomp, trknormcomp); + double bowphi = std::atan2(trkphicomp, trknormcomp); + double boweta = std::atan2(trketacomp, trknormcomp); if (element->isBarrel() && !m_disableDistortions) { correctBow(element->identify(), finalposition, bowphi, boweta); @@ -831,7 +828,7 @@ InDet::PixelClusterOnTrackTool::getErrorsDefaultAmbi(const InDet::PixelCluster * int numberOfSubclusters = 1; vectorOfPositions.push_back(pixelPrepCluster->localPosition()); -#ifdef __clustermap + #ifdef __clustermap SG::ReadHandle<InDet::PixelGangedClusterAmbiguities> splitClusterMap(m_splitClusterHandle); InDet::PixelGangedClusterAmbiguities::const_iterator mapBegin = splitClusterMap->begin(); @@ -843,9 +840,7 @@ InDet::PixelClusterOnTrackTool::getErrorsDefaultAmbi(const InDet::PixelCluster * if (first == pixelPrepCluster && second != pixelPrepCluster) { ATH_MSG_DEBUG("Found additional split cluster in ambiguity map (+=1)."); numberOfSubclusters += 1; - const SiCluster *otherOne = second; - const InDet::PixelCluster *pixelAddCluster = dynamic_cast<const InDet::PixelCluster *>(otherOne); if (pixelAddCluster == 0) { ATH_MSG_WARNING("Pixel ambiguity map has empty pixel cluster. Please DEBUG!"); @@ -853,27 +848,17 @@ InDet::PixelClusterOnTrackTool::getErrorsDefaultAmbi(const InDet::PixelCluster * } vectorOfPositions.push_back(pixelAddCluster->localPosition()); - if (msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << "Found one more pixel cluster. Position x: " - << pixelAddCluster->localPosition()[0] << "y: " << pixelAddCluster->localPosition()[1] << - endmsg; - } + ATH_MSG_DEBUG( "Found one more pixel cluster. Position x: " + << pixelAddCluster->localPosition()[0] << "y: " << pixelAddCluster->localPosition()[1]); }// find relevant element of map }// iterate over map #endif - // A.S. hack for the moment: isSplit is also set for modified (non-split) 1-pixel-clusters ... is this needed anyway ? - // - // if (pixelPrepCluster->isSplit() && numberOfSubclusters<2) - // { - // msg(MSG::WARNING) << " Cluster is split but no further clusters found in split cluster map." << endmsg; - // } - // now you have numberOfSubclusters and the vectorOfPositions (Amg::Vector2D) const Trk::AtaPlane *parameters = dynamic_cast<const Trk::AtaPlane *>(&trackPar); - if (parameters == 0) { - msg(MSG::WARNING) << "Parameters are not at a plane ! Aborting cluster correction... " << endmsg; + if (not parameters) { + ATH_MSG_WARNING( "Parameters are not at a plane ! Aborting cluster correction... " ); return false; } @@ -887,17 +872,15 @@ InDet::PixelClusterOnTrackTool::getErrorsDefaultAmbi(const InDet::PixelCluster * allErrorMatrix, numberOfSubclusters); - if (allLocalPositions.size() == 0) { - if (msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << " Cluster cannot be treated by NN. Giving back to default clusterization " << endmsg; - } + if (allLocalPositions.empty()) { + ATH_MSG_DEBUG( " Cluster cannot be treated by NN. Giving back to default clusterization " ); + return false; } if (allLocalPositions.size() != size_t(numberOfSubclusters)) { - msg(MSG::WARNING) << "Returned position vector size " << allLocalPositions.size() << - " not according to expected number of subclusters: " << numberOfSubclusters << ". Abort cluster correction..." << - endmsg; + ATH_MSG_WARNING( "Returned position vector size " << allLocalPositions.size() << + " not according to expected number of subclusters: " << numberOfSubclusters << ". Abort cluster correction..." ); return false; } @@ -923,16 +906,15 @@ InDet::PixelClusterOnTrackTool::getErrorsDefaultAmbi(const InDet::PixelCluster * square(vectorOfPositions[1][1] - allLocalPositions[0][1]) / allErrorMatrix[0](1, 1) + square(vectorOfPositions[0][1] - allLocalPositions[1][1]) / allErrorMatrix[1](1, 1); - if (msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << " Old pix (1) x: " << vectorOfPositions[0][0] << " y: " << vectorOfPositions[0][1] << endmsg; - msg(MSG::DEBUG) << " Old pix (2) x: " << vectorOfPositions[1][0] << " y: " << vectorOfPositions[1][1] << endmsg; - msg(MSG::DEBUG) << " Pix (1) x: " << allLocalPositions[0][0] << " +/- " << std::sqrt(allErrorMatrix[0](0, 0)) - << " y: " << allLocalPositions[0][1] << " +/- " << std::sqrt(allErrorMatrix[0](1, 1)) << endmsg; - msg(MSG::DEBUG) << " Pix (2) x: " << allLocalPositions[1][0] << " +/- " << std::sqrt(allErrorMatrix[1](0, 0)) - << " y: " << allLocalPositions[1][1] << " +/- " << std::sqrt(allErrorMatrix[1](1, 1)) << endmsg; - msg(MSG::DEBUG) << " Old (1) new (1) dist: " << std::sqrt(distancesq1) << " Old (1) new (2) " << std::sqrt(distancesq2) << - endmsg; - } + ATH_MSG_DEBUG( + " Old pix (1) x: " << vectorOfPositions[0][0] << " y: " << vectorOfPositions[0][1] << "\n" + << " Old pix (2) x: " << vectorOfPositions[1][0] << " y: " << vectorOfPositions[1][1] << "\n" + << " Pix (1) x: " << allLocalPositions[0][0] << " +/- " << std::sqrt(allErrorMatrix[0](0, 0)) + << " y: " << allLocalPositions[0][1] << " +/- " << std::sqrt(allErrorMatrix[0](1, 1)) <<"\n" + << " Pix (2) x: " << allLocalPositions[1][0] << " +/- " << std::sqrt(allErrorMatrix[1](0, 0)) + << " y: " << allLocalPositions[1][1] << " +/- " << std::sqrt(allErrorMatrix[1](1, 1)) << "\n" + << " Old (1) new (1) dist: " << std::sqrt(distancesq1) << " Old (1) new (2) " << std::sqrt(distancesq2) ); + if (distancesq1 < distancesq2) { finalposition = allLocalPositions[0]; -- GitLab From 47e42c7ad72b1b8fd22a3d8adc41882e7d66986d Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Mon, 16 Jul 2018 12:48:26 +0000 Subject: [PATCH 476/562] 22.0 coverity SiClusterizationTool Former-commit-id: 9859f2b897ee6257c8cfdb8a2cdb2161bb8e57ad --- .../IPixelClusteringTool.h | 114 +++++++++--------- .../src/MergedPixelsTool.cxx | 59 ++------- 2 files changed, 67 insertions(+), 106 deletions(-) diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/IPixelClusteringTool.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/IPixelClusteringTool.h index 10b4bcd75d37..f8e1d92eb70e 100755 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/IPixelClusteringTool.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/IPixelClusteringTool.h @@ -2,61 +2,59 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -/////////////////////////////////////////////////////////////////// -// I_PixelClusteringTool.h -/////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// -// Interface for pixel clustering algorithms, taking input from RDOs -/////////////////////////////////////////////////////////////////// - -#ifndef SICLUSTERIZATIONTOOL_IPIXELCLUSTERINGTOOL_H -#define SICLUSTERIZATIONTOOL_IPIXELCLUSTERINGTOOL_H - -#include "GaudiKernel/IAlgTool.h" - -#include "InDetRawData/InDetRawDataCollection.h" -#include "InDetRawData/PixelRDORawData.h" -// forward declare not possible (typedef) -#include "InDetPrepRawData/PixelClusterCollection.h" -// forward declare of this causes a compilation error (which I do not fully understand) -// in LazyOfflineSpacePointTool in a trigger package (T.L.) -#include "InDetConditionsSummaryService/IInDetConditionsSvc.h" - -//class PixelConditionsSummarySvc; -//template <class T> class ServiceHandle; - -class PixelID; - -namespace InDetDD -{ - class SiDetectorManager; -} - -namespace InDet -{ - - static const InterfaceID IID_IPixelClusteringTool("InDet::IPixelClusteringTool", 1, 0); - - class IPixelClusteringTool : virtual public IAlgTool - { - - public: - - virtual ~IPixelClusteringTool() {}; - virtual StatusCode initialize() = 0; - virtual StatusCode finalize() = 0; - - static const InterfaceID& interfaceID() { return IID_IPixelClusteringTool; }; - - // Clusterize a collection of pixel raw data objects - virtual PixelClusterCollection* clusterize - (const InDetRawDataCollection<PixelRDORawData> &RDOs, - const InDetDD::SiDetectorManager& manager, - const PixelID& idHelper) const = 0; - - }; - -} - -#endif // SICLUSTERIZATIONTOOL_I_PIXELCLUSTERINGALG_H +/////////////////////////////////////////////////////////////////// +// I_PixelClusteringTool.h +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// +// Interface for pixel clustering algorithms, taking input from RDOs +/////////////////////////////////////////////////////////////////// + +#ifndef SICLUSTERIZATIONTOOL_IPIXELCLUSTERINGTOOL_H +#define SICLUSTERIZATIONTOOL_IPIXELCLUSTERINGTOOL_H + +#include "GaudiKernel/IAlgTool.h" + +#include "InDetRawData/InDetRawDataCollection.h" +#include "InDetRawData/PixelRDORawData.h" +// forward declare not possible (typedef) +#include "InDetPrepRawData/PixelClusterCollection.h" +// forward declare of this causes a compilation error (which I do not fully understand) +// in LazyOfflineSpacePointTool in a trigger package (T.L.) +#include "InDetConditionsSummaryService/IInDetConditionsSvc.h" + + +class PixelID; + +namespace InDetDD +{ + class SiDetectorManager; +} + +namespace InDet +{ + + static const InterfaceID IID_IPixelClusteringTool("InDet::IPixelClusteringTool", 1, 0); + + class IPixelClusteringTool : virtual public IAlgTool + { + + public: + + virtual ~IPixelClusteringTool() {}; + virtual StatusCode initialize() = 0; + virtual StatusCode finalize() = 0; + + static const InterfaceID& interfaceID() { return IID_IPixelClusteringTool; }; + + // Clusterize a collection of pixel raw data objects + virtual PixelClusterCollection* clusterize + (const InDetRawDataCollection<PixelRDORawData> &RDOs, + const InDetDD::SiDetectorManager& manager, + const PixelID& idHelper) const = 0; + + }; + +} + +#endif // SICLUSTERIZATIONTOOL_I_PIXELCLUSTERINGALG_H diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/MergedPixelsTool.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/MergedPixelsTool.cxx index 0742262e1c8d..f82cb47659a7 100755 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/MergedPixelsTool.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/MergedPixelsTool.cxx @@ -18,7 +18,6 @@ #include "SiClusterizationTool/MergedPixelsTool.h" #include "GaudiKernel/ServiceHandle.h" -//#include "StoreGate/StoreGateSvc.h" #include "GaudiKernel/Incident.h" #include "Identifier/IdentifierHash.h" #include "InDetRawData/InDetRawDataCollection.h" @@ -116,47 +115,10 @@ namespace InDet { m_IBLParameterSvc->setBoolParameters(m_IBLAbsent,"IBLAbsent"); } - - //// Get an Identifier helper object - //sc = m_detStore.retrieve(); - //if(!sc.isSuccess()){ - // ATH_MSG_FATAL("Unable to retrieve detector store"); - //return StatusCode::FAILURE; - //} - //else { - // msg(MSG::DEBUG) << "DetectorStore service found" << endmsg; - //} - - //// Get the PixelID Helper - //if (m_detStore->retrieve(m_idHelper, "PixelID").isFailure()) { - // msg(MSG::FATAL) << "Could not get Pixel ID helper" << endmsg; - //return StatusCode::FAILURE; - //} - // for the cluster splitting - if (!m_splitProbTool.empty() && m_splitProbTool.retrieve().isFailure()) { - ATH_MSG_FATAL( "Could not retrieve the split probability tool " << m_splitProbTool << "'."); - return StatusCode::FAILURE; - } - if (!m_clusterSplitter.empty() && m_clusterSplitter.retrieve().isFailure()) { - ATH_MSG_FATAL( "Could not retrieve the cluster splitter '" << m_clusterSplitter << "'."); - return StatusCode::FAILURE; - } - - if (m_incidentSvc.retrieve().isFailure()){ - ATH_MSG_WARNING("Can not retrieve " << m_incidentSvc << ". Exiting."); - return StatusCode::FAILURE; - } - // register to the incident service: - // (a) BeginEvent needed for the recording of the Split ambiguity map (always need to be there for merging) -// m_incidentSvc->addListener( this, IncidentType::BeginEvent); - // (b) EndEvent needed for memory cleanup -// m_incidentSvc->addListener( this, IncidentType::EndEvent); - - if (m_pixofflinecalibSvc.retrieve().isFailure()){ - ATH_MSG_ERROR("Could not retrieve " << m_pixofflinecalibSvc); - return StatusCode::FAILURE; - } + ATH_CHECK(m_splitProbTool.retrieve( EnableTool{not m_splitProbTool.empty()})); + ATH_CHECK(m_clusterSplitter.retrieve( EnableTool{not m_clusterSplitter.empty()} )); + ATH_CHECK(m_pixofflinecalibSvc.retrieve()); if (m_minToT.size() != 7){ ATH_MSG_ERROR("Number of entries for ToT Cut is:" << m_minToT.size() << " . 7 Values are needed, so fix jO."); @@ -513,8 +475,14 @@ namespace InDet { ATH_MSG_VERBOSE( "--> Processing new splitCluster with n. " << splitClusterParts.size() << " subClusters. "); + const InDetDD::PixelModuleDesign* design (dynamic_cast<const InDetDD::PixelModuleDesign*>(&element->design())); + if (not design){ + ATH_MSG_ERROR("Dynamic cast failed at "<<__LINE__<<" of MergedPixelsTool.cxx."); + delete cluster; + delete clusterCollection; + return nullptr; + } for ( size_t iclus = 0 ; splitClusterPartsIter != splitClusterPartsIterEnd; ++splitClusterPartsIter, ++iclus ){ - const Amg::Vector2D& position=(*(*splitClusterPartsIter).localPosition()); const Amg::MatrixX& error=(*(*splitClusterPartsIter).errorMatrix()); const std::vector<int>& totGroup=(*splitClusterPartsIter).totGroup(); @@ -563,12 +531,7 @@ namespace InDet { colMax = col; } } - const InDetDD::PixelModuleDesign* design - (dynamic_cast<const InDetDD::PixelModuleDesign*>(&element->design())); - if (not design){ - ATH_MSG_ERROR("Dynamic cast failed at "<<__LINE__<<" of MergedPixelsTool.cxx."); - return nullptr; - } + int colWidth = colMax-colMin+1; int rowWidth = rowMax-rowMin+1; double etaWidth = design->widthFromColumnRange(colMin, colMax); -- GitLab From ff483e5873c4a29cd81e25d39c3d2a612e540d43 Mon Sep 17 00:00:00 2001 From: John Derek Chapman <chapman@hep.phy.cam.ac.uk> Date: Mon, 16 Jul 2018 09:02:23 +0000 Subject: [PATCH 477/562] Merge branch 'NSW_Geometry' into '21.3' Correct the NSW Geometry XML file See merge request atlas/athena!12658 (cherry picked from commit 4760b6a912055f58250724e6859ff9bedc642392 [formerly 579bc8f745526a13ff800552f72d88267f852c5d]) 37540b28 Add new XML with many corrections 3b9a8d83 Update NSW_StationDescription.xml Former-commit-id: e25d47efa379ab771d6f5ad7d7c870beabfe537d --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../NSW_Sim/data/NSW_StationDescription.xml | 2 +- .../MuonG4/NSW_Sim/data/stations.v1.80.xml | 325 +++ .../MuonG4/NSW_Sim/data/stations.v2.04.xml | 1788 +++++++++++++++++ 4 files changed, 2114 insertions(+), 1 deletion(-) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h create mode 100644 MuonSpectrometer/MuonG4/NSW_Sim/data/stations.v1.80.xml create mode 100644 MuonSpectrometer/MuonG4/NSW_Sim/data/stations.v2.04.xml diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 diff --git a/MuonSpectrometer/MuonG4/NSW_Sim/data/NSW_StationDescription.xml b/MuonSpectrometer/MuonG4/NSW_Sim/data/NSW_StationDescription.xml index cd500edbfdfb..e18b0f1be4b3 120000 --- a/MuonSpectrometer/MuonG4/NSW_Sim/data/NSW_StationDescription.xml +++ b/MuonSpectrometer/MuonG4/NSW_Sim/data/NSW_StationDescription.xml @@ -1 +1 @@ -stations.v1.79.xml \ No newline at end of file +stations.v1.80.xml \ No newline at end of file diff --git a/MuonSpectrometer/MuonG4/NSW_Sim/data/stations.v1.80.xml b/MuonSpectrometer/MuonG4/NSW_Sim/data/stations.v1.80.xml new file mode 100644 index 000000000000..3c8910709bdd --- /dev/null +++ b/MuonSpectrometer/MuonG4/NSW_Sim/data/stations.v1.80.xml @@ -0,0 +1,325 @@ +<?xml version="1.0" encoding="UTF-8"?> +<AGDD> + +<section name="NSW_Parameters" version="1" top_volume="useless" date="December 16 2014" author="S.Chen" > +<!-- Global variables--> +<var name="NSW_NbrOfLayers" value="4"/> +<var name="NSW_NbrOfDriftPcb" value="3"/> +<var name="NSW_NbrOfROPcb" value="2"/> +</section> + +<section name="NSW_sTGC_Parameters" version="13.7" top_volume="useless" date=" June 30, 2016 " author="Daniel Lellouch"> +<!-- ================ Global Variables ================= --> + +<!-- Thickness of a quadruplet --> +<var name="NSW_sTGC_Tck" value="49.34"/> +<!-- Gas Gap inside one layer --> +<var name="NSW_sTGC_GasTck" value="2.85"/> +<!-- G10 thickness per layer --> +<var name="NSW_sTGC_pcbTck" value="3"/> +<!-- Number of layers in a quaduplet --> +<var name="NSW_sTGC_NbrOfLayers" value="4"/> +<!-- Wire pitch --> +<var name="NSW_sTGC_WirePitch" value="1.8"/> +<!-- Strip pitch --> +<var name="NSW_sTGC_StripPitch" value="3.2"/> +<!-- Strip width --> +<var name="NSW_sTGC_StripWidth" value="2.7"/> +<!-- Width of G10 frame besides gas volume --> +<var name="NSW_sTGC_SideFrame" value="28.5"/> +<!-- Width of G10 frame in base w/o capacitor --> +<var name="NSW_sTGC_hFrameNoCapacitor" value="11"/> +<!-- Width of G10 frame in base with capacitor --> +<var name="NSW_sTGC_hFrameCapacitor" value="14"/> +<!-- Opening (in degrees) of trapezes in small wedges --> +<var name="NSW_sTGC_SmallOpening" value="17"/> +<!-- Opening (in degrees) of trapezes in large wedges --> +<var name="NSW_sTGC_LargeOpening" value="28"/> +<!-- Z center of small Pivot --> +<var name="NSW_sTGC_ZSmallPivot" value="7344"/> +<!-- Z center of small Confirm --> +<var name="NSW_sTGC_ZSmallConfirm" value="7010"/> +<!-- Z center of Large Pivot --> +<var name="NSW_sTGC_ZLargePivot" value="7474"/> +<!-- Z center of Large Confirm --> +<var name="NSW_sTGC_ZLargeConfirm" value="7808"/> +<!-- Z of each volume, relative to center of quadruplet --> +<array name="NSW_sTGC_LayerDeltaZ" values="-16.45;-5.48;5.49;16.46"/> +<!-- Side of the Pad readout --> +<array name="NSW_sTGC_PadSide" values="-1;1;-1;1"/> +<!-- Side of the Strip readout --> +<array name="NSW_sTGC_StripSide" values="1;-1;1;-1"/> +</section> + +<!-- ================ sTGC ========================= --> + + +<section name="NewSmallWheels_sTGC" version="22.1" top_volume="useless" date=" June 22, 2018 " author="Daniel Lellouch"> + +<composition name="NSW_sTGC"> + +<sTGC_Tech type="sTGC_1" geometryLevel="1" nLayers="NSW_sTGC_NbrOfLayers" gasTck="NSW_sTGC_GasTck" pcbTck="NSW_sTGC_pcbTck" Tck="NSW_sTGC_Tck" f4="NSW_sTGC_hFrameNoCapacitor" f5="NSW_sTGC_hFrameNoCapacitor" f6="NSW_sTGC_SideFrame"/> + +<!-- ================ small Pivot ========================= --> + +<sTGC type="sTG1-QS1P" tech="sTGC_1" subType="QS1P" sWidth="346.93" lWidth="743.15" Length="1325.6" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0"> + +<sTGC_readout sPadWidth="279.32" lPadWidth="667.18" padH="80;80;80.24;80.24" rankPadPhi="4;3;2;1" nPadPhi="4;4;3;3" anglePadPhi="5" firstPadPhiDivision_C="-5;-5;-2.5;-2.5" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="-5;-5;-2.5;-2.5" PadPhiShift_A="-2;2;-2;2" rankPadH="1;2;3;4" nPadH="17;17;17;17" firstPadH="65.8;65.8;28.61;28.61" firstPadRow="1;1;1;1" sStripWidth="293.48" lStripWidth="681.33" wireCutout="802.8;829.8;856.8;883.8" nWires="371;370;370;370" firstWire="-333;-331.65;-332.55;-332.1" wireGroupWidth="20" nStrips="406" firstTriggerBand="3;3;3;3" nTriggerBands="28;28;28;28" firstStripInTrigger="44;44;44;44" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13; 12;13;12;13;12;13;10" StripsInBandsLayer2="12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13;13;12; 13;12;13;12;13;12;10" StripsInBandsLayer3="12;13;12;13;12;13;12;13;13;12;13;12;13;12;13;12;13;12;13;12;13;12; 13;12;13;13;12;13;8" StripsInBandsLayer4="12;13;12;13;12;13;13;12;13;12;13;12;13;12;13;13;12;13;12;13;12;13; 12;13;12;13;13;12;8" nWireGroups="19;20;19;19" firstWireGroup="20;5;10;15"/> +</sTGC> + +<chamberPosition volume="sTG1-QS1P" type="ENDCAP" chamberType="sTGS" radius="1563" zPos="NSW_sTGC_ZSmallPivot" phi0="22.5"/> + +<sTGC type="sTG1-QS2P" tech="sTGC_1" subType="QS2P" sWidth="746.14" lWidth="1102.25" Length="1191.4" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0"> + +<sTGC_readout sPadWidth="677.64" lPadWidth="1026.28" padH="80;80;80.24;80.24" rankPadPhi="2;1;4;3" nPadPhi="2;2;3;3" anglePadPhi="7.5" firstPadPhiDivision_C="0;0;-3.75;-3.75" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="0;0;-3.75;-3.75" PadPhiShift_A="-2;2;-2;2" rankPadH="1;2;3;4" nPadH="15;15;15;15" firstPadH="93.2;93.2;60.09;60.09" firstPadRow="18;18;18;18" sStripWidth="691.8" lStripWidth="1040.43" wireCutout="0;0;0;0" nWires="569;570;570;570" firstWire="-511.2;-511.65;-512.55;-512.1" wireGroupWidth="20" nStrips="365" firstTriggerBand="34;34;34;34" nTriggerBands="30;30;30;30" firstStripInTrigger="1;1;1;1" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="4;13;12;13;12;13;12;13;12;12; 12;13;12;12;13;12;13;12;13;12; 13;12;13;12;;12;13;12;13;11" StripsInBandsLayer2="5;12;13;12;13;12;13;12;13;13; 13;12;13;12;13;12;13;12;13;12; 13;12;13;12;13;12;13;12;13;10" StripsInBandsLayer3="5;12;13;12;13;12;13;12;13;13; 13;12;13;12;13;12;13;12;13;12; 13;12;13;12;13;12;13;12;13;10" StripsInBandsLayer4="7;12;13;12;13;12;13;13;12;12; 12;13;12;13;12;13;13;12;13;12; 13;12;13;12;13;12;13;13;12;7" nWireGroups="29;30;29;29" firstWireGroup="20;5;10;15"/> +</sTGC> + +<chamberPosition volume="sTG1-QS2P" type="ENDCAP" chamberType="sTGS" radius="2831.5" zPos="NSW_sTGC_ZSmallPivot" phi0="22.5"/> + +<sTGC type="sTG1-QS3P" tech="sTGC_1" subType="QS3P" sWidth="1105.96" lWidth="1406.59" Length="1005.8" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0"> + +<sTGC_readout sPadWidth="1037.46" lPadWidth="1330.62" padH="80;80;80.24;80.24" rankPadPhi="2;1;4;3" nPadPhi="2;2;3;3" anglePadPhi="7.5" firstPadPhiDivision_C="0;0;-3.75;-3.75" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="0;0;-3.75;-3.75" PadPhiShift_A="-2;2;-2;2" rankPadH="1;2;3;4" nPadH="12;12;13;13" firstPadH="89.4;89.4;59.88;59.88" firstPadRow="33;33;33;33" sStripWidth="1051.61" lStripWidth="1344.78" wireCutout="0;0;0;0" nWires="739;739;739;738" firstWire="-664.2;-664.65;-663.75;-663.3" wireGroupWidth="20" nStrips="307" firstTriggerBand="64;64;64;64" nTriggerBands="26;26;25;25" firstStripInTrigger="1;1;1;1" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="3;12;13;12;13;12;13;12;13;13; 13;12;13;12;13;12;12;13;12;13; 12;13;12;13;12;5" StripsInBandsLayer2="6;12;13;12;13;13;12;13;12;12; 12;13;12;13;12;13;12;13;12;13; 13;12;13;12;13;3" StripsInBandsLayer3="6;12;13;12;13;13;12;13;12;12; 12;13;12;13;12;13;12;13;12;13; 12;13;12;13;13" StripsInBandsLayer4="7;13;12;13;12;13;12;13;12;12; 12;13;13;12;13;12;13;12;13;12; 13;12;13;13;11" nWireGroups="37;38;38;38" firstWireGroup="20;14;10;3"/> +</sTGC> + +<chamberPosition volume="sTG1-QS3P" type="ENDCAP" chamberType="sTGS" radius="3942.5" zPos="NSW_sTGC_ZSmallPivot" phi0="22.5"/> + + +<!-- ================ small confirm =============== --> + +<sTGC type="sTG1-QS1C" tech="sTGC_1" subType="QS1C" sWidth="346.93" lWidth="743.15" Length="1325.6" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0"> + +<sTGC_readout sPadWidth="293.48" lPadWidth="681.33" padH="76.35;76.35;76.59;76.59" rankPadPhi="1;4;2;3" nPadPhi="4;4;4;4" anglePadPhi="5" firstPadPhiDivision_C="-3.75;-6.25;-3.75;-6.25" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-6.25;-3.75;-6.25;-3.75" PadPhiShift_A="2;-2;2;-2" rankPadH="1;2;3;4" nPadH="17;17;18;18" firstPadH="78.4;78.4;43.21;43.21" firstPadRow="2;2;2;2" sStripWidth="293.48" lStripWidth="681.33" wireCutout="883.8;856.8;829.8;802.8" nWires="370;370;370;371" firstWire="-332.1;-331.65;-332.55;-333" wireGroupWidth="20" nStrips="406" firstTriggerBand="5;5;5;5" nTriggerBands="32;32;31;31" firstStripInTrigger="44;44;44;44" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="12;12;12;11;12;12;12;12;12;12; 12;12;12;12;12;12;11;12;12;12; 12;12;12;12;12;12;12;12;11;12;12;12" StripsInBandsLayer2="12;12;12;12;11;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12; 11;12;12;12;12;12;12;12;12;12;12;11" StripsInBandsLayer3="12;12;12;12;11;12;12;12;12; 12;12;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12;11;10" StripsInBandsLayer4="12;12;12;12;12;12;12;12;11; 12;12;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12;12;9" nWireGroups="20;19;19;19" firstWireGroup="5;10;15;20"/> +</sTGC> + +<chamberPosition volume="sTG1-QS1C" type="ENDCAP" chamberType="sTGS" radius="1563" zPos="NSW_sTGC_ZSmallConfirm" phi0="22.5"/> + +<sTGC type="sTG1-QS2C" tech="sTGC_1" subType="QS2C" sWidth="746.14" lWidth="1102.25" Length="1191.4" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0"> + +<sTGC_readout sPadWidth="691.8" lPadWidth="1040.43" padH="76.35;76.35;76.59;76.59" rankPadPhi="3;2;4;1" nPadPhi="3;3;3;3" anglePadPhi="7.5" firstPadPhiDivision_C="-5.62;-1.87;-5.62;-1.87" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-1.87;-5.62;-1.87;-5.62" PadPhiShift_A="2;-2;2;-2" rankPadH="1;2;3;4" nPadH="16;16;15;15" firstPadH="43.8;43.8;89.29;89.29" firstPadRow="19;19;20;20" sStripWidth="691.8" lStripWidth="1040.43" wireCutout="0;0;0;0" nWires="570;570;570;569" firstWire="-512.1;-511.65;-512.55;-511.2" wireGroupWidth="20" nStrips="365" firstTriggerBand="64;64;64;64" nTriggerBands="31;31;31;31" firstStripInTrigger="1;1;1;1" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="2;12;12;12;11;12;12;12;12;12;12; 12;12;12;12;12;11;12;12;12;12; 12;12;12;12;12;12;12;12;11;12" StripsInBandsLayer2="12;12;12;12;12;12;12;12;12;12;12; 12;12;12;11;12;12;12;12;12;12; ;12;12;12;12;12;12;12;12;12" StripsInBandsLayer3="2;12;12;12;12;12;12;12;12;12;12; 12;12;12;11;12;12;12;12;12;12; ;12;12;12;12;12;12;12;12;12" StripsInBandsLayer4="5;12;11;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12" nWireGroups="30;29;29;29" firstWireGroup="5;10;15;20"/> +</sTGC> + +<chamberPosition volume="sTG1-QS2C" type="ENDCAP" chamberType="sTGS" radius="2831.5" zPos="NSW_sTGC_ZSmallConfirm" phi0="22.5"/> + +<sTGC type="sTG1-QS3C" tech="sTGC_1" subType="QS3C" sWidth="1105.96" lWidth="1406.59" Length="1005.8" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0"> + +<sTGC_readout sPadWidth="1051.61" lPadWidth="1344.78" padH="76.35;76.35;76.59;76.59" rankPadPhi="3;2;4;1" nPadPhi="3;3;3;3" anglePadPhi="7.5" firstPadPhiDivision_C="-5.62;-1.87;-5.62;-1.87" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-1.87;-5.62;-1.87;-5.62" PadPhiShift_A="2;-2;2;-2" rankPadH="1;2;3;4" nPadH="13;13;14;14" firstPadH="61.66;61.66;34.38;34.38" firstPadRow="35;35;35;35" sStripWidth="1051.61" lStripWidth="1344.78" wireCutout="0;0;0;0" nWires="738;739;739;739" firstWire="-663.3;-664.65;-663.75;-664.2" wireGroupWidth="20" nStrips="307" firstTriggerBand="37;37;37;37" nTriggerBands="26;26;25;25" firstStripInTrigger="1;1;1;1" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="6;7;12;12;12;12;12;12;11;11; 12;12;12;12;12;12;12;12;12;12; 12;11;12;13;12;12" StripsInBandsLayer2="2;10;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12; 12;12;12;12;13;12" StripsInBandsLayer3="2;10;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12; 12;12;12;13;13" StripsInBandsLayer4="1;12;12;12;12;12;12;11;12;12; 12;12;12;12;12;12;12;12;12;12; 12;12;12;13;11" nWireGroups="38;38;38;38" firstWireGroup="5;14;15;3"/> +</sTGC> + +<chamberPosition volume="sTG1-QS3C" type="ENDCAP" chamberType="sTGS" radius="3942.5" zPos="NSW_sTGC_ZSmallConfirm" phi0="22.5"/> + + +<!-- ================ Large Pivot ==================== --> + +<sTGC type="sTG1-QL1P" tech="sTGC_1" subType="QL1P" sWidth="542.61" lWidth="1206.82" Length="1332" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0"> + +<sTGC_readout sPadWidth="476.42" lPadWidth="1126.66" padH="81.42;81.42;81.66;81.66" rankPadPhi="4;3;2;1" nPadPhi="6;6;7;7" anglePadPhi="5" firstPadPhiDivision_C="-10;-10;-12.5;-12.5" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="-10;-10;-12.5;-12.5" PadPhiShift_A="-2;2;-2;2" rankPadH="1;2;3;4" nPadH="17;17;16;16" firstPadH="54.39;54.39;98.15;98.15" firstPadRow="1;1;2;2" sStripWidth="490.84" lStripWidth="1141.09" wireCutout="808;835;862;889" nWires="621;620;620;620" firstWire="-558;-556.65;-557.55;-557.1" wireGroupWidth="20" nStrips="408" firstTriggerBand="3;3;3;3" nTriggerBands="30;30;30;30" firstStripInTrigger="45;45;45;45" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="13;13;12;13;13;13;12;13;13;12;13;13;13;12;13;13;12;13;13;13;12;13; 13;12;13;13;13;12;13;13" StripsInBandsLayer2="13;13;12;13;13;13;12;13;13;13;12;13;13;12;13;13;13;12;13;13;13;12; 13;13;12;13;13;13;12;13" StripsInBandsLayer3="13;13;12;13;13;13;12;13;13;13;12;13;13;13;12;13;13;13;12;13;13;13; 12;13;13;13;12;13;13;13" StripsInBandsLayer4="13;13;12;13;13;13;13;12;13;13;13;12;13;13;13;12;13;13;13;13;12;13; 13;13;12;13;13;13;12;13" nWireGroups="32;32;32;32" firstWireGroup="20;5;10;15"/> +</sTGC> + +<chamberPosition volume="sTG1-QL1P" type="ENDCAP" chamberType="sTGL" radius="1595" zPos="NSW_sTGC_ZLargePivot" phi0="0.0"/> + +<sTGC type="sTG1-QL2P" tech="sTGC_1" subType="QL2P" sWidth="1211.81" lWidth="1807.5" Length="1194.6" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0"> + +<sTGC_readout sPadWidth="1144.12" lPadWidth="1727.34" padH="81.42;81.42;81.66;81.66" rankPadPhi="2;1;4;3" nPadPhi="4;4;5;5" anglePadPhi="7.5" firstPadPhiDivision_C="-7.5;-7.5;-11.25;-11.25" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="-7.5;-7.5;-11.25;-11.25" PadPhiShift_A="-2;2;-2;2" rankPadH="1;2;3;4" nPadH="14;14;15;15" firstPadH="99.51;99.51;65.69;65.69" firstPadRow="18;18;18;18" sStripWidth="490.84" lStripWidth="1141.09" wireCutout="0;0;0;0" nWires="953;954;954;954" firstWire="-856.8;-857.25;-858.15;-857.7" wireGroupWidth="20" nStrips="366" firstTriggerBand="33;33;33;33" nTriggerBands="30;30;30;29" firstStripInTrigger="1;1;1;1" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="9;6;12;13;13;12;13;13;13;12;13;13;1313;13;13;13;12;13;13;12;13;13;13; 12;13;13;12;13;13;13" StripsInBandsLayer2="9;6;13;13;12;13;13;13;12;13;13;12;1213;13;13;12;13;13;13;12;13;13;13; 12;13;13;12;13;13;13" StripsInBandsLayer3="7;8;12;13;13;13;12;13;13;13;12;13;1313;13;12;13;13;13;12;13;13;13;12; 13;13;13;12;13;13;13" StripsInBandsLayer4="7;8;13;13;13;12;13;13;13;12;13;13;1313;13;12;13;13;13;12;13;13;13;12; 13;13;13;12;13;13" nWireGroups="48;49;49;48" firstWireGroup="20;5;10;15"/> +</sTGC> + +<chamberPosition volume="sTG1-QL2P" type="ENDCAP" chamberType="sTGL" radius="2868.3" zPos="NSW_sTGC_ZLargePivot" phi0="0.0"/> + +<sTGC type="sTG1-QL3P" tech="sTGC_1" subType="QL3P" sWidth="1813.68" lWidth="2111" Length="1153" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="545.3" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode="539.26"> + +<sTGC_readout sPadWidth="1745.99" lPadWidth="2054" padH="81.42;81.42;81.66;81.66" + rankPadPhi="2;1;4;3" nPadPhi="4;4;5;5" anglePadPhi="7.5" firstPadPhiDivision_C="-7.5;-7.5;-11.25;-11.25" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="-7.5;-7.5;-11.25;-11.25" PadPhiShift_A="-2;2;-2;2" rankPadH="1;2;3;4" nPadH="15;15;14;14" firstPadH="32.38;32.38;83.57;83.57" firstPadRow="32;32;33;33" sStripWidth="1760.42" lStripWidth="2054" wireCutout="0;0;0;0" nWires="1133;1134;1134;1134" firstWire="-1018.8;-1019.25;-1019.7;-1019.7" wireGroupWidth="20" nStrips="353" firstTriggerBand="63;63;63;62" nTriggerBands="28;28;28;29" firstStripInTrigger="1;1;1;1" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="10;13;12;13;13;12;13;13;13; 12;13;13;12;13;13;12;13;13;13; 12;13;13;12;13;13;13;12;13" StripsInBandsLayer2="11;13;12;13;13;13;12;13;13; 12;13;13;13;12;13;13;13;12;13; 13;13;12;13;13;12;13;13;11" StripsInBandsLayer3="13;13;13;12;13;13;13;12;13; 13;13;12;13;13;13;12;13;13;13; 12;13;13;13;12;13;13;13;8" StripsInBandsLayer4="1;13;13;13;12;13;13;13;13;12; 13;13;13;12;13;13;13;12;13;13; 13;13;12;13;13;13;12;13;7" nWireGroups="57;58;58;57" firstWireGroup="20;5;10;15"/> +</sTGC> + +<chamberPosition volume="sTG1-QL3P" type="ENDCAP" chamberType="sTGL" radius="4054.5" zPos="NSW_sTGC_ZLargePivot" phi0="0.0"/> + +<!-- =============== Large Confirm ===================== --> + +<sTGC type="sTG1-QL1C" tech="sTGC_1" subType="QL1C" sWidth="542.61" lWidth="1206.82" Length="1332" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0"> + +<sTGC_readout sPadWidth="490.84" lPadWidth="1141.09" padH="85.07;85.07;85.31;85.31" rankPadPhi="4;3;2;1" nPadPhi="6;6;6;6" anglePadPhi="5" firstPadPhiDivision_C="-8.75;-11.25;-8.75;-11.25" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-11.25;-8.75;-11.25;-8.75" PadPhiShift_A="2;-2;2;-2" rankPadH="1;2;3;4" nPadH="16;16;16;16" firstPadH="77.79;77.79;38.01;38.01" firstPadRow="1;1;1;1" sStripWidth="490.84" lStripWidth="1141.09" wireCutout="889;862;835;808" nWires="620;620;620;621" firstWire="-557.1;-556.65;-557.55;-558" wireGroupWidth="20" nStrips="408" firstTriggerBand="3;3;3;3" nTriggerBands="29;29;28;28" firstStripInTrigger="44;44;44;44" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="13;13;13;14;13;13;14;13;13;13; 14;13;13;14;13;13;13;14;13;13; 13;14;13;13;14;13;13;13" StripsInBandsLayer2="13;13;13;14;13;13;14;13;13;14; 13;13;13;14;13;13;14;13;13;14; 13;13;13;14;13;13;14;13" StripsInBandsLayer3="14;13;13;14;13;13;14;13;13;14; 13;13;14;13;13;14;13;13;14;13; 13;13;14;13;13;14;13;13" StripsInBandsLayer4="14;13;13;14;13;13;14;13;13;14; 13;13;14;13;13;14;13;13;14;13; 14;13;13;14;13;13;14;13" nWireGroups="32;32;32;32" firstWireGroup="5;10;15;20"/> +</sTGC> + +<chamberPosition volume="sTG1-QL1C" type="ENDCAP" chamberType="sTGL" radius="1595" zPos="NSW_sTGC_ZLargeConfirm" phi0="0.0"/> + +<sTGC type="sTG1-QL2C" tech="sTGC_1" subType="QL2C" sWidth="1211.81" lWidth="1807.5" Length="1194.6" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0"> + +<sTGC_readout sPadWidth="1158.55" lPadWidth="1741.77" padH="85.07;85.07;85.31;85.31" rankPadPhi="3;2;4;1" nPadPhi="4;4;4;4" anglePadPhi="7.5" firstPadPhiDivision_C="-5.62;-9.37;-5.62;-9.37" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-9.37;-5.62;-9.37;-5.62" PadPhiShift_A="2;-2;2;-2" rankPadH="1;2;3;4" nPadH="14;14;14;14" firstPadH="99.84;99.84;63.9;63.9" firstPadRow="17;17;17;17" sStripWidth="1158.55" lStripWidth="1741.77" wireCutout="0;0;0;0" nWires="954;954;954;953" firstWire="-857.7;-857.25;-858.15;-856.8" wireGroupWidth="20" nStrips="366" firstTriggerBand="30;30;30;30" nTriggerBands="29;29;29;29" firstStripInTrigger="1;1;1;1" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="12;5;13;13;13;14;13;13;14;13; 13;13;14;13;13;14;13;13;13;14; 13;13;14;13;13;13;14;13;13" StripsInBandsLayer2="11;5;13;14;13;13;14;13;13;13; 14;13;13;14;13;13;14;13;13;14; 13;13;13;14;13;13;14;13;13" StripsInBandsLayer3="10;7;13;13;14;13;13;14;13;13; 13;14;13;13;14;13;13;14;13;13; 14;13;13;14;13;13;14;13;13" StripsInBandsLayer4="9;7;13;14;13;13;14;13;13;14; 13;13;14;13;13;14;13;14;13;13; 14;13;13;14;13;13;14;13;12" nWireGroups="49;49;48;48" firstWireGroup="5;10;15;20"/> +</sTGC> + +<chamberPosition volume="sTG1-QL2C" type="ENDCAP" chamberType="sTGL" radius="2868.3" zPos="NSW_sTGC_ZLargeConfirm" phi0="0.0"/> + +<sTGC type="sTG1-QL3C" tech="sTGC_1" subType="QL3C" sWidth="1813.68" lWidth="2111" Length="1153" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="545.3" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode="539.26"> + +<sTGC_readout sPadWidth="1760.42" lPadWidth="2054" padH="85.07;85.07;85.31;85.31" rankPadPhi="3;2;4;1" nPadPhi="4;4;4;4" anglePadPhi="7.5" firstPadPhiDivision_C="-5.62;-9.37;-5.62;-9.37" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-9.37;-5.62;-9.37;-5.62" PadPhiShift_A="2;-2;2;-2" rankPadH="1;2;3;4" nPadH="13;13;14;14" firstPadH="83.76;83.76;51.17;51.17" firstPadRow="31;31;31;31" sStripWidth="1760.42" lStripWidth="2054" wireCutout="0;0;0;0" nWires="1134;1134;1134;1133" firstWire="-1019.7;-1019.25;-1020.15;-1018.8" wireGroupWidth="20" nStrips="353" firstTriggerBand="60;60;60;60" nTriggerBands="28;28;28;28" firstStripInTrigger="1;1;1;1" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="3;13;13;13;13;14;13;13;14;13;13; 13;14;13;13;14;13;13;13;14;13; 13;13;14;13;13;14;8" StripsInBandsLayer2="2;14;13;13;14;13;13;13;14;13;13; 14;13;13;14;13;13;13;14;13;13; 14;13;13;14;13;13;7" StripsInBandsLayer3="2;14;13;13;14;13;13;14;13;13;14; 13;13;14;13;13;13;14;13;13;14; 13;13;14;13;13;14;4" StripsInBandsLayer4="3;14;13;13;14;13;13;14;13;13;14; 13;13;14;13;13;14;13;13;14;13; 13;14;13;13;14;13;3" nWireGroups="58;58;57;57" firstWireGroup="5;10;15;20"/> +</sTGC> + +<chamberPosition volume="sTG1-QL3C" type="ENDCAP" chamberType="sTGL" radius="4054.5" zPos="NSW_sTGC_ZLargeConfirm" phi0="0.0"/> + +</composition> +</section> + + +<!-- ========== MicroMegas ============================== --> + +<section name="NSW_MM_Parameters" version="1" top_volume="useless" date="December 16 2014" author="S.Chen" > + +<!-- Frames. "f1": frame width close to the trapezium large side. "f2": frame width close to the trapezium small side. "f3": frame width close to the trapezium oblique side --> + +<!-- Distance from IP, labeled zmin_MM in Parameter Book --> +<var name="NSW_MM_LM_distanceFromIP" value="7536"/> +<var name="NSW_MM_SM_distanceFromIP" value="7072"/> +<!-- Thickness of Multilayer and the subcomponent (mm)--> +<var name="NSW_MM_GasTck" value="5.04"/> +<var name="NSW_MM_ROPcbTck" value="11.69"/> +<var name="NSW_MM_DriftPcbTck" value="11.284"/> +<var name="NSW_MM_MultilayerTck" value="NSW_NbrOfLayers* NSW_MM_GasTck + (NSW_NbrOfDriftPcb) * NSW_MM_DriftPcbTck+ ( NSW_NbrOfROPcb) * NSW_MM_ROPcbTck" /> <!-- Thickness of one multilayer --> + +<!-- Large sector modules (LM1" LM2). Modules are all trapezoid. ""Height"": radial envelope" ""base/top Width"": upper/lower side of the trapezoid--> +<var name="NSW_MM_LM1_InnerRadius" value="923" /> +<var name="NSW_MM_LM1_Length" value="2310" /> +<var name="NSW_MM_LM1_outerRadius" value="NSW_MM_LM1_InnerRadius+NSW_MM_LM1_Length" /> +<var name="NSW_MM_LM1_f1" value="30"/> +<var name="NSW_MM_LM1_f2" value="30"/> +<var name="NSW_MM_LM1_f3" value="100"/> +<var name="NSW_MM_LMGap_Length" value="5" /> <!-- Radial gap between LM1 and LM2 --> +<var name="NSW_MM_LM2_InnerRadius" value="NSW_MM_LM1_outerRadius+NSW_MM_LMGap_Length" /> +<var name="NSW_MM_LM2_Length" value="1410" /> +<var name="NSW_MM_LM2_outerRadius" value="NSW_MM_LM2_InnerRadius+NSW_MM_LM2_Length" /> +<var name="NSW_MM_LM1_baseWidth" value="640" /> +<var name="NSW_MM_LM1_topWidth" value="2008.5" /> +<var name="NSW_MM_LM2_baseWidth" value="2022.8" /> +<var name="NSW_MM_LM2_topWidth" value="2220" /> +<var name="NSW_MM_LM2_f1" value="30"/> +<var name="NSW_MM_LM2_f2" value="30"/> +<var name="NSW_MM_LM2_f3" value="100"/> +<!-- Small sector modules (SM1" SM2). Modules are all trapezoids. ""Height"": radial envelope" ""base/top Width"": upper/lower side --> +<var name="NSW_MM_SM1_InnerRadius" value="895" /> +<var name="NSW_MM_SM1_Length" value="2210" /> +<var name="NSW_MM_SM1_outerRadius" value="NSW_MM_SM1_InnerRadius+NSW_MM_SM1_Length" /> +<var name="NSW_MM_SMGap_Length" value="5" /> <!-- Radial gap between SM1 and SM2 --> +<var name="NSW_MM_SM1_f1" value="30"/> +<var name="NSW_MM_SM1_f2" value="30"/> +<var name="NSW_MM_SM1_f3" value="100"/> +<var name="NSW_MM_SM2_InnerRadius" value="NSW_MM_SM1_outerRadius+NSW_MM_SMGap_Length" /> +<var name="NSW_MM_SM2_Length" value="1350" /> +<var name="NSW_MM_SM2_outerRadius" value="NSW_MM_SM2_InnerRadius+NSW_MM_SM2_Length" /> +<var name="NSW_MM_SM1_baseWidth" value="500" /> +<var name="NSW_MM_SM1_topWidth" value="1319.2" /> +<var name="NSW_MM_SM2_baseWidth" value="1321.1" /> +<var name="NSW_MM_SM2_topWidth" value="1821.5" /> +<var name="NSW_MM_SM2_f1" value="30"/> +<var name="NSW_MM_SM2_f2" value="30"/> +<var name="NSW_MM_SM2_f3" value="100"/> + +<var name="NSW_MM_LargeSector_ZCENTER" value="(NSW_sTGC_ZLargePivot+NSW_sTGC_ZLargeConfirm)/2."/> +<var name="NSW_MM_SmallSector_ZCENTER" value="(NSW_sTGC_ZSmallPivot+NSW_sTGC_ZSmallConfirm)/2."/> + + +<!-- Thickness of inter-multilayer spacers --> +<var name="NSW_MM_SpacerThickness" value="50" /> + +<!-- Global z-coordinate for the sector center --> +<!-- <var name="NSW_MM_LargeSector_ZCENTER" value="NSW_MM_LM_distanceFromIP + 4.*NSW_MM_DriftPcbTck + 4.*NSW_MM_ROPcbTck + 4.*NSW_MM_GasTck + NSW_MM_SpacerThickness/2."/> +<var name="NSW_MM_SmallSector_ZCENTER" value="NSW_MM_SM_distanceFromIP + 4.*NSW_MM_DriftPcbTck + 4.*NSW_MM_ROPcbTck + 4.*NSW_MM_GasTck + NSW_MM_SpacerThickness/2."/> --> + +</section> + +<section name="NewSmallWheelsMM" version="1" top_volume="useless" date="December 16 2014" author="S.Chen" > + + +<!-- Technologies --> +<mm_Tech type="MM_1" geometryLevel="1" nLayers="NSW_NbrOfLayers" gasTck="NSW_MM_GasTck" driftPcbTck="NSW_MM_DriftPcbTck" ROPcbTck="NSW_MM_ROPcbTck" Tck="NSW_MM_MultilayerTck" /> +<mmSpacer_Tech type="Spa_1" Tck="NSW_MM_SpacerThickness" /> + +<!-- large wheel --> +<micromegas type="sMD1-1-1" tech="MM_1" subType="M1L1" sWidth="NSW_MM_LM1_baseWidth" lWidth="NSW_MM_LM1_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_LM1_Length" ylFrame="NSW_MM_LM1_f1" ysFrame="NSW_MM_LM1_f2" xFrame="NSW_MM_LM1_f3"> +<mm_readout stripPitch="0.45" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.; 0.; 0.02618; -0.02618" readoutSide="-1; 1; -1; 1" zPos="NSW_MM_LargeSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_LM1_InnerRadius" roLength="NSW_MM_LM1_Length"/> +</micromegas> +<micromegas type="sMD1-2-1" tech="MM_1" subType="M2L1" sWidth="NSW_MM_LM2_baseWidth" lWidth="NSW_MM_LM2_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_LM2_Length" ylFrame="NSW_MM_LM2_f1" ysFrame="NSW_MM_LM2_f2" xFrame="NSW_MM_LM2_f3"> +<mm_readout stripPitch="0.45" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.; 0.; 0.02618; -0.02618" readoutSide="-1; 1; -1; 1" zPos="NSW_MM_LargeSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_LM2_InnerRadius" roLength="NSW_MM_LM2_Length"/> +</micromegas> +<micromegas type="sMD1-1-2" tech="MM_1" subType="M1L2" sWidth="NSW_MM_LM1_baseWidth" lWidth="NSW_MM_LM1_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_LM1_Length" ylFrame="NSW_MM_LM1_f1" ysFrame="NSW_MM_LM1_f2" xFrame="NSW_MM_LM1_f3"> +<mm_readout stripPitch="0.45" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.02618; -0.02618; 0.; 0." readoutSide="-1; 1; -1; 1" zPos="NSW_MM_LargeSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_LM1_InnerRadius" roLength="NSW_MM_LM1_Length"/> +</micromegas> +<micromegas type="sMD1-2-2" tech="MM_1" subType="M2L2" sWidth="NSW_MM_LM2_baseWidth" lWidth="NSW_MM_LM2_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_LM2_Length" ylFrame="NSW_MM_LM2_f1" ysFrame="NSW_MM_LM2_f2" xFrame="NSW_MM_LM2_f3"> +<mm_readout stripPitch="0.45" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.02618; -0.02618; 0.; 0." readoutSide="-1; 1; -1; 1" zPos="NSW_MM_LargeSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_LM2_InnerRadius" roLength="NSW_MM_LM2_Length"/> +</micromegas> + +<mmSpacer type="spa1-1" tech="Spa_1" sWidth="NSW_MM_LM1_baseWidth" lWidth="NSW_MM_LM1_topWidth" Tck="NSW_MM_SpacerThickness" Length="NSW_MM_LM1_Length" /> +<mmSpacer type="spa1-2" tech="Spa_1" sWidth="NSW_MM_LM2_baseWidth" lWidth="NSW_MM_LM2_topWidth" Tck="NSW_MM_SpacerThickness" Length="NSW_MM_LM2_Length" /> + + +<!-- small wheel --> +<micromegas type="sMD3-1-1" tech="MM_1" subType="M1S1" sWidth="NSW_MM_SM1_baseWidth" lWidth="NSW_MM_SM1_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_SM1_Length" ylFrame="NSW_MM_SM1_f1" ysFrame="NSW_MM_SM1_f2" xFrame="NSW_MM_SM1_f3"> +<mm_readout stripPitch="0.425" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.; 0.; 0.02618; -0.02618" readoutSide="-1; 1; -1; 1" zPos="NSW_MM_SmallSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_SM1_InnerRadius" roLength="NSW_MM_SM1_Length"/> +</micromegas> +<micromegas type="sMD3-2-1" tech="MM_1" subType="M2S1" sWidth="NSW_MM_SM2_baseWidth" lWidth="NSW_MM_SM2_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_SM2_Length" ylFrame="NSW_MM_SM2_f1" ysFrame="NSW_MM_SM2_f2" xFrame="NSW_MM_SM2_f3"> +<mm_readout stripPitch="0.425" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.; 0.; 0.02618; -0.02618" readoutSide="-1; 1; -1; 1" zPos="NSW_MM_SmallSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_SM2_InnerRadius" roLength="NSW_MM_SM2_Length"/> +</micromegas> +<micromegas type="sMD3-1-2" tech="MM_1" subType="M1S2" sWidth="NSW_MM_SM1_baseWidth" lWidth="NSW_MM_SM1_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_SM1_Length" ylFrame="NSW_MM_SM1_f1" ysFrame="NSW_MM_SM1_f2" xFrame="NSW_MM_SM1_f3"> +<mm_readout stripPitch="0.425" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.02618; -0.02618; 0.; 0." readoutSide="-1; 1; -1; 1" zPos="NSW_MM_SmallSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_SM1_InnerRadius" roLength="NSW_MM_SM1_Length"/> +</micromegas> +<micromegas type="sMD3-2-2" tech="MM_1" subType="M2S2" sWidth="NSW_MM_SM2_baseWidth" lWidth="NSW_MM_SM2_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_SM2_Length" ylFrame="NSW_MM_SM2_f1" ysFrame="NSW_MM_SM2_f2" xFrame="NSW_MM_SM2_f3"> +<mm_readout stripPitch="0.425" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.02618; -0.02618; 0.; 0." readoutSide="-1; 1; -1; 1" zPos="NSW_MM_SmallSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_SM2_InnerRadius" roLength="NSW_MM_SM2_Length"/> +</micromegas> +<mmSpacer type="spa3-1" tech="Spa_1" sWidth="NSW_MM_SM1_baseWidth" lWidth="NSW_MM_SM1_topWidth" Tck="NSW_MM_SpacerThickness" Length="NSW_MM_SM1_Length" /> +<mmSpacer type="spa3-2" tech="Spa_1" sWidth="NSW_MM_SM2_baseWidth" lWidth="NSW_MM_SM2_topWidth" Tck="NSW_MM_SpacerThickness" Length="NSW_MM_SM2_Length" /> + +<composition name="NSW_MM" > +<!-- A-SIDE --> + +<!-- LARGE SECTOR --> + +<!-- MM multilayer 1 --> +<chamberPosition volume="sMD1-1-1" radius="(NSW_MM_LM1_InnerRadius+NSW_MM_LM1_outerRadius)/2" zPos="NSW_MM_LargeSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="0" /> +<chamberPosition volume="sMD1-2-1" radius="(NSW_MM_LM2_InnerRadius+NSW_MM_LM2_outerRadius)/2" zPos="NSW_MM_LargeSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="0" /> +<!-- spacer --> +<mposPhi volume="spa1-1" ncopy="8" R_Z="(NSW_MM_LM1_InnerRadius+NSW_MM_LM1_outerRadius)/2;NSW_MM_LargeSector_ZCENTER" Phi0="0" rot=" 90.; 270.; 90." /> +<mposPhi volume="spa1-2" ncopy="8" R_Z="(NSW_MM_LM2_InnerRadius+NSW_MM_LM2_outerRadius)/2;NSW_MM_LargeSector_ZCENTER" Phi0="0" rot=" 90.; 270.; 90." /> + +<!-- MM multilayer 2 --> +<chamberPosition volume="sMD1-1-2" radius="(NSW_MM_LM1_InnerRadius+NSW_MM_LM1_outerRadius)/2" zPos="NSW_MM_LargeSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="0" /> +<chamberPosition volume="sMD1-2-2" radius="(NSW_MM_LM2_InnerRadius+NSW_MM_LM2_outerRadius)/2" zPos="NSW_MM_LargeSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="0" /> + +<!-- SMALL SECTOR --> + +<!-- MM multilayer 1 --> +<chamberPosition volume="sMD3-1-1" radius="(NSW_MM_SM1_InnerRadius+NSW_MM_SM1_outerRadius)/2" zPos="NSW_MM_SmallSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="22.5" /> +<chamberPosition volume="sMD3-2-1" radius="(NSW_MM_SM2_InnerRadius+NSW_MM_SM2_outerRadius)/2" zPos="NSW_MM_SmallSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="22.5" /> + +<!-- spacer --> +<mposPhi volume="spa3-1" ncopy="8" R_Z="(NSW_MM_SM1_InnerRadius+NSW_MM_SM1_outerRadius)/2;NSW_MM_SmallSector_ZCENTER" Phi0="22.5" rot=" 90.; 270.; 90." /> +<mposPhi volume="spa3-2" ncopy="8" R_Z="(NSW_MM_SM2_InnerRadius+NSW_MM_SM2_outerRadius)/2;NSW_MM_SmallSector_ZCENTER" Phi0="22.5" rot=" 90.; 270.; 90." /> + +<!-- MM multilayer 2 --> +<chamberPosition volume="sMD3-1-2" radius="(NSW_MM_SM1_InnerRadius+NSW_MM_SM1_outerRadius)/2" zPos="NSW_MM_SmallSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="22.5" /> +<chamberPosition volume="sMD3-2-2" radius="(NSW_MM_SM2_InnerRadius+NSW_MM_SM2_outerRadius)/2" zPos="NSW_MM_SmallSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="22.5" /> + +<!-- C-SIDE --> +<!-- LARGE SECTOR --> +<!-- spacer --> +<mposPhi volume="spa1-1" ncopy="8" R_Z="(NSW_MM_LM1_InnerRadius+NSW_MM_LM1_outerRadius)/2;-NSW_MM_LargeSector_ZCENTER" Phi0="0" rot=" 90.; 90.; 90." /> +<mposPhi volume="spa1-2" ncopy="8" R_Z="(NSW_MM_LM2_InnerRadius+NSW_MM_LM2_outerRadius)/2;-NSW_MM_LargeSector_ZCENTER" Phi0="0" rot=" 90.; 90.; 90." /> + +<!-- SMALL SECTOR --> +<!-- spacer --> +<mposPhi volume="spa3-1" ncopy="8" R_Z="(NSW_MM_SM1_InnerRadius+NSW_MM_SM1_outerRadius)/2;-NSW_MM_SmallSector_ZCENTER" Phi0="22.5" rot=" 90.; 90.; 90." /> +<mposPhi volume="spa3-2" ncopy="8" R_Z="(NSW_MM_SM2_InnerRadius+NSW_MM_SM2_outerRadius)/2;-NSW_MM_SmallSector_ZCENTER" Phi0="22.5" rot=" 90.; 90.; 90." /> + +</composition> + +</section> + + +<!-- ========== Poisitionning sTGC in NSW================ --> + + +<section name="NewSmallWheels" version="4.3" top_volume="useless" date=" April 20, 2015 " author="Daniel Lellouch"> + +<composition name="NewSmallWheel"> + <posXYZ volume="NSW_sTGC" X_Y_Z="0.;0.;0."/> + <posXYZ volume="NSW_MM" X_Y_Z="0.;0.;0." /> +</composition> + +</section> +</AGDD> diff --git a/MuonSpectrometer/MuonG4/NSW_Sim/data/stations.v2.04.xml b/MuonSpectrometer/MuonG4/NSW_Sim/data/stations.v2.04.xml new file mode 100644 index 000000000000..647f2459436f --- /dev/null +++ b/MuonSpectrometer/MuonG4/NSW_Sim/data/stations.v2.04.xml @@ -0,0 +1,1788 @@ +<?xml version="1.0" encoding="UTF-8"?> +<AGDD> + +<section name="NSW_Parameters" version="1" top_volume="useless" date="December 16 2014" author="S.Chen" > +<!-- Global variables--> +<var name="NSW_NbrOfLayers" value="4"/> +<var name="NSW_NbrOfDriftPcb" value="3"/> +<var name="NSW_NbrOfROPcb" value="2"/> +<!--Center between the large sectors and the small sectors--> +<var name="ZCenter_Global" value="7409"/> +</section> + +<section name="NSW_sTGC_Parameters" version="13.7" top_volume="useless" date=" June 30, 2016 " author="Daniel Lellouch"> +<!-- ================ Global Variables ================= --> + +<!-- Thickness of a quadruplet --> +<var name="NSW_sTGC_Tck" value="49.34"/> +<!-- Gas Gap inside one layer --> +<var name="NSW_sTGC_GasTck" value="2.85"/> +<!-- G10 thickness per layer --> +<var name="NSW_sTGC_pcbTck" value="3"/> +<!-- Number of layers in a quaduplet --> +<var name="NSW_sTGC_NbrOfLayers" value="4"/> +<!-- Wire pitch --> +<var name="NSW_sTGC_WirePitch" value="1.8"/> +<!-- Strip pitch --> +<var name="NSW_sTGC_StripPitch" value="3.2"/> +<!-- Strip width --> +<var name="NSW_sTGC_StripWidth" value="2.7"/> +<!-- Width of G10 frame besides gas volume --> +<var name="NSW_sTGC_SideFrame" value="28.5"/> +<!-- Width of G10 frame in base w/o capacitor --> +<var name="NSW_sTGC_hFrameNoCapacitor" value="11"/> +<!-- Width of G10 frame in base with capacitor --> +<var name="NSW_sTGC_hFrameCapacitor" value="14"/> +<!-- Opening (in degrees) of trapezes in small wedges --> +<var name="NSW_sTGC_SmallOpening" value="17"/> +<!-- Opening (in degrees) of trapezes in large wedges --> +<var name="NSW_sTGC_LargeOpening" value="28"/> +<!-- Z center of small Pivot --> +<var name="NSW_sTGC_ZSmallPivot" value="ZCenter_Global-64"/> +<!-- Z center of small Confirm --> +<var name="NSW_sTGC_ZSmallConfirm" value="ZCenter_Global-399"/> +<!-- Z center of Large Pivot --> +<var name="NSW_sTGC_ZLargePivot" value="ZCenter_Global+64"/> +<!-- Z center of Large Confirm --> +<var name="NSW_sTGC_ZLargeConfirm" value="ZCenter_Global+399"/> +<!-- Z of each volume, relative to center of quadruplet --> +<array name="NSW_sTGC_LayerDeltaZ" values="-16.45;-5.48;5.49;16.46"/> +<!-- Side of the Pad readout --> +<array name="NSW_sTGC_PadSide" values="-1;1;-1;1"/> +<!-- Side of the Strip readout --> +<array name="NSW_sTGC_StripSide" values="1;-1;1;-1"/> +</section> + +<!-- ================ sTGC ========================= --> + + +<section name="NewSmallWheels_sTGC" version="22.1" top_volume="useless" date=" June 22, 2018 " author="Daniel Lellouch"> + +<composition name="NSW_sTGC"> + +<sTGC_Tech type="sTGC_1" geometryLevel="1" nLayers="NSW_sTGC_NbrOfLayers" gasTck="NSW_sTGC_GasTck" pcbTck="NSW_sTGC_pcbTck" Tck="NSW_sTGC_Tck" f4="NSW_sTGC_hFrameNoCapacitor" f5="NSW_sTGC_hFrameNoCapacitor" f6="NSW_sTGC_SideFrame"/> + +<!-- ================ small Pivot ========================= --> + +<sTGC type="sTG1-QS1P" tech="sTGC_1" subType="QS1P" sWidth="346.93" lWidth="743.15" Length="1325.6" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0"> + +<sTGC_readout sPadWidth="279.32" lPadWidth="667.18" padH="80;80;80.24;80.24" rankPadPhi="4;3;2;1" nPadPhi="4;4;3;3" anglePadPhi="5" firstPadPhiDivision_C="-5;-5;-2.5;-2.5" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="-5;-5;-2.5;-2.5" PadPhiShift_A="-2;2;-2;2" rankPadH="1;2;3;4" nPadH="17;17;17;17" firstPadH="65.8;65.8;28.61;28.61" firstPadRow="1;1;1;1" sStripWidth="293.48" lStripWidth="681.33" wireCutout="802.8;829.8;856.8;883.8" nWires="371;370;370;370" firstWire="-333;-331.65;-332.55;-332.1" wireGroupWidth="20" nStrips="406" firstTriggerBand="3;3;3;3" nTriggerBands="28;28;28;28" firstStripInTrigger="44;44;44;44" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13; 12;13;12;13;12;13;10" StripsInBandsLayer2="12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13;12;13;13;12; 13;12;13;12;13;12;10" StripsInBandsLayer3="12;13;12;13;12;13;12;13;13;12;13;12;13;12;13;12;13;12;13;12;13;12; 13;12;13;13;12;13;8" StripsInBandsLayer4="12;13;12;13;12;13;13;12;13;12;13;12;13;12;13;13;12;13;12;13;12;13; 12;13;12;13;13;12;8" nWireGroups="19;20;19;19" firstWireGroup="20;5;10;15"/> +</sTGC> + +<chamberPosition volume="sTG1-QS1P" type="ENDCAP" chamberType="sTGS" radius="1563" zPos="NSW_sTGC_ZSmallPivot" phi0="22.5"/> + +<sTGC type="sTG1-QS2P" tech="sTGC_1" subType="QS2P" sWidth="746.14" lWidth="1102.25" Length="1191.4" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0"> + +<sTGC_readout sPadWidth="677.64" lPadWidth="1026.28" padH="80;80;80.24;80.24" rankPadPhi="2;1;4;3" nPadPhi="2;2;3;3" anglePadPhi="7.5" firstPadPhiDivision_C="0;0;-3.75;-3.75" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="0;0;-3.75;-3.75" PadPhiShift_A="-2;2;-2;2" rankPadH="1;2;3;4" nPadH="15;15;15;15" firstPadH="93.2;93.2;60.09;60.09" firstPadRow="18;18;18;18" sStripWidth="691.8" lStripWidth="1040.43" wireCutout="0;0;0;0" nWires="569;570;570;570" firstWire="-511.2;-511.65;-512.55;-512.1" wireGroupWidth="20" nStrips="365" firstTriggerBand="34;34;34;34" nTriggerBands="30;30;30;30" firstStripInTrigger="1;1;1;1" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="4;13;12;13;12;13;12;13;12;12; 12;13;12;12;13;12;13;12;13;12; 13;12;13;12;;12;13;12;13;11" StripsInBandsLayer2="5;12;13;12;13;12;13;12;13;13; 13;12;13;12;13;12;13;12;13;12; 13;12;13;12;13;12;13;12;13;10" StripsInBandsLayer3="5;12;13;12;13;12;13;12;13;13; 13;12;13;12;13;12;13;12;13;12; 13;12;13;12;13;12;13;12;13;10" StripsInBandsLayer4="7;12;13;12;13;12;13;13;12;12; 12;13;12;13;12;13;13;12;13;12; 13;12;13;12;13;12;13;13;12;7" nWireGroups="29;30;29;29" firstWireGroup="20;5;10;15"/> +</sTGC> + +<chamberPosition volume="sTG1-QS2P" type="ENDCAP" chamberType="sTGS" radius="2831.5" zPos="NSW_sTGC_ZSmallPivot" phi0="22.5"/> + +<sTGC type="sTG1-QS3P" tech="sTGC_1" subType="QS3P" sWidth="1105.96" lWidth="1406.59" Length="1005.8" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0"> + +<sTGC_readout sPadWidth="1037.46" lPadWidth="1330.62" padH="80;80;80.24;80.24" rankPadPhi="2;1;4;3" nPadPhi="2;2;3;3" anglePadPhi="7.5" firstPadPhiDivision_C="0;0;-3.75;-3.75" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="0;0;-3.75;-3.75" PadPhiShift_A="-2;2;-2;2" rankPadH="1;2;3;4" nPadH="12;12;13;13" firstPadH="89.4;89.4;59.88;59.88" firstPadRow="33;33;33;33" sStripWidth="1051.61" lStripWidth="1344.78" wireCutout="0;0;0;0" nWires="739;739;739;738" firstWire="-664.2;-664.65;-663.75;-663.3" wireGroupWidth="20" nStrips="307" firstTriggerBand="64;64;64;64" nTriggerBands="26;26;25;25" firstStripInTrigger="1;1;1;1" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="3;12;13;12;13;12;13;12;13;13; 13;12;13;12;13;12;12;13;12;13; 12;13;12;13;12;5" StripsInBandsLayer2="6;12;13;12;13;13;12;13;12;12; 12;13;12;13;12;13;12;13;12;13; 13;12;13;12;13;3" StripsInBandsLayer3="6;12;13;12;13;13;12;13;12;12; 12;13;12;13;12;13;12;13;12;13; 12;13;12;13;13" StripsInBandsLayer4="7;13;12;13;12;13;12;13;12;12; 12;13;13;12;13;12;13;12;13;12; 13;12;13;13;11" nWireGroups="37;38;38;38" firstWireGroup="20;14;10;3"/> +</sTGC> + +<chamberPosition volume="sTG1-QS3P" type="ENDCAP" chamberType="sTGS" radius="3942.5" zPos="NSW_sTGC_ZSmallPivot" phi0="22.5"/> + + +<!-- ================ small confirm =============== --> + +<sTGC type="sTG1-QS1C" tech="sTGC_1" subType="QS1C" sWidth="346.93" lWidth="743.15" Length="1325.6" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0"> + +<sTGC_readout sPadWidth="293.48" lPadWidth="681.33" padH="76.35;76.35;76.59;76.59" rankPadPhi="1;4;2;3" nPadPhi="4;4;4;4" anglePadPhi="5" firstPadPhiDivision_C="-3.75;-6.25;-3.75;-6.25" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-6.25;-3.75;-6.25;-3.75" PadPhiShift_A="2;-2;2;-2" rankPadH="1;2;3;4" nPadH="17;17;18;18" firstPadH="78.4;78.4;43.21;43.21" firstPadRow="2;2;2;2" sStripWidth="293.48" lStripWidth="681.33" wireCutout="883.8;856.8;829.8;802.8" nWires="370;370;370;371" firstWire="-332.1;-331.65;-332.55;-333" wireGroupWidth="20" nStrips="406" firstTriggerBand="5;5;5;5" nTriggerBands="32;32;31;31" firstStripInTrigger="44;44;44;44" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="12;12;12;11;12;12;12;12;12;12; 12;12;12;12;12;12;11;12;12;12; 12;12;12;12;12;12;12;12;11;12;12;12" StripsInBandsLayer2="12;12;12;12;11;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12; 11;12;12;12;12;12;12;12;12;12;12;11" StripsInBandsLayer3="12;12;12;12;11;12;12;12;12; 12;12;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12;11;10" StripsInBandsLayer4="12;12;12;12;12;12;12;12;11; 12;12;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12;12;9" nWireGroups="20;19;19;19" firstWireGroup="5;10;15;20"/> +</sTGC> + +<chamberPosition volume="sTG1-QS1C" type="ENDCAP" chamberType="sTGS" radius="1563" zPos="NSW_sTGC_ZSmallConfirm" phi0="22.5"/> + +<sTGC type="sTG1-QS2C" tech="sTGC_1" subType="QS2C" sWidth="746.14" lWidth="1102.25" Length="1191.4" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0"> + +<sTGC_readout sPadWidth="691.8" lPadWidth="1040.43" padH="76.35;76.35;76.59;76.59" rankPadPhi="3;2;4;1" nPadPhi="3;3;3;3" anglePadPhi="7.5" firstPadPhiDivision_C="-5.62;-1.87;-5.62;-1.87" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-1.87;-5.62;-1.87;-5.62" PadPhiShift_A="2;-2;2;-2" rankPadH="1;2;3;4" nPadH="16;16;15;15" firstPadH="43.8;43.8;89.29;89.29" firstPadRow="19;19;20;20" sStripWidth="691.8" lStripWidth="1040.43" wireCutout="0;0;0;0" nWires="570;570;570;569" firstWire="-512.1;-511.65;-512.55;-511.2" wireGroupWidth="20" nStrips="365" firstTriggerBand="64;64;64;64" nTriggerBands="31;31;31;31" firstStripInTrigger="1;1;1;1" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="2;12;12;12;11;12;12;12;12;12;12; 12;12;12;12;12;11;12;12;12;12; 12;12;12;12;12;12;12;12;11;12" StripsInBandsLayer2="12;12;12;12;12;12;12;12;12;12;12; 12;12;12;11;12;12;12;12;12;12; ;12;12;12;12;12;12;12;12;12" StripsInBandsLayer3="2;12;12;12;12;12;12;12;12;12;12; 12;12;12;11;12;12;12;12;12;12; ;12;12;12;12;12;12;12;12;12" StripsInBandsLayer4="5;12;11;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12" nWireGroups="30;29;29;29" firstWireGroup="5;10;15;20"/> +</sTGC> + +<chamberPosition volume="sTG1-QS2C" type="ENDCAP" chamberType="sTGS" radius="2831.5" zPos="NSW_sTGC_ZSmallConfirm" phi0="22.5"/> + +<sTGC type="sTG1-QS3C" tech="sTGC_1" subType="QS3C" sWidth="1105.96" lWidth="1406.59" Length="1005.8" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0"> + +<sTGC_readout sPadWidth="1051.61" lPadWidth="1344.78" padH="76.35;76.35;76.59;76.59" rankPadPhi="3;2;4;1" nPadPhi="3;3;3;3" anglePadPhi="7.5" firstPadPhiDivision_C="-5.62;-1.87;-5.62;-1.87" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-1.87;-5.62;-1.87;-5.62" PadPhiShift_A="2;-2;2;-2" rankPadH="1;2;3;4" nPadH="13;13;14;14" firstPadH="61.66;61.66;34.38;34.38" firstPadRow="35;35;35;35" sStripWidth="1051.61" lStripWidth="1344.78" wireCutout="0;0;0;0" nWires="738;739;739;739" firstWire="-663.3;-664.65;-663.75;-664.2" wireGroupWidth="20" nStrips="307" firstTriggerBand="37;37;37;37" nTriggerBands="26;26;25;25" firstStripInTrigger="1;1;1;1" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="6;7;12;12;12;12;12;12;11;11; 12;12;12;12;12;12;12;12;12;12; 12;11;12;13;12;12" StripsInBandsLayer2="2;10;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12; 12;12;12;12;13;12" StripsInBandsLayer3="2;10;12;12;12;12;12;12;12;12; 12;12;12;12;12;12;12;12;12;12; 12;12;12;13;13" StripsInBandsLayer4="1;12;12;12;12;12;12;11;12;12; 12;12;12;12;12;12;12;12;12;12; 12;12;12;13;11" nWireGroups="38;38;38;38" firstWireGroup="5;14;15;3"/> +</sTGC> + +<chamberPosition volume="sTG1-QS3C" type="ENDCAP" chamberType="sTGS" radius="3942.5" zPos="NSW_sTGC_ZSmallConfirm" phi0="22.5"/> + + +<!-- ================ Large Pivot ==================== --> + +<sTGC type="sTG1-QL1P" tech="sTGC_1" subType="QL1P" sWidth="542.61" lWidth="1206.82" Length="1332" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0"> + +<sTGC_readout sPadWidth="476.42" lPadWidth="1126.66" padH="81.42;81.42;81.66;81.66" rankPadPhi="4;3;2;1" nPadPhi="6;6;7;7" anglePadPhi="5" firstPadPhiDivision_C="-10;-10;-12.5;-12.5" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="-10;-10;-12.5;-12.5" PadPhiShift_A="-2;2;-2;2" rankPadH="1;2;3;4" nPadH="17;17;16;16" firstPadH="54.39;54.39;98.15;98.15" firstPadRow="1;1;2;2" sStripWidth="490.84" lStripWidth="1141.09" wireCutout="808;835;862;889" nWires="621;620;620;620" firstWire="-558;-556.65;-557.55;-557.1" wireGroupWidth="20" nStrips="408" firstTriggerBand="3;3;3;3" nTriggerBands="30;30;30;30" firstStripInTrigger="45;45;45;45" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="13;13;12;13;13;13;12;13;13;12;13;13;13;12;13;13;12;13;13;13;12;13; 13;12;13;13;13;12;13;13" StripsInBandsLayer2="13;13;12;13;13;13;12;13;13;13;12;13;13;12;13;13;13;12;13;13;13;12; 13;13;12;13;13;13;12;13" StripsInBandsLayer3="13;13;12;13;13;13;12;13;13;13;12;13;13;13;12;13;13;13;12;13;13;13; 12;13;13;13;12;13;13;13" StripsInBandsLayer4="13;13;12;13;13;13;13;12;13;13;13;12;13;13;13;12;13;13;13;13;12;13; 13;13;12;13;13;13;12;13" nWireGroups="32;32;32;32" firstWireGroup="20;5;10;15"/> +</sTGC> + +<chamberPosition volume="sTG1-QL1P" type="ENDCAP" chamberType="sTGL" radius="1595" zPos="NSW_sTGC_ZLargePivot" phi0="0.0"/> + +<sTGC type="sTG1-QL2P" tech="sTGC_1" subType="QL2P" sWidth="1211.81" lWidth="1807.5" Length="1194.6" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0"> + +<sTGC_readout sPadWidth="1144.12" lPadWidth="1727.34" padH="81.42;81.42;81.66;81.66" rankPadPhi="2;1;4;3" nPadPhi="4;4;5;5" anglePadPhi="7.5" firstPadPhiDivision_C="-7.5;-7.5;-11.25;-11.25" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="-7.5;-7.5;-11.25;-11.25" PadPhiShift_A="-2;2;-2;2" rankPadH="1;2;3;4" nPadH="14;14;15;15" firstPadH="99.51;99.51;65.69;65.69" firstPadRow="18;18;18;18" sStripWidth="490.84" lStripWidth="1141.09" wireCutout="0;0;0;0" nWires="953;954;954;954" firstWire="-856.8;-857.25;-858.15;-857.7" wireGroupWidth="20" nStrips="366" firstTriggerBand="33;33;33;33" nTriggerBands="30;30;30;29" firstStripInTrigger="1;1;1;1" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="9;6;12;13;13;12;13;13;13;12;13;13;1313;13;13;13;12;13;13;12;13;13;13; 12;13;13;12;13;13;13" StripsInBandsLayer2="9;6;13;13;12;13;13;13;12;13;13;12;1213;13;13;12;13;13;13;12;13;13;13; 12;13;13;12;13;13;13" StripsInBandsLayer3="7;8;12;13;13;13;12;13;13;13;12;13;1313;13;12;13;13;13;12;13;13;13;12; 13;13;13;12;13;13;13" StripsInBandsLayer4="7;8;13;13;13;12;13;13;13;12;13;13;1313;13;12;13;13;13;12;13;13;13;12; 13;13;13;12;13;13" nWireGroups="48;49;49;48" firstWireGroup="20;5;10;15"/> +</sTGC> + +<chamberPosition volume="sTG1-QL2P" type="ENDCAP" chamberType="sTGL" radius="2868.3" zPos="NSW_sTGC_ZLargePivot" phi0="0.0"/> + +<sTGC type="sTG1-QL3P" tech="sTGC_1" subType="QL3P" sWidth="1813.68" lWidth="2111" Length="1153" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="545.3" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode="539.26"> + +<sTGC_readout sPadWidth="1745.99" lPadWidth="2054" padH="81.42;81.42;81.66;81.66" + rankPadPhi="2;1;4;3" nPadPhi="4;4;5;5" anglePadPhi="7.5" firstPadPhiDivision_C="-7.5;-7.5;-11.25;-11.25" PadPhiShift_C="2;-2;2;-2" firstPadPhiDivision_A="-7.5;-7.5;-11.25;-11.25" PadPhiShift_A="-2;2;-2;2" rankPadH="1;2;3;4" nPadH="15;15;14;14" firstPadH="32.38;32.38;83.57;83.57" firstPadRow="32;32;33;33" sStripWidth="1760.42" lStripWidth="2054" wireCutout="0;0;0;0" nWires="1133;1134;1134;1134" firstWire="-1018.8;-1019.25;-1019.7;-1019.7" wireGroupWidth="20" nStrips="353" firstTriggerBand="63;63;63;62" nTriggerBands="28;28;28;29" firstStripInTrigger="1;1;1;1" firstStripWidth="1.6;3.2;1.6;3.2" StripsInBandsLayer1="10;13;12;13;13;12;13;13;13; 12;13;13;12;13;13;12;13;13;13; 12;13;13;12;13;13;13;12;13" StripsInBandsLayer2="11;13;12;13;13;13;12;13;13; 12;13;13;13;12;13;13;13;12;13; 13;13;12;13;13;12;13;13;11" StripsInBandsLayer3="13;13;13;12;13;13;13;12;13; 13;13;12;13;13;13;12;13;13;13; 12;13;13;13;12;13;13;13;8" StripsInBandsLayer4="1;13;13;13;12;13;13;13;13;12; 13;13;13;12;13;13;13;12;13;13; 13;13;12;13;13;13;12;13;7" nWireGroups="57;58;58;57" firstWireGroup="20;5;10;15"/> +</sTGC> + +<chamberPosition volume="sTG1-QL3P" type="ENDCAP" chamberType="sTGL" radius="4054.5" zPos="NSW_sTGC_ZLargePivot" phi0="0.0"/> + +<!-- =============== Large Confirm ===================== --> + +<sTGC type="sTG1-QL1C" tech="sTGC_1" subType="QL1C" sWidth="542.61" lWidth="1206.82" Length="1332" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0"> + +<sTGC_readout sPadWidth="490.84" lPadWidth="1141.09" padH="85.07;85.07;85.31;85.31" rankPadPhi="4;3;2;1" nPadPhi="6;6;6;6" anglePadPhi="5" firstPadPhiDivision_C="-8.75;-11.25;-8.75;-11.25" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-11.25;-8.75;-11.25;-8.75" PadPhiShift_A="2;-2;2;-2" rankPadH="1;2;3;4" nPadH="16;16;16;16" firstPadH="77.79;77.79;38.01;38.01" firstPadRow="1;1;1;1" sStripWidth="490.84" lStripWidth="1141.09" wireCutout="889;862;835;808" nWires="620;620;620;621" firstWire="-557.1;-556.65;-557.55;-558" wireGroupWidth="20" nStrips="408" firstTriggerBand="3;3;3;3" nTriggerBands="29;29;28;28" firstStripInTrigger="44;44;44;44" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="13;13;13;14;13;13;14;13;13;13; 14;13;13;14;13;13;13;14;13;13; 13;14;13;13;14;13;13;13" StripsInBandsLayer2="13;13;13;14;13;13;14;13;13;14; 13;13;13;14;13;13;14;13;13;14; 13;13;13;14;13;13;14;13" StripsInBandsLayer3="14;13;13;14;13;13;14;13;13;14; 13;13;14;13;13;14;13;13;14;13; 13;13;14;13;13;14;13;13" StripsInBandsLayer4="14;13;13;14;13;13;14;13;13;14; 13;13;14;13;13;14;13;13;14;13; 14;13;13;14;13;13;14;13" nWireGroups="32;32;32;32" firstWireGroup="5;10;15;20"/> +</sTGC> + +<chamberPosition volume="sTG1-QL1C" type="ENDCAP" chamberType="sTGL" radius="1595" zPos="NSW_sTGC_ZLargeConfirm" phi0="0.0"/> + +<sTGC type="sTG1-QL2C" tech="sTGC_1" subType="QL2C" sWidth="1211.81" lWidth="1807.5" Length="1194.6" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="0" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode ="0"> + +<sTGC_readout sPadWidth="1158.55" lPadWidth="1741.77" padH="85.07;85.07;85.31;85.31" rankPadPhi="3;2;4;1" nPadPhi="4;4;4;4" anglePadPhi="7.5" firstPadPhiDivision_C="-5.62;-9.37;-5.62;-9.37" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-9.37;-5.62;-9.37;-5.62" PadPhiShift_A="2;-2;2;-2" rankPadH="1;2;3;4" nPadH="14;14;14;14" firstPadH="99.84;99.84;63.9;63.9" firstPadRow="17;17;17;17" sStripWidth="1158.55" lStripWidth="1741.77" wireCutout="0;0;0;0" nWires="954;954;954;953" firstWire="-857.7;-857.25;-858.15;-856.8" wireGroupWidth="20" nStrips="366" firstTriggerBand="30;30;30;30" nTriggerBands="29;29;29;29" firstStripInTrigger="1;1;1;1" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="12;5;13;13;13;14;13;13;14;13; 13;13;14;13;13;14;13;13;13;14; 13;13;14;13;13;13;14;13;13" StripsInBandsLayer2="11;5;13;14;13;13;14;13;13;13; 14;13;13;14;13;13;14;13;13;14; 13;13;13;14;13;13;14;13;13" StripsInBandsLayer3="10;7;13;13;14;13;13;14;13;13; 13;14;13;13;14;13;13;14;13;13; 14;13;13;14;13;13;14;13;13" StripsInBandsLayer4="9;7;13;14;13;13;14;13;13;14; 13;13;14;13;13;14;13;14;13;13; 14;13;13;14;13;13;14;13;12" nWireGroups="49;49;48;48" firstWireGroup="5;10;15;20"/> +</sTGC> + +<chamberPosition volume="sTG1-QL2C" type="ENDCAP" chamberType="sTGL" radius="2868.3" zPos="NSW_sTGC_ZLargeConfirm" phi0="0.0"/> + +<sTGC type="sTG1-QL3C" tech="sTGC_1" subType="QL3C" sWidth="1813.68" lWidth="2111" Length="1153" Tck="NSW_sTGC_Tck" xFrame="NSW_sTGC_SideFrame" ysFrame="NSW_sTGC_hFrameNoCapacitor" ylFrame="NSW_sTGC_hFrameCapacitor" yCutout="545.3" stripPitch="NSW_sTGC_StripPitch" wirePitch="NSW_sTGC_WirePitch" stripWidth="NSW_sTGC_StripWidth" yCutoutCathode="539.26"> + +<sTGC_readout sPadWidth="1760.42" lPadWidth="2054" padH="85.07;85.07;85.31;85.31" rankPadPhi="3;2;4;1" nPadPhi="4;4;4;4" anglePadPhi="7.5" firstPadPhiDivision_C="-5.62;-9.37;-5.62;-9.37" PadPhiShift_C="-2;2;-2;2" firstPadPhiDivision_A="-9.37;-5.62;-9.37;-5.62" PadPhiShift_A="2;-2;2;-2" rankPadH="1;2;3;4" nPadH="13;13;14;14" firstPadH="83.76;83.76;51.17;51.17" firstPadRow="31;31;31;31" sStripWidth="1760.42" lStripWidth="2054" wireCutout="0;0;0;0" nWires="1134;1134;1134;1133" firstWire="-1019.7;-1019.25;-1020.15;-1018.8" wireGroupWidth="20" nStrips="353" firstTriggerBand="60;60;60;60" nTriggerBands="28;28;28;28" firstStripInTrigger="1;1;1;1" firstStripWidth="3.2;1.6;3.2;1.6" StripsInBandsLayer1="3;13;13;13;13;14;13;13;14;13;13; 13;14;13;13;14;13;13;13;14;13; 13;13;14;13;13;14;8" StripsInBandsLayer2="2;14;13;13;14;13;13;13;14;13;13; 14;13;13;14;13;13;13;14;13;13; 14;13;13;14;13;13;7" StripsInBandsLayer3="2;14;13;13;14;13;13;14;13;13;14; 13;13;14;13;13;13;14;13;13;14; 13;13;14;13;13;14;4" StripsInBandsLayer4="3;14;13;13;14;13;13;14;13;13;14; 13;13;14;13;13;14;13;13;14;13; 13;14;13;13;14;13;3" nWireGroups="58;58;57;57" firstWireGroup="5;10;15;20"/> +</sTGC> + +<chamberPosition volume="sTG1-QL3C" type="ENDCAP" chamberType="sTGL" radius="4054.5" zPos="NSW_sTGC_ZLargeConfirm" phi0="0.0"/> + +</composition> +</section> + + +<!-- ========== MicroMegas ============================== --> + +<section name="NSW_MM_Parameters" version="1" top_volume="useless" date="December 16 2014" author="S.Chen" > + +<!-- Frames. "f1": frame width close to the trapezium large side. "f2": frame width close to the trapezium small side. "f3": frame width close to the trapezium oblique side --> + +<!-- Distance from IP, labeled zmin_MM in Parameter Book --> +<var name="NSW_MM_LM_distanceFromIP" value="7536"/> +<var name="NSW_MM_SM_distanceFromIP" value="7072"/> +<!-- Thickness of Multilayer and the subcomponent (mm)--> +<var name="NSW_MM_GasTck" value="5.04"/> +<var name="NSW_MM_ROPcbTck" value="11.69"/> +<var name="NSW_MM_DriftPcbTck" value="11.284"/> +<var name="NSW_MM_MultilayerTck" value="NSW_NbrOfLayers* NSW_MM_GasTck + (NSW_NbrOfDriftPcb) * NSW_MM_DriftPcbTck+ ( NSW_NbrOfROPcb) * NSW_MM_ROPcbTck" /> <!-- Thickness of one multilayer --> + +<!-- Large sector modules (LM1" LM2). Modules are all trapezoid. ""Height"": radial envelope" ""base/top Width"": upper/lower side of the trapezoid--> +<var name="NSW_MM_LM1_InnerRadius" value="923" /> +<var name="NSW_MM_LM1_Length" value="2310" /> +<var name="NSW_MM_LM1_outerRadius" value="NSW_MM_LM1_InnerRadius+NSW_MM_LM1_Length" /> +<var name="NSW_MM_LM1_f1" value="30"/> +<var name="NSW_MM_LM1_f2" value="30"/> +<var name="NSW_MM_LM1_f3" value="100"/> +<var name="NSW_MM_LMGap_Length" value="5" /> <!-- Radial gap between LM1 and LM2 --> +<var name="NSW_MM_LM2_InnerRadius" value="NSW_MM_LM1_outerRadius+NSW_MM_LMGap_Length" /> +<var name="NSW_MM_LM2_Length" value="1410" /> +<var name="NSW_MM_LM2_outerRadius" value="NSW_MM_LM2_InnerRadius+NSW_MM_LM2_Length" /> +<var name="NSW_MM_LM1_baseWidth" value="640" /> +<var name="NSW_MM_LM1_topWidth" value="2008.5" /> +<var name="NSW_MM_LM2_baseWidth" value="2022.8" /> +<var name="NSW_MM_LM2_topWidth" value="2220" /> +<var name="NSW_MM_LM2_f1" value="30"/> +<var name="NSW_MM_LM2_f2" value="30"/> +<var name="NSW_MM_LM2_f3" value="100"/> +<!-- Small sector modules (SM1" SM2). Modules are all trapezoids. ""Height"": radial envelope" ""base/top Width"": upper/lower side --> +<var name="NSW_MM_SM1_InnerRadius" value="895" /> +<var name="NSW_MM_SM1_Length" value="2210" /> +<var name="NSW_MM_SM1_outerRadius" value="NSW_MM_SM1_InnerRadius+NSW_MM_SM1_Length" /> +<var name="NSW_MM_SMGap_Length" value="5" /> <!-- Radial gap between SM1 and SM2 --> +<var name="NSW_MM_SM1_f1" value="30"/> +<var name="NSW_MM_SM1_f2" value="30"/> +<var name="NSW_MM_SM1_f3" value="100"/> +<var name="NSW_MM_SM2_InnerRadius" value="NSW_MM_SM1_outerRadius+NSW_MM_SMGap_Length" /> +<var name="NSW_MM_SM2_Length" value="1350" /> +<var name="NSW_MM_SM2_outerRadius" value="NSW_MM_SM2_InnerRadius+NSW_MM_SM2_Length" /> +<var name="NSW_MM_SM1_baseWidth" value="500" /> +<var name="NSW_MM_SM1_topWidth" value="1319.2" /> +<var name="NSW_MM_SM2_baseWidth" value="1321.1" /> +<var name="NSW_MM_SM2_topWidth" value="1821.5" /> +<var name="NSW_MM_SM2_f1" value="30"/> +<var name="NSW_MM_SM2_f2" value="30"/> +<var name="NSW_MM_SM2_f3" value="100"/> + +<var name="NSW_MM_LargeSector_ZCENTER" value="ZCenter_Global+232."/> +<var name="NSW_MM_SmallSector_ZCENTER" value="ZCenter_Global-232."/> + + +<!-- Thickness of inter-multilayer spacers --> +<var name="NSW_MM_SpacerThickness" value="50" /> + +<!-- Global z-coordinate for the sector center --> +<!-- <var name="NSW_MM_LargeSector_ZCENTER" value="NSW_MM_LM_distanceFromIP + 4.*NSW_MM_DriftPcbTck + 4.*NSW_MM_ROPcbTck + 4.*NSW_MM_GasTck + NSW_MM_SpacerThickness/2."/> +<var name="NSW_MM_SmallSector_ZCENTER" value="NSW_MM_SM_distanceFromIP + 4.*NSW_MM_DriftPcbTck + 4.*NSW_MM_ROPcbTck + 4.*NSW_MM_GasTck + NSW_MM_SpacerThickness/2."/> --> + +</section> + +<section name="NewSmallWheelsMM" version="1" top_volume="useless" date="December 16 2014" author="S.Chen" > + + +<!-- Technologies --> +<mm_Tech type="MM_1" geometryLevel="1" nLayers="NSW_NbrOfLayers" gasTck="NSW_MM_GasTck" driftPcbTck="NSW_MM_DriftPcbTck" ROPcbTck="NSW_MM_ROPcbTck" Tck="NSW_MM_MultilayerTck" /> +<!--Chilufya<mmSpacer_Tech type="Spa_1" Tck="NSW_MM_SpacerThickness" />Chilufya--> + +<!-- large wheel --> +<micromegas type="sMD1-1-1" tech="MM_1" subType="M1L1" sWidth="NSW_MM_LM1_baseWidth" lWidth="NSW_MM_LM1_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_LM1_Length" ylFrame="NSW_MM_LM1_f1" ysFrame="NSW_MM_LM1_f2" xFrame="NSW_MM_LM1_f3"> +<mm_readout stripPitch="0.45" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.; 0.; 0.02618; -0.02618" readoutSide="-1; 1; -1; 1" zPos="NSW_MM_LargeSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_LM1_InnerRadius" roLength="NSW_MM_LM1_Length"/> +</micromegas> +<micromegas type="sMD1-2-1" tech="MM_1" subType="M2L1" sWidth="NSW_MM_LM2_baseWidth" lWidth="NSW_MM_LM2_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_LM2_Length" ylFrame="NSW_MM_LM2_f1" ysFrame="NSW_MM_LM2_f2" xFrame="NSW_MM_LM2_f3"> +<mm_readout stripPitch="0.45" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.; 0.; 0.02618; -0.02618" readoutSide="-1; 1; -1; 1" zPos="NSW_MM_LargeSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_LM2_InnerRadius" roLength="NSW_MM_LM2_Length"/> +</micromegas> +<micromegas type="sMD1-1-2" tech="MM_1" subType="M1L2" sWidth="NSW_MM_LM1_baseWidth" lWidth="NSW_MM_LM1_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_LM1_Length" ylFrame="NSW_MM_LM1_f1" ysFrame="NSW_MM_LM1_f2" xFrame="NSW_MM_LM1_f3"> +<mm_readout stripPitch="0.45" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.02618; -0.02618; 0.; 0." readoutSide="-1; 1; -1; 1" zPos="NSW_MM_LargeSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_LM1_InnerRadius" roLength="NSW_MM_LM1_Length"/> +</micromegas> +<micromegas type="sMD1-2-2" tech="MM_1" subType="M2L2" sWidth="NSW_MM_LM2_baseWidth" lWidth="NSW_MM_LM2_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_LM2_Length" ylFrame="NSW_MM_LM2_f1" ysFrame="NSW_MM_LM2_f2" xFrame="NSW_MM_LM2_f3"> +<mm_readout stripPitch="0.45" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.02618; -0.02618; 0.; 0." readoutSide="-1; 1; -1; 1" zPos="NSW_MM_LargeSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_LM2_InnerRadius" roLength="NSW_MM_LM2_Length"/> +</micromegas> + +<!--Chilufya<mmSpacer type="spa1-1" tech="Spa_1" sWidth="NSW_MM_LM1_baseWidth" lWidth="NSW_MM_LM1_topWidth" Tck="NSW_MM_SpacerThickness" Length="NSW_MM_LM1_Length" /> +<mmSpacer type="spa1-2" tech="Spa_1" sWidth="NSW_MM_LM2_baseWidth" lWidth="NSW_MM_LM2_topWidth" Tck="NSW_MM_SpacerThickness" Length="NSW_MM_LM2_Length" />Chilufya--> + + +<!-- small wheel --> +<micromegas type="sMD3-1-1" tech="MM_1" subType="M1S1" sWidth="NSW_MM_SM1_baseWidth" lWidth="NSW_MM_SM1_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_SM1_Length" ylFrame="NSW_MM_SM1_f1" ysFrame="NSW_MM_SM1_f2" xFrame="NSW_MM_SM1_f3"> +<mm_readout stripPitch="0.425" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.; 0.; 0.02618; -0.02618" readoutSide="-1; 1; -1; 1" zPos="NSW_MM_SmallSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_SM1_InnerRadius" roLength="NSW_MM_SM1_Length"/> +</micromegas> +<micromegas type="sMD3-2-1" tech="MM_1" subType="M2S1" sWidth="NSW_MM_SM2_baseWidth" lWidth="NSW_MM_SM2_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_SM2_Length" ylFrame="NSW_MM_SM2_f1" ysFrame="NSW_MM_SM2_f2" xFrame="NSW_MM_SM2_f3"> +<mm_readout stripPitch="0.425" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.; 0.; 0.02618; -0.02618" readoutSide="-1; 1; -1; 1" zPos="NSW_MM_SmallSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_SM2_InnerRadius" roLength="NSW_MM_SM2_Length"/> +</micromegas> +<micromegas type="sMD3-1-2" tech="MM_1" subType="M1S2" sWidth="NSW_MM_SM1_baseWidth" lWidth="NSW_MM_SM1_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_SM1_Length" ylFrame="NSW_MM_SM1_f1" ysFrame="NSW_MM_SM1_f2" xFrame="NSW_MM_SM1_f3"> +<mm_readout stripPitch="0.425" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.02618; -0.02618; 0.; 0." readoutSide="-1; 1; -1; 1" zPos="NSW_MM_SmallSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_SM1_InnerRadius" roLength="NSW_MM_SM1_Length"/> +</micromegas> +<micromegas type="sMD3-2-2" tech="MM_1" subType="M2S2" sWidth="NSW_MM_SM2_baseWidth" lWidth="NSW_MM_SM2_topWidth" Tck="NSW_MM_MultilayerTck" Length="NSW_MM_SM2_Length" ylFrame="NSW_MM_SM2_f1" ysFrame="NSW_MM_SM2_f2" xFrame="NSW_MM_SM2_f3"> +<mm_readout stripPitch="0.425" gasThickness="NSW_MM_GasTck" pcbThickness="NSW_MM_ROPcbTck" driftThickness="NSW_MM_DriftPcbTck" stereoAngle="0.02618; -0.02618; 0.; 0." readoutSide="-1; 1; -1; 1" zPos="NSW_MM_SmallSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." distanceFromZAxis="NSW_MM_SM2_InnerRadius" roLength="NSW_MM_SM2_Length"/> +</micromegas> +<!--Chilufya<mmSpacer type="spa3-1" tech="Spa_1" sWidth="NSW_MM_SM1_baseWidth" lWidth="NSW_MM_SM1_topWidth" Tck="NSW_MM_SpacerThickness" Length="NSW_MM_SM1_Length" /> +<mmSpacer type="spa3-2" tech="Spa_1" sWidth="NSW_MM_SM2_baseWidth" lWidth="NSW_MM_SM2_topWidth" Tck="NSW_MM_SpacerThickness" Length="NSW_MM_SM2_Length" />Chilufya--> + +<composition name="NSW_MM" > +<!-- A-SIDE --> + +<!-- LARGE SECTOR --> + +<!-- MM multilayer 1 --> +<chamberPosition volume="sMD1-1-1" radius="(NSW_MM_LM1_InnerRadius+NSW_MM_LM1_outerRadius)/2" zPos="NSW_MM_LargeSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="0" /> +<chamberPosition volume="sMD1-2-1" radius="(NSW_MM_LM2_InnerRadius+NSW_MM_LM2_outerRadius)/2" zPos="NSW_MM_LargeSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="0" /> +<!-- spacer --> +<!--Chilufya<mposPhi volume="spa1-1" ncopy="8" R_Z="(NSW_MM_LM1_InnerRadius+NSW_MM_LM1_outerRadius)/2;NSW_MM_LargeSector_ZCENTER" Phi0="0" rot=" 90.; 270.; 90." /> +<mposPhi volume="spa1-2" ncopy="8" R_Z="(NSW_MM_LM2_InnerRadius+NSW_MM_LM2_outerRadius)/2;NSW_MM_LargeSector_ZCENTER" Phi0="0" rot=" 90.; 270.; 90." />Chilufya--> + +<!-- MM multilayer 2 --> +<chamberPosition volume="sMD1-1-2" radius="(NSW_MM_LM1_InnerRadius+NSW_MM_LM1_outerRadius)/2" zPos="NSW_MM_LargeSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="0" /> +<chamberPosition volume="sMD1-2-2" radius="(NSW_MM_LM2_InnerRadius+NSW_MM_LM2_outerRadius)/2" zPos="NSW_MM_LargeSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="0" /> + +<!-- SMALL SECTOR --> + +<!-- MM multilayer 1 --> +<chamberPosition volume="sMD3-1-1" radius="(NSW_MM_SM1_InnerRadius+NSW_MM_SM1_outerRadius)/2" zPos="NSW_MM_SmallSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="22.5" /> +<chamberPosition volume="sMD3-2-1" radius="(NSW_MM_SM2_InnerRadius+NSW_MM_SM2_outerRadius)/2" zPos="NSW_MM_SmallSector_ZCENTER-NSW_MM_MultilayerTck/2.-NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="22.5" /> + +<!-- spacer --> +<!--Chilufya<mposPhi volume="spa3-1" ncopy="8" R_Z="(NSW_MM_SM1_InnerRadius+NSW_MM_SM1_outerRadius)/2;NSW_MM_SmallSector_ZCENTER" Phi0="22.5" rot=" 90.; 270.; 90." /> +<mposPhi volume="spa3-2" ncopy="8" R_Z="(NSW_MM_SM2_InnerRadius+NSW_MM_SM2_outerRadius)/2;NSW_MM_SmallSector_ZCENTER" Phi0="22.5" rot=" 90.; 270.; 90." />Chilufya--> + +<!-- MM multilayer 2 --> +<chamberPosition volume="sMD3-1-2" radius="(NSW_MM_SM1_InnerRadius+NSW_MM_SM1_outerRadius)/2" zPos="NSW_MM_SmallSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="22.5" /> +<chamberPosition volume="sMD3-2-2" radius="(NSW_MM_SM2_InnerRadius+NSW_MM_SM2_outerRadius)/2" zPos="NSW_MM_SmallSector_ZCENTER+NSW_MM_MultilayerTck/2.+NSW_MM_SpacerThickness/2." type="ENDCAP" chamberType="Micromegas" phi0="22.5" /> + +<!-- C-SIDE --> +<!-- LARGE SECTOR --> +<!-- spacer --> +<!--Chilufya<mposPhi volume="spa1-1" ncopy="8" R_Z="(NSW_MM_LM1_InnerRadius+NSW_MM_LM1_outerRadius)/2;-NSW_MM_LargeSector_ZCENTER" Phi0="0" rot=" 90.; 90.; 90." /> +<mposPhi volume="spa1-2" ncopy="8" R_Z="(NSW_MM_LM2_InnerRadius+NSW_MM_LM2_outerRadius)/2;-NSW_MM_LargeSector_ZCENTER" Phi0="0" rot=" 90.; 90.; 90." />Chilufya--> + +<!-- SMALL SECTOR --> +<!-- spacer --> +<!--Chilufya<mposPhi volume="spa3-1" ncopy="8" R_Z="(NSW_MM_SM1_InnerRadius+NSW_MM_SM1_outerRadius)/2;-NSW_MM_SmallSector_ZCENTER" Phi0="22.5" rot=" 90.; 90.; 90." /> +<mposPhi volume="spa3-2" ncopy="8" R_Z="(NSW_MM_SM2_InnerRadius+NSW_MM_SM2_outerRadius)/2;-NSW_MM_SmallSector_ZCENTER" Phi0="22.5" rot=" 90.; 90.; 90." />Chilufya--> + +</composition> + +</section> + + + + + + + +<!--====================================SPACER FRAME===============================================--> + +<section name = "LS and SS Spacer Frames" + version = "0.0" + date = "25-07-2017" + author = "Georgian Engineering Team - Niko Tsutskiridze" + top_volume = "NSW_Spacer"> + +<!-- LS Spacer Ftame --> +<gvxy name="LS_StructuralPlate_Main" material="Aluminium" dZ="5.9"> + <gvxy_point X_Y="226.; 958."/> + <gvxy_point X_Y="914.15; 3281."/> + <gvxy_point X_Y="1007.3; 4613."/> + <gvxy_point X_Y="0.01; 4613."/> + <gvxy_point X_Y="0.01; 958."/> +</gvxy> + +<gvxy name="LS_StructuralPlate_Cut1" material="Aluminium" dZ="7."> + <gvxy_point X_Y="902.87; 4123."/> + <gvxy_point X_Y="932.24; 4543."/> + <gvxy_point X_Y="40.; 4543."/> + <gvxy_point X_Y="40.; 4123."/> +</gvxy> + +<gvxy name="LS_StructuralPlate_Cut2" material="Aluminium" dZ="7."> + <gvxy_point X_Y="774.41; 3913.25"/> + <gvxy_point X_Y="770.86; 3963."/> + <gvxy_point X_Y="135.; 3963."/> + <gvxy_point X_Y="135.; 3821.33"/> +</gvxy> + +<gvxy name="LS_StructuralPlate_Cut3" material="Aluminium" dZ="7."> + <gvxy_point X_Y="778.83; 3639.29"/> + <gvxy_point X_Y="792.52; 3835.04"/> + <gvxy_point X_Y="203.42; 3750.35"/> + <gvxy_point X_Y="203.46; 3720.65"/> +</gvxy> + +<gvxy name="LS_StructuralPlate_Cut4" material="Aluminium" dZ="7."> + <gvxy_point X_Y="477.15; 3586.36"/> + <gvxy_point X_Y="477.24; 3606.18"/> + <gvxy_point X_Y="135.; 3654.58"/> + <gvxy_point X_Y="135.; 3541.07"/> +</gvxy> + +<gvxy name="LS_StructuralPlate_Cut5" material="Aluminium" dZ="7."> + <gvxy_point X_Y="762.41; 3404.48"/> + <gvxy_point X_Y="772.57; 3549.82"/> + <gvxy_point X_Y="286.06; 3485.41"/> + <gvxy_point X_Y="286.1; 3465.58"/> +</gvxy> + +<gvxy name="LS_StructuralPlate_Cut6" material="Aluminium" dZ="7."> + <gvxy_point X_Y="600.; 3314.58"/> + <gvxy_point X_Y="602.55; 3354.42"/> + <gvxy_point X_Y="60.; 3424.01"/> + <gvxy_point X_Y="60.; 3314.58"/> +</gvxy> + +<box name="LS_StructuralPlate_Cut7" material="Aluminium" X_Y_Z="138.; 70.; 7. " /> + +<gvxy name="LS_StructuralPlate_Cut8" material="Aluminium" dZ="7."> + <gvxy_point X_Y="678.71; 2838.18"/> + <gvxy_point X_Y="772.71; 3155.5"/> + <gvxy_point X_Y="63.52; 3155.5"/> +</gvxy> + +<gvxy name="LS_StructuralPlate_Cut9" material="Aluminium" dZ="7."> + <gvxy_point X_Y="533.6; 2715.5"/> + <gvxy_point X_Y="551.94; 2791.05"/> + <gvxy_point X_Y="40.; 3055.11"/> + <gvxy_point X_Y="40.; 2715.5"/> +</gvxy> + +<gvxy name="LS_StructuralPlate_Cut10" material="Aluminium" dZ="7."> + <gvxy_point X_Y="459.9; 2169.9"/> + <gvxy_point X_Y="585.97; 2595.5"/> + <gvxy_point X_Y="117.42; 2595.5"/> +</gvxy> + +<gvxy name="LS_StructuralPlate_Cut11" material="Aluminium" dZ="7."> + <gvxy_point X_Y="391.41; 2095.5"/> + <gvxy_point X_Y="135.; 2414.15"/> + <gvxy_point X_Y="135.; 2095.5"/> +</gvxy> + +<gvxy name="LS_StructuralPlate_Cut12" material="Aluminium" dZ="7."> + <gvxy_point X_Y="344.91; 1865.18"/> + <gvxy_point X_Y="389.44; 2015.5"/> + <gvxy_point X_Y="258.79; 2015.5"/> +</gvxy> +<gvxy name="LS_StructuralPlate_Cut13" material="Aluminium" dZ="7."> + <gvxy_point X_Y="275.45; 1825.5"/> + <gvxy_point X_Y="172.35; 2005.44"/> + <gvxy_point X_Y="135.; 1995.5"/> + <gvxy_point X_Y="135.; 1825.5"/> +</gvxy> + +<gvxy name="LS_StructuralPlate_Cut14" material="Aluminium" dZ="7."> + <gvxy_point X_Y="173.8; 1028."/> + <gvxy_point X_Y="380.41; 1725.5"/> + <gvxy_point X_Y="40.; 1725.5"/> + <gvxy_point X_Y="40.; 1028."/> +</gvxy> + +<subtraction name="LS_StructuralPlateSub" > + <posXYZ volume="LS_StructuralPlate_Main" /> + <posXYZ volume="LS_StructuralPlate_Cut1" /> + <posXYZ volume="LS_StructuralPlate_Cut2" /> + <posXYZ volume="LS_StructuralPlate_Cut3" /> + <posXYZ volume="LS_StructuralPlate_Cut4" /> + <posXYZ volume="LS_StructuralPlate_Cut5" /> + <posXYZ volume="LS_StructuralPlate_Cut6" /> + <posXYZ volume="LS_StructuralPlate_Cut7" X_Y_Z="589.; 3235.5; 0." /> + <posXYZ volume="LS_StructuralPlate_Cut8" /> + <posXYZ volume="LS_StructuralPlate_Cut9" /> + <posXYZ volume="LS_StructuralPlate_Cut10" /> + <posXYZ volume="LS_StructuralPlate_Cut11" /> + <posXYZ volume="LS_StructuralPlate_Cut12" /> + <posXYZ volume="LS_StructuralPlate_Cut13" /> + <posXYZ volume="LS_StructuralPlate_Cut14" /> +</subtraction> + +<composition name="LS_StructuralPlate" > + <posXYZ volume="LS_StructuralPlateSub" /> + <posXYZ volume="LS_StructuralPlateSub" rot="0. ; 180. ; 0." /> +</composition> + +<box name="LS_Central_reference_bar" material="Aluminium" X_Y_Z="1704.; 100.; 27.8 " /> + +<box name="LS_Channel_section_L2000_Main" material="Aluminium" X_Y_Z="50.; 2000.; 30. " /> +<box name="LS_Channel_section_L2000_Cut" material="Aluminium" X_Y_Z="40.; 2050.; 20. " /> +<subtraction name="LS_Channel_section_L2000" > + <posXYZ volume="LS_Channel_section_L2000_Main" /> + <posXYZ volume="LS_Channel_section_L2000_Cut" /> +</subtraction> + +<box name="LS_Channel_section_L1200_Main" material="Aluminium" X_Y_Z="50.; 1200.; 30. " /> +<subtraction name="LS_Channel_section_L1200" > + <posXYZ volume="LS_Channel_section_L1200_Main" /> + <posXYZ volume="LS_Channel_section_L2000_Cut" /> +</subtraction> + +<box name="LS_Channel_section_L850_Main" material="Aluminium" X_Y_Z="50.; 850.; 30. " /> +<subtraction name="LS_Channel_section_L850" > + <posXYZ volume="LS_Channel_section_L850_Main" /> + <posXYZ volume="LS_Channel_section_L2000_Cut" /> +</subtraction> + +<box name="LS_Channel_section_L1000_Main" material="Aluminium" X_Y_Z="50.; 1000.; 30. " /> +<subtraction name="LS_Channel_section_L1000" > + <posXYZ volume="LS_Channel_section_L1000_Main" /> + <posXYZ volume="LS_Channel_section_L2000_Cut" /> +</subtraction> + +<box name="LS_UProfile_L1460_Main" material="Aluminium" X_Y_Z="20.; 1460.; 30. " /> +<box name="LS_UProfile_L1460_Cut" material="Aluminium" X_Y_Z="20.; 1500.; 24. " /> +<subtraction name="LS_UProfile_L1460" > + <posXYZ volume="LS_UProfile_L1460_Main" /> + <posXYZ volume="LS_UProfile_L1460_Cut" X_Y_Z="-3.; 0.; 0." /> +</subtraction> + +<box name="LS_UProfile_L750_Main" material="Aluminium" X_Y_Z="20.; 750.; 30. " /> +<subtraction name="LS_UProfile_L750" > + <posXYZ volume="LS_UProfile_L750_Main" /> + <posXYZ volume="LS_UProfile_L1460_Cut" X_Y_Z="3.; 0.; 0." /> +</subtraction> + +<gvxy name="LS_Top_Interface" material="Aluminium" dZ="30."> + <gvxy_point X_Y="914.3; 3484.44"/> + <gvxy_point X_Y="1146.47; 3571.68"/> + <gvxy_point X_Y="1141.27; 3656.86"/> + <gvxy_point X_Y="1054.98; 3656.86"/> + <gvxy_point X_Y="1054.98; 4070."/> + <gvxy_point X_Y="813.64; 4070."/> + <gvxy_point X_Y="774.65; 3494.2"/> +</gvxy> + +<gvxy name="LS_Bottom_Grabber_interface" material="Aluminium" dZ="30."> + <gvxy_point X_Y="-801.54; 2552.21"/> + <gvxy_point X_Y="-858.34; 2743.97"/> + <gvxy_point X_Y="-591.97; 2822.88"/> + <gvxy_point X_Y="-535.17; 2631.11"/> +</gvxy> + +<gvxy name="LS_Bottom_Interface" material="Aluminium" dZ="30."> + <gvxy_point X_Y="-558.42; 1731.46"/> + <gvxy_point X_Y="-616.93; 1928.98"/> + <gvxy_point X_Y="-678.34; 1910.78"/> + <gvxy_point X_Y="-727.9; 1985.99"/> + <gvxy_point X_Y="-570.48; 2124.21"/> + <gvxy_point X_Y="-437.49; 2163.6"/> + <gvxy_point X_Y="-329.56; 1799.25"/> +</gvxy> + +<box name="LS_MM_Connectors" material="Aluminium" X_Y_Z="76.; 40.; 30. " /> +<composition name="LS_MM_Connectors_Assembly" > + <posXYZ volume="LS_MM_Connectors" X_Y_Z="323.24; 1278.98; 0." rot="0. ; 0. ; -16.5" /> + <posXYZ volume="LS_MM_Connectors" X_Y_Z="596.23; 2200.58; 0." rot="0. ; 0. ; -16.5" /> + <posXYZ volume="LS_MM_Connectors" X_Y_Z="800.97; 2891.78; 0." rot="0. ; 0. ; -16.5" /> + <posXYZ volume="LS_MM_Connectors" X_Y_Z="922.31; 3368.81; 0." rot="0. ; 0. ; -4." /> + <posXYZ volume="LS_MM_Connectors" X_Y_Z="986.76; 4290.41; 0." rot="0. ; 0. ; -4." /> + <posXYZ volume="LS_MM_Connectors" X_Y_Z="824.; 4615.; 0." rot="0. ; 0. ; 90." /> +</composition> + +<box name="LS_KM_Joint" material="ShieldSteel" X_Y_Z="150.; 118.; 48. " /> + +<composition name="LS_Spacer_Frame_Assembly" > + <posXYZ volume="LS_StructuralPlate" X_Y_Z="0.; 0.; 18." /> + <posXYZ volume="LS_StructuralPlate" X_Y_Z="0.; 0.; -18." /> + <posXYZ volume="LS_Central_reference_bar" X_Y_Z="0.; 3235.5; 0." /> + <posXYZ volume="LS_Channel_section_L2000" X_Y_Z="0.; 2185.49; 0." /> + <posXYZ volume="LS_Channel_section_L1200" X_Y_Z="0.; 3885.51; 0." /> + <posXYZ volume="LS_Channel_section_L850" X_Y_Z="130.5; 3710.51; 0." /> + <posXYZ volume="LS_Channel_section_L850" X_Y_Z="-130.5; 3710.51; 0." /> + <posXYZ volume="LS_Channel_section_L1000" X_Y_Z="130.5; 2223.; 0." /> + <posXYZ volume="LS_Channel_section_L1000" X_Y_Z="-130.5; 2223.; 0." /> + <posXYZ volume="LS_UProfile_L1460" X_Y_Z="252.; 2455.49; 0." /> + <posXYZ volume="LS_UProfile_L1460" X_Y_Z="-252.; 2455.49; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="LS_UProfile_L750" X_Y_Z="252.; 3760.5; 0." /> + <posXYZ volume="LS_UProfile_L750" X_Y_Z="-252.; 3760.5; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="LS_UProfile_L750" X_Y_Z="465.; 3760.5; 0." /> + <posXYZ volume="LS_UProfile_L750" X_Y_Z="-465.; 3760.5; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="LS_UProfile_L750" X_Y_Z="678.; 3760.5; 0." /> + <posXYZ volume="LS_UProfile_L750" X_Y_Z="-678.; 3760.5; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="LS_UProfile_L750" X_Y_Z="465.; 2551.; 0." /> + <posXYZ volume="LS_UProfile_L750" X_Y_Z="-465.; 2551.; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="LS_Top_Interface" X_Y_Z="0.; 0.; 0." /> + <posXYZ volume="LS_Top_Interface" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="LS_Bottom_Grabber_interface" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." /> + <posXYZ volume="LS_Bottom_Grabber_interface" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="LS_Bottom_Interface" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." /> + <posXYZ volume="LS_Bottom_Interface" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="LS_MM_Connectors_Assembly" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." /> + <posXYZ volume="LS_MM_Connectors_Assembly" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="LS_MM_Connectors" X_Y_Z="0.; 956.; 0." rot="0. ; 0. ; 90." /> + <posXYZ volume="LS_MM_Connectors" X_Y_Z="0.; 4615.; 0." rot="0. ; 0. ; 90." /> + <posXYZ volume="LS_KM_Joint" X_Y_Z="-1130.01; 3970.; 0." rot="0. ; 0. ; 0." /> + <posXYZ volume="LS_KM_Joint" X_Y_Z="1130.01; 3970.; 0." rot="0. ; 0. ; 0." /> + <posXYZ volume="LS_KM_Joint" X_Y_Z="656.6; 1798.8; 0." rot="0. ; 0. ; -16.5" /> +</composition> + +<composition name="LS" > + <posXYZ volume="LS_Spacer_Frame_Assembly" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 0." /> + <posXYZ volume="LS_Spacer_Frame_Assembly" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 45." /> + <posXYZ volume="LS_Spacer_Frame_Assembly" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 90." /> + <posXYZ volume="LS_Spacer_Frame_Assembly" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 135." /> + <posXYZ volume="LS_Spacer_Frame_Assembly" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 180." /> + <posXYZ volume="LS_Spacer_Frame_Assembly" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 225." /> + <posXYZ volume="LS_Spacer_Frame_Assembly" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 270." /> + <posXYZ volume="LS_Spacer_Frame_Assembly" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 315." /> +</composition> +<!-- LS Spacer Ftame --> + +<!-- SS Spacer Ftame --> +<gvxy name="SS_StructuralPlate_Main" material="Aluminium" dZ="5.9"> + <gvxy_point X_Y="154.8; 930."/> + <gvxy_point X_Y="745.; 4114.46"/> + <gvxy_point X_Y="745.; 4425."/> + <gvxy_point X_Y="0.01; 4425."/> + <gvxy_point X_Y="0.01; 930."/> +</gvxy> + +<gvxy name="SS_StructuralPlate_Cut1" material="Aluminium" dZ="7."> + <gvxy_point X_Y="685.; 4242.5"/> + <gvxy_point X_Y="685.; 4375."/> + <gvxy_point X_Y="25.; 4375."/> + <gvxy_point X_Y="25.; 4242.5"/> +</gvxy> + +<gvxy name="SS_StructuralPlate_Cut2" material="Aluminium" dZ="7."> + <gvxy_point X_Y="449.11; 4102.75"/> + <gvxy_point X_Y="446.87; 4122.5"/> + <gvxy_point X_Y="125.; 4122.5"/> + <gvxy_point X_Y="125.; 4028.36"/> +</gvxy> + +<gvxy name="SS_StructuralPlate_Cut3" material="Aluminium" dZ="7."> + <gvxy_point X_Y="577.21; 3867.18"/> + <gvxy_point X_Y="620.57; 4101.07"/> + <gvxy_point X_Y="131.86; 3988.9"/> + <gvxy_point X_Y="131.86; 3969.4"/> +</gvxy> + +<gvxy name="SS_StructuralPlate_Cut4" material="Aluminium" dZ="7."> + <gvxy_point X_Y="395.9; 3847.5"/> + <gvxy_point X_Y="398.14; 3867.25"/> + <gvxy_point X_Y="125.; 3929.94"/> + <gvxy_point X_Y="125.; 3847.5"/> +</gvxy> + +<gvxy name="SS_StructuralPlate_Cut5" material="Aluminium" dZ="7."> + <gvxy_point X_Y="495.98; 3705.39"/> + <gvxy_point X_Y="495.98; 3747.5"/> + <gvxy_point X_Y="25.; 3747.5"/> + <gvxy_point X_Y="25.; 3475.7"/> +</gvxy> + +<gvxy name="SS_StructuralPlate_Cut6" material="Aluminium" dZ="7."> + <gvxy_point X_Y="488.74; 3225.16"/> + <gvxy_point X_Y="576.8; 3700.3"/> + <gvxy_point X_Y="45.63; 3441.26"/> +</gvxy> + +<gvxy name="SS_StructuralPlate_Cut7" material="Aluminium" dZ="7."> + <gvxy_point X_Y="408.58; 3177.5"/> + <gvxy_point X_Y="417.35; 3215.48"/> + <gvxy_point X_Y="25.; 3406.82"/> + <gvxy_point X_Y="25.; 3177.5"/> +</gvxy> + +<box name="SS_StructuralPlate_Cut8" material="Aluminium" X_Y_Z="92.; 70.; 7. " /> + +<gvxy name="SS_StructuralPlate_Cut9" material="Aluminium" dZ="7."> + <gvxy_point X_Y="429.19; 3037.5"/> + <gvxy_point X_Y="25.; 3037.5"/> + <gvxy_point X_Y="25.; 2483.96"/> +</gvxy> + +<gvxy name="SS_StructuralPlate_Cut10" material="Aluminium" dZ="7."> + <gvxy_point X_Y="342.44; 2435.8"/> + <gvxy_point X_Y="445.53; 2992.05"/> + <gvxy_point X_Y="50.98; 2451.7"/> + <gvxy_point X_Y="59.05; 2435.8"/> +</gvxy> + +<gvxy name="SS_StructuralPlate_Cut11" material="Aluminium" dZ="7."> + <gvxy_point X_Y="275.17; 2072.87"/> + <gvxy_point X_Y="330.64; 2372.16"/> + <gvxy_point X_Y="310.98; 2395.8"/> + <gvxy_point X_Y="39.37; 2395.8"/> +</gvxy> + +<gvxy name="SS_StructuralPlate_Cut12" material="Aluminium" dZ="7."> + <gvxy_point X_Y="245.39; 2045.82"/> + <gvxy_point X_Y="25.; 2347.65"/> + <gvxy_point X_Y="25.; 2045.82"/> +</gvxy> + +<gvxy name="SS_StructuralPlate_Cut13" material="Aluminium" dZ="7."> + <gvxy_point X_Y="144.83; 1534.74"/> + <gvxy_point X_Y="203.73; 1852.5"/> + <gvxy_point X_Y="125.; 1852.5"/> + <gvxy_point X_Y="125.; 1536.56"/> +</gvxy> + +<gvxy name="SS_StructuralPlate_Cut14" material="Aluminium" dZ="7."> + <gvxy_point X_Y="123.38; 980."/> + <gvxy_point X_Y="201.04; 1399."/> + <gvxy_point X_Y="25.; 1399."/> + <gvxy_point X_Y="25.; 980."/> +</gvxy> + +<subtraction name="SS_StructuralPlateSub" > + <posXYZ volume="SS_StructuralPlate_Main" /> + <posXYZ volume="SS_StructuralPlate_Cut1" /> + <posXYZ volume="SS_StructuralPlate_Cut2" /> + <posXYZ volume="SS_StructuralPlate_Cut3" /> + <posXYZ volume="SS_StructuralPlate_Cut4" /> + <posXYZ volume="SS_StructuralPlate_Cut5" /> + <posXYZ volume="SS_StructuralPlate_Cut6" /> + <posXYZ volume="SS_StructuralPlate_Cut7" /> + <posXYZ volume="SS_StructuralPlate_Cut8" X_Y_Z="-340.5; 3107.5; 0." /> + <posXYZ volume="SS_StructuralPlate_Cut9" /> + <posXYZ volume="SS_StructuralPlate_Cut10" /> + <posXYZ volume="SS_StructuralPlate_Cut11" /> + <posXYZ volume="SS_StructuralPlate_Cut12" /> + <posXYZ volume="SS_StructuralPlate_Cut13" /> + <posXYZ volume="SS_StructuralPlate_Cut14" /> +</subtraction> + +<composition name="SS_StructuralPlate" > + <posXYZ volume="SS_StructuralPlateSub" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." /> + <posXYZ volume="SS_StructuralPlateSub" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." /> +</composition> + +<box name="SS_Central_reference_bar" material="Aluminium" X_Y_Z="1012.; 100.; 28. " /> + +<box name="SS_Channel_section_L1100_Main" material="Aluminium" X_Y_Z="50.; 1100.; 30. " /> +<subtraction name="SS_Channel_section_L1100" > + <posXYZ volume="SS_Channel_section_L1100_Main" /> + <posXYZ volume="LS_Channel_section_L2000_Cut" /> +</subtraction> + + +<box name="SS_Channel_section_L650_Main" material="Aluminium" X_Y_Z="50.; 650.; 30. " /> +<subtraction name="SS_Channel_section_L650" > + <posXYZ volume="SS_Channel_section_L650_Main" /> + <posXYZ volume="LS_Channel_section_L2000_Cut" /> +</subtraction> + +<box name="SS_UProfile_L1000_Main" material="Aluminium" X_Y_Z="20.; 1000.; 30. " /> +<subtraction name="SS_UProfile_L1000" > + <posXYZ volume="SS_UProfile_L1000_Main" /> + <posXYZ volume="LS_UProfile_L1460_Cut" X_Y_Z="-3.; 0.; 0." /> +</subtraction> + +<box name="SS_UProfile_L920_Main" material="Aluminium" X_Y_Z="20.; 920.; 30. " /> +<subtraction name="SS_UProfile_L920" > + <posXYZ volume="SS_UProfile_L920_Main" /> + <posXYZ volume="LS_UProfile_L1460_Cut" X_Y_Z="-3.; 0.; 0." /> +</subtraction> + +<box name="SS_UProfile_L1200_Main" material="Aluminium" X_Y_Z="20.; 1200.; 30. " /> +<subtraction name="SS_UProfile_L1200" > + <posXYZ volume="SS_UProfile_L1200_Main" /> + <posXYZ volume="LS_UProfile_L1460_Cut" X_Y_Z="-3.; 0.; 0." /> +</subtraction> + +<box name="SS_UProfile_L700_Main" material="Aluminium" X_Y_Z="20.; 700.; 30. " /> +<subtraction name="SS_UProfile_L700" > + <posXYZ volume="SS_UProfile_L700_Main" /> + <posXYZ volume="LS_UProfile_L1460_Cut" X_Y_Z="-3.; 0.; 0." /> +</subtraction> + +<gvxy name="SS_Top_Interface" material="Aluminium" dZ="30."> + <gvxy_point X_Y="849.99; 3705.17"/> + <gvxy_point X_Y="849.99; 4260."/> + <gvxy_point X_Y="627.69; 4260."/> + <gvxy_point X_Y="627.69; 4106.34"/> + <gvxy_point X_Y="564.77; 3758.03"/> +</gvxy> + +<gvxy name="SS_Bottom_Grabber_interface" material="Aluminium" dZ="30."> + <gvxy_point X_Y="454.99; 1875."/> + <gvxy_point X_Y="454.99; 2075."/> + <gvxy_point X_Y="255.; 2075."/> + <gvxy_point X_Y="255.; 1875."/> +</gvxy> + +<gvxy name="SS_Bottom_Interface" material="Aluminium" dZ="30."> + <gvxy_point X_Y="442.2; 1397.5"/> + <gvxy_point X_Y="442.2; 1560.65"/> + <gvxy_point X_Y="397.; 1560.65"/> + <gvxy_point X_Y="397.; 1792.5"/> + <gvxy_point X_Y="194.29; 1792.5"/> + <gvxy_point X_Y="149.53; 1434.71"/> + <gvxy_point X_Y="204.54; 1397.5"/> +</gvxy> + +<box name="SS_MM_Connectors" material="Aluminium" X_Y_Z="76.; 40.; 30. " /> +<box name="SS_MM_Connectors_Lar" material="Aluminium" X_Y_Z="120.; 40.; 30. " /> +<composition name="SS_MM_Connectors_Assembly" > + <posXYZ volume="SS_MM_Connectors" X_Y_Z="214.86; 1243.14; 0." rot="0. ; 0. ; -10.5" /> + <posXYZ volume="SS_MM_Connectors" X_Y_Z="376.17; 2113.54; 0." rot="0. ; 0. ; -10.5" /> + <posXYZ volume="SS_MM_Connectors" X_Y_Z="497.16; 2766.34; 0." rot="0. ; 0. ; -10.5" /> + <posXYZ volume="SS_MM_Connectors" X_Y_Z="626.36; 3463.34; 0." rot="0. ; 0. ; -10.5" /> + <posXYZ volume="SS_MM_Connectors_Lar" X_Y_Z="766.02; 4337.75; 0." rot="0. ; 0. ; -10.5" /> + <posXYZ volume="SS_MM_Connectors" X_Y_Z="624.; 4427.; 0." rot="0. ; 0. ; 90." /> +</composition> + +<box name="SS_KM_Joint" material="ShieldSteel" X_Y_Z="154.; 101.; 48. " /> + +<composition name="SS_Spacer_Frame_Assembly" > + <posXYZ volume="SS_StructuralPlate" X_Y_Z="0.; 0.; 18." /> + <posXYZ volume="SS_StructuralPlate" X_Y_Z="0.; 0.; -18." /> + <posXYZ volume="SS_Central_reference_bar" X_Y_Z="0.; 3107.5; 0." /> + <posXYZ volume="LS_Channel_section_L2000" X_Y_Z="0.; 2057.49; 0." /> + <posXYZ volume="SS_Channel_section_L1100" X_Y_Z="0.; 3707.51; 0." /> + <posXYZ volume="SS_Channel_section_L1100" X_Y_Z="-110.5; 3707.51; 0." /> + <posXYZ volume="SS_Channel_section_L1100" X_Y_Z="110.5; 3707.51; 0." /> + <posXYZ volume="SS_Channel_section_L650" X_Y_Z="-110.5; 1722.; 0." /> + <posXYZ volume="SS_Channel_section_L650" X_Y_Z="110.5; 1722.; 0." /> + <posXYZ volume="SS_UProfile_L1000" X_Y_Z="-345.; 3742.5; 0." /> + <posXYZ volume="SS_UProfile_L1000" X_Y_Z="345.; 3742.5; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="SS_UProfile_L920" X_Y_Z="-195.; 3782.5; 0." /> + <posXYZ volume="SS_UProfile_L920" X_Y_Z="195.; 3782.5; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="SS_UProfile_L1200" X_Y_Z="-195.; 2457.49; 0." /> + <posXYZ volume="SS_UProfile_L1200" X_Y_Z="195.; 2457.49; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="SS_UProfile_L700" X_Y_Z="-360.; 2587.5; 0." /> + <posXYZ volume="SS_UProfile_L700" X_Y_Z="360.; 2587.5; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="SS_Top_Interface" X_Y_Z="0.; 0.; 0." /> + <posXYZ volume="SS_Top_Interface" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="SS_Bottom_Grabber_interface" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." /> + <posXYZ volume="SS_Bottom_Grabber_interface" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="SS_Bottom_Interface" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." /> + <posXYZ volume="SS_Bottom_Interface" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="SS_MM_Connectors_Assembly" X_Y_Z="0.; 0.; 0." rot="0. ; 0. ; 0." /> + <posXYZ volume="SS_MM_Connectors_Assembly" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="SS_MM_Connectors" X_Y_Z="0.; 928.; 0." rot="0. ; 0. ; 90." /> + <posXYZ volume="SS_MM_Connectors" X_Y_Z="0.; 4427.; 0." rot="0. ; 0. ; 90." /> + <posXYZ volume="SS_KM_Joint" X_Y_Z="-927.01; 4160.; 0." rot="0. ; 0. ; 0." /> + <posXYZ volume="SS_KM_Joint" X_Y_Z="927.01; 4160.; 0." rot="0. ; 0. ; 0." /> + <posXYZ volume="SS_KM_Joint" X_Y_Z="-532.01; 1975.; 0." rot="0. ; 0. ; 0." /> +</composition> + +<composition name="SS_AssemblyRot" > + <posXYZ volume="SS_Spacer_Frame_Assembly" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 22.5" /> +</composition> + +<composition name="SS" > + <posXYZ volume="SS_AssemblyRot" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 0." /> + <posXYZ volume="SS_AssemblyRot" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 45." /> + <posXYZ volume="SS_AssemblyRot" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 90." /> + <posXYZ volume="SS_AssemblyRot" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 135." /> + <posXYZ volume="SS_AssemblyRot" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 180." /> + <posXYZ volume="SS_AssemblyRot" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 225." /> + <posXYZ volume="SS_AssemblyRot" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 270." /> + <posXYZ volume="SS_AssemblyRot" X_Y_Z="0.; 0.; 0." rot=" 0. ; 0. ; 315." /> +</composition> +<!-- End SS Spacer_Frame--> + +<composition name="LS_and_SS_SideA" > + <posXYZ volume="LS" X_Y_Z="0.; 0.; 7641." rot=" 0. ; 0. ; 0." /> + <posXYZ volume="SS" X_Y_Z="0.; 0.; 7177." rot=" 0. ; 0. ; 0." /> +</composition> + +<composition name="LS_and_SS_SideC" > + <posXYZ volume="LS" X_Y_Z="0.; 0.; -7641." rot=" 0. ; 0. ; 0." /> + <posXYZ volume="SS" X_Y_Z="0.; 0.; -7177." rot=" 0. ; 0. ; 0." /> +</composition> + +<composition name="NSW_Spacer" > + <posXYZ volume="LS_and_SS_SideA" /> + <posXYZ volume="LS_and_SS_SideC" /> +</composition> + +</section> + + + + + + + + + + + + + + + +<!--====================================Support Structures and Hub===============================================--> + +<section name = "NSW Aluminum Structure and HUB" + version = "0.0" + date = "25-04-2017" + author = "Georgian Engineering Team - Niko Tsutskiridze" + top_volume = "NSW_Aluminum_Structure_and_HUB"> + +<!-- ********************************************** New Hub ************************************************** --> + +<!-- Horizontal Shielding --> +<gvxysx name="Hub_Outer_Plate1" material="Lead" dZ="517.5"> + <gvxy_point X_Y="-163.1; 820.05"/> + <gvxy_point X_Y=" -169.25; 850.95"/> +</gvxysx> + + <gvxysx name="Hub_Outer_Plate2" material="PolyBoron207HD5" dZ="517.5"> + <gvxy_point X_Y="-163.1; 820."/> + <gvxy_point X_Y=" -153.15; 770."/> +</gvxysx> + +<gvxysx name="Hub_Outer_Plate3" material="Lead" dZ="504."> + <gvxy_point X_Y="-163.1; 820.05"/> + <gvxy_point X_Y=" -169.25; 850.95"/> +</gvxysx> + +<gvxysx name="Hub_Outer_Plate4" material="PolyBoron207HD5" dZ="545."> + <gvxy_point X_Y="-163.1; 820."/> + <gvxy_point X_Y=" -153.15; 770."/> +</gvxysx> + +<gvxysx name="Hub_Outer_Plate5" material="Lead" dZ="30."> + <gvxy_point X_Y="-163.1; 820.05"/> + <gvxy_point X_Y=" -169.25; 850.95"/> +</gvxysx> + +<gvxysx name="Hub_Outer_Plate6" material="PolyBoron207HD5" dZ="30."> + <gvxy_point X_Y="-163.1; 820."/> + <gvxy_point X_Y=" -153.15; 770."/> +</gvxysx> + +<gvxysx name="Hub_Outer_Plate7" material="Lead" dZ="85."> + <gvxy_point X_Y="-163.1; 820.05"/> + <gvxy_point X_Y=" -169.25; 850.95"/> +</gvxysx> + +<gvxysx name="Hub_Outer_Plate8" material="PolyBoron207HD5" dZ="126."> +<gvxy_point X_Y="-163.1; 820."/> + <gvxy_point X_Y=" -153.15; 770."/> +</gvxysx> + +<composition name="Horizontal_Shielding_ForRot_Spec" > + <posXYZ volume="Hub_Outer_Plate5" X_Y_Z="0.; 0.; 908.2" /> + <posXYZ volume="Hub_Outer_Plate6" X_Y_Z="0.; 0.; 908.2" /> +</composition> + +<composition name="Horizontal_Shielding_ForRot_Spec2" > + <posXYZ volume="Hub_Outer_Plate3" X_Y_Z="0.; 0.; 248.7" rot=" 0. ; 0. ; 22.5" /> + <posXYZ volume="Hub_Outer_Plate4" X_Y_Z="0.; 0.; 228.2" rot=" 0. ; 0. ; 22.5" /> +</composition> + +<composition name="Horizontal_Shielding_ForRot" > + <posXYZ volume="Hub_Outer_Plate1" X_Y_Z="0.; 0.; 643.45" /> + <posXYZ volume="Hub_Outer_Plate2" X_Y_Z="0.; 0.; 643.45" /> + <posXYZ volume="Horizontal_Shielding_ForRot_Spec2" /> + <posXYZ volume="Hub_Outer_Plate7" X_Y_Z="0.; 0.; 39.2" /> + <posXYZ volume="Hub_Outer_Plate8" X_Y_Z="0.; 0.; 18.7" /> +</composition> + +<composition name="Horizontal_Shielding" > + <posXYZ volume="Horizontal_Shielding_ForRot" rot=" 0. ; 0. ; 0." /> + <posXYZ volume="Horizontal_Shielding_ForRot" rot=" 0. ; 0. ; 45." /> + <posXYZ volume="Horizontal_Shielding_ForRot" rot=" 0. ; 0. ; 90." /> + <posXYZ volume="Horizontal_Shielding_ForRot" rot=" 0. ; 0. ; 135." /> + <posXYZ volume="Horizontal_Shielding_ForRot" rot=" 0. ; 0. ; 180." /> + <posXYZ volume="Horizontal_Shielding_ForRot" rot=" 0. ; 0. ; 225." /> + <posXYZ volume="Horizontal_Shielding_ForRot" rot=" 0. ; 0. ; 270." /> + <posXYZ volume="Horizontal_Shielding_ForRot" rot=" 0. ; 0. ; 315." /> + <posXYZ volume="Horizontal_Shielding_ForRot_Spec" rot=" 0. ; 0. ; 22.5" /> + <posXYZ volume="Horizontal_Shielding_ForRot_Spec" rot=" 0. ; 0. ; 67.5" /> + <posXYZ volume="Horizontal_Shielding_ForRot_Spec" rot=" 0. ; 0. ; -22.5" /> + <posXYZ volume="Horizontal_Shielding_ForRot_Spec" rot=" 0. ; 0. ; -67.5" /> +</composition> +<!-- End Horizontal Shielding (New Hub) --> + +<!-- Other Parts of New Hub --> +<pcon name="HUB_Extension_inner_tube" material="ShieldSteel" nbPhi="20"> + <polyplane Rio_Z="172.; 225.; 997.75"/> + <polyplane Rio_Z=" 152.3; 225.; 0."/> +</pcon> +<tubs name="HUB_Extension_plate_HO_side" material="ShieldSteel" Rio_Z="172.5; 530.; 59.2" /> +<tubs name="Copper_disk_Extension" material="Copper" Rio_Z="225.5; 454.5; 998." /> +<tubs name="HUB_Extension_outer_tube" material="ShieldSteel" Rio_Z="455.5; 530.; 998.7" /> + +<pcon name="HUB_Main_part_inner_tube" material="ShieldSteel" nbPhi="20"> + <polyplane Rio_Z="148.7; 225.; 858.5"/> + <polyplane Rio_Z=" 137.; 225.; 0."/> +</pcon> + +<tubs name="Copper_disk_Main_part" material="Copper" Rio_Z="225.5; 699.5; 760." /> + +<gvxysxy name="Plate_IP_Main" material="ShieldSteel" dZ="91.6"> + <gvxy_point X_Y="769.95; 153.16"/> + <gvxy_point X_Y="652.77; 436.16"/> + <gvxy_point X_Y="436.16; 652.77"/> + <gvxy_point X_Y="153.16; 769.95"/> +</gvxysxy> + +<tubs name="Plate_IP_Cut_Tube" material="ShieldSteel" Rio_Z="0.; 226.; 95." /> + +<subtraction name="Plate_IP" > + <posXYZ volume="Plate_IP_Main" /> + <posXYZ volume="Plate_IP_Cut_Tube" /> +</subtraction> + +<gvxysxy name="HUB_Main_part_outer_tube_Main" material="ShieldSteel" dZ="767.7"> + <gvxy_point X_Y="769.95; 153.16"/> + <gvxy_point X_Y="652.77; 436.16"/> + <gvxy_point X_Y="436.16; 652.77"/> + <gvxy_point X_Y="153.16; 769.95"/> +</gvxysxy> + +<tubs name="HUB_Main_part_outer_tube_Cut_Tube" material="ShieldSteel" Rio_Z="0.; 700.; 770." /> + +<subtraction name="HUB_Main_part_outer_tube" > + <posXYZ volume="HUB_Main_part_outer_tube_Main" /> + <posXYZ volume="HUB_Main_part_outer_tube_Cut_Tube" /> +</subtraction> + +<gvxysxy name="Plate_HO_Main" material="ShieldSteel" dZ="78."> + <gvxy_point X_Y="769.95; 153.16"/> + <gvxy_point X_Y="652.77; 436.16"/> + <gvxy_point X_Y="436.16; 652.77"/> + <gvxy_point X_Y="153.16; 769.95"/> +</gvxysxy> + +<tubs name="Plate_HO_Cut_Tube" material="ShieldSteel" Rio_Z="0.; 150.5; 80." /> + +<subtraction name="Plate_HO" > + <posXYZ volume="Plate_HO_Main" /> + <posXYZ volume="Plate_HO_Cut_Tube" /> +</subtraction> + +<tubs name="Plate_HO_SupportTube" material="ShieldSteel" Rio_Z="585.; 770.; 21.4" profile="-15.; 210." nbPhi="20"/> + +<tubs name="Disque_shileding_ext" material="PolyBoron207HD5" Rio_Z="532.5; 800.; 40." /> +<tubs name="Plaque_polyboron_droite_v2" material="PolyBoron207HD5" Rio_Z="532.5; 582.5; 200." /> + +<composition name="Hub_Other_Parts_Assembly" > + <posXYZ volume="HUB_Extension_plate_HO_side" X_Y_Z="0.; 0.; 1920.6" /> + <posXYZ volume="HUB_Extension_inner_tube" X_Y_Z="0.; 0.; 892.25" /> + <posXYZ volume="Copper_disk_Extension" X_Y_Z="0.; 0.; 1391.95" /> + <posXYZ volume="HUB_Extension_outer_tube" X_Y_Z="0.; 0.; 1391.6" /> + <posXYZ volume="HUB_Main_part_inner_tube" X_Y_Z="0.; 0.; -45.8" /> + <posXYZ volume="Copper_disk_Main_part" X_Y_Z="0.; 0.; 434.2" /> + <posXYZ volume="Plate_IP" /> + <posXYZ volume="HUB_Main_part_outer_tube" X_Y_Z="0.; 0.; 430.3" /> + <posXYZ volume="Disque_shileding_ext" X_Y_Z="0.; 0.; 944.2" /> + <posXYZ volume="Plaque_polyboron_droite_v2" X_Y_Z="0.; 0.; 1064.25" /> + <posXYZ volume="Plate_HO" X_Y_Z="0.; 0.; 853.2" /> + <posXYZ volume="Plate_HO_SupportTube" X_Y_Z="0.; 0.; 902.95" /> +</composition> +<!-- End Other Parts of New Hub --> + +<composition name="New_Hub" > + <posXYZ volume="Hub_Other_Parts_Assembly" /> + <posXYZ volume="Horizontal_Shielding" /> +</composition> +<!-- ************************************************************************************** End New Hub *********************************************** --> + +<!-- **************************************************** Inner Spoke ******************************************************************* --> +<gvxysx name="Base_Leg" material="Aluminium" dZ="390."> + <gvxy_point X_Y="40.; 531.5"/> + <gvxy_point X_Y=" 40.; -501.5"/> + <gvxy_point X_Y="150.; -501.5"/> + <gvxy_point X_Y=" 150.; -531.5"/> +</gvxysx> + +<gvxy name="JOINING_BAR3" material="Aluminium" dZ="150."> + <gvxy_point X_Y="75.; 23."/> + <gvxy_point X_Y="75.; 7."/> + <gvxy_point X_Y="640.; 7."/> + <gvxy_point X_Y="640.; -23."/> + <gvxy_point X_Y="-640.; -23."/> + <gvxy_point X_Y="-640.; 7."/> + <gvxy_point X_Y="-75.; 7."/> + <gvxy_point X_Y="-75.; 23."/> +</gvxy> + +<box name="LATERAL_PLATE_L" material="Aluminium" X_Y_Z="21.; 1680.; 390. " /> + +<gvxysx name="Front_plate2" material="Aluminium" dZ="14."> + <gvxy_point X_Y="98.65; 2867.18"/> + <gvxy_point X_Y=" 89.94; 2805.19"/> + <gvxy_point X_Y="89.94; 2587.18"/> +</gvxysx> + +<gvxysx name="LS_OUTER3_MainBox" material="Aluminium" dZ="30."> + <gvxy_point X_Y="323.7; 450."/> + <gvxy_point X_Y=" 197.21; -450."/> +</gvxysx> + +<box name="LS_OUTER3_CutBox" material="Aluminium" X_Y_Z="250.; 600.; 35. " /> + +<subtraction name="LS_OUTER3" > + <posXYZ volume="LS_OUTER3_MainBox" /> + <posXYZ volume="LS_OUTER3_CutBox" X_Y_Z=" 0.; -50.; 0. " /> +</subtraction> + +<gvxysx name="REAR_PLATE1" material="Aluminium" dZ="30."> + <gvxy_point X_Y="176.95; 309.25"/> + <gvxy_point X_Y=" 90.03; -309.25"/> +</gvxysx> + +<gvxy name="REAR_PLATE2" material="Aluminium" dZ="30."> + <gvxy_point X_Y="273.95; 174.5"/> + <gvxy_point X_Y="224.9; -174.5"/> + <gvxy_point X_Y="125.; -174.5"/> + <gvxy_point X_Y="125.; -154.5"/> + <gvxy_point X_Y="-125.; -154.5"/> + <gvxy_point X_Y="-125.; -174.5"/> + <gvxy_point X_Y="-224.9; -174.5"/> + <gvxy_point X_Y="-273.95; 174.5"/> +</gvxy> + +<box name="SHIM1" material="Aluminium" X_Y_Z="700.; 150.; 21.6 " /> +<box name="SHIM2" material="Aluminium" X_Y_Z="350.; 150.; 21.6 " /> + +<gvxysx name="REAR_PLATE3" material="Aluminium" dZ="30."> + <gvxy_point X_Y="323.7; 80."/> + <gvxy_point X_Y=" 301.21; -80."/> +</gvxysx> + +<box name="KM_FRONT_PLATE1" material="ShieldSteel" X_Y_Z="34.; 160.; 250. " /> +<box name="KM_LOCKING_PLATE1" material="ShieldSteel" X_Y_Z="20.; 120.; 200. " /> + +<gvxy name="JOINING_BAR2" material="Aluminium" dZ="29."> + <gvxy_point X_Y="175.; 75."/> + <gvxy_point X_Y="964.81; -64.27"/> + <gvxy_point X_Y="938.77; -211.99"/> + <gvxy_point X_Y="161.88; -75."/> + <gvxy_point X_Y="-161.88; -75."/> + <gvxy_point X_Y="-938.77; -211.99"/> + <gvxy_point X_Y="-964.81; -64.27"/> + <gvxy_point X_Y="-175.; 75."/> +</gvxy> + +<gvxy name="JOINING_BAR1" material="Aluminium" dZ="29."> + <gvxy_point X_Y="350.; 75."/> + <gvxy_point X_Y="1196.93; -74.34"/> + <gvxy_point X_Y="1170.88; -222.06"/> + <gvxy_point X_Y="336.88; -75."/> + <gvxy_point X_Y="-336.88; -75."/> + <gvxy_point X_Y="-1170.88; -222.06"/> + <gvxy_point X_Y="-1196.93; -74.34"/> + <gvxy_point X_Y="-350.; 75."/> +</gvxy> + +<composition name="Inner_Spoke_Assembly" > + <posXYZ volume="Base_Leg" X_Y_Z="0.; 1301.5; 0." /> + <posXYZ volume="JOINING_BAR1" X_Y_Z="0.; 4385.; -231.2" /> + <posXYZ volume="JOINING_BAR2" X_Y_Z="0.; 3065.; -231.2" /> + <posXYZ volume="JOINING_BAR3" X_Y_Z="0.; 1715.; -218.05" rot=" 90. ; 0. ; 0." /> + <posXYZ volume="LATERAL_PLATE_L" X_Y_Z="-217.3; 3635.56; 0." rot=" 0. ; 0. ; 8." /> + <posXYZ volume="LATERAL_PLATE_L" X_Y_Z="217.3; 3635.56; 0." rot=" 0. ; 0. ; -8." /> + <posXYZ volume="Front_plate2" X_Y_Z="0.; 0.; 188." /> + <posXYZ volume="LS_OUTER3" X_Y_Z="0.; 4018.41; 180." /> + <posXYZ volume="REAR_PLATE1" X_Y_Z="0.; 3114.99; -180." /> + <posXYZ volume="REAR_PLATE2" X_Y_Z="0.; 3939.93; -180." /> + <posXYZ volume="REAR_PLATE3" X_Y_Z="0.; 4388.42; -180." /> + <posXYZ volume="SHIM1" X_Y_Z="0.; 4385.; -205.85" /> + <posXYZ volume="SHIM2" X_Y_Z="0.; 3065.; -205.85" /> + <posXYZ volume="KM_FRONT_PLATE1" X_Y_Z="318.34; 4156.56; 25." rot=" 0. ; 0. ; -8." /> + <posXYZ volume="KM_FRONT_PLATE1" X_Y_Z="-318.34; 4156.56; 25." rot=" 0. ; 0. ; 8." /> + <posXYZ volume="KM_LOCKING_PLATE1" X_Y_Z="270.71; 4163.26; 0." rot=" 0. ; 0. ; -8." /> + <posXYZ volume="KM_LOCKING_PLATE1" X_Y_Z="-270.71; 4163.26; 0." rot=" 0. ; 0. ; 8." /> +</composition> + +<composition name="Inner_Spoke" > + <posXYZ volume="Inner_Spoke_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 22.5" /> + <posXYZ volume="Inner_Spoke_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 67.5" /> + <posXYZ volume="Inner_Spoke_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 112.5" /> + <posXYZ volume="Inner_Spoke_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 157.5" /> + <posXYZ volume="Inner_Spoke_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 202.5" /> + <posXYZ volume="Inner_Spoke_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 247.5" /> + <posXYZ volume="Inner_Spoke_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 292.5" /> + <posXYZ volume="Inner_Spoke_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 337.5" /> +</composition> + +<!-- *********************************************************************************** End Inner Spoke **************************************************\ +************************************* --> + +<!-- *********************************************************************************** Outer Spoke ******************************************************\ +************************************* --> + +<box name="NSW_F1_spoke_MainBox" material="Aluminium" X_Y_Z="135.; 1060.; 185. " /> +<box name="NSW_F1_spoke_CutBox" material="Aluminium" X_Y_Z="111.; 1070.; 161. " /> + +<subtraction name="NSW_F1_spoke" > + <posXYZ volume="NSW_F1_spoke_MainBox" /> + <posXYZ volume="NSW_F1_spoke_CutBox" /> +</subtraction> +<box name="NSW_F1_spoke_Bot_Plate" material="Aluminium" X_Y_Z="300.; 48.; 300. " /> + +<gvxysx name="Plaque_interface2" material="Aluminium" dZ="37."> + <gvxy_point X_Y="182.5; 375."/> + <gvxy_point X_Y="146.5; 213.2"/> + <gvxy_point X_Y="90.; -375."/> +</gvxysx> + +<gvxysx name="Plaque_interface2.1" material="Aluminium" dZ="45."> + <gvxy_point X_Y="182.5; 375."/> + <gvxy_point X_Y="146.5; 213.2"/> + <gvxy_point X_Y="90.; -375."/> +</gvxysx> + +<box name="NSW_SS_spoke_Pillar_MainBox" material="Aluminium" X_Y_Z="135.; 2683.25; 185. " /> +<box name="NSW_SS_spoke_Pillar_CutBox" material="Aluminium" X_Y_Z="113.; 2685.; 163. " /> + +<subtraction name="NSW_SS_spoke_Pillar" > + <posXYZ volume="NSW_SS_spoke_Pillar_MainBox" /> + <posXYZ volume="NSW_SS_spoke_Pillar_CutBox" /> +</subtraction> + +<box name="Spoke_Joint" material="ShieldSteel" X_Y_Z="75.; 85.; 124.4 " /> + +<gvxysx name="Manifolds_Support_Main" material="Aluminium" dZ="150."> + <gvxy_point X_Y="585.; 75."/> + <gvxy_point X_Y=" 551.74; -75."/> +</gvxysx> + +<box name="Manifolds_Support_CutBox1" material="Aluminium" X_Y_Z="1180.; 140.; 140. " /> +<box name="Manifolds_Support_CutBox2" material="Aluminium" X_Y_Z="160.; 90.; 160. " /> + +<subtraction name="Manifolds_Support" > + <posXYZ volume="Manifolds_Support_Main" /> + <posXYZ volume="Manifolds_Support_CutBox1" /> + <posXYZ volume="Manifolds_Support_CutBox2" X_Y_Z="135.; -45.; 0." /> +</subtraction> + +<box name="Cale" material="Aluminium" X_Y_Z="135.; 280.; 52. " /> +<box name="JD_JOINT2.1_Plate1" material="Aluminium" X_Y_Z="250.; 270.; 20. " /> +<box name="Shim_JD" material="Aluminium" X_Y_Z="250.; 270.; 29. " /> +<box name="JD_JOINT1_Pipe_MainBox" material="Aluminium" X_Y_Z="1300.; 120.; 80." /> +<box name="JD_JOINT1_Pipe_CutBox" material="Aluminium" X_Y_Z="1305.; 100.; 60. " /> + +<subtraction name="JD_JOINT1_Pipe" > + <posXYZ volume="JD_JOINT1_Pipe_MainBox" /> + <posXYZ volume="JD_JOINT1_Pipe_CutBox" /> +</subtraction> + +<box name="JD_JOINT2_Pipe_MainBox" material="Aluminium" X_Y_Z="900.; 120.; 80." /> + +<subtraction name="JD_JOINT2_Pipe" > + <posXYZ volume="JD_JOINT2_Pipe_MainBox" /> + <posXYZ volume="JD_JOINT1_Pipe_CutBox" /> +</subtraction> + +<box name="KM_FRONT_PLATE.1.1" material="ShieldSteel" X_Y_Z="27.; 272.; 120. " /> +<box name="Manifolds_Support_Plate" material="Aluminium" X_Y_Z="9.8; 275.; 175. " /> +<box name="AL_BAR_KM_INCLINED_PLATE" material="Aluminium" X_Y_Z="290.; 38.; 67. " /> + +<composition name="Outer_Spoke_Assembly" > + <posXYZ volume="NSW_F1_spoke" X_Y_Z="0.; 1350.; 0." /> + <posXYZ volume="NSW_F1_spoke_Bot_Plate" X_Y_Z="0.; 795.95; 0." /> + <posXYZ volume="Manifolds_Support" X_Y_Z="0.; 4515.33; 0." /> + <posXYZ volume="Plaque_interface2" X_Y_Z="0.; 1745.; 111.05" /> + <posXYZ volume="Plaque_interface2.1" X_Y_Z="0.; 1745.; -115.05" /> + <posXYZ volume="NSW_SS_spoke_Pillar" X_Y_Z="371.; 3267.85; 0." rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="NSW_SS_spoke_Pillar" X_Y_Z="-371.; 3267.85; 0." rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="Spoke_Joint" X_Y_Z="610.52; 4348.24; 154.75" rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Spoke_Joint" X_Y_Z="322.65; 3049.77; 154.75" rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Spoke_Joint" X_Y_Z="-610.52; 4348.24; 154.75" rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="Spoke_Joint" X_Y_Z="-322.65; 3049.77; 154.75" rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="Cale" X_Y_Z="537.79; 4020.21; -118.55" rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Cale" X_Y_Z="338.24; 3120.06; -118.55" rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Cale" X_Y_Z="-537.79; 4020.21; -118.55" rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="Cale" X_Y_Z="-338.24; 3120.06; -118.55" rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="JD_JOINT2.1_Plate1" X_Y_Z="515.; 4020.2; -154.6" /> + <posXYZ volume="JD_JOINT2.1_Plate1" X_Y_Z="315.; 3120.6; -154.6" /> + <posXYZ volume="JD_JOINT2.1_Plate1" X_Y_Z="-515.; 4020.2; -154.6" /> + <posXYZ volume="JD_JOINT2.1_Plate1" X_Y_Z="-315.; 3120.6; -154.6" /> + <posXYZ volume="Shim_JD" X_Y_Z="515.; 4020.2; -261.55" /> + <posXYZ volume="Shim_JD" X_Y_Z="315.; 3120.6; -261.55" /> + <posXYZ volume="Shim_JD" X_Y_Z="-515.; 4020.2; -261.55" /> + <posXYZ volume="Shim_JD" X_Y_Z="-315.; 3120.6; -261.55" /> + <posXYZ volume="JD_JOINT1_Pipe" X_Y_Z="0.; 4020.2; -207." /> + <posXYZ volume="JD_JOINT2_Pipe" X_Y_Z="0.; 3120.6; -207." /> + <posXYZ volume="KM_FRONT_PLATE.1.1" X_Y_Z="641.41; 4289.16; 0." rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="KM_FRONT_PLATE.1.1" X_Y_Z="-641.41; 4289.16; 0." rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="Manifolds_Support_Plate" X_Y_Z="560.93; 4459.11; 0." rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Manifolds_Support_Plate" X_Y_Z="-560.93; 4459.11; 0." rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="AL_BAR_KM_INCLINED_PLATE" X_Y_Z="-243.; 4099.25; -228.5" /> +</composition> + +<!-- Outer Spoke Foot --> +<gvxysx name="Plaque_interface2_SpecMain" material="Aluminium" dZ="37."> + <gvxy_point X_Y="182.5; 375."/> + <gvxy_point X_Y="146.5; 213.2"/> + <gvxy_point X_Y="90.; -375."/> +</gvxysx> + +<box name="Plaque_interface2_Spec_CutBox" material="Aluminium" X_Y_Z="160.; 260.; 13. " /> + +<subtraction name="Plaque_interface2_Spec" > + <posXYZ volume="Plaque_interface2_SpecMain" /> + <posXYZ volume="Plaque_interface2_Spec_CutBox" X_Y_Z="-120.94; 337.19; -12.5" rot=" 0. ; 0. ; 12.5" /> +</subtraction> + +<gvxysx name="Plaque_interface2.1_SpecMain" material="Aluminium" dZ="45."> + <gvxy_point X_Y="182.5; 375."/> + <gvxy_point X_Y="146.5; 213.2"/> + <gvxy_point X_Y="90.; -375."/> +</gvxysx> + +<subtraction name="Plaque_interface2.1_Spec" > + <posXYZ volume="Plaque_interface2.1_SpecMain" /> + <posXYZ volume="Plaque_interface2_Spec_CutBox" X_Y_Z="-120.94; 337.19; 16.5" rot=" 0. ; 0. ; 12.5" /> +</subtraction> + +<box name="NSW_SS_spoke_PillarSpec_MainBox" material="ShieldSteel" X_Y_Z="135.; 2818.1; 210. " /> +<box name="NSW_SS_spoke_PillarSpec_CutBox" material="Aluminium" X_Y_Z="91.; 2820.; 166. " /> + +<subtraction name="NSW_SS_spokeSpec_Pillar" > + <posXYZ volume="NSW_SS_spoke_PillarSpec_MainBox" /> + <posXYZ volume="NSW_SS_spoke_PillarSpec_CutBox" /> +</subtraction> + +<box name="Cale_Spec" material="Aluminium" X_Y_Z="135.; 280.; 38.6 " /> +<box name="Spoke_Joint1.2" material="Aluminium" X_Y_Z="66.; 100.; 111.9 " /> + +<box name="BOTTOM_PLATE.1_Horisontal_Plate" material="ShieldSteel" X_Y_Z="29.8; 775.; 495. " /> +<box name="BOTTOM_PLATE.1_Vertical_Main_Plate" material="ShieldSteel" X_Y_Z="460.; 640.; 35. " /> + +<gvxy name="Connecting_Plates2.1" material="Aluminium" dZ="22."> + <gvxy_point X_Y="-252.; 130.65"/> + <gvxy_point X_Y="70.; 130.65"/> + <gvxy_point X_Y="252.; 25.65"/> + <gvxy_point X_Y="258.6; -124.1"/> + <gvxy_point X_Y="108.7; -130.65"/> + <gvxy_point X_Y="-252.; 19.35"/> +</gvxy> + +<box name="Tube_alu_feet_MainBox" material="Aluminium" X_Y_Z="1050.; 135.; 185. " /> +<box name="Tube_alu_feet_CutBox" material="Aluminium" X_Y_Z="1055.; 111.4; 161.4 " /> + +<subtraction name="Tube_alu_feet" > + <posXYZ volume="Tube_alu_feet_MainBox" /> + <posXYZ volume="Tube_alu_feet_CutBox" X_Y_Z="-120.94; 337.19; 16.5" rot=" 0. ; 0. ; 12.5" /> +</subtraction> + +<box name="Fix_nut" material="ShieldSteel" X_Y_Z="50.; 52.; 290. " /> + +<gvxy name="Beam_Interface" material="Aluminium" dZ="300."> + <gvxy_point X_Y="-80.; 73.4"/> + <gvxy_point X_Y="80.; 73.4"/> + <gvxy_point X_Y="80.; -73.4"/> + <gvxy_point X_Y="-80.; 28.5"/> +</gvxy> + +<gvxy name="Beam_Interface2" material="Aluminium" dZ="300."> + <gvxy_point X_Y="-80.; 79.8"/> + <gvxy_point X_Y="80.; 79.8"/> + <gvxy_point X_Y="80.; 12.6"/> + <gvxy_point X_Y="-80.; -79.8"/> +</gvxy> + +<box name="LS_T_Joint" material="ShieldSteel" X_Y_Z="80.; 70.; 134.9 " /> +<box name="LS_T_Joint2" material="ShieldSteel" X_Y_Z="77.; 67.; 147.4 " /> + +<gvxy name="Renfort_Bas1_MainBox" material="Aluminium" dZ="135."> + <gvxy_point X_Y="-337.73; -67.5"/> + <gvxy_point X_Y="-251.72; 67.5"/> + <gvxy_point X_Y="251.72; 67.5"/> + <gvxy_point X_Y="337.27; -67.5"/> +</gvxy> + +<box name="Renfort_Bas1_CutBox" material="Aluminium" X_Y_Z="680.; 115.; 115. " /> + + +<subtraction name="Renfort_Bas1" > + <posXYZ volume="Renfort_Bas1_MainBox" /> + <posXYZ volume="Renfort_Bas1_CutBox" /> +</subtraction> + +<composition name="Outer_Spoke_Assembly_FOOT1" > + <posXYZ volume="NSW_F1_spoke" X_Y_Z="0.; 1350.; 0." /> + <posXYZ volume="NSW_F1_spoke_Bot_Plate" X_Y_Z="0.; 795.95; 0." /> + <posXYZ volume="Plaque_interface2_Spec" X_Y_Z="0.; 1745.; 111.05" /> + <posXYZ volume="Plaque_interface2.1_Spec" X_Y_Z="0.; 1745.; -115.05" /> + <posXYZ volume="NSW_SS_spoke_Pillar" X_Y_Z="371.; 3267.85; 0." rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="NSW_SS_spokeSpec_Pillar" X_Y_Z="-385.59; 3333.67; 0." rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="Shim_JD" X_Y_Z="515.; 4020.2; -261.55" /> + <posXYZ volume="Shim_JD" X_Y_Z="315.; 3120.6; -261.55" /> + <posXYZ volume="Shim_JD" X_Y_Z="-515.; 4020.2; -261.55" /> + <posXYZ volume="Shim_JD" X_Y_Z="-315.; 3120.6; -261.55" /> + <posXYZ volume="JD_JOINT2.1_Plate1" X_Y_Z="515.; 4020.2; -154.6" /> + <posXYZ volume="JD_JOINT2.1_Plate1" X_Y_Z="315.; 3120.6; -154.6" /> + <posXYZ volume="JD_JOINT2.1_Plate1" X_Y_Z="-515.; 4020.2; -154.6" /> + <posXYZ volume="JD_JOINT2.1_Plate1" X_Y_Z="-315.; 3120.6; -154.6" /> + <posXYZ volume="Cale" X_Y_Z="537.79; 4020.21; -118.55" rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Cale" X_Y_Z="338.24; 3120.06; -118.55" rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Cale_Spec" X_Y_Z="-537.79; 4020.21; -124.35" rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="Cale_Spec" X_Y_Z="-338.24; 3120.06; -124.35" rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="JD_JOINT1_Pipe" X_Y_Z="0.; 4020.2; -207." /> + <posXYZ volume="JD_JOINT2_Pipe" X_Y_Z="0.; 3120.6; -207." /> + <posXYZ volume="AL_BAR_KM_INCLINED_PLATE" X_Y_Z="-243.; 4099.25; -228.5" /> + <posXYZ volume="Spoke_Joint" X_Y_Z="322.65; 3049.77; 154.75" rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Spoke_Joint" X_Y_Z="610.52; 4348.24; 154.75" rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Spoke_Joint1.2" X_Y_Z="-322.65; 3049.28; 161." rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="Spoke_Joint1.2" X_Y_Z="-610.4; 4347.75; 161." rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="KM_FRONT_PLATE.1.1" X_Y_Z="641.41; 4289.16; 0." rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="BOTTOM_PLATE.1_Horisontal_Plate" X_Y_Z="-675.29; 4889.64; -29." rot=" 0. ; 0. ; -45." /> + <posXYZ volume="BOTTOM_PLATE.1_Vertical_Main_Plate" X_Y_Z="-491.47; 4727.04; -257.5" rot=" 0. ; 0. ; -45." /> + <posXYZ volume="Connecting_Plates2.1" X_Y_Z="475.73; 4596.28; 103.55" rot=" 0. ; 0. ; -15." /> + <posXYZ volume="Connecting_Plates2.1" X_Y_Z="475.73; 4596.28; -103.55" rot=" 0. ; 0. ; -15." /> + <posXYZ volume="Tube_alu_feet" X_Y_Z="35.49; 4779.63; 0." rot=" 0. ; 0. ; -15." /> + <posXYZ volume="Fix_nut" X_Y_Z="-840.79; 4666.23; -5." rot=" 0. ; 0. ; -45." /> + <posXYZ volume="Fix_nut" X_Y_Z="-443.82; 5063.2; -5." rot=" 0. ; 0. ; -45." /> + <posXYZ volume="Beam_Interface" X_Y_Z="-716.12; 4723.86; 0." rot=" 0. ; 0. ; 45." /> + <posXYZ volume="Beam_Interface2" X_Y_Z="-496.92; 4934.01; 0." rot=" 0. ; 0. ; 45." /> + <posXYZ volume="LS_T_Joint" X_Y_Z="-649.; 4560.58; -172.5" rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="LS_T_Joint2" X_Y_Z="-356.49; 4881.55; -166.25" rot=" 0. ; 0. ; 75." /> + <posXYZ volume="Renfort_Bas1" X_Y_Z="-329.24; 4539.98; 0." rot=" 0. ; 0. ; 45." /> +</composition> + +<composition name="Outer_Spoke_Assembly_FOOT2" > + <posXYZ volume="NSW_F1_spoke" X_Y_Z="0.; 1350.; 0." /> + <posXYZ volume="NSW_F1_spoke_Bot_Plate" X_Y_Z="0.; 795.95; 0." /> + <posXYZ volume="Plaque_interface2_Spec" X_Y_Z="0.; 1745.; 111.05" /> + <posXYZ volume="Plaque_interface2.1_Spec" X_Y_Z="0.; 1745.; -115.05" /> + <posXYZ volume="NSW_SS_spoke_Pillar" X_Y_Z="371.; 3267.85; 0." rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="NSW_SS_spokeSpec_Pillar" X_Y_Z="-385.59; 3333.67; 0." rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="Shim_JD" X_Y_Z="515.; 4020.2; 261.55" /> + <posXYZ volume="Shim_JD" X_Y_Z="315.; 3120.6; 261.55" /> + <posXYZ volume="Shim_JD" X_Y_Z="-515.; 4020.2; 261.55" /> + <posXYZ volume="Shim_JD" X_Y_Z="-315.; 3120.6; 261.55" /> + <posXYZ volume="JD_JOINT2.1_Plate1" X_Y_Z="515.; 4020.2; 154.6" /> + <posXYZ volume="JD_JOINT2.1_Plate1" X_Y_Z="315.; 3120.6; 154.6" /> + <posXYZ volume="JD_JOINT2.1_Plate1" X_Y_Z="-515.; 4020.2; 154.6" /> + <posXYZ volume="JD_JOINT2.1_Plate1" X_Y_Z="-315.; 3120.6; 154.6" /> + <posXYZ volume="Cale" X_Y_Z="537.79; 4020.21; 118.55" rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Cale" X_Y_Z="338.24; 3120.06; 118.55" rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Cale_Spec" X_Y_Z="-537.79; 4020.21; 124.35" rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="Cale_Spec" X_Y_Z="-338.24; 3120.06; 124.35" rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="JD_JOINT1_Pipe" X_Y_Z="0.; 4020.2; 207." /> + <posXYZ volume="JD_JOINT2_Pipe" X_Y_Z="0.; 3120.6; 207." /> + <posXYZ volume="AL_BAR_KM_INCLINED_PLATE" X_Y_Z="-243.; 4099.25; 228.5" /> + <posXYZ volume="Spoke_Joint" X_Y_Z="322.65; 3049.77; -154.75" rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Spoke_Joint" X_Y_Z="610.52; 4348.24; -154.75" rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="Spoke_Joint1.2" X_Y_Z="-322.65; 3049.28; -161." rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="Spoke_Joint1.2" X_Y_Z="-610.4; 4347.75; -161." rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="KM_FRONT_PLATE.1.1" X_Y_Z="641.41; 4289.16; 0." rot=" 0. ; 0. ; -12.5" /> + <posXYZ volume="BOTTOM_PLATE.1_Horisontal_Plate" X_Y_Z="-675.29; 4889.64; 29." rot=" 0. ; 0. ; -45." /> + <posXYZ volume="BOTTOM_PLATE.1_Vertical_Main_Plate" X_Y_Z="-491.47; 4727.04; 257.5" rot=" 0. ; 0. ; -45." /> + <posXYZ volume="Connecting_Plates2.1" X_Y_Z="475.73; 4596.28; -103.55" rot=" 0. ; 0. ; -15." /> + <posXYZ volume="Connecting_Plates2.1" X_Y_Z="475.73; 4596.28; 103.55" rot=" 0. ; 0. ; -15." /> + <posXYZ volume="Tube_alu_feet" X_Y_Z="35.49; 4779.63; 0." rot=" 0. ; 0. ; -15." /> + <posXYZ volume="Fix_nut" X_Y_Z="-840.79; 4666.23; -5." rot=" 0. ; 0. ; -45." /> + <posXYZ volume="Fix_nut" X_Y_Z="-443.82; 5063.2; -5." rot=" 0. ; 0. ; -45." /> + <posXYZ volume="Beam_Interface" X_Y_Z="-716.12; 4723.86; 0." rot=" 0. ; 0. ; 45." /> + <posXYZ volume="Beam_Interface2" X_Y_Z="-496.92; 4934.01; 0." rot=" 0. ; 0. ; 45." /> + <posXYZ volume="LS_T_Joint" X_Y_Z="-649.; 4560.58; 172.5" rot=" 0. ; 0. ; 12.5" /> + <posXYZ volume="LS_T_Joint2" X_Y_Z="-356.49; 4881.55; 166.25" rot=" 0. ; 0. ; 75." /> + <posXYZ volume="Renfort_Bas1" X_Y_Z="-329.24; 4539.98; 0." rot=" 0. ; 0. ; 45." /> +</composition> +<!-- End Outer Spoke Foot --> + + +<composition name="Outer_Spoke" > + <posXYZ volume="Outer_Spoke_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 0." /> + <posXYZ volume="Outer_Spoke_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 45." /> + <posXYZ volume="Outer_Spoke_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 90." /> + <posXYZ volume="Outer_Spoke_Assembly_FOOT1" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 135." /> + <posXYZ volume="Outer_Spoke_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 180." /> + <posXYZ volume="Outer_Spoke_Assembly_FOOT2" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 180. ; 225." /> + <posXYZ volume="Outer_Spoke_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 270." /> + <posXYZ volume="Outer_Spoke_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 315." /> +</composition> +<!-- ********************************************************************************* End Outer Spoke ****************************************************\ +************************************** --> + +<!-- *********************************************************************************** LSO LSI Connection ***********************************************\ +************************************* --> + +<box name="LSO_LSI_connection_Rot" material="ShieldSteel" X_Y_Z="63.; 754.1; 46. " /> + +<composition name="LSO_LSI_connection_Pos" > + <posXYZ volume="LSO_LSI_connection_Rot" X_Y_Z="0.; 2210.09; 0." /> +</composition> + +<composition name="LSO_LSI_Connection" > + <posXYZ volume="LSO_LSI_connection_Pos" X_Y_Z="0.; 0.; 870.2" rot=" 0. ; 0. ; 22.5" /> + <posXYZ volume="LSO_LSI_connection_Pos" X_Y_Z="0.; 0.; 870.2" rot=" 0. ; 0. ; 67.5" /> + <posXYZ volume="LSO_LSI_connection_Pos" X_Y_Z="0.; 0.; 870.2" rot=" 0. ; 0. ; -22.5" /> + <posXYZ volume="LSO_LSI_connection_Pos" X_Y_Z="0.; 0.; 870.2" rot=" 0. ; 0. ; -67.5" /> +</composition> + +<!-- *********************************************************************************** End LSO LSI Connection *******************************************\ +************************************* --> + +<!-- *********************************************************************************** Alignment Bars ***************************************************\ +**************************************** --> + +<!-- SS Bar --> +<tubs name="SS_Bar_Tube" material="Aluminium" Rio_Z="0.; 49.1; 2382." /> + +<composition name="SS_Bar_Assembly" > + <posXYZ volume="SS_Bar_Tube" X_Y_Z="69.2; 3364.6; 0" rot=" 90. ; 0. ; -3.35" /> +</composition> + +<composition name="SS_Bar" > + <posXYZ volume="SS_Bar_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 0." /> + <posXYZ volume="SS_Bar_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 45." /> + <posXYZ volume="SS_Bar_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 90." /> + <posXYZ volume="SS_Bar_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 135." /> + <posXYZ volume="SS_Bar_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 180." /> + <posXYZ volume="SS_Bar_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 225." /> + <posXYZ volume="SS_Bar_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 270." /> + <posXYZ volume="SS_Bar_Assembly" X_Y_Z="0.; 0.; 233.2" rot=" 0. ; 0. ; 315." /> +</composition> +<!-- End SS Bar --> + +<!-- LS Bar --> +<tubs name="LS_Bar_Tube" material="Aluminium" Rio_Z="0.; 48.; 2340." /> +<box name="LS_Arm" material="Aluminium" X_Y_Z="1010.; 40.; 50. " /> + +<composition name="LS_Bar_Assembly" > + <posXYZ volume="LS_Bar_Tube" X_Y_Z="1286.4; 3086.18; 0." rot=" 90. ; 0. ; -25." /> + <posXYZ volume="LS_Arm" X_Y_Z="1789.34; 4164.73; 0." rot=" 0. ; 0. ; -25." /> +</composition> + +<composition name="LS_Bar" > + <posXYZ volume="LS_Bar_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 0." /> + <posXYZ volume="LS_Bar_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 45." /> + <posXYZ volume="LS_Bar_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 90." /> + <posXYZ volume="LS_Bar_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 135." /> + <posXYZ volume="LS_Bar_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 180." /> + <posXYZ volume="LS_Bar_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 225." /> + <posXYZ volume="LS_Bar_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 270." /> + <posXYZ volume="LS_Bar_Assembly" X_Y_Z="0.; 0.; 697.2" rot=" 0. ; 0. ; 315." /> +</composition> +<!-- End LS Bar --> + +<!-- *********************************************************************************** End Alignment Bars ***********************************************\ +******************************************** --> + + +<composition name="NSW_Aluminum_Structure_and_HUB_Assembly" > + <posXYZ volume="New_Hub" /> + <posXYZ volume="Inner_Spoke" /> + <posXYZ volume="LSO_LSI_Connection" /> + <posXYZ volume="Outer_Spoke" /> + <posXYZ volume="SS_Bar" /> + <posXYZ volume="LS_Bar" /> +</composition> + +<composition name="NSW_Aluminum_Structure_and_HUB_SideA" > + <posXYZ volume="NSW_Aluminum_Structure_and_HUB_Assembly" X_Y_Z="0.; 0.; 6943.8" rot=" 0. ; 0. ; 0." /> +</composition> + +<composition name="NSW_Aluminum_Structure_and_HUB_SideC" > + <posXYZ volume="NSW_Aluminum_Structure_and_HUB_Assembly" X_Y_Z="0.; 0.; -6943.8" rot=" 0. ; 180. ; 0." /> +</composition> + +<composition name="NSW_Aluminum_Structure_and_HUB" > + <posXYZ volume="NSW_Aluminum_Structure_and_HUB_SideA" /> + <posXYZ volume="NSW_Aluminum_Structure_and_HUB_SideC" /> +</composition> + +</section> + +<!-- ===========================================NJD=========================================== --> + +<section name = "NJD Disk" + version = "0.0" + date = "16-11-2016" + author = "Georgian Engineering Team - Niko Tsutskiridze" + top_volume = "NJD_Disk"> + +<!-- NJD Disk --> + +<!-- main disk--> +<tubs name="MD01" material="ShieldSteel" Rio_Z="430.; 4360.; 40." nbPhi="32." /> +<tubs name="MD02" material="ShieldSteel" Rio_Z="430.; 2700.; 48.7" nbPhi="32." /> +<tubs name="MDB01_Cut" material="ShieldSteel" Rio_Z="0.; 840.; 3." nbPhi="32." /> + +<gvxy name="MD03" material="ShieldSteel" dZ="40." > + <gvxy_point X_Y="-3370.; -3950."/> + <gvxy_point X_Y="-3370.; -3880."/> + <gvxy_point X_Y="-3679.5; -2484."/> + <gvxy_point X_Y="-3990.; -1734.39"/> + <gvxy_point X_Y="-2599.16; -3470."/> + <gvxy_point X_Y="-2670.; -3570."/> + <gvxy_point X_Y="-2670.; -3950."/> +</gvxy> + +<subtraction name="MDB01_Un" > + <posXYZ volume="MD01" /> + <posXYZ volume="MDB01_Cut" X_Y_Z=" 0.; 0.; 19.4 " /> +</subtraction> + +<union name="MDB01" > + <posXYZ volume="MDB01_Un" /> + <posXYZ volume="MD03" /> + <posXYZ volume="MD03" rot=" 0.; 180.; 0."/> +</union> +<!-- End main disk--> + + +<!-- Ret.Flux --> +<tubs name="FLUX_Box" material="ShieldSteel" Rio_Z="3800.; 4360.; 39.9" nbPhi="32." /> +<box name="FLUX_Cut_Box" material="ShieldSteel" X_Y_Z="2200.; 400.; 50." /> + +<subtraction name="FLUX" > + <posXYZ volume="FLUX_Box" /> + <posXYZ volume="FLUX_Cut_Box" X_Y_Z=" -1930.; 3430.; 0." /> +</subtraction> +<!-- End Ret.Flux --> + +<!-- FIXING PLATE --> +<box name="FIXING_PLATE" material="ShieldSteel" X_Y_Z="350.; 975.; 40.9" /> +<box name="FIXING_PLATE_Special" material="ShieldSteel" X_Y_Z="350.; 787.5; 40.9" /> + +<composition name="FIXING_PLATE_Pos" > + <posXYZ volume="FIXING_PLATE" X_Y_Z=" 0.; 3252.5; 0." /> +</composition> + +<composition name="FIXING_PLATE_Ass" > + <posXYZ volume="FIXING_PLATE_Special" X_Y_Z=" -1208.8; 2918.31; 0." rot=" 0.; 0.; 22.5" /> + <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 67.5" /> + <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 112.5" /> + <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 157.5" /> + <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 202.5" /> + <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 247.5" /> + <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 292.5" /> + <posXYZ volume="FIXING_PLATE_Pos" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 337.5" /> +</composition> +<!-- End FIXING PLATE --> + +<!-- NJD feet--> +<gvxy name="JF01" material="ShieldSteel" dZ="37.3" > + <gvxy_point X_Y="-3300.; -3950."/> + <gvxy_point X_Y="-3300.; -3480."/> + <gvxy_point X_Y="-3270.; -3450."/> + <gvxy_point X_Y="-2730.; -3450."/> + <gvxy_point X_Y="-2700.; -3480."/> + <gvxy_point X_Y="-2700.; -3950."/> +</gvxy> + +<gvxy name="JF02" material="ShieldSteel" dZ="35." > + <gvxy_point X_Y="-342.4; -3950."/> + <gvxy_point X_Y="-342.4; -3930."/> + <gvxy_point X_Y="-77.4; -3470."/> + <gvxy_point X_Y="-57.4; -3470."/> + <gvxy_point X_Y="-57.4; -3920."/> + <gvxy_point X_Y="-87.4; -3950."/> +</gvxy> + +<gvxy name="JF03" material="ShieldSteel" dZ="48." > + <gvxy_point X_Y="-3370.; -362."/> + <gvxy_point X_Y="-3370.; 704."/> + <gvxy_point X_Y="-3495.; 704."/> + <gvxy_point X_Y="-3495.; 933."/> + <gvxy_point X_Y="-2660.; 933."/> + <gvxy_point X_Y="-2660.; 653."/> + <gvxy_point X_Y="-2700.; 653."/> + <gvxy_point X_Y="-2700.; 523."/> + <gvxy_point X_Y="-2590.; 523."/> + <gvxy_point X_Y="-2590.; -52."/> + <gvxy_point X_Y="-2685.; -52."/> + <gvxy_point X_Y="-2685.; -362."/> +</gvxy> + +<gvxy name="JF04" material="ShieldSteel" dZ="41.6" > + <gvxy_point X_Y="-453.5; -4251.1"/> + <gvxy_point X_Y="-453.5; -4158.1"/> + <gvxy_point X_Y="-603.; -4083.1"/> + <gvxy_point X_Y="-603.; -4038.1"/> + <gvxy_point X_Y="-362.; -4038.1"/> + <gvxy_point X_Y="-362.; -3998.1"/> + <gvxy_point X_Y="883.; -3998.1"/> + <gvxy_point X_Y="883.; -4251.1"/> +</gvxy> + +<gvxy name="JF05" material="ShieldSteel" dZ="356.1" > + <gvxy_point X_Y="-603.; -4048.1"/> + <gvxy_point X_Y="-603.; -4038.1"/> + <gvxy_point X_Y="-362.; -4038.1"/> + <gvxy_point X_Y="-362.; -3998.1"/> + <gvxy_point X_Y="-253.; -3998.1"/> + <gvxy_point X_Y="-253.; -4048.1"/> +</gvxy> + +<box name="JF06" material="ShieldSteel" X_Y_Z="536.; 253.; 71.4" /> + +<!-- Right--> +<composition name="Right_Feet" > + <posXYZ volume="JF01" X_Y_Z=" 0.; 0.; 38.7" rot=" 0.; 0.; 0." /> + <posXYZ volume="JF02" X_Y_Z=" -2802.5; 0.; 0." rot=" 0.; 90.; 0." /> + <posXYZ volume="JF02" X_Y_Z=" -3197.5; 0.; 0." rot=" 0.; 90.; 0." /> + <posXYZ volume="JF03" X_Y_Z=" 0.; -3974.05; 0." rot=" -90.; 0.; 0." /> + <posXYZ volume="JF04" X_Y_Z=" -2805.2; 0.; 0." rot=" 0.; 90.; 0." /> + <posXYZ volume="JF04" X_Y_Z=" -3203.; 0.; 0." rot=" 0.; 90.; 0." /> + <posXYZ volume="JF05" X_Y_Z=" -3004.1; 0.; 0." rot=" 0.; 90.; 0." /> + <posXYZ volume="JF06" X_Y_Z=" -3000.; -4124.6; -918.75" rot=" 0.; 0.; 0." /> +</composition> +<!-- End Right--> + +<!-- Left--> +<composition name="Left_Feet" > + <posXYZ volume="JF01" X_Y_Z=" 0.; 0.; 38.7" rot=" 0.; 180.; 0." /> + <posXYZ volume="JF02" X_Y_Z=" 2802.5; 0.; 0." rot=" 0.; 90.; 0." /> + <posXYZ volume="JF02" X_Y_Z=" 3197.5; 0.; 0." rot=" 0.; 90.; 0." /> + <posXYZ volume="JF03" X_Y_Z=" 0.; -3974.05; 0." rot=" -90.; 0.; 180." /> + <posXYZ volume="JF04" X_Y_Z=" 2805.2; 0.; 0." rot=" 0.; 90.; 0." /> + <posXYZ volume="JF04" X_Y_Z=" 3203.; 0.; 0." rot=" 0.; 90.; 0." /> + <posXYZ volume="JF05" X_Y_Z=" 3004.1; 0.; 0." rot=" 0.; 90.; 0." /> + <posXYZ volume="JF06" X_Y_Z=" 3000.; -4124.6; -918.75" rot=" 0.; 0.; 0." /> +</composition> +<!-- End Right--> +<!-- End NJD feet--> + +<composition name="JDDisk_ASide" > + <posXYZ volume="MDB01" X_Y_Z=" 0.; 0.; 6880." rot=" 0.; 0.; 0." /> + <posXYZ volume="MD02" X_Y_Z=" 0.; 0.; 6835.6" rot=" 0.; 0.;0."/> + <posXYZ volume="FLUX" X_Y_Z=" 0.; 0.; 6840." rot=" 0.; 0.; 0." /> + <posXYZ volume="FIXING_PLATE_Ass" X_Y_Z=" 0.; 0.; 6839.5" rot=" 0.; 0.; 0." /> + <posXYZ volume="Right_Feet" X_Y_Z=" 0.; 0.; 6880." rot=" 0.; 180.; 0." /> + <posXYZ volume="Left_Feet" X_Y_Z=" 0.; 0.; 6880." rot=" 0.; 180.; 0." /> +</composition> + +<composition name="JDDisk_CSide" > + <posXYZ volume="MDB01" X_Y_Z=" 0.; 0.; -6880." rot=" 0.; 180.; 0." /> + <posXYZ volume="MD02" X_Y_Z=" 0.; 0.; -6835.6" rot=" 0.; 0.;0."/> + <posXYZ volume="FLUX" X_Y_Z=" 0.; 0.; -6840." rot=" 0.; 0.; 0." /> + <posXYZ volume="FIXING_PLATE_Ass" X_Y_Z=" 0.; 0.; -6839.5" rot=" 0.; 0.; 0." /> + <posXYZ volume="Right_Feet" X_Y_Z=" 0.; 0.; -6880." rot=" 0.; 0.; 0." /> + <posXYZ volume="Left_Feet" X_Y_Z=" 0.; 0.; -6880." rot=" 0.; 0.; 0." /> +</composition> +<!-- End NJD Disk --> + +<composition name="NJD_Disk" > + <posXYZ volume="JDDisk_ASide" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 0." /> + <posXYZ volume="JDDisk_CSide" X_Y_Z=" 0.; 0.; 0." rot=" 0.; 0.; 0." /> +</composition> + +</section> + +<!-- ==================================================Feet========================================= --> + +<section name = "A Plate" + version = "0.0" + date = "29-05-2017" + author = "Georgian Engineering Team - Niko Tsutskiridze" + top_volume = "A_Plate"> + +<gvxy name="Lateral_Plate_Main" material="ShieldSteel" dZ="21."> + <gvxy_point X_Y="-3300.; -4000."/> + <gvxy_point X_Y="-3548.3; -3235.72"/> + <gvxy_point X_Y="-1458.4; -560.8"/> + <gvxy_point X_Y="73.9; 73.9"/> + <gvxy_point X_Y="-628.9; -1622.8"/> + <gvxy_point X_Y="-818.3; -1544.4"/> + <gvxy_point X_Y="-1558.6; -2491.9"/> + <gvxy_point X_Y="-1427.8; -2980."/> + <gvxy_point X_Y="-0.01; -2980."/> + <gvxy_point X_Y="-0.01; -3280."/> + <gvxy_point X_Y="-1701.9; -3280."/> + <gvxy_point X_Y="-1995.3; -3050.8"/> + <gvxy_point X_Y="-2650.; -3889."/> + <gvxy_point X_Y="-2650.; -4000."/> +</gvxy> + +<tubs name="Lateral_plate_TubeCut" material="ShieldSteel" Rio_Z=" 0. ; 600. ; 25." nbPhi="36." /> + +<subtraction name="Lateral_Plate" > + <posXYZ volume="Lateral_Plate_Main" /> + <posXYZ volume="Lateral_plate_TubeCut" X_Y_Z="-0.01; -0.01; 0." rot=" 0. ; 0. ; 0." /> +</subtraction> + +<tubs name="Anchorage" material="ShieldSteel" Rio_Z=" 0. ; 22.6 ; 577." nbPhi="36." /> + +<gvxy name="Vertical_Top_Plate" material="ShieldSteel" dZ="33."> + <gvxy_point X_Y="-3300.; -3998."/> + <gvxy_point X_Y="-3300.; -3730."/> + <gvxy_point X_Y="-2865.; -3730."/> + <gvxy_point X_Y="-2675.; -3920."/> + <gvxy_point X_Y="-2675.; -3998."/> +</gvxy> + +<box name="Horizontal_Plate" material="ShieldSteel" X_Y_Z="625.; 40.6; 287. " /> + +<composition name="A_Plate_Assembly" > + <posXYZ volume="Lateral_Plate" /> + <posXYZ volume="Lateral_Plate" X_Y_Z="0.; 0.; 0." rot="0. ; 180. ; 0." /> + <posXYZ volume="Anchorage" X_Y_Z="-3447.; -3283.25; -299.01" rot="0. ; 0. ; 0." /> + <posXYZ volume="Anchorage" X_Y_Z="3447.; -3283.25; -299.01" rot="0. ; 0. ; 0." /> + <posXYZ volume="Vertical_Top_Plate" X_Y_Z="0.; 0.; -27.01" rot="0. ; 0. ; 0." /> + <posXYZ volume="Vertical_Top_Plate" X_Y_Z="0.; 0.; -27.01" rot="0. ; 180. ; 0." /> + <posXYZ volume="Horizontal_Plate" X_Y_Z="-2987.5; -3929.7; -187.02" rot="0. ; 0. ; 0." /> + <posXYZ volume="Horizontal_Plate" X_Y_Z="2987.5; -3929.7; -187.02" rot="0. ; 0. ; 0." /> +</composition> + +<composition name="A_Plate_SideA" > + <posXYZ volume="A_Plate_Assembly" X_Y_Z=" 0. ; 0.; 7857.5" /> +</composition> + +<composition name="A_Plate_SideC" > + <posXYZ volume="A_Plate_Assembly" X_Y_Z=" 0. ; 0.; -7857.5" rot="0. ; 180. ; 0." /> +</composition> + +<composition name="A_Plate" > + <posXYZ volume="A_Plate_SideA" /> + <posXYZ volume="A_Plate_SideC" /> +</composition> + +</section> + +<!-- ========== Poisitionning all Volumes in NSW================ --> + +<section name="NewSmallWheels" version="4.3" top_volume="useless" date=" April 20, 2015 " author="Daniel Lellouch"> + +<composition name="NewSmallWheel"> + <posXYZ volume="NSW_sTGC" X_Y_Z="0.;0.;0."/> + <posXYZ volume="NSW_MM" X_Y_Z="0.;0.;0." /> + <posXYZ volume="NSW_Spacer" /> + <posXYZ volume="NSW_Aluminum_Structure_and_HUB" /> + <posXYZ volume="NJD_Disk" /> + <posXYZ volume="A_Plate" /> +</composition> + +</section> + +</AGDD> -- GitLab From 5de9d3e53acc4411c8f5595fc0b7bd1284b60e21 Mon Sep 17 00:00:00 2001 From: Benjamin Wynne <bwynne@cern.ch> Date: Mon, 16 Jul 2018 17:16:41 +0200 Subject: [PATCH 478/562] Increased the test timeout Former-commit-id: 3ac280d9d964b02fb99f40845fe22158a4243692 --- Control/AthViews/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Control/AthViews/CMakeLists.txt b/Control/AthViews/CMakeLists.txt index 23898667338d..e17cda7bc55f 100644 --- a/Control/AthViews/CMakeLists.txt +++ b/Control/AthViews/CMakeLists.txt @@ -60,7 +60,8 @@ atlas_add_test( SimpleViews SCRIPT test/test_simple_view_example.sh atlas_add_test( ViewScheduling SCRIPT test/test_view_scheduling.sh ) atlas_add_test( ViewNestFail SCRIPT test/test_view_nest_fail.sh - PROPERTIES PASS_REGULAR_EXPRESSION "Execution of algorithm nest_alg failed" ) + PROPERTIES PASS_REGULAR_EXPRESSION "Execution of algorithm nest_alg failed" + TIMEOUT 300 ) # Install files from the package: atlas_install_headers( AthViews ) -- GitLab From d5dbe8032f33fd4eb9b67c623afcb037d662dd36 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Sun, 8 Jul 2018 10:07:05 +0200 Subject: [PATCH 479/562] CaloIdentifier: Add helper for unit testing. Add CaloHelperTest, to provide initialized verions of the ID helpers for unit tests. Former-commit-id: eb18e6a9202ca94dbc88ca1b201f61b48b44139a --- Calorimeter/CaloIdentifier/CMakeLists.txt | 5 ++ .../CaloIdentifier/CaloHelpersTest.h | 59 ++++++++++++++ .../share/CaloHelpersTest_test.ref | 81 +++++++++++++++++++ .../CaloIdentifier/src/CaloHelpersTest.cxx | 78 ++++++++++++++++++ .../test/CaloHelpersTest_test.cxx | 48 +++++++++++ 5 files changed, 271 insertions(+) create mode 100644 Calorimeter/CaloIdentifier/CaloIdentifier/CaloHelpersTest.h create mode 100644 Calorimeter/CaloIdentifier/share/CaloHelpersTest_test.ref create mode 100644 Calorimeter/CaloIdentifier/src/CaloHelpersTest.cxx create mode 100644 Calorimeter/CaloIdentifier/test/CaloHelpersTest_test.cxx diff --git a/Calorimeter/CaloIdentifier/CMakeLists.txt b/Calorimeter/CaloIdentifier/CMakeLists.txt index 0211e9b186da..1627df779dfb 100644 --- a/Calorimeter/CaloIdentifier/CMakeLists.txt +++ b/Calorimeter/CaloIdentifier/CMakeLists.txt @@ -158,6 +158,11 @@ atlas_add_test( CaloIDHelper_test LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloGeoHelpers SGTools AtlasDetDescr IdDict Identifier GaudiKernel TestTools CxxUtils StoreGateLib SGtests IdDictParser PathResolver CaloIdentifier EXTRA_PATTERNS "mask/zero|Reading file|^AtlasDetectorID(Helper)?::" ) +atlas_add_test( CaloHelpersTest_test + SOURCES + test/CaloHelpersTest_test.cxx + LINK_LIBRARIES CaloIdentifier ) + # Install files from the package: atlas_install_python_modules( python/*.py ) atlas_install_runtime( share/SuperCaloNeighborsSuperCells-April2014.dat share/FCalSuperCells2DNeighborsNew-April2014.txt share/FCalSuperCells3DNeighborsPrevNew-April2014.txt share/FCalSuperCells3DNeighborsNextNew-April2014.txt share/TileSuperCellNeighbour.txt share/TileNeighbour.txt share/TileNeighbour_reduced.txt share/FCal2DNeighbors.txt share/FCal3DNeighborsPrev.txt share/FCal3DNeighborsNext.txt share/FCal2DNeighbors_H6.txt share/FCal3DNeighborsPrev_H6.txt share/FCal3DNeighborsNext_H6.txt share/SuperCaloNeighbours.dat share/SuperCaloNeighbours_H6.dat share/SuperCaloNeighbours_H8.dat share/FCal2DNeighbors-DC3-05-Comm-01.txt share/FCal3DNeighborsNext-DC3-05-Comm-01.txt share/FCal3DNeighborsPrev-DC3-05-Comm-01.txt share/SuperCaloNeighbours-DC3-05-Comm-01.dat share/FCal2DNeighbors-April2011.txt share/FCal3DNeighborsNext-April2011.txt share/FCal3DNeighborsPrev-April2011.txt share/SuperCaloNeighbours-April2011.dat share/sFCal2DNeighborsNew-Dec2014.txt share/sFCal3DNeighborsNextNew-Dec2014.txt share/sFCal3DNeighborsPrevNew-Dec2014.txt share/SuperCaloNeighbours-sFCal-Dec2014.dat ) diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/CaloHelpersTest.h b/Calorimeter/CaloIdentifier/CaloIdentifier/CaloHelpersTest.h new file mode 100644 index 000000000000..bd74a57965ee --- /dev/null +++ b/Calorimeter/CaloIdentifier/CaloIdentifier/CaloHelpersTest.h @@ -0,0 +1,59 @@ +// This file's extension implies that it's C, but it's really -*- C++ -*-. +/* + * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration. + */ +/** + * @file CaloIdentifier/CaloHelpersTest.h + * @author scott snyder <snyder@bnl.gov> + * @date Jun, 2018 + * @brief Helper to initialize ID helpers for unit tests. + */ + + +#ifndef CALOIDENTIFIER_CALOHELPERSTEST_H +#define CALOIDENTIFIER_CALOHELPERSTEST_H + + +#include "CaloIdentifier/LArEM_ID.h" +#include "CaloIdentifier/LArHEC_ID.h" +#include "CaloIdentifier/LArFCAL_ID.h" +#include "CaloIdentifier/LArMiniFCAL_ID.h" +#include "CaloIdentifier/TileID.h" +#include "CaloIdentifier/CaloCell_ID.h" +#include <memory> + + +class IdDictParser; + + +/** + * @brief Helper to initialize ID helpers for unit tests. + * + * An object of this class can be created in a unit test in order to provide + * initialized instances of the ID helpers. + */ +class CaloHelpersTest +{ +public: + CaloHelpersTest(); + ~CaloHelpersTest(); + + const LArEM_ID& emID() const; + const LArHEC_ID& hecID() const; + const LArFCAL_ID& fcalID() const; + const LArMiniFCAL_ID& minifcalID() const; + const TileID& tileID() const; + const CaloCell_ID& caloID() const; + +private: + std::unique_ptr<IdDictParser> m_parser; + LArEM_ID m_em_idHelper; + LArHEC_ID m_hec_idHelper; + LArFCAL_ID m_fcal_idHelper; + LArMiniFCAL_ID m_minifcal_idHelper; + TileID m_tile_idHelper; + std::unique_ptr<CaloCell_ID> m_calo_idHelper; +}; + + +#endif // not CALOIDENTIFIER_CALOHELPERSTEST_H diff --git a/Calorimeter/CaloIdentifier/share/CaloHelpersTest_test.ref b/Calorimeter/CaloIdentifier/share/CaloHelpersTest_test.ref new file mode 100644 index 000000000000..b63879e2a940 --- /dev/null +++ b/Calorimeter/CaloIdentifier/share/CaloHelpersTest_test.ref @@ -0,0 +1,81 @@ +CaloIdentifier/CaloHelpersTest +test1 +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 DEBUG Could not get value for label 'no_side' of field 'DetZside' in dictionary Calorimeter + AtlasDetectorID::initialize_from_dictionary - OK +decode index and bit fields for each level: +lar decode 1 vals 2,4,5,7,10,11,12,13 mask/zero mask/shift/bits/offset 7 1fffffffffffffff 61 3 0 indexes 0 0 1 2 0 3 0 0 4 5 6 7 mode enumerated +em decode 1 vals -3,-2,-1,1,2,3,4,5 mask/zero mask/shift/bits/offset 7 e3ffffffffffffff 58 3 3 indexes 0 1 2 0 3 4 5 6 7 mode enumerated +bec decode 1 vals -3,-2,-1,1,2,3 mask/zero mask/shift/bits/offset 7 fc7fffffffffffff 55 3 6 indexes 0 1 2 0 3 4 5 mode enumerated +samp decode 0 vals 0:3 mask/zero mask/shift/bits/offset 3 ff9fffffffffffff 53 2 9 indexes mode both_bounded +reg decode 0 vals 0:5 mask/zero mask/shift/bits/offset 7 ffe3ffffffffffff 50 3 11 indexes mode both_bounded +eta decode 0 vals 0:447 mask/zero mask/shift/bits/offset 1ff fffc01ffffffffff 41 9 14 indexes mode both_bounded +phi decode 0 vals 0:255 mask/zero mask/shift/bits/offset ff fffffe01ffffffff 33 8 23 indexes mode both_bounded +is-slar decode 0 vals 0:1 mask/zero mask/shift/bits/offset 1 fffffffeffffffff 32 1 31 indexes mode both_bounded + LArEM_Base_ID::initialize_from_dict : + region range -> 4/1/-1,1/0/0 | 4/1/-1,1/1/0 | 4/1/-1,1/1/1 | 4/1/-1,1/2/0 | 4/1/-1,1/2/1 | 4/1/-1,1/3/0 | 4/1/-2,2/0/0 | 4/1/-2,2/1/0 | 4/1/-2,2/1/1 | 4/1/-2,2/1/2 | 4/1/-2,2/1/3 | 4/1/-2,2/1/4 | 4/1/-2,2/1/5 | 4/1/-2,2/2/0 | 4/1/-2,2/2/1 | 4/1/-2,2/3/0 | 4/1/-3,3/1/0 | 4/1/-3,3/2/0 + channel range -> 4/1/-1,1/0/0/0:60/0:63/0 | 4/1/-1,1/1/0/1:447/0:63/0 | 4/1/-1,1/1/1/0:2/0:255/0 | 4/1/-1,1/2/0/0:55/0:255/0 | 4/1/-1,1/2/1/0/0:255/0 | 4/1/-1,1/3/0/0:26/0:255/0 | 4/1/-2,2/0/0/0:11/0:63/0 | 4/1/-2,2/1/0/0/0:63/0 | 4/1/-2,2/1/1/0:2/0:63/0 | 4/1/-2,2/1/2/0:95/0:63/0 | 4/1/-2,2/1/3/0:47/0:63/0 | 4/1/-2,2/1/4/0:63/0:63/0 | 4/1/-2,2/1/5/0:3/0:63/0 | 4/1/-2,2/2/0/0/0:255/0 | 4/1/-2,2/2/1/0:42/0:255/0 | 4/1/-2,2/3/0/0:19/0:255/0 | 4/1/-3,3/1/0/0:6/0:63/0 | 4/1/-3,3/2/0/0:6/0:63/0 +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 DEBUG Could not get value for label 'no_side' of field 'DetZside' in dictionary Calorimeter + AtlasDetectorID::initialize_from_dictionary - OK +decode index and bit fields for each level: +lar decode 1 vals 2,4,5,7,10,11,12,13 mask/zero mask/shift/bits/offset 7 1fffffffffffffff 61 3 0 indexes 0 0 1 2 0 3 0 0 4 5 6 7 mode enumerated +hec decode 1 vals -3,-2,-1,1,2,3,4,5 mask/zero mask/shift/bits/offset 7 e3ffffffffffffff 58 3 3 indexes 0 1 2 0 3 4 5 6 7 mode enumerated +pn decode 1 vals -2,2 mask/zero mask/shift/bits/offset 1 fdffffffffffffff 57 1 6 indexes 0 0 0 0 1 mode enumerated +samp decode 0 vals 0:3 mask/zero mask/shift/bits/offset 3 fe7fffffffffffff 55 2 7 indexes mode both_bounded +reg decode 0 vals 0:1 mask/zero mask/shift/bits/offset 1 ffbfffffffffffff 54 1 9 indexes mode both_bounded +eta decode 0 vals 0:9 mask/zero mask/shift/bits/offset f ffc3ffffffffffff 50 4 10 indexes mode both_bounded +phi decode 0 vals 0:63 mask/zero mask/shift/bits/offset 3f fffc0fffffffffff 44 6 14 indexes mode both_bounded +is-slar decode 0 vals 0:1 mask/zero mask/shift/bits/offset 1 fffff7ffffffffff 43 1 20 indexes mode both_bounded +initialize_from_dict : + channel range -> 4/2/-2,2/0/0/0:9/0:63/0 | 4/2/-2,2/1/0/0:9/0:63/0 | 4/2/-2,2/2/0/1:9/0:63/0 | 4/2/-2,2/3/0/2:9/0:63/0 | 4/2/-2,2/0/1/0:3/0:31/0 | 4/2/-2,2/1/1/0:2/0:31/0 | 4/2/-2,2/2/1/0:2/0:31/0 | 4/2/-2,2/3/1/0:3/0:31/0 + region range -> 4/2/-2,2/0/0 | 4/2/-2,2/1/0 | 4/2/-2,2/2/0 | 4/2/-2,2/3/0 | 4/2/-2,2/0/1 | 4/2/-2,2/1/1 | 4/2/-2,2/2/1 | 4/2/-2,2/3/1 + LArHEC_Base_ID::init_neighbors +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 DEBUG Could not get value for label 'no_side' of field 'DetZside' in dictionary Calorimeter + AtlasDetectorID::initialize_from_dictionary - OK +decode index and bit fields for each level: +lar decode 1 vals 2,4,5,7,10,11,12,13 mask/zero mask/shift/bits/offset 7 1fffffffffffffff 61 3 0 indexes 0 0 1 2 0 3 0 0 4 5 6 7 mode enumerated +fcal decode 1 vals -3,-2,-1,1,2,3,4,5 mask/zero mask/shift/bits/offset 7 e3ffffffffffffff 58 3 3 indexes 0 1 2 0 3 4 5 6 7 mode enumerated +pn decode 1 vals -2,2 mask/zero mask/shift/bits/offset 1 fdffffffffffffff 57 1 6 indexes 0 0 0 0 1 mode enumerated +mod decode 1 vals 1:3 mask/zero mask/shift/bits/offset 3 fe7fffffffffffff 55 2 7 indexes mode both_bounded +eta decode 0 vals 0:63 mask/zero mask/shift/bits/offset 3f ff81ffffffffffff 49 6 9 indexes mode both_bounded +phi decode 0 vals 0:15 mask/zero mask/shift/bits/offset f fffe1fffffffffff 45 4 15 indexes mode both_bounded +is-slar decode 0 vals 0:1 mask/zero mask/shift/bits/offset 1 ffffefffffffffff 44 1 19 indexes mode both_bounded + initialize_from_dict : + channel range -> 4/3/-2,2/1/0:62/0:15/0 | 4/3/-2,2/2/0:29/0,7,8,15/0 | 4/3/-2,2/2/0:30/3,4,11,12/0 | 4/3/-2,2/2/0:31/1,2,5,6,9,10,13,14/0 | 4/3/-2,2/3/0:14/2,10/0 | 4/3/-2,2/3/0:15/0,1,3,4,5,6,7,8,9,11,12,13,14,15/0 + module range -> 4/3/-2,2/1 | 4/3/-2,2/2 | 4/3/-2,2/3 +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 DEBUG Could not get value for label 'no_side' of field 'DetZside' in dictionary Calorimeter + AtlasDetectorID::initialize_from_dictionary - OK +LArMiniFCAL_ID INFO initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID. +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 DEBUG Could not get value for label 'no_side' of field 'DetZside' in dictionary Calorimeter + AtlasDetectorID::initialize_from_dictionary - OK +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 DEBUG Could not get value for label 'no_side' of field 'DetZside' in dictionary Calorimeter + AtlasDetectorID::initialize_from_dictionary - OK +LArEM: 173312 36 +LArHEC: 5632 16 +LArFCAL: 3524 6 +LArMinifcal: 0 0 +Tile: 5184 6 +calo: 187652 64 diff --git a/Calorimeter/CaloIdentifier/src/CaloHelpersTest.cxx b/Calorimeter/CaloIdentifier/src/CaloHelpersTest.cxx new file mode 100644 index 000000000000..7936d8bcf74e --- /dev/null +++ b/Calorimeter/CaloIdentifier/src/CaloHelpersTest.cxx @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration. + */ +/** + * @file CaloIdentifier/src/CaloHelpersTest.cxx + * @author scott snyder <snyder@bnl.gov> + * @date Jun, 2018 + * @brief Helper to initialize ID helpers for unit tests. + */ + + +#include "CaloIdentifier/CaloHelpersTest.h" +#include "IdDictParser/IdDictParser.h" + + +CaloHelpersTest::CaloHelpersTest() +{ + m_parser = std::make_unique<IdDictParser>(); + m_parser->register_external_entity("LArCalorimeter", "IdDictLArCalorimeter.xml"); + IdDictMgr& idd = m_parser->parse("IdDictParser/ATLAS_IDS.xml"); + m_em_idHelper.set_do_neighbours(false); + m_em_idHelper.initialize_from_dictionary(idd); + m_hec_idHelper.initialize_from_dictionary(idd); + m_fcal_idHelper.set_do_neighbours(false); + m_fcal_idHelper.initialize_from_dictionary(idd); + m_minifcal_idHelper.set_do_neighbours(false); + m_minifcal_idHelper.initialize_from_dictionary(idd); + m_tile_idHelper.set_do_neighbours(false); + m_tile_idHelper.initialize_from_dictionary(idd); + + m_calo_idHelper = std::make_unique<CaloCell_ID> (&m_em_idHelper, + &m_hec_idHelper, + &m_fcal_idHelper, + &m_minifcal_idHelper, + &m_tile_idHelper); + m_calo_idHelper->initialize_from_dictionary(idd); +} + + +CaloHelpersTest::~CaloHelpersTest() +{ +} + + +const LArEM_ID& CaloHelpersTest::emID() const +{ + return m_em_idHelper; +} + + +const LArHEC_ID& CaloHelpersTest::hecID() const +{ + return m_hec_idHelper; +} + + +const LArFCAL_ID& CaloHelpersTest::fcalID() const +{ + return m_fcal_idHelper; +} + + +const LArMiniFCAL_ID& CaloHelpersTest::minifcalID() const +{ + return m_minifcal_idHelper; +} + + +const TileID& CaloHelpersTest::tileID() const +{ + return m_tile_idHelper; +} + + +const CaloCell_ID& CaloHelpersTest::caloID() const +{ + return *m_calo_idHelper; +} diff --git a/Calorimeter/CaloIdentifier/test/CaloHelpersTest_test.cxx b/Calorimeter/CaloIdentifier/test/CaloHelpersTest_test.cxx new file mode 100644 index 000000000000..1503e3f02e72 --- /dev/null +++ b/Calorimeter/CaloIdentifier/test/CaloHelpersTest_test.cxx @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration. + */ +/** + * @file CaloIdentifier/test/CaloHelpersTest_test.cxx + * @author scott snyder <snyder@bnl.gov> + * @date Jun, 2018 + * @brief Unit test for CaloHelpersTest. + */ + + +#undef NDEBUG +#include "CaloIdentifier/CaloHelpersTest.h" +#include <iostream> +#include <cassert> + + +void test1() +{ + std::cout << "test1\n"; + CaloHelpersTest idhelpers; + std::cout << "LArEM: " + << idhelpers.emID().channel_hash_max() << " " + << idhelpers.emID().region_hash_max() << "\n"; + std::cout << "LArHEC: " + << idhelpers.hecID().channel_hash_max() << " " + << idhelpers.hecID().region_hash_max() << "\n"; + std::cout << "LArFCAL: " + << idhelpers.fcalID().channel_hash_max() << " " + << idhelpers.fcalID().region_hash_max() << "\n"; + std::cout << "LArMinifcal: " + << idhelpers.minifcalID().channel_hash_max() << " " + << idhelpers.minifcalID().region_hash_max() << "\n"; + std::cout << "Tile: " + << idhelpers.tileID().channel_hash_max() << " " + << idhelpers.tileID().region_hash_max() << "\n"; + std::cout << "calo: " + << idhelpers.caloID().calo_cell_hash_max() << " " + << idhelpers.caloID().calo_region_hash_max() << "\n"; +} + + +int main() +{ + std::cout << "CaloIdentifier/CaloHelpersTest\n"; + test1(); + return 0; +} -- GitLab From be37dbf6d09224480c937ee56edbd06600bc6472 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Mon, 16 Jul 2018 22:50:02 +0200 Subject: [PATCH 480/562] DataModelRunTests: Update reference file. Update reference file for gaudi changes. Former-commit-id: cb4aebcf6f28f72a5344540211a84923f5653dde --- .../share/ByteStreamTestRead.ref | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestRead.ref b/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestRead.ref index e2767cc23e36..c959ae6305bf 100644 --- a/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestRead.ref +++ b/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestRead.ref @@ -1,12 +1,12 @@ -Thu Jun 14 19:44:00 CEST 2018 +Mon Jul 16 19:56:49 CEST 2018 Preloading tcmalloc_minimal.so Py:Athena INFO including file "AthenaCommon/Preparation.py" -Py:Athena INFO using release [AthenaWorkDir-22.0.1] [x86_64-slc6-gcc62-opt] [atlas-work3/5e04217fa06] -- built on [2018-06-14T1530] +Py:Athena INFO using release [AthenaWorkDir-22.0.1] [x86_64-slc6-gcc62-dbg] [atlas-work3/a36f862d8a5] -- built on [2018-07-16T1502] Py:Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Py:Athena INFO executing ROOT6Setup Py:Athena INFO including file "AthenaCommon/Execution.py" Py:Athena INFO including file "DataModelRunTests/ByteStreamTestRead_jo.py" -[?1034hPy:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +[?1034hPy:ConfigurableDb INFO Read module info for 5509 configurables from 55 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Py:Athena INFO including file "AthenaCommon/runbatch.py" ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 @@ -14,7 +14,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus021.cern.ch on Thu Jun 14 19:44:16 2018 + running on lxplus054.cern.ch on Mon Jul 16 19:57:10 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -22,8 +22,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 10029 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 +ClassIDSvc INFO getRegistryEntries: read 10094 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 @@ -47,14 +46,14 @@ PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.x 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-07-15T2059/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-dbg/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus054.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc INFO Setting up APR FileCatalog and Streams PoolSvc INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] -MetaDataSvc.Byt... INFO Initializing MetaDataSvc.ByteStreamMetadataTool - package version ByteStreamCnvSvc-00-00-00 +ToolSvc.ByteStr... INFO Initializing ToolSvc.ByteStreamMetadataTool - package version ByteStreamCnvSvc-00-00-00 ClassIDSvc INFO getRegistryEntries: read 1907 CLIDRegistry entries for module ALL TrigSerializeCn... INFO initialize() HistogramPersis...WARNING Histograms saving not required. @@ -84,7 +83,7 @@ Warning in <TClass::Init>: no dictionary for class MdtTrackSegmentCollection_p2 ToolSvc.TrigSer... INFO Initializing - Package version: TrigSerializeTP-00-00-00 APR:DbReflex:fo...WARNING doing GUID scan on ALL types for Class ID=10DE610D-5634-4D42-80D4-80B0A8C16452 Warning in <TClass::Init>: no dictionary for class coral::AttributeList is available -ClassIDSvc INFO getRegistryEntries: read 13230 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 13246 CLIDRegistry entries for module ALL APR:DbReflex:fo...WARNING doing GUID scan on ALL types for Class ID=2577D84A-BC0F-4CD2-9539-9F0A4EFC64AA ClassIDSvc INFO getRegistryEntries: read 70 CLIDRegistry entries for module ALL APR:DbReflex:fo...WARNING doing GUID scan on ALL types for Class ID=740C4020-F0A3-40B3-88E1-B15A8055DB64 @@ -1604,7 +1603,7 @@ IncidentProcAlg2 INFO Finalize EventInfoByteSt... INFO finalize AthDictLoaderSvc INFO in finalize... ToolSvc INFO Removing all tools created by ToolSvc -MetaDataSvc.Byt... INFO in finalize() +ToolSvc.ByteStr... INFO in finalize() ToolSvc.TrigTSe... INFO ToolSvc.TrigTSerializer no problems encountered ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully -- GitLab From 4bd1720299ee366f4f111aaa07c7338f77fe0485 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Thu, 5 Jul 2018 10:30:56 +0200 Subject: [PATCH 481/562] AthAsgExUnittest: Coverity 115460. Coverity warning: uninitialized member. Former-commit-id: 52faa3e1e27c1af89f3488b4820b4d12b10c60f5 --- .../AthenaExamples/AthAsgExUnittest/test/gt_AthExUnittest.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/Control/AthenaExamples/AthAsgExUnittest/test/gt_AthExUnittest.cxx b/Control/AthenaExamples/AthAsgExUnittest/test/gt_AthExUnittest.cxx index 600db43fe966..119bf817505f 100644 --- a/Control/AthenaExamples/AthAsgExUnittest/test/gt_AthExUnittest.cxx +++ b/Control/AthenaExamples/AthAsgExUnittest/test/gt_AthExUnittest.cxx @@ -27,6 +27,7 @@ namespace Athena_test { MyPackageAlgTest() // : InitGaudiGoogleTest( MSG::INFO ) // get usual message blurb + : myAlg(nullptr) {} virtual void SetUp() override { -- GitLab From 81cf81aed898291fb58dd31b5dc7556091c3af92 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Mon, 16 Jul 2018 22:39:30 +0200 Subject: [PATCH 482/562] PileupReweighting: Fix compilation warning. Compilation warning: unused argument. Former-commit-id: abffe6934f682990a196ecc22f136acbffa5d31f --- .../PileupReweighting/Root/PileupReweightingTool.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PhysicsAnalysis/AnalysisCommon/PileupReweighting/Root/PileupReweightingTool.cxx b/PhysicsAnalysis/AnalysisCommon/PileupReweighting/Root/PileupReweightingTool.cxx index 9b5985e8cb3c..13fac3aee995 100644 --- a/PhysicsAnalysis/AnalysisCommon/PileupReweighting/Root/PileupReweightingTool.cxx +++ b/PhysicsAnalysis/AnalysisCommon/PileupReweighting/Root/PileupReweightingTool.cxx @@ -77,7 +77,7 @@ PileupReweightingTool::PileupReweightingTool( const std::string& name ) :CP::TPi #ifndef XAOD_STANDALONE //rootcore can't do this yet! -void PileupReweightingTool::updateHandler(Property& p) { +void PileupReweightingTool::updateHandler(Property& /*p*/) { //call the original update handler EnableDebugging(this->msgLvl(MSG::DEBUG)); } -- GitLab From 20cc8b0c8b16c9bf39d514f11e3fbbebca117322 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Mon, 16 Jul 2018 22:36:51 +0200 Subject: [PATCH 483/562] TriggerMatchingTool: Fix compilation warning. Compilation warning: unused argument. Former-commit-id: ce44bcf9e47a1c42ce1c28be76d6ea24e10b8860 --- Trigger/TrigAnalysis/TriggerMatchingTool/Root/MatchingTool.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Trigger/TrigAnalysis/TriggerMatchingTool/Root/MatchingTool.cxx b/Trigger/TrigAnalysis/TriggerMatchingTool/Root/MatchingTool.cxx index 48e8caea582f..d4f14209fa90 100644 --- a/Trigger/TrigAnalysis/TriggerMatchingTool/Root/MatchingTool.cxx +++ b/Trigger/TrigAnalysis/TriggerMatchingTool/Root/MatchingTool.cxx @@ -37,7 +37,7 @@ namespace Trig { } #ifndef XAOD_STANDALONE - void MatchingTool::updateOutputLevel(Property& p) { + void MatchingTool::updateOutputLevel(Property& /*p*/) { impl()->msg().setLevel(msgLevel()); //pass on our message level to the matchingimplementation } #endif -- GitLab From e80df85b00ba3613cf9872af36c661af8eba5a03 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Mon, 16 Jul 2018 22:38:26 +0200 Subject: [PATCH 484/562] TrigDecisionTool: Fix compilation warning. Compilation warning: unused argument. Former-commit-id: 8fea32b7ada6777477fabc62c433cdeb0b4ff4d7 --- Trigger/TrigAnalysis/TrigDecisionTool/Root/TrigDecisionTool.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/Root/TrigDecisionTool.cxx b/Trigger/TrigAnalysis/TrigDecisionTool/Root/TrigDecisionTool.cxx index 117226b86ba3..fe262391681f 100644 --- a/Trigger/TrigAnalysis/TrigDecisionTool/Root/TrigDecisionTool.cxx +++ b/Trigger/TrigAnalysis/TrigDecisionTool/Root/TrigDecisionTool.cxx @@ -84,7 +84,7 @@ Trig::TrigDecisionTool::TrigDecisionTool(const std::string& name) : } #ifdef ASGTOOL_ATHENA -void Trig::TrigDecisionTool::outputlevelupdateHandler(Property& p) { +void Trig::TrigDecisionTool::outputlevelupdateHandler(Property& /*p*/) { //call the original update handler Logger::msg().setLevel(AthMessaging::msg().level()); } -- GitLab From 6a85dc8974758f3dd6324b3fd7413a8e47586d4b Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Mon, 16 Jul 2018 22:24:57 +0200 Subject: [PATCH 485/562] AthenaPoolMultiTest: Update reference file. Update reference file for gaudi/metadata changes. Fixes failures in master build. Former-commit-id: 7106510b16c60c1dba6d9345808115884953eccd --- .../AthenaPoolMultiTest/share/AthenaPoolMultiTestCheckNull.ref | 1 + 1 file changed, 1 insertion(+) diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestCheckNull.ref b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestCheckNull.ref index 3fc33ab72b17..8936c70e03a6 100644 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestCheckNull.ref +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestCheckNull.ref @@ -1,6 +1,7 @@ ReadData DEBUG Property update for OutputLevel : new value = 2 ReadData INFO in initialize() EventSelector DEBUG Property update for OutputLevel : new value = 2 +EventSelector DEBUG Service base class initialized successfully EventSelector INFO reinitialization... EventSelector INFO EventSelection with query EventSelector DEBUG Try item: "PFN:NullableCollection.root" from the collection list. -- GitLab From c9ca1698a7b046468098055bb777d318121cc97d Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Mon, 16 Jul 2018 22:41:07 +0200 Subject: [PATCH 486/562] ByteStreamTest: Update reference files. Update reference files for gaudi/metadata changes. Fixes failures in master. Also clean up useless verbosity from the test comparison script. Former-commit-id: 4b6ab9dc17a09c0f66b27b87b15b890604117ab7 --- .../share/ByteStreamTestBadEvents.ref | 1 + .../share/ByteStreamTestMetaRead.ref | 122 +++++++++--------- .../share/ByteStreamTestMetaWrite.ref | 122 +++++++++--------- .../share/ByteStreamTestSelectors.ref | 1 + .../share/ByteStreamTestSkipNone.ref | 1 + .../share/ByteStreamTestSkipOne.ref | 1 + Event/ByteStreamTest/test/post_check_bs.sh | 8 +- 7 files changed, 131 insertions(+), 125 deletions(-) diff --git a/Event/ByteStreamTest/share/ByteStreamTestBadEvents.ref b/Event/ByteStreamTest/share/ByteStreamTestBadEvents.ref index 8bea483f21a6..e0a02c4de89a 100644 --- a/Event/ByteStreamTest/share/ByteStreamTestBadEvents.ref +++ b/Event/ByteStreamTest/share/ByteStreamTestBadEvents.ref @@ -1,5 +1,6 @@ EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version ByteStreamCnvSvc-00-00-00 +EventSelector DEBUG Service base class initialized successfully ByteStreamInputSvc INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00 ByteStreamInputSvcWARNING MaxBadEvents property has been moved to EventSelector, please use svgMgr.EventSelector.MaxBadEvents instead EventSelector INFO Retrieved MaxBadEvents= 'MaxBadEvents':10 from ByteStreamInputSvc diff --git a/Event/ByteStreamTest/share/ByteStreamTestMetaRead.ref b/Event/ByteStreamTest/share/ByteStreamTestMetaRead.ref index 1e0ba109cc78..9d9aeff33358 100644 --- a/Event/ByteStreamTest/share/ByteStreamTestMetaRead.ref +++ b/Event/ByteStreamTest/share/ByteStreamTestMetaRead.ref @@ -1,7 +1,9 @@ EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version ByteStreamCnvSvc-00-00-00 +EventSelector DEBUG Service base class initialized successfully ByteStreamInputSvc DEBUG Property update for OutputLevel : new value = 2 ByteStreamInputSvc INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00 +ByteStreamInputSvc DEBUG Service base class initialized successfully ByteStreamAttLi... DEBUG Property update for OutputLevel : new value = 2 ByteStreamAttLi... DEBUG ByteStreamAttListMetadataSvc::initialize() DetectorStore_ImplWARNING retrieve(non-const): No valid proxy for object RunEventTag of type AthenaAttributeList(CLID 40774348) @@ -23,221 +25,221 @@ ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 2208 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14dbd600 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1bd5c000 ByteStreamInputSvc DEBUG switched to next event in slot INVALID -ByteStreamInputSvc DEBUG ByteStream File GUID:1A49268A-A0DA-E711-84E5-02163E01825D +ByteStreamInputSvc DEBUG ByteStream File GUID:AE371D9D-2889-E811-9C7A-FA163E0C223C ByteStreamInputSvc DEBUG ByteStream Event Position in File: 424 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x14e444b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1bc85de0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 2244 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1449e000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1bd5c900 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 0 -ByteStreamInputSvc DEBUG ByteStream File GUID:1A49268A-A0DA-E711-84E5-02163E01825D +ByteStreamInputSvc DEBUG ByteStream File GUID:AE371D9D-2889-E811-9C7A-FA163E0C223C ByteStreamInputSvc DEBUG ByteStream Event Position in File: 2648 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x14e444b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1bc85de0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 4028 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x12bf7000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1919a000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 1 -ByteStreamInputSvc DEBUG ByteStream File GUID:1A49268A-A0DA-E711-84E5-02163E01825D +ByteStreamInputSvc DEBUG ByteStream File GUID:AE371D9D-2889-E811-9C7A-FA163E0C223C ByteStreamInputSvc DEBUG ByteStream Event Position in File: 4908 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x14e444b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1bc85de0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 2244 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1449e000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1bd5c900 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 2 -ByteStreamInputSvc DEBUG ByteStream File GUID:1A49268A-A0DA-E711-84E5-02163E01825D +ByteStreamInputSvc DEBUG ByteStream File GUID:AE371D9D-2889-E811-9C7A-FA163E0C223C ByteStreamInputSvc DEBUG ByteStream Event Position in File: 8952 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x14e444b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1bc85de0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 2208 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14dbd600 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1bd5c000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 3 -ByteStreamInputSvc DEBUG ByteStream File GUID:1A49268A-A0DA-E711-84E5-02163E01825D +ByteStreamInputSvc DEBUG ByteStream File GUID:AE371D9D-2889-E811-9C7A-FA163E0C223C ByteStreamInputSvc DEBUG ByteStream Event Position in File: 11212 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x14e444b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1bc85de0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 2208 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1449e000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1bd5c900 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 4 -ByteStreamInputSvc DEBUG ByteStream File GUID:1A49268A-A0DA-E711-84E5-02163E01825D +ByteStreamInputSvc DEBUG ByteStream File GUID:AE371D9D-2889-E811-9C7A-FA163E0C223C ByteStreamInputSvc DEBUG ByteStream Event Position in File: 13436 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x14e444b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1bc85de0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 2240 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14dbd600 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1bd5c000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 5 -ByteStreamInputSvc DEBUG ByteStream File GUID:1A49268A-A0DA-E711-84E5-02163E01825D +ByteStreamInputSvc DEBUG ByteStream File GUID:AE371D9D-2889-E811-9C7A-FA163E0C223C ByteStreamInputSvc DEBUG ByteStream Event Position in File: 15660 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x14e444b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1bc85de0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 2208 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1449e000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1bd5c900 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 6 -ByteStreamInputSvc DEBUG ByteStream File GUID:1A49268A-A0DA-E711-84E5-02163E01825D +ByteStreamInputSvc DEBUG ByteStream File GUID:AE371D9D-2889-E811-9C7A-FA163E0C223C ByteStreamInputSvc DEBUG ByteStream Event Position in File: 17916 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x14e444b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1bc85de0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 2208 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14dbd600 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1bd5c000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 7 -ByteStreamInputSvc DEBUG ByteStream File GUID:1A49268A-A0DA-E711-84E5-02163E01825D +ByteStreamInputSvc DEBUG ByteStream File GUID:AE371D9D-2889-E811-9C7A-FA163E0C223C ByteStreamInputSvc DEBUG ByteStream Event Position in File: 20140 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x14e444b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1bc85de0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 2424 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14d64000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1ad54a00 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 8 -ByteStreamInputSvc DEBUG ByteStream File GUID:1A49268A-A0DA-E711-84E5-02163E01825D +ByteStreamInputSvc DEBUG ByteStream File GUID:AE371D9D-2889-E811-9C7A-FA163E0C223C ByteStreamInputSvc DEBUG ByteStream Event Position in File: 22364 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x14e444b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1bc85de0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 2240 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14dbd600 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1bd5c000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 9 -ByteStreamInputSvc DEBUG ByteStream File GUID:1A49268A-A0DA-E711-84E5-02163E01825D +ByteStreamInputSvc DEBUG ByteStream File GUID:AE371D9D-2889-E811-9C7A-FA163E0C223C ByteStreamInputSvc DEBUG ByteStream Event Position in File: 24804 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x14e444b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1bc85de0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 2208 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1449e000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1bd5c900 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 10 -ByteStreamInputSvc DEBUG ByteStream File GUID:1A49268A-A0DA-E711-84E5-02163E01825D +ByteStreamInputSvc DEBUG ByteStream File GUID:AE371D9D-2889-E811-9C7A-FA163E0C223C ByteStreamInputSvc DEBUG ByteStream Event Position in File: 27060 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x14e444b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1bc85de0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 2208 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14dbd600 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1bd5c000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 11 -ByteStreamInputSvc DEBUG ByteStream File GUID:1A49268A-A0DA-E711-84E5-02163E01825D +ByteStreamInputSvc DEBUG ByteStream File GUID:AE371D9D-2889-E811-9C7A-FA163E0C223C ByteStreamInputSvc DEBUG ByteStream Event Position in File: 29284 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x14e444b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1bc85de0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 2208 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1449e000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1bd5c900 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 12 -ByteStreamInputSvc DEBUG ByteStream File GUID:1A49268A-A0DA-E711-84E5-02163E01825D +ByteStreamInputSvc DEBUG ByteStream File GUID:AE371D9D-2889-E811-9C7A-FA163E0C223C ByteStreamInputSvc DEBUG ByteStream Event Position in File: 31508 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x14e444b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1bc85de0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 2208 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14dbd600 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1bd5c000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 13 -ByteStreamInputSvc DEBUG ByteStream File GUID:1A49268A-A0DA-E711-84E5-02163E01825D +ByteStreamInputSvc DEBUG ByteStream File GUID:AE371D9D-2889-E811-9C7A-FA163E0C223C ByteStreamInputSvc DEBUG ByteStream Event Position in File: 33732 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x14e444b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1bc85de0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 2208 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1449e000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1bd5c900 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 14 -ByteStreamInputSvc DEBUG ByteStream File GUID:1A49268A-A0DA-E711-84E5-02163E01825D +ByteStreamInputSvc DEBUG ByteStream File GUID:AE371D9D-2889-E811-9C7A-FA163E0C223C ByteStreamInputSvc DEBUG ByteStream Event Position in File: 35956 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x14e444b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1bc85de0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 2208 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14dbd600 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1bd5c000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 15 -ByteStreamInputSvc DEBUG ByteStream File GUID:1A49268A-A0DA-E711-84E5-02163E01825D +ByteStreamInputSvc DEBUG ByteStream File GUID:AE371D9D-2889-E811-9C7A-FA163E0C223C ByteStreamInputSvc DEBUG ByteStream Event Position in File: 38180 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x14e444b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1bc85de0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 2240 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1449e000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1bd5c900 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 16 -ByteStreamInputSvc DEBUG ByteStream File GUID:1A49268A-A0DA-E711-84E5-02163E01825D +ByteStreamInputSvc DEBUG ByteStream File GUID:AE371D9D-2889-E811-9C7A-FA163E0C223C ByteStreamInputSvc DEBUG ByteStream Event Position in File: 40404 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x14e444b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1bc85de0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 2208 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x14dbd600 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1bd5c000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 17 -ByteStreamInputSvc DEBUG ByteStream File GUID:1A49268A-A0DA-E711-84E5-02163E01825D +ByteStreamInputSvc DEBUG ByteStream File GUID:AE371D9D-2889-E811-9C7A-FA163E0C223C ByteStreamInputSvc DEBUG ByteStream Event Position in File: 42660 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x14e444b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1bc85de0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 2208 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1449e000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1bd5c900 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 18 -ByteStreamInputSvc DEBUG ByteStream File GUID:1A49268A-A0DA-E711-84E5-02163E01825D +ByteStreamInputSvc DEBUG ByteStream File GUID:AE371D9D-2889-E811-9C7A-FA163E0C223C ByteStreamInputSvc DEBUG ByteStream Event Position in File: 44884 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x14e444b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1bc85de0 --- key: RunEventTag StoreDump INFO AttributeList has size 2 EventSelector INFO End of input file list reached EventSelector DEBUG Event source found no more valid files left in input list diff --git a/Event/ByteStreamTest/share/ByteStreamTestMetaWrite.ref b/Event/ByteStreamTest/share/ByteStreamTestMetaWrite.ref index 5fc7473fa66e..e2d77721b761 100644 --- a/Event/ByteStreamTest/share/ByteStreamTestMetaWrite.ref +++ b/Event/ByteStreamTest/share/ByteStreamTestMetaWrite.ref @@ -12,23 +12,23 @@ StreamBSFileOutput INFO I/O reinitialization... EventSelector INFO Initializing EventSelector - package version ByteStreamCnvSvc-00-00-00 ByteStreamInputSvc DEBUG Property update for OutputLevel : new value = 2 ByteStreamInputSvc INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00 +ByteStreamInputSvc DEBUG Service base class initialized successfully EventSelector INFO reinitialization... AthenaEventLoopMgr INFO Setup EventSelector service EventSelector -MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector ByteStreamInputSvc DEBUG Recorded ByteStreamMetadata in InputMetadataStore ByteStreamInputSvc DEBUG run parameters = ByteStreamInputSvc DEBUG Number of Free meta data strings: 0 - flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f5c50 --- key: RunEventTag ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1714224 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19c12000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1a8e2000 ByteStreamInputSvc DEBUG switched to next event in slot INVALID ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 1356 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f5c50 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamAttLi... INFO ByteStreamAttListMetadataSvc::toBSMetadata ByteStreamAttLi... INFO Found RunEventTag in DetectorStore @@ -40,229 +40,229 @@ ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1540248 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19be8000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1a8b8000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 0 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 1146448 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f5c50 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f3d10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1554852 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19a6e000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1a73e000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 1 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 2099072 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f5c50 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f3d10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1619388 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1a1ea000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1af72000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 2 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 3043540 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f5c50 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f3d10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1740484 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19dbe000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1b74c000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 3 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 3977460 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f5c50 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f3d10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1923876 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1a67e000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 4 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 5134216 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f5c50 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f3d10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1520872 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1a67e000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 5 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 6399740 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f5c50 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f3d10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1593544 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1af72000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 6 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 7359760 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f5c50 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f3d10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1650748 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1a812000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 7 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 8354964 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f5c50 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f3d10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1453240 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1a7e2000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 8 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 9433940 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f5c50 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f3d10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1409484 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1a7d8000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 9 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 10316932 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f5c50 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f3d10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1532924 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1a67e000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 10 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 11186924 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f5c50 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f3d10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1705592 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1af72000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 11 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 12164472 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f5c50 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f3d10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1645572 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1a810000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 12 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 13245580 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f5c50 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f3d10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1743172 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1a67e000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 13 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 14290592 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f5c50 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f3d10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1448008 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1a67e000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 14 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 15400828 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f5c50 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f3d10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1460724 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1af72000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 15 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 16267644 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f5c50 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f3d10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1456472 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1a7e2000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 16 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 17188928 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f5c50 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f3d10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1578776 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1a67e000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 17 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 18088228 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f5c50 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f3d10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1835008 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 400 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x19604000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x1af72000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 18 ByteStreamInputSvc DEBUG ByteStream File GUID:F211972A-C3ED-E111-A141-003048F23FA0 ByteStreamInputSvc DEBUG ByteStream Event Position in File: 19076112 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x195ca3f0 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x195c84b0 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f5c50 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1a1f3d10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG Calling ByteStreamInputSvc::stop() ByteStreamEvent... INFO number of events written: 20 diff --git a/Event/ByteStreamTest/share/ByteStreamTestSelectors.ref b/Event/ByteStreamTest/share/ByteStreamTestSelectors.ref index ee4d7217af99..208a444db5b3 100644 --- a/Event/ByteStreamTest/share/ByteStreamTestSelectors.ref +++ b/Event/ByteStreamTest/share/ByteStreamTestSelectors.ref @@ -1,5 +1,6 @@ EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version ByteStreamCnvSvc-00-00-00 +EventSelector DEBUG Service base class initialized successfully ByteStreamInputSvc INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00 EventSelector.E... DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO reinitialization... diff --git a/Event/ByteStreamTest/share/ByteStreamTestSkipNone.ref b/Event/ByteStreamTest/share/ByteStreamTestSkipNone.ref index 01cfb35ce4fb..54b23500a178 100644 --- a/Event/ByteStreamTest/share/ByteStreamTestSkipNone.ref +++ b/Event/ByteStreamTest/share/ByteStreamTestSkipNone.ref @@ -1,5 +1,6 @@ EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version ByteStreamCnvSvc-00-00-00 +EventSelector DEBUG Service base class initialized successfully ByteStreamInputSvc INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00 EventSelector INFO reinitialization... AthenaEventLoopMgr INFO Setup EventSelector service EventSelector diff --git a/Event/ByteStreamTest/share/ByteStreamTestSkipOne.ref b/Event/ByteStreamTest/share/ByteStreamTestSkipOne.ref index 4feff58fe3a9..f889ee7c9a02 100644 --- a/Event/ByteStreamTest/share/ByteStreamTestSkipOne.ref +++ b/Event/ByteStreamTest/share/ByteStreamTestSkipOne.ref @@ -1,5 +1,6 @@ EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version ByteStreamCnvSvc-00-00-00 +EventSelector DEBUG Service base class initialized successfully ByteStreamInputSvc INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00 EventSelector INFO reinitialization... AthenaEventLoopMgr INFO Setup EventSelector service EventSelector diff --git a/Event/ByteStreamTest/test/post_check_bs.sh b/Event/ByteStreamTest/test/post_check_bs.sh index 6dc642b9c821..57a99d3c38be 100755 --- a/Event/ByteStreamTest/test/post_check_bs.sh +++ b/Event/ByteStreamTest/test/post_check_bs.sh @@ -1,4 +1,4 @@ -#!/bin/sh -xv +#!/bin/sh #/** @file post_check_co.sh # @brief sh script that check the return code of an executable and compares # its output with a reference (if available). Modified to restrict checks @@ -22,7 +22,7 @@ else joblog=${test}.log if [ "$status" = 0 ] then - echo "[92;1m post_check_co.sh> OK: ${test} exited normally. Output is in $joblog [m" + #echo "[92;1m post_check_co.sh> OK: ${test} exited normally. Output is in $joblog [m" reflog=../share/${test}.ref grep -e 'RunEventTag' \ -e 'ByteStreamAtt' \ @@ -102,7 +102,7 @@ else echo "[97;101;1m post_check_co.sh> ERROR: $joblog and $reflog differ [m" exit 1 else - echo "[92;1m post_check_co.sh> OK: $joblog and $reflog identical [m" + true; #echo "[92;1m post_check_co.sh> OK: $joblog and $reflog identical [m" fi else tail $joblog @@ -119,7 +119,7 @@ fi # Check output for ERROR/FATAL joblog=${test}.log -echo +#echo exit $status -- GitLab From 25a96b96499ed4d985fd785f5eb0c473a397b033 Mon Sep 17 00:00:00 2001 From: Olga Igonkina <olga.igonkina@cern.ch> Date: Mon, 16 Jul 2018 17:17:48 +0000 Subject: [PATCH 487/562] Merge branch 'HLTint_ART17664' into '21.1' TrigP1Test fix (ATR-17664) See merge request atlas/athena!12756 (cherry picked from commit 50e4290620e47e58745419f4feffb50e520e4ccc [formerly 80294992ff6a1984469f06f9787e151d48c14173]) 891548d0 TrigP1Test fix (ATR-17664) Former-commit-id: b5f1bd1f4bdfb5d0cabda2fde763ccf07430dc50 --- Event/EventContainers/test/ID_ContainerTest.h | 0 .../TrigP1Test/Testing/TrigP1Test_ART.conf | 10 ++++++++++ .../test/test_athenaHLT_LatestRun_MCV7_build.sh | 11 ++++++++--- 3 files changed, 18 insertions(+), 3 deletions(-) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 diff --git a/Trigger/TrigValidation/TrigP1Test/Testing/TrigP1Test_ART.conf b/Trigger/TrigValidation/TrigP1Test/Testing/TrigP1Test_ART.conf index a557dddb4db8..6ae7eeed32dc 100644 --- a/Trigger/TrigValidation/TrigP1Test/Testing/TrigP1Test_ART.conf +++ b/Trigger/TrigValidation/TrigP1Test/Testing/TrigP1Test_ART.conf @@ -865,3 +865,13 @@ test 182 checkcount /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/ref/latest/HLT_physicsV7_FTK/trigp1test_HLT_physicsV7_FTK.root 1 HLT athena_cmd athenaHLT.py -o HLT_physicsV7_FTK -n 30 -f /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/RAW_FTK.pool.root -c 'testPhysicsV7=True;HLTOutputLevel=INFO;doValidation=True;fpeAuditor=True;from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.doFTK=True' TriggerRelease/runHLT_standalone.py post_command chainDump.py -n -S + +test 183 + name athenaHLT_LatestRun_MCV7 + doc athenaHLT on latest available run + filterlog filterREGTEST.py + checklog --config checklogTrigP1Test.conf --showexcludestats + athena_cmd trigp1test_athenaHLT.py --nfiles=1 --dir='/eos/atlas/atlastier0/rucio/data18_13TeV/physics_Main/' --modifiers="testMCV7=True;fpeAuditor=True;from PerfMonComps.PerfMonFlags import jobproperties as pmon_properties ; pmon_properties.PerfMonFlags.doSemiDetailedMonitoring=True" + post_command chainDump.py -n -S + + diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_athenaHLT_LatestRun_MCV7_build.sh b/Trigger/TrigValidation/TrigP1Test/test/test_athenaHLT_LatestRun_MCV7_build.sh index 57256e037893..58be93c4a906 100755 --- a/Trigger/TrigValidation/TrigP1Test/test/test_athenaHLT_LatestRun_MCV7_build.sh +++ b/Trigger/TrigValidation/TrigP1Test/test/test_athenaHLT_LatestRun_MCV7_build.sh @@ -9,12 +9,17 @@ # art-include: master/AthenaP1 # art-include: master/Athena -export NAME="athenaHLT_LatestRun_MCV7_build" +if [ -z ${TEST} ]; then + export TEST="TrigP1Test" +fi -timeout 40m trigp1test_athenaHLT.py --nfiles=1 --dir='/eos/atlas/atlastier0/rucio/data18_13TeV/physics_Main/' --modifiers="testMCV7=True;fpeAuditor=True;from PerfMonComps.PerfMonFlags import jobproperties as pmon_properties ; pmon_properties.PerfMonFlags.doSemiDetailedMonitoring=True" +export NAME="athenaHLT_LatestRun_MCV7" +export JOB_LOG="${NAME}.log" + +timeout 100m trigtest_ART.pl --cleardir --test ${NAME} --rundir ${NAME} --conf TrigP1Test_ART.conf | tee ${JOB_LOG} ATH_RETURN=${PIPESTATUS[0]} echo "art-result: ${ATH_RETURN} ${NAME}" -timeout 10m exec_art_trigp1test_post.sh + -- GitLab From 8a706e5eaacd7a9bf4868bdde37929916b177641 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Mon, 16 Jul 2018 22:48:33 +0200 Subject: [PATCH 488/562] AthenaPoolExampleAlgorithms: Update reference files. Update reference files for metadata changes. Fixes failures in master. Former-commit-id: 7bc41738b2917c7dc47a5bc2398ea46112095a13 --- .../share/AthenaPoolExample_Filter.ref | 42 ++-- .../share/AthenaPoolExample_RCond.ref | 37 ++-- .../share/AthenaPoolExample_RFilter.ref | 28 +-- .../share/AthenaPoolExample_RMeta.ref | 50 ++--- .../share/AthenaPoolExample_ReWrite.ref | 42 ++-- .../share/AthenaPoolExample_ReWriteAgain.ref | 42 ++-- .../share/AthenaPoolExample_ReWriteNext.ref | 40 ++-- .../share/AthenaPoolExample_Read.ref | 198 ++++++++---------- .../share/AthenaPoolExample_ReadAgain.ref | 176 +++++++--------- .../share/AthenaPoolExample_ReadBN.ref | 198 ++++++++---------- .../share/AthenaPoolExample_ReadConcat.ref | 196 ++++++++--------- .../share/AthenaPoolExample_ReadNoBN.ref | 194 ++++++++--------- .../share/AthenaPoolExample_WCond.ref | 36 ++-- 13 files changed, 560 insertions(+), 719 deletions(-) diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Filter.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Filter.ref index 4f34fca1014e..736ed3f30f39 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Filter.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Filter.ref @@ -1,11 +1,11 @@ -Thu Jun 14 20:33:11 CEST 2018 +Mon Jul 16 20:30:46 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_FilterJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO Read module info for 5509 configurables from 55 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 @@ -13,7 +13,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus021.cern.ch on Thu Jun 14 20:33:22 2018 + running on lxplus052.cern.ch on Mon Jul 16 20:30:53 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -21,21 +21,22 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 +ClassIDSvc INFO getRegistryEntries: read 2428 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 ReadData DEBUG Property update for OutputLevel : new value = 2 ReadData INFO in initialize() MetaDataSvc DEBUG Property update for OutputLevel : new value = 2 MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 +MetaDataSvc DEBUG Service base class initialized successfully AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00 PoolSvc DEBUG Property update for OutputLevel : new value = 2 +PoolSvc DEBUG Service base class initialized successfully 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-07-15T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus052.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -43,11 +44,9 @@ PoolSvc DEBUG POOL ReadCatalog is file:Catalog.xml PoolSvc INFO POOL WriteCatalog is file:Catalog1.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] -MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 -MetaDataSvc.IOV... DEBUG in initialize() -MetaDataSvc.IOV... DEBUG initialize(): need to modify folders EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 +EventSelector DEBUG Service base class initialized successfully EventSelector.Q... DEBUG Property update for OutputLevel : new value = 2 EventSelector.Q... INFO in initialize() EventSelector INFO reinitialization... @@ -127,13 +126,8 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc.IOV... DEBUG handle() FirstInputFile for FID:???? -MetaDataSvc.IOV... DEBUG begin checkOverrideRunNumber -MetaDataSvc.IOV... DEBUG checkOverrideRunNumber: check if tag is set in jobOpts -MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name FID:???? -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 +AthenaPoolAddre... DEBUG Service base class initialized successfully ReadData DEBUG input handles: 0 ReadData DEBUG output handles: 0 ReadData DEBUG Data Deps for ReadData @@ -193,9 +187,7 @@ ApplicationMgr INFO Application Manager Started successfully MetaDataSvc DEBUG handle() BeginInputFile for FID:???? MetaDataSvc DEBUG initInputMetaDataStore: file name FID:???? MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for FID:???? -MetaDataSvc.IOV... DEBUG The first BeginInputFile incidence is fired along with the FirstInputFile incidence so we skip the processing of the Input File MetaData +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-00000006]. @@ -806,7 +798,7 @@ Stream1 INFO Records written: 11 Stream1 DEBUG Leaving handle RegStream1 DEBUG handle() incident type: MetaDataStop RegStream1.TagTool INFO Collection Events output: 10 -MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool Domain[ROOT_All] INFO -> Deaccess DbDatabase CREATE [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain UPDATE [ROOT_All] ApplicationMgr INFO Application Manager Stopped successfully @@ -824,13 +816,13 @@ EventSelector.Q... INFO in finalize() *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -commitOutput INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 11 cRep_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 32 -cObjR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 35 -cRepR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 43 +commitOutput INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.909(+- 2.87)/ 0/ 10 [ms] #= 11 fRep_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.312(+- 1.74)/ 0/ 10 [ms] #= 32 -cObj_ALL INFO Time User : Tot= 30 [ms] Ave/Min/Max=0.909(+- 2.87)/ 0/ 10 [ms] #= 33 -ChronoStatSvc INFO Time User : Tot= 1.07 [s] #= 1 +cObjR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 35 +cRepR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.233(+- 1.51)/ 0/ 10 [ms] #= 43 +cObj_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.606(+- 2.39)/ 0/ 10 [ms] #= 33 +ChronoStatSvc INFO Time User : Tot= 0.88 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RCond.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RCond.ref index 95ffaa71d44c..c23f482c048c 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RCond.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RCond.ref @@ -1,11 +1,11 @@ -Thu Jun 14 20:41:06 CEST 2018 +Mon Jul 16 20:52:18 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_RCondJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO Read module info for 5509 configurables from 55 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 @@ -13,7 +13,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus021.cern.ch on Thu Jun 14 20:41:17 2018 + running on lxplus052.cern.ch on Mon Jul 16 20:52:26 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -21,8 +21,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 +ClassIDSvc INFO getRegistryEntries: read 2428 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 ReadCond DEBUG Property update for OutputLevel : new value = 2 @@ -34,13 +33,15 @@ ReadData DEBUG Property update for OutputLevel : new value = 2 ReadData INFO in initialize() MetaDataSvc DEBUG Property update for OutputLevel : new value = 2 MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 +MetaDataSvc DEBUG Service base class initialized successfully AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00 PoolSvc DEBUG Property update for OutputLevel : new value = 2 +PoolSvc DEBUG Service base class initialized successfully 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-07-15T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus052.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -49,11 +50,9 @@ PoolSvc DEBUG POOL ReadCatalog is file:Catalog1.xml PoolSvc INFO POOL WriteCatalog is file:Catalog2.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] -MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 -MetaDataSvc.IOV... DEBUG in initialize() -MetaDataSvc.IOV... DEBUG initialize(): need to modify folders EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 +EventSelector DEBUG Service base class initialized successfully EventSelector INFO reinitialization... EventSelector INFO EventSelection with query EventSelector DEBUG Try item: "SimplePoolFile1.root" from the collection list. @@ -124,15 +123,11 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc.IOV... DEBUG handle() FirstInputFile for FID:???? -MetaDataSvc.IOV... DEBUG begin checkOverrideRunNumber -MetaDataSvc.IOV... DEBUG checkOverrideRunNumber: check if tag is set in jobOpts -MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name FID:???? -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 +AthenaPoolAddre... DEBUG Service base class initialized successfully CondProxyProvider DEBUG Property update for OutputLevel : new value = 2 CondProxyProvider INFO Initializing CondProxyProvider - package version EventSelectorAthenaPool-00-00-00 +CondProxyProvider DEBUG Service base class initialized successfully CondProxyProvider DEBUG Try item: "SimplePoolFile4.root" from the collection list. PersistencySvc:... DEBUG lookupPFN: SimplePoolFile4.root returned FID: '????' tech=ROOT_All Domain[ROOT_All] INFO -> Access DbDatabase READ [ROOT_All] ???? @@ -240,9 +235,7 @@ MetaDataHdr(Dat... DEBUG attributes# = 1 MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile1.root -MetaDataSvc.IOV... DEBUG The first BeginInputFile incidence is fired along with the FirstInputFile incidence so we skip the processing of the Input File MetaData +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 ClassIDSvc INFO getRegistryEntries: read 2687 CLIDRegistry entries for module ALL @@ -951,7 +944,7 @@ Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? MetaDataSvc DEBUG handle() EndInputFile for FID:???? MetaDataSvc DEBUG handle() LastInputFile for end AthenaEventLoopMgr INFO No more events in event selection -MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? ApplicationMgr INFO Application Manager Stopped successfully IncidentProcAlg1 INFO Finalize @@ -965,8 +958,8 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** cObjR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 70 -cObj_ALL INFO Time User : Tot= 40 [ms] Ave/Min/Max=0.615(+- 2.98)/ 0/ 20 [ms] #= 65 -ChronoStatSvc INFO Time User : Tot= 0.95 [s] #= 1 +cObj_ALL INFO Time User : Tot= 30 [ms] Ave/Min/Max=0.462(+- 2.73)/ 0/ 20 [ms] #= 65 +ChronoStatSvc INFO Time User : Tot= 0.83 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RFilter.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RFilter.ref index 88767de34a13..5ca6d2ff234d 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RFilter.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RFilter.ref @@ -1,11 +1,11 @@ -Thu Jun 14 20:33:26 CEST 2018 +Mon Jul 16 20:30:56 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_RFilterJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO Read module info for 5509 configurables from 55 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 @@ -13,7 +13,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus021.cern.ch on Thu Jun 14 20:33:37 2018 + running on lxplus052.cern.ch on Mon Jul 16 20:31:04 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -21,21 +21,22 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 +ClassIDSvc INFO getRegistryEntries: read 2428 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 ReadData DEBUG Property update for OutputLevel : new value = 2 ReadData INFO in initialize() MetaDataSvc DEBUG Property update for OutputLevel : new value = 2 MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 +MetaDataSvc DEBUG Service base class initialized successfully AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00 PoolSvc DEBUG Property update for OutputLevel : new value = 2 +PoolSvc DEBUG Service base class initialized successfully 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-07-15T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus052.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -44,16 +45,15 @@ PoolSvc DEBUG POOL ReadCatalog is file:Catalog1.xml PoolSvc INFO POOL WriteCatalog is file:Catalog2.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] -MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 -MetaDataSvc.IOV... DEBUG in initialize() -MetaDataSvc.IOV... DEBUG initialize(): need to modify folders EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 +EventSelector DEBUG Service base class initialized successfully EventSelector INFO reinitialization... EventSelector INFO EventSelection with query EventNumber > 9 EventSelector DEBUG Try item: "SimplePoolCollection5.root" from the collection list. EventSelector INFO Using standard collection ref AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 +AthenaPoolAddre... DEBUG Service base class initialized successfully ReadData DEBUG input handles: 0 ReadData DEBUG output handles: 0 ReadData DEBUG Data Deps for ReadData @@ -320,7 +320,7 @@ AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 10 events Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] AthenaEventLoopMgr INFO No more events in event selection -MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool ApplicationMgr INFO Application Manager Stopped successfully IncidentProcAlg1 INFO Finalize ReadData INFO in finalize() @@ -330,9 +330,9 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -cObjR_ALL INFO Time User : Tot= 90 [ms] Ave/Min/Max= 2.9(+- 15.9)/ 0/ 90 [ms] #= 31 -cObj_ALL INFO Time User : Tot= 130 [ms] Ave/Min/Max= 4.33(+- 18.2)/ 0/ 100 [ms] #= 30 -ChronoStatSvc INFO Time User : Tot= 1.06 [s] #= 1 +cObjR_ALL INFO Time User : Tot= 80 [ms] Ave/Min/Max= 2.58(+- 14.1)/ 0/ 80 [ms] #= 31 +cObj_ALL INFO Time User : Tot= 110 [ms] Ave/Min/Max= 3.67(+- 16.2)/ 0/ 90 [ms] #= 30 +ChronoStatSvc INFO Time User : Tot= 0.8 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RMeta.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RMeta.ref index a112a839ec7b..60498c03d390 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RMeta.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RMeta.ref @@ -1,11 +1,11 @@ -Thu Jun 14 20:53:58 CEST 2018 +Mon Jul 16 20:52:39 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_RMetaJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO Read module info for 5509 configurables from 55 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 @@ -13,7 +13,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus021.cern.ch on Thu Jun 14 20:54:09 2018 + running on lxplus052.cern.ch on Mon Jul 16 20:52:47 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -21,23 +21,24 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 +ClassIDSvc INFO getRegistryEntries: read 2428 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 ReadData DEBUG Property update for OutputLevel : new value = 2 ReadData INFO in initialize() MetaDataSvc DEBUG Property update for OutputLevel : new value = 2 MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 +MetaDataSvc DEBUG Service base class initialized successfully AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00 PoolSvc DEBUG Property update for OutputLevel : new value = 2 +PoolSvc DEBUG Service base class initialized successfully PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:Catalog2.xml) [ok] 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-07-15T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus052.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -45,13 +46,10 @@ PoolSvc DEBUG POOL ReadCatalog is xmlcatalog_file:Catalog2.xml PoolSvc INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] -MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 -MetaDataSvc.IOV... DEBUG in initialize() -MetaDataSvc.IOV... DEBUG initialize(): need to modify folders -MetaDataSvc.Ath... DEBUG Property update for OutputLevel : new value = 2 -MetaDataSvc.Ath... INFO in initialize() +ToolSvc.AthPool... INFO in initialize() EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 +EventSelector DEBUG Service base class initialized successfully EventSelector INFO reinitialization... EventSelector INFO EventSelection with query EventSelector DEBUG Try item: "SimplePoolFile5.root" from the collection list. @@ -124,13 +122,8 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc.IOV... DEBUG handle() FirstInputFile for FID:???? -MetaDataSvc.IOV... DEBUG begin checkOverrideRunNumber -MetaDataSvc.IOV... DEBUG checkOverrideRunNumber: check if tag is set in jobOpts -MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name FID:???? -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 +AthenaPoolAddre... DEBUG Service base class initialized successfully ReadData DEBUG input handles: 0 ReadData DEBUG output handles: 0 ReadData DEBUG Data Deps for ReadData @@ -206,20 +199,15 @@ MetaDataHdr(Dat... DEBUG attributes# = 1 MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.AthPoolEx::ReadMeta -MetaDataSvc.Ath... DEBUG saw BeginInputFile incident. +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.AthPoolEx::ReadMeta SimplePoolFile5... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaData(ExampleHitContainer_p1/PedestalWriteData) MetaData(Exampl... DEBUG Opening MetaData(Exampl... DEBUG attributes# = 1 MetaData(Exampl... DEBUG Branch container 'ExampleHitContainer_p1_PedestalWriteData' MetaData(Exampl... DEBUG Opened container MetaData(ExampleHitContainer_p1/PedestalWriteData) of type ROOT_Tree ClassIDSvc INFO getRegistryEntries: read 2697 CLIDRegistry entries for module ALL -MetaDataSvc.Ath... INFO Pedestal x = 193136 y = -5580.01 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile5.root -MetaDataSvc.IOV... DEBUG The first BeginInputFile incidence is fired along with the FirstInputFile incidence so we skip the processing of the Input File MetaData -MetaDataSvc.Ath... DEBUG handle() BeginInputFile -MetaDataSvc.Ath... DEBUG handle() BeginInputFile for SimplePoolFile5.root +ToolSvc.AthPool... INFO Pedestal x = 193136 y = -5580.01 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-00000000]. @@ -869,21 +857,21 @@ Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] MetaDataSvc DEBUG handle() EndInputFile for FID:???? MetaDataSvc DEBUG handle() LastInputFile for end AthenaEventLoopMgr INFO No more events in event selection -MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.AthPoolEx::ReadMeta +MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for ToolSvc.AthPoolEx::ReadMeta ApplicationMgr INFO Application Manager Stopped successfully IncidentProcAlg1 INFO Finalize ReadData INFO in finalize() IncidentProcAlg2 INFO Finalize AthDictLoaderSvc INFO in finalize... ToolSvc INFO Removing all tools created by ToolSvc -MetaDataSvc.Ath... INFO in finalize() +ToolSvc.AthPool... INFO in finalize() *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** cObjR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 67 -cObj_ALL INFO Time User : Tot= 30 [ms] Ave/Min/Max=0.469(+- 2.76)/ 0/ 20 [ms] #= 64 -ChronoStatSvc INFO Time User : Tot= 1.04 [s] #= 1 +cObj_ALL INFO Time User : Tot= 50 [ms] Ave/Min/Max=0.781(+- 3.21)/ 0/ 20 [ms] #= 64 +ChronoStatSvc INFO Time User : Tot= 0.82 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWrite.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWrite.ref index 86dd3973051f..37eb613f6e6e 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWrite.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWrite.ref @@ -1,11 +1,11 @@ -Thu Jun 14 19:57:30 CEST 2018 +Mon Jul 16 20:06:34 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_RWJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO Read module info for 5509 configurables from 55 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 @@ -13,7 +13,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus021.cern.ch on Thu Jun 14 19:57:41 2018 + running on lxplus052.cern.ch on Mon Jul 16 20:06:43 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -21,22 +21,23 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 +ClassIDSvc INFO getRegistryEntries: read 2428 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 ReadData DEBUG Property update for OutputLevel : new value = 2 ReadData INFO in initialize() MetaDataSvc DEBUG Property update for OutputLevel : new value = 2 MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 +MetaDataSvc DEBUG Service base class initialized successfully AthenaPoolCnvSvc DEBUG Property update for OutputLevel : new value = 2 AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00 PoolSvc DEBUG Property update for OutputLevel : new value = 2 +PoolSvc DEBUG Service base class initialized successfully 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-07-15T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus052.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -44,11 +45,9 @@ PoolSvc DEBUG POOL ReadCatalog is file:Catalog.xml PoolSvc INFO POOL WriteCatalog is file:Catalog1.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] -MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 -MetaDataSvc.IOV... DEBUG in initialize() -MetaDataSvc.IOV... DEBUG initialize(): need to modify folders EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 +EventSelector DEBUG Service base class initialized successfully EventSelector INFO reinitialization... EventSelector INFO EventSelection with query EventSelector DEBUG Try item: "SimplePoolFile1.root" from the collection list. @@ -125,13 +124,8 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc.IOV... DEBUG handle() FirstInputFile for FID:???? -MetaDataSvc.IOV... DEBUG begin checkOverrideRunNumber -MetaDataSvc.IOV... DEBUG checkOverrideRunNumber: check if tag is set in jobOpts -MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name FID:???? -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 +AthenaPoolAddre... DEBUG Service base class initialized successfully ReadData DEBUG input handles: 0 ReadData DEBUG output handles: 0 ReadData DEBUG Data Deps for ReadData @@ -197,9 +191,7 @@ ApplicationMgr INFO Application Manager Started successfully MetaDataSvc DEBUG handle() BeginInputFile for SimplePoolFile1.root MetaDataSvc DEBUG initInputMetaDataStore: file name SimplePoolFile1.root MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile1.root -MetaDataSvc.IOV... DEBUG The first BeginInputFile incidence is fired along with the FirstInputFile incidence so we skip the processing of the Input File MetaData +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-00000000]. @@ -1959,7 +1951,7 @@ Stream1 INFO Records written: 21 Stream1 DEBUG Leaving handle RegStream1 DEBUG handle() incident type: MetaDataStop RegStream1.TagTool INFO Collection Events output: 20 -MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool Domain[ROOT_All] INFO -> Deaccess DbDatabase CREATE [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain UPDATE [ROOT_All] ApplicationMgr INFO Application Manager Stopped successfully @@ -1979,13 +1971,13 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -commitOutput INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 21 cRep_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 62 cObjR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 66 -fRep_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.323(+- 1.77)/ 0/ 10 [ms] #= 62 -cObj_ALL INFO Time User : Tot= 30 [ms] Ave/Min/Max=0.476(+- 2.78)/ 0/ 20 [ms] #= 63 -cRepR_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.123(+- 1.1)/ 0/ 10 [ms] #=163 -ChronoStatSvc INFO Time User : Tot= 1.05 [s] #= 1 +commitOutput INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.476(+- 2.13)/ 0/ 10 [ms] #= 21 +fRep_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.161(+- 1.26)/ 0/ 10 [ms] #= 62 +cRepR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.0613(+-0.781)/ 0/ 10 [ms] #=163 +cObj_ALL INFO Time User : Tot= 40 [ms] Ave/Min/Max=0.635(+- 3.02)/ 0/ 20 [ms] #= 63 +ChronoStatSvc INFO Time User : Tot= 0.93 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgain.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgain.ref index fd10099b6d01..f71b52126af0 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgain.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgain.ref @@ -1,11 +1,11 @@ -Thu Jun 14 20:32:41 CEST 2018 +Mon Jul 16 20:24:42 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReWriteAgainJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO Read module info for 5509 configurables from 55 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 @@ -13,7 +13,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus021.cern.ch on Thu Jun 14 20:32:53 2018 + running on lxplus052.cern.ch on Mon Jul 16 20:24:49 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -21,22 +21,23 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 +ClassIDSvc INFO getRegistryEntries: read 2428 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 ReadData DEBUG Property update for OutputLevel : new value = 2 ReadData INFO in initialize() MetaDataSvc DEBUG Property update for OutputLevel : new value = 2 MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 +MetaDataSvc DEBUG Service base class initialized successfully AthenaPoolCnvSvc DEBUG Property update for OutputLevel : new value = 2 AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00 PoolSvc DEBUG Property update for OutputLevel : new value = 2 +PoolSvc DEBUG Service base class initialized successfully 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-07-15T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus052.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -44,11 +45,9 @@ PoolSvc DEBUG POOL ReadCatalog is file:Catalog.xml PoolSvc INFO POOL WriteCatalog is file:Catalog1.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] -MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 -MetaDataSvc.IOV... DEBUG in initialize() -MetaDataSvc.IOV... DEBUG initialize(): need to modify folders EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 +EventSelector DEBUG Service base class initialized successfully EventSelector INFO reinitialization... EventSelector INFO EventSelection with query EventSelector DEBUG Try item: "SimplePoolReplica1.root" from the collection list. @@ -119,13 +118,8 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc.IOV... DEBUG handle() FirstInputFile for FID:???? -MetaDataSvc.IOV... DEBUG begin checkOverrideRunNumber -MetaDataSvc.IOV... DEBUG checkOverrideRunNumber: check if tag is set in jobOpts -MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name FID:???? -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 +AthenaPoolAddre... DEBUG Service base class initialized successfully ReadData DEBUG input handles: 0 ReadData DEBUG output handles: 0 ReadData DEBUG Data Deps for ReadData @@ -253,9 +247,7 @@ MetaDataHdr(Dat... DEBUG attributes# = 1 MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolReplica1.root -MetaDataSvc.IOV... DEBUG The first BeginInputFile incidence is fired along with the FirstInputFile incidence so we skip the processing of the Input File MetaData +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-00000000]. @@ -2015,7 +2007,7 @@ Stream1 DEBUG Leaving handle RegStream1 DEBUG handle() incident type: MetaDataStop RegStream1.TagTool INFO Collection Events output: 20 RegStream1.TagTool INFO Unable to register collection: PFN 'RootCollection||PFN:SimplePoolCollection3.root' already registered ( POOL : "registerPFN" from "FileCatalog" ) -MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool Domain[ROOT_All] INFO -> Deaccess DbDatabase CREATE [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain UPDATE [ROOT_All] ApplicationMgr INFO Application Manager Stopped successfully @@ -2035,13 +2027,13 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -commitOutput INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 21 cRep_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 62 -cObjR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.154(+- 1.23)/ 0/ 10 [ms] #= 65 +cObjR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 65 +commitOutput INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.952(+- 2.94)/ 0/ 10 [ms] #= 21 +fRep_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.161(+- 1.26)/ 0/ 10 [ms] #= 62 cRepR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.0613(+-0.781)/ 0/ 10 [ms] #=163 -fRep_ALL INFO Time User : Tot= 30 [ms] Ave/Min/Max=0.484(+- 2.15)/ 0/ 10 [ms] #= 62 -cObj_ALL INFO Time User : Tot= 40 [ms] Ave/Min/Max=0.635(+- 3.51)/ 0/ 20 [ms] #= 63 -ChronoStatSvc INFO Time User : Tot= 1.05 [s] #= 1 +cObj_ALL INFO Time User : Tot= 30 [ms] Ave/Min/Max=0.476(+- 2.78)/ 0/ 20 [ms] #= 63 +ChronoStatSvc INFO Time User : Tot= 0.88 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNext.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNext.ref index b6ad0fbfeecd..b1ad6a656c57 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNext.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNext.ref @@ -1,11 +1,11 @@ -Thu Jun 14 20:32:57 CEST 2018 +Mon Jul 16 20:24:52 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReWriteNextJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO Read module info for 5509 configurables from 55 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 @@ -13,7 +13,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus021.cern.ch on Thu Jun 14 20:33:08 2018 + running on lxplus052.cern.ch on Mon Jul 16 20:25:01 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -21,22 +21,23 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 +ClassIDSvc INFO getRegistryEntries: read 2428 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 ReadData DEBUG Property update for OutputLevel : new value = 2 ReadData INFO in initialize() MetaDataSvc DEBUG Property update for OutputLevel : new value = 2 MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 +MetaDataSvc DEBUG Service base class initialized successfully AthenaPoolCnvSvc DEBUG Property update for OutputLevel : new value = 2 AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00 PoolSvc DEBUG Property update for OutputLevel : new value = 2 +PoolSvc DEBUG Service base class initialized successfully 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-07-15T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus052.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -44,11 +45,9 @@ PoolSvc DEBUG POOL ReadCatalog is file:Catalog.xml PoolSvc INFO POOL WriteCatalog is file:Catalog1.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] -MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 -MetaDataSvc.IOV... DEBUG in initialize() -MetaDataSvc.IOV... DEBUG initialize(): need to modify folders EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 +EventSelector DEBUG Service base class initialized successfully EventSelector INFO reinitialization... EventSelector INFO EventSelection with query EventSelector DEBUG Try item: "SimplePoolFile3.root" from the collection list. @@ -125,13 +124,8 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc.IOV... DEBUG handle() FirstInputFile for FID:???? -MetaDataSvc.IOV... DEBUG begin checkOverrideRunNumber -MetaDataSvc.IOV... DEBUG checkOverrideRunNumber: check if tag is set in jobOpts -MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name FID:???? -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 +AthenaPoolAddre... DEBUG Service base class initialized successfully ReadData DEBUG input handles: 0 ReadData DEBUG output handles: 0 ReadData DEBUG Data Deps for ReadData @@ -197,9 +191,7 @@ ApplicationMgr INFO Application Manager Started successfully MetaDataSvc DEBUG handle() BeginInputFile for SimplePoolFile3.root MetaDataSvc DEBUG initInputMetaDataStore: file name SimplePoolFile3.root MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile3.root -MetaDataSvc.IOV... DEBUG The first BeginInputFile incidence is fired along with the FirstInputFile incidence so we skip the processing of the Input File MetaData +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-00000000]. @@ -1357,7 +1349,7 @@ Stream1 INFO Records written: 21 Stream1 DEBUG Leaving handle RegStream1 DEBUG handle() incident type: MetaDataStop RegStream1.TagTool INFO Collection Events output: 20 -MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool Domain[ROOT_All] INFO -> Deaccess DbDatabase CREATE [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain UPDATE [ROOT_All] ApplicationMgr INFO Application Manager Stopped successfully @@ -1379,11 +1371,11 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** commitOutput INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 21 cRep_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 62 -cObjR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.154(+- 1.23)/ 0/ 10 [ms] #= 65 +cRepR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #=163 fRep_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.161(+- 1.26)/ 0/ 10 [ms] #= 62 -cRepR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.0613(+-0.781)/ 0/ 10 [ms] #=163 -cObj_ALL INFO Time User : Tot= 40 [ms] Ave/Min/Max=0.635(+- 2.44)/ 0/ 10 [ms] #= 63 -ChronoStatSvc INFO Time User : Tot= 0.97 [s] #= 1 +cObjR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 65 +cObj_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.317(+- 1.75)/ 0/ 10 [ms] #= 63 +ChronoStatSvc INFO Time User : Tot= 0.9 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref index bd5b67e75fe7..fb3630bee8d5 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref @@ -1,11 +1,11 @@ -Thu Jun 14 19:57:44 CEST 2018 +Mon Jul 16 20:19:44 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO Read module info for 5509 configurables from 55 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 @@ -13,7 +13,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus021.cern.ch on Thu Jun 14 19:57:54 2018 + running on lxplus052.cern.ch on Mon Jul 16 20:19:53 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -21,32 +21,31 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 +ClassIDSvc INFO getRegistryEntries: read 2428 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 ReadData DEBUG Property update for OutputLevel : new value = 2 ReadData INFO in initialize() MetaDataSvc DEBUG Property update for OutputLevel : new value = 2 MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 +MetaDataSvc DEBUG Service base class initialized successfully AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00 PoolSvc DEBUG Property update for OutputLevel : new value = 2 +PoolSvc DEBUG Service base class initialized successfully 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-07-15T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus052.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams PoolSvc INFO POOL WriteCatalog is file:Catalog1.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] -MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 -MetaDataSvc.IOV... DEBUG in initialize() -MetaDataSvc.IOV... DEBUG initialize(): need to modify folders EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 +EventSelector DEBUG Service base class initialized successfully IoComponentMgr INFO IoComponent EventSelector has already had file EmptyPoolFile.root registered with i/o mode READ EventSelector INFO reinitialization... EventSelector INFO EventSelection with query @@ -168,13 +167,8 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc.IOV... DEBUG handle() FirstInputFile for FID:???? -MetaDataSvc.IOV... DEBUG begin checkOverrideRunNumber -MetaDataSvc.IOV... DEBUG checkOverrideRunNumber: check if tag is set in jobOpts -MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name FID:???? -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 +AthenaPoolAddre... DEBUG Service base class initialized successfully ReadData DEBUG input handles: 0 ReadData DEBUG output handles: 0 ReadData DEBUG Data Deps for ReadData @@ -234,9 +228,7 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for EmptyPoolFile.root -MetaDataSvc.IOV... DEBUG The first BeginInputFile incidence is fired along with the FirstInputFile incidence so we skip the processing of the Input File MetaData +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool MetaDataSvc DEBUG handle() EndInputFile for eventless EmptyPoolFile.root Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? EventSelector DEBUG Try item: "SimplePoolFile1.root" from the collection list. @@ -251,10 +243,7 @@ PoolSvc INFO Database (SimplePoolFile1.root) attribute [TREE_CACHE_ MetaDataSvc DEBUG handle() BeginInputFile for SimplePoolFile1.root MetaDataSvc DEBUG initInputMetaDataStore: file name SimplePoolFile1.root MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile1.root -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile1.root -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool EventSelector INFO skipping event 1 EventSelector INFO skipping event 2 EventSelector INFO skipping event 3 @@ -326,7 +315,7 @@ ReadData INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = Dum ReadData INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector ReadData INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector ClassIDSvc INFO getRegistryEntries: read 10 CLIDRegistry entries for module ALL -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27943 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 1 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -359,7 +348,7 @@ ReadData INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du ReadData INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector ReadData INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector ReadData INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27943 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 2 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -392,7 +381,7 @@ ReadData INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du ReadData INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector ReadData INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector ReadData INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27943 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 3 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -425,7 +414,7 @@ ReadData INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du ReadData INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector ReadData INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector ReadData INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27943 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 4 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -458,7 +447,7 @@ ReadData INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du ReadData INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector ReadData INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector ReadData INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27943 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 5 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -491,7 +480,7 @@ ReadData INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du ReadData INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector ReadData INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector ReadData INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27943 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 6 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -524,7 +513,7 @@ ReadData INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du ReadData INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector ReadData INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector ReadData INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27943 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 7 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -557,7 +546,7 @@ ReadData INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du ReadData INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector ReadData INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector ReadData INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27943 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 8 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -590,7 +579,7 @@ ReadData INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du ReadData INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector ReadData INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector ReadData INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27943 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 9 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -623,7 +612,7 @@ ReadData INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du ReadData INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector ReadData INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector ReadData INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27943 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 10 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? @@ -684,10 +673,7 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for EmptyPoolFile.root -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name EmptyPoolFile.root -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool MetaDataSvc DEBUG handle() EndInputFile for eventless EmptyPoolFile.root Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] @@ -772,10 +758,7 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile2.root -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile2.root -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000005-00000000]. @@ -826,7 +809,7 @@ ReadData INFO EventInfo event: 0 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 11 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -854,7 +837,7 @@ ReadData INFO EventInfo event: 1 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 12 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -882,7 +865,7 @@ ReadData INFO EventInfo event: 2 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 13 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -910,7 +893,7 @@ ReadData INFO EventInfo event: 3 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 14 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -938,7 +921,7 @@ ReadData INFO EventInfo event: 4 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 15 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -966,7 +949,7 @@ ReadData INFO EventInfo event: 5 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 16 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -994,7 +977,7 @@ ReadData INFO EventInfo event: 6 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 17 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1022,7 +1005,7 @@ ReadData INFO EventInfo event: 7 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 18 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1050,7 +1033,7 @@ ReadData INFO EventInfo event: 8 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 19 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1078,7 +1061,7 @@ ReadData INFO EventInfo event: 9 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 20 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1106,7 +1089,7 @@ ReadData INFO EventInfo event: 10 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 21 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1134,7 +1117,7 @@ ReadData INFO EventInfo event: 11 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 22 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1162,7 +1145,7 @@ ReadData INFO EventInfo event: 12 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 23 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1190,7 +1173,7 @@ ReadData INFO EventInfo event: 13 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 24 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1218,7 +1201,7 @@ ReadData INFO EventInfo event: 14 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 25 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1246,7 +1229,7 @@ ReadData INFO EventInfo event: 15 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 26 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1274,7 +1257,7 @@ ReadData INFO EventInfo event: 16 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 27 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1302,7 +1285,7 @@ ReadData INFO EventInfo event: 17 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 28 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1330,7 +1313,7 @@ ReadData INFO EventInfo event: 18 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 29 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1358,7 +1341,7 @@ ReadData INFO EventInfo event: 19 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 30 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1387,7 +1370,7 @@ ReadData INFO EventInfo event: 20 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #20, run #2 31 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1415,7 +1398,7 @@ ReadData INFO EventInfo event: 21 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #21, run #2 32 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1443,7 +1426,7 @@ ReadData INFO EventInfo event: 22 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #22, run #2 33 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1471,7 +1454,7 @@ ReadData INFO EventInfo event: 23 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #23, run #2 34 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1499,7 +1482,7 @@ ReadData INFO EventInfo event: 24 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #24, run #2 35 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1527,7 +1510,7 @@ ReadData INFO EventInfo event: 25 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #25, run #2 36 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1555,7 +1538,7 @@ ReadData INFO EventInfo event: 26 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #26, run #2 37 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1583,7 +1566,7 @@ ReadData INFO EventInfo event: 27 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #27, run #2 38 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1611,7 +1594,7 @@ ReadData INFO EventInfo event: 28 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #28, run #2 39 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1639,7 +1622,7 @@ ReadData INFO EventInfo event: 29 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #29, run #2 40 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1667,7 +1650,7 @@ ReadData INFO EventInfo event: 30 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #30, run #2 41 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1695,7 +1678,7 @@ ReadData INFO EventInfo event: 31 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #31, run #2 42 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1723,7 +1706,7 @@ ReadData INFO EventInfo event: 32 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #32, run #2 43 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1751,7 +1734,7 @@ ReadData INFO EventInfo event: 33 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #33, run #2 44 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1779,7 +1762,7 @@ ReadData INFO EventInfo event: 34 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #34, run #2 45 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1807,7 +1790,7 @@ ReadData INFO EventInfo event: 35 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #35, run #2 46 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1835,7 +1818,7 @@ ReadData INFO EventInfo event: 36 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #36, run #2 47 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1863,7 +1846,7 @@ ReadData INFO EventInfo event: 37 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #37, run #2 48 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1891,7 +1874,7 @@ ReadData INFO EventInfo event: 38 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #38, run #2 49 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1919,7 +1902,7 @@ ReadData INFO EventInfo event: 39 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #39, run #2 50 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? @@ -2008,10 +1991,7 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile3.root -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile3.root -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-00000000]. @@ -2156,7 +2136,7 @@ ReadData INFO Hit x = 20.4945 y = 63.5816 z = 48.1358 detector = Dum ReadData INFO Hit x = 23.7045 y = 57.9027 z = 46.3159 detector = DummyHitDetector ReadData INFO Hit x = 26.9145 y = 52.2238 z = 44.9265 detector = DummyHitDetector ReadData INFO Hit x = 30.1245 y = 46.5449 z = 43.831 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 51 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2203,7 +2183,7 @@ ReadData INFO Hit x = 120.494 y = 63.5816 z = -51.8642 detector = Du ReadData INFO Hit x = 123.704 y = 57.9027 z = -53.6841 detector = DummyHitDetector ReadData INFO Hit x = 126.915 y = 52.2238 z = -55.0735 detector = DummyHitDetector ReadData INFO Hit x = 130.125 y = 46.5449 z = -56.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 52 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2250,7 +2230,7 @@ ReadData INFO Hit x = 220.494 y = 63.5816 z = -151.864 detector = Du ReadData INFO Hit x = 223.704 y = 57.9027 z = -153.684 detector = DummyHitDetector ReadData INFO Hit x = 226.915 y = 52.2238 z = -155.073 detector = DummyHitDetector ReadData INFO Hit x = 230.125 y = 46.5449 z = -156.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 53 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2297,7 +2277,7 @@ ReadData INFO Hit x = 320.495 y = 63.5816 z = -251.864 detector = Du ReadData INFO Hit x = 323.705 y = 57.9027 z = -253.684 detector = DummyHitDetector ReadData INFO Hit x = 326.915 y = 52.2238 z = -255.073 detector = DummyHitDetector ReadData INFO Hit x = 330.125 y = 46.5449 z = -256.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 54 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2344,7 +2324,7 @@ ReadData INFO Hit x = 420.495 y = 63.5816 z = -351.864 detector = Du ReadData INFO Hit x = 423.705 y = 57.9027 z = -353.684 detector = DummyHitDetector ReadData INFO Hit x = 426.915 y = 52.2238 z = -355.073 detector = DummyHitDetector ReadData INFO Hit x = 430.125 y = 46.5449 z = -356.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 55 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2391,7 +2371,7 @@ ReadData INFO Hit x = 520.495 y = 63.5816 z = -451.864 detector = Du ReadData INFO Hit x = 523.705 y = 57.9027 z = -453.684 detector = DummyHitDetector ReadData INFO Hit x = 526.914 y = 52.2238 z = -455.073 detector = DummyHitDetector ReadData INFO Hit x = 530.125 y = 46.5449 z = -456.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 56 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2438,7 +2418,7 @@ ReadData INFO Hit x = 620.495 y = 63.5816 z = -551.864 detector = Du ReadData INFO Hit x = 623.705 y = 57.9027 z = -553.684 detector = DummyHitDetector ReadData INFO Hit x = 626.914 y = 52.2238 z = -555.073 detector = DummyHitDetector ReadData INFO Hit x = 630.125 y = 46.5449 z = -556.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 57 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2485,7 +2465,7 @@ ReadData INFO Hit x = 720.495 y = 63.5816 z = -651.864 detector = Du ReadData INFO Hit x = 723.705 y = 57.9027 z = -653.684 detector = DummyHitDetector ReadData INFO Hit x = 726.914 y = 52.2238 z = -655.073 detector = DummyHitDetector ReadData INFO Hit x = 730.125 y = 46.5449 z = -656.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 58 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2532,7 +2512,7 @@ ReadData INFO Hit x = 820.495 y = 63.5816 z = -751.864 detector = Du ReadData INFO Hit x = 823.705 y = 57.9027 z = -753.684 detector = DummyHitDetector ReadData INFO Hit x = 826.914 y = 52.2238 z = -755.073 detector = DummyHitDetector ReadData INFO Hit x = 830.125 y = 46.5449 z = -756.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 59 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2579,7 +2559,7 @@ ReadData INFO Hit x = 920.495 y = 63.5816 z = -851.864 detector = Du ReadData INFO Hit x = 923.705 y = 57.9027 z = -853.684 detector = DummyHitDetector ReadData INFO Hit x = 926.914 y = 52.2238 z = -855.073 detector = DummyHitDetector ReadData INFO Hit x = 930.125 y = 46.5449 z = -856.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 60 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2626,7 +2606,7 @@ ReadData INFO Hit x = 1020.49 y = 63.5816 z = -951.864 detector = Du ReadData INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = DummyHitDetector ReadData INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector ReadData INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 61 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2673,7 +2653,7 @@ ReadData INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du ReadData INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector ReadData INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector ReadData INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 62 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2720,7 +2700,7 @@ ReadData INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du ReadData INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector ReadData INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector ReadData INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 63 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2767,7 +2747,7 @@ ReadData INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du ReadData INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector ReadData INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector ReadData INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 64 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2814,7 +2794,7 @@ ReadData INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du ReadData INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector ReadData INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector ReadData INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 65 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2861,7 +2841,7 @@ ReadData INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du ReadData INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector ReadData INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector ReadData INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 66 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2908,7 +2888,7 @@ ReadData INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du ReadData INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector ReadData INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector ReadData INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 67 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2955,7 +2935,7 @@ ReadData INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du ReadData INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector ReadData INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector ReadData INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 68 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -3002,7 +2982,7 @@ ReadData INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du ReadData INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector ReadData INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector ReadData INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 69 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -3049,14 +3029,14 @@ ReadData INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du ReadData INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector ReadData INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector ReadData INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 70 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? MetaDataSvc DEBUG handle() LastInputFile for end AthenaEventLoopMgr INFO No more events in event selection -MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] ApplicationMgr INFO Application Manager Stopped successfully @@ -3068,9 +3048,9 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -cObjR_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.0735(+-0.854)/ 0/ 10 [ms] #=272 -cObj_ALL INFO Time User : Tot= 30 [ms] Ave/Min/Max=0.136(+- 1.16)/ 0/ 10 [ms] #=221 -ChronoStatSvc INFO Time User : Tot= 1.07 [s] #= 1 +cObjR_ALL INFO Time User : Tot= 30 [ms] Ave/Min/Max= 0.11(+- 1.04)/ 0/ 10 [ms] #=272 +cObj_ALL INFO Time User : Tot= 50 [ms] Ave/Min/Max=0.226(+- 1.49)/ 0/ 10 [ms] #=221 +ChronoStatSvc INFO Time User : Tot= 0.92 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref index 5898910726aa..efc5bdc1f9b0 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref @@ -1,11 +1,11 @@ -Thu Jun 14 20:40:08 CEST 2018 +Mon Jul 16 20:34:57 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadAgainJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO Read module info for 5509 configurables from 55 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 @@ -13,7 +13,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus021.cern.ch on Thu Jun 14 20:40:19 2018 + running on lxplus052.cern.ch on Mon Jul 16 20:35:04 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -21,32 +21,31 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 +ClassIDSvc INFO getRegistryEntries: read 2428 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 ReadData DEBUG Property update for OutputLevel : new value = 2 ReadData INFO in initialize() MetaDataSvc DEBUG Property update for OutputLevel : new value = 2 MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 +MetaDataSvc DEBUG Service base class initialized successfully AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00 PoolSvc DEBUG Property update for OutputLevel : new value = 2 +PoolSvc DEBUG Service base class initialized successfully 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-07-15T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus052.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams PoolSvc INFO POOL WriteCatalog is file:Catalog1.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] -MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 -MetaDataSvc.IOV... DEBUG in initialize() -MetaDataSvc.IOV... DEBUG initialize(): need to modify folders EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 +EventSelector DEBUG Service base class initialized successfully IoComponentMgr INFO IoComponent EventSelector has already had file EmptyPoolFile.root registered with i/o mode READ EventSelector INFO reinitialization... EventSelector INFO EventSelection with query @@ -162,13 +161,8 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc.IOV... DEBUG handle() FirstInputFile for FID:???? -MetaDataSvc.IOV... DEBUG begin checkOverrideRunNumber -MetaDataSvc.IOV... DEBUG checkOverrideRunNumber: check if tag is set in jobOpts -MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name FID:???? -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 +AthenaPoolAddre... DEBUG Service base class initialized successfully ReadData DEBUG input handles: 0 ReadData DEBUG output handles: 0 ReadData DEBUG Data Deps for ReadData @@ -232,9 +226,7 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for EmptyPoolFile.root -MetaDataSvc.IOV... DEBUG The first BeginInputFile incidence is fired along with the FirstInputFile incidence so we skip the processing of the Input File MetaData +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool MetaDataSvc DEBUG handle() EndInputFile for eventless EmptyPoolFile.root Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] @@ -315,10 +307,7 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolReplica1.root -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolReplica1.root -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool EventSelector INFO skipping event 1 EventSelector INFO skipping event 2 EventSelector INFO skipping event 3 @@ -743,10 +732,7 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for EmptyPoolFile.root -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name EmptyPoolFile.root -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool MetaDataSvc DEBUG handle() EndInputFile for eventless EmptyPoolFile.root Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] @@ -831,10 +817,7 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile2.root -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile2.root -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 ClassIDSvc INFO getRegistryEntries: read 3 CLIDRegistry entries for module ALL @@ -886,7 +869,7 @@ ReadData INFO EventInfo event: 0 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 11 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -914,7 +897,7 @@ ReadData INFO EventInfo event: 1 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 12 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -942,7 +925,7 @@ ReadData INFO EventInfo event: 2 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 13 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -970,7 +953,7 @@ ReadData INFO EventInfo event: 3 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 14 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -998,7 +981,7 @@ ReadData INFO EventInfo event: 4 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 15 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1026,7 +1009,7 @@ ReadData INFO EventInfo event: 5 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 16 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1054,7 +1037,7 @@ ReadData INFO EventInfo event: 6 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 17 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1082,7 +1065,7 @@ ReadData INFO EventInfo event: 7 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 18 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1110,7 +1093,7 @@ ReadData INFO EventInfo event: 8 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 19 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1138,7 +1121,7 @@ ReadData INFO EventInfo event: 9 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 20 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1166,7 +1149,7 @@ ReadData INFO EventInfo event: 10 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 21 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1194,7 +1177,7 @@ ReadData INFO EventInfo event: 11 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 22 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1222,7 +1205,7 @@ ReadData INFO EventInfo event: 12 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 23 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1250,7 +1233,7 @@ ReadData INFO EventInfo event: 13 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 24 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1278,7 +1261,7 @@ ReadData INFO EventInfo event: 14 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 25 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1306,7 +1289,7 @@ ReadData INFO EventInfo event: 15 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 26 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1334,7 +1317,7 @@ ReadData INFO EventInfo event: 16 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 27 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1362,7 +1345,7 @@ ReadData INFO EventInfo event: 17 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 28 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1390,7 +1373,7 @@ ReadData INFO EventInfo event: 18 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 29 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1418,7 +1401,7 @@ ReadData INFO EventInfo event: 19 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 30 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1447,7 +1430,7 @@ ReadData INFO EventInfo event: 20 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #20, run #2 31 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1475,7 +1458,7 @@ ReadData INFO EventInfo event: 21 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #21, run #2 32 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1503,7 +1486,7 @@ ReadData INFO EventInfo event: 22 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #22, run #2 33 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1531,7 +1514,7 @@ ReadData INFO EventInfo event: 23 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #23, run #2 34 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1559,7 +1542,7 @@ ReadData INFO EventInfo event: 24 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #24, run #2 35 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1587,7 +1570,7 @@ ReadData INFO EventInfo event: 25 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #25, run #2 36 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1615,7 +1598,7 @@ ReadData INFO EventInfo event: 26 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #26, run #2 37 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1643,7 +1626,7 @@ ReadData INFO EventInfo event: 27 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #27, run #2 38 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1671,7 +1654,7 @@ ReadData INFO EventInfo event: 28 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #28, run #2 39 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1699,7 +1682,7 @@ ReadData INFO EventInfo event: 29 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #29, run #2 40 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1727,7 +1710,7 @@ ReadData INFO EventInfo event: 30 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #30, run #2 41 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1755,7 +1738,7 @@ ReadData INFO EventInfo event: 31 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #31, run #2 42 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1783,7 +1766,7 @@ ReadData INFO EventInfo event: 32 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #32, run #2 43 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1811,7 +1794,7 @@ ReadData INFO EventInfo event: 33 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #33, run #2 44 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1839,7 +1822,7 @@ ReadData INFO EventInfo event: 34 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #34, run #2 45 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1867,7 +1850,7 @@ ReadData INFO EventInfo event: 35 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #35, run #2 46 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1895,7 +1878,7 @@ ReadData INFO EventInfo event: 36 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #36, run #2 47 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1923,7 +1906,7 @@ ReadData INFO EventInfo event: 37 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #37, run #2 48 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1951,7 +1934,7 @@ ReadData INFO EventInfo event: 38 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #38, run #2 49 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1979,7 +1962,7 @@ ReadData INFO EventInfo event: 39 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #39, run #2 50 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? @@ -2068,10 +2051,7 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile4.root -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile4.root -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-00000000]. @@ -2273,7 +2253,7 @@ ReadData INFO Hit x = 20.4945 y = 63.5816 z = 48.1358 detector = Dum ReadData INFO Hit x = 23.7045 y = 57.9027 z = 46.3159 detector = DummyHitDetector ReadData INFO Hit x = 26.9145 y = 52.2238 z = 44.9265 detector = DummyHitDetector ReadData INFO Hit x = 30.1245 y = 46.5449 z = 43.831 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27346 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 51 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2320,7 +2300,7 @@ ReadData INFO Hit x = 120.494 y = 63.5816 z = -51.8642 detector = Du ReadData INFO Hit x = 123.704 y = 57.9027 z = -53.6841 detector = DummyHitDetector ReadData INFO Hit x = 126.915 y = 52.2238 z = -55.0735 detector = DummyHitDetector ReadData INFO Hit x = 130.125 y = 46.5449 z = -56.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27346 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 52 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2367,7 +2347,7 @@ ReadData INFO Hit x = 220.494 y = 63.5816 z = -151.864 detector = Du ReadData INFO Hit x = 223.704 y = 57.9027 z = -153.684 detector = DummyHitDetector ReadData INFO Hit x = 226.915 y = 52.2238 z = -155.073 detector = DummyHitDetector ReadData INFO Hit x = 230.125 y = 46.5449 z = -156.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27346 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 53 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2414,7 +2394,7 @@ ReadData INFO Hit x = 320.495 y = 63.5816 z = -251.864 detector = Du ReadData INFO Hit x = 323.705 y = 57.9027 z = -253.684 detector = DummyHitDetector ReadData INFO Hit x = 326.915 y = 52.2238 z = -255.073 detector = DummyHitDetector ReadData INFO Hit x = 330.125 y = 46.5449 z = -256.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27346 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 54 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2461,7 +2441,7 @@ ReadData INFO Hit x = 420.495 y = 63.5816 z = -351.864 detector = Du ReadData INFO Hit x = 423.705 y = 57.9027 z = -353.684 detector = DummyHitDetector ReadData INFO Hit x = 426.915 y = 52.2238 z = -355.073 detector = DummyHitDetector ReadData INFO Hit x = 430.125 y = 46.5449 z = -356.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27346 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 55 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2508,7 +2488,7 @@ ReadData INFO Hit x = 520.495 y = 63.5816 z = -451.864 detector = Du ReadData INFO Hit x = 523.705 y = 57.9027 z = -453.684 detector = DummyHitDetector ReadData INFO Hit x = 526.914 y = 52.2238 z = -455.073 detector = DummyHitDetector ReadData INFO Hit x = 530.125 y = 46.5449 z = -456.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27346 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 56 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2555,7 +2535,7 @@ ReadData INFO Hit x = 620.495 y = 63.5816 z = -551.864 detector = Du ReadData INFO Hit x = 623.705 y = 57.9027 z = -553.684 detector = DummyHitDetector ReadData INFO Hit x = 626.914 y = 52.2238 z = -555.073 detector = DummyHitDetector ReadData INFO Hit x = 630.125 y = 46.5449 z = -556.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27346 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 57 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2602,7 +2582,7 @@ ReadData INFO Hit x = 720.495 y = 63.5816 z = -651.864 detector = Du ReadData INFO Hit x = 723.705 y = 57.9027 z = -653.684 detector = DummyHitDetector ReadData INFO Hit x = 726.914 y = 52.2238 z = -655.073 detector = DummyHitDetector ReadData INFO Hit x = 730.125 y = 46.5449 z = -656.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27346 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 58 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2649,7 +2629,7 @@ ReadData INFO Hit x = 820.495 y = 63.5816 z = -751.864 detector = Du ReadData INFO Hit x = 823.705 y = 57.9027 z = -753.684 detector = DummyHitDetector ReadData INFO Hit x = 826.914 y = 52.2238 z = -755.073 detector = DummyHitDetector ReadData INFO Hit x = 830.125 y = 46.5449 z = -756.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27346 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 59 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2696,7 +2676,7 @@ ReadData INFO Hit x = 920.495 y = 63.5816 z = -851.864 detector = Du ReadData INFO Hit x = 923.705 y = 57.9027 z = -853.684 detector = DummyHitDetector ReadData INFO Hit x = 926.914 y = 52.2238 z = -855.073 detector = DummyHitDetector ReadData INFO Hit x = 930.125 y = 46.5449 z = -856.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27346 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 60 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2743,7 +2723,7 @@ ReadData INFO Hit x = 1020.49 y = 63.5816 z = -951.864 detector = Du ReadData INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = DummyHitDetector ReadData INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector ReadData INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27346 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 61 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2790,7 +2770,7 @@ ReadData INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du ReadData INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector ReadData INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector ReadData INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27346 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 62 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2837,7 +2817,7 @@ ReadData INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du ReadData INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector ReadData INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector ReadData INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27346 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 63 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2884,7 +2864,7 @@ ReadData INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du ReadData INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector ReadData INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector ReadData INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27346 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 64 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2931,7 +2911,7 @@ ReadData INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du ReadData INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector ReadData INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector ReadData INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27346 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 65 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2978,7 +2958,7 @@ ReadData INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du ReadData INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector ReadData INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector ReadData INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27346 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 66 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -3025,7 +3005,7 @@ ReadData INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du ReadData INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector ReadData INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector ReadData INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27346 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 67 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -3072,7 +3052,7 @@ ReadData INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du ReadData INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector ReadData INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector ReadData INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27346 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 68 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -3119,7 +3099,7 @@ ReadData INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du ReadData INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector ReadData INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector ReadData INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27346 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 69 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -3166,14 +3146,14 @@ ReadData INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du ReadData INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector ReadData INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector ReadData INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27334 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 27346 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 70 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? MetaDataSvc DEBUG handle() LastInputFile for end AthenaEventLoopMgr INFO No more events in event selection -MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] @@ -3187,8 +3167,8 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** cObjR_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.0643(+-0.799)/ 0/ 10 [ms] #=311 -cObj_ALL INFO Time User : Tot= 50 [ms] Ave/Min/Max=0.207(+- 1.43)/ 0/ 10 [ms] #=241 -ChronoStatSvc INFO Time User : Tot= 1.16 [s] #= 1 +cObj_ALL INFO Time User : Tot= 60 [ms] Ave/Min/Max=0.249(+- 1.8)/ 0/ 20 [ms] #=241 +ChronoStatSvc INFO Time User : Tot= 0.89 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadBN.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadBN.ref index 6603e410719e..062284de4df5 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadBN.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadBN.ref @@ -1,11 +1,11 @@ -Thu Jun 14 19:57:44 CEST 2018 +Mon Jul 16 20:08:47 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadBNJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO Read module info for 5509 configurables from 55 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 @@ -13,7 +13,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus021.cern.ch on Thu Jun 14 19:57:54 2018 + running on lxplus052.cern.ch on Mon Jul 16 20:08:55 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -21,32 +21,31 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 +ClassIDSvc INFO getRegistryEntries: read 2428 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 ReadData DEBUG Property update for OutputLevel : new value = 2 ReadData INFO in initialize() MetaDataSvc DEBUG Property update for OutputLevel : new value = 2 MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 +MetaDataSvc DEBUG Service base class initialized successfully AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00 PoolSvc DEBUG Property update for OutputLevel : new value = 2 +PoolSvc DEBUG Service base class initialized successfully 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-07-15T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus052.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams PoolSvc INFO POOL WriteCatalog is file:Catalog1.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] -MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 -MetaDataSvc.IOV... DEBUG in initialize() -MetaDataSvc.IOV... DEBUG initialize(): need to modify folders EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 +EventSelector DEBUG Service base class initialized successfully IoComponentMgr INFO IoComponent EventSelector has already had file EmptyPoolFile.root registered with i/o mode READ EventSelector INFO reinitialization... EventSelector INFO EventSelection with query @@ -168,13 +167,8 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc.IOV... DEBUG handle() FirstInputFile for FID:???? -MetaDataSvc.IOV... DEBUG begin checkOverrideRunNumber -MetaDataSvc.IOV... DEBUG checkOverrideRunNumber: check if tag is set in jobOpts -MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name FID:???? -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 +AthenaPoolAddre... DEBUG Service base class initialized successfully AthenaPoolAddre... INFO BackNavigationScope for: ExampleHitContainer#MyHits :: Stream1 ReadData DEBUG input handles: 0 ReadData DEBUG output handles: 0 @@ -235,9 +229,7 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for EmptyPoolFile.root -MetaDataSvc.IOV... DEBUG The first BeginInputFile incidence is fired along with the FirstInputFile incidence so we skip the processing of the Input File MetaData +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool MetaDataSvc DEBUG handle() EndInputFile for eventless EmptyPoolFile.root Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? EventSelector DEBUG Try item: "SimplePoolFile1.root" from the collection list. @@ -252,10 +244,7 @@ PoolSvc INFO Database (SimplePoolFile1.root) attribute [TREE_CACHE_ MetaDataSvc DEBUG handle() BeginInputFile for SimplePoolFile1.root MetaDataSvc DEBUG initInputMetaDataStore: file name SimplePoolFile1.root MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile1.root -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile1.root -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool EventSelector INFO skipping event 1 EventSelector INFO skipping event 2 EventSelector INFO skipping event 3 @@ -327,7 +316,7 @@ ReadData INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = Dum ReadData INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector ReadData INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector ClassIDSvc INFO getRegistryEntries: read 10 CLIDRegistry entries for module ALL -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27935 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 1 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -360,7 +349,7 @@ ReadData INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du ReadData INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector ReadData INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector ReadData INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27935 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 2 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -393,7 +382,7 @@ ReadData INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du ReadData INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector ReadData INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector ReadData INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27935 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 3 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -426,7 +415,7 @@ ReadData INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du ReadData INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector ReadData INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector ReadData INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27935 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 4 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -459,7 +448,7 @@ ReadData INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du ReadData INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector ReadData INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector ReadData INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27935 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 5 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -492,7 +481,7 @@ ReadData INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du ReadData INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector ReadData INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector ReadData INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27935 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 6 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -525,7 +514,7 @@ ReadData INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du ReadData INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector ReadData INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector ReadData INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27935 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 7 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -558,7 +547,7 @@ ReadData INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du ReadData INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector ReadData INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector ReadData INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27935 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 8 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -591,7 +580,7 @@ ReadData INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du ReadData INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector ReadData INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector ReadData INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27935 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 9 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -624,7 +613,7 @@ ReadData INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du ReadData INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector ReadData INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector ReadData INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27935 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 10 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? @@ -685,10 +674,7 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for EmptyPoolFile.root -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name EmptyPoolFile.root -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool MetaDataSvc DEBUG handle() EndInputFile for eventless EmptyPoolFile.root Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] @@ -773,10 +759,7 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile2.root -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile2.root -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000005-00000000]. @@ -827,7 +810,7 @@ ReadData INFO EventInfo event: 0 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26644 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 11 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -855,7 +838,7 @@ ReadData INFO EventInfo event: 1 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26644 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 12 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -883,7 +866,7 @@ ReadData INFO EventInfo event: 2 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26644 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 13 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -911,7 +894,7 @@ ReadData INFO EventInfo event: 3 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26644 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 14 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -939,7 +922,7 @@ ReadData INFO EventInfo event: 4 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26644 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 15 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -967,7 +950,7 @@ ReadData INFO EventInfo event: 5 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26644 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 16 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -995,7 +978,7 @@ ReadData INFO EventInfo event: 6 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26644 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 17 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1023,7 +1006,7 @@ ReadData INFO EventInfo event: 7 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26644 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 18 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1051,7 +1034,7 @@ ReadData INFO EventInfo event: 8 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26644 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 19 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1079,7 +1062,7 @@ ReadData INFO EventInfo event: 9 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26644 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 20 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1107,7 +1090,7 @@ ReadData INFO EventInfo event: 10 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26644 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 21 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1135,7 +1118,7 @@ ReadData INFO EventInfo event: 11 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26644 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 22 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1163,7 +1146,7 @@ ReadData INFO EventInfo event: 12 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26644 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 23 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1191,7 +1174,7 @@ ReadData INFO EventInfo event: 13 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26644 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 24 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1219,7 +1202,7 @@ ReadData INFO EventInfo event: 14 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26644 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 25 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1247,7 +1230,7 @@ ReadData INFO EventInfo event: 15 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26644 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 26 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1275,7 +1258,7 @@ ReadData INFO EventInfo event: 16 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26644 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 27 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1303,7 +1286,7 @@ ReadData INFO EventInfo event: 17 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26644 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 28 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1331,7 +1314,7 @@ ReadData INFO EventInfo event: 18 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26644 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 29 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1359,7 +1342,7 @@ ReadData INFO EventInfo event: 19 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26644 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 30 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1388,7 +1371,7 @@ ReadData INFO EventInfo event: 20 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28256 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #20, run #2 31 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1416,7 +1399,7 @@ ReadData INFO EventInfo event: 21 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28256 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #21, run #2 32 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1444,7 +1427,7 @@ ReadData INFO EventInfo event: 22 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28256 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #22, run #2 33 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1472,7 +1455,7 @@ ReadData INFO EventInfo event: 23 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28256 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #23, run #2 34 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1500,7 +1483,7 @@ ReadData INFO EventInfo event: 24 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28256 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #24, run #2 35 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1528,7 +1511,7 @@ ReadData INFO EventInfo event: 25 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28256 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #25, run #2 36 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1556,7 +1539,7 @@ ReadData INFO EventInfo event: 26 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28256 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #26, run #2 37 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1584,7 +1567,7 @@ ReadData INFO EventInfo event: 27 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28256 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #27, run #2 38 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1612,7 +1595,7 @@ ReadData INFO EventInfo event: 28 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28256 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #28, run #2 39 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1640,7 +1623,7 @@ ReadData INFO EventInfo event: 29 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28256 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #29, run #2 40 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1668,7 +1651,7 @@ ReadData INFO EventInfo event: 30 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28256 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #30, run #2 41 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1696,7 +1679,7 @@ ReadData INFO EventInfo event: 31 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28256 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #31, run #2 42 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1724,7 +1707,7 @@ ReadData INFO EventInfo event: 32 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28256 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #32, run #2 43 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1752,7 +1735,7 @@ ReadData INFO EventInfo event: 33 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28256 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #33, run #2 44 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1780,7 +1763,7 @@ ReadData INFO EventInfo event: 34 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28256 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #34, run #2 45 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1808,7 +1791,7 @@ ReadData INFO EventInfo event: 35 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28256 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #35, run #2 46 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1836,7 +1819,7 @@ ReadData INFO EventInfo event: 36 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28256 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #36, run #2 47 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1864,7 +1847,7 @@ ReadData INFO EventInfo event: 37 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28256 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #37, run #2 48 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1892,7 +1875,7 @@ ReadData INFO EventInfo event: 38 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28256 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #38, run #2 49 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1920,7 +1903,7 @@ ReadData INFO EventInfo event: 39 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28256 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #39, run #2 50 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? @@ -2009,10 +1992,7 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile3.root -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile3.root -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-00000000]. @@ -2157,7 +2137,7 @@ ReadData INFO Hit x = 20.4945 y = 63.5816 z = 48.1358 detector = Dum ReadData INFO Hit x = 23.7045 y = 57.9027 z = 46.3159 detector = DummyHitDetector ReadData INFO Hit x = 26.9145 y = 52.2238 z = 44.9265 detector = DummyHitDetector ReadData INFO Hit x = 30.1245 y = 46.5449 z = 43.831 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27292 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 51 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2204,7 +2184,7 @@ ReadData INFO Hit x = 120.494 y = 63.5816 z = -51.8642 detector = Du ReadData INFO Hit x = 123.704 y = 57.9027 z = -53.6841 detector = DummyHitDetector ReadData INFO Hit x = 126.915 y = 52.2238 z = -55.0735 detector = DummyHitDetector ReadData INFO Hit x = 130.125 y = 46.5449 z = -56.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27292 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 52 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2251,7 +2231,7 @@ ReadData INFO Hit x = 220.494 y = 63.5816 z = -151.864 detector = Du ReadData INFO Hit x = 223.704 y = 57.9027 z = -153.684 detector = DummyHitDetector ReadData INFO Hit x = 226.915 y = 52.2238 z = -155.073 detector = DummyHitDetector ReadData INFO Hit x = 230.125 y = 46.5449 z = -156.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27292 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 53 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2298,7 +2278,7 @@ ReadData INFO Hit x = 320.495 y = 63.5816 z = -251.864 detector = Du ReadData INFO Hit x = 323.705 y = 57.9027 z = -253.684 detector = DummyHitDetector ReadData INFO Hit x = 326.915 y = 52.2238 z = -255.073 detector = DummyHitDetector ReadData INFO Hit x = 330.125 y = 46.5449 z = -256.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27292 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 54 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2345,7 +2325,7 @@ ReadData INFO Hit x = 420.495 y = 63.5816 z = -351.864 detector = Du ReadData INFO Hit x = 423.705 y = 57.9027 z = -353.684 detector = DummyHitDetector ReadData INFO Hit x = 426.915 y = 52.2238 z = -355.073 detector = DummyHitDetector ReadData INFO Hit x = 430.125 y = 46.5449 z = -356.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27292 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 55 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2392,7 +2372,7 @@ ReadData INFO Hit x = 520.495 y = 63.5816 z = -451.864 detector = Du ReadData INFO Hit x = 523.705 y = 57.9027 z = -453.684 detector = DummyHitDetector ReadData INFO Hit x = 526.914 y = 52.2238 z = -455.073 detector = DummyHitDetector ReadData INFO Hit x = 530.125 y = 46.5449 z = -456.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27292 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 56 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2439,7 +2419,7 @@ ReadData INFO Hit x = 620.495 y = 63.5816 z = -551.864 detector = Du ReadData INFO Hit x = 623.705 y = 57.9027 z = -553.684 detector = DummyHitDetector ReadData INFO Hit x = 626.914 y = 52.2238 z = -555.073 detector = DummyHitDetector ReadData INFO Hit x = 630.125 y = 46.5449 z = -556.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27292 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 57 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2486,7 +2466,7 @@ ReadData INFO Hit x = 720.495 y = 63.5816 z = -651.864 detector = Du ReadData INFO Hit x = 723.705 y = 57.9027 z = -653.684 detector = DummyHitDetector ReadData INFO Hit x = 726.914 y = 52.2238 z = -655.073 detector = DummyHitDetector ReadData INFO Hit x = 730.125 y = 46.5449 z = -656.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27292 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 58 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2533,7 +2513,7 @@ ReadData INFO Hit x = 820.495 y = 63.5816 z = -751.864 detector = Du ReadData INFO Hit x = 823.705 y = 57.9027 z = -753.684 detector = DummyHitDetector ReadData INFO Hit x = 826.914 y = 52.2238 z = -755.073 detector = DummyHitDetector ReadData INFO Hit x = 830.125 y = 46.5449 z = -756.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27292 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 59 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2580,7 +2560,7 @@ ReadData INFO Hit x = 920.495 y = 63.5816 z = -851.864 detector = Du ReadData INFO Hit x = 923.705 y = 57.9027 z = -853.684 detector = DummyHitDetector ReadData INFO Hit x = 926.914 y = 52.2238 z = -855.073 detector = DummyHitDetector ReadData INFO Hit x = 930.125 y = 46.5449 z = -856.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27292 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 60 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2627,7 +2607,7 @@ ReadData INFO Hit x = 1020.49 y = 63.5816 z = -951.864 detector = Du ReadData INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = DummyHitDetector ReadData INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector ReadData INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27292 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 61 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2674,7 +2654,7 @@ ReadData INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du ReadData INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector ReadData INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector ReadData INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27292 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 62 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2721,7 +2701,7 @@ ReadData INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du ReadData INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector ReadData INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector ReadData INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27292 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 63 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2768,7 +2748,7 @@ ReadData INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du ReadData INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector ReadData INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector ReadData INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27292 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 64 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2815,7 +2795,7 @@ ReadData INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du ReadData INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector ReadData INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector ReadData INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27292 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 65 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2862,7 +2842,7 @@ ReadData INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du ReadData INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector ReadData INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector ReadData INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27292 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 66 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2909,7 +2889,7 @@ ReadData INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du ReadData INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector ReadData INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector ReadData INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27292 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 67 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2956,7 +2936,7 @@ ReadData INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du ReadData INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector ReadData INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector ReadData INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27292 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 68 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -3003,7 +2983,7 @@ ReadData INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du ReadData INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector ReadData INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector ReadData INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27292 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 69 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -3050,14 +3030,14 @@ ReadData INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du ReadData INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector ReadData INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector ReadData INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27292 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 70 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? MetaDataSvc DEBUG handle() LastInputFile for end AthenaEventLoopMgr INFO No more events in event selection -MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] ApplicationMgr INFO Application Manager Stopped successfully @@ -3069,9 +3049,9 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -cObjR_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.0735(+-0.854)/ 0/ 10 [ms] #=272 -cObj_ALL INFO Time User : Tot= 50 [ms] Ave/Min/Max=0.226(+- 1.77)/ 0/ 20 [ms] #=221 -ChronoStatSvc INFO Time User : Tot= 1.01 [s] #= 1 +cObjR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #=272 +cObj_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.0905(+-0.947)/ 0/ 10 [ms] #=221 +ChronoStatSvc INFO Time User : Tot= 0.87 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref index 7109a6dab166..a213f9e89199 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref @@ -1,11 +1,11 @@ -Thu Jun 14 20:40:37 CEST 2018 +Mon Jul 16 20:35:17 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO Read module info for 5509 configurables from 55 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 @@ -13,7 +13,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus021.cern.ch on Thu Jun 14 20:40:48 2018 + running on lxplus052.cern.ch on Mon Jul 16 20:35:25 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -21,32 +21,31 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 +ClassIDSvc INFO getRegistryEntries: read 2428 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 ReadData DEBUG Property update for OutputLevel : new value = 2 ReadData INFO in initialize() MetaDataSvc DEBUG Property update for OutputLevel : new value = 2 MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 +MetaDataSvc DEBUG Service base class initialized successfully AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00 PoolSvc DEBUG Property update for OutputLevel : new value = 2 +PoolSvc DEBUG Service base class initialized successfully 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-07-15T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus052.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams PoolSvc INFO POOL WriteCatalog is file:Catalog1.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] -MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 -MetaDataSvc.IOV... DEBUG in initialize() -MetaDataSvc.IOV... DEBUG initialize(): need to modify folders EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 +EventSelector DEBUG Service base class initialized successfully IoComponentMgr INFO IoComponent EventSelector has already had file EmptyPoolFile.root registered with i/o mode READ EventSelector INFO reinitialization... EventSelector INFO EventSelection with query @@ -162,13 +161,8 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc.IOV... DEBUG handle() FirstInputFile for FID:???? -MetaDataSvc.IOV... DEBUG begin checkOverrideRunNumber -MetaDataSvc.IOV... DEBUG checkOverrideRunNumber: check if tag is set in jobOpts -MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name FID:???? -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 +AthenaPoolAddre... DEBUG Service base class initialized successfully ReadData DEBUG input handles: 0 ReadData DEBUG output handles: 0 ReadData DEBUG Data Deps for ReadData @@ -232,9 +226,7 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for EmptyPoolFile.root -MetaDataSvc.IOV... DEBUG The first BeginInputFile incidence is fired along with the FirstInputFile incidence so we skip the processing of the Input File MetaData +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool MetaDataSvc DEBUG handle() EndInputFile for eventless EmptyPoolFile.root Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] @@ -315,10 +307,7 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile1.root -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile1.root -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool EventSelector INFO skipping event 1 EventSelector INFO skipping event 2 EventSelector INFO skipping event 3 @@ -385,7 +374,7 @@ ReadData INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = Dum ReadData INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector ReadData INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector ClassIDSvc INFO getRegistryEntries: read 10 CLIDRegistry entries for module ALL -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27514 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27509 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 1 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -418,7 +407,7 @@ ReadData INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du ReadData INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector ReadData INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector ReadData INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27514 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27509 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 2 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -451,7 +440,7 @@ ReadData INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du ReadData INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector ReadData INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector ReadData INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27514 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27509 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 3 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -484,7 +473,7 @@ ReadData INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du ReadData INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector ReadData INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector ReadData INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27514 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27509 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 4 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -517,7 +506,7 @@ ReadData INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du ReadData INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector ReadData INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector ReadData INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27514 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27509 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 5 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -550,7 +539,7 @@ ReadData INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du ReadData INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector ReadData INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector ReadData INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27514 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27509 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 6 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -583,7 +572,7 @@ ReadData INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du ReadData INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector ReadData INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector ReadData INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27514 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27509 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 7 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -616,7 +605,7 @@ ReadData INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du ReadData INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector ReadData INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector ReadData INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27514 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27509 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 8 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -649,7 +638,7 @@ ReadData INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du ReadData INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector ReadData INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector ReadData INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27514 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27509 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 9 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -682,7 +671,7 @@ ReadData INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du ReadData INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector ReadData INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector ReadData INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27514 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27509 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 10 events processed so far <<<=== Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? @@ -743,10 +732,7 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for EmptyPoolFile.root -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name EmptyPoolFile.root -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool MetaDataSvc DEBUG handle() EndInputFile for eventless EmptyPoolFile.root Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] @@ -831,10 +817,7 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile2.root -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile2.root -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 ClassIDSvc INFO getRegistryEntries: read 3 CLIDRegistry entries for module ALL @@ -886,7 +869,7 @@ ReadData INFO EventInfo event: 0 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 11 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -914,7 +897,7 @@ ReadData INFO EventInfo event: 1 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 12 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -942,7 +925,7 @@ ReadData INFO EventInfo event: 2 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 13 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -970,7 +953,7 @@ ReadData INFO EventInfo event: 3 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 14 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -998,7 +981,7 @@ ReadData INFO EventInfo event: 4 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 15 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1026,7 +1009,7 @@ ReadData INFO EventInfo event: 5 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 16 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1054,7 +1037,7 @@ ReadData INFO EventInfo event: 6 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 17 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1082,7 +1065,7 @@ ReadData INFO EventInfo event: 7 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 18 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1110,7 +1093,7 @@ ReadData INFO EventInfo event: 8 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 19 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1138,7 +1121,7 @@ ReadData INFO EventInfo event: 9 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 20 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1166,7 +1149,7 @@ ReadData INFO EventInfo event: 10 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 21 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1194,7 +1177,7 @@ ReadData INFO EventInfo event: 11 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 22 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1222,7 +1205,7 @@ ReadData INFO EventInfo event: 12 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 23 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1250,7 +1233,7 @@ ReadData INFO EventInfo event: 13 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 24 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1278,7 +1261,7 @@ ReadData INFO EventInfo event: 14 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 25 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1306,7 +1289,7 @@ ReadData INFO EventInfo event: 15 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 26 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1334,7 +1317,7 @@ ReadData INFO EventInfo event: 16 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 27 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1362,7 +1345,7 @@ ReadData INFO EventInfo event: 17 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 28 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1390,7 +1373,7 @@ ReadData INFO EventInfo event: 18 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 29 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1418,7 +1401,7 @@ ReadData INFO EventInfo event: 19 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26624 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26619 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 30 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1447,7 +1430,7 @@ ReadData INFO EventInfo event: 20 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #20, run #2 31 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1475,7 +1458,7 @@ ReadData INFO EventInfo event: 21 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #21, run #2 32 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1503,7 +1486,7 @@ ReadData INFO EventInfo event: 22 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #22, run #2 33 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1531,7 +1514,7 @@ ReadData INFO EventInfo event: 23 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #23, run #2 34 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1559,7 +1542,7 @@ ReadData INFO EventInfo event: 24 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #24, run #2 35 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1587,7 +1570,7 @@ ReadData INFO EventInfo event: 25 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #25, run #2 36 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1615,7 +1598,7 @@ ReadData INFO EventInfo event: 26 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #26, run #2 37 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1643,7 +1626,7 @@ ReadData INFO EventInfo event: 27 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #27, run #2 38 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1671,7 +1654,7 @@ ReadData INFO EventInfo event: 28 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #28, run #2 39 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1699,7 +1682,7 @@ ReadData INFO EventInfo event: 29 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #29, run #2 40 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1727,7 +1710,7 @@ ReadData INFO EventInfo event: 30 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #30, run #2 41 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1755,7 +1738,7 @@ ReadData INFO EventInfo event: 31 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #31, run #2 42 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1783,7 +1766,7 @@ ReadData INFO EventInfo event: 32 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #32, run #2 43 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1811,7 +1794,7 @@ ReadData INFO EventInfo event: 33 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #33, run #2 44 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1839,7 +1822,7 @@ ReadData INFO EventInfo event: 34 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #34, run #2 45 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1867,7 +1850,7 @@ ReadData INFO EventInfo event: 35 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #35, run #2 46 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1895,7 +1878,7 @@ ReadData INFO EventInfo event: 36 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #36, run #2 47 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1923,7 +1906,7 @@ ReadData INFO EventInfo event: 37 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #37, run #2 48 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1951,7 +1934,7 @@ ReadData INFO EventInfo event: 38 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #38, run #2 49 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1979,7 +1962,7 @@ ReadData INFO EventInfo event: 39 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28229 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #39, run #2 50 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? @@ -2061,10 +2044,7 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile3.root -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile3.root -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-00000000]. @@ -2192,7 +2172,7 @@ ReadData INFO Hit x = 20.4945 y = 63.5816 z = 48.1358 detector = Dum ReadData INFO Hit x = 23.7045 y = 57.9027 z = 46.3159 detector = DummyHitDetector ReadData INFO Hit x = 26.9145 y = 52.2238 z = 44.9265 detector = DummyHitDetector ReadData INFO Hit x = 30.1245 y = 46.5449 z = 43.831 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 51 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2239,7 +2219,7 @@ ReadData INFO Hit x = 120.494 y = 63.5816 z = -51.8642 detector = Du ReadData INFO Hit x = 123.704 y = 57.9027 z = -53.6841 detector = DummyHitDetector ReadData INFO Hit x = 126.915 y = 52.2238 z = -55.0735 detector = DummyHitDetector ReadData INFO Hit x = 130.125 y = 46.5449 z = -56.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 52 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2286,7 +2266,7 @@ ReadData INFO Hit x = 220.494 y = 63.5816 z = -151.864 detector = Du ReadData INFO Hit x = 223.704 y = 57.9027 z = -153.684 detector = DummyHitDetector ReadData INFO Hit x = 226.915 y = 52.2238 z = -155.073 detector = DummyHitDetector ReadData INFO Hit x = 230.125 y = 46.5449 z = -156.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 53 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2333,7 +2313,7 @@ ReadData INFO Hit x = 320.495 y = 63.5816 z = -251.864 detector = Du ReadData INFO Hit x = 323.705 y = 57.9027 z = -253.684 detector = DummyHitDetector ReadData INFO Hit x = 326.915 y = 52.2238 z = -255.073 detector = DummyHitDetector ReadData INFO Hit x = 330.125 y = 46.5449 z = -256.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 54 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2380,7 +2360,7 @@ ReadData INFO Hit x = 420.495 y = 63.5816 z = -351.864 detector = Du ReadData INFO Hit x = 423.705 y = 57.9027 z = -353.684 detector = DummyHitDetector ReadData INFO Hit x = 426.915 y = 52.2238 z = -355.073 detector = DummyHitDetector ReadData INFO Hit x = 430.125 y = 46.5449 z = -356.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 55 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2427,7 +2407,7 @@ ReadData INFO Hit x = 520.495 y = 63.5816 z = -451.864 detector = Du ReadData INFO Hit x = 523.705 y = 57.9027 z = -453.684 detector = DummyHitDetector ReadData INFO Hit x = 526.914 y = 52.2238 z = -455.073 detector = DummyHitDetector ReadData INFO Hit x = 530.125 y = 46.5449 z = -456.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 56 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2474,7 +2454,7 @@ ReadData INFO Hit x = 620.495 y = 63.5816 z = -551.864 detector = Du ReadData INFO Hit x = 623.705 y = 57.9027 z = -553.684 detector = DummyHitDetector ReadData INFO Hit x = 626.914 y = 52.2238 z = -555.073 detector = DummyHitDetector ReadData INFO Hit x = 630.125 y = 46.5449 z = -556.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 57 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2521,7 +2501,7 @@ ReadData INFO Hit x = 720.495 y = 63.5816 z = -651.864 detector = Du ReadData INFO Hit x = 723.705 y = 57.9027 z = -653.684 detector = DummyHitDetector ReadData INFO Hit x = 726.914 y = 52.2238 z = -655.073 detector = DummyHitDetector ReadData INFO Hit x = 730.125 y = 46.5449 z = -656.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 58 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2568,7 +2548,7 @@ ReadData INFO Hit x = 820.495 y = 63.5816 z = -751.864 detector = Du ReadData INFO Hit x = 823.705 y = 57.9027 z = -753.684 detector = DummyHitDetector ReadData INFO Hit x = 826.914 y = 52.2238 z = -755.073 detector = DummyHitDetector ReadData INFO Hit x = 830.125 y = 46.5449 z = -756.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 59 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2615,7 +2595,7 @@ ReadData INFO Hit x = 920.495 y = 63.5816 z = -851.864 detector = Du ReadData INFO Hit x = 923.705 y = 57.9027 z = -853.684 detector = DummyHitDetector ReadData INFO Hit x = 926.914 y = 52.2238 z = -855.073 detector = DummyHitDetector ReadData INFO Hit x = 930.125 y = 46.5449 z = -856.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 60 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2662,7 +2642,7 @@ ReadData INFO Hit x = 1020.49 y = 63.5816 z = -951.864 detector = Du ReadData INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = DummyHitDetector ReadData INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector ReadData INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 61 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2709,7 +2689,7 @@ ReadData INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du ReadData INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector ReadData INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector ReadData INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 62 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2756,7 +2736,7 @@ ReadData INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du ReadData INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector ReadData INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector ReadData INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 63 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2803,7 +2783,7 @@ ReadData INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du ReadData INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector ReadData INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector ReadData INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 64 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2850,7 +2830,7 @@ ReadData INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du ReadData INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector ReadData INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector ReadData INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 65 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2897,7 +2877,7 @@ ReadData INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du ReadData INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector ReadData INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector ReadData INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 66 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2944,7 +2924,7 @@ ReadData INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du ReadData INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector ReadData INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector ReadData INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 67 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2991,7 +2971,7 @@ ReadData INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du ReadData INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector ReadData INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector ReadData INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 68 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -3038,7 +3018,7 @@ ReadData INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du ReadData INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector ReadData INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector ReadData INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 69 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -3085,14 +3065,14 @@ ReadData INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du ReadData INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector ReadData INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector ReadData INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26895 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 26896 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 70 events processed so far <<<=== Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? MetaDataSvc DEBUG handle() EndInputFile for FID:???? MetaDataSvc DEBUG handle() LastInputFile for end AthenaEventLoopMgr INFO No more events in event selection -MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] ApplicationMgr INFO Application Manager Stopped successfully @@ -3104,9 +3084,9 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -cObjR_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.0735(+-0.854)/ 0/ 10 [ms] #=272 +cObjR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.0368(+-0.605)/ 0/ 10 [ms] #=272 cObj_ALL INFO Time User : Tot= 50 [ms] Ave/Min/Max=0.226(+- 1.77)/ 0/ 20 [ms] #=221 -ChronoStatSvc INFO Time User : Tot= 1.03 [s] #= 1 +ChronoStatSvc INFO Time User : Tot= 0.92 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadNoBN.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadNoBN.ref index 4ca427358d9d..036405b1b96f 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadNoBN.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadNoBN.ref @@ -1,11 +1,11 @@ -Thu Jun 14 19:57:44 CEST 2018 +Mon Jul 16 20:19:44 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadNoBNJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO Read module info for 5509 configurables from 55 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 @@ -13,7 +13,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus021.cern.ch on Thu Jun 14 19:57:54 2018 + running on lxplus052.cern.ch on Mon Jul 16 20:19:53 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -21,32 +21,31 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 +ClassIDSvc INFO getRegistryEntries: read 2428 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 ReadData DEBUG Property update for OutputLevel : new value = 2 ReadData INFO in initialize() MetaDataSvc DEBUG Property update for OutputLevel : new value = 2 MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 +MetaDataSvc DEBUG Service base class initialized successfully AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00 PoolSvc DEBUG Property update for OutputLevel : new value = 2 +PoolSvc DEBUG Service base class initialized successfully 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-07-15T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus052.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams PoolSvc INFO POOL WriteCatalog is file:Catalog1.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] -MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 -MetaDataSvc.IOV... DEBUG in initialize() -MetaDataSvc.IOV... DEBUG initialize(): need to modify folders EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 +EventSelector DEBUG Service base class initialized successfully IoComponentMgr INFO IoComponent EventSelector has already had file EmptyPoolFile.root registered with i/o mode READ EventSelector INFO reinitialization... EventSelector INFO EventSelection with query @@ -168,13 +167,8 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc.IOV... DEBUG handle() FirstInputFile for FID:???? -MetaDataSvc.IOV... DEBUG begin checkOverrideRunNumber -MetaDataSvc.IOV... DEBUG checkOverrideRunNumber: check if tag is set in jobOpts -MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name FID:???? -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 +AthenaPoolAddre... DEBUG Service base class initialized successfully ReadData DEBUG input handles: 0 ReadData DEBUG output handles: 0 ReadData DEBUG Data Deps for ReadData @@ -234,9 +228,7 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for EmptyPoolFile.root -MetaDataSvc.IOV... DEBUG The first BeginInputFile incidence is fired along with the FirstInputFile incidence so we skip the processing of the Input File MetaData +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool MetaDataSvc DEBUG handle() EndInputFile for eventless EmptyPoolFile.root Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? EventSelector DEBUG Try item: "SimplePoolFile1.root" from the collection list. @@ -251,10 +243,7 @@ PoolSvc INFO Database (SimplePoolFile1.root) attribute [TREE_CACHE_ MetaDataSvc DEBUG handle() BeginInputFile for SimplePoolFile1.root MetaDataSvc DEBUG initInputMetaDataStore: file name SimplePoolFile1.root MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile1.root -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile1.root -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool EventSelector INFO skipping event 1 EventSelector INFO skipping event 2 EventSelector INFO skipping event 3 @@ -326,7 +315,7 @@ ReadData INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = Dum ReadData INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector ReadData INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector ClassIDSvc INFO getRegistryEntries: read 10 CLIDRegistry entries for module ALL -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27943 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 1 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -359,7 +348,7 @@ ReadData INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du ReadData INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector ReadData INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector ReadData INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27943 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 2 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -392,7 +381,7 @@ ReadData INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du ReadData INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector ReadData INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector ReadData INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27943 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 3 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -425,7 +414,7 @@ ReadData INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du ReadData INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector ReadData INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector ReadData INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27943 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 4 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -458,7 +447,7 @@ ReadData INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du ReadData INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector ReadData INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector ReadData INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27943 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 5 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -491,7 +480,7 @@ ReadData INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du ReadData INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector ReadData INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector ReadData INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27943 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 6 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -524,7 +513,7 @@ ReadData INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du ReadData INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector ReadData INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector ReadData INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27943 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 7 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -557,7 +546,7 @@ ReadData INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du ReadData INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector ReadData INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector ReadData INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27943 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 8 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -590,7 +579,7 @@ ReadData INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du ReadData INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector ReadData INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector ReadData INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27943 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 9 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -623,7 +612,7 @@ ReadData INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du ReadData INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector ReadData INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector ReadData INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27938 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 27943 PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 24 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 10 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? @@ -684,10 +673,7 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for EmptyPoolFile.root -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name EmptyPoolFile.root -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool MetaDataSvc DEBUG handle() EndInputFile for eventless EmptyPoolFile.root Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] @@ -772,10 +758,7 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile2.root -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile2.root -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000005-00000000]. @@ -826,7 +809,7 @@ ReadData INFO EventInfo event: 0 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 11 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -854,7 +837,7 @@ ReadData INFO EventInfo event: 1 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 12 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -882,7 +865,7 @@ ReadData INFO EventInfo event: 2 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 13 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -910,7 +893,7 @@ ReadData INFO EventInfo event: 3 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 14 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -938,7 +921,7 @@ ReadData INFO EventInfo event: 4 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 15 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -966,7 +949,7 @@ ReadData INFO EventInfo event: 5 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 16 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -994,7 +977,7 @@ ReadData INFO EventInfo event: 6 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 17 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1022,7 +1005,7 @@ ReadData INFO EventInfo event: 7 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 18 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1050,7 +1033,7 @@ ReadData INFO EventInfo event: 8 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 19 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1078,7 +1061,7 @@ ReadData INFO EventInfo event: 9 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 20 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1106,7 +1089,7 @@ ReadData INFO EventInfo event: 10 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 21 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1134,7 +1117,7 @@ ReadData INFO EventInfo event: 11 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 22 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1162,7 +1145,7 @@ ReadData INFO EventInfo event: 12 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 23 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1190,7 +1173,7 @@ ReadData INFO EventInfo event: 13 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 24 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1218,7 +1201,7 @@ ReadData INFO EventInfo event: 14 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 25 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1246,7 +1229,7 @@ ReadData INFO EventInfo event: 15 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 26 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1274,7 +1257,7 @@ ReadData INFO EventInfo event: 16 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 27 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1302,7 +1285,7 @@ ReadData INFO EventInfo event: 17 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 28 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1330,7 +1313,7 @@ ReadData INFO EventInfo event: 18 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 29 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1358,7 +1341,7 @@ ReadData INFO EventInfo event: 19 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26625 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 26639 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 27 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 30 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1387,7 +1370,7 @@ ReadData INFO EventInfo event: 20 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #20, run #2 31 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1415,7 +1398,7 @@ ReadData INFO EventInfo event: 21 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #21, run #2 32 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1443,7 +1426,7 @@ ReadData INFO EventInfo event: 22 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #22, run #2 33 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1471,7 +1454,7 @@ ReadData INFO EventInfo event: 23 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #23, run #2 34 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1499,7 +1482,7 @@ ReadData INFO EventInfo event: 24 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #24, run #2 35 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1527,7 +1510,7 @@ ReadData INFO EventInfo event: 25 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #25, run #2 36 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1555,7 +1538,7 @@ ReadData INFO EventInfo event: 26 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #26, run #2 37 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1583,7 +1566,7 @@ ReadData INFO EventInfo event: 27 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #27, run #2 38 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1611,7 +1594,7 @@ ReadData INFO EventInfo event: 28 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #28, run #2 39 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1639,7 +1622,7 @@ ReadData INFO EventInfo event: 29 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #29, run #2 40 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1667,7 +1650,7 @@ ReadData INFO EventInfo event: 30 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #30, run #2 41 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1695,7 +1678,7 @@ ReadData INFO EventInfo event: 31 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #31, run #2 42 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1723,7 +1706,7 @@ ReadData INFO EventInfo event: 32 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #32, run #2 43 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1751,7 +1734,7 @@ ReadData INFO EventInfo event: 33 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #33, run #2 44 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1779,7 +1762,7 @@ ReadData INFO EventInfo event: 34 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #34, run #2 45 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1807,7 +1790,7 @@ ReadData INFO EventInfo event: 35 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #35, run #2 46 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1835,7 +1818,7 @@ ReadData INFO EventInfo event: 36 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #36, run #2 47 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1863,7 +1846,7 @@ ReadData INFO EventInfo event: 37 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #37, run #2 48 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1891,7 +1874,7 @@ ReadData INFO EventInfo event: 38 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #38, run #2 49 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1919,7 +1902,7 @@ ReadData INFO EventInfo event: 39 run: 2 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28240 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 28252 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 31 AthenaEventLoopMgr INFO ===>>> done processing event #39, run #2 50 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? @@ -2008,10 +1991,7 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile3.root -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name SimplePoolFile3.root -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-00000000]. @@ -2061,7 +2041,7 @@ ReadData INFO Track pt = 74.8928 eta = 3.1676 phi = 2.6161 detector DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 51 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2087,7 +2067,7 @@ ReadData INFO Track pt = 137.584 eta = -39.525 phi = 17.2679 detecto DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 52 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2113,7 +2093,7 @@ ReadData INFO Track pt = 228.154 eta = -6.2704 phi = 31.9197 detecto DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 53 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2139,7 +2119,7 @@ ReadData INFO Track pt = 324.306 eta = -15.8941 phi = 46.5715 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 54 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2165,7 +2145,7 @@ ReadData INFO Track pt = 422.255 eta = -13.279 phi = 61.2233 detecto DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 55 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2191,7 +2171,7 @@ ReadData INFO Track pt = 520.987 eta = -12.3511 phi = 75.8751 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 56 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2217,7 +2197,7 @@ ReadData INFO Track pt = 620.127 eta = -11.8468 phi = 90.5269 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 57 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2243,7 +2223,7 @@ ReadData INFO Track pt = 719.507 eta = -11.5247 phi = 105.179 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 58 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2269,7 +2249,7 @@ ReadData INFO Track pt = 819.038 eta = -11.2998 phi = 119.831 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 59 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2295,7 +2275,7 @@ ReadData INFO Track pt = 918.671 eta = -11.1334 phi = 134.482 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 60 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2321,7 +2301,7 @@ ReadData INFO Track pt = 1018.38 eta = -11.0052 phi = 149.134 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 61 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2347,7 +2327,7 @@ ReadData INFO Track pt = 1118.13 eta = -10.9031 phi = 163.786 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 62 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2373,7 +2353,7 @@ ReadData INFO Track pt = 1217.93 eta = -10.82 phi = 178.438 detector DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 63 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2399,7 +2379,7 @@ ReadData INFO Track pt = 1317.76 eta = -10.751 phi = 193.09 detector DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 64 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2425,7 +2405,7 @@ ReadData INFO Track pt = 1417.61 eta = -10.6927 phi = 207.741 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 65 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2451,7 +2431,7 @@ ReadData INFO Track pt = 1517.49 eta = -10.6429 phi = 222.393 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 66 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2477,7 +2457,7 @@ ReadData INFO Track pt = 1617.37 eta = -10.5997 phi = 237.045 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 67 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2503,7 +2483,7 @@ ReadData INFO Track pt = 1717.27 eta = -10.562 phi = 251.697 detecto DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 68 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2529,7 +2509,7 @@ ReadData INFO Track pt = 1817.19 eta = -10.5288 phi = 266.349 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 69 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -2555,7 +2535,7 @@ ReadData INFO Track pt = 1917.11 eta = -10.4993 phi = 281 detector = DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27287 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 27297 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 23 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 70 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? @@ -2563,7 +2543,7 @@ Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] MetaDataSvc DEBUG handle() LastInputFile for end AthenaEventLoopMgr INFO No more events in event selection -MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool ApplicationMgr INFO Application Manager Stopped successfully IncidentProcAlg1 INFO Finalize ReadData INFO in finalize() @@ -2575,7 +2555,7 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** cObjR_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.104(+- 1.01)/ 0/ 10 [ms] #=193 cObj_ALL INFO Time User : Tot= 50 [ms] Ave/Min/Max=0.276(+- 1.95)/ 0/ 20 [ms] #=181 -ChronoStatSvc INFO Time User : Tot= 1.03 [s] #= 1 +ChronoStatSvc INFO Time User : Tot= 0.88 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WCond.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WCond.ref index 34161a0475e0..2320c5de7094 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WCond.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WCond.ref @@ -1,11 +1,11 @@ -Thu Jun 14 20:40:51 CEST 2018 +Mon Jul 16 20:52:06 CEST 2018 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_WCondJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5481 configurables from 56 genConfDb files +Py:ConfigurableDb INFO Read module info for 5509 configurables from 55 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" [?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 @@ -13,7 +13,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v30r2) - running on lxplus021.cern.ch on Thu Jun 14 20:41:02 2018 + running on lxplus052.cern.ch on Mon Jul 16 20:52:15 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -21,8 +21,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2375 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 +ClassIDSvc INFO getRegistryEntries: read 2428 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 Stream1 DEBUG Property update for OutputLevel : new value = 2 @@ -30,11 +29,12 @@ Stream1 DEBUG in initialize() ToolSvc.Stream1... INFO Initializing ToolSvc.Stream1Tool - package version AthenaServices-00-00-00 AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00 PoolSvc DEBUG Property update for OutputLevel : new value = 2 +PoolSvc DEBUG Service base class initialized successfully 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://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-06-13T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus021.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-07-15T2055/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus052.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -48,11 +48,10 @@ ReadData DEBUG Property update for OutputLevel : new value = 2 ReadData INFO in initialize() MetaDataSvc DEBUG Property update for OutputLevel : new value = 2 MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 -MetaDataSvc.IOV... DEBUG Property update for OutputLevel : new value = 2 -MetaDataSvc.IOV... DEBUG in initialize() -MetaDataSvc.IOV... DEBUG initialize(): need to modify folders +MetaDataSvc DEBUG Service base class initialized successfully EventSelector DEBUG Property update for OutputLevel : new value = 2 EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 +EventSelector DEBUG Service base class initialized successfully EventSelector INFO reinitialization... EventSelector INFO EventSelection with query EventSelector DEBUG Try item: "SimplePoolFile1.root" from the collection list. @@ -123,13 +122,8 @@ MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc.IOV... DEBUG handle() FirstInputFile for FID:???? -MetaDataSvc.IOV... DEBUG begin checkOverrideRunNumber -MetaDataSvc.IOV... DEBUG checkOverrideRunNumber: check if tag is set in jobOpts -MetaDataSvc.IOV... DEBUG resetRunNumber: unable to get OverrideRunNumberFromInput property from EventSelector -MetaDataSvc.IOV... DEBUG processInputFileMetaData: file name FID:???? -MetaDataSvc.IOV... DEBUG Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 +AthenaPoolAddre... DEBUG Service base class initialized successfully ReadData DEBUG input handles: 0 ReadData DEBUG output handles: 0 ReadData DEBUG Data Deps for ReadData @@ -210,9 +204,7 @@ MetaDataHdr(Dat... DEBUG attributes# = 1 MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for MetaDataSvc.IOVDbMetaDataTool -MetaDataSvc.IOV... DEBUG handle() BeginInputFile for SimplePoolFile1.root -MetaDataSvc.IOV... DEBUG The first BeginInputFile incidence is fired along with the FirstInputFile incidence so we skip the processing of the Input File MetaData +MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000202][OID=00000006-00000000]. @@ -1105,7 +1097,7 @@ MetaDataSvc DEBUG handle() LastInputFile for end AthenaEventLoopMgr INFO No more events in event selection WriteCond INFO in finalize() WriteCond INFO Pedestal x = 193136 y = 14420 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> -MetaDataSvc DEBUG calling metaDataStop for MetaDataSvc.IOVDbMetaDataTool +MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool ApplicationMgr INFO Application Manager Stopped successfully IncidentProcAlg1 INFO Finalize Stream1 INFO Finalize: preparing to write conditions objects @@ -1185,8 +1177,8 @@ cRep_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0 fRep_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 2 cRepR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 3 cObjR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 66 -cObj_ALL INFO Time User : Tot= 40 [ms] Ave/Min/Max=0.635(+- 2.44)/ 0/ 10 [ms] #= 63 -ChronoStatSvc INFO Time User : Tot= 0.93 [s] #= 1 +cObj_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.317(+- 1.75)/ 0/ 10 [ms] #= 63 +ChronoStatSvc INFO Time User : Tot= 0.88 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully -- GitLab From 197bed34b0adf00e016d4ae9c579f8e725352ff2 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Mon, 16 Jul 2018 16:57:05 +0200 Subject: [PATCH 489/562] CaloCalibHitRec: Remove use of DataHandle. Using DataHandle with retrieve() is deprecated. Remove it. Former-commit-id: 4ebb92b21c344a1eef6b49a98703ee5cf0eae021 --- .../CaloCalibClusterMomentsMaker.h | 9 ++-- .../CaloCalibClusterMomentsMaker2.h | 8 ++-- .../src/CaloCalibClusterMomentsMaker.cxx | 46 ++++++++---------- .../src/CaloCalibClusterMomentsMaker2.cxx | 47 ++++++++----------- .../CaloCalibHitRec/src/CaloDmEnergy.cxx | 4 +- 5 files changed, 48 insertions(+), 66 deletions(-) diff --git a/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CaloCalibClusterMomentsMaker.h b/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CaloCalibClusterMomentsMaker.h index 42ae171c4549..c1ff21c52496 100644 --- a/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CaloCalibClusterMomentsMaker.h +++ b/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CaloCalibClusterMomentsMaker.h @@ -22,10 +22,9 @@ class CaloDM_ID; class CaloDmDescrManager; class CaloDmEnergy; -#include "StoreGate/DataHandle.h" - #include "CaloRec/CaloClusterCollectionProcessor.h" -//#include "CaloEvent/CaloClusterMoment.h" +#include "CaloSimEvent/CaloCalibrationHitContainer.h" +#include "StoreGate/ReadHandleKeyArray.h" #include <string> #include <vector> #include <set> @@ -118,14 +117,14 @@ class CaloCalibClusterMomentsMaker: public AthAlgTool, virtual public CaloCluste * * The containers specified in this property should hold calibration * hits inside the calorimeter systems. */ - std::vector<std::string> m_CalibrationHitContainerNames; + SG::ReadHandleKeyArray<CaloCalibrationHitContainer> m_CalibrationHitContainerNames; /** * @brief vector of dead material calibration hit container names to use. * * The containers specified in this property should hold calibration * hits outside the calorimeter systems - i.e. dead material hits ... */ - std::vector<std::string> m_DMCalibrationHitContainerNames; + SG::ReadHandleKeyArray<CaloCalibrationHitContainer> m_DMCalibrationHitContainerNames; const CaloDetDescrManager* m_calo_dd_man; diff --git a/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CaloCalibClusterMomentsMaker2.h b/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CaloCalibClusterMomentsMaker2.h index 3265dca2712e..b4f00ee844c3 100644 --- a/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CaloCalibClusterMomentsMaker2.h +++ b/Calorimeter/CaloCalibHitRec/CaloCalibHitRec/CaloCalibClusterMomentsMaker2.h @@ -23,14 +23,14 @@ class CaloDmDescrManager; class McEventCollection; class TruthParticleContainer; -#include "StoreGate/DataHandle.h" #include "GaudiKernel/ToolHandle.h" #include "CaloRec/CaloClusterCollectionProcessor.h" -//#include "CaloEvent/CaloClusterMoment.h" #include "CaloGeoHelpers/CaloSampling.h" #include "CaloIdentifier/CaloCell_ID.h" #include "CaloDmDetDescr/CaloDmDescrManager.h" +#include "CaloSimEvent/CaloCalibrationHitContainer.h" +#include "StoreGate/ReadHandleKeyArray.h" #include <string> #include <vector> @@ -186,14 +186,14 @@ class CaloCalibClusterMomentsMaker2: public AthAlgTool, virtual public CaloClust * * The containers specified in this property should hold calibration * hits inside the calorimeter systems. */ - std::vector<std::string> m_CalibrationHitContainerNames; + SG::ReadHandleKeyArray<CaloCalibrationHitContainer> m_CalibrationHitContainerNames; /** * @brief vector of dead material calibration hit container names to use. * * The containers specified in this property should hold calibration * hits outside the calorimeter systems - i.e. dead material hits ... */ - std::vector<std::string> m_DMCalibrationHitContainerNames; + SG::ReadHandleKeyArray<CaloCalibrationHitContainer> m_DMCalibrationHitContainerNames; /** * @brief name of truth particle container diff --git a/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterMomentsMaker.cxx b/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterMomentsMaker.cxx index 4e24cf402c6f..136701078dc1 100644 --- a/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterMomentsMaker.cxx +++ b/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterMomentsMaker.cxx @@ -38,12 +38,8 @@ #include "CaloIdentifier/CaloCell_ID.h" #include "CaloIdentifier/CaloDM_ID.h" -#include "GaudiKernel/StatusCode.h" -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/ListItem.h" -#include "GaudiKernel/IToolSvc.h" - #include "StoreGate/StoreGateSvc.h" +#include "StoreGate/ReadHandle.h" #include "CLHEP/Units/SystemOfUnits.h" #include <math.h> @@ -280,58 +276,54 @@ StatusCode CaloCalibClusterMomentsMaker::initialize() } } + ATH_CHECK( m_CalibrationHitContainerNames.initialize() ); + ATH_CHECK( m_DMCalibrationHitContainerNames.initialize() ); + return StatusCode::SUCCESS; } //############################################################################### StatusCode -CaloCalibClusterMomentsMaker::execute(const EventContext& /*ctx*/, +CaloCalibClusterMomentsMaker::execute(const EventContext& ctx, xAOD::CaloClusterContainer *theClusColl) const { ATH_MSG_DEBUG( "Executing " << name() ); bool foundAllContainers (true); - const DataHandle<CaloCalibrationHitContainer> cchc; std::vector<const CaloCalibrationHitContainer *> v_cchc; - for (const std::string& cname : m_CalibrationHitContainerNames) { - if ( !m_storeGate->contains<CaloCalibrationHitContainer>(cname)) { + for (const SG::ReadHandleKey<CaloCalibrationHitContainer>& key : + m_CalibrationHitContainerNames) + { + SG::ReadHandle<CaloCalibrationHitContainer> cchc (key, ctx); + if ( !cchc.isValid() ) { if (m_foundAllContainers) { // print ERROR message only if there was at least one event with // all containers - ATH_MSG_ERROR( "SG does not contain calibration hit container " << cname ); + ATH_MSG_ERROR( "SG does not contain calibration hit container " << key.key() ); } foundAllContainers = false; } else { - StatusCode sc = m_storeGate->retrieve(cchc,cname); - if (sc.isFailure() ) { - ATH_MSG_ERROR( "Cannot retrieve calibration hit container " << cname ); - foundAllContainers = false; - } - else - v_cchc.push_back(cchc); + v_cchc.push_back(cchc.cptr()); } } std::vector<const CaloCalibrationHitContainer *> v_dmcchc; - for (const std::string& cname : m_DMCalibrationHitContainerNames) { - if ( !m_storeGate->contains<CaloCalibrationHitContainer>(cname)) { + for (const SG::ReadHandleKey<CaloCalibrationHitContainer>& key : + m_DMCalibrationHitContainerNames) + { + SG::ReadHandle<CaloCalibrationHitContainer> cchc (key, ctx); + if ( !cchc.isValid() ) { if (m_foundAllContainers) { // print ERROR message only if there was at least one event with // all containers - ATH_MSG_ERROR( "SG does not contain DM calibration hit container " << cname ); + ATH_MSG_ERROR( "SG does not contain DM calibration hit container " << key.key() ); } foundAllContainers = false; } else { - StatusCode sc = m_storeGate->retrieve(cchc,cname); - if (sc.isFailure() ) { - ATH_MSG_ERROR( "Cannot retrieve DM calibration hit container " << cname ); - foundAllContainers = false; - } - else - v_dmcchc.push_back(cchc); + v_dmcchc.push_back(cchc.cptr()); } } diff --git a/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterMomentsMaker2.cxx b/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterMomentsMaker2.cxx index 6dae113cab77..5329c6fab5fa 100644 --- a/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterMomentsMaker2.cxx +++ b/Calorimeter/CaloCalibHitRec/src/CaloCalibClusterMomentsMaker2.cxx @@ -40,17 +40,12 @@ #include "McParticleEvent/TruthParticle.h" #include "McParticleEvent/TruthParticleContainer.h" -#include "GaudiKernel/StatusCode.h" -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/ListItem.h" -#include "GaudiKernel/IToolSvc.h" +#include "StoreGate/ReadHandle.h" #include "CLHEP/Units/SystemOfUnits.h" #include <math.h> -#include <CLHEP/Units/SystemOfUnits.h> #include <CLHEP/Vector/LorentzVector.h> -#include <CLHEP/Geometry/Vector3D.h> using CLHEP::HepLorentzVector; @@ -290,57 +285,53 @@ StatusCode CaloCalibClusterMomentsMaker2::initialize() } } + ATH_CHECK( m_CalibrationHitContainerNames.initialize() ); + ATH_CHECK( m_DMCalibrationHitContainerNames.initialize() ); + return StatusCode::SUCCESS; } //############################################################################### StatusCode -CaloCalibClusterMomentsMaker2::execute(const EventContext& /*ctx*/, +CaloCalibClusterMomentsMaker2::execute(const EventContext& ctx, xAOD::CaloClusterContainer *theClusColl) const { bool foundAllContainers (true); - const DataHandle<CaloCalibrationHitContainer> cchc; std::vector<const CaloCalibrationHitContainer *> v_cchc; - for (const std::string& cname : m_CalibrationHitContainerNames) { - if ( !evtStore()->contains<CaloCalibrationHitContainer>(cname)) { + for (const SG::ReadHandleKey<CaloCalibrationHitContainer>& key : + m_CalibrationHitContainerNames) + { + SG::ReadHandle<CaloCalibrationHitContainer> cchc (key, ctx); + if ( !cchc.isValid() ) { if (m_foundAllContainers) { // print ERROR message only if there was at least one event with // all containers - msg(MSG::ERROR) << "SG does not contain calibration hit container " << cname << endmsg; + msg(MSG::ERROR) << "SG does not contain calibration hit container " << key.key() << endmsg; } foundAllContainers = false; } else { - StatusCode sc = evtStore()->retrieve(cchc,cname); - if (sc.isFailure() ) { - msg(MSG::ERROR) << "Cannot retrieve calibration hit container " << cname << endmsg; - foundAllContainers = false; - } - else - v_cchc.push_back(cchc); + v_cchc.push_back(cchc.cptr()); } } std::vector<const CaloCalibrationHitContainer *> v_dmcchc; - for (const std::string& cname : m_DMCalibrationHitContainerNames) { - if ( !evtStore()->contains<CaloCalibrationHitContainer>(cname)) { + for (const SG::ReadHandleKey<CaloCalibrationHitContainer>& key : + m_DMCalibrationHitContainerNames) + { + SG::ReadHandle<CaloCalibrationHitContainer> cchc (key, ctx); + if ( !cchc.isValid() ) { if (m_foundAllContainers) { // print ERROR message only if there was at least one event with // all containers - msg(MSG::ERROR) << "SG does not contain DM calibration hit container " << cname << endmsg; + msg(MSG::ERROR) << "SG does not contain DM calibration hit container " << key.key() << endmsg; } foundAllContainers = false; } else { - StatusCode sc = evtStore()->retrieve(cchc,cname); - if (sc.isFailure() ) { - msg(MSG::ERROR) << "Cannot retrieve DM calibration hit container " << cname << endmsg; - foundAllContainers = false; - } - else - v_dmcchc.push_back(cchc); + v_dmcchc.push_back(cchc.cptr()); } } diff --git a/Calorimeter/CaloCalibHitRec/src/CaloDmEnergy.cxx b/Calorimeter/CaloCalibHitRec/src/CaloDmEnergy.cxx index 66fc7d3dd308..5771cd77e188 100644 --- a/Calorimeter/CaloCalibHitRec/src/CaloDmEnergy.cxx +++ b/Calorimeter/CaloCalibHitRec/src/CaloDmEnergy.cxx @@ -195,7 +195,7 @@ int CaloDmEnergy::assign2clusters(const std::string &clusterContainerName) // retreiving DM containers std::vector<const CaloCalibrationHitContainer *> v_dmcchc; for (std::vector<std::string>::iterator iter=m_CalibrationContainerNamesDM.begin();iter!=m_CalibrationContainerNamesDM.end();iter++) { - const DataHandle<CaloCalibrationHitContainer> dmcchc; + const CaloCalibrationHitContainer* dmcchc = nullptr; sc = m_storeGate->retrieve(dmcchc,*iter); if (sc.isFailure() ) { log << MSG::WARNING << "Cannot retrieve DM calibration hit container " << *iter << endmsg; @@ -206,7 +206,7 @@ int CaloDmEnergy::assign2clusters(const std::string &clusterContainerName) } // retreiving cluster container - const DataHandle<xAOD::CaloClusterContainer > theClusters; + const xAOD::CaloClusterContainer* theClusters = nullptr; sc = m_storeGate->retrieve(theClusters, clusterContainerName); if (sc.isFailure()) { log << MSG::WARNING << " Couldn't get cluster container '" << clusterContainerName << "'" << endmsg; -- GitLab From e1cdd254df597f0f4e77e4b14210f61d79a3ba92 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Mon, 16 Jul 2018 16:57:34 +0200 Subject: [PATCH 490/562] AthenaPoolTools: Remove use of DataHandle. Using DataHandle with retrieve() is deprecated. Remove it. Former-commit-id: a2e718fbd1ab3d8418a6d6f5831770adf94b9f10 --- .../AthenaPoolTools/src/BookkeeperDumper.cxx | 8 ++++---- .../AthenaPoolTools/src/EventCount.cxx | 15 ++++++++++----- .../AthenaPoolTools/src/EventCount.h | 5 ++++- .../AthenaPoolTools/src/RequireUniqueEvent.cxx | 18 +++++------------- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Database/AthenaPOOL/AthenaPoolTools/src/BookkeeperDumper.cxx b/Database/AthenaPOOL/AthenaPoolTools/src/BookkeeperDumper.cxx index 659c80a08ec2..4f1f77158a67 100755 --- a/Database/AthenaPOOL/AthenaPoolTools/src/BookkeeperDumper.cxx +++ b/Database/AthenaPOOL/AthenaPoolTools/src/BookkeeperDumper.cxx @@ -53,7 +53,7 @@ void BookkeeperDumper::handle(const Incident& inc) ServiceHandle<StoreGateSvc> mdstore("StoreGateSvc/InputMetaDataStore", name()); if (mdstore.retrieve().isSuccess()) { // - const DataHandle<xAOD::CutBookkeeperContainer> compBook(nullptr); + const xAOD::CutBookkeeperContainer* compBook = nullptr; if (mdstore->retrieve(compBook, "CutBookkeepers").isSuccess()) { ATH_MSG_INFO("CBK size = " << compBook->size()); @@ -64,7 +64,7 @@ void BookkeeperDumper::handle(const Incident& inc) ATH_MSG_INFO("CBK No CutBookkeepers " << mdstore->dump()); } // - const DataHandle<xAOD::CutBookkeeperContainer> incompBook(nullptr); + const xAOD::CutBookkeeperContainer* incompBook = nullptr; if (mdstore->retrieve(incompBook, "IncompleteCutBookkeepers").isSuccess()) { ATH_MSG_INFO("ICBK size = " << incompBook->size()); @@ -75,7 +75,7 @@ void BookkeeperDumper::handle(const Incident& inc) ATH_MSG_INFO("ICBK No CutBookkeepers " << mdstore->dump()); } // - const DataHandle<xAOD::CutBookkeeperContainer> pcompBook(nullptr); + const xAOD::CutBookkeeperContainer* pcompBook = nullptr; if (mdstore->retrieve(pcompBook, "PDFSumOfWeights").isSuccess()) { ATH_MSG_INFO("PCBK size = " << pcompBook->size()); @@ -86,7 +86,7 @@ void BookkeeperDumper::handle(const Incident& inc) ATH_MSG_INFO("PCBK No CutBookkeepers " << mdstore->dump()); } // - const DataHandle<xAOD::CutBookkeeperContainer> ipcompBook(nullptr); + const xAOD::CutBookkeeperContainer* ipcompBook = nullptr; if (mdstore->retrieve(ipcompBook, "IncompletePDFSumOfWeights").isSuccess()) { ATH_MSG_INFO("IPCBK size = " << ipcompBook->size()); diff --git a/Database/AthenaPOOL/AthenaPoolTools/src/EventCount.cxx b/Database/AthenaPOOL/AthenaPoolTools/src/EventCount.cxx index 22154fe0c1e4..ab8c3c2a4065 100755 --- a/Database/AthenaPOOL/AthenaPoolTools/src/EventCount.cxx +++ b/Database/AthenaPOOL/AthenaPoolTools/src/EventCount.cxx @@ -21,6 +21,7 @@ #include "GaudiKernel/IIncidentSvc.h" #include "GaudiKernel/FileIncident.h" +#include "StoreGate/ReadHandle.h" #include "StoreGate/StoreGateSvc.h" #include "AthenaKernel/IClassIDSvc.h" @@ -45,6 +46,9 @@ EventCount::EventCount(const std::string& name, ISvcLocator* pSvcLocator) : { // Declare the properties declareProperty("Dump", m_dump,"Bool of whether to dump object summary"); + declareProperty("EventInfoKey", + m_eventInfoKey = "EventInfo", + "Key to read EventInfo."); } EventCount::~EventCount() @@ -63,7 +67,9 @@ StatusCode EventCount::initialize() ServiceHandle<IIncidentSvc> incSvc("IncidentSvc", this->name()); ATH_CHECK( incSvc.retrieve() ); - incSvc->addListener(this, "BeginInputFile", 100); + incSvc->addListener(this, "BeginInputFile", 100); + + ATH_CHECK( m_eventInfoKey.initialize() ); return StatusCode::SUCCESS; } @@ -92,8 +98,7 @@ StatusCode EventCount::execute() // Get the event header, print out event and run number //ATH_MSG_INFO ( evtStore()->dump() ); - const DataHandle<xAOD::EventInfo> evt; - ATH_CHECK( evtStore()->retrieve(evt) ); + SG::ReadHandle<xAOD::EventInfo> evt (m_eventInfoKey); if (!evt.isValid()) { ATH_MSG_FATAL ( "Could not find event" ); return(StatusCode::FAILURE); @@ -155,8 +160,8 @@ StatusCode EventCount::execute() // Now check what objects are in storegate // //if (m_dump) { - const DataHandle<DataHeader> beg; - const DataHandle<DataHeader> ending; + SG::ConstIterator<DataHeader> beg; + SG::ConstIterator<DataHeader> ending; StatusCode status = evtStore()->retrieve(beg,ending); if (status.isFailure() || beg==ending) { ATH_MSG_DEBUG ( "No DataHeaders present in StoreGate" ); diff --git a/Database/AthenaPOOL/AthenaPoolTools/src/EventCount.h b/Database/AthenaPOOL/AthenaPoolTools/src/EventCount.h index 4cdee77c58d8..fb0142801c7f 100755 --- a/Database/AthenaPOOL/AthenaPoolTools/src/EventCount.h +++ b/Database/AthenaPOOL/AthenaPoolTools/src/EventCount.h @@ -30,6 +30,8 @@ #include "GaudiKernel/ServiceHandle.h" #include "GaudiKernel/IIncidentListener.h" #include "PersistentDataModel/Guid.h" +#include "xAODEventInfo/EventInfo.h" +#include "StoreGate/ReadHandleKey.h" #include "EventInfo/EventID.h" class IClassIDSvc; @@ -59,7 +61,8 @@ public: private: bool m_dump; /// PROP If dump is set to true then the - /// object summary will be printed + /// object summary will be printed + SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey; ServiceHandle<IClassIDSvc> m_pCLIDSvc; int m_nev; /// Event count for output diff --git a/Database/AthenaPOOL/AthenaPoolTools/src/RequireUniqueEvent.cxx b/Database/AthenaPOOL/AthenaPoolTools/src/RequireUniqueEvent.cxx index dd26f31b26dc..2c95b8ec76e5 100755 --- a/Database/AthenaPOOL/AthenaPoolTools/src/RequireUniqueEvent.cxx +++ b/Database/AthenaPOOL/AthenaPoolTools/src/RequireUniqueEvent.cxx @@ -39,24 +39,16 @@ StatusCode RequireUniqueEvent::initialize() StatusCode RequireUniqueEvent::execute() { ATH_MSG_DEBUG ( "in execute()" ); - - // Check for event header - const DataHandle<EventInfo> evt; - ATH_CHECK( evtStore()->retrieve(evt) ); - ATH_MSG_DEBUG ( "Found EventInfo in SG" ); - - if (!evt.isValid()) { - ATH_MSG_FATAL ( "Could not find event" ); - return(StatusCode::FAILURE); - } - ATH_MSG_DEBUG ( "EventInfo event: " << evt->event_ID()->event_number() - << " run: " << evt->event_ID()->run_number() ); + + const EventIDBase& eid = getContext().eventID(); + ATH_MSG_DEBUG ( "EventInfo event: " << eid.event_number() + << " run: " << eid.run_number() ); // // Check if EventID has occurred previously. If so, issue a warning // -- Use brute force, i.e. let the set keep the index and do the search // -- return code on insert is pair with iterator,bool // - EventID ev( evt->event_ID()->run_number(), evt->event_ID()->event_number() ); + EventID ev( eid.run_number(), eid.event_number() ); if (!m_evList.insert(ev).second) { ATH_MSG_WARNING ( "Duplicate record " << ev ); m_cnt++; -- GitLab From fa7a8c3639c19ccc198f1bd87e0aba3b8d745087 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Mon, 16 Jul 2018 16:57:51 +0200 Subject: [PATCH 491/562] AthenaRootComps: Remove use of DataHandle. Using DataHandle with retrieve() is deprecated. Remove it. Former-commit-id: e738d6eccb447ea50c715b4493ab08e7bf93ce6a --- .../src/RootNtupleOutputMetadataTool.cxx | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Database/AthenaRoot/AthenaRootComps/src/RootNtupleOutputMetadataTool.cxx b/Database/AthenaRoot/AthenaRootComps/src/RootNtupleOutputMetadataTool.cxx index 797c3c3339c5..5b4524e84747 100755 --- a/Database/AthenaRoot/AthenaRootComps/src/RootNtupleOutputMetadataTool.cxx +++ b/Database/AthenaRoot/AthenaRootComps/src/RootNtupleOutputMetadataTool.cxx @@ -157,13 +157,13 @@ RootNtupleOutputMetadataTool::handle(const Incident& inc) ATH_MSG_DEBUG("handle() incident type: " << inc.type()); if (inc.type()=="BeginInputFile") { // Have to clean out any previous file metadata trees - const DataHandle<TransferTree> titer; - const DataHandle<TransferTree> tend; + SG::ConstIterator<TransferTree> titer; + SG::ConstIterator<TransferTree> tend; StatusCode pc = m_ometaStore->retrieve(titer,tend); if (pc.isSuccess()) { for (; titer != tend; titer++) { - if (titer.cptr()!=0) { - if (m_ometaStore->removeDataAndProxy(titer.cptr()).isFailure()) { + if (titer.isValid()) { + if (m_ometaStore->removeDataAndProxy(&*titer).isFailure()) { ATH_MSG_ERROR("Unable to remove TransferTree after writing"); } } @@ -195,8 +195,8 @@ RootNtupleOutputMetadataTool::writeMetadata() } if (!m_metaWritten) { // Write the strings - const DataHandle<std::string> iter; - const DataHandle<std::string> end; + SG::ConstIterator<std::string> iter; + SG::ConstIterator<std::string> end; StatusCode pc = m_ometaStore->retrieve(iter,end); bool failure = false; if (pc.isSuccess()) { @@ -211,16 +211,16 @@ RootNtupleOutputMetadataTool::writeMetadata() } m_metaWritten = true; } - const DataHandle<TransferTree> titer; - const DataHandle<TransferTree> tend; + SG::ConstIterator<TransferTree> titer; + SG::ConstIterator<TransferTree> tend; StatusCode pc = m_ometaStore->retrieve(titer,tend); bool failure = false; if (pc.isSuccess()) { for (; titer != tend; titer++) { std::string key = titer.key(); if (m_treesWritten.find(key) == m_treesWritten.end()) { - if (titer.cptr()!=0) { - const TTree* x = (TTree*)titer.cptr()->tree(); + if (titer.isValid()) { + const TTree* x = (TTree*)titer->tree(); try { if (this->addMetadata(key,x,typeid(TTree)).isFailure()) failure=true; } @@ -245,8 +245,8 @@ RootNtupleOutputMetadataTool::writeMetadata() StatusCode RootNtupleOutputMetadataTool::copyMetadata() { - const DataHandle<std::string> iter; - const DataHandle<std::string> end; + SG::ConstIterator<std::string> iter; + SG::ConstIterator<std::string> end; StatusCode pc = m_imetaStore->retrieve(iter,end); bool failure = false; if (pc.isSuccess()) { @@ -261,13 +261,13 @@ RootNtupleOutputMetadataTool::copyMetadata() ATH_MSG_ERROR("Problem copying metadata"); return StatusCode::FAILURE; } - const DataHandle<TransferTree> titer; - const DataHandle<TransferTree> tend; + SG::ConstIterator<TransferTree> titer; + SG::ConstIterator<TransferTree> tend; pc = m_imetaStore->retrieve(titer,tend); failure = false; if (pc.isSuccess()) { for (; titer != tend; titer++) { - if (titer.cptr()!=0) { + if (titer.isValid()) { auto toCopy = std::make_unique<TransferTree>(*titer); if (!m_ometaStore->contains<TransferTree>(titer.key())) { if (m_ometaStore->record(std::move(toCopy),titer.key()).isFailure()) failure=true; -- GitLab From 0ad96f9c7f94eeda417c376d54ede36f0badc8d0 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Mon, 16 Jul 2018 16:58:03 +0200 Subject: [PATCH 492/562] ByteStreamCnvSvc: Remove use of DataHandle. Using DataHandle with retrieve() is deprecated. Remove it. Former-commit-id: 14b52aa3126d1cf4e19e8d7311b6586d43c45541 --- .../src/ByteStreamAttListMetadataSvc.cxx | 4 ++-- Event/ByteStreamCnvSvc/src/ByteStreamCnvSvc.cxx | 4 ++-- .../src/ByteStreamEventStorageInputSvc.cxx | 4 ++-- .../src/ByteStreamEventStorageOutputSvc.cxx | 4 ++-- Event/ByteStreamCnvSvc/src/ByteStreamMetadataTool.cxx | 3 +-- .../src/ByteStreamNavigationProviderSvc.cxx | 9 +++++---- Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamAttListMetadataSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamAttListMetadataSvc.cxx index 9d9beb4ea21a..8408f504ed60 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamAttListMetadataSvc.cxx +++ b/Event/ByteStreamCnvSvc/src/ByteStreamAttListMetadataSvc.cxx @@ -99,7 +99,7 @@ StatusCode ByteStreamAttListMetadataSvc::serialize(const std::vector<std::string StatusCode ByteStreamAttListMetadataSvc::toBSMetadata(const std::vector<std::string>& keys) { msg() << MSG::INFO << "ByteStreamAttListMetadataSvc::toBSMetadata" << endmsg; - const DataHandle< AthenaAttributeList > attList; + const AthenaAttributeList* attList = nullptr; StoreGateSvc* inStore; StatusCode sc = service(m_inputStoreName.toString(),inStore); if (sc.isFailure()) return StatusCode::FAILURE; @@ -184,7 +184,7 @@ StatusCode ByteStreamAttListMetadataSvc::fromBSMetadata(const std::vector<std::s if (sc.isFailure()) return StatusCode::FAILURE; std::vector<std::string>::const_iterator it = keys.begin(); while (it != keys.end()) { - const DataHandle< ByteStream::FreeMetadata > metacont; + const ByteStream::FreeMetadata* metacont = nullptr; sc = inStore->retrieve( metacont, *it ); if (sc.isSuccess()) { diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamCnvSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamCnvSvc.cxx index 54002df894b4..a3abfa846834 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamCnvSvc.cxx +++ b/Event/ByteStreamCnvSvc/src/ByteStreamCnvSvc.cxx @@ -98,7 +98,7 @@ StatusCode ByteStreamCnvSvc::connectOutput(const std::string& /*t*/) { ATH_MSG_DEBUG("In connectOutput"); // Get the EventInfo obj for run/event number - const DataHandle<EventInfo> d; + const EventInfo* d = nullptr; StoreGate::instance().retrieve(d); if (d == 0) { ATH_MSG_ERROR("Cannot retrieve EventInfo"); @@ -135,7 +135,7 @@ StatusCode ByteStreamCnvSvc::commitOutput(const std::string& outputConnection, b writeFEA(); // Get the EventInfo obj for trigger info - const DataHandle<EventInfo> evt; + const EventInfo* evt = nullptr; StoreGate::instance().retrieve(evt); if (evt == 0) { ATH_MSG_ERROR("Cannot retrieve EventInfo"); diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.cxx index 4572fef10d0f..2bd4b4c4933b 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.cxx +++ b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.cxx @@ -525,10 +525,10 @@ StatusCode ByteStreamEventStorageInputSvc::generateDataHeader() if (m_sgSvc->contains<EventInfo>("ByteStreamEventInfo")) { // Temporary event header pointer for retrieval of the old one , if exists - const DataHandle<EventInfo> Ei_temp; + const EventInfo* Ei_temp = nullptr; //Ei_temp = m_sgSvc->retrieve<EventInfo>("ByteStreamEventInfo"); if (m_sgSvc->retrieve(Ei_temp,"ByteStreamEventInfo").isSuccess()) { - StatusCode sc = m_sgSvc->remove(Ei_temp.cptr()); + StatusCode sc = m_sgSvc->remove(Ei_temp); if (!sc.isSuccess()) { ATH_MSG_ERROR("Failed to remove ByteStreamEventInfo"); } diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx index 0ba85a2721a7..7a3f6e016c2d 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx +++ b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx @@ -323,8 +323,8 @@ void ByteStreamEventStorageOutputSvc::checkForUserMetadata(EventStorage::freeMet ServiceHandle<StoreGateSvc> ds("DetectorStore", name()); if (ds.retrieve().isSuccess()) { - const DataHandle<ByteStream::FreeMetadata> userfmdF; - const DataHandle<ByteStream::FreeMetadata> userfmdL; + SG::ConstIterator<ByteStream::FreeMetadata> userfmdF; + SG::ConstIterator<ByteStream::FreeMetadata> userfmdL; StatusCode sc = ds->retrieve( userfmdF, userfmdL); if (sc.isSuccess() && userfmdF != userfmdL) { ATH_MSG_DEBUG("Found ByteStreamUserMetadata in DetectorStore"); diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamMetadataTool.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamMetadataTool.cxx index 28ceb7203f41..bfc752b0aff0 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamMetadataTool.cxx +++ b/Event/ByteStreamCnvSvc/src/ByteStreamMetadataTool.cxx @@ -84,8 +84,7 @@ StatusCode ByteStreamMetadataTool::beginInputFile() } for (std::list<SG::ObjectWithVersion<ByteStreamMetadata> >::const_iterator versIter = allVersions.begin(), versEnd = allVersions.end(); versIter != versEnd; versIter++) { - const DataHandle<ByteStreamMetadata> bsmd = versIter->dataObject; - copy.push_back(new ByteStreamMetadata(*bsmd)); + copy.push_back(new ByteStreamMetadata(*versIter->dataObject)); } } if (m_pInputStore->contains<ByteStreamMetadataContainer>(*keyIter)) { diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.cxx index e3b14b4a789e..18f103be08fb 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.cxx +++ b/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.cxx @@ -141,7 +141,7 @@ StatusCode ByteStreamNavigationProviderSvc::updateAddress(StoreID::type storeId, // with TECH signature 1000 // StatusCode ByteStreamNavigationProviderSvc::readEvent() { - const DataHandle<DataHeader> dataHeader, dataHeaderLast; + SG::ConstIterator<DataHeader> dataHeader, dataHeaderLast; // Get all headers StatusCode status = eventStore()->retrieve(dataHeader, dataHeaderLast); if (!status.isSuccess()) { @@ -175,14 +175,15 @@ StatusCode ByteStreamNavigationProviderSvc::readEvent() { ATH_MSG_DEBUG("readEvent: Cannot find BS DataHeader in StoreGate"); return(StatusCode::RECOVERABLE); } else { - StatusCode status = eventStore()->retrieve(dataHeader, token->toString()); + const DataHeader* dh = nullptr; + StatusCode status = eventStore()->retrieve(dh, token->toString()); if (!status.isSuccess()) { m_rawEvent = 0; ATH_MSG_DEBUG("readEvent: Cannot retrieve BS DataHeader from StoreGate"); return(StatusCode::RECOVERABLE); } - file = dataHeader->getProcessTag(); - token = dataHeader->begin()->getToken(); + file = dh->getProcessTag(); + token = dh->begin()->getToken(); } } if (token == 0) { diff --git a/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx b/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx index 7f90e09451a4..f864a4ed24a7 100644 --- a/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx +++ b/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx @@ -729,12 +729,12 @@ StatusCode EventSelectorByteStream::buildEventAttributeList() const //bool found = m_evtStore->contains<AthenaAttributeList>(listName); //if (found) { if (m_evtStore->contains<AthenaAttributeList>(listName)) { - const DataHandle<AthenaAttributeList> oldAttrList; + const AthenaAttributeList* oldAttrList = nullptr; if (!m_evtStore->retrieve(oldAttrList, listName).isSuccess()) { ATH_MSG_ERROR("Cannot retrieve old AttributeList from StoreGate."); return(StatusCode::FAILURE); } - if (!m_evtStore->removeDataAndProxy(oldAttrList.cptr()).isSuccess()) { + if (!m_evtStore->removeDataAndProxy(oldAttrList).isSuccess()) { ATH_MSG_ERROR("Cannot remove old AttributeList from StoreGate."); return(StatusCode::FAILURE); } -- GitLab From 59312698fd1f81744782c11b629c269cc037412b Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Mon, 16 Jul 2018 16:58:29 +0200 Subject: [PATCH 493/562] AthenaServices: Remove use of DataHandle. Using DataHandle with retrieve() is deprecated. Remove it. Former-commit-id: 545139f1a84f5bbe60595f1dac89417c1a4648a4 --- .../AthenaServices/src/AthenaOutputStreamTool.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Control/AthenaServices/src/AthenaOutputStreamTool.cxx b/Control/AthenaServices/src/AthenaOutputStreamTool.cxx index bf5b2e53229e..526308c8634a 100644 --- a/Control/AthenaServices/src/AthenaOutputStreamTool.cxx +++ b/Control/AthenaServices/src/AthenaOutputStreamTool.cxx @@ -164,9 +164,9 @@ StatusCode AthenaOutputStreamTool::connectOutput(const std::string& outputName) // Remove DataHeader with same key if it exists if (m_store->contains<DataHeader>(m_dataHeaderKey)) { - const DataHandle<DataHeader> preDh; + const DataHeader* preDh = nullptr; if (m_store->retrieve(preDh, m_dataHeaderKey).isSuccess()) { - if (m_store->removeDataAndProxy(preDh.cptr()).isFailure()) { + if (m_store->removeDataAndProxy(preDh).isFailure()) { ATH_MSG_ERROR("Unable to get proxy for the DataHeader with key " << m_dataHeaderKey); return(StatusCode::FAILURE); } @@ -179,7 +179,7 @@ StatusCode AthenaOutputStreamTool::connectOutput(const std::string& outputName) m_dataHeader->setProcessTag(m_processTag); // Retrieve all existing DataHeaders from StroreGate - const DataHandle<DataHeader> dh; + const DataHeader* dh = nullptr; std::vector<std::string> dhKeys; m_store->keys<DataHeader>(dhKeys); for (std::vector<std::string>::const_iterator dhKey = dhKeys.begin(), dhKeyEnd = dhKeys.end(); @@ -205,7 +205,7 @@ StatusCode AthenaOutputStreamTool::connectOutput(const std::string& outputName) } } // Update dhTransAddr to handle fast merged files. - SG::DataProxy* dhProxy = m_store->proxy(dh.operator->()); + SG::DataProxy* dhProxy = m_store->proxy(dh); if (dhProxy != 0 && dhProxy->address() != 0) { delete dhTransAddr; dhTransAddr = 0; m_dataHeader->insertProvenance(DataHeaderElement(dhProxy, @@ -230,7 +230,7 @@ StatusCode AthenaOutputStreamTool::connectOutput(const std::string& outputName) attrListKey = outputConnectionString.substr(pos + 18, outputConnectionString.find("]", pos + 18) - pos - 18); } if (!attrListKey.empty()) { - const DataHandle<AthenaAttributeList> attrList; + const AthenaAttributeList* attrList = nullptr; if (m_store->retrieve(attrList, attrListKey).isFailure()) { ATH_MSG_WARNING("Unable to retrieve AttributeList with key " << attrListKey); } else { @@ -424,7 +424,8 @@ StatusCode AthenaOutputStreamTool::fillObjectRefs(const DataObjectVec& dataObjec //__________________________________________________________________________ StatusCode AthenaOutputStreamTool::getInputItemList(SG::IFolder* p2BWrittenFromTool) { const std::string hltKey = "HLTAutoKey"; - const DataHandle<DataHeader> beg, ending; + SG::ConstIterator<DataHeader> beg; + SG::ConstIterator<DataHeader> ending; if (m_store->retrieve(beg, ending).isFailure() || beg == ending) { ATH_MSG_DEBUG("No DataHeaders present in StoreGate"); } else { -- GitLab From 7ec296a8a9026d3c4926fcd1af1a084beb3619b9 Mon Sep 17 00:00:00 2001 From: Benjamin Michael Wynne <b.m.wynne@ed.ac.uk> Date: Tue, 17 Jul 2018 06:14:49 +0000 Subject: [PATCH 494/562] Remapping typeless element links in decisions Former-commit-id: 746ac6cb38aa48b72e768ab73fb410849e3630af --- .../TrigOutputHandling/src/HLTEDMCreator.cxx | 87 ++++++++++++++++++- .../TrigOutputHandling/src/HLTEDMCreator.h | 2 +- .../TrigUpgradeTest/share/checkESD.py | 6 +- .../TrigUpgradeTest/share/egamma.withViews.py | 12 ++- 4 files changed, 94 insertions(+), 13 deletions(-) diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx index b0c90cbb5045..182baa214e3b 100644 --- a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx +++ b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx @@ -87,7 +87,7 @@ struct xAODGenerator { template<typename T> StatusCode HLTEDMCreator::noMerge( ViewContainer const&, const SG::ReadHandleKey<T>&, - EventContext const&, T & ) const { + EventContext const&, T & ) const { // if we are called it means views merging is requested but Type T does not support it (i.e. missing copy c'tor) return StatusCode::FAILURE; @@ -103,13 +103,91 @@ StatusCode HLTEDMCreator::viewsMerge( ViewContainer const& views, const SG::Rea ViewHelper::ViewMerger merger( sg, msg() ); merger.mergeViewCollection<type_in_container>( views, inViewKey, context, output ); - return StatusCode::SUCCESS; + return StatusCode::SUCCESS; } + +StatusCode HLTEDMCreator::fixLinks( const ConstHandlesGroup< xAOD::TrigCompositeContainer >& handles ) const { + + // Make a list of the collections we're going to mess with + std::set< std::string > remappedCollections; + for ( auto writeHandleKey : handles.out ) { + + remappedCollections.insert( writeHandleKey.key() ); + } + + // Do the remapping + for ( auto writeHandleKey : handles.out ) { + + SG::ReadHandle<xAOD::TrigCompositeContainer> readHandle( writeHandleKey.key() ); + + if ( readHandle.isValid() ) { + + // Create a container for the remapped TCs + xAODGenerator<xAOD::TrigCompositeContainer, xAOD::TrigCompositeAuxContainer> output; + output.create(); + + // Examine each input TC + for ( auto inputDecision : *( readHandle.cptr() ) ) { + + // Clone the TC (xAOD-style copy) + xAOD::TrigComposite * outputDecision = new xAOD::TrigComposite(); + output.data->push_back( outputDecision ); + *outputDecision = *inputDecision; + + // Retrieve the link information for remapping + SG::AuxElement::Accessor< std::vector< uint32_t > > keyAccessor( "linkColKeys" ); + SG::AuxElement::Accessor< std::vector< uint16_t > > offsetAccessor( "linkColIndices" ); + std::vector< uint32_t > remappedKeys = keyAccessor( *outputDecision ); + std::vector< uint16_t > remappedOffsets = offsetAccessor( *outputDecision ); + + // Search the linked collections for remapping + unsigned int const collectionTotal = inputDecision->linkColNames().size(); + for ( unsigned int collectionIndex = 0; collectionIndex < collectionTotal; ++collectionIndex ) { + + // Load identifiers + std::string const collectionName = inputDecision->linkColNames()[ collectionIndex ]; + uint32_t const collectionKey = inputDecision->linkColKeys()[ collectionIndex ]; + std::string const keyString = *( evtStore()->keyToString( collectionKey ) ); + uint32_t const collectionClid = inputDecision->linkColClids()[ collectionIndex ]; + uint16_t const collectionOffset = inputDecision->linkColIndices()[ collectionIndex ]; + + // Check for remapping in a merge + uint32_t newKey = 0; + size_t newOffset = 0; + bool isRemapped = evtStore()->tryELRemap( collectionKey, collectionOffset, newKey, newOffset); + if ( isRemapped ) { + + ATH_MSG_DEBUG( "Remap link from " << *( evtStore()->keyToString( collectionKey ) ) << " to " << *( evtStore()->keyToString( newKey ) ) ); + remappedKeys[ collectionIndex ] = newKey; + remappedOffsets[ collectionIndex ] = newOffset; + } + + // If the link is to a collection modified in this method, will also need to be remapped + // WARNING: untested + if ( remappedCollections.find( keyString ) != remappedCollections.end() ) { + + ATH_MSG_DEBUG( "Remap link to collection: " << keyString << " -> " << keyString << "_remap" ); + remappedKeys[ collectionIndex ] = evtStore()->stringToKey( keyString + "_remap", collectionClid ); + } + } + + // Save the remaps + keyAccessor( *outputDecision ) = remappedKeys; + offsetAccessor( *outputDecision ) = remappedOffsets; + } + // Store the remapped TCs + SG::WriteHandle<xAOD::TrigCompositeContainer> writeHandle( writeHandleKey.key() + "_remap" ); + output.record( writeHandle ); + } + } + + return StatusCode::SUCCESS; +} template<typename T, typename G, typename M> -StatusCode HLTEDMCreator::createIfMissing( const EventContext& context, const ConstHandlesGroup<T>& handles, G& generator, M merger) const { +StatusCode HLTEDMCreator::createIfMissing( const EventContext& context, const ConstHandlesGroup<T>& handles, G& generator, M merger ) const { for ( auto writeHandleKey : handles.out ) { SG::ReadHandle<T> readHandle( writeHandleKey.key() ); @@ -175,6 +253,9 @@ StatusCode HLTEDMCreator::createOutput(const EventContext& context) const { CREATE_XAOD( TrigCaloClusterContainer, TrigCaloClusterAuxContainer ) CREATE_XAOD( TrackParticleContainer, TrackParticleAuxContainer ) + // After view collections are merged, need to update collection links + CHECK( fixLinks( ConstHandlesGroup<xAOD::TrigCompositeContainer>( m_TrigCompositeContainer, m_TrigCompositeContainerInViews, m_TrigCompositeContainerViews ) ) ); + #undef CREATE_XAOD #undef CREATE_XAOD_NO_MERGE return StatusCode::SUCCESS; diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.h b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.h index 81989eea315b..b925cbeed651 100644 --- a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.h +++ b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.h @@ -123,7 +123,7 @@ class HLTEDMCreator: public extends<AthAlgTool, IHLTOutputTool> { const SG::ReadHandleKeyArray< ViewContainer >& views; }; - + StatusCode fixLinks( const ConstHandlesGroup< xAOD::TrigCompositeContainer >& handles ) const; template<typename T, typename G, typename M > StatusCode createIfMissing( const EventContext& context, const ConstHandlesGroup<T>& handles, diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/checkESD.py b/Trigger/TrigValidation/TrigUpgradeTest/share/checkESD.py index 1d55a43d5069..edba516eedf2 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/checkESD.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/checkESD.py @@ -13,8 +13,10 @@ checker.doDumpTrigCompsiteNavigation = True checker.doDumpStoreGate = True # this list was obtained by: checkxAOD.py myESD.pool.root | grep Composite | tr -s " "| cut -d" " -f10 | awk '{print "\""$1"\""}' | tr "\n" "," > f # Note that now there is also a flag to look at all of them at runtime. We may want to move to this in the future. -checker.dumpTrigCompositeContainers = [ "FilteredEMRoIDecisions", "L2CaloLinks", "L2ElectronLinks", "EgammaCaloDecisions", "FilteredEgammaCaloDecisions", "filterCaloRoIsAlg", "ElectronL2Decisions", "MuonL2Decisions", "METRoIDecisions", "MURoIDecisions", "HLTChainsResult", -"JRoIDecisions", "MonitoringSummaryStep1", "RerunEMRoIDecisions", "RerunMURoIDecisions", "TAURoIDecisions", "EMRoIDecisions" ] +tcContainers = [ "FilteredEMRoIDecisions", "L2CaloLinks", "L2ElectronLinks", "EgammaCaloDecisions", "FilteredEgammaCaloDecisions", "filterCaloRoIsAlg", "ElectronL2Decisions", "MuonL2Decisions", "METRoIDecisions", "MURoIDecisions", "HLTChainsResult", "JRoIDecisions", "MonitoringSummaryStep1", "RerunEMRoIDecisions", "RerunMURoIDecisions", "TAURoIDecisions", "EMRoIDecisions" ] + +for container in tcContainers: + checker.dumpTrigCompositeContainers += [ container + "_remap" ] from AthenaCommon.AppMgr import topSequence topSequence += checker diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py index 04d2da725c2a..f5627867c56b 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py @@ -212,12 +212,10 @@ step0r = parOR("step0r", [ egammaCaloStepRR ]) summary = TriggerSummaryAlg( "TriggerSummaryAlg" ) summary.InputDecision = "HLTChains" summary.FinalDecisions = [ "ElectronL2Decisions", "MuonL2Decisions" ] -from TrigOutputHandling.TrigOutputHandlingConf import HLTEDMCreator -edmCreator = HLTEDMCreator() -edmCreator.TrigCompositeContainer = [ "L2ElectronLinks", "filterCaloRoIsAlg", "EgammaCaloDecisions","ElectronL2Decisions", "MuonL2Decisions", "EMRoIDecisions", "METRoIDecisions", "MURoIDecisions", "HLTChainsResult", -"JRoIDecisions", "MonitoringSummaryStep1", "RerunEMRoIDecisions", "RerunMURoIDecisions", "TAURoIDecisions", "L2CaloLinks", "FilteredEMRoIDecisions", "FilteredEgammaCaloDecisions" ] +from TrigOutputHandling.TrigOutputHandlingConf import HLTEDMCreator egammaViewsMerger = HLTEDMCreator("egammaViewsMerger") +egammaViewsMerger.TrigCompositeContainer = [ "L2ElectronLinks", "filterCaloRoIsAlg", "EgammaCaloDecisions","ElectronL2Decisions", "MuonL2Decisions", "EMRoIDecisions", "METRoIDecisions", "MURoIDecisions", "HLTChainsResult", "JRoIDecisions", "MonitoringSummaryStep1", "RerunEMRoIDecisions", "RerunMURoIDecisions", "TAURoIDecisions", "L2CaloLinks", "FilteredEMRoIDecisions", "FilteredEgammaCaloDecisions" ] egammaViewsMerger.TrackParticleContainerViews = [ l2ElectronViewsMaker.Views ] egammaViewsMerger.TrackParticleContainerInViews = [ TrackParticlesName ] @@ -236,7 +234,7 @@ egammaViewsMerger.OutputLevel = VERBOSE svcMgr.StoreGateSvc.OutputLevel = VERBOSE -summary.OutputTools = [ edmCreator, egammaViewsMerger ] +summary.OutputTools = [ egammaViewsMerger ] summary.OutputLevel = DEBUG @@ -266,8 +264,8 @@ topSequence.remove( StreamESD ) def addTC(name): StreamESD.ItemList += [ "xAOD::TrigCompositeContainer#"+name, "xAOD::TrigCompositeAuxContainer#"+name+"Aux." ] -for tc in edmCreator.TrigCompositeContainer: - addTC( tc ) +for tc in egammaViewsMerger.TrigCompositeContainer: + addTC( tc + "_remap" ) addTC("HLTSummary") -- GitLab From cb3639fc5400efc32ce776b284e15562bebc87f9 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Tue, 17 Jul 2018 11:11:02 +0200 Subject: [PATCH 495/562] Fix coverity 114724 by initialising members in SiTrigSPSeededTrackFinder.h Former-commit-id: 07b27c0740974e56fa07dd9de7bf584102ceef62 --- .../SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder.h b/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder.h index 0015ac612406..184ee858f105 100755 --- a/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder.h +++ b/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder.h @@ -95,15 +95,15 @@ namespace InDet { int m_nZvtx; // Number z vertices int m_nDetElPixel; //Number of pixel det elements int m_nDetElSCT; //Number of SCT det elements - int m_nBadSeeds; // number of bad seeds found - int m_nGoodSeeds; // number of good seeds found + int m_nBadSeeds{}; // number of bad seeds found + int m_nGoodSeeds{}; // number of good seeds found int m_nfreeCut; // Min number free clusters double m_AvtimeGoodSeeds; //average processing time for good seeds double m_AvtimeBadSeeds; //average processing time for bad seeds double m_timeGoodSeeds; //processing time for good seeds double m_timeBadSeeds; //processing time for bad seeds - double m_timeGoodSeedsTotal; //processing time for good seeds - double m_timeBadSeedsTotal; //processing time for bad seeds + double m_timeGoodSeedsTotal{}; //processing time for good seeds + double m_timeBadSeedsTotal{}; //processing time for bad seeds double m_RoIEta; double m_RoIPhi; -- GitLab From 599cafbb4627c1c79f65e21c140db3cbea010483 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Tue, 17 Jul 2018 11:54:19 +0200 Subject: [PATCH 496/562] Rationalise includes and fix coverity 114732 by initialising pointer members in SiTrigSpacePointFinder.h Former-commit-id: 168220d2482873fe8f78f2487821b8b87ec62f1e --- .../SiTrigSpacePointFinder.h | 14 +++++++------- .../src/SiTrigSpacePointFinder.cxx | 4 ++++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/SiTrigSpacePointFormation/SiTrigSpacePointFinder.h b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/SiTrigSpacePointFormation/SiTrigSpacePointFinder.h index 1e9b3c03dba3..57d5e429eba5 100755 --- a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/SiTrigSpacePointFormation/SiTrigSpacePointFinder.h +++ b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/SiTrigSpacePointFormation/SiTrigSpacePointFinder.h @@ -29,19 +29,19 @@ //!< INCLUDES #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" -#include <string> -#include "Identifier/IdentifierHash.h" -#include "InDetPrepRawData/SiClusterContainer.h" +#include "Identifier/IdentifierHash.h" +// typedef, cannot fwd declare #include "InDetPrepRawData/PixelClusterContainer.h" #include "InDetPrepRawData/SCT_ClusterContainer.h" -#include "InDetPrepRawData/PixelClusterCollection.h" -#include "InDetPrepRawData/SCT_ClusterCollection.h" //!< Trigger includes #include "TrigInterfaces/FexAlgo.h" +#include <string> +#include <vector> + //forward decl class SpacePointCollection; @@ -90,8 +90,8 @@ namespace InDet{ // const PixelID* m_idHelperPixel; IdentifierHash m_maxKey; - const SCT_ClusterContainer *m_sctClusterContainer; - const PixelClusterContainer *m_pixelClusterContainer; + const SCT_ClusterContainer *m_sctClusterContainer{}; + const PixelClusterContainer *m_pixelClusterContainer{}; SpacePointContainer* m_SpacePointContainerSCT; SpacePointContainer* m_SpacePointContainerPixel; diff --git a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SiTrigSpacePointFinder.cxx b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SiTrigSpacePointFinder.cxx index edec62dcf902..5365644b9f0a 100755 --- a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SiTrigSpacePointFinder.cxx +++ b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SiTrigSpacePointFinder.cxx @@ -11,6 +11,10 @@ ATLAS Collaboration #include "SiTrigSpacePointFormation/SiTrigSpacePointFinder.h" #include "SiSpacePointFormation/SiTrackerSpacePointFinder.h" #include "SiSpacePointTool/SiSpacePointMakerTool.h" +// + +#include "InDetPrepRawData/PixelClusterCollection.h" +#include "InDetPrepRawData/SCT_ClusterCollection.h" #include "GaudiKernel/ITHistSvc.h" -- GitLab From cc275409abff7ea76577fd7af3d7343916c84106 Mon Sep 17 00:00:00 2001 From: Attila Krasznahorkay <attila.krasznahorkay@cern.ch> Date: Tue, 17 Jul 2018 13:32:51 +0200 Subject: [PATCH 497/562] Fixed the build of the tool with GCC 7. At the same time fixed the logic of calling setSampleType() from getSampleType() and getSampleName(). Former-commit-id: 31a9265afb432615a2d5f855b84a9d27e730a492 --- .../HFORTools/Root/HFORSelectionTool.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/HFORTools/Root/HFORSelectionTool.cxx b/PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/HFORTools/Root/HFORSelectionTool.cxx index 3d8ad08c523b..b583f6e93db2 100644 --- a/PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/HFORTools/Root/HFORSelectionTool.cxx +++ b/PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/HFORTools/Root/HFORSelectionTool.cxx @@ -84,9 +84,9 @@ StatusCode HFORSelectionTool::initialize() { m_hforTruth.readRunConfig(filename) ; ATH_MSG_INFO( BOOST_CURRENT_FUNCTION << ": Initialization done."); - return StatusCode::SUCCESS ; m_isConfigured = false ; + return StatusCode::SUCCESS ; } //============================================================================== @@ -268,7 +268,10 @@ StatusCode HFORSelectionTool::setSampleType() { // Getter to access the sample type //============================================================================== HFORType HFORSelectionTool::getSampleType() { - if (! m_isConfigured) setSampleType() ; + if (! m_isConfigured) { + ATH_CHECK( setSampleType(), noType ); + m_isConfigured = true; + } //Return an enum object with the type of the sample return m_sampleType ; } @@ -278,7 +281,10 @@ HFORType HFORSelectionTool::getSampleType() { // Getter to access the sample name //============================================================================== std::string HFORSelectionTool::getSampleName() { - if (! m_isConfigured) setSampleType() ; + if (! m_isConfigured) { + ATH_CHECK( setSampleType(), "unknown" ); + m_isConfigured = true; + } //Return a string with the type of the sample (bb, cc, c, light or unknown) return m_sampleName ; } -- GitLab From 5604f648b693f8b6b4b0d88325be799a21d1c1c4 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Tue, 17 Jul 2018 14:18:00 +0200 Subject: [PATCH 498/562] Solve coverity 114681 by initialising variables in TRT_TrigSeededTrackFinder.h Former-commit-id: 959e572a8fa36558ecebc8ea603d007d7e9260a3 --- .../TRT_TrigSeededTrackFinder.h | 55 ++++++++++--------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/InnerDetector/InDetTrigRecAlgs/TRT_TrigSeededTrackFinder/TRT_TrigSeededTrackFinder/TRT_TrigSeededTrackFinder.h b/InnerDetector/InDetTrigRecAlgs/TRT_TrigSeededTrackFinder/TRT_TrigSeededTrackFinder/TRT_TrigSeededTrackFinder.h index 2f53068d77d8..fd64dbc010c2 100755 --- a/InnerDetector/InDetTrigRecAlgs/TRT_TrigSeededTrackFinder/TRT_TrigSeededTrackFinder/TRT_TrigSeededTrackFinder.h +++ b/InnerDetector/InDetTrigRecAlgs/TRT_TrigSeededTrackFinder/TRT_TrigSeededTrackFinder/TRT_TrigSeededTrackFinder.h @@ -36,6 +36,7 @@ #include "TrigTimeAlgs/TrigTimerSvc.h" #include "TrigInterfaces/FexAlgo.h" + class IRegSelSvc; namespace InDet { @@ -78,33 +79,33 @@ namespace InDet { protected: ServiceHandle<IRegSelSvc> m_regionSelector; //!< region selector service - double m_etaHalfWidth; //!< ROI half-width in eta. - double m_phiHalfWidth; //!< ROI half-width in phi. - bool m_doFullScan; //!< FullScan mode + double m_etaHalfWidth{}; //!< ROI half-width in eta. + double m_phiHalfWidth{}; //!< ROI half-width in phi. + bool m_doFullScan{}; //!< FullScan mode - int m_nDetElPixel; //Number of pixel det elements - int m_nDetElSCT; //Number of SCT det elements - double m_RoIEta; - double m_RoIPhi; + int m_nDetElPixel{}; //Number of pixel det elements + int m_nDetElSCT{}; //Number of SCT det elements + double m_RoIEta{}; + double m_RoIPhi{}; /////////////////////////////////////////////////////////////////// // Protected data /////////////////////////////////////////////////////////////////// - int m_outputlevel ; // Print level for debug - int m_nprint ; // Kind of print - int m_ntracks ; // Number of tracks found + int m_outputlevel{} ; // Print level for debug + int m_nprint{} ; // Kind of print + int m_ntracks{} ; // Number of tracks found - bool m_doRefit ; // Do final careful refit of tracks - bool m_doExtension ; // Find the TRT extension of the Si track segment - bool m_saveTRT ; // Output stand-alone TRT segments + bool m_doRefit{} ; // Do final careful refit of tracks + bool m_doExtension{} ; // Find the TRT extension of the Si track segment + bool m_saveTRT{} ; // Output stand-alone TRT segments ToolHandle<ITRT_SeededTrackFinder> m_trackmaker ; //Track maker tool ToolHandle<Trk::ITrackFitter> m_fitterTool ; //Refitting tool ToolHandle<ITRT_TrackExtensionTool> m_trtExtension ; // TRT track extension tool - const Trk::SegmentCollection *m_Segments ; // Segments to use + const Trk::SegmentCollection *m_Segments{} ; // Segments to use ///Sets and maps to use for dropping dublicates //typedef std::set<const Trk::PrepRawData*> PrdSignature; @@ -112,20 +113,20 @@ namespace InDet { //PrdSignatureSet m_prdSigSet; ///Track quality cuts - int m_minNDF ; //Minimum number of degrees of freedom + int m_minNDF{} ; //Minimum number of degrees of freedom ///Counters - int m_nTrtSeg ; //Number of TRT segments to be investigated per event - int m_nTrtSegGood ; //Number of TRT segments that will be investigated per event - int m_nBckTrk ; //Total number of back tracks found with or without Si extension per event - int m_nBckTrkTrt ; //Number of back tracks found without a Si extension per event - int m_nBckTrkSi ; //Number of back tracks found with Si extension per event - - int m_nTrtSegTotal ; // Total number of TRT segments to be investigated - int m_nTrtSegGoodTotal ; // Total number of TRT segments that will be investigated - int m_nBckTrkTotal ; // Total number of back tracks found with or without Si extension - int m_nBckTrkTrtTotal ; // Total number of back tracks found without a Si extension - int m_nBckTrkSiTotal ; // Total number of back tracks found with Si extension + int m_nTrtSeg{} ; //Number of TRT segments to be investigated per event + int m_nTrtSegGood{} ; //Number of TRT segments that will be investigated per event + int m_nBckTrk{} ; //Total number of back tracks found with or without Si extension per event + int m_nBckTrkTrt{} ; //Number of back tracks found without a Si extension per event + int m_nBckTrkSi{} ; //Number of back tracks found with Si extension per event + + int m_nTrtSegTotal{} ; // Total number of TRT segments to be investigated + int m_nTrtSegGoodTotal{} ; // Total number of TRT segments that will be investigated + int m_nBckTrkTotal{} ; // Total number of back tracks found with or without Si extension + int m_nBckTrkTrtTotal{} ; // Total number of back tracks found without a Si extension + int m_nBckTrkSiTotal{} ; // Total number of back tracks found with Si extension /////////////////////////////////////////////////////////////////// // Protected methods @@ -141,7 +142,7 @@ namespace InDet { MsgStream& dumpevent(MsgStream& out) const; //Timing - TrigTimer *m_timerRegSel; + TrigTimer *m_timerRegSel{}; }; MsgStream& operator << (MsgStream& ,const TRT_TrigSeededTrackFinder&); -- GitLab From 4c3878c12a1555b78cde0744ed379d0fdb04e710 Mon Sep 17 00:00:00 2001 From: Petr Jacka <petr.jacka@cern.ch> Date: Tue, 17 Jul 2018 12:25:25 +0000 Subject: [PATCH 499/562] Manual sweep: 21.0-FastCaloSim-dev to master Former-commit-id: 147b7b22cb2102b99225717553d98dfa1f2738ed --- .../ISF_FastCaloSimEvent/CMakeLists.txt | 1 + .../ISF_FastCaloSimEvent/LinkDef.h | 2 + .../ISF_FastCaloSimEvent/TFCSHitCellMapping.h | 4 +- .../TFCSHitCellMappingFCal.h | 26 +++++++++++++ .../TFCSLateralShapeParametrizationHitBase.h | 38 ++++++++++++++++--- .../src/TFCSHitCellMappingFCal.cxx | 24 ++++++++++++ 6 files changed, 87 insertions(+), 8 deletions(-) create mode 100644 Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMappingFCal.h create mode 100644 Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingFCal.cxx diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/CMakeLists.txt b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/CMakeLists.txt index e06103e300fe..f80aa38c7ab4 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/CMakeLists.txt +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/CMakeLists.txt @@ -61,6 +61,7 @@ atlas_add_root_dictionary( ISF_FastCaloSimEvent _dictSource ISF_FastCaloSimEvent/TFCSHistoLateralShapeParametrization.h ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitNumberFromE.h ISF_FastCaloSimEvent/TFCSHitCellMapping.h + ISF_FastCaloSimEvent/TFCSHitCellMappingFCal.h ISF_FastCaloSimEvent/TFCSHitCellMappingWiggle.h ISF_FastCaloSimEvent/TFCSHitCellMappingWiggleEMB.h ISF_FastCaloSimEvent/TFCSExtrapolationState.h diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/LinkDef.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/LinkDef.h index 92fb2e0c0a1f..0d81d35cc1e9 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/LinkDef.h +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/LinkDef.h @@ -41,6 +41,7 @@ #include "ISF_FastCaloSimEvent/TFCSHistoLateralShapeParametrization.h" #include "ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitNumberFromE.h" #include "ISF_FastCaloSimEvent/TFCSHitCellMapping.h" +#include "ISF_FastCaloSimEvent/TFCSHitCellMappingFCal.h" #include "ISF_FastCaloSimEvent/TFCSHitCellMappingWiggle.h" #include "ISF_FastCaloSimEvent/TFCSHitCellMappingWiggleEMB.h" @@ -145,6 +146,7 @@ #pragma link C++ class TFCSHistoLateralShapeParametrization+; #pragma link C++ class TFCSLateralShapeParametrizationHitNumberFromE+; #pragma link C++ class TFCSHitCellMapping+; +#pragma link C++ class TFCSHitCellMappingFCal+; #pragma link C++ class TFCSHitCellMappingWiggle+; #pragma link C++ class TFCSHitCellMappingWiggleEMB+; diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMapping.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMapping.h index 301d8d22c738..7620f5f311e6 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMapping.h +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMapping.h @@ -21,9 +21,9 @@ public: void Print(Option_t *option) const; -private: +protected: ICaloGeometry* m_geo; //! do not persistify - +private: ClassDef(TFCSHitCellMapping,1) //TFCSHitCellMapping }; diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMappingFCal.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMappingFCal.h new file mode 100644 index 000000000000..4aee99d8e7e9 --- /dev/null +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSHitCellMappingFCal.h @@ -0,0 +1,26 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef TFCSHitCellMappingFCal_h +#define TFCSHitCellMappingFCal_h + +#include "ISF_FastCaloSimEvent/TFCSHitCellMapping.h" + +class ICaloGeometry; + +class TFCSHitCellMappingFCal:public TFCSHitCellMapping { +public: + TFCSHitCellMappingFCal(const char* name=nullptr, const char* title=nullptr, ICaloGeometry* geo=nullptr):TFCSHitCellMapping(name,title,geo){} + + virtual void simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol); + +private: + ClassDef(TFCSHitCellMappingFCal,1) //TFCSHitCellMapping +}; + +#if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__) +#pragma link C++ class TFCSHitCellMappingFCal+; +#endif + +#endif diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitBase.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitBase.h index 32c0feb5ee8d..f53cbc785e79 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitBase.h +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitBase.h @@ -19,15 +19,41 @@ public: class Hit { public: - Hit():m_eta(0),m_phi(0),m_E(0) {}; // for hits with the same energy, m_E should normalized to E(layer)/nhit - Hit(float eta, float phi, float E):m_eta(eta),m_phi(phi),m_E(E) {}; + Hit():m_eta_x(0.),m_phi_y(0.),m_z(0.),m_E(0.) {}; // for hits with the same energy, m_E should normalized to E(layer)/nhit + Hit(float eta, float phi, float E):m_eta_x(eta),m_phi_y(phi),m_E(E) {}; + Hit(float x, float y, float z, float E):m_eta_x(x),m_phi_y(y),m_z(z),m_E(E) {}; + + inline void setEtaPhiE(float eta,float phi, float E){ + m_eta_x=eta; + m_phi_y=phi; + m_E=E; + } + inline void setXYZE(float x,float y,float z, float E){ + m_eta_x=x; + m_phi_y=y; + m_z=z; + m_E=E; + } - float& eta() {return m_eta;}; - float& phi() {return m_phi;}; - float& E() {return m_E;}; + inline void reset(){ + m_eta_x=0.; + m_phi_y=0.; + m_z=0.; + m_E=0.; + } + + inline float& eta() {return m_eta_x;}; + inline float& phi() {return m_phi_y;}; + inline float& x() {return m_eta_x;}; + inline float& y() {return m_phi_y;}; + inline float& E() {return m_E;}; + inline float& z() {return m_z;} private: - float m_eta,m_phi,m_E; + float m_eta_x; // eta for barrel and end-cap, x for FCal + float m_phi_y; // phi for barrel and end-cap, y for FCal + float m_z; + float m_E; }; /// simulated one hit position with some energy. As last step in TFCSLateralShapeParametrizationHitChain::simulate, diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingFCal.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingFCal.cxx new file mode 100644 index 000000000000..7f493482b30e --- /dev/null +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingFCal.cxx @@ -0,0 +1,24 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "ISF_FastCaloSimEvent/TFCSHitCellMappingFCal.h" +#include "ISF_FastCaloSimEvent/ICaloGeometry.h" +#include "ISF_FastCaloSimEvent/TFCSSimulationState.h" + +//============================================= +//======= TFCSHitCellMappingFCal ========= +//============================================= + + +void TFCSHitCellMappingFCal::simulate_hit(Hit& hit,TFCSSimulationState& simulstate,const TFCSTruthState* /*truth*/, const TFCSExtrapolationState* /*extrapol*/) +{ + int cs=calosample(); + const CaloDetDescrElement* cellele=m_geo->getFCalDDE(cs,hit.x(),hit.y(),hit.z()); + ATH_MSG_DEBUG("HIT: cellele="<<cellele<<" E="<<hit.E()<<" cs="<<cs<<" x="<<hit.x()<<" y="<<hit.y() << " z="<<hit.z()); + if(cellele) { + simulstate.deposit(cellele,hit.E()); + } else { + ATH_MSG_ERROR("TFCSLateralShapeParametrizationHitCellMapping::simulate_hit: cellele="<<cellele<<" E="<<hit.E()<<" cs="<<cs<<" eta="<<hit.eta()<<" phi="<<hit.phi()); + } +} -- GitLab From 0c1746c0503a33d78a7ddf638d3766e9615030ed Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Tue, 17 Jul 2018 14:58:17 +0200 Subject: [PATCH 500/562] Solve coverity 114793 by initialising variables in TRT_TrigStandaloneTrackFinder.h Former-commit-id: 966f90e946a749c8b048f51938341d49fe8b78dc --- .../TRT_TrigStandaloneTrackFinder.h | 39 +++++++++---------- .../src/TRT_TrigStandaloneTrackFinder.cxx | 1 + 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/InnerDetector/InDetTrigRecAlgs/TRT_TrigStandaloneTrackFinder/TRT_TrigStandaloneTrackFinder/TRT_TrigStandaloneTrackFinder.h b/InnerDetector/InDetTrigRecAlgs/TRT_TrigStandaloneTrackFinder/TRT_TrigStandaloneTrackFinder/TRT_TrigStandaloneTrackFinder.h index 440db67b50d7..62b25426d9dd 100644 --- a/InnerDetector/InDetTrigRecAlgs/TRT_TrigStandaloneTrackFinder/TRT_TrigStandaloneTrackFinder/TRT_TrigStandaloneTrackFinder.h +++ b/InnerDetector/InDetTrigRecAlgs/TRT_TrigStandaloneTrackFinder/TRT_TrigStandaloneTrackFinder/TRT_TrigStandaloneTrackFinder.h @@ -17,7 +17,6 @@ #include "GaudiKernel/ToolHandle.h" ///Track events -#include "TrkTrack/Track.h" #include "TrkSegment/TrackSegment.h" ///Track Collection to store the tracks @@ -33,7 +32,7 @@ namespace InDet { /** @class TRT_TrigStandaloneTrackFinder - InDet::TRT_TrigStandaloneTrackFinde is an algorithm which produces tracks + InDet::TRT_TrigStandaloneTrackFinder is an algorithm which produces tracks from stand-alone TRT segments with no Si extension @author Thomas.Koffas@cern.ch */ @@ -60,7 +59,7 @@ namespace InDet { HLT::ErrorCode hltFinalize(); //parameters for monitoring - int m_nTRTTracks ; //!< Number of TRT standalone tracks + int m_nTRTTracks{} ; //!< Number of TRT standalone tracks //int m_nTrtSeg ; //!< Number of TRT segments to be investigated per event /////////////////////////////////////////////////////////////////// @@ -76,37 +75,37 @@ namespace InDet { /* Private data */ /////////////////////////////////////////////////////////////////// - int m_outputlevel ; //!< Print level for debugging - int m_nprint ; + int m_outputlevel{} ; //!< Print level for debugging + int m_nprint{} ; //int m_ntracks ; //!< Number of tracks found - int m_minNumDriftCircles ; //!< Minimum number of drift circles for TRT segment tracks + int m_minNumDriftCircles{} ; //!< Minimum number of drift circles for TRT segment tracks - bool m_resetPRD ; /** Reset PRD association tool during the sub-detector pattern */ + bool m_resetPRD{} ; /** Reset PRD association tool during the sub-detector pattern */ - int m_matEffects ; //!< Particle hypothesis for track fitting + int m_matEffects{} ; //!< Particle hypothesis for track fitting //StoreGateSvc* m_store_gate ; //!< Pointer to store gate ToolHandle< ITRT_SegmentToTrackTool > m_segToTrackTool; //!< Segment to track tool - const Trk::SegmentCollection *m_Segments ; //!< TRT segments to use + const Trk::SegmentCollection *m_Segments{} ; //!< TRT segments to use /**Tracks that will be passed out of AmbiProcessor. Recreated anew each time process() is called*/ - TrackCollection* m_finalTracks; + TrackCollection* m_finalTracks{}; /** Global Counters for final algorithm statistics */ - int m_nTrtSeg ; //!< Number of TRT segments to be investigated per event - int m_nTrtSegGood ; //!< Number of TRT segments that will be investigated per event - int m_nBckTrk ; //!< Total number of TRT segment back tracks found per event - int m_nUsedSeg ; //!< Total number of TRT segments assigned Si extensions per event - - int m_nTrtSegTotal ; //!< Total number of TRT segments to be investigated - int m_nTrtSegGoodTotal ; //!< Total number of TRT segments that will be investigated - int m_nBckTrkTotal ; //!< Total number of TRT segment back tracks found - int m_nUsedSegTotal ; //!< Total number of TRT segments assigned Si extensions - int m_ntimesInvoked ; //!< Keep track how many times the algo was invoked + int m_nTrtSeg{} ; //!< Number of TRT segments to be investigated per event + int m_nTrtSegGood {} ; //!< Number of TRT segments that will be investigated per event + int m_nBckTrk{} ; //!< Total number of TRT segment back tracks found per event + int m_nUsedSeg {} ; //!< Total number of TRT segments assigned Si extensions per event + + int m_nTrtSegTotal{} ; //!< Total number of TRT segments to be investigated + int m_nTrtSegGoodTotal{} ; //!< Total number of TRT segments that will be investigated + int m_nBckTrkTotal{} ; //!< Total number of TRT segment back tracks found + int m_nUsedSegTotal{} ; //!< Total number of TRT segments assigned Si extensions + int m_ntimesInvoked{} ; //!< Keep track how many times the algo was invoked /////////////////////////////////////////////////////////////////// /** Protected methods */ diff --git a/InnerDetector/InDetTrigRecAlgs/TRT_TrigStandaloneTrackFinder/src/TRT_TrigStandaloneTrackFinder.cxx b/InnerDetector/InDetTrigRecAlgs/TRT_TrigStandaloneTrackFinder/src/TRT_TrigStandaloneTrackFinder.cxx index 8ceb344c25af..57977eead4d9 100644 --- a/InnerDetector/InDetTrigRecAlgs/TRT_TrigStandaloneTrackFinder/src/TRT_TrigStandaloneTrackFinder.cxx +++ b/InnerDetector/InDetTrigRecAlgs/TRT_TrigStandaloneTrackFinder/src/TRT_TrigStandaloneTrackFinder.cxx @@ -17,6 +17,7 @@ #include "InDetRIO_OnTrack/TRT_DriftCircleOnTrack.h" #include "TrkEventPrimitives/FitQuality.h" #include "InDetIdentifier/TRT_ID.h" +#include "TrkTrack/Track.h" #include "TrkTrack/TrackInfo.h" //Eigen -- GitLab From 5edb1a6c6e3b153aa2f7b3dec60dabe8e4a993a4 Mon Sep 17 00:00:00 2001 From: Susumu Oda <Susumu.Oda@cern.ch> Date: Tue, 17 Jul 2018 15:01:33 +0200 Subject: [PATCH 501/562] Remove unnecessary include and forward declaration Former-commit-id: 34b78dc081dc71245ff0da5bdfa6483eae2dda54 --- .../ISCT_ModuleDistortionsTool.h | 2 -- .../src/SCT_DistortionsTool.cxx | 10 ++------ .../src/SCT_DistortionsTool.h | 4 +--- .../src/SCT_TestDistortionsTool.cxx | 22 ++++++++++-------- .../src/SCT_TestDistortionsTool.h | 23 ++++--------------- 5 files changed, 21 insertions(+), 40 deletions(-) diff --git a/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/SCT_ModuleDistortions/ISCT_ModuleDistortionsTool.h b/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/SCT_ModuleDistortions/ISCT_ModuleDistortionsTool.h index cabd5672a955..207f605456ff 100644 --- a/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/SCT_ModuleDistortions/ISCT_ModuleDistortionsTool.h +++ b/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/SCT_ModuleDistortions/ISCT_ModuleDistortionsTool.h @@ -7,12 +7,10 @@ #include "GaudiKernel/IAlgTool.h" -#include "TrkEventPrimitives/LocalParameters.h" #include "GeoPrimitives/GeoPrimitives.h" #include "TrkParameters/TrackParameters.h" #include "Identifier/IdentifierHash.h" #include "AthenaKernel/IOVSvcDefs.h" -#include "InDetReadoutGeometry/SiDetectorElement.h" namespace Trk { class LocalParameters; } namespace InDetDD { class SiDetectorElement; } diff --git a/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/src/SCT_DistortionsTool.cxx b/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/src/SCT_DistortionsTool.cxx index b144c6ee8152..ef471a0cd778 100644 --- a/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/src/SCT_DistortionsTool.cxx +++ b/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/src/SCT_DistortionsTool.cxx @@ -5,15 +5,9 @@ #include "SCT_DistortionsTool.h" #include "InDetIdentifier/SCT_ID.h" -#include "InDetReadoutGeometry/SCT_DetectorManager.h" - -#include "CLHEP/Units/SystemOfUnits.h" +#include "InDetReadoutGeometry/SiDetectorElement.h" #include "PathResolver/PathResolver.h" - -//#include "CLHEP/Geometry/Vector3D.h" -//#include "CLHEP/Geometry/Point3D.h" -#include "CLHEP/Random/RandGauss.h" -#include "AthenaKernel/IAtRndmGenSvc.h" +#include "TrkEventPrimitives/LocalParameters.h" #include <cmath> #include <string> diff --git a/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/src/SCT_DistortionsTool.h b/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/src/SCT_DistortionsTool.h index 787ef2b61cbf..4817b5b5959a 100644 --- a/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/src/SCT_DistortionsTool.h +++ b/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/src/SCT_DistortionsTool.h @@ -6,12 +6,10 @@ #define SCT_DistortionsTool_H #include "SCT_ModuleDistortions/ISCT_ModuleDistortionsTool.h" -//#include "CLHEP/Geometry/Vector3D.h" -//#include "CLHEP/Geometry/Point3D.h" +#include "AthenaBaseComps/AthAlgTool.h" #include <string> #include <map> -#include "AthenaBaseComps/AthAlgTool.h" class SCT_ID; diff --git a/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/src/SCT_TestDistortionsTool.cxx b/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/src/SCT_TestDistortionsTool.cxx index 7c1dee3f42bf..43cda487df9d 100644 --- a/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/src/SCT_TestDistortionsTool.cxx +++ b/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/src/SCT_TestDistortionsTool.cxx @@ -4,29 +4,33 @@ // Test SCT_DistortionsTool.cxx -//Gaudi +//Package +#include "SCT_TestDistortionsTool.h" //Athena #include "InDetIdentifier/SCT_ID.h" -#include "InDetReadoutGeometry/SCT_DetectorManager.h" - -//Package -#include "SCT_TestDistortionsTool.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "AthenaKernel/IAtRndmGenSvc.h" #include "PathResolver/PathResolver.h" +//Gaudi +#include "GaudiKernel/ITHistSvc.h" + +//CLHEP #include "CLHEP/Geometry/Vector3D.h" #include "CLHEP/Geometry/Point3D.h" #include "CLHEP/Random/RandGauss.h" -#include "AthenaKernel/IAtRndmGenSvc.h" +#include "CLHEP/Units/SystemOfUnits.h" +//ROOT +#include "TH2F.h" +#include "TH3F.h" + +//STL #include <cmath> #include <string> #include <fstream> #include <sstream> -#include "TH2F.h" - SCT_TestDistortionsTool::SCT_TestDistortionsTool(const std::string& name, ISvcLocator* pSvcLocator): diff --git a/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/src/SCT_TestDistortionsTool.h b/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/src/SCT_TestDistortionsTool.h index 3d459d84d9c2..7829fb738396 100644 --- a/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/src/SCT_TestDistortionsTool.h +++ b/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/src/SCT_TestDistortionsTool.h @@ -5,31 +5,20 @@ #ifndef SCT_TestDistortionsTool_h #define SCT_TestDistortionsTool_h -#include <string> -#include <memory> #include "AthenaBaseComps/AthAlgorithm.h" -#include "AthenaBaseComps/AthAlgTool.h" -#include "TH2F.h" -#include "TH3F.h" -#include "StoreGate/StoreGateSvc.h" -#include "GaudiKernel/ITHistSvc.h" - +//package includes +#include "SCT_ModuleDistortions/ISCT_ModuleDistortionsTool.h" //Gaudi #include "GaudiKernel/ToolHandle.h" -//package includes -#include "SCT_ModuleDistortions/ISCT_ModuleDistortionsTool.h" +//STL +#include <string> +#include <memory> -class ITHistSvc; -class TH2I; class TH2F; class TH3F; -namespace InDetDD -{ - class SiDetectorManager; -} class SCT_TestDistortionsTool:public AthAlgorithm{ public: @@ -54,5 +43,3 @@ class SCT_TestDistortionsTool:public AthAlgorithm{ }; #endif - - -- GitLab From 2d6645c1cf05c274e508a42336430ce54bcc6599 Mon Sep 17 00:00:00 2001 From: Tamara Vazquez Schroeder <tamara.vazquez.schroeder@cern.ch> Date: Wed, 11 Jul 2018 15:46:42 +0000 Subject: [PATCH 502/562] Merge branch 'ftk_aod_update' into '21.0' Update FTK AOD creation for data BS files See merge request atlas/athena!12397 (cherry picked from commit acd8595d9b242191dd6af486706cc45bf53f1af2 [formerly 1f537af0cc59d9cb0e4f4da059d962a96b0f5003]) 37c26018 Update for BS to AOD creation Former-commit-id: 19d66385fa7d089956db2f7d4f02254fdb496e03 --- Control/AthenaKernel/share/ClassName_test.ref | 0 Event/EventContainers/test/ID_ContainerTest.h | 0 .../TrigFTK/TrigFTKSim/share/skeleton.AOD_FTK_Creator.py | 6 +++++- 3 files changed, 5 insertions(+), 1 deletion(-) mode change 100644 => 100755 Control/AthenaKernel/share/ClassName_test.ref mode change 100755 => 100644 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Control/AthenaKernel/share/ClassName_test.ref b/Control/AthenaKernel/share/ClassName_test.ref old mode 100644 new mode 100755 diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100755 new mode 100644 diff --git a/Trigger/TrigFTK/TrigFTKSim/share/skeleton.AOD_FTK_Creator.py b/Trigger/TrigFTK/TrigFTKSim/share/skeleton.AOD_FTK_Creator.py index f295b0dd522d..2b38375bd451 100755 --- a/Trigger/TrigFTK/TrigFTKSim/share/skeleton.AOD_FTK_Creator.py +++ b/Trigger/TrigFTK/TrigFTKSim/share/skeleton.AOD_FTK_Creator.py @@ -20,7 +20,11 @@ if hasattr(runArgs,"preInclude"): from AthenaCommon.AthenaCommonFlags import athenaCommonFlags -athenaCommonFlags.FilesInput = runArgs.inputRDO_FTKFile +if hasattr(runArgs,"inputRDO_FTKFile"): + athenaCommonFlags.FilesInput = runArgs.inputRDO_FTKFile + +elif hasattr(runArgs,"inputBS_FTKFile"): + athenaCommonFlags.FilesInput = runArgs.inputBS_FTKFile if hasattr(runArgs,"maxEvents"): ftkLog.info("Setting number of events: %d" % runArgs.maxEvents) -- GitLab From 9abe894f8f182b49fac78c208552b627f16101bd Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <frank.winklmeier@cern.ch> Date: Tue, 17 Jul 2018 17:58:16 +0200 Subject: [PATCH 503/562] TestTools/post.sh: Allow to select lines for diff Extend the post.sh script with a "-s PATTERN" option to be able to select (instead of exclude) lines for the diff. From a CMakeList.txt file this would be used as follows: atlas_add_test( MyTest SCRIPT test/mytest.sh EXTRA_PATTERNS "-s MYPATTERN" ) Former-commit-id: 1ba312505084120d0a968ea2bfce71d24b15e542 --- AtlasTest/TestTools/share/post.sh | 54 ++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 11 deletions(-) diff --git a/AtlasTest/TestTools/share/post.sh b/AtlasTest/TestTools/share/post.sh index 04290bea01f3..880a44c976fd 100755 --- a/AtlasTest/TestTools/share/post.sh +++ b/AtlasTest/TestTools/share/post.sh @@ -1,4 +1,7 @@ #!/bin/sh +# +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# #/** @file post.sh # @brief sh script that check the return code of an executable and compares # its output with a reference (if available). @@ -6,10 +9,33 @@ # # @author Scott Snyder <snyder@fnal.gov> - ATLAS Collaboration. # @author Paolo Calafiura <pcalafiura@lbl.gov> - ATLAS Collaboration. -# $Id: post.sh,v 1.23 2007-11-10 00:00:07 calaf Exp $ # **/ + +usage() { + cat <<EOF +Syntax: post.sh TESTNAME [EXTRAPATTERNS] [-s PATTERNS] + TESTNAME name of unit test + EXTRAPATTERNS additional regex patterns to exlude in diff + -s use PATTERNS to select lines for diff +EOF +} + +if [ "$#" -lt 1 ]; then + usage + exit 1 +fi + test=$1 -extrapatterns="$2" + +# When used from cmake $2 and $3 will arrive as a single quoted argument, i.e. $2. +# Concatenate them here so the same code works also from the command line. +pat="$2 $3" +if [[ "$pat" = "-s "* ]]; then + selectpatterns=`echo "$pat" | sed 's/-s\s*//'` +else + extrapatterns="$pat" +fi + #verbose="1" if [ "$POST_SH_NOCOLOR" = "" ]; then GREEN="[92;1m" @@ -223,16 +249,22 @@ else fi fi - if [ -r $reflog ] - then - jobrep=${joblog}-rep - sed -r "$II" $joblog > $jobrep - refrep=`basename ${reflog}`-rep - sed -r "$II" $reflog > $refrep + if [ -r $reflog ]; then + jobrep=${joblog}-rep + sed -r "$II" $joblog > $jobrep + refrep=`basename ${reflog}`-rep + sed -r "$II" $reflog > $refrep jobdiff=${joblog}-todiff refdiff=`basename ${reflog}`-todiff - egrep -a -v "$PP" < $jobrep > $jobdiff - egrep -a -v "$PP" < $refrep > $refdiff + + # We either exclude or select lines for the diff + if [ -z "$selectpatterns" ]; then + egrep -a -v "$PP" < $jobrep > $jobdiff + egrep -a -v "$PP" < $refrep > $refdiff + else + egrep -a "$selectpatterns" < $jobrep > $jobdiff + egrep -a "$selectpatterns" < $refrep > $refdiff + fi diff -a -b -E -B -u $jobdiff $refdiff diffStatus=$? if [ $diffStatus != 0 ] ; then @@ -241,7 +273,7 @@ else exit 1 else if [ "$verbose" != "" ]; then - echo "$GREEN post.sh> OK: $joblog and $reflog identical $RESET" + echo "$GREEN post.sh> OK: $joblog and $reflog identical $RESET" fi fi else -- GitLab From d09bbb19f97c07bad540b81aa9c910805822333e Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Tue, 17 Jul 2018 16:55:39 +0200 Subject: [PATCH 504/562] CaloRec: Make tool private. Make LArHVScaleRetriever a private tool of CaloClusterMomentsMaker, rather than public. Former-commit-id: f5855719b673642d725fb50f4c5858ffff2ffd22 --- Calorimeter/CaloRec/src/CaloClusterMomentsMaker.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Calorimeter/CaloRec/src/CaloClusterMomentsMaker.cxx b/Calorimeter/CaloRec/src/CaloClusterMomentsMaker.cxx index bd88b890e4dd..2d4eedba9b6f 100644 --- a/Calorimeter/CaloRec/src/CaloClusterMomentsMaker.cxx +++ b/Calorimeter/CaloRec/src/CaloClusterMomentsMaker.cxx @@ -133,7 +133,7 @@ CaloClusterMomentsMaker::CaloClusterMomentsMaker(const std::string& type, m_twoGaussianNoise(false), m_caloDepthTool("CaloDepthTool",this), m_noiseTool("CaloNoiseTool"), - m_larHVScaleRetriever("LArHVScaleRetriever"), + m_larHVScaleRetriever("LArHVScaleRetriever", this), m_absOpt(false) { declareInterface<CaloClusterCollectionProcessor> (this); -- GitLab From b3ad815c64036fb5143cb3d6e42b3b8e553cbdb7 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Tue, 17 Jul 2018 16:59:39 +0200 Subject: [PATCH 505/562] AthenaCommon: Reorganize streams to fix event filtering. Event filtering was broken because the contents of athFilterSeq were being unrolled into athMasterSeq, which in turn had StopOverride set in order to ensure that registration always gets run. Remove the unrolling, and move athRegStreams to athMasterSeq. Former-commit-id: ac0fe07faf33cf5f8acc34b93592feb798405a0d --- Control/AthenaCommon/python/AppMgr.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Control/AthenaCommon/python/AppMgr.py b/Control/AthenaCommon/python/AppMgr.py index 55bcdb2f0034..35389b0641f9 100755 --- a/Control/AthenaCommon/python/AppMgr.py +++ b/Control/AthenaCommon/python/AppMgr.py @@ -299,10 +299,7 @@ class AthAppMgr( AppMgr ): ipa2=IPA("IncidentProcAlg2") athEndSeq += ipa2 - # unroll AthFilterSeq to save some function calls and - # stack size on the C++ side - for c in athFilterSeq.getChildren(): - athMasterSeq += c + athMasterSeq += athFilterSeq # XXX: should we discard empty sequences ? # might save some CPU and memory... @@ -324,8 +321,8 @@ class AthAppMgr( AppMgr ): athAlgEvtSeq += athAllAlgSeq athAlgEvtSeq += athEndSeq - athMasterSeq += athAlgEvtSeq - athMasterSeq += athOutSeq + athFilterSeq += athAlgEvtSeq + athFilterSeq += athOutSeq athMasterSeq += athRegSeq Logging.log.debug ("building master sequence... [done]") @@ -975,8 +972,8 @@ def AuditorSvc(): # backwards compatibility # +--- athEndSeq # | # +--- athOutSeq -# | -# +--- athRegStreams +# | +# +--- athRegStreams athMasterSeq = AlgSequence.AthSequencer( "AthMasterSeq" ) athFilterSeq = AlgSequence.AthSequencer( "AthFilterSeq" ) athCondSeq = AlgSequence.AthSequencer( "AthCondSeq" ) -- GitLab From 56217c44806bffb55d3e67fe286e33f0823fa0d2 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Tue, 17 Jul 2018 16:59:53 +0200 Subject: [PATCH 506/562] AthenaServices: Update reference file for sequence changes in AthenaCommon. Former-commit-id: 1efd696de22274ab28b2337e579e265510f556d8 --- Control/AthenaServices/share/AthTPCnvSvc.ref | 28 +++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/Control/AthenaServices/share/AthTPCnvSvc.ref b/Control/AthenaServices/share/AthTPCnvSvc.ref index 85d15a0adbbd..63c7a904d296 100644 --- a/Control/AthenaServices/share/AthTPCnvSvc.ref +++ b/Control/AthenaServices/share/AthTPCnvSvc.ref @@ -1,18 +1,20 @@ -Fri Mar 17 17:22:56 CET 2017 -Preloading tcmalloc_minimal.so +Sun Jul 8 10:45:18 EDT 2018 +WARNING: TCMALLOCDIR not defined, will use libc malloc Py:Athena INFO including file "AthenaCommon/Preparation.py" -Py:Athena INFO using release [AthenaWorkDir-22.0.0] [x86_64-slc6-gcc49-opt] [private/private] -- built on [2017-03-17 17:16] +Py:Athena INFO using release [?-21.0.0] [i686-slc5-gcc43-dbg] [?/?] -- built on [?] Py:Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Py:Athena INFO executing ROOT6Setup -[?1034hPy:Athena INFO including file "AthenaCommon/Execution.py" +Py:Athena INFO including file "AthenaCommon/Execution.py" Py:Athena INFO including file "AthenaServices/AthTPCnvSvc_test.py" -Py:ConfigurableDb INFO Read module info for 5282 configurables from 7 genConfDb files +Py:ConfigurableDb INFO Read module info for 502 configurables from 2 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! +# setting LC_ALL to "C" +ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v28r1) - running on p05614910w96644.cern.ch on Fri Mar 17 17:23:07 2017 + Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99) + running on karma on Sun Jul 8 10:45:20 2018 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -20,14 +22,13 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 2303 CLIDRegistry entries for module ALL -ChronoStatSvc INFO Number of skipped events for MemStat-1 +ClassIDSvc INFO getRegistryEntries: read 2826 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully -ClassIDSvc INFO getRegistryEntries: read 1103 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 1136 CLIDRegistry entries for module ALL AthTPCnvSvc WARNING Could not load converter for transient class [AthenaServicesTestConverters::TBTRIG] AthTPCnvSvc WARNING Could not load converter for transient class [AthenaServicesTestConverters::TBTRIG] AthTPCnvSvc WARNING could not load converter for transient CLID [20394825] (AthenaServicesTestConverters::TBTRIG) @@ -39,13 +40,14 @@ Py:Configurable ERROR attempt to add a duplicate (AthBeginSeq.BeginIncFiring Py:Configurable ERROR attempt to add a duplicate (AthBeginSeq.IncidentProcAlg1) ... dupe ignored Py:Configurable ERROR attempt to add a duplicate (AthEndSeq.EndIncFiringAlg) ... dupe ignored Py:Configurable ERROR attempt to add a duplicate (AthEndSeq.IncidentProcAlg2) ... dupe ignored +Py:Configurable ERROR attempt to add a duplicate (AthMasterSeq.AthFilterSeq) ... dupe ignored Py:Configurable ERROR attempt to add a duplicate (AthAllAlgSeq.AthCondSeq) ... dupe ignored Py:Configurable ERROR attempt to add a duplicate (AthAllAlgSeq.AthAlgSeq) ... dupe ignored Py:Configurable ERROR attempt to add a duplicate (AthAlgEvtSeq.AthBeginSeq) ... dupe ignored Py:Configurable ERROR attempt to add a duplicate (AthAlgEvtSeq.AthAllAlgSeq) ... dupe ignored Py:Configurable ERROR attempt to add a duplicate (AthAlgEvtSeq.AthEndSeq) ... dupe ignored -Py:Configurable ERROR attempt to add a duplicate (AthMasterSeq.AthAlgEvtSeq) ... dupe ignored -Py:Configurable ERROR attempt to add a duplicate (AthMasterSeq.AthOutSeq) ... dupe ignored +Py:Configurable ERROR attempt to add a duplicate (AthFilterSeq.AthAlgEvtSeq) ... dupe ignored +Py:Configurable ERROR attempt to add a duplicate (AthFilterSeq.AthOutSeq) ... dupe ignored Py:Configurable ERROR attempt to add a duplicate (AthMasterSeq.AthRegSeq) ... dupe ignored StatusCodeSvc INFO reinitialize ClassIDSvc INFO RE-initializing ClassIDSvc @@ -62,7 +64,7 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc INFO Time User : Tot= 2.71 [s] #= 1 +ChronoStatSvc INFO Time User : Tot= 1.54 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully -- GitLab From 54bcdce42b3f0ecf7d41334a659fa53e5f25e989 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Tue, 17 Jul 2018 17:03:39 +0200 Subject: [PATCH 507/562] AthenaDBTestRec: Don't use retrieve() with DataHandle. retrieve() with a DataHandle is deprecated, and we want to remove it. Here, we were just getting EventID --- we can now get that from the event context. Former-commit-id: 6e28c362cf30a1f445caa3719ac1f15c4ecb6ee8 --- .../src/lib/TestCoolRecRead.cxx | 22 +++++-------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/AtlasTest/DatabaseTest/AthenaDBTestRec/src/lib/TestCoolRecRead.cxx b/AtlasTest/DatabaseTest/AthenaDBTestRec/src/lib/TestCoolRecRead.cxx index af993810024a..7b900bbde07f 100644 --- a/AtlasTest/DatabaseTest/AthenaDBTestRec/src/lib/TestCoolRecRead.cxx +++ b/AtlasTest/DatabaseTest/AthenaDBTestRec/src/lib/TestCoolRecRead.cxx @@ -9,9 +9,6 @@ #include <fstream> #include "StoreGate/StoreGateSvc.h" -//#include "xAODEventInfo/EventInfo.h" -#include "EventInfo/EventInfo.h" -#include "EventInfo/EventID.h" #include "AthenaKernel/IOVRange.h" #include "AthenaDBTestRec/TestCoolRecRead.h" @@ -102,20 +99,11 @@ StatusCode TestCoolRecRead::initialize() { StatusCode TestCoolRecRead::execute() { // find the run number for mismatch check - int run=0; - int event=0; - int lumib=0; - uint64_t nsTime=0; - // const xAOD::EventInfo* eventInfo(0); - const DataHandle<EventInfo> eventInfo; - if (StatusCode::SUCCESS==evtStore()->retrieve(eventInfo)) { - run=eventInfo->event_ID()->run_number(); - event=eventInfo->event_ID()->event_number(); - lumib=eventInfo->event_ID()->lumi_block(); - nsTime=eventInfo->event_ID()->time_stamp()*1000000000LL; - } else { - ATH_MSG_WARNING("Could not get Event object to find runnumber"); - } + const EventIDBase& eid = getContext().eventID(); + int run = eid.run_number(); + int event = eid.event_number(); + int lumib = eid.lumi_block(); + uint64_t nsTime = eid.time_stamp()*1000000000LL; IOVTime iovkey(run,lumib,nsTime); // loop through all folders and access data for (std::vector<TestCoolRecFolder>::iterator ifolder=m_folderlist.begin(); -- GitLab From 2cd5a5c390a5cb9f710a30f33199194ef53bb829 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Tue, 17 Jul 2018 17:04:12 +0200 Subject: [PATCH 508/562] GoogleTestTools: Add missing test reference file. Add missing test reference file. Former-commit-id: 4d18301e018c531af6eef799d9ae318f158c5f84 --- .../share/GoogleTestToolsTests.ref | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 AtlasTest/GoogleTestTools/share/GoogleTestToolsTests.ref diff --git a/AtlasTest/GoogleTestTools/share/GoogleTestToolsTests.ref b/AtlasTest/GoogleTestTools/share/GoogleTestToolsTests.ref new file mode 100644 index 000000000000..1a12a640a5ec --- /dev/null +++ b/AtlasTest/GoogleTestTools/share/GoogleTestToolsTests.ref @@ -0,0 +1,22 @@ +[==========] Running 1 test from 1 test case. +[----------] Global test environment set-up. +[----------] 1 test from InitGaudiGoogleTestTest +[ RUN ] InitGaudiGoogleTestTest.basictest +ApplicationMgr SUCCESS +==================================================================================================================================== + Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99) + running on karma on Wed Jul 4 10:48:30 2018 +==================================================================================================================================== +ApplicationMgr INFO Application Manager Configured successfully +HistogramPersis...WARNING Histograms saving not required. +ApplicationMgr INFO Application Manager Initialized successfully +EventLoopMgr INFO Histograms converted successfully according to request. +ToolSvc INFO Removing all tools created by ToolSvc +ApplicationMgr INFO Application Manager Finalized successfully +ApplicationMgr INFO Application Manager Terminated successfully +[ OK ] InitGaudiGoogleTestTest.basictest (44 ms) +[----------] 1 test from InitGaudiGoogleTestTest (44 ms total) + +[----------] Global test environment tear-down +[==========] 1 test from 1 test case ran. (44 ms total) +[ PASSED ] 1 test. -- GitLab From 0bee82557b0154534f62970279d84d66ce060f7d Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Tue, 17 Jul 2018 20:58:00 +0200 Subject: [PATCH 509/562] TrkRoad: DataModel -> AthContainers. Remove reference to obsolete DataModel package. Also adjust reference to header moved from CLIDSvc to AthenaKernel. Former-commit-id: 2e368abdac31b30bc147d89af5195123f416639b --- Tracking/TrkEvent/TrkRoad/CMakeLists.txt | 7 +++---- Tracking/TrkEvent/TrkRoad/TrkRoad/TrackRoadCollection.h | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Tracking/TrkEvent/TrkRoad/CMakeLists.txt b/Tracking/TrkEvent/TrkRoad/CMakeLists.txt index ee95b0b424d8..bd360cc3cf87 100644 --- a/Tracking/TrkEvent/TrkRoad/CMakeLists.txt +++ b/Tracking/TrkEvent/TrkRoad/CMakeLists.txt @@ -7,9 +7,8 @@ atlas_subdir( TrkRoad ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - Control/CLIDSvc - Control/DataModel - Control/SGTools + Control/AthenaKernel + Control/AthContainers DetectorDescription/GeoPrimitives Event/EventPrimitives PRIVATE @@ -25,6 +24,6 @@ atlas_add_library( TrkRoad PUBLIC_HEADERS TrkRoad INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${EIGEN_LIBRARIES} DataModel SGTools GeoPrimitives EventPrimitives + LINK_LIBRARIES ${EIGEN_LIBRARIES} AthContainers GeoPrimitives EventPrimitives PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel ) diff --git a/Tracking/TrkEvent/TrkRoad/TrkRoad/TrackRoadCollection.h b/Tracking/TrkEvent/TrkRoad/TrkRoad/TrackRoadCollection.h index 4683e3a3c4f8..2717f302cd85 100755 --- a/Tracking/TrkEvent/TrkRoad/TrkRoad/TrackRoadCollection.h +++ b/Tracking/TrkEvent/TrkRoad/TrkRoad/TrackRoadCollection.h @@ -5,8 +5,8 @@ #ifndef TRKROAD_TRKROADCOLLECTION_H #define TRKROAD_TRKROADCOLLECTION_H -#include "DataModel/DataVector.h" -#include "CLIDSvc/CLASS_DEF.h" +#include "AthContainers/DataVector.h" +#include "AthenaKernel/CLASS_DEF.h" #include "TrkRoad/TrackRoad.h" namespace Trk -- GitLab From 5b965e0dad8ee12b6e663e644a5051b9274340f0 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Tue, 17 Jul 2018 21:50:37 +0200 Subject: [PATCH 510/562] slight cleanup Former-commit-id: 84f82969ff48e98f48504992bed10e83e3e6312c --- Event/ByteStreamTest/test/post_check_bs.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Event/ByteStreamTest/test/post_check_bs.sh b/Event/ByteStreamTest/test/post_check_bs.sh index 57a99d3c38be..8e8e6298e2d2 100755 --- a/Event/ByteStreamTest/test/post_check_bs.sh +++ b/Event/ByteStreamTest/test/post_check_bs.sh @@ -22,7 +22,7 @@ else joblog=${test}.log if [ "$status" = 0 ] then - #echo "[92;1m post_check_co.sh> OK: ${test} exited normally. Output is in $joblog [m" + # Exited normally; output in $joblog. reflog=../share/${test}.ref grep -e 'RunEventTag' \ -e 'ByteStreamAtt' \ @@ -101,8 +101,6 @@ else then echo "[97;101;1m post_check_co.sh> ERROR: $joblog and $reflog differ [m" exit 1 - else - true; #echo "[92;1m post_check_co.sh> OK: $joblog and $reflog identical [m" fi else tail $joblog @@ -119,7 +117,6 @@ fi # Check output for ERROR/FATAL joblog=${test}.log -#echo exit $status -- GitLab From 7b85e025bc521048b8e872ee78886eac706ddbb6 Mon Sep 17 00:00:00 2001 From: Tamara Vazquez Schroeder <tamara.vazquez.schroeder@cern.ch> Date: Tue, 17 Jul 2018 15:44:18 +0000 Subject: [PATCH 511/562] Merge branch '21.0-hancool-logger-2' into '21.0' Use configurable logging in hancool See merge request atlas/athena!12628 (cherry picked from commit 23ed6a9684a01660cf53d1d16a2a9d4285beeb7f [formerly 5c45af17a26c2b35d8c653631bdbbe0b2ff43de7]) 2ad3193b Use configurable logging in hancool Former-commit-id: 854e630bf1afb256552c56e6c82acb4455e7255d --- Control/AthenaKernel/share/ClassName_test.ref | 0 DataQuality/DataQualityUtils/python/hancoolmod.py | 13 +++++++++---- .../DataQualityUtils/scripts/DQWebDisplay.py | 5 ++++- Event/EventContainers/test/ID_ContainerTest.h | 0 4 files changed, 13 insertions(+), 5 deletions(-) mode change 100644 => 100755 Control/AthenaKernel/share/ClassName_test.ref mode change 100755 => 100644 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Control/AthenaKernel/share/ClassName_test.ref b/Control/AthenaKernel/share/ClassName_test.ref old mode 100644 new mode 100755 diff --git a/DataQuality/DataQualityUtils/python/hancoolmod.py b/DataQuality/DataQualityUtils/python/hancoolmod.py index a4f93c27eaba..b7ed7da5db78 100644 --- a/DataQuality/DataQualityUtils/python/hancoolmod.py +++ b/DataQuality/DataQualityUtils/python/hancoolmod.py @@ -9,6 +9,10 @@ import sys import pdb import glob +import logging +logger = logging.getLogger('hancoolmod') +logger.addHandler(logging.NullHandler()) + import ROOT ## Importing gSystem may change the current directory to one of the ## command-line arguments; chdir to original directory to have @@ -24,7 +28,6 @@ from ROOT import dqutils ## LumiBlock length (in minutes) LBlength = 1.0 - ## Mapping han<->COOL folderMap = { # ATLAS global @@ -154,7 +157,7 @@ def getLimits( name ): low_limit = 1 hi_limit = max_hi_limit except Exception, e: - print 'Could not determine limits because:', e + logging.warning('Could not determine limits because: %s', e) low_limit = 1 hi_limit = 4294967295 @@ -182,9 +185,9 @@ def hancool(runNumber=3070, runlimitscache = {} - print '====> Running hancool_defects' + logger.info('====> Running hancool_defects') hancool_defects(runNumber, filePath, dbConnection, 'HEAD', isESn) - print '<==== Done with hancool_defects' + logger.info('<==== Done with hancool_defects') # Nothing that follows applies for Run 2 ... # if ( filePath.rfind("/")!=(len(filePath)-1) ): @@ -510,9 +513,11 @@ def hancool_defects(runNumber, filePath="./", dbConnection="", db_tag='HEAD', is from DQDefects import DefectsDB ddb = DefectsDB(dbConnection, read_only=False) if isESn: + logging.info('Running detmask_defects') detmask_defects(runNumber, ddb) with ddb.storage_buffer: for defect in iovs_merge(defects): + logger.debug('Uploading %s', defect) ddb.insert(defect.defect, since=(runNumber << 32 | defect.since), until=(runNumber << 32 | defect.until), comment=defect.comment, diff --git a/DataQuality/DataQualityUtils/scripts/DQWebDisplay.py b/DataQuality/DataQualityUtils/scripts/DQWebDisplay.py index feac44c4b948..b6f79c0f2856 100755 --- a/DataQuality/DataQualityUtils/scripts/DQWebDisplay.py +++ b/DataQuality/DataQualityUtils/scripts/DQWebDisplay.py @@ -1,7 +1,7 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -# -*- coding: utf-8 -*- ## ***************************************************************************** VERSION = '$Id: DQWebDisplay.py 690278 2015-08-19 22:18:53Z ponyisi $' @@ -9,6 +9,9 @@ VERSION = '$Id: DQWebDisplay.py 690278 2015-08-19 22:18:53Z ponyisi $' import os +import logging +logging.basicConfig() + ## Needed to correct ROOT behavior; see below CWD = os.getcwd() os.chdir(CWD) diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100755 new mode 100644 -- GitLab From 87028e03d80b6c8b12bbca9b49d9fd26f5deb19d Mon Sep 17 00:00:00 2001 From: Imma Riu <imma.riu@cern.ch> Date: Tue, 17 Jul 2018 18:42:33 +0000 Subject: [PATCH 512/562] Merge branch 'TrigP1Test_ATR-17664' into '21.1' TrigP1Test (ATR-17664), timeout fix See merge request atlas/athena!12790 (cherry picked from commit c6697dac6a0594eda2507cced75f99ee393052c9 [formerly 002261737f665574a5bc8ac2f8bef69c73d5fee5]) 4c4310fc TrigP1Test (ATR-17664), timeout fix Former-commit-id: ec60c56bd36c6780c194071b491bcda315c95389 --- Control/AthenaKernel/share/ClassName_test.ref | 0 Trigger/TrigValidation/TrigP1Test/Testing/TrigP1Test_ART.conf | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 Control/AthenaKernel/share/ClassName_test.ref diff --git a/Control/AthenaKernel/share/ClassName_test.ref b/Control/AthenaKernel/share/ClassName_test.ref old mode 100644 new mode 100755 diff --git a/Trigger/TrigValidation/TrigP1Test/Testing/TrigP1Test_ART.conf b/Trigger/TrigValidation/TrigP1Test/Testing/TrigP1Test_ART.conf index 6ae7eeed32dc..26d562998b2d 100644 --- a/Trigger/TrigValidation/TrigP1Test/Testing/TrigP1Test_ART.conf +++ b/Trigger/TrigValidation/TrigP1Test/Testing/TrigP1Test_ART.conf @@ -871,7 +871,7 @@ test 183 doc athenaHLT on latest available run filterlog filterREGTEST.py checklog --config checklogTrigP1Test.conf --showexcludestats - athena_cmd trigp1test_athenaHLT.py --nfiles=1 --dir='/eos/atlas/atlastier0/rucio/data18_13TeV/physics_Main/' --modifiers="testMCV7=True;fpeAuditor=True;from PerfMonComps.PerfMonFlags import jobproperties as pmon_properties ; pmon_properties.PerfMonFlags.doSemiDetailedMonitoring=True" + athena_cmd trigp1test_athenaHLT.py --nfiles=1 --nevents=100 --dir='/eos/atlas/atlastier0/rucio/data18_13TeV/physics_Main/' --modifiers="testMCV7=True;fpeAuditor=True;from PerfMonComps.PerfMonFlags import jobproperties as pmon_properties ; pmon_properties.PerfMonFlags.doSemiDetailedMonitoring=True" post_command chainDump.py -n -S -- GitLab From 9bbd60daa9f111a75c1cae67b89cbe97adbbfa95 Mon Sep 17 00:00:00 2001 From: Shota Hayashida <hayashida@hepl.phys.nagoya-u.ac.jp> Date: Wed, 18 Jul 2018 06:16:03 +0200 Subject: [PATCH 513/562] Update the TrigL2MuonSA package Former-commit-id: ac01e98601957872f572b9a3efd5bc6d35ba11dc --- .../TrigL2MuonSA/TrigL2MuonSA/CscDataPreparator.h | 10 ++++++---- .../TrigL2MuonSA/TrigL2MuonSA/RpcDataPreparator.h | 5 +++-- .../TrigL2MuonSA/TrigL2MuonSA/TgcDataPreparator.h | 14 ++++++++------ .../TrigL2MuonSA/src/CscDataPreparator.cxx | 5 +++++ .../TrigL2MuonSA/src/MdtDataPreparator.cxx | 3 +++ .../TrigL2MuonSA/src/RpcDataPreparator.cxx | 2 ++ .../TrigL2MuonSA/src/TgcDataPreparator.cxx | 4 ++++ 7 files changed, 31 insertions(+), 12 deletions(-) diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscDataPreparator.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscDataPreparator.h index 572a8e704e99..809bdd4662e3 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscDataPreparator.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscDataPreparator.h @@ -96,10 +96,12 @@ namespace TrigL2MuonSA { ServiceHandle<IRegSelSvc> m_regionSelector; // CSC PrepDataProvider - ToolHandle<Muon::IMuonRdoToPrepDataTool> m_cscPrepDataProvider { - this, "CscPrepDataProvider", "Muon::CscRdoToCscPrepDataTool/CscPrepDataProviderTool", ""}; - ToolHandle<ICscClusterBuilder> m_cscClusterProvider { - this, "CscClusterProvider", "CscThresholdClusterBuilderTool", ""}; + ToolHandle<Muon::IMuonRdoToPrepDataTool> m_cscPrepDataProvider; + //ToolHandle<Muon::IMuonRdoToPrepDataTool> m_cscPrepDataProvider { + // this, "CscPrepDataProvider", "Muon::CscRdoToCscPrepDataTool/CscPrepDataProviderTool", ""}; + ToolHandle<ICscClusterBuilder> m_cscClusterProvider; + //ToolHandle<ICscClusterBuilder> m_cscClusterProvider { + // this, "CscClusterProvider", "CscThresholdClusterBuilderTool", ""}; SG::ReadHandleKey<Muon::CscPrepDataContainer> m_cscPrepContainerKey{ this, "CSCPrepDataContainer", "CSC_Clusters", "Name of the CSCContainer to read in"}; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcDataPreparator.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcDataPreparator.h index dd84326533d0..66b475d5c508 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcDataPreparator.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcDataPreparator.h @@ -97,8 +97,9 @@ class RpcDataPreparator: public AthAlgTool const RpcIdHelper* m_rpcIdHelper; // handles to the RoI driven data access - ToolHandle<Muon::IMuonRdoToPrepDataTool> m_rpcPrepDataProvider { - this, "RpcPrepDataProvider", "Muon::RpcRdoToPrepDataTool/RpcPrepDataProviderTool", ""}; + ToolHandle<Muon::IMuonRdoToPrepDataTool> m_rpcPrepDataProvider; + //ToolHandle<Muon::IMuonRdoToPrepDataTool> m_rpcPrepDataProvider { + // this, "RpcPrepDataProvider", "Muon::RpcRdoToPrepDataTool/RpcPrepDataProviderTool", ""}; ToolHandle <Muon::MuonIdHelperTool> m_idHelperTool; //!< Pointer to concrete tool diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcDataPreparator.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcDataPreparator.h index 25e9bbe74537..c622b5b48c08 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcDataPreparator.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcDataPreparator.h @@ -99,12 +99,14 @@ class TgcDataPreparator: public AthAlgTool MuonTGC_CablingSvc* m_tgcCabling; // Tool for Rdo to Prep Data conversion - ToolHandle<Muon::IMuonRdoToPrepDataTool> m_tgcPrepDataProvider { - this, "TgcPrepDataProvider", "Muon::TgcRdoToPrepDataTool/TgcPrepDataProviderTool", ""}; - - // Tools for the Raw data conversion - ToolHandle<Muon::IMuonRawDataProviderTool> m_tgcRawDataProvider { - this, "TGC_RawDataProvider", "Muon::TGC_RawDataProviderTool", ""}; + ToolHandle<Muon::IMuonRdoToPrepDataTool> m_tgcPrepDataProvider; + //ToolHandle<Muon::IMuonRdoToPrepDataTool> m_tgcPrepDataProvider { + // this, "TgcPrepDataProvider", "Muon::TgcRdoToPrepDataTool/TgcPrepDataProviderTool", ""}; + // + //// Tools for the Raw data conversion + ToolHandle<Muon::IMuonRawDataProviderTool> m_tgcRawDataProvider; + //ToolHandle<Muon::IMuonRawDataProviderTool> m_tgcRawDataProvider { + // this, "TGC_RawDataProvider", "Muon::TGC_RawDataProviderTool", ""}; // Region Selector ServiceHandle<IRegSelSvc> m_regionSelector; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscDataPreparator.cxx index e6610224fbb7..2e1ee3bec19f 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscDataPreparator.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscDataPreparator.cxx @@ -38,8 +38,13 @@ TrigL2MuonSA::CscDataPreparator::CscDataPreparator(const std::string& type, m_storeGateSvc( "StoreGateSvc", name ), m_activeStore( "ActiveStoreSvc", name ), m_regionSelector( "RegSelSvc", name ) + m_cscPrepDataProvider("Muon::CscRdoToCscPrepDataTool/CscPrepDataProviderTool"), + m_cscClusterProvider("CscThresholdClusterBuilderTool") { declareInterface<TrigL2MuonSA::CscDataPreparator>(this); + + declareProperty("CscPrepDataProvider", m_cscPrepDataProvider); + declareProperty("CscClusterProvider", m_cscClusterProvider); } // -------------------------------------------------------------------------------- diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx index 672cef8e2a7b..156b6935da16 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx @@ -68,6 +68,9 @@ TrigL2MuonSA::MdtDataPreparator::MdtDataPreparator(const std::string& type, m_BMGid(-1) { declareInterface<TrigL2MuonSA::MdtDataPreparator>(this); + + declareProperty("MDT_RawDataProvider", m_mdtRawDataProvider); + declareProperty("MdtPrepDataProvider", m_mdtPrepDataProvider); } // -------------------------------------------------------------------------------- diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcDataPreparator.cxx index ba7ba989e478..11eafca3b8b5 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcDataPreparator.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcDataPreparator.cxx @@ -44,9 +44,11 @@ TrigL2MuonSA::RpcDataPreparator::RpcDataPreparator(const std::string& type, m_storeGateSvc( "StoreGateSvc", name ), m_activeStore( "ActiveStoreSvc", name ), m_regionSelector( "RegSelSvc", name ), + m_rpcPrepDataProvider("Muon::RpcRdoToPrepDataTool/RpcPrepDataProviderTool"), m_idHelperTool("Muon::MuonIdHelperTool/MuonIdHelperTool") { declareInterface<TrigL2MuonSA::RpcDataPreparator>(this); + declareProperty("RpcPrepDataProvider", m_rpcPrepDataProvider); } // -------------------------------------------------------------------------------- diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx index a2588632c4fd..15748d4a4c14 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx @@ -43,11 +43,15 @@ TrigL2MuonSA::TgcDataPreparator::TgcDataPreparator(const std::string& type, AthAlgTool(type,name,parent), m_storeGateSvc( "StoreGateSvc", name ), m_activeStore( "ActiveStoreSvc", name ), + m_tgcPrepDataProvider("Muon::TgcRdoToPrepDataTool/TgcPrepDataProviderTool"), + m_tgcRawDataProvider("Muon::TGC_RawDataProviderTool"), m_regionSelector( "RegSelSvc", name ), m_robDataProvider( "ROBDataProviderSvc", name ), m_options(), m_recMuonRoIUtils() { declareInterface<TrigL2MuonSA::TgcDataPreparator>(this); + declareProperty("TgcPrepDataProvider", m_tgcPrepDataProvider); + declareProperty("TGC_RawDataProvider", m_tgcRawDataProvider); } -- GitLab From 4a6d17cbc9de965062c0d08b714ce0bd7beaa6e4 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Wed, 18 Jul 2018 08:16:19 +0200 Subject: [PATCH 514/562] Fix coverity 114931 by initialising members in TRT_TrigTrackExtensionAlg.h Former-commit-id: e48be4170f8b9d28da7bb39d8316badd905ac7b6 --- .../TRT_TrigTrackExtensionAlg.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackExtensionAlg/TRT_TrigTrackExtensionAlg/TRT_TrigTrackExtensionAlg.h b/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackExtensionAlg/TRT_TrigTrackExtensionAlg/TRT_TrigTrackExtensionAlg.h index de221a6b708c..54c0be26057c 100755 --- a/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackExtensionAlg/TRT_TrigTrackExtensionAlg/TRT_TrigTrackExtensionAlg.h +++ b/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackExtensionAlg/TRT_TrigTrackExtensionAlg/TRT_TrigTrackExtensionAlg.h @@ -24,9 +24,11 @@ #ifndef TRT_TRIGTRACKEXTENSIONALG_H #define TRT_TRIGTRACKEXTENSIONALG_H -#include <string> + #include "GaudiKernel/ToolHandle.h" #include "TrigInterfaces/FexAlgo.h" +#include <iosfwd> +#include <string> class ITRT_TrackExtensionTool; class MsgStream; @@ -69,12 +71,12 @@ namespace InDet { //!< Protected data /////////////////////////////////////////////////////////////////// - int m_outputlevel ; //!< Print level for debug - int m_nprint ; //!< Kind of print - int m_nTracks ; //!< Number input tracks - int m_nTracksExtended ; //!< Number output tracks - int m_nTracksTotal ; // Number input tracks - int m_nTracksExtendedTotal ; // Number output tracks + int m_outputlevel{} ; //!< Print level for debug + int m_nprint{} ; //!< Kind of print + int m_nTracks{} ; //!< Number input tracks + int m_nTracksExtended{} ; //!< Number output tracks + int m_nTracksTotal{} ; // Number input tracks + int m_nTracksExtendedTotal{} ; // Number output tracks ToolHandle<ITRT_TrackExtensionTool> m_trtExtension ; // TRT track extension tool /////////////////////////////////////////////////////////////////// -- GitLab From 9de1260c34f9760abe8226c4b297ba6401626e61 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Wed, 18 Jul 2018 08:32:55 +0200 Subject: [PATCH 515/562] Solve coverity 114784 by initialising members in TRT_TrigTrackSegmentsFinder.h Former-commit-id: 114fcc1c0d689419c47c41ed8f0cd2342b5ac716 --- .../TRT_TrigTrackSegmentsFinder.h | 24 +++++++++---------- .../src/TRT_TrigTrackSegmentsFinder.cxx | 2 ++ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder/TRT_TrigTrackSegmentsFinder/TRT_TrigTrackSegmentsFinder.h b/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder/TRT_TrigTrackSegmentsFinder/TRT_TrigTrackSegmentsFinder.h index 0f21cb864c9c..bc4989c81738 100755 --- a/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder/TRT_TrigTrackSegmentsFinder/TRT_TrigTrackSegmentsFinder.h +++ b/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder/TRT_TrigTrackSegmentsFinder/TRT_TrigTrackSegmentsFinder.h @@ -10,8 +10,8 @@ #include "InDetRecToolInterfaces/ITRT_TrackSegmentsMaker.h" //!< Trigger specific stuff -#include "TrigTimeAlgs/TrigTimerSvc.h" #include "TrigInterfaces/FexAlgo.h" +#include <iosfwd> class IRegSelSvc; class TrigTimer; @@ -59,10 +59,10 @@ namespace InDet { // Protected data /////////////////////////////////////////////////////////////////// - int m_outputlevel ; // Print level for debug - int m_nprint ; // Kind of print - int m_nsegments ; // Number segments - int m_nsegmentsTotal ; // Number segments + int m_outputlevel{} ; // Print level for debug + int m_nprint {} ; // Kind of print + int m_nsegments{} ; // Number segments + int m_nsegmentsTotal{} ; // Number segments ToolHandle<ITRT_TrackSegmentsMaker> m_segmentsMakerTool; // TRT segments maker @@ -75,15 +75,15 @@ namespace InDet { //!< Trigger part ServiceHandle<IRegSelSvc> m_regionSelector; //!< region selector service - double m_etaHalfWidth; //!< ROI half-width in eta. - double m_phiHalfWidth; //!< ROI half-width in phi. - bool m_doFullScan; //!< supports FullScan mode + double m_etaHalfWidth{}; //!< ROI half-width in eta. + double m_phiHalfWidth{}; //!< ROI half-width in phi. + bool m_doFullScan{}; //!< supports FullScan mode //!< Timing - TrigTimer *m_timerRegSel; - TrigTimer *m_timerFind; - TrigTimer *m_timerSegMaker; - TrigTimer *m_timerMainLoop; + TrigTimer *m_timerRegSel{}; + TrigTimer *m_timerFind{}; + TrigTimer *m_timerSegMaker{}; + TrigTimer *m_timerMainLoop{}; }; MsgStream& operator << (MsgStream& ,const TRT_TrigTrackSegmentsFinder&); std::ostream& operator << (std::ostream&,const TRT_TrigTrackSegmentsFinder&); diff --git a/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder/src/TRT_TrigTrackSegmentsFinder.cxx b/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder/src/TRT_TrigTrackSegmentsFinder.cxx index 7132b101c070..1784d7f2c2a9 100755 --- a/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder/src/TRT_TrigTrackSegmentsFinder.cxx +++ b/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder/src/TRT_TrigTrackSegmentsFinder.cxx @@ -16,10 +16,12 @@ #include "TRT_TrigTrackSegmentsFinder/TRT_TrigTrackSegmentsFinder.h" #include "TrkSegment/SegmentCollection.h" +#include "TrigTimeAlgs/TrigTimerSvc.h" //Trigger stuff #include "TrigSteeringEvent/TrigRoiDescriptor.h" #include "IRegionSelector/IRegSelSvc.h" +#include <ostream> /////////////////////////////////////////////////////////////////// -- GitLab From 8dfcc3c823fc6fac401278e58a546e5313aabe8b Mon Sep 17 00:00:00 2001 From: Shota Hayashida <hayashida@hepl.phys.nagoya-u.ac.jp> Date: Wed, 18 Jul 2018 10:50:56 +0200 Subject: [PATCH 516/562] Fixed a bit error Former-commit-id: c58162390373e4d2970d9b676987f5190a4574ad --- Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscDataPreparator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscDataPreparator.cxx index 2e1ee3bec19f..2810e6d65928 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscDataPreparator.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscDataPreparator.cxx @@ -37,7 +37,7 @@ TrigL2MuonSA::CscDataPreparator::CscDataPreparator(const std::string& type, AthAlgTool(type,name,parent), m_storeGateSvc( "StoreGateSvc", name ), m_activeStore( "ActiveStoreSvc", name ), - m_regionSelector( "RegSelSvc", name ) + m_regionSelector( "RegSelSvc", name ), m_cscPrepDataProvider("Muon::CscRdoToCscPrepDataTool/CscPrepDataProviderTool"), m_cscClusterProvider("CscThresholdClusterBuilderTool") { -- GitLab From 66e79f5fb3eed812b83e4a3f13233fe4ffef749a Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Wed, 18 Jul 2018 11:04:27 +0200 Subject: [PATCH 517/562] Solve coverity 115432 by initialising members in InDetPerfPlot_resITk.h Former-commit-id: fae334c74bfb7a153ed53b9da2368ff6ddb99e5d --- .../src/InDetPerfPlot_resITk.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_resITk.h b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_resITk.h index 577bb8e59dfe..ba1d1bb761b1 100644 --- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_resITk.h +++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_resITk.h @@ -184,16 +184,16 @@ private: TH1* m_significance_d0_vs_eta; TH1* m_significance_z0_vs_eta; - TH1* m_fix_qoverpt_res[16]; + TH1* m_fix_qoverpt_res[16]{}; - TH1* m_fix_qoverptresolutionRMS_vs_eta; + TH1* m_fix_qoverptresolutionRMS_vs_eta{}; - TH1* m_fix_d0_res[16]; - TH1* m_fix_d0resolutionRMS_vs_eta; + TH1* m_fix_d0_res[16]{}; + TH1* m_fix_d0resolutionRMS_vs_eta{}; - TH1* m_fix_z0_res[16]; - TH1* m_fix_z0resolutionRMS_vs_eta; + TH1* m_fix_z0_res[16]{}; + TH1* m_fix_z0resolutionRMS_vs_eta{}; }; -- GitLab From f4e74ddf4de60db27e73ccfde85f7b0f5642c47e Mon Sep 17 00:00:00 2001 From: Ben Morgan <Ben.Morgan@warwick.ac.uk> Date: Thu, 1 Mar 2018 17:16:45 +0100 Subject: [PATCH 518/562] Support G4VPhysicsConstructor usage for Geant4 >= 10.3 Prior to Geant4 10.3, G4VPhysicsConstructor provided direct access to the particle iterator via a #define. In 10.3, this was removed and replaced with a requirement to call a member function. Update clients of the #define to use new member function call. Retain existing preprocessor symbols, add new definitions for latest G4 versions that are just the member function call on 'this'. Former-commit-id: b8ea00db03cbd57876b63dfb78a89d7ee5bac3dc --- .../TRT_TR_Process/src/TRTPhysicsTool.cxx | 4 +++- .../G4AtlasTools/src/AddPhysicsDecayTool.cxx | 4 +++- .../src/MuBias/G4EmStandardPhysics_MuBias.cc | 15 +++++++++++---- .../G4StepLimitation/src/G4StepLimitationTool.cxx | 4 +++- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTPhysicsTool.cxx b/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTPhysicsTool.cxx index 3366632bd4f4..d684f5e840e3 100644 --- a/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTPhysicsTool.cxx +++ b/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTPhysicsTool.cxx @@ -20,7 +20,9 @@ // 18-05-2015 Edoardo Farina //----------------------------------------------------------------------------- -#if G4VERSION_NUMBER > 1009 +#if G4VERSION_NUMBER > 1029 +#define PARTICLEITERATOR (this->GetParticleIterator()) +#elif G4VERSION_NUMBER > 1009 #define PARTICLEITERATOR aParticleIterator #else #define PARTICLEITERATOR theParticleIterator diff --git a/Simulation/G4Atlas/G4AtlasTools/src/AddPhysicsDecayTool.cxx b/Simulation/G4Atlas/G4AtlasTools/src/AddPhysicsDecayTool.cxx index 02cfc3d5cd7f..0eb33e92413f 100644 --- a/Simulation/G4Atlas/G4AtlasTools/src/AddPhysicsDecayTool.cxx +++ b/Simulation/G4Atlas/G4AtlasTools/src/AddPhysicsDecayTool.cxx @@ -23,7 +23,9 @@ // 15-05-2015 : Edoardo Farina //----------------------------------------------------------------------------- #include "G4Version.hh" -#if G4VERSION_NUMBER > 1009 +#if G4VERSION_NUMBER > 1029 +#define PARTICLEITERATOR (this->GetParticleIterator()) +#elif G4VERSION_NUMBER > 1009 #define PARTICLEITERATOR aParticleIterator #else #define PARTICLEITERATOR theParticleIterator diff --git a/Simulation/G4Utilities/G4PhysicsLists/src/MuBias/G4EmStandardPhysics_MuBias.cc b/Simulation/G4Utilities/G4PhysicsLists/src/MuBias/G4EmStandardPhysics_MuBias.cc index 4e04a7e76296..997e08a13e11 100644 --- a/Simulation/G4Utilities/G4PhysicsLists/src/MuBias/G4EmStandardPhysics_MuBias.cc +++ b/Simulation/G4Utilities/G4PhysicsLists/src/MuBias/G4EmStandardPhysics_MuBias.cc @@ -59,13 +59,20 @@ #include "G4eCoulombScatteringModel.hh" #include "G4WentzelVIModel.hh" #include "G4Version.hh" -#if G4VERSION_NUMBER>=1000 -#include "G4UrbanMscModel.hh" + +#if G4VERSION_NUMBER > 1029 +#define PARTICLEITERATOR (this->GetParticleIterator()) +#elif G4VERSION_NUMBER > 1009 #define PARTICLEITERATOR aParticleIterator #else -# include "G4UrbanMscModel96.hh" #define PARTICLEITERATOR theParticleIterator - using G4UrbanMscModel=G4UrbanMscModel96; +#endif + +#if G4VERSION_NUMBER>=1000 +#include "G4UrbanMscModel.hh" +#else +#include "G4UrbanMscModel96.hh" +using G4UrbanMscModel=G4UrbanMscModel96; #endif #include "G4MuBremsstrahlungModel.hh" diff --git a/Simulation/G4Utilities/G4StepLimitation/src/G4StepLimitationTool.cxx b/Simulation/G4Utilities/G4StepLimitation/src/G4StepLimitationTool.cxx index 8d25ae173835..d1c7a457b899 100644 --- a/Simulation/G4Utilities/G4StepLimitation/src/G4StepLimitationTool.cxx +++ b/Simulation/G4Utilities/G4StepLimitation/src/G4StepLimitationTool.cxx @@ -17,7 +17,9 @@ // 03-08-2015 : Edoardo Farina //----------------------------------------------------------------------------- -#if G4VERSION_NUMBER > 1009 +#if G4VERSION_NUMBER > 1029 +#define PARTICLEITERATOR (this->GetParticleIterator()) +#elif G4VERSION_NUMBER > 1009 #define PARTICLEITERATOR aParticleIterator #else #define PARTICLEITERATOR theParticleIterator -- GitLab From a39be5cb8c4e379835c650c4c484c3adab31e8bf Mon Sep 17 00:00:00 2001 From: Ben Morgan <Ben.Morgan@warwick.ac.uk> Date: Wed, 11 Apr 2018 18:34:18 +0200 Subject: [PATCH 519/562] Select G4FTFParameters interface from G4 Version Geant4 10.4 changed G4FTFParameters to take arguments via a separate "Init" method rather than through constructor. Select interface to use based on version of Geant4 we are compiling against. When using new interface, follow usage in Geant4's own G4FTFModel. Former-commit-id: b93db8c0cda51a152ad140057bae32fa9ef445c7 --- .../src/hadronicVariations/G4FTFModel2.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Simulation/G4Utilities/G4PhysicsLists/src/hadronicVariations/G4FTFModel2.cc b/Simulation/G4Utilities/G4PhysicsLists/src/hadronicVariations/G4FTFModel2.cc index 7cf36cdbb46d..80f5b3e96811 100644 --- a/Simulation/G4Utilities/G4PhysicsLists/src/hadronicVariations/G4FTFModel2.cc +++ b/Simulation/G4Utilities/G4PhysicsLists/src/hadronicVariations/G4FTFModel2.cc @@ -55,6 +55,8 @@ #include "G4IonTable.hh" #include "G4KineticTrack.hh" // Uzhi Oct 2014 +#include "G4Version.hh" // For changes to interface pre,post 10.4 + //============================================================================ //#define debugFTFmodel @@ -239,10 +241,18 @@ void G4FTFModel2::Init( const G4Nucleus& aNucleus, const G4DynamicParticle& aPro // Init target nucleus theParticipants.Init( aNucleus.GetA_asInt(), aNucleus.GetZ_asInt() ); + //BM-Apr-2018 - update interface following G4FTFModel in 10.4 +#if G4VERSION_NUMBER < 1040 if ( theParameters != 0 ) delete theParameters; theParameters = new G4FTFParameters( theProjectile.GetDefinition(), aNucleus.GetA_asInt(), aNucleus.GetZ_asInt(), PlabPerParticle ); - +#else + // reset/recalculate everything for the new interaction + // + theParameters->InitForInteraction( theProjectile.GetDefinition(), aNucleus.GetA_asInt(), + aNucleus.GetZ_asInt(), PlabPerParticle ); +#endif + //AR-Oct2017 : to switch off projectile and target diffraction. if ( isDiffractionSwitchedOff ) { //G4cout << " G4FTFModel2::Init(...) : projectile=" << theProjectile.GetDefinition()->GetParticleName() -- GitLab From f1453947ad3131fd525942a5aa0e8f8003de81f9 Mon Sep 17 00:00:00 2001 From: Ben Morgan <Ben.Morgan@warwick.ac.uk> Date: Fri, 13 Apr 2018 14:12:34 +0200 Subject: [PATCH 520/562] Support fieldMgr configuration for Geant4 10.4 In Geant4 10.4, IntegrationDriver interface changed, preventing use of current indirect construction and setup interface. Per discussion in ATLASSIM-2300, create chord finder through field manager as before. Use static cast to G4MagInt_Driver of G4VIntegrationDriver pointer returned in 10.4 to workaround interface change. Former-commit-id: 37752d120461557528f0d3d32a8fef6b1c89c973 --- .../src/DetectorFieldManagerTool.cxx | 13 +++++++++++- .../src/GlobalFieldManagerTool.cxx | 20 ++++++++++++++----- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/Simulation/G4Atlas/G4AtlasTools/src/DetectorFieldManagerTool.cxx b/Simulation/G4Atlas/G4AtlasTools/src/DetectorFieldManagerTool.cxx index 0ec6ef6cf9a4..45ad616efa7d 100644 --- a/Simulation/G4Atlas/G4AtlasTools/src/DetectorFieldManagerTool.cxx +++ b/Simulation/G4Atlas/G4AtlasTools/src/DetectorFieldManagerTool.cxx @@ -14,6 +14,8 @@ #include "G4ChordFinder.hh" #include "G4LogicalVolume.hh" #include "G4LogicalVolumeStore.hh" +#include "G4Version.hh" +#include "G4MagIntegratorDriver.hh" //----------------------------------------------------------------------------- // Tool constructor @@ -67,7 +69,16 @@ StatusCode DetectorFieldManagerTool::initializeField() // Construct the stepper auto stepper = getStepper(m_integratorStepper, field); - fieldMgr->GetChordFinder()->GetIntegrationDriver()->RenewStepperAndAdjust(stepper); + + G4MagInt_Driver* magDriver = nullptr; + +#if G4VERSION_NUMBER < 1040 + magDriver = fieldMgr->GetChordFinder()->GetIntegrationDriver(); +#else + magDriver = static_cast<G4MagInt_Driver*>(fieldMgr->GetChordFinder()->GetIntegrationDriver()); +#endif + + magDriver->RenewStepperAndAdjust(stepper); // Assign the field manager to volumes auto logVolStore = G4LogicalVolumeStore::GetInstance(); diff --git a/Simulation/G4Atlas/G4AtlasTools/src/GlobalFieldManagerTool.cxx b/Simulation/G4Atlas/G4AtlasTools/src/GlobalFieldManagerTool.cxx index b8ba6f02cae7..27c3463e1a62 100644 --- a/Simulation/G4Atlas/G4AtlasTools/src/GlobalFieldManagerTool.cxx +++ b/Simulation/G4Atlas/G4AtlasTools/src/GlobalFieldManagerTool.cxx @@ -16,7 +16,8 @@ #include "G4ChordFinder.hh" #include "G4PropagatorInField.hh" #include "G4MagIntegratorStepper.hh" - +#include "G4Version.hh" +#include "G4MagIntegratorDriver.hh" //----------------------------------------------------------------------------- // Tool constructor @@ -71,12 +72,21 @@ StatusCode GlobalFieldManagerTool::initializeField() fieldMgr->SetDetectorField(field); ATH_CHECK( setFieldParameters(fieldMgr) ); - // Construct the stepper - auto stepper = getStepper(m_integratorStepper, field); - // Create and configure the ChordFinder fieldMgr->CreateChordFinder(field); - fieldMgr->GetChordFinder()->GetIntegrationDriver()->RenewStepperAndAdjust(stepper); + + // Construct the stepper + auto stepper = getStepper(m_integratorStepper, field); + + G4MagInt_Driver* magDriver = nullptr; + +#if G4VERSION_NUMBER < 1040 + magDriver = fieldMgr->GetChordFinder()->GetIntegrationDriver(); +#else + magDriver = static_cast<G4MagInt_Driver*>(fieldMgr->GetChordFinder()->GetIntegrationDriver()); +#endif + + magDriver->RenewStepperAndAdjust(stepper); // Configure the propagator G4PropagatorInField* propagator = transpManager->GetPropagatorInField(); -- GitLab From 3a44f3b5da8fce58fd79ee147fab71a3bdab0f5e Mon Sep 17 00:00:00 2001 From: John Chapman <jchapman@cern.ch> Date: Wed, 18 Jul 2018 12:32:54 +0200 Subject: [PATCH 521/562] Drop override of SetupRNGEngine method in G4AtlasUserWorkerThreadInitialization The override of `G4UserWorkerThreadInitialization::SetupRNGEngine` in the derived `G4AtlasUserWorkerThreadInitialization` class was found to break running jobs with Geant4 10.4.patch02. Removing the method locally allowed jobs to run and it was confirmed that the override is no-longer necessary. See ATLASSIM-3674. Former-commit-id: bcf5e65a2623f9874144ff32961a5b5d81925c33 --- .../G4AtlasUserWorkerThreadInitialization.cxx | 68 +------------------ .../G4AtlasUserWorkerThreadInitialization.h | 7 +- 2 files changed, 2 insertions(+), 73 deletions(-) diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasUserWorkerThreadInitialization.cxx b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasUserWorkerThreadInitialization.cxx index 41b3bcc981e7..3ea10e510b18 100644 --- a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasUserWorkerThreadInitialization.cxx +++ b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasUserWorkerThreadInitialization.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ // Hide multi-threading classes from builds without G4MT @@ -8,72 +8,6 @@ #include "G4AtlasUserWorkerThreadInitialization.h" #include "G4AtlasWorkerRunManager.h" -// Geant4 includes. They might not be stictly necessary. -#include "globals.hh" // gives the G4Exception -#include "G4AutoLock.hh" - -// Mersenne twister engine used in ATLAS -#include "CLHEP/Random/MTwistEngine.h" - -// Using Geant4's mutex, but could easily use another. -namespace { - G4Mutex rngCreateMutex = G4MUTEX_INITIALIZER; -} - -void G4AtlasUserWorkerThreadInitialization:: -SetupRNGEngine(const CLHEP::HepRandomEngine* aNewRNG) const -{ - // Current behavior in G4 base class is to use a lock. - G4AutoLock l(&rngCreateMutex); - - // A Call to this just forces the creation to defaults. - // Not sure how this fits into the ATLAS model... - G4Random::getTheEngine(); - - // Try casting to determine RNG engine type - CLHEP::HepRandomEngine* retRNG = 0; - if ( dynamic_cast<const CLHEP::MTwistEngine*>(aNewRNG) ) { - retRNG = new CLHEP::MTwistEngine; - } - else if ( dynamic_cast<const CLHEP::HepJamesRandom*>(aNewRNG) ) { - retRNG = new CLHEP::HepJamesRandom; - } - else if ( dynamic_cast<const CLHEP::RanecuEngine*>(aNewRNG) ) { - retRNG = new CLHEP::RanecuEngine; - } - else if ( dynamic_cast<const CLHEP::Ranlux64Engine*>(aNewRNG) ) { - retRNG = new CLHEP::Ranlux64Engine; - } - else if ( dynamic_cast<const CLHEP::MTwistEngine*>(aNewRNG) ) { - retRNG = new CLHEP::MTwistEngine; - } - else if ( dynamic_cast<const CLHEP::DualRand*>(aNewRNG) ) { - retRNG = new CLHEP::DualRand; - } - else if ( dynamic_cast<const CLHEP::RanluxEngine*>(aNewRNG) ) { - retRNG = new CLHEP::RanluxEngine; - } - else if ( dynamic_cast<const CLHEP::RanshiEngine*>(aNewRNG) ) { - retRNG = new CLHEP::RanshiEngine; - } - else { - // TODO: think about using proper ATLAS messaging and error handling..? - G4ExceptionDescription msg; - msg << " Unknown type of RNG Engine - " << G4endl - << " Can cope only with MTwistEngine, HepJamesRandom, Ranecu, Ranlux64," - << " MTwistEngine, DualRand, Ranlux or Ranshi." - << G4endl - << " Cannot clone this type of RNG engine, as required for this thread" - << G4endl - << " Aborting " << G4endl; - G4Exception("G4UserWorkerInitializition::SetupRNGEngine()", - "Run10099", FatalException, msg); - } - - // Set the new engine. I suspect ATLAS seed information is lost :( - G4Random::setTheEngine( retRNG ); -} - G4WorkerRunManager* G4AtlasUserWorkerThreadInitialization:: CreateWorkerRunManager() const { diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasUserWorkerThreadInitialization.h b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasUserWorkerThreadInitialization.h index 265b1185de1d..bf20f3570c36 100644 --- a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasUserWorkerThreadInitialization.h +++ b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasUserWorkerThreadInitialization.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #ifndef G4ATLASALG_G4ATLASUSERWORKERTHREADINITIALIZATION_H @@ -26,11 +26,6 @@ class G4AtlasUserWorkerThreadInitialization : public G4UserWorkerThreadInitializ public: - /// @brief Override thread-local setup of RNG engine. - /// This currently just clones the master's engine. - /// Assumes we're just using a MTwistEngine for now. - void SetupRNGEngine(const CLHEP::HepRandomEngine* aRNGEngine) const; - /// @brief Create ATLAS worker run manager G4WorkerRunManager* CreateWorkerRunManager() const; -- GitLab From 24bbdfba4c10fd4b224f797aa57c5d196a328f81 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Wed, 18 Jul 2018 13:29:47 +0200 Subject: [PATCH 522/562] Solve coverity 14348 by restoring cout precision Former-commit-id: 3d73f0f64e0e8c40d93c8976dc22e43e52cbd935 --- .../InDetRecStatistics/src/InDetRecStatisticsAlg.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/InnerDetector/InDetValidation/InDetRecStatistics/src/InDetRecStatisticsAlg.cxx b/InnerDetector/InDetValidation/InDetRecStatistics/src/InDetRecStatisticsAlg.cxx index 8c1315e00fd9..13055eb31ed9 100755 --- a/InnerDetector/InDetValidation/InDetRecStatistics/src/InDetRecStatisticsAlg.cxx +++ b/InnerDetector/InDetValidation/InDetRecStatistics/src/InDetRecStatisticsAlg.cxx @@ -22,7 +22,7 @@ #include "CLHEP/Units/SystemOfUnits.h" #include <cmath> #include <memory> -#include <iostream> +#include <ostream> // Private Helpers @@ -45,7 +45,6 @@ #include "TrkCompetingRIOsOnTrack/CompetingRIOsOnTrack.h" #include "TrkTruthData/TrackTruth.h" #include "TrkTruthData/TrackTruthCollection.h" -//#include "TrkTruthToTrack/TruthToTrack.h" #include "TrkEventPrimitives/JacobianThetaPToCotThetaPt.h" #include "TrkParameters/TrackParameters.h" //vv #include "TrkToolInterfaces/ITrackSummaryTool.h" @@ -691,6 +690,7 @@ void InDet :: InDetRecStatisticsAlg :: printStatistics() { ATH_MSG_INFO("(or for guaranteed latest version: http://atlas-sw.cern.ch/cgi-bin/viewcvs-atlas.cgi/offline/InnerDetector/InDetValidation/InDetRecStatistics/doc/mainpage.h?&view=markup )"); ATH_MSG_INFO(" ********************************************************************"); // if(msgSvc.outputLevel() >= MSG::INFO){ + const auto prec=std::cout.precision(); StreamState restore_precision (std::cout); std::cout << MSG::INFO << std::setiosflags(std::ios::fixed | std::ios::showpoint) @@ -835,7 +835,7 @@ void InDet :: InDetRecStatisticsAlg :: printStatistics() { } ATH_MSG_INFO(" ********** Ending InDetRecStatistics Statistics Table ***********"); std::cout << s_linestr << std::endl; - + std::cout.precision(prec); } -- GitLab From db0936dc96fdb261a5ab387aafe8e293f4315e07 Mon Sep 17 00:00:00 2001 From: Goetz Gaycken <goetz.gaycken@cern.ch> Date: Tue, 17 Jul 2018 17:50:44 +0200 Subject: [PATCH 523/562] Replace tool for Pixel, SCT, TRT RIO error scaling by specialised conditions data. The Pixel, SCT and TRT RIO on track error scaling is now handled by specialised conditions data rather than a tool where the conditions data is created by conditions algorithm. Former-commit-id: 54495adbee31812290a4186fef83134f0ac10331 --- .../InDetRecExample/python/TrackingCommon.py | 85 +++++++ .../share/InDetRecLoadTools.py | 11 +- .../python/InDetTrigConfigRecLoadTools.py | 8 +- .../InDetRIO_OnTrack/CMakeLists.txt | 5 +- .../PixelRIO_OnTrackErrorScaling.h | 41 ++++ .../SCTRIO_OnTrackErrorScaling.h | 34 +++ .../TRTRIO_OnTrackErrorScaling.h | 31 +++ .../src/PixelRIO_OnTrackErrorScaling.cxx | 108 +++++++++ .../src/SCTRIO_OnTrackErrorScaling.cxx | 51 ++++ .../src/TRTRIO_OnTrackErrorScaling.cxx | 63 +++++ .../SiClusterOnTrackTool/CMakeLists.txt | 9 +- .../PixelClusterOnTrackTool.h | 35 +-- .../SCT_ClusterOnTrackTool.h | 8 +- .../src/PixelClusterOnTrackTool.cxx | 58 ++--- .../src/SCT_ClusterOnTrackTool.cxx | 44 ++-- .../TRT_DriftCircleOnTrackTool/CMakeLists.txt | 4 +- .../TRT_DriftCircleOnTrackRecalibrateTool.h | 18 +- .../TRT_DriftCircleOnTrackTool.h | 16 +- .../TRT_DriftCircleOnTrackRecalibrateTool.cxx | 46 ++-- .../src/TRT_DriftCircleOnTrackTool.cxx | 47 ++-- .../egammaRec/python/EMCommonRefitter.py | 6 +- .../TrkRIO_OnTrack/RIO_OnTrackErrorScaling.h | 41 ++++ .../TrkRIO_OnTrack/check_cast.h | 19 ++ .../src/RIO_OnTrackErrorScaling.cxx | 35 +++ .../TrkRIO_OnTrackCreator/CMakeLists.txt | 3 +- .../TrkRIO_OnTrackCreator/src/KitManager.cxx | 29 +++ .../TrkRIO_OnTrackCreator/src/KitManager.h | 57 +++++ .../src/RIO_OnTrackErrorScalingCondAlg.cxx | 221 ++++++++++++++++++ .../src/RIO_OnTrackErrorScalingCondAlg.h | 60 +++++ .../src/RIO_OnTrackErrorScalingIDKits.cxx | 65 ++++++ .../src/RIO_OnTrackErrorScalingKit.cxx | 18 ++ .../src/RIO_OnTrackErrorScalingKit.h | 36 +++ .../src/RIO_OnTrackErrorScalingTool.cxx | 4 + .../TrkRIO_OnTrackCreator_entries.cxx | 2 + Trigger/TrigFTK/FTK_RecTools/CMakeLists.txt | 3 +- .../FTK_PixelClusterOnTrackTool.h | 19 +- .../FTK_RecTools/FTK_SCTClusterOnTrackTool.h | 8 +- .../src/FTK_PixelClusterOnTrackTool.cxx | 30 +-- .../src/FTK_SCTClusterOnTrackTool.cxx | 44 ++-- .../python/TrigInDetTrackFitter_Config.py | 5 +- 40 files changed, 1196 insertions(+), 231 deletions(-) create mode 100644 InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py create mode 100644 InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/PixelRIO_OnTrackErrorScaling.h create mode 100644 InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/SCTRIO_OnTrackErrorScaling.h create mode 100644 InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/TRTRIO_OnTrackErrorScaling.h create mode 100644 InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/PixelRIO_OnTrackErrorScaling.cxx create mode 100644 InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SCTRIO_OnTrackErrorScaling.cxx create mode 100644 InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/TRTRIO_OnTrackErrorScaling.cxx create mode 100644 Tracking/TrkEvent/TrkRIO_OnTrack/TrkRIO_OnTrack/RIO_OnTrackErrorScaling.h create mode 100644 Tracking/TrkEvent/TrkRIO_OnTrack/TrkRIO_OnTrack/check_cast.h create mode 100644 Tracking/TrkEvent/TrkRIO_OnTrack/src/RIO_OnTrackErrorScaling.cxx create mode 100644 Tracking/TrkTools/TrkRIO_OnTrackCreator/src/KitManager.cxx create mode 100644 Tracking/TrkTools/TrkRIO_OnTrackCreator/src/KitManager.h create mode 100644 Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingCondAlg.cxx create mode 100644 Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingCondAlg.h create mode 100644 Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingIDKits.cxx create mode 100644 Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingKit.cxx create mode 100644 Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingKit.h diff --git a/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py b/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py new file mode 100644 index 000000000000..e964c9e3f02d --- /dev/null +++ b/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py @@ -0,0 +1,85 @@ + +def createAndAddCondAlg(creator, the_name) : + from AthenaCommon.AlgSequence import AlgSequence + from AthenaCommon.AlgSequence import AthSequencer + cond_seq=AthSequencer("AthCondSeq") + for seq in [AlgSequence(),cond_seq] : + print 'DEBUG createAndAddCondAlg match ? %s == %s ? %s ' % ( dir(seq),the_name,hasattr(seq,the_name) ) + if hasattr(seq,the_name) : + if seq.getName() != "AthCondSeq" : + raise Exception('Algorithm already in a sequnece but not the conditions seqence') + return + cond_seq += creator() + +def setDefaults(kwargs, **def_kwargs) : + def_kwargs.update(kwargs) + return def_kwargs + +def getRIO_OnTrackErrorScalingCondAlg( **kwargs) : + the_name=kwargs.pop("name",None) + from AtlasGeoModel.InDetGMJobProperties import InDetGeometryFlags as geoFlags + if geoFlags.isIBL() : + error_scaling_type = ["PixelRIO_OnTrackErrorScaling"] + error_scaling_outkey = ["/Indet/TrkErrorScalingPixel"] + else : + error_scaling_type = ["PixelRIO_OnTrackErrorScalingRun1"] + error_scaling_outkey = ["/Indet/TrkErrorScalingPixel"] + + error_scaling_type += ["SCTRIO_OnTrackErrorScaling"] + error_scaling_outkey += ["/Indet/TrkErrorScalingSCT"] + + error_scaling_type += ["TRTRIO_OnTrackErrorScaling"] + error_scaling_outkey += ["/Indet/TrkErrorScalingTRT"] + + from IOVDbSvc.CondDB import conddb + if not conddb.folderRequested( "/Indet/TrkErrorScaling" ): + print 'DEBUG request /Indet/TrkErrorScaling ' + conddb.addFolderSplitOnline('INDET','/Indet/Onl/TrkErrorScaling','/Indet/TrkErrorScaling', className="CondAttrListCollection") + else : + print 'DEBUG folder /Indet/TrkErrorScaling already requested.' + for elm in conddb.iovdbsvc.Folders : + print 'DEBUG IOVDbSvc folder %s' % elm + + from TrkRIO_OnTrackCreator.TrkRIO_OnTrackCreatorConf import RIO_OnTrackErrorScalingCondAlg + if the_name == None : + return RIO_OnTrackErrorScalingCondAlg( **setDefaults(kwargs, + ReadKey = "/Indet/TrkErrorScaling", + ErrorScalingType = error_scaling_type, + OutKeys = error_scaling_outkey) ) + else : + return RIO_OnTrackErrorScalingCondAlg( the_name, + **setDefaults(kwargs, + ReadKey = "/Indet/TrkErrorScaling", + ErrorScalingType = error_scaling_type, + OutKeys = error_scaling_outkey) ) + + + +def getEventInfoKey() : + from AthenaCommon.GlobalFlags import globalflags + isData = (globalflags.DataSource == 'data') + + eventInfoKey = "ByteStreamEventInfo" + if not isData: + eventInfoKey = "McEventInfo" + if globalflags.isOverlay() and isData : + if DetFlags.overlay.pixel_on() or DetFlags.overlay.SCT_on() or DetFlags.overlay.TRT_on(): + from OverlayCommonAlgs.OverlayFlags import overlayFlags + eventInfoKey = (overlayFlags.dataStore() + '+' + eventInfoKey).replace("StoreGateSvc+","") + else : + eventInfoKey = "McEventInfo" + return eventInfoKey + + +def getTRT_DriftCircleOnTrackTool() : + from AthenaCommon.AppMgr import ToolSvc + if not hasattr(ToolSvc,'TRT_DriftCircleOnTrackTool') : + createAndAddCondAlg(getRIO_OnTrackErrorScalingCondAlg,'RIO_OnTrackErrorScalingCondAlg') + from TRT_DriftCircleOnTrackTool.TRT_DriftCircleOnTrackToolConf import InDet__TRT_DriftCircleOnTrackTool + tool = InDet__TRT_DriftCircleOnTrackTool( EventInfoKey = getEventInfoKey(), + TRTErrorScalingKey = '/Indet/TrkErrorScalingTRT') + print 'DEBUG default name = %s' % (tool.getName()) + ToolSvc += tool + return tool + else : + return ToolSvc.TRT_DriftCircleOnTrackTool diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py index 7b4aab95c851..f5765e5bda0f 100755 --- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py @@ -5,6 +5,9 @@ # # ------------------------------------------------------------ +from InDetRecExample.TrackingCommon import createAndAddCondAlg +from InDetRecExample.TrackingCommon import getRIO_OnTrackErrorScalingCondAlg,getEventInfoKey, getTRT_DriftCircleOnTrackTool + use_broad_cluster_any = InDetFlags.useBroadClusterErrors() and (not InDetFlags.doDBMstandalone()) use_broad_cluster_pix = InDetFlags.useBroadPixClusterErrors() and (not InDetFlags.doDBMstandalone()) use_broad_cluster_sct = InDetFlags.useBroadSCTClusterErrors() and (not InDetFlags.doDBMstandalone()) @@ -315,10 +318,7 @@ if InDetFlags.loadRotCreator(): # # --- load error scaling # - from IOVDbSvc.CondDB import conddb - if not conddb.folderRequested( "/Indet/TrkErrorScaling" ): - #conddb.addFolder("INDET","/Indet/TrkErrorScaling") - conddb.addFolderSplitOnline('INDET','/Indet/Onl/TrkErrorScaling','/Indet/TrkErrorScaling') + createAndAddCondAlg(getRIO_OnTrackErrorScalingCondAlg,'RIO_OnTrackErrorScalingCondAlg') # # --- smart ROT creator in case we do the TRT LR in the refit # @@ -329,9 +329,10 @@ if InDetFlags.loadRotCreator(): if DetFlags.haveRIO.TRT_on(): from TRT_DriftCircleOnTrackTool.TRT_DriftCircleOnTrackToolConf import InDet__TRT_DriftCircleOnTrackUniversalTool - # --- this is the cut for making a TRT hit a tube hit (biases the distribution) + # --- this is the cut for making a TRT hit a tube hit (biases the distribution) TRT_RefitRotCreator = InDet__TRT_DriftCircleOnTrackUniversalTool(name = 'InDetTRT_RefitRotCreator', + RIOonTrackToolDrift = getTRT_DriftCircleOnTrackTool(), RIOonTrackToolTube = BroadTRT_DriftCircleOnTrackTool, ScaleHitUncertainty = ScaleHitUncertainty) # fix from Thijs ToolSvc += TRT_RefitRotCreator diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py index 3255f08d1999..af5f60012c08 100755 --- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py +++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py @@ -144,20 +144,20 @@ if InDetTrigFlags.loadRotCreator(): # load error scaling - from IOVDbSvc.CondDB import conddb - if not (conddb.folderRequested( "/Indet/TrkErrorScaling" ) or \ - conddb.folderRequested( "/Indet/Onl/TrkErrorScaling" )): - conddb.addFolderSplitOnline("INDET", "/Indet/Onl/TrkErrorScaling", "/Indet/TrkErrorScaling" ) + from InDetRecExample.TrackingCommon import createAndAddCondAlg, getRIO_OnTrackErrorScalingCondAlg + createAndAddCondAlg(getRIO_OnTrackErrorScalingCondAlg,'RIO_OnTrackErrorScalingCondAlg') # # smart ROT creator in case we do the TRT LR in the refit # if InDetTrigFlags.redoTRT_LR(): + from InDetRecExample.TrackingCommon import getTRT_DriftCircleOnTrackTool from TRT_DriftCircleOnTrackTool.TRT_DriftCircleOnTrackToolConf import \ InDet__TRT_DriftCircleOnTrackUniversalTool InDetTrigTRT_RefitRotCreator = \ InDet__TRT_DriftCircleOnTrackUniversalTool(name = 'InDetTrigTRT_RefitRotCreator', + RIOonTrackToolDrift = getTRT_DriftCircleOnTrackTool(), # special settings for trigger needed ? ScaleHitUncertainty = 2.5) # fix from Thijs # if InDetTrigFlags.doCommissioning(): #introduced for cosmics do not use for collisions # InDetTrigTRT_RefitRotCreator.ScaleHitUncertainty = 5. diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/CMakeLists.txt b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/CMakeLists.txt index cacbe06653c4..f14486e6c059 100644 --- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/CMakeLists.txt +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/CMakeLists.txt @@ -14,6 +14,7 @@ atlas_depends_on_subdirs( PUBLIC Tracking/TrkEvent/TrkEventPrimitives Tracking/TrkEvent/TrkRIO_OnTrack Event/EventContainers + Event/EventPrimitives PRIVATE InnerDetector/InDetDetDescr/InDetReadoutGeometry Tracking/TrkDetDescr/TrkSurfaces ) @@ -26,12 +27,12 @@ atlas_add_library( InDetRIO_OnTrack src/*.cxx PUBLIC_HEADERS InDetRIO_OnTrack PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES AthLinks Identifier GaudiKernel InDetPrepRawData TrkEventPrimitives TrkRIO_OnTrack EventContainers + LINK_LIBRARIES AthLinks Identifier GaudiKernel InDetPrepRawData TrkEventPrimitives TrkRIO_OnTrack EventContainers EventPrimitives PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} InDetReadoutGeometry TrkSurfaces ) atlas_add_dictionary( InDetRIO_OnTrackDict InDetRIO_OnTrack/InDetRIO_OnTrackDict.h InDetRIO_OnTrack/selection.xml INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks Identifier GaudiKernel InDetPrepRawData TrkEventPrimitives TrkRIO_OnTrack InDetReadoutGeometry TrkSurfaces InDetRIO_OnTrack EventContainers ) + LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks Identifier GaudiKernel InDetPrepRawData TrkEventPrimitives TrkRIO_OnTrack InDetReadoutGeometry TrkSurfaces InDetRIO_OnTrack EventContainers EventPrimitives) diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/PixelRIO_OnTrackErrorScaling.h b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/PixelRIO_OnTrackErrorScaling.h new file mode 100644 index 000000000000..a34fbe5beea0 --- /dev/null +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/PixelRIO_OnTrackErrorScaling.h @@ -0,0 +1,41 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ +#ifndef _PixelRIO_OnTrackErrorScaling_H_ +#define _PixelRIO_OnTrackErrorScaling_H_ + +#include "TrkRIO_OnTrack/RIO_OnTrackErrorScaling.h" +class PixelID; +class Identifier; + +class PixelRIO_OnTrackErrorScaling : public RIO_OnTrackErrorScaling +{ +public: + virtual CLID clid() const override; + + virtual Amg::MatrixX getScaledCovariance(const Amg::MatrixX& cov_input, + const PixelID& pixel_id, + const Identifier& id) const; + + enum EPixelErrorScalingRegions { + kPixBarrelPhi, + kPixBarrelEta, + kPixEndcapPhi, + kPixEndcapEta, + kPixIBLPhi, + kPixIBLEta, + kNParamTypes}; + + static const char **paramNames() { return s_names; } + virtual bool postProcess() override; + +protected: + static const char *s_names[kNParamTypes]; +}; + +CLASS_DEF( PixelRIO_OnTrackErrorScaling , 254709438 , 1 ) + +#include "AthenaKernel/CondCont.h" +CONDCONT_DEF(PixelRIO_OnTrackErrorScaling, 87055250, RIO_OnTrackErrorScaling); + +#endif diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/SCTRIO_OnTrackErrorScaling.h b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/SCTRIO_OnTrackErrorScaling.h new file mode 100644 index 000000000000..c023558cda0a --- /dev/null +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/SCTRIO_OnTrackErrorScaling.h @@ -0,0 +1,34 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ +#ifndef _SCTRIO_OnTrackErrorScaling_H_ +#define _SCTRIO_OnTrackErrorScaling_H_ + +#include "TrkRIO_OnTrack/RIO_OnTrackErrorScaling.h" +class SCTRIO_OnTrackErrorScaling : public RIO_OnTrackErrorScaling +{ +public: + virtual CLID clid() const override; + + virtual Amg::MatrixX getScaledCovariance(const Amg::MatrixX& cov_input, + bool is_endcap, + double sinLocalAngle) const; + + enum ESCTErrorScalingRegions { + kBarrel, + kEndcap, + kNParamTypes}; + + static const char **paramNames() { return s_names; } + virtual bool postProcess() override; +protected: + static const char *s_names[kNParamTypes]; +}; + + +CLASS_DEF( SCTRIO_OnTrackErrorScaling , 14458362, 1 ) + +#include "AthenaKernel/CondCont.h" +CONDCONT_DEF(SCTRIO_OnTrackErrorScaling, 6837094, RIO_OnTrackErrorScaling); + +#endif diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/TRTRIO_OnTrackErrorScaling.h b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/TRTRIO_OnTrackErrorScaling.h new file mode 100644 index 000000000000..134e29578eb7 --- /dev/null +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/TRTRIO_OnTrackErrorScaling.h @@ -0,0 +1,31 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ +#ifndef _TRTRIO_OnTrackErrorScaling_H_ +#define _TRTRIO_OnTrackErrorScaling_H_ + +#include "TrkRIO_OnTrack/RIO_OnTrackErrorScaling.h" +class TRTRIO_OnTrackErrorScaling : public RIO_OnTrackErrorScaling +{ +public: + virtual CLID clid() const override; + + virtual Amg::MatrixX getScaledCovariance(const Amg::MatrixX& cov_input, + bool is_endcap, + double mu) const; + + enum ETRTErrorScalingRegions { + kBarrel, + kEndcap, + kNParamTypes}; + + static const char **paramNames() { return s_names; } + virtual bool postProcess() override; +protected: + static const char *s_names[kNParamTypes]; +}; + + +CLASS_DEF( TRTRIO_OnTrackErrorScaling , 216884486, 1 ) +CONDCONT_DEF(TRTRIO_OnTrackErrorScaling, 112040354, RIO_OnTrackErrorScaling); +#endif diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/PixelRIO_OnTrackErrorScaling.cxx b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/PixelRIO_OnTrackErrorScaling.cxx new file mode 100644 index 000000000000..d69fe70b8076 --- /dev/null +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/PixelRIO_OnTrackErrorScaling.cxx @@ -0,0 +1,108 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ +#include "InDetRIO_OnTrack/PixelRIO_OnTrackErrorScaling.h" +#include "InDetIdentifier/PixelID.h" + +const char *PixelRIO_OnTrackErrorScaling::s_names[PixelRIO_OnTrackErrorScaling::kNParamTypes]={ + "PixPhi Barrel", + "PixEta Barrel", + "PixPhi Endcap", + "PixEta Endcap", + "PixPhi IBL", + "PixEta IBL" + }; + +namespace { + inline double square(double a) { return a*a; } + + void scale2by2( Amg::MatrixX& cov, + const std::vector<double>& phiTrafo, + const std::vector<double>& etaTrafo) + { + // careful not to change character of error + double corr = (std::abs(cov(0,1)) > 1.0e-20) + ? cov(0,1)/(cov(0,0)*cov(1,1)) + : 0.0; + cov(0,0) *= square(phiTrafo[0]); + cov(0,0) += square(phiTrafo[1]); + cov(1,1) *= square(etaTrafo[0]); + cov(1,1) += square(etaTrafo[1]); + if (corr !=0.0) { + cov(0,1) = corr*cov(0,0)*cov(1,1); + cov(1,0) = cov(0,1); + } + } +} + +CLID PixelRIO_OnTrackErrorScaling::clid() const { + return ClassID_traits<CondCont<PixelRIO_OnTrackErrorScaling> >::ID(); +} + +bool PixelRIO_OnTrackErrorScaling::postProcess() { + if (params().size() != kPixIBLPhi && params().size() != kNParamTypes ) { + std::stringstream message; + message << " PixelRIO_OnTrackErrorScaling: Expecting parameters for"; + { + unsigned int idx=0; + for (; idx < kPixIBLPhi; ++idx) { + message << " " << s_names[idx]; + } + message << "(" << kPixIBLPhi << ")" << " and "; + for (; idx < kNParamTypes; ++idx) { + message << " " << s_names[idx]; + } + message << "(" << kNParamTypes << ") for run2."; + } + message << " But got " << params().size() << "."; + throw std::runtime_error( message.str() ); + } + for (unsigned int idx=0; idx <params().size(); ++idx) { + if (params()[idx].size()!=2 ) { + assert( idx < kNParamTypes); + std::stringstream message; + message << " PixelRIO_OnTrackErrorScaling: Expected 2 parameters for " << s_names[idx] << " but got " << params()[idx].size() + << "."; + throw std::runtime_error( message.str() ); + } + } + return true; +} + +Amg::MatrixX PixelRIO_OnTrackErrorScaling::getScaledCovariance(const Amg::MatrixX& cov_input, + const PixelID &pixel_id, + const Identifier& id) const +{ + + Amg::MatrixX newCov(cov_input); + assert( &pixel_id ); + + // from SiDetectorElement::isEndcap + bool is_endcap = !(pixel_id.is_barrel(id) || pixel_id.is_dbm(id)); + unsigned int idx=kNParamTypes; + + if (is_endcap) { + idx=kPixEndcapPhi; + } else { + + // from PixelDigitizationTool::getReadoutTech + int barrel_ec = pixel_id.barrel_ec(id); + bool is_ibl = abs(barrel_ec)==4 || pixel_id.eta_module_max(id)>6; + if (is_ibl) { + idx = kPixIBLPhi; + } + else { + idx = kPixBarrelPhi; + } + } + + // checked in postprocess + assert( params().size()>idx+1); + assert( params()[idx].size()>1 + && params()[idx+1].size()>1 ); + + scale2by2(newCov,params()[idx] /* phi */ ,params()[idx+1] /* eta */); + // std::cout << "DEBUG createScaledPixelCovariance region:" << s_names[idx] << " " << cov_input << " -> " << newCov << std::endl; + return newCov; +} + diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SCTRIO_OnTrackErrorScaling.cxx b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SCTRIO_OnTrackErrorScaling.cxx new file mode 100644 index 000000000000..1c69e3795334 --- /dev/null +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SCTRIO_OnTrackErrorScaling.cxx @@ -0,0 +1,51 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ +#include "InDetRIO_OnTrack/SCTRIO_OnTrackErrorScaling.h" +#include <iostream> + +const char *SCTRIO_OnTrackErrorScaling::s_names[SCTRIO_OnTrackErrorScaling::kNParamTypes]={ + "SCT Barrel", + "SCT Endcap" + }; + +namespace { + inline double square(double a) { return a*a; } +} + +CLID SCTRIO_OnTrackErrorScaling::clid() const { + return ClassID_traits<CondCont<SCTRIO_OnTrackErrorScaling> >::ID(); +} + +bool SCTRIO_OnTrackErrorScaling::postProcess() { + checkParameters("SCTRIO_OnTrackErrorScaling", kNParamTypes, s_names, 2); + return true; +} + +Amg::MatrixX SCTRIO_OnTrackErrorScaling::getScaledCovariance(const Amg::MatrixX& cov_input, + bool is_endcap, + double sinLocalAngle) const +{ + Amg::MatrixX newCov(cov_input); + if (is_endcap && newCov.rows() > 1) { + double Sn = sinLocalAngle; + double Sn2 = square(Sn); + double Cs2 = (1.-Sn)*(1.+Sn); + double SC = Sn*sqrt(Cs2); + double a = params()[kEndcap][0]; + double b = params()[kEndcap][1]; + double dV0 = (Cs2*newCov(0,0)+Sn2*newCov(1,1) + +2.*SC*newCov(1,0))*(square(a)-1.) + square(b); + newCov(0,0)+= (Cs2*dV0); + newCov(1,0)+= (SC *dV0); + newCov(0,1) = newCov(1,0); + newCov(1,1)+= (Sn2*dV0); + } else { + double a = (is_endcap) ? params()[kEndcap][0] : params()[kBarrel][0]; + double b = (is_endcap) ? params()[kEndcap][1] : params()[kBarrel][1]; + newCov(0,0) *= square(a); + newCov(0,0) += square(b); + } + //std::cout << "DEBUG createScaledSctCovariance endcap:" << is_endcap << " angle=" << sinLocalAngle << " " << cov_input << " -> " << newCov << std::endl; + return newCov; +} diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/TRTRIO_OnTrackErrorScaling.cxx b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/TRTRIO_OnTrackErrorScaling.cxx new file mode 100644 index 000000000000..95362b0fca81 --- /dev/null +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/TRTRIO_OnTrackErrorScaling.cxx @@ -0,0 +1,63 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ +#include "InDetRIO_OnTrack/TRTRIO_OnTrackErrorScaling.h" +#include <iostream> + +const char *TRTRIO_OnTrackErrorScaling::s_names[TRTRIO_OnTrackErrorScaling::kNParamTypes]={ + "TRT Barrel", + "TRT Endcap" + }; + +namespace { + inline double square(double a) { return a*a; } +} + +CLID TRTRIO_OnTrackErrorScaling::clid() const { + return ClassID_traits<CondCont<TRTRIO_OnTrackErrorScaling> >::ID(); +} + +bool TRTRIO_OnTrackErrorScaling::postProcess() { + if (params().size() != kNParamTypes ) { + std::stringstream message; + message << " TRTRIO_OnTrackErrorScaling: Expecting parameters for et least 2 parameters for"; + for (unsigned int idx=0; idx < kNParamTypes; ++idx) { + message << " " << s_names[idx]; + } + message << "(" << kNParamTypes << ") for run2."; + message << " But got " << params().size() << "."; + throw std::runtime_error( message.str() ); + } + for (unsigned int idx=0; idx<params().size(); ++idx) { + if (params()[idx].size() != 3) { + if (params()[idx].size() == 2) { + params()[idx].push_back(0.); + } + else { + assert( idx < kNParamTypes ); + std::stringstream message; + message << " TRTRIO_OnTrackErrorScaling: Expected 2 or 3 parameters for " << s_names[idx] << " but got " << params()[idx].size() + << "."; + throw std::runtime_error( message.str() ); + } + } + } + return true; +} + +Amg::MatrixX TRTRIO_OnTrackErrorScaling::getScaledCovariance(const Amg::MatrixX& cov_input, + bool is_endcap, + double mu) const +{ + Amg::MatrixX newCov(cov_input); + double a = (is_endcap) ? params()[kEndcap][0] : params()[kBarrel][0]; + double b = (is_endcap) ? params()[kEndcap][1] : params()[kBarrel][1]; + double c = (is_endcap) ? params()[kEndcap][2] : params()[kBarrel][2]; + newCov(0,0) *= square(a); + newCov(0,0) += square(b); + newCov(0,0) *= (1. + mu * c); + // std::cout << "DEBUG createScaledTrtCovariance endcap:" << is_endcap << " mu=" << mu << " " << cov_input << " -> " << newCov << std::endl; + return newCov; +} + + diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/CMakeLists.txt b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/CMakeLists.txt index 35cd641b82d0..a6ec92073a6a 100644 --- a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/CMakeLists.txt +++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/CMakeLists.txt @@ -7,7 +7,7 @@ atlas_subdir( SiClusterOnTrackTool ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - Control/AthenaBaseComps + Control/AthenaBaseComps Database/AthenaPOOL/AthenaPoolUtilities DetectorDescription/GeoPrimitives GaudiKernel @@ -16,10 +16,11 @@ atlas_depends_on_subdirs( PUBLIC InnerDetector/InDetRecEvent/InDetPrepRawData InnerDetector/InDetRecEvent/InDetRIO_OnTrack Tracking/TrkEvent/TrkParameters - Tracking/TrkTools/TrkToolInterfaces + Tracking/TrkTools/TrkToolInterfaces Tracking/TrkTools/TrkAmbiguityProcessor - PRIVATE + Tracking/TrkEvent/TrkRIO_OnTrack Control/StoreGate + PRIVATE Event/EventPrimitives InnerDetector/InDetConditions/PixelConditionsServices InnerDetector/InDetConditions/PixelConditionsTools @@ -37,7 +38,7 @@ atlas_add_component( SiClusterOnTrackTool src/*.cxx src/components/*.cxx INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps AthenaPoolUtilities GeoPrimitives GaudiKernel InDetPrepRawData InDetRIO_OnTrack TrkParameters TrkToolInterfaces TrkAmbiguityProcessorLib StoreGateLib SGtests EventPrimitives InDetIdentifier InDetReadoutGeometry SiClusterizationToolLib TrkSurfaces ) + LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps AthenaPoolUtilities GeoPrimitives GaudiKernel InDetPrepRawData InDetRIO_OnTrack TrkParameters TrkToolInterfaces TrkAmbiguityProcessorLib StoreGateLib SGtests EventPrimitives InDetIdentifier InDetReadoutGeometry SiClusterizationToolLib TrkSurfaces TrkRIO_OnTrack) # Install files from the package: atlas_install_headers( SiClusterOnTrackTool ) diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/PixelClusterOnTrackTool.h b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/PixelClusterOnTrackTool.h index 64fc07a87f0a..b3e979eebc76 100755 --- a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/PixelClusterOnTrackTool.h +++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/PixelClusterOnTrackTool.h @@ -18,6 +18,7 @@ #include "TrkToolInterfaces/IRIO_OnTrackCreator.h" +#include "InDetRIO_OnTrack/PixelRIO_OnTrackErrorScaling.h" /** The following cannot be fwd declared for interesting reason; the return type of * 'correct' is InDet::PixelClusterOnTrack* here, but in the baseclass is * Trk::RIO_OnTrack*. This works if the inheritance is known, but fwd declaration results @@ -33,12 +34,12 @@ #include "TrkParameters/TrackParameters.h" #include "GeoPrimitives/GeoPrimitives.h" #include "TrkAmbiguityProcessor/dRMap.h" + +#include "AthenaPoolUtilities/CondAttrListCollection.h" +#include "StoreGate/ReadCondHandleKey.h" class PixelID; class IPixelOfflineCalibSvc; class IModuleDistortionsTool; -namespace Trk{ - class IRIO_OnTrackErrorScalingTool; -} class StoreGateSvc; class IIBLParameterSvc; @@ -102,22 +103,21 @@ public: virtual const InDet::PixelClusterOnTrack* correct(const Trk::PrepRawData&, const Trk::TrackParameters&) const override; - virtual const InDet::PixelClusterOnTrack* correctDefault(const Trk::PrepRawData&, + virtual const InDet::PixelClusterOnTrack* correctDefault(const Trk::PrepRawData&, const Trk::TrackParameters&) const; virtual const InDet::PixelClusterOnTrack* correctNN(const Trk::PrepRawData&, const Trk::TrackParameters&) const; - - virtual bool getErrorsDefaultAmbi( const InDet::PixelCluster*, const Trk::TrackParameters&, + virtual bool getErrorsDefaultAmbi( const InDet::PixelCluster*, const Trk::TrackParameters&, + Amg::Vector2D&, Amg::MatrixX&) const; + + virtual bool getErrorsTIDE_Ambi( const InDet::PixelCluster*, const Trk::TrackParameters&, Amg::Vector2D&, Amg::MatrixX&) const; - - virtual bool getErrorsTIDE_Ambi( const InDet::PixelCluster*, const Trk::TrackParameters&, - Amg::Vector2D&, Amg::MatrixX&) const; virtual const InDet::PixelClusterOnTrack* correct (const Trk::PrepRawData&, const Trk::TrackParameters&, const InDet::PixelClusterStrategy) const; - + /////////////////////////////////////////////////////////////////// // Private methods: /////////////////////////////////////////////////////////////////// @@ -138,9 +138,14 @@ public: /////////////////////////////////////////////////////////////////// ToolHandle<IModuleDistortionsTool> m_pixDistoTool ; - ToolHandle<Trk::IRIO_OnTrackErrorScalingTool> m_errorScalingTool; ServiceHandle<IPixelOfflineCalibSvc> m_calibSvc ; StoreGateSvc* m_detStore ; + + // SG::ReadCondHandleKey<PixelRIO_OnTrackErrorScaling> m_pixelErrorScalingKey + // {this,"PixelErrorScalingKey", "/Indet/TrkErrorScalingPixel", "Key for pixel error scaling conditions data."}; + SG::ReadCondHandleKey<RIO_OnTrackErrorScaling> m_pixelErrorScalingKey + {this,"PixelErrorScalingKey", "/Indet/TrkErrorScalingPixel", "Key for pixel error scaling conditions data."}; + /* ME: Test histos have nothing to do with production code, use a flag IHistogram1D* m_h_Resx; IHistogram1D* m_h_Resy; @@ -154,7 +159,6 @@ public: //! toolhandle for central error scaling //! flag storing if errors need scaling or should be kept nominal - bool m_scalePixelCov ; bool m_disableDistortions; bool m_rel13like ; int m_positionStrategy ; @@ -179,8 +183,8 @@ public: /** Enable NN based calibration (do only if NN calibration is applied) **/ mutable bool m_applyNNcorrection; mutable bool m_applydRcorrection; - bool m_NNIBLcorrection; - bool m_IBLAbsent; + bool m_NNIBLcorrection; + bool m_IBLAbsent; /** NN clusterizationi factory for NN based positions and errors **/ ToolHandle<NnClusterizationFactory> m_NnClusterizationFactory; @@ -193,8 +197,7 @@ public: bool m_doNotRecalibrateNN; bool m_noNNandBroadErrors; - - /** Enable different treatment of cluster errors based on NN information (do only if TIDE ambi is run) **/ + /** Enable different treatment of cluster errors based on NN information (do only if TIDE ambi is run) **/ bool m_usingTIDE_Ambi; SG::ReadHandleKey<InDet::PixelGangedClusterAmbiguities> m_splitClusterHandle; mutable std::vector< std::vector<float> > m_fX, m_fY, m_fB, m_fC, m_fD; diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/SCT_ClusterOnTrackTool.h b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/SCT_ClusterOnTrackTool.h index 3ebadd3603f8..b877b3b21f3d 100755 --- a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/SCT_ClusterOnTrackTool.h +++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/SCT_ClusterOnTrackTool.h @@ -18,7 +18,7 @@ #include "GaudiKernel/ToolHandle.h" #include "AthenaBaseComps/AthAlgTool.h" #include "TrkToolInterfaces/IRIO_OnTrackCreator.h" -#include "TrkToolInterfaces/IRIO_OnTrackErrorScalingTool.h" +#include "InDetRIO_OnTrack/SCTRIO_OnTrackErrorScaling.h" #include "TrkParameters/TrackParameters.h" #include "InDetRIO_OnTrack/SCT_ClusterOnTrack.h" #include "SCT_ModuleDistortions/ISCT_ModuleDistortionsTool.h" @@ -91,7 +91,11 @@ public: /////////////////////////////////////////////////////////////////// //! toolhandle for central error scaling - ToolHandle< Trk::IRIO_OnTrackErrorScalingTool > m_errorScalingTool; + // SG::ReadCondHandleKey<SCTRIO_OnTrackErrorScaling> m_sctErrorScalingKey + // {this,"SCTErrorScalingKey", "/Indet/TrkErrorScalingSCT", "Key for SCT error scaling conditions data."}; + SG::ReadCondHandleKey<RIO_OnTrackErrorScaling> m_sctErrorScalingKey + {this,"SCTErrorScalingKey", "/Indet/TrkErrorScalingSCT", "Key for SCT error scaling conditions data."}; + ToolHandle<ISCT_ModuleDistortionsTool> m_distortionsTool; ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SiLorentzAngleTool", "Tool to retreive Lorentz angle"}; //! flag storing if errors need scaling or should be kept nominal diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/PixelClusterOnTrackTool.cxx b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/PixelClusterOnTrackTool.cxx index 0f43976e48eb..9914b2dc842b 100755 --- a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/PixelClusterOnTrackTool.cxx +++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/PixelClusterOnTrackTool.cxx @@ -13,7 +13,6 @@ /////////////////////////////////////////////////////////////////// #include "SiClusterOnTrackTool/PixelClusterOnTrackTool.h" -#include "TrkToolInterfaces/IRIO_OnTrackErrorScalingTool.h" #include "InDetReadoutGeometry/SiDetectorManager.h" #include "InDetReadoutGeometry/PixelModuleDesign.h" #include "InDetIdentifier/PixelID.h" @@ -31,13 +30,16 @@ #include "CoralBase/Attribute.h" #include "AthenaPoolUtilities/CondAttrListCollection.h" #include "AthenaPoolUtilities/AthenaAttributeList.h" +#include "StoreGate/ReadCondHandle.h" #include <cmath> +#include "TrkRIO_OnTrack/check_cast.h" using CLHEP::mm; using CLHEP::micrometer; //clustermap is most likely to be removed at later date #define __clustermap + /////////////////////////////////////////////////////////////////// // Constructor /////////////////////////////////////////////////////////////////// @@ -70,15 +72,12 @@ namespace static double TOPHAT_SIGMA = 1. / std::sqrt(12.); } - InDet::PixelClusterOnTrackTool::PixelClusterOnTrackTool (const std::string &t, const std::string &n, const IInterface *p) : ::AthAlgTool(t, n, p), m_pixDistoTool("PixelDistortionsTool", this), - m_errorScalingTool("Trk::RIO_OnTrackErrorScalingTool/RIO_OnTrackErrorScalingTool", this), m_calibSvc("PixelOfflineCalibSvc", n), m_detStore(nullptr), - m_scalePixelCov(false), m_disableDistortions(false), m_rel13like(false), m_pixelid(nullptr), @@ -97,7 +96,6 @@ InDet::PixelClusterOnTrackTool::PixelClusterOnTrackTool m_splitClusterHandle("SplitClusterAmbiguityMap") { declareInterface<IRIO_OnTrackCreator>(this); - declareProperty("ErrorScalingTool", m_errorScalingTool, "The error scaling tool"); declareProperty("PixelDistortionsTool", m_pixDistoTool, "Tool to retrieve pixel distortions"); declareProperty("PositionStrategy", m_positionStrategy = 1, "Which calibration of cluster positions"); declareProperty("ErrorStrategy", m_errorStrategy = 2, "Which calibration of cluster position errors"); @@ -144,13 +142,11 @@ InDet::PixelClusterOnTrackTool::initialize() { // get the offline calibration service ATH_CHECK( m_calibSvc.retrieve()); ATH_MSG_DEBUG("Retrieved tool " << m_calibSvc.type()); - + // get the error scaling tool - ATH_CHECK(m_errorScalingTool.retrieve()); - ATH_MSG_DEBUG("Retrieved tool " << m_errorScalingTool); - m_scalePixelCov = m_errorScalingTool->needToScalePixel(); - if (m_scalePixelCov) { + if (!m_pixelErrorScalingKey.key().empty()) { + ATH_CHECK(m_pixelErrorScalingKey.initialize()); ATH_MSG_DEBUG("Detected need for scaling Pixel errors."); } @@ -326,6 +322,8 @@ InDet::PixelClusterOnTrackTool::correct } } + + /** The correct method produces a PixelClusterOnTrack using the * measured PixelCluster and the track prediction. */ @@ -652,14 +650,10 @@ InDet::PixelClusterOnTrackTool::correctDefault ATH_MSG_VERBOSE(" errphi = " << errphi << " erreta = " << erreta); // create new copy of error matrix - if (m_scalePixelCov) { - Amg::MatrixX *newCov = m_errorScalingTool->createScaledPixelCovariance(cov, element->identify()); - if (!newCov) { - ATH_MSG_WARNING("Failed to create scaled error for Pixel"); - return 0; - } - cov = *newCov; - delete newCov; + if (!m_pixelErrorScalingKey.key().empty()) { + //SG::ReadCondHandle<PixelRIO_OnTrackErrorScaling> error_scaling( m_pixelErrorScalingKey ); + SG::ReadCondHandle<RIO_OnTrackErrorScaling> error_scaling( m_pixelErrorScalingKey ); + cov = check_cast<PixelRIO_OnTrackErrorScaling>(*error_scaling)->getScaledCovariance( cov, *m_pixelid, element->identify() ); } bool isbroad = (m_errorStrategy == 0) ? true : false; return new InDet::PixelClusterOnTrack(pix, locpar, cov, iH, glob, pix->gangedPixel(), isbroad); @@ -740,16 +734,12 @@ InDet::PixelClusterOnTrackTool::correctNN Amg::MatrixX cov = pixelPrepCluster->localCovariance(); // create new copy of error matrix - if (m_scalePixelCov) { - Amg::MatrixX *newCov = m_errorScalingTool->createScaledPixelCovariance(cov, element->identify()); - if (!newCov) { - ATH_MSG_WARNING("Failed to create scaled error for Pixel"); - return 0; - } - cov = *newCov; - - delete newCov; - } + // @TODO error scaling does not seem to be used + // if (!m_pixelErrorScalingKey.key().empty()) { + // SG::ReadCondHandle<PixelRIO_OnTrackErrorScaling> error_scaling( m_pixelErrorScalingKey ); + // SG::ReadCondHandle<RIO_OnTrackErrorScaling> error_scaling( m_pixelErrorScalingKey ); + // cov = check_cast<PixelRIO_OnTrackErrorScaling>(*error_scaling)->getScaledCovariance( cov, *m_pixelid, element->identify() ); + // } return new InDet::PixelClusterOnTrack(pixelPrepCluster, locpar, cov, iH, glob, pixelPrepCluster->gangedPixel(), false); @@ -795,14 +785,10 @@ InDet::PixelClusterOnTrackTool::correctNN Amg::MatrixX cov = finalerrormatrix; // create new copy of error matrix - if (m_scalePixelCov) { - Amg::MatrixX *newCov = m_errorScalingTool->createScaledPixelCovariance(cov, element->identify()); - if (!newCov) { - ATH_MSG_WARNING("Failed to create scaled error for Pixel"); - return 0; - } - // cov = *newCov; - delete newCov; + if (!m_pixelErrorScalingKey.key().empty()) { + // SG::ReadCondHandle<PixelRIO_OnTrackErrorScaling> error_scaling( m_pixelErrorScalingKey ); + SG::ReadCondHandle<RIO_OnTrackErrorScaling> error_scaling( m_pixelErrorScalingKey ); + cov = check_cast<PixelRIO_OnTrackErrorScaling>(*error_scaling)->getScaledCovariance( cov, *m_pixelid, element->identify() ); } InDetDD::SiLocalPosition centroid = InDetDD::SiLocalPosition(finalposition[1], diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/SCT_ClusterOnTrackTool.cxx b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/SCT_ClusterOnTrackTool.cxx index 27c58bf40a5f..45d83a9cd5d6 100755 --- a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/SCT_ClusterOnTrackTool.cxx +++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/SCT_ClusterOnTrackTool.cxx @@ -17,6 +17,7 @@ #include "TrkSurfaces/RectangleBounds.h" #include "TrkSurfaces/TrapezoidBounds.h" #include <cmath> +#include "TrkRIO_OnTrack/check_cast.h" using CLHEP::micrometer; using CLHEP::deg; @@ -28,9 +29,7 @@ using CLHEP::deg; InDet::SCT_ClusterOnTrackTool::SCT_ClusterOnTrackTool (const std::string &t, const std::string &n, const IInterface *p) : AthAlgTool(t, n, p), - m_errorScalingTool("Trk::RIO_OnTrackErrorScalingTool/RIO_OnTrackErrorScalingTool", this), m_distortionsTool("SCT_DistortionsTool", this), - m_scaleSctCov(false), m_option_make2dimBarrelClusters(false), m_doDistortions(false), m_option_errorStrategy(-1), @@ -38,8 +37,6 @@ InDet::SCT_ClusterOnTrackTool::SCT_ClusterOnTrackTool // declareInterface<SCT_ClusterOnTrackTool>(this); declareInterface<IRIO_OnTrackCreator>(this); - declareProperty("ErrorScalingTool", m_errorScalingTool, - "The toolhandle for central error scaling"); declareProperty("MakeTwoDimBarrelClusters", m_option_make2dimBarrelClusters, "flag if strip length should be part of the measurement"); declareProperty("ErrorStrategy", m_option_errorStrategy, @@ -89,15 +86,10 @@ InDet::SCT_ClusterOnTrackTool::initialize() { msg(MSG::INFO) << "SCT cluster positions will be corrected" << endmsg; } - if (m_errorScalingTool.retrieve().isFailure()) { - msg(MSG::FATAL) << "Failed to retrieve tool " << m_errorScalingTool << endmsg; - return StatusCode::FAILURE; - } else { - msg(MSG::INFO) << "Retrieved tool " << m_errorScalingTool << endmsg; - m_scaleSctCov = m_errorScalingTool->needToScaleSct(); - if (m_scaleSctCov) { - msg(MSG::DEBUG) << "Detected need for scaling SCT errors." << endmsg; - } + // get the error scaling tool + if (!m_sctErrorScalingKey.key().empty()) { + ATH_CHECK(m_sctErrorScalingKey.initialize()); + ATH_MSG_DEBUG("Detected need for scaling sct errors."); } // Get ISCT_ModuleDistortionsTool @@ -243,26 +235,18 @@ InDet::SCT_ClusterOnTrackTool::correct cov(0, 0) = oldcov(0, 0); } - if (m_scaleSctCov) { - Amg::MatrixX *newCov = m_errorScalingTool->createScaledSctCovariance(cov, false, 0.0); - if (!newCov) { - ATH_MSG_WARNING("Failed to create scaled error for SCT"); - return 0; - } - cov = *newCov; - delete newCov; + if (!m_sctErrorScalingKey.key().empty()) { + //SG::ReadCondHandle<SCTRIO_OnTrackErrorScaling> error_scaling( m_sctErrorScalingKey ); + SG::ReadCondHandle<RIO_OnTrackErrorScaling> error_scaling( m_sctErrorScalingKey ); + cov = check_cast<SCTRIO_OnTrackErrorScaling>(*error_scaling)->getScaledCovariance( cov, false, 0.0); } }else { // endcap locpar = Trk::LocalParameters(SC->localPosition()); - if (m_scaleSctCov) { - Amg::MatrixX *newCov = m_errorScalingTool->createScaledSctCovariance(cov, true, - EL->sinStereoLocal(SC->localPosition())); - if (!newCov) { - ATH_MSG_WARNING("Failed to create scaled error for SCT"); - return 0; - } - cov = *newCov; - delete newCov; + if (!m_sctErrorScalingKey.key().empty()) { + // SG::ReadCondHandle<SCTRIO_OnTrackErrorScaling> error_scaling( m_sctErrorScalingKey ); + SG::ReadCondHandle<RIO_OnTrackErrorScaling> error_scaling( m_sctErrorScalingKey ); + cov = check_cast<SCTRIO_OnTrackErrorScaling>(*error_scaling)->getScaledCovariance( cov, true, + EL->sinStereoLocal(SC->localPosition())); } double Sn = EL->sinStereoLocal(SC->localPosition()); double Sn2 = Sn * Sn; diff --git a/InnerDetector/InDetRecTools/TRT_DriftCircleOnTrackTool/CMakeLists.txt b/InnerDetector/InDetRecTools/TRT_DriftCircleOnTrackTool/CMakeLists.txt index 7579f5a89ecf..98f33bef063b 100644 --- a/InnerDetector/InDetRecTools/TRT_DriftCircleOnTrackTool/CMakeLists.txt +++ b/InnerDetector/InDetRecTools/TRT_DriftCircleOnTrackTool/CMakeLists.txt @@ -11,6 +11,8 @@ atlas_depends_on_subdirs( PUBLIC GaudiKernel InnerDetector/InDetRecEvent/InDetRIO_OnTrack Tracking/TrkTools/TrkToolInterfaces + Tracking/TrkEvent/TrkRIO_OnTrack + Event/xAOD/xAODEventInfo PRIVATE InnerDetector/InDetDetDescr/InDetReadoutGeometry InnerDetector/InDetRecTools/TRT_DriftFunctionTool @@ -20,7 +22,7 @@ atlas_depends_on_subdirs( PUBLIC atlas_add_component( TRT_DriftCircleOnTrackTool src/*.cxx src/components/*.cxx - LINK_LIBRARIES AthenaBaseComps GaudiKernel InDetRIO_OnTrack TrkToolInterfaces InDetReadoutGeometry TrkEventPrimitives ) + LINK_LIBRARIES AthenaBaseComps GaudiKernel InDetRIO_OnTrack TrkRIO_OnTrack TrkToolInterfaces InDetReadoutGeometry TrkEventPrimitives TrkRIO_OnTrack xAODEventInfo) # Install files from the package: atlas_install_headers( TRT_DriftCircleOnTrackTool ) diff --git a/InnerDetector/InDetRecTools/TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackRecalibrateTool.h b/InnerDetector/InDetRecTools/TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackRecalibrateTool.h index f5d4055c0478..210bf0892f94 100755 --- a/InnerDetector/InDetRecTools/TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackRecalibrateTool.h +++ b/InnerDetector/InDetRecTools/TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackRecalibrateTool.h @@ -15,13 +15,11 @@ #include "GaudiKernel/ToolHandle.h" #include "AthenaBaseComps/AthAlgTool.h" #include "TrkToolInterfaces/IRIO_OnTrackCreator.h" +#include "InDetRIO_OnTrack/TRTRIO_OnTrackErrorScaling.h" +#include "xAODEventInfo/EventInfo.h" class ITRT_DriftFunctionTool; -namespace Trk { - - class IRIO_OnTrackErrorScalingTool; -} namespace InDet { @@ -57,10 +55,16 @@ public: // Private data: /////////////////////////////////////////////////////////////////// - ToolHandle<Trk::IRIO_OnTrackCreator> m_riontrackTube ; + ToolHandle<Trk::IRIO_OnTrackCreator> m_riontrackTube ; ToolHandle<ITRT_DriftFunctionTool> m_drifttool ; - ToolHandle<Trk::IRIO_OnTrackErrorScalingTool> m_errorScalingTool; - bool m_scaleTrtCov{} ; + + SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey + {this,"EventInfoKey","EventInfo","Key for xAOD::EventInfo"}; + + // SG::ReadCondHandleKey<TRTRIO_OnTrackErrorScaling> m_trtErrorScalingKey + SG::ReadCondHandleKey<RIO_OnTrackErrorScaling> m_trtErrorScalingKey + {this,"TRTErrorScalingKey", "/Indet/TrkErrorScalingTRT", "Key for TRT error scaling conditions data."}; + bool m_useToTCorrection{}; //!< Shall the Time over Threshold correction be used? double m_scalefactor{} ; //scale factor for hit uncertainty diff --git a/InnerDetector/InDetRecTools/TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackTool.h b/InnerDetector/InDetRecTools/TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackTool.h index 35020c32c594..06b3e5a904d0 100755 --- a/InnerDetector/InDetRecTools/TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackTool.h +++ b/InnerDetector/InDetRecTools/TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackTool.h @@ -19,11 +19,8 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "TrkToolInterfaces/IRIO_OnTrackCreator.h" #include "InDetRIO_OnTrack/TRT_DriftCircleOnTrack.h" - -namespace Trk { - - class IRIO_OnTrackErrorScalingTool; -} +#include "InDetRIO_OnTrack/TRTRIO_OnTrackErrorScaling.h" +#include "xAODEventInfo/EventInfo.h" namespace InDet { @@ -58,9 +55,14 @@ public: /////////////////////////////////////////////////////////////////// // Private data: /////////////////////////////////////////////////////////////////// + SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey + {this,"EventInfoKey","EventInfo","Key for xAOD::EventInfo"}; + + // SG::ReadCondHandleKey<TRTRIO_OnTrackErrorScaling> m_trtErrorScalingKey + SG::ReadCondHandleKey<RIO_OnTrackErrorScaling> m_trtErrorScalingKey + {this,"TRTErrorScalingKey", "/Indet/TrkErrorScalingTRT", "Key for TRT error scaling conditions data."}; + - ToolHandle<Trk::IRIO_OnTrackErrorScalingTool> m_errorScalingTool ; - bool m_scaleTrtCov ; bool m_useErrorCorrection; }; diff --git a/InnerDetector/InDetRecTools/TRT_DriftCircleOnTrackTool/src/TRT_DriftCircleOnTrackRecalibrateTool.cxx b/InnerDetector/InDetRecTools/TRT_DriftCircleOnTrackTool/src/TRT_DriftCircleOnTrackRecalibrateTool.cxx index d08d0ae677d8..5d5e1db671d4 100755 --- a/InnerDetector/InDetRecTools/TRT_DriftCircleOnTrackTool/src/TRT_DriftCircleOnTrackRecalibrateTool.cxx +++ b/InnerDetector/InDetRecTools/TRT_DriftCircleOnTrackTool/src/TRT_DriftCircleOnTrackRecalibrateTool.cxx @@ -13,10 +13,10 @@ #include "TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackRecalibrateTool.h" #include "InDetRIO_OnTrack/TRT_DriftCircleOnTrack.h" -#include "TrkToolInterfaces/IRIO_OnTrackErrorScalingTool.h" #include "TrkEventPrimitives/LocalParameters.h" #include "TRT_DriftFunctionTool/ITRT_DriftFunctionTool.h" #include "InDetReadoutGeometry/TRT_DetectorManager.h" +#include "TrkRIO_OnTrack/check_cast.h" /////////////////////////////////////////////////////////////////// @@ -28,17 +28,14 @@ InDet::TRT_DriftCircleOnTrackRecalibrateTool::TRT_DriftCircleOnTrackRecalibrateT : AthAlgTool(ty,na,pa), m_riontrackTube("InDet::TRT_DriftCircleOnTrackNoDriftTimeTool/TRT_DriftCircleOnTrackNoDriftTimeTool"), m_drifttool("TRT_DriftFunctionTool"), - m_errorScalingTool("Trk::RIO_OnTrackErrorScalingTool/RIO_OnTrackErrorScalingTool"), m_useToTCorrection(false), m_scalefactor(2.) - { declareInterface<IRIO_OnTrackCreator>(this); declareProperty("RIOonTrackToolTube", m_riontrackTube ); declareProperty("DriftFunctionTool", m_drifttool); - declareProperty("ErrorScalingTool", m_errorScalingTool); declareProperty("ScaleHitUncertainty", m_scalefactor ); - declareProperty("useDriftTimeToTCorrection",m_useToTCorrection); + declareProperty("useDriftTimeToTCorrection",m_useToTCorrection); } /////////////////////////////////////////////////////////////////// @@ -65,13 +62,12 @@ StatusCode InDet::TRT_DriftCircleOnTrackRecalibrateTool::initialize() return StatusCode::FAILURE; } - if ( m_errorScalingTool.retrieve().isFailure() ) { - msg(MSG::FATAL) << "Failed to retrieve tool " << m_errorScalingTool << endmsg; - return StatusCode::FAILURE; - } else { - msg(MSG::INFO) << "Retrieved tool " << m_errorScalingTool << endmsg; - m_scaleTrtCov = m_errorScalingTool->needToScaleTrt(); - if (m_scaleTrtCov) msg(MSG::DEBUG) << "Detected need for scaling TRT errors." << endmsg; + if (!m_trtErrorScalingKey.key().empty()) { + ATH_CHECK(m_trtErrorScalingKey.initialize()); + ATH_MSG_DEBUG("Detected need for scaling trt errors."); + } + if (!m_eventInfoKey.key().empty()) { + ATH_CHECK(m_eventInfoKey.initialize()); } return sc; @@ -140,21 +136,27 @@ const Trk::RIO_OnTrack* InDet::TRT_DriftCircleOnTrackRecalibrateTool::correct double sl = pE->strawLength()*.5; if (predictedLocZ > sl) predictedLocZ = sl; else if(predictedLocZ <-sl) predictedLocZ =-sl; - + double escale2=error*error/DC->localCovariance()(Trk::driftRadius,Trk::driftRadius); - Amg::MatrixX cov(DC->localCovariance()*escale2); + Amg::MatrixX cov(DC->localCovariance()*escale2); + + if (!m_trtErrorScalingKey.key().empty()) { + + SG::ReadHandle< xAOD::EventInfo> eventInfo (m_eventInfoKey); + double mu; + if (!eventInfo.isValid()) { + ATH_MSG_ERROR("Cant retrieve EventInfo"); + mu = 0.; + } else { + mu = eventInfo->averageInteractionsPerCrossing(); + } - if(m_scaleTrtCov) { bool endcap = false; if(dynamic_cast<const InDetDD::TRT_EndcapElement*>(pE)) endcap = true; - Amg::MatrixX* newCov = m_errorScalingTool->createScaledTrtCovariance(cov,endcap); - if( !newCov ) { - ATH_MSG_WARNING("Failed to create scaled error for SCT"); - return 0; - } - cov = *newCov; - delete newCov; + // SG::ReadCondHandle<TRTRIO_OnTrackErrorScaling> error_scaling( m_trtErrorScalingKey ); + SG::ReadCondHandle<RIO_OnTrackErrorScaling> error_scaling( m_trtErrorScalingKey ); + cov = check_cast<TRTRIO_OnTrackErrorScaling>(*error_scaling)->getScaledCovariance( cov, endcap, mu); } Trk::DefinedParameter radius(sign*driftradius,Trk::locX); diff --git a/InnerDetector/InDetRecTools/TRT_DriftCircleOnTrackTool/src/TRT_DriftCircleOnTrackTool.cxx b/InnerDetector/InDetRecTools/TRT_DriftCircleOnTrackTool/src/TRT_DriftCircleOnTrackTool.cxx index 8a1682d42391..4f888f63829e 100755 --- a/InnerDetector/InDetRecTools/TRT_DriftCircleOnTrackTool/src/TRT_DriftCircleOnTrackTool.cxx +++ b/InnerDetector/InDetRecTools/TRT_DriftCircleOnTrackTool/src/TRT_DriftCircleOnTrackTool.cxx @@ -14,8 +14,8 @@ #include "TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackTool.h" #include "InDetReadoutGeometry/TRT_DetectorManager.h" -#include "TrkToolInterfaces/IRIO_OnTrackErrorScalingTool.h" #include "TrkEventPrimitives/LocalParameters.h" +#include "TrkRIO_OnTrack/check_cast.h" /////////////////////////////////////////////////////////////////// @@ -25,12 +25,9 @@ InDet::TRT_DriftCircleOnTrackTool::TRT_DriftCircleOnTrackTool (const std::string& ty,const std::string& na,const IInterface* pa) : AthAlgTool(ty,na,pa), - m_errorScalingTool("Trk::RIO_OnTrackErrorScalingTool/RIO_OnTrackErrorScalingTool"), - m_scaleTrtCov(false), m_useErrorCorrection(false) { declareInterface<IRIO_OnTrackCreator>(this); - declareProperty("ErrorScalingTool",m_errorScalingTool); declareProperty("UseErrorCorrection",m_useErrorCorrection); } @@ -48,15 +45,13 @@ StatusCode InDet::TRT_DriftCircleOnTrackTool::initialize() { StatusCode sc = AlgTool::initialize(); - // get error scaling tool - // - if ( m_errorScalingTool.retrieve().isFailure() ) { - msg(MSG::FATAL) << "Failed to retrieve tool " << m_errorScalingTool << endmsg; - return StatusCode::FAILURE; - } else { - msg(MSG::INFO) << "Retrieved tool " << m_errorScalingTool << endmsg; - m_scaleTrtCov = m_errorScalingTool->needToScaleTrt(); - if (m_scaleTrtCov) msg(MSG::DEBUG) << "Detected need for scaling TRT errors." << endmsg; + // get the error scaling tool + if (!m_trtErrorScalingKey.key().empty()) { + ATH_CHECK(m_trtErrorScalingKey.initialize()); + ATH_MSG_DEBUG("Detected need for scaling trt errors."); + } + if (!m_eventInfoKey.key().empty()){ + ATH_CHECK(m_eventInfoKey.initialize()); } return sc; @@ -112,22 +107,28 @@ const InDet::TRT_DriftCircleOnTrack* InDet::TRT_DriftCircleOnTrackTool::correct // TRT_DriftCircleOnTrack production // - Amg::MatrixX cov; - if(!m_scaleTrtCov) { + Amg::MatrixX cov; + if (m_trtErrorScalingKey.key().empty()) { cov = DC->localCovariance(); } else { + + SG::ReadHandle< xAOD::EventInfo> eventInfo (m_eventInfoKey); + double mu; + if (!eventInfo.isValid()) { + ATH_MSG_ERROR("Cant retrieve EventInfo"); + mu = 0.; + } else { + mu = eventInfo->averageInteractionsPerCrossing(); + } + bool endcap = false; if(dynamic_cast<const InDetDD::TRT_EndcapElement*>(pE)) endcap = true; - Amg::MatrixX* newCov = m_errorScalingTool->createScaledTrtCovariance - (DC->localCovariance(),endcap); - if( !newCov ) { - ATH_MSG_WARNING("Failed to create scaled error for SCT"); - return 0; - } - cov = *newCov; - delete newCov; + // SG::ReadCondHandle<TRTRIO_OnTrackErrorScaling> error_scaling( m_trtErrorScalingKey ); + SG::ReadCondHandle<RIO_OnTrackErrorScaling> error_scaling( m_trtErrorScalingKey ); + cov = check_cast<TRTRIO_OnTrackErrorScaling>(*error_scaling)->getScaledCovariance( DC->localCovariance(),endcap, mu ); } + if(!m_useErrorCorrection || DC->localPosition().x() > .30) { Trk::DefinedParameter radius(sign*DC->localPosition().x(),Trk::locX); diff --git a/Reconstruction/egamma/egammaRec/python/EMCommonRefitter.py b/Reconstruction/egamma/egammaRec/python/EMCommonRefitter.py index d39654884605..5d71a861b21e 100644 --- a/Reconstruction/egamma/egammaRec/python/EMCommonRefitter.py +++ b/Reconstruction/egamma/egammaRec/python/EMCommonRefitter.py @@ -96,9 +96,9 @@ def CreateEgammaRotCreator(): Mode = 'indet') ToolSvc += egRotCreator # load error scaling - from IOVDbSvc.CondDB import conddb - if not conddb.folderRequested('Indet/TrkErrorScaling'): - conddb.addFolderSplitOnline('INDET','/Indet/Onl/TrkErrorScaling','/Indet/TrkErrorScaling') + # load error scaling + from InDetRecExample.TrackingCommon import createAndAddCondAlg, getRIO_OnTrackErrorScalingCondAlg + createAndAddCondAlg(getRIO_OnTrackErrorScalingCondAlg,'RIO_OnTrackErrorScalingCondAlg') return egRotCreator diff --git a/Tracking/TrkEvent/TrkRIO_OnTrack/TrkRIO_OnTrack/RIO_OnTrackErrorScaling.h b/Tracking/TrkEvent/TrkRIO_OnTrack/TrkRIO_OnTrack/RIO_OnTrackErrorScaling.h new file mode 100644 index 000000000000..a4fb6c5347c4 --- /dev/null +++ b/Tracking/TrkEvent/TrkRIO_OnTrack/TrkRIO_OnTrack/RIO_OnTrackErrorScaling.h @@ -0,0 +1,41 @@ +/* Dear emacs, this is -*-c++-*- */ +#ifndef _RIO_OnTrackErrorScaling_H_ +#define _RIO_OnTrackErrorScaling_H_ + +#include <vector> +#include "EventPrimitives/EventPrimitives.h" + +#include "AthenaKernel/CLASS_DEF.h" + +class RIO_OnTrackErrorScaling +{ +public: + RIO_OnTrackErrorScaling(); + virtual ~RIO_OnTrackErrorScaling(); + + // CLID of the actual implementation + virtual CLID clid() const; + + std::vector<std::vector<double> > ¶ms() { return m_params; } + const std::vector<std::vector<double> > ¶ms() const { return m_params; } + + virtual bool postProcess() {return true; } + +protected : + /// Convenience function to check whether the number of parameters is correct. + /// @param label a label for the error scaling class in case an error is issued. + /// @param n_paramter_sets the number of parameter sets + /// @param param_names the names of the parameter sets + /// @param n_paramters the number of parameters per set. + void checkParameters(const char *label, unsigned int n_paramter_sets, const char **param_names, unsigned int n_paramters) const; +private: + std::vector<std::vector<double> > m_params; +}; + +CLASS_DEF( RIO_OnTrackErrorScaling, 167367682 , 1 ) + +#include "AthenaKernel/CondCont.h" +CONDCONT_DEF( RIO_OnTrackErrorScaling, 1528464940 ); + + +#endif diff --git a/Tracking/TrkEvent/TrkRIO_OnTrack/TrkRIO_OnTrack/check_cast.h b/Tracking/TrkEvent/TrkRIO_OnTrack/TrkRIO_OnTrack/check_cast.h new file mode 100644 index 000000000000..405c1799e3a5 --- /dev/null +++ b/Tracking/TrkEvent/TrkRIO_OnTrack/TrkRIO_OnTrack/check_cast.h @@ -0,0 +1,19 @@ +#ifndef _CHECK_CAST_H_ +#define _CHECK_CAST_H_ + +#include <sstream> +#include <stdexcept> +#include <typeinfo> + +template<class T_dest, class T_src> +const T_dest *check_cast(const T_src *src) { + const T_dest *dest=dynamic_cast<const T_dest *>(src); + if (!dest) { + std::stringstream message; + message << "failed to cast " << typeid(src).name() << " to " << typeid(dest).name(); + throw std::runtime_error(message.str()); + } + return dest; +} + +#endif diff --git a/Tracking/TrkEvent/TrkRIO_OnTrack/src/RIO_OnTrackErrorScaling.cxx b/Tracking/TrkEvent/TrkRIO_OnTrack/src/RIO_OnTrackErrorScaling.cxx new file mode 100644 index 000000000000..f5574b6d931d --- /dev/null +++ b/Tracking/TrkEvent/TrkRIO_OnTrack/src/RIO_OnTrackErrorScaling.cxx @@ -0,0 +1,35 @@ +#include "TrkRIO_OnTrack/RIO_OnTrackErrorScaling.h" + +RIO_OnTrackErrorScaling::RIO_OnTrackErrorScaling() {} + +RIO_OnTrackErrorScaling::~RIO_OnTrackErrorScaling() {} + +CLID RIO_OnTrackErrorScaling::clid() const { + return ClassID_traits<RIO_OnTrackErrorScaling>::ID(); +} + +void RIO_OnTrackErrorScaling::checkParameters(const char *label, + unsigned int n_paramter_sets, + const char **param_names, + unsigned int n_paramters) const +{ + if (params().size() != n_paramter_sets ) { + std::stringstream message; + message << label << ": Expecting parameters for 2 parameters for"; + for (unsigned int idx=0; idx < n_paramter_sets; ++idx) { + message << " " << param_names[idx]; + } + message << " But got " << params().size() << "."; + throw std::runtime_error( message.str() ); + } + for (unsigned int idx=0; idx<params().size(); ++idx) { + if (params()[idx].size() != n_paramters) { + assert( idx < n_paramter_sets ); + std::stringstream message; + message << label << ": Expected 2 parameters for " << param_names[idx] << " but got " << params()[idx].size() + << "."; + throw std::runtime_error( message.str() ); + } + } +} + diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/CMakeLists.txt b/Tracking/TrkTools/TrkRIO_OnTrackCreator/CMakeLists.txt index 6404cf1a38bb..1882d76b1c45 100644 --- a/Tracking/TrkTools/TrkRIO_OnTrackCreator/CMakeLists.txt +++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/CMakeLists.txt @@ -19,6 +19,7 @@ atlas_depends_on_subdirs( PUBLIC DetectorDescription/Identifier Event/xAOD/xAODEventInfo InnerDetector/InDetDetDescr/InDetIdentifier + InnerDetector/InDetRecEvent/InDetRIO_OnTrack Tracking/TrkEvent/TrkPrepRawData Tracking/TrkEvent/TrkRIO_OnTrack ) @@ -26,7 +27,7 @@ atlas_depends_on_subdirs( PUBLIC atlas_add_component( TrkRIO_OnTrackCreator src/*.cxx src/components/*.cxx - LINK_LIBRARIES AthenaBaseComps AthenaKernel EventPrimitives GaudiKernel TrkParameters TrkToolInterfaces AthenaPoolUtilities AtlasDetDescr Identifier xAODEventInfo InDetIdentifier TrkPrepRawData TrkRIO_OnTrack ) + LINK_LIBRARIES AthenaBaseComps AthenaKernel EventPrimitives GaudiKernel TrkParameters TrkToolInterfaces AthenaPoolUtilities AtlasDetDescr Identifier xAODEventInfo InDetIdentifier InDetRIO_OnTrack TrkPrepRawData TrkRIO_OnTrack ) # Install files from the package: atlas_install_headers( TrkRIO_OnTrackCreator ) diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/KitManager.cxx b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/KitManager.cxx new file mode 100644 index 000000000000..fbaac89f13ce --- /dev/null +++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/KitManager.cxx @@ -0,0 +1,29 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ +#include "KitManager.h" +#include <sstream> +#include <stdexcept> + +KitManagerBase::KitManagerBase() {} +KitManagerBase::~KitManagerBase() {} + +const void *KitManagerBase::kitPtr(const std::string &name) const { + return m_registry.at(name); +} + +bool KitManagerBase::registerKit(std::string name, const void *a_kit) { + std::pair<std::string, const void *> elm = std::make_pair(name, a_kit); + if (!m_registry.insert(elm).second) { + std::stringstream message; + message << "Failed to register kit " << elm.first; + throw std::runtime_error(message.str()); + } + return true; +} + +void KitManagerBase::dumpKits(std::ostream &out) const { + for(const std::pair<const std::string, const void *> &elm: m_registry) { + out << " " << elm.first; + } +} diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/KitManager.h b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/KitManager.h new file mode 100644 index 000000000000..521fccfc534d --- /dev/null +++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/KitManager.h @@ -0,0 +1,57 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ +#ifndef _KitManager_H_ +#define _KitManager_H_ + +#include <ostream> +#include <map> +#include <memory> + +class KitManagerBase +{ +protected: + KitManagerBase(); + virtual ~KitManagerBase(); + + const void *kitPtr(const std::string &name) const; + + bool registerKit(std::string name, const void *a_kit); + + std::map<std::string, const void * > m_registry; +public: + void dumpKits(std::ostream &out) const; + +}; + +template <class T_KitInterface> +class KitManager : public KitManagerBase { +public: + ~KitManager() { + for( std::pair<const std::string, const void *> &elm : m_registry ) { + const T_KitInterface *ptr=reinterpret_cast<const T_KitInterface *>(elm.second); + delete ptr; + elm.second = nullptr; + } + } + + bool registerKit(std::string name, const T_KitInterface *a_kit) { + return KitManagerBase::registerKit(name, static_cast< const void *>(a_kit)); + } + + const T_KitInterface &kit(const std::string &name) const { + return *(reinterpret_cast< const T_KitInterface *>(KitManagerBase::kitPtr(name))); + } + + static + KitManager<T_KitInterface> &instance() { + if (!s_instance) { + s_instance=std::make_unique<KitManager<T_KitInterface > >(); + } + return *s_instance; + } +private: + static std::unique_ptr< KitManager<T_KitInterface> > s_instance; +}; + +#endif diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingCondAlg.cxx b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingCondAlg.cxx new file mode 100644 index 000000000000..1ef598db5100 --- /dev/null +++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingCondAlg.cxx @@ -0,0 +1,221 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "TrkRIO_OnTrack/RIO_OnTrackErrorScaling.h" +#include "InDetRIO_OnTrack/PixelRIO_OnTrackErrorScaling.h" +#include "RIO_OnTrackErrorScalingCondAlg.h" +#include "RIO_OnTrackErrorScalingKit.h" + +#include <limits> + +#include <iostream> +namespace { + template <typename T> + std::ostream &operator<<(std::ostream &out, const std::vector<T> &a) { + for (const T &elm : a) { + out << " " << elm; + } + return out; + } +} + + +RIO_OnTrackErrorScalingCondAlg::RIO_OnTrackErrorScalingCondAlg(const std::string& name, ISvcLocator* pSvcLocator) + : ::AthAlgorithm(name, pSvcLocator) + , m_condSvc{"CondSvc", name} +{ +} + +StatusCode RIO_OnTrackErrorScalingCondAlg::initialize() { + ATH_CHECK(m_condSvc.retrieve()); + ATH_CHECK(m_readKey.initialize()); + + if (m_errorScalingType.size() != m_writeKey.size()) { + ATH_MSG_FATAL("Number of error scaling types and out keys do not match: " << m_errorScalingType.size() << " != " << m_writeKey.size() + << " There should be exactly one out key for each error scaling type."); + return StatusCode::FAILURE; + } + ATH_CHECK( m_writeKey.initialize() ); + + m_kits.clear(); + m_kits.reserve(m_errorScalingType.size()); + unsigned int idx=0; + for (const std::string &type_name : m_errorScalingType ) { + if (addErrorScaling(type_name).isFailure()) return StatusCode::FAILURE; + if (m_condSvc->regHandle(this, m_writeKey[idx]).isFailure()) { + ATH_MSG_FATAL("unable to register WriteCondHandle " << m_writeKey[idx].key() << " with CondSvc"); + return StatusCode::FAILURE; + } + ++idx; + } + for (const std::string &attribut_name : m_attributIgnoreList ) { + registerAttribute(attribut_name, std::numeric_limits<unsigned int>::max(),0); + } + + std::cout << "DEBUG " << name() << " all done." << std::endl; + for ( const SG::WriteCondHandleKey<RIO_OnTrackErrorScaling> &output : m_writeKey ) { + std::cout << " new write key " << output.key() << "[" << static_cast<const void *>(&output) << std::endl; + } + + return StatusCode::SUCCESS; +} + + +void RIO_OnTrackErrorScalingCondAlg::registerAttribute(std::string name, unsigned int type_idx, unsigned int param_idx) { + assert( !m_outputList.empty()); + if (!m_attributeMap.insert( std::make_pair(name, std::make_pair(type_idx,param_idx)) ).second) { + std::stringstream message; + message << "Failed to add RIO_OnTrackErrorScaling paramter : " << name << "."; + throw std::runtime_error(message.str()); + } +} + +StatusCode RIO_OnTrackErrorScalingCondAlg::addErrorScaling(const std::string &type_name) { + std::cout << "DEBUG " << name() << " addErrorScaling " << type_name << std::endl; + const RIO_OnTrackErrorScalingKit *the_kit(nullptr); + try { + the_kit = &(RIO_OnTrackErrorScalingKitManager::instance().kit( type_name )); + } + catch (std::runtime_error &err) { + std::stringstream types; + RIO_OnTrackErrorScalingKitManager::instance().dumpKits(types); + ATH_MSG_FATAL( "Invalide ErrorScalking type name : " << type_name << ". Registered types:" << types.str() ); + return StatusCode::FAILURE; + } + catch (std::exception &err) { + std::stringstream types; + RIO_OnTrackErrorScalingKitManager::instance().dumpKits(types); + ATH_MSG_FATAL( "Caught exception: " << err.what() << " Invalide ErrorScalking type name : " << type_name << ". Registered types:" << types.str() ); + return StatusCode::FAILURE; + } + std::cout << "DEBUG " << name() << "register kit " << type_name << " n-params=" << the_kit->nParametres()<< std::endl; + m_kits.push_back(the_kit); + const char **parameters=the_kit->paramNames(); + for (unsigned int param_i=0; param_i<the_kit->nParametres(); ++param_i) { + std::cout << "DEBUG " << name() << "register attribute " << parameters[param_i] << " -> " + << m_kits.size() << ". " << param_i << std::endl; + registerAttribute( std::string(parameters[param_i]), m_kits.size()-1, param_i); + } + + return StatusCode::SUCCESS; +} + +template <typename T> +class CSAccessCondReadHandleKey : public SG::ReadCondHandleKey<T> { +public: + std::string dump() const { + return this->getCS()->dump(); + } + + template <typename T_Obj> + std::string dumpKeys() const { + std::stringstream out; + std::vector<std::string> keys_out; + const_cast<StoreGateSvc *>(this->getCS())->keys<T_Obj>(keys_out,true,false); + for(const std::string &a_key : keys_out) { + out << " " << a_key; + } + return out.str(); + } +}; + + +StatusCode RIO_OnTrackErrorScalingCondAlg::execute() { + SG::ReadCondHandle<CondAttrListCollection> readHandle(m_readKey); + if (!readHandle.isValid()) { + std::cout << "DEBUG cond store content : " << static_cast<const CSAccessCondReadHandleKey<CondAttrListCollection> &>(m_readKey).dump() << std::endl; + return StatusCode::FAILURE; + } + assert( *readHandle ); + EventIDRange range; + if (!readHandle.range(range)) { + ATH_MSG_FATAL("Failed to retrieve validity range for " << readHandle.key()); + return StatusCode::FAILURE; + } + + std::vector<SG::WriteCondHandle<RIO_OnTrackErrorScaling> > write_handles(m_writeKey.makeHandles()); + assert( write_handles.size() == m_kits.size() ); + std::vector< std::unique_ptr<RIO_OnTrackErrorScaling> > error_scaling; + error_scaling.reserve( m_kits.size()); + + unsigned int total_params=0; + for (const RIO_OnTrackErrorScalingKit *a_kit: m_kits) { + assert( a_kit ); + error_scaling.push_back( a_kit->create() ); + total_params += a_kit->nParametres(); + } + assert( write_handles.size() == error_scaling.size()); + + try { + // now populate output conditions data objects from attribut lists. + for (const std::pair<unsigned int, coral::AttributeList>& channel : **readHandle ) { + const coral::AttributeList &alist = channel.second; + unsigned int att_i=0; + const std::string& attr_name=alist[att_i++].data<std::string>(); + try { + std::pair<unsigned int, unsigned int> idx = m_attributeMap.at(attr_name); + if (idx.first != std::numeric_limits<unsigned int>::max()) { + assert( idx.first < error_scaling.size()); + assert( idx.second < error_scaling[idx.first]->params().size()); + + const int nvals=alist[att_i++].data<int>(); + std::vector<double> ¶ms = error_scaling[idx.first]->params()[idx.second]; + params.clear(); + params.reserve(nvals); + assert( att_i == 2); + for (int i=0;i<nvals;++i, ++att_i){ + assert( att_i < alist.size() ); + // ATH_MSG_VERBOSE("Parameter " << i << " = " << alist[att_i].data<double>() ); + params.push_back(alist[att_i].data<double>()); + } + std::cout << "DEBUG " << this->name() << " cond data " << range + << " " << attr_name << " -> " << idx.first << "," << idx.second << "[" << write_handles[idx.first].key() << "] : " << params + << std::endl; + } + else { + std::cout << "DEBUG " << this->name() << " cond data " << range + << " skip " << attr_name << std::endl; + } + --total_params; + } + catch (std::out_of_range &err) { + ATH_MSG_FATAL("Unhandled attribute: " << attr_name); + return StatusCode::FAILURE; + } + catch (std::exception &err) { + ATH_MSG_FATAL("Unhandled attribute: " << attr_name << " what:" << err.what()); + return StatusCode::FAILURE; + } + } + if (total_params!=0) { + ATH_MSG_ERROR("Not all parameters of the output conditions data are filled from attribute list. " << total_params << " parameters are not filled."); + } + + for (unsigned int key_i=0; key_i<write_handles.size(); ++key_i) { + // assert( key_i < m_writeKey.size()); + assert( key_i < error_scaling.size()); + if (!error_scaling[key_i]->postProcess()) { + ATH_MSG_ERROR("Conditions data for " << write_handles[key_i].key() << " not valid."); + return StatusCode::FAILURE; + } + // CLID impl_clid=error_scaling[key_i]->clid(); + if (write_handles[key_i].record(range, std::move(error_scaling[key_i])).isFailure()) { + ATH_MSG_FATAL("Could not record RIO_OnTrackErrorScaling " << write_handles[key_i].key() + << " with EventRange " << range + << " into Conditions Store"); + return StatusCode::FAILURE; + } + } + } + catch (coral::Exception& e) { + ATH_MSG_ERROR("Problem with AttributeList decoding: " << e.what()); + return StatusCode::FAILURE; + } + return StatusCode::SUCCESS; +} + + +StatusCode RIO_OnTrackErrorScalingCondAlg::finalize() { + return StatusCode::SUCCESS; +} diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingCondAlg.h b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingCondAlg.h new file mode 100644 index 000000000000..97ec2361e464 --- /dev/null +++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingCondAlg.h @@ -0,0 +1,60 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef _RIO_OnTrackErrorScalingCondAlg_H_ +#define _RIO_OnTrackErrorScalingCondAlg_H_ + +#include "AthenaBaseComps/AthAlgorithm.h" + +#include "AthenaPoolUtilities/CondAttrListCollection.h" +//#include "StoreGate/ReadCondHandleKey.h" +#//include "StoreGate/WriteCondHandleKey.h" +#include "StoreGate/CondHandleKeyArray.h" +#include "TrkRIO_OnTrack/RIO_OnTrackErrorScaling.h" +#include "GaudiKernel/ICondSvc.h" +#include "GaudiKernel/Property.h" +#include <iostream> + +class RIO_OnTrackErrorScalingKit; + +class RIO_OnTrackErrorScalingCondAlg : public AthAlgorithm +{ + public: + RIO_OnTrackErrorScalingCondAlg(const std::string& name, ISvcLocator* pSvcLocator); + virtual ~RIO_OnTrackErrorScalingCondAlg() = default; + StatusCode initialize() override; + StatusCode execute() override; + StatusCode finalize() override; + + private: + + StatusCode addErrorScaling(const std::string &type_name); + void registerAttribute(std::string name, unsigned int type_idx, unsigned int param_idx); + + SG::ReadCondHandleKey<CondAttrListCollection> m_readKey + {this, "ReadKey", "/Indet/TrkErrorScaling", "Conditions folder namer for innder detector error scaling parameters."}; + + Gaudi::Property< std::vector<std::string> > m_errorScalingType + { this, + "ErrorScalingType", + {"PixelRIO_OnTrackErrorScalingRun1","SCTRIO_OnTrackErrorScaling","TRTRIO_OnTrackErrorScaling"}, + "Error scaling type. (git grep \"RIO_OnTrackErrorScalingKitManager.*registerKit\")" + }; + + Gaudi::Property< std::vector<std::string> > m_attributIgnoreList + { this,"IgnoreAttributes", {}, "List of attributes that should be ignored."}; + + SG::WriteCondHandleKeyArray<RIO_OnTrackErrorScaling> m_writeKey + { this, + "OutKeys", + {"/Indet/TrkErrorScalingPixel","/Indet/TrkErrorScalingSCT","/Indet/TrkErrorScalingTRT"}, + "Output conditions key names, for the specified error scaling types"}; + + std::vector<const RIO_OnTrackErrorScalingKit *> m_kits {}; + std::map<std::string, std::pair<unsigned int, unsigned int> > m_attributeMap; + + ServiceHandle<ICondSvc> m_condSvc; +}; + +#endif // SCT_CONDITIONSPARAMETERCONDALG diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingIDKits.cxx b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingIDKits.cxx new file mode 100644 index 000000000000..c1586ace88a7 --- /dev/null +++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingIDKits.cxx @@ -0,0 +1,65 @@ +#include "RIO_OnTrackErrorScalingKit.h" +#include "InDetRIO_OnTrack/PixelRIO_OnTrackErrorScaling.h" +#include "InDetRIO_OnTrack/SCTRIO_OnTrackErrorScaling.h" +#include "InDetRIO_OnTrack/TRTRIO_OnTrackErrorScaling.h" + +class PixelRIO_OnTrackErrorScalingKit + : public RIO_OnTrackErrorScalingSpecialisedKit<PixelRIO_OnTrackErrorScaling> +{ +public: + virtual unsigned int nParametres() const override { + return PixelRIO_OnTrackErrorScaling::kNParamTypes; + } + virtual const char **paramNames() const override { + return PixelRIO_OnTrackErrorScaling::paramNames(); + } + +}; + +// the run1 kit only removes the 2 last two parameters which are for IBL +class PixelRIO_OnTrackErrorScalingRun1Kit + : public PixelRIO_OnTrackErrorScalingKit +{ +public: + virtual unsigned int nParametres() const override { + return PixelRIO_OnTrackErrorScaling::kPixIBLPhi; + } + +}; + +class SCTRIO_OnTrackErrorScalingKit + : public RIO_OnTrackErrorScalingSpecialisedKit<SCTRIO_OnTrackErrorScaling> +{ +public: + virtual unsigned int nParametres() const override { + return SCTRIO_OnTrackErrorScaling::kNParamTypes; + } + virtual const char **paramNames() const override { + return SCTRIO_OnTrackErrorScaling::paramNames(); + } + +}; + +class TRTRIO_OnTrackErrorScalingKit + : public RIO_OnTrackErrorScalingSpecialisedKit<TRTRIO_OnTrackErrorScaling> +{ +public: + virtual unsigned int nParametres() const override { + return TRTRIO_OnTrackErrorScaling::kNParamTypes; + } + virtual const char **paramNames() const override { + return TRTRIO_OnTrackErrorScaling::paramNames(); + } + +}; + +namespace { + // register all kits with the help of a dumm function which sets a global anonymous bool + bool registered = ( []() -> bool { + return + RIO_OnTrackErrorScalingKitManager::instance().registerKit("PixelRIO_OnTrackErrorScaling", new PixelRIO_OnTrackErrorScalingKit) + && RIO_OnTrackErrorScalingKitManager::instance().registerKit("PixelRIO_OnTrackErrorScalingRun1",new PixelRIO_OnTrackErrorScalingRun1Kit) + && RIO_OnTrackErrorScalingKitManager::instance().registerKit("SCTRIO_OnTrackErrorScaling", new SCTRIO_OnTrackErrorScalingKit) + && RIO_OnTrackErrorScalingKitManager::instance().registerKit("TRTRIO_OnTrackErrorScaling", new TRTRIO_OnTrackErrorScalingKit) ; + } ) (); +} diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingKit.cxx b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingKit.cxx new file mode 100644 index 000000000000..a4ebe1cb324c --- /dev/null +++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingKit.cxx @@ -0,0 +1,18 @@ +#include "RIO_OnTrackErrorScalingKit.h" + +// need toinstantiate static instance pointer +template <> +std::unique_ptr< KitManager<RIO_OnTrackErrorScalingKit> > +KitManager<RIO_OnTrackErrorScalingKit>::s_instance {}; + +size_t RIO_OnTrackErrorScalingKit::getParamIndex(const std::string &name) const { + const char **param_names = paramNames(); + for(size_t idx=0; idx<nParametres(); ++idx) { + if (strcmp(param_names[idx],name.c_str())==0) return idx; + } + std::stringstream message; + message << "RIO_OnTrackErrorScaling parameter " << name << " not found."; + throw std::runtime_error(message.str()); + return nParametres(); +} + diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingKit.h b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingKit.h new file mode 100644 index 000000000000..cd5e9328d6aa --- /dev/null +++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingKit.h @@ -0,0 +1,36 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef _RIO_OnTrackErrorScalingKit_H_ +#define _RIO_OnTrackErrorScalingKit_H_ + +#include "TrkRIO_OnTrack/RIO_OnTrackErrorScaling.h" +#include "KitManager.h" + +class RIO_OnTrackErrorScalingKit +{ +public: + virtual ~RIO_OnTrackErrorScalingKit() {} + + virtual unsigned int nParametres() const = 0; + virtual const char **paramNames() const = 0; + virtual size_t getParamIndex(const std::string &name) const; + + virtual std::unique_ptr<RIO_OnTrackErrorScaling> create() const = 0; +}; + +template <class T> +class RIO_OnTrackErrorScalingSpecialisedKit : public RIO_OnTrackErrorScalingKit +{ + public: + virtual std::unique_ptr<RIO_OnTrackErrorScaling> create() const override { + std::unique_ptr<RIO_OnTrackErrorScaling> error_scaling( new T); + error_scaling->params().resize(this->nParametres()); + return error_scaling; + } +}; + +typedef KitManager<RIO_OnTrackErrorScalingKit> RIO_OnTrackErrorScalingKitManager; + +#endif diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingTool.cxx b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingTool.cxx index 4e1f2525a9fe..6ac51d6166fc 100755 --- a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingTool.cxx +++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingTool.cxx @@ -397,6 +397,8 @@ Trk::RIO_OnTrackErrorScalingTool::createScaledPixelCovariance && m_scaling_pix[idx+1].size()>1 ); scale2by2(*newCov,m_scaling_pix[idx] /* phi */ ,m_scaling_pix[idx+1] /* eta */); + std::cout << "DEBUG createScaledPixelCovariance region:" << s_pix_names[idx] << " " << inputCov << " -> " << *newCov << std::endl; + if (msgLvl(MSG::VERBOSE)) { msg(MSG::VERBOSE) << "changing original Pix-" << (idx==kPixEndcapPhi ? "EC " : (idx==kPixIBLPhi ? "IBL" : "BR " )) << " cov " << endmsg; msg(MSG::VERBOSE) << inputCov << " to "<< *newCov @@ -434,6 +436,7 @@ double sinLocalAngle) const (*newCov)(0,0) *= a*a; (*newCov)(0,0) += b*b; } + std::cout << "DEBUG createScaledSctCovariance endcap:" << is_endcap << " angle=" << sinLocalAngle << " " << inputCov << " -> " << *newCov << std::endl; return newCov; } @@ -460,6 +463,7 @@ Trk::RIO_OnTrackErrorScalingTool::createScaledTrtCovariance (*newCov)(0,0) *= a*a; (*newCov)(0,0) += b*b; (*newCov)(0,0) *= (1. + m_mu * c); + std::cout << "DEBUG createScaledTrtCovariance endcap:" << is_endcap << " mu=" << m_mu << " " << inputCov << " -> " << *newCov << std::endl; return newCov; } diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/components/TrkRIO_OnTrackCreator_entries.cxx b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/components/TrkRIO_OnTrackCreator_entries.cxx index 13489d4ded19..e336e13febfa 100644 --- a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/components/TrkRIO_OnTrackCreator_entries.cxx +++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/components/TrkRIO_OnTrackCreator_entries.cxx @@ -1,6 +1,8 @@ #include "TrkRIO_OnTrackCreator/RIO_OnTrackCreator.h" #include "TrkRIO_OnTrackCreator/RIO_OnTrackErrorScalingTool.h" +#include "../RIO_OnTrackErrorScalingCondAlg.h" DECLARE_COMPONENT( Trk::RIO_OnTrackCreator ) DECLARE_COMPONENT( Trk::RIO_OnTrackErrorScalingTool ) +DECLARE_COMPONENT( RIO_OnTrackErrorScalingCondAlg ) diff --git a/Trigger/TrigFTK/FTK_RecTools/CMakeLists.txt b/Trigger/TrigFTK/FTK_RecTools/CMakeLists.txt index 44545feb3f2c..3ebb84df0d70 100644 --- a/Trigger/TrigFTK/FTK_RecTools/CMakeLists.txt +++ b/Trigger/TrigFTK/FTK_RecTools/CMakeLists.txt @@ -25,6 +25,7 @@ atlas_depends_on_subdirs( PUBLIC InnerDetector/InDetRecEvent/InDetRIO_OnTrack Tracking/TrkEvent/TrkParameters Tracking/TrkTools/TrkToolInterfaces + Tracking/TrkEvent/TrkRIO_OnTrack Tracking/TrkTools/TrkAmbiguityProcessor PRIVATE Event/EventPrimitives @@ -45,7 +46,7 @@ atlas_add_library( FTK_RecToolsLib src/*.cxx PUBLIC_HEADERS FTK_RecTools INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps GeoPrimitives xAODTracking TrkTrack VxVertex FTK_DataProviderInterfaces TrigFTK_RawData TrkVxEdmCnvLib InDetPrepRawData InDetRIO_OnTrack TrkParameters TrkToolInterfaces TrkAmbiguityProcessorLib StoreGateLib SGtests EventPrimitives InDetIdentifier InDetReadoutGeometry SiClusterizationToolLib TrkSurfaces) + LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps GeoPrimitives xAODTracking TrkTrack VxVertex FTK_DataProviderInterfaces TrigFTK_RawData TrkVxEdmCnvLib InDetPrepRawData InDetRIO_OnTrack TrkParameters TrkToolInterfaces TrkRIO_OnTrack TrkAmbiguityProcessorLib StoreGateLib SGtests EventPrimitives InDetIdentifier InDetReadoutGeometry SiClusterizationToolLib TrkSurfaces) atlas_add_component( FTK_RecTools src/*.cxx src/components/*.cxx diff --git a/Trigger/TrigFTK/FTK_RecTools/FTK_RecTools/FTK_PixelClusterOnTrackTool.h b/Trigger/TrigFTK/FTK_RecTools/FTK_RecTools/FTK_PixelClusterOnTrackTool.h index 541cda05286b..93c478378b26 100644 --- a/Trigger/TrigFTK/FTK_RecTools/FTK_RecTools/FTK_PixelClusterOnTrackTool.h +++ b/Trigger/TrigFTK/FTK_RecTools/FTK_RecTools/FTK_PixelClusterOnTrackTool.h @@ -14,7 +14,7 @@ #include "TrkToolInterfaces/IRIO_OnTrackCreator.h" -#include "TrkToolInterfaces/IRIO_OnTrackErrorScalingTool.h" +#include "InDetRIO_OnTrack/PixelRIO_OnTrackErrorScaling.h" #include "InDetRIO_OnTrack/PixelClusterOnTrack.h" #include "InDetPrepRawData/PixelGangedClusterAmbiguities.h" @@ -98,10 +98,10 @@ public: const Trk::TrackParameters&) const; virtual const InDet::PixelClusterOnTrack* correctNN(const Trk::PrepRawData&, const Trk::TrackParameters&) const; - + virtual bool getErrorsDefaultAmbi( const InDet::PixelCluster*, const Trk::TrackParameters&, Amg::Vector2D&, Amg::MatrixX&) const; - + virtual bool getErrorsTIDE_Ambi( const InDet::PixelCluster*, const Trk::TrackParameters&, Amg::Vector2D&, Amg::MatrixX&) const; @@ -130,7 +130,6 @@ public: /////////////////////////////////////////////////////////////////// ToolHandle<IModuleDistortionsTool> m_pixDistoTool ; - ToolHandle<Trk::IRIO_OnTrackErrorScalingTool> m_errorScalingTool; ServiceHandle<IPixelOfflineCalibSvc> m_calibSvc ; StoreGateSvc* m_detStore ; /* ME: Test histos have nothing to do with production code, use a flag @@ -146,7 +145,9 @@ public: //! toolhandle for central error scaling //! flag storing if errors need scaling or should be kept nominal - bool m_scalePixelCov ; + SG::ReadCondHandleKey<RIO_OnTrackErrorScaling> m_pixelErrorScalingKey + {this,"PixelErrorScalingKey", "" /* "/Indet/TrkErrorScalingPixel" */, "Key for pixel error scaling conditions data. No error scaling if empty"}; + bool m_disableDistortions; bool m_rel13like ; int m_positionStrategy ; @@ -171,8 +172,8 @@ public: /** Enable NN based calibration (do only if NN calibration is applied) **/ mutable bool m_applyNNcorrection; mutable bool m_applydRcorrection; - bool m_NNIBLcorrection; - bool m_IBLAbsent; + bool m_NNIBLcorrection; + bool m_IBLAbsent; /** NN clusterizationi factory for NN based positions and errors **/ ToolHandle<InDet::NnClusterizationFactory> m_NnClusterizationFactory; @@ -185,8 +186,8 @@ public: bool m_doNotRecalibrateNN; bool m_noNNandBroadErrors; - - /** Enable different treatment of cluster errors based on NN information (do only if TIDE ambi is run) **/ + + /** Enable different treatment of cluster errors based on NN information (do only if TIDE ambi is run) **/ bool m_usingTIDE_Ambi; std::string m_splitClusterMapName; //no longer used mutable std::vector< std::vector<float> > m_fX, m_fY, m_fB, m_fC, m_fD; diff --git a/Trigger/TrigFTK/FTK_RecTools/FTK_RecTools/FTK_SCTClusterOnTrackTool.h b/Trigger/TrigFTK/FTK_RecTools/FTK_RecTools/FTK_SCTClusterOnTrackTool.h index c4af2cb25f74..6da302fe10b9 100644 --- a/Trigger/TrigFTK/FTK_RecTools/FTK_RecTools/FTK_SCTClusterOnTrackTool.h +++ b/Trigger/TrigFTK/FTK_RecTools/FTK_RecTools/FTK_SCTClusterOnTrackTool.h @@ -18,7 +18,7 @@ #include "GaudiKernel/ToolHandle.h" #include "AthenaBaseComps/AthAlgTool.h" #include "TrkToolInterfaces/IRIO_OnTrackCreator.h" -#include "TrkToolInterfaces/IRIO_OnTrackErrorScalingTool.h" +#include "InDetRIO_OnTrack/SCTRIO_OnTrackErrorScaling.h" #include "TrkParameters/TrackParameters.h" #include "InDetRIO_OnTrack/SCT_ClusterOnTrack.h" #include "SCT_ModuleDistortions/ISCT_ModuleDistortionsTool.h" @@ -90,12 +90,10 @@ public: // Private data: /////////////////////////////////////////////////////////////////// - //! toolhandle for central error scaling - ToolHandle< Trk::IRIO_OnTrackErrorScalingTool > m_errorScalingTool; ToolHandle<ISCT_ModuleDistortionsTool> m_distortionsTool; ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SCTLorentzAngleTool", "Tool to retreive Lorentz angle"}; - //! flag storing if errors need scaling or should be kept nominal - bool m_scaleSctCov; + SG::ReadCondHandleKey<RIO_OnTrackErrorScaling> m_sctErrorScalingKey + {this,"SCTErrorScalingKey", "" /* "/Indet/TrkErrorScalingSCT" */, "Key for SCT error scaling conditions data. No error scaling if empty."}; //! job options bool m_option_make2dimBarrelClusters; diff --git a/Trigger/TrigFTK/FTK_RecTools/src/FTK_PixelClusterOnTrackTool.cxx b/Trigger/TrigFTK/FTK_RecTools/src/FTK_PixelClusterOnTrackTool.cxx index ca1fc87237b1..d15014058ac1 100644 --- a/Trigger/TrigFTK/FTK_RecTools/src/FTK_PixelClusterOnTrackTool.cxx +++ b/Trigger/TrigFTK/FTK_RecTools/src/FTK_PixelClusterOnTrackTool.cxx @@ -28,6 +28,9 @@ #include "CoralBase/Attribute.h" #include "AthenaPoolUtilities/CondAttrListCollection.h" #include "AthenaPoolUtilities/AthenaAttributeList.h" + +#include "TrkRIO_OnTrack/check_cast.h" + using CLHEP::mm; using CLHEP::micrometer; @@ -68,10 +71,8 @@ FTK_PixelClusterOnTrackTool::FTK_PixelClusterOnTrackTool (const std::string &t, const std::string &n, const IInterface *p) : ::AthAlgTool(t, n, p), m_pixDistoTool("PixelDistortionsTool", this), - m_errorScalingTool("Trk::RIO_OnTrackErrorScalingTool/RIO_OnTrackErrorScalingTool", this), m_calibSvc("PixelOfflineCalibSvc", n), m_detStore(nullptr), - m_scalePixelCov(false), m_disableDistortions(false), m_rel13like(false), m_pixelid(nullptr), @@ -90,7 +91,6 @@ FTK_PixelClusterOnTrackTool::FTK_PixelClusterOnTrackTool m_splitClusterMapName("SplitClusterAmbiguityMap") { declareInterface<IRIO_OnTrackCreator>(this); - declareProperty("ErrorScalingTool", m_errorScalingTool, "The error scaling tool"); declareProperty("PixelDistortionsTool", m_pixDistoTool, "Tool to retrieve pixel distortions"); declareProperty("PositionStrategy", m_positionStrategy = 1, "Which calibration of cluster positions"); declareProperty("ErrorStrategy", m_errorStrategy = 2, "Which calibration of cluster position errors"); @@ -144,15 +144,9 @@ FTK_PixelClusterOnTrackTool::initialize() { } // get the error scaling tool - if (m_errorScalingTool.retrieve().isFailure()) { - msg(MSG::FATAL) << "Failed to retrieve tool " << m_errorScalingTool << endmsg; - return StatusCode::FAILURE; - } else { - ATH_MSG_INFO("Retrieved tool " << m_errorScalingTool); - m_scalePixelCov = m_errorScalingTool->needToScalePixel(); - if (m_scalePixelCov) { - ATH_MSG_DEBUG("Detected need for scaling Pixel errors."); - } + if (!m_pixelErrorScalingKey.key().empty()) { + ATH_CHECK(m_pixelErrorScalingKey.initialize()); + ATH_MSG_DEBUG("Detected need for scaling Pixel errors."); } // the NN corrections @@ -644,14 +638,10 @@ FTK_PixelClusterOnTrackTool::correctDefault ATH_MSG_VERBOSE(" errphi = " << errphi << " erreta = " << erreta); // create new copy of error matrix - if (m_scalePixelCov) { - Amg::MatrixX *newCov = m_errorScalingTool->createScaledPixelCovariance(cov, element->identify()); - if (!newCov) { - ATH_MSG_WARNING("Failed to create scaled error for Pixel"); - return 0; - } - cov = *newCov; - delete newCov; + if (!m_pixelErrorScalingKey.key().empty()) { + //SG::ReadCondHandle<PixelRIO_OnTrackErrorScaling> error_scaling( m_pixelErrorScalingKey ); + SG::ReadCondHandle<RIO_OnTrackErrorScaling> error_scaling( m_pixelErrorScalingKey ); + cov = check_cast<PixelRIO_OnTrackErrorScaling>(*error_scaling)->getScaledCovariance( cov, *m_pixelid, element->identify() ); } bool isbroad = (m_errorStrategy == 0) ? true : false; diff --git a/Trigger/TrigFTK/FTK_RecTools/src/FTK_SCTClusterOnTrackTool.cxx b/Trigger/TrigFTK/FTK_RecTools/src/FTK_SCTClusterOnTrackTool.cxx index 69971c1a2201..7f5be3c1f958 100644 --- a/Trigger/TrigFTK/FTK_RecTools/src/FTK_SCTClusterOnTrackTool.cxx +++ b/Trigger/TrigFTK/FTK_RecTools/src/FTK_SCTClusterOnTrackTool.cxx @@ -17,6 +17,8 @@ #include "TrkSurfaces/RectangleBounds.h" #include "TrkSurfaces/TrapezoidBounds.h" +#include "TrkRIO_OnTrack/check_cast.h" + using CLHEP::micrometer; using CLHEP::deg; @@ -27,9 +29,7 @@ using CLHEP::deg; FTK_SCTClusterOnTrackTool::FTK_SCTClusterOnTrackTool (const std::string &t, const std::string &n, const IInterface *p) : AthAlgTool(t, n, p), - m_errorScalingTool("Trk::RIO_OnTrackErrorScalingTool/RIO_OnTrackErrorScalingTool", this), m_distortionsTool("SCT_DistortionsTool", this), - m_scaleSctCov(false), m_option_make2dimBarrelClusters(false), m_doDistortions(false), m_option_errorStrategy(-1), @@ -37,8 +37,6 @@ FTK_SCTClusterOnTrackTool::FTK_SCTClusterOnTrackTool // declareInterface<FTK_SCTClusterOnTrackTool>(this); declareInterface<IRIO_OnTrackCreator>(this); - declareProperty("ErrorScalingTool", m_errorScalingTool, - "The toolhandle for central error scaling"); declareProperty("MakeTwoDimBarrelClusters", m_option_make2dimBarrelClusters, "flag if strip length should be part of the measurement"); declareProperty("ErrorStrategy", m_option_errorStrategy, @@ -88,15 +86,9 @@ FTK_SCTClusterOnTrackTool::initialize() { msg(MSG::INFO) << "SCT cluster positions will be corrected" << endmsg; } - if (m_errorScalingTool.retrieve().isFailure()) { - msg(MSG::FATAL) << "Failed to retrieve tool " << m_errorScalingTool << endmsg; - return StatusCode::FAILURE; - } else { - msg(MSG::INFO) << "Retrieved tool " << m_errorScalingTool << endmsg; - m_scaleSctCov = m_errorScalingTool->needToScaleSct(); - if (m_scaleSctCov) { - msg(MSG::DEBUG) << "Detected need for scaling SCT errors." << endmsg; - } + if (!m_sctErrorScalingKey.key().empty()) { + ATH_CHECK(m_sctErrorScalingKey.initialize()); + ATH_MSG_DEBUG("Detected need for scaling sct errors."); } // Get ISCT_ModuleDistortionsTool @@ -225,26 +217,18 @@ FTK_SCTClusterOnTrackTool::correct cov(0, 0) = oldcov(0, 0); } - if (m_scaleSctCov) { - Amg::MatrixX *newCov = m_errorScalingTool->createScaledSctCovariance(cov, false, 0.0); - if (!newCov) { - ATH_MSG_WARNING("Failed to create scaled error for SCT"); - return 0; - } - cov = *newCov; - delete newCov; + if (!m_sctErrorScalingKey.key().empty()) { + //SG::ReadCondHandle<SCTRIO_OnTrackErrorScaling> error_scaling( m_sctErrorScalingKey ); + SG::ReadCondHandle<RIO_OnTrackErrorScaling> error_scaling( m_sctErrorScalingKey ); + cov = check_cast<SCTRIO_OnTrackErrorScaling>(*error_scaling)->getScaledCovariance( cov, false, 0.0); } }else { // endcap locpar = Trk::LocalParameters(SC->localPosition()); - if (m_scaleSctCov) { - Amg::MatrixX *newCov = m_errorScalingTool->createScaledSctCovariance(cov, true, - EL->sinStereoLocal(SC->localPosition())); - if (!newCov) { - ATH_MSG_WARNING("Failed to create scaled error for SCT"); - return 0; - } - cov = *newCov; - delete newCov; + if (!m_sctErrorScalingKey.key().empty()) { + // SG::ReadCondHandle<SCTRIO_OnTrackErrorScaling> error_scaling( m_sctErrorScalingKey ); + SG::ReadCondHandle<RIO_OnTrackErrorScaling> error_scaling( m_sctErrorScalingKey ); + cov = check_cast<SCTRIO_OnTrackErrorScaling>(*error_scaling)->getScaledCovariance( cov, true, + EL->sinStereoLocal(SC->localPosition())); } double Sn = EL->sinStereoLocal(SC->localPosition()); double Sn2 = Sn * Sn; diff --git a/Trigger/TrigTools/TrigInDetTrackFitter/python/TrigInDetTrackFitter_Config.py b/Trigger/TrigTools/TrigInDetTrackFitter/python/TrigInDetTrackFitter_Config.py index 72ab137e485b..07a9134c65e4 100644 --- a/Trigger/TrigTools/TrigInDetTrackFitter/python/TrigInDetTrackFitter_Config.py +++ b/Trigger/TrigTools/TrigInDetTrackFitter/python/TrigInDetTrackFitter_Config.py @@ -15,9 +15,8 @@ class ConfiguredTrigL2_Extrapolator(Trk__Extrapolator) : from AthenaCommon.AppMgr import ToolSvc from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc - from IOVDbSvc.CondDB import conddb - if not (conddb.folderRequested( "/Indet/TrkErrorScaling" ) or conddb.folderRequested( "/Indet/Onl/TrkErrorScaling" )): - conddb.addFolderSplitOnline("INDET", "/Indet/Onl/TrkErrorScaling", "/Indet/TrkErrorScaling" ) + from InDetRecExample.TrackingCommon import createAndAddCondAlg, getRIO_OnTrackErrorScalingCondAlg + createAndAddCondAlg(getRIO_OnTrackErrorScalingCondAlg,'RIO_OnTrackErrorScalingCondAlg') from TrkExSTEP_Propagator.TrkExSTEP_PropagatorConf import Trk__STEP_Propagator TrigL2_StepPropagator = Trk__STEP_Propagator(name = 'TrigL2_StepPropagator') -- GitLab From bb3c141043e5dd87e5c4f41fec5029c94cf8cb8f Mon Sep 17 00:00:00 2001 From: Goetz Gaycken <goetz.gaycken@cern.ch> Date: Tue, 17 Jul 2018 17:50:44 +0200 Subject: [PATCH 524/562] Replace tool for TGC, RPC, CSC RIO error scaling by specialised conditions data. The TGC, RPC, and CSC RIO on track error scaling is now handled by specialised conditions data rather than a tool where the conditions data is created by a conditions algorithm. Former-commit-id: 5975f71cf8d1f10cb0dfefd489ad2e4dacf08282 --- .../MdtDriftCircleOnTrackCreator.h | 3 - .../src/MdtDriftCircleOnTrackCreator.cxx | 8 -- .../MuonClusterOnTrackCreator/CMakeLists.txt | 6 +- .../src/CscClusterOnTrackCreator.cxx | 87 ++++++++----------- .../src/CscClusterOnTrackCreator.h | 17 ++-- .../src/MuonClusterOnTrackCreator.cxx | 38 -------- .../src/MuonClusterOnTrackCreator.h | 2 - .../MuonEtaPhiRIO_OnTrackErrorScaling.h | 31 +++++++ .../src/MuonEtaPhiRIO_OnTrackErrorScaling.cxx | 44 ++++++++++ .../MuonRecExample/python/MuonRecTools.py | 10 +++ .../TrkRIO_OnTrackCreator/CMakeLists.txt | 3 +- .../src/RIO_OnTrackErrorScalingMuonKits.cxx | 44 ++++++++++ 12 files changed, 182 insertions(+), 111 deletions(-) create mode 100644 MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/MuonRIO_OnTrack/MuonEtaPhiRIO_OnTrackErrorScaling.h create mode 100644 MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/src/MuonEtaPhiRIO_OnTrackErrorScaling.cxx create mode 100644 Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingMuonKits.cxx diff --git a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator.h b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator.h index 31b10060b144..a0eacada6ad1 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator.h @@ -19,7 +19,6 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" -#include "TrkToolInterfaces/IRIO_OnTrackErrorScalingTool.h" #include "MuonRecToolInterfaces/IMdtDriftCircleOnTrackCreator.h" #include "MuonRIO_OnTrack/MdtDriftCircleOnTrack.h" #include "MuonRIO_OnTrack/MuonDriftCircleErrorStrategy.h" @@ -71,7 +70,6 @@ namespace Muon { - doMDT: switch on/off ROT creation (default = true) - TimingMode: select timing mode (default = ATLTIME) - MuonTofTool: Tool to be used to calculate time of flight (default = "Muon::MuonCosmicTofTool/MuonCosmicTofTool") - - ErrorScalingTool: Tool to scale errors (default = "Trk::RIO_OnTrackErrorScalingTool/RIO_OnTrackErrorScalingTool") - DoWireSag: Flag to turn on application of geometrical wire sagging correstions (default = false) - CreateTubeHit: Flag to turn on the creation of tube hits (default = false) */ @@ -199,7 +197,6 @@ namespace Muon { ToolHandle<Muon::MuonIdHelperTool> m_idHelper; ServiceHandle<MdtCalibrationSvc> m_mdtCalibSvc; ServiceHandle<MdtCalibrationDbSvc> m_mdtCalibDbSvc; - ToolHandle<Trk::IRIO_OnTrackErrorScalingTool> m_errorScalingTool; ToolHandle<IMuonTofTool> m_tofTool; //!<Time of flight tool (handle tof if not coming from IP) // Configuration variables diff --git a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MdtDriftCircleOnTrackCreator/src/MdtDriftCircleOnTrackCreator.cxx b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MdtDriftCircleOnTrackCreator/src/MdtDriftCircleOnTrackCreator.cxx index d5d9a853b93b..a14087748902 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MdtDriftCircleOnTrackCreator/src/MdtDriftCircleOnTrackCreator.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MdtDriftCircleOnTrackCreator/src/MdtDriftCircleOnTrackCreator.cxx @@ -48,7 +48,6 @@ Muon::MdtDriftCircleOnTrackCreator::MdtDriftCircleOnTrackCreator m_idHelper("Muon::MuonIdHelperTool/MuonIdHelperTool"), m_mdtCalibSvc("MdtCalibrationSvc", na), m_mdtCalibDbSvc("MdtCalibrationDbSvc", na), - m_errorScalingTool("Trk::RIO_OnTrackErrorScalingTool/RIO_OnTrackErrorScalingTool"), m_tofTool(""), m_invSpeed(1./299.792458), m_mdtCalibSvcSettings( 0 ), @@ -66,7 +65,6 @@ Muon::MdtDriftCircleOnTrackCreator::MdtDriftCircleOnTrackCreator declareProperty("doMDT", m_doMdt = true); declareProperty("TimingMode", m_timeCorrectionType = 0 ); declareProperty("MuonTofTool", m_tofTool ); - declareProperty("ErrorScalingTool", m_errorScalingTool ); declareProperty("FixedError",m_fixedError = 1.); declareProperty("DiscardMaskedHits",m_discardMaskedHits = true); declareProperty("GlobalToLocalTolerance",m_globalToLocalTolerance = 1000., "Tolerance used for the Surface::globalToLocal" ); @@ -171,12 +169,6 @@ StatusCode Muon::MdtDriftCircleOnTrackCreator::initialize() ATH_MSG_WARNING( " tool is configured such that MDT_DCs are only copied!" ); } - // get error scaling tool - if(m_errorScalingTool.retrieve().isFailure()) { - ATH_MSG_WARNING( "Can not get error scaling tool " << m_errorScalingTool << ", will trigger failure." ); - return StatusCode::SUCCESS; - } - if( m_timeCorrectionType == COSMICS_TOF ){ if( m_tofTool.empty() ) { ATH_MSG_ERROR( "The time of flight tool is not configured. Please check your configuration" ); diff --git a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/CMakeLists.txt b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/CMakeLists.txt index e53a9ac441b3..3cd7bfc0884e 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/CMakeLists.txt +++ b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/CMakeLists.txt @@ -18,15 +18,15 @@ atlas_depends_on_subdirs( PRIVATE MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces Tracking/TrkDetDescr/TrkSurfaces Tracking/TrkEvent/TrkEventPrimitives + Tracking/TrkEvent/TrkRIO_OnTrack Tracking/TrkEvent/TrkParameters - Tracking/TrkEvent/TrkPrepRawData - Tracking/TrkTools/TrkToolInterfaces ) + Tracking/TrkEvent/TrkPrepRawData ) # Component(s) in the package: atlas_add_component( MuonClusterOnTrackCreator src/*.cxx src/components/*.cxx - LINK_LIBRARIES AthenaBaseComps EventPrimitives GaudiKernel MuonReadoutGeometry MuonIdHelpersLib CscClusterizationLib MuonPrepRawData MuonRIO_OnTrack MuonRecToolInterfaces TrkSurfaces TrkEventPrimitives TrkParameters TrkPrepRawData TrkToolInterfaces ) + LINK_LIBRARIES AthenaBaseComps EventPrimitives GaudiKernel MuonReadoutGeometry MuonIdHelpersLib CscClusterizationLib MuonPrepRawData MuonRIO_OnTrack MuonRecToolInterfaces TrkSurfaces TrkEventPrimitives TrkParameters TrkPrepRawData TrkRIO_OnTrack ) # Install files from the package: atlas_install_joboptions( share/*.py ) diff --git a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/CscClusterOnTrackCreator.cxx b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/CscClusterOnTrackCreator.cxx index e37e15d49009..48852d3ec541 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/CscClusterOnTrackCreator.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/CscClusterOnTrackCreator.cxx @@ -36,6 +36,8 @@ #include "CscClusterization/ICscClusterUtilTool.h" #include "EventPrimitives/EventPrimitivesHelpers.h" +#include "TrkRIO_OnTrack/check_cast.h" + using std::vector; using std::setw; using std::atan2; @@ -55,7 +57,6 @@ namespace Muon { m_cscIdHelper(0), m_rpcIdHelper(0), m_tgcIdHelper(0), - m_errorScalingTool("Trk::RIO_OnTrackErrorScalingTool/RIO_OnTrackErrorScalingTool"), m_stripFitter("CalibCscStripFitter/CalibCscStripFitter"), m_clusterFitter("QratCscClusterFitter/QratCscClusterFitter"), m_clusterUtilTool("CscClusterUtilTool/CscClusterUtilTool"), @@ -69,10 +70,6 @@ namespace Muon { declareProperty("doCSC", m_doCsc = true); declareProperty("doRPC", m_doRpc = true); declareProperty("doTGC", m_doTgc = true); - declareProperty("DoRpcErrorScaling", m_scaleRpcCov = false ); - declareProperty("DoTgcErrorScaling", m_scaleTgcCov = false ); - declareProperty("DoCscErrorScaling", m_scaleCscCov = false ); - declareProperty("ErrorScalingTool", m_errorScalingTool ); declareProperty("CscStripFitter", m_stripFitter ); declareProperty("CscClusterFitter", m_clusterFitter ); declareProperty("CscClusterUtilTool", m_clusterUtilTool ); @@ -119,15 +116,14 @@ namespace Muon { // get error scaling tool // - if ( m_errorScalingTool.retrieve().isFailure() ) { - ATH_MSG_WARNING ( "Can not get error scaling tool " << m_errorScalingTool - << ", will trigger failure." ); - return StatusCode::SUCCESS; - } else { - m_scaleCscCov = m_errorScalingTool->needToScaleCsc(); - m_scaleRpcCov = m_errorScalingTool->needToScaleRpc(); - m_scaleTgcCov = m_errorScalingTool->needToScaleTgc(); - ATH_MSG_DEBUG ( "initialise() successful in " << name() ); + if (!m_cscErrorScalingKey.key().empty() ) { + ATH_CHECK( m_cscErrorScalingKey.initialize() ); + } + if (!m_tgcErrorScalingKey.key().empty() ) { + ATH_CHECK( m_tgcErrorScalingKey.initialize() ); + } + if (!m_rpcErrorScalingKey.key().empty() ) { + ATH_CHECK( m_rpcErrorScalingKey.initialize() ); } if ( m_stripFitter.retrieve().isFailure() ) { @@ -210,32 +206,30 @@ namespace Muon { // Error matrix production - expect more intelligent code here. // - Amg::MatrixX* cov = 0; - Amg::MatrixX oldLocalCov = RIO.localCovariance(); - + Amg::MatrixX loce = RIO.localCovariance(); + if ( m_cscIdHelper && m_cscIdHelper->is_csc(RIO.identify()) - && m_scaleCscCov ) { - cov = m_errorScalingTool->createScaledCscCovariance(oldLocalCov); - ATH_MSG_VERBOSE ( "CSC: new cov(0,0) is " << (*cov)(0,0) ); + && !m_cscErrorScalingKey.key().empty()) { + SG::ReadCondHandle<RIO_OnTrackErrorScaling> error_scaling( m_cscErrorScalingKey ); + loce = check_cast<MuonEtaPhiRIO_OnTrackErrorScaling>(*error_scaling)->getScaledCovariance( loce, Trk::distPhi); + ATH_MSG_VERBOSE ( "CSC: new cov(0,0) is " << loce(0,0) ); } if ( m_rpcIdHelper && m_rpcIdHelper->is_rpc(RIO.identify()) - && m_scaleRpcCov ) { - cov = m_errorScalingTool->createScaledRpcCovariance(oldLocalCov); - ATH_MSG_VERBOSE ( "RPC: new cov(0,0) is " << (*cov)(0,0) ); + && !m_rpcErrorScalingKey.key().empty()) { + SG::ReadCondHandle<RIO_OnTrackErrorScaling> error_scaling( m_rpcErrorScalingKey ); + loce = check_cast<MuonEtaPhiRIO_OnTrackErrorScaling>(*error_scaling)->getScaledCovariance( loce, Trk::distPhi); + ATH_MSG_VERBOSE ( "RPC: new cov(0,0) is " << loce(0,0) ); } if ( m_tgcIdHelper && m_tgcIdHelper->is_tgc(RIO.identify()) - && m_scaleTgcCov ) { - cov = m_errorScalingTool->createScaledTgcCovariance(oldLocalCov); - ATH_MSG_VERBOSE ( "TGC: new cov(1,1) is " << (*cov)(0,0) ); + && !m_tgcErrorScalingKey.key().empty() ) { + SG::ReadCondHandle<RIO_OnTrackErrorScaling> error_scaling( m_tgcErrorScalingKey ); + loce = check_cast<MuonEtaPhiRIO_OnTrackErrorScaling>(*error_scaling)->getScaledCovariance( loce, Trk::distPhi); + ATH_MSG_VERBOSE ( "TGC: new cov(1,1) is " << loce(0,0) ); } - Amg::MatrixX loce = (cov) ? - Amg::MatrixX(*cov) : - Amg::MatrixX(RIO.localCovariance()) ; - if( m_rpcIdHelper && m_rpcIdHelper->is_rpc(RIO.identify()) ){ // cast to RpcPrepData const RpcPrepData* MClus = dynamic_cast<const RpcPrepData*> (&RIO); @@ -357,14 +351,14 @@ namespace Muon { // Error matrix production - expect more intelligent code here. // - Amg::MatrixX* cov = 0; - Amg::MatrixX oldLocalCov = RIO.localCovariance(); + Amg::MatrixX loce = RIO.localCovariance(); if ( m_cscIdHelper && m_cscIdHelper->is_csc(RIO.identify()) - && m_scaleCscCov ) { - cov = m_errorScalingTool->createScaledCscCovariance(oldLocalCov); - ATH_MSG_VERBOSE ( "CSC: new cov(0,0) is " << (*cov)(0,0) ); + && !m_cscErrorScalingKey.key().empty()) { + SG::ReadCondHandle<RIO_OnTrackErrorScaling> error_scaling( m_cscErrorScalingKey ); + loce = check_cast<MuonEtaPhiRIO_OnTrackErrorScaling>(*error_scaling)->getScaledCovariance( loce, Trk::distPhi); + ATH_MSG_VERBOSE ( "CSC: new cov(0,0) is " << loce(0,0) ); } // postion Error is re-estimate only for precision fit cluster (eta) @@ -372,9 +366,6 @@ namespace Muon { && MClus->status() != Muon::CscStatusUnspoiled && MClus->status() != Muon::CscStatusSplitUnspoiled ) { // current not changing CscClusterStatus but passing status of RIO - Amg::MatrixX loce = (cov) ? Amg::MatrixX(*cov) - : Amg::MatrixX(RIO.localCovariance()) ; - delete cov; MClT = new CscClusterOnTrack(MClus,locpar,loce,positionAlongStrip,MClus->status(),MClus->timeStatus(),MClus->time()); } else { @@ -400,14 +391,10 @@ namespace Muon { if ( fitresult ) { ATH_MSG_VERBOSE ( " Precision fit failed which was succeeded: return=" << "cluStatus: " << res.clusterStatus << "fitStatus: " << res.fitStatus ); - Amg::MatrixX loce = (cov) ? Amg::MatrixX(*cov) - : Amg::MatrixX(RIO.localCovariance()) ; - delete cov; return new CscClusterOnTrack(MClus,locpar,loce,positionAlongStrip,MClus->status(),MClus->timeStatus(),MClus->time()); } else { ATH_MSG_VERBOSE ( " Precision fit succeeded" ); } - ATH_MSG_VERBOSE ( " Angle from Segment: " << " :: tanangle : " << tantheta ); @@ -420,18 +407,18 @@ namespace Muon { double errorCorrected = sqrt( nominal_error*nominal_error*m_errorScaler*m_errorScaler + m_errorScalerBeta*m_errorScalerBeta); if( errorCorrected < m_minimumError ) errorCorrected = m_minimumError; - Amg::MatrixX* pcov = 0; - Amg::MatrixX mat = Amg::MatrixX(1,1); - mat.setIdentity(); + Amg::MatrixX newloce( Amg::MatrixX(1,1) ); + newloce.setIdentity(); // mat *= res.dposition*res.dposition; - mat *= errorCorrected*errorCorrected; - pcov = m_errorScalingTool->createScaledCscCovariance(mat); + newloce *= errorCorrected*errorCorrected; + if (!m_cscErrorScalingKey.key().empty()) { + SG::ReadCondHandle<RIO_OnTrackErrorScaling> error_scaling( m_cscErrorScalingKey ); + newloce = check_cast<MuonEtaPhiRIO_OnTrackErrorScaling>(*error_scaling)->getScaledCovariance( newloce, Trk::distPhi); + } + // pcov = pcov_beforeScale; // Trk::ErrorMatrix* newloce = new Trk::ErrorMatrix(pcov); - Amg::MatrixX newloce = (pcov) ? Amg::MatrixX(*pcov) - : Amg::MatrixX(RIO.localCovariance()) ; - delete pcov; ATH_MSG_VERBOSE ( "All: new err matrix is " << newloce ); ATH_MSG_VERBOSE ( " dpos changed ====> " << Amg::error(newloce,Trk::loc1) ); diff --git a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/CscClusterOnTrackCreator.h b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/CscClusterOnTrackCreator.h index 52d0a4cc97b2..7e9c0604cd1e 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/CscClusterOnTrackCreator.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/CscClusterOnTrackCreator.h @@ -19,12 +19,12 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" #include "MuonRecToolInterfaces/IMuonClusterOnTrackCreator.h" -#include "TrkToolInterfaces/IRIO_OnTrackErrorScalingTool.h" #include "MuonRIO_OnTrack/MuonClusterOnTrack.h" #include "MuonReadoutGeometry/MuonDetectorManager.h" #include "TrkPrepRawData/PrepRawDataCLASS_DEF.h" #include "TrkParameters/TrackParameters.h" +#include "MuonRIO_OnTrack/MuonEtaPhiRIO_OnTrackErrorScaling.h" #include "MuonPrepRawData/CscStripPrepDataContainer.h" @@ -54,7 +54,7 @@ namespace Muon { - doCSC: switch on/off CSC ROT creation (default = true) - doRPC: switch on/off RPC ROT creation (default = true) - doTGC: switch on/off TGC ROT creation (default = true) - - ErrorScalingTool: Tool to scale errors (default = "Trk::RIO_OnTrackErrorScalingTool/RIO_OnTrackErrorScalingTool") + - [CSC,TGC,RPC]ErrorScalingKey: if not empty use error scaling conditions data to scale the corresponding muon covariances - CscClusterFitter: Tool to fit charge and width of CSC clusters - CscStripFitter: Tool to fit charge + time of a CSC strip - CscStripPrepDataLocation: Storegate key of the CscStripPrepData collection @@ -101,14 +101,19 @@ namespace Muon { const CscIdHelper* m_cscIdHelper; const RpcIdHelper* m_rpcIdHelper; const TgcIdHelper* m_tgcIdHelper; - ToolHandle<Trk::IRIO_OnTrackErrorScalingTool> m_errorScalingTool; ToolHandle<ICscStripFitter> m_stripFitter; ToolHandle<ICscClusterFitter> m_clusterFitter; ToolHandle<ICscClusterUtilTool> m_clusterUtilTool; bool m_have_csc_tools; - bool m_scaleCscCov; - bool m_scaleRpcCov; - bool m_scaleTgcCov; + + SG::ReadCondHandleKey<RIO_OnTrackErrorScaling> m_cscErrorScalingKey + {this,"CSCErrorScalingKey", "" /*"/MUON/TrkErrorScalingCSC"*/, "Key for CSC error scaling conditions data. No error scaling if empty."}; + + SG::ReadCondHandleKey<RIO_OnTrackErrorScaling> m_tgcErrorScalingKey + {this,"TGCErrorScalingKey", "" /*"/MUON/TrkErrorScalingTGC"*/, "Key for TGC error scaling conditions data. No error scaling if empty."}; + + SG::ReadCondHandleKey<RIO_OnTrackErrorScaling> m_rpcErrorScalingKey + {this,"RPCErrorScalingKey", "" /*"/MUON/TrkErrorScalingRPC"*/, "Key for RPC error scaling conditions data. No error scaling if empty."}; bool m_doCsc; bool m_doRpc; diff --git a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/MuonClusterOnTrackCreator.cxx b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/MuonClusterOnTrackCreator.cxx index 51cd718907d4..589ddebdc46d 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/MuonClusterOnTrackCreator.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/MuonClusterOnTrackCreator.cxx @@ -42,7 +42,6 @@ namespace Muon { MuonClusterOnTrackCreator::MuonClusterOnTrackCreator (const std::string& ty,const std::string& na,const IInterface* pa) : AthAlgTool(ty,na,pa), - m_errorScalingTool("Trk::RIO_OnTrackErrorScalingTool/RIO_OnTrackErrorScalingTool"), m_idHelper("Muon::MuonIdHelperTool/MuonIdHelperTool") { // algtool interface - necessary! @@ -53,10 +52,6 @@ namespace Muon { declareProperty("doCSC", m_doCsc = true); declareProperty("doRPC", m_doRpc = true); declareProperty("doTGC", m_doTgc = true); - declareProperty("DoRpcErrorScaling", m_scaleRpcCov = false ); - declareProperty("DoTgcErrorScaling", m_scaleTgcCov = false ); - declareProperty("DoCscErrorScaling", m_scaleCscCov = false ); - declareProperty("ErrorScalingTool", m_errorScalingTool ); declareProperty("DoFixedErrorTgcEta", m_doFixedErrorTgcEta = false ); declareProperty("DoFixedErrorRpcEta", m_doFixedErrorRpcEta = false ); declareProperty("DoFixedErrorCscEta", m_doFixedErrorCscEta = false ); @@ -90,19 +85,6 @@ namespace Muon { return StatusCode::FAILURE; } - // get error scaling tool - // - if(m_errorScalingTool.retrieve().isFailure()) { - ATH_MSG_WARNING ( "Can not get error scaling tool " << m_errorScalingTool - << ", will trigger failure." ); - return StatusCode::SUCCESS; - } else { - m_scaleCscCov = m_errorScalingTool->needToScaleCsc(); - m_scaleRpcCov = m_errorScalingTool->needToScaleRpc(); - m_scaleTgcCov = m_errorScalingTool->needToScaleTgc(); - ATH_MSG_INFO ( "initialise() successful in " << name() ); - } - return StatusCode::SUCCESS; } @@ -164,26 +146,6 @@ namespace Muon { } positionAlongStrip = lp[Trk::locY]; - // Error matrix production - expect more intelligent code here. - // - // Amg::MatrixX* cov = 0; - // Amg::MatrixX oldLocalCov = RIO.localCovariance(); - // if ( m_idHelper->isCsc(RIO.identify()) && m_scaleCscCov ) { - // cov = m_errorScalingTool->createScaledCscCovariance(oldLocalCov); - // ATH_MSG_VERBOSE ( "CSC: new cov(0,0) is " << (*cov)(0,0) ); - // } - // if ( m_idHelper->isRpc(RIO.identify()) && m_scaleRpcCov ) { - // cov = m_errorScalingTool->createScaledRpcCovariance(oldLocalCov); - // ATH_MSG_VERBOSE ( "RPC: new cov(0,0) is " << (*cov)(0,0) ); - // } - // if ( m_idHelper->isTgc(RIO.identify()) && m_scaleTgcCov ) { - // cov = m_errorScalingTool->createScaledTgcCovariance(oldLocalCov); - // ATH_MSG_VERBOSE ( "TGC: new cov(0,0) is " << (*cov)(0,0) ); - // } - // Amg::MatrixX loce = (cov) ? - // Amg::MatrixX(*cov) : - // Amg::MatrixX(RIO.localCovariance()) ; - // delete cov; Amg::MatrixX loce = RIO.localCovariance(); ATH_MSG_DEBUG ( "All: new err matrix is " << loce ); diff --git a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/MuonClusterOnTrackCreator.h b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/MuonClusterOnTrackCreator.h index f047899d6144..266e992b291e 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/MuonClusterOnTrackCreator.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/MuonClusterOnTrackCreator.h @@ -19,7 +19,6 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" #include "MuonRecToolInterfaces/IMuonClusterOnTrackCreator.h" -#include "TrkToolInterfaces/IRIO_OnTrackErrorScalingTool.h" #include "MuonRIO_OnTrack/MuonClusterOnTrack.h" #include "MuonIdHelpers/MuonIdHelperTool.h" @@ -86,7 +85,6 @@ namespace Muon { // Private data: // ///////////////////////////////////////////////////////////////// - ToolHandle<Trk::IRIO_OnTrackErrorScalingTool> m_errorScalingTool; ToolHandle<Muon::MuonIdHelperTool> m_idHelper; bool m_scaleCscCov; bool m_scaleRpcCov; diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/MuonRIO_OnTrack/MuonEtaPhiRIO_OnTrackErrorScaling.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/MuonRIO_OnTrack/MuonEtaPhiRIO_OnTrackErrorScaling.h new file mode 100644 index 000000000000..8b3634e1307e --- /dev/null +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/MuonRIO_OnTrack/MuonEtaPhiRIO_OnTrackErrorScaling.h @@ -0,0 +1,31 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ +#ifndef _MUONETAPHIRIO_OnTrackErrorScaling_H_ +#define _MUONETAPHIRIO_OnTrackErrorScaling_H_ + +#include "TrkRIO_OnTrack/RIO_OnTrackErrorScaling.h" +#include "TrkEventPrimitives/ParamDefs.h" + +class MuonEtaPhiRIO_OnTrackErrorScaling : public RIO_OnTrackErrorScaling +{ +public: + virtual CLID clid() const override; + + virtual Amg::MatrixX getScaledCovariance(const Amg::MatrixX& cov_input, + const Trk::ParamDefs measuredCoord) const; + + enum EMuonEtaPhiErrorScalingRegions { + kPhi, + kEta, + kNParamTypes}; + + static const char **paramNames() { return s_names; } + virtual bool postProcess() override; +protected: + static const char *s_names[kNParamTypes]; +}; + +CLASS_DEF( MuonEtaPhiRIO_OnTrackErrorScaling , 92816455, 1 ) +CONDCONT_DEF(MuonEtaPhiRIO_OnTrackErrorScaling, 81544491, RIO_OnTrackErrorScaling); +#endif diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/src/MuonEtaPhiRIO_OnTrackErrorScaling.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/src/MuonEtaPhiRIO_OnTrackErrorScaling.cxx new file mode 100644 index 000000000000..64c2024ff693 --- /dev/null +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/src/MuonEtaPhiRIO_OnTrackErrorScaling.cxx @@ -0,0 +1,44 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ +#include "MuonRIO_OnTrack/MuonEtaPhiRIO_OnTrackErrorScaling.h" +#include <iostream> + +const char *MuonEtaPhiRIO_OnTrackErrorScaling::s_names[MuonEtaPhiRIO_OnTrackErrorScaling::kNParamTypes]={ + "Phi", + "Eta" + }; + +namespace { + inline double square(double a) { return a*a; } +} + +CLID MuonEtaPhiRIO_OnTrackErrorScaling::clid() const { + return ClassID_traits<CondCont<MuonEtaPhiRIO_OnTrackErrorScaling> >::ID(); +} + +bool MuonEtaPhiRIO_OnTrackErrorScaling::postProcess() { + checkParameters("MuonEtaPhiRIO_OnTrackErrorScaling", kNParamTypes, s_names, 2); + return true; +} + +Amg::MatrixX MuonEtaPhiRIO_OnTrackErrorScaling::getScaledCovariance(const Amg::MatrixX& cov_input, + const Trk::ParamDefs measuredCoord) const +{ + Amg::MatrixX newCov(cov_input); + double a,b = 0.0; + if (measuredCoord == Trk::distPhi) { + a = params()[kPhi][0]; + b = params()[kPhi][1]; + } else if (measuredCoord == Trk::distEta) { + a = params()[kEta][0]; + b = params()[kEta][1]; + } else { + throw std::runtime_error("Invalid measured coordinate. Only Trk::distPhi and Trk::distEta are supported."); + } + newCov(0,0) *= square(a); + newCov(0,0) += square(b); + return newCov; +} + + diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecTools.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecTools.py index 4a8efdd4a416..3326352a52b8 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecTools.py +++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecTools.py @@ -45,11 +45,21 @@ def MuonClusterOnTrackCreator(name="MuonClusterOnTrackCreator",**kwargs): return CfgMgr.Muon__MuonClusterOnTrackCreator(name,**kwargs) +def getMuonRIO_OnTrackErrorScalingCondAlg() : + error_scaling_def=["CSCRIO_OnTrackErrorScaling:/MUON/TrkErrorScalingCSC"] + return getRIO_OnTrackErrorScalingCondAlg( name = "MuonRIO_OnTrackErrorScalingCondAlg", + ReadKey = "/MUON/TrkErrorScaling", + CondDataAssociation = error_scaling_def) def CscClusterOnTrackCreator(name="CscClusterOnTrackCreator",**kwargs): kwargs.setdefault("CscStripFitter", getPublicTool("CalibCscStripFitter") ) kwargs.setdefault("CscClusterFitter", getPublicTool("QratCscClusterFitter") ) kwargs.setdefault("CscClusterUtilTool", getPublicTool("CscClusterUtilTool") ) + if False : # enable CscClusterOnTrack error scaling : + from InDetRecExample.TrackingCommon import getRIO_OnTrackErrorScalingCondAlg,createAndAddCondAlg + createAndAddCondAlg(getMuonRIO_OnTrackErrorScalingCondAlg,'RIO_OnTrackErrorScalingCondAlg') + + kwargs.setdefault("CSCErrorScalingKey","/MUON/TrkErrorScalingCSC") if globalflags.DataSource() == 'data': # collisions real data or simulated first data # scale CSC and hit errors diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/CMakeLists.txt b/Tracking/TrkTools/TrkRIO_OnTrackCreator/CMakeLists.txt index 1882d76b1c45..cf63d308f452 100644 --- a/Tracking/TrkTools/TrkRIO_OnTrackCreator/CMakeLists.txt +++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/CMakeLists.txt @@ -20,6 +20,7 @@ atlas_depends_on_subdirs( PUBLIC Event/xAOD/xAODEventInfo InnerDetector/InDetDetDescr/InDetIdentifier InnerDetector/InDetRecEvent/InDetRIO_OnTrack + MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack Tracking/TrkEvent/TrkPrepRawData Tracking/TrkEvent/TrkRIO_OnTrack ) @@ -27,7 +28,7 @@ atlas_depends_on_subdirs( PUBLIC atlas_add_component( TrkRIO_OnTrackCreator src/*.cxx src/components/*.cxx - LINK_LIBRARIES AthenaBaseComps AthenaKernel EventPrimitives GaudiKernel TrkParameters TrkToolInterfaces AthenaPoolUtilities AtlasDetDescr Identifier xAODEventInfo InDetIdentifier InDetRIO_OnTrack TrkPrepRawData TrkRIO_OnTrack ) + LINK_LIBRARIES AthenaBaseComps AthenaKernel EventPrimitives GaudiKernel TrkParameters TrkToolInterfaces AthenaPoolUtilities AtlasDetDescr Identifier xAODEventInfo InDetIdentifier InDetRIO_OnTrack MuonRIO_OnTrack TrkPrepRawData TrkRIO_OnTrack ) # Install files from the package: atlas_install_headers( TrkRIO_OnTrackCreator ) diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingMuonKits.cxx b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingMuonKits.cxx new file mode 100644 index 000000000000..eeb13f455eea --- /dev/null +++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingMuonKits.cxx @@ -0,0 +1,44 @@ +#include "RIO_OnTrackErrorScalingKit.h" +#include "MuonRIO_OnTrack/MuonEtaPhiRIO_OnTrackErrorScaling.h" + +typedef char * CharPtr_t; +class MuonEtaPhiRIO_OnTrackErrorScalingKit + : public RIO_OnTrackErrorScalingSpecialisedKit<MuonEtaPhiRIO_OnTrackErrorScaling> +{ +public: + MuonEtaPhiRIO_OnTrackErrorScalingKit(const std::string &prefix) { + // use C-style array of strings to satisfy the interface + m_names=new CharPtr_t[MuonEtaPhiRIO_OnTrackErrorScaling::kNParamTypes]; + for (unsigned int idx=0; idx< MuonEtaPhiRIO_OnTrackErrorScaling::kNParamTypes; ++idx ) { + std::string tmp( prefix + " " + MuonEtaPhiRIO_OnTrackErrorScaling::paramNames()[idx] ); + tmp.shrink_to_fit(); + m_names[idx]=new char[ tmp.capacity() ]; + strncpy( m_names[idx], tmp.c_str(), tmp.capacity() ); + } + } + ~MuonEtaPhiRIO_OnTrackErrorScalingKit() { + for (unsigned idx=0; idx<MuonEtaPhiRIO_OnTrackErrorScaling::kNParamTypes; ++idx) { + delete [] m_names[idx]; + } + delete [] m_names; + } + virtual unsigned int nParametres() const override { + return MuonEtaPhiRIO_OnTrackErrorScaling::kNParamTypes; + } + virtual const char **paramNames() const override { + return const_cast<const char **>(m_names); + } +private: + char **m_names; +}; + + +namespace { + // register all kits with the help of a dummy function which sets a global anonymous bool + bool registered = ( []() -> bool { + return + RIO_OnTrackErrorScalingKitManager::instance().registerKit("RPCRIO_OnTrackErrorScaling", new MuonEtaPhiRIO_OnTrackErrorScalingKit("RPC")) + && RIO_OnTrackErrorScalingKitManager::instance().registerKit("TGCRIO_OnTrackErrorScaling", new MuonEtaPhiRIO_OnTrackErrorScalingKit("TGC")) + && RIO_OnTrackErrorScalingKitManager::instance().registerKit("CSCRIO_OnTrackErrorScaling", new MuonEtaPhiRIO_OnTrackErrorScalingKit("CSC")); + } ) (); +} -- GitLab From 1c684ba05bc22915777648afbe9515e6ef83ff69 Mon Sep 17 00:00:00 2001 From: Goetz Gaycken <goetz.gaycken@cern.ch> Date: Fri, 15 Jun 2018 17:17:26 +0200 Subject: [PATCH 525/562] Added algorithm to provide custom error scaling conditions data. This restores the override properties of the original error scaling tool and allows to provide custom error scalaing parameters without a custom database. Former-commit-id: 59055193a5a14552ad2ea1ead014507065c3066e --- .../InDetRecExample/python/TrackingCommon.py | 34 +++++ ...O_OnTrackErrorScalingDbOverrideCondAlg.cxx | 140 ++++++++++++++++++ ...RIO_OnTrackErrorScalingDbOverrideCondAlg.h | 48 ++++++ .../TrkRIO_OnTrackCreator_entries.cxx | 2 + 4 files changed, 224 insertions(+) create mode 100644 Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingDbOverrideCondAlg.cxx create mode 100644 Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingDbOverrideCondAlg.h diff --git a/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py b/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py index e964c9e3f02d..d9af6ad10621 100644 --- a/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py +++ b/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py @@ -15,6 +15,39 @@ def setDefaults(kwargs, **def_kwargs) : def_kwargs.update(kwargs) return def_kwargs +def getPixelRIO_OnTrackErrorScalingDbOverrideCondAlg( **kwargs) : + ''' + usage: + createAndAddCondAlg( getPixelRIO_OnTrackErrorScalingDbOverrideCondAlg, 'PixelRIO_OnTrackErrorScalingDbOverrideCondAlg' ) + ''' + the_name=kwargs.pop("name",None) + from AtlasGeoModel.InDetGMJobProperties import InDetGeometryFlags as geoFlags + # kPixBarrelPhi + params = [ 10. , 0.0044] + # kPixBarrelEta + params += [ 10. , 0.0312] + # kPixEndcapPhi, + params += [ 10. , 0.026] + # kPixEndcapEta, + params += [ 10. , 0.0] + if geoFlags.isIBL() : + error_scaling_type='PixelRIO_OnTrackErrorScaling' + # kPixIBLPhi + params += [ 10. , 0.0044] + # kPixIBLEta + params += [ 10. , 0.0312] + else : + error_scaling_type='PixelRIO_OnTrackErrorScalingRun1' + + + from TrkRIO_OnTrackCreator.TrkRIO_OnTrackCreatorConf import RIO_OnTrackErrorScalingDbOverrideCondAlg + return RIO_OnTrackErrorScalingDbOverrideCondAlg( 'PixelRIO_OnTrackErrorScalingDbOverrideCondAlg', + **setDefaults( kwargs, + ErrorScalingTypeName = error_scaling_type, + WriteKey = "/Indet/TrkErrorScalingPixel", + ErorScalingParameters = params, + OutputLevel = 1) ) # VERBOSE + def getRIO_OnTrackErrorScalingCondAlg( **kwargs) : the_name=kwargs.pop("name",None) from AtlasGeoModel.InDetGMJobProperties import InDetGeometryFlags as geoFlags @@ -40,6 +73,7 @@ def getRIO_OnTrackErrorScalingCondAlg( **kwargs) : for elm in conddb.iovdbsvc.Folders : print 'DEBUG IOVDbSvc folder %s' % elm + from TrkRIO_OnTrackCreator.TrkRIO_OnTrackCreatorConf import RIO_OnTrackErrorScalingCondAlg if the_name == None : return RIO_OnTrackErrorScalingCondAlg( **setDefaults(kwargs, diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingDbOverrideCondAlg.cxx b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingDbOverrideCondAlg.cxx new file mode 100644 index 000000000000..6fe8e44bd542 --- /dev/null +++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingDbOverrideCondAlg.cxx @@ -0,0 +1,140 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "TrkRIO_OnTrack/RIO_OnTrackErrorScaling.h" +#include "RIO_OnTrackErrorScalingDbOverrideCondAlg.h" +#include "RIO_OnTrackErrorScalingKit.h" + +RIO_OnTrackErrorScalingDbOverrideCondAlg::RIO_OnTrackErrorScalingDbOverrideCondAlg(const std::string& name, ISvcLocator* pSvcLocator) + : ::AthAlgorithm(name, pSvcLocator) + , m_condSvc{"CondSvc", name} +{ +} + +StatusCode RIO_OnTrackErrorScalingDbOverrideCondAlg::initialize() { + ATH_CHECK(m_condSvc.retrieve()); + if (m_writeKey.key().empty()) { + ATH_MSG_FATAL("No conditions data write key specified."); + } + ATH_CHECK(m_writeKey.initialize()); + m_errorScalingDataKit = &(RIO_OnTrackErrorScalingKitManager::instance().kit( m_errorScalingTypeName )); + unsigned int n_parameters_total=0; + unsigned int n_parameter_sets = m_errorScalingDataKit->nParametres(); + if (n_parameter_sets>0) { + if (!m_nParameterPerSet.empty()) { + if (m_nParameterPerSet.size() != n_parameter_sets) { + ATH_MSG_FATAL("PrametersPerSet must either be empty or match the number of parameters of the error scaling class " << m_errorScalingTypeName); + return StatusCode::FAILURE; + } + else { + for (unsigned int n_parameters : m_nParameterPerSet) { + n_parameters_total += n_parameters; + } + } + m_useNParametersPerSet = m_nParameterPerSet; + } + else { + unsigned int n_parameters_per_set=m_errorScalingParameters.size()/n_parameter_sets; + n_parameters_total = n_parameter_sets * n_parameters_per_set; + m_useNParametersPerSet.clear(); + m_useNParametersPerSet.reserve(n_parameter_sets); + for (unsigned int param_set_i=0; param_set_i<n_parameter_sets; ++param_set_i ) { + m_useNParametersPerSet.push_back( n_parameters_per_set); + } + ATH_MSG_VERBOSE("init n_parameters_total=" << n_parameters_total << " =?= " << m_errorScalingParameters.size() + << " n_parameters_per_set=" << n_parameters_per_set ); + } + if (n_parameters_total != m_errorScalingParameters.size()) { + ATH_MSG_FATAL("Number of parameters in ErorScalingParameters does not match expectation. Estimated " << n_parameters_total + << " parameters in total for the " << n_parameter_sets << " parameter sets of " << m_errorScalingTypeName + << " but got " << m_errorScalingParameters.size()); + return StatusCode::FAILURE; + } + } + if(msgLvl(MSG::VERBOSE)) { + for(unsigned int param_i=0; param_i<m_errorScalingDataKit->nParametres(); ++param_i) { + ATH_MSG_VERBOSE("No error scaling parameters for " << m_writeKey.key() << " " << m_errorScalingDataKit->paramNames()[param_i] + << " n-params=" + << m_useNParametersPerSet[param_i]); + } + } + if (n_parameters_total==0 && !m_errorScalingParameters.empty()) { + ATH_MSG_FATAL("ErorScalingParameters expected to be empty for " << m_errorScalingTypeName) ; + return StatusCode::FAILURE; + } + + return StatusCode::SUCCESS; +} + +namespace { + EventIDBase timestamp (int t) + { + return EventIDBase (EventIDBase::UNDEFNUM, // run + EventIDBase::UNDEFEVT, // event + t); + } + + EventIDBase infiniteIOVEend() { + return timestamp(std::numeric_limits<int>::max() - 1); + } + + template <typename T> + std::ostream &operator<<(std::ostream &out, const std::vector<T> &a) { + for (const T &elm : a) { + out << " " << elm; + } + return out; + } +} + + +StatusCode RIO_OnTrackErrorScalingDbOverrideCondAlg::execute() { + SG::WriteCondHandle<RIO_OnTrackErrorScaling> write_handle(m_writeKey); + if (!write_handle.isValid()) { + EventIDRange range(timestamp(0),infiniteIOVEend()); + std::unique_ptr<RIO_OnTrackErrorScaling> error_scaling( m_errorScalingDataKit->create() ); + std::vector<float>::const_iterator param_iter = m_errorScalingParameters.begin(); + unsigned int set_i=0; + for (unsigned int n_params : m_useNParametersPerSet ) { + assert( set_i < error_scaling->params().size() ); + error_scaling->params()[set_i].clear(); + error_scaling->params()[set_i].reserve(n_params); + for(unsigned int param_i=0; param_i<n_params; ++param_i, ++param_iter) { + assert( param_iter != m_errorScalingParameters.end() ); + error_scaling->params()[set_i].push_back( *param_iter ); + } + ++set_i; + } + + // dump error scaling parameters + if(msgLvl(MSG::VERBOSE)) { + for(unsigned int param_i=0; param_i<m_errorScalingDataKit->nParametres(); ++param_i) { + if (param_i>= error_scaling->params().size()) { + ATH_MSG_FATAL("No error scaling parameters for " << write_handle.key() << " " << m_errorScalingDataKit->paramNames()[param_i] << "."); + return StatusCode::FAILURE; + } + else { + ATH_MSG_VERBOSE("Parameters for " << write_handle.key() << " " << m_errorScalingDataKit->paramNames()[param_i] << error_scaling->params()[param_i] ); + } + } + } + + if (!error_scaling->postProcess()) { + ATH_MSG_ERROR("Conditions data for " << write_handle.key() << " not valid."); + return StatusCode::FAILURE; + } + if (write_handle.record(range, std::move(error_scaling)).isFailure()) { + ATH_MSG_FATAL("Could not record RIO_OnTrackErrorScaling " << write_handle.key() + << " with EventRange " << range + << " into Conditions Store"); + return StatusCode::FAILURE; + } + } + return StatusCode::SUCCESS; +} + + +StatusCode RIO_OnTrackErrorScalingDbOverrideCondAlg::finalize() { + return StatusCode::SUCCESS; +} diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingDbOverrideCondAlg.h b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingDbOverrideCondAlg.h new file mode 100644 index 000000000000..1bf64c0d7fff --- /dev/null +++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingDbOverrideCondAlg.h @@ -0,0 +1,48 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef _RIO_OnTrackErrorScalingDbOverrideCondAlg_H_ +#define _RIO_OnTrackErrorScalingDbOverrideCondAlg_H_ + +#include "AthenaBaseComps/AthAlgorithm.h" + +#include "StoreGate/ReadCondHandleKey.h" +#include "AthenaPoolUtilities/CondAttrListCollection.h" +#include "StoreGate/WriteCondHandleKey.h" +#include "TrkRIO_OnTrack/RIO_OnTrackErrorScaling.h" +#include "GaudiKernel/ICondSvc.h" +#include "GaudiKernel/Property.h" +#include <iostream> + +class RIO_OnTrackErrorScalingKit; + +class RIO_OnTrackErrorScalingDbOverrideCondAlg : public AthAlgorithm +{ + public: + RIO_OnTrackErrorScalingDbOverrideCondAlg(const std::string& name, ISvcLocator* pSvcLocator); + virtual ~RIO_OnTrackErrorScalingDbOverrideCondAlg() = default; + StatusCode initialize() override; + StatusCode execute() override; + StatusCode finalize() override; + + private: + + Gaudi::Property< std::vector<unsigned int> > m_nParameterPerSet + {this,"PrametersPerSet",{},"The number of parameters per set. If a single number is supplied this will be applied to all sets."}; + + Gaudi::Property< std::vector<float> > m_errorScalingParameters + {this,"ErorScalingParameters",{},"The error scaling parameters for all sets lumbed together."}; + + Gaudi::Property< std::string > m_errorScalingTypeName + {this,"ErrorScalingTypeName","","The specific type name of the error scaling conditions data that should be produced."}; + + SG::WriteCondHandleKey<RIO_OnTrackErrorScaling> m_writeKey + {this, "WriteKey","","The key for the produced error scaling conditions data."}; + + ServiceHandle<ICondSvc> m_condSvc; + const RIO_OnTrackErrorScalingKit *m_errorScalingDataKit; + std::vector<unsigned int> m_useNParametersPerSet; +}; + +#endif // SCT_CONDITIONSPARAMETERCONDALG diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/components/TrkRIO_OnTrackCreator_entries.cxx b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/components/TrkRIO_OnTrackCreator_entries.cxx index e336e13febfa..2ff2fe5f371a 100644 --- a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/components/TrkRIO_OnTrackCreator_entries.cxx +++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/components/TrkRIO_OnTrackCreator_entries.cxx @@ -1,8 +1,10 @@ #include "TrkRIO_OnTrackCreator/RIO_OnTrackCreator.h" #include "TrkRIO_OnTrackCreator/RIO_OnTrackErrorScalingTool.h" #include "../RIO_OnTrackErrorScalingCondAlg.h" +#include "../RIO_OnTrackErrorScalingDbOverrideCondAlg.h" DECLARE_COMPONENT( Trk::RIO_OnTrackCreator ) DECLARE_COMPONENT( Trk::RIO_OnTrackErrorScalingTool ) DECLARE_COMPONENT( RIO_OnTrackErrorScalingCondAlg ) +DECLARE_COMPONENT( RIO_OnTrackErrorScalingDbOverrideCondAlg ) -- GitLab From 1b22ad2a732a587bc0448c67d9f03fad4411f7af Mon Sep 17 00:00:00 2001 From: Goetz Gaycken <goetz.gaycken@cern.ch> Date: Fri, 15 Jun 2018 12:05:55 +0200 Subject: [PATCH 526/562] Remove unused tool RIO_OnTrackErrorScalingTool. The tool is now replaced by error scaling conditions data. Former-commit-id: 4199f1ec4191aaf5aad5c4844ffae7ed2ff4824f --- .../RIO_OnTrackErrorScalingTool.h | 256 ------- .../src/RIO_OnTrackErrorScalingTool.cxx | 677 ------------------ .../TrkRIO_OnTrackCreator_entries.cxx | 2 - 3 files changed, 935 deletions(-) delete mode 100755 Tracking/TrkTools/TrkRIO_OnTrackCreator/TrkRIO_OnTrackCreator/RIO_OnTrackErrorScalingTool.h delete mode 100755 Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingTool.cxx diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/TrkRIO_OnTrackCreator/RIO_OnTrackErrorScalingTool.h b/Tracking/TrkTools/TrkRIO_OnTrackCreator/TrkRIO_OnTrackCreator/RIO_OnTrackErrorScalingTool.h deleted file mode 100755 index 81c75565e82b..000000000000 --- a/Tracking/TrkTools/TrkRIO_OnTrackCreator/TrkRIO_OnTrackCreator/RIO_OnTrackErrorScalingTool.h +++ /dev/null @@ -1,256 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// RIO_OnTrackErrorScalingTool.h -// Header file for class RIO_OnTrackErrorScalingTool -/////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// -// Wolfgang.Liebig@cern.ch -/////////////////////////////////////////////////////////////////// - -#ifndef TRKTOOLS_RIO_ONTRACKERRORSCALINGTOOL_H -#define TRKTOOLS_RIO_ONTRACKERRORSCALINGTOOL_H - -#include "AthenaBaseComps/AthAlgTool.h" -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/IIncidentListener.h" -#include "AthenaKernel/IIOVSvc.h" - -#include "TrkToolInterfaces/IRIO_OnTrackErrorScalingTool.h" -#include "EventPrimitives/EventPrimitives.h" - -#include "StoreGate/ReadHandleKey.h" -#include "xAODEventInfo/EventInfo.h" - -class PixelID; - -namespace Trk { - - /** @class RIO_OnTrackErrorScalingTool - @brief adapts measurement errors to better reflect insufficiently - calibrated/aligned data, using parameters from COOL. - - The RIO_OnTrackErrorScalingTool applies a linear function, - - @f$ \mathrm{error}' = a^2\cdot\mathrm{error}^2 + c^2 @f$ - - to inflate measurement errors for track fitting in the reconstruction. - It provides a handle for call-back by COOL after detector conditions - are known. The parameters @f$a,c@f$ are retrieved from two folders - in COOL: /Indet/TrkErrorScaling and /MUON/TrkErrorScaling. - - For performance reasons (i.e. avoid repeated re-creation of - Trk::Covariance objects in memory) the chosen design is a - covariance matrix factory and therefore expects - "good cooperation" from the detector-specific Trk::IRIO_OnTrackCreator - implementations: they need to call the associated scaling method - from this tool at the point when covariance matrix objects - are made. - - Note that this tool can not replace a final, precise detector - calibration. The parameters are therefore sub-divided into - barrel and end-cap technologies, and according to the number - of local coordinate measurements provided by each detector, - but currently do not allow a more finely granulated scaling. - - @author Wolfgang Liebig <http://consult.cern.ch/xwho/people/54608> - */ - class RIO_OnTrackErrorScalingTool : public AthAlgTool, - virtual public IRIO_OnTrackErrorScalingTool, - virtual public IIncidentListener { - - public: - /////////////////////////////////////////////////////////////////// - // Public methods: - /////////////////////////////////////////////////////////////////// - //! standard AlgTool constructor - RIO_OnTrackErrorScalingTool(const std::string&,const std::string&, - const IInterface*); - virtual ~RIO_OnTrackErrorScalingTool(); - //! standard AlgTool initialisation - virtual StatusCode initialize(); - //! standard AlgTool termination - virtual StatusCode finalize(); - //! methods indicating if the client (concrete sub-det tools) should call the scaling tool at each meas't. - virtual bool needToScalePixel() const; - virtual bool needToScaleSct() const; - virtual bool needToScaleTrt() const; - virtual bool needToScaleMdt() const; - virtual bool needToScaleTgc() const; - virtual bool needToScaleRpc() const; - virtual bool needToScaleCsc() const; - //! cov matrix creation from cov input and Pixel error scaling parameters - virtual Amg::MatrixX* createScaledPixelCovariance - (const Amg::MatrixX&, const Identifier& id) const; - //! cov matrix creation from cov input and SCT error scaling parameters - virtual Amg::MatrixX* createScaledSctCovariance - (const Amg::MatrixX&, bool, double ) const; - //! cov matrix creation from cov input and TRT error scaling parameters - virtual Amg::MatrixX* createScaledTrtCovariance - (const Amg::MatrixX&, bool) const; - //! cov matrix creation from cov input and MDT error scaling parameters - virtual Amg::MatrixX* createScaledMdtCovariance - (const Amg::MatrixX&, bool) const; - //! cov matrix creation from cov input and TGC error scaling parameters - virtual Amg::MatrixX* createScaledTgcCovariance - (const Amg::MatrixX&, const ParamDefs) const; - //! cov matrix creation from cov input and RPC error scaling parameters - virtual Amg::MatrixX* createScaledRpcCovariance - (const Amg::MatrixX&, const ParamDefs) const; - //! cov matrix creation from cov input and CSC error scaling parameters - virtual Amg::MatrixX* createScaledCscCovariance - (const Amg::MatrixX&, const ParamDefs) const; - - //! dumps the current scaling parameters to MsgStream output - virtual MsgStream& dump( MsgStream& ) const; - - //! handle BeginRun incidents - void handle(const Incident& inc); - - private: - /////////////////////////////////////////////////////////////////// - // Private data members: - /////////////////////////////////////////////////////////////////// - const PixelID* m_pixelID; - - bool m_do_pix; - bool m_do_sct; - bool m_do_trt; - bool m_do_mdt; - bool m_do_tgc; - bool m_do_rpc; - bool m_do_csc; - enum PixParamType {kPixBarrelPhi,kPixBarrelEta, - kPixIBLPhi, kPixIBLEta, - kPixEndcapPhi,kPixEndcapEta, - kNPixParamTypes}; - std::vector< std::vector<double> > m_scaling_pix; - static const int s_pix_idx[kNPixParamTypes]; - static const char *s_pix_names[kNPixParamTypes]; - - std::vector<double> m_scaling_pixPhi_barrel; - std::vector<double> m_scaling_pixPhi_endcap; - std::vector<double> m_scaling_pixEta_barrel; - std::vector<double> m_scaling_pixEta_endcap; - std::vector<double> m_scaling_sct_barrel; - std::vector<double> m_scaling_sct_endcap; - std::vector<double> m_scaling_trt_barrel; - std::vector<double> m_scaling_trt_endcap; - std::vector<double> m_scaling_mdt_barrel; - std::vector<double> m_scaling_mdt_endcap; - std::vector<double> m_scaling_tgcPhi; - std::vector<double> m_scaling_tgcEta; - std::vector<double> m_scaling_rpcPhi; - std::vector<double> m_scaling_rpcEta; - std::vector<double> m_scaling_cscPhi; - std::vector<double> m_scaling_cscEta; - bool m_override_database_id_errors; - bool m_doTRTScaling; - double m_override_scale_inflation_pix_bar_x; // pixel barrel local x - double m_override_scale_inflation_pix_bar_y; // pixel barrel local y - double m_override_scale_inflation_pix_ecs_x; // pixel endcaps local x - double m_override_scale_inflation_pix_ecs_y; // pixel endcaps local y - double m_override_scale_inflation_sct_bar; // for barrel - double m_override_scale_inflation_sct_ecs; // for the end caps - double m_override_scale_inflation_trt_bar; // barrel - double m_override_scale_inflation_trt_ecs; // ecs - double m_override_constant_term_pix_bar_x; - double m_override_constant_term_pix_bar_y; - double m_override_constant_term_pix_ecs_x; - double m_override_constant_term_pix_ecs_y; - double m_override_constant_term_sct_bar; - double m_override_constant_term_sct_ecs; - double m_override_constant_term_trt_bar; - double m_override_constant_term_trt_ecs; - double m_override_mu_term_trt_bar; - double m_override_mu_term_trt_ecs; - - - mutable double m_mu; //!< Pileup in event to correct errors - mutable bool m_hasBeenCalledThisEvent; //! < Is this the first time the tool has been called this event? - - - //! Service to report incidents (begin run, begin event) - ServiceHandle< IIncidentSvc > m_IncidentSvc; - - - //! conditions data handling: COOL folder name for InDet scaling paremeters - const std::string m_idFolder; - //! conditions data handling: COOL folder name for Muon scaling paremeters - const std::string m_muonFolder; - //! map holding the scaling parameters for each detector region - typedef std::map<std::string,std::vector<double>*> ParamMap; - /** @brief map holding the scaling parameters for each detector region - - The parammap is used at call-back/initialisation to avoid map - search at every scaling call. It maps directly to the - references of the local vector variables! - */ - ParamMap m_parammap; - //! internal code structuring: formatted output for scaling parameters - const std::string makeInfoString(const std::string&,const bool, - const std::vector<double>&) const; - //! conditions data handling: find associated parameters for a given detector - void registerParameters(bool&, - std::vector<double>*, - const std::string&); - - //! internal code structuring: error scaling for 2-dim measurements - void scale2by2(Amg::MatrixX&, - const std::vector<double>&, - const std::vector<double>&) const; - - //! conditions data handling: call-back entry to re-set scaling parameters when an IOV is new or changed. - StatusCode callback( IOVSVC_CALLBACK_ARGS ); - - SG::ReadHandleKey<xAOD::EventInfo> m_readKey; - - }; - - /////////////////////////////////////////////////////////////////// - // Inline methods: - /////////////////////////////////////////////////////////////////// - inline bool RIO_OnTrackErrorScalingTool::needToScalePixel() const - { - return m_do_pix; - } - inline bool RIO_OnTrackErrorScalingTool::needToScaleSct() const - { - return m_do_sct; - } - inline bool RIO_OnTrackErrorScalingTool::needToScaleTrt() const - { - return m_do_trt; - } - inline bool RIO_OnTrackErrorScalingTool::needToScaleMdt() const - { - return m_do_mdt; - } - inline bool RIO_OnTrackErrorScalingTool::needToScaleTgc() const - { - return m_do_tgc; - } - inline bool RIO_OnTrackErrorScalingTool::needToScaleRpc() const - { - return m_do_rpc; - } - inline bool RIO_OnTrackErrorScalingTool::needToScaleCsc() const - { - return m_do_csc; - } - - MsgStream& operator << (MsgStream&, const RIO_OnTrackErrorScalingTool&); - /////////////////////////////////////////////////////////////////// - // Overload of << operator MsgStream - /////////////////////////////////////////////////////////////////// - inline MsgStream& operator << - (MsgStream& sl,const RIO_OnTrackErrorScalingTool& se) - { - return se.dump(sl); - } - -} // end of namespace - -#endif diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingTool.cxx b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingTool.cxx deleted file mode 100755 index 6ac51d6166fc..000000000000 --- a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingTool.cxx +++ /dev/null @@ -1,677 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// RIO_OnTrackErrorScalingTool.cxx -// AlgTool for modifying (inflating) the measurement errors of -// RIO_onTrack objects directly in the detector-specific creators. -/////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// -// Wolfgang.Liebig@cern.ch -/////////////////////////////////////////////////////////////////// - -#include "TrkRIO_OnTrackCreator/RIO_OnTrackErrorScalingTool.h" -#include "GaudiKernel/ISvcLocator.h" -#include "GaudiKernel/ListItem.h" -#include "AthenaPoolUtilities/CondAttrListCollection.h" -#include "AthenaKernel/errorcheck.h" -#include "InDetIdentifier/PixelID.h" - -#include <cmath> -#include <stdexcept> -#include <sstream> - -const char *Trk::RIO_OnTrackErrorScalingTool::s_pix_names[Trk::RIO_OnTrackErrorScalingTool::kNPixParamTypes]={ - "PixPhi Barrel", - "PixEta Barrel", - "PixPhi IBL", - "PixEta IBL", - "PixPhi Endcap", - "PixEta Endcap", - }; - -const int Trk::RIO_OnTrackErrorScalingTool::s_pix_idx[Trk::RIO_OnTrackErrorScalingTool::kNPixParamTypes]={ - kPixBarrelPhi, - kPixBarrelEta, - kPixIBLPhi, - kPixIBLEta, - kPixEndcapPhi, - kPixEndcapEta}; - - -// constructor -Trk::RIO_OnTrackErrorScalingTool::RIO_OnTrackErrorScalingTool(const std::string& t, - const std::string& n, - const IInterface* p) - : AthAlgTool(t,n,p), - m_pixelID(nullptr), - m_do_pix(false), - m_do_sct(false), - m_do_trt(false), - m_do_mdt(false), - m_do_tgc(false), - m_do_rpc(false), - m_do_csc(false), - m_scaling_sct_barrel(std::vector<double>(0)), - m_scaling_sct_endcap(std::vector<double>(0)), - m_scaling_trt_barrel(std::vector<double>(0)), - m_scaling_trt_endcap(std::vector<double>(0)), - m_scaling_mdt_barrel(std::vector<double>(0)), - m_scaling_mdt_endcap(std::vector<double>(0)), - m_scaling_tgcPhi(std::vector<double>(0)), - m_scaling_tgcEta(std::vector<double>(0)), - m_scaling_rpcPhi(std::vector<double>(0)), - m_scaling_rpcEta(std::vector<double>(0)), - m_scaling_cscPhi(std::vector<double>(0)), - m_scaling_cscEta(std::vector<double>(0)), - m_override_database_id_errors(false), - m_doTRTScaling(true), - m_override_scale_inflation_pix_bar_x(10.), - m_override_scale_inflation_pix_bar_y(10.), - m_override_scale_inflation_pix_ecs_x(10.), - m_override_scale_inflation_pix_ecs_y(10.), - m_override_scale_inflation_sct_bar(10.), - m_override_scale_inflation_sct_ecs(10.), - m_override_scale_inflation_trt_bar(10.), - m_override_scale_inflation_trt_ecs(10.), - m_override_constant_term_pix_bar_x(0.0044), - m_override_constant_term_pix_bar_y(0.0312), - m_override_constant_term_pix_ecs_x(0.026), - m_override_constant_term_pix_ecs_y(0.0), - m_override_constant_term_sct_bar(0.0065), - m_override_constant_term_sct_ecs(0.0071), - m_override_constant_term_trt_bar(0.0), - m_override_constant_term_trt_ecs(0.0), - m_override_mu_term_trt_bar(0.0), - m_override_mu_term_trt_ecs(0.0), - m_IncidentSvc("IncidentSvc",n), - m_idFolder("/Indet/TrkErrorScaling"), - m_muonFolder("/MUON/TrkErrorScaling"), - m_readKey("EventInfo") - { - declareInterface<IRIO_OnTrackErrorScalingTool>(this); - declareProperty("overrideDatabaseID",m_override_database_id_errors,"inflate ID errors by multiplicative scale factor, overriding any database values"); - declareProperty("doTRTErrorScaling",m_doTRTScaling,"Turn off or on the TRT Error scaling"); - declareProperty("overrideScalePix",m_override_scale_inflation_pix_bar_x,"factor to inflate pixel errors (barrel local x)"); - declareProperty("overrideScalePixBarX",m_override_scale_inflation_pix_bar_x,"factor to inflate pixel errors (barrel local x)"); - declareProperty("overrideScalePixBarY",m_override_scale_inflation_pix_bar_y,"factor to inflate pixel errors (barrel local y)"); - declareProperty("overrideScalePixECsX",m_override_scale_inflation_pix_ecs_x,"factor to inflate pixel errors (endcaps local x)"); - declareProperty("overrideScalePixECsY",m_override_scale_inflation_pix_ecs_y,"factor to inflate pixel errors (endcaps local y)"); - declareProperty("overrideScaleSCT",m_override_scale_inflation_sct_bar,"factor to inflate SCT errors in the barrel"); - declareProperty("overrideScaleSCTBar",m_override_scale_inflation_sct_bar,"factor to inflate SCT errors in the barrel"); - declareProperty("overrideScaleSCTECs",m_override_scale_inflation_sct_ecs,"factor to inflate SCT errors in the end caps"); - declareProperty("overrideScaleTRT",m_override_scale_inflation_trt_bar,"factor to inflate TRT errors"); - declareProperty("overrideScaleTRTBar",m_override_scale_inflation_trt_bar,"factor to inflate TRT errors (barrel)"); - declareProperty("overrideScaleTRTECs",m_override_scale_inflation_trt_ecs,"factor to inflate TRT errors (end caps)"); - declareProperty("overrideConstantPixBarX",m_override_constant_term_pix_bar_x,"factor to change the constant term of pixel errors (barrel local x)"); - declareProperty("overrideConstantPixBarY",m_override_constant_term_pix_bar_y,"factor to change the constant term of pixel errors (barrel local y)"); - declareProperty("overrideConstantPixECsX",m_override_constant_term_pix_ecs_x,"factor to change the constant term of pixel errors (endcaps local x)"); - declareProperty("overrideConstantPixECsY",m_override_constant_term_pix_ecs_y,"factor to change the constant term of pixel errors (endcaps local y)"); - declareProperty("overrideConstantSCTBar",m_override_constant_term_sct_bar,"factor to change the constant term of SCT errors (barrel)"); - declareProperty("overrideConstantSCTECs",m_override_constant_term_sct_ecs,"factor to change the constant term of SCT errors (end caops)"); - declareProperty("overrideConstantTRTBar",m_override_constant_term_trt_bar,"factor to change the constant term of TRT errors (barrel)"); - declareProperty("overrideConstantTRTECs",m_override_constant_term_trt_ecs,"factor to change the constant term of TRT errors (endcaps)"); - declareProperty("overrideMuTRTBar",m_override_mu_term_trt_bar,"factor to change the mu dependent term of TRT errors (barrel)"); - declareProperty("overrideMuTRTECs",m_override_mu_term_trt_ecs,"factor to change the mu dependent term of TRT errors (endcaps)"); - declareProperty("IncidentService",m_IncidentSvc); - declareProperty("EventInfoKey",m_readKey); - m_scaling_pix.resize(kNPixParamTypes); - - m_mu = 0; - m_hasBeenCalledThisEvent = false; -} - -// destructor -Trk::RIO_OnTrackErrorScalingTool::~RIO_OnTrackErrorScalingTool() -{ } - -// initialise -StatusCode Trk::RIO_OnTrackErrorScalingTool::initialize() -{ - if (StatusCode::SUCCESS!=AlgTool::initialize()) - return StatusCode::FAILURE; - - CHECK( detStore()->retrieve(m_pixelID, "PixelID") ); - - //Incident service (to check for MC/data and setup accordingly) - if ( m_IncidentSvc.retrieve().isFailure() ) { - ATH_MSG_FATAL( "Failed to retrieve service " << m_IncidentSvc ); - return StatusCode::FAILURE; - } else - ATH_MSG_DEBUG( "Retrieved service " << m_IncidentSvc); - - m_IncidentSvc->addListener( this, std::string("BeginEvent")); - - - - /* set up scaling factors for error matrices (use their **2 for cov) - */ - - assert( m_scaling_pix.size() == kNPixParamTypes ); - // --- check scaling factors - - assert( kNPixParamTypes%2 == 0); - for (int i=0; i <kNPixParamTypes; ++i) { - registerParameters(m_do_pix, &(m_scaling_pix[ s_pix_idx[i] ]), s_pix_names[i] ); - } - - - ATH_MSG_INFO( "Apply TRT error scaling? " << m_doTRTScaling ); - - registerParameters(m_do_sct, - &m_scaling_sct_barrel,"SCT Barrel"); - registerParameters(m_do_sct, - &m_scaling_sct_endcap,"SCT Endcap"); - - registerParameters(m_do_trt, - &m_scaling_trt_barrel,"TRT Barrel"); - registerParameters(m_do_trt, - &m_scaling_trt_endcap,"TRT Endcap"); - - registerParameters(m_do_mdt, - &m_scaling_mdt_barrel,"MDT Barrel"); - registerParameters(m_do_mdt, - &m_scaling_mdt_endcap,"MDT Endcap"); - - registerParameters(m_do_tgc, - &m_scaling_tgcPhi,"TGC Phi"); - registerParameters(m_do_tgc, - &m_scaling_tgcEta,"TGC Eta"); - - registerParameters(m_do_rpc, - &m_scaling_rpcPhi,"RPC Phi"); - registerParameters(m_do_rpc, - &m_scaling_rpcEta,"RPC Eta"); - - registerParameters(m_do_csc, - &m_scaling_cscPhi,"CSC Phi"); - registerParameters(m_do_csc, - &m_scaling_cscEta,"CSC Eta"); - - // find and register callback function for ID - const DataHandle<CondAttrListCollection> colptr; - if (detStore()->contains<CondAttrListCollection>(m_idFolder)) { - if (StatusCode::SUCCESS!=detStore()-> - regFcn(&Trk::RIO_OnTrackErrorScalingTool::callback, - this,colptr,m_idFolder)) { - msg(MSG::ERROR) << "Found the folder, but could not register a callback" - << " on " << m_idFolder << endmsg; - return StatusCode::FAILURE; - } else - msg(MSG::INFO) << "Registered callback on COOL folder " << m_idFolder << endmsg; - } else { - msg(MSG::INFO) << "Folder " << m_idFolder << " is not loaded, " - << "intrinsic meas't errors will be used for ID tracks." << endmsg; - m_do_pix = false; - m_do_sct = false; - m_do_trt = false; - } - if (m_override_database_id_errors) { - msg(MSG::INFO) << " ignoring COOL; forcing scaling of intrinsic measurment errors in ID." << endmsg; - m_do_pix = true; - m_do_sct = true; - m_do_trt = true; - } - - // find and register callback function for Muons - if (detStore()->contains<CondAttrListCollection>(m_muonFolder)) { - if (StatusCode::SUCCESS!=detStore()-> - regFcn(&Trk::RIO_OnTrackErrorScalingTool::callback, - this,colptr,m_muonFolder)) { - msg(MSG::ERROR) << "Found the folder, but could not register a callback" - << " on " << m_muonFolder << endmsg; - return StatusCode::FAILURE; - } else - msg(MSG::INFO) << "Registered callback on COOL folder " - << m_muonFolder << endmsg; - } else { - msg(MSG::INFO) << "Folder " << m_muonFolder << " is not loaded, " - << "intrinsic meas't errors will be used for Muon RIOs_OnTrack." << endmsg; - m_do_mdt = false; - m_do_tgc = false; - m_do_rpc = false; - m_do_csc = false; - } - - ATH_CHECK( m_readKey.initialize() ); - - msg(MSG::INFO) << "initialize successful in " << name() << endmsg; - return StatusCode::SUCCESS; -} - -MsgStream& Trk::RIO_OnTrackErrorScalingTool::dump( MsgStream& out ) const -{ - //--- need an sprintf here. - out << std::endl << name() << " has found the following factors and constants to scale errors:" <<std::endl; - out << "| Detector System factor constant |" <<std::endl; - out << "+-------------------------------------------------------------+" <<std::endl; - - for (int i=0; i<kNPixParamTypes; ++i) { - out << makeInfoString(s_pix_names[i],m_do_pix,m_scaling_pix[ s_pix_idx[i] ]) <<std::endl; - } - out << makeInfoString("SCT barrel ",m_do_sct,m_scaling_sct_barrel) <<std::endl; - out << makeInfoString("SCT barrel ",m_do_sct,m_scaling_sct_barrel) <<std::endl; - out << makeInfoString("TRT barrel ",m_do_trt,m_scaling_trt_barrel) <<std::endl; - out << makeInfoString("TRT endcap ",m_do_trt,m_scaling_trt_endcap) <<std::endl; - out << makeInfoString("MDT barrel ",m_do_mdt,m_scaling_mdt_barrel) <<std::endl; - out << makeInfoString("MDT endcap ",m_do_mdt,m_scaling_mdt_endcap) <<std::endl; - out << makeInfoString("RPC Phi barrel",m_do_rpc,m_scaling_rpcPhi) <<std::endl; - out << makeInfoString("RPC Eta barrel",m_do_rpc,m_scaling_rpcEta) <<std::endl; - out << makeInfoString("TGC Phi endcap",m_do_tgc,m_scaling_tgcPhi) <<std::endl; - out << makeInfoString("TGC Eta endcap",m_do_tgc,m_scaling_tgcEta) <<std::endl; - out << makeInfoString("CSC Phi endcap",m_do_csc,m_scaling_cscPhi) <<std::endl; - out << makeInfoString("CSC Eta endcap",m_do_csc,m_scaling_cscEta) <<std::endl; - out << "+-------------------------------------------------------------+" <<std::endl; - return out; -} - -// handle BeginRun incidents------------------------------------------------ -void Trk::RIO_OnTrackErrorScalingTool::handle(const Incident& inc) -{ - if (inc.type() == "BeginEvent") { - m_hasBeenCalledThisEvent = false; - m_mu=0; - } -} - - -const std::string Trk::RIO_OnTrackErrorScalingTool::makeInfoString -(const std::string& sdet, const bool do_detSystem, - const std::vector<double>& errscaler) const { - - const int nformat=62; - std::string s1("| "); - s1.append(sdet); - if (do_detSystem && (errscaler.size()>0) ) { - s1.append(" - scaled by "); - } else { - s1.append(" - unscaled. "); - } - if (errscaler.size() < 2 && do_detSystem) - s1.append("WARNING, scaling active but empty vector of a,c values!"); - if (errscaler.size() > 1) { - char s2[12]; - snprintf(s2,sizeof(s2),"%6.3g ",errscaler[0]);s1.append(s2); - s1.append("* err (+) "); - snprintf(s2,sizeof(s2),"%6.3g ",errscaler[1]);s1.append(s2); - } - - if (errscaler.size() > 2){ - s1.append(" * (1 + mu *"); - char s2[13]; - snprintf(s2,sizeof(s2),"%6.3g ",errscaler[2]);s1.append(s2); - s1.append(")"); - } - - int n = nformat-s1.size(); - for(int i=0; i<n; ++i) s1.append(" "); - s1.append("|"); - return s1; -} - -void Trk::RIO_OnTrackErrorScalingTool::registerParameters - (bool& do_detSystem, - std::vector<double>* errscaler, - const std::string& sdet) { - // add this set of parameters to list, always set the parameters to be - // 'used' for now - do_detSystem=true; - m_parammap.insert(ParamMap::value_type(sdet,errscaler)); - // set default parameters in case no info is read from condDB for this set - errscaler->clear(); - errscaler->push_back(1.0); - errscaler->push_back(0.0); - errscaler->push_back(0.0); - // do_detSystem = false; - // if (errscaler[0] != 1.0) do_detSystem = true; - // if (errscaler[1] != 0.0) do_detSystem = true; -} - - -//finalise -StatusCode Trk::RIO_OnTrackErrorScalingTool::finalize() -{ - msg(MSG::INFO) << "finalize() successful in " << name() << endmsg; - return StatusCode::SUCCESS; -} - -void Trk::RIO_OnTrackErrorScalingTool::scale2by2 -( Amg::MatrixX& cov, - const std::vector<double>& phiTrafo, - const std::vector<double>& etaTrafo) const { - // careful not to change character of error - double corr = (fabs(cov(0,1)) > 1.0e-20) ? - cov(0,1)/(cov(0,0)*cov(1,1)) : - 0.0; - cov(0,0) *= phiTrafo[0]*phiTrafo[0]; - cov(0,0) += phiTrafo[1]*phiTrafo[1]; - cov(1,1) *= etaTrafo[0]*etaTrafo[0]; - cov(1,1) += etaTrafo[1]*etaTrafo[1]; - if (corr !=0.0) { - cov(0,1) = corr*cov(0,0)*cov(1,1); - cov(1,0) = cov(0,1); - } -} - -Amg::MatrixX* -Trk::RIO_OnTrackErrorScalingTool::createScaledPixelCovariance - (const Amg::MatrixX& inputCov, const Identifier& id) const -{ - Amg::MatrixX* newCov = new Amg::MatrixX(inputCov); - assert( m_pixelID ); - - // from SiDetectorElement::isEndcap - bool is_endcap = !(m_pixelID->is_barrel(id) || m_pixelID->is_dbm(id)); - unsigned int idx=kNPixParamTypes; - - if (is_endcap) { - idx=kPixEndcapPhi; - } else { - - // from PixelDigitizationTool::getReadoutTech - int barrel_ec = m_pixelID->barrel_ec(id); - bool is_ibl = abs(barrel_ec)==4 || m_pixelID->eta_module_max(id)>6; - if (is_ibl) { - idx = kPixIBLPhi; - } - else { - idx = kPixBarrelPhi; - } - } - - assert( m_scaling_pix.size()>idx+1); - if (m_scaling_pix[idx].size()<2 ) { - assert( idx < kNPixParamTypes); - - std::stringstream message; - message << "ERROR " << name() << " createScaledPixelCovariance : No error scaling factors for " << s_pix_names[idx] - << " or " << s_pix_names[idx+1] - << "."; - delete newCov; - throw std::runtime_error( message.str() ); - } - - assert( m_scaling_pix[idx].size()>1 - && m_scaling_pix[idx+1].size()>1 ); - - scale2by2(*newCov,m_scaling_pix[idx] /* phi */ ,m_scaling_pix[idx+1] /* eta */); - std::cout << "DEBUG createScaledPixelCovariance region:" << s_pix_names[idx] << " " << inputCov << " -> " << *newCov << std::endl; - - if (msgLvl(MSG::VERBOSE)) { - msg(MSG::VERBOSE) << "changing original Pix-" << (idx==kPixEndcapPhi ? "EC " : (idx==kPixIBLPhi ? "IBL" : "BR " )) << " cov " << endmsg; - msg(MSG::VERBOSE) << inputCov << " to "<< *newCov - <<" by:" << m_scaling_pix[idx][0] - <<", " << m_scaling_pix[idx][1] - <<" / "<< m_scaling_pix[idx+1][0] - <<", " << m_scaling_pix[idx+1][1] << endmsg; - } - - return newCov; -} - -Amg::MatrixX* -Trk::RIO_OnTrackErrorScalingTool::createScaledSctCovariance -(const Amg::MatrixX& inputCov, bool is_endcap, -double sinLocalAngle) const -{ - Amg::MatrixX* newCov = new Amg::MatrixX(inputCov); - if (is_endcap && newCov->rows() > 1) { - double Sn = sinLocalAngle; - double Sn2 = Sn*Sn; - double Cs2 = (1.-Sn)*(1.+Sn); - double SC = Sn*sqrt(Cs2); - double a = m_scaling_sct_endcap[0]; - double b = m_scaling_sct_endcap[1]; - double dV0 = (Cs2*(*newCov)(0,0)+Sn2*(*newCov)(1,1) - +2.*SC*(*newCov)(1,0))*(a*a-1.) + b*b; - (*newCov)(0,0)+= (Cs2*dV0); - (*newCov)(1,0)+= (SC *dV0); - (*newCov)(0,1) = (*newCov)(1,0); - (*newCov)(1,1)+= (Sn2*dV0); - } else { - double a = (is_endcap) ? m_scaling_sct_endcap[0] : m_scaling_sct_barrel[0]; - double b = (is_endcap) ? m_scaling_sct_endcap[1] : m_scaling_sct_barrel[1]; - (*newCov)(0,0) *= a*a; - (*newCov)(0,0) += b*b; - } - std::cout << "DEBUG createScaledSctCovariance endcap:" << is_endcap << " angle=" << sinLocalAngle << " " << inputCov << " -> " << *newCov << std::endl; - return newCov; -} - -Amg::MatrixX* -Trk::RIO_OnTrackErrorScalingTool::createScaledTrtCovariance - (const Amg::MatrixX& inputCov, bool is_endcap) const -{ - if(!m_hasBeenCalledThisEvent){ - SG::ReadHandle< xAOD::EventInfo> eventInfo (m_readKey); - if (!eventInfo.isValid()) { - ATH_MSG_ERROR("Cant retrieve EventInfo"); m_mu = 0; - } else { - m_mu = eventInfo->averageInteractionsPerCrossing(); - } - m_hasBeenCalledThisEvent = true; - } - - - Amg::MatrixX* newCov = new Amg::MatrixX(inputCov); - if (!m_doTRTScaling) return newCov; - double a = (is_endcap) ? m_scaling_trt_endcap[0] : m_scaling_trt_barrel[0]; - double b = (is_endcap) ? m_scaling_trt_endcap[1] : m_scaling_trt_barrel[1]; - double c = (is_endcap) ? m_scaling_trt_endcap[2] : m_scaling_trt_barrel[2]; - (*newCov)(0,0) *= a*a; - (*newCov)(0,0) += b*b; - (*newCov)(0,0) *= (1. + m_mu * c); - std::cout << "DEBUG createScaledTrtCovariance endcap:" << is_endcap << " mu=" << m_mu << " " << inputCov << " -> " << *newCov << std::endl; - return newCov; -} - -Amg::MatrixX* -Trk::RIO_OnTrackErrorScalingTool::createScaledMdtCovariance - (const Amg::MatrixX& inputCov, bool is_endcap) const -{ - Amg::MatrixX* newCov = new Amg::MatrixX(inputCov); - double a = (is_endcap) ? m_scaling_mdt_endcap[0] : m_scaling_mdt_barrel[0]; - double b = (is_endcap) ? m_scaling_mdt_endcap[1] : m_scaling_mdt_barrel[1]; - (*newCov)(0,0) *= a*a; - (*newCov)(0,0) += b*b; - return newCov; -} - -Amg::MatrixX* -Trk::RIO_OnTrackErrorScalingTool::createScaledTgcCovariance -(const Amg::MatrixX& inputCov, - const Trk::ParamDefs measuredCoord) const // exists only as end-cap thing -{ - Amg::MatrixX* newCov = new Amg::MatrixX(inputCov); - double a,b = 0.0; - if (measuredCoord == Trk::distPhi) { - a = m_scaling_tgcPhi[0]; - b = m_scaling_tgcPhi[1]; - } else if (measuredCoord == Trk::distEta) { - a = m_scaling_tgcEta[0]; - b = m_scaling_tgcEta[1]; - } else { - delete newCov; - msg(MSG::WARNING) << "Wrong TGC measurement coordinate definition given to RIO_OnTrackErrorScalingTool." << endmsg; - msg(MSG::WARNING) << "Error scaling cancelled, cov=NULL." << endmsg; - msg(MSG::INFO) << "Allowed definitions: Trk::distPhi, Trk::distEta." << endmsg; - return 0; - } - (*newCov)(0,0) *= a*a; - (*newCov)(0,0) += b*b; - return newCov; -} - -Amg::MatrixX* -Trk::RIO_OnTrackErrorScalingTool::createScaledRpcCovariance -(const Amg::MatrixX& inputCov, - const Trk::ParamDefs measuredCoord ) const // exists only as barrel thing -{ - Amg::MatrixX* newCov = new Amg::MatrixX(inputCov); - double a,b = 0.0; - if (measuredCoord == Trk::distPhi) { - a = m_scaling_rpcPhi[0]; - b = m_scaling_rpcPhi[1]; - } else if (measuredCoord == Trk::distEta) { - a = m_scaling_rpcEta[0]; - b = m_scaling_rpcEta[1]; - } else { - delete newCov; - msg(MSG::WARNING) << "Wrong RPC measurement coordinate definition given to RIO_OnTrackErrorScalingTool." << endmsg; - msg(MSG::WARNING) << "Error scaling cancelled, cov=NULL." << endmsg; - msg(MSG::INFO) << "Allowed definitions: Trk::distPhi, Trk::distEta." << endmsg; - return 0; - } - (*newCov)(0,0) *= a*a; - (*newCov)(0,0) += b*b; - return newCov; -} - -Amg::MatrixX* -Trk::RIO_OnTrackErrorScalingTool::createScaledCscCovariance -(const Amg::MatrixX& inputCov, - const Trk::ParamDefs measuredCoord) const // is a far-fwd technology -{ - Amg::MatrixX* newCov = new Amg::MatrixX(inputCov); - double a,b = 0.0; - if (measuredCoord == Trk::distPhi) { - a = m_scaling_cscPhi[0]; - b = m_scaling_cscPhi[1]; - } else if (measuredCoord == Trk::distEta) { - a = m_scaling_cscEta[0]; - b = m_scaling_cscEta[1]; - } else { - delete newCov; - msg(MSG::WARNING) << "Wrong CSC measurement coordinate definition given to RIO_OnTrackErrorScalingTool." << endmsg; - msg(MSG::WARNING) << "Error scaling cancelled, cov=NULL." << endmsg; - msg(MSG::INFO) << "Allowed definitions: Trk::distPhi, Trk::distEta." << endmsg; - return 0; - } - (*newCov)(0,0) *= a*a; - (*newCov)(0,0) += b*b; - return newCov; -} - - -StatusCode Trk::RIO_OnTrackErrorScalingTool::callback( - IOVSVC_CALLBACK_ARGS_P(I,keys) ) { - (void) I; - - // callback function when the conditions data object changes - // loop over all the keys, action for the one we are interested in - for (std::list<std::string>::const_iterator itr=keys.begin();itr!=keys.end(); - ++itr) { - if (*itr==m_idFolder || *itr==m_muonFolder) { - ATH_MSG_DEBUG ("Callback function invoked! (Folder: " << *itr << ")"); - const CondAttrListCollection* atrlistcol=0; - if (StatusCode::SUCCESS==detStore()->retrieve(atrlistcol,*itr)) { - // loop through elements of the attribute list collection - for (CondAttrListCollection::const_iterator citr=atrlistcol->begin(); - citr!=atrlistcol->end();++citr) { - // attribute list format is name(string), n(int) followed by n double - const coral::AttributeList& alist=citr->second; - try { - const std::string& name=alist[0].data<std::string>(); - const int nvals=alist[1].data<int>(); - // locate pointer to parameters vector, based on name - // note that names unknown to the service are ignored - ParamMap::const_iterator loc=m_parammap.find(name); - if (loc!=m_parammap.end()) { - std::vector<double>* params=loc->second; - ATH_MSG_DEBUG ("Setting " << nvals << " parameters for " << name << " at location " << params); - params->clear(); - for (int i=0;i<nvals;++i){ - ATH_MSG_VERBOSE("Parameter " << i << " = " << alist[2+i].data<double>() ); - params->push_back(alist[2+i].data<double>()); - } - } else { - ATH_MSG_DEBUG ("Ignored unexpected parameter" << name); - } - } - // catch problems with the attributelist accesses - catch (coral::Exception& e) { - msg(MSG::ERROR) << "Problem with AttributeList decoding: " << e.what() << endmsg; - return StatusCode::FAILURE; - } - } - } else { - msg(MSG::ERROR) << "Problem reading conditions object " << *itr << endmsg; - return StatusCode::FAILURE; - } - } - } - - for (int i=0; i < kNPixParamTypes-1; i+=2 ) { - bool has_eta_scaling=(m_scaling_pix[i+1].size()>0); - bool has_phi_scaling=(m_scaling_pix[i].size()>0); - if (has_eta_scaling != has_phi_scaling) { - ATH_MSG_ERROR( "Missing pixel scaling factors for " - << s_pix_names[i] << "[" << m_scaling_pix[i].size() << " params]" - << " or " << s_pix_names[i+1] << "[" << m_scaling_pix[i+1].size() << " params]" - << "."); - return StatusCode::FAILURE; - } - } - - // if requested, scale up the ID errors by the values in job options - if (m_override_database_id_errors) { - msg(MSG::WARNING) << "WARNING overriding database error scaling parameters with values specified by job options; see " - << __FILE__ << " at line " << __LINE__ << endmsg; - m_do_pix = true; - m_do_sct = true; - m_do_trt = true; - std::vector<double> scale(3,0); - - // pixel barrel - // local x (phi -> old convetion) - scale[0] = m_override_scale_inflation_pix_bar_x; - scale[1] = m_override_constant_term_pix_bar_x; // 0.0044; - m_scaling_pix[kPixBarrelPhi] = scale; - m_scaling_pix[kPixIBLPhi] = scale; - - // local y (eta -> old convention) - scale[0] = m_override_scale_inflation_pix_bar_y; - scale[1] = m_override_constant_term_pix_bar_y; // 0.0312; - m_scaling_pix[kPixBarrelEta] = scale; - m_scaling_pix[kPixIBLEta] = scale; - - // pixel end caps - // local x (phi -> old convetion) - scale[0] = m_override_scale_inflation_pix_bar_x; - scale[1] = m_override_constant_term_pix_ecs_x; // 0.0026; - m_scaling_pix[kPixEndcapPhi] = scale; - - // local y (eta -> old convention) - scale[0] = m_override_scale_inflation_pix_bar_y; - scale[1] = m_override_constant_term_pix_ecs_y; // 0.; - m_scaling_pix[kPixEndcapEta] = scale; - - // sct barrel - scale[0] = m_override_scale_inflation_sct_bar; - scale[1] = m_override_constant_term_sct_bar; // 0.0065 - m_scaling_sct_barrel = scale; - - // sct end caps - scale[0] = m_override_scale_inflation_sct_ecs; - scale[1] = m_override_constant_term_sct_ecs; // 0.0071; - m_scaling_sct_endcap = scale; - - // trt barrel - scale[0] = m_override_scale_inflation_trt_bar; - scale[1] = m_override_constant_term_trt_bar; // 0.; - scale[2] = m_override_mu_term_trt_bar; - m_scaling_trt_barrel = scale; - - // trt end caps - scale[0] = m_override_scale_inflation_trt_ecs; - scale[1] = m_override_constant_term_trt_ecs; // 0.; - scale[2] = m_override_mu_term_trt_ecs; - m_scaling_trt_endcap = scale; - } - - // printout new constants if in debug print mode - ATH_MSG_DEBUG ( (*this) ); - return StatusCode::SUCCESS; -} diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/components/TrkRIO_OnTrackCreator_entries.cxx b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/components/TrkRIO_OnTrackCreator_entries.cxx index 2ff2fe5f371a..4872454b3494 100644 --- a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/components/TrkRIO_OnTrackCreator_entries.cxx +++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/components/TrkRIO_OnTrackCreator_entries.cxx @@ -1,10 +1,8 @@ #include "TrkRIO_OnTrackCreator/RIO_OnTrackCreator.h" -#include "TrkRIO_OnTrackCreator/RIO_OnTrackErrorScalingTool.h" #include "../RIO_OnTrackErrorScalingCondAlg.h" #include "../RIO_OnTrackErrorScalingDbOverrideCondAlg.h" DECLARE_COMPONENT( Trk::RIO_OnTrackCreator ) -DECLARE_COMPONENT( Trk::RIO_OnTrackErrorScalingTool ) DECLARE_COMPONENT( RIO_OnTrackErrorScalingCondAlg ) DECLARE_COMPONENT( RIO_OnTrackErrorScalingDbOverrideCondAlg ) -- GitLab From 9ba48c3dc2087dc704743cbe0b5acc34305048b7 Mon Sep 17 00:00:00 2001 From: Goetz Gaycken <goetz.gaycken@cern.ch> Date: Fri, 15 Jun 2018 12:09:54 +0200 Subject: [PATCH 527/562] Remove unused muon error scaling tool. The tool is replaced by error scaling conditions data. Former-commit-id: 6a75c3a91ee80ff7eb48724ef2e6843075ce4337 --- .../MuonErrorScalingTools/CMakeLists.txt | 30 -- .../MuonErrorScaleDbTool.h | 105 ------- .../MuonRIO_OnTrackErrorScalingTool.h | 119 -------- .../MuonErrorScalingTools/doc/packagedoc.h | 17 -- .../share/ConfigureMuonErrorScaling.py | 36 --- .../share/make_MuonTrkError.py | 78 ------ .../src/MuonErrorScaleDbTool.cxx | 260 ------------------ .../src/MuonRIO_OnTrackErrorScalingTool.cxx | 190 ------------- .../MuonErrorScalingTools_entries.cxx | 8 - .../IMuonErrorScaleDbTool.h | 62 ----- .../IMuonRIO_OnTrackErrorScalingTool.h | 74 ----- .../IRIO_OnTrackErrorScalingTool.h | 115 -------- 12 files changed, 1094 deletions(-) delete mode 100644 MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/CMakeLists.txt delete mode 100644 MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/MuonErrorScalingTools/MuonErrorScaleDbTool.h delete mode 100644 MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/MuonErrorScalingTools/MuonRIO_OnTrackErrorScalingTool.h delete mode 100644 MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/doc/packagedoc.h delete mode 100644 MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/share/ConfigureMuonErrorScaling.py delete mode 100755 MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/share/make_MuonTrkError.py delete mode 100644 MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/src/MuonErrorScaleDbTool.cxx delete mode 100644 MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/src/MuonRIO_OnTrackErrorScalingTool.cxx delete mode 100644 MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/src/components/MuonErrorScalingTools_entries.cxx delete mode 100755 MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonErrorScaleDbTool.h delete mode 100755 MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonRIO_OnTrackErrorScalingTool.h delete mode 100755 Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/IRIO_OnTrackErrorScalingTool.h diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/CMakeLists.txt b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/CMakeLists.txt deleted file mode 100644 index b97586bec01b..000000000000 --- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ -################################################################################ -# Package: MuonErrorScalingTools -################################################################################ - -# Declare the package name: -atlas_subdir( MuonErrorScalingTools ) - -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaBaseComps - Control/AthenaKernel - DetectorDescription/Identifier - GaudiKernel - MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces - Tracking/TrkEvent/TrkEventPrimitives - PRIVATE - Database/AthenaPOOL/AthenaPoolUtilities - MuonSpectrometer/MuonIdHelpers - MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonCompetingRIOsOnTrack ) - -# Component(s) in the package: -atlas_add_component( MuonErrorScalingTools - src/*.cxx - src/components/*.cxx - LINK_LIBRARIES AthenaBaseComps AthenaKernel Identifier GaudiKernel MuonRecToolInterfaces TrkEventPrimitives AthenaPoolUtilities MuonIdHelpersLib MuonCompetingRIOsOnTrack ) - -# Install files from the package: -atlas_install_headers( MuonErrorScalingTools ) -atlas_install_joboptions( share/*.py ) - diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/MuonErrorScalingTools/MuonErrorScaleDbTool.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/MuonErrorScalingTools/MuonErrorScaleDbTool.h deleted file mode 100644 index e9b6d0403983..000000000000 --- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/MuonErrorScalingTools/MuonErrorScaleDbTool.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef MUONERRORSCALINGTOOLS_MUONERRORSCALEDBTOOL_H -#define MUONERRORSCALINGTOOLS_MUONERRORSCALEDBTOOL_H - -#include "AthenaBaseComps/AthAlgTool.h" - -#include "MuonRecToolInterfaces/IMuonErrorScaleDbTool.h" - -#include "GaudiKernel/ToolHandle.h" -#include "AthenaKernel/IIOVSvc.h" - -/** - @file MuonErrorScaleDbTool.h - @class MuonErrorScaleDbTool - - @brief Tool for retrieving values from conditions database - to be used for error scaling of muon hits in track fitting. - - @date 20 May 2010 -*/ - -namespace Muon { - - class MuonIdHelperTool; - - class MuonErrorScaleDbTool : virtual public IMuonErrorScaleDbTool, public AthAlgTool { - - public: - MuonErrorScaleDbTool(const std::string& type, const std::string& name, - const IInterface* parent); - virtual ~MuonErrorScaleDbTool(); - - virtual StatusCode initialize(); - virtual StatusCode finalize(); - - bool doMdt() const { return m_do_mdt; } - bool doTgc() const { return m_do_tgc; } - bool doRpc() const { return m_do_rpc; } - bool doCsc() const { return m_do_csc; } - - std::vector<double> errScale(const Identifier id) const; - - virtual MsgStream& dump(MsgStream&) const; - - private: - - void registerParameters(bool&, std::vector<double>*, const std::string&); - - //! conditions data handling: call-back entry to re-set scaling parameters when an IOV is new or changed. - StatusCode callback( IOVSVC_CALLBACK_ARGS ); - - //! internal code structuring: formatted output for scaling parameters - const std::string makeInfoString(const std::string&,const bool, - const std::vector<double>&) const; - - /////////////////////////////////////////////////////////////////// - // Private data members: - /////////////////////////////////////////////////////////////////// - - ToolHandle<MuonIdHelperTool> m_muonIdHelperTool; //!< Muon ID helper tool - - //! conditions data handling: COOL folder name for Muon scaling paremeters - const std::string m_muonFolder; - - //! map holding the scaling parameters for each detector region - typedef std::map<std::string,std::vector<double>*> ParamMap; - - /** @brief map holding the scaling parameters for each detector region - - The parammap is used at call-back/initialisation to avoid map - search at every scaling call. It maps directly to the - references of the local vector variables! - */ - ParamMap m_parammap; - - bool m_do_mdt; - bool m_do_tgc; - bool m_do_rpc; - bool m_do_csc; - - std::vector<double> m_scaling_mdt_barrel; - std::vector<double> m_scaling_mdt_endcap; - std::vector<double> m_scaling_tgcPhi; - std::vector<double> m_scaling_tgcEta; - std::vector<double> m_scaling_rpcPhi; - std::vector<double> m_scaling_rpcEta; - std::vector<double> m_scaling_cscPhi; - std::vector<double> m_scaling_cscEta; - - }; - - MsgStream& operator << (MsgStream&, const MuonErrorScaleDbTool&); - - inline MsgStream& operator << - (MsgStream& sl, const MuonErrorScaleDbTool& se) - { - return se.dump(sl); - } -} - -#endif // MUONERRORSCALINGTOOLS_MUONERRORSCALEDBTOOL_H - diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/MuonErrorScalingTools/MuonRIO_OnTrackErrorScalingTool.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/MuonErrorScalingTools/MuonRIO_OnTrackErrorScalingTool.h deleted file mode 100644 index 25343c3c85bb..000000000000 --- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/MuonErrorScalingTools/MuonRIO_OnTrackErrorScalingTool.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - - -/////////////////////////////////////////////////////////////////// -// MuonRIO_OnTrackErrorScalingTool.h, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#ifndef MUON_MUONRIO_ONTRACKERRORSCALINGTOOL_H -#define MUON_MUONRIO_ONTRACKERRORSCALINGTOOL_H - -#include "AthenaBaseComps/AthAlgTool.h" -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/ToolHandle.h" -#include "Identifier/Identifier.h" - -#include "MuonRecToolInterfaces/IMuonRIO_OnTrackErrorScalingTool.h" -#include "TrkEventPrimitives/ParamDefs.h" - - -namespace Muon -{ - class IMuonErrorScaleDbTool; - - class MuonRIO_OnTrackErrorScalingTool : public AthAlgTool, - virtual public Muon::IMuonRIO_OnTrackErrorScalingTool { - - public: - MuonRIO_OnTrackErrorScalingTool(const std::string&, const std::string&, - const IInterface*); - - /** default destructor */ - virtual ~MuonRIO_OnTrackErrorScalingTool(); - - /** standard Athena-Algorithm method */ - virtual StatusCode initialize(); - - /** standard Athena-Algorithm method */ - virtual StatusCode finalize(); - - virtual bool needToScaleMdt() const; - virtual bool needToScaleTgc() const; - virtual bool needToScaleRpc() const; - virtual bool needToScaleCsc() const; - - virtual Amg::MatrixX* - createScaledMdtCovariance(const Amg::MatrixX&, - bool is_endcap) const; - - virtual Amg::MatrixX* - createScaledTgcCovariance(const Amg::MatrixX&, - const Trk::ParamDefs=Trk::distPhi) const; - - virtual Amg::MatrixX* - createScaledRpcCovariance(const Amg::MatrixX&, - const Trk::ParamDefs=Trk::distPhi) const; - - virtual Amg::MatrixX* - createScaledCscCovariance(const Amg::MatrixX&, - const Trk::ParamDefs=Trk::distPhi) const; - - // - virtual Amg::MatrixX* - createScaledMdtCovariance(const Amg::MatrixX&, - Identifier id) const; - - // dumps the current scaling parameters (via error scaling DB tool) - MsgStream& dump(MsgStream&) const; - - private: - - ToolHandle<IMuonErrorScaleDbTool> m_errorScaleDbTool; - - //! internal code structuring: error scaling for 2-dim measurements - void scale2by2(Amg::MatrixX&, - const std::vector<double>&, - const std::vector<double>&) const; - - /** class member version of retrieving MsgStream */ - mutable MsgStream m_log; - - bool m_do_mdt; - bool m_do_tgc; - bool m_do_rpc; - bool m_do_csc; - - std::vector<double> m_scaling_mdt_barrel; - std::vector<double> m_scaling_mdt_endcap; - std::vector<double> m_scaling_tgcPhi; - std::vector<double> m_scaling_tgcEta; - std::vector<double> m_scaling_rpcPhi; - std::vector<double> m_scaling_rpcEta; - std::vector<double> m_scaling_cscPhi; - std::vector<double> m_scaling_cscEta; - }; - - //________________________________________________________________________ - inline bool MuonRIO_OnTrackErrorScalingTool::needToScaleMdt() const - { - return m_do_mdt; - } - inline bool MuonRIO_OnTrackErrorScalingTool::needToScaleTgc() const - { - return m_do_tgc; - } - inline bool MuonRIO_OnTrackErrorScalingTool::needToScaleRpc() const - { - return m_do_rpc; - } - inline bool MuonRIO_OnTrackErrorScalingTool::needToScaleCsc() const - { - return m_do_csc; - } - -} // end of namespace - -#endif // MUON_MUONRIO_ONTRACKERRORSCALINGTOOL_H - diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/doc/packagedoc.h deleted file mode 100644 index 760878c8ae61..000000000000 --- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/doc/packagedoc.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/** - -@page MuonErrorScalingTools_page MuonErrorScalingTools Package - -@author roberth@bu.edu - -@section MuonErrorScalingTools_DescriptionMuonErrorScalingTools General description - -MuonErrorScalingTools is a package providing tools used to scale errors for muon hits used in muon track reconstruction. Tools provided are: -- Muon::MuonErrorScaleDbTool, used to retrieve error scaling constants from conditions database -- Muon::MuonRIO_OnTrackErrorScalingTool, used to scale errors for muon hits - -*/ diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/share/ConfigureMuonErrorScaling.py b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/share/ConfigureMuonErrorScaling.py deleted file mode 100644 index 40e01ebcf52a..000000000000 --- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/share/ConfigureMuonErrorScaling.py +++ /dev/null @@ -1,36 +0,0 @@ - -# specify database and folders -from AthenaCommon.AppMgr import ServiceMgr as svcMgr -svcMgr.IOVDbSvc.dbConnection="sqlite://X_muon;schema=mycool.db;dbname=OFLP200" - -from IOVDbSvc.CondDB import conddb -conddb.addFolder("","<dbConnection>sqlite://X_muon;schema=mycool.db;dbname=OFLP200</dbConnection> /MUON/TrkErrorScaling" + "<tag>MuonTrkErrorScaling_nominal</tag>", force=True) -conddb.addFolderWithTag('mycool.db','/MUON/TrkErrorScaling','MuonTrkErrorScaling_nominal') - - -# configure muon hit creator tools to use error scaling -from MuonRecExample import MuonRecTools - -from MuonErrorScalingTools.MuonErrorScalingToolsConf import Muon__MuonErrorScaleDbTool,Muon__MuonRIO_OnTrackErrorScalingTool -muonErrorScaleDbTool = Muon__MuonErrorScaleDbTool("MuonErrorScaleDbTool") -ToolSvc += muonErrorScaleDbTool - -muonRIO_OnTrackErrorScalingTool = \ - Muon__MuonRIO_OnTrackErrorScalingTool("MuonRIO_OnTrackErrorScalingTool", - ErrorScaleDbTool=muonErrorScaleDbTool) - -ToolSvc += muonRIO_OnTrackErrorScalingTool - -muonClusterOnTrackCreator = MuonRecTools.getPublicTool( "MuonClusterOnTrackCreator" ) -muonClusterOnTrackCreator.OutputLevel = 1 - -muonClusterOnTrackCreator.ErrorScalingTool = ToolSvc.MuonRIO_OnTrackErrorScalingTool -muonClusterOnTrackCreator.ErrorScalingTool.OutputLevel = 1 - -mdtDriftCircleOnTrackCreator = MuonRecTools.getPublicTool( "MdtDriftCircleOnTrackCreator" ) -mdtDriftCircleOnTrackCreator.DoFixedError = False -mdtDriftCircleOnTrackCreator.DoErrorScaling = True -mdtDriftCircleOnTrackCreator.OutputLevel = 1 - -mdtDriftCircleOnTrackCreator.ErrorScalingTool = ToolSvc.MuonRIO_OnTrackErrorScalingTool -mdtDriftCircleOnTrackCreator.ErrorScalingTool.OutputLevel = 1 diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/share/make_MuonTrkError.py b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/share/make_MuonTrkError.py deleted file mode 100755 index 178c8b695377..000000000000 --- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/share/make_MuonTrkError.py +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/env python -# -# script to turn scaling parameters into a local SQlite DB. -# does not publish directly to COOL. -# updated for COOL 2 (RJH 7/6/07) -# -import sys,traceback -from PyCool import cool,coral - -# database and folder name -connect="sqlite://X;schema=mycool.db;dbname=OFLP200" -foldername="/MUON/TrkErrorScaling" -tag="MuonTrkErrorScaling_nominal" -dataset=[ ("MDT Barrel",1.0,0.0), - ("MDT Endcap",1.0,0.0), - ("TGC Phi",1.0,0.0), - ("TGC Eta",1.0,0.0), - ("RPC Phi",1.0,0.0), - ("RPC Eta",1.0,0.0), - ("CSC Phi",1.0,0.0), - ("CSC Eta",1.0,0.0) - ] -# first value is factor on error, second uncorrelated noise term -# to error given in mm - -dbSvc = cool.DatabaseSvcFactory.databaseService() -try: - db = dbSvc.openDatabase(connect,False) -except Exception, e: - print e - print "Could not connect to the database" - # try to create it - try: - db=dbSvc.createDatabase(connect) - except Exception, e: - print e - print "Could not create the database either" - sys.exit(2) - -# setup folder specification -spec = cool.RecordSpecification() -spec.extend("Name",cool.StorageType.String4k) -spec.extend("Len",cool.StorageType.Int32) -# assume we will not have more than 5 parameters -maxpar=5 -spec.extend("par1",cool.StorageType.Double) -spec.extend("par2",cool.StorageType.Double) -spec.extend("par3",cool.StorageType.Double) -spec.extend("par4",cool.StorageType.Double) -spec.extend("par5",cool.StorageType.Double) - -# check if folder exists -if (not db.existsFolder(foldername)): - print "Attempt to create",foldername - desc='<timeStamp>run-event</timeStamp><addrHeader><address_header service_type=\"71\" clid=\"1238547719\" /></addrHeader><typeName>CondAttrListCollection</typeName>' - db.createFolder(foldername,spec,desc,cool.FolderVersioning.MULTI_VERSION,True) - print 'Folder',foldername,'created OK' - -# now write data -folder=db.getFolder(foldername) -chan=0 -print "Writing data to",folder,"with tag",tag -for idata in dataset: - name=idata[0] - nvals=len(idata)-1 - if (nvals>maxpar): - print "Maximum of",maxpar,"parameters allowed - additional ones ignored!" - nvals=maxpar - print "Write data for name",name,"number of values",nvals,"at channel",chan - payload=cool.Record(spec) - payload['Name']=name - payload['Len']=nvals - for i in range(0,nvals): - payload['par'+str(1+i)]=idata[1+i] - folder.storeObject(cool.ValidityKeyMin,cool.ValidityKeyMax,payload,chan,tag) - chan+=1 -print "All done" -db.closeDatabase() diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/src/MuonErrorScaleDbTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/src/MuonErrorScaleDbTool.cxx deleted file mode 100644 index 84fb11cd760e..000000000000 --- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/src/MuonErrorScaleDbTool.cxx +++ /dev/null @@ -1,260 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - - -#include "GaudiKernel/ISvcLocator.h" -#include "GaudiKernel/ListItem.h" -#include "AthenaPoolUtilities/CondAttrListCollection.h" - -#include "MuonIdHelpers/MuonIdHelperTool.h" - -#include "MuonErrorScalingTools/MuonErrorScaleDbTool.h" - -//________________________________________________________________________ -Muon::MuonErrorScaleDbTool::MuonErrorScaleDbTool(const std::string& type, - const std::string& name, - const IInterface* parent) - : AthAlgTool(type,name,parent) - , m_muonIdHelperTool("Muon::MuonIdHelperTool/MuonIdHelperTool") - , m_muonFolder("/MUON/TrkErrorScaling") - , m_do_mdt(false) - , m_do_tgc(false) - , m_do_rpc(false) - , m_do_csc(false) - , m_scaling_mdt_barrel(std::vector<double>(0)) - , m_scaling_mdt_endcap(std::vector<double>(0)) - , m_scaling_tgcPhi(std::vector<double>(0)) - , m_scaling_tgcEta(std::vector<double>(0)) - , m_scaling_rpcPhi(std::vector<double>(0)) - , m_scaling_rpcEta(std::vector<double>(0)) - , m_scaling_cscPhi(std::vector<double>(0)) - , m_scaling_cscEta(std::vector<double>(0)) -{ - - declareInterface<Muon::IMuonErrorScaleDbTool>(this); - - declareProperty("MuonIdHelperTool", m_muonIdHelperTool); - - -} - -//________________________________________________________________________ -Muon::MuonErrorScaleDbTool::~MuonErrorScaleDbTool() -{ - -} - -//________________________________________________________________________ -StatusCode Muon::MuonErrorScaleDbTool::initialize() -{ - - // --- check scaling factors - registerParameters(m_do_mdt, - &m_scaling_mdt_barrel,"MDT Barrel"); - registerParameters(m_do_mdt, - &m_scaling_mdt_endcap,"MDT Endcap"); - - registerParameters(m_do_tgc, - &m_scaling_tgcPhi,"TGC Phi"); - registerParameters(m_do_tgc, - &m_scaling_tgcEta,"TGC Eta"); - - registerParameters(m_do_rpc, - &m_scaling_rpcPhi,"RPC Phi"); - registerParameters(m_do_rpc, - &m_scaling_rpcEta,"RPC Eta"); - - registerParameters(m_do_csc, - &m_scaling_cscPhi,"CSC Phi"); - registerParameters(m_do_csc, - &m_scaling_cscEta,"CSC Eta"); - - // find and register callback function for Muons - const DataHandle<CondAttrListCollection> colptr; - if (detStore()->contains<CondAttrListCollection>(m_muonFolder)) { - if (StatusCode::SUCCESS!=detStore()-> - regFcn(&Muon::MuonErrorScaleDbTool::callback, - this,colptr,m_muonFolder)) { - msg(MSG::ERROR) << "Found the folder, but could not register a callback" - << " on " << m_muonFolder << endmsg; - return StatusCode::FAILURE; - } - else - msg(MSG::INFO) << "Registered callback on COOL folder " - << m_muonFolder << endmsg; - } - else { - msg(MSG::INFO) << "Folder " << m_muonFolder << " is not loaded, " - << "intrinsic meas't errors will be used for Muon RIOs_OnTrack." << endmsg; - - m_do_mdt = false; - m_do_tgc = false; - m_do_rpc = false; - m_do_csc = false; - } - - // set up MuonIdHelperTool - if (m_muonIdHelperTool.retrieve().isSuccess()) - ATH_MSG_INFO("Retrieved "<<m_muonIdHelperTool); - else { - ATH_MSG_FATAL("Could not get MuonIdHelperTool!"); - return StatusCode::FAILURE; - } - - return StatusCode::SUCCESS; -} - -//________________________________________________________________________ -StatusCode Muon::MuonErrorScaleDbTool::finalize() -{ - return StatusCode::SUCCESS; -} - -//________________________________________________________________________ -void Muon::MuonErrorScaleDbTool::registerParameters(bool& do_detSystem, - std::vector<double>* errscaler, - const std::string& sdet) -{ - // add this set of parameters to list, always set the parameters to be - // 'used' for now - do_detSystem=true; - m_parammap.insert(ParamMap::value_type(sdet,errscaler)); - - // set default parameters in case no info is read from condDB for this set - errscaler->clear(); - errscaler->push_back(1.0); - errscaler->push_back(0.0); -} - -//________________________________________________________________________ -MsgStream& Muon::MuonErrorScaleDbTool::dump( MsgStream& out ) const -{ - //--- need an sprintf here. - out << std::endl << name() << " has found the following factors and constants to scale errors:" <<std::endl; - out << "| Detector System factor constant |" <<std::endl; - out << "+-------------------------------------------------------------+" <<std::endl; - - out << makeInfoString("MDT barrel ",m_do_mdt,m_scaling_mdt_barrel) <<std::endl; - out << makeInfoString("MDT endcap ",m_do_mdt,m_scaling_mdt_endcap) <<std::endl; - out << makeInfoString("RPC Phi barrel",m_do_rpc,m_scaling_rpcPhi) <<std::endl; - out << makeInfoString("RPC Eta barrel",m_do_rpc,m_scaling_rpcEta) <<std::endl; - out << makeInfoString("TGC Phi endcap",m_do_tgc,m_scaling_tgcPhi) <<std::endl; - out << makeInfoString("TGC Eta endcap",m_do_tgc,m_scaling_tgcEta) <<std::endl; - out << makeInfoString("CSC Phi endcap",m_do_csc,m_scaling_cscPhi) <<std::endl; - out << makeInfoString("CSC Eta endcap",m_do_csc,m_scaling_cscEta) <<std::endl; - out << "+-------------------------------------------------------------+" <<std::endl; - return out; -} - - -//________________________________________________________________________ -const std::string -Muon::MuonErrorScaleDbTool::makeInfoString(const std::string& sdet, - const bool do_detSystem, - const std::vector<double>& errscaler) const -{ - - const int nformat=62; - std::string s1("| "); - s1.append(sdet); - if (do_detSystem) { - s1.append(" - scaled by "); - } - else { - s1.append(" - unscaled. "); - } - char s2[7]; - sprintf(s2,"%6.3g ",errscaler[0]);s1.append(s2); - s1.append("* err (+) "); - sprintf(s2,"%6.3g ",errscaler[1]);s1.append(s2); - int n = nformat-s1.size(); - for(int i=0; i<n; ++i) s1.append(" "); - s1.append("|"); - return s1; -} - -//________________________________________________________________________ -StatusCode -Muon::MuonErrorScaleDbTool::callback(IOVSVC_CALLBACK_ARGS_P(I,keys) ) -{ - (void) I; - - // callback function when the conditions data object changes - // loop over all the keys, action for the one we are interested in - for (std::list<std::string>::const_iterator itr=keys.begin();itr!=keys.end(); - ++itr) { - if (*itr==m_muonFolder) { - ATH_MSG_DEBUG ("Callback function invoked! (Folder: " << *itr << ")"); - const CondAttrListCollection* atrlistcol=0; - if (StatusCode::SUCCESS==detStore()->retrieve(atrlistcol,*itr)) { - // loop through elements of the attribute list collection - for (CondAttrListCollection::const_iterator citr=atrlistcol->begin(); - citr!=atrlistcol->end();++citr) { - // attribute list format is name(string), n(int) followed by n double - const coral::AttributeList& alist=citr->second; - try { - const std::string& name=alist[0].data<std::string>(); - const int nvals=alist[1].data<int>(); - // locate pointer to parameters vector, based on name - // note that names unknown to the service are ignored - ParamMap::const_iterator loc=m_parammap.find(name); - if (loc!=m_parammap.end()) { - std::vector<double>* params=loc->second; - ATH_MSG_DEBUG ("Setting " << nvals << " parameters for " << name << " at location " << params); - params->clear(); - for (int i=0;i<nvals;++i) - params->push_back(alist[2+i].data<double>()); - } else { - ATH_MSG_DEBUG ("Ignored unexpected parameter" << name); - } - } - // catch problems with the attributelist accesses - catch (coral::Exception& e) { - msg(MSG::ERROR) << "Problem with AttributeList decoding: " << e.what() << endmsg; - return StatusCode::FAILURE; - } - } - } else { - msg(MSG::ERROR) << "Problem reading conditions object " << *itr << endmsg; - return StatusCode::FAILURE; - } - } - } - // printout new constants if in debug print mode - ATH_MSG_DEBUG ( (*this) ); - return StatusCode::SUCCESS; -} - -//________________________________________________________________________ -std::vector<double> -Muon::MuonErrorScaleDbTool::errScale(const Identifier id) const -{ - std::vector<double> val; - - if (!m_muonIdHelperTool->isMuon(id)) { - ATH_MSG_WARNING("using MuonErrorScaleDbTool with non-muon Identifier!"); - return val; - } - - if (m_muonIdHelperTool->isMdt(id)) { - bool isEndcap=m_muonIdHelperTool->isEndcap(id); - return isEndcap ? m_scaling_mdt_endcap : m_scaling_mdt_barrel; - } - else if (m_muonIdHelperTool->isTgc(id)) { - bool measPhi = m_muonIdHelperTool->measuresPhi(id); - return measPhi ? m_scaling_tgcPhi : m_scaling_tgcEta; - } - else if (m_muonIdHelperTool->isRpc(id)) { - bool measPhi = m_muonIdHelperTool->measuresPhi(id); - return measPhi ? m_scaling_rpcPhi : m_scaling_rpcEta; - } - else if (m_muonIdHelperTool->isCsc(id)) { - bool measPhi = m_muonIdHelperTool->measuresPhi(id); - return measPhi ? m_scaling_cscPhi : m_scaling_cscEta; - } - - ATH_MSG_ERROR("didn't find muon type!"); - return val; - -} diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/src/MuonRIO_OnTrackErrorScalingTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/src/MuonRIO_OnTrackErrorScalingTool.cxx deleted file mode 100644 index 502b3fc1539e..000000000000 --- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/src/MuonRIO_OnTrackErrorScalingTool.cxx +++ /dev/null @@ -1,190 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "MuonErrorScalingTools/MuonRIO_OnTrackErrorScalingTool.h" -#include "MuonRecToolInterfaces/IMuonErrorScaleDbTool.h" - -#include "MuonCompetingRIOsOnTrack/CompetingMuonClustersOnTrack.h" - -#include <cmath> - -//________________________________________________________________________ -Muon::MuonRIO_OnTrackErrorScalingTool::MuonRIO_OnTrackErrorScalingTool(const std::string& t, - const std::string& n, const IInterface* p) - : AthAlgTool(t,n,p) - , m_errorScaleDbTool("Muon::MuonErrorScaleDbTool/MuonErrorScaleDbTool") - , m_log(msgSvc(),n) - , m_do_mdt(false) - , m_do_tgc(false) - , m_do_rpc(false) - , m_do_csc(false) -{ - - declareInterface<Trk::IRIO_OnTrackErrorScalingTool>(this); - - declareProperty("ErrorScaleDbTool", m_errorScaleDbTool); - -} - -//________________________________________________________________________ -Muon::MuonRIO_OnTrackErrorScalingTool::~MuonRIO_OnTrackErrorScalingTool() -{ - -} - -//________________________________________________________________________ -StatusCode Muon::MuonRIO_OnTrackErrorScalingTool::initialize() -{ - - //m_log.setLevel(outputLevel()); - - if (m_errorScaleDbTool.retrieve().isSuccess()) - ATH_MSG_INFO("Retrieved "<<m_errorScaleDbTool); - else { - ATH_MSG_FATAL("Could not get "<<m_errorScaleDbTool); - return StatusCode::FAILURE; - } - - // --- check scaling factors - m_do_mdt = m_errorScaleDbTool->doMdt(); - m_do_tgc = m_errorScaleDbTool->doTgc(); - m_do_rpc = m_errorScaleDbTool->doRpc(); - m_do_csc = m_errorScaleDbTool->doCsc(); - - m_log << MSG::INFO << "initialize() successful in " << name() << endmsg; - return StatusCode::SUCCESS; -} - -//________________________________________________________________________ -MsgStream& Muon::MuonRIO_OnTrackErrorScalingTool::dump( MsgStream& out ) const -{ - out << m_errorScaleDbTool; - - return out; -} - -//________________________________________________________________________ -StatusCode Muon::MuonRIO_OnTrackErrorScalingTool::finalize() -{ - msg(MSG::INFO) << "finalize() successful in " << name() << endmsg; - return StatusCode::SUCCESS; -} - -//________________________________________________________________________ -void Muon::MuonRIO_OnTrackErrorScalingTool::scale2by2(Amg::MatrixX& cov, - const std::vector<double>& phiTrafo, - const std::vector<double>& etaTrafo) const -{ - // careful not to change character of error - double corr = (fabs(cov(0,1)) > 1.0e-20) ? - cov(0,1)/(cov(0,0)*cov(1,1)) : - 0.0; - cov(0,0) *= phiTrafo[0]*phiTrafo[0]; - cov(0,0) += phiTrafo[1]*phiTrafo[1]; - cov(1,1) *= etaTrafo[0]*etaTrafo[0]; - cov(1,1) += etaTrafo[1]*etaTrafo[1]; - if (corr !=0.0) cov(0,1) = corr*cov(0,0)*cov(1,1); -} - -//________________________________________________________________________ -Amg::MatrixX* -Muon::MuonRIO_OnTrackErrorScalingTool::createScaledMdtCovariance(const Amg::MatrixX& inputCov, - bool is_endcap) const -{ - Amg::MatrixX* newCov = new Amg::MatrixX(inputCov); - double a = (is_endcap) ? m_scaling_mdt_endcap[0] : m_scaling_mdt_barrel[0]; - double b = (is_endcap) ? m_scaling_mdt_endcap[1] : m_scaling_mdt_barrel[1]; - (*newCov)(0,0) *= a*a; - (*newCov)(0,0) += b*b; - return newCov; -} - -//________________________________________________________________________ -Amg::MatrixX* -Muon::MuonRIO_OnTrackErrorScalingTool::createScaledTgcCovariance(const Amg::MatrixX& inputCov, - const Trk::ParamDefs measuredCoord) const // exists only as end-cap thing -{ - Amg::MatrixX* newCov = new Amg::MatrixX(inputCov); - double a,b = 0.0; - if (measuredCoord == Trk::distPhi) { - a = m_scaling_tgcPhi[0]; - b = m_scaling_tgcPhi[1]; - } else if (measuredCoord == Trk::distEta) { - a = m_scaling_tgcEta[0]; - b = m_scaling_tgcEta[1]; - } else { - delete newCov; - msg(MSG::WARNING) << "Wrong TGC measurement coordinate definition given to RIO_OnTrackErrorScalingTool." << endmsg; - msg(MSG::WARNING) << "Error scaling cancelled, cov=NULL." << endmsg; - msg(MSG::INFO) << "Allowed definitions: Trk::distPhi, Trk::distEta." << endmsg; - return 0; - } - (*newCov)(0,0) *= a*a; - (*newCov)(0,0) += b*b; - return newCov; -} - -//________________________________________________________________________ -Amg::MatrixX* -Muon::MuonRIO_OnTrackErrorScalingTool::createScaledRpcCovariance(const Amg::MatrixX& inputCov, - const Trk::ParamDefs measuredCoord ) const // exists only as barrel thing -{ - Amg::MatrixX* newCov = new Amg::MatrixX(inputCov); - double a,b = 0.0; - if (measuredCoord == Trk::distPhi) { - a = m_scaling_rpcPhi[0]; - b = m_scaling_rpcPhi[1]; - } else if (measuredCoord == Trk::distEta) { - a = m_scaling_rpcEta[0]; - b = m_scaling_rpcEta[1]; - } else { - delete newCov; - msg(MSG::WARNING) << "Wrong RPC measurement coordinate definition given to RIO_OnTrackErrorScalingTool." << endmsg; - msg(MSG::WARNING) << "Error scaling cancelled, cov=NULL." << endmsg; - msg(MSG::INFO) << "Allowed definitions: Trk::distPhi, Trk::distEta." << endmsg; - return 0; - } - (*newCov)(0,0) *= a*a; - (*newCov)(0,0) += b*b; - return newCov; -} - -//________________________________________________________________________ -Amg::MatrixX* -Muon::MuonRIO_OnTrackErrorScalingTool::createScaledCscCovariance(const Amg::MatrixX& inputCov, - const Trk::ParamDefs measuredCoord) const // is a far-fwd technology -{ - Amg::MatrixX* newCov = new Amg::MatrixX(inputCov); - double a,b = 0.0; - if (measuredCoord == Trk::distPhi) { - a = m_scaling_cscPhi[0]; - b = m_scaling_cscPhi[1]; - } else if (measuredCoord == Trk::distEta) { - a = m_scaling_cscEta[0]; - b = m_scaling_cscEta[1]; - } else { - delete newCov; - msg(MSG::WARNING) << "Wrong CSC measurement coordinate definition given to RIO_OnTrackErrorScalingTool." << endmsg; - msg(MSG::WARNING) << "Error scaling cancelled, cov=NULL." << endmsg; - msg(MSG::INFO) << "Allowed definitions: Trk::distPhi, Trk::distEta." << endmsg; - return 0; - } - (*newCov)(0,0) *= a*a; - (*newCov)(0,0) += b*b; - return newCov; -} - -//________________________________________________________________________ -Amg::MatrixX* -Muon::MuonRIO_OnTrackErrorScalingTool::createScaledMdtCovariance(const Amg::MatrixX& inputCov, - Identifier ) const -{ - - Amg::MatrixX* newCov = new Amg::MatrixX(inputCov); - double a = 1.; - double b = 0.; - (*newCov)(0,0) *= a*a; - (*newCov)(0,0) += b*b; - return newCov; -} diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/src/components/MuonErrorScalingTools_entries.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/src/components/MuonErrorScalingTools_entries.cxx deleted file mode 100644 index fe31dd371171..000000000000 --- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/src/components/MuonErrorScalingTools_entries.cxx +++ /dev/null @@ -1,8 +0,0 @@ -#include "MuonErrorScalingTools/MuonRIO_OnTrackErrorScalingTool.h" -#include "MuonErrorScalingTools/MuonErrorScaleDbTool.h" - -using namespace Muon; - -DECLARE_COMPONENT( MuonRIO_OnTrackErrorScalingTool ) -DECLARE_COMPONENT( MuonErrorScaleDbTool ) - diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonErrorScaleDbTool.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonErrorScaleDbTool.h deleted file mode 100755 index d2ca8f989e35..000000000000 --- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonErrorScaleDbTool.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef MUON_IMUONERRORSCALEDBTOOL_H -#define MUON_IMUONERRORSCALEDBTOOL_H - -#include "Identifier/Identifier.h" - -static const InterfaceID IID_IMuonErrorScaleDbTool - ("Muon::IMuonErrorScaleDbTool",1,0); - - -namespace Muon { - - /** - @file IMuonErrorScaleDbTool.h - @class IMuonErrorScaleDbTool - - @brief Interface for tools used to retrieve constants from conditions database used for error scaling of muon hits. - - @author Robert Harrington <roberth@bu.edu> - @date 20 May 2010 - */ - - class IMuonErrorScaleDbTool : virtual public IAlgTool { - - public: - - static const InterfaceID& interfaceID(); - - virtual StatusCode initialize() = 0; - virtual StatusCode finalize() = 0; - - /** methods to indicate whether constants are available for error scaling of subsystems. */ - virtual bool doMdt() const = 0; - virtual bool doTgc() const = 0; - virtual bool doRpc() const = 0; - virtual bool doCsc() const = 0; - - virtual std::vector<double> errScale(const Identifier id) const = 0; - - /** dump the scaling parameters to MsgStream output. */ - virtual MsgStream& dump( MsgStream& ) const = 0; - }; - - inline const InterfaceID& IMuonErrorScaleDbTool::interfaceID() - { - return IID_IMuonErrorScaleDbTool; - } - - MsgStream& operator << (MsgStream&, const IMuonErrorScaleDbTool&); - - inline MsgStream& operator << (MsgStream& sl, const IMuonErrorScaleDbTool& se) - { - return se.dump(sl); - } - -} // end of name space - - -#endif // MUON_IMUONERRORSCALEDBTOOL_H diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonRIO_OnTrackErrorScalingTool.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonRIO_OnTrackErrorScalingTool.h deleted file mode 100755 index c0c79122e8d0..000000000000 --- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonRIO_OnTrackErrorScalingTool.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef MUON_IMUONRIO_ONTRACKERRORSCALINGTOOL_H -#define MUON_IMUONRIO_ONTRACKERRORSCALINGTOOL_H - -#include "TrkToolInterfaces/IRIO_OnTrackErrorScalingTool.h" -#include "TrkEventPrimitives/ParamDefs.h" - -static const InterfaceID IID_IMuonRIO_OnTrackErrorScalingTool - ("Muon::IMuonRIO_OnTrackErrorScalingTool",1,0); - - -namespace Muon { - - /** @brief Interface for tools determining error scaling for muon detectors, inherits from RIO_OnTrackErrorScalingTool. - */ - class IMuonRIO_OnTrackErrorScalingTool : virtual public Trk::IRIO_OnTrackErrorScalingTool - { - public: - - static const InterfaceID& interfaceID(); - - virtual StatusCode initialize() = 0; - virtual StatusCode finalize() = 0; - - virtual bool needToScalePixel() const { return 0; } - virtual bool needToScaleSct() const { return 0; } - virtual bool needToScaleTrt() const { return 0; } - virtual bool needToScaleMdt() const = 0; - virtual bool needToScaleTgc() const = 0; - virtual bool needToScaleRpc() const = 0; - virtual bool needToScaleCsc() const = 0; - - virtual Amg::MatrixX* - createScaledPixelCovariance(const Amg::MatrixX&, - const Identifier&) const { return 0; } - - virtual Amg::MatrixX* - createScaledSctCovariance(const Amg::MatrixX&, - bool, - double) const { return 0; } - - virtual Amg::MatrixX* - createScaledTrtCovariance(const Amg::MatrixX&, - bool) const { return 0; } - - virtual Amg::MatrixX* - createScaledMdtCovariance(const Amg::MatrixX&, - bool is_endcap) const = 0; - - virtual Amg::MatrixX* - createScaledTgcCovariance(const Amg::MatrixX&, - const Trk::ParamDefs=Trk::distPhi) const = 0; - - virtual Amg::MatrixX* - createScaledRpcCovariance(const Amg::MatrixX&, - const Trk::ParamDefs=Trk::distPhi) const = 0; - - virtual Amg::MatrixX* - createScaledCscCovariance(const Amg::MatrixX&, - const Trk::ParamDefs=Trk::distPhi) const = 0; - - }; - - inline const InterfaceID& IMuonRIO_OnTrackErrorScalingTool::interfaceID() - { - return IID_IMuonRIO_OnTrackErrorScalingTool; - } -} // end of name space - -#endif // MUON_IMUONRIO_ONTRACKERRORSCALINGTOOL_H - diff --git a/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/IRIO_OnTrackErrorScalingTool.h b/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/IRIO_OnTrackErrorScalingTool.h deleted file mode 100755 index 9ce055c01bbe..000000000000 --- a/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/IRIO_OnTrackErrorScalingTool.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// IRIO_OnTrackErrorScalingTool.h -// Header file for interface class IRIO_OnTrackErrorScalingTool -/////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// -// Wolfgang.Liebig@cern.ch -/////////////////////////////////////////////////////////////////// - -#ifndef TRKTOOLIFS_IRIO_ONTRACKERRORSCALINGTOOL_H -#define TRKTOOLIFS_IRIO_ONTRACKERRORSCALINGTOOL_H - -#include "GaudiKernel/IAlgTool.h" -#include "TrkEventPrimitives/ParamDefs.h" -#include "EventPrimitives/EventPrimitives.h" -class Identifier; - -namespace Trk { - class CovarianceMatrix; - static const InterfaceID IID_IRIO_OnTrackErrorScalingTool - ("IRIO_OnTrackErrorScalingTool",1,0); - - /** @class IRIO_OnTrackErrorScalingTool - @brief Interface for the ErrorScalingTool, which applies a linear tuning - function to measurement errors. - - This tuning is applied centrally within the creation - of RIO_OnTrack from PrepRawData. Execution of this central - infrastructure, however, depends on the sub-detector specific ROT - creators making an explicit call to the scaling tool. - - @author Wolfgang Liebig <http://consult.cern.ch/xwho/people/54608> - */ - class IRIO_OnTrackErrorScalingTool : virtual public IAlgTool { - - public: - virtual ~IRIO_OnTrackErrorScalingTool() {} - static const InterfaceID& interfaceID() //!< AlgTool standard interface - { return IID_IRIO_OnTrackErrorScalingTool; } - /* The AtlasDetectorID helper does not have an is_endcap method. - therefore follow a different approach than this one: - virtual const void - scaleError(Amg::MatrixX&, const Identifier&) =0; - */ - /** The following needToScaleXY methods detect from the job options - * if an error scaling will be needed or not. - */ - virtual bool needToScalePixel() const=0; - virtual bool needToScaleSct() const=0; - virtual bool needToScaleTrt() const=0; - virtual bool needToScaleMdt() const=0; - virtual bool needToScaleTgc() const=0; - virtual bool needToScaleRpc() const=0; - virtual bool needToScaleCsc() const=0; - - /** Scale Pixel Amg::MatrixX by returning a new Amg::MatrixX - object with scaled values. Measurement errors in local x and y - are scaled with independent parameters. - */ - virtual Amg::MatrixX* - createScaledPixelCovariance(const Amg::MatrixX&, - const Identifier& id) const=0; - /** Scale SCT Amg::MatrixX by returning a new Amg::MatrixX - object with scaled values. Measurement errors in the - strip-transverse plane are scaled, involving a rotation by - the local stereo angle for the endcap modules. - */ - virtual Amg::MatrixX* - createScaledSctCovariance(const Amg::MatrixX&, - bool is_endcap, - double sinLocalAngle) const=0; - /** Scale TRT Amg::MatrixX by returning a new Amg::MatrixX - object with scaled error. */ - virtual Amg::MatrixX* - createScaledTrtCovariance(const Amg::MatrixX&, - bool is_endcap) const=0; - /** Scale MDT Amg::MatrixX by returning a new Amg::MatrixX - object with scaled error. barrel and endcap MDTs are distinguished. - */ - virtual Amg::MatrixX* - createScaledMdtCovariance(const Amg::MatrixX&, - bool is_endcap) const=0; - /** Scale TGC Amg::MatrixX by returning a new Amg::MatrixX - object with scaled error. Since TGC phi and eta hits are - described by different 1D measurements and possibly need - different scaling, the information if it is a Trk::distPhi - or Trk::distEta measurement is passed as parameter. - */ - virtual Amg::MatrixX* - createScaledTgcCovariance(const Amg::MatrixX&, - const ParamDefs=Trk::distPhi) const=0; - /** Scale RPC Amg::MatrixX by returning a new Amg::MatrixX - object with scaled error. Since RPC phi and eta hits are - described by different 1D measurements and possibly need - different scaling, the information if it is a Trk::distPhi - or Trk::distEta measurement is passed as parameter. - */ - virtual Amg::MatrixX* - createScaledRpcCovariance(const Amg::MatrixX&, - const ParamDefs=Trk::distPhi) const=0; - /** Scale CSC Amg::MatrixX by returning a new Amg::MatrixX - object with scaled error. Since CSC phi and eta hits are - described by different 1D measurements and possibly need - different scaling, the information if it is a Trk::distPhi - or Trk::distEta measurement is passed as parameter. - */ - virtual Amg::MatrixX* - createScaledCscCovariance(const Amg::MatrixX&, - const ParamDefs=Trk::distPhi) const=0; - }; -} -#endif -- GitLab From b36fd88b45e3123c90f637d0bb4c8beb077be7c3 Mon Sep 17 00:00:00 2001 From: Goetz Gaycken <goetz.gaycken@cern.ch> Date: Tue, 17 Jul 2018 17:50:44 +0200 Subject: [PATCH 528/562] Provide specialised conditions data to perform MDT error scaling. The MDT error scaling conditions data can be requested but is currently unused. Former-commit-id: ab740c612dd77b58dcca8e299c3a6c11fd8a3567 --- .../MDTRIO_OnTrackErrorScaling.h | 31 ++++++++++++++++ .../src/MDTRIO_OnTrackErrorScaling.cxx | 36 +++++++++++++++++++ .../src/RIO_OnTrackErrorScalingMuonKits.cxx | 20 ++++++++++- 3 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/MuonRIO_OnTrack/MDTRIO_OnTrackErrorScaling.h create mode 100644 MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/src/MDTRIO_OnTrackErrorScaling.cxx diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/MuonRIO_OnTrack/MDTRIO_OnTrackErrorScaling.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/MuonRIO_OnTrack/MDTRIO_OnTrackErrorScaling.h new file mode 100644 index 000000000000..2ce586665d74 --- /dev/null +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/MuonRIO_OnTrack/MDTRIO_OnTrackErrorScaling.h @@ -0,0 +1,31 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ +#ifndef _MDTRIO_OnTrackErrorScaling_H_ +#define _MDTRIO_OnTrackErrorScaling_H_ + +#include "TrkRIO_OnTrack/RIO_OnTrackErrorScaling.h" +#include "TrkEventPrimitives/ParamDefs.h" + +class MDTRIO_OnTrackErrorScaling : public RIO_OnTrackErrorScaling +{ +public: + virtual CLID clid() const override; + + virtual Amg::MatrixX getScaledCovariance(const Amg::MatrixX& cov_input, + bool is_endcap) const; + + enum EMDTErrorScalingRegions { + kBarrel, + kEndcap, + kNParamTypes}; + + static const char **paramNames() { return s_names; } + virtual bool postProcess() override; +protected: + static const char *s_names[kNParamTypes]; +}; + +CLASS_DEF( MDTRIO_OnTrackErrorScaling , 100992927, 1 ) +CONDCONT_DEF(MDTRIO_OnTrackErrorScaling, 213408417, RIO_OnTrackErrorScaling); +#endif diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/src/MDTRIO_OnTrackErrorScaling.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/src/MDTRIO_OnTrackErrorScaling.cxx new file mode 100644 index 000000000000..b2d59f77eb69 --- /dev/null +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/src/MDTRIO_OnTrackErrorScaling.cxx @@ -0,0 +1,36 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ +#include "MuonRIO_OnTrack/MDTRIO_OnTrackErrorScaling.h" +#include <iostream> + +const char *MDTRIO_OnTrackErrorScaling::s_names[MDTRIO_OnTrackErrorScaling::kNParamTypes]={ + "MDT Barrel", + "MDT Endcap" + }; + +namespace { + inline double square(double a) { return a*a; } +} + +CLID MDTRIO_OnTrackErrorScaling::clid() const { + return ClassID_traits<CondCont<MDTRIO_OnTrackErrorScaling> >::ID(); +} + +bool MDTRIO_OnTrackErrorScaling::postProcess() { + checkParameters("MDTRIO_OnTrackErrorScaling", kNParamTypes, s_names, 2); + return true; +} + +Amg::MatrixX MDTRIO_OnTrackErrorScaling::getScaledCovariance(const Amg::MatrixX& cov_input, + bool is_endcap) const +{ + Amg::MatrixX newCov(cov_input); + double a = (is_endcap) ? params()[kEndcap][0] : params()[kBarrel][0]; + double b = (is_endcap) ? params()[kEndcap][1] : params()[kBarrel][1]; + newCov(0,0) *= square(a); + newCov(0,0) += square(b); + return newCov; +} + + diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingMuonKits.cxx b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingMuonKits.cxx index eeb13f455eea..7096d21d4796 100644 --- a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingMuonKits.cxx +++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingMuonKits.cxx @@ -32,6 +32,23 @@ private: char **m_names; }; +#include "MuonRIO_OnTrack/MDTRIO_OnTrackErrorScaling.h" +class MDTRIO_OnTrackErrorScalingKit + : public RIO_OnTrackErrorScalingSpecialisedKit<MDTRIO_OnTrackErrorScaling> +{ +public: + MDTRIO_OnTrackErrorScalingKit() {} + + ~MDTRIO_OnTrackErrorScalingKit() {} + + virtual unsigned int nParametres() const override { + return MDTRIO_OnTrackErrorScaling::kNParamTypes; + } + virtual const char **paramNames() const override { + return MDTRIO_OnTrackErrorScaling::paramNames(); + } +}; + namespace { // register all kits with the help of a dummy function which sets a global anonymous bool @@ -39,6 +56,7 @@ namespace { return RIO_OnTrackErrorScalingKitManager::instance().registerKit("RPCRIO_OnTrackErrorScaling", new MuonEtaPhiRIO_OnTrackErrorScalingKit("RPC")) && RIO_OnTrackErrorScalingKitManager::instance().registerKit("TGCRIO_OnTrackErrorScaling", new MuonEtaPhiRIO_OnTrackErrorScalingKit("TGC")) - && RIO_OnTrackErrorScalingKitManager::instance().registerKit("CSCRIO_OnTrackErrorScaling", new MuonEtaPhiRIO_OnTrackErrorScalingKit("CSC")); + && RIO_OnTrackErrorScalingKitManager::instance().registerKit("CSCRIO_OnTrackErrorScaling", new MuonEtaPhiRIO_OnTrackErrorScalingKit("CSC")) + && RIO_OnTrackErrorScalingKitManager::instance().registerKit("MDTRIO_OnTrackErrorScaling", new MDTRIO_OnTrackErrorScalingKit); } ) (); } -- GitLab From 3699ea0815ce1ed876f382ddd484818a4b14ae33 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Sun, 14 Jan 2018 16:11:18 +0100 Subject: [PATCH 529/562] iPatGeometry: Fix clang warning. clang warning: == instead of =. Former-commit-id: 358e56ce3b8555d997bbba60815c6bd49139ed8b --- Reconstruction/iPat/iPatGeometry/src/MaterialAllocator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Reconstruction/iPat/iPatGeometry/src/MaterialAllocator.cxx b/Reconstruction/iPat/iPatGeometry/src/MaterialAllocator.cxx index db2c5b192e05..5132818875cd 100755 --- a/Reconstruction/iPat/iPatGeometry/src/MaterialAllocator.cxx +++ b/Reconstruction/iPat/iPatGeometry/src/MaterialAllocator.cxx @@ -26,7 +26,7 @@ MaterialAllocator::MaterialAllocator (std::string versionName) && m_versionName != "DC3") { // TODO: should flag problem - m_versionName == "DC3"; + m_versionName = "DC3"; } } -- GitLab From 8171e98ebc61ee3ad2a65aa4560de9fbbb766fc3 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Mon, 25 Sep 2017 17:00:48 +0200 Subject: [PATCH 530/562] TrkiPatFitterUtils: DataModel -> AthContainers. Remove references to obsolete package DataModel. Former-commit-id: 2770605b43d3ae5efb1115de2e980d977110f097 --- Tracking/TrkFitter/TrkiPatFitterUtils/CMakeLists.txt | 4 ++-- .../TrkiPatFitterUtils/TrkiPatFitterUtils/FitProcedure.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tracking/TrkFitter/TrkiPatFitterUtils/CMakeLists.txt b/Tracking/TrkFitter/TrkiPatFitterUtils/CMakeLists.txt index aeabfde24f5d..8faf0958b3a8 100644 --- a/Tracking/TrkFitter/TrkiPatFitterUtils/CMakeLists.txt +++ b/Tracking/TrkFitter/TrkiPatFitterUtils/CMakeLists.txt @@ -8,7 +8,7 @@ atlas_subdir( TrkiPatFitterUtils ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC Control/AthenaBaseComps - Control/DataModel + Control/AthContainers DetectorDescription/GeoPrimitives Event/EventPrimitives GaudiKernel @@ -43,5 +43,5 @@ atlas_add_library( TrkiPatFitterUtils INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps DataModel GeoPrimitives EventPrimitives GaudiKernel TrkEventPrimitives TrkParameters + LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps AthContainers GeoPrimitives EventPrimitives GaudiKernel TrkEventPrimitives TrkParameters PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} TrkGeometry TrkSurfaces TrkMaterialOnTrack TrkMeasurementBase TrkTrack TrkExInterfaces TrkExUtils ) diff --git a/Tracking/TrkFitter/TrkiPatFitterUtils/TrkiPatFitterUtils/FitProcedure.h b/Tracking/TrkFitter/TrkiPatFitterUtils/TrkiPatFitterUtils/FitProcedure.h index 60c80d4bf5a9..600c8b7af19c 100755 --- a/Tracking/TrkFitter/TrkiPatFitterUtils/TrkiPatFitterUtils/FitProcedure.h +++ b/Tracking/TrkFitter/TrkiPatFitterUtils/TrkiPatFitterUtils/FitProcedure.h @@ -22,7 +22,7 @@ //<<<<<< INCLUDES >>>>>> #include <vector> -#include "DataModel/DataVector.h" +#include "AthContainers/DataVector.h" #include "GaudiKernel/ToolHandle.h" #include "TrkEventPrimitives/ParticleHypothesis.h" -- GitLab From fb4b19aa4c4030e310f476d68f0e8be0a4b6d000 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Wed, 18 Jul 2018 21:35:17 +0200 Subject: [PATCH 531/562] TrkSegment: DataModel -> AthContainers. Remove reference to obsolete package DataModel. Also adjust for headers moved to AthenaKernel. Former-commit-id: 72ad1b2055cf3fcf48dfcdf3f7679f7608ea6731 --- Tracking/TrkEvent/TrkSegment/CMakeLists.txt | 9 ++++----- Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h | 2 +- .../TrkEvent/TrkSegment/TrkSegment/SegmentCollection.h | 4 ++-- Tracking/TrkEvent/TrkSegment/TrkSegment/TrackSegment.h | 2 +- Tracking/TrkEvent/TrkSegment/src/TrackSegment.cxx | 2 +- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Tracking/TrkEvent/TrkSegment/CMakeLists.txt b/Tracking/TrkEvent/TrkSegment/CMakeLists.txt index ce4f2f2c6040..19a4ee5d3ec9 100644 --- a/Tracking/TrkEvent/TrkSegment/CMakeLists.txt +++ b/Tracking/TrkEvent/TrkSegment/CMakeLists.txt @@ -7,9 +7,8 @@ atlas_subdir( TrkSegment ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - Control/CLIDSvc - Control/DataModel - Control/SGTools + Control/AthenaKernel + Control/AthContainers DetectorDescription/Identifier Tracking/TrkEvent/TrkMeasurementBase PRIVATE @@ -26,12 +25,12 @@ atlas_add_library( TrkSegment src/*.cxx PUBLIC_HEADERS TrkSegment PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES DataModel SGTools Identifier TrkMeasurementBase + LINK_LIBRARIES AthContainers Identifier TrkMeasurementBase PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks GaudiKernel TrkSurfaces TrkEventPrimitives ) atlas_add_dictionary( TrkSegmentDict TrkSegment/TrkSegmentDict.h TrkSegment/selection.xml INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} DataModel SGTools Identifier TrkMeasurementBase AthLinks GaudiKernel TrkSurfaces TrkEventPrimitives TrkSegment ) + LINK_LIBRARIES ${ROOT_LIBRARIES} AthContainers Identifier TrkMeasurementBase AthLinks GaudiKernel TrkSurfaces TrkEventPrimitives TrkSegment ) diff --git a/Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h b/Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h index 883f409c5455..cffb255fbb18 100755 --- a/Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h +++ b/Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h @@ -17,7 +17,7 @@ #include <ostream> #include <vector> -#include "DataModel/DataVector.h" +#include "AthContainers/DataVector.h" #include "TrkMeasurementBase/MeasurementBase.h" class MsgStream; diff --git a/Tracking/TrkEvent/TrkSegment/TrkSegment/SegmentCollection.h b/Tracking/TrkEvent/TrkSegment/TrkSegment/SegmentCollection.h index f49adb9bac3e..5a5800c6ad5b 100755 --- a/Tracking/TrkEvent/TrkSegment/TrkSegment/SegmentCollection.h +++ b/Tracking/TrkEvent/TrkSegment/TrkSegment/SegmentCollection.h @@ -5,8 +5,8 @@ #ifndef TRKSEGMENT_SEGMENTCOLLECTION_H #define TRKSEGMENT_SEGMENTCOLLECTION_H -#include "DataModel/DataVector.h" -#include "CLIDSvc/CLASS_DEF.h" +#include "AthContainers/DataVector.h" +#include "AthenaKernel/CLASS_DEF.h" #include "TrkSegment/Segment.h" namespace Trk { diff --git a/Tracking/TrkEvent/TrkSegment/TrkSegment/TrackSegment.h b/Tracking/TrkEvent/TrkSegment/TrkSegment/TrackSegment.h index 488a7ea03cca..5171c1e3c120 100755 --- a/Tracking/TrkEvent/TrkSegment/TrkSegment/TrackSegment.h +++ b/Tracking/TrkEvent/TrkSegment/TrkSegment/TrackSegment.h @@ -18,7 +18,7 @@ #include <ostream> #include <vector> -#include "DataModel/DataVector.h" +#include "AthContainers/DataVector.h" class MsgStream; class TrackSegmentCnv_p1; diff --git a/Tracking/TrkEvent/TrkSegment/src/TrackSegment.cxx b/Tracking/TrkEvent/TrkSegment/src/TrackSegment.cxx index f03f8328ec50..5f3bb1550209 100755 --- a/Tracking/TrkEvent/TrkSegment/src/TrackSegment.cxx +++ b/Tracking/TrkEvent/TrkSegment/src/TrackSegment.cxx @@ -10,7 +10,7 @@ #include "TrkSegment/TrackSegment.h" #include "TrkSurfaces/Surface.h" #include "GaudiKernel/MsgStream.h" -#include "DataModel/DataVector.h" +#include "AthContainers/DataVector.h" // default constructor -- GitLab From 5408c449c0270f16a8cf341025e0ebb0a5ef0510 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Wed, 18 Jul 2018 21:32:13 +0200 Subject: [PATCH 532/562] TrkSpacePoint: DataModel -> AthContainers. Remove reference to obsolete package DataModel. Also adjust for headers moved to AthenaKernel. Former-commit-id: feb54777bc19cac86a0475f2cb4e8cedc5b863da --- Tracking/TrkEvent/TrkSpacePoint/CMakeLists.txt | 7 +++---- .../TrkSpacePoint/TrkSpacePoint/SpacePointCollection.h | 4 ++-- .../TrkSpacePoint/TrkSpacePoint/SpacePointContainer.h | 2 +- .../TrkSpacePoint/SpacePointOverlapCollection.h | 4 ++-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Tracking/TrkEvent/TrkSpacePoint/CMakeLists.txt b/Tracking/TrkEvent/TrkSpacePoint/CMakeLists.txt index 291f61a5aec2..8c7fe3299cfb 100644 --- a/Tracking/TrkEvent/TrkSpacePoint/CMakeLists.txt +++ b/Tracking/TrkEvent/TrkSpacePoint/CMakeLists.txt @@ -7,9 +7,8 @@ atlas_subdir( TrkSpacePoint ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - Control/CLIDSvc - Control/DataModel - Control/SGTools + Control/AthenaKernel + Control/AthContainers DetectorDescription/Identifier Event/EventContainers GaudiKernel @@ -24,6 +23,6 @@ atlas_depends_on_subdirs( PUBLIC atlas_add_library( TrkSpacePoint src/*.cxx PUBLIC_HEADERS TrkSpacePoint - LINK_LIBRARIES DataModel SGTools Identifier GaudiKernel TrkMeasurementBase EventContainers + LINK_LIBRARIES AthContainers Identifier GaudiKernel TrkMeasurementBase EventContainers PRIVATE_LINK_LIBRARIES TrkDetElementBase TrkSurfaces TrkEventPrimitives TrkPrepRawData ) diff --git a/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePointCollection.h b/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePointCollection.h index 4248f77d8426..32cd0a70d3be 100755 --- a/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePointCollection.h +++ b/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePointCollection.h @@ -25,7 +25,7 @@ #include "Identifier/Identifier.h" #include "Identifier/Identifiable.h" #include "Identifier/IdentifierHash.h" -#include "DataModel/DataVector.h" +#include "AthContainers/DataVector.h" #include "GaudiKernel/DataObject.h" //class SpacePoint; #include "TrkSpacePoint/SpacePoint.h" @@ -90,7 +90,7 @@ std::ostream& operator << ( std::ostream& sl, const SpacePointCollection& coll); // Inline methods: /////////////////////////////////////////////////////////////////// -#include "CLIDSvc/CLASS_DEF.h" +#include "AthenaKernel/CLASS_DEF.h" CLASS_DEF(SpacePointCollection,1156991496,1) #endif // TRKSPACEPOINT_SPACEPOINTCOLLECTION_H diff --git a/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePointContainer.h b/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePointContainer.h index 3d3adb90a1bc..199314e5cd64 100755 --- a/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePointContainer.h +++ b/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePointContainer.h @@ -86,7 +86,7 @@ private: // Inline methods: /////////////////////////////////////////////////////////////////// -#include "CLIDSvc/CLASS_DEF.h" +#include "AthenaKernel/CLASS_DEF.h" CLASS_DEF(SpacePointContainer,1273119430,1) diff --git a/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePointOverlapCollection.h b/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePointOverlapCollection.h index 23b4accadd00..41578f1abc4c 100755 --- a/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePointOverlapCollection.h +++ b/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePointOverlapCollection.h @@ -18,7 +18,7 @@ #define TRKSPACEPOINT_SPACEPOINTOVERLAPCOLLECTION_H // Base classes -#include "DataModel/DataVector.h" +#include "AthContainers/DataVector.h" #include "GaudiKernel/DataObject.h" //class SpacePoint; #include "TrkSpacePoint/SpacePoint.h" @@ -63,7 +63,7 @@ private: // Inline methods: /////////////////////////////////////////////////////////////////// -#include "CLIDSvc/CLASS_DEF.h" +#include "AthenaKernel/CLASS_DEF.h" CLASS_DEF(SpacePointOverlapCollection,1164030866, 1) -- GitLab From 79f88544585a030a38631ff86e8d76a384b90635 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Wed, 18 Jul 2018 21:36:42 +0200 Subject: [PATCH 533/562] TrkExAlgs: DataModel -> AthContainers. Remove reference to obsolete package DataModel. Former-commit-id: 5a2ea3d2954b226f22714f9aef1d0074cd93dbc6 --- Tracking/TrkExtrapolation/TrkExAlgs/CMakeLists.txt | 4 ++-- .../TrkExAlgs/TrkExAlgs/EnergyLossExtrapolationValidation.h | 3 +-- .../TrkExAlgs/src/EnergyLossExtrapolationValidation.cxx | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Tracking/TrkExtrapolation/TrkExAlgs/CMakeLists.txt b/Tracking/TrkExtrapolation/TrkExAlgs/CMakeLists.txt index 4c67c4ee1344..7b2e37026a48 100644 --- a/Tracking/TrkExtrapolation/TrkExAlgs/CMakeLists.txt +++ b/Tracking/TrkExtrapolation/TrkExAlgs/CMakeLists.txt @@ -8,7 +8,7 @@ atlas_subdir( TrkExAlgs ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC Control/AthenaBaseComps - Control/DataModel + Control/AthContainers DetectorDescription/GeoPrimitives Event/EventPrimitives GaudiKernel @@ -33,7 +33,7 @@ atlas_add_component( TrkExAlgs src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps DataModel GeoPrimitives EventPrimitives GaudiKernel MagFieldInterfaces TrkSurfaces TrkParameters StoreGateLib SGtests TrkGeometry TrkVolumes TrkEventPrimitives TrkTrack TrkExInterfaces TrkExUtils ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps AthContainers GeoPrimitives EventPrimitives GaudiKernel MagFieldInterfaces TrkSurfaces TrkParameters StoreGateLib SGtests TrkGeometry TrkVolumes TrkEventPrimitives TrkTrack TrkExInterfaces TrkExUtils ) # Install files from the package: atlas_install_headers( TrkExAlgs ) diff --git a/Tracking/TrkExtrapolation/TrkExAlgs/TrkExAlgs/EnergyLossExtrapolationValidation.h b/Tracking/TrkExtrapolation/TrkExAlgs/TrkExAlgs/EnergyLossExtrapolationValidation.h index 6ed2e9a0db37..bb2fd1fce31f 100644 --- a/Tracking/TrkExtrapolation/TrkExAlgs/TrkExAlgs/EnergyLossExtrapolationValidation.h +++ b/Tracking/TrkExtrapolation/TrkExAlgs/TrkExAlgs/EnergyLossExtrapolationValidation.h @@ -16,8 +16,7 @@ #include "GaudiKernel/IRndmGenSvc.h" #include "GaudiKernel/RndmGenerators.h" #include <string> -// DataVector from DataModel -#include "DataModel/DataVector.h" +#include "AthContainers/DataVector.h" // CylinderSurfaces #include "TrkSurfaces/CylinderSurface.h" #include "TrkSurfaces/DiscSurface.h" diff --git a/Tracking/TrkExtrapolation/TrkExAlgs/src/EnergyLossExtrapolationValidation.cxx b/Tracking/TrkExtrapolation/TrkExAlgs/src/EnergyLossExtrapolationValidation.cxx index 5889843d09fb..9d9ccb7c8058 100644 --- a/Tracking/TrkExtrapolation/TrkExAlgs/src/EnergyLossExtrapolationValidation.cxx +++ b/Tracking/TrkExtrapolation/TrkExAlgs/src/EnergyLossExtrapolationValidation.cxx @@ -25,8 +25,7 @@ #include "GaudiKernel/SystemOfUnits.h" // Framework #include "StoreGate/StoreGateSvc.h" -// DataVector from DataModel -#include "DataModel/DataVector.h" +#include "AthContainers/DataVector.h" //================ Constructor ================================================= -- GitLab From 8d6bef4bd343d93f3a32371fb2bad20292d95efb Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Wed, 18 Jul 2018 21:38:23 +0200 Subject: [PATCH 534/562] TrkFitterInterfaces: DataModel -> AthContainers. Remove reference to obsolete package DataModel. Former-commit-id: d374fdf11f62b5a7c4dcda7bfc2bd15572fa0e39 --- Tracking/TrkFitter/TrkFitterInterfaces/CMakeLists.txt | 4 ++-- .../TrkFitterInterfaces/IMultiTrackFitter.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tracking/TrkFitter/TrkFitterInterfaces/CMakeLists.txt b/Tracking/TrkFitter/TrkFitterInterfaces/CMakeLists.txt index 814f038a2b47..a51e02ba0ce5 100644 --- a/Tracking/TrkFitter/TrkFitterInterfaces/CMakeLists.txt +++ b/Tracking/TrkFitter/TrkFitterInterfaces/CMakeLists.txt @@ -7,7 +7,7 @@ atlas_subdir( TrkFitterInterfaces ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - Control/DataModel + Control/AthContainers Event/EventPrimitives GaudiKernel Tracking/TrkEvent/TrkEventPrimitives @@ -17,5 +17,5 @@ atlas_depends_on_subdirs( PUBLIC # Component(s) in the package: atlas_add_library( TrkFitterInterfaces PUBLIC_HEADERS TrkFitterInterfaces - LINK_LIBRARIES DataModel EventPrimitives GaudiKernel TrkEventPrimitives TrkParameters TrkFitterUtils ) + LINK_LIBRARIES AthContainers EventPrimitives GaudiKernel TrkEventPrimitives TrkParameters TrkFitterUtils ) diff --git a/Tracking/TrkFitter/TrkFitterInterfaces/TrkFitterInterfaces/IMultiTrackFitter.h b/Tracking/TrkFitter/TrkFitterInterfaces/TrkFitterInterfaces/IMultiTrackFitter.h index a04c68f8fb27..4c307d075136 100644 --- a/Tracking/TrkFitter/TrkFitterInterfaces/TrkFitterInterfaces/IMultiTrackFitter.h +++ b/Tracking/TrkFitter/TrkFitterInterfaces/TrkFitterInterfaces/IMultiTrackFitter.h @@ -17,7 +17,7 @@ #include "TrkFitterUtils/FitterStatusCode.h" #include "TrkEventPrimitives/ParticleHypothesis.h" #include "TrkParameters/TrackParameters.h" -#include "DataModel/DataVector.h" +#include "AthContainers/DataVector.h" namespace Trk { class Track; //!> ATLAS standard track class -- GitLab From 56a6cdeb0478f753b4204bdd715de0e8c6893863 Mon Sep 17 00:00:00 2001 From: Imma Riu <imma.riu@cern.ch> Date: Wed, 18 Jul 2018 10:11:28 +0000 Subject: [PATCH 535/562] Merge branch 'cherry-pick-acd8595d9b [formerly 1f537af0cc]-21.1' into '21.1' Sweeping !12397 from 21.0 to 21.1. Update FTK AOD creation for data BS files See merge request atlas/athena!12805 (cherry picked from commit be306fbf596239646fe4b3cbb26742811b999cb6 [formerly ced6f13eadadba560a1eebea1d9bec5e50eae306]) ccf81e2e Merge branch 'ftk_aod_update' into '21.0' Former-commit-id: 4bc1700dab38a07b144d20a94009934d4dbd0776 --- Event/EventContainers/test/ID_ContainerTest.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 Event/EventContainers/test/ID_ContainerTest.h diff --git a/Event/EventContainers/test/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h old mode 100644 new mode 100755 -- GitLab From c494a75e081afb27adb49c5c9d69cb692e5ed843 Mon Sep 17 00:00:00 2001 From: Susumu Oda <Susumu.Oda@cern.ch> Date: Thu, 19 Jul 2018 07:44:13 +0200 Subject: [PATCH 536/562] Disable ROD simulated data check Former-commit-id: 8ddfe162051d7cd6c9883abb130e2d9f5f5aad21 --- .../SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx index c7c37e8cf89e..27237adf87c1 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx @@ -115,7 +115,7 @@ bool SCT_ByteStreamErrorsTool::isGood(const IdentifierHash& elementIdHash) const { const EventContext& ctx{Gaudi::Hive::currentContext()}; - if (isRODSimulatedData()) return false; + // if (isRODSimulatedData()) return false; bool result{true}; @@ -160,7 +160,7 @@ bool SCT_ByteStreamErrorsTool::isGood(const Identifier& elementId, InDetConditions::Hierarchy h) const { if (not canReportAbout(h)) return true; - if (isRODSimulatedData()) return false; + // if (isRODSimulatedData()) return false; if (h==InDetConditions::SCT_SIDE) { const IdentifierHash elementIdHash{m_sct_id->wafer_hash(elementId)}; -- GitLab From 9d987abd4ba41d251df951537b032bdf869483aa Mon Sep 17 00:00:00 2001 From: Tatyana Kharlamova <tatyana.kharlamova@cern.ch> Date: Thu, 19 Jul 2018 08:06:45 +0000 Subject: [PATCH 537/562] Master overlay fixes Former-commit-id: 744894c458b08d0773d746ce53ce0379362acbe8 --- .../share/CaloOverlay_jobOptions.py | 23 +- .../share/ConfiguredOverlay_jobOptions.py | 37 +- .../share/InnerDetectorOverlay_jobOptions.py | 97 ++-- .../share/LArMcSignal_jobOptions.py | 2 +- .../share/Level1Overlay_jobOptions.py | 6 +- .../share/MuonMcSignal_jobOptions.py | 14 +- .../share/MuonOverlay_jobOptions.py | 109 ++--- .../share/OverlayOutputItemList_jobOptions.py | 9 +- .../share/TruthOverlay_jobOptions.py | 7 +- .../share/skeleton.OverlayBS_tf.py | 4 +- .../share/skeleton.OverlayPool_tf.py | 16 +- .../LArROD/python/LArRawChannelGetter.py | 2 +- .../python/MuonByteStreamCnvTestConfig.py | 44 ++ .../python/MuonByteStreamCnvTestConfigDb.py | 8 +- .../MuonCnvExample/python/MuonCnvConfig.py | 47 +- .../python/MuonCnvExampleConfigDb.py | 2 + .../python/CSC_DigitizationConfig.py | 8 + .../python/CSC_DigitizationConfigDb.py | 1 + .../MuonOverlay/CscOverlay/CMakeLists.txt | 1 + .../CscOverlay/CscOverlay/CscOverlay.h | 12 +- .../CscOverlay/python/CscOverlayConfig.py | 18 + .../CscOverlay/python/CscOverlayConfigDb.py | 2 + .../CscOverlay/share/CscOverlay_jobOptions.py | 27 +- .../MuonOverlay/CscOverlay/src/CscOverlay.cxx | 449 ++++++++---------- 24 files changed, 460 insertions(+), 485 deletions(-) create mode 100644 MuonSpectrometer/MuonOverlay/CscOverlay/python/CscOverlayConfig.py create mode 100644 MuonSpectrometer/MuonOverlay/CscOverlay/python/CscOverlayConfigDb.py diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/CaloOverlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/CaloOverlay_jobOptions.py index e2f0a89ab8f1..3edb96feb9b9 100644 --- a/Event/EventOverlay/EventOverlayJobTransforms/share/CaloOverlay_jobOptions.py +++ b/Event/EventOverlay/EventOverlayJobTransforms/share/CaloOverlay_jobOptions.py @@ -1,4 +1,3 @@ - include.block ( "EventOverlayJobTransforms/CaloOverlay_jobOptions.py" ) from AthenaCommon.Resilience import treatException,protectedInclude @@ -16,13 +15,13 @@ if overlayFlags.doBkg==True: from OverlayCommonAlgs.OverlayCommonAlgsConf import DeepCopyObjects job += DeepCopyObjects("BkgRdo3") job.BkgRdo3.TileObjects = True - - + + if DetFlags.overlay.LAr_on() or DetFlags.overlay.Tile_on(): jobproperties.Digitization.doCaloNoise=False - if isRealData: + if overlayFlags.isDataOverlay(): include("LArConditionsCommon/LArIdMap_comm_jobOptions.py") include("LArConditionsCommon/LArConditionsCommon_comm_jobOptions.py") else: @@ -34,26 +33,25 @@ if DetFlags.overlay.LAr_on() or DetFlags.overlay.Tile_on(): if DetFlags.overlay.LAr_on(): - from AthenaCommon.GlobalFlags import GlobalFlags - # FIXME this is for doing Overlay with MC RDO + MC hits # real data RDO will require some changes in the setup for proper db acces #include( "LArDetDescr/LArDetDescr_joboptions.py" ) #include( "LArAthenaPool/LArAthenaPool_joboptions.py" ) # We also need the conditions svc for MC constants: - if readBS and isRealData: + if overlayFlags.isDataOverlay(): theApp.Dlls += [ "LArByteStream"] LArDigitKey = "FREE" ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += ["LArDigitContainer/"+LArDigitKey] ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += ["LArFebHeaderContainer/LArFebHeader"] ServiceMgr.ByteStreamAddressProviderSvc.TypeNames+=["LArDigitContainer/LArDigitContainer_MC"] - + from LArROD.LArRawChannelGetter import LArRawChannelGetter LArRawChannelGetter() - + from LArROD.LArDigits import DefaultLArDigitThinner LArDigitThinner = DefaultLArDigitThinner('LArDigitThinner') # automatically added to topSequence - if isRealData: + if overlayFlags.isDataOverlay(): + job.LArDigitThinner.InputContainerName = overlayFlags.dataStore()+"+FREE" job.LArDigitThinner.RawChannelContainerName = "LArRawChannels_FromDigits" #job.digitmaker1.LArPileUpTool.OutputLevel=DEBUG #MessageSvc.debugLimit = 100000 @@ -65,14 +63,14 @@ if DetFlags.overlay.LAr_on(): if DetFlags.overlay.Tile_on(): include( "TileIdCnv/TileIdCnv_jobOptions.py" ) - include( "TileConditions/TileConditions_jobOptions.py" ) + include( "TileConditions/TileConditions_jobOptions.py" ) include( "TileSimAlgs/TileDigitization_jobOptions.py" ) include( "TileL2Algs/TileL2Algs_jobOptions.py" ) job.TileHitVecToCnt.DigitizationTool.RndmEvtOverlay = True theTileDigitsMaker.RndmEvtOverlay = True - if readBS and isRealData: + if overlayFlags.isDataOverlay(): theApp.Dlls += [ "TileByteStream"] ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "TileBeamElemContainer/TileBeamElemCnt"] ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "TileRawChannelContainer/TileRawChannelCnt"] @@ -81,4 +79,3 @@ if DetFlags.overlay.Tile_on(): ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "TileLaserObject/TileLaserObj"] #-------------------- - diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/ConfiguredOverlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/ConfiguredOverlay_jobOptions.py index 9f87e0c567fb..4a2ea488b332 100644 --- a/Event/EventOverlay/EventOverlayJobTransforms/share/ConfiguredOverlay_jobOptions.py +++ b/Event/EventOverlay/EventOverlayJobTransforms/share/ConfiguredOverlay_jobOptions.py @@ -2,7 +2,7 @@ include.block ( "EventOverlayJobTransforms/ConfiguredOverlay_jobOptions.py" ) #-------------------------------------------------------------- # Load POOL support -# (modified by Piyali.Banerjee to include skip events) +# (modified by Piyali.Banerjee to include skip events) #-------------------------------------------------------------- from AthenaCommon.AlgSequence import AlgSequence @@ -16,16 +16,14 @@ if not isRealData: #======================================================================= from AthenaCommon.AppMgr import ServiceMgr from PileUpComps.PileUpCompsConf import PileUpEventLoopMgr - from PileUpComps.PileUpCompsConf import BkgStreamsCache import AthenaPoolCnvSvc.WriteAthenaPool from EventSelectorAthenaPool.EventSelectorAthenaPoolConf import EventSelectorAthenaPool from StoreGate.StoreGateConf import StoreGateSvc - -from Digitization.DigitizationFlags import jobproperties -digitization = jobproperties.Digitization +from Digitization.DigitizationFlags import digitizationFlags +from OverlayCommonAlgs.OverlayFlags import overlayFlags pileUpEventLoopMgr = PileUpEventLoopMgr() pileUpEventLoopMgr.OutStreamType = "AthenaOutputStream" @@ -35,7 +33,7 @@ print "================ DetFlags ================ " DetFlags.Print() #if globalflags.InputFormat()=='bytestream': -if readBS: +if overlayFlags.isDataOverlay(): #if isRealData: # include ("RecExCommission/RecExCommission_BSRead_config_hack.py") #else: @@ -44,7 +42,7 @@ if readBS: from ByteStreamCnvSvc import ReadByteStream include("RecExCommon/BSRead_config.py") ServiceMgr.ByteStreamInputSvc.FullFileName = DataInputCollections - ServiceMgr.ByteStreamInputSvc.EventStore= "StoreGateSvc/OriginalEvent_SG" + ServiceMgr.ByteStreamInputSvc.EventStore= "StoreGateSvc/"+overlayFlags.dataStore() from AthenaKernel import StoreID ServiceMgr.ByteStreamAddressProviderSvc.StoreID=StoreID.UNKNOWN from EventSelectorAthenaPool.EventSelectorAthenaPoolConf import AthenaPoolAddressProviderSvc @@ -59,7 +57,7 @@ pileUpEventLoopMgr.OrigSelector="EventSelector" pileUpEventLoopMgr.firstXing=0 pileUpEventLoopMgr.lastXing=0 pileUpEventLoopMgr.IsEventOverlayJob=True -pileUpEventLoopMgr.IsEventOverlayJobMC=not isRealData +pileUpEventLoopMgr.IsEventOverlayJobMC=not overlayFlags.isDataOverlay() ServiceMgr.EventSelector.SkipEvents = athenaCommonFlags.SkipEvents() # Set up MC input @@ -73,6 +71,11 @@ pileUpEventLoopMgr.SignalSelector="mcSignal_EventSelector" ServiceMgr += pileUpEventLoopMgr +# Explicitly create the two extra StoreGateSvc instances used by +# Overlay jobs. This prevents warnings later in the configuration. +ServiceMgr += StoreGateSvc(overlayFlags.dataStore()) #, Dump=True, OutputLevel=DEBUG) +ServiceMgr += StoreGateSvc(overlayFlags.evtStore()) #, Dump=True, OutputLevel=DEBUG) + if not hasattr(ServiceMgr, 'PileUpMergeSvc'): from PileUpTools.PileUpToolsConf import PileUpMergeSvc ServiceMgr += PileUpMergeSvc() @@ -85,21 +88,21 @@ ServiceMgr.PileUpMergeSvc.ReturnTimedData=False #================================================================ #synchronization of Beam flags and Digitization flags - KAA -#if not (digitization.doMinimumBias.get_Value() or digitization.doCavern.get_Value() or -# digitization.doBeamGas.get_Value() or digitization.doBeamHalo.get_Value()) : +#if not (digitizationFlags.doMinimumBias.get_Value() or digitizationFlags.doCavern.get_Value() or +# digitizationFlags.doBeamGas.get_Value() or digitizationFlags.doBeamHalo.get_Value()) : DetFlags.pileup.all_setOff() -digitization.numberOfCollisions=0.0 +digitizationFlags.numberOfCollisions=0.0 #----------------------------------------------------------- # Check Beam and Digitization jobproperties are synchronised #----------------------------------------------------------- from AthenaCommon.BeamFlags import jobproperties -if jobproperties.Beam.numberOfCollisions.get_Value() != digitization.numberOfCollisions.get_Value() : - jobproperties.Beam.numberOfCollisions = digitization.numberOfCollisions.get_Value() - jobproperties.Beam.override = True ## just incase - default is True +if jobproperties.Beam.numberOfCollisions.get_Value() != digitizationFlags.numberOfCollisions.get_Value() : + jobproperties.Beam.numberOfCollisions = digitizationFlags.numberOfCollisions.get_Value() + jobproperties.Beam.override = True ## just incase - default is True -if jobproperties.Beam.bunchSpacing.get_Value() != digitization.bunchSpacing.get_Value() : - jobproperties.Beam.bunchSpacing = digitization.bunchSpacing.get_Value() - jobproperties.Beam.override = True ## just incase - default is True +if jobproperties.Beam.bunchSpacing.get_Value() != digitizationFlags.bunchSpacing.get_Value() : + jobproperties.Beam.bunchSpacing = digitizationFlags.bunchSpacing.get_Value() + jobproperties.Beam.override = True ## just incase - default is True #================================================================ diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py index 6753682414d2..9347cc8c2608 100644 --- a/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py +++ b/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py @@ -1,6 +1,6 @@ include.block ( "EventOverlayJobTransforms/InnerDetectorOverlay_jobOptions.py" ) -from Digitization.DigitizationFlags import jobproperties +from Digitization.DigitizationFlags import digitizationFlags from AthenaCommon.DetFlags import DetFlags from AthenaCommon import CfgGetter from OverlayCommonAlgs.OverlayFlags import overlayFlags @@ -10,24 +10,22 @@ from AthenaCommon.Resilience import treatException,protectedInclude if DetFlags.overlay.pixel_on() or DetFlags.overlay.SCT_on() or DetFlags.overlay.TRT_on(): if overlayFlags.doBkg==True: - from OverlayCommonAlgs.OverlayCommonAlgsConf import DeepCopyObjects - job += DeepCopyObjects("BkgRdo1") - job.BkgRdo1.InDetObjects = True + from OverlayCommonAlgs.OverlayCommonAlgsConf import DeepCopyObjects + job += DeepCopyObjects("BkgRdo1") + job.BkgRdo1.InDetObjects = True - include( "InDetEventAthenaPool/InDetEventAthenaPool_joboptions.py" ) # FIXME: is needed? + digitizationFlags.doInDetNoise=False # FIXME THIS SHOULD BE SET EARLIER IN THE CONFIGURATION - jobproperties.Digitization.doInDetNoise=False - - #if readBS and isRealData: + #if overlayFlags.isDataOverlay(): # include( "InDetCosmicRecExample/InDetCosmicFlags_jobOptions.py" ) if DetFlags.overlay.pixel_on(): job += CfgGetter.getAlgorithm("PixelOverlayDigitization") - if readBS and isRealData: - job.InDetPixelRawDataProvider.RDOKey = "OriginalEvent_SG+PixelRDOs" - #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "PixelRDO_Container/PixelRDOs" ] - #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "Trk::PixelClusterContainer/PixelOnlineClusters" ] + if overlayFlags.isDataOverlay(): + job.InDetPixelRawDataProvider.RDOKey = overlayFlags.dataStore()+"+PixelRDOs" + #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "PixelRDO_Container/PixelRDOs" ] + #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "Trk::PixelClusterContainer/PixelOnlineClusters" ] else: if not conddb.folderRequested('PIXEL/PixReco'): conddb.addFolder('PIXEL_OFL','/PIXEL/PixReco') @@ -35,60 +33,55 @@ if DetFlags.overlay.pixel_on() or DetFlags.overlay.SCT_on() or DetFlags.overlay. if DetFlags.overlay.SCT_on(): # Setup the ReadCalibChip folders and Svc - if isRealData: - #conddb.blockFolder("/SCT/DAQ/Calibration/ChipGain") - #conddb.blockFolder("/SCT/DAQ/Calibration/ChipNoise") - #conddb.addFolder("SCT_OFL","/SCT/DAQ/Calibration/ChipGain",forceMC=True) - #conddb.addFolder("SCT_OFL","/SCT/DAQ/Calibration/ChipNoise",forceMC=True) - conddb.addFolder("SCT_OFL","/SCT/DAQ/Calibration/ChipGain<tag>SctDaqCalibrationChipGain-Apr10-01</tag>",forceMC=True, className="CondAttrListCollection") - conddb.addFolder("SCT_OFL","/SCT/DAQ/Calibration/ChipNoise<tag>SctDaqCalibrationChipNoise-Apr10-01</tag>",forceMC=True, className="CondAttrListCollection") - - #if not conddb.folderRequested('/SCT/DAQ/Calibration/ChipGain'): - # conddb.addFolderSplitOnline("SCT","/SCT/DAQ/Calibration/ChipGain","/SCT/DAQ/Calibration/ChipGain",forceMC=True) - #if not conddb.folderRequested('/SCT/DAQ/Calibration/ChipNoise'): - # conddb.addFolderSplitOnline("SCT","/SCT/DAQ/Calibration/ChipNoise","/SCT/DAQ/Calibration/ChipNoise",forceMC=True) + if overlayFlags.isDataOverlay(): + #conddb.blockFolder("/SCT/DAQ/Calibration/ChipGain") + #conddb.blockFolder("/SCT/DAQ/Calibration/ChipNoise") + #conddb.addFolder("SCT_OFL","/SCT/DAQ/Calibration/ChipGain",forceMC=True) + #conddb.addFolder("SCT_OFL","/SCT/DAQ/Calibration/ChipNoise",forceMC=True) + conddb.addFolder("SCT_OFL","/SCT/DAQ/Calibration/ChipGain<tag>SctDaqCalibrationChipGain-Apr10-01</tag>",forceMC=True, className="CondAttrListCollection") + conddb.addFolder("SCT_OFL","/SCT/DAQ/Calibration/ChipNoise<tag>SctDaqCalibrationChipNoise-Apr10-01</tag>",forceMC=True, className="CondAttrListCollection") + + #if not conddb.folderRequested('/SCT/DAQ/Calibration/ChipGain'): + # conddb.addFolderSplitOnline("SCT","/SCT/DAQ/Calibration/ChipGain","/SCT/DAQ/Calibration/ChipGain",forceMC=True) + #if not conddb.folderRequested('/SCT/DAQ/Calibration/ChipNoise'): + # conddb.addFolderSplitOnline("SCT","/SCT/DAQ/Calibration/ChipNoise","/SCT/DAQ/Calibration/ChipNoise",forceMC=True) job += CfgGetter.getAlgorithm("SCT_OverlayDigitization") - CfgGetter.getPublicTool("SCT_DigitizationTool").InputObjectName="SCT_Hits" - if readBS and isRealData: - #job.InDetSCTRawDataProvider.EvtStore = "OriginalEvent_SG" - job.InDetSCTRawDataProvider.RDOKey = "OriginalEvent_SG+SCT_RDOs" - job.InDetSCTRawDataProvider.LVL1IDKey = "OriginalEvent_SG+SCT_LVL1ID" - job.InDetSCTRawDataProvider.BCIDKey = "OriginalEvent_SG+SCT_BCID" - #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "SCT_RDO_Container/SCT_RDOs" ] - #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "Trk::SCT_ClusterContainer/SCT_OnlineClusters" ] + if overlayFlags.isDataOverlay(): + job.InDetSCTRawDataProvider.RDOKey = overlayFlags.dataStore()+"+SCT_RDOs" + job.InDetSCTRawDataProvider.LVL1IDKey = overlayFlags.dataStore()+"+SCT_LVL1ID" + job.InDetSCTRawDataProvider.BCIDKey = overlayFlags.dataStore()+"+SCT_BCID" + #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "SCT_RDO_Container/SCT_RDOs" ] + #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "Trk::SCT_ClusterContainer/SCT_OnlineClusters" ] if DetFlags.overlay.TRT_on(): - if isRealData: - conddb.blockFolder("/TRT/Cond/DigVers") - #conddb.addFolderWithTag("TRT_OFL","/TRT/Cond/DigVers","TRTCondDigVers-Collisions-01",force=True,forceMC=True) - conddb.addFolder("TRT_OFL","/TRT/Cond/DigVers",forceMC=True) + if overlayFlags.isDataOverlay(): + conddb.blockFolder("/TRT/Cond/DigVers") + #conddb.addFolderWithTag("TRT_OFL","/TRT/Cond/DigVers","TRTCondDigVers-Collisions-01",force=True,forceMC=True) + conddb.addFolder("TRT_OFL","/TRT/Cond/DigVers",forceMC=True) from TRT_ElectronPidTools.TRT_ElectronPidToolsConf import InDet__TRT_LocalOccupancy - TRT_LocalOccupancy = InDet__TRT_LocalOccupancy( name ="TRT_LocalOccupancy", - isTrigger = False, - ) + TRT_LocalOccupancy = InDet__TRT_LocalOccupancy(name="TRT_LocalOccupancy", isTrigger= False ) ToolSvc += TRT_LocalOccupancy job += CfgGetter.getAlgorithm("TRT_OverlayDigitization") - + from InDetRecExample.InDetJobProperties import InDetFlags include("InDetRecExample/InDetRecConditionsAccess.py") - if readBS and isRealData: - job.InDetTRTRawDataProvider.EvtStore = "OriginalEvent_SG" - job.InDetTRTRawDataProvider.RDOKey = "OriginalEvent_SG+TRT_RDOs" - #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "TRT_RDO_Container/TRT_RDOs" ] - - #from IOVDbSvc.CondDB import conddb -# conddb.addFolder("TRT","/TRT/Calib/T0","<tag>TrtCalibt0-UPD2-FDR2-01</tag>") -# conddb.addFolder("TRT","/TRT/Calib/RT","<tag>TrtCalibRt-UPD2-FDR2-01</tag>") - # conddb.addFolder("TRT","/TRT/Calib/T0","<tag>TrtCalibRt-HLT-UPD1-01</tag>") - # conddb.addFolder("TRT","/TRT/Calib/RT","<tag>TrtCalibT0-HLT-UPD1-01</tag>") - conddb.addFolder("TRT_ONL","/TRT/Onl/ROD/Compress") + if overlayFlags.isDataOverlay(): + job.InDetTRTRawDataProvider.RDOKey = overlayFlags.dataStore()+"+TRT_RDOs" + #ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "TRT_RDO_Container/TRT_RDOs" ] + + #from IOVDbSvc.CondDB import conddb + #conddb.addFolder("TRT","/TRT/Calib/T0","<tag>TrtCalibt0-UPD2-FDR2-01</tag>") + #conddb.addFolder("TRT","/TRT/Calib/RT","<tag>TrtCalibRt-UPD2-FDR2-01</tag>") + #conddb.addFolder("TRT","/TRT/Calib/T0","<tag>TrtCalibRt-HLT-UPD1-01</tag>") + #conddb.addFolder("TRT","/TRT/Calib/RT","<tag>TrtCalibT0-HLT-UPD1-01</tag>") + conddb.addFolder("TRT_ONL","/TRT/Onl/ROD/Compress") if overlayFlags.doSignal==True: - include ("EventOverlayJobTransforms/InDetMcSignal_jobOptions.py") + include ("EventOverlayJobTransforms/InDetMcSignal_jobOptions.py") job += CfgGetter.getAlgorithm("InDetOverlay") job += CfgGetter.getAlgorithm("InDetSDOOverlay") diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/LArMcSignal_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/LArMcSignal_jobOptions.py index 405537047fab..71bf544299af 100644 --- a/Event/EventOverlay/EventOverlayJobTransforms/share/LArMcSignal_jobOptions.py +++ b/Event/EventOverlay/EventOverlayJobTransforms/share/LArMcSignal_jobOptions.py @@ -38,7 +38,7 @@ if DetFlags.overlay.LAr_on(): theLArPileUpTool.NoiseOnOff = False theLArPileUpTool.RecordMap = False - if isRealData: + if overlayFlags.isDataOverlay(): theLArPileUpTool.PedestalKey = job.digitmaker1.LArPileUpTool.PedestalKey theLArPileUpTool.ADC2MeVTool = job.digitmaker1.LArPileUpTool.ADC2MeVTool diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/Level1Overlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/Level1Overlay_jobOptions.py index f7f488bafb7a..616a525fa7be 100644 --- a/Event/EventOverlay/EventOverlayJobTransforms/share/Level1Overlay_jobOptions.py +++ b/Event/EventOverlay/EventOverlayJobTransforms/share/Level1Overlay_jobOptions.py @@ -2,7 +2,7 @@ include.block ( "EventOverlayJobTransforms/Level1Overlay_jobOptions.py" ) from AthenaCommon.DetFlags import DetFlags -from Digitization.DigitizationFlags import jobproperties +from Digitization.DigitizationFlags import digitizationFlags from OverlayCommonAlgs.OverlayFlags import overlayFlags if DetFlags.overlay.LVL1_on(): @@ -12,7 +12,7 @@ if DetFlags.overlay.LVL1_on(): job += DeepCopyObjects("BkgRdo5") job.BkgRdo5.Level1Objects = True - if readBS and isRealData: + if overlayFlags.isDataOverlay(): include ("TrigT1CaloByteStream/ReadLVL1CaloBS_jobOptions.py") #include ("MuonCommRecExample/ReadMuCTPI_jobOptions.py") @@ -29,7 +29,7 @@ if DetFlags.overlay.LVL1_on(): if DetFlags.simulateLVL1.LAr_on(): include( "LArL1Sim/LArL1Sim_G4_jobOptions.py" ) # Noise - if not jobproperties.Digitization.doCaloNoise.get_Value(): + if not digitizationFlags.doCaloNoise.get_Value(): job.LArTTL1Maker.NoiseOnOff= False #(default:True) # PileUp job.LArTTL1Maker.PileUp = True diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/MuonMcSignal_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/MuonMcSignal_jobOptions.py index dbef2b7478ff..014555980e1e 100644 --- a/Event/EventOverlay/EventOverlayJobTransforms/share/MuonMcSignal_jobOptions.py +++ b/Event/EventOverlay/EventOverlayJobTransforms/share/MuonMcSignal_jobOptions.py @@ -14,25 +14,19 @@ theApp.Dlls += [ "MuonByteStreamCnvTest" ] theApp.Dlls += [ "TrigT1RPChardware" ] theApp.Dlls += [ "TrigT1RPCsteering" ] theApp.Dlls += [ "TrigT1RPCmonitoring" ] - +from AthenaCommon.CfgGetter import getAlgorithm if DetFlags.overlay.MDT_on(): - from MuonByteStreamCnvTest.MuonByteStreamCnvTestConf import MdtDigitToMdtRDO - job += MdtDigitToMdtRDO( "SigMdtDigitToMdtRDO" ) - job.SigMdtDigitToMdtRDO.EvtStore = job.MdtOverlay.MCStore + job += getAlgorithm( "SigMdtDigitToMdtRDO" ) #ACH if readBS==False: #ACH job += MdtDigitToMdtRDO( "BkgMdtDigitToMdtRDO" ) #ACH job.BkgMdtDigitToMdtRDO.Store = job.MdtOverlay.TempBkgStore if DetFlags.overlay.RPC_on(): - from MuonByteStreamCnvTest.MuonByteStreamCnvTestConf import RpcDigitToRpcRDO - job += RpcDigitToRpcRDO( "SigRpcDigitToRpcRDO" ) - job.SigRpcDigitToRpcRDO.EvtStore = job.RpcOverlay.MCStore + job += getAlgorithm( "SigRpcDigitToRpcRDO" ) #ACH if readBS==False: #ACH job += RpcDigitToRpcRDO( "BkgRpcDigitToRpcRDO" ) #ACH job.BkgRpcDigitToRpcRDO.Store = job.RpcOverlay.TempBkgStore if DetFlags.overlay.TGC_on(): - from MuonByteStreamCnvTest.MuonByteStreamCnvTestConf import TgcDigitToTgcRDO - job += TgcDigitToTgcRDO( "SigTgcDigitToTgcRDO" ) - job.SigTgcDigitToTgcRDO.EvtStore = job.TgcOverlay.MCStore + job += getAlgorithm( "SigTgcDigitToTgcRDO" ) #ACH if readBS==False: #ACH job += TgcDigitToTgcRDO( "BkgTgcDigitToTgcRDO" ) #ACH job.BkgTgcDigitToTgcRDO.Store = job.TgcOverlay.TempBkgStore diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/MuonOverlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/MuonOverlay_jobOptions.py index 88b90882734e..9d999f7abf74 100644 --- a/Event/EventOverlay/EventOverlayJobTransforms/share/MuonOverlay_jobOptions.py +++ b/Event/EventOverlay/EventOverlayJobTransforms/share/MuonOverlay_jobOptions.py @@ -6,43 +6,46 @@ from Digitization.DigitizationFlags import digitizationFlags from AthenaCommon.DetFlags import DetFlags from OverlayCommonAlgs.OverlayFlags import overlayFlags from AthenaCommon import CfgGetter +from AthenaCommon.CfgGetter import getAlgorithm from RecExConfig.RecFlags import rec as recFlags if DetFlags.overlay.MDT_on() or DetFlags.overlay.CSC_on() or DetFlags.overlay.RPC_on() or DetFlags.overlay.TGC_on(): - + include( "MuonEventAthenaPool/MuonEventAthenaPool_joboptions.py" ) - + import MuonRecExample.MuonReadCalib - if readBS and isRealData: - theApp.Dlls += [ "MuonByteStream"] - if DetFlags.overlay.CSC_on(): - from MuonRecExample.MuonRecFlags import muonRecFlags - muonRecFlags.doCSCs.set_Value_and_Lock = True + if overlayFlags.isDataOverlay(): + theApp.Dlls += [ "MuonByteStream"] + if DetFlags.overlay.CSC_on(): + from MuonRecExample.MuonRecFlags import muonRecFlags + muonRecFlags.doCSCs.set_Value_and_Lock = True #FIXME should not be setting jobproperties at this point in the configuration. - from MuonByteStream.MuonByteStreamFlags import muonByteStreamFlags - muonByteStreamFlags.TgcDataType = "atlas"#FIXME should not be setting jobproperties at this point in the configuration. - muonByteStreamFlags.RpcDataType = "atlas"#FIXME should not be setting jobproperties at this point in the configuration. - muonByteStreamFlags.MdtDataType = "atlas"#FIXME should not be setting jobproperties at this point in the configuration. + from MuonByteStream.MuonByteStreamFlags import muonByteStreamFlags + muonByteStreamFlags.TgcDataType = "atlas"#FIXME should not be setting jobproperties at this point in the configuration. + muonByteStreamFlags.RpcDataType = "atlas"#FIXME should not be setting jobproperties at this point in the configuration. + muonByteStreamFlags.MdtDataType = "atlas"#FIXME should not be setting jobproperties at this point in the configuration. if overlayFlags.doBkg==True: - from OverlayCommonAlgs.OverlayCommonAlgsConf import DeepCopyObjects - job += DeepCopyObjects("BkgRdo4") - job.BkgRdo4.MuonObjects = True - + from OverlayCommonAlgs.OverlayCommonAlgsConf import DeepCopyObjects + job += DeepCopyObjects("BkgRdo4") + job.BkgRdo4.MuonObjects = True + import MuonCnvExample.MuonCablingConfig digitizationFlags.doMuonNoise=False #FIXME should not be setting jobproperties at this point in the configuration. - if readBS: - include("MuonCnvExample/MuonReadBS_jobOptions.py") + if overlayFlags.isDataOverlay(): + include("MuonCnvExample/MuonReadBS_jobOptions.py") if DetFlags.overlay.CSC_on(): - if readBS: - ToolSvc.CscRawDataProviderTool.RdoLocation = "OriginalEvent_SG+CSCRDO" - include ( "CscOverlay/CscOverlay_jobOptions.py" ) - job.CscOverlay.IsByteStream = readBS - job.CscOverlay.DataStore = "OriginalEvent_SG" + if overlayFlags.isDataOverlay(): + ToolSvc.CscRawDataProviderTool.RdoLocation = overlayFlags.dataStore()+"+CSCRDO" + job += getAlgorithm("CscOverlay") + + #job.CscOverlay.OutputLevel=VERBOSE + #svcMgr.MessageSvc.defaultLimit=100000 + #print job.CscOverlay #print "ACH123: Setting DEBUG v99" #job.CscOverlay.MakeRDOTool.OutputLevel=DEBUG @@ -52,52 +55,36 @@ if DetFlags.overlay.MDT_on() or DetFlags.overlay.CSC_on() or DetFlags.overlay.RP #print "ACH123: NumSamples = 2 for MakeRDOTool" #job.CscOverlay.MakeRDOTool.NumSamples=2 - + if DetFlags.overlay.MDT_on(): - # include ( "MdtOverlay/MdtOverlay_jobOptions.py" ) job += CfgGetter.getAlgorithm("MdtOverlay") - from MuonByteStreamCnvTest.MuonByteStreamCnvTestConf import MdtDigitToMdtRDO - job += MdtDigitToMdtRDO() - job.MdtDigitToMdtRDO.InputObjectName = overlayFlags.dataStore()+"+MDT_DIGITS" - job.MdtDigitToMdtRDO.OutputObjectName = overlayFlags.dataStore()+"+MDTCSM" - - - if readBS: - ToolSvc.MdtRawDataProviderTool.RdoLocation = "OriginalEvent_SG+MDTCSM" - job.MdtOverlay.ConvertRDOToDigitTool.RetrievePrivateCopy = False - + job += CfgGetter.getAlgorithm("OverlayMdtDigitToMdtRDO") + if overlayFlags.isDataOverlay(): + ToolSvc.MdtRawDataProviderTool.RdoLocation = overlayFlags.dataStore()+"+MDTCSM" + job.MdtOverlay.ConvertRDOToDigitTool.RetrievePrivateCopy = False #job.MdtOverlay.OutputLevel = VERBOSE - #job.MdtDigitToMdtRDO.OutputLevel = VERBOSE + #job.OverlayMdtDigitToMdtRDO.OutputLevel = VERBOSE if DetFlags.overlay.RPC_on(): job += CfgGetter.getAlgorithm("RpcOverlay") - from MuonByteStreamCnvTest.MuonByteStreamCnvTestConf import RpcDigitToRpcRDO - job += RpcDigitToRpcRDO() - job.RpcDigitToRpcRDO.EvtStore = job.RpcOverlay.OutputStore - #include ( "RpcOverlay/RpcOverlay_jobOptions.py" ) - #job.RpcOverlay.DataStore = "BkgEvent_2_SG" - if readBS: - ToolSvc.RpcRawDataProviderTool.RdoLocation = "OriginalEvent_SG+RPCPAD" - job.RpcOverlay.ConvertRDOToDigitTool.RetrievePrivateCopy = False + job += CfgGetter.getAlgorithm("OverlayRpcDigitToRpcRDO") + if overlayFlags.isDataOverlay(): + ToolSvc.RpcRawDataProviderTool.RdoLocation = overlayFlags.dataStore()+"+RPCPAD" + job.RpcOverlay.ConvertRDOToDigitTool.RetrievePrivateCopy = False #job.RpcOverlay.OutputLevel = VERBOSE - #job.RpcDigitToRpcRDO.OutputLevel = VERBOSE + #job.OverlayRpcDigitToRpcRDO.OutputLevel = VERBOSE if DetFlags.overlay.TGC_on(): - # include ( "TgcOverlay/TgcOverlay_jobOptions.py" ) job += CfgGetter.getAlgorithm("TgcOverlay") - from MuonByteStreamCnvTest.MuonByteStreamCnvTestConf import TgcDigitToTgcRDO - job += TgcDigitToTgcRDO() - job.TgcDigitToTgcRDO.EvtStore = job.TgcOverlay.OutputStore - #job.TgcOverlay.DataStore = "BkgEvent_2_SG" - if readBS: - ToolSvc.TgcRawDataProviderTool.RdoLocation = "OriginalEvent_SG+TGCRDO" - - job.TgcOverlay.ConvertRDOToDigitTool.RetrievePrivateCopy = False - - # storegate dump - # StoreGateSvc = Service( "StoreGateSvc" ) - # StoreGateSvc.Dump = True #true will dump data store contents - - # StoreGateSvc.OutputLevel=DEBUG - - + job += CfgGetter.getAlgorithm("OverlayTgcDigitToTgcRDO") + if overlayFlags.isDataOverlay(): + ToolSvc.TgcRawDataProviderTool.RdoLocation = overlayFlags.dataStore()+"+TGCRDO" + job.TgcOverlay.ConvertRDOToDigitTool.RetrievePrivateCopy = False + #job.TgcOverlay.OutputLevel = VERBOSE + #job.OverlayTgcDigitToRpcRDO.OutputLevel = VERBOSE + + # storegate dump + # StoreGateSvc = Service( "StoreGateSvc" ) + # StoreGateSvc.Dump = True #true will dump data store contents + + # StoreGateSvc.OutputLevel=DEBUG diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/OverlayOutputItemList_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/OverlayOutputItemList_jobOptions.py index c40590b7924e..60d2003142c1 100644 --- a/Event/EventOverlay/EventOverlayJobTransforms/share/OverlayOutputItemList_jobOptions.py +++ b/Event/EventOverlay/EventOverlayJobTransforms/share/OverlayOutputItemList_jobOptions.py @@ -3,6 +3,7 @@ include.block ( "EventOverlayJobTransforms/OverlayOutputItemList_jobOptions.py" from AthenaCommon.AppMgr import ServiceMgr from AthenaCommon.DetFlags import DetFlags from Digitization.DigitizationFlags import digitizationFlags +from OverlayCommonAlgs.OverlayFlags import overlayFlags # The output - overlay from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream @@ -15,7 +16,7 @@ outStream.ItemList += [ "EventInfo#*", "PileUpEventInfo#*" ] outStream.ItemList += [ "LumiBlockCollection#*" ] # timings -if not isRealData: +if not overlayFlags.isDataOverlay(): outStream.ItemList += ["RecoTimingObj#EVNTtoHITS_timings"] outStream.ItemList += ["RecoTimingObj#HITStoRDO_timings"] @@ -42,7 +43,7 @@ if DetFlags.overlay.Truth_on(): if DetFlags.overlay.TRT_on(): outStream.ItemList += [ "InDetSimDataCollection#TRT_SDO_Map" ] if DetFlags.overlay.BCM_on(): - outStream.ItemList += [ "InDetSimDataCollection#BCM_SDO_Map" ] + outStream.ItemList += [ "InDetSimDataCollection#BCM_SDO_Map" ] if DetFlags.overlay.pixel_on(): outStream.ItemList += ["PixelRDO_Container#*"] @@ -63,7 +64,7 @@ if DetFlags.overlay.LAr_on(): outStream.ItemList+=["LArFebErrorSummary#*"] if DetFlags.overlay.Tile_on(): outStream.ItemList += [ "TileRawChannelContainer#*" ] - if isRealData or 'AddCaloDigi' in digitizationFlags.experimentalDigi(): + if overlayFlags.isDataOverlay() or 'AddCaloDigi' in digitizationFlags.experimentalDigi(): outStream.ItemList += [ "TileDigitsContainer#*" ] else: outStream.ItemList += [ "TileDigitsContainer#TileDigitsFlt" ] @@ -110,5 +111,3 @@ if DetFlags.overlay.LVL1_on(): "DataVector<LVL1::JEMRoI>#*", "DataVector<LVL1::JEMEtSums>#*", "LVL1::CMMRoI#*"] - - diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/TruthOverlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/TruthOverlay_jobOptions.py index 7aaa8f8515b8..39f97279cc66 100644 --- a/Event/EventOverlay/EventOverlayJobTransforms/share/TruthOverlay_jobOptions.py +++ b/Event/EventOverlay/EventOverlayJobTransforms/share/TruthOverlay_jobOptions.py @@ -1,4 +1,3 @@ - include.block ( "EventOverlayJobTransforms/TruthOverlay_jobOptions.py" ) # McEventCollection copying. Alghough logically it belongs to @@ -7,7 +6,7 @@ include.block ( "EventOverlayJobTransforms/TruthOverlay_jobOptions.py" ) from OverlayCommonAlgs.OverlayFlags import overlayFlags if overlayFlags.doBkg==True: - from OverlayCommonAlgs.OverlayCommonAlgsConf import DeepCopyObjects + from OverlayCommonAlgs.OverlayCommonAlgsConf import DeepCopyObjects job += DeepCopyObjects("BkgRdo") job.BkgRdo.EvtInfoObjects = True job += DeepCopyObjects("BkgRdo0") @@ -15,9 +14,9 @@ if overlayFlags.doBkg==True: from OverlayCommonAlgs.OverlayCommonAlgsConf import CopyMcEventCollection job += CopyMcEventCollection() -if readBS and isRealData: +if overlayFlags.isDataOverlay(): job.CopyMcEventCollection.RealData = True -if not isRealData: +if not overlayFlags.isDataOverlay(): from OverlayCommonAlgs.OverlayCommonAlgsConf import CopyTruthInfo job += CopyTruthInfo() diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.OverlayBS_tf.py b/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.OverlayBS_tf.py index 29e7b8540221..a638742078f2 100644 --- a/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.OverlayBS_tf.py +++ b/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.OverlayBS_tf.py @@ -30,7 +30,7 @@ larCondFlags.OFCShapeFolder.set_Value_and_Lock("") globalflags.isOverlay.set_Value_and_Lock(True) overlayFlags.isDataOverlay.set_Value_and_Lock(True) -isRealData = True +isRealData = overlayFlags.isDataOverlay() from AthenaCommon.BeamFlags import jobproperties jobproperties.Beam.beamType.set_Value_and_Lock("collisions") @@ -81,7 +81,7 @@ if hasattr(runArgs,"samplingFractionDbTag"): digitizationFlags.physicsList=runAr if hasattr(runArgs,"digiRndmSvc"): digitizationFlags.rndmSvc=runArgs.digiRndmSvc #if hasattr(runArgs, "AddCaloDigi"): digitizationFlags.experimentalDigi+=["AddCaloDigi"] -readBS = True +readBS = overlayFlags.isDataOverlay() overlayFlags.doBkg=False #ACH #GlobalFlags.InputFormat.set_bytestream() diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.OverlayPool_tf.py b/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.OverlayPool_tf.py index 8816ac2bd4ac..c859ae6ac906 100644 --- a/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.OverlayPool_tf.py +++ b/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.OverlayPool_tf.py @@ -39,10 +39,10 @@ if hasattr(runArgs,"inputHITSFile"): else: raise RuntimeError ("No input HITS file defined") -if hasattr(runArgs,"outputRDOFile"): +if hasattr(runArgs,"outputRDOFile"): athenaCommonFlags.PoolRDOOutput.set_Value_and_Lock( runArgs.outputRDOFile ) OverlayCollection = runArgs.outputRDOFile - + if not hasattr(runArgs, 'outputRDO_SGNLFile') or runArgs.outputRDO_SGNLFile=="NONE": overlayFlags.doSignal=False SignalCollection = "NONE" @@ -60,8 +60,8 @@ if hasattr(runArgs,"samplingFractionDbTag"): digitizationFlags.physicsList=runAr if hasattr(runArgs,"digiRndmSvc"): digitizationFlags.rndmSvc=runArgs.digiRndmSvc if hasattr(runArgs, "AddCaloDigi"): digitizationFlags.experimentalDigi+=["AddCaloDigi"] -readBS = False -isRealData = False +readBS = overlayFlags.isDataOverlay() +isRealData = overlayFlags.isDataOverlay() from RecExConfig.RecFlags import rec rec.projectName = 'IS_SIMULATION' @@ -74,9 +74,9 @@ import MagFieldServices.SetupField from IOVDbSvc.CondDB import conddb if hasattr(runArgs, 'conditionsTag') and runArgs.conditionsTag!='NONE' and runArgs.conditionsTag!='': - globalflags.ConditionsTag=runArgs.conditionsTag - if len(globalflags.ConditionsTag())!=0: - conddb.setGlobalTag(globalflags.ConditionsTag()) + globalflags.ConditionsTag=runArgs.conditionsTag + if len(globalflags.ConditionsTag())!=0: + conddb.setGlobalTag(globalflags.ConditionsTag()) # LVL1 Trigger Menu if hasattr(runArgs, "triggerConfig") and runArgs.triggerConfig!="NONE": @@ -139,7 +139,7 @@ except: overlaylog.warning('Could not add TimingAlg, no timing info will be written out.') -include ( "RecExCond/AllDet_detDescr.py" ) +include ( "RecExCond/AllDet_detDescr.py" ) #FIXME Dangerous to use this one from AthenaCommon.AppMgr import theApp theApp.EventLoop = "PileUpEventLoopMgr" diff --git a/LArCalorimeter/LArROD/python/LArRawChannelGetter.py b/LArCalorimeter/LArROD/python/LArRawChannelGetter.py index baeeb41647cd..f268e0f807cc 100755 --- a/LArCalorimeter/LArROD/python/LArRawChannelGetter.py +++ b/LArCalorimeter/LArROD/python/LArRawChannelGetter.py @@ -130,7 +130,7 @@ class LArRawChannelGetter ( Configured ) : # main method from database from LArROD.LArRODConf import LArRawChannelBuilderPedestalDataBase theLArRawChannelBuilderPedestalDataBase=LArRawChannelBuilderPedestalDataBase() - theLArRawChannelBuilderPedestalDataBase.LArPedestalKey = "Pedestal" + theLArRawChannelBuilderPedestalDataBase.LArPedestalKey = "LArPedestal" theLArRawChannelBuilder.PedestalTools = [theLArRawChannelBuilderPedestalDataBase] theLArRawChannelBuilder += theLArRawChannelBuilderPedestalDataBase diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/python/MuonByteStreamCnvTestConfig.py b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/python/MuonByteStreamCnvTestConfig.py index 2b1b6b83a205..afc22f0ba992 100644 --- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/python/MuonByteStreamCnvTestConfig.py +++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/python/MuonByteStreamCnvTestConfig.py @@ -12,6 +12,7 @@ def getMdtRdoToMdtDigit(name="MdtRdoToMdtDigitOverlay", **kwargs): kwargs.setdefault("EvtStore", overlayFlags.dataStore()) return CfgMgr.MuonRdoToMuonDigitTool(name, **kwargs) + def getRpcRdoToRpcDigit(name="RpcRdoToRpcDigitOverlay", **kwargs): kwargs.setdefault("DecodeMdtRDO", False) kwargs.setdefault("DecodeRpcRDO", True) @@ -22,6 +23,7 @@ def getRpcRdoToRpcDigit(name="RpcRdoToRpcDigitOverlay", **kwargs): kwargs.setdefault("EvtStore", overlayFlags.dataStore()) return CfgMgr.MuonRdoToMuonDigitTool(name, **kwargs) + def getTgcRdoToTgcDigit(name="TgcRdoToTgcDigitOverlay", **kwargs): kwargs.setdefault("DecodeMdtRDO", False) kwargs.setdefault("DecodeRpcRDO", False) @@ -31,3 +33,45 @@ def getTgcRdoToTgcDigit(name="TgcRdoToTgcDigitOverlay", **kwargs): from OverlayCommonAlgs.OverlayFlags import overlayFlags kwargs.setdefault("EvtStore", overlayFlags.dataStore()) return CfgMgr.MuonRdoToMuonDigitTool(name, **kwargs) + + +def getSigMdtDigitToMdtRDO(name="SigMdtDigitToMdtRDO", **kwargs): + from OverlayCommonAlgs.OverlayFlags import overlayFlags + kwargs.setdefault("InputObjectName",overlayFlags.evtStore()+"+MDT_DIGITS") + kwargs.setdefault("OutputObjectName",overlayFlags.evtStore()+"+MDTCSM") + return CfgMgr.MdtDigitToMdtRDO(name, **kwargs) + + +def getSigRpcDigitToRpcRDO(name="SigRpcDigitToRpcRDO", **kwargs): + from OverlayCommonAlgs.OverlayFlags import overlayFlags + kwargs.setdefault("InputObjectName",overlayFlags.evtStore()+"+RPC_DIGITS") + kwargs.setdefault("OutputObjectName",overlayFlags.evtStore()+"+RPCPAD") + return CfgMgr.RpcDigitToRpcRDO(name, **kwargs) + + +def getSigTgcDigitToTgcRDO(name="SigTgcDigitToTgcRDO", **kwargs): + from OverlayCommonAlgs.OverlayFlags import overlayFlags + kwargs.setdefault("InputObjectName",overlayFlags.evtStore()+"+TGC_DIGITS") + kwargs.setdefault("OutputObjectName",overlayFlags.evtStore()+"+TGCRDO") + return CfgMgr.TgcDigitToTgcRDO(name, **kwargs) + + +def getOverlayMdtDigitToMdtRDO(name="OverlayMdtDigitToMdtRDO", **kwargs): + from OverlayCommonAlgs.OverlayFlags import overlayFlags + kwargs.setdefault("InputObjectName",overlayFlags.outputStore()+"+MDT_DIGITS") + kwargs.setdefault("OutputObjectName",overlayFlags.outputStore()+"+MDTCSM") + return CfgMgr.MdtDigitToMdtRDO(name, **kwargs) + + +def getOverlayRpcDigitToRpcRDO(name="OverlayRpcDigitToRpcRDO", **kwargs): + from OverlayCommonAlgs.OverlayFlags import overlayFlags + kwargs.setdefault("InputObjectName",overlayFlags.outputStore()+"+RPC_DIGITS") + kwargs.setdefault("OutputObjectName",overlayFlags.outputStore()+"+RPCPAD") + return CfgMgr.RpcDigitToRpcRDO(name, **kwargs) + + +def getOverlayTgcDigitToTgcRDO(name="OverlayTgcDigitToTgcRDO", **kwargs): + from OverlayCommonAlgs.OverlayFlags import overlayFlags + kwargs.setdefault("InputObjectName",overlayFlags.outputStore()+"+TGC_DIGITS") + kwargs.setdefault("OutputObjectName",overlayFlags.outputStore()+"+TGCRDO") + return CfgMgr.TgcDigitToTgcRDO(name, **kwargs) diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/python/MuonByteStreamCnvTestConfigDb.py b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/python/MuonByteStreamCnvTestConfigDb.py index afb48cb4bb26..671cef55eadf 100644 --- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/python/MuonByteStreamCnvTestConfigDb.py +++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/python/MuonByteStreamCnvTestConfigDb.py @@ -1,8 +1,14 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -from AthenaCommon.CfgGetter import addTool +from AthenaCommon.CfgGetter import addTool, addAlgorithm addTool("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getMdtRdoToMdtDigit", "MdtRdoToMdtDigitOverlay") addTool("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getRpcRdoToRpcDigit", "RpcRdoToRpcDigitOverlay") addTool("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getTgcRdoToTgcDigit", "TgcRdoToTgcDigitOverlay") +addAlgorithm("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getSigMdtDigitToMdtRDO" , "SigMdtDigitToMdtRDO") +addAlgorithm("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getSigRpcDigitToRpcRDO" , "SigRpcDigitToRpcRDO") +addAlgorithm("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getSigTgcDigitToTgcRDO" , "SigTgcDigitToTgcRDO") +addAlgorithm("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getOverlayMdtDigitToMdtRDO" , "OverlayMdtDigitToMdtRDO") +addAlgorithm("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getOverlayRpcDigitToRpcRDO" , "OverlayRpcDigitToRpcRDO") +addAlgorithm("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getOverlayTgcDigitToTgcRDO" , "OverlayTgcDigitToTgcRDO") diff --git a/MuonSpectrometer/MuonCnv/MuonCnvExample/python/MuonCnvConfig.py b/MuonSpectrometer/MuonCnv/MuonCnvExample/python/MuonCnvConfig.py index cbe83911a1fc..7da4b5df2d0b 100644 --- a/MuonSpectrometer/MuonCnv/MuonCnvExample/python/MuonCnvConfig.py +++ b/MuonSpectrometer/MuonCnv/MuonCnvExample/python/MuonCnvConfig.py @@ -1,31 +1,46 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -def CscDigitToCscRDOTool(name,**kwargs): - - from Digitization.DigitizationFlags import digitizationFlags - +def BaseCscDigitToCscRDOTool(name,**kwargs): kwargs.setdefault("NumSamples", 4) kwargs.setdefault("Latency", 0) + from Digitization.DigitizationFlags import digitizationFlags kwargs.setdefault("addNoise", digitizationFlags.doMuonNoise()) kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc.get_Value()) kwargs.setdefault("cscCalibTool", "CscCalibTool") + from AthenaCommon import CfgMgr + return CfgMgr.CscDigitToCscRDOTool(name,**kwargs) +def CscDigitToCscRDOTool(name,**kwargs): + from Digitization.DigitizationFlags import digitizationFlags digitizationFlags.rndmSeedList.addSeed("CscDigitToCscRDOTool", 49261510, 105132394 ) - - from AthenaCommon.GlobalFlags import globalflags - if globalflags.isOverlay(): - from OverlayCommonAlgs.OverlayFlags import overlayFlags - kwargs.setdefault("InputObjectName",overlayFlags.dataStore()+"+CSC_DIGITS") - kwargs.setdefault("OutputObjectName",overlayFlags.dataStore()+"+CSCRDO") - kwargs.setdefault("EvtStore", overlayFlags.dataStore()) + return BaseCscDigitToCscRDOTool(name,**kwargs) - from AthenaCommon import CfgMgr - return CfgMgr.CscDigitToCscRDOTool(name,**kwargs) +def CscDigitToCscRDOTool2(name,**kwargs): + # consider a separate random number stream + #from Digitization.DigitizationFlags import digitizationFlags + #digitizationFlags.rndmSeedList.addSeed("CscDigitToCscRDOTool2", 49261510, 105132394 ) + #kwargs.setdefault("RndmEngine","CscDigitToCscRDOTool2") + kwargs.setdefault("NumSamples", 2) + kwargs.setdefault("addNoise", False) + from OverlayCommonAlgs.OverlayFlags import overlayFlags + kwargs.setdefault("InputObjectName",overlayFlags.evtStore()+"+CSC_DIGITS") + kwargs.setdefault("OutputObjectName",overlayFlags.evtStore()+"+CSCRDO") + return BaseCscDigitToCscRDOTool(name,**kwargs) -def CscDigitToCscRDO(name,**kwargs): +def CscDigitToCscRDOTool4(name,**kwargs): + # consider a separate random number stream + #from Digitization.DigitizationFlags import digitizationFlags + #digitizationFlags.rndmSeedList.addSeed("CscDigitToCscRDOTool4", 49261510, 105132394 ) + #kwargs.setdefault("RndmEngine","CscDigitToCscRDOTool4") + kwargs.setdefault("NumSamples", 4) + kwargs.setdefault("addNoise", False) + from OverlayCommonAlgs.OverlayFlags import overlayFlags + kwargs.setdefault("InputObjectName",overlayFlags.evtStore()+"+CSC_DIGITS") + kwargs.setdefault("OutputObjectName",overlayFlags.evtStore()+"+CSCRDO") + return BaseCscDigitToCscRDOTool(name,**kwargs) +def CscDigitToCscRDO(name,**kwargs): kwargs.setdefault("CscDigitToRDOTool", "CscDigitToCscRDOTool") - from AthenaCommon import CfgMgr return CfgMgr.CscDigitToCscRDO(name,**kwargs) diff --git a/MuonSpectrometer/MuonCnv/MuonCnvExample/python/MuonCnvExampleConfigDb.py b/MuonSpectrometer/MuonCnv/MuonCnvExample/python/MuonCnvExampleConfigDb.py index 245c93346cdf..7629a530c630 100644 --- a/MuonSpectrometer/MuonCnv/MuonCnvExample/python/MuonCnvExampleConfigDb.py +++ b/MuonSpectrometer/MuonCnv/MuonCnvExample/python/MuonCnvExampleConfigDb.py @@ -36,5 +36,7 @@ addService( "MuonCnvExample.MuonCalibConfig.MdtCalibrationSvc", "MdtCalibrationS # Tools/algorithms/services from MuonCnvExample.MuonCnvConfig ################################################################################ addTool( "MuonCnvExample.MuonCnvConfig.CscDigitToCscRDOTool", "CscDigitToCscRDOTool" ) +addTool( "MuonCnvExample.MuonCnvConfig.CscDigitToCscRDOTool2", "CscDigitToCscRDOTool2" ) +addTool( "MuonCnvExample.MuonCnvConfig.CscDigitToCscRDOTool4", "CscDigitToCscRDOTool4" ) addAlgorithm( "MuonCnvExample.MuonCnvConfig.CscDigitToCscRDO", "CscDigitToCscRDO" ) diff --git a/MuonSpectrometer/MuonDigitization/CSC_Digitization/python/CSC_DigitizationConfig.py b/MuonSpectrometer/MuonDigitization/CSC_Digitization/python/CSC_DigitizationConfig.py index 9108258af348..c733688fd8f6 100644 --- a/MuonSpectrometer/MuonDigitization/CSC_Digitization/python/CSC_DigitizationConfig.py +++ b/MuonSpectrometer/MuonDigitization/CSC_Digitization/python/CSC_DigitizationConfig.py @@ -53,3 +53,11 @@ def CscDigitizationTool(name="CscDigitizationTool", **kwargs): kwargs.setdefault("IncludePileUpTruth", False) return CfgMgr.CscDigitizationTool(name, **kwargs) + +def Csc_OverlayDigitizationTool(name="Csc_OverlayDigitizationTool",**kwargs): + from OverlayCommonAlgs.OverlayFlags import overlayFlags + kwargs.setdefault("EvtStore", overlayFlags.evtStore()) + kwargs.setdefault("OutputObjectName",overlayFlags.evtStore()+"+CSC_DIGITS") + if not overlayFlags.isDataOverlay(): + kwargs.setdefault("CSCSimDataCollectionOutputName",overlayFlags.evtStore()+"+CSC_SDO") + return CscDigitizationTool(name,**kwargs) diff --git a/MuonSpectrometer/MuonDigitization/CSC_Digitization/python/CSC_DigitizationConfigDb.py b/MuonSpectrometer/MuonDigitization/CSC_Digitization/python/CSC_DigitizationConfigDb.py index 182c996c1011..f79021dbd8de 100644 --- a/MuonSpectrometer/MuonDigitization/CSC_Digitization/python/CSC_DigitizationConfigDb.py +++ b/MuonSpectrometer/MuonDigitization/CSC_Digitization/python/CSC_DigitizationConfigDb.py @@ -3,4 +3,5 @@ from AthenaCommon.CfgGetter import addTool addTool("CSC_Digitization.CSC_DigitizationConfig.CscDigitizationTool" , "CscDigitizationTool") +addTool("CSC_Digitization.CSC_DigitizationConfig.Csc_OverlayDigitizationTool" , "Csc_OverlayDigitizationTool") addTool("CSC_Digitization.CSC_DigitizationConfig.getCscRange" , "CscRange") diff --git a/MuonSpectrometer/MuonOverlay/CscOverlay/CMakeLists.txt b/MuonSpectrometer/MuonOverlay/CscOverlay/CMakeLists.txt index fdbd43473baf..d73dbd629d76 100644 --- a/MuonSpectrometer/MuonOverlay/CscOverlay/CMakeLists.txt +++ b/MuonSpectrometer/MuonOverlay/CscOverlay/CMakeLists.txt @@ -34,4 +34,5 @@ atlas_add_component( CscOverlay # Install files from the package: atlas_install_headers( CscOverlay ) atlas_install_joboptions( share/*.py ) +atlas_install_python_modules( python/*.py ) diff --git a/MuonSpectrometer/MuonOverlay/CscOverlay/CscOverlay/CscOverlay.h b/MuonSpectrometer/MuonOverlay/CscOverlay/CscOverlay/CscOverlay.h index 03bc94b84126..f8a57876dad9 100644 --- a/MuonSpectrometer/MuonOverlay/CscOverlay/CscOverlay/CscOverlay.h +++ b/MuonSpectrometer/MuonOverlay/CscOverlay/CscOverlay/CscOverlay.h @@ -82,17 +82,20 @@ private: //Whether the data needs to be fliped by 49-strip for bug#56002 bool needtoflip(const int address) const; - // ---------------------------------------------------------------- + // Copying CscRawDataCollection properties + void copyCscRawDataCollectionProperties(const CscRawDataCollection& sourceColl, CscRawDataCollection& outColl) const; - ServiceHandle<StoreGateSvc> m_storeGateTemp; + // ---------------------------------------------------------------- // jO controllable properties. // "Main" containers are read, have data from "overlay" containers added, // and written out with the original SG keys. - std::string m_mainInputCSC_Name; - std::string m_overlayInputCSC_Name; + SG::ReadHandleKey<CscRawDataContainer> m_inputDataRDOKey{this,"InputDataRDOKey","OriginalEvent_SG+CSCRDO",""}; + SG::ReadHandleKey<CscRawDataContainer> m_inputOverlayRDOKey{this,"InputOverlayRDOKey","BkgEvent_0_SG+CSCRDO",""}; + SG::WriteHandleKey<CscRawDataContainer> m_outputContainerKey{this,"OutputContainerKey","StoreGateSvc+CSCRDO",""}; std::string m_sdo; + const CscIdHelper * m_cscHelper; ToolHandle<ICscCalibTool> m_cscCalibTool; ToolHandle<IMuonDigitizationTool> m_digTool; @@ -100,7 +103,6 @@ private: ToolHandle<IMuonDigitizationTool> m_rdoTool4; ToolHandle<Muon::ICSC_RDO_Decoder> m_cscRdoDecoderTool; bool m_copySDO; - bool m_isByteStream; ServiceHandle <IAtRndmGenSvc> m_rndmSvc; // Random number service CLHEP::HepRandomEngine *m_rndmEngine; // Random number engine used - not init in SiDigitization diff --git a/MuonSpectrometer/MuonOverlay/CscOverlay/python/CscOverlayConfig.py b/MuonSpectrometer/MuonOverlay/CscOverlay/python/CscOverlayConfig.py new file mode 100644 index 000000000000..f7c5ccdaf6d2 --- /dev/null +++ b/MuonSpectrometer/MuonOverlay/CscOverlay/python/CscOverlayConfig.py @@ -0,0 +1,18 @@ + +def getCscOverlay(name="CscOverlay", **kwargs): + from OverlayCommonAlgs.OverlayFlags import overlayFlags + kwargs.setdefault("InputDataRDOKey", overlayFlags.dataStore()+"+CSCRDO") + kwargs.setdefault("InputOverlayRDOKey", overlayFlags.evtStore()+"+CSCRDO") + kwargs.setdefault("OutputContainerKey", "StoreGateSvc+CSCRDO") + kwargs.setdefault("DigitizationTool", "Csc_OverlayDigitizationTool") + kwargs.setdefault("MakeRDOTool2", "CscDigitToCscRDOTool2") + kwargs.setdefault("MakeRDOTool4", "CscDigitToCscRDOTool4") + from Digitization.DigitizationFlags import digitizationFlags + kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc.get_Value()) + digitizationFlags.rndmSeedList.addSeed("CscOverlay", 12261551, 245536301 ) + kwargs.setdefault("MCStore", overlayFlags.evtStore()) + kwargs.setdefault("DataStore", overlayFlags.dataStore()) + kwargs.setdefault("CopySDO",not overlayFlags.isDataOverlay()) + + from AthenaCommon import CfgMgr + return CfgMgr.CscOverlay(name,**kwargs) diff --git a/MuonSpectrometer/MuonOverlay/CscOverlay/python/CscOverlayConfigDb.py b/MuonSpectrometer/MuonOverlay/CscOverlay/python/CscOverlayConfigDb.py new file mode 100644 index 000000000000..34eabc4ad876 --- /dev/null +++ b/MuonSpectrometer/MuonOverlay/CscOverlay/python/CscOverlayConfigDb.py @@ -0,0 +1,2 @@ +from AthenaCommon.CfgGetter import addAlgorithm +addAlgorithm("CscOverlay.CscOverlayConfig.getCscOverlay", "CscOverlay") diff --git a/MuonSpectrometer/MuonOverlay/CscOverlay/share/CscOverlay_jobOptions.py b/MuonSpectrometer/MuonOverlay/CscOverlay/share/CscOverlay_jobOptions.py index f6cea88cf664..3ece6e4c3dbe 100644 --- a/MuonSpectrometer/MuonOverlay/CscOverlay/share/CscOverlay_jobOptions.py +++ b/MuonSpectrometer/MuonOverlay/CscOverlay/share/CscOverlay_jobOptions.py @@ -1,29 +1,10 @@ from Digitization.DigitizationFlags import digitizationFlags -from AthenaCommon.CfgGetter import getPublicTool -from OverlayCommonAlgs.OverlayFlags import overlayFlags -getPublicTool("CscDigitToCscRDOTool") - -from CscOverlay.CscOverlayConf import CscOverlay -job += CscOverlay() -job.CscOverlay.mainInputCSC_Name = "CSCRDO" -job.CscOverlay.overlayInputCSC_Name = "CSCRDO" -job.CscOverlay.DigitizationTool = getPublicTool("CscDigitizationTool") #CscDigitizationTool -job.CscOverlay.DigitizationTool.EvtStore = job.CscOverlay.MCStore -job.CscOverlay.DigitizationTool.OutputObjectName = overlayFlags.evtStore() + "+CSC_DIGITS" -job.CscOverlay.MakeRDOTool2 = ToolSvc.CscDigitToCscRDOTool.clone("CscDigitToCscRDOTool2") # consider a separate random number stream -job.CscOverlay.MakeRDOTool2.EvtStore = job.CscOverlay.MCStore -job.CscOverlay.MakeRDOTool2.addNoise = False -job.CscOverlay.MakeRDOTool2.NumSamples = 2 -job.CscOverlay.MakeRDOTool4 = ToolSvc.CscDigitToCscRDOTool.clone("CscDigitToCscRDOTool4") # consider a separate random number stream -job.CscOverlay.MakeRDOTool4.EvtStore = job.CscOverlay.MCStore -job.CscOverlay.MakeRDOTool4.addNoise = False -job.CscOverlay.MakeRDOTool4.NumSamples = 4 -job.CscOverlay.RndmSvc = digitizationFlags.rndmSvc.get_Value() +from AthenaCommon.CfgGetter import getAlgorithm +job += getAlgorithm("CscOverlay") +from OverlayCommonAlgs.OverlayFlags import overlayFlags +job.CscOverlay.DigitizationTool.OutputObjectName = overlayFlags.evtStore() + "+CSC_DIGITS" #private tool, so this should work #job.CscOverlay.OutputLevel=VERBOSE #svcMgr.MessageSvc.defaultLimit=100000 - -digitizationFlags.rndmSeedList.addSeed("CscOverlay", 12261551, 245536301 ) - print job.CscOverlay diff --git a/MuonSpectrometer/MuonOverlay/CscOverlay/src/CscOverlay.cxx b/MuonSpectrometer/MuonOverlay/CscOverlay/src/CscOverlay.cxx index db9168e6dc29..252029ad857c 100644 --- a/MuonSpectrometer/MuonOverlay/CscOverlay/src/CscOverlay.cxx +++ b/MuonSpectrometer/MuonOverlay/CscOverlay/src/CscOverlay.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #include "CscOverlay/CscOverlay.h" @@ -27,30 +27,25 @@ constexpr uint16_t MAX_AMPL = 4095; // 12-bit ADC //================================================================ CscOverlay::CscOverlay(const std::string &name, ISvcLocator *pSvcLocator) : MuonOverlayBase(name, pSvcLocator), - m_storeGateTemp("StoreGateSvc/BkgEvent_1_SG", name), - m_cscHelper(0), + m_cscHelper(nullptr), m_cscCalibTool( "CscCalibTool", this), m_digTool("CscDigitizationTool", this ), m_rdoTool2("CscDigitToCscRDOTool2", this ), m_rdoTool4("CscDigitToCscRDOTool4", this ), m_cscRdoDecoderTool ("Muon::CscRDO_Decoder"), m_rndmSvc("AtRndmGenSvc", name ), - m_rndmEngine(0), + m_rndmEngine(nullptr), m_rndmEngineName("CscOverlay") { /** Event DAta Store keys for the 2 data streams to overlay - modifiable in job options */ - declareProperty("TempStore", m_storeGateTemp, "help"); - declareProperty("mainInputCSC_Name", m_mainInputCSC_Name="CSCRDO"); - declareProperty("overlayInputCSC_Name", m_overlayInputCSC_Name="CSCRDO"); declareProperty("CopySDO", m_copySDO=true); declareProperty("DigitizationTool", m_digTool); declareProperty("MakeRDOTool2", m_rdoTool2); declareProperty("MakeRDOTool4", m_rdoTool4); declareProperty("CscRdoDecoderTool", m_cscRdoDecoderTool ); declareProperty("CSCSDO", m_sdo = "CSC_SDO"); - declareProperty("IsByteStream", m_isByteStream = false ); declareProperty("RndmSvc", m_rndmSvc, "Random Number Service used for CscDigitToCscRDOTool" ); declareProperty("RndmEngine", m_rndmEngineName, "Random engine name for CscDigitToCscRDOTool"); @@ -59,173 +54,112 @@ CscOverlay::CscOverlay(const std::string &name, ISvcLocator *pSvcLocator) : //================================================================ StatusCode CscOverlay::overlayInitialize() { - MsgStream msg(msgSvc(), name()); - msg << MSG::INFO <<"CscOverlay initialized"<<endmsg; - - if (m_storeGateTemp.retrieve().isFailure()) { - msg<< MSG::FATAL << "SaveInDetObjects::initialize): StoreGate[temp] service not found !" << endmsg; - return StatusCode::FAILURE; - } - - /** initialize the detectore store service */ - StoreGateSvc* detStore=0; - StatusCode sc = serviceLocator()->service("DetectorStore", detStore); - if (sc.isFailure()) { - msg<< MSG::FATAL << "DetectorStore service not found !" << endmsg; - return StatusCode::FAILURE; - } + ATH_MSG_INFO("CscOverlay initialized"); /** access to the CSC Identifier helper */ - sc = detStore->retrieve(m_cscHelper, "CSCIDHELPER"); - if (sc.isFailure()) { - msg<< MSG::FATAL << "Could not get CscIdHelper !" << endmsg; - return StatusCode::FAILURE; - } - else { - msg<<MSG::DEBUG<<" Found the CscIdHelper. "<<endmsg; - } - + ATH_CHECK(detStore()->retrieve(m_cscHelper, "CSCIDHELPER")); + ATH_MSG_DEBUG(" Found the CscIdHelper. "); + /** CSC calibratin tool for the Condtiions Data base access */ - sc = m_cscCalibTool.retrieve(); - if (sc.isFailure()) { - msg<<MSG::ERROR<< "Can't get handle on CSC calibration tools" << endmsg; - return StatusCode::FAILURE; - } + ATH_CHECK(m_cscCalibTool.retrieve()); // get cscRdoDecoderTool - if (m_cscRdoDecoderTool.retrieve().isFailure()){ - ATH_MSG_ERROR ( "Can't get handle on CSC RDO Decoder tool" ); - return StatusCode::FAILURE; - } - - if (m_digTool.retrieve().isFailure()) { - msg<< MSG::FATAL << "Could not retrieve CSC Digitization Tool!" << endmsg; - return StatusCode::FAILURE; - } - msg<<MSG::DEBUG<<"Retrieved CSC Digitization Tool."<<endmsg; - - if (m_rdoTool2.retrieve().isFailure()) { - msg<< MSG::FATAL << "Could not retrieve CSC Digit -> RDO Tool 2!" << endmsg; - return StatusCode::FAILURE; - } - msg<<MSG::DEBUG<<"Retrieved CSC Digit -> RDO Tool 2."<<endmsg; - - if (m_rdoTool4.retrieve().isFailure()) { - msg<< MSG::FATAL << "Could not retrieve CSC Digit -> RDO Tool 4!" << endmsg; - return StatusCode::FAILURE; - } - msg<<MSG::DEBUG<<"Retrieved CSC Digit -> RDO Tool 4."<<endmsg; + ATH_CHECK(m_cscRdoDecoderTool.retrieve()); + + ATH_CHECK(m_digTool.retrieve()); + ATH_MSG_DEBUG("Retrieved CSC Digitization Tool."); + + ATH_CHECK(m_rdoTool2.retrieve()); + ATH_MSG_DEBUG("Retrieved CSC Digit -> RDO Tool 2."); + + ATH_CHECK(m_rdoTool4.retrieve()); + ATH_MSG_DEBUG("Retrieved CSC Digit -> RDO Tool 4."); //random number initialization - if (!m_rndmSvc.retrieve().isSuccess()) { - msg<<MSG::ERROR<< " Could not initialize Random Number Service" << endmsg; - } + ATH_CHECK(m_rndmSvc.retrieve()); // getting our random numbers stream m_rndmEngine = m_rndmSvc->GetEngine(m_rndmEngineName); - if (m_rndmEngine==0) { - msg<<MSG::ERROR<< "Could not find RndmEngine : " << m_rndmEngineName << endmsg; + if (!m_rndmEngine) { + ATH_MSG_ERROR("Could not find RndmEngine : " << m_rndmEngineName); return StatusCode::FAILURE; } + ATH_CHECK( m_inputDataRDOKey.initialize() ); + ATH_CHECK( m_inputOverlayRDOKey.initialize() ); + ATH_CHECK( m_outputContainerKey.initialize() ); + return StatusCode::SUCCESS; } //================================================================ StatusCode CscOverlay::overlayFinalize() { - MsgStream msg(msgSvc(), name()); - msg <<MSG::INFO << "CscOverlay finalized" << endmsg; + ATH_MSG_INFO("CscOverlay finalized"); return StatusCode::SUCCESS; } //================================================================ StatusCode CscOverlay::overlayExecute() { - MsgStream msg(msgSvc(), name()); - msg<<MSG::DEBUG<<"CscOverlay::execute() begin"<<endmsg; - + ATH_MSG_DEBUG("CscOverlay::execute() begin"); //---------------------------------------------------------------- unsigned int numsamples=0;//to be determined from the data - SG::ReadHandle<CscRawDataContainer> cdata(m_mainInputCSC_Name, m_storeGateData->name()); - SG::ReadHandle<CscRawDataContainer> data_input_CSC(m_mainInputCSC_Name, m_storeGateData->name()); - if ( !m_isByteStream ) - { - if( !cdata.isValid() ) - { - ATH_MSG_WARNING("Could not get real data CSC RDO container \"" << m_mainInputCSC_Name << "\""); - return StatusCode::SUCCESS; - } - if ((cdata->begin()==cdata->end()) || !*(cdata->begin())){ - ATH_MSG_WARNING("Could not get nsamples, cdata empty?"); - //return StatusCode::SUCCESS; - } - else - { - numsamples=cdata->begin()->numSamples(); - } - } + SG::ReadHandle<CscRawDataContainer> inputDataRDO(m_inputDataRDOKey); + if(!inputDataRDO.isValid()) { + ATH_MSG_WARNING("Could not get data CscRawDataContainer \"" << inputDataRDO.name() << "\" in " << inputDataRDO.store()); + return StatusCode::SUCCESS; + } + ATH_MSG_VERBOSE("Found CscRawDataContainer \"" << inputDataRDO.name() << "\" in " << inputDataRDO.store()); + if ((inputDataRDO->begin()==inputDataRDO->end()) || !*(inputDataRDO->begin())){ + ATH_MSG_WARNING("Could not get nsamples, inputDataRDO empty?"); + } else{ - if(!data_input_CSC.isValid()) - { - ATH_MSG_WARNING("Could not get real data CSC RDO container \"" << m_mainInputCSC_Name << "\""); - return StatusCode::SUCCESS; - } - if ((data_input_CSC->begin()==data_input_CSC->end()) || !*(data_input_CSC->begin())) - { - ATH_MSG_WARNING("Could not get nsamples, data_input_CSC empty?"); - //return StatusCode::SUCCESS; - } - else - { - numsamples=data_input_CSC->begin()->numSamples(); - } - } + numsamples=inputDataRDO->begin()->numSamples(); + } /** in the simulation stream, run digitization of the fly and make RDO - this will be used as input to the overlay job */ if ( m_digTool->digitize().isFailure() ) { - msg << MSG::WARNING << "On the fly CSC digitization failed " << endmsg; + ATH_MSG_WARNING("On the fly CSC digitization failed "); return StatusCode::SUCCESS; } - if (numsamples==2){ + if (numsamples==2) { if ( m_rdoTool2->digitize().isFailure() ) { - msg << MSG::WARNING << "On the fly CSC Digit -> RDO 2 failed " << endmsg; + ATH_MSG_WARNING("On the fly CSC Digit -> RDO 2 failed "); return StatusCode::SUCCESS; } - msg << MSG::DEBUG << "Digitizing with 2 samples" << endmsg; + ATH_MSG_DEBUG("Digitizing with 2 samples"); } - else if (numsamples==4){ + else if (numsamples==4) { if ( m_rdoTool4->digitize().isFailure() ) { - msg << MSG::WARNING << "On the fly CSC Digit -> RDO 4 failed " << endmsg; + ATH_MSG_WARNING("On the fly CSC Digit -> RDO 4 failed "); return StatusCode::SUCCESS; } - msg << MSG::DEBUG << "Digitizing with 4 samples" << endmsg; + ATH_MSG_DEBUG("Digitizing with 4 samples"); } else{ - msg << MSG::WARNING << "On the fly CSC Digit -> RDO failed - not 2 or 4 samples!" << endmsg; + ATH_MSG_WARNING("On the fly CSC Digit -> RDO failed - not 2 or 4 samples!"); //return StatusCode::SUCCESS; } - if (numsamples>0){ - msg << MSG::DEBUG << "Retrieving MC input CSC container" << endmsg; - SG::ReadHandle<CscRawDataContainer> ovl_input_CSC(m_overlayInputCSC_Name, m_storeGateMC.name()); - if(!ovl_input_CSC.isValid()) - { - msg << MSG::WARNING << "Could not get CSC RDO from the simulation stream ... " << m_overlayInputCSC_Name << endmsg; - return StatusCode::SUCCESS; - } - + if (numsamples>0) { + ATH_MSG_DEBUG("Retrieving MC input CSC container"); + SG::ReadHandle<CscRawDataContainer> inputOverlayRDO(m_inputOverlayRDOKey); + if(!inputOverlayRDO.isValid()) { + ATH_MSG_WARNING("Could not get overlay CscRawDataContainer \"" << inputOverlayRDO.name() << "\" in " << inputOverlayRDO.store()); + return StatusCode::SUCCESS; + } + ATH_MSG_VERBOSE("Found CscRawOverlayContainer \"" << inputOverlayRDO.name() << "\" in " << inputOverlayRDO.store()); + /* now do the overlay - reading real data from the data stream and reading simulated RDO produced in the previous steps from the simulation stream */ - if ( !m_isByteStream ) this->overlayContainer(cdata.cptr(), ovl_input_CSC.cptr()); - else this->overlayContainer(data_input_CSC.cptr(), ovl_input_CSC.cptr()); + this->overlayContainer(inputDataRDO.cptr(), inputOverlayRDO.cptr()); } - + //---------------------------------------------------------------- - msg<<MSG::DEBUG<<"Processing MC truth data"<<endmsg; - + ATH_MSG_DEBUG("Processing MC truth data"); // Main stream is normally real data without any MC info. // In tests we may use a MC generated file instead of real data. // Remove truth info from the main input stream, if any. @@ -234,11 +168,11 @@ StatusCode CscOverlay::overlayExecute() { // (McEventCollection is done by the base.) // Now copy CSC-specific MC truth objects to the output. - if ( m_copySDO ) + if ( m_copySDO ) { this->copyMuonObjects<CscSimDataCollection>(&*m_storeGateOutput, &*m_storeGateMC, m_sdo); - + } //---------------------------------------------------------------- - msg<<MSG::DEBUG<<"CscOverlay::execute() end"<<endmsg; + ATH_MSG_DEBUG("CscOverlay::execute() end"); return StatusCode::SUCCESS; } @@ -246,25 +180,31 @@ StatusCode CscOverlay::overlayExecute() { void CscOverlay::overlayContainer(const CscRawDataContainer *main, const CscRawDataContainer *overlay) { - MsgStream msg(msgSvc(), name()); - msg << MSG::DEBUG << "overlayContainer<>() begin" << endmsg; + ATH_MSG_DEBUG("overlayContainer<>() begin"); - SG::WriteHandle<CscRawDataContainer> outputContainer(m_mainInputCSC_Name, m_storeGateOutput->name()); - outputContainer = CxxUtils::make_unique<CscRawDataContainer>(); + SG::WriteHandle<CscRawDataContainer> outputContainer(m_outputContainerKey); + if (outputContainer.record(std::make_unique<CscRawDataContainer>()).isFailure()) { + ATH_MSG_ERROR("Failed to record " << m_outputContainerKey); + } /** Add data from the main container to the output one */ CscRawDataContainer::const_iterator p_main = main->begin(); CscRawDataContainer::const_iterator p_main_end = main->end(); - for(; p_main != p_main_end; ) { - - - const CscRawDataCollection *coll_main = *p_main; - if ( outputContainer->addCollection(coll_main, p_main.hashId()).isFailure() ) { - msg << MSG::WARNING << "addCollection failed for main" << endmsg; + const CscRawDataCollection& mainColl(**p_main); + //Deep-copy CscRawDataCollection + //FIXME Write a copy-constructor for CscRawDataCollection!! + auto p_newColl = std::make_unique<CscRawDataCollection>(mainColl.identify()); + this->copyCscRawDataCollectionProperties(mainColl, *p_newColl); + for(auto rawData : **p_main) { + auto newData = std::make_unique<CscRawData>(*rawData); // TODO confirm implicit copy-constructor works as expected + p_newColl->push_back(newData.release()); + } + if ( outputContainer->addCollection(p_newColl.release(), p_main.hashId()).isFailure() ) { + ATH_MSG_WARNING("addCollection failed for main"); } else { - msg << MSG::DEBUG << "data overlayContainer() added overlaid RDO" << endmsg; + ATH_MSG_DEBUG("data overlayContainer() added overlaid RDO"); } ++p_main; } @@ -276,60 +216,38 @@ void CscOverlay::overlayContainer(const CscRawDataContainer *main, for(; p_ovl != p_ovl_end; ) { const CscRawDataCollection *coll_ovl = *p_ovl; - - uint16_t coll_id = (*p_ovl)->identify(); + const uint16_t coll_id = (*p_ovl)->identify(); /** The newly created stuff will go to the output EventStore SG */ - CscRawDataCollection *out_coll = new CscRawDataCollection( coll_id ); + auto out_coll = std::make_unique<CscRawDataCollection>( coll_id ); /** Look for the same ID in the main StoreGate EventStore */ - CscRawDataContainer::const_iterator q = outputContainer->indexFind( coll_id ); + CscRawDataContainer::const_iterator q = outputContainer->indexFind(coll_id); if( q != outputContainer->end() ) { /** Need to merge the collections Retrieve q */ const CscRawDataCollection *coll_data = *q; - - /** copy a few things to the new collection */ - out_coll->set_eventType( coll_data->eventType() ); - out_coll->setRodId ( coll_data->rodId() ); - out_coll->setSubDetectorId ( coll_data->subDetectorId() ); - if ( coll_data->samplingPhase() ) out_coll->set_samplingPhase(); - if ( coll_data->triggerType() ) out_coll->set_triggerType(); - out_coll->set_firstBitSummary( coll_data->firstBitSummary() ); - out_coll->set_scaAddress( coll_data->scaAddress() ); - const std::vector<uint8_t> dataType = coll_data->dataType(); - for ( unsigned int i=0; i<dataType.size(); ++i ) out_coll->addDataType( dataType[i] ); - - this->mergeCollections(out_coll, coll_data, coll_ovl); + this->copyCscRawDataCollectionProperties(*coll_data, *out_coll); + this->mergeCollections(out_coll.get(), coll_data, coll_ovl); /** Here the new collection is created, but not yet registered. Put it in IDC in place of the original collection. */ outputContainer->removeCollection(p_ovl.hashId()); - if(outputContainer->addCollection(out_coll, p_ovl.hashId()).isFailure()) { - msg << MSG::WARNING << "addCollection failed " << endmsg; + if(outputContainer->addCollection(out_coll.release(), p_ovl.hashId()).isFailure()) { + ATH_MSG_WARNING("addCollection failed "); } else { - msg << MSG::DEBUG << "overlayContainer() added overlaid RDO" << endmsg; + ATH_MSG_DEBUG("overlayContainer() added overlaid RDO"); } - } else { /** Copy the complete collection from ovl to output, hopefully preserving the "most derived" type of its raw data */ - - out_coll->set_eventType( coll_ovl->eventType() ); - out_coll->setRodId ( coll_ovl->rodId() ); - out_coll->setSubDetectorId ( coll_ovl->subDetectorId() ); - if ( coll_ovl->samplingPhase() ) out_coll->set_samplingPhase(); - if ( coll_ovl->triggerType() ) out_coll->set_triggerType(); - out_coll->set_firstBitSummary( coll_ovl->firstBitSummary() ); - out_coll->set_scaAddress( coll_ovl->scaAddress() ); - const std::vector<uint8_t> dataType = coll_ovl->dataType(); - for ( unsigned int i=0; i<dataType.size(); ++i ) out_coll->addDataType( dataType[i] ); + this->copyCscRawDataCollectionProperties(*coll_ovl, *out_coll); /** Copy the complete collection from ovl to output, hopefully preserving the "most derived" type of its raw data */ @@ -339,7 +257,7 @@ void CscOverlay::overlayContainer(const CscRawDataContainer *main, /** Put Digit into Collection */ const CscRawData *data = ( *i ); if( !data ) { - msg << MSG::WARNING << "NULL pointer to Digit!" << endmsg; + ATH_MSG_WARNING("NULL pointer to Digit!"); continue; } else{ @@ -348,78 +266,87 @@ void CscOverlay::overlayContainer(const CscRawDataContainer *main, uint32_t hashOffset = data->hashId(); std::vector<uint16_t> all_samples; for (unsigned int j=0; j<width; ++j) { - uint32_t stripHash = hashOffset+j; - double noise = m_cscCalibTool->stripNoise( stripHash, false ); - //double pedestal = m_cscCalibTool->stripPedestal( stripHash, false ); - std::vector<uint16_t> samples; - bool extractSamples = data->samples(j, numSamples, samples); - if (!extractSamples) { - msg << MSG::WARNING << "Unable to extract samples for strip " << j - << " Online Cluster width = " << width - << " for number of Samples = " << numSamples - << " continuing ..." << endmsg; - } else { - for (unsigned int k=0; k<samples.size(); ++k) { - double theNoise = CLHEP::RandGauss::shoot(m_rndmEngine, 0.0, noise); - float adcCount = samples[k] + theNoise; - if ( adcCount > MAX_AMPL ) { - msg<<MSG::DEBUG<< "value out of range (copying over signal): " << adcCount << " " - << " Setting it to max value = " << MAX_AMPL - << " IdentifierHash is " << stripHash <<endmsg; - adcCount = MAX_AMPL; - } - all_samples.push_back( (uint16_t) rint(adcCount) ); - } - } + uint32_t stripHash = hashOffset+j; + double noise = m_cscCalibTool->stripNoise( stripHash, false ); + //double pedestal = m_cscCalibTool->stripPedestal( stripHash, false ); + std::vector<uint16_t> samples; + bool extractSamples = data->samples(j, numSamples, samples); + if (!extractSamples) { + ATH_MSG_WARNING("Unable to extract samples for strip " << j + << " Online Cluster width = " << width + << " for number of Samples = " << numSamples + << " continuing ..."); + } + else { + for (unsigned int k=0; k<samples.size(); ++k) { + double theNoise = CLHEP::RandGauss::shoot(m_rndmEngine, 0.0, noise); + float adcCount = samples[k] + theNoise; + if ( adcCount > MAX_AMPL ) { + ATH_MSG_DEBUG("value out of range (copying over signal): " << adcCount << " " + << " Setting it to max value = " << MAX_AMPL + << " IdentifierHash is " << stripHash); + adcCount = MAX_AMPL; + } + all_samples.push_back( (uint16_t) rint(adcCount) ); + } + } } - CscRawData *rdo = new CscRawData( all_samples, data->address(), data->identify(), data->rpuID(), data->width() ); + auto rdo = std::make_unique<CscRawData>( all_samples, data->address(), data->identify(), data->rpuID(), data->width() ); rdo->setHashID( data->hashId() );//ACH - was "width()" ??? rdo->setTime( data->time() );//ACH - was absent //perform some checks bool good=true; for (unsigned int j=0; j<width; ++j) { - const Identifier channelId = m_cscRdoDecoderTool->channelIdentifier(rdo, j); + const Identifier channelId = m_cscRdoDecoderTool->channelIdentifier(rdo.get(), j); if(!(m_cscHelper->valid(channelId))) { - msg << MSG::WARNING << "Invalid CSC Identifier! - skipping " << channelId << endmsg; + ATH_MSG_WARNING("Invalid CSC Identifier! - skipping " << channelId); good=false; } } if (good){ - out_coll->push_back( rdo ); + out_coll->push_back( rdo.release() ); } - else{ - delete rdo;//coverity demands it - } - } } - + /** The new collection goes to m_storeGateOutput */ - - if(outputContainer->addCollection(out_coll, out_coll->identify()).isFailure()) { - msg << MSG::WARNING << "overlayContainer(): Problem in outputContainer->addCollection(Identifier)" << endmsg; + if(outputContainer->addCollection(out_coll.release(), out_coll->identify()).isFailure()) { + ATH_MSG_WARNING("overlayContainer(): Problem in outputContainer->addCollection(Identifier)"); } else { - msg << MSG::DEBUG << "overlayContainer() added new RDO" << endmsg; + ATH_MSG_DEBUG("overlayContainer() added new RDO"); } } - + ++p_ovl; } - msg << MSG::DEBUG << "overlayContainer<>() end" << endmsg; + ATH_MSG_DEBUG("overlayContainer<>() end"); } + +// Copying CscRawDataCollection properties + void CscOverlay::copyCscRawDataCollectionProperties(const CscRawDataCollection& sourceColl, CscRawDataCollection& outColl) const { + /** copy a few things to the new collection */ + outColl.setIdentifyHash( sourceColl.identifyHash() ); + outColl.set_eventType( sourceColl.eventType() ); + outColl.setRodId ( sourceColl.rodId() ); + outColl.setSubDetectorId ( sourceColl.subDetectorId() ); + if (sourceColl.samplingPhase()) { outColl.set_samplingPhase(); } + if (sourceColl.triggerType()) { outColl.set_triggerType(); } + outColl.set_firstBitSummary( sourceColl.firstBitSummary() ); + outColl.set_scaAddress( sourceColl.scaAddress() ); + for (auto dataType : sourceColl.dataType()) { outColl.addDataType( dataType ); } + } void CscOverlay::spuData( const CscRawDataCollection * coll, const uint16_t spuID, std::vector<const CscRawData*>& data) { - MsgStream msg(msgSvc(), name()); data.clear(); if ( !coll ) return; CscRawDataCollection::const_iterator idata = coll->begin(); CscRawDataCollection::const_iterator edata = coll->end(); for ( ; idata != edata; ++idata ) { if ( (*idata)->rpuID() == spuID ) data.push_back( *idata ); } - msg <<MSG::DEBUG<<"spuData(): made data vector of size "<<data.size()<<" for SPU "<<spuID<<endmsg; + ATH_MSG_DEBUG("spuData(): made data vector of size "<<data.size()<<" for SPU "<<spuID); } bool CscOverlay::needtoflip(const int address) const { @@ -440,9 +367,7 @@ void CscOverlay::mergeCollections(CscRawDataCollection *out_coll, const CscRawDataCollection *data_coll, const CscRawDataCollection *ovl_coll) { - - MsgStream msg(msgSvc(), name()); - msg << MSG::DEBUG << "mergeCollection<>() begin" << endmsg; + ATH_MSG_DEBUG("mergeCollection<>() begin"); // number of ADC samples in the both data stream unsigned int nSigSamples = data_coll->numSamples(); @@ -453,14 +378,14 @@ void CscOverlay::mergeCollections(CscRawDataCollection *out_coll, unsigned int ovlSamplingTime = ovl_coll->rate(); if ( dataSamplingTime != ovlSamplingTime ) { - msg<< MSG::WARNING << "Overlay of inconsistent data - sampling times not the same " - << dataSamplingTime << " ns " << ovlSamplingTime << " ns" << endmsg; + ATH_MSG_WARNING("Overlay of inconsistent data - sampling times not the same " + << dataSamplingTime << " ns " << ovlSamplingTime << " ns"); return; } if ( nSigSamples != nOvlSamples ) { - msg<< MSG::WARNING << "Overlay of inconsistent data - number of samples not the same " - << nSigSamples << " " << nOvlSamples << endmsg; + ATH_MSG_WARNING("Overlay of inconsistent data - number of samples not the same " + << nSigSamples << " " << nOvlSamples); return; } @@ -492,29 +417,29 @@ void CscOverlay::mergeCollections(CscRawDataCollection *out_coll, uint32_t hash = std::min( sigHash, ovlHash ); uint32_t address = std::min( sigAddress, ovlAddress ); if (sigSamples.size()!=0 && ovlSamples.size()!=0 && needtoflip(address)){ - msg <<MSG::DEBUG<<"Looking for overlap of hashes and addresses within witdths because needtoflip"<<endmsg; - msg <<MSG::VERBOSE ; + ATH_MSG_DEBUG("Looking for overlap of hashes and addresses within witdths because needtoflip"); + msg() << MSG::VERBOSE ; std::set<int> sig; int lastindex=-1; for (std::map< int,std::vector<uint16_t> >::const_iterator si=sigSamples.begin(); si!=sigSamples.end(); ++si) { if (si!=sigSamples.begin() && si->first-lastindex!=1) break; lastindex=si->first; - sig.insert(si->first); msg << si->first << " "; + sig.insert(si->first); msg() << si->first << " "; } - msg<<endmsg; + msg()<<endmsg; bool overlap=false; - msg <<MSG::VERBOSE ; + msg() <<MSG::VERBOSE ; for (std::map< int,std::vector<uint16_t> >::const_iterator so=ovlSamples.begin(); so!=ovlSamples.end(); ++so) { //add 1 to beginning and end of list because adjacent counts as overlap - msg << (so->first)-1 << " "; - if (sig.find((so->first)-1)!=sig.end()) {overlap=true; msg << "!!";} - msg << (so->first) << " "; - if (sig.find((so->first))!=sig.end()) {overlap=true; msg << "!!";} - msg << (so->first)+1 << " "; - if (sig.find((so->first)+1)!=sig.end()) {overlap=true; msg << "!!";} + msg() << (so->first)-1 << " "; + if (sig.find((so->first)-1)!=sig.end()) {overlap=true; msg() << "!!";} + msg() << (so->first) << " "; + if (sig.find((so->first))!=sig.end()) {overlap=true; msg() << "!!";} + msg() << (so->first)+1 << " "; + if (sig.find((so->first)+1)!=sig.end()) {overlap=true; msg() << "!!";} } - msg<<endmsg; + msg()<<endmsg; if (!overlap){ - msg <<MSG::DEBUG<<"Taking max of hashes and addresses because needtoflip and no overlap"<<endmsg; + ATH_MSG_DEBUG("Taking max of hashes and addresses because needtoflip and no overlap"); hash = std::max( sigHash, ovlHash ); address = std::max( sigAddress, ovlAddress ); } @@ -526,15 +451,15 @@ void CscOverlay::mergeCollections(CscRawDataCollection *out_coll, for (std::map< int,std::vector<uint16_t> >::const_iterator si=ovlSamples.begin(); si!=ovlSamples.end(); ++si){readstrips.insert(si->first);} std::vector<CscRawData*> datums = this->overlay(sigSamples, ovlSamples,address, spuID, out_coll->identify(), hash ); - if ( datums.size()==0 ) { msg<<MSG::WARNING<<"datums is size 0!"<<endmsg; } + if ( datums.size()==0 ) { ATH_MSG_WARNING("datums is size 0!"); } for (unsigned int di=0; di<datums.size(); ++di){ CscRawData* datum=datums[di]; hash = datum->hashId(); address = datum->address(); int stripstart = ( address & 0x000000FF) + 1 + 0; - msg <<MSG::DEBUG<< "Datum in layer="<<j<<" has hash="<<hash<<" address="<<address<<" stripstart="<<stripstart<<", "<< *datum <<endmsg; + ATH_MSG_DEBUG("Datum in layer="<<j<<" has hash="<<hash<<" address="<<address<<" stripstart="<<stripstart<<", "<< *datum ); if (datum->width()==0) { - msg<<MSG::WARNING<< "Datum has 0 width!" <<endmsg; + ATH_MSG_WARNING("Datum has 0 width!"); continue; } @@ -543,7 +468,7 @@ void CscOverlay::mergeCollections(CscRawDataCollection *out_coll, int stationEta = ( ((address & 0x00001000) >> 12 ) == 0x0) ? -1 : 1; int stationPhi = ( ( address & 0x0000E000) >> 13 ) + 1; Identifier me= m_cscHelper->elementID(stationName,stationEta,stationPhi); - msg<<MSG::VERBOSE<<"stationName,Eta,Phi="<<stationName<<","<<stationEta<<","<<stationPhi<<" - me="<<me<<endmsg; + ATH_MSG_VERBOSE("stationName,Eta,Phi="<<stationName<<","<<stationEta<<","<<stationPhi<<" - me="<<me); bool good=true; for (unsigned int j=0; j<datum->width(); ++j) { int chamberLayer = ( (address & 0x00000800) >> 11) + 0; @@ -553,24 +478,24 @@ void CscOverlay::mergeCollections(CscRawDataCollection *out_coll, int wireLayer = ( (address & 0x00000600) >> 9) + 1; int measuresPhi = ( (address & 0x00000100) >> 8); int strip = ( address & 0x000000FF) + 1 + j; - msg<<MSG::VERBOSE<<"det,chamberlayer,wirelayer,measuresphi,strip="<<det<<","<<chamberLayer<<","<<wireLayer<<","<<measuresPhi<<","<<strip<<endmsg; + ATH_MSG_VERBOSE("det,chamberlayer,wirelayer,measuresphi,strip="<<det<<","<<chamberLayer<<","<<wireLayer<<","<<measuresPhi<<","<<strip); // Added to Online -> Offline id in A side number is opposite bug#56002 if (measuresPhi) { int stationEta = ( ((address & 0x00001000) >> 12 ) == 0x0) ? -1 : 1; if (stationEta>0) { strip = 49-strip; - msg<<MSG::VERBOSE<<"FLIP strip, now strip="<<strip<<endmsg; + ATH_MSG_VERBOSE("FLIP strip, now strip="<<strip); } } insertedstrips.insert(strip);//for checks Identifier mechan= m_cscHelper->channelID(me,chamberLayer,wireLayer,measuresPhi,strip); - msg<<MSG::VERBOSE<<"mechan="<<mechan<<endmsg; + ATH_MSG_VERBOSE("mechan="<<mechan); const Identifier channelId = m_cscRdoDecoderTool->channelIdentifier(datum, j); if(!(m_cscHelper->valid(channelId))) { - msg << MSG::WARNING << "Invalid CSC Identifier in merge! - skipping " << channelId << endmsg; + ATH_MSG_WARNING("Invalid CSC Identifier in merge! - skipping " << channelId ); good=false; } - else{msg << MSG::DEBUG << "Valid CSC Identifier in merge " << channelId << endmsg;} + else{ATH_MSG_DEBUG("Valid CSC Identifier in merge " << channelId);} } if (good){ out_coll->push_back(datum); } else{ continue; } @@ -583,7 +508,7 @@ void CscOverlay::mergeCollections(CscRawDataCollection *out_coll, //check if (readstrips!=insertedstrips){ - msg << MSG::WARNING << "Readstrips != Insertedstrips: "<<endmsg; + ATH_MSG_WARNING("Readstrips != Insertedstrips: "); for (std::set<int>::const_iterator i = readstrips.begin(); i!=readstrips.end(); ++i){std::cout<<*i<<" ";} std::cout<<std::endl; for (std::set<int>::const_iterator i = insertedstrips.begin(); i!=insertedstrips.end(); ++i){std::cout<<*i<<" ";} std::cout<<std::endl; } @@ -593,7 +518,7 @@ void CscOverlay::mergeCollections(CscRawDataCollection *out_coll, for (unsigned int i=0; i<10; ++i) out_coll->set_spuCount(i,clusterCounts[i]); for (unsigned int i=0; i<2; ++i) { if (rpuCount[i] != 0) out_coll->addRPU(rpuCount[i]); } // FIXME --- need to be able to reset the dataType - should add a new method to CscRawDataCollection for this - msg<<MSG::DEBUG<<"mergeCollection<>() end "<<endmsg; + ATH_MSG_DEBUG("mergeCollection<>() end "); } uint32_t CscOverlay::stripData ( const std::vector<const CscRawData*>& data, @@ -603,8 +528,7 @@ uint32_t CscOverlay::stripData ( const std::vector<const CscRawData*>& data, const uint16_t spuID, const int gasLayer, bool isdata) { - MsgStream msg(msgSvc(), name()); - msg << MSG::DEBUG << "stripData<>() begin: gasLayer="<<gasLayer<<" spuID="<<spuID<<" isdata="<<isdata<<endmsg; + ATH_MSG_DEBUG("stripData<>() begin: gasLayer="<<gasLayer<<" spuID="<<spuID<<" isdata="<<isdata); samples.clear(); IdContext context = m_cscHelper->channel_context(); @@ -637,7 +561,7 @@ uint32_t CscOverlay::stripData ( const std::vector<const CscRawData*>& data, bool precision = (gasLayer==0) && (!(spuID==4 || spuID==9)); bool check = precision || non_precision; if ( !check ) { - //msg << MSG::DEBUG<<"Not precision or non_precision, skipping layer="<<layer<<", gasLayer="<<gasLayer<<", spuID="<<spuID<<endmsg; + //ATH_MSG_DEBUG("Not precision or non_precision, skipping layer="<<layer<<", gasLayer="<<gasLayer<<", spuID="<<spuID); continue; } @@ -645,7 +569,7 @@ uint32_t CscOverlay::stripData ( const std::vector<const CscRawData*>& data, unsigned int newaddress = datum->address(); //if we're going to later flip the data strip for bug#56002 if (isdata && needtoflip(newaddress)) { - msg << MSG::VERBOSE << "needtoflip in stripdata, newaddress was = "<<newaddress<<", strip was = "<<strip<<endmsg; + ATH_MSG_VERBOSE("needtoflip in stripdata, newaddress was = "<<newaddress<<", strip was = "<<strip); //old way //newaddress= newaddress- (width-1);//apparently need to shift the address to the highest strip @@ -659,7 +583,7 @@ uint32_t CscOverlay::stripData ( const std::vector<const CscRawData*>& data, uint32_t newStrip = uint32_t (49-oldStrip);//starts at 1 strip=strip - oldStrip + newStrip; - msg << MSG::VERBOSE << "needtoflip in stripdata, newaddress now = "<<newaddress<<", strip now = "<<strip<<endmsg; + ATH_MSG_VERBOSE("needtoflip in stripdata, newaddress now = "<<newaddress<<", strip now = "<<strip); } if ( needtoflip(newaddress) ){ @@ -673,27 +597,27 @@ uint32_t CscOverlay::stripData ( const std::vector<const CscRawData*>& data, if ( newaddress < address ) address = newaddress; } - msg << MSG::DEBUG << "stripData(): width="<<width<<" hashOffset="<<hashOffset<<" datumaddress="<<datum->address()<<" layer="<<layer<<" strip="<<strip<<", hash="<<hash<<" address="<<address<<endmsg; + ATH_MSG_DEBUG("stripData(): width="<<width<<" hashOffset="<<hashOffset<<" datumaddress="<<datum->address()<<" layer="<<layer<<" strip="<<strip<<", hash="<<hash<<" address="<<address); for (unsigned int j=0; j<width; ++j) { std::vector<uint16_t> adcs; bool extractSamples = datum->samples(j, numSamples, adcs); if ( !extractSamples ) { - msg << MSG::WARNING << "Unable to extract samples for strip " << j - << " Online Cluster width = " << width << " for number of Samples = " << numSamples << endmsg; + ATH_MSG_WARNING("Unable to extract samples for strip " << j + << " Online Cluster width = " << width << " for number of Samples = " << numSamples); } else { int newstrip = (strip+j); if (false && isdata && needtoflip(address)){ newstrip = strip-j; - msg << MSG::VERBOSE << "needtoflip in stripdata, newstrip is "<<newstrip<<endmsg; + ATH_MSG_VERBOSE("needtoflip in stripdata, newstrip is "<<newstrip); } samples.insert ( std::make_pair( newstrip, adcs) ); } } } - msg << MSG::DEBUG << "stripData<>() end: hash=" << hash << " address=" << address << endmsg; + ATH_MSG_DEBUG("stripData<>() end: hash=" << hash << " address=" << address); return address; } @@ -704,10 +628,9 @@ std::vector<CscRawData*> CscOverlay::overlay( const std::map< int,std::vector<ui const uint16_t collId, const uint32_t hash ) { - MsgStream msg(msgSvc(), name()); - msg << MSG::DEBUG << "overlay<>() begin: hash="<<hash<<" address="<<address<<endmsg; + ATH_MSG_DEBUG("overlay<>() begin: hash="<<hash<<" address="<<address); std::vector<CscRawData*> datas; - CscRawData * rawData = 0; + CscRawData * rawData = nullptr; int max = 192; if ( spuID == 4 || spuID == 9 ) max = 48; std::vector<uint16_t> samples; @@ -723,7 +646,7 @@ std::vector<CscRawData*> CscOverlay::overlay( const std::map< int,std::vector<ui bool used=false; if ( sig != sigSamples.end() && ovl == ovlSamples.end() ) { // real data only - msg << MSG::VERBOSE << "data only for i="<<i<<endmsg; + ATH_MSG_VERBOSE("data only for i="<<i); for ( unsigned int j=0; j<(*sig).second.size(); ++j ) { samples.push_back( (*sig).second.at(j) ); assert((*sig).second.at(j)<=MAX_AMPL); @@ -731,16 +654,16 @@ std::vector<CscRawData*> CscOverlay::overlay( const std::map< int,std::vector<ui width++; used=true; } else if ( sig == sigSamples.end() && ovl != ovlSamples.end() ) { // simulation only - msg << MSG::VERBOSE << "simulation only for i="<<i<<endmsg; + ATH_MSG_VERBOSE("simulation only for i="<<i); int myhashw=myhash+width; if (needtoflip(myaddress)) {myhashw=myhash-width;} double noise = m_cscCalibTool->stripNoise( (myhashw), false );//in ADC counts for ( unsigned int j=0; j<(*ovl).second.size(); ++j ) { double theNoise = CLHEP::RandGauss::shoot(m_rndmEngine, 0.0, noise); float adcCount = (*ovl).second.at(j) + theNoise ;//add noise if ( adcCount > MAX_AMPL ) { - msg << MSG::DEBUG << "value out of range (adding noise): " << adcCount << " " + ATH_MSG_DEBUG("value out of range (adding noise): " << adcCount << " " << " Setting it to max value = " << MAX_AMPL - << " IdentifierHash is " << (myhashw) <<endmsg; + << " IdentifierHash is " << (myhashw)); adcCount = MAX_AMPL; } samples.push_back( (uint16_t) rint(adcCount) ); @@ -748,15 +671,15 @@ std::vector<CscRawData*> CscOverlay::overlay( const std::map< int,std::vector<ui width++; used=true; } else if ( sig != sigSamples.end() && ovl != ovlSamples.end() ) { // real data + MC - msg << MSG::VERBOSE << "data and simulation for i="<<i<<endmsg; + ATH_MSG_VERBOSE("data and simulation for i="<<i); int myhashw=myhash+width; if (needtoflip(myaddress)) {myhashw=myhash-width;} double pedestal = m_cscCalibTool->stripPedestal( (myhashw), false );//in ADC counts for ( unsigned int j=0; j<(*sig).second.size(); ++j ) { float adcCount = (*sig).second.at(j) + (*ovl).second.at(j) - pedestal ;//subtract pedestal only (data already has noise) if ( adcCount > MAX_AMPL ) { - msg << MSG::DEBUG << "value out of range (adding data+MC samples - pedestal): " << adcCount << " " + ATH_MSG_DEBUG("value out of range (adding data+MC samples - pedestal): " << adcCount << " " << " Setting it to max value = " << MAX_AMPL - << " IdentifierHash is " << (myhashw) <<endmsg; + << " IdentifierHash is " << (myhashw)); adcCount = MAX_AMPL; } samples.push_back( (uint16_t) rint(adcCount) ); @@ -777,14 +700,14 @@ std::vector<CscRawData*> CscOverlay::overlay( const std::map< int,std::vector<ui rawData->setHashID(myhash); rawData->setTime(0);//ACH - TODO: should be made significantly more clever! datas.push_back(rawData); - msg << MSG::DEBUG << "overlay<>() add datum: hash="<<myhash<<" address="<<myaddress<<" width="<<width<<endmsg; + ATH_MSG_DEBUG("overlay<>() add datum: hash="<<myhash<<" address="<<myaddress<<" width="<<width); samples.clear(); if (!needtoflip(myaddress)) {myhash+=width; myaddress+=width;} width=0; } } - msg << MSG::DEBUG << "overlay<>() end: CscRawDatas size="<<datas.size()<<endmsg; + ATH_MSG_DEBUG("overlay<>() end: CscRawDatas size="<<datas.size()); return datas; } -- GitLab From 9340619078210e054521ea1aa242894b505233b5 Mon Sep 17 00:00:00 2001 From: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> Date: Thu, 19 Jul 2018 10:13:46 +0200 Subject: [PATCH 538/562] Updating the code to be more in sync with branch 21.2. Now explicitly initialising the m_isConfigured variable to false in the constructor, and referring to HFORType::noType more explicitly in a return statement. Former-commit-id: 3b5a6744cd7a2ac5555db4227c0e1ecd1f5ab776 --- .../HFORTools/Root/HFORSelectionTool.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/HFORTools/Root/HFORSelectionTool.cxx b/PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/HFORTools/Root/HFORSelectionTool.cxx index b583f6e93db2..109f94c42e09 100644 --- a/PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/HFORTools/Root/HFORSelectionTool.cxx +++ b/PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/HFORTools/Root/HFORSelectionTool.cxx @@ -41,7 +41,8 @@ HFORSelectionTool::HFORSelectionTool( const std::string& name ) m_sampleRunNumber (0), m_sampleName ("unknown"), m_evtCounterAll (0), - m_evtCounterKilled (0) { + m_evtCounterKilled (0), + m_isConfigured (false) { declareProperty( "MatchCone", m_matchCone = 0.4 ); declareProperty( "runConfigFile", m_runConfigFile = "HFORTools/mc15_AlpgenPythia_2016.cfg" ) ; declareProperty( "HFORStrategy", m_HFORStrategy = "DRBased" ); @@ -269,7 +270,7 @@ StatusCode HFORSelectionTool::setSampleType() { //============================================================================== HFORType HFORSelectionTool::getSampleType() { if (! m_isConfigured) { - ATH_CHECK( setSampleType(), noType ); + ATH_CHECK( setSampleType(), HFORType::noType ); m_isConfigured = true; } //Return an enum object with the type of the sample -- GitLab From c70d5ba0db41d5fd1250735706794f45f8302326 Mon Sep 17 00:00:00 2001 From: Walter Lampl <Walter.Lampl@cern.ch> Date: Thu, 19 Jul 2018 10:25:52 +0200 Subject: [PATCH 539/562] fix naming of top-sequence in ComponentAccumulator Former-commit-id: 13ca4a41575598f0a6362b230b6f4d57e38ea824 --- Control/AthenaConfiguration/python/ComponentAccumulator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Control/AthenaConfiguration/python/ComponentAccumulator.py b/Control/AthenaConfiguration/python/ComponentAccumulator.py index ed445f6118ec..4f1d2c64e3ac 100644 --- a/Control/AthenaConfiguration/python/ComponentAccumulator.py +++ b/Control/AthenaConfiguration/python/ComponentAccumulator.py @@ -24,7 +24,7 @@ class ComponentAccumulator(object): def __init__(self): self._msg=logging.getLogger('ComponentAccumulator') - self._sequence=AthSequencer() #(Nested) sequence of event processing algorithms per sequence + their private tools + self._sequence=AthSequencer('AthAlgSeq') #(Nested) sequence of event processing algorithms per sequence + their private tools self._conditionsAlgs=[] #Unordered list of conditions algorithms + their private tools self._services=[] #List of service, not yet sure if the order matters here in the MT age self._conditionsInput=set() #List of database folder (as string), eventually passed to IOVDbSvc -- GitLab From d94a539fc89a3af92b08756c433c4e37d17cf8ee Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Thu, 19 Jul 2018 10:32:58 +0200 Subject: [PATCH 540/562] Solve remaining instance of coverity defects 115353, 115355, 115356 in InDetV0Finder.cxx Former-commit-id: 837895817223357f41950c2b924ad3b954894a6f --- .../InDetV0Finder/src/InDetV0Finder.cxx | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/InnerDetector/InDetRecAlgs/InDetV0Finder/src/InDetV0Finder.cxx b/InnerDetector/InDetRecAlgs/InDetV0Finder/src/InDetV0Finder.cxx index 5f948f8c2bd8..f61330ca7406 100755 --- a/InnerDetector/InDetRecAlgs/InDetV0Finder/src/InDetV0Finder.cxx +++ b/InnerDetector/InDetRecAlgs/InDetV0Finder/src/InDetV0Finder.cxx @@ -227,13 +227,6 @@ StatusCode InDetV0Finder::execute() xAOD::VertexAuxContainer* laAuxContainer(0); xAOD::VertexContainer* lbContainer(0); xAOD::VertexAuxContainer* lbAuxContainer(0); - -// call InDetV0 finder - ATH_CHECK( m_v0FinderTool->performSearch(v0Container, v0AuxContainer, - ksContainer, ksAuxContainer, - laContainer, laAuxContainer, - lbContainer, lbAuxContainer, - primaryVertex, importedVxContainer) ); auto cleanUpOnExit= [&](){ delete v0Container; @@ -245,9 +238,20 @@ StatusCode InDetV0Finder::execute() delete lbContainer; delete lbAuxContainer; }; - + // + const auto statusOfSearch = m_v0FinderTool->performSearch(v0Container, v0AuxContainer, + ksContainer, ksAuxContainer, + laContainer, laAuxContainer, + lbContainer, lbAuxContainer, + primaryVertex, importedVxContainer); + // + if (statusOfSearch != StatusCode::SUCCESS){ + ATH_MSG_ERROR("Vertex search of v0Container failed."); + cleanUpOnExit(); + return StatusCode::FAILURE; + } + // //---- Recording section: write the results to StoreGate ---// - SG::WriteHandle<xAOD::VertexContainer> h_V0( m_v0Key ); if ( h_V0.record(std::unique_ptr<xAOD::VertexContainer>(v0Container), std::unique_ptr<xAOD::VertexAuxContainer>(v0AuxContainer)) !=StatusCode::SUCCESS){ -- GitLab From 14922ed439db9ab046afed27e8429a623d800ad7 Mon Sep 17 00:00:00 2001 From: Nick Styles <nicholas.styles@cern.ch> Date: Thu, 19 Jul 2018 11:29:19 +0200 Subject: [PATCH 541/562] Temporarily removed InDetStandardPerformanceAll (validation plots for all reconstructed tracks) to avoid strange TrackSummary issues in master when running ART tests. This will anyway be imminently replaced with a new validation back end. Former-commit-id: 42602f01818e06adc723d9307a7cdb48796b8167 --- .../share/InDetRecNtupleCreation.py | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecNtupleCreation.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecNtupleCreation.py index c836e7d344b3..815a8b850baf 100644 --- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecNtupleCreation.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecNtupleCreation.py @@ -333,20 +333,20 @@ if InDetFlags.doStandardPlots(): from InDetPerformanceRTT.InDetPerformanceRTTConf import IDStandardPerformance as InDetStandardPerformance # all tracks - InDetStandardPerformanceAll = InDetStandardPerformance (name = "InDetStandardPerformanceAll", - tracksName = InDetKeys.UnslimmedTracks(), - tracksTruthName = InDetKeys.UnslimmedTracksTruth(), - SummaryTool = InDetTrackSummaryToolSharedHits, - HoleSearch = InDetHoleSearchTool, - useTrackSelection = False, - HistDirectoryName = "AllTracks", - TruthToTrackTool = TruthToTrackTool, - doUpgrade = InDetFlags.doSLHC(), - DoTruth = InDetFlags.doTruth()) - - if InDetFlags.doDBMstandalone() or InDetFlags.doDBM(): - InDetStandardPerformanceAll.tracksName = InDetKeys.DBMTracks() - InDetStandardPerformanceAll.tracksTruthName = InDetKeys.DBMTracksTruth() +# InDetStandardPerformanceAll = InDetStandardPerformance (name = "InDetStandardPerformanceAll", +# tracksName = InDetKeys.UnslimmedTracks(), +# tracksTruthName = InDetKeys.UnslimmedTracksTruth(), +# SummaryTool = InDetTrackSummaryToolSharedHits, +# HoleSearch = InDetHoleSearchTool, +# useTrackSelection = False, +# HistDirectoryName = "AllTracks", +# TruthToTrackTool = TruthToTrackTool, +# doUpgrade = InDetFlags.doSLHC(), +# DoTruth = InDetFlags.doTruth())# +# +# if InDetFlags.doDBMstandalone() or InDetFlags.doDBM(): +# InDetStandardPerformanceAll.tracksName = InDetKeys.DBMTracks() +# InDetStandardPerformanceAll.tracksTruthName = InDetKeys.DBMTracksTruth() # if InDetFlags.doDBM(): # InDetStandardPerformanceDBM = InDetStandardPerformance (name = "InDetStandardPerformanceDBM", @@ -362,13 +362,13 @@ if InDetFlags.doStandardPlots(): # ToolSvc += InDetStandardPerformanceDBM # InDetTrackPerfMonManager.AthenaMonTools += [ InDetStandardPerformanceDBM ] - ToolSvc += InDetStandardPerformanceAll - if (InDetFlags.doPrintConfigurables()): - print InDetStandardPerformanceAll +# ToolSvc += InDetStandardPerformanceAll +# if (InDetFlags.doPrintConfigurables()): +# print InDetStandardPerformanceAll # if InDetFlags.doDBM(): # print InDetStandardPerformanceDBM - InDetTrackPerfMonManager.AthenaMonTools += [ InDetStandardPerformanceAll ] + # InDetTrackPerfMonManager.AthenaMonTools += [ InDetStandardPerformanceAll ] #monitoring truth-/pseudo-tracks in particular if InDetFlags.doPseudoTracking() : -- GitLab From 5a2ad058abc779158a816fec67bb258a4c19d0bb Mon Sep 17 00:00:00 2001 From: Mark Hodgkinson <m.hodgkinson@sheffield.ac.uk> Date: Thu, 19 Jul 2018 11:48:33 +0100 Subject: [PATCH 542/562] Migrate to use ConstDataVector for selected muons, to avoid usage of const_cast. Former-commit-id: 7a37087f39d2661c724a01822ddf69940d273fd7 --- Reconstruction/eflowRec/eflowRec/PFLeptonSelector.h | 8 ++++---- Reconstruction/eflowRec/src/PFLeptonSelector.cxx | 11 +++++------ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Reconstruction/eflowRec/eflowRec/PFLeptonSelector.h b/Reconstruction/eflowRec/eflowRec/PFLeptonSelector.h index 76d8b82425ec..7587afd82c19 100644 --- a/Reconstruction/eflowRec/eflowRec/PFLeptonSelector.h +++ b/Reconstruction/eflowRec/eflowRec/PFLeptonSelector.h @@ -34,7 +34,7 @@ private: void storeElectronCells(const xAOD::Egamma& electron, SG::WriteHandle<ConstDataVector<CaloCellContainer> > leptonCaloCellsWriteHandle); /** select muons to use */ - StatusCode selectMuons(SG::WriteHandle<xAOD::MuonContainer>& selectedMuonsWriteHandle, SG::WriteHandle<ConstDataVector<CaloCellContainer> > leptonCaloCellsWriteHandle); + StatusCode selectMuons(SG::WriteHandle<ConstDataVector<xAOD::MuonContainer> >& selectedMuonsWriteHandle, SG::WriteHandle<ConstDataVector<CaloCellContainer> > leptonCaloCellsWriteHandle); /** store the cells of the muons */ void storeMuonCells(const xAOD::Muon& muon, SG::WriteHandle<ConstDataVector<CaloCellContainer> > leptonCaloCellsWriteHandle); @@ -43,7 +43,7 @@ private: void storeLeptonCells(const xAOD::CaloCluster& theCluster, SG::WriteHandle<ConstDataVector<CaloCellContainer> > leptonCaloCellsWriteHandle); /** Put lepton containers and list of lepton cells into Storegate */ - StatusCode recordLeptonContainers(SG::WriteHandle<xAOD::ElectronContainer>& selectedElectronsWriteHandle, SG::WriteHandle<xAOD::MuonContainer>& selectedMuonsWriteHandle, SG::WriteHandle<ConstDataVector<CaloCellContainer> > leptonCaloCellsWriteHandle ); + StatusCode recordLeptonContainers(SG::WriteHandle<xAOD::ElectronContainer>& selectedElectronsWriteHandle, SG::WriteHandle<ConstDataVector<xAOD::MuonContainer> >& selectedMuonsWriteHandle, SG::WriteHandle<ConstDataVector<CaloCellContainer> > leptonCaloCellsWriteHandle ); /** ReadHandle for the ElectronContainer to be used as input */ SG::ReadHandleKey<xAOD::ElectronContainer> m_electronsReadHandleKey{this,"inputElectronsName","Electrons","ReadHandle for the ElectronContainer to be used as input"}; @@ -55,8 +55,8 @@ private: SG::WriteHandleKey<xAOD::ElectronContainer> m_selectedElectronsWriteHandleKey{this,"outputElectronsName","eflowRec_selectedElectrons","WriteHandle for the ElectronContainer, that will be filled with electrons passing the electron ID in PFLeptonSelector::selectElectrons"}; /** WriteHandle for the MuonContainer, that will be filled with muons passing the muon ID in PFLeptonSelector::selectMuons */ - SG::WriteHandleKey<xAOD::MuonContainer> m_selectedMuonsWriteHandleKey{this,"outputMuonsName","eflowRec_selectedMuons","WriteHandle for the MuonContainer, that will be filled with muons passing the muon ID in PFLeptonSelector::selectMuons"}; - + SG::WriteHandleKey<ConstDataVector<xAOD::MuonContainer> > m_selectedMuonsWriteHandleKey{this,"outputMuonsName","eflowRec_selectedMuons","WriteHandle for the MuonContainer, that will be filled with muons passing the muon ID in PFLeptonSelector::selectMuons"}; + /** WriteHandle for the CaloCellContainer, that will store calorimeter cells associated to leptons */ SG::WriteHandleKey<ConstDataVector<CaloCellContainer> > m_leptonCaloCellsWriteHandleKey{this,"outputLeptonCellsName","eflowRec_leptonCellContainer","WriteHandle for the CaloCellContainer, that will store calorimeter cells associated to leptons"}; diff --git a/Reconstruction/eflowRec/src/PFLeptonSelector.cxx b/Reconstruction/eflowRec/src/PFLeptonSelector.cxx index 9e215a634211..3212ce65beae 100644 --- a/Reconstruction/eflowRec/src/PFLeptonSelector.cxx +++ b/Reconstruction/eflowRec/src/PFLeptonSelector.cxx @@ -20,7 +20,7 @@ StatusCode PFLeptonSelector::initialize(){ StatusCode PFLeptonSelector::execute(){ SG::WriteHandle<xAOD::ElectronContainer> selectedElectronsWriteHandle(m_selectedElectronsWriteHandleKey); - SG::WriteHandle<xAOD::MuonContainer> selectedMuonsWriteHandle(m_selectedMuonsWriteHandleKey); + SG::WriteHandle<ConstDataVector<xAOD::MuonContainer> > selectedMuonsWriteHandle(m_selectedMuonsWriteHandleKey); SG::WriteHandle<ConstDataVector<CaloCellContainer> > leptonCaloCellsWriteHandle(m_leptonCaloCellsWriteHandleKey); if (recordLeptonContainers(selectedElectronsWriteHandle,selectedMuonsWriteHandle,leptonCaloCellsWriteHandle).isFailure()) { @@ -85,7 +85,7 @@ void PFLeptonSelector::storeElectronCells(const xAOD::Egamma& electron, SG::Writ } -StatusCode PFLeptonSelector::selectMuons(SG::WriteHandle<xAOD::MuonContainer>& selectedMuonsWriteHandle, SG::WriteHandle<ConstDataVector<CaloCellContainer> > leptonCaloCellsWriteHandle) { +StatusCode PFLeptonSelector::selectMuons(SG::WriteHandle<ConstDataVector<xAOD::MuonContainer> >& selectedMuonsWriteHandle, SG::WriteHandle<ConstDataVector<CaloCellContainer> > leptonCaloCellsWriteHandle) { SG::ReadHandle<xAOD::MuonContainer> muonsReadHandle(m_muonsReadHandleKey); @@ -102,8 +102,7 @@ StatusCode PFLeptonSelector::selectMuons(SG::WriteHandle<xAOD::MuonContainer>& s xAOD::Muon::Quality muonQuality = theMuon->quality(); if( muonQuality <= xAOD::Muon::Medium) { - - if (selectedMuonsWriteHandle.isValid()) selectedMuonsWriteHandle->push_back(const_cast<xAOD::Muon*>(theMuon)); + if (selectedMuonsWriteHandle.isValid()) selectedMuonsWriteHandle->push_back(theMuon); else ATH_MSG_WARNING("Do not have valid WriteHandle for MuonContainer with name: " << selectedMuonsWriteHandle.key()); if (true == m_storeLeptonCells) this->storeMuonCells(*theMuon,leptonCaloCellsWriteHandle); }//Medium muons @@ -139,7 +138,7 @@ void PFLeptonSelector::storeLeptonCells(const xAOD::CaloCluster& theCluster, SG: else ATH_MSG_WARNING("This cluster has an invalid pointer to its cells, in storeLeptonCells"); } -StatusCode PFLeptonSelector::recordLeptonContainers(SG::WriteHandle<xAOD::ElectronContainer>& selectedElectronsWriteHandle, SG::WriteHandle<xAOD::MuonContainer>& selectedMuonsWriteHandle,SG::WriteHandle<ConstDataVector<CaloCellContainer> > leptonCaloCellsWriteHandle){ +StatusCode PFLeptonSelector::recordLeptonContainers(SG::WriteHandle<xAOD::ElectronContainer>& selectedElectronsWriteHandle, SG::WriteHandle<ConstDataVector<xAOD::MuonContainer> >& selectedMuonsWriteHandle,SG::WriteHandle<ConstDataVector<CaloCellContainer> > leptonCaloCellsWriteHandle){ StatusCode sc = selectedElectronsWriteHandle.record(std::make_unique<xAOD::ElectronContainer>(SG::VIEW_ELEMENTS)); @@ -148,7 +147,7 @@ StatusCode PFLeptonSelector::recordLeptonContainers(SG::WriteHandle<xAOD::Electr return sc; } - sc = selectedMuonsWriteHandle.record(std::make_unique<xAOD::MuonContainer>(SG::VIEW_ELEMENTS)); + sc = selectedMuonsWriteHandle.record(std::make_unique<ConstDataVector<xAOD::MuonContainer> >(SG::VIEW_ELEMENTS)); if (sc.isFailure()) { ATH_MSG_WARNING("Could not record muon WriteHandle with key: " << selectedMuonsWriteHandle.key()); -- GitLab From 52a37891809147a53e63fe0fb901c6253e95c9f3 Mon Sep 17 00:00:00 2001 From: John Chapman <jchapman@cern.ch> Date: Thu, 19 Jul 2018 13:11:04 +0200 Subject: [PATCH 543/562] Add checks whether Geant4 commands applied via the G4UImanager succeed This commit adds some code to check whether commands applied via the `G4UImanager` succeed or fail. This version doesn't do anything with the information other than print a message, but this can be extended in future commits. Former-commit-id: 06e5c2ed96c145d3fcb5d3231074572f2cef7428 --- .../G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx | 24 +++++++++++- .../G4Atlas/G4AtlasAlg/src/G4AtlasAlg.h | 3 ++ .../src/G4AtlasWorkerRunManager.cxx | 21 ++++++++++ .../G4AtlasAlg/src/G4AtlasWorkerRunManager.h | 3 ++ .../G4AtlasTools/PhysicsListToolBase.h | 4 ++ .../G4AtlasTools/src/PhysicsListToolBase.cxx | 38 +++++++++++++++++-- .../ISF_Geant4Tools/src/TransportTool.cxx | 29 ++++++++++++-- .../ISF_Geant4Tools/src/TransportTool.h | 3 ++ 8 files changed, 116 insertions(+), 9 deletions(-) diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx index 124880d4930b..663e81155772 100644 --- a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx +++ b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx @@ -14,6 +14,7 @@ #include "G4AtlasRunManager.h" // Geant4 includes +#include "G4StateManager.hh" #include "G4TransportationManager.hh" #include "G4RunManagerKernel.hh" #include "G4EventManager.hh" @@ -199,8 +200,10 @@ void G4AtlasAlg::initializeOnce() } // Send UI commands + ATH_MSG_DEBUG("G4 Command: Trying at the end of initializeOnce()"); for (auto g4command : m_g4commands) { - ui->ApplyCommand( g4command ); + int returnCode = ui->ApplyCommand( g4command ); + commandLog(returnCode, g4command); } // G4 init moved to PyG4AtlasAlg / G4AtlasEngine @@ -395,3 +398,22 @@ void G4AtlasAlg::releaseGeoModel() m_releaseGeoModel=false; // Don't do that again... return; } + +void G4AtlasAlg::commandLog(int returnCode, const std::string& commandString) const +{ + switch(returnCode) { + case 0: { ATH_MSG_DEBUG("G4 Command: " << commandString << " - Command Succeeded"); } break; + case 100: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Command Not Found!"); } break; + case 200: { + auto* stateManager = G4StateManager::GetStateManager(); + ATH_MSG_DEBUG("G4 Command: " << commandString << " - Illegal Application State (" << + stateManager->GetStateString(stateManager->GetCurrentState()) << ")!"); + } break; + case 300: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Parameter Out of Range!"); } break; + case 400: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Parameter Unreadable!"); } break; + case 500: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Parameter Out of Candidates!"); } break; + case 600: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Alias Not Found!"); } break; + default: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Unknown Status!"); } break; + } + +} diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.h b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.h index 18c21e58fdbd..b577c1a30cdc 100644 --- a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.h +++ b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.h @@ -85,6 +85,9 @@ public: private: + /// This command prints a message about a G4Command depending on its returnCode + void commandLog(int returnCode, const std::string& commandString) const; + /// Releases the GeoModel geometry from memory once it has been used /// to build the G4 geometry and is no-longer required void releaseGeoModel(); diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasWorkerRunManager.cxx b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasWorkerRunManager.cxx index 420cf9b2563e..0d9753216e2d 100644 --- a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasWorkerRunManager.cxx +++ b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasWorkerRunManager.cxx @@ -82,11 +82,13 @@ void G4AtlasWorkerRunManager::Initialize() ** If ATLAS ever decides to run multiple G4 runs in the same job, all the MT initialization ** will have to be thoroughly reviewed. */ + ATH_MSG_DEBUG("G4 Command: Trying at the end of Initialize()"); G4MTRunManager* masterRM = G4MTRunManager::GetMasterRunManager(); std::vector<G4String> cmds = masterRM->GetCommandStack(); G4UImanager* uimgr = G4UImanager::GetUIpointer(); for(const auto& it : cmds) { int retVal = uimgr->ApplyCommand(it); + CommandLog(retVal, it); if(retVal!=fCommandSucceeded) { std::string errMsg{"Failed to apply command <"}; errMsg += (it + ">. Return value " + std::to_string(retVal)); @@ -205,4 +207,23 @@ void G4AtlasWorkerRunManager::RunTermination() G4WorkerRunManager::RunTermination(); } +void G4AtlasWorkerRunManager::CommandLog(int returnCode, const std::string& commandString) const +{ + switch(returnCode) { + case 0: { ATH_MSG_DEBUG("G4 Command: " << commandString << " - Command Succeeded"); } break; + case 100: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Command Not Found!"); } break; + case 200: { + auto* stateManager = G4StateManager::GetStateManager(); + ATH_MSG_DEBUG("G4 Command: " << commandString << " - Illegal Application State (" << + stateManager->GetStateString(stateManager->GetCurrentState()) << ")!"); + } break; + case 300: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Parameter Out of Range!"); } break; + case 400: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Parameter Unreadable!"); } break; + case 500: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Parameter Out of Candidates!"); } break; + case 600: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Alias Not Found!"); } break; + default: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Unknown Status!"); } break; + } + +} + #endif // G4MULTITHREADED diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasWorkerRunManager.h b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasWorkerRunManager.h index 7068a7e75cc1..974c11c36a0e 100644 --- a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasWorkerRunManager.h +++ b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasWorkerRunManager.h @@ -51,6 +51,9 @@ private: /// Pure singleton private constructor G4AtlasWorkerRunManager(); + /// This command prints a message about a G4Command depending on its returnCode + void CommandLog(int returnCode, const std::string& commandString) const; + /// Log a message using the Athena controlled logging system MsgStream& msg( MSG::Level lvl ) const { return m_msg << lvl; } /// Check whether the logging system is active at the provided verbosity level diff --git a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/PhysicsListToolBase.h b/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/PhysicsListToolBase.h index 34a9c727b15a..b917fe53d488 100644 --- a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/PhysicsListToolBase.h +++ b/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/PhysicsListToolBase.h @@ -36,6 +36,10 @@ public: virtual void SetPhysicsOptions() override; private: + + /// This command prints a message about a G4Command depending on its returnCode + void CommandLog(int returnCode, const std::string& commandString) const; + ToolHandleArray<IPhysicsOptionTool> m_phys_option; ToolHandleArray<IPhysicsOptionTool> m_phys_decay; G4VModularPhysicsList* m_physicsList; ///!< Handle on the physics list diff --git a/Simulation/G4Atlas/G4AtlasTools/src/PhysicsListToolBase.cxx b/Simulation/G4Atlas/G4AtlasTools/src/PhysicsListToolBase.cxx index 410a197ca305..83f9da280374 100644 --- a/Simulation/G4Atlas/G4AtlasTools/src/PhysicsListToolBase.cxx +++ b/Simulation/G4Atlas/G4AtlasTools/src/PhysicsListToolBase.cxx @@ -5,6 +5,7 @@ #include "G4AtlasTools/PhysicsListToolBase.h" #include "G4VUserPhysicsList.hh" +#include "G4StateManager.hh" #include "G4RunManager.hh" #include "G4EmProcessOptions.hh" #include "G4UImanager.hh" @@ -122,22 +123,32 @@ void PhysicsListToolBase::SetPhysicsOptions() { m_physicsList->SetDefaultCutValue(m_generalCut); } + + std::vector<std::string> g4commands; if (m_neutronTimeCut > 0. && std::fabs(m_neutronTimeCut)>std::numeric_limits<double>::epsilon()) { std::ostringstream oss; oss<<"/physics_engine/neutron/timeLimit "<<m_neutronTimeCut<<" ns"; - G4UImanager* UImanager = G4UImanager::GetUIpointer(); - UImanager->ApplyCommand(oss.str()); + g4commands.push_back(oss.str()); } if (m_neutronEnergyCut > 0. && std::fabs(m_neutronEnergyCut)>std::numeric_limits<double>::epsilon()) { std::ostringstream oss; oss<<"/physics_engine/neutron/energyLimit "<<m_neutronEnergyCut<<" MeV"; - G4UImanager* UImanager = G4UImanager::GetUIpointer(); - UImanager->ApplyCommand(oss.str()); + g4commands.push_back(oss.str()); } + if(!g4commands.empty()) { + // Send UI commands + ATH_MSG_DEBUG("G4 Command: Trying in SetPhysicsOptions()"); + G4UImanager* ui = G4UImanager::GetUIpointer(); + for (auto g4command : g4commands) { + int returnCode = ui->ApplyCommand( g4command ); + CommandLog(returnCode, g4command); + } + } + G4EmProcessOptions emo; if (m_emMaxEnergy>=0) emo.SetMaxEnergy(m_emMaxEnergy); if (m_emDEDXBinning>=0) emo.SetDEDXBinning(m_emDEDXBinning); @@ -149,3 +160,22 @@ void PhysicsListToolBase::SetPhysicsOptions() } return; } + +void PhysicsListToolBase::CommandLog(int returnCode, const std::string& commandString) const +{ + switch(returnCode) { + case 0: { ATH_MSG_DEBUG("G4 Command: " << commandString << " - Command Succeeded"); } break; + case 100: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Command Not Found!"); } break; + case 200: { + auto* stateManager = G4StateManager::GetStateManager(); + ATH_MSG_DEBUG("G4 Command: " << commandString << " - Illegal Application State (" << + stateManager->GetStateString(stateManager->GetCurrentState()) << ")!"); + } break; + case 300: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Parameter Out of Range!"); } break; + case 400: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Parameter Unreadable!"); } break; + case 500: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Parameter Out of Candidates!"); } break; + case 600: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Alias Not Found!"); } break; + default: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Unknown Status!"); } break; + } + +} diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TransportTool.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TransportTool.cxx index 820d227f7b52..8eae8bde348a 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TransportTool.cxx +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TransportTool.cxx @@ -26,7 +26,6 @@ #include "HepMC/GenParticle.h" // Geant4 classes -#include "G4UImanager.hh" #include "G4LorentzVector.hh" #include "G4PrimaryVertex.hh" #include "G4PrimaryParticle.hh" @@ -34,6 +33,7 @@ #include "G4Geantino.hh" #include "G4ChargedGeantino.hh" #include "G4ParticleTable.hh" +#include "G4StateManager.hh" #include "G4TransportationManager.hh" #include "G4UImanager.hh" #include "G4ScoringManager.hh" @@ -185,9 +185,10 @@ void iGeant4::G4TransportTool::initializeOnce() } // Send UI commands - for (auto g4command : m_g4commands){ - int the_return = ui->ApplyCommand(g4command); - ATH_MSG_INFO("Returned " << the_return << " from G4 Command: " << g4command); + ATH_MSG_DEBUG("G4 Command: Trying at the end of initializeOnce()"); + for (auto g4command : m_g4commands) { + int returnCode = ui->ApplyCommand( g4command ); + commandLog(returnCode, g4command); } return; @@ -290,3 +291,23 @@ HepMC::GenEvent* iGeant4::G4TransportTool::genEvent() const } +//________________________________________________________________________ +void iGeant4::G4TransportTool::commandLog(int returnCode, const std::string& commandString) const +{ + switch(returnCode) { + case 0: { ATH_MSG_DEBUG("G4 Command: " << commandString << " - Command Succeeded"); } break; + case 100: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Command Not Found!"); } break; + case 200: { + auto* stateManager = G4StateManager::GetStateManager(); + ATH_MSG_DEBUG("G4 Command: " << commandString << " - Illegal Application State (" << + stateManager->GetStateString(stateManager->GetCurrentState()) << ")!"); + } break; + case 300: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Parameter Out of Range!"); } break; + case 400: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Parameter Unreadable!"); } break; + case 500: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Parameter Out of Candidates!"); } break; + case 600: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Alias Not Found!"); } break; + default: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Unknown Status!"); } break; + } + +} + diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TransportTool.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TransportTool.h index 7113f6856368..748436659a46 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TransportTool.h +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TransportTool.h @@ -88,6 +88,9 @@ namespace iGeant4 private: + /// This command prints a message about a G4Command depending on its returnCode + void commandLog(int returnCode, const std::string& commandString) const; + HepMC::GenEvent* genEvent() const; /// @name Configurable Properties -- GitLab From 5b05215494899be4b1d2e75fa849dbf304d44d03 Mon Sep 17 00:00:00 2001 From: Mark Hodgkinson <m.hodgkinson@sheffield.ac.uk> Date: Thu, 19 Jul 2018 13:52:35 +0100 Subject: [PATCH 544/562] Migrate to use ConstDataVector with electrons, to avoid const_cast Former-commit-id: 1bd145e0990a5f3e9f7acc45ba85de52bd655743 --- Reconstruction/eflowRec/eflowRec/PFLeptonSelector.h | 6 +++--- Reconstruction/eflowRec/src/PFLeptonSelector.cxx | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Reconstruction/eflowRec/eflowRec/PFLeptonSelector.h b/Reconstruction/eflowRec/eflowRec/PFLeptonSelector.h index 7587afd82c19..2955b75b179f 100644 --- a/Reconstruction/eflowRec/eflowRec/PFLeptonSelector.h +++ b/Reconstruction/eflowRec/eflowRec/PFLeptonSelector.h @@ -28,7 +28,7 @@ public: private: /** Select electrons to use */ - StatusCode selectElectrons(SG::WriteHandle<xAOD::ElectronContainer>& selectedElectronsWriteHandle, SG::WriteHandle<ConstDataVector<CaloCellContainer> > leptonCaloCellsWriteHandle); + StatusCode selectElectrons(SG::WriteHandle<ConstDataVector<xAOD::ElectronContainer >>& selectedElectronsWriteHandle, SG::WriteHandle<ConstDataVector<CaloCellContainer> > leptonCaloCellsWriteHandle); /** store the cells of the electrons */ void storeElectronCells(const xAOD::Egamma& electron, SG::WriteHandle<ConstDataVector<CaloCellContainer> > leptonCaloCellsWriteHandle); @@ -43,7 +43,7 @@ private: void storeLeptonCells(const xAOD::CaloCluster& theCluster, SG::WriteHandle<ConstDataVector<CaloCellContainer> > leptonCaloCellsWriteHandle); /** Put lepton containers and list of lepton cells into Storegate */ - StatusCode recordLeptonContainers(SG::WriteHandle<xAOD::ElectronContainer>& selectedElectronsWriteHandle, SG::WriteHandle<ConstDataVector<xAOD::MuonContainer> >& selectedMuonsWriteHandle, SG::WriteHandle<ConstDataVector<CaloCellContainer> > leptonCaloCellsWriteHandle ); + StatusCode recordLeptonContainers(SG::WriteHandle<ConstDataVector<xAOD::ElectronContainer >>& selectedElectronsWriteHandle, SG::WriteHandle<ConstDataVector<xAOD::MuonContainer> >& selectedMuonsWriteHandle, SG::WriteHandle<ConstDataVector<CaloCellContainer> > leptonCaloCellsWriteHandle ); /** ReadHandle for the ElectronContainer to be used as input */ SG::ReadHandleKey<xAOD::ElectronContainer> m_electronsReadHandleKey{this,"inputElectronsName","Electrons","ReadHandle for the ElectronContainer to be used as input"}; @@ -52,7 +52,7 @@ private: SG::ReadHandleKey<xAOD::MuonContainer> m_muonsReadHandleKey{this,"inputMuonsName","Muons","ReadHandle for the MuonContainer to be used as input"}; /** WriteHandle for the ElectronContainer, that will be filled with electrons passing the electron ID in PFLeptonSelector::selectElectrons */ - SG::WriteHandleKey<xAOD::ElectronContainer> m_selectedElectronsWriteHandleKey{this,"outputElectronsName","eflowRec_selectedElectrons","WriteHandle for the ElectronContainer, that will be filled with electrons passing the electron ID in PFLeptonSelector::selectElectrons"}; + SG::WriteHandleKey<ConstDataVector<xAOD::ElectronContainer >> m_selectedElectronsWriteHandleKey{this,"outputElectronsName","eflowRec_selectedElectrons","WriteHandle for the ElectronContainer, that will be filled with electrons passing the electron ID in PFLeptonSelector::selectElectrons"}; /** WriteHandle for the MuonContainer, that will be filled with muons passing the muon ID in PFLeptonSelector::selectMuons */ SG::WriteHandleKey<ConstDataVector<xAOD::MuonContainer> > m_selectedMuonsWriteHandleKey{this,"outputMuonsName","eflowRec_selectedMuons","WriteHandle for the MuonContainer, that will be filled with muons passing the muon ID in PFLeptonSelector::selectMuons"}; diff --git a/Reconstruction/eflowRec/src/PFLeptonSelector.cxx b/Reconstruction/eflowRec/src/PFLeptonSelector.cxx index 3212ce65beae..be8135287e43 100644 --- a/Reconstruction/eflowRec/src/PFLeptonSelector.cxx +++ b/Reconstruction/eflowRec/src/PFLeptonSelector.cxx @@ -19,7 +19,7 @@ StatusCode PFLeptonSelector::initialize(){ StatusCode PFLeptonSelector::execute(){ - SG::WriteHandle<xAOD::ElectronContainer> selectedElectronsWriteHandle(m_selectedElectronsWriteHandleKey); + SG::WriteHandle<ConstDataVector<xAOD::ElectronContainer >> selectedElectronsWriteHandle(m_selectedElectronsWriteHandleKey); SG::WriteHandle<ConstDataVector<xAOD::MuonContainer> > selectedMuonsWriteHandle(m_selectedMuonsWriteHandleKey); SG::WriteHandle<ConstDataVector<CaloCellContainer> > leptonCaloCellsWriteHandle(m_leptonCaloCellsWriteHandleKey); @@ -42,7 +42,7 @@ StatusCode PFLeptonSelector::execute(){ StatusCode PFLeptonSelector::finalize(){ return StatusCode::SUCCESS; } -StatusCode PFLeptonSelector::selectElectrons(SG::WriteHandle<xAOD::ElectronContainer>& selectedElectronsWriteHandle, SG::WriteHandle<ConstDataVector<CaloCellContainer> > leptonCaloCellsWriteHandle ){ +StatusCode PFLeptonSelector::selectElectrons(SG::WriteHandle<ConstDataVector<xAOD::ElectronContainer >>& selectedElectronsWriteHandle, SG::WriteHandle<ConstDataVector<CaloCellContainer> > leptonCaloCellsWriteHandle ){ SG::ReadHandle<xAOD::ElectronContainer> electronsReadHandle(m_electronsReadHandleKey); @@ -62,7 +62,7 @@ StatusCode PFLeptonSelector::selectElectrons(SG::WriteHandle<xAOD::ElectronConta continue; } if (true == val_med){ - if (selectedElectronsWriteHandle.isValid()) selectedElectronsWriteHandle->push_back(const_cast<xAOD::Electron*>(theElectron)); + if (selectedElectronsWriteHandle.isValid()) selectedElectronsWriteHandle->push_back(theElectron); else ATH_MSG_WARNING("Do not have valid WriteHandle for ElectronContainer with name: " << selectedElectronsWriteHandle.key()); if (true == m_storeLeptonCells) this->storeElectronCells(*theElectron,leptonCaloCellsWriteHandle); }//mediumPP @@ -138,9 +138,9 @@ void PFLeptonSelector::storeLeptonCells(const xAOD::CaloCluster& theCluster, SG: else ATH_MSG_WARNING("This cluster has an invalid pointer to its cells, in storeLeptonCells"); } -StatusCode PFLeptonSelector::recordLeptonContainers(SG::WriteHandle<xAOD::ElectronContainer>& selectedElectronsWriteHandle, SG::WriteHandle<ConstDataVector<xAOD::MuonContainer> >& selectedMuonsWriteHandle,SG::WriteHandle<ConstDataVector<CaloCellContainer> > leptonCaloCellsWriteHandle){ +StatusCode PFLeptonSelector::recordLeptonContainers(SG::WriteHandle<ConstDataVector<xAOD::ElectronContainer >>& selectedElectronsWriteHandle, SG::WriteHandle<ConstDataVector<xAOD::MuonContainer> >& selectedMuonsWriteHandle,SG::WriteHandle<ConstDataVector<CaloCellContainer> > leptonCaloCellsWriteHandle){ - StatusCode sc = selectedElectronsWriteHandle.record(std::make_unique<xAOD::ElectronContainer>(SG::VIEW_ELEMENTS)); + StatusCode sc = selectedElectronsWriteHandle.record(std::make_unique<ConstDataVector<xAOD::ElectronContainer >>(SG::VIEW_ELEMENTS)); if (sc.isFailure()) { ATH_MSG_WARNING("Could not record electron WriteHandle with key: " << selectedElectronsWriteHandle.key()); -- GitLab From 463a5e301d808c0c852d0a2306da37148b00b578 Mon Sep 17 00:00:00 2001 From: Jovan Mitrevski <Jovan.Mitrevski@cern.ch> Date: Thu, 19 Jul 2018 16:31:08 +0200 Subject: [PATCH 545/562] add underflow/overflow protection for bin search in egammaMVACalib Former-commit-id: 94057e9754d2c7ca5abacf619c18a1f8a4ab6d28 --- .../egammaMVACalib/src/egammaMVACalibTool.cxx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx index a7b84937cf19..9a4db6bdf08d 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx @@ -223,10 +223,25 @@ float egammaMVACalibTool::getEnergy(const xAOD::Egamma* eg, const auto energyVarGeV = (initEnergy / std::cosh(clus->eta())) / CLHEP::GeV; const auto etaVar = std::abs(clus->eta()); - const auto bin = m_hPoly->FindBin(etaVar, energyVarGeV) - 1; // poly bins are shifted by one + ATH_MSG_DEBUG("Looking at object with initEnergy = " << initEnergy + << ", energyVarGeV = " << energyVarGeV + << ", etaVar = " << etaVar + << ", clus->e() = " << clus->e()); + + const int bin = m_hPoly->FindBin(etaVar, energyVarGeV) - 1; // poly bins are shifted by one ATH_MSG_DEBUG("Using bin: " << bin); + if (bin < 0) { + ATH_MSG_DEBUG("The bin is under/overflow; just return the energy"); + return clus->e(); + } + + if (bin >= static_cast<int>(m_BDTs.size())) { + ATH_MSG_WARNING("The bin is outside the range, so just return the energy"); + return clus->e(); + } + // select the bdt and funcsions. (shifts are done later if needed) const auto& bdt = m_BDTs[bin]; const auto& funcs = m_funcs[bin]; -- GitLab From 38d4826bcb371a8613352982a0d860aca986a30e Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Thu, 19 Jul 2018 16:57:21 +0200 Subject: [PATCH 546/562] AthenaBaseComps: Work around thread-safety issue with Algorithm. Algorithm::sysExecute takes an EventContext as an argument and saves it as a member variable. If the context has an extension block and this is a reentrant algorithm running in MT mode then this can lead to a double-delete of an extension block. Work around by overriding sysExecute in AthReentrantAlgorithm to clear the extension block before passing it to the base class. (Doesn't matter, since a reentrant algorithm will never use this copy of the context anyway.) Former-commit-id: 2e3d04d11062e07f76583331adff59126e002d91 --- .../AthenaBaseComps/AthReentrantAlgorithm.h | 10 ++++++++++ .../src/AthReentrantAlgorithm.cxx | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/Control/AthenaBaseComps/AthenaBaseComps/AthReentrantAlgorithm.h b/Control/AthenaBaseComps/AthenaBaseComps/AthReentrantAlgorithm.h index 99398dfa1a57..4472d43ea233 100644 --- a/Control/AthenaBaseComps/AthenaBaseComps/AthReentrantAlgorithm.h +++ b/Control/AthenaBaseComps/AthenaBaseComps/AthReentrantAlgorithm.h @@ -147,6 +147,16 @@ class AthReentrantAlgorithm virtual const EventContext& getContext() const override; + /** + * @brief Execute an algorithm. + * + * We override this in order to work around an issue with the Algorithm + * base class storing the event context in a member variable that can + * cause crashes in MT jobs. + */ + virtual StatusCode sysExecute (const EventContext& ctx) override; + + /** * @brief Return the list of extra output dependencies. diff --git a/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx b/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx index 1d733128172f..d658de0ea31e 100644 --- a/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx +++ b/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx @@ -81,6 +81,25 @@ const EventContext& AthReentrantAlgorithm::getContext() const return Gaudi::Hive::currentContext(); } +/** + * @brief Execute an algorithm. + * + * We override this in order to work around an issue with the Algorithm + * base class storing the event context in a member variable that can + * cause crashes in MT jobs. + */ +StatusCode AthReentrantAlgorithm::sysExecute (const EventContext& ctx) +{ + EventContext ctx2 = ctx; + // sysExecute will assign the context we pass in to a member variable of + // the algorithm. If the context is referencing any dynamic memory, + // then we can end up with a double-delete. So clear out any extension --- + // we won't actually use the context we pass to here for anything anyway. + ctx2.setExtension (boost::any()); + return ::ReEntAlgorithm::sysExecute (ctx2); +} + + /** * @brief Return the list of extra output dependencies. * -- GitLab From 22e45ea32b8b5d1be1f0c0b6903f14b7f76ed4d8 Mon Sep 17 00:00:00 2001 From: "Ewelina.Maria.Lobodzinska" <ewelina.maria.lobodzinska@cern.ch> Date: Thu, 19 Jul 2018 18:18:59 +0200 Subject: [PATCH 547/562] update to Pythia8 version 219.pdf6plugin Former-commit-id: 6a63e899957328717e3544fdd662de7cc634c108 --- Projects/Athena/externals/Pythia8.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/Athena/externals/Pythia8.cmake b/Projects/Athena/externals/Pythia8.cmake index f40af1563d13..c4482eec04f8 100644 --- a/Projects/Athena/externals/Pythia8.cmake +++ b/Projects/Athena/externals/Pythia8.cmake @@ -2,7 +2,7 @@ # File specifying the location of Pythia 8 to use. # -set( PYTHIA8_VERSION 219 ) +set( PYTHIA8_VERSION 219.pdf6plugin ) set( PYTHIA8_ROOT ${LCG_RELEASE_DIR}/MCGenerators/pythia8/${PYTHIA8_VERSION}/${LCG_PLATFORM} ) -- GitLab From 437f9d40d79ab7233eca5f434ebc98b81e0b8b6d Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Thu, 19 Jul 2018 17:14:33 +0200 Subject: [PATCH 548/562] CaloCondPhysAlgs: Don't do retrieve() of DataHandle. retrieve() of a DataHandle is deprecated. Remove it. Former-commit-id: 8f4b161506c5d306d9cbf729f7013a884cc3a9ee --- .../src/CaloAddCellPedShift.cxx | 14 ++++++++------ .../CaloCondPhysAlgs/src/CaloAddCellPedShift.h | 2 -- .../src/CaloCellCalcEnergyCorr.cxx | 17 +++++++++-------- .../src/CaloCellCalcEnergyCorr.h | 3 +-- .../src/CaloCellEnergyCorr2Ntuple.cxx | 12 +++++++----- .../src/CaloCellEnergyCorr2Ntuple.h | 2 -- .../CaloCondPhysAlgs/src/CaloCellNoiseAlg.cxx | 10 ++++++---- .../CaloCondPhysAlgs/src/CaloCellNoiseAlg.h | 3 +-- .../src/CaloCellPosition2Ntuple.cxx | 11 +++++++---- .../src/CaloCellPosition2Ntuple.h | 2 -- .../src/CaloFillCellPositionShift.cxx | 11 +++++++---- .../src/CaloFillCellPositionShift.h | 2 -- .../CaloCondPhysAlgs/src/CaloNoise2Ntuple.cxx | 12 +++++++----- .../CaloCondPhysAlgs/src/CaloNoise2Ntuple.h | 2 -- .../CaloCondPhysAlgs/src/CaloRescaleNoise.cxx | 13 ++++++++----- .../CaloCondPhysAlgs/src/CaloRescaleNoise.h | 2 -- .../CaloCondPhysAlgs/src/LArMinBiasAlg.cxx | 7 ++++--- .../CaloCondPhysAlgs/src/LArMinBiasAlg.h | 4 +--- 18 files changed, 66 insertions(+), 63 deletions(-) diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloAddCellPedShift.cxx b/Calorimeter/CaloCondPhysAlgs/src/CaloAddCellPedShift.cxx index a7131c74677f..ca3c8cfa15ee 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/CaloAddCellPedShift.cxx +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloAddCellPedShift.cxx @@ -57,10 +57,9 @@ StatusCode CaloAddCellPedShift::initialize() { ATH_MSG_DEBUG ("CaloAddCellPedShift initialize()" ); - ATH_CHECK( detStore()->retrieve( m_caloIdMgr ) ); - m_calo_id = m_caloIdMgr->getCaloCell_ID(); - - ATH_CHECK( detStore()->retrieve(m_calodetdescrmgr) ); + const CaloIdManager* mgr = nullptr; + ATH_CHECK( detStore()->retrieve( mgr ) ); + m_calo_id = mgr->getCaloCell_ID(); ATH_CHECK( detStore()->regFcn(&CaloAddCellPedShift::updateMap, this, m_noiseAttrListColl, m_folderName) ); ATH_MSG_INFO ( " registered a callback for " << m_folderName << " folder " ); @@ -164,14 +163,17 @@ StatusCode CaloAddCellPedShift::stop() } fclose(finput); ATH_MSG_INFO ( " end of reading file" ); - + + const CaloDetDescrManager* calodetdescrmgr = nullptr; + ATH_CHECK( detStore()->retrieve(calodetdescrmgr) ); + FILE* fp = fopen("calopedestal.txt","w"); ATH_MSG_INFO ( " start loop over Calo cells " << ncell ); for (int i=0;i<ncell;i++) { IdentifierHash idHash=i; Identifier id=m_calo_id->cell_id(idHash); - const CaloDetDescrElement* calodde = m_calodetdescrmgr->get_element(id); + const CaloDetDescrElement* calodde = calodetdescrmgr->get_element(id); int subCalo; IdentifierHash idSubHash = m_calo_id->subcalo_cell_hash (idHash, subCalo); diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloAddCellPedShift.h b/Calorimeter/CaloCondPhysAlgs/src/CaloAddCellPedShift.h index 2b74ca932bb1..4b95afd7cb0b 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/CaloAddCellPedShift.h +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloAddCellPedShift.h @@ -58,8 +58,6 @@ class CaloAddCellPedShift : public AthAlgorithm { ITHistSvc* m_thistSvc; - const DataHandle<CaloIdManager> m_caloIdMgr; - const DataHandle<CaloDetDescrManager> m_calodetdescrmgr; ToolHandle<LArCablingService> m_cablingService; const CaloCell_ID* m_calo_id; const LArOnlineID* m_onlineID; diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloCellCalcEnergyCorr.cxx b/Calorimeter/CaloCondPhysAlgs/src/CaloCellCalcEnergyCorr.cxx index 5ef8c309475d..b6f79f0c770e 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/CaloCellCalcEnergyCorr.cxx +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloCellCalcEnergyCorr.cxx @@ -46,9 +46,10 @@ CaloCellCalcEnergyCorr::CaloCellCalcEnergyCorr( const std::string& name, ISvcLocator* pSvcLocator ) : AthAlgorithm( name, pSvcLocator ), - m_larem_id(0), - m_larhec_id(0), - m_larfcal_id(0) + m_calodetdescrmgr(nullptr), + m_larem_id(nullptr), + m_larhec_id(nullptr), + m_larfcal_id(nullptr) { declareProperty("Folder",m_folder="/LAR/CellCorrOfl/EnergyCorr"); std::vector<int> ivec; ivec.push_back(-1); @@ -79,13 +80,13 @@ StatusCode CaloCellCalcEnergyCorr::initialize() // retrieve LArEM id helpers - ATH_CHECK( detStore()->retrieve( m_caloIdMgr ) ); + const CaloIdManager* mgr = nullptr; + ATH_CHECK( detStore()->retrieve( mgr ) ); - m_larem_id = m_caloIdMgr->getEM_ID(); - m_larhec_id = m_caloIdMgr->getHEC_ID(); - m_larfcal_id = m_caloIdMgr->getFCAL_ID(); + m_larem_id = mgr->getEM_ID(); + m_larhec_id = mgr->getHEC_ID(); + m_larfcal_id = mgr->getFCAL_ID(); -// retrieve CaloDetDescrMgr ATH_CHECK( detStore()->retrieve(m_calodetdescrmgr) ); return StatusCode::SUCCESS; diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloCellCalcEnergyCorr.h b/Calorimeter/CaloCondPhysAlgs/src/CaloCellCalcEnergyCorr.h index ce480bbc7dbb..5fac001d7259 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/CaloCellCalcEnergyCorr.h +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloCellCalcEnergyCorr.h @@ -47,8 +47,7 @@ private: std::vector<float> m_hvvalue; // value to fill for every hvline // Private members - const DataHandle<CaloIdManager> m_caloIdMgr; - const DataHandle<CaloDetDescrManager> m_calodetdescrmgr; + const CaloDetDescrManager* m_calodetdescrmgr; const LArEM_ID* m_larem_id; const LArHEC_ID* m_larhec_id; const LArFCAL_ID* m_larfcal_id; diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloCellEnergyCorr2Ntuple.cxx b/Calorimeter/CaloCondPhysAlgs/src/CaloCellEnergyCorr2Ntuple.cxx index 318e2bb6c4e1..6402578bd358 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/CaloCellEnergyCorr2Ntuple.cxx +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloCellEnergyCorr2Ntuple.cxx @@ -50,10 +50,9 @@ StatusCode CaloCellEnergyCorr2Ntuple::initialize() ATH_CHECK( service("THistSvc",m_thistSvc) ); - ATH_CHECK( detStore()->retrieve( m_caloIdMgr ) ); - m_calo_id = m_caloIdMgr->getCaloCell_ID(); - - ATH_CHECK( detStore()->retrieve(m_calodetdescrmgr) ); + const CaloIdManager* mgr = nullptr; + ATH_CHECK( detStore()->retrieve( mgr ) ); + m_calo_id = mgr->getCaloCell_ID(); ATH_CHECK( detStore()->regHandle(m_AttrListColl,m_key) ); @@ -99,12 +98,15 @@ StatusCode CaloCellEnergyCorr2Ntuple::stop() int nchan=flt->getNChans(); ATH_MSG_INFO ( "NObjs: "<<nobj<<" nChans: "<<nchan<<" nGains: "<<flt->getNGains() ); + const CaloDetDescrManager* calodetdescrmgr = nullptr; + ATH_CHECK( detStore()->retrieve(calodetdescrmgr) ); + int ncell=m_calo_id->calo_cell_hash_max(); ATH_MSG_INFO ( " start loop over Calo cells " << ncell ); for (int i=0;i<ncell;i++) { IdentifierHash idHash=i; Identifier id=m_calo_id->cell_id(idHash); - const CaloDetDescrElement* calodde = m_calodetdescrmgr->get_element(id); + const CaloDetDescrElement* calodde = calodetdescrmgr->get_element(id); m_Hash = i; m_OffId = (int)(id.get_identifier32().get_compact()); diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloCellEnergyCorr2Ntuple.h b/Calorimeter/CaloCondPhysAlgs/src/CaloCellEnergyCorr2Ntuple.h index d5167c6e422c..e56335f5391c 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/CaloCellEnergyCorr2Ntuple.h +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloCellEnergyCorr2Ntuple.h @@ -52,8 +52,6 @@ class CaloCellEnergyCorr2Ntuple : public AthAlgorithm { //=== blob storage ITHistSvc* m_thistSvc; - const DataHandle<CaloIdManager> m_caloIdMgr; - const DataHandle<CaloDetDescrManager> m_calodetdescrmgr; const CaloCell_ID* m_calo_id; std::string m_key; diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloCellNoiseAlg.cxx b/Calorimeter/CaloCondPhysAlgs/src/CaloCellNoiseAlg.cxx index 80562f4d8f50..dcde585d101f 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/CaloCellNoiseAlg.cxx +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloCellNoiseAlg.cxx @@ -22,8 +22,9 @@ using CLHEP::HepVector; //Constructor CaloCellNoiseAlg::CaloCellNoiseAlg(const std::string& name, ISvcLocator* pSvcLocator): AthAlgorithm(name,pSvcLocator), - m_thistSvc(NULL), - m_calo_id(NULL), + m_thistSvc(nullptr), + m_calodetdescrmgr(nullptr), + m_calo_id(nullptr), m_adc2mevTool("LArADC2MeVTool"), m_ncell(0), m_lumiblock(0), @@ -104,8 +105,9 @@ StatusCode CaloCellNoiseAlg::initialize() { ATH_MSG_DEBUG ("CaloCellNoiseAlg initialize()" ); - ATH_CHECK( detStore()->retrieve( m_caloIdMgr ) ); - m_calo_id = m_caloIdMgr->getCaloCell_ID(); + const CaloIdManager* mgr = nullptr; + ATH_CHECK( detStore()->retrieve( mgr ) ); + m_calo_id = mgr->getCaloCell_ID(); ATH_CHECK( detStore()->retrieve(m_calodetdescrmgr) ); diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloCellNoiseAlg.h b/Calorimeter/CaloCondPhysAlgs/src/CaloCellNoiseAlg.h index 86e9f39b4c54..9f365a30ac71 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/CaloCellNoiseAlg.h +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloCellNoiseAlg.h @@ -57,8 +57,7 @@ //--------------------------------------------------- ITHistSvc* m_thistSvc; - const DataHandle<CaloIdManager> m_caloIdMgr; - const DataHandle<CaloDetDescrManager> m_calodetdescrmgr; + const CaloDetDescrManager* m_calodetdescrmgr; const CaloCell_ID* m_calo_id; const DataHandle<ILArNoise> m_dd_noise; const DataHandle<ILArPedestal> m_dd_pedestal; diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloCellPosition2Ntuple.cxx b/Calorimeter/CaloCondPhysAlgs/src/CaloCellPosition2Ntuple.cxx index 7ab172f7eecc..667e626eb610 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/CaloCellPosition2Ntuple.cxx +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloCellPosition2Ntuple.cxx @@ -42,10 +42,10 @@ StatusCode CaloCellPosition2Ntuple::initialize() ATH_MSG_DEBUG ("CaloCellPosition2Ntuple initialize()" ); ATH_CHECK( service("THistSvc",m_thistSvc) ); - ATH_CHECK( detStore()->retrieve( m_caloIdMgr ) ); - m_calo_id = m_caloIdMgr->getCaloCell_ID(); + const CaloIdManager* mgr = nullptr; + ATH_CHECK( detStore()->retrieve( mgr ) ); + m_calo_id = mgr->getCaloCell_ID(); - ATH_CHECK( detStore()->retrieve(m_calodetdescrmgr) ); ATH_CHECK( detStore()->regHandle(m_cellPos,m_key) ); m_tree = new TTree("mytree","Calo Noise ntuple"); @@ -82,6 +82,9 @@ StatusCode CaloCellPosition2Ntuple::stop() int nread = (int)(m_cellPos->size()); + const CaloDetDescrManager* calodetdescrmgr = nullptr; + ATH_CHECK( detStore()->retrieve(calodetdescrmgr) ); + if (nread > ncell) { ATH_MSG_WARNING ( " CaloCellPosition size different from max lar hash " << m_cellPos->size() << " " << ncell ); return StatusCode::SUCCESS; @@ -90,7 +93,7 @@ StatusCode CaloCellPosition2Ntuple::stop() for (int i=0;i<ncell;i++) { IdentifierHash idHash=i; Identifier id=m_calo_id->cell_id(idHash); - const CaloDetDescrElement* calodde = m_calodetdescrmgr->get_element(id); + const CaloDetDescrElement* calodde = calodetdescrmgr->get_element(id); m_Hash = i; m_OffId = (int)(id.get_identifier32().get_compact()); diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloCellPosition2Ntuple.h b/Calorimeter/CaloCondPhysAlgs/src/CaloCellPosition2Ntuple.h index 2edca0543c55..36ddf23c40ee 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/CaloCellPosition2Ntuple.h +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloCellPosition2Ntuple.h @@ -50,8 +50,6 @@ class CaloCellPosition2Ntuple : public AthAlgorithm { //--------------------------------------------------- ITHistSvc* m_thistSvc; - const DataHandle<CaloIdManager> m_caloIdMgr; - const DataHandle<CaloDetDescrManager> m_calodetdescrmgr; const CaloCell_ID* m_calo_id; const DataHandle<CaloRec::CaloCellPositionShift> m_cellPos; diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloFillCellPositionShift.cxx b/Calorimeter/CaloCondPhysAlgs/src/CaloFillCellPositionShift.cxx index fc3b2988ee2a..dc4d05e9e2ff 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/CaloFillCellPositionShift.cxx +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloFillCellPositionShift.cxx @@ -29,10 +29,10 @@ StatusCode CaloFillCellPositionShift::initialize() { ATH_MSG_DEBUG ("CaloFillCellPositionShift initialize()" ); - ATH_CHECK( detStore()->retrieve( m_caloIdMgr ) ); - m_calo_id = m_caloIdMgr->getCaloCell_ID(); + const CaloIdManager* mgr = nullptr; + ATH_CHECK( detStore()->retrieve( mgr ) ); + m_calo_id = mgr->getCaloCell_ID(); - ATH_CHECK( detStore()->retrieve(m_calodetdescrmgr) ); ATH_MSG_INFO ( " end of CaloFillCellPositionShift::initialize " ); return StatusCode::SUCCESS; @@ -58,11 +58,14 @@ StatusCode CaloFillCellPositionShift::stop() ATH_CHECK( detStore()->record(m_cellPos,m_key) ); + const CaloDetDescrManager* calodetdescrmgr = nullptr; + ATH_CHECK( detStore()->retrieve(calodetdescrmgr) ); + ATH_MSG_INFO ( " start loop over Calo cells " << ncell ); for (int i=0;i<ncell;i++) { IdentifierHash idHash=i+emmin; Identifier id=m_calo_id->cell_id(idHash); - const CaloDetDescrElement* calodde = m_calodetdescrmgr->get_element(id); + const CaloDetDescrElement* calodde = calodetdescrmgr->get_element(id); //float eta = calodde->eta(); float phi = calodde->phi(); diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloFillCellPositionShift.h b/Calorimeter/CaloCondPhysAlgs/src/CaloFillCellPositionShift.h index 2f0b054e117f..ac5e123df298 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/CaloFillCellPositionShift.h +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloFillCellPositionShift.h @@ -50,8 +50,6 @@ class CaloFillCellPositionShift : public AthAlgorithm { //--------------------------------------------------- // Member variables //--------------------------------------------------- - const DataHandle<CaloIdManager> m_caloIdMgr; - const DataHandle<CaloDetDescrManager> m_calodetdescrmgr; const CaloCell_ID* m_calo_id; CaloRec::CaloCellPositionShift* m_cellPos; diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloNoise2Ntuple.cxx b/Calorimeter/CaloCondPhysAlgs/src/CaloNoise2Ntuple.cxx index 5b1bc6b2a695..d8d1511e2411 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/CaloNoise2Ntuple.cxx +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloNoise2Ntuple.cxx @@ -49,10 +49,9 @@ StatusCode CaloNoise2Ntuple::initialize() ATH_CHECK( service("THistSvc",m_thistSvc) ); - ATH_CHECK( detStore()->retrieve( m_caloIdMgr ) ); - m_calo_id = m_caloIdMgr->getCaloCell_ID(); - - ATH_CHECK( detStore()->retrieve(m_calodetdescrmgr) ); + const CaloIdManager* mgr = nullptr; + ATH_CHECK( detStore()->retrieve( mgr ) ); + m_calo_id = mgr->getCaloCell_ID(); ATH_CHECK( m_noiseTool.retrieve() ); @@ -99,12 +98,15 @@ StatusCode CaloNoise2Ntuple::stop() { ATH_MSG_INFO ( " Run Number, lumiblock " << m_runNumber << " " << m_lumiBlock ); + const CaloDetDescrManager* calodetdescrmgr = nullptr; + ATH_CHECK( detStore()->retrieve(calodetdescrmgr) ); + int ncell=m_calo_id->calo_cell_hash_max(); ATH_MSG_INFO ( " start loop over Calo cells " << ncell ); for (int i=0;i<ncell;i++) { IdentifierHash idHash=i; Identifier id=m_calo_id->cell_id(idHash); - const CaloDetDescrElement* calodde = m_calodetdescrmgr->get_element(id); + const CaloDetDescrElement* calodde = calodetdescrmgr->get_element(id); int subCalo; IdentifierHash idSubHash = m_calo_id->subcalo_cell_hash (idHash, subCalo); diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloNoise2Ntuple.h b/Calorimeter/CaloCondPhysAlgs/src/CaloNoise2Ntuple.h index 263ee5b7ea3b..599233ce2186 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/CaloNoise2Ntuple.h +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloNoise2Ntuple.h @@ -49,8 +49,6 @@ class CaloNoise2Ntuple : public AthAlgorithm { //--------------------------------------------------- ITHistSvc* m_thistSvc; - const DataHandle<CaloIdManager> m_caloIdMgr; - const DataHandle<CaloDetDescrManager> m_calodetdescrmgr; const CaloCell_ID* m_calo_id; ToolHandle<ICaloNoiseTool> m_noiseTool; diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloRescaleNoise.cxx b/Calorimeter/CaloCondPhysAlgs/src/CaloRescaleNoise.cxx index aed5b266fed7..c03070889831 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/CaloRescaleNoise.cxx +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloRescaleNoise.cxx @@ -48,10 +48,10 @@ StatusCode CaloRescaleNoise::initialize() ATH_MSG_DEBUG ("CaloRescaleNoise initialize()" ); ATH_CHECK(service("THistSvc",m_thistSvc) ); - ATH_CHECK( detStore()->retrieve( m_caloIdMgr ) ); - m_calo_id = m_caloIdMgr->getCaloCell_ID(); + const CaloIdManager* mgr = nullptr; + ATH_CHECK( detStore()->retrieve( mgr ) ); + m_calo_id = mgr->getCaloCell_ID(); - ATH_CHECK( detStore()->retrieve(m_calodetdescrmgr) ); ATH_CHECK( m_noiseTool.retrieve() ); ATH_CHECK( m_hvCorrTool.retrieve() ); ATH_CHECK( detStore()->regHandle(m_dd_HVScaleCorr,m_keyHVScaleCorr) ); @@ -84,14 +84,17 @@ StatusCode CaloRescaleNoise::execute() //__________________________________________________________________________ StatusCode CaloRescaleNoise::stop() { - FILE* fp = fopen("calonoise.txt","w"); + FILE* fp = fopen("calonoise.txt","w"); + + const CaloDetDescrManager* calodetdescrmgr = nullptr; + ATH_CHECK( detStore()->retrieve(calodetdescrmgr) ); int ncell=m_calo_id->calo_cell_hash_max(); ATH_MSG_INFO ( " start loop over Calo cells " << ncell ); for (int i=0;i<ncell;i++) { IdentifierHash idHash=i; Identifier id=m_calo_id->cell_id(idHash); - const CaloDetDescrElement* calodde = m_calodetdescrmgr->get_element(id); + const CaloDetDescrElement* calodde = calodetdescrmgr->get_element(id); int subCalo; IdentifierHash idSubHash = m_calo_id->subcalo_cell_hash (idHash, subCalo); diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloRescaleNoise.h b/Calorimeter/CaloCondPhysAlgs/src/CaloRescaleNoise.h index 0d39f15b69a9..3b41e57c30e9 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/CaloRescaleNoise.h +++ b/Calorimeter/CaloCondPhysAlgs/src/CaloRescaleNoise.h @@ -52,8 +52,6 @@ class CaloRescaleNoise : public AthAlgorithm { //--------------------------------------------------- ITHistSvc* m_thistSvc; - const DataHandle<CaloIdManager> m_caloIdMgr; - const DataHandle<CaloDetDescrManager> m_calodetdescrmgr; const CaloCell_ID* m_calo_id; ToolHandle<ICaloNoiseTool> m_noiseTool; diff --git a/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.cxx b/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.cxx index 0789cbd1338c..2b5a2e2acd61 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.cxx +++ b/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.cxx @@ -72,9 +72,10 @@ return StatusCode::SUCCESS; } - ATH_CHECK( detStore()->retrieve( m_caloIdMgr ) ); - m_larem_id = m_caloIdMgr->getEM_ID(); - m_calo_id = m_caloIdMgr->getCaloCell_ID(); + const CaloIdManager* mgr = nullptr; + ATH_CHECK( detStore()->retrieve( mgr ) ); + m_larem_id = mgr->getEM_ID(); + m_calo_id = mgr->getCaloCell_ID(); // retrieve CaloDetDescrMgr ATH_CHECK( detStore()->retrieve(m_calodetdescrmgr) ); diff --git a/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.h b/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.h index 781ed6038c42..ad65c1a8d941 100644 --- a/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.h +++ b/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.h @@ -61,11 +61,9 @@ double m_weight_lowPt; double m_weight_highPt; ToolHandle<LArCablingService> m_cablingService; - const DataHandle<CaloIdManager> m_caloIdMgr; - const DataHandle<CaloDetDescrManager> m_calodetdescrmgr; + const CaloDetDescrManager* m_calodetdescrmgr = nullptr; const LArEM_ID* m_larem_id = nullptr; const CaloCell_ID* m_calo_id = nullptr; - const DataHandle<ILArMinBias> m_dd_minbias; std::vector<double> m_eCell; -- GitLab From 1fa05412401d37b2447eb489c3ba1cbc26d60b32 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Thu, 19 Jul 2018 17:15:35 +0200 Subject: [PATCH 549/562] CaloD3PDMaker: Remove use of DataHandle. retrieve() of a DataHandle is deprecated. Remove it. Former-commit-id: a86eccfb316b5f375947b39e00a0951a12ff9c29 --- .../D3PDMaker/CaloD3PDMaker/src/LArSCHitFillerTool.cxx | 1 + .../D3PDMaker/CaloD3PDMaker/src/LArSCHitFillerTool.h | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/LArSCHitFillerTool.cxx b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/LArSCHitFillerTool.cxx index 9160f78f44e0..502a4e25fdac 100644 --- a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/LArSCHitFillerTool.cxx +++ b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/LArSCHitFillerTool.cxx @@ -45,6 +45,7 @@ LArSCHitFillerTool::LArSCHitFillerTool const IInterface* parent) : BlockFillerTool<LArHitContainer> (type, name, parent), m_larCablingSvc("LArCablingService"), + m_dd_fSampl (nullptr), m_caloEtaSelection( false ), m_caloPhiSelection( false ), m_caloLayerSelection( false ), diff --git a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/LArSCHitFillerTool.h b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/LArSCHitFillerTool.h index cbe28b62fe50..47ccdb7f1570 100644 --- a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/LArSCHitFillerTool.h +++ b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/LArSCHitFillerTool.h @@ -16,7 +16,6 @@ #define CALOD3PDMAKER_LARSCHITFILLERTOOL_H // Gaudi/Athena include(s): -#include "StoreGate/DataHandle.h" #include "GaudiKernel/ToolHandle.h" #include "D3PDMakerUtils/BlockFillerTool.h" #include "D3PDMakerUtils/SGCollectionGetterTool.h" @@ -79,7 +78,7 @@ private: const TileID *m_tileid; const LArOnlineID* m_onlineHelper; ToolHandle<LArCablingService> m_larCablingSvc; - const DataHandle<ILArfSampl> m_dd_fSampl; + const ILArfSampl* m_dd_fSampl; /// parameters int *m_nSC; -- GitLab From 087bee6b9c6bdd0d6a2f6b0c33e29eb5e393edc0 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Thu, 19 Jul 2018 20:07:28 +0000 Subject: [PATCH 550/562] 22.0 coverity InDetPerformanceRTT Former-commit-id: 33dfe68b729ab8c07fd050e058afd9415f87e77e --- .../src/IDStandardPerformance.cxx | 410 +++++++++--------- 1 file changed, 204 insertions(+), 206 deletions(-) diff --git a/InnerDetector/InDetValidation/InDetPerformanceRTT/src/IDStandardPerformance.cxx b/InnerDetector/InDetValidation/InDetPerformanceRTT/src/IDStandardPerformance.cxx index 6b61b6acd9f4..77b2e847842c 100755 --- a/InnerDetector/InDetValidation/InDetPerformanceRTT/src/IDStandardPerformance.cxx +++ b/InnerDetector/InDetValidation/InDetPerformanceRTT/src/IDStandardPerformance.cxx @@ -485,42 +485,43 @@ StatusCode IDStandardPerformance::bookHistograms() m_pulltheta.reserve(m_trackEtaBins); m_pullz0st.reserve(m_trackEtaBins); m_pullqopt.reserve(m_trackEtaBins); - + constexpr unsigned int bufferLength{200}; + char name[bufferLength]; // base histograms for resolution plots versus eta and pt for (int i=0;i<m_trackEtaBins;i++) { // residuals - char name[100]; - sprintf(name,"d0res_bin%i",i); + + snprintf(name, bufferLength,"d0res_bin%i",i); m_hd0.push_back(create_registeredTH1F(al_debug, name,name,2000,-1.0,1.0)); - sprintf(name,"z0res_bin%i",i); + snprintf(name, bufferLength,"z0res_bin%i",i); m_hz0.push_back(create_registeredTH1F(al_debug, name,name,200,-1.5,1.5)); - sprintf(name,"phires_bin%i",i); + snprintf(name, bufferLength,"phires_bin%i",i); m_hphi.push_back(create_registeredTH1F(al_debug, name,name,3000,-0.03,0.03)); - sprintf(name,"thetares_bin%i",i); + snprintf(name, bufferLength,"thetares_bin%i",i); m_htheta.push_back(create_registeredTH1F(al_debug, name,name,2000,-0.1,0.1)); - sprintf(name,"z0stres_bin%i",i); + snprintf(name, bufferLength,"z0stres_bin%i",i); m_hz0st.push_back(create_registeredTH1F(al_debug, name,name,200,-1.5,1.5)); - sprintf(name,"qoptres_bin%i",i); + snprintf(name, bufferLength,"qoptres_bin%i",i); m_hqopt.push_back(create_registeredTH1F(al_debug, name,name,200,-0.4,0.4)); // pull distributions - sprintf(name,"d0pullres_bin%i",i); + snprintf(name, bufferLength,"d0pullres_bin%i",i); m_pulld0.push_back(create_registeredTH1F(al_debug, name,name,200,-5.,5.)); - sprintf(name,"z0pullres_bin%i",i); + snprintf(name, bufferLength,"z0pullres_bin%i",i); m_pullz0.push_back(create_registeredTH1F(al_debug, name,name,200,-5.,5.)); - sprintf(name,"phipullres_bin%i",i); + snprintf(name, bufferLength,"phipullres_bin%i",i); m_pullphi.push_back(create_registeredTH1F(al_debug, name,name,200,-5.,5.)); - sprintf(name,"thetapullres_bin%i",i); + snprintf(name, bufferLength,"thetapullres_bin%i",i); m_pulltheta.push_back(create_registeredTH1F(al_debug, name,name,200,-5.,5.)); - sprintf(name,"z0stpullres_bin%i",i); + snprintf(name, bufferLength,"z0stpullres_bin%i",i); m_pullz0st.push_back(create_registeredTH1F(al_debug, name,name,200,-5.,5.)); - sprintf(name,"qoptpullres_bin%i",i); + snprintf(name, bufferLength,"qoptpullres_bin%i",i); m_pullqopt.push_back(create_registeredTH1F(al_debug, name,name,200,-5.,5.)); } @@ -533,26 +534,25 @@ StatusCode IDStandardPerformance::bookHistograms() m_hpttheta.reserve(m_trackPtBins); m_hptz0st.reserve(m_trackPtBins); m_hptqopt.reserve(m_trackPtBins); - // resolutions versus pt for (int i=0;i<m_trackPtBins;i++) { - char name[100]; - sprintf(name,"d0res_ptbin%i",i); + + snprintf(name, bufferLength,"d0res_ptbin%i",i); m_hptd0.push_back(create_registeredTH1F(al_debug, name,name,2000,-1.0,1.0)); - sprintf(name,"z0res_ptbin%i",i); + snprintf(name, bufferLength,"z0res_ptbin%i",i); m_hptz0.push_back(create_registeredTH1F(al_debug, name,name,200,-1.5,1.5)); - sprintf(name,"phires_ptbin%i",i); + snprintf(name, bufferLength,"phires_ptbin%i",i); m_hptphi.push_back(create_registeredTH1F(al_debug, name,name,3000,-0.03,0.03)); - sprintf(name,"thetares_ptbin%i",i); + snprintf(name, bufferLength,"thetares_ptbin%i",i); m_hpttheta.push_back(create_registeredTH1F(al_debug, name,name,2000,-0.1,0.1)); - sprintf(name,"z0stres_ptbin%i",i); + snprintf(name, bufferLength,"z0stres_ptbin%i",i); m_hptz0st.push_back(create_registeredTH1F(al_debug, name,name,200,-1.5,1.5)); - sprintf(name,"qoptres_ptbin%i",i); + snprintf(name, bufferLength,"qoptres_ptbin%i",i); m_hptqopt.push_back(create_registeredTH1F(al_debug, name,name,200,-0.4,0.4)); } @@ -992,10 +992,8 @@ StatusCode IDStandardPerformance::bookHistograms() m_pullWidthZ_vs_phi_pixel_endcap_disk.reserve(pixelEndcapDisks); m_residualMeanZ_vs_phi_pixel_endcap_disk.reserve(pixelEndcapDisks); m_residualWidthZ_vs_phi_pixel_endcap_disk.reserve(pixelEndcapDisks); - + char title[bufferLength]; for (int ilayer=0; ilayer<nPixelLayers; ilayer++) { - char name[200]; - char title[200]; // IBL if (ilayer == 0){ m_residualx_pixel_barrel_l.push_back(create_registeredTH1F(al_expert, "residualx_pixel_barrel_ibl", "Residual: Pixel Barrel X IBL ;x residual(#mum)", 120, -50, 50)); @@ -1012,182 +1010,182 @@ StatusCode IDStandardPerformance::bookHistograms() } // pixel barrel section if (ilayer < pixelBarrelLayers && ilayer>1){ - sprintf(name, "residualx_pixel_barrel_l%i", ilayer-1); - sprintf(title, "Residual: Pixel Barrel X Layer %i;x residual(#mum)" ,ilayer-1); + snprintf(name, bufferLength, "residualx_pixel_barrel_l%i", ilayer-1); + snprintf(title, bufferLength, "Residual: Pixel Barrel X Layer %i;x residual(#mum)" ,ilayer-1); m_residualx_pixel_barrel_l.push_back(create_registeredTH1F(al_expert, name, title, 120, -50, 50)); - sprintf(name, "residualy_pixel_barrel_l%i", ilayer-1); - sprintf(title, "Residual: Pixel Barrel Y Layer %i;y residual(#mum)" ,ilayer-1); + snprintf(name, bufferLength, "residualy_pixel_barrel_l%i", ilayer-1); + snprintf(title, bufferLength, "Residual: Pixel Barrel Y Layer %i;y residual(#mum)" ,ilayer-1); m_residualy_pixel_barrel_l.push_back(create_registeredTH1F(al_expert, name, title, 120, -300, 300)); - sprintf(name, "residualpullx_pixel_barrel_l%i", ilayer-1); - sprintf(title, "Residualpull: Pixel Barrel X Layer %i;x pull residual" ,ilayer-1); + snprintf(name, bufferLength, "residualpullx_pixel_barrel_l%i", ilayer-1); + snprintf(title, bufferLength, "Residualpull: Pixel Barrel X Layer %i;x pull residual" ,ilayer-1); m_residualpullx_pixel_barrel_l.push_back(create_registeredTH1F(al_expert, name, title, 100,-5,5)); - sprintf(name, "residualpully_pixel_barrel_l%i", ilayer-1); - sprintf(title, "Residualpull: Pixel Barrel Y Layer %i;y pull residual" ,ilayer-1); + snprintf(name, bufferLength, "residualpully_pixel_barrel_l%i", ilayer-1); + snprintf(title, bufferLength, "Residualpull: Pixel Barrel Y Layer %i;y pull residual" ,ilayer-1); m_residualpully_pixel_barrel_l.push_back(create_registeredTH1F(al_expert, name, title, 100,-5,5)); } // pixel endcap section if (ilayer < pixelEndcapDisks){ - sprintf(name, "residualx_pixel_endcap_d%i", ilayer+1); - sprintf(title, "Residual: Pixel Endcap X Disk %i;x residual(#mum)" ,ilayer+1); + snprintf(name, bufferLength, "residualx_pixel_endcap_d%i", ilayer+1); + snprintf(title, bufferLength, "Residual: Pixel Endcap X Disk %i;x residual(#mum)" ,ilayer+1); m_residualx_pixel_endcap_d.push_back(create_registeredTH1F(al_expert, name, title, 120, -50, 50)); - sprintf(name, "residualy_pixel_endcap_d%i", ilayer+1); - sprintf(title, "Residual: Pixel Endcap Y Disk %i;y residual(#mum)" ,ilayer+1); + snprintf(name, bufferLength, "residualy_pixel_endcap_d%i", ilayer+1); + snprintf(title, bufferLength, "Residual: Pixel Endcap Y Disk %i;y residual(#mum)" ,ilayer+1); m_residualy_pixel_endcap_d.push_back(create_registeredTH1F(al_expert, name, title, 120, -300, 300)); - sprintf(name, "residualpullx_pixel_endcap_d%i", ilayer+1); - sprintf(title, "Residualpull: Pixel Endcap X Disk %i;x pull residual" ,ilayer+1); + snprintf(name, bufferLength, "residualpullx_pixel_endcap_d%i", ilayer+1); + snprintf(title, bufferLength, "Residualpull: Pixel Endcap X Disk %i;x pull residual" ,ilayer+1); m_residualpullx_pixel_endcap_d.push_back(create_registeredTH1F(al_expert, name, title, 100,-5,5)); - sprintf(name, "residualpully_pixel_endcap_d%i", ilayer+1); - sprintf(title, "Residualpull: Pixel Endcap Y Disk %i;y pull residual" ,ilayer+1); + snprintf(name, bufferLength, "residualpully_pixel_endcap_d%i", ilayer+1); + snprintf(title, bufferLength, "Residualpull: Pixel Endcap Y Disk %i;y pull residual" ,ilayer+1); m_residualpully_pixel_endcap_d.push_back(create_registeredTH1F(al_expert, name, title, 100,-5,5)); } // -- // pixel barrel section if (ilayer < pixelBarrelLayers){ - sprintf(name, "pullPhi_incident_pixel_barrel_l%i", ilayer); - sprintf(title, "Pull: Pixel Barrel Phi vs incident normal Layer %i;angle w/ normal;pull (r-phi)" ,ilayer); + snprintf(name, bufferLength, "pullPhi_incident_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Pull: Pixel Barrel Phi vs incident normal Layer %i;angle w/ normal;pull (r-phi)" ,ilayer); m_pullPhi_vs_incident_pixel_barrel_l.push_back(create_registeredTH2F(pull_shift, name, title, 25, min_normal, max_normal, 100, -5, 5)); - sprintf(name, "residualPhi_incident_pixel_barrel_l%i", ilayer); - sprintf(title, "Residual: Pixel Barrel Phi vs incident normal Layer %i;angle w/ normal;residual (r-phi)" ,ilayer); + snprintf(name, bufferLength, "residualPhi_incident_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Residual: Pixel Barrel Phi vs incident normal Layer %i;angle w/ normal;residual (r-phi)" ,ilayer); m_residualPhi_vs_incident_pixel_barrel_l.push_back(create_registeredTH2F(pull_shift, name, title, 25, min_normal, max_normal, 200, -0.5, 0.5)); - sprintf(name, "pullPhi_eta_pixel_barrel_l%i", ilayer); - sprintf(title, "Pull: Pixel Barrel Phi vs incident eta Layer %i;pixel eta;pull (r-phi)" ,ilayer); + snprintf(name, bufferLength, "pullPhi_eta_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Pull: Pixel Barrel Phi vs incident eta Layer %i;pixel eta;pull (r-phi)" ,ilayer); m_pullPhi_vs_eta_pixel_barrel_l.push_back(create_registeredTH2F(pull_shift, name, title, 25, min_eta, max_eta, 100, -5, 5)); - sprintf(name, "residualPhi_eta_pixel_barrel_l%i", ilayer); - sprintf(title, "Residual: Pixel Barrel Phi vs incident eta Layer %i;pixel eta;residual (r-phi)" ,ilayer); + snprintf(name, bufferLength, "residualPhi_eta_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Residual: Pixel Barrel Phi vs incident eta Layer %i;pixel eta;residual (r-phi)" ,ilayer); m_residualPhi_vs_eta_pixel_barrel_l.push_back(create_registeredTH2F(pull_shift, name, title, 25, min_eta, max_eta, 200, -0.5, 0.5)); - sprintf(name, "pullPhi_phi_pixel_barrel_l%i", ilayer); - sprintf(title, "Pull: Pixel Barrel Phi vs incident phi Layer %i;pixel phi;pull (r-phi)" ,ilayer); + snprintf(name, bufferLength, "pullPhi_phi_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Pull: Pixel Barrel Phi vs incident phi Layer %i;pixel phi;pull (r-phi)" ,ilayer); m_pullPhi_vs_phi_pixel_barrel_l.push_back(create_registeredTH2F(pull_shift, name, title, 25, min_phi, max_phi, 100, -5, 5)); - sprintf(name, "residualPhi_phi_pixel_barrel_l%i", ilayer); - sprintf(title, "Residual: Pixel Barrel Phi vs incident phi Layer %i;pixel phi;residual (r-phi)" ,ilayer); + snprintf(name, bufferLength, "residualPhi_phi_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Residual: Pixel Barrel Phi vs incident phi Layer %i;pixel phi;residual (r-phi)" ,ilayer); m_residualPhi_vs_phi_pixel_barrel_l.push_back(create_registeredTH2F(pull_shift, name, title, 25, min_phi, max_phi, 200, -0.5, 0.5)); // -- - sprintf(name, "pullZ_incident_pixel_barrel_l%i", ilayer); - sprintf(title, "Pull: Pixel Barrel Z vs incident normal Layer %i;angle w/ normal;pull (r-z)" ,ilayer); + snprintf(name, bufferLength, "pullZ_incident_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Pull: Pixel Barrel Z vs incident normal Layer %i;angle w/ normal;pull (r-z)" ,ilayer); m_pullZ_vs_incident_pixel_barrel_l.push_back(create_registeredTH2F(pull_shift, name, title, 25, min_normal, max_normal, 100, -5, 5)); - sprintf(name, "residualZ_incident_pixel_barrel_l%i", ilayer); - sprintf(title, "Residual: Pixel Barrel Z vs incident normal Layer %i;angle w/ normal;residual (r-z)" ,ilayer); + snprintf(name, bufferLength, "residualZ_incident_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Residual: Pixel Barrel Z vs incident normal Layer %i;angle w/ normal;residual (r-z)" ,ilayer); m_residualZ_vs_incident_pixel_barrel_l.push_back(create_registeredTH2F(pull_shift, name, title, 25, min_normal, max_normal, 200, -1, 1)); - sprintf(name, "pullZ_eta_pixel_barrel_l%i", ilayer); - sprintf(title, "Pull: Pixel Barrel Z vs incident eta Layer %i;pixel eta;pull (r-z)" ,ilayer); + snprintf(name, bufferLength, "pullZ_eta_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Pull: Pixel Barrel Z vs incident eta Layer %i;pixel eta;pull (r-z)" ,ilayer); m_pullZ_vs_eta_pixel_barrel_l.push_back(create_registeredTH2F(pull_shift, name, title, 25, min_eta, max_eta, 100, -5, 5)); - sprintf(name, "residualZ_eta_pixel_barrel_l%i", ilayer); - sprintf(title, "Residual: Pixel Barrel Z vs incident eta Layer %i;pixel eta;residual (r-z)" ,ilayer); + snprintf(name, bufferLength, "residualZ_eta_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Residual: Pixel Barrel Z vs incident eta Layer %i;pixel eta;residual (r-z)" ,ilayer); m_residualZ_vs_eta_pixel_barrel_l.push_back(create_registeredTH2F(pull_shift, name, title, 25, min_eta, max_eta, 200, -1, 1)); - sprintf(name, "pullZ_phi_pixel_barrel_l%i", ilayer); - sprintf(title, "Pull: Pixel Barrel Z vs incident phi Layer %i;pixel phi;pull (r-z)" ,ilayer); + snprintf(name, bufferLength, "pullZ_phi_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Pull: Pixel Barrel Z vs incident phi Layer %i;pixel phi;pull (r-z)" ,ilayer); m_pullZ_vs_phi_pixel_barrel_l.push_back(create_registeredTH2F(pull_shift, name, title, 25, min_phi, max_phi, 100, -5, 5)); - sprintf(name, "residualZ_phi_pixel_barrel_l%i", ilayer); - sprintf(title, "Residual: Pixel Barrel Z vs incident phi Layer %i;pixel phi;residual (r-z)" ,ilayer); + snprintf(name, bufferLength, "residualZ_phi_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Residual: Pixel Barrel Z vs incident phi Layer %i;pixel phi;residual (r-z)" ,ilayer); m_residualZ_vs_phi_pixel_barrel_l.push_back(create_registeredTH2F(pull_shift, name, title, 25, min_phi, max_phi, 200, -1, 1)); // One profile each for the value and the width // The axis is meaningless, as it's projected from the 2d hist - sprintf(name, "pullMeanPhi_vs_incident_pixel_barrel_l%i", ilayer); - sprintf(title, "Pull mean: Pixel Barrel R-Phi Layer %i vs. incident normal;angle w/ normal;pull (r-phi) mean" ,ilayer); + snprintf(name, bufferLength, "pullMeanPhi_vs_incident_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Pull mean: Pixel Barrel R-Phi Layer %i vs. incident normal;angle w/ normal;pull (r-phi) mean" ,ilayer); m_pullMeanPhi_vs_incident_pixel_barrel_layer.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "pullWidthPhi_vs_incident_pixel_barrel_l%i", ilayer); - sprintf(title, "Pull width: Pixel Barrel R-Phi Layer %i vs. incident normal;angle w/ normal;pull (r-phi) width" ,ilayer); + snprintf(name, bufferLength, "pullWidthPhi_vs_incident_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Pull width: Pixel Barrel R-Phi Layer %i vs. incident normal;angle w/ normal;pull (r-phi) width" ,ilayer); m_pullWidthPhi_vs_incident_pixel_barrel_layer.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "pullMeanPhi_vs_eta_pixel_barrel_l%i", ilayer); - sprintf(title, "Pull mean: Pixel Barrel R-Phi Layer %i vs. incident eta;pixel eta;pull (r-phi) mean" ,ilayer); + snprintf(name, bufferLength, "pullMeanPhi_vs_eta_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Pull mean: Pixel Barrel R-Phi Layer %i vs. incident eta;pixel eta;pull (r-phi) mean" ,ilayer); m_pullMeanPhi_vs_eta_pixel_barrel_layer.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "pullWidthPhi_vs_eta_pixel_barrel_l%i", ilayer); - sprintf(title, "Pull width: Pixel Barrel R-Phi Layer %i vs. incident eta;pixel eta;pull (r-phi) width" ,ilayer); + snprintf(name, bufferLength, "pullWidthPhi_vs_eta_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Pull width: Pixel Barrel R-Phi Layer %i vs. incident eta;pixel eta;pull (r-phi) width" ,ilayer); m_pullWidthPhi_vs_eta_pixel_barrel_layer.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "pullMeanPhi_vs_phi_pixel_barrel_l%i", ilayer); - sprintf(title, "Pull mean: Pixel Barrel R-Phi Layer %i vs. incident phi;pixel phi;pull (r-phi) mean" ,ilayer); + snprintf(name, bufferLength, "pullMeanPhi_vs_phi_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Pull mean: Pixel Barrel R-Phi Layer %i vs. incident phi;pixel phi;pull (r-phi) mean" ,ilayer); m_pullMeanPhi_vs_phi_pixel_barrel_layer.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "pullWidthPhi_vs_phi_pixel_barrel_l%i", ilayer); - sprintf(title, "Pull width: Pixel Barrel R-Phi Layer %i vs. incident phi;pixel phi;pull (r-phi) width" ,ilayer); + snprintf(name, bufferLength, "pullWidthPhi_vs_phi_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Pull width: Pixel Barrel R-Phi Layer %i vs. incident phi;pixel phi;pull (r-phi) width" ,ilayer); m_pullWidthPhi_vs_phi_pixel_barrel_layer.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "residualMeanPhi_vs_incident_pixel_barrel_l%i", ilayer); - sprintf(title, "Residual mean: Pixel Barrel R-Phi Layer %i vs. incident normal;angle w/ normal;residual (r-phi) mean" ,ilayer); + snprintf(name, bufferLength, "residualMeanPhi_vs_incident_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Residual mean: Pixel Barrel R-Phi Layer %i vs. incident normal;angle w/ normal;residual (r-phi) mean" ,ilayer); m_residualMeanPhi_vs_incident_pixel_barrel_layer.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "residualWidthPhi_vs_incident_pixel_barrel_l%i", ilayer); - sprintf(title, "Residual width: Pixel Barrel R-Phi Layer %i vs. incident normal;angle w/ normal;residual (r-phi) width" ,ilayer); + snprintf(name, bufferLength, "residualWidthPhi_vs_incident_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Residual width: Pixel Barrel R-Phi Layer %i vs. incident normal;angle w/ normal;residual (r-phi) width" ,ilayer); m_residualWidthPhi_vs_incident_pixel_barrel_layer.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "residualMeanPhi_vs_eta_pixel_barrel_l%i", ilayer); - sprintf(title, "Residual mean: Pixel Barrel R-Phi Layer %i vs. incident eta;pixel eta;residual (r-phi) mean" ,ilayer); + snprintf(name, bufferLength, "residualMeanPhi_vs_eta_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Residual mean: Pixel Barrel R-Phi Layer %i vs. incident eta;pixel eta;residual (r-phi) mean" ,ilayer); m_residualMeanPhi_vs_eta_pixel_barrel_layer.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "residualWidthPhi_vs_eta_pixel_barrel_l%i", ilayer); - sprintf(title, "Residual width: Pixel Barrel R-Phi Layer %i vs. incident eta;pixel eta;residual (r-phi) width" ,ilayer); + snprintf(name, bufferLength, "residualWidthPhi_vs_eta_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Residual width: Pixel Barrel R-Phi Layer %i vs. incident eta;pixel eta;residual (r-phi) width" ,ilayer); m_residualWidthPhi_vs_eta_pixel_barrel_layer.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "residualMeanPhi_vs_phi_pixel_barrel_l%i", ilayer); - sprintf(title, "Residual mean: Pixel Barrel R-Phi Layer %i vs. incident phi;pixel phi;residual (r-phi) mean" ,ilayer); + snprintf(name, bufferLength, "residualMeanPhi_vs_phi_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Residual mean: Pixel Barrel R-Phi Layer %i vs. incident phi;pixel phi;residual (r-phi) mean" ,ilayer); m_residualMeanPhi_vs_phi_pixel_barrel_layer.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "residualWidthPhi_vs_phi_pixel_barrel_l%i", ilayer); - sprintf(title, "Residual width: Pixel Barrel R-Phi Layer %i vs. incident phi;pixel phi;residual (r-phi) width" ,ilayer); + snprintf(name, bufferLength, "residualWidthPhi_vs_phi_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Residual width: Pixel Barrel R-Phi Layer %i vs. incident phi;pixel phi;residual (r-phi) width" ,ilayer); m_residualWidthPhi_vs_phi_pixel_barrel_layer.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "pullMeanZ_vs_incident_pixel_barrel_l%i", ilayer); - sprintf(title, "Pull mean: Pixel Barrel Z Layer %i vs. incident normal;angle w/ normal;pull (r-z) mean" ,ilayer); + snprintf(name, bufferLength, "pullMeanZ_vs_incident_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Pull mean: Pixel Barrel Z Layer %i vs. incident normal;angle w/ normal;pull (r-z) mean" ,ilayer); m_pullMeanZ_vs_incident_pixel_barrel_layer.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "pullWidthZ_vs_incident_pixel_barrel_l%i", ilayer); - sprintf(title, "Pull width: Pixel Barrel Z Layer %i vs. incident normal;angle w/ normal;pull (r-z) width" ,ilayer); + snprintf(name, bufferLength, "pullWidthZ_vs_incident_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Pull width: Pixel Barrel Z Layer %i vs. incident normal;angle w/ normal;pull (r-z) width" ,ilayer); m_pullWidthZ_vs_incident_pixel_barrel_layer.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "pullMeanZ_vs_eta_pixel_barrel_l%i", ilayer); - sprintf(title, "Pull mean: Pixel Barrel Z Layer %i vs. incident eta;pixel eta;pull (r-z) mean" ,ilayer); + snprintf(name, bufferLength, "pullMeanZ_vs_eta_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Pull mean: Pixel Barrel Z Layer %i vs. incident eta;pixel eta;pull (r-z) mean" ,ilayer); m_pullMeanZ_vs_eta_pixel_barrel_layer.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "pullWidthZ_vs_eta_pixel_barrel_l%i", ilayer); - sprintf(title, "Pull width: Pixel Barrel Z Layer %i vs. incident eta;pixel eta;pull (r-z) width" ,ilayer); + snprintf(name, bufferLength, "pullWidthZ_vs_eta_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Pull width: Pixel Barrel Z Layer %i vs. incident eta;pixel eta;pull (r-z) width" ,ilayer); m_pullWidthZ_vs_eta_pixel_barrel_layer.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "pullMeanZ_vs_phi_pixel_barrel_l%i", ilayer); - sprintf(title, "Pull mean: Pixel Barrel Z Layer %i vs. incident phi;pixel phi;pull (r-z) mean" ,ilayer); + snprintf(name, bufferLength, "pullMeanZ_vs_phi_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Pull mean: Pixel Barrel Z Layer %i vs. incident phi;pixel phi;pull (r-z) mean" ,ilayer); m_pullMeanZ_vs_phi_pixel_barrel_layer.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "pullWidthZ_vs_phi_pixel_barrel_l%i", ilayer); - sprintf(title, "Pull width: Pixel Barrel Z Layer %i vs. incident phi;pixel phi;pull (r-z) width" ,ilayer); + snprintf(name, bufferLength, "pullWidthZ_vs_phi_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Pull width: Pixel Barrel Z Layer %i vs. incident phi;pixel phi;pull (r-z) width" ,ilayer); m_pullWidthZ_vs_phi_pixel_barrel_layer.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "residualMeanZ_vs_incident_pixel_barrel_l%i", ilayer); - sprintf(title, "Residual mean: Pixel Barrel Z Layer %i vs. incident normal;angle w/ normal;residual (r-z) mean" ,ilayer); + snprintf(name, bufferLength, "residualMeanZ_vs_incident_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Residual mean: Pixel Barrel Z Layer %i vs. incident normal;angle w/ normal;residual (r-z) mean" ,ilayer); m_residualMeanZ_vs_incident_pixel_barrel_layer.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "residualWidthZ_vs_incident_pixel_barrel_l%i", ilayer); - sprintf(title, "Residual width: Pixel Barrel Z Layer %i vs. incident normal;angle w/normal;residual (r-z) width" ,ilayer); + snprintf(name, bufferLength, "residualWidthZ_vs_incident_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Residual width: Pixel Barrel Z Layer %i vs. incident normal;angle w/normal;residual (r-z) width" ,ilayer); m_residualWidthZ_vs_incident_pixel_barrel_layer.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "residualMeanZ_vs_eta_pixel_barrel_l%i", ilayer); - sprintf(title, "Residual mean: Pixel Barrel Z Layer %i vs. incident eta;pixel eta;residual (r-z) mean" ,ilayer); + snprintf(name, bufferLength, "residualMeanZ_vs_eta_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Residual mean: Pixel Barrel Z Layer %i vs. incident eta;pixel eta;residual (r-z) mean" ,ilayer); m_residualMeanZ_vs_eta_pixel_barrel_layer.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "residualWidthZ_vs_eta_pixel_barrel_l%i", ilayer); - sprintf(title, "Residual width: Pixel Barrel Z Layer %i vs. incident eta;pixel eta;residual (r-z) width" ,ilayer); + snprintf(name, bufferLength, "residualWidthZ_vs_eta_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Residual width: Pixel Barrel Z Layer %i vs. incident eta;pixel eta;residual (r-z) width" ,ilayer); m_residualWidthZ_vs_eta_pixel_barrel_layer.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "residualMeanZ_vs_phi_pixel_barrel_l%i", ilayer); - sprintf(title, "Residual mean: Pixel Barrel Z Layer %i vs. incident phi;pixel phi;residual (r-z) mean" ,ilayer); + snprintf(name, bufferLength, "residualMeanZ_vs_phi_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Residual mean: Pixel Barrel Z Layer %i vs. incident phi;pixel phi;residual (r-z) mean" ,ilayer); m_residualMeanZ_vs_phi_pixel_barrel_layer.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "residualWidthZ_vs_phi_pixel_barrel_l%i", ilayer); - sprintf(title, "Residual width: Pixel Barrel Z Layer %i vs. incident phi;pixel phi;residual (r-z) width" ,ilayer); + snprintf(name, bufferLength, "residualWidthZ_vs_phi_pixel_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Residual width: Pixel Barrel Z Layer %i vs. incident phi;pixel phi;residual (r-z) width" ,ilayer); m_residualWidthZ_vs_phi_pixel_barrel_layer.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); } @@ -1195,146 +1193,146 @@ StatusCode IDStandardPerformance::bookHistograms() // -- // pixel endcap section if (ilayer < pixelEndcapDisks){ - sprintf(name, "pullPhi_incident_pixel_endcap_d%i", ilayer); - sprintf(title, "Pull: Pixel Endcap Phi vs incident normal Disk %i;angle w/ normal;pull (r-phi)" ,ilayer); + snprintf(name, bufferLength, "pullPhi_incident_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Pull: Pixel Endcap Phi vs incident normal Disk %i;angle w/ normal;pull (r-phi)" ,ilayer); m_pullPhi_vs_incident_pixel_endcap_d.push_back(create_registeredTH2F(pull_shift, name, title, 25, min_normal_endcap, max_normal_endcap, 100, -5, 5)); - sprintf(name, "residualPhi_incident_pixel_endcap_d%i", ilayer); - sprintf(title, "Residual: Pixel Endcap Phi vs incident normal Disk %i;angle w/ normal;residual (r-phi)" ,ilayer); + snprintf(name, bufferLength, "residualPhi_incident_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Residual: Pixel Endcap Phi vs incident normal Disk %i;angle w/ normal;residual (r-phi)" ,ilayer); m_residualPhi_vs_incident_pixel_endcap_d.push_back(create_registeredTH2F(pull_shift, name, title, 25, min_normal_endcap, max_normal_endcap, 200, -0.5, 0.5)); - sprintf(name, "pullPhi_pixel_eta_endcap_d%i", ilayer); - sprintf(title, "Pull: Pixel Endcap Phi vs incident eta Disk %i;pixel eta;pull (r-phi)" ,ilayer); + snprintf(name, bufferLength, "pullPhi_pixel_eta_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Pull: Pixel Endcap Phi vs incident eta Disk %i;pixel eta;pull (r-phi)" ,ilayer); m_pullPhi_vs_eta_pixel_endcap_d.push_back(create_registeredTH2F(pull_shift, name, title, 25, min_eta_endcap, max_eta_endcap, 100, -5, 5)); - sprintf(name, "residualPhi_eta_pixel_endcap_d%i", ilayer); - sprintf(title, "Residual: Pixel Endcap Phi vs incident eta Disk %i;pixel eta;residual (r-phi)" ,ilayer); + snprintf(name, bufferLength, "residualPhi_eta_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Residual: Pixel Endcap Phi vs incident eta Disk %i;pixel eta;residual (r-phi)" ,ilayer); m_residualPhi_vs_eta_pixel_endcap_d.push_back(create_registeredTH2F(pull_shift, name, title, 25, min_eta_endcap, max_eta_endcap, 200, -0.5, 0.5)); - sprintf(name, "pullPhi_phi_pixel_endcap_d%i", ilayer); - sprintf(title, "Pull: Pixel Endcap Phi vs incident phi Disk %i;pixel phi;pull (r-phi)" ,ilayer); + snprintf(name, bufferLength, "pullPhi_phi_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Pull: Pixel Endcap Phi vs incident phi Disk %i;pixel phi;pull (r-phi)" ,ilayer); m_pullPhi_vs_phi_pixel_endcap_d.push_back(create_registeredTH2F(pull_shift, name, title, nbins_eta, min_phi_endcap, max_phi_endcap, 100, -5, 5)); - sprintf(name, "residualPhi_phi_pixel_endcap_d%i", ilayer); - sprintf(title, "Residual: Pixel Endcap Phi vs incident phi Disk %i;pixel phi;residual (r-phi)" ,ilayer); + snprintf(name, bufferLength, "residualPhi_phi_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Residual: Pixel Endcap Phi vs incident phi Disk %i;pixel phi;residual (r-phi)" ,ilayer); m_residualPhi_vs_phi_pixel_endcap_d.push_back(create_registeredTH2F(pull_shift, name, title, nbins_eta, min_phi_endcap, max_phi_endcap, 200, -0.5, 0.5)); // -- - sprintf(name, "pullZ_incident_pixel_endcap_d%i", ilayer); - sprintf(title, "Pull: Pixel Endcap Z vs incident normal Disk %i;angle w/ normal;pull (r-z)" ,ilayer); + snprintf(name, bufferLength, "pullZ_incident_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Pull: Pixel Endcap Z vs incident normal Disk %i;angle w/ normal;pull (r-z)" ,ilayer); m_pullZ_vs_incident_pixel_endcap_d.push_back(create_registeredTH2F(pull_shift, name, title, nbins_eta, min_normal_endcap, max_normal_endcap, 100, -5, 5)); - sprintf(name, "residualZ_incident_pixel_endcap_d%i", ilayer); - sprintf(title, "Residual: Pixel Endcap Z vs incident normal Disk %i;angle w/ normal;residual (r-z)" ,ilayer); + snprintf(name, bufferLength, "residualZ_incident_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Residual: Pixel Endcap Z vs incident normal Disk %i;angle w/ normal;residual (r-z)" ,ilayer); m_residualZ_vs_incident_pixel_endcap_d.push_back(create_registeredTH2F(pull_shift, name, title, nbins_eta, min_normal_endcap, max_normal_endcap, 200, -1, 1)); - sprintf(name, "pullZ_eta_pixel_endcap_d%i", ilayer); - sprintf(title, "Pull: Pixel Endcap Z vs incident eta Disk %i;pixel eta;pull (r-z)" ,ilayer); + snprintf(name, bufferLength, "pullZ_eta_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Pull: Pixel Endcap Z vs incident eta Disk %i;pixel eta;pull (r-z)" ,ilayer); m_pullZ_vs_eta_pixel_endcap_d.push_back(create_registeredTH2F(pull_shift, name, title, nbins_eta, min_eta_endcap, max_eta_endcap, 100, -5, 5)); - sprintf(name, "residualZ_eta_pixel_endcap_d%i", ilayer); - sprintf(title, "Residual: Pixel Endcap Z vs incident eta Disk %i;pixel eta;residual (r-z)" ,ilayer); + snprintf(name, bufferLength, "residualZ_eta_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Residual: Pixel Endcap Z vs incident eta Disk %i;pixel eta;residual (r-z)" ,ilayer); m_residualZ_vs_eta_pixel_endcap_d.push_back(create_registeredTH2F(pull_shift, name, title, nbins_eta, min_eta_endcap, max_eta_endcap, 200, -1, 1)); - sprintf(name, "pullZ_phi_pixel_endcap_d%i", ilayer); - sprintf(title, "Pull: Pixel Endcap Z vs incident phi Disk %i;pixel phi;pull (r-z)" ,ilayer); + snprintf(name, bufferLength, "pullZ_phi_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Pull: Pixel Endcap Z vs incident phi Disk %i;pixel phi;pull (r-z)" ,ilayer); m_pullZ_vs_phi_pixel_endcap_d.push_back(create_registeredTH2F(pull_shift, name, title, nbins_eta, min_phi_endcap, max_phi_endcap, 100, -5, 5)); - sprintf(name, "residualZ_phi_pixel_endcap_d%i", ilayer); - sprintf(title, "Residual: Pixel Endcap Z vs incident phi Disk %i;pixel eta;residual (r-z)" ,ilayer); + snprintf(name, bufferLength, "residualZ_phi_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Residual: Pixel Endcap Z vs incident phi Disk %i;pixel eta;residual (r-z)" ,ilayer); m_residualZ_vs_phi_pixel_endcap_d.push_back(create_registeredTH2F(pull_shift, name, title, nbins_eta, min_phi_endcap, max_phi_endcap, 200, -1, 1)); - sprintf(name, "pullMeanPhi_vs_incident_pixel_endcap_d%i", ilayer); - sprintf(title, "Pull mean: Pixel Endcap R-Phi Disk %i vs. incident normal;angle w/ normal;pull (r-phi) mean" ,ilayer); + snprintf(name, bufferLength, "pullMeanPhi_vs_incident_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Pull mean: Pixel Endcap R-Phi Disk %i vs. incident normal;angle w/ normal;pull (r-phi) mean" ,ilayer); m_pullMeanPhi_vs_incident_pixel_endcap_disk.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "pullWidthPhi_vs_incident_pixel_endcap_d%i", ilayer); - sprintf(title, "Pull width: Pixel Endcap R-Phi Disk %i vs. incident normal;angle w/ normal;pull (r-phi) width" ,ilayer); + snprintf(name, bufferLength, "pullWidthPhi_vs_incident_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Pull width: Pixel Endcap R-Phi Disk %i vs. incident normal;angle w/ normal;pull (r-phi) width" ,ilayer); m_pullWidthPhi_vs_incident_pixel_endcap_disk.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "pullMeanPhi_vs_eta_pixel_endcap_d%i", ilayer); - sprintf(title, "Pull mean: Pixel Endcap R-Phi Disk %i vs. incident eta;pixel eta;pull (r-phi) mean" ,ilayer); + snprintf(name, bufferLength, "pullMeanPhi_vs_eta_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Pull mean: Pixel Endcap R-Phi Disk %i vs. incident eta;pixel eta;pull (r-phi) mean" ,ilayer); m_pullMeanPhi_vs_eta_pixel_endcap_disk.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "pullWidthPhi_vs_eta_pixel_endcap_d%i", ilayer); - sprintf(title, "Pull width: Pixel Endcap R-Phi Disk %i vs. incident eta;pixel eta;pull (r-phi) width" ,ilayer); + snprintf(name, bufferLength, "pullWidthPhi_vs_eta_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Pull width: Pixel Endcap R-Phi Disk %i vs. incident eta;pixel eta;pull (r-phi) width" ,ilayer); m_pullWidthPhi_vs_eta_pixel_endcap_disk.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "pullMeanPhi_vs_phi_pixel_endcap_d%i", ilayer); - sprintf(title, "Pull mean: Pixel Endcap R-Phi Disk %i vs. incident phi;pixel phi;pull (r-phi) mean" ,ilayer); + snprintf(name, bufferLength, "pullMeanPhi_vs_phi_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Pull mean: Pixel Endcap R-Phi Disk %i vs. incident phi;pixel phi;pull (r-phi) mean" ,ilayer); m_pullMeanPhi_vs_phi_pixel_endcap_disk.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "pullWidthPhi_vs_phi_pixel_endcap_d%i", ilayer); - sprintf(title, "Pull width: Pixel Endcap R-Phi Disk %i vs. incident phi;pixel phi;pull (r-phi) width" ,ilayer); + snprintf(name, bufferLength, "pullWidthPhi_vs_phi_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Pull width: Pixel Endcap R-Phi Disk %i vs. incident phi;pixel phi;pull (r-phi) width" ,ilayer); m_pullWidthPhi_vs_phi_pixel_endcap_disk.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "residualMeanPhi_vs_incident_pixel_endcap_d%i", ilayer); - sprintf(title, "Residual mean: Pixel Endcap R-Phi Disk %i vs. incident normal;angle w/ normal;residual (r-phi) mean" ,ilayer); + snprintf(name, bufferLength, "residualMeanPhi_vs_incident_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Residual mean: Pixel Endcap R-Phi Disk %i vs. incident normal;angle w/ normal;residual (r-phi) mean" ,ilayer); m_residualMeanPhi_vs_incident_pixel_endcap_disk.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "residualWidthPhi_vs_incident_pixel_endcap_d%i", ilayer); - sprintf(title, "Residual width: Pixel Endcap R-Phi Disk %i vs. incident normal;angle w/ normal;residual (r-phi) width" ,ilayer); + snprintf(name, bufferLength, "residualWidthPhi_vs_incident_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Residual width: Pixel Endcap R-Phi Disk %i vs. incident normal;angle w/ normal;residual (r-phi) width" ,ilayer); m_residualWidthPhi_vs_incident_pixel_endcap_disk.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "residualMeanPhi_vs_eta_pixel_endcap_d%i", ilayer); - sprintf(title, "Residual mean: Pixel Endcap R-Phi Disk %i vs. incident eta;pixel eta;residual (r-phi) mean" ,ilayer); + snprintf(name, bufferLength, "residualMeanPhi_vs_eta_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Residual mean: Pixel Endcap R-Phi Disk %i vs. incident eta;pixel eta;residual (r-phi) mean" ,ilayer); m_residualMeanPhi_vs_eta_pixel_endcap_disk.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "residualWidthPhi_vs_eta_pixel_endcap_d%i", ilayer); - sprintf(title, "Residual width: Pixel Endcap R-Phi Disk %i vs. incident eta;pixel eta;residual (r-phi) width" ,ilayer); + snprintf(name, bufferLength, "residualWidthPhi_vs_eta_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Residual width: Pixel Endcap R-Phi Disk %i vs. incident eta;pixel eta;residual (r-phi) width" ,ilayer); m_residualWidthPhi_vs_eta_pixel_endcap_disk.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "residualMeanPhi_vs_phi_pixel_endcap_d%i", ilayer); - sprintf(title, "Residual mean: Pixel Endcap R-Phi Disk %i vs. incident phi;pixel phi;residual (r-phi) mean" ,ilayer); + snprintf(name, bufferLength, "residualMeanPhi_vs_phi_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Residual mean: Pixel Endcap R-Phi Disk %i vs. incident phi;pixel phi;residual (r-phi) mean" ,ilayer); m_residualMeanPhi_vs_phi_pixel_endcap_disk.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "residualWidthPhi_vs_phi_pixel_endcap_d%i", ilayer); - sprintf(title, "Residual width: Pixel Endcap R-Phi Disk %i vs. incident phi;pixel phi;residual (r-phi) width" ,ilayer); + snprintf(name, bufferLength, "residualWidthPhi_vs_phi_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Residual width: Pixel Endcap R-Phi Disk %i vs. incident phi;pixel phi;residual (r-phi) width" ,ilayer); m_residualWidthPhi_vs_phi_pixel_endcap_disk.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "pullMeanZ_vs_incident_pixel_endcap_d%i", ilayer); - sprintf(title, "Pull width: Pixel Endcap Z Disk %i vs. incident normal;angle w/ normal;pull (r-z) mean" ,ilayer); + snprintf(name, bufferLength, "pullMeanZ_vs_incident_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Pull width: Pixel Endcap Z Disk %i vs. incident normal;angle w/ normal;pull (r-z) mean" ,ilayer); m_pullMeanZ_vs_incident_pixel_endcap_disk.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "pullWidthZ_vs_incident_pixel_endcap_d%i", ilayer); - sprintf(title, "Pull width: Pixel Endcap Z Disk %i vs. incident normal;angle w/ normal;pull (r-z) width" ,ilayer); + snprintf(name, bufferLength, "pullWidthZ_vs_incident_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Pull width: Pixel Endcap Z Disk %i vs. incident normal;angle w/ normal;pull (r-z) width" ,ilayer); m_pullWidthZ_vs_incident_pixel_endcap_disk.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "pullMeanZ_vs_eta_pixel_endcap_d%i", ilayer); - sprintf(title, "Pull width: Pixel Endcap Z Disk %i vs. incident eta;pixel eta;pull (r-z) mean" ,ilayer); + snprintf(name, bufferLength, "pullMeanZ_vs_eta_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Pull width: Pixel Endcap Z Disk %i vs. incident eta;pixel eta;pull (r-z) mean" ,ilayer); m_pullMeanZ_vs_eta_pixel_endcap_disk.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "pullWidthZ_vs_eta_pixel_endcap_d%i", ilayer); - sprintf(title, "Pull width: Pixel Endcap Z Disk %i vs. incident eta;pixel eta;pull (r-z) width" ,ilayer); + snprintf(name, bufferLength, "pullWidthZ_vs_eta_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Pull width: Pixel Endcap Z Disk %i vs. incident eta;pixel eta;pull (r-z) width" ,ilayer); m_pullWidthZ_vs_eta_pixel_endcap_disk.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "pullMeanZ_vs_phi_pixel_endcap_d%i", ilayer); - sprintf(title, "Pull width: Pixel Endcap Z Disk %i vs. incident phi;pixel phi;pull (r-z) mean" ,ilayer); + snprintf(name, bufferLength, "pullMeanZ_vs_phi_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Pull width: Pixel Endcap Z Disk %i vs. incident phi;pixel phi;pull (r-z) mean" ,ilayer); m_pullMeanZ_vs_phi_pixel_endcap_disk.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "pullWidthZ_vs_phi_pixel_endcap_d%i", ilayer); - sprintf(title, "Pull width: Pixel Endcap Z Disk %i vs. incident phi;pixel phi;pull (r-z) width" ,ilayer); + snprintf(name, bufferLength, "pullWidthZ_vs_phi_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Pull width: Pixel Endcap Z Disk %i vs. incident phi;pixel phi;pull (r-z) width" ,ilayer); m_pullWidthZ_vs_phi_pixel_endcap_disk.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "residualMeanZ_vs_incident_pixel_endcap_d%i", ilayer); - sprintf(title, "Residual mean: Pixel Endcap Z Disk %i vs. incident normal;angle w/ normal;residual (r-z) mean" ,ilayer); + snprintf(name, bufferLength, "residualMeanZ_vs_incident_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Residual mean: Pixel Endcap Z Disk %i vs. incident normal;angle w/ normal;residual (r-z) mean" ,ilayer); m_residualMeanZ_vs_incident_pixel_endcap_disk.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "residualWidthZ_vs_incident_pixel_endcap_d%i", ilayer); - sprintf(title, "Residual width: Pixel Endcap Z Disk %i vs. incident normal;angle w/ normal;residual (r-z) width" ,ilayer); + snprintf(name, bufferLength, "residualWidthZ_vs_incident_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Residual width: Pixel Endcap Z Disk %i vs. incident normal;angle w/ normal;residual (r-z) width" ,ilayer); m_residualWidthZ_vs_incident_pixel_endcap_disk.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "residualMeanZ_vs_eta_pixel_endcap_d%i", ilayer); - sprintf(title, "Residual mean: Pixel Endcap Z Disk %i vs. incident eta;pixel eta;residual (r-z) mean" ,ilayer); + snprintf(name, bufferLength, "residualMeanZ_vs_eta_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Residual mean: Pixel Endcap Z Disk %i vs. incident eta;pixel eta;residual (r-z) mean" ,ilayer); m_residualMeanZ_vs_eta_pixel_endcap_disk.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "residualWidthZ_vs_eta_pixel_endcap_d%i", ilayer); - sprintf(title, "Residual width: Pixel Endcap Z Disk %i vs. incident eta;pixel eta;residual (r-z) width" ,ilayer); + snprintf(name, bufferLength, "residualWidthZ_vs_eta_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Residual width: Pixel Endcap Z Disk %i vs. incident eta;pixel eta;residual (r-z) width" ,ilayer); m_residualWidthZ_vs_eta_pixel_endcap_disk.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "residualMeanZ_vs_phi_pixel_endcap_d%i", ilayer); - sprintf(title, "Residual mean: Pixel Endcap Z Disk %i vs. incident phi;pixel phi;residual (r-z) mean" ,ilayer); + snprintf(name, bufferLength, "residualMeanZ_vs_phi_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Residual mean: Pixel Endcap Z Disk %i vs. incident phi;pixel phi;residual (r-z) mean" ,ilayer); m_residualMeanZ_vs_phi_pixel_endcap_disk.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); - sprintf(name, "residualWidthZ_vs_phi_pixel_endcap_d%i", ilayer); - sprintf(title, "Residual width: Pixel Endcap Z Disk %i vs. incident phi;pixel phi;residual (r-z) width" ,ilayer); + snprintf(name, bufferLength, "residualWidthZ_vs_phi_pixel_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Residual width: Pixel Endcap Z Disk %i vs. incident phi;pixel phi;residual (r-z) width" ,ilayer); m_residualWidthZ_vs_phi_pixel_endcap_disk.push_back(create_registeredTH1F(pull_parent, name, title, 100, -5, 5)); } @@ -1348,25 +1346,25 @@ StatusCode IDStandardPerformance::bookHistograms() etaBinLabels[4] = "2.0 < eta <= 2.5"; for (int iEtaBin=0; iEtaBin<5; iEtaBin++) { if (ilayer < pixelBarrelLayers){ - sprintf(name, "pullPhi_phi_pixel_endcap_d%i_etaBin%i", ilayer, iEtaBin); - sprintf(title, "Pull: Pixel Barrel Phi vs incident phi Layer %i, %s;pixel phi;pull (r-phi)" ,ilayer, etaBinLabels[iEtaBin].c_str()); + snprintf(name, bufferLength, "pullPhi_phi_pixel_endcap_d%i_etaBin%i", ilayer, iEtaBin); + snprintf(title, bufferLength, "Pull: Pixel Barrel Phi vs incident phi Layer %i, %s;pixel phi;pull (r-phi)" ,ilayer, etaBinLabels[iEtaBin].c_str()); m_pullPhi_vs_phi_pixel_barrel_etaBins[iEtaBin][ilayer] = create_registeredTH2F(pull_shift, name, title, nbins_eta, min_phi, max_phi, 200, -5, 5); - sprintf(name, "residualPhi_phi_pixel_endcap_d%i_etaBin%i", ilayer, iEtaBin); - sprintf(title, "Residual: Pixel Barrel Phi vs incident phi Layer %i, %s;pixel phi;residual (r-phi)" ,ilayer, etaBinLabels[iEtaBin].c_str()); + snprintf(name, bufferLength, "residualPhi_phi_pixel_endcap_d%i_etaBin%i", ilayer, iEtaBin); + snprintf(title, bufferLength, "Residual: Pixel Barrel Phi vs incident phi Layer %i, %s;pixel phi;residual (r-phi)" ,ilayer, etaBinLabels[iEtaBin].c_str()); m_residualPhi_vs_phi_pixel_barrel_etaBins[iEtaBin][ilayer] = create_registeredTH2F(pull_shift, name, title, nbins_eta, min_phi, max_phi, 200, -1, 1); // One profile each for the value and the width // The axis is meaningless, as it's projected from the 2d hist - sprintf(name, "pullMeanPhi_vs_incident_pixel_barrel_l%i_etaBin%i", ilayer, iEtaBin); - sprintf(title, "Pull mean: Pixel Barrel R-Phi Layer %i vs. incident phi %s;pixel phi;pull (r-phi) mean" ,ilayer, etaBinLabels[iEtaBin].c_str()); + snprintf(name, bufferLength, "pullMeanPhi_vs_incident_pixel_barrel_l%i_etaBin%i", ilayer, iEtaBin); + snprintf(title, bufferLength, "Pull mean: Pixel Barrel R-Phi Layer %i vs. incident phi %s;pixel phi;pull (r-phi) mean" ,ilayer, etaBinLabels[iEtaBin].c_str()); m_pullMeanPhi_vs_phi_pixel_barrel_etaBins[iEtaBin][ilayer] = create_registeredTH1F(pull_parent, name, title, 100, -5, 5); - sprintf(name, "pullWidthPhi_vs_incident_pixel_barrel_l%i_etaBin_%i", ilayer, iEtaBin); - sprintf(title, "Pull width: Pixel Barrel R-Phi Layer %i vs. incident phi %s;pixel phi;pull (r-phi) width" ,ilayer, etaBinLabels[iEtaBin].c_str()); + snprintf(name, bufferLength, "pullWidthPhi_vs_incident_pixel_barrel_l%i_etaBin_%i", ilayer, iEtaBin); + snprintf(title, bufferLength, "Pull width: Pixel Barrel R-Phi Layer %i vs. incident phi %s;pixel phi;pull (r-phi) width" ,ilayer, etaBinLabels[iEtaBin].c_str()); m_pullWidthPhi_vs_phi_pixel_barrel_etaBins[iEtaBin][ilayer] = create_registeredTH1F(pull_parent, name, title, 100, -5, 5); - sprintf(name, "residualMeanPhi_vs_incident_pixel_barrel_l%i_etaBin%i", ilayer, iEtaBin); - sprintf(title, "Residual mean: Pixel Barrel R-Phi Layer %i vs. incident phi %s;pixel phi;residual (r-phi) mean" ,ilayer, etaBinLabels[iEtaBin].c_str()); + snprintf(name, bufferLength, "residualMeanPhi_vs_incident_pixel_barrel_l%i_etaBin%i", ilayer, iEtaBin); + snprintf(title, bufferLength, "Residual mean: Pixel Barrel R-Phi Layer %i vs. incident phi %s;pixel phi;residual (r-phi) mean" ,ilayer, etaBinLabels[iEtaBin].c_str()); m_residualMeanPhi_vs_phi_pixel_barrel_etaBins[iEtaBin][ilayer] = create_registeredTH1F(pull_parent, name, title, 100, -5, 5); - sprintf(name, "residualWidthPhi_vs_incident_pixel_barrel_l%i_etaBin%i", ilayer, iEtaBin); - sprintf(title, "Residual width: Pixel Barrel R-Phi Layer %i vs. incident phi %s;pixel phi;residual(r-phi) width" ,ilayer, etaBinLabels[iEtaBin].c_str()); + snprintf(name, bufferLength, "residualWidthPhi_vs_incident_pixel_barrel_l%i_etaBin%i", ilayer, iEtaBin); + snprintf(title, bufferLength, "Residual width: Pixel Barrel R-Phi Layer %i vs. incident phi %s;pixel phi;residual(r-phi) width" ,ilayer, etaBinLabels[iEtaBin].c_str()); m_residualWidthPhi_vs_phi_pixel_barrel_etaBins[iEtaBin][ilayer] = create_registeredTH1F(pull_parent, name, title, 100, -5, 5); } } @@ -1397,13 +1395,13 @@ StatusCode IDStandardPerformance::bookHistograms() for (int ilayer=0; ilayer<sctBarrelLayers; ilayer++) { char name[200]; char title[200]; - sprintf(name, "residualx_sct_barrel_l%i", ilayer); - sprintf(title, "Residual: SCT Barrel X L%i;x residual(#mum)" ,ilayer); + snprintf(name, bufferLength, "residualx_sct_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Residual: SCT Barrel X L%i;x residual(#mum)" ,ilayer); m_residualx_sct_barrel_l.push_back(create_registeredTH1F(al_expert, name, title,140,-70,70)); // residual pulls - sprintf(name, "residualpullx_sct_barrel_l%i", ilayer); - sprintf(title, "Residualpull: SCT Barrel X L%i;x pull residual" ,ilayer); + snprintf(name, bufferLength, "residualpullx_sct_barrel_l%i", ilayer); + snprintf(title, bufferLength, "Residualpull: SCT Barrel X L%i;x pull residual" ,ilayer); m_residualpullx_sct_barrel_l.push_back(create_registeredTH1F(al_expert, name, title, 100, -5, 5)); } @@ -1412,13 +1410,13 @@ StatusCode IDStandardPerformance::bookHistograms() for (int ilayer=0; ilayer<sctEndcapDisks; ilayer++) { char name[200]; char title[200]; - sprintf(name, "residualx_sct_endcap_d%i", ilayer); - sprintf(title, "Residual: SCT Endcap X L%i;x residual(#mum)" ,ilayer); + snprintf(name, bufferLength, "residualx_sct_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Residual: SCT Endcap X L%i;x residual(#mum)" ,ilayer); m_residualx_sct_endcap_d.push_back(create_registeredTH1F(al_expert, name, title,140,-70,70)); // residual pulls - sprintf(name, "residualpullx_sct_endcap_d%i", ilayer); - sprintf(title, "Residualpull: SCT Endcap X L%i;x pull residual" ,ilayer); + snprintf(name, bufferLength, "residualpullx_sct_endcap_d%i", ilayer); + snprintf(title, bufferLength, "Residualpull: SCT Endcap X L%i;x pull residual" ,ilayer); m_residualpullx_sct_endcap_d.push_back(create_registeredTH1F(al_expert, name, title, 100,-5,5)); } @@ -3518,7 +3516,7 @@ void IDStandardPerformance::MakeDataPlots(const DataVector<Trk::Track>* trks) { float chi2oDoF = -1; if (fitQual!=0) { float chisquared = (fitQual) ? fitQual->chiSquared() : -1.; - int DoF = (fitQual) ? fitQual->numberDoF() : -1; + int DoF = fitQual->numberDoF(); if(DoF>0) chi2oDoF = chisquared/(float)DoF; } -- GitLab From 9d9ef6d64193f6119aeee9ec7f902166bd445b63 Mon Sep 17 00:00:00 2001 From: Susumu Oda <susumu.oda@cern.ch> Date: Fri, 20 Jul 2018 09:10:22 +0000 Subject: [PATCH 551/562] Update ReadSiDetectorElements to use the AthenaMT compatible SCT alignment (ATLASRECTS-4517) Former-commit-id: 16faa5120c97b17ad634bb191d9955d0081741f0 --- .../SiDetectorElementCollection.h | 8 +- .../src/SiDetectorElementCollection.cxx | 14 ++ .../ReadSiDetectorElements.h | 13 +- .../ReadSiDetectorElements_jobOptions.py | 4 +- .../src/ReadSiDetectorElements.cxx | 137 +++++++++++++----- .../ReadSiDetectorElements_jobOptions.py | 4 +- 6 files changed, 130 insertions(+), 50 deletions(-) create mode 100644 InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElementCollection.cxx diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElementCollection.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElementCollection.h index 7ebd98063ee5..4fe791a85403 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElementCollection.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElementCollection.h @@ -14,6 +14,8 @@ #include <vector> +class IdentifierHash; + namespace InDetDD { class SiDetectorElement; @@ -25,8 +27,10 @@ namespace InDetDD { @author Grant Gorfine */ - class SiDetectorElementCollection : public std::vector<SiDetectorElement *> -{}; + class SiDetectorElementCollection : public std::vector<SiDetectorElement *> { + public: + const SiDetectorElement* getDetectorElement(const IdentifierHash& hash) const; + }; } // namespace InDetDD diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElementCollection.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElementCollection.cxx new file mode 100644 index 000000000000..c2aa2784e829 --- /dev/null +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElementCollection.cxx @@ -0,0 +1,14 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "InDetReadoutGeometry/SiDetectorElementCollection.h" + +#include "Identifier/IdentifierHash.h" + +const InDetDD::SiDetectorElement* +InDetDD::SiDetectorElementCollection::getDetectorElement(const IdentifierHash& hash) const { + const unsigned int value{hash.value()}; + if (this->size()<=value) return nullptr; + return this->at(value); +} diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/ReadSiDetectorElements.h b/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/ReadSiDetectorElements.h index 6e9b34d503c8..7a12623f19a1 100755 --- a/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/ReadSiDetectorElements.h +++ b/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/ReadSiDetectorElements.h @@ -10,8 +10,10 @@ #include "GaudiKernel/ToolHandle.h" #include "AthenaKernel/IOVSvcDefs.h" #include "InDetReadoutGeometry/SiCellId.h" +#include "InDetReadoutGeometry/SiDetectorElementCollection.h" #include "GeoPrimitives/GeoPrimitives.h" #include "SiPropertiesSvc/ISiPropertiesTool.h" +#include "StoreGate/ReadCondHandleKey.h" #include "InDetConditionsSummaryService/ISiliconConditionsTool.h" #include "InDetCondServices/ISiLorentzAngleTool.h" @@ -41,11 +43,12 @@ public: StatusCode finalize(); void testElement(const Identifier & id, - const std::vector<InDetDD::SiCellId> & cellIdVec, - const std::vector<Amg::Vector2D> & positionsVec) const; + const std::vector<InDetDD::SiCellId> & cellIdVec, + const std::vector<Amg::Vector2D> & positionsVec, + const InDetDD::SiDetectorElementCollection* elements=nullptr) const; std::string printElementId(const InDetDD::SiDetectorElement * element) const; - void printAllElements(); - void printRandomAccess(); + void printAllElements(const bool accessDuringInitialization); + void printRandomAccess(const bool accessDuringInitialization); private: // Job properties @@ -61,6 +64,8 @@ public: ToolHandle<ISiPropertiesTool> m_siPropertiesTool{this, "SiPropertiesTool", "SiPropertiesTool", "Silicon properties tool"}; ToolHandle<ISiLorentzAngleTool> m_siLorentzAngleTool{this, "SiLorentzAngleTool", "SiLorentzAngleTool", "Silicon Lorentz anglet tool"}; + SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_detEleCollKey{this, "DetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection"}; + // Other const InDetDD::SiDetectorManager * m_manager; const AtlasDetectorID * m_idHelper; diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/share/ReadSiDetectorElements_jobOptions.py b/InnerDetector/InDetExample/InDetDetDescrExample/share/ReadSiDetectorElements_jobOptions.py index 0470162fe209..a5884ad4a7b5 100755 --- a/InnerDetector/InDetExample/InDetDetDescrExample/share/ReadSiDetectorElements_jobOptions.py +++ b/InnerDetector/InDetExample/InDetDetDescrExample/share/ReadSiDetectorElements_jobOptions.py @@ -84,6 +84,7 @@ ServiceMgr += pixelSiPropertiesSvc ReadPixelElements.SiLorentzAngleSvc = lorentzAngleSvc.pixel ReadPixelElements.SiPropertiesSvc = pixelSiPropertiesSvc ReadPixelElements.SiConditionsSvc = pixelSiliconConditionsSvc +# ReadPixelElements.DetEleCollKey = "PixelDetectorElementCollection" ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc=lorentzAngleSvc.pixel @@ -110,8 +111,7 @@ ReadSCTElements.UseConditionsTools = True ReadSCTElements.SiLorentzAngleTool = lorentzAngleSvc.sct ReadSCTElements.SiPropertiesTool = sctSiPropertiesTool ReadSCTElements.SiConditionsTool = sctSiliconConditionsTool - -ServiceMgr.GeoModelSvc.DetectorTools['SCT_DetectorTool'].LorentzAngleTool=lorentzAngleSvc.sct +ReadSCTElements.DetEleCollKey = "SCT_DetectorElementCollection" print ReadPixelElements print lorentzAngleSvc.pixel diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx b/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx index 97ee433cd0df..b129c1f488c5 100755 --- a/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx +++ b/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx @@ -120,10 +120,14 @@ StatusCode ReadSiDetectorElements::initialize(){ m_siConditionsTool.disable(); m_siPropertiesTool.disable(); } + + // Initialize ReadCondHandleKey + ATH_CHECK(m_detEleCollKey.initialize()); + // Print during initialize if (m_doInit) { - printAllElements(); - printRandomAccess(); + printAllElements(true); + printRandomAccess(true); } return StatusCode::SUCCESS; } @@ -133,22 +137,34 @@ StatusCode ReadSiDetectorElements::execute() { // Only print out on first event if (m_first && m_doExec) { m_first = false; - printAllElements(); - printRandomAccess(); + printAllElements(false); + printRandomAccess(false); } return StatusCode::SUCCESS; } -void ReadSiDetectorElements::printAllElements() { +void ReadSiDetectorElements::printAllElements(const bool accessDuringInitialization) { + const bool useConditionStore = (m_managerName == "SCT" and (not accessDuringInitialization)); + const SiDetectorElementCollection* elements = nullptr; + if (useConditionStore) { + // Get SiDetectorElementCollection from ConditionStore + SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> detEle(m_detEleCollKey); + elements = detEle.retrieve(); + if (elements==nullptr) { + ATH_MSG_FATAL(m_detEleCollKey.fullKey() << " could not be retrieved"); + return; + } + } else { + elements = m_manager->getDetectorElementCollection(); + } + // There are various ways you can access the elements. eg // m_manager->getDetectorElement(idHash); // m_manager->getDetectorElement(identifier); // // or access the whole collection or the iterators. if (m_doLoop) { - SiDetectorElementCollection::const_iterator iter; - for (iter = m_manager->getDetectorElementBegin(); iter != m_manager->getDetectorElementEnd(); ++iter){ - const SiDetectorElement * element = *iter; + for (const SiDetectorElement* element: *elements) { if (element) { ATH_MSG_ALWAYS(m_idHelper->show_to_string(element->identify())); // The id helper is also available through the elements @@ -179,7 +195,7 @@ void ReadSiDetectorElements::printAllElements() { << m_siConditionsSvc->depletionVoltage(hashId)); } - if (m_manager->getName() == "Pixel") { + if (m_managerName == "Pixel") { //msg(MSG::ALWAYS) << "Via SiDetectorElement:" ATH_MSG_ALWAYS(" Lorentz correction (mm), tanLorentzPhi = " << element->getLorentzCorrection()/CLHEP::mm << " " @@ -211,17 +227,27 @@ void ReadSiDetectorElements::printAllElements() { // Make some consistency tests for the identifier. Identifier idTest; IdentifierHash idHashTest; - if (m_pixelIdHelper) { - const PixelID * idHelper = m_pixelIdHelper; - idTest = idHelper->wafer_id(hashId); - idHashTest = idHelper->wafer_hash(idTest); + if (m_managerName == "Pixel") { + idTest = m_pixelIdHelper->wafer_id(hashId); + idHashTest = m_pixelIdHelper->wafer_hash(idTest); } else if (m_sctIdHelper) { - const SCT_ID * idHelper = m_sctIdHelper; - idTest = idHelper->wafer_id(hashId); - idHashTest = idHelper->wafer_hash(idTest); + idTest = m_sctIdHelper->wafer_id(hashId); + idHashTest = m_sctIdHelper->wafer_hash(idTest); + } + const SiDetectorElement * elementtest1 = nullptr; + const SiDetectorElement * elementtest2 = nullptr; + if (useConditionStore) { + // SiDetectorElementCollection::getDetectorElement supports only IdentifierHash as the argument. + if (m_managerName == "Pixel") { + elementtest1 = elements->getDetectorElement(m_pixelIdHelper->wafer_hash(element->identify())); + } else { + elementtest1 = elements->getDetectorElement(m_sctIdHelper->wafer_hash(element->identify())); + } + elementtest2 = elements->getDetectorElement(hashId); + } else { + elementtest1 = m_manager->getDetectorElement(element->identify()); + elementtest2 = m_manager->getDetectorElement(hashId); } - const SiDetectorElement * elementtest1 = m_manager->getDetectorElement(element->identify()); - const SiDetectorElement * elementtest2 = m_manager->getDetectorElement(hashId); bool idOK = true; if (idHashTest != hashId) {ATH_MSG_ALWAYS(" Id test 1 FAILED!"); idOK = false;} if (idTest != element->identify()) {ATH_MSG_ALWAYS(" Id test 2 FAILED!"); idOK = false;} @@ -254,12 +280,22 @@ void ReadSiDetectorElements::printAllElements() { if (!iEta && siNumerology.skipEtaZeroForLayer(iLayer)) continue; for (int iSide = 0; iSide < nSides; iSide++) { Identifier id; - if (m_pixelIdHelper){ + if (m_managerName == "Pixel"){ id = m_pixelIdHelper->wafer_id(iBarrel,iLayer,iPhi,iEta); } else { id = m_sctIdHelper->wafer_id(iBarrel,iLayer,iPhi,iEta,iSide); } - const SiDetectorElement * element = m_manager->getDetectorElement(id); + const SiDetectorElement * element = nullptr; + if (useConditionStore) { + // SiDetectorElementCollection::getDetectorElement supports only IdentifierHash as the argument. + if (m_managerName == "Pixel") { + element = elements->getDetectorElement(m_pixelIdHelper->wafer_hash(id)); + } else { + element = elements->getDetectorElement(m_sctIdHelper->wafer_hash(id)); + } + } else { + element = m_manager->getDetectorElement(id); + } barrelCount++; if (!element) { barrelCountError++; @@ -292,12 +328,10 @@ void ReadSiDetectorElements::printAllElements() { for (int iPhi = 0; iPhi < siNumerology.numPhiModulesForDiskRing(iDisk,iEta); iPhi++) { for (int iSide = 0; iSide < nSides; iSide++) { Identifier id; - if (m_pixelIdHelper){ + if (m_managerName == "Pixel"){ id = m_pixelIdHelper->wafer_id(iEndcap,iDisk,iPhi,iEta); } else { - if (m_sctIdHelper){ - id = m_sctIdHelper->wafer_id(iEndcap,iDisk,iPhi,iEta,iSide); - } + id = m_sctIdHelper->wafer_id(iEndcap,iDisk,iPhi,iEta,iSide); } const SiDetectorElement * element = m_manager->getDetectorElement(id); endcapCount++; @@ -331,10 +365,23 @@ void ReadSiDetectorElements::printAllElements() { } -void ReadSiDetectorElements::printRandomAccess() { +void ReadSiDetectorElements::printRandomAccess(const bool accessDuringInitialization) { ATH_MSG_INFO("printRandomAccess()"); + + const bool useConditionStore = (m_managerName == "SCT" and (not accessDuringInitialization)); + const SiDetectorElementCollection* elements = nullptr; + if (useConditionStore) { + // Get SiDetectorElementCollection from ConditionStore + SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> detEle(m_detEleCollKey); + elements = detEle.retrieve(); + if (elements==nullptr) { + ATH_MSG_FATAL(m_detEleCollKey.fullKey() << " could not be retrieved"); + return; + } + } + // Some random access - if (m_manager->getName() == "Pixel") { + if (m_managerName == "Pixel") { //const PixelID * idHelper = dynamic_cast<const PixelID *>(m_manager->getIdHelper()); const PixelID * idHelper = m_pixelIdHelper; if (idHelper) { @@ -361,7 +408,7 @@ void ReadSiDetectorElements::printRandomAccess() { cellIds.push_back(SiCellId(1,143)); // phi,eta cellIds.push_back(SiCellId(1,144)); // phi,eta positions.push_back(Amg::Vector2D(12.727*CLHEP::mm, 4.534*CLHEP::mm)); // eta,phi - testElement(id, cellIds, positions); + testElement(id, cellIds, positions, elements); // A barrel element (B-Layer) ATH_MSG_ALWAYS("----------------------------------------------"); @@ -372,7 +419,7 @@ void ReadSiDetectorElements::printRandomAccess() { positions.clear(); cellIds.push_back(SiCellId(32,8)); // phi,eta positions.push_back(Amg::Vector2D(12.727*CLHEP::mm, 4.534*CLHEP::mm)); // eta,phi - testElement(id, cellIds, positions); + testElement(id, cellIds, positions, elements); // An endcap element ATH_MSG_ALWAYS("----------------------------------------------"); @@ -385,10 +432,10 @@ void ReadSiDetectorElements::printRandomAccess() { positions.push_back(Amg::Vector2D(12*CLHEP::mm, -8.15*CLHEP::mm)); // eta,phi - near edge positions.push_back(Amg::Vector2D(12*CLHEP::mm, -8.25*CLHEP::mm)); // eta,phi - near edge positions.push_back(Amg::Vector2D(12*CLHEP::mm, -8.35*CLHEP::mm)); // eta,phi - outside - testElement(id, cellIds, positions); + testElement(id, cellIds, positions, elements); } - } else if (m_manager->getName() == "SCT") { + } else if (m_managerName == "SCT") { //const SCT_ID * idHelper = dynamic_cast<const SCT_ID *>(m_manager->getIdHelper()); const SCT_ID * idHelper = m_sctIdHelper; @@ -416,7 +463,7 @@ void ReadSiDetectorElements::printRandomAccess() { cellIds.push_back(SiCellId(767)); // phi,eta cellIds.push_back(SiCellId(768)); // phi,eta positions.push_back(Amg::Vector2D(12.727*CLHEP::mm, 4.534*CLHEP::mm)); // eta,phi - testElement(id, cellIds, positions); + testElement(id, cellIds, positions, elements); // A barrel element (other side of above) ATH_MSG_ALWAYS("----------------------------------------------"); @@ -427,7 +474,7 @@ void ReadSiDetectorElements::printRandomAccess() { positions.clear(); cellIds.push_back(SiCellId(32)); // phi,eta positions.push_back(Amg::Vector2D(12.727*CLHEP::mm, 4.534*CLHEP::mm)); // eta,phi - testElement(id, cellIds, positions); + testElement(id, cellIds, positions, elements); // A outer fwd ATH_MSG_ALWAYS("----------------------------------------------"); @@ -444,7 +491,7 @@ void ReadSiDetectorElements::printRandomAccess() { positions.push_back(Amg::Vector2D(12.727*CLHEP::mm, 20.534*CLHEP::mm)); // eta,phi positions.push_back(Amg::Vector2D(12.727*CLHEP::mm, -20.534*CLHEP::mm)); // eta,phi positions.push_back(Amg::Vector2D(3*CLHEP::mm, -25*CLHEP::mm)); // eta,phi - testElement(id, cellIds, positions); + testElement(id, cellIds, positions, elements); ATH_MSG_ALWAYS("----------------------------------------------"); ATH_MSG_ALWAYS(" A SCT Endcap element (outer type) other side"); @@ -456,7 +503,7 @@ void ReadSiDetectorElements::printRandomAccess() { positions.push_back(Amg::Vector2D(12.727*CLHEP::mm, 20.534*CLHEP::mm)); // eta,phi positions.push_back(Amg::Vector2D(12.727*CLHEP::mm, -20.534*CLHEP::mm)); // eta,phi positions.push_back(Amg::Vector2D(3*CLHEP::mm, -25*CLHEP::mm)); // eta,phi - testElement(id, cellIds, positions); + testElement(id, cellIds, positions, elements); // A middle fwd ATH_MSG_ALWAYS("----------------------------------------------"); @@ -467,7 +514,7 @@ void ReadSiDetectorElements::printRandomAccess() { positions.clear(); cellIds.push_back(SiCellId(532)); // phi,eta positions.push_back(Amg::Vector2D(12.727*CLHEP::mm, 4.534*CLHEP::mm)); // eta,phi - testElement(id, cellIds, positions); + testElement(id, cellIds, positions, elements); // A truncated middle ATH_MSG_ALWAYS("----------------------------------------------"); @@ -478,7 +525,7 @@ void ReadSiDetectorElements::printRandomAccess() { positions.clear(); cellIds.push_back(SiCellId(532)); // phi,eta positions.push_back(Amg::Vector2D(12.727*CLHEP::mm, 4.534*CLHEP::mm)); // eta,phi - testElement(id, cellIds, positions); + testElement(id, cellIds, positions, elements); // A inner fwd ATH_MSG_ALWAYS("----------------------------------------------"); @@ -489,7 +536,7 @@ void ReadSiDetectorElements::printRandomAccess() { positions.clear(); cellIds.push_back(SiCellId(532)); // phi,eta positions.push_back(Amg::Vector2D(12.727*CLHEP::mm, 4.534*CLHEP::mm)); // eta,phi - testElement(id, cellIds, positions); + testElement(id, cellIds, positions, elements); } } // if manager = Pixel,SCT } @@ -498,9 +545,19 @@ void ReadSiDetectorElements::printRandomAccess() { void ReadSiDetectorElements::testElement(const Identifier & id, const std::vector<SiCellId> & cellIdVec, - const std::vector<Amg::Vector2D> & positionsVec) const{ + const std::vector<Amg::Vector2D> & positionsVec, + const InDetDD::SiDetectorElementCollection* elements) const{ ATH_MSG_ALWAYS("----------------------------------------------"); - const SiDetectorElement * element = m_manager->getDetectorElement(id); + const SiDetectorElement * element = nullptr; + if (elements) { + if (m_managerName == "Pixel") { + element = elements->getDetectorElement(m_pixelIdHelper->wafer_hash(id)); + } else { + element = elements->getDetectorElement(m_sctIdHelper->wafer_hash(id)); + } + } else { + element = m_manager->getDetectorElement(id); + } if (element) { IdentifierHash hashId = element->identifyHash(); ATH_MSG_ALWAYS(element->getIdHelper()->show_to_string(id)); @@ -532,7 +589,7 @@ ReadSiDetectorElements::testElement(const Identifier & id, const InDet::SiliconProperties & siProperties = m_useConditionsTools ? m_siPropertiesTool->getSiProperties(hashId) : m_siPropertiesSvc->getSiProperties(hashId); - if (m_manager->getName() == "Pixel") { + if (m_managerName == "Pixel") { ATH_MSG_ALWAYS(" Lorentz correction (mm), mobility (cm2/V/s), tanLorentzPhi = " << element->getLorentzCorrection()/CLHEP::mm << " " << element->getLorentzCorrection()/CLHEP::mm << " " diff --git a/InnerDetector/InDetValidation/InDetGeometryValidation/share/ReadSiDetectorElements_jobOptions.py b/InnerDetector/InDetValidation/InDetGeometryValidation/share/ReadSiDetectorElements_jobOptions.py index 819b44873aec..04285cec4cde 100755 --- a/InnerDetector/InDetValidation/InDetGeometryValidation/share/ReadSiDetectorElements_jobOptions.py +++ b/InnerDetector/InDetValidation/InDetGeometryValidation/share/ReadSiDetectorElements_jobOptions.py @@ -86,6 +86,7 @@ ServiceMgr += pixelSiPropertiesSvc ReadPixelElements.SiLorentzAngleSvc = lorentzAngleSvc.pixel ReadPixelElements.SiPropertiesSvc = pixelSiPropertiesSvc ReadPixelElements.SiConditionsSvc = pixelSiliconConditionsSvc +# ReadPixelElements.DetEleCollKey = "PixelDetectorElementCollection" ServiceMgr.GeoModelSvc.DetectorTools['PixelDetectorTool'].LorentzAngleSvc=lorentzAngleSvc.pixel @@ -112,8 +113,7 @@ ReadSCTElements.UseConditionsTools = True ReadSCTElements.SiLorentzAngleTool = lorentzAngleSvc.sct ReadSCTElements.SiPropertiesTool = sctSiPropertiesTool ReadSCTElements.SiConditionsTool = sctSiliconConditionsTool - -ServiceMgr.GeoModelSvc.DetectorTools['SCT_DetectorTool'].LorentzAngleTool=lorentzAngleSvc.sct +ReadSCTElements.DetEleCollKey = "SCT_DetectorElementCollection" print ReadPixelElements print lorentzAngleSvc.pixel -- GitLab From baaebcabcb514f8eb7a2a389b7cc8a611b23e723 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Fri, 20 Jul 2018 11:04:25 +0000 Subject: [PATCH 552/562] 22.0-coverity-InDetTrackSplitterTool Former-commit-id: 452157ee0fcc0bcaf8ace0ff350787f3aed10d3e --- .../InDetTrackSplitterTool/InDetTrackSplitterTool.h | 4 ++-- .../InDetTrackSplitterTool/src/InDetTrackSplitterTool.cxx | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/InnerDetector/InDetValidation/InDetTrackSplitterTool/InDetTrackSplitterTool/InDetTrackSplitterTool.h b/InnerDetector/InDetValidation/InDetTrackSplitterTool/InDetTrackSplitterTool/InDetTrackSplitterTool.h index a2669a492fb2..76345f937e95 100755 --- a/InnerDetector/InDetValidation/InDetTrackSplitterTool/InDetTrackSplitterTool/InDetTrackSplitterTool.h +++ b/InnerDetector/InDetValidation/InDetTrackSplitterTool/InDetTrackSplitterTool/InDetTrackSplitterTool.h @@ -168,8 +168,8 @@ namespace InDet{ /** Helper Functions */ ToolHandle<Trk::ITrackFitter> m_trkfitter; - TRT_ID const* m_trtid ; - SCT_ID const* m_sctid ; + TRT_ID const* m_trtid{} ; + SCT_ID const* m_sctid{} ; /** Do we use the material on the input track */ diff --git a/InnerDetector/InDetValidation/InDetTrackSplitterTool/src/InDetTrackSplitterTool.cxx b/InnerDetector/InDetValidation/InDetTrackSplitterTool/src/InDetTrackSplitterTool.cxx index 3c01198fa95b..a590d5a0578a 100644 --- a/InnerDetector/InDetValidation/InDetTrackSplitterTool/src/InDetTrackSplitterTool.cxx +++ b/InnerDetector/InDetValidation/InDetTrackSplitterTool/src/InDetTrackSplitterTool.cxx @@ -478,6 +478,10 @@ Trk::Track* InDet::InDetTrackSplitterTool::stripTRTFromTrack(Trk::Track const& i (I dont think this matters, but a surface needs to be specified) */ Trk::StraightLineSurface const* trtSurf = dynamic_cast<Trk::StraightLineSurface const*>(&(rio->associatedSurface())); + if (not trtSurf){ + ATH_MSG_DEBUG("Cast of rio associated surface to StraightLineSurface failed."); + continue; + } /** Create the psuesdoMeasurement with the constraints */ Trk::PseudoMeasurementOnTrack const* constraint = makePConstraint(originalPerigee,trtSurf); -- GitLab From 810a9d228a64f92d728b8a128434656ab4e443e2 Mon Sep 17 00:00:00 2001 From: Susumu Oda <susumu.oda@cern.ch> Date: Fri, 20 Jul 2018 11:05:59 +0000 Subject: [PATCH 553/562] Remove unnecessary SCT_DetectorManager in clients (ATLASRECTS-4517) Former-commit-id: 19a694d7af73e60452d93cbc8759f77a22eb97d9 --- .../InDetAlignGenTools/InDetAlignHitQualSelTool.h | 2 -- .../src/InDetAlignHitQualSelTool.cxx | 7 ++----- .../SCT_CalibAlgs/src/SCT_CalibBsErrorSvc.h | 3 --- .../SCT_CalibAlgs/src/SCT_CalibHvSvc.h | 3 --- .../src/SCT_ConditionsParameterTestAlg.h | 3 --- .../src/SCT_ConfigurationConditionsTestAlg.h | 2 -- .../src/SCT_DCSConditionsTestAlg.h | 3 --- .../src/SCT_ClusterContainerCnv.h | 4 ---- .../src/IDAlignMonNtuple.cxx | 15 +++++---------- .../src/IDAlignMonNtuple.h | 5 ----- .../src/IDAlignMonResiduals.cxx | 6 +++++- .../src/IDAlignMonSivsTRT.h | 2 -- .../src/IDAlignMonTrackSegments.h | 2 -- .../TrigTrackResidualMonitor.h | 2 -- .../src/TrigTrackResidualMonitor.cxx | 15 ++++----------- .../ISF_SiSpacePointMakerTool.h | 15 --------------- .../PlanarSiSpacePointMakerTool.h | 15 --------------- .../src/ISF_SiSpacePointMakerTool.cxx | 1 - .../src/PlanarSiSpacePointMakerTool.cxx | 1 - .../TrigFTK_RawDataAlgs/FTK_RDO_CreatorAlgo.h | 2 -- .../src/FTK_RDO_CreatorAlgo.cxx | 3 --- .../ITrigFTKClusterConverterTool.h | 2 -- .../TrigFTKTrackConverter/TrigFTKTrackConverter.h | 2 -- .../src/TrigFTKTrackConverter.cxx | 7 ------- 24 files changed, 16 insertions(+), 106 deletions(-) diff --git a/InnerDetector/InDetAlignTools/InDetAlignGenTools/InDetAlignGenTools/InDetAlignHitQualSelTool.h b/InnerDetector/InDetAlignTools/InDetAlignGenTools/InDetAlignGenTools/InDetAlignHitQualSelTool.h index 94f02d7dae8d..5d305f2def3d 100644 --- a/InnerDetector/InDetAlignTools/InDetAlignGenTools/InDetAlignGenTools/InDetAlignHitQualSelTool.h +++ b/InnerDetector/InDetAlignTools/InDetAlignGenTools/InDetAlignGenTools/InDetAlignHitQualSelTool.h @@ -27,7 +27,6 @@ namespace Trk { } namespace InDetDD { class PixelDetectorManager ; - class SCT_DetectorManager ; } class AtlasDetectorID ; class Identifier ; @@ -96,7 +95,6 @@ class InDetAlignHitQualSelTool : virtual public IInDetAlignHitQualSelTool, publi // "infrastructure" members const InDetDD::PixelDetectorManager* m_PIXManager ; //!< to get pixel phi and eta identifiers - const InDetDD::SCT_DetectorManager* m_SCTManager ; //!< to get strip numbers const PixelID* m_pixelid ; //!< Pixel id helper const SCT_ID* m_sctID ; //!< Pixel id helper } ; diff --git a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignHitQualSelTool.cxx b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignHitQualSelTool.cxx index bd1a75d4400c..97894fa7204c 100644 --- a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignHitQualSelTool.cxx +++ b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignHitQualSelTool.cxx @@ -12,7 +12,7 @@ #include "InDetReadoutGeometry/SiDetectorElement.h" #include "AtlasDetDescr/AtlasDetectorID.h" #include "InDetReadoutGeometry/PixelDetectorManager.h" -#include "InDetReadoutGeometry/SCT_DetectorManager.h" +#include "InDetIdentifier/SCT_ID.h" #include "InDetAlignGenTools/InDetAlignHitQualSelTool.h" @@ -32,7 +32,6 @@ InDetAlignHitQualSelTool::InDetAlignHitQualSelTool( const std::string& t , m_acceptPixelHits( true ) , m_acceptSCTHits( true ) , m_PIXManager{} - , m_SCTManager{} , m_pixelid{} , m_sctID{} { @@ -60,8 +59,6 @@ StatusCode InDetAlignHitQualSelTool::initialize() { ATH_CHECK(detStore()->retrieve(m_pixelid, "PixelID")); // get pixel manager ATH_CHECK(detStore()->retrieve( m_PIXManager, "Pixel" )) ; - // get SCT manager - ATH_CHECK( detStore()->retrieve( m_SCTManager, "SCT" ) ); return StatusCode::SUCCESS ; } @@ -286,7 +283,7 @@ bool InDetAlignHitQualSelTool::isGoodClusterSize( const std::vector<Identifier>& bool InDetAlignHitQualSelTool::isEdgeChannel( const vector<Identifier>& idVec ) const { for( unsigned int i=0, i_max=idVec.size() ; i!=i_max ; ++i ) { - if( m_SCTManager->identifierBelongs(idVec[i]) ) { + if( m_sctID->is_sct(idVec[i]) ) { int stripId = m_sctID->strip(idVec[i]) ; if( stripId == 0 || stripId == 767 ) { ATH_MSG_DEBUG( " SCT strip " << i << " with id " << stripId << " is an edge channel " ) ; diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibBsErrorSvc.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibBsErrorSvc.h index 251e106efae8..7b9d8d778559 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibBsErrorSvc.h +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibBsErrorSvc.h @@ -29,9 +29,6 @@ //fwd declarations template <class TYPE> class SvcFactory; -namespace InDetDD{ - class SCT_DetectorManager; -} class StatusCode; class ISvcLocator; diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHvSvc.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHvSvc.h index eb8c486c1d27..7c2bb802fe49 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHvSvc.h +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHvSvc.h @@ -32,9 +32,6 @@ //fwd declarations template <class TYPE> class SvcFactory; -namespace InDetDD{ - class SCT_DetectorManager; -} class StatusCode; class ISvcLocator; class IdentifierHash; diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.h index 03d0c117b040..420b6ac8839e 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.h @@ -24,9 +24,6 @@ // Include STL stuff #include <string> -// Forward declarations -namespace InDetDD{class SCT_DetectorManager;} - /** This class acts as a test/sample client the ConditionsParameter class. */ class SCT_ConditionsParameterTestAlg : public AthAlgorithm { diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationConditionsTestAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationConditionsTestAlg.h index cfe9c638faa2..74e4678b03da 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationConditionsTestAlg.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConfigurationConditionsTestAlg.h @@ -22,8 +22,6 @@ // Forward declarations class SCT_ID; -namespace InDetDD{class SCT_DetectorManager;} - /** * This class acts as a test/sample client for the SCT_ConfigurationSConditionsSvc class. */ diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DCSConditionsTestAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DCSConditionsTestAlg.h index 120d26a7ad08..8b46efb1acc2 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DCSConditionsTestAlg.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DCSConditionsTestAlg.h @@ -19,9 +19,6 @@ // Include STL stuff #include <string> -// Forward declarations -namespace InDetDD{class SCT_DetectorManager;} - /** This class acts as a test/sample client the DCSConditions class. */ class SCT_DCSConditionsTestAlg : public AthAlgorithm { diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_ClusterContainerCnv.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_ClusterContainerCnv.h index 61f028c594a0..5ebe5195713f 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_ClusterContainerCnv.h +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_ClusterContainerCnv.h @@ -14,10 +14,6 @@ class StoreGateSvc; class SCT_ID; -namespace InDetDD { - class SCT_DetectorManager; -} - #include "SCT_ClusterContainerCnv_p0.h" #include "InDetEventTPCnv/SCT_ClusterContainerCnv_tlp1.h" #include "InDetEventTPCnv/SCT_ClusterContainerCnv_p3.h" diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonNtuple.cxx b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonNtuple.cxx index 559d1bf288a2..bb6dbde236c3 100644 --- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonNtuple.cxx +++ b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonNtuple.cxx @@ -60,7 +60,6 @@ IDAlignMonNtuple::IDAlignMonNtuple( const std::string & type, const std::string :ManagedMonitorToolBase( type, name, parent ), m_doPulls(false), m_idHelper(0), - m_SCT_Mgr(0), m_pixelID(0), m_sctID(0), m_ntupleSvc(0), @@ -831,7 +830,11 @@ const Trk::TrackParameters* IDAlignMonNtuple::getUnbiasedTrackParameters(const T if(msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Entering True Unbiased loop." << endmsg; // check if other module side was also hit and try to remove other hit as well const Trk::TrackStateOnSurface* OtherModuleSideHit(0); - const Identifier& OtherModuleSideID = m_SCT_Mgr->getDetectorElement(surfaceID)->otherSide()->identify(); + const Identifier waferID = m_sctID->wafer_id(surfaceID); + const IdentifierHash waferHash = m_sctID->wafer_hash(waferID); + IdentifierHash otherSideHash; + m_sctID->get_other_side(waferHash, otherSideHash); + const Identifier OtherModuleSideID = m_sctID->wafer_id(otherSideHash); for (const Trk::TrackStateOnSurface* TempTsos : *trkPnt->trackStateOnSurfaces()) { @@ -977,14 +980,6 @@ StatusCode IDAlignMonNtuple::setupTools() } if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Initialized SCTIDHelper" << endmsg; - // Get the SCT manager from the detector store - sc = detStore()->retrieve(m_SCT_Mgr, "SCT"); - if (sc.isFailure()) { - msg(MSG::ERROR) << "Could not get SCT_Manager !" << endmsg; - return sc; - } - if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Initialized SCTManager" << endmsg; - //ID Helper sc = detStore()->retrieve(m_idHelper, "AtlasID" ); if (sc.isFailure()) { diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonNtuple.h b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonNtuple.h index ec43697622c3..2bede7ee7a09 100644 --- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonNtuple.h +++ b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonNtuple.h @@ -29,10 +29,6 @@ class AtlasDetectorID; class PixelID; class SCT_ID; -namespace InDetDD{ - class SCT_DetectorManager; -} - namespace Trk { class RIO_OnTrack; class Track; @@ -79,7 +75,6 @@ protected: //tools const AtlasDetectorID* m_idHelper; - const InDetDD::SCT_DetectorManager* m_SCT_Mgr; const PixelID* m_pixelID; const SCT_ID* m_sctID; PublicToolHandle<Trk::IUpdator> m_iUpdator diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.cxx b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.cxx index d61087d7d832..fc66f289c159 100755 --- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.cxx +++ b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.cxx @@ -2836,7 +2836,11 @@ const Trk::TrackParameters* IDAlignMonResiduals::getUnbiasedTrackParameters(cons if(msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Entering True Unbiased loop." << endmsg; // check if other module side was also hit and try to remove other hit as well const Trk::TrackStateOnSurface* OtherModuleSideHit(0); - const Identifier& OtherModuleSideID = m_SCT_Mgr->getDetectorElement(surfaceID)->otherSide()->identify(); + const Identifier waferID = m_sctID->wafer_id(surfaceID); + const IdentifierHash waferHash = m_sctID->wafer_hash(waferID); + IdentifierHash otherSideHash; + m_sctID->get_other_side(waferHash, otherSideHash); + const Identifier OtherModuleSideID = m_sctID->wafer_id(otherSideHash); for (const Trk::TrackStateOnSurface* TempTsos : *trkPnt->trackStateOnSurfaces()) { diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonSivsTRT.h b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonSivsTRT.h index 1153e772903a..6997b662e5c0 100644 --- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonSivsTRT.h +++ b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonSivsTRT.h @@ -30,14 +30,12 @@ class TProfile; class AtlasDetectorID; class PixelID; -class SCT_ID; namespace InDetAlignMon{ class TrackSelectionTool; } namespace InDetDD{ - class SCT_DetectorManager; class PixelDetectorManager; } diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonTrackSegments.h b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonTrackSegments.h index cc6518175c03..f57df21a5d6e 100644 --- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonTrackSegments.h +++ b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonTrackSegments.h @@ -26,14 +26,12 @@ class TH2F_LW; class AtlasDetectorID; class PixelID; -class SCT_ID; namespace InDetAlignMon{ class TrackSelectionTool; } namespace InDetDD{ - class SCT_DetectorManager; class PixelDetectorManager; } diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/InDetTrigTrackResidualMonitor/TrigTrackResidualMonitor.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/InDetTrigTrackResidualMonitor/TrigTrackResidualMonitor.h index ba7c14465d50..469455419d46 100644 --- a/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/InDetTrigTrackResidualMonitor/TrigTrackResidualMonitor.h +++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/InDetTrigTrackResidualMonitor/TrigTrackResidualMonitor.h @@ -36,7 +36,6 @@ class StoreGateSvc; class SCT_NeighboursTable; namespace InDetDD{ - class SCT_DetectorManager; class PixelDetectorManager; } @@ -110,7 +109,6 @@ namespace InDet ToolHandle<Trk::IResidualPullCalculator> m_residualPullCalculator; - const InDetDD::SCT_DetectorManager *m_SCT_Manager{}; const InDetDD::PixelDetectorManager *m_Pixel_Manager{}; diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/src/TrigTrackResidualMonitor.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/src/TrigTrackResidualMonitor.cxx index ef74b8dd2da2..0c36940b3267 100644 --- a/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/src/TrigTrackResidualMonitor.cxx +++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/src/TrigTrackResidualMonitor.cxx @@ -39,7 +39,6 @@ #include "TrkTrackSummaryTool/TrackSummaryTool.h" #include "TrkTrackSummary/TrackSummary.h" #include "TrkTrackSummary/MuonTrackSummary.h" -#include "InDetReadoutGeometry/SCT_DetectorManager.h" #include "TrkToolInterfaces/IResidualPullCalculator.h" #include "InDetReadoutGeometry/SiDetectorElement.h" @@ -259,15 +258,6 @@ namespace InDet m_idHelperSCT = IdHelperSCT; - ///SCT Manager - if(detStore->retrieve(m_SCT_Manager, "SCT").isFailure()){ - msg() << MSG::FATAL << "Could not get SCT_Manager !" << endmsg; - } - else{ - msg() << MSG::DEBUG << "SCT manager found !" << endmsg; - } - - // Pixel Manager if(detStore->retrieve(m_Pixel_Manager, "Pixel").isFailure()){ msg() << MSG::FATAL << "Could not get Pixel_Manager !" << endmsg; @@ -506,7 +496,10 @@ namespace InDet const Identifier& idbECSCTUB = m_idHelperSCT->wafer_id(hitIdbec); barrelECSCTUB = m_idHelperSCT->barrel_ec(idbECSCTUB); const Trk::TrackStateOnSurface* OtherModuleSideHit(0); - const Identifier& OtherModuleSideID = m_SCT_Manager->getDetectorElement(id)->otherSide()->identify(); + const IdentifierHash waferHash = m_idHelperSCT->wafer_hash(id); + IdentifierHash otherSideHash; + m_idHelperSCT->get_other_side(waferHash, otherSideHash); + const Identifier OtherModuleSideID = m_idHelperSCT->wafer_id(otherSideHash); //const Trk::RIO_OnTrack* hit(0); for (const Trk::TrackStateOnSurface* TempTsos : *(*itResTrk)->trackStateOnSurfaces()) { diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/ISF_FatrasRecoTools/ISF_SiSpacePointMakerTool.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/ISF_FatrasRecoTools/ISF_SiSpacePointMakerTool.h index 14752757d715..9f623065e86b 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/ISF_FatrasRecoTools/ISF_SiSpacePointMakerTool.h +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/ISF_FatrasRecoTools/ISF_SiSpacePointMakerTool.h @@ -13,21 +13,6 @@ #include "TrkSpacePoint/SpacePointOverlapCollection.h" #include "GeoPrimitives/GeoPrimitives.h" -namespace Trk -{ - class SpacePoint; -} - -namespace InDetDD -{ - class SCT_DetectorManager; - class SiDetectorElement; -} - -namespace InDet{ - class SiCluster; -} - namespace iFatras{ class ISF_SiSpacePointMakerTool : public AthAlgTool { diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/ISF_FatrasRecoTools/PlanarSiSpacePointMakerTool.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/ISF_FatrasRecoTools/PlanarSiSpacePointMakerTool.h index 4de9feae50ef..3d87ffcf6aa5 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/ISF_FatrasRecoTools/PlanarSiSpacePointMakerTool.h +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/ISF_FatrasRecoTools/PlanarSiSpacePointMakerTool.h @@ -13,21 +13,6 @@ #include "TrkSpacePoint/SpacePointOverlapCollection.h" #include "GeoPrimitives/GeoPrimitives.h" -namespace Trk -{ - class SpacePoint; -} - -namespace InDetDD -{ - class SCT_DetectorManager; - class SiDetectorElement; -} - -namespace InDet{ - class SiCluster; -} - namespace iFatras{ class PlanarSiSpacePointMakerTool : public AthAlgTool { diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/src/ISF_SiSpacePointMakerTool.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/src/ISF_SiSpacePointMakerTool.cxx index 99b1b294efc0..af50b133ef25 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/src/ISF_SiSpacePointMakerTool.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/src/ISF_SiSpacePointMakerTool.cxx @@ -9,7 +9,6 @@ #include "ISF_FatrasRecoTools/ISF_SiSpacePointMakerTool.h" // Space points -#include "SiSpacePoint/SCT_SpacePoint.h" #include "SiSpacePoint/PixelSpacePoint.h" namespace iFatras{ diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/src/PlanarSiSpacePointMakerTool.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/src/PlanarSiSpacePointMakerTool.cxx index 2da5a5021729..9ea1f3ee350e 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/src/PlanarSiSpacePointMakerTool.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/src/PlanarSiSpacePointMakerTool.cxx @@ -9,7 +9,6 @@ #include "ISF_FatrasRecoTools/PlanarSiSpacePointMakerTool.h" // Space points -#include "SiSpacePoint/SCT_SpacePoint.h" #include "SiSpacePoint/PixelSpacePoint.h" namespace iFatras{ diff --git a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/TrigFTK_RawDataAlgs/FTK_RDO_CreatorAlgo.h b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/TrigFTK_RawDataAlgs/FTK_RDO_CreatorAlgo.h index 9d69e057c93a..205c019d1790 100644 --- a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/TrigFTK_RawDataAlgs/FTK_RDO_CreatorAlgo.h +++ b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/TrigFTK_RawDataAlgs/FTK_RDO_CreatorAlgo.h @@ -31,7 +31,6 @@ class SCT_ID; namespace InDetDD { class PixelDetectorManager; - class SCT_DetectorManager; } @@ -81,7 +80,6 @@ private: const SCT_ID* m_sctId; const InDetDD::PixelDetectorManager* m_pixelManager; - const InDetDD::SCT_DetectorManager* m_SCT_Manager; const AtlasDetectorID* m_id_helper; diff --git a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_CreatorAlgo.cxx b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_CreatorAlgo.cxx index f2958ae61948..fc6ca2a03b71 100644 --- a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_CreatorAlgo.cxx +++ b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_CreatorAlgo.cxx @@ -15,7 +15,6 @@ #include "InDetIdentifier/PixelID.h" #include "InDetReadoutGeometry/SiDetectorElement.h" #include "InDetReadoutGeometry/PixelDetectorManager.h" -#include "InDetReadoutGeometry/SCT_DetectorManager.h" #include "TBranch.h" #include "TMath.h" #include "TFile.h" @@ -48,7 +47,6 @@ FTK_RDO_CreatorAlgo::FTK_RDO_CreatorAlgo(const std::string& name, ISvcLocator* p m_pixelId(nullptr), m_sctId(nullptr), m_pixelManager(nullptr), - m_SCT_Manager(nullptr), m_id_helper(nullptr), m_trainingBeamspotX(0.), m_trainingBeamspotY(0.), @@ -104,7 +102,6 @@ StatusCode FTK_RDO_CreatorAlgo::initialize(){ ATH_CHECK(detStore->retrieve(m_pixelId, "PixelID")); ATH_CHECK(detStore->retrieve(m_sctId, "SCT_ID")); ATH_CHECK(detStore->retrieve(m_pixelManager)); - ATH_CHECK(detStore->retrieve(m_SCT_Manager)); ATH_CHECK(detStore->retrieve(m_id_helper, "AtlasID")); // prepare the input from the FTK tracks, merged in an external simulation diff --git a/Trigger/TrigTools/TrigFTKToolInterfaces/TrigFTKToolInterfaces/ITrigFTKClusterConverterTool.h b/Trigger/TrigTools/TrigFTKToolInterfaces/TrigFTKToolInterfaces/ITrigFTKClusterConverterTool.h index 787eac4537d2..9be71d281bf5 100644 --- a/Trigger/TrigTools/TrigFTKToolInterfaces/TrigFTKToolInterfaces/ITrigFTKClusterConverterTool.h +++ b/Trigger/TrigTools/TrigFTKToolInterfaces/TrigFTKToolInterfaces/ITrigFTKClusterConverterTool.h @@ -28,13 +28,11 @@ class StoreGateSvc; class AtlasDetectorID; class PixelID; -class SCT_ID; class Identifier; class IdentifierHash; namespace InDetDD { class PixelDetectorManager; - class SCT_DetectorManager; } namespace InDet { diff --git a/Trigger/TrigTools/TrigFTKTrackConverter/TrigFTKTrackConverter/TrigFTKTrackConverter.h b/Trigger/TrigTools/TrigFTKTrackConverter/TrigFTKTrackConverter/TrigFTKTrackConverter.h index 4b05e57abc2f..a76b12b3867b 100644 --- a/Trigger/TrigTools/TrigFTKTrackConverter/TrigFTKTrackConverter/TrigFTKTrackConverter.h +++ b/Trigger/TrigTools/TrigFTKTrackConverter/TrigFTKTrackConverter/TrigFTKTrackConverter.h @@ -29,7 +29,6 @@ class IdentifierHash; namespace InDetDD { class PixelDetectorManager; - class SCT_DetectorManager; } namespace InDet { @@ -77,7 +76,6 @@ private: const SCT_ID* m_sctId; const InDetDD::PixelDetectorManager* m_pixelManager; - const InDetDD::SCT_DetectorManager* m_SCT_Manager; ToolHandle<Trk::ITrackFitter> m_trackFitter; ToolHandle<ITrigFTKClusterConverterTool> m_clusterConverterTool; diff --git a/Trigger/TrigTools/TrigFTKTrackConverter/src/TrigFTKTrackConverter.cxx b/Trigger/TrigTools/TrigFTKTrackConverter/src/TrigFTKTrackConverter.cxx index 87a8d381bb16..3c9ae79bfc2f 100644 --- a/Trigger/TrigTools/TrigFTKTrackConverter/src/TrigFTKTrackConverter.cxx +++ b/Trigger/TrigTools/TrigFTKTrackConverter/src/TrigFTKTrackConverter.cxx @@ -20,7 +20,6 @@ #include "InDetIdentifier/SCT_ID.h" #include "InDetIdentifier/PixelID.h" #include "InDetReadoutGeometry/PixelDetectorManager.h" -#include "InDetReadoutGeometry/SCT_DetectorManager.h" #include "AtlasDetDescr/AtlasDetectorID.h" #include "GeneratorObjects/McEventCollection.h" @@ -126,12 +125,6 @@ StatusCode TrigFTKTrackConverter::initialize() { return sc; } - sc = detStore->retrieve(m_SCT_Manager); - if( sc.isFailure() ) { - ATH_MSG_ERROR("Could not retrieve SCT DetectorManager from detStore."); - return sc; - } - //Get ID helper if (detStore->retrieve(m_idHelper, "AtlasID").isFailure()) { ATH_MSG_FATAL("Could not get AtlasDetectorID helper AtlasID"); -- GitLab From 196011ee4477153c5c105d42b56847289c0796ac Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Fri, 20 Jul 2018 11:12:24 +0000 Subject: [PATCH 554/562] 22.0-coverity-InDetTrackClusterAssValidation Former-commit-id: 874da2d8dade7fe462c0c95ad42ead43042ad9c3 --- .../TrackClusterAssValidation.h | 47 ++++++++----------- .../src/TrackClusterAssValidation.cxx | 8 ++-- 2 files changed, 25 insertions(+), 30 deletions(-) diff --git a/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/InDetTrackClusterAssValidation/TrackClusterAssValidation.h b/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/InDetTrackClusterAssValidation/TrackClusterAssValidation.h index b35d3abdb445..bbc1621cb255 100755 --- a/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/InDetTrackClusterAssValidation/TrackClusterAssValidation.h +++ b/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/InDetTrackClusterAssValidation/TrackClusterAssValidation.h @@ -6,20 +6,22 @@ #ifndef TrackClusterAssValidation_H #define TrackClusterAssValidation_H -#include <string> -#include <map> + #include "AthenaBaseComps/AthReentrantAlgorithm.h" #include "TrkSpacePoint/SpacePointContainer.h" #include "TrkSpacePoint/SpacePointOverlapCollection.h" #include "InDetPrepRawData/SiClusterContainer.h" #include "InDetPrepRawData/TRT_DriftCircleContainer.h" -#include "HepMC/GenParticle.h" -#include "HepPDT/ParticleDataTable.hh" #include "TrkTruthData/PRD_MultiTruthCollection.h" #include "StoreGate/ReadHandleKey.h" - #include "TrkTrack/TrackCollection.h" +#include <string> +#include <map> + +namespace HepPDT{ + class ParticleDataTable; +} namespace InDet { @@ -33,18 +35,22 @@ namespace InDet { // Public methods: /////////////////////////////////////////////////////////////////// public: - + ///default c'tor Barcode() {}; - Barcode(const Barcode&); - Barcode(int,int); + ///copy c'tor defaulted + Barcode(const Barcode&) = default; + ///c'tor + Barcode(int charge,int rapidity); + ///destructor does nothing ~Barcode() {}; - Barcode& operator = (const Barcode&); + ///assignment defaulted + Barcode& operator = (const Barcode&) = default; + ///getters int barcode () const {return abs(m_barcharge);} - int charge () const {if(m_barcharge<0) return -1; if(m_barcharge>0) return 1; return 0;} + int charge () const {return ((m_barcharge>0) - (m_barcharge<0));} //returns 1, -1 or 0 depending on sign int rapidity() const {return m_rapidity;} protected: - int m_barcharge; int m_rapidity; }; @@ -53,19 +59,6 @@ namespace InDet { // Inline methods ///////////////////////////////////////////////////////////////////////////////// - inline Barcode::Barcode(const Barcode& BC) - { - *this = BC; - } - - inline Barcode& Barcode::operator = (const Barcode& BC) - { - if(&BC!=this) { - m_barcharge = BC.m_barcharge; - m_rapidity = BC.m_rapidity ; - } - return(*this); - } inline Barcode::Barcode (int bc,int rap) { m_barcharge = bc ; @@ -119,9 +112,9 @@ namespace InDet { int m_ntracksNEGDBM; int m_total [50] ; int m_fake [50] ; - int m_events ; - int m_eventsPOS ; - int m_eventsNEG ; + int m_events{} ; + int m_eventsPOS{} ; + int m_eventsNEG{} ; int m_eventsBTE[4] ; TrackCollectionStat_t() diff --git a/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/src/TrackClusterAssValidation.cxx b/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/src/TrackClusterAssValidation.cxx index 6ba5fa86e1b1..3c46581c6393 100755 --- a/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/src/TrackClusterAssValidation.cxx +++ b/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/src/TrackClusterAssValidation.cxx @@ -11,6 +11,8 @@ #include "InDetPrepRawData/PixelClusterContainer.h" #include "InDetTrackClusterAssValidation/TrackClusterAssValidation.h" #include "StoreGate/ReadHandle.h" +#include "HepPDT/ParticleDataTable.hh" +#include "HepMC/GenParticle.h" /////////////////////////////////////////////////////////////////// // Constructor @@ -1463,11 +1465,11 @@ int InDet::TrackClusterAssValidation::QualityTracksSelection(InDet::TrackCluster } for(c = event_data.m_kinecluster.begin(); c!= event_data.m_kinecluster.end(); ++c) { - const Trk::PrepRawData* - d = (*c).second; + d = (*c).second; const InDetDD::SiDetectorElement* - de= dynamic_cast<const InDetDD::SiDetectorElement*>(d->detectorElement()); + de= dynamic_cast<const InDetDD::SiDetectorElement*>(d->detectorElement()); + if (not de) continue; int q = charge(event_data,*c,rp); if (q<0) { -- GitLab From 710c9dcfd00327f2367ff8214aa63f98d041e282 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Fri, 20 Jul 2018 11:15:50 +0000 Subject: [PATCH 555/562] 22.0-coverity-InDetTruthTools Former-commit-id: 7563a45e4683899c9bee3d6c89e1d6500ec83564 --- .../PRD_TruthTrajectoryManipulatorID.h | 2 +- .../PRD_TruthTrajectorySelectorID.h | 23 ++++++++++--------- .../src/PRD_TruthTrajectorySelectorID.cxx | 7 +++--- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/InnerDetector/InDetTruth/InDetTruthTools/InDetTruthTools/PRD_TruthTrajectoryManipulatorID.h b/InnerDetector/InDetTruth/InDetTruthTools/InDetTruthTools/PRD_TruthTrajectoryManipulatorID.h index a3e1c3860115..118323396fe6 100644 --- a/InnerDetector/InDetTruth/InDetTruthTools/InDetTruthTools/PRD_TruthTrajectoryManipulatorID.h +++ b/InnerDetector/InDetTruth/InDetTruthTools/InDetTruthTools/PRD_TruthTrajectoryManipulatorID.h @@ -42,7 +42,7 @@ namespace InDet { private: /**ID pixel helper*/ - const AtlasDetectorID* m_atlasId; + const AtlasDetectorID* m_atlasId{}; }; } diff --git a/InnerDetector/InDetTruth/InDetTruthTools/InDetTruthTools/PRD_TruthTrajectorySelectorID.h b/InnerDetector/InDetTruth/InDetTruthTools/InDetTruthTools/PRD_TruthTrajectorySelectorID.h index 116f5b7fc825..8f1ca4a53054 100644 --- a/InnerDetector/InDetTruth/InDetTruthTools/InDetTruthTools/PRD_TruthTrajectorySelectorID.h +++ b/InnerDetector/InDetTruth/InDetTruthTools/InDetTruthTools/PRD_TruthTrajectorySelectorID.h @@ -11,12 +11,7 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "TrkTruthTrackInterfaces/IPRD_TruthTrajectorySelector.h" - -//#include "EventPrimitives/EventPrimitives.h" -//#include "TrkEventPrimitives/LocalPosition.h" -//#include "TrkEventPrimitives/GlobalPosition.h" #include "TrkEventPrimitives/LocalParameters.h" -//#include "CLHEP/Geometry/Transform3D.h" class ThreePointCircle { @@ -32,6 +27,12 @@ class ThreePointCircle { /** Translation */ const Amg::Translation3D* frameTranslation() const; + //assignment is not safe unless a deep copy is made, so delete + ThreePointCircle & operator = (const ThreePointCircle &) = delete; + //copy is not safe unless a deep copy is made, so delete + ThreePointCircle(const ThreePointCircle &) = delete; + + /* d0, z0, eta, phi, pt */ double d0() const; double z0() const; @@ -42,11 +43,11 @@ class ThreePointCircle { private : void constructCircle(const Amg::Vector3D&, const Amg::Vector3D&, const Amg::Vector3D&); - // the reference point - Amg::Translation3D* m_translation; - // the parameters - double m_d0, m_z0, m_phi0, m_eta, m_pt; - double m_radius; + // the reference point + Amg::Translation3D* m_translation; + // the parameters + double m_d0, m_z0, m_phi0, m_eta, m_pt; + double m_radius{}; Amg::Vector2D m_center; }; @@ -92,7 +93,7 @@ namespace InDet { private: /**ID pixel helper*/ - const AtlasDetectorID* m_atlasId; + const AtlasDetectorID* m_atlasId{}; }; } diff --git a/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_TruthTrajectorySelectorID.cxx b/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_TruthTrajectorySelectorID.cxx index 3a1f68fe5c99..348417f7294e 100644 --- a/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_TruthTrajectorySelectorID.cxx +++ b/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_TruthTrajectorySelectorID.cxx @@ -14,8 +14,7 @@ #include "AtlasDetDescr/AtlasDetectorID.h" // HepMC #include "HepMC/GenParticle.h" -//for ThreePointCircle -//#include "TrkEventPrimitives/GlobalDirection.h" + InDet::PRD_TruthTrajectorySelectorID::PRD_TruthTrajectorySelectorID(const std::string& t, const std::string& n, const IInterface* p) : AthAlgTool(t,n,p) @@ -141,11 +140,11 @@ bool InDet::PRD_TruthTrajectorySelectorID::pass( const Trk::PRD_TruthTrajectory for ( int i = 0; i < 3 && prdIter != prdIterE; ++ prdIter ){ if( m_atlasId->is_pixel((*prdIter)->identify()) ){ const InDet::PixelCluster* pixclus=dynamic_cast<const InDet::PixelCluster*>(*prdIter); - pos.push_back (pixclus->globalPosition()); + if (pixclus) pos.push_back (pixclus->globalPosition()); } else if( m_atlasId->is_sct((*prdIter)->identify()) ){ const InDet::SCT_Cluster* sctclus=dynamic_cast<const InDet::SCT_Cluster*>(*prdIter); - pos.push_back (sctclus->globalPosition()); + if (sctclus) pos.push_back (sctclus->globalPosition()); } else if( m_atlasId->is_trt((*prdIter)->identify()) ){ continue; -- GitLab From 09274e0f678057b81e92e414b9520af66dd43549 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Fri, 20 Jul 2018 11:28:17 +0000 Subject: [PATCH 556/562] 22.0-coverity-PixelCalibAlgs Former-commit-id: da82164909693ed28bb59b9c1fe010e457ec6e64 --- .../Application/createDeadModuleList.C | 21 ++++++++-------- .../Application/updateDeadMaps.C | 6 +++-- .../Application/updateNoiseMaps.C | 7 +++--- .../PixelCalibAlgs/src/NoiseMapBuilder.cxx | 20 ++++++++------- .../PixelCalibAlgs/src/PixMapDBWriter.cxx | 25 ++++++++++--------- 5 files changed, 43 insertions(+), 36 deletions(-) diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/createDeadModuleList.C b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/createDeadModuleList.C index 84f81e752efa..db50c21da20c 100644 --- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/createDeadModuleList.C +++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/createDeadModuleList.C @@ -2,14 +2,14 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include<vector> -#include<cmath> -#include<map> -#include<sstream> -#include<string> -#include<iostream> -#include<fstream> -#include<utility> +#include <vector> +#include <cmath> +#include <map> +#include <sstream> +#include <string> +#include <iostream> +#include <fstream> +#include <utility> #include "TFile.h" #include "TH1.h" @@ -221,8 +221,9 @@ int main(int argc, char* argv[]){ std::cout << "FATAL: Unable to retrieve environmental DATAPATH" << std::endl; exit(EXIT_FAILURE); } - tmppath=strdup(tmppath); - std::string cmtpath(tmppath); + std::stringstream tmpSstr{}; + tmpSstr<<tmppath; + std::string cmtpath(tmpSstr.str()); std::vector<std::string> paths = splitter(cmtpath, ':'); std::ifstream ifs; std::ifstream ifs2; diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/updateDeadMaps.C b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/updateDeadMaps.C index 237b60d2d185..c91ca07b729f 100644 --- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/updateDeadMaps.C +++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/updateDeadMaps.C @@ -405,14 +405,16 @@ int main(int argc, char* argv[]){ } } + char* tmppath = std::getenv("DATAPATH"); const unsigned int maxPathStringLength{3000}; if((not tmppath) or (strlen(tmppath) > maxPathStringLength) ){ std::cout << "FATAL: Unable to retrieve environmental DATAPATH" << std::endl; exit(EXIT_FAILURE); } - tmppath=strdup(tmppath); - std::string cmtpath(tmppath); + std::stringstream tmpSstr{}; + tmpSstr<<tmppath; + std::string cmtpath(tmpSstr.str()); std::vector<std::string> paths = splitter(cmtpath, ':'); std::ifstream ifs; for (const auto& x : paths){ diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/updateNoiseMaps.C b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/updateNoiseMaps.C index e0e4a2d320c8..a85f8801e746 100644 --- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/updateNoiseMaps.C +++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/updateNoiseMaps.C @@ -514,14 +514,15 @@ int main(int argc, char* argv[]){ std::cout << "Occupancy calculated per event" << std::endl << std::endl; } - char * tmppath = std::getenv("DATAPATH"); + char* tmppath = std::getenv("DATAPATH"); const unsigned int maxPathStringLength{3000}; if((not tmppath) or (strlen(tmppath) > maxPathStringLength) ){ std::cout << "FATAL: Unable to retrieve environmental DATAPATH" << std::endl; exit(EXIT_FAILURE); } - tmppath=strdup(tmppath); - std::string cmtpath(tmppath); + std::stringstream tmpSstr{}; + tmpSstr<<tmppath; + std::string cmtpath(tmpSstr.str()); std::vector<std::string> paths = splitter(cmtpath, ':'); std::ifstream ifs; for (const auto& x : paths){ diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/NoiseMapBuilder.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/NoiseMapBuilder.cxx index 1647c3ffce4a..8868e7b3f348 100755 --- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/NoiseMapBuilder.cxx +++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/NoiseMapBuilder.cxx @@ -103,7 +103,7 @@ NoiseMapBuilder::~NoiseMapBuilder(){} std::string NoiseMapBuilder::getDCSIDFromPosition (int barrel_ec, int layer, int modPhi, int module_eta){ for(unsigned int ii = 0; ii < m_pixelMapping.size(); ii++) { if (m_pixelMapping[ii].second.size() != 4) { - std::cout << "getDCSIDFromPosition: Vector size is not 4!" << std::endl; + ATH_MSG_WARNING( "getDCSIDFromPosition: Vector size is not 4!" ); return std::string("Error!"); } if (m_pixelMapping[ii].second[0] != barrel_ec) continue; @@ -112,7 +112,7 @@ std::string NoiseMapBuilder::getDCSIDFromPosition (int barrel_ec, int layer, int if (m_pixelMapping[ii].second[3] != module_eta) continue; return m_pixelMapping[ii].first; } - std::cout << "Not found!" << std::endl; + ATH_MSG_WARNING( "Not found!" ); return std::string("Error!"); } @@ -159,7 +159,7 @@ std::vector<std::string> NoiseMapBuilder::splitter(const std::string &str, // //========================================================= StatusCode NoiseMapBuilder::initialize(){ - ATH_MSG_INFO("Initializing NoiseMapBuilder"); + ATH_MSG_DEBUG("Initializing NoiseMapBuilder"); // retrieve THistSvc StatusCode sc = m_tHistSvc.retrieve(); @@ -218,14 +218,16 @@ StatusCode NoiseMapBuilder::initialize(){ StatusCode NoiseMapBuilder::registerHistograms(){ - const std::string mapFile = "PixelMapping_Run2.dat"; - char * tmppath= std::getenv("DATAPATH"); - const unsigned int maxPathStringLength{3000}; - if((not tmppath) or (strlen(tmppath) > maxPathStringLength) ){ - ATH_MSG_ERROR( "FATAL: Unable to retrieve environmental DATAPATH" ); + const std::string mapFile = "PixelMapping_Run2.dat"; + char* getenvPath = std::getenv("DATAPATH"); + const unsigned int maxPathStringLength{3000}; + if((not getenvPath) or (strlen(getenvPath) > maxPathStringLength) ){ + ATH_MSG_FATAL( "Unable to retrieve environmental DATAPATH" ); return StatusCode::FAILURE; } - tmppath=strdup(tmppath); + std::stringstream tmpSstr{}; + tmpSstr<<getenvPath; + std::string tmppath(tmpSstr.str()); std::vector<std::string> paths = splitter(tmppath, ':'); bool found(false); diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixMapDBWriter.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixMapDBWriter.cxx index c9079c90775b..c0f7fab632f3 100755 --- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixMapDBWriter.cxx +++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixMapDBWriter.cxx @@ -64,7 +64,7 @@ PixMapDBWriter::~PixMapDBWriter(){} StatusCode PixMapDBWriter::initialize(){ - ATH_MSG_INFO( "Initializing PixMapDBWriter" ); + ATH_MSG_DEBUG( "Initializing PixMapDBWriter" ); StatusCode sc = m_specialPixelMapSvc.retrieve(); if( !sc.isSuccess() ){ @@ -242,14 +242,15 @@ StatusCode PixMapDBWriter::finalize(){ //////////////////////////////////////////////////////////////////////////////////////////// - char* tmppath = std::getenv("DATAPATH"); + char* tmppath = std::getenv("DATAPATH"); const unsigned int maxPathStringLength{3000}; if((not tmppath) or (strlen(tmppath) > maxPathStringLength) ){ - ATH_MSG_ERROR( "FATAL: Unable to retrieve environmental DATAPATH" ); + ATH_MSG_FATAL( "Unable to retrieve environmental DATAPATH" ); return StatusCode::FAILURE; } - tmppath=strdup(tmppath); - std::string cmtpath(tmppath); + std::stringstream tmpSstr{}; + tmpSstr<<tmppath; + std::string cmtpath(tmpSstr.str()); std::vector<std::string> paths = splitter(cmtpath, ':'); std::ifstream ifs; for (const auto& x : paths){ @@ -321,7 +322,7 @@ StatusCode PixMapDBWriter::finalize(){ } if ( specialPixelHistograms.find(std::string(onlineID)) == specialPixelHistograms.end() ) { - std::cout << "DEBUG: onlineID " << onlineID << " is not found in the specialPixelHistograms" << std::endl; + ATH_MSG_DEBUG("onlineID " << onlineID << " is not found in the specialPixelHistograms" ); continue; } TH2C* specialPixelHistogram = specialPixelHistograms[std::string(onlineID)]; @@ -453,10 +454,10 @@ StatusCode PixMapDBWriter::finalize(){ if (pixelStatus1 != 0) { - std::cout << "barrel, layer, module_phi, module_eta, pixel_eta, pixel_phi, mchips, pixelID\n" + ATH_MSG_DEBUG( "barrel, layer, module_phi, module_eta, pixel_eta, pixel_phi, mchips, pixelID\n" << " = " << barrel << ", " << layer << ", " << module_phi << ", " << module_eta - << ", " << pixel_eta << ", " << pixel_phi << ", " << mchips << ", " << pixelID << std::endl; - std::cout << "pixelStatus1, pixelStatus2 = " << pixelStatus1 << ", " << pixelStatus2 << std::endl; + << ", " << pixel_eta << ", " << pixel_phi << ", " << mchips << ", " << pixelID + << "\npixelStatus1, pixelStatus2 = " << pixelStatus1 << ", " << pixelStatus2 ); } if( (pixelStatus1 & m_pixelStatus) == m_pixelStatus ){ @@ -676,7 +677,7 @@ StatusCode PixMapDBWriter::finalize(){ std::string PixMapDBWriter::getDCSIDFromPosition (int barrel_ec, int layer, int module_phi, int module_eta){ for(unsigned int ii = 0; ii < m_pixelMapping.size(); ii++) { if (m_pixelMapping[ii].second.size() != 4) { - std::cout << "getDCSIDFromPosition: Vector size is not 4!" << std::endl; + ATH_MSG_WARNING( "getDCSIDFromPosition: Vector size is not 4!" ); return std::string("Error!"); } if (m_pixelMapping[ii].second[0] != barrel_ec) continue; @@ -685,7 +686,7 @@ std::string PixMapDBWriter::getDCSIDFromPosition (int barrel_ec, int layer, int if (m_pixelMapping[ii].second[3] != module_eta) continue; return m_pixelMapping[ii].first; } - std::cout << "Not found!" << std::endl; + ATH_MSG_WARNING( "Not found!" ); return std::string("Error!"); } @@ -694,7 +695,7 @@ std::vector<int> PixMapDBWriter::getPositionFromDCSID (std::string DCSID){ if (m_pixelMapping[ii].first == DCSID) return m_pixelMapping[ii].second; } - std::cout << "Not found!" << std::endl; + ATH_MSG_WARNING( "Not found!" ); std::vector<int> void_vec; return void_vec; } -- GitLab From f2e0785908d534d38944bf64ffded46bec056412 Mon Sep 17 00:00:00 2001 From: Shaun Roe <shaun.roe@cern.ch> Date: Fri, 20 Jul 2018 11:36:23 +0000 Subject: [PATCH 557/562] 22.0-coverity-InDetAlignGenTools Former-commit-id: 4ca43c6788c6dec7797f72e5aa8486a437c66066 --- .../InDetAlignGenTools/InDetAlignFillTrack.h | 8 +++----- .../src/InDetAlignFillTrack.cxx | 17 +++++++++-------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/InnerDetector/InDetAlignTools/InDetAlignGenTools/InDetAlignGenTools/InDetAlignFillTrack.h b/InnerDetector/InDetAlignTools/InDetAlignGenTools/InDetAlignGenTools/InDetAlignFillTrack.h index 72fa2a8cc995..8b017105b8f5 100644 --- a/InnerDetector/InDetAlignTools/InDetAlignGenTools/InDetAlignGenTools/InDetAlignFillTrack.h +++ b/InnerDetector/InDetAlignTools/InDetAlignGenTools/InDetAlignGenTools/InDetAlignFillTrack.h @@ -17,8 +17,6 @@ #include <string> -#include "HepPDT/ParticleDataTable.hh" - #include "TrkTrack/TrackCollection.h" #include "AthenaBaseComps/AthAlgTool.h" @@ -26,20 +24,20 @@ #include "GaudiKernel/ToolHandle.h" #include "InDetAlignGenTools/IInDetAlignFillTrack.h" -#include "TrkExInterfaces/IExtrapolator.h" namespace Trk { class Track; class ITruthToTrack; //!< Produces perigee track parameters from generated parameters + class IExtrapolator; } -namespace HepMC { +namespace HepPDT { class ParticleDataTable; } class INTupleSvc; -class IExtrapolator; + class InDetAlignFillTrack: virtual public IInDetAlignFillTrack, public AthAlgTool { public: diff --git a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignFillTrack.cxx b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignFillTrack.cxx index 1a4b377ff757..1cf0a0aa793f 100644 --- a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignFillTrack.cxx +++ b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignFillTrack.cxx @@ -35,14 +35,14 @@ #include "TrkToolInterfaces/ITruthToTrack.h" - +#include "TrkExInterfaces/IExtrapolator.h" #include "TrkTrackSummary/TrackSummary.h" #include "TrkToolInterfaces/ITrackSummaryTool.h" #include "TrkEventPrimitives/FitQuality.h" #include "CLHEP/GenericFunctions/CumulativeChiSquare.hh" #include "InDetAlignGenTools/InDetAlignFillTrack.h" - +#include "HepPDT/ParticleDataTable.hh" #include "HepMC/GenParticle.h" #include "HepMC/GenVertex.h" @@ -197,9 +197,9 @@ StatusCode InDetAlignFillTrack::FillTrack() { ATH_MSG_DEBUG(" event " << m_events); StatusCode sc; - const TrackCollection* tracks = new TrackCollection; - const TrackCollection* Uptracks = new TrackCollection; - const TrackCollection* Lowtracks = new TrackCollection; + const TrackCollection* tracks;// = new TrackCollection; + const TrackCollection* Uptracks;// = new TrackCollection; + const TrackCollection* Lowtracks;// = new TrackCollection; // retrieve all tracks from TDS ATH_CHECK(evtStore()->retrieve(tracks, m_inputCol)); @@ -542,9 +542,10 @@ StatusCode InDetAlignFillTrack::FillTrack() { } if (m_events < 0) m_events = 0; - delete tracks; - delete Uptracks; - delete Lowtracks; + // no deletion because StoreGate owns these pointers. + //delete tracks; + //delete Uptracks; + //delete Lowtracks; return StatusCode::SUCCESS; } -- GitLab From c914db37119fd8ae21a09b7d6d20ee9e4bad87f0 Mon Sep 17 00:00:00 2001 From: Adam Edward Barton <adam.edward.barton@cern.ch> Date: Fri, 20 Jul 2018 11:47:50 +0000 Subject: [PATCH 558/562] IDC Commit3 Former-commit-id: ce632d0ccba5acea895d52ee375eafa1aa87c7d3 --- .../{IDC_Lock.h => IDC_WriteHandleBase.h} | 24 +- .../EventContainers/IIdentifiableCont.h | 2 +- .../EventContainers/IdentifiableCache.h | 13 +- .../EventContainers/IdentifiableCacheBase.h | 80 +++-- .../EventContainers/IdentifiableContTemp.h | 8 +- .../IdentifiableContainerBase.h | 38 +++ .../EventContainers/IdentifiableContainerMT.h | 193 ++++++----- .../{IDC_Lock.cxx => IDC_WriteHandleBase.cxx} | 15 +- .../src/IdentifiableCacheBase.cxx | 302 +++++++++--------- .../src/IdentifiableContainerBase.cxx | 106 ++++++ .../test/IDC_Realistic_Test.cxx | 7 +- .../test/IDMT_ContainerTest.cxx | 24 +- .../EventContainers/test/ID_ContainerTest.cxx | 7 +- .../test/PixelClusterContainerCnv_p1_test.cxx | 2 +- .../test/PixelClusterContainerCnv_p2_test.cxx | 2 +- .../test/PixelClusterContainerCnv_p3_test.cxx | 2 +- ...xelGangedClusterAmbiguitiesCnv_p1_test.cxx | 2 +- .../test/SCT_ClusterContainerCnv_p2_test.cxx | 2 +- .../test/SCT_ClusterContainerCnv_p3_test.cxx | 2 +- .../TRT_DriftCircleContainerCnv_p2_test.cxx | 2 +- .../test/CscPrepDataContainerCnv_p1_test.cxx | 2 +- .../test/CscPrepDataContainerCnv_p2_test.cxx | 2 +- .../CscStripPrepDataContainerCnv_p1_test.cxx | 2 +- .../test/MMPrepDataContainerCnv_p1_test.cxx | 2 +- .../test/MM_DigitContainerCnv_p1_test.cxx | 2 +- .../test/MM_DigitContainerCnv_p2_test.cxx | 2 +- .../test/MdtPrepDataContainerCnv_p1_test.cxx | 2 +- .../test/MdtPrepDataContainerCnv_p2_test.cxx | 2 +- .../test/RpcCoinDataContainerCnv_p1_test.cxx | 2 +- .../test/RpcPrepDataContainerCnv_p1_test.cxx | 2 +- .../test/RpcPrepDataContainerCnv_p2_test.cxx | 2 +- .../test/RpcPrepDataContainerCnv_p3_test.cxx | 2 +- .../test/STGC_DigitContainerCnv_p1_test.cxx | 2 +- .../test/STGC_RawDataContainerCnv_p1_test.cxx | 2 +- .../test/TgcCoinDataContainerCnv_p1_test.cxx | 2 +- .../test/TgcCoinDataContainerCnv_p2_test.cxx | 2 +- .../test/TgcCoinDataContainerCnv_p3_test.cxx | 2 +- .../test/TgcPrepDataContainerCnv_p1_test.cxx | 2 +- .../test/TgcPrepDataContainerCnv_p2_test.cxx | 2 +- .../test/TgcPrepDataContainerCnv_p3_test.cxx | 2 +- .../test/sTgcPrepDataContainerCnv_p1_test.cxx | 2 +- .../PlanarClusterContainerCnv_p1_test.cxx | 4 +- .../PlanarClusterContainerCnv_p2_test.cxx | 4 +- 43 files changed, 537 insertions(+), 346 deletions(-) rename Event/EventContainers/EventContainers/{IDC_Lock.h => IDC_WriteHandleBase.h} (63%) create mode 100644 Event/EventContainers/EventContainers/IdentifiableContainerBase.h rename Event/EventContainers/src/{IDC_Lock.cxx => IDC_WriteHandleBase.cxx} (68%) create mode 100644 Event/EventContainers/src/IdentifiableContainerBase.cxx diff --git a/Event/EventContainers/EventContainers/IDC_Lock.h b/Event/EventContainers/EventContainers/IDC_WriteHandleBase.h similarity index 63% rename from Event/EventContainers/EventContainers/IDC_Lock.h rename to Event/EventContainers/EventContainers/IDC_WriteHandleBase.h index f9e79b831009..943cb6cd9fe8 100644 --- a/Event/EventContainers/EventContainers/IDC_Lock.h +++ b/Event/EventContainers/EventContainers/IDC_WriteHandleBase.h @@ -3,29 +3,35 @@ */ -#ifndef IDC_LOCK_H -#define IDC_LOCK_H +#ifndef IDC_WRITEHANDLEBASE_H +#define IDC_WRITEHANDLEBASE_H #include <atomic> #include <condition_variable> #include <mutex> -#include <utility> namespace EventContainers { struct mutexPair{ std::condition_variable condition; std::mutex mutex; - mutexPair() : condition(), mutex() {} +#ifndef NDEBUG + std::atomic<int> counter; +#endif + mutexPair() : condition(), mutex() { +#ifndef NDEBUG + counter.store(0); +#endif + } }; -class IDC_Lock{ - +class IDC_WriteHandleBase{ +protected: std::atomic<const void*>* m_atomic; mutexPair *m_mut; - + IDC_WriteHandleBase(); public: - IDC_Lock() : m_atomic(nullptr) { } + void LockOn(std::atomic<const void*>* in, mutexPair *pair){ m_atomic = in; m_mut = pair; @@ -33,7 +39,7 @@ public: void DropLock(); void ReleaseLock(); - ~IDC_Lock() { ReleaseLock(); } + ~IDC_WriteHandleBase(); }; } diff --git a/Event/EventContainers/EventContainers/IIdentifiableCont.h b/Event/EventContainers/EventContainers/IIdentifiableCont.h index 66de8637bb95..9b77bb11c7e1 100644 --- a/Event/EventContainers/EventContainers/IIdentifiableCont.h +++ b/Event/EventContainers/EventContainers/IIdentifiableCont.h @@ -29,7 +29,7 @@ public: virtual StatusCode naughtyRetrieve(IdentifierHash hashId, T* &collToRetrieve)const =0; - virtual StatusCode addCollection(const T* coll, IdentifierHash hashId, bool ownsColl = true) =0; + virtual StatusCode addCollection(const T* coll, IdentifierHash hashId) =0; virtual void cleanup() = 0; }; diff --git a/Event/EventContainers/EventContainers/IdentifiableCache.h b/Event/EventContainers/EventContainers/IdentifiableCache.h index 08899f4a2264..6e0ec231c6ef 100644 --- a/Event/EventContainers/EventContainers/IdentifiableCache.h +++ b/Event/EventContainers/EventContainers/IdentifiableCache.h @@ -45,18 +45,23 @@ public: { } + IdentifiableCache (IdentifierHash maxHash, const Maker* maker, size_t lockBucketSize) + : IdentifiableCacheBase (maxHash, maker) + { + } + ~IdentifiableCache() { IdentifiableCacheBase::cleanUp (void_unique_ptr::Deleter<T>::deleter); } // Return payload if there, null if not there. - const T* find (IdentifierHash hash) const + const T* find (IdentifierHash hash) { return reinterpret_cast<const T*> (IdentifiableCacheBase::find (hash)); } - const T* findWait (IdentifierHash hash) const + const T* findWait (IdentifierHash hash) { return reinterpret_cast<const T*> (IdentifiableCacheBase::findWait (hash)); } @@ -68,9 +73,9 @@ public: // ids - bool add (IdentifierHash hash, const T* p, bool TakeOwnerShip = false) + bool add (IdentifierHash hash, const T* p) { - return IdentifiableCacheBase::add (hash, p, TakeOwnerShip); + return IdentifiableCacheBase::add (hash, p); } bool add (IdentifierHash hash, std::unique_ptr<T> p) diff --git a/Event/EventContainers/EventContainers/IdentifiableCacheBase.h b/Event/EventContainers/EventContainers/IdentifiableCacheBase.h index 4bc2f0a1fc28..862ae16ece2c 100644 --- a/Event/EventContainers/EventContainers/IdentifiableCacheBase.h +++ b/Event/EventContainers/EventContainers/IdentifiableCacheBase.h @@ -18,15 +18,12 @@ #include "Identifier/IdentifierHash.h" -#include <stdexcept> #include <mutex> #include <atomic> -#include <condition_variable> -#include "EventContainers/IDC_Lock.h" -#include <map> +#include "EventContainers/IDC_WriteHandleBase.h" //abarton //Enabling the ability to remove collections to help compatability with old code. -//This may be removed to improved threadsafety. +//This may be removed to improved thread-safety. #define IdentifiableCacheBaseRemove namespace EventContainers { @@ -40,11 +37,10 @@ public: //here for access from other classes static constexpr uintptr_t INVALIDflag = UINTPTR_MAX; static constexpr uintptr_t ABORTEDflag = UINTPTR_MAX-1; -static constexpr size_t s_lockBucketSize =6; +static constexpr size_t s_defaultBucketSize =6; typedef std::true_type thread_safe; typedef std::set<IdentifierHash> idset_t; -typedef std::map<IdentifierHash, mutexPair>::iterator waitlistPair; #if 0 struct deleter @@ -80,55 +76,77 @@ typedef std::map<IdentifierHash, mutexPair>::iterator waitlistPair; struct IMaker { + bool m_IsReEntrant = false; virtual ~IMaker() {} virtual void_unique_ptr typelessMake (IdentifierHash hash) const = 0; // unique_ptr<T>?? }; - // Return payload if there, null if not there. - const void* find (IdentifierHash hash) const; - const void* findWait (IdentifierHash hash) const; + /// Return payload if there, null if not there. + const void* find (IdentifierHash hash); + /// Retrieve ptr, will wait if there is something in progress + const void* findWait (IdentifierHash hash); - // Try to make payload if not there. + /// Try to make payload if not there. const void* get (IdentifierHash hash); - std::vector<IdentifierHash> ids() const; + ///In a threaded situation this collection will be valid but will not container hashes later added + std::vector<IdentifierHash> ids(); - bool add (IdentifierHash hash, const void* p, bool TakeOwnerShip); + bool add (IdentifierHash hash, const void* p); bool add (IdentifierHash hash, void_unique_ptr p); - int tryLock(IdentifierHash, IDC_Lock &, std::vector<waitlistPair>&); - int itemAborted(IdentifierHash) const; - int itemInProgress(IdentifierHash) const; + bool IMakerPresent() const { return m_maker!=nullptr; } + + /// Checks if the item is completed if it is not started it extablishes lock (returns 0), + /// If it is started but not completed it adds to wait list (returns 1) + /// If the item is already completed it returns 2 + /// If the item is aborted it does nothing and returns 3 + int tryLock(IdentifierHash, IDC_WriteHandleBase &, std::vector<IdentifierHash>&); + + ///Returns 1 is the item has been aborted otherwise 0 + int itemAborted(IdentifierHash); + + ///Returns 1 is the item is inprogress otherwise 0 + int itemInProgress(IdentifierHash); + + ///Halts the thread until the require hash is completed or aborted + const void* waitFor(IdentifierHash); + + ///Create a set of hashes, updates an IDC mask as appropriate + void createSet (const std::vector<IdentifierHash>& hashes, std::vector<bool> &mask); + #ifdef IdentifiableCacheBaseRemove + ///Use to remove a collection from the cache, this is for backwards compatability + /// and should not be used in a concurrent environment bool remove (IdentifierHash hash); #endif - size_t fullSize() const { return m_owns.size(); } - size_t numberOfHashes() const; + size_t fullSize() const { return m_vec.size(); } + ///In a concurrent situation this number isn't necessarily perfectly synchronised with ids().size() + size_t numberOfHashes(); +#ifndef NDEBUG + void cancelWait(IdentifierHash hash); +#endif protected: + IdentifiableCacheBase (IdentifierHash maxHash, const IMaker* maker, size_t lockBucketSize); IdentifiableCacheBase (IdentifierHash maxHash, const IMaker* maker); ~IdentifiableCacheBase(); void clear (deleter_f* deleter); void cleanUp(deleter_f* deleter);//Call once before destruction - + void notifyHash(IdentifierHash hash); private: std::vector<std::atomic<const void*> > m_vec; - std::vector<bool> m_owns; const IMaker* m_maker; - // Set of currently populated hashes. - // If a hash has an entry in the set but not in the vector, - // a conversion is in progress. - - idset_t m_ids; typedef std::mutex mutex_t; typedef std::lock_guard<mutex_t> lock_t; - mutable mutex_t m_mutex; - - std::condition_variable m_cond; - mutable mutex_t m_mapMutexes[s_lockBucketSize]; - mutable std::map<IdentifierHash, mutexPair> m_HoldingMutexes[s_lockBucketSize]; - + typedef std::unique_lock<mutex_t> uniqueLock; + mutex_t m_mutex; + ///Pool of mutexes used for waiting on completion if in a concurrent environment + std::unique_ptr<mutexPair[]> m_HoldingMutexes; + size_t m_NMutexes; + ///Holds the number of valid hashes in container, in concurrent use it is not guaranteed to be up to date. + std::atomic<size_t> m_currentHashes; }; diff --git a/Event/EventContainers/EventContainers/IdentifiableContTemp.h b/Event/EventContainers/EventContainers/IdentifiableContTemp.h index 51b21f550baf..c213a2dc00aa 100644 --- a/Event/EventContainers/EventContainers/IdentifiableContTemp.h +++ b/Event/EventContainers/EventContainers/IdentifiableContTemp.h @@ -28,8 +28,9 @@ public: IdentifiableContTemp(size_t size) : IdentifiableContTemp(size, nullptr) { } IdentifiableContTemp(IdentifiableContainerMT< T > *extcache = nullptr) : IdentifiableContTemp(extcache->fullSize(), extcache) { } - + IdentifiableContTemp() = delete; IdentifiableContTemp(const IdentifiableContTemp& that) = delete; + IdentifiableContTemp& operator= ( const IdentifiableContTemp& ) = delete; virtual ~IdentifiableContTemp(){ for(auto &x : m_usedhashes){ @@ -49,8 +50,7 @@ public: return out; } - virtual StatusCode addCollection(const T* coll, IdentifierHash hashId, bool ownsColl = true) override{ - if(ownsColl == false) return StatusCode::FAILURE; //not supported + virtual StatusCode addCollection(const T* coll, IdentifierHash hashId) override{ if(hashId >= m_randomcont.size()) return StatusCode::FAILURE; m_usedhashes.emplace_back(hashId, coll); m_randomcont[hashId] = coll; @@ -61,7 +61,7 @@ public: virtual StatusCode addOrDelete(std::unique_ptr<T> ptr, IdentifierHash hashId) override{ if(hashId >= m_randomcont.size()) return StatusCode::FAILURE; if(m_randomcont[hashId] == nullptr){ - return addCollection(ptr.release(), hashId, true); + return addCollection(ptr.release(), hashId); } ptr.reset(); return StatusCode::SUCCESS; diff --git a/Event/EventContainers/EventContainers/IdentifiableContainerBase.h b/Event/EventContainers/EventContainers/IdentifiableContainerBase.h new file mode 100644 index 000000000000..6799b3bd5065 --- /dev/null +++ b/Event/EventContainers/EventContainers/IdentifiableContainerBase.h @@ -0,0 +1,38 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + + +#ifndef EVENTCONTAINERS_IDENTIFIABLECONTAINERBASE_H +#define EVENTCONTAINERS_IDENTIFIABLECONTAINERBASE_H + +#include "EventContainers/IdentifiableCacheBase.h" + +class IdentifiableContainerBase{ + +public: + typedef std::vector<IdentifierHash> Hash_Container; + IdentifiableContainerBase(EventContainers::IdentifiableCacheBase *cache, bool online); + static Hash_Container::const_iterator findHash(Hash_Container*, IdentifierHash); + ~IdentifiableContainerBase(); +protected: + EventContainers::IdentifiableCacheBase *m_cacheLink; + bool m_OnlineMode; + mutable std::atomic<bool> m_waitNeeded; + typedef EventContainers::IdentifiableCacheBase IdentifiableCacheBase; + mutable std::vector< IdentifierHash > m_waitlist; + mutable std::mutex m_waitMutex; + mutable std::vector<bool> m_mask; + std::vector<IdentifierHash> GetAllCurrentHashes() const; + + void Wait() const; + bool tryFetch(IdentifierHash hashId, EventContainers::IDC_WriteHandleBase &lock); + bool tryFetch(IdentifierHash hashId); + void cleanup(); + size_t numberOfCollections() const; + void ResetMask(); + StatusCode fetchOrCreate(IdentifierHash hashId); + StatusCode fetchOrCreate(const std::vector<IdentifierHash> &hashIds); +}; + +#endif diff --git a/Event/EventContainers/EventContainers/IdentifiableContainerMT.h b/Event/EventContainers/EventContainers/IdentifiableContainerMT.h index 5c214e4690f8..4417de46067e 100644 --- a/Event/EventContainers/EventContainers/IdentifiableContainerMT.h +++ b/Event/EventContainers/EventContainers/IdentifiableContainerMT.h @@ -19,10 +19,9 @@ #include "EventContainers/IdentifiableCache.h" #include "EventContainers/IIdentifiableCont.h" #include <memory> -#include <algorithm> #include "GaudiKernel/DataObject.h" - - +#include "EventContainers/IdentifiableContainerBase.h" +#include "EventContainers/IDC_WriteHandleBase.h" //const_iterator and indexFind are provided for backwards compatability. they are not optimal /* @@ -35,12 +34,55 @@ IT is faster to iterate over the container with this method: */ template < class T> -class IdentifiableContainerMT : public DataObject, public EventContainers::IIdentifiableCont<T> +class IdentifiableContainerMT : public DataObject, public IdentifiableContainerBase, public EventContainers::IIdentifiableCont<T> { public: + class IDC_WriteHandle : EventContainers::IDC_WriteHandleBase { + friend class IdentifiableContainerMT<T>; + IdentifiableContainerMT<T> *m_IDC_ptr; + IdentifierHash m_hashId; + bool m_alreadyPresent; + public: + IDC_WriteHandle() : IDC_WriteHandleBase(), m_IDC_ptr(0), m_hashId(0), m_alreadyPresent(false) { } + IDC_WriteHandle& operator=(const IDC_WriteHandle& other) = delete; + IDC_WriteHandle(const IDC_WriteHandle& other) = delete; + IDC_WriteHandle& operator=(IDC_WriteHandle&& other){ + Swap(*this, other); + return *this; + } + void Swap(IDC_WriteHandle& a, IDC_WriteHandle& b){ + if(&a == &b) return; + std::swap(a.m_IDC_ptr, b.m_IDC_ptr); + std::swap(a.m_hashId, b.m_hashId); + std::swap(a.m_alreadyPresent, b.m_alreadyPresent); + std::swap(a.m_atomic, b.m_atomic); + std::swap(a.m_mut, b.m_mut); + } + IDC_WriteHandle(IDC_WriteHandle&& other){ + Swap(*this, other); + } + StatusCode addOrDelete(std::unique_ptr<T> ptr, bool &deleted){ + if(m_IDC_ptr==nullptr) return StatusCode::FAILURE; + StatusCode sc = m_IDC_ptr->addOrDelete(std::move(ptr), m_hashId, deleted); + IDC_WriteHandleBase::ReleaseLock(); + m_alreadyPresent = true; + return sc; + } + StatusCode addOrDelete(std::unique_ptr<T> ptr){ + if(m_IDC_ptr==nullptr) return StatusCode::FAILURE; + StatusCode sc = m_IDC_ptr->addOrDelete(std::move(ptr), m_hashId); + IDC_WriteHandleBase::ReleaseLock(); + m_alreadyPresent = true; + return sc; + } + bool alreadyPresent(){ return m_alreadyPresent; } + }; + + + typedef T IDENTIFIABLE; typedef EventContainers::IdentifiableCache<T> ICACHE; typedef IdentifiableContainerMT<T> MyType; @@ -51,37 +93,10 @@ public: typedef T** pointer; typedef T* const * const_pointer; typedef T base_value_type; - typedef std::vector<IdentifierHash> Hash_Container; - typedef EventContainers::IDC_Lock IDC_Lock; - -private: - ICACHE *m_cacheLink; - mutable std::vector<bool> m_mask; - bool m_OnlineMode; - typedef EventContainers::IdentifiableCacheBase IdentifiableCacheBase; - typedef IdentifiableCacheBase::waitlistPair waitlistPair; - mutable std::vector< waitlistPair> m_waitlist; - mutable std::mutex m_waitMutex; -public: - void Wait() const{ - //lockguard to protect m_waitlist from multiple wait calls - typedef std::lock_guard<decltype(m_waitMutex)> lockguard; - lockguard lock(m_waitMutex); - while(!m_waitlist.empty()){ - waitlistPair &o = m_waitlist.back(); - auto hash = o->first; - //unique lock is necessary for the condition variable to have access to unlock - typedef std::unique_lock<decltype(o->second.mutex)> uniquelock; - uniquelock lk(o->second.mutex); - while(m_cacheLink->itemInProgress(hash)){ - o->second.condition.wait(lk); - } - if(m_cacheLink->itemAborted(hash)) m_mask[hash] = false;//reset flag - m_waitlist.pop_back(); - } - } + ICACHE* castCache() { return static_cast<ICACHE*>(m_cacheLink); } + ICACHE* castCache() const { return static_cast<ICACHE*>(m_cacheLink); } class const_iterator { @@ -93,6 +108,7 @@ public: /// assignment operator const_iterator& operator = ( const const_iterator & it ) { + if(this == &it) return *this;//Safeguard against self assignment m_hashItr = it.m_hashItr; m_sptr = it.m_sptr; m_current = it.m_current; @@ -109,7 +125,7 @@ public: auto ids = m_idContainer->GetAllCurrentHashes(); m_sptr = std::shared_ptr<Hash_Container> (new Hash_Container()); m_sptr->swap(ids); - m_hashItr = std::find(m_sptr->begin(), m_sptr->end(), m_hash); + m_hashItr = IdentifiableContainerBase::findHash(m_sptr.get(), m_hash); if(m_hashItr==m_sptr->end()) { m_end = true; m_sptr.reset(); @@ -216,13 +232,13 @@ public: - // constructor initializes the collection the hashmax, OFFLINE usages pattern + /// constructor initializes the collection the hashmax, OFFLINE usages pattern IdentifiableContainerMT(IdentifierHash hashMax); - // constructor initializes with a link to a cache, ONLINE usage pattern + /// constructor initializes with a link to a cache, ONLINE usage pattern IdentifiableContainerMT(ICACHE *cache); - ~IdentifiableContainerMT() { if(!m_OnlineMode) delete m_cacheLink; } + ~IdentifiableContainerMT() { if(!m_OnlineMode) delete castCache(); } virtual bool hasExternalCache() const override final { return m_OnlineMode; } @@ -239,7 +255,7 @@ public: /// insert collection into container with id hash /// if IDC should not take ownership of collection, set ownsColl to false - StatusCode addCollection(const T* coll, IdentifierHash hashId, bool ownsColl = true) override final; + StatusCode addCollection(const T* coll, IdentifierHash hashId) override final; /// Tries to add the item to the cache, if the item already exists then it is deleted /// This is a convenience method for online multithreaded scenarios @@ -252,12 +268,12 @@ public: /// If it does exist it incorporates it into the IDC view but changing the mask. virtual bool tryFetch(IdentifierHash hashId) override final; - bool tryFetch(IdentifierHash hashId, IDC_Lock &); - /// Tries will look for item in cache, if it doesn't exist will call the cache IMAKER /// If cache doesn't have an IMAKER then this fails. StatusCode fetchOrCreate(IdentifierHash hashId); + StatusCode fetchOrCreate(const std::vector<IdentifierHash> &hashId); + //This is a method to support bad behaviour in old code. Remove ASAP virtual StatusCode naughtyRetrieve(IdentifierHash hashId, T* &collToRetrieve) const override final; @@ -276,33 +292,23 @@ public: return m_mask.size(); } - //Duplicate of fullSize for backwards compatability + ///Duplicate of fullSize for backwards compatability size_t size() const { return m_mask.size(); } /// return number of collections virtual size_t numberOfCollections() const override final{ - if(!m_OnlineMode) return m_cacheLink->numberOfHashes(); - Wait(); - size_t count =0; - for(auto b : m_mask) count += b; - return count; + return IdentifiableContainerBase::numberOfCollections(); } - //Returns a collection of all hashes availiable in this IDC. - //If this is an "offline" mode IDC then this is identical to the cache - //If this is an "online" mode IDC then this is the items that both exist in the cache - //and have a postive mask element + ///Returns a collection of all hashes availiable in this IDC. + ///If this is an "offline" mode IDC then this is identical to the cache + ///If this is an "online" mode IDC then this is the items that both exist in the cache + ///and have a postive mask element virtual std::vector<IdentifierHash> GetAllCurrentHashes() const override final { - if(not m_OnlineMode) return m_cacheLink->ids(); - else{ - Wait(); - std::vector<IdentifierHash> ids; - for(size_t i =0 ; i < m_mask.size(); ++i) if(m_mask[i]) ids.emplace_back(i); - return ids; - } + return IdentifiableContainerBase::GetAllCurrentHashes(); } /// return const_iterator for first entry @@ -316,6 +322,15 @@ public: const_iterator end() const { return const_iterator(nullptr, true); } + + IDC_WriteHandle getWriteHandle(IdentifierHash hash) + { + IDC_WriteHandle lock; + lock.m_hashId = hash; + lock.m_IDC_ptr = this; + lock.m_alreadyPresent = IdentifiableContainerBase::tryFetch(hash, lock); + return lock; + } }; #ifdef IdentifiableCacheBaseRemove @@ -324,8 +339,8 @@ T* //Please don't do this we want to get rid of this IdentifiableContainerMT<T>::removeCollection( IdentifierHash hashId ) { using namespace EventContainers; - const T* ptr = reinterpret_cast<const T*> (m_cacheLink->find (hashId)); - m_cacheLink->remove(hashId); + const T* ptr = reinterpret_cast<const T*> (castCache()->find (hashId)); + castCache()->remove(hashId); m_mask[hashId] = false; return const_cast<T*>(ptr); } @@ -335,38 +350,34 @@ IdentifiableContainerMT<T>::removeCollection( IdentifierHash hashId ) // Constructor for OFFLINE style IDC template < class T> -IdentifiableContainerMT<T>::IdentifiableContainerMT(IdentifierHash maxHash) : m_cacheLink(new ICACHE(maxHash, nullptr)) +IdentifiableContainerMT<T>::IdentifiableContainerMT(IdentifierHash maxHash) : IdentifiableContainerBase(new ICACHE(maxHash, nullptr), false) { - m_mask.assign(maxHash, true); - m_OnlineMode = false; } // Constructor for ONLINE style IDC template < class T> -IdentifiableContainerMT<T>::IdentifiableContainerMT(ICACHE *cache) : m_cacheLink(cache) +IdentifiableContainerMT<T>::IdentifiableContainerMT(ICACHE *cache) : IdentifiableContainerBase(cache, true) { - m_mask.assign(cache->fullSize(), false); - m_OnlineMode = true; } -// return valuetype on the found entry or null if out of -// range using hashed index - fast version, does not call cnv -// if object not there +/// return valuetype on the found entry or null if out of +/// range using hashed index - fast version, does not call cnv +/// if object not there template < class T> const T* IdentifiableContainerMT<T>::indexFindPtr( IdentifierHash hashId ) const { - if(m_mask[hashId]) return m_cacheLink->findWait(hashId); + if(m_mask[hashId]) return castCache()->findWait(hashId); else return nullptr; } // insert collection into container with id hash template < class T> StatusCode -IdentifiableContainerMT<T>::addCollection(const T* coll, IdentifierHash hashId, bool ownsColl) +IdentifiableContainerMT<T>::addCollection(const T* coll, IdentifierHash hashId) { // update m_hashids - if (! m_cacheLink->add(hashId, coll, ownsColl)) return StatusCode::FAILURE; + if (! castCache()->add(hashId, coll)) return StatusCode::FAILURE; m_mask[hashId] = true; return StatusCode::SUCCESS; @@ -378,55 +389,39 @@ template < class T> void IdentifiableContainerMT<T>::cleanup() { - if(m_OnlineMode) { m_mask.assign(m_cacheLink->fullSize(), false); } - else { m_cacheLink->clearCache(); } + if(m_OnlineMode) { IdentifiableContainerBase::ResetMask(); } + else { castCache()->clearCache(); } } template < class T> StatusCode IdentifiableContainerMT<T>::fetchOrCreate(IdentifierHash hashId) { - auto ptr = m_cacheLink->get(hashId); - if(ptr==nullptr){ - return StatusCode::FAILURE; - } - m_mask[hashId] = true; - return StatusCode::SUCCESS; + return IdentifiableContainerBase::fetchOrCreate(hashId); } template < class T> -bool -IdentifiableContainerMT<T>::tryFetch(IdentifierHash hashId) +StatusCode +IdentifiableContainerMT<T>::fetchOrCreate(const std::vector<IdentifierHash> &hashIds) { - auto ptr = m_cacheLink->find(hashId); - if(ptr==nullptr){ - return false; - } - m_mask[hashId] = true; - return true; + return IdentifiableContainerBase::fetchOrCreate(hashIds); } + template < class T> bool -IdentifiableContainerMT<T>::tryFetch(IdentifierHash hashId, IDC_Lock &lock) +IdentifiableContainerMT<T>::tryFetch(IdentifierHash hashId) { - if(!m_OnlineMode){ - return tryFetch(hashId);//No point calling expensive lock method - } - int flag = m_cacheLink->tryLock(hashId, lock, m_waitlist); - - if(flag > 0) { m_mask[hashId] = flag!=3; return true;} - return false; + return IdentifiableContainerBase::tryFetch(hashId); } - template < class T > StatusCode IdentifiableContainerMT<T>::naughtyRetrieve(IdentifierHash hashId, T* &collToRetrieve) const { if(m_OnlineMode) return StatusCode::FAILURE;//NEVER ALLOW FOR EXTERNAL CACHE else { - collToRetrieve = const_cast< T* > (m_cacheLink->find(hashId));//collToRetrieve can be null on success + collToRetrieve = const_cast< T* > (castCache()->find(hashId));//collToRetrieve can be null on success return StatusCode::SUCCESS; } } @@ -436,7 +431,7 @@ StatusCode IdentifiableContainerMT<T>::addOrDelete(std::unique_ptr<T> ptr, IdentifierHash hashId) { if(hashId >= m_mask.size()) return StatusCode::FAILURE; - bool added = m_cacheLink->add(hashId, std::move(ptr)); + bool added = castCache()->add(hashId, std::move(ptr)); m_mask[hashId] = true; if(added) { return StatusCode::SUCCESS; @@ -450,7 +445,7 @@ StatusCode IdentifiableContainerMT<T>::addOrDelete(std::unique_ptr<T> ptr, IdentifierHash hashId, bool &deleted) { if(hashId >= m_mask.size()) return StatusCode::FAILURE; - bool added = m_cacheLink->add(hashId, std::move(ptr)); + bool added = castCache()->add(hashId, std::move(ptr)); m_mask[hashId] = true; deleted = !added; if(added) { diff --git a/Event/EventContainers/src/IDC_Lock.cxx b/Event/EventContainers/src/IDC_WriteHandleBase.cxx similarity index 68% rename from Event/EventContainers/src/IDC_Lock.cxx rename to Event/EventContainers/src/IDC_WriteHandleBase.cxx index 84cb9fdf2b86..563b27d3212c 100644 --- a/Event/EventContainers/src/IDC_Lock.cxx +++ b/Event/EventContainers/src/IDC_WriteHandleBase.cxx @@ -2,30 +2,37 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "EventContainers/IDC_Lock.h" +#include "EventContainers/IDC_WriteHandleBase.h" #include "EventContainers/IdentifiableCacheBase.h" using namespace EventContainers; + +IDC_WriteHandleBase::IDC_WriteHandleBase() : m_atomic(nullptr), m_mut(nullptr) { } + +IDC_WriteHandleBase::~IDC_WriteHandleBase() { ReleaseLock(); } + //If object has not been filled this will change state to aborted //If object has been filled this should do nothing -void IDC_Lock::ReleaseLock(){ +void IDC_WriteHandleBase::ReleaseLock(){ if(m_atomic==nullptr) return; //Convenience declarations - using namespace EventContainers; typedef std::lock_guard<decltype(m_mut->mutex)> lockguard; const void* waitstate = reinterpret_cast<const void*>(IdentifiableCacheBase::INVALIDflag); const void* ABORTstate = reinterpret_cast<const void*>(IdentifiableCacheBase::ABORTEDflag); //Running code + assert(m_atomic->load() != ABORTstate); + assert(m_mut->counter >= 0); lockguard lk(m_mut->mutex); m_atomic->compare_exchange_strong(waitstate, ABORTstate); m_mut->condition.notify_all(); + m_atomic = nullptr; } //Can't imagine why this would be used but this may be necessary -void IDC_Lock::DropLock(){ +void IDC_WriteHandleBase::DropLock(){ m_atomic = nullptr; } diff --git a/Event/EventContainers/src/IdentifiableCacheBase.cxx b/Event/EventContainers/src/IdentifiableCacheBase.cxx index 4f21e6b674cd..ab4041146c46 100644 --- a/Event/EventContainers/src/IdentifiableCacheBase.cxx +++ b/Event/EventContainers/src/IdentifiableCacheBase.cxx @@ -10,16 +10,14 @@ * @brief */ -// Not in ids, null --- default state. -// In ids, INVALID -- conversion/add failed. -// In ids, valid --- Have payload -// In ids, null --- Conversion in progress. -// Not in ids, INVALID --- intention to add soon +// null --- default state. +// ABORTED -- conversion failed or returned null +// ptr > null && ptr < ABORTED --- Have payload +// INVALID --- Conversion in progress or intention to add soon. #include "EventContainers/IdentifiableCacheBase.h" -using namespace std; namespace EventContainers { static const void* INVALID = reinterpret_cast<const void*>(IdentifiableCacheBase::INVALIDflag); @@ -27,40 +25,46 @@ static const void* ABORTED = reinterpret_cast<const void*>(IdentifiableCacheBase IdentifiableCacheBase::IdentifiableCacheBase (IdentifierHash maxHash, const IMaker* maker) + : IdentifiableCacheBase(maxHash, maker, s_defaultBucketSize) +{ +} + +IdentifiableCacheBase::IdentifiableCacheBase (IdentifierHash maxHash, + const IMaker* maker, size_t lockBucketSize) : m_vec(maxHash), - m_owns(maxHash, false), m_maker (maker) { + m_NMutexes = lockBucketSize; + if(m_NMutexes>0) m_HoldingMutexes = std::make_unique<mutexPair[]>(m_NMutexes); for(auto &h : m_vec) h.store(nullptr, std::memory_order_relaxed); //Ensure initialized to null - I'm not sure if this is implicit + m_currentHashes.store(0, std::memory_order_relaxed); } IdentifiableCacheBase::~IdentifiableCacheBase() { - if (!m_ids.empty()) - std::abort(); + } -int IdentifiableCacheBase::tryLock(IdentifierHash hash, IDC_Lock &lock, std::vector<waitlistPair> &wait){ - const void *ptr1 = m_vec[hash]; //atomic load - if(ptr1==nullptr){ - size_t slot = hash % s_lockBucketSize; - lock_t lockhdl(m_mapMutexes[slot]); - if(m_vec[hash].compare_exchange_strong(ptr1, INVALID)){//atomic swap - //First call - - auto &mutexpair = m_HoldingMutexes[slot][hash]; //make new pair in unmoving memory - - lock.LockOn(&m_vec[hash], &mutexpair); - return 0; - } +int IdentifiableCacheBase::tryLock(IdentifierHash hash, IDC_WriteHandleBase &lock, std::vector<IdentifierHash> &wait){ + assert(m_NMutexes > 0); + const void *ptr1 =nullptr; + + if(m_vec[hash].compare_exchange_strong(ptr1, INVALID)){//atomic swap (replaces ptr1 with value) + //First call + size_t slot = hash % m_NMutexes; + auto &mutexpair = m_HoldingMutexes[slot]; + lock.LockOn(&m_vec[hash], &mutexpair); + return 0; } if(ptr1 == INVALID){ - size_t slot = hash % s_lockBucketSize; - lock_t lockhdl(m_mapMutexes[slot]); //Second call while not finished - wait.emplace_back(m_HoldingMutexes[slot].find(hash)); +#ifndef NDEBUG + size_t slot = hash % m_NMutexes; + m_HoldingMutexes[slot].counter++; +#endif + wait.emplace_back(hash); return 1; } if(ptr1 == ABORTED) return 3; @@ -70,40 +74,52 @@ int IdentifiableCacheBase::tryLock(IdentifierHash hash, IDC_Lock &lock, std::vec void IdentifiableCacheBase::clear (deleter_f* deleter) { - lock_t lock (m_mutex); - for (IdentifierHash hash : m_ids) { - if (m_owns[hash]) - deleter (m_vec[hash]); - m_owns[hash] = false; + size_t s = m_vec.size(); + for (size_t i=0; i<s ;i++) { + const void* ptr = m_vec[i].exchange(nullptr); + if (ptr && ptr < ABORTED){ + deleter (ptr); + } + } + m_currentHashes.store(0, std::memory_order_relaxed); +#ifndef NDEBUG + for(size_t i =0; i<m_NMutexes; i++){ + if(m_HoldingMutexes[i].counter!=0) std::cout << " counter is " << m_HoldingMutexes[i].counter << std::endl; + assert(m_HoldingMutexes[i].counter==0); } - m_ids.clear(); - for(auto& h : m_vec) h.store(nullptr, std::memory_order_relaxed); //This should not be being called in a thread contensious situation +#endif } //Does not lock or clear atomics to allow faster destruction void IdentifiableCacheBase::cleanUp (deleter_f* deleter) { - for (IdentifierHash hash : m_ids) { - if (m_owns[hash]) - deleter (m_vec[hash]); + size_t s = m_vec.size(); + for (size_t i=0; i<s ;i++) { + const void* p = m_vec[i]; + if(p && p < ABORTED) deleter (p); + } +#ifndef NDEBUG + for(size_t i =0; i<m_NMutexes; i++){ + if(m_HoldingMutexes[i].counter!=0) std::cout << " counter is " << m_HoldingMutexes[i].counter << std::endl; + assert(m_HoldingMutexes[i].counter==0); } - m_ids.clear(); +#endif } -int IdentifiableCacheBase::itemAborted (IdentifierHash hash) const{ +int IdentifiableCacheBase::itemAborted (IdentifierHash hash){ const void* p = m_vec[hash].load(); return (p == ABORTED); } -int IdentifiableCacheBase::itemInProgress (IdentifierHash hash) const{ +int IdentifiableCacheBase::itemInProgress (IdentifierHash hash){ const void* p = m_vec[hash].load(); return (p == INVALID); } -const void* IdentifiableCacheBase::find (IdentifierHash hash) const +const void* IdentifiableCacheBase::find (IdentifierHash hash) { if (hash >= m_vec.size()) return nullptr; const void* p = m_vec[hash].load(); @@ -112,158 +128,146 @@ const void* IdentifiableCacheBase::find (IdentifierHash hash) const return p; } - - -const void* IdentifiableCacheBase::findWait (IdentifierHash hash) const +const void* IdentifiableCacheBase::waitFor(IdentifierHash hash) { - if (hash >= m_vec.size()) return nullptr; - const void* p = m_vec[hash]; - if(p<ABORTED) return p; - size_t slot = hash % s_lockBucketSize; - std::unique_lock<std::mutex> lockmap(m_mapMutexes[slot]); - - mutexPair &mutpair = m_HoldingMutexes[slot][hash]; //make new pair in unmoving memory - lockmap.unlock(); - while(m_vec[hash]==INVALID){ - std::unique_lock<decltype(mutpair.mutex)> lk(mutpair.mutex);//mutex associated with condition - while(itemInProgress(hash)){ + const void* item = m_vec[hash].load(); + if(m_NMutexes ==0) return item; + size_t slot = hash % m_NMutexes; + if(item == INVALID){ + mutexPair &mutpair = m_HoldingMutexes[slot]; + uniqueLock lk(mutpair.mutex); + while( (item =m_vec[hash].load()) == INVALID){ mutpair.condition.wait(lk); - } - } - p = m_vec[hash]; + } + } + return item; +} +#ifndef NDEBUG +void IdentifiableCacheBase::cancelWait(IdentifierHash hash){ + assert(m_NMutexes > 0); + size_t slot = hash % m_NMutexes; + m_HoldingMutexes[slot].counter--; +} +#endif +const void* IdentifiableCacheBase::findWait (IdentifierHash hash) +{ + if (hash >= m_vec.size()) return nullptr; + const void* p = waitFor(hash); if(p>=ABORTED) return nullptr; return p; } +void IdentifiableCacheBase::notifyHash(IdentifierHash hash) +{ + size_t slot = hash % m_NMutexes; + mutexPair &mutpair = m_HoldingMutexes[slot]; + lock_t lk(mutpair.mutex); + mutpair.condition.notify_all(); +} + const void* IdentifiableCacheBase::get (IdentifierHash hash) { // If it's there already, return directly without locking. - if (hash >= m_vec.size()) return nullptr; - if (m_vec[hash]) return find (hash); - - std::unique_lock<mutex_t> lock (m_mutex); - { - // Check again. - if (m_vec[hash]) return find (hash); - idset_t::iterator it = m_ids.find (hash); - - if (it != m_ids.end()) { - // It's in the set. Someone's running the conversion already. - // Wait for the condition, then check again. - while (!m_vec[hash]) - m_cond.wait (lock); - return find (hash); - } - - // We're going to try to do a conversion. - // Enter the id in the set. - m_ids.insert (hash); - - // If there's no maker, mark it as invalid. - if (!m_maker) { - m_vec[hash] = INVALID; - return nullptr; - } - - // Let go of the lock. - } + const void* ptr = nullptr; + if (hash >= m_vec.size()) return ptr; + + if(m_vec[hash].compare_exchange_strong(ptr, INVALID) ) {//Exchanges ptr with current value!! + // Make the payload. + if(m_maker == nullptr){ + m_vec[hash].store( ABORTED ); + return nullptr; + } + uniqueLock lock(m_mutex, std::defer_lock); + if(!m_maker->m_IsReEntrant) lock.lock();//Allow reentrant or non reentrant makers - // Make the payload. - const void* p = nullptr; - try { - p = m_maker->typelessMake (hash).release(); + try { + ptr = m_maker->typelessMake (hash).release(); + } + catch (...) { + // FIXME: Can this be done with RAII? + if(m_NMutexes >0) notifyHash(hash); + throw; + } + assert(m_vec[hash] == INVALID); + if(ptr){ + m_vec[hash].store( ptr ); + m_currentHashes++; + }else{ + m_vec[hash].store( ABORTED ); + } + if(m_NMutexes >0) notifyHash(hash); } - catch (...) { - // FIXME: Can this be done with RAII? - m_vec[hash] = INVALID; - m_cond.notify_all(); - throw; + else if(ptr == INVALID){ + ptr= waitFor(hash); } + if(ptr == ABORTED) return nullptr; + assert(ptr < ABORTED); + return ptr; +} - // Stick it in the vector; notify other threads. - if (p) { - m_vec[hash] = p; - m_owns[hash] = true; - } - else{ - m_vec[hash] = INVALID; - } - m_cond.notify_all(); - return p; +void IdentifiableCacheBase::createSet (const std::vector<IdentifierHash>& hashes, std::vector<bool> &mask){ + assert(mask.size() == fullSize()); + for(IdentifierHash hash : hashes){ + const void* ptr = get(hash); + if(ptr !=nullptr) mask[hash] = true; + } } + #ifdef IdentifiableCacheBaseRemove bool IdentifiableCacheBase::remove (IdentifierHash hash) { if (hash >= m_vec.size()) return false; - lock_t lock (m_mutex); - idset_t::const_iterator it = m_ids.find (hash); - if(it != m_ids.end()){ + if(m_vec[hash]){ m_vec[hash] = nullptr; - m_owns[hash] = false; - m_ids.erase(it); + m_currentHashes--; + return true; } - return true; + return false; } #endif -size_t IdentifiableCacheBase::numberOfHashes() const +size_t IdentifiableCacheBase::numberOfHashes() { - lock_t lock (m_mutex); - return m_ids.size(); + return m_currentHashes.load(); } -std::vector<IdentifierHash> IdentifiableCacheBase::ids() const +std::vector<IdentifierHash> IdentifiableCacheBase::ids() { std::vector<IdentifierHash> ret; - ret.reserve (m_vec.size()); - lock_t lock (m_mutex); - for (IdentifierHash hash : m_ids) { - const void* p = m_vec[hash].load(); + ret.reserve (m_currentHashes); + size_t s = m_vec.size(); + for (size_t i =0; i<s; i++) { + const void* p = m_vec[i].load(); if (p && p < ABORTED) - ret.push_back (hash); + ret.push_back (i); } return ret; } -bool IdentifiableCacheBase::add (IdentifierHash hash, const void* p, bool owns) +bool IdentifiableCacheBase::add (IdentifierHash hash, const void* p) { - if (hash >= m_vec.size()) { -// cout << "Out of bounds " << hash << " / " << m_vec.size() << endl; - return false; + if (hash >= m_vec.size()) return false; + if(p==nullptr) return false; + const void* nul=nullptr; + if(m_vec[hash].compare_exchange_strong(nul, p)){ + m_currentHashes++; + return true; } - lock_t lock (m_mutex); - idset_t::iterator it = m_ids.lower_bound (hash); - if (it != m_ids.end() && *it == hash) - { -// cout << "iterator wrong " << endl; - return false; + const void* invalid = INVALID; + if(m_vec[hash].compare_exchange_strong(invalid, p)){ + m_currentHashes++; + return true; } - assert (m_vec[hash] == nullptr || m_vec[hash]==INVALID);//Can be invalid in the case of "tryfetch lock" - m_vec[hash] = p ? p : INVALID; - m_owns[hash] = p!=nullptr ? owns : false; - m_ids.insert (it, hash); - return true; + return false; } bool IdentifiableCacheBase::add (IdentifierHash hash, void_unique_ptr p) { - if (hash >= m_vec.size()) return false; - lock_t lock (m_mutex); - idset_t::iterator it = m_ids.lower_bound (hash); - if (it != m_ids.end() && *it == hash) - return false; - assert (m_vec[hash] == nullptr || m_vec[hash]==INVALID);//Can be invalid in the case of "tryfetch lock" - if (p) { - m_vec[hash] = p.release(); - m_owns[hash] = true; - } - else { - m_vec[hash] = INVALID; - } - m_ids.insert (it, hash); - return true; + bool b = add(hash, p.get()); + if(b) p.release(); + return b; } diff --git a/Event/EventContainers/src/IdentifiableContainerBase.cxx b/Event/EventContainers/src/IdentifiableContainerBase.cxx new file mode 100644 index 000000000000..ea259a7c6d7b --- /dev/null +++ b/Event/EventContainers/src/IdentifiableContainerBase.cxx @@ -0,0 +1,106 @@ +#include "EventContainers/IdentifiableContainerBase.h" +#include <algorithm> +#include "EventContainers/IDC_WriteHandleBase.h" + + IdentifiableContainerBase::IdentifiableContainerBase(EventContainers::IdentifiableCacheBase *cache, bool online) + { + m_cacheLink = cache; + m_OnlineMode = online; + m_mask.assign(cache->fullSize(), !online); + m_waitNeeded.store(false, std::memory_order_relaxed); + } + + IdentifiableContainerBase::Hash_Container::const_iterator IdentifiableContainerBase::findHash(IdentifiableContainerBase::Hash_Container* container, IdentifierHash hash){ + return std::find(container->begin(), container->end(), hash); + } + + IdentifiableContainerBase::~IdentifiableContainerBase(){ +#ifndef NDEBUG + //Deregister unused interest + while(!m_waitlist.empty()){ + IdentifierHash hash = m_waitlist.back(); + m_cacheLink->cancelWait(hash); + m_waitlist.pop_back(); + } +#endif + } + + void IdentifiableContainerBase::Wait() const{ + //lockguard to protect m_waitlist from multiple wait calls + typedef std::lock_guard<decltype(m_waitMutex)> lockguard; + lockguard lock(m_waitMutex); + + const void* ABORTstate = reinterpret_cast<const void*>(IdentifiableCacheBase::ABORTEDflag); + while(!m_waitlist.empty()){ + IdentifierHash hash = m_waitlist.back(); + const void* ptr = m_cacheLink->waitFor(hash); +#ifndef NDEBUG + m_cacheLink->cancelWait(hash); +#endif + if(ptr == ABORTstate) m_mask[hash] = false;//reset flag + m_waitlist.pop_back(); + + } + m_waitNeeded.store(false); + } + + bool IdentifiableContainerBase::tryFetch(IdentifierHash hashId, EventContainers::IDC_WriteHandleBase &lock) + { + if(!m_OnlineMode){ + return tryFetch(hashId);//No point calling expensive lock method + } + int flag = m_cacheLink->tryLock(hashId, lock, m_waitlist); + //Relaxed since this should not be running in threaded situation. + if(!m_waitlist.empty()) m_waitNeeded.store(true, std::memory_order_relaxed); + if(flag > 0) { + m_mask[hashId] = flag!=3; + return true; + } + return false; + } + + bool IdentifiableContainerBase::tryFetch(IdentifierHash hashId) + { + auto ptr = m_cacheLink->find(hashId); + if(ptr==nullptr){ + return false; + } + m_mask[hashId] = true; + return true; + } + + std::vector<IdentifierHash> IdentifiableContainerBase::GetAllCurrentHashes() const { + if(not m_OnlineMode) return m_cacheLink->ids(); + else{ + if(m_waitNeeded) Wait(); + std::vector<IdentifierHash> ids; + for(size_t i =0 ; i < m_mask.size(); ++i) if(m_mask[i]) ids.emplace_back(i); + return ids; + } + } + + size_t IdentifiableContainerBase::numberOfCollections() const{ + if(!m_OnlineMode) return m_cacheLink->numberOfHashes(); + if(m_waitNeeded) Wait(); + size_t count =std::accumulate(m_mask.begin(), m_mask.end(), 0); + return count; + } + + + void IdentifiableContainerBase::ResetMask(){ + m_mask.assign(m_cacheLink->fullSize(), false); + } + + StatusCode IdentifiableContainerBase::fetchOrCreate(IdentifierHash hashId){ + if(!m_cacheLink->IMakerPresent()) return StatusCode::FAILURE; + auto ptr = m_cacheLink->get(hashId); + m_mask[hashId] = ptr !=nullptr; + return StatusCode::SUCCESS; + } + + StatusCode IdentifiableContainerBase::fetchOrCreate(const std::vector<IdentifierHash> &hashIds){ + if(!m_cacheLink->IMakerPresent()) return StatusCode::FAILURE; + m_cacheLink->createSet(hashIds, m_mask); + return StatusCode::SUCCESS; + } + diff --git a/Event/EventContainers/test/IDC_Realistic_Test.cxx b/Event/EventContainers/test/IDC_Realistic_Test.cxx index f02173df531c..e6546afe0e92 100644 --- a/Event/EventContainers/test/IDC_Realistic_Test.cxx +++ b/Event/EventContainers/test/IDC_Realistic_Test.cxx @@ -256,9 +256,8 @@ public: for(size_t i =RoIStart ; i < RoIEnd; i++) { c.fills++; - MyCollectionContainer::IDC_Lock lock; - bool cacheh = container.tryFetch(i, lock); - if(cacheh) { + MyCollectionContainer::IDC_WriteHandle lock = container.getWriteHandle(i); + if(lock.alreadyPresent()) { c.cachehit++; continue; } @@ -272,7 +271,7 @@ public: continue; } bool deleted = false; - StatusCode x = container.addOrDelete(std::move(dcoll), IdentifierHash(i), deleted); + StatusCode x = lock.addOrDelete(std::move(dcoll), deleted); if(x.isFailure()) { std::cout << "failure in addOrDelete" << std::endl; std::abort(); diff --git a/Event/EventContainers/test/IDMT_ContainerTest.cxx b/Event/EventContainers/test/IDMT_ContainerTest.cxx index e0176c766720..d285956bad4a 100644 --- a/Event/EventContainers/test/IDMT_ContainerTest.cxx +++ b/Event/EventContainers/test/IDMT_ContainerTest.cxx @@ -5,7 +5,8 @@ // This is a test cxx file for IdentifiableContainerMT. // #include "EventContainers/IdentifiableContainerMT.h" -#include "EventContainers/SelectAllObjectMT.h" +#include "EventContainers/SelectAllObjectMT.h" +#include "EventContainers/IdentifiableContTemp.h" #include "ID_ContainerTest.h" #include "GaudiKernel/System.h" #include "CLIDSvc/CLASS_DEF.h" @@ -142,9 +143,12 @@ int ID_ContainerTest::initialize() return 0; } -// ------ finalize() -int ID_ContainerTest::finalize() -{ return 0;} +// ------ finalize() +int ID_ContainerTest::finalize() +{ +delete m_container; +m_container=nullptr; +return 0;} //------ execute() @@ -597,11 +601,15 @@ int ID_ContainerTest::execute(){ if(count !=20) std::abort(); } { - MyCollectionContainer::IDC_Lock lock; - containerOnline->tryFetch(IdentifierHash(50), lock); + MyCollectionContainer::IDC_WriteHandle lock; + lock = std::move(containerOnline->getWriteHandle(IdentifierHash(50))); + lock = std::move(containerOnline->getWriteHandle(IdentifierHash(50)));//Try to break the locks + lock = std::move(containerOnline->getWriteHandle(IdentifierHash(60))); + lock = containerOnline->getWriteHandle(IdentifierHash(70)); } - delete cache; + delete containerOnline; + delete cache; std::cout << "MyDigits left undeleted " << MyDigit::s_total << std::endl; } return 0; @@ -616,6 +624,8 @@ int main (int /*argc*/, char** /*argv[]*/) test.initialize(); for (unsigned int i = 0; i < 5; i++) test.execute(); test.finalize(); + EventContainers::IdentifiableContTemp<MyCollection> emptyContContainer(10); //Put here to test compilation of IdentifiableContTemp + emptyContContainer.cleanup(); return 0; } diff --git a/Event/EventContainers/test/ID_ContainerTest.cxx b/Event/EventContainers/test/ID_ContainerTest.cxx index 7b319e518167..a0c30e97d3ef 100644 --- a/Event/EventContainers/test/ID_ContainerTest.cxx +++ b/Event/EventContainers/test/ID_ContainerTest.cxx @@ -125,8 +125,11 @@ int ID_ContainerTest::initialize() } // ------ finalize() -int ID_ContainerTest::finalize() -{ return 0;} +int ID_ContainerTest::finalize() +{ +delete m_container; +m_container=nullptr; +return 0;} //------ execute() diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelClusterContainerCnv_p1_test.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelClusterContainerCnv_p1_test.cxx index 610c8ae642aa..fd452a20b431 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelClusterContainerCnv_p1_test.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelClusterContainerCnv_p1_test.cxx @@ -161,7 +161,7 @@ makeclusts() cl->setHashAndIndex (hash, i); coll->push_back (std::move (cl)); } - cont->addCollection (coll.release(), hash, true); + cont->addCollection (coll.release(), hash); } // gcc4.9 doesn't allow returning cont directly here; fixed in 5.2. diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelClusterContainerCnv_p2_test.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelClusterContainerCnv_p2_test.cxx index 0156e2863c21..76d71abae74c 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelClusterContainerCnv_p2_test.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelClusterContainerCnv_p2_test.cxx @@ -158,7 +158,7 @@ makeclusts() cl->setHashAndIndex (hash, i); coll->push_back (std::move (cl)); } - cont->addCollection (coll.release(), hash, true); + cont->addCollection (coll.release(), hash); } // gcc4.9 doesn't allow returning cont directly here; fixed in 5.2. diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelClusterContainerCnv_p3_test.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelClusterContainerCnv_p3_test.cxx index 67902fbb5282..3707556524bb 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelClusterContainerCnv_p3_test.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelClusterContainerCnv_p3_test.cxx @@ -158,7 +158,7 @@ makeclusts() cl->setHashAndIndex (hash, i); coll->push_back (std::move (cl)); } - cont->addCollection (coll.release(), hash, true); + cont->addCollection (coll.release(), hash); } // gcc4.9 doesn't allow returning cont directly here; fixed in 5.2. diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelGangedClusterAmbiguitiesCnv_p1_test.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelGangedClusterAmbiguitiesCnv_p1_test.cxx index d8c7deaec4bc..393da7fffb02 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelGangedClusterAmbiguitiesCnv_p1_test.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelGangedClusterAmbiguitiesCnv_p1_test.cxx @@ -193,7 +193,7 @@ const InDet::PixelClusterContainer& makeclusts (StoreGateSvc* sg) cl->setHashAndIndex (hash, i); coll->push_back (std::move (cl)); } - cont->addCollection (coll.release(), hash, true); + cont->addCollection (coll.release(), hash); } const InDet::PixelClusterContainer& ret = *cont; diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p2_test.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p2_test.cxx index 35e1b83351a1..a7f9210d956f 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p2_test.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p2_test.cxx @@ -134,7 +134,7 @@ makeclusts(const SCT_ID& sct_id) cl->setHashAndIndex (hash, i); coll->push_back (std::move (cl)); } - cont->addCollection (coll.release(), hash, true); + cont->addCollection (coll.release(), hash); } // gcc4.9 doesn't allow returning cont directly here; fixed in 5.2. diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p3_test.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p3_test.cxx index fa5b6fb9d1a0..ee76f5d9388c 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p3_test.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p3_test.cxx @@ -134,7 +134,7 @@ makeclusts(const SCT_ID& sct_id) cl->setHashAndIndex (hash, i); coll->push_back (std::move (cl)); } - cont->addCollection (coll.release(), hash, true); + cont->addCollection (coll.release(), hash); } // gcc4.9 doesn't allow returning cont directly here; fixed in 5.2. diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/TRT_DriftCircleContainerCnv_p2_test.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/TRT_DriftCircleContainerCnv_p2_test.cxx index 308085b4d67e..463791e9bf60 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/TRT_DriftCircleContainerCnv_p2_test.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/TRT_DriftCircleContainerCnv_p2_test.cxx @@ -111,7 +111,7 @@ makeclusts (const TRT_ID& trt_id) 54321); coll->push_back (std::move (cl)); } - cont->addCollection (coll.release(), hash, true); + cont->addCollection (coll.release(), hash); } // gcc4.9 doesn't allow returning cont directly here; fixed in 5.2. diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscPrepDataContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscPrepDataContainerCnv_p1_test.cxx index b304668260b5..ae32081e7a21 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscPrepDataContainerCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscPrepDataContainerCnv_p1_test.cxx @@ -129,7 +129,7 @@ makeclusts (const MuonGM::MuonDetectorManager& muo_dd) Muon::CscTimeEarly); coll->push_back (std::move (cl)); } - cont->addCollection (coll.release(), hash, true); + cont->addCollection (coll.release(), hash); } // gcc4.9 doesn't allow returning cont directly here; fixed in 5.2. diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscPrepDataContainerCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscPrepDataContainerCnv_p2_test.cxx index 0b22ac82b65a..7d97c56f1695 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscPrepDataContainerCnv_p2_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscPrepDataContainerCnv_p2_test.cxx @@ -126,7 +126,7 @@ makeclusts (const MuonGM::MuonDetectorManager& muo_dd) Muon::CscTimeEarly); coll->push_back (std::move (cl)); } - cont->addCollection (coll.release(), hash, true); + cont->addCollection (coll.release(), hash); } // gcc4.9 doesn't allow returning cont directly here; fixed in 5.2. diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscStripPrepDataContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscStripPrepDataContainerCnv_p1_test.cxx index 05c89060d90c..78087000471c 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscStripPrepDataContainerCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscStripPrepDataContainerCnv_p1_test.cxx @@ -125,7 +125,7 @@ makeclusts (const MuonGM::MuonDetectorManager& muo_dd) 3 + offs); coll->push_back (std::move (cl)); } - cont->addCollection (coll.release(), hash, true); + cont->addCollection (coll.release(), hash); } // gcc4.9 doesn't allow returning cont directly here; fixed in 5.2. diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MMPrepDataContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MMPrepDataContainerCnv_p1_test.cxx index 005a431e8e55..065b58dc1a97 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MMPrepDataContainerCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MMPrepDataContainerCnv_p1_test.cxx @@ -117,7 +117,7 @@ makeclusts (const MuonGM::MuonDetectorManager& muo_dd) muo_dd.getMMReadoutElement (clusId)); coll->push_back (std::move (cl)); } - cont->addCollection (coll.release(), hash, true); + cont->addCollection (coll.release(), hash); } // gcc4.9 doesn't allow returning cont directly here; fixed in 5.2. diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MM_DigitContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MM_DigitContainerCnv_p1_test.cxx index 9bacb40d6885..1579be087b03 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MM_DigitContainerCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MM_DigitContainerCnv_p1_test.cxx @@ -106,7 +106,7 @@ void test1 (const MuonGM::MuonDetectorManager& muo_dd) ); coll->push_back (std::move (dig)); } - trans1.addCollection (coll.release(), hash, true); + trans1.addCollection (coll.release(), hash); } testit (trans1); diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MM_DigitContainerCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MM_DigitContainerCnv_p2_test.cxx index 74858884ee10..7514474785d8 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MM_DigitContainerCnv_p2_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MM_DigitContainerCnv_p2_test.cxx @@ -104,7 +104,7 @@ void test1 (const MuonGM::MuonDetectorManager& muo_dd) ); coll->push_back (std::move (dig)); } - trans1.addCollection (coll.release(), hash, true); + trans1.addCollection (coll.release(), hash); } testit (trans1); diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MdtPrepDataContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MdtPrepDataContainerCnv_p1_test.cxx index 82e46c1d306d..c49e2938bd20 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MdtPrepDataContainerCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MdtPrepDataContainerCnv_p1_test.cxx @@ -125,7 +125,7 @@ makeclusts (const MuonGM::MuonDetectorManager& muo_dd) Muon::MdtStatusDriftTime); coll->push_back (std::move (cl)); } - cont->addCollection (coll.release(), hash, true); + cont->addCollection (coll.release(), hash); } // gcc4.9 doesn't allow returning cont directly here; fixed in 5.2. diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MdtPrepDataContainerCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MdtPrepDataContainerCnv_p2_test.cxx index 1eed7ba3fe0e..5dbdb88fa2e9 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MdtPrepDataContainerCnv_p2_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MdtPrepDataContainerCnv_p2_test.cxx @@ -122,7 +122,7 @@ makeclusts (const MuonGM::MuonDetectorManager& muo_dd) Muon::MdtStatusDriftTime); coll->push_back (std::move (cl)); } - cont->addCollection (coll.release(), hash, true); + cont->addCollection (coll.release(), hash); } // gcc4.9 doesn't allow returning cont directly here; fixed in 5.2. diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcCoinDataContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcCoinDataContainerCnv_p1_test.cxx index be8609343454..3d8a0ef6ccfc 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcCoinDataContainerCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcCoinDataContainerCnv_p1_test.cxx @@ -154,7 +154,7 @@ makeclusts (const MuonGM::MuonDetectorManager& muo_dd) coll->push_back (std::move (cl)); } - cont->addCollection (coll.release(), hash, true); + cont->addCollection (coll.release(), hash); } // gcc4.9 doesn't allow returning cont directly here; fixed in 5.2. diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataContainerCnv_p1_test.cxx index bfca528db23e..9c0d39fdbec0 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataContainerCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataContainerCnv_p1_test.cxx @@ -125,7 +125,7 @@ makeclusts (const MuonGM::MuonDetectorManager& muo_dd) 7+offs); coll->push_back (std::move (cl)); } - cont->addCollection (coll.release(), hash, true); + cont->addCollection (coll.release(), hash); } // gcc4.9 doesn't allow returning cont directly here; fixed in 5.2. diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataContainerCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataContainerCnv_p2_test.cxx index a148e2419148..e15e61701921 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataContainerCnv_p2_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataContainerCnv_p2_test.cxx @@ -125,7 +125,7 @@ makeclusts (const MuonGM::MuonDetectorManager& muo_dd) 7+offs); coll->push_back (std::move (cl)); } - cont->addCollection (coll.release(), hash, true); + cont->addCollection (coll.release(), hash); } // gcc4.9 doesn't allow returning cont directly here; fixed in 5.2. diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataContainerCnv_p3_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataContainerCnv_p3_test.cxx index 91972db96310..f8e83b5a6427 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataContainerCnv_p3_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataContainerCnv_p3_test.cxx @@ -122,7 +122,7 @@ makeclusts (const MuonGM::MuonDetectorManager& muo_dd) 7+offs); coll->push_back (std::move (cl)); } - cont->addCollection (coll.release(), hash, true); + cont->addCollection (coll.release(), hash); } // gcc4.9 doesn't allow returning cont directly here; fixed in 5.2. diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/STGC_DigitContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/STGC_DigitContainerCnv_p1_test.cxx index 7eeb9ceb08ec..ca09bdbfeea7 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/STGC_DigitContainerCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/STGC_DigitContainerCnv_p1_test.cxx @@ -85,7 +85,7 @@ void test1 (const MuonGM::MuonDetectorManager& muo_dd) 123+offs, 4.5+offs, 6.5+offs, false, false); coll->push_back (std::move (dig)); } - trans1.addCollection (coll.release(), hash, true); + trans1.addCollection (coll.release(), hash); } testit (trans1); diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/STGC_RawDataContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/STGC_RawDataContainerCnv_p1_test.cxx index c370a80c8b38..b976f4069415 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/STGC_RawDataContainerCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/STGC_RawDataContainerCnv_p1_test.cxx @@ -86,7 +86,7 @@ void test1 (const MuonGM::MuonDetectorManager& muo_dd) ( Identifier(0x712a0054) ); coll->push_back (std::move (dig)); } - trans1.addCollection (coll.release(), hash, true); + trans1.addCollection (coll.release(), hash); } testit (trans1, muo_dd); diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataContainerCnv_p1_test.cxx index 12bc3e07bc01..812ce339348f 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataContainerCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataContainerCnv_p1_test.cxx @@ -150,7 +150,7 @@ makeclusts (const MuonGM::MuonDetectorManager& muo_dd) coll->push_back (std::move (cl)); } - cont->addCollection (coll.release(), hash, true); + cont->addCollection (coll.release(), hash); } // gcc4.9 doesn't allow returning cont directly here; fixed in 5.2. diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataContainerCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataContainerCnv_p2_test.cxx index 43f828efae30..00eff1153982 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataContainerCnv_p2_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataContainerCnv_p2_test.cxx @@ -150,7 +150,7 @@ makeclusts (const MuonGM::MuonDetectorManager& muo_dd) coll->push_back (std::move (cl)); } - cont->addCollection (coll.release(), hash, true); + cont->addCollection (coll.release(), hash); } // gcc4.9 doesn't allow returning cont directly here; fixed in 5.2. diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataContainerCnv_p3_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataContainerCnv_p3_test.cxx index 5ab89f9760d5..037210758796 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataContainerCnv_p3_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataContainerCnv_p3_test.cxx @@ -150,7 +150,7 @@ makeclusts (const MuonGM::MuonDetectorManager& muo_dd) coll->push_back (std::move (cl)); } - cont->addCollection (coll.release(), hash, true); + cont->addCollection (coll.release(), hash); } // gcc4.9 doesn't allow returning cont directly here; fixed in 5.2. diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataContainerCnv_p1_test.cxx index 43428de3df58..3789d4019e66 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataContainerCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataContainerCnv_p1_test.cxx @@ -121,7 +121,7 @@ makeclusts (const MuonGM::MuonDetectorManager& muo_dd) 123+offs); coll->push_back (std::move (cl)); } - cont->addCollection (coll.release(), hash, true); + cont->addCollection (coll.release(), hash); } // gcc4.9 doesn't allow returning cont directly here; fixed in 5.2. diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataContainerCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataContainerCnv_p2_test.cxx index a87414f8661b..126e429136d5 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataContainerCnv_p2_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataContainerCnv_p2_test.cxx @@ -118,7 +118,7 @@ makeclusts (const MuonGM::MuonDetectorManager& muo_dd) 123+offs); coll->push_back (std::move (cl)); } - cont->addCollection (coll.release(), hash, true); + cont->addCollection (coll.release(), hash); } // gcc4.9 doesn't allow returning cont directly here; fixed in 5.2. diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataContainerCnv_p3_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataContainerCnv_p3_test.cxx index 6b4553b121e9..3eb7d69425f0 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataContainerCnv_p3_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataContainerCnv_p3_test.cxx @@ -118,7 +118,7 @@ makeclusts (const MuonGM::MuonDetectorManager& muo_dd) 123+offs); coll->push_back (std::move (cl)); } - cont->addCollection (coll.release(), hash, true); + cont->addCollection (coll.release(), hash); } // gcc4.9 doesn't allow returning cont directly here; fixed in 5.2. diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/sTgcPrepDataContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/sTgcPrepDataContainerCnv_p1_test.cxx index db9fa794bd14..e343e84ef43b 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/sTgcPrepDataContainerCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/sTgcPrepDataContainerCnv_p1_test.cxx @@ -118,7 +118,7 @@ makeclusts (const MuonGM::MuonDetectorManager& muo_dd) 123+offs); coll->push_back (std::move (cl)); } - cont->addCollection (coll.release(), hash, true); + cont->addCollection (coll.release(), hash); } // gcc4.9 doesn't allow returning cont directly here; fixed in 5.2. diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/test/PlanarClusterContainerCnv_p1_test.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/test/PlanarClusterContainerCnv_p1_test.cxx index 8a0d24577116..e8d4a9b7652d 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/test/PlanarClusterContainerCnv_p1_test.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/test/PlanarClusterContainerCnv_p1_test.cxx @@ -148,7 +148,7 @@ void test1 (const IDHelpers& helpers) coll->push_back (std::move (clus)); } - trans1.addCollection (coll.release(), wafer_hash, true); + trans1.addCollection (coll.release(), wafer_hash); } #if 0 @@ -182,7 +182,7 @@ void test1 (const IDHelpers& helpers) coll->push_back (std::move (clus)); } - trans1.addCollection (coll.release(), wafer_hash, true); + trans1.addCollection (coll.release(), wafer_hash); } #endif diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/test/PlanarClusterContainerCnv_p2_test.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/test/PlanarClusterContainerCnv_p2_test.cxx index 9780503d774a..e2af36fdeb62 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/test/PlanarClusterContainerCnv_p2_test.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/test/PlanarClusterContainerCnv_p2_test.cxx @@ -148,7 +148,7 @@ void test1 (const IDHelpers& helpers) coll->push_back (std::move (clus)); } - trans1.addCollection (coll.release(), wafer_hash, true); + trans1.addCollection (coll.release(), wafer_hash); } { @@ -181,7 +181,7 @@ void test1 (const IDHelpers& helpers) coll->push_back (std::move (clus)); } - trans1.addCollection (coll.release(), wafer_hash, true); + trans1.addCollection (coll.release(), wafer_hash); } // Run once outside leak checking to get services initialized. -- GitLab From 10960e4403f0891b39c26f9cee1ae477b05e058b Mon Sep 17 00:00:00 2001 From: Kristian Bjoerke <kristian.bjoerke@cern.ch> Date: Fri, 20 Jul 2018 15:15:57 +0000 Subject: [PATCH 559/562] Updating naming in the SCT RawDataProviderTool according to ATLAS Coding Guidelines Former-commit-id: c08f6094cb62e7f2a0de5f485fb922a1ea36303b --- .../ISCTRawDataProviderTool.h | 2 +- .../src/SCTRawDataProvider.cxx | 2 +- .../src/SCTRawDataProviderTool.cxx | 12 ++++++------ .../src/SCTRawDataProviderTool.h | 2 +- .../src/TrigSCTRawDataProvider.cxx | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/SCT_RawDataByteStreamCnv/ISCTRawDataProviderTool.h b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/SCT_RawDataByteStreamCnv/ISCTRawDataProviderTool.h index 6b8d4b36f8f6..5391de25f4c7 100644 --- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/SCT_RawDataByteStreamCnv/ISCTRawDataProviderTool.h +++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/SCT_RawDataByteStreamCnv/ISCTRawDataProviderTool.h @@ -32,7 +32,7 @@ class ISCTRawDataProviderTool : virtual public IAlgTool SCT_ByteStreamFractionContainer* bsFracCont) = 0; //Replace the incident calls with private calls, more MT friendly - virtual void BeginNewEvent() = 0; + virtual void beginNewEvent() = 0; }; #endif // SCT_RAWDATABYTESTREAMCNV_ISCTRAWDATAPROVIDERTOOL_H diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.cxx b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.cxx index 175222f87b90..612fc080710c 100644 --- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.cxx +++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.cxx @@ -75,7 +75,7 @@ typedef EventContainers::IdentifiableContTemp<InDetRawDataCollection<SCT_RDORawD StatusCode SCTRawDataProvider::execute() { - m_rawDataTool->BeginNewEvent(); + m_rawDataTool->beginNewEvent(); SG::WriteHandle<SCT_RDO_Container> rdoContainer(m_rdoContainerKey); bool externalcacheRDO = !m_rdoContainerCacheKey.key().empty(); diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.cxx b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.cxx index 8f571a07a95a..de6956867ca2 100644 --- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.cxx +++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.cxx @@ -36,7 +36,7 @@ StatusCode SCTRawDataProviderTool::initialize() /// ------------------------------------------------------- /// convert method -void SCTRawDataProviderTool::BeginNewEvent() { +void SCTRawDataProviderTool::beginNewEvent() { /** reset list of known robIds */ m_robIdSet.clear(); } @@ -48,7 +48,7 @@ StatusCode SCTRawDataProviderTool::convert(std::vector<const ROBFragment*>& vecR { if(vecRobs.empty()) return StatusCode::SUCCESS; ATH_MSG_DEBUG("SCTRawDataProviderTool::convert()"); - static int DecodeErrCount{0}; + static int decodeErrCount{0}; /** are we working on a new event ? */ std::vector<const ROBFragment*>::const_iterator rob_it{vecRobs.begin()}; @@ -68,12 +68,12 @@ StatusCode SCTRawDataProviderTool::convert(std::vector<const ROBFragment*>& vecR } else { sc = m_decoder->fillCollection(**rob_it, rdoIdc, errs, bsFracCont); if (sc==StatusCode::FAILURE) { - if (DecodeErrCount < 100) { + if (decodeErrCount < 100) { ATH_MSG_ERROR("Problem with SCT ByteStream Decoding!"); - DecodeErrCount++; - } else if (100 == DecodeErrCount) { + decodeErrCount++; + } else if (100 == decodeErrCount) { ATH_MSG_ERROR("Too many Problem with SCT Decoding messages, turning message off. "); - DecodeErrCount++; + decodeErrCount++; } } } diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.h b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.h index 62532c6c04fa..ced1c8e33957 100644 --- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.h +++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.h @@ -39,7 +39,7 @@ class SCTRawDataProviderTool : public extends<AthAlgTool, ISCTRawDataProviderToo InDetBSErrContainer* errs, SCT_ByteStreamFractionContainer* bsFracCont) override; - virtual void BeginNewEvent() override; + virtual void beginNewEvent() override; private: diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/src/TrigSCTRawDataProvider.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/src/TrigSCTRawDataProvider.cxx index 272bfdb1874d..0e7a37e0ec2a 100644 --- a/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/src/TrigSCTRawDataProvider.cxx +++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigRawDataProvider/src/TrigSCTRawDataProvider.cxx @@ -126,7 +126,7 @@ namespace InDet { void TrigSCTRawDataProvider::handle(const Incident& inc) { if (inc.type() == "BeginEvent") { m_container->cleanup(); - m_rawDataTool->BeginNewEvent(); + m_rawDataTool->beginNewEvent(); } } -- GitLab From c7a3429d8566352ff9c4e45fad5e54e213943604 Mon Sep 17 00:00:00 2001 From: charles leggett <leggett@cern.ch> Date: Thu, 12 Jul 2018 01:29:32 -0700 Subject: [PATCH 560/562] Updates for Gaudi PluginSvc V2 The Gaudi PluginSvc has been refactored and modernizes. See gaudi/Gaudi!709 As well as some changes to macros that directly call on certain features of the PluginSvc itself, other code that has been impacted is as follows: - destructors of Converters must be public - template arguments of ServiceHandles and ToolHandles cannot always be forward defined and the associated header files may need to be explicitly included Former-commit-id: 83042516db016cf1ec8fde0d4dca19a2cdaa5e79 --- .../src/DummyLumirangeTool.cxx | 4 ---- .../src/DummyLumirangeTool.h | 3 --- .../AthenaPoolTest/src/EventInfoReader.h | 2 +- .../src/CaloRunClusterCorrections.h | 2 +- .../CaloSuperCellMgrDetDescrCnv.h | 6 ++++-- .../CaloTPCnv/CaloShowerContainerCnv_p1.h | 3 +-- .../CaloTPCnv/CaloShowerContainerCnv_p2.h | 2 +- Calorimeter/CaloRec/src/CaloTopoClusterMaker.h | 2 +- .../AthAnalysisBaseComps/AthAnalysisHelper.h | 4 ++-- Control/AthenaBaseComps/src/AthCnvSvc.cxx | 13 ++++++------- .../AthAsgExUnittest/test/gt_AthExUnittest.cxx | 2 +- .../AthExBeginRun/src/BeginRunAlg.h | 2 +- .../AthExUnittest/test/gt_AthExUnittest.cxx | 2 +- .../MultiInputExample/MultiInputExample/MyAlg.h | 2 +- .../MultiInputExample/MyMultiInputAlg.h | 2 +- Control/AthenaKernel/AthenaKernel/ITPCnvBase.h | 2 +- .../AthenaKernel/AthenaKernel/TPCnvFactory.h | 17 +++++++---------- Control/AthenaServices/src/AthTPCnvSvc.cxx | 11 ++++++----- .../src/DelayedConditionsCleanerSvc.cxx | 5 +++++ .../src/DelayedConditionsCleanerSvc.h | 5 +++++ .../AthenaServices/src/MixingEventSelector.h | 3 +-- Control/AthenaServices/src/TestRandomSeqAlg.h | 2 +- Control/CLIDComps/util/genCLIDDB.cxx | 4 +++- .../DataModelTestDataCommon/src/CondWriterAlg.h | 4 +--- .../src/setConverterLibrary.cxx | 4 ++-- .../DataModelTestDataRead/src/HLTResultReader.h | 2 +- .../src/HLTResultWriter.h | 3 +-- Control/IOVSvc/IOVSvc/IOVSvcTool.h | 2 -- .../CollectionBase/src/CollectionFactory.cpp | 3 ++- .../ImplicitCollection/src/ImplicitCollection.h | 2 +- .../src/RelationalCollection.h | 2 +- .../APR/RootCollection/src/RootCollection.h | 2 +- Database/APR/RootStorageSvc/src/RootOODb.h | 2 +- .../APR/StorageSvc/StorageSvc/IOODatabase.h | 2 +- Database/APR/StorageSvc/src/DbSessionObj.cpp | 2 +- .../src/EventInfoAttListTool.cxx | 3 --- .../src/EventInfoAttListTool.h | 3 --- .../AthenaRootComps/src/RootCnvSvc.cxx | 2 -- .../AthenaRoot/AthenaRootComps/src/RootCnvSvc.h | 7 ++----- .../AthenaRoot/AthenaRootComps/src/RootSvc.h | 1 - .../src/RegistrationStreamLCGTool.h | 8 ++++---- .../src/RegistrationStreamTagTool.h | 6 +++--- .../src/ByteStreamAttListMetadataSvc.h | 4 ---- .../EventBookkeeperTools/myCppFilterTest.h | 6 ------ .../src/myCppFilterTest.cxx | 6 ------ .../src/xAODCaloClusterAuxContainerCnv.h | 4 +--- .../AFP_Digitization/AFP_PileUpTool.h | 3 ++- .../ALFA_Digitization/ALFA_PileUpTool.h | 3 ++- .../src/ForwardTransportSvc.h | 3 ++- .../LUCID_DigitByteStreamCnv.h | 2 -- .../src/LUCID_DigitByteStreamCnv.cxx | 2 -- .../LUCID_Digitization/src/LUCID_PileUpTool.h | 4 +++- .../ZDC_SimuDigitization/ZDC_PileUpTool.h | 2 +- Generators/Rivet_i/Rivet_i/Rivet_i.h | 1 + .../TrigExPartialEB/MTCalibPeb.h | 2 +- .../TrigOnlineMonitor/TrigROBMonitor.h | 4 ++-- .../src/InDetBeamSpotFinder.h | 5 +---- .../InDetCalibAlgs/TRT_CalibAlgs/CMakeLists.txt | 3 ++- .../TRT_CalibAlgs/TRT_StrawStatus.h | 5 +---- .../src/SCT_SiliconConditionsTool.h | 4 ++-- .../InDetCosmicsEventPhase.h | 5 +---- .../BCM_Digitization/src/BCM_DigitizationTool.h | 2 +- .../PixelFastDigitizationTool.h | 4 +++- .../SiSmearedDigitizationTool.h | 2 +- .../TRTFastDigitizationTool.h | 2 +- .../src/PixelDigitizationTool.h | 1 + .../src/PixelDigitizationTool.h | 1 + .../SCT_Digitization/SCT_DigitizationTool.h | 1 + .../BCM_RawContByteStreamCnv.h | 4 ++-- .../src/BCM_RawContByteStreamCnv.cxx | 10 +++++----- .../src/InDetLowBetaCandidateCnv.h | 2 +- .../src/InDetLowBetaContainerCnv.h | 2 +- .../src/PixelClusterContainerCnv.cxx | 2 -- .../src/PixelClusterContainerCnv.h | 1 - .../src/SCT_ClusterContainerCnv.cxx | 2 -- .../src/SCT_ClusterContainerCnv.h | 1 - .../src/TRT_DriftCircleContainerCnv.cxx | 2 -- .../src/TRT_DriftCircleContainerCnv.h | 1 - .../InDetJiveXML/BeamSpotRetriever.h | 3 +-- .../src/PixelPrepDataToxAOD.h | 7 +++---- .../src/PixelRawContByteStreamCnv.cxx | 6 ------ .../src/PixelRawContByteStreamCnv.h | 2 -- .../src/SCTRawContByteStreamCnv.h | 3 +-- .../src/TRTRawContByteStreamCnv.cxx | 6 ------ .../src/TRTRawContByteStreamCnv.h | 4 +--- .../InDetDetDescrExample/PrintSiElements.h | 3 +-- .../ReadSiDetectorElements.h | 6 +++--- .../src/InDetGlobalErrorMonTool.h | 5 ++--- .../InDetOverlay/InDetOverlay/InDetOverlay.h | 2 +- .../InDetExtensionProcessor.h | 8 +++----- .../InDetLowBetaFinder/LowBetaAlg.h | 3 +-- .../PixelClusterization.h | 3 +-- .../SCT_Clusterization.h | 2 +- .../TRT_TrackHoleSearch/TRTStrawEfficiency.h | 4 ++-- .../TRTTrackHoleSearchTool.h | 4 ++-- .../InDetTrigExtensProcessor.h | 6 ++---- .../Pixel_TrgClusterization.h | 7 ++++--- .../SCT_TrgClusterization.h | 12 +++++------- .../InDetRecStatistics/InDetRecStatisticsAlg.h | 12 ++++++------ .../InDetRecStatistics/TrackStatHelper.h | 10 +++------- .../LArAffectedRegion/LArAffectedRegionAlg.h | 11 ++++++----- .../LArCabling/LArCabling/LArOnOffIdMapping.h | 2 +- .../LArCellRec/src/LArBadFebMaskingTool.h | 2 +- .../src/LArCellBuilderFromLArRawChannelTool.h | 3 +-- .../LArCellRec/src/LArCellMaskingTool.h | 2 +- LArCalorimeter/LArCellRec/src/LArCellMerger.h | 3 ++- .../LArG4/LArG4Barrel/src/LArBarrelCalculator.h | 3 ++- LArCalorimeter/LArL1Sim/LArL1Sim/LArSCL1Maker.h | 2 +- .../AmdcOracle/AmdcOracle/AmdcDumpOracle.h | 2 +- .../MuonCalibDbOperations/CalibrationDbIOTool.h | 2 +- .../ExtraTreeTrackFillerTool.h | 2 +- .../MuonCalibExtraTreeAlg.h | 3 ++- .../SegmentOnTrackSelector.h | 7 ++----- .../MuonCalibPatRec/MuonSegmentToCalibSegment.h | 8 +++----- .../MuonByteStream/CscRdoContByteStreamCnv.h | 3 --- .../MuonByteStream/MdtCsmContByteStreamCnv.h | 10 ++-------- .../MuonByteStream/RpcPadContByteStreamCnv.h | 10 ++++------ .../MuonByteStream/TgcRdoContByteStreamCnv.h | 3 --- .../src/CscRdoContByteStreamCnv.cxx | 5 ----- .../src/MdtCsmContByteStreamCnv.cxx | 3 --- .../src/RpcPadContByteStreamCnv.cxx | 3 --- .../src/TgcRdoContByteStreamCnv.cxx | 5 ----- .../MuonByteStreamCnvTest/MdtDigitToMdtRDO.h | 2 +- .../MuonByteStreamCnvTest/TgcDigitToTgcRDO.h | 2 +- .../MuonJiveXML/TrigRpcDataRetriever.h | 7 +------ .../src/RPC_PrepDataToxAOD.h | 9 ++------- .../MuonRPC_CnvTools/src/RpcRdoToPrepDataTool.h | 2 +- .../MuonAGDD/MuonAGDD/MuonAGDDTool.h | 2 +- .../RPC_Digitization/RpcDigitizationTool.h | 3 +-- .../CscOverlay/CscOverlay/CscOverlay.h | 2 +- .../MdtOverlay/MdtOverlay/MdtOverlay.h | 2 +- .../RpcOverlay/RpcOverlay/RpcOverlay.h | 3 ++- .../TgcOverlay/TgcOverlay/TgcOverlay.h | 2 +- .../MuonTruthTools/src/MuonTruthTrackBuilder.h | 16 ++++++++-------- .../TGC_LinearSegmentMakerTool.h | 5 +---- .../MuonTruthAlgs/src/MuonTruthDecorationAlg.h | 2 +- .../UserAnalysisOverlapCheckingTool.h | 5 ----- .../UserAnalysisOverlapRemovalTool.h | 5 ----- .../UserAnalysisPreparationTool.h | 5 ----- .../src/UserAnalysisOverlapCheckingTool.cxx | 3 --- .../src/UserAnalysisOverlapRemovalTool.cxx | 4 ---- .../src/UserAnalysisPreparationTool.cxx | 4 ---- .../AnalysisTriggerAlgs/src/RoIBResultToAOD.h | 12 ++++-------- .../AnalysisTriggerAlgs/src/RoIBResultToxAOD.h | 9 ++++----- .../AthenaROOTAccess/src/tpcnvLoad.cxx | 14 +++++++------- .../BPhysTagTools/BPhysTagTools/BPhysTagTool.h | 4 ---- .../BPhys/BPhysTagTools/src/BPhysTagTool.cxx | 1 - .../src/LucidPMTHitFillerTool.h | 3 +-- .../src/RawTagInDetSPFillerTool.h | 2 +- .../src/CaloCellDetailsFillerTool.h | 4 ++-- .../src/LArCollisionTimeFillerTool.h | 2 +- .../CaloD3PDMaker/src/LArDigitFillerTool.h | 2 +- .../CaloD3PDMaker/src/LArSCHitFillerTool.h | 2 +- .../CaloD3PDMaker/src/MBTSTimeFillerTool.h | 3 +-- .../src/CollectionGetterRegistryTool.h | 3 ++- .../D3PDMaker/D3PDMakerRoot/src/RootD3PDSvc.h | 3 ++- .../D3PDMakerTest/src/IN4MHLVAssociationTool.h | 3 ++- .../D3PDMakerTest/src/Obj5FillerTool.h | 4 +--- .../D3PDMakerUtils/D3PDMakerUtils/IndexMap.h | 2 +- .../EventCommonD3PDMaker/src/LBMetadataTool.h | 4 +--- .../src/SkimDecisionFillerTool.h | 4 +--- .../src/JetTagMSVVtxInfoFillerTool.h | 4 +--- .../src/JetTagPixelModCondFillerTool.h | 2 +- .../MuonD3PDMaker/src/MuonSpShowerFillerTool.h | 5 +---- .../fillers/MuonSpShowerFillerTool.h | 5 +---- .../src/PerigeeBLPredictionFillerTool.h | 6 +----- .../src/SCTTrackParticleToMuonAssociationTool.h | 6 +----- .../src/TrackIsolationFillerTool.h | 4 ++-- .../src/TrackStateOnSurfaceFillerTool.h | 6 +++--- .../TrackD3PDMaker/src/VertexPurityFillerTool.h | 2 +- .../TriggerD3PDMaker/src/TriggerBitFillerTool.h | 5 ++--- .../src/GenParticlePerigeeFillerTool.h | 5 +---- .../src/TruthParticleFillerTool.h | 3 +-- .../egammaD3PDAnalysis/src/egammaMaxECellAlg.h | 4 ++-- .../egammaD3PDAnalysis/src/egammaTruthAlg.h | 5 ++--- .../src/ElectronJetDRAssociator.h | 3 ++- .../ElectronL2TriggerObjectAssociationTool.h | 4 ++-- PhysicsAnalysis/DPDUtils/DPDUtils/DPDTagTool.h | 4 ---- PhysicsAnalysis/DPDUtils/src/DPDTagTool.cxx | 3 --- .../BkgElectronClassification.h | 1 + .../TrackStateOnSurfaceDecorator.h | 15 +++++++-------- .../TrackToVertexWrapper.h | 6 +----- .../TauOverlappingElectronLLHDecoratorWrapper.h | 7 +------ .../DerivationFrameworkTau/TauPVRefitTool.h | 3 +-- .../TauPVTrkSelectionTool.h | 3 +-- .../TauTruthMatchingWrapper.h | 3 +-- .../ElectronPhotonTagTools/EgammaTagTool.h | 5 ----- .../ElectronPhotonTagTools/ElectronTagTool.h | 5 ----- .../ElectronPhotonTagTools/PhotonTagTool.h | 5 ----- .../src/EgammaTagTool.cxx | 3 --- .../src/ElectronTagTool.cxx | 3 --- .../src/PhotonTagTool.cxx | 3 --- .../EventTagUtils/EventInfoTagTool.h | 5 +---- .../EventTagUtils/GlobalEventTagTool.h | 5 ----- .../EventTagUtils/GlobalTriggerTagTool.h | 5 ----- .../EventTagUtils/RawInfoSummaryForTagTool.h | 5 ----- .../EventTagUtils/RegistrationStreamTrig.h | 3 --- .../EventTagUtils/src/EventInfoTagTool.cxx | 3 --- .../EventTagUtils/src/GlobalEventTagTool.cxx | 3 --- .../EventTagUtils/src/GlobalTriggerTagTool.cxx | 3 --- .../src/RawInfoSummaryForTagTool.cxx | 6 ------ .../src/RegistrationStreamTrig.cxx | 4 ---- .../ExoticPhysTagTools/ExoticPhysTagTool.h | 5 ----- .../src/ExoticPhysTagTool.cxx | 3 --- .../HeavyIonPhysTagTools/HeavyIonPhysTagTool.h | 5 ----- .../src/HeavyIonPhysTagTool.cxx | 2 -- .../HiggsPhysTagTools/HiggsPhysTagTool.h | 5 ----- .../HiggsPhysTagTools/src/HiggsPhysTagTool.cxx | 4 ---- .../JetMissingEtIdentificationTagTool.h | 5 ----- .../src/JetMissingEtIdentificationTagTool.cxx | 3 --- .../JetTaggingTagTools/JetTaggingTagTool.h | 5 ----- .../src/JetTaggingTagTool.cxx | 3 --- .../MuonTagTools/MuonTagTools/MuonTagTool.h | 7 +------ .../MuonID/MuonTagTools/src/MuonTagTool.cxx | 5 ----- .../SUSYPhysTagTools/SUSYPhysTagTool.h | 5 ----- .../SUSYPhysTagTools/src/SUSYPhysTagTool.cxx | 6 ------ .../StandardModelPhysTagTool.h | 5 ----- .../src/StandardModelTagTool.cxx | 6 ------ .../TauTagTools/TauIdentificationTagTool.h | 5 ----- .../TauTagTools/TauTagTools/TauJetTagTool.h | 10 +--------- .../src/TauIdentificationTagTool.cxx | 4 ---- .../TauID/TauTagTools/src/TauJetTagTool.cxx | 5 ----- Projects/AnalysisBase/externals.txt | 2 +- Projects/AnalysisTop/externals.txt | 2 +- Projects/AthDataQuality/externals.txt | 2 +- Projects/AthSimulation/externals.txt | 4 ++-- Projects/Athena/externals.txt | 4 ++-- .../METReconstruction/METAssociationTool.h | 1 - .../METReconstruction/METRecoTool.h | 1 - .../Root/METAssociationTool.cxx | 5 ----- .../MET/METReconstruction/Root/METRecoTool.cxx | 4 ---- .../MissingETPerformance/BasicPlotsTool.h | 5 ----- .../ContainerComparatorTool.h | 5 ----- .../MissingETPerformance/EtaRingsTool.h | 5 ----- .../MissingETPerformance/FakeMissingETTool.h | 5 ----- .../MissingETPerformance/LinearityTool.h | 5 ----- .../MissingETCompositionTool.h | 5 ----- .../MissingETPerformance/MissingETScaleTool.h | 5 ----- .../MissingETPerformance/MuonTool.h | 5 ----- .../MissingETPerformance/PileUpTool.h | 5 ----- .../MissingETPerformance/ResolutionTool.h | 5 ----- .../MissingETPerformance/TrigMissingETTool.h | 4 ---- .../TrigVsOfflineMissingETTool.h | 5 ----- .../MissingETPerformance/ZMuMuTool.h | 5 ----- .../MissingETPerformance/ZeeTool.h | 5 ----- .../MissingETPerformance/src/BasicPlotsTool.cxx | 3 --- .../src/ContainerComparatorTool.cxx | 3 --- .../MissingETPerformance/src/EtaRingsTool.cxx | 3 --- .../src/FakeMissingETTool.cxx | 3 --- .../MissingETPerformance/src/LinearityTool.cxx | 5 ----- .../src/MissingETCompositionTool.cxx | 2 -- .../src/MissingETScaleTool.cxx | 2 -- .../MissingETPerformance/src/MuonTool.cxx | 3 --- .../MissingETPerformance/src/PileUpTool.cxx | 5 ----- .../MissingETPerformance/src/ResolutionTool.cxx | 5 ----- .../src/TrigMissingETTool.cxx | 3 --- .../src/TrigVsOfflineMissingETTool.cxx | 7 ------- .../MissingETPerformance/src/ZMuMuTool.cxx | 3 --- .../MissingETPerformance/src/ZeeTool.cxx | 3 --- .../CombinedMuonRefit/src/ExtrapolateMuonToIP.h | 2 +- .../RecAthenaPool/src/MissingETCompositionCnv.h | 2 +- .../RecEventAthenaPool/src/RecoTimingObjCnv.h | 7 ++++--- .../CaloRingerAlgs/src/xAODRingSetConfWriter.h | 3 +-- .../src/TrackParticleCaloExtensionAlg.h | 4 +--- .../src/TrackParticleContainerCnv.cxx | 6 ------ .../src/TrackParticleContainerCnv.h | 1 - ...TrackParticleTruthCollectionContainerCnv.cxx | 1 + .../TrackParticleTruthCollectionContainerCnv.h | 3 ++- .../G4ProfilingTools/src/TestActionTimerTool.h | 2 +- .../MCTruthSimAlgs/src/MergeMcEventCollection.h | 2 +- .../ISF/ISF_Core/ISF_Tools/src/ParticleHelper.h | 9 +++++---- .../ISF_FastCaloSimSD/src/FCS_StepInfoSD.h | 4 ++-- .../src/PlanarClusterContainerCnv.cxx | 2 -- .../src/PlanarClusterContainerCnv.h | 1 - .../TileGeoG4Calib/src/TileGeoG4CalibSDTool.h | 2 +- .../TileSimAlgs/TileHitVecToCntTool.h | 6 +++--- .../TileRawChannelContByteStreamCnv.h | 2 ++ .../TrkTruthAlgs/TrackTruthSimilaritySelector.h | 3 +-- .../TrkTruthAlgs/src/TrackParticleTruthAlg.h | 4 +--- .../src/ElementTableCnv.cxx | 6 ------ .../TrkDetDescrAthenaPool/src/ElementTableCnv.h | 2 -- .../src/LayerMaterialMapCnv.cxx | 5 ----- .../src/LayerMaterialMapCnv.h | 1 - .../src/MaterialStepCollectionCnv.cxx | 6 ------ .../src/MaterialStepCollectionCnv.h | 2 -- .../TrkDetDescrUnitTests/TrackingGeometryTest.h | 2 +- .../src/MVFVxContainerCnv.cxx | 6 ------ .../TrkEventAthenaPool/src/MVFVxContainerCnv.h | 2 -- .../src/SegmentCollectionCnv.cxx | 5 ----- .../src/SegmentCollectionCnv.h | 2 -- .../src/TrackCollectionCnv.cxx | 7 ------- .../TrkEventAthenaPool/src/TrackCollectionCnv.h | 1 - .../TrkEventAthenaPool/src/V0ContainerCnv.cxx | 6 ------ .../TrkEventAthenaPool/src/V0ContainerCnv.h | 1 - .../TrkEventAthenaPool/src/VxContainerCnv.cxx | 6 ------ .../TrkEventAthenaPool/src/VxContainerCnv.h | 1 - .../TrkJiveXML/TrkJiveXML/TrackRetriever.h | 6 ++---- .../src/DetailedTrackTruthCollectionCnv.h | 3 ++- .../DetailedTrackTruthCollectionCnv_p1.h | 3 ++- .../DetailedTrackTruthCollectionCnv_p3.h | 3 ++- .../PRD_MultiTruthCollectionCnv_p2.h | 3 ++- .../PRD_MultiTruthCollectionCnv_p3.h | 3 ++- .../TrkTruthTPCnv/TrackTruthCollectionCnv_p0.h | 3 ++- .../TrkRefitAlg/TrkRefitAlg/ReFitTrack.h | 13 ++++++------- .../TrkG4UserActions/MaterialStepRecorder.h | 4 +--- .../TrkTruthToTrack/TruthToTrack.h | 2 +- .../src/PRD_TruthTrajectoryBuilder.h | 4 ++-- .../TrkTruthTrackTools/src/TruthTrackBuilder.h | 8 ++++---- .../TrigDetCalib/src/TrigROBSelector.h | 2 +- .../TrigL2MissingET/T2CaloMissingET.h | 3 ++- .../src/MuonRoiWithExtendedBunches.h | 3 +-- .../TrigSerializeConverter.h | 2 -- .../src/CombinedMuonFeatureCnv.h | 3 +-- .../src/FTK_RawTrackContainerCnv.h | 2 +- .../TrigEventAthenaPool/src/IsoMuonFeatureCnv.h | 3 +-- .../TrigEventAthenaPool/src/MuonFeatureCnv.h | 3 +-- .../src/MuonFeatureDetailsCnv.h | 3 +-- .../TrigEventAthenaPool/src/RingerRingsCnv.h | 2 +- .../TrigEventAthenaPool/src/TileMuFeatureCnv.h | 3 +-- .../TrigEventAthenaPool/src/TrigCompositeCnv.h | 4 +--- .../TrigEventAthenaPool/src/TrigDecisionCnv.h | 3 +-- .../src/TrigEFBjetContainerCnv.h | 2 +- .../src/TrigEFBphysContainerCnv.h | 2 +- .../TrigEventAthenaPool/src/TrigEMClusterCnv.h | 4 +--- .../TrigEventAthenaPool/src/TrigHisto1DCnv.h | 3 +-- .../TrigEventAthenaPool/src/TrigHisto2DCnv.h | 3 +-- .../src/TrigInDetTrackCollectionCnv.h | 4 +--- .../src/TrigL2BphysContainerCnv.h | 3 +-- .../TrigEventAthenaPool/src/TrigMissingETCnv.h | 2 +- .../TrigEventAthenaPool/src/TrigMonConfigCnv.h | 2 +- .../src/TrigMonConfigCollectionCnv.h | 3 +-- .../TrigEventAthenaPool/src/TrigMonEventCnv.h | 2 +- .../src/TrigMonEventCollectionCnv.h | 3 +-- .../src/TrigMuonClusterFeatureContainerCnv.h | 4 +--- .../src/TrigMuonEFInfoContainerCnv.h | 6 ++---- .../TrigEventAthenaPool/src/TrigRNNOutputCnv.h | 2 +- .../src/TrigSpacePointCountsCnv.h | 3 +-- .../TrigEventAthenaPool/src/TrigT2JetCnv.h | 2 +- .../TrigEventAthenaPool/src/TrigT2MbtsBitsCnv.h | 3 +-- .../TrigEventAthenaPool/src/TrigTauClusterCnv.h | 3 +-- .../src/TrigTauClusterDetailsCnv.h | 3 +-- .../TrigEventAthenaPool/src/TrigTauCnv.h | 2 +- .../src/TrigTrackCountsCnv.h | 3 +-- .../src/TrigTrackCountsCollectionCnv.h | 4 +--- .../src/TrigTrtHitCountsCnv.h | 3 +-- .../src/TrigVertexCollectionCnv.h | 4 +--- .../src/TrigVertexCountsCnv.h | 3 +-- .../src/TrigVertexCountsCollectionCnv.h | 4 +--- .../src/HLTResultCnv.h | 6 ++---- .../src/Lvl1ResultCnv.h | 6 ++---- .../src/TrigOperationalInfoCnv.h | 2 +- .../src/TrigOperationalInfoCollectionCnv.h | 4 +--- .../src/TrigPassBitsCnv.h | 3 +-- .../src/TrigPassFlagsCnv.cxx | 1 - .../src/TrigPassFlagsCnv.h | 4 +--- .../src/TrigRoiDescriptorCnv.h | 4 +--- .../src/TrigRoiDescriptorCollectionCnv.h | 4 +--- .../HLTResultByteStreamCnv.h | 4 ++-- .../TrigSteering/TrigSteering/TrigSteer.h | 1 + .../L1Topo/L1TopoMonitoring/src/L1TopoTestAlg.h | 8 ++++---- .../src/CMMCPHitsCollectionCnv.h | 2 -- .../src/CMMEtSumsCollectionCnv.h | 2 -- .../src/CMMJetHitsCollectionCnv.h | 2 -- .../TrigT1EventAthenaPool/src/CMMRoICnv.h | 2 -- .../src/CMXCPHitsCollectionCnv.h | 2 -- .../src/CMXCPTobCollectionCnv.h | 2 -- .../src/CMXEtSumsCollectionCnv.h | 2 -- .../src/CMXJetHitsCollectionCnv.h | 2 -- .../src/CMXJetTobCollectionCnv.h | 2 -- .../TrigT1EventAthenaPool/src/CMXRoICnv.h | 2 -- .../src/CPMHitsCollectionCnv.h | 2 -- .../src/CPMRoICollectionCnv.h | 2 -- .../src/CPMTobRoICollectionCnv.h | 2 -- .../src/CPMTowerCollectionCnv.h | 2 -- .../src/JEMEtSumsCollectionCnv.h | 2 -- .../src/JEMHitsCollectionCnv.h | 2 -- .../src/JEMRoICollectionCnv.h | 2 -- .../src/JEMTobRoICollectionCnv.h | 2 -- .../src/JetElementCollectionCnv.h | 4 +--- .../src/RODHeaderCollectionCnv.h | 2 -- .../src/TriggerTowerCollectionCnv.h | 2 -- Trigger/TrigT1/TrigT1TRT/TrigT1TRT/TrigT1TRT.h | 7 ++----- .../SCT_ClusterCacheTool.h | 2 +- .../src/TrigInDetTrackTruthMapCnv.h | 4 +--- graphics/JiveXML/JiveXML/AlgoJiveXML.h | 3 ++- 385 files changed, 412 insertions(+), 1063 deletions(-) diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/DummyLumirangeTool.cxx b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/DummyLumirangeTool.cxx index fd9b54080bea..91cd3ff46e66 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/DummyLumirangeTool.cxx +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/DummyLumirangeTool.cxx @@ -63,10 +63,6 @@ DummyLumirangeTool::DummyLumirangeTool(const std::string& name, declareProperty("LumiTot", m_lumitot, "total number of lumiblocks to write"); } -// Standard Destructor -DummyLumirangeTool::~DummyLumirangeTool() { -} - // initialize data writer StatusCode DummyLumirangeTool::initialize() diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/DummyLumirangeTool.h b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/DummyLumirangeTool.h index edcc0a84bd28..d76695b0b218 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/DummyLumirangeTool.h +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/DummyLumirangeTool.h @@ -58,9 +58,6 @@ public: protected: - /// Standard Destructor - virtual ~DummyLumirangeTool(); - /// name of store: StringProperty m_storeName; IntegerProperty m_lumigran, m_firstrun; diff --git a/AtlasTest/DatabaseTest/AthenaPoolTest/src/EventInfoReader.h b/AtlasTest/DatabaseTest/AthenaPoolTest/src/EventInfoReader.h index ae2f7211ba88..9961ed952615 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolTest/src/EventInfoReader.h +++ b/AtlasTest/DatabaseTest/AthenaPoolTest/src/EventInfoReader.h @@ -28,9 +28,9 @@ #include "GaudiKernel/ServiceHandle.h" #include "AthenaBaseComps/AthAlgorithm.h" +#include "GeoModelInterfaces/IGeoModelSvc.h" class StoreGateSvc; -class IGeoModelSvc; class EventInfoReader : public AthAlgorithm { public: diff --git a/Calorimeter/CaloClusterCorrection/src/CaloRunClusterCorrections.h b/Calorimeter/CaloClusterCorrection/src/CaloRunClusterCorrections.h index acad852df91a..8412df6118cc 100644 --- a/Calorimeter/CaloClusterCorrection/src/CaloRunClusterCorrections.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloRunClusterCorrections.h @@ -29,10 +29,10 @@ //#include "AthenaPoolUtilities/CondAttrListCollection.h" #include "GaudiKernel/ToolHandle.h" #include "CaloRec/Blob2ToolConstants.h" +#include "GaudiKernel/IJobOptionsSvc.h" class StoreGateSvc; class MsgStream; -class IJobOptionsSvc; class IToolSvc; diff --git a/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/CaloDetMgrDetDescrCnv/CaloSuperCellMgrDetDescrCnv.h b/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/CaloDetMgrDetDescrCnv/CaloSuperCellMgrDetDescrCnv.h index 858cc4fae998..1a46a9e465bb 100755 --- a/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/CaloDetMgrDetDescrCnv/CaloSuperCellMgrDetDescrCnv.h +++ b/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/CaloDetMgrDetDescrCnv/CaloSuperCellMgrDetDescrCnv.h @@ -20,11 +20,13 @@ #include "DetDescrCnvSvc/DetDescrConverter.h" #include "GaudiKernel/ToolHandle.h" +#include "CaloDetDescr/ICaloSuperCellAlignTool.h" +#include "CaloDetDescr/ICaloSuperCellIDTool.h" + + class CaloSuperCellDetDescrManager; class CaloDetDescrManager; class CaloDetDescrElement; -class ICaloSuperCellIDTool; -class ICaloSuperCellAlignTool; /** diff --git a/Calorimeter/CaloCnv/CaloTPCnv/CaloTPCnv/CaloShowerContainerCnv_p1.h b/Calorimeter/CaloCnv/CaloTPCnv/CaloTPCnv/CaloShowerContainerCnv_p1.h index 89ae096545a1..e19979cdd737 100755 --- a/Calorimeter/CaloCnv/CaloTPCnv/CaloTPCnv/CaloShowerContainerCnv_p1.h +++ b/Calorimeter/CaloCnv/CaloTPCnv/CaloTPCnv/CaloShowerContainerCnv_p1.h @@ -9,14 +9,13 @@ //#include "CaloEvent/CaloShowerContainer.h" -//#include "CaloTPCnv/CaloShowerContainer_p1.h" +#include "CaloTPCnv/CaloShowerContainer_p1.h" #include "CaloTPCnv/CaloClusterMomentStoreCnv_p1.h" #include "CaloTPCnv/CaloSamplingDataCnv_p1.h" #include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" class CaloShowerContainer; -class CaloShowerContainer_p1; diff --git a/Calorimeter/CaloCnv/CaloTPCnv/CaloTPCnv/CaloShowerContainerCnv_p2.h b/Calorimeter/CaloCnv/CaloTPCnv/CaloTPCnv/CaloShowerContainerCnv_p2.h index b56611252fcf..35711f1a5857 100755 --- a/Calorimeter/CaloCnv/CaloTPCnv/CaloTPCnv/CaloShowerContainerCnv_p2.h +++ b/Calorimeter/CaloCnv/CaloTPCnv/CaloTPCnv/CaloShowerContainerCnv_p2.h @@ -11,11 +11,11 @@ #include "AthenaKernel/ITPCnvBase.h" #include "CaloTPCnv/CaloClusterMomentContainerCnv_p1.h" #include "CaloTPCnv/CaloSamplingDataContainerCnv_p1.h" +#include "CaloTPCnv/CaloShowerContainer_p2.h" #include "AthenaPoolCnvSvc/ITPConverter.h" #include "GaudiKernel/MsgStream.h" class CaloShowerContainer; -class CaloShowerContainer_p2; class CaloShowerContainerCnv_p2 : public ITPCnvBase diff --git a/Calorimeter/CaloRec/src/CaloTopoClusterMaker.h b/Calorimeter/CaloRec/src/CaloTopoClusterMaker.h index 607a39916d64..ac7806737edb 100644 --- a/Calorimeter/CaloRec/src/CaloTopoClusterMaker.h +++ b/Calorimeter/CaloRec/src/CaloTopoClusterMaker.h @@ -39,8 +39,8 @@ #include "AthenaKernel/IOVSvcDefs.h" #include "Identifier/IdentifierHash.h" #include "CaloRec/CaloClusterCollectionProcessor.h" +#include "CaloInterface/ICalorimeterNoiseTool.h" -class ICalorimeterNoiseTool; class Identifier; class CaloDetDescrManager; class CaloDetDescrElement; diff --git a/Control/AthAnalysisBaseComps/AthAnalysisBaseComps/AthAnalysisHelper.h b/Control/AthAnalysisBaseComps/AthAnalysisBaseComps/AthAnalysisHelper.h index ead06242a635..d05f7fc57052 100644 --- a/Control/AthAnalysisBaseComps/AthAnalysisBaseComps/AthAnalysisHelper.h +++ b/Control/AthAnalysisBaseComps/AthAnalysisBaseComps/AthAnalysisHelper.h @@ -180,7 +180,7 @@ public: //use ToolSvc as parent parent = Gaudi::svcLocator()->service( "ToolSvc" ); } - IAlgTool* algtool = AlgTool::Factory::create(type,type,name,parent); + IAlgTool *algtool = AlgTool::Factory::create(type,type,name,parent).release(); algtool->addRef(); //important to increment the reference count so that Gaudi Garbage collection wont delete alg ahead of time W* out = dynamic_cast<W*>(algtool); if(!out && algtool) { @@ -199,7 +199,7 @@ public: static IAlgorithm* createAlgorithm(const std::string& typeAndName) { std::string type = typeAndName; std::string name = typeAndName; if(type.find("/")!=std::string::npos) { type = type.substr(0,type.find("/")); name = name.substr(name.find("/")+1,name.length()); } - IAlgorithm* out = Algorithm::Factory::create(type,name,Gaudi::svcLocator()); + IAlgorithm* out = Algorithm::Factory::create(type,name,Gaudi::svcLocator()).release(); out->addRef(); //important to increment the reference count so that Gaudi Garbage collection wont delete alg ahead of time return out; } diff --git a/Control/AthenaBaseComps/src/AthCnvSvc.cxx b/Control/AthenaBaseComps/src/AthCnvSvc.cxx index 7de1cd9b3231..32d9a676db45 100644 --- a/Control/AthenaBaseComps/src/AthCnvSvc.cxx +++ b/Control/AthenaBaseComps/src/AthCnvSvc.cxx @@ -478,17 +478,16 @@ AthCnvSvc::createConverter (long typ, const CLID& clid, const ICnvFactory* /*fac*/) { - IConverter *cnv = 0; - cnv = Gaudi::PluginService::Factory<IConverter*, ISvcLocator*>::create - (ConverterID(typ,clid), serviceLocator().get() ); + std::unique_ptr<IConverter> cnv{Converter::Factory::create + (ConverterID(typ,clid), serviceLocator().get() )}; - if (0==cnv) { + if (!cnv) { typ = (typ<0xFF) ? typ : typ&0xFFFFFF00; - cnv = Gaudi::PluginService::Factory<IConverter*, ISvcLocator*>::create - (ConverterID(typ,clid), serviceLocator().get() ); + cnv = Converter::Factory::create + (ConverterID(typ,clid), serviceLocator().get() ); } - return cnv; + return cnv.release(); } diff --git a/Control/AthenaExamples/AthAsgExUnittest/test/gt_AthExUnittest.cxx b/Control/AthenaExamples/AthAsgExUnittest/test/gt_AthExUnittest.cxx index 119bf817505f..07cd88c2a673 100644 --- a/Control/AthenaExamples/AthAsgExUnittest/test/gt_AthExUnittest.cxx +++ b/Control/AthenaExamples/AthAsgExUnittest/test/gt_AthExUnittest.cxx @@ -45,7 +45,7 @@ namespace Athena_test { Gaudi::Utils::toString( 42.0 ) ) ); IAlgorithm* ialg= Algorithm::Factory::create( "MyPackageAlg", "MyPackageAlg", - Gaudi::svcLocator() ); + Gaudi::svcLocator() ).release(); myAlg= dynamic_cast<Algorithm*>( ialg ); } diff --git a/Control/AthenaExamples/AthExBeginRun/src/BeginRunAlg.h b/Control/AthenaExamples/AthExBeginRun/src/BeginRunAlg.h index c6e99a4094a8..84422acbedef 100644 --- a/Control/AthenaExamples/AthExBeginRun/src/BeginRunAlg.h +++ b/Control/AthenaExamples/AthExBeginRun/src/BeginRunAlg.h @@ -15,13 +15,13 @@ #include "AthenaBaseComps/AthAlgorithm.h" #include "StoreGate/DataHandle.h" #include "AthenaKernel/IOVSvcDefs.h" +#include "IOVDbTestConditions/IOVDbTestAmdbCorrection.h" // STL includes #include <string> class IAlgTool; class StoreGateSvc; -class IOVDbTestAmdbCorrection; /** * @class BeginRunAlg diff --git a/Control/AthenaExamples/AthExUnittest/test/gt_AthExUnittest.cxx b/Control/AthenaExamples/AthExUnittest/test/gt_AthExUnittest.cxx index 5fc4682bdb46..091a8bb6782a 100644 --- a/Control/AthenaExamples/AthExUnittest/test/gt_AthExUnittest.cxx +++ b/Control/AthenaExamples/AthExUnittest/test/gt_AthExUnittest.cxx @@ -45,7 +45,7 @@ namespace Athena_test { Gaudi::Utils::toString( 42.0 ) ) ); IAlgorithm* ialg= Algorithm::Factory::create( "AthExUnittestAlg", "AthExUnittestAlg", - Gaudi::svcLocator() ); + Gaudi::svcLocator() ).release(); myAlg= dynamic_cast<Algorithm*>( ialg ); } diff --git a/Control/AthenaExamples/MultiInputExample/MultiInputExample/MyAlg.h b/Control/AthenaExamples/MultiInputExample/MultiInputExample/MyAlg.h index 5b2918c8c227..b884d70f30ba 100644 --- a/Control/AthenaExamples/MultiInputExample/MultiInputExample/MyAlg.h +++ b/Control/AthenaExamples/MultiInputExample/MultiInputExample/MyAlg.h @@ -7,7 +7,7 @@ // Data members classes #include <list> -class PileUpMergeSvc; +#include "PileUpTools/PileUpMergeSvc.h" ///////////////////////////////////////////////////////////////////////////// diff --git a/Control/AthenaExamples/MultiInputExample/MultiInputExample/MyMultiInputAlg.h b/Control/AthenaExamples/MultiInputExample/MultiInputExample/MyMultiInputAlg.h index 5e2c413e2e44..fa0bf65f80b5 100644 --- a/Control/AthenaExamples/MultiInputExample/MultiInputExample/MyMultiInputAlg.h +++ b/Control/AthenaExamples/MultiInputExample/MultiInputExample/MyMultiInputAlg.h @@ -7,7 +7,7 @@ // Data members classes #include <list> -class PileUpMergeSvc; +#include "PileUpTools/PileUpMergeSvc.h" ///////////////////////////////////////////////////////////////////////////// diff --git a/Control/AthenaKernel/AthenaKernel/ITPCnvBase.h b/Control/AthenaKernel/AthenaKernel/ITPCnvBase.h index 1d5898ef656b..900a36ed417a 100644 --- a/Control/AthenaKernel/AthenaKernel/ITPCnvBase.h +++ b/Control/AthenaKernel/AthenaKernel/ITPCnvBase.h @@ -28,7 +28,7 @@ class ITPCnvBase /////////////////////////////////////////////////////////////////// public: #if GAUDI_VERSION > CALC_GAUDI_VERSION(25, 3) - typedef Gaudi::PluginService::Factory<ITPCnvBase*> Factory; + typedef Gaudi::PluginService::Factory<ITPCnvBase*()> Factory; #else typedef Gaudi::PluginService::Factory0<ITPCnvBase*> Factory; #endif diff --git a/Control/AthenaKernel/AthenaKernel/TPCnvFactory.h b/Control/AthenaKernel/AthenaKernel/TPCnvFactory.h index b5203c87b70e..a52b9ca5512d 100644 --- a/Control/AthenaKernel/AthenaKernel/TPCnvFactory.h +++ b/Control/AthenaKernel/AthenaKernel/TPCnvFactory.h @@ -139,22 +139,19 @@ namespace Athena { #else #define DO_ATHTPCNV_PLUGINSVC_FACTORY_WITH_ID(type, id, trans_type, pers_type, is_last_version, cnv_type, signature, serial) \ namespace { \ - class DO_ATHTPCNV_FACTORY_REGISTER_CNAME(type, serial) { \ - public: \ - typedef type::Factory s_t; \ - typedef ::Gaudi::PluginService::Details::Factory<type> f_t; \ - static s_t::FuncType creator() { return &f_t::create<s_t>; } \ - DO_ATHTPCNV_FACTORY_REGISTER_CNAME(type, serial) () { \ - using ::Gaudi::PluginService::Details::Registry; \ + struct DO_ATHTPCNV_FACTORY_REGISTER_CNAME( type, serial ) { \ + DO_ATHTPCNV_FACTORY_REGISTER_CNAME( type, serial )() \ + { \ + using ::Gaudi::PluginService::DeclareFactory; \ std::string prefix; \ if (cnv_type == Athena::TPCnvType::ARA) \ prefix = "_ARA"; \ else if (cnv_type == Athena::TPCnvType::Trigger) \ prefix = "_TRIG"; \ - Registry::instance().add<s_t, type>(id, creator()); \ + DeclareFactory<type> normal{}; \ if (is_last_version == Athena::TPCnvVers::Current) \ - Registry::instance().add<s_t, type>(prefix + "_TRANS_" + #trans_type, creator()); \ - Registry::instance().add<s_t, type>(prefix + "_PERS_" + #pers_type, creator()); \ + DeclareFactory<type> transient{prefix + "_TRANS_" + #trans_type}; \ + DeclareFactory<type> persistent{prefix + "_PERS_" + #pers_type}; \ } \ } DO_ATHTPCNV_FACTORY_REGISTER_CNAME(s_ ## type, serial); \ } diff --git a/Control/AthenaServices/src/AthTPCnvSvc.cxx b/Control/AthenaServices/src/AthTPCnvSvc.cxx index 7b466fde5a6d..8d8b177e07e6 100644 --- a/Control/AthenaServices/src/AthTPCnvSvc.cxx +++ b/Control/AthenaServices/src/AthTPCnvSvc.cxx @@ -10,6 +10,7 @@ /////////////////////////////////////////////////////////////////// #include "AthTPCnvSvc.h" +#include "GaudiKernel/Converter.h" namespace { @@ -56,7 +57,7 @@ AthTPCnvSvc::~AthTPCnvSvc() ITPCnvBase* AthTPCnvSvc::load_tpcnv(const std::string& cls) { - ITPCnvBase* cnv = ITPCnvBase::Factory::create (cls); + ITPCnvBase* cnv = ITPCnvBase::Factory::create (cls).release(); if (cnv == nullptr) { ATH_MSG_INFO("could not load class [" << cls << "] via Reflex::PluginService"); @@ -75,7 +76,7 @@ AthTPCnvSvc::t2p_cnv(const std::string& transClassName, Athena::TPCnvType::Value type /*= Athena::TPCnvType::Athena*/) { - ITPCnvBase* cnv = ITPCnvBase::Factory::create (prefix(type) + "_TRANS_" + transClassName); + ITPCnvBase* cnv = ITPCnvBase::Factory::create (prefix(type) + "_TRANS_" + transClassName).release(); if (cnv == nullptr && type != Athena::TPCnvType::Athena) return t2p_cnv (transClassName); if (cnv == nullptr) { @@ -101,7 +102,7 @@ AthTPCnvSvc::t2p_cnv(const CLID& transClid, return nullptr; } - ITPCnvBase* cnv = ITPCnvBase::Factory::create (prefix(type) + "_TRANS_" + trans_type); + ITPCnvBase* cnv = ITPCnvBase::Factory::create (prefix(type) + "_TRANS_" + trans_type).release(); if (cnv == nullptr) { // try a typeinfo-name before bailing out... if (!m_clidSvc->getTypeInfoNameOfID(transClid, trans_type).isSuccess()) { @@ -109,7 +110,7 @@ AthTPCnvSvc::t2p_cnv(const CLID& transClid, << transClid << "]"); return nullptr; } - cnv = ITPCnvBase::Factory::create (prefix(type) + "_TRANS_" + trans_type); + cnv = ITPCnvBase::Factory::create (prefix(type) + "_TRANS_" + trans_type).release(); } if (cnv == nullptr && type != Athena::TPCnvType::Athena) return t2p_cnv (transClid); @@ -130,7 +131,7 @@ ITPCnvBase* AthTPCnvSvc::p2t_cnv(const std::string& persClassName, Athena::TPCnvType::Value type /*= Athena::TPCnvType::Athena*/) { - ITPCnvBase* cnv = ITPCnvBase::Factory::create (prefix(type) + "_PERS_" + persClassName); + ITPCnvBase* cnv = ITPCnvBase::Factory::create (prefix(type) + "_PERS_" + persClassName).release(); if (cnv == nullptr && type != Athena::TPCnvType::Athena) return p2t_cnv (persClassName); if (cnv == nullptr) { diff --git a/Control/AthenaServices/src/DelayedConditionsCleanerSvc.cxx b/Control/AthenaServices/src/DelayedConditionsCleanerSvc.cxx index c709b8c86599..4673bf3df893 100644 --- a/Control/AthenaServices/src/DelayedConditionsCleanerSvc.cxx +++ b/Control/AthenaServices/src/DelayedConditionsCleanerSvc.cxx @@ -436,7 +436,12 @@ DelayedConditionsCleanerSvc::cleanContainer (CondContInfo* ci, ++ci->m_removed2plus; } } + +/** + * @brief Standard destructor. + */ +DelayedConditionsCleanerSvc::~DelayedConditionsCleanerSvc() {} /** * @brief Standard Gaudi finalize method. diff --git a/Control/AthenaServices/src/DelayedConditionsCleanerSvc.h b/Control/AthenaServices/src/DelayedConditionsCleanerSvc.h index b6b648279b51..237ddf03a5f0 100644 --- a/Control/AthenaServices/src/DelayedConditionsCleanerSvc.h +++ b/Control/AthenaServices/src/DelayedConditionsCleanerSvc.h @@ -69,6 +69,11 @@ public: */ DelayedConditionsCleanerSvc (const std::string& name, ISvcLocator* svc); + /** + * @brief Standard destructor. Needed to avoid problems with unique_ptr + */ + ~DelayedConditionsCleanerSvc(); + /** * @brief Standard Gaudi initialize method. diff --git a/Control/AthenaServices/src/MixingEventSelector.h b/Control/AthenaServices/src/MixingEventSelector.h index fe6ed1e1cac8..bf486ec6717a 100644 --- a/Control/AthenaServices/src/MixingEventSelector.h +++ b/Control/AthenaServices/src/MixingEventSelector.h @@ -20,6 +20,7 @@ #include "AthenaBaseComps/AthService.h" #include "AthenaKernel/IAddressProvider.h" #include "AthenaKernel/IAthenaSelectorTool.h" +#include "AthenaKernel/IAtRndmGenSvc.h" #include "GaudiKernel/ServiceHandle.h" #include "GaudiKernel/IEvtSelector.h" @@ -34,8 +35,6 @@ class MixingEventIterator; class StoreGateSvc; -class IAtRndmGenSvc; - namespace CLHEP { class RandFlat; } diff --git a/Control/AthenaServices/src/TestRandomSeqAlg.h b/Control/AthenaServices/src/TestRandomSeqAlg.h index a3cf98a33d89..75f3d23bd240 100644 --- a/Control/AthenaServices/src/TestRandomSeqAlg.h +++ b/Control/AthenaServices/src/TestRandomSeqAlg.h @@ -8,9 +8,9 @@ #define ATHENASERVICES_TESTRANDOMSEQALG_H 1 #include "AthenaBaseComps/AthAlgorithm.h" +#include "AthenaKernel/IAtRndmGenSvc.h" #include "GaudiKernel/Property.h" #include "GaudiKernel/ServiceHandle.h" -class IAtRndmGenSvc; namespace CLHEP { class HepRandomEngine; } /** @class TestRandomSegAlg * @brief a trivial algorithm to test the sequence of random numbers diff --git a/Control/CLIDComps/util/genCLIDDB.cxx b/Control/CLIDComps/util/genCLIDDB.cxx index 6c8e0c8fcc03..467c242d013f 100644 --- a/Control/CLIDComps/util/genCLIDDB.cxx +++ b/Control/CLIDComps/util/genCLIDDB.cxx @@ -103,6 +103,7 @@ int main(int argc, char* argv[]) { return gaudiError("clidDB_gen can not run"); } } + if ( 0 == pSvcLoc ) { return gaudiError( "NULL pointer to ISvcLocator" ); } @@ -114,8 +115,9 @@ int main(int argc, char* argv[]) { IClassIDSvc* pClassIDSvc(0); if (!(pSvcLoc->service("ClassIDSvc", pClassIDSvc, true).isSuccess())) { cerr << "can not get ClassIDSvc, no clid.db will be generated" << endl; - return 0; + return 1; } + if ( 0 == pClassIDSvc ) { return gaudiError("NULL pointer to IClassIDSvc"); } diff --git a/Control/DataModelTest/DataModelTestDataCommon/src/CondWriterAlg.h b/Control/DataModelTest/DataModelTestDataCommon/src/CondWriterAlg.h index ed53cc5cfc67..8d899ce2b429 100644 --- a/Control/DataModelTest/DataModelTestDataCommon/src/CondWriterAlg.h +++ b/Control/DataModelTest/DataModelTestDataCommon/src/CondWriterAlg.h @@ -21,9 +21,7 @@ #include "StoreGate/ReadHandleKey.h" #include "GaudiKernel/ServiceHandle.h" #include "GaudiKernel/ToolHandle.h" - - -class IAthenaOutputStreamTool; +#include "AthenaKernel/IAthenaOutputStreamTool.h" namespace DMTest { diff --git a/Control/DataModelTest/DataModelTestDataCommon/src/setConverterLibrary.cxx b/Control/DataModelTest/DataModelTestDataCommon/src/setConverterLibrary.cxx index a7d3d3a75ec5..e0a751f6f119 100644 --- a/Control/DataModelTest/DataModelTestDataCommon/src/setConverterLibrary.cxx +++ b/Control/DataModelTest/DataModelTestDataCommon/src/setConverterLibrary.cxx @@ -29,9 +29,9 @@ void setPluginLibrary (const std::string& name, const std::string& lib) const_cast<Details::Registry::FactoryMap&>(reg.factories()); Details::Registry::FactoryMap::iterator i = map.find (name); if (i == map.end()) - map.insert (std::make_pair (name, Details::Registry::FactoryInfo(lib))); + map.insert (std::make_pair (name, Details::Registry::FactoryInfo{lib})); else - i->second = Details::Registry::FactoryInfo(lib); + i->second = Details::Registry::FactoryInfo{lib}; } diff --git a/Control/DataModelTest/DataModelTestDataRead/src/HLTResultReader.h b/Control/DataModelTest/DataModelTestDataRead/src/HLTResultReader.h index 3a618a96548e..f66aac622e0a 100644 --- a/Control/DataModelTest/DataModelTestDataRead/src/HLTResultReader.h +++ b/Control/DataModelTest/DataModelTestDataRead/src/HLTResultReader.h @@ -20,11 +20,11 @@ #include "AthenaBaseComps/AthAlgorithm.h" #include "StoreGate/ReadHandleKey.h" #include "GaudiKernel/ToolHandle.h" +#include "TrigNavigation/Navigation.h" namespace HLT { class HLTResult; - class Navigation; } diff --git a/Control/DataModelTest/DataModelTestDataWrite/src/HLTResultWriter.h b/Control/DataModelTest/DataModelTestDataWrite/src/HLTResultWriter.h index b8e07419653a..6d95e714ad6b 100644 --- a/Control/DataModelTest/DataModelTestDataWrite/src/HLTResultWriter.h +++ b/Control/DataModelTest/DataModelTestDataWrite/src/HLTResultWriter.h @@ -20,11 +20,10 @@ #include "AthenaBaseComps/AthAlgorithm.h" #include "StoreGate/WriteHandleKey.h" #include "GaudiKernel/ToolHandle.h" - +#include "TrigNavigation/Navigation.h" namespace HLT { class HLTResult; - class Navigation; } diff --git a/Control/IOVSvc/IOVSvc/IOVSvcTool.h b/Control/IOVSvc/IOVSvc/IOVSvcTool.h index 39476cfaf799..452916e37099 100644 --- a/Control/IOVSvc/IOVSvc/IOVSvcTool.h +++ b/Control/IOVSvc/IOVSvc/IOVSvcTool.h @@ -167,8 +167,6 @@ public: m_ignoredProxies.insert(proxy); } -protected: - // Destructor. virtual ~IOVSvcTool(); diff --git a/Database/APR/CollectionBase/src/CollectionFactory.cpp b/Database/APR/CollectionBase/src/CollectionFactory.cpp index 0fc459a2c9d6..803958d8deaa 100755 --- a/Database/APR/CollectionBase/src/CollectionFactory.cpp +++ b/Database/APR/CollectionBase/src/CollectionFactory.cpp @@ -54,7 +54,8 @@ pool::CollectionFactory::create_callPlugin( const pool::ICollectionDescription& pool::ISession* session ) const { std::string type( description.type() ); - ICollection *coll = Gaudi::PluginService::Factory<ICollection*, const ICollectionDescription*, ICollection::OpenMode, ISession*>::create( type, &description, openMode, session ); + // ICollection *coll = Gaudi::PluginService::Factory<ICollection*, const ICollectionDescription*, ICollection::OpenMode, ISession*>::create( type, &description, openMode, session ).release(); + ICollection *coll = Gaudi::PluginService::Factory<ICollection*( const ICollectionDescription*, ICollection::OpenMode, ISession*)>::create( type, &description, openMode, session ).release(); if( !coll ) { std::string errorMsg = "APR::CollectionFactory::create(" + type + "," + description.name() + ") FAILED! Plugin for that collection technology could not be loaded."; if( type == "MemoryCollection" ) { diff --git a/Database/APR/ImplicitCollection/src/ImplicitCollection.h b/Database/APR/ImplicitCollection/src/ImplicitCollection.h index df5d0c2fe46b..32855c71215d 100755 --- a/Database/APR/ImplicitCollection/src/ImplicitCollection.h +++ b/Database/APR/ImplicitCollection/src/ImplicitCollection.h @@ -26,7 +26,7 @@ namespace pool { class ImplicitCollection : virtual public ICollection { public: - typedef Gaudi::PluginService::Factory<ICollection*, const ICollectionDescription*, ICollection::OpenMode, ISession*> Factory; + typedef Gaudi::PluginService::Factory<ICollection*( const ICollectionDescription*, ICollection::OpenMode, ISession*)> Factory; /** Constructor - old style Throws POOL exception. diff --git a/Database/APR/RelationalCollection/src/RelationalCollection.h b/Database/APR/RelationalCollection/src/RelationalCollection.h index 49910cf7a555..4ad428f74570 100755 --- a/Database/APR/RelationalCollection/src/RelationalCollection.h +++ b/Database/APR/RelationalCollection/src/RelationalCollection.h @@ -47,7 +47,7 @@ namespace pool { class RelationalCollection : virtual public ICollection, public ICollectionRelationalExtensions { public: - typedef Gaudi::PluginService::Factory<ICollection*, const ICollectionDescription*, ICollection::OpenMode, ISession*> Factory; + typedef Gaudi::PluginService::Factory<ICollection*( const ICollectionDescription*, ICollection::OpenMode, ISession*)> Factory; /** * Constructor. diff --git a/Database/APR/RootCollection/src/RootCollection.h b/Database/APR/RootCollection/src/RootCollection.h index bd69afa434b5..b927679ff8b0 100755 --- a/Database/APR/RootCollection/src/RootCollection.h +++ b/Database/APR/RootCollection/src/RootCollection.h @@ -70,7 +70,7 @@ namespace pool { class RootCollection : public ICollection { public: - typedef Gaudi::PluginService::Factory<ICollection*, const ICollectionDescription*, ICollection::OpenMode, ISession*> Factory; + typedef Gaudi::PluginService::Factory<ICollection*( const ICollectionDescription*, ICollection::OpenMode, ISession*)> Factory; /// Constructor /// @param session If you want to access the referenced objects you have to provide an ISession diff --git a/Database/APR/RootStorageSvc/src/RootOODb.h b/Database/APR/RootStorageSvc/src/RootOODb.h index 92fd8190e2d9..051a49012cf7 100755 --- a/Database/APR/RootStorageSvc/src/RootOODb.h +++ b/Database/APR/RootStorageSvc/src/RootOODb.h @@ -37,7 +37,7 @@ namespace pool { */ class RootOODb : public IOODatabase { public: - typedef Gaudi::PluginService::Factory<IOODatabase*> Factory; + typedef Gaudi::PluginService::Factory<IOODatabase*()> Factory; /// Standard Constructor RootOODb(DbType typ=ROOT_StorageType); diff --git a/Database/APR/StorageSvc/StorageSvc/IOODatabase.h b/Database/APR/StorageSvc/StorageSvc/IOODatabase.h index 7b3acb6eef82..e7d8d1e974c1 100644 --- a/Database/APR/StorageSvc/StorageSvc/IOODatabase.h +++ b/Database/APR/StorageSvc/StorageSvc/IOODatabase.h @@ -48,7 +48,7 @@ namespace pool { * @version 1.0 */ class IOODatabase : public RefCounter { - protected: + public: virtual ~IOODatabase() {} public: diff --git a/Database/APR/StorageSvc/src/DbSessionObj.cpp b/Database/APR/StorageSvc/src/DbSessionObj.cpp index 82c5c170c1ce..e6d5328bb798 100644 --- a/Database/APR/StorageSvc/src/DbSessionObj.cpp +++ b/Database/APR/StorageSvc/src/DbSessionObj.cpp @@ -56,7 +56,7 @@ DbStatus DbSessionObj::close() { IOODatabase* DbSessionObj::db(const DbType& typ) { if( m_dbTypes[typ] == 0 ) { const std::string nam = typ.storageName(); - IOODatabase* imp = Gaudi::PluginService::Factory<IOODatabase*>::create(nam); + IOODatabase* imp = Gaudi::PluginService::Factory<IOODatabase*()>::create(nam).release(); if( imp ) { m_dbTypes[typ] = imp; } else { diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoAttListTool.cxx b/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoAttListTool.cxx index aaaf114b4028..2d292f467650 100755 --- a/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoAttListTool.cxx +++ b/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoAttListTool.cxx @@ -176,6 +176,3 @@ StatusCode EventInfoAttListTool::finalize() { ATH_MSG_DEBUG("in finalize()"); return AthAlgTool::finalize(); } - -/** destructor */ -EventInfoAttListTool::~EventInfoAttListTool() {} diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoAttListTool.h b/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoAttListTool.h index 65cc1132bc4a..2957ce50059a 100755 --- a/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoAttListTool.h +++ b/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoAttListTool.h @@ -45,9 +45,6 @@ public: protected: - /** Standard destructor */ - virtual ~EventInfoAttListTool( ); - /** the various components to build their own fragments of tag */ StatusCode eventTag (AthenaAttributeList& eventTagCol, const xAOD::EventInfo& eventInfo); diff --git a/Database/AthenaRoot/AthenaRootComps/src/RootCnvSvc.cxx b/Database/AthenaRoot/AthenaRootComps/src/RootCnvSvc.cxx index af3f9b0a1144..38765f39577d 100755 --- a/Database/AthenaRoot/AthenaRootComps/src/RootCnvSvc.cxx +++ b/Database/AthenaRoot/AthenaRootComps/src/RootCnvSvc.cxx @@ -36,8 +36,6 @@ RootCnvSvc::RootCnvSvc(const std::string& name, ISvcLocator* pSvcLocator) : m_treeName("CollectionTree") { } -RootCnvSvc::~RootCnvSvc() {} - StatusCode RootCnvSvc::initialize() { ATH_MSG_INFO("Initializing " << name() << " - package version " << PACKAGE_VERSION); if (!::AthCnvSvc::initialize().isSuccess()) { diff --git a/Database/AthenaRoot/AthenaRootComps/src/RootCnvSvc.h b/Database/AthenaRoot/AthenaRootComps/src/RootCnvSvc.h index 1881958ffe3c..156221e116c2 100755 --- a/Database/AthenaRoot/AthenaRootComps/src/RootCnvSvc.h +++ b/Database/AthenaRoot/AthenaRootComps/src/RootCnvSvc.h @@ -22,10 +22,10 @@ // fwk includes #include "GaudiKernel/ServiceHandle.h" #include "AthenaBaseComps/AthCnvSvc.h" +#include "AthenaKernel/IDictLoaderSvc.h" +#include "AthenaKernel/ITPCnvSvc.h" // fwd declares -class IDictLoaderSvc; -class ITPCnvSvc; class IRootSvc; namespace Athena { @@ -74,9 +74,6 @@ public: StatusCode updateServiceState(IOpaqueAddress* pAddress); protected: - /// Destructor: - virtual ~RootCnvSvc(); - ///@{ RootType-based API /// Load the class (dictionary) from Root. RootType getType(const CLID& clid) const; diff --git a/Database/AthenaRoot/AthenaRootComps/src/RootSvc.h b/Database/AthenaRoot/AthenaRootComps/src/RootSvc.h index 014679acccd9..a807f60a274e 100755 --- a/Database/AthenaRoot/AthenaRootComps/src/RootSvc.h +++ b/Database/AthenaRoot/AthenaRootComps/src/RootSvc.h @@ -86,7 +86,6 @@ public: /// @returns NULL if no such file is known to this service Athena::RootConnection* connection(const std::string& fname); -protected: /// Destructor virtual ~RootSvc(); diff --git a/Database/RegistrationServices/src/RegistrationStreamLCGTool.h b/Database/RegistrationServices/src/RegistrationStreamLCGTool.h index b0c28e126cde..4c8440359fa2 100755 --- a/Database/RegistrationServices/src/RegistrationStreamLCGTool.h +++ b/Database/RegistrationServices/src/RegistrationStreamLCGTool.h @@ -26,6 +26,7 @@ #include "GaudiKernel/ServiceHandle.h" #include "AthenaKernel/IRegistrationStreamTool.h" +#include "PoolSvc/IPoolSvc.h" #include <map> @@ -33,7 +34,6 @@ class IAddressCreator; class StoreGateSvc; -class IPoolSvc; namespace pool { class ICollection; @@ -87,11 +87,11 @@ public: /// REQUIRED INTERFACE METHOD void setCollMetadataKeys(const std::vector<std::string>& keys); -protected: - - /// Standard Destructor + /// Standard Destructor virtual ~RegistrationStreamLCGTool(); +protected: + /// Dump values from AttributeList for DEBUG virtual const CLID& attListID(); virtual StatusCode fillAtt(std::vector< std::pair<std::string, std::string> >& refs, diff --git a/Database/RegistrationServices/src/RegistrationStreamTagTool.h b/Database/RegistrationServices/src/RegistrationStreamTagTool.h index be5d5be477db..a62bde676734 100755 --- a/Database/RegistrationServices/src/RegistrationStreamTagTool.h +++ b/Database/RegistrationServices/src/RegistrationStreamTagTool.h @@ -55,11 +55,11 @@ public: const CLID& attListID(); -protected: - - /// Standard Destructor + /// Standard Destructor virtual ~RegistrationStreamTagTool(); +protected: + /// Dump values from AttributeList for DEBUG void dumpTagList(const TagAthenaAttributeList* attributes) const; diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamAttListMetadataSvc.h b/Event/ByteStreamCnvSvc/src/ByteStreamAttListMetadataSvc.h index 572066e0242d..460e24472850 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamAttListMetadataSvc.h +++ b/Event/ByteStreamCnvSvc/src/ByteStreamAttListMetadataSvc.h @@ -64,10 +64,6 @@ public: StatusCode toBSMetadata (const std::vector<std::string>& keys); StatusCode fromBSMetadata(const std::vector<std::string>& keys); -protected: - - /// Standard Destructor - virtual ~ByteStreamAttListMetadataSvc() {} private: Gaudi::Property<std::string> m_inputStoreName; diff --git a/Event/EventBookkeeperTools/EventBookkeeperTools/myCppFilterTest.h b/Event/EventBookkeeperTools/EventBookkeeperTools/myCppFilterTest.h index cc4ac0687000..ce394c6edf19 100644 --- a/Event/EventBookkeeperTools/EventBookkeeperTools/myCppFilterTest.h +++ b/Event/EventBookkeeperTools/EventBookkeeperTools/myCppFilterTest.h @@ -34,12 +34,6 @@ public: StatusCode execute(); StatusCode finalize(); - -protected: - virtual ~myCppFilterTest(); - - - private: CutIdentifier m_filterCutID; CutIdentifier m_cut1ID; diff --git a/Event/EventBookkeeperTools/src/myCppFilterTest.cxx b/Event/EventBookkeeperTools/src/myCppFilterTest.cxx index d2865df906cd..eba7365d86be 100644 --- a/Event/EventBookkeeperTools/src/myCppFilterTest.cxx +++ b/Event/EventBookkeeperTools/src/myCppFilterTest.cxx @@ -32,12 +32,6 @@ myCppFilterTest::myCppFilterTest(const std::string& name, ISvcLocator* pSvcLocat m_counter=0; } - -myCppFilterTest::~myCppFilterTest() { - -} - - StatusCode myCppFilterTest::initialize(){ ATH_MSG_DEBUG("initialize()"); diff --git a/Event/xAOD/xAODCaloEventAthenaPool/src/xAODCaloClusterAuxContainerCnv.h b/Event/xAOD/xAODCaloEventAthenaPool/src/xAODCaloClusterAuxContainerCnv.h index 3159591f5b8c..c08085c5daff 100644 --- a/Event/xAOD/xAODCaloEventAthenaPool/src/xAODCaloClusterAuxContainerCnv.h +++ b/Event/xAOD/xAODCaloEventAthenaPool/src/xAODCaloClusterAuxContainerCnv.h @@ -14,9 +14,7 @@ // EDM include(s): #include "xAODCaloEvent/CaloClusterAuxContainer.h" - -// Forward declaration(s): -class IxAODClusterCompressor; +#include "CaloInterface/IxAODClusterCompressor.h" /// Base class for the converter typedef T_AthenaPoolCustomCnv< xAOD::CaloClusterAuxContainer, diff --git a/ForwardDetectors/AFP/AFP_Digitization/AFP_Digitization/AFP_PileUpTool.h b/ForwardDetectors/AFP/AFP_Digitization/AFP_Digitization/AFP_PileUpTool.h index 7abea2a004fe..e1054228ec2c 100644 --- a/ForwardDetectors/AFP/AFP_Digitization/AFP_Digitization/AFP_PileUpTool.h +++ b/ForwardDetectors/AFP/AFP_Digitization/AFP_Digitization/AFP_PileUpTool.h @@ -22,6 +22,7 @@ #include "AFP_SimEv/AFP_SIDSimHit.h" #include "AFP_DigiEv/AFP_TDDigiCollection.h" #include "AFP_DigiEv/AFP_SiDigiCollection.h" +#include "PileUpTools/PileUpMergeSvc.h" #include "TMath.h" #include "TH1.h" #include "TF1.h" @@ -33,7 +34,7 @@ #include <utility> /* pair */ class IAtRndmGenSvc; -class PileUpMergeSvc; +// class PileUpMergeSvc; static const InterfaceID IID_IAFP_PileUpTool ("AFP_PileUpTool",1,0); //Temporary for back-compatibility with 17.3.X.Y diff --git a/ForwardDetectors/ALFA/ALFA_Digitization/ALFA_Digitization/ALFA_PileUpTool.h b/ForwardDetectors/ALFA/ALFA_Digitization/ALFA_Digitization/ALFA_PileUpTool.h index 2516a761ca60..5acad297996e 100644 --- a/ForwardDetectors/ALFA/ALFA_Digitization/ALFA_Digitization/ALFA_PileUpTool.h +++ b/ForwardDetectors/ALFA/ALFA_Digitization/ALFA_Digitization/ALFA_PileUpTool.h @@ -21,6 +21,8 @@ #include "ALFA_RawEv/ALFA_DigitCollection.h" #include "ALFA_RawEv/ALFA_ODDigitCollection.h" +#include "PileUpTools/PileUpMergeSvc.h" + #include <string> #include <iostream> #include <fstream> @@ -29,7 +31,6 @@ #include <utility> /* pair */ class IAtRndmGenSvc; -class PileUpMergeSvc; class ALFA_PileUpTool: public PileUpToolBase { diff --git a/ForwardDetectors/ForwardTransportSvc/src/ForwardTransportSvc.h b/ForwardDetectors/ForwardTransportSvc/src/ForwardTransportSvc.h index 488f37fe53fa..37aab324afc7 100755 --- a/ForwardDetectors/ForwardTransportSvc/src/ForwardTransportSvc.h +++ b/ForwardDetectors/ForwardTransportSvc/src/ForwardTransportSvc.h @@ -8,8 +8,9 @@ #include "AthenaBaseComps/AthService.h" #include "GaudiKernel/ToolHandle.h" #include "ForwardTransportSvc/IForwardTransportSvc.h" +#include "GaudiKernel/ITHistSvc.h" -class ITHistSvc; +// class ITHistSvc; class StoreGateSvc; class TTree; diff --git a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_RawDataByteStreamCnv/LUCID_RawDataByteStreamCnv/LUCID_DigitByteStreamCnv.h b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_RawDataByteStreamCnv/LUCID_RawDataByteStreamCnv/LUCID_DigitByteStreamCnv.h index e37dd02e1ef6..d3cc49be2296 100644 --- a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_RawDataByteStreamCnv/LUCID_RawDataByteStreamCnv/LUCID_DigitByteStreamCnv.h +++ b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_RawDataByteStreamCnv/LUCID_RawDataByteStreamCnv/LUCID_DigitByteStreamCnv.h @@ -47,8 +47,6 @@ typedef std::map<uint32_t, LUCID_RodEncoder> LucidRodEncoder_map; class LUCID_DigitByteStreamCnv: public Converter { - ~LUCID_DigitByteStreamCnv(); - public: LUCID_DigitByteStreamCnv(ISvcLocator* svcloc); diff --git a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_RawDataByteStreamCnv/src/LUCID_DigitByteStreamCnv.cxx b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_RawDataByteStreamCnv/src/LUCID_DigitByteStreamCnv.cxx index cd7e92d39833..21d35a1d091c 100644 --- a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_RawDataByteStreamCnv/src/LUCID_DigitByteStreamCnv.cxx +++ b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_RawDataByteStreamCnv/src/LUCID_DigitByteStreamCnv.cxx @@ -14,8 +14,6 @@ LUCID_DigitByteStreamCnv::LUCID_DigitByteStreamCnv(ISvcLocator* svcloc) : m_StoreGate = 0; } -LUCID_DigitByteStreamCnv::~LUCID_DigitByteStreamCnv() {} - StatusCode LUCID_DigitByteStreamCnv::initialize() { StatusCode sc = Converter::initialize(); diff --git a/ForwardDetectors/LUCID/LUCID_Digitization/src/LUCID_PileUpTool.h b/ForwardDetectors/LUCID/LUCID_Digitization/src/LUCID_PileUpTool.h index 8666e6c839fe..c012d728fcf1 100644 --- a/ForwardDetectors/LUCID/LUCID_Digitization/src/LUCID_PileUpTool.h +++ b/ForwardDetectors/LUCID/LUCID_Digitization/src/LUCID_PileUpTool.h @@ -15,6 +15,8 @@ #include "xAODEventInfo/EventInfo.h" // SubEventIterator #include "xAODEventInfo/EventAuxInfo.h"// SubEventIterator +#include "PileUpTools/PileUpMergeSvc.h" + #include "GaudiKernel/Property.h" #include "GaudiKernel/ServiceHandle.h" @@ -23,7 +25,7 @@ class StoreGateSvc; class IAtRndmGenSvc; -class PileUpMergeSvc; +//class PileUpMergeSvc; class IHistSvc; class LUCID_PileUpTool: public PileUpToolBase, public LUCID_DigitizationToolBox { diff --git a/ForwardDetectors/ZDC/ZDC_SimuDigitization/ZDC_SimuDigitization/ZDC_PileUpTool.h b/ForwardDetectors/ZDC/ZDC_SimuDigitization/ZDC_SimuDigitization/ZDC_PileUpTool.h index 0addf20cbd37..325a1cfc2570 100644 --- a/ForwardDetectors/ZDC/ZDC_SimuDigitization/ZDC_SimuDigitization/ZDC_PileUpTool.h +++ b/ForwardDetectors/ZDC/ZDC_SimuDigitization/ZDC_SimuDigitization/ZDC_PileUpTool.h @@ -17,6 +17,7 @@ #include "ZDC_SimEvent/ZDC_SimStripHit.h" #include "ZDC_SimEvent/ZDC_SimPixelHit.h" #include "ZdcEvent/ZdcDigitsCollection.h" +#include "PileUpTools/PileUpMergeSvc.h" #include <string> #include <fstream> @@ -24,7 +25,6 @@ #include <utility> /* pair */ class IAtRndmGenSvc; -class PileUpMergeSvc; class ZDC_PileUpTool: public PileUpToolBase { diff --git a/Generators/Rivet_i/Rivet_i/Rivet_i.h b/Generators/Rivet_i/Rivet_i/Rivet_i.h index c3ce4f744f96..ef710f32331b 100644 --- a/Generators/Rivet_i/Rivet_i/Rivet_i.h +++ b/Generators/Rivet_i/Rivet_i/Rivet_i.h @@ -7,6 +7,7 @@ #include "AthenaBaseComps/AthAlgorithm.h" #include "GaudiKernel/ServiceHandle.h" +#include "GaudiKernel/ITHistSvc.h" #include "Rivet/AnalysisHandler.hh" diff --git a/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/TrigExPartialEB/MTCalibPeb.h b/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/TrigExPartialEB/MTCalibPeb.h index 0cf500e717b0..b7d6906ec7ae 100755 --- a/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/TrigExPartialEB/MTCalibPeb.h +++ b/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/TrigExPartialEB/MTCalibPeb.h @@ -10,11 +10,11 @@ #include "EventInfo/EventType.h" #include "eformat/eformat.h" #include "TrigROBDataProviderSvc/ITrigROBDataProviderSvc.h" +#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h" #include <stdint.h> #include <set> ///////////////////////////////////////////////////////////////////////////// -class IROBDataProviderSvc; class StreamTag; class MTCalibPeb:public AthAlgorithm { diff --git a/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/TrigOnlineMonitor/TrigROBMonitor.h b/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/TrigOnlineMonitor/TrigROBMonitor.h index 9636f4ad734f..07dd3329f512 100755 --- a/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/TrigOnlineMonitor/TrigROBMonitor.h +++ b/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/TrigOnlineMonitor/TrigROBMonitor.h @@ -6,14 +6,14 @@ #include "GaudiKernel/ServiceHandle.h" #include "GaudiKernel/SmartIF.h" #include "ByteStreamData/RawEvent.h" +#include "TrigROBDataProviderSvc/ITrigROBDataProviderSvc.h" +#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h" #include "GaudiKernel/HistoProperty.h" #include "eformat/Status.h" #include <stdint.h> ///////////////////////////////////////////////////////////////////////////// -class IROBDataProviderSvc; -class ITrigROBDataProviderSvc; class TH1F; /// for monitoring purposes class TH2F; /// for monitoring purposes class TProfile;/// for monitoring purposes diff --git a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotFinder.h b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotFinder.h index bfe1702d4f99..24d24ed0f97d 100644 --- a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotFinder.h +++ b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotFinder.h @@ -21,6 +21,7 @@ #include "xAODTracking/VertexContainer.h" //typedef, can't fwd declare #include "xAODTracking/TrackingPrimitives.h" //for xAOD::VxType // #include "xAODTracking/Vertex.h" +#include "TrigAnalysisInterfaces/IBunchCrossingTool.h" #include "StoreGate/ReadHandleKey.h" #include "BeamSpotID.h" #include <string> @@ -31,10 +32,6 @@ class ITHistSvc; class IToolSvc; class IInDetBeamSpotTool; class TTree; -namespace Trig{ - class IBunchCrossingTool; -} - namespace InDet { class InDetBeamSpotFinder : public AthAlgorithm { diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/CMakeLists.txt b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/CMakeLists.txt index bed492fbcbfd..dee71b277974 100644 --- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/CMakeLists.txt +++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/CMakeLists.txt @@ -30,7 +30,8 @@ atlas_depends_on_subdirs( PUBLIC Tracking/TrkEvent/TrkParameters Tracking/TrkEvent/TrkTrack Tracking/TrkEvent/VxVertex - Tracking/TrkFitter/TrkFitterInterfaces ) + Tracking/TrkFitter/TrkFitterInterfaces + Tracking/TrkExtrapolation/TrkExInterfaces ) # External dependencies: find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint ) diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/TRT_CalibAlgs/TRT_StrawStatus.h b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/TRT_CalibAlgs/TRT_StrawStatus.h index ec7695ec3435..e275dc23583a 100644 --- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/TRT_CalibAlgs/TRT_StrawStatus.h +++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/TRT_CalibAlgs/TRT_StrawStatus.h @@ -21,6 +21,7 @@ #include "TrkTrack/Track.h" #include "VxVertex/VxContainer.h" #include "StoreGate/ReadHandleKey.h" +#include "TrkToolInterfaces/ITrackHoleSearchTool.h" #include <cstdlib> #include <string> @@ -35,10 +36,6 @@ class ITRT_StrawStatusSummarySvc ; class ITRT_HWMappingSvc; class ITRT_DCS_ConditionsSvc; -namespace Trk { - class ITrackHoleSearchTool; -} - namespace InDet { diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_SiliconConditionsTool.h b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_SiliconConditionsTool.h index 1b6111d55e5d..db3fc6b2a35d 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_SiliconConditionsTool.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_SiliconConditionsTool.h @@ -19,9 +19,9 @@ #include "SCT_ConditionsData/SCT_DCSFloatCondData.h" #include "StoreGate/ReadCondHandleKey.h" +#include "GeoModelInterfaces/IGeoModelSvc.h" +#include "RDBAccessSvc/IRDBAccessSvc.h" -class IGeoModelSvc; -class IRDBAccessSvc; class SCT_ID; /** diff --git a/InnerDetector/InDetCosmics/InDetCosmicsEventPhase/InDetCosmicsEventPhase/InDetCosmicsEventPhase.h b/InnerDetector/InDetCosmics/InDetCosmicsEventPhase/InDetCosmicsEventPhase/InDetCosmicsEventPhase.h index 7100c6e073e0..02516c65614d 100755 --- a/InnerDetector/InDetCosmics/InDetCosmicsEventPhase/InDetCosmicsEventPhase/InDetCosmicsEventPhase.h +++ b/InnerDetector/InDetCosmics/InDetCosmicsEventPhase/InDetCosmicsEventPhase/InDetCosmicsEventPhase.h @@ -10,16 +10,13 @@ #include "StoreGate/ReadHandleKeyArray.h" #include "StoreGate/WriteHandleKey.h" #include "CommissionEvent/ComTime.h" +#include "TrkToolInterfaces/ITrackSummaryTool.h" #include <string> ///////////////////////////////////////////////////////////////////////////// //class TrackCollection; class ITRT_CalDbSvc ; -namespace Trk -{ - class ITrackSummaryTool; -} namespace InDet { class IInDetCosmicsEventPhaseTool; diff --git a/InnerDetector/InDetDigitization/BCM_Digitization/src/BCM_DigitizationTool.h b/InnerDetector/InDetDigitization/BCM_Digitization/src/BCM_DigitizationTool.h index 8a4cd0a4cf9d..009159db1cfb 100644 --- a/InnerDetector/InDetDigitization/BCM_Digitization/src/BCM_DigitizationTool.h +++ b/InnerDetector/InDetDigitization/BCM_Digitization/src/BCM_DigitizationTool.h @@ -6,6 +6,7 @@ #define BCM_DIGITIZATION_BCM_DIGITIZATIONTOOL_H #include "PileUpTools/PileUpToolBase.h" +#include "AthenaKernel/IAtRndmGenSvc.h" #include "GaudiKernel/ServiceHandle.h" @@ -21,7 +22,6 @@ // Data member classes class PileUpMergeSvc; -class IAtRndmGenSvc; class InDetSimDataCollection; namespace CLHEP diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/PixelFastDigitizationTool.h b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/PixelFastDigitizationTool.h index 0d1e95c02857..b0dcac194797 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/PixelFastDigitizationTool.h +++ b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/PixelFastDigitizationTool.h @@ -20,6 +20,9 @@ #include "InDetSimEvent/SiHitCollection.h" // cannot fwd declare #include "InDetPrepRawData/PixelClusterContainer.h" //typedef, cannot fwd declare #include "InDetPrepRawData/PixelGangedClusterAmbiguities.h" //typedef, cannot fwd declare +#include "SiClusterizationTool/ClusterMakerTool.h" +#include "PileUpTools/PileUpMergeSvc.h" + #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" @@ -42,7 +45,6 @@ namespace InDetDD{ namespace CLHEP {class HepRandomEngine;} namespace InDet { - class ClusterMakerTool; class PixelCluster; class PixelGangedAmbiguitiesFinder; } diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SiSmearedDigitizationTool.h b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SiSmearedDigitizationTool.h index 8dd8d90ff503..3630ef980b33 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SiSmearedDigitizationTool.h +++ b/InnerDetector/InDetDigitization/FastSiDigitization/FastSiDigitization/SiSmearedDigitizationTool.h @@ -39,6 +39,7 @@ #include "TrkTruthData/PRD_MultiTruthCollection.h" #include "ISF_FatrasDetDescrModel/IdHashDetElementCollection.h" +#include "TrkDetDescrInterfaces/ITrackingGeometrySvc.h" #include "GaudiKernel/ITHistSvc.h" #include "EventPrimitives/EventPrimitives.h" @@ -72,7 +73,6 @@ namespace InDetDD namespace Trk { class TrackingGeometry; - class ITrackingGeometrySvc; } diff --git a/InnerDetector/InDetDigitization/FastTRT_Digitization/FastTRT_Digitization/TRTFastDigitizationTool.h b/InnerDetector/InDetDigitization/FastTRT_Digitization/FastTRT_Digitization/TRTFastDigitizationTool.h index 769a26a4bccb..b6d0b866f288 100644 --- a/InnerDetector/InDetDigitization/FastTRT_Digitization/FastTRT_Digitization/TRTFastDigitizationTool.h +++ b/InnerDetector/InDetDigitization/FastTRT_Digitization/FastTRT_Digitization/TRTFastDigitizationTool.h @@ -40,13 +40,13 @@ #include "HitManagement/TimedHitCollection.h" #include "InDetSimEvent/TRTUncompressedHitCollection.h" #include "StoreGate/WriteHandle.h" +#include "PileUpTools/PileUpMergeSvc.h" #include <utility> #include <vector> #include <map> #include <cmath> -class PileUpMergeSvc; class IAtRndmGenSvc; class TRT_ID; class TRTUncompressedHit; diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.h b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.h index e9795361800c..c70dfa7e2e62 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.h +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.h @@ -22,6 +22,7 @@ #include "StoreGate/WriteHandle.h" #include "StoreGate/WriteHandleKey.h" +#include "PileUpTools/PileUpMergeSvc.h" #include "InDetSimData/InDetSimDataCollection.h" #include "SensorSimTool.h" diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitizationTool.h b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitizationTool.h index b9d46c6b317c..319de634581c 100644 --- a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitizationTool.h +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/PixelDigitizationTool.h @@ -20,6 +20,7 @@ #include "GaudiKernel/ServiceHandle.h" #include "StoreGate/WriteHandle.h" +#include "PileUpTools/PileUpMergeSvc.h" #include "InDetSimData/InDetSimDataCollection.h" #include "PixelProcessorTool.h" diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/SCT_DigitizationTool.h b/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/SCT_DigitizationTool.h index 8bfd2e273442..9a20ee8cd621 100644 --- a/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/SCT_DigitizationTool.h +++ b/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/SCT_DigitizationTool.h @@ -25,6 +25,7 @@ #include "InDetSimEvent/SiHitCollection.h" #include "xAODEventInfo/EventInfo.h" #include "xAODEventInfo/EventAuxInfo.h" +#include "PileUpTools/PileUpMergeSvc.h" // Gaudi headers #include "GaudiKernel/ToolHandle.h" diff --git a/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/BCM_RawDataByteStreamCnv/BCM_RawContByteStreamCnv.h b/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/BCM_RawDataByteStreamCnv/BCM_RawContByteStreamCnv.h index 82026991048b..6d011a9bebaa 100644 --- a/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/BCM_RawDataByteStreamCnv/BCM_RawContByteStreamCnv.h +++ b/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/BCM_RawDataByteStreamCnv/BCM_RawContByteStreamCnv.h @@ -34,10 +34,10 @@ extern long ByteStream_StorageType; class BCM_RawContByteStreamCnv: public Converter { - ~BCM_RawContByteStreamCnv(); - public: + // ~BCM_RawContByteStreamCnv(); + BCM_RawContByteStreamCnv(ISvcLocator* svcloc); virtual StatusCode initialize(); diff --git a/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RawContByteStreamCnv.cxx b/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RawContByteStreamCnv.cxx index 24e0a1894178..22ee960b07cb 100644 --- a/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RawContByteStreamCnv.cxx +++ b/InnerDetector/InDetEventCnv/BCM_RawDataByteStreamCnv/src/BCM_RawContByteStreamCnv.cxx @@ -34,11 +34,11 @@ BCM_RawContByteStreamCnv::BCM_RawContByteStreamCnv(ISvcLocator* svcloc):Converte //nop } -//////////////////////// -// destructor -//////////////////////// -BCM_RawContByteStreamCnv::~BCM_RawContByteStreamCnv() { -} +// //////////////////////// +// // destructor +// //////////////////////// +// BCM_RawContByteStreamCnv::~BCM_RawContByteStreamCnv() { +// } //////////////////////// // initialize() diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetLowBetaCandidateCnv.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetLowBetaCandidateCnv.h index cdaef25db6d8..8bc50e3723fa 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetLowBetaCandidateCnv.h +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetLowBetaCandidateCnv.h @@ -24,8 +24,8 @@ class InDetLowBetaCandidateCnv : public T_AthenaPoolCustomCnv<InDet::InDetLowBe public: InDetLowBetaCandidateCnv(ISvcLocator* svcloc); -protected: ~InDetLowBetaCandidateCnv(); +protected: InDetLowBetaCandidate_PERS* createPersistent(InDet::InDetLowBetaCandidate* transCont); diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetLowBetaContainerCnv.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetLowBetaContainerCnv.h index 4e0dd7830139..479b7c9ff476 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetLowBetaContainerCnv.h +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetLowBetaContainerCnv.h @@ -32,8 +32,8 @@ class InDetLowBetaContainerCnv : public InDetLowBetaContainerCnvBase { public: InDetLowBetaContainerCnv(ISvcLocator *svcloc); -protected: ~InDetLowBetaContainerCnv(); +protected: virtual InDetLowBetaContainer_PERS *createPersistent(InDet::InDetLowBetaContainer *transObj); virtual InDet::InDetLowBetaContainer *createTransient(); diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv.cxx index 2f36bd5feb3c..8504cdc5a64a 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv.cxx @@ -15,8 +15,6 @@ m_converter_p0(), m_storeGate(nullptr) {} - PixelClusterContainerCnv::~PixelClusterContainerCnv() {} - StatusCode PixelClusterContainerCnv::initialize() { diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv.h index a77e8209497d..30b2d13eabd8 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv.h +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv.h @@ -50,7 +50,6 @@ protected: public: PixelClusterContainerCnv (ISvcLocator* svcloc); protected: - ~PixelClusterContainerCnv(); virtual PixelClusterContainer_PERS* createPersistent (InDet::PixelClusterContainer* transCont); virtual InDet::PixelClusterContainer* createTransient (); diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_ClusterContainerCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_ClusterContainerCnv.cxx index 9176f31d1632..6fb9265e5848 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_ClusterContainerCnv.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_ClusterContainerCnv.cxx @@ -17,8 +17,6 @@ m_converter_p0(), m_storeGate(nullptr) {} - SCT_ClusterContainerCnv::~SCT_ClusterContainerCnv() {} - StatusCode SCT_ClusterContainerCnv::initialize() { diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_ClusterContainerCnv.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_ClusterContainerCnv.h index 61f028c594a0..b88e4ab42020 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_ClusterContainerCnv.h +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_ClusterContainerCnv.h @@ -50,7 +50,6 @@ protected: public: SCT_ClusterContainerCnv (ISvcLocator* svcloc); protected: - ~SCT_ClusterContainerCnv(); virtual SCT_ClusterContainer_PERS* createPersistent (InDet::SCT_ClusterContainer* transCont); virtual InDet::SCT_ClusterContainer* createTransient (); diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv.cxx index 247294325de0..23d13c3cbc9d 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv.cxx @@ -14,8 +14,6 @@ m_converter_p0(), m_storeGate(nullptr) {} - TRT_DriftCircleContainerCnv::~TRT_DriftCircleContainerCnv() {} - StatusCode TRT_DriftCircleContainerCnv::initialize() { diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv.h index 9c160bc7d1dc..79288b6a459a 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv.h +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv.h @@ -37,7 +37,6 @@ protected: public: TRT_DriftCircleContainerCnv (ISvcLocator* svcloc); protected: - ~TRT_DriftCircleContainerCnv(); virtual TRT_DriftCircleContainer_PERS* createPersistent (InDet::TRT_DriftCircleContainer* transCont); virtual InDet::TRT_DriftCircleContainer* createTransient (); diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/BeamSpotRetriever.h b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/BeamSpotRetriever.h index 98176dfea699..96bb9de9351c 100755 --- a/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/BeamSpotRetriever.h +++ b/InnerDetector/InDetEventCnv/InDetJiveXML/InDetJiveXML/BeamSpotRetriever.h @@ -8,8 +8,7 @@ #include "JiveXML/IDataRetriever.h" #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ServiceHandle.h" - -class IBeamCondSvc; +#include "InDetBeamSpotService/IBeamCondSvc.h" namespace JiveXML { diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.h b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.h index 88139ea54074..a416802d2a4d 100644 --- a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.h +++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.h @@ -19,7 +19,9 @@ #include "TrkTruthData/PRD_MultiTruthCollection.h" #include "xAODTracking/TrackMeasurementValidation.h" #include "xAODTracking/TrackMeasurementValidationContainer.h" - +#include "PixelConditionsServices/IPixelByteStreamErrorsSvc.h" +#include "PixelConditionsServices/IPixelCalibSvc.h" +#include "PixelConditionsServices/IPixelDCSSvc.h" #include <string> @@ -28,9 +30,6 @@ class SiHit; class InDetSimDataCollection; class IdentifierHash; -class IPixelCalibSvc; -class IPixelDCSSvc; -class IPixelByteStreamErrorsSvc; class ISiLorentzAngleSvc; namespace InDet diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamCnv.cxx b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamCnv.cxx index 525f02cb77e0..fc638f5398bd 100644 --- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamCnv.cxx +++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamCnv.cxx @@ -39,12 +39,6 @@ PixelRawContByteStreamCnv::PixelRawContByteStreamCnv(ISvcLocator* svcloc) : m_log(msgSvc(), "PixelRawContByteStreamCnv") {} -//////////////////////// -// destructor -//////////////////////// -PixelRawContByteStreamCnv::~PixelRawContByteStreamCnv() { -} - //////////////////////// // initialize() //////////////////////// diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamCnv.h b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamCnv.h index 890f100d716d..b21373458e20 100644 --- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamCnv.h +++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamCnv.h @@ -42,8 +42,6 @@ class IChronoStatSvc; class PixelRawContByteStreamCnv: public Converter { - ~PixelRawContByteStreamCnv( ); - public: typedef InDetRawDataCollection<Pixel1RawData> COLLECTION; // define collection format here diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamCnv.h b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamCnv.h index 879162f9ab45..a762d1893eee 100644 --- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamCnv.h +++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamCnv.h @@ -15,9 +15,9 @@ // Athena #include "InDetRawData/InDetRawDataCLASS_DEF.h" +#include "ByteStreamCnvSvcBase/IByteStreamEventAccess.h" class DataObject; -class IByteStreamEventAccess; class ISCTRawContByteStreamTool; /** Externals */ @@ -32,7 +32,6 @@ extern long ByteStream_StorageType; * to do the actual converting. */ class SCTRawContByteStreamCnv: public Converter { - virtual ~SCTRawContByteStreamCnv() = default; public: SCTRawContByteStreamCnv(ISvcLocator* svcloc); diff --git a/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawContByteStreamCnv.cxx b/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawContByteStreamCnv.cxx index 9700c71a7802..c10f80709c2d 100644 --- a/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawContByteStreamCnv.cxx +++ b/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawContByteStreamCnv.cxx @@ -19,12 +19,6 @@ TRTRawContByteStreamCnv::TRTRawContByteStreamCnv(ISvcLocator* svcloc) : m_byteStreamEventAccess("ByteStreamCnvSvc","TRTRawContByteStreamCnv") // init service handle {} -// ------------------------------------------------------ -// destructor - -TRTRawContByteStreamCnv::~TRTRawContByteStreamCnv( ) -{} - // ------------------------------------------------------ // initialize diff --git a/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawContByteStreamCnv.h b/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawContByteStreamCnv.h index e23a1a6bec9a..46235c7c4f52 100644 --- a/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawContByteStreamCnv.h +++ b/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRTRawContByteStreamCnv.h @@ -9,12 +9,12 @@ #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" #include "InDetRawData/InDetRawDataCLASS_DEF.h" +#include "ByteStreamCnvSvcBase/IByteStreamEventAccess.h" #include "TRT_RawDataByteStreamCnv/ITRTRawContByteStreamTool.h" class DataObject; class TRTRawContByteStreamTool ; -class IByteStreamEventAccess ; #include <string> @@ -27,8 +27,6 @@ extern long ByteStream_StorageType; // the converter for writing BS from TRT Raw Data class TRTRawContByteStreamCnv: public Converter { - ~TRTRawContByteStreamCnv( ); - public: TRTRawContByteStreamCnv(ISvcLocator* svcloc); diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/PrintSiElements.h b/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/PrintSiElements.h index 335d9cf63bac..08cca7a7ca96 100755 --- a/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/PrintSiElements.h +++ b/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/PrintSiElements.h @@ -9,11 +9,10 @@ #include "GaudiKernel/ServiceHandle.h" //#include "CLHEP/Geometry/Transform3D.h" #include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelInterfaces/IGeoModelSvc.h" #include <fstream> -class IGeoModelSvc; - ///////////////////////////////////////////////////////////////////////////// class PrintSiElements : public AthAlgorithm { diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/ReadSiDetectorElements.h b/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/ReadSiDetectorElements.h index 6e9b34d503c8..35dbdcf4307a 100755 --- a/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/ReadSiDetectorElements.h +++ b/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/ReadSiDetectorElements.h @@ -14,6 +14,9 @@ #include "SiPropertiesSvc/ISiPropertiesTool.h" #include "InDetConditionsSummaryService/ISiliconConditionsTool.h" #include "InDetCondServices/ISiLorentzAngleTool.h" +#include "InDetConditionsSummaryService/ISiliconConditionsSvc.h" +#include "InDetCondServices/ISiLorentzAngleSvc.h" +#include "SiPropertiesSvc/ISiPropertiesSvc.h" #include <vector> @@ -24,9 +27,6 @@ namespace InDetDD{ class SiDetectorElement; } -class ISiliconConditionsSvc; -class ISiPropertiesSvc; -class ISiLorentzAngleSvc; class AtlasDetectorID; class PixelID; class SCT_ID; diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalErrorMonTool.h b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalErrorMonTool.h index 3d89f16f018e..3e57d30ea6c8 100755 --- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalErrorMonTool.h +++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalErrorMonTool.h @@ -14,9 +14,8 @@ #include "Identifier/IdentifierHash.h" #include "SCT_ConditionsTools/ISCT_ConfigurationConditionsTool.h" #include "SCT_ConditionsTools/ISCT_ByteStreamErrorsTool.h" - -class IInDetConditionsSvc; -class IPixelByteStreamErrorsSvc; +#include "InDetConditionsSummaryService/IInDetConditionsSvc.h" +#include "PixelConditionsServices/IPixelByteStreamErrorsSvc.h" namespace InDetDD { diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/InDetOverlay.h b/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/InDetOverlay.h index 69b4f0097bd1..817c2ad7dbd0 100755 --- a/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/InDetOverlay.h +++ b/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/InDetOverlay.h @@ -28,12 +28,12 @@ typedef InDetRawDataCollection<TRT_RDORawData> TRT_RDO_Collection; #include "InDetSimData/InDetSimDataCollection.h" +#include "AthenaKernel/IAtRndmGenSvc.h" class StoreGateSvc; class SCT_ID; class TRT_ID; -class IAtRndmGenSvc; namespace CLHEP { class HepRandomEngine; diff --git a/InnerDetector/InDetRecAlgs/InDetExtensionProcessor/InDetExtensionProcessor/InDetExtensionProcessor.h b/InnerDetector/InDetRecAlgs/InDetExtensionProcessor/InDetExtensionProcessor/InDetExtensionProcessor.h index d726ee954470..3e525a67b8e5 100755 --- a/InnerDetector/InDetRecAlgs/InDetExtensionProcessor/InDetExtensionProcessor/InDetExtensionProcessor.h +++ b/InnerDetector/InDetRecAlgs/InDetExtensionProcessor/InDetExtensionProcessor/InDetExtensionProcessor.h @@ -16,15 +16,13 @@ #include "TrkTrack/TrackExtensionMap.h" #include "TrkFitterUtils/FitterTypes.h" #include "TrkEventPrimitives/ParticleHypothesis.h" +#include "TrkFitterInterfaces/ITrackFitter.h" +#include "TrkToolInterfaces/ITrackScoringTool.h" + #include <vector> #include <array> #include <mutex> -namespace Trk{ - class ITrackScoringTool; - class ITrackFitter; -} - namespace InDet { /** @brief Algorithm to process a TrackExtensionMap, refit the diff --git a/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/InDetLowBetaFinder/LowBetaAlg.h b/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/InDetLowBetaFinder/LowBetaAlg.h index 53c432f76c11..f41b1249db5f 100644 --- a/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/InDetLowBetaFinder/LowBetaAlg.h +++ b/InnerDetector/InDetRecAlgs/InDetLowBetaFinder/InDetLowBetaFinder/LowBetaAlg.h @@ -28,6 +28,7 @@ author Christopher.Marino <Christopher.Marino@cern.ch> #include "xAODTracking/TrackParticleContainer.h" #include "InDetLowBetaInfo/InDetLowBetaContainer.h" #include "TrkTrack/TrackCollection.h" +#include "TRT_ToT_Tools/ITRT_ToT_dEdx.h" ///////////////////////////////////////////////////////////////////////////// @@ -35,8 +36,6 @@ class AtlasDetectorID; class Identifier; class TRT_ID; class TrtToolBetaLiklihood; -class ITRT_ToT_dEdx; - // Predeclare histogram classes that you use. diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/PixelClusterization.h b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/PixelClusterization.h index f43c32d403e1..f6b8f2968a8f 100644 --- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/PixelClusterization.h +++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/PixelClusterization.h @@ -31,7 +31,7 @@ #include "InDetRawData/PixelRDO_Container.h" #include "TrigSteeringEvent/TrigRoiDescriptorCollection.h" #include "IRegionSelector/IRegSelSvc.h" - +#include "SiClusterizationTool/IPixelClusteringTool.h" // Fwd declarations @@ -44,7 +44,6 @@ namespace InDetDD{ class SiDetectorManager; } namespace InDet { - class IPixelClusteringTool; class PixelGangedAmbiguitiesFinder; } diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/SCT_Clusterization.h b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/SCT_Clusterization.h index d562e162e6d6..fecf2dd78f73 100644 --- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/SCT_Clusterization.h +++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/SCT_Clusterization.h @@ -36,6 +36,7 @@ #include "TrigSteeringEvent/TrigRoiDescriptorCollection.h" #include "IRegionSelector/IRegSelSvc.h" #include "InDetConditionsSummaryService/IInDetConditionsTool.h" +#include "SiClusterizationTool/ISCT_ClusteringTool.h" class SCT_ID; class SCT_ChannelStatusAlg; @@ -49,7 +50,6 @@ namespace InDetDD{ namespace InDet { - class ISCT_ClusteringTool; /** * @class SCT_Clusterization * @brief Form clusters from SCT Raw Data Objects diff --git a/InnerDetector/InDetRecTools/TRT_TrackHoleSearch/TRT_TrackHoleSearch/TRTStrawEfficiency.h b/InnerDetector/InDetRecTools/TRT_TrackHoleSearch/TRT_TrackHoleSearch/TRTStrawEfficiency.h index c1e2806de433..b9a89c616ac5 100644 --- a/InnerDetector/InDetRecTools/TRT_TrackHoleSearch/TRT_TrackHoleSearch/TRTStrawEfficiency.h +++ b/InnerDetector/InDetRecTools/TRT_TrackHoleSearch/TRT_TrackHoleSearch/TRTStrawEfficiency.h @@ -13,8 +13,10 @@ #include "AthenaBaseComps/AthAlgorithm.h" #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" +#include "GaudiKernel/ITHistSvc.h" #include "TrkToolInterfaces/IUpdator.h" #include "TrigDecisionInterface/ITrigDecisionTool.h" +#include "TRT_ConditionsServices/ITRT_StrawNeighbourSvc.h" #include "TrkTrack/TrackCollection.h" #include "xAODEventInfo/EventInfo.h" @@ -31,9 +33,7 @@ namespace Trk class TrackStateOnSurface; } -class ITHistSvc; class TRT_ID; -class ITRT_StrawNeighbourSvc; class TTree; diff --git a/InnerDetector/InDetRecTools/TRT_TrackHoleSearch/TRT_TrackHoleSearch/TRTTrackHoleSearchTool.h b/InnerDetector/InDetRecTools/TRT_TrackHoleSearch/TRT_TrackHoleSearch/TRTTrackHoleSearchTool.h index 42df89eec491..5cf65501df1f 100644 --- a/InnerDetector/InDetRecTools/TRT_TrackHoleSearch/TRT_TrackHoleSearch/TRTTrackHoleSearchTool.h +++ b/InnerDetector/InDetRecTools/TRT_TrackHoleSearch/TRT_TrackHoleSearch/TRTTrackHoleSearchTool.h @@ -15,6 +15,8 @@ #include "GaudiKernel/ServiceHandle.h" #include "TrkToolInterfaces/ITrackHoleSearchTool.h" #include "TrkParameters/TrackParameters.h" +#include "TrkExInterfaces/IExtrapolator.h" +#include "InDetConditionsSummaryService/IInDetConditionsSvc.h" #include <string> #include <vector> @@ -22,14 +24,12 @@ namespace Trk { - class IExtrapolator; class CylinderSurface; class Track; class Surface; } class TRT_ID; -class IInDetConditionsSvc; class TRTTrackHoleSearchTool : public Trk::ITrackHoleSearchTool, public AthAlgTool { diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigExtensProcessor/InDetTrigExtensProcessor/InDetTrigExtensProcessor.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigExtensProcessor/InDetTrigExtensProcessor/InDetTrigExtensProcessor.h index ab6b8e958e7b..d2e81df2530d 100755 --- a/InnerDetector/InDetTrigRecAlgs/InDetTrigExtensProcessor/InDetTrigExtensProcessor/InDetTrigExtensProcessor.h +++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigExtensProcessor/InDetTrigExtensProcessor/InDetTrigExtensProcessor.h @@ -28,6 +28,8 @@ #include "TrkTrack/TrackCollection.h" #include "TrkTrack/TrackExtensionMap.h" +#include "TrkFitterInterfaces/ITrackFitter.h" +#include "TrkToolInterfaces/ITrackScoringTool.h" // Trigger specific stuff #include "TrigInterfaces/FexAlgo.h" @@ -35,10 +37,6 @@ class StoreGateSvc; -namespace Trk { - class ITrackScoringTool; - class ITrackFitter; -} namespace InDet { diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/Pixel_TrgClusterization.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/Pixel_TrgClusterization.h index edc513dc45be..a3ccff268b97 100755 --- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/Pixel_TrgClusterization.h +++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/Pixel_TrgClusterization.h @@ -34,6 +34,10 @@ #include "InDetPrepRawData/PixelClusterContainer.h" #include "Identifier/IdentifierHash.h" +#include "PixelConditionsServices/IPixelByteStreamErrorsSvc.h" +#include "SiClusterizationTool/IPixelClusteringTool.h" +#include "SiClusterizationTool/PixelGangedAmbiguitiesFinder.h" + #include <string> @@ -43,7 +47,6 @@ class IRegSelSvc; class TrigTimer; -class IPixelByteStreamErrorsSvc; class PixelID; class IROBDataProviderSvc; @@ -53,8 +56,6 @@ namespace InDetDD { namespace InDet { - class PixelGangedAmbiguitiesFinder; - class IPixelClusteringTool; class ITrigRawDataProviderTool; class Pixel_TrgClusterization : public HLT::FexAlgo { diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/SCT_TrgClusterization.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/SCT_TrgClusterization.h index f25caf668569..306eb520c23d 100755 --- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/SCT_TrgClusterization.h +++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/SCT_TrgClusterization.h @@ -37,30 +37,28 @@ #include "InDetConditionsSummaryService/IInDetConditionsTool.h" #include "Identifier/IdentifierHash.h" +#include "IRegionSelector/IRegSelSvc.h" +#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h" +#include "SiClusterizationTool/ISCT_ClusteringTool.h" +#include "InDetTrigToolInterfaces/ITrigRawDataProviderTool.h" //typedefs - cannot be declared forward #include "InDetPrepRawData/SCT_ClusterContainer.h" #include "InDetPrepRawData/SCT_ClusterCollection.h" #include "SCT_ConditionsData/SCT_FlaggedCondData.h" - -class IRegSelSvc; class TrigTimer; class SCT_ID; class SCT_ChannelStatusAlg; -class IROBDataProviderSvc; namespace InDetDD { class SiDetectorManager; } namespace InDet { - - class ISCT_ClusteringTool; - class ITrigRawDataProviderTool; - + class SCT_TrgClusterization : public HLT::FexAlgo { /////////////////////////////////////////////////////////////////// diff --git a/InnerDetector/InDetValidation/InDetRecStatistics/InDetRecStatistics/InDetRecStatisticsAlg.h b/InnerDetector/InDetValidation/InDetRecStatistics/InDetRecStatistics/InDetRecStatisticsAlg.h index a96af03176f2..b4092987bd66 100755 --- a/InnerDetector/InDetValidation/InDetRecStatistics/InDetRecStatistics/InDetRecStatisticsAlg.h +++ b/InnerDetector/InDetValidation/InDetRecStatistics/InDetRecStatistics/InDetRecStatisticsAlg.h @@ -17,6 +17,12 @@ #include "HepPDT/ParticleDataTable.hh" #include "InDetRecStatistics/TrackStatHelper.h" #include "Identifier/Identifier.h" +#include "TrkToolInterfaces/IPRD_AssociationTool.h" +#include "TrkToolInterfaces/IResidualPullCalculator.h" +#include "TrkToolInterfaces/ITrackSelectorTool.h" +#include "TrkToolInterfaces/ITruthToTrack.h" +#include "TrkToolInterfaces/IUpdator.h" + #include <vector> // forward declarations @@ -31,14 +37,8 @@ class McEventCollection; class GenParticle; namespace Trk { - class ITruthToTrack; class ITrackSummaryTool; class TrackSummary; - class IPRD_AssociationTool; - class IUpdator; - class IResidualPullCalculator; - class ITrackSelectorTool; - } namespace InDet { diff --git a/InnerDetector/InDetValidation/InDetRecStatistics/InDetRecStatistics/TrackStatHelper.h b/InnerDetector/InDetValidation/InDetRecStatistics/InDetRecStatistics/TrackStatHelper.h index 470e6f02f27a..f3b300c6cb12 100755 --- a/InnerDetector/InDetValidation/InDetRecStatistics/InDetRecStatistics/TrackStatHelper.h +++ b/InnerDetector/InDetValidation/InDetRecStatistics/InDetRecStatistics/TrackStatHelper.h @@ -19,6 +19,9 @@ #include "TrkTrack/TrackCollection.h" #include "HepMC/GenParticle.h" #include "GeneratorObjects/HepMcParticleLink.h" +#include "TrkToolInterfaces/ITrackSummaryTool.h" +#include "TrkTruthData/TrackTruthCollection.h" + #include <vector> #include <string> #include <map> @@ -28,13 +31,6 @@ class PixelID; class SCT_ID; class AtlasDetectorID; class Track; -class TrackTruthCollection; - -namespace Trk -{ - class ITrackSummaryTool; -} - namespace InDet { diff --git a/LArCalorimeter/LArAffectedRegion/LArAffectedRegion/LArAffectedRegionAlg.h b/LArCalorimeter/LArAffectedRegion/LArAffectedRegion/LArAffectedRegionAlg.h index f8688caeea2e..e5f531d4d708 100644 --- a/LArCalorimeter/LArAffectedRegion/LArAffectedRegion/LArAffectedRegionAlg.h +++ b/LArCalorimeter/LArAffectedRegion/LArAffectedRegion/LArAffectedRegionAlg.h @@ -23,14 +23,15 @@ //#include ToolHandle<ILArHVTool> m_hvtool; #include "AthenaPoolUtilities/CondAttrListCollection.h" -class LArCablingService; +#include "IOVDbMetaDataTools/IIOVDbMetaDataTool.h" +#include "LArRecConditions/ILArBadChanTool.h" +#include "LArElecCalib/ILArHVTool.h" +#include "LArCabling/LArCablingService.h" +#include "CaloDetDescr/CaloDetDescrManager.h" + class LArOnlineID; -class CaloDetDescrManager; -class ILArBadChanTool; class CaloIdManager; -class ILArHVTool; -class IIOVDbMetaDataTool; class LArAffectedRegionAlg : public AthAlgorithm,virtual public IIncidentListener { //--- diff --git a/LArCalorimeter/LArCabling/LArCabling/LArOnOffIdMapping.h b/LArCalorimeter/LArCabling/LArCabling/LArOnOffIdMapping.h index f1a3e6664b7b..482af07398e2 100644 --- a/LArCalorimeter/LArCabling/LArCabling/LArOnOffIdMapping.h +++ b/LArCalorimeter/LArCabling/LArCabling/LArOnOffIdMapping.h @@ -119,6 +119,6 @@ inline HWIdentifier LArOnOffIdMapping::createSignalChannelID(const Identifier & #include "CLIDSvc/CLASS_DEF.h" CLASS_DEF( LArOnOffIdMapping,148608605 , 1) #include "AthenaKernel/CondCont.h" -CLASS_DEF( CondCont<LArOnOffIdMapping>, 155467877 , 0) +CONDCONT_DEF( LArOnOffIdMapping, 155467877 ); #endif diff --git a/LArCalorimeter/LArCellRec/src/LArBadFebMaskingTool.h b/LArCalorimeter/LArCellRec/src/LArBadFebMaskingTool.h index 5767bb6d131b..9142b8fa6549 100755 --- a/LArCalorimeter/LArCellRec/src/LArBadFebMaskingTool.h +++ b/LArCalorimeter/LArCellRec/src/LArBadFebMaskingTool.h @@ -23,12 +23,12 @@ #include "CaloInterface/ICaloCellMakerTool.h" #include "AthenaKernel/IOVSvcDefs.h" #include "StoreGate/ReadHandleKey.h" +#include "LArRecConditions/ILArBadChanTool.h" class LArCablingService; class StoreGateSvc; class CaloCell_ID; class LArOnlineID; -class ILArBadChanTool; class LArFebErrorSummary; class LArBadFebMaskingTool: public AthAlgTool, diff --git a/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.h b/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.h index e82d2bdc49dd..6641b1c092f1 100755 --- a/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.h +++ b/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.h @@ -32,11 +32,10 @@ //#include "LArRawEvent/LArRawChannelContainer.h" #include "LArRecConditions/LArBadChannelCont.h" #include "AthAllocators/DataPool.h" - +#include "LArCabling/LArOnOffIdMapping.h" class CaloCellContainer ; -class LArOnOffIdMapping; class CaloDetDescrManager ; class CaloCell_ID; class CaloCellContainer ; diff --git a/LArCalorimeter/LArCellRec/src/LArCellMaskingTool.h b/LArCalorimeter/LArCellRec/src/LArCellMaskingTool.h index 2d60d284bbeb..3954526073be 100644 --- a/LArCalorimeter/LArCellRec/src/LArCellMaskingTool.h +++ b/LArCalorimeter/LArCellRec/src/LArCellMaskingTool.h @@ -12,9 +12,9 @@ #include "CaloIdentifier/CaloCell_ID.h" #include "CaloInterface/ICaloCellMakerTool.h" #include <bitset> +#include "LArCabling/LArCablingService.h" class StoreGateSvc; -class LArCablingService; class MsgStream; class LArCellMaskingTool: public AthAlgTool, diff --git a/LArCalorimeter/LArCellRec/src/LArCellMerger.h b/LArCalorimeter/LArCellRec/src/LArCellMerger.h index 6e5e2e41aec6..7d588947c3de 100644 --- a/LArCalorimeter/LArCellRec/src/LArCellMerger.h +++ b/LArCalorimeter/LArCellRec/src/LArCellMerger.h @@ -25,7 +25,8 @@ #include "StoreGate/ReadHandleKey.h" #include "StoreGate/ReadCondHandleKey.h" -class LArOnOffIdMapping; +#include "LArCabling/LArOnOffIdMapping.h" + class CaloCell_ID; class LArRawChannelContainer; diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelCalculator.h b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelCalculator.h index de1ebd7e8a15..5c0e5db9a173 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelCalculator.h +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelCalculator.h @@ -17,6 +17,7 @@ #include "LArG4Code/LArG4Identifier.h" #include "LArG4Code/LArCalculatorSvcImp.h" #include "ILArBarrelGeometry.h" +#include "MapEta.h" #include <stdexcept> #include <vector> @@ -25,7 +26,7 @@ class G4Step; class AccMap; -class MapEta; + class LArG4BirksLaw; class LArBarrelCalculator : public LArCalculatorSvcImp diff --git a/LArCalorimeter/LArL1Sim/LArL1Sim/LArSCL1Maker.h b/LArCalorimeter/LArL1Sim/LArL1Sim/LArSCL1Maker.h index ae6fc4e1398a..207346355b3d 100755 --- a/LArCalorimeter/LArL1Sim/LArL1Sim/LArSCL1Maker.h +++ b/LArCalorimeter/LArL1Sim/LArL1Sim/LArSCL1Maker.h @@ -22,13 +22,13 @@ #include "LArDigitization/LArHitEMap.h" #include "LArElecCalib/ILArAutoCorrNoiseTool.h" #include "LArElecCalib/ILArADC2MeVTool.h" +#include "CaloDetDescr/ICaloSuperCellIDTool.h" class PileUpMergeSvc; class IAtRndmGenSvc; class ITriggerTime; class CaloCell_SuperCell_ID; -class ICaloSuperCellIDTool; class LArEM_ID; class LArHEC_ID; class LArFCAL_ID; diff --git a/MuonSpectrometer/Amdcsimrec/AmdcOracle/AmdcOracle/AmdcDumpOracle.h b/MuonSpectrometer/Amdcsimrec/AmdcOracle/AmdcOracle/AmdcDumpOracle.h index 5c80801b797b..da52d8ed242a 100755 --- a/MuonSpectrometer/Amdcsimrec/AmdcOracle/AmdcOracle/AmdcDumpOracle.h +++ b/MuonSpectrometer/Amdcsimrec/AmdcOracle/AmdcOracle/AmdcDumpOracle.h @@ -8,11 +8,11 @@ #include "AthenaBaseComps/AthAlgorithm.h" #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" +#include "AmdcDb/IRDBAccessSvcWithUpdate.h" ///////////////////////////////////////////////////////////////////////////// #include "AmdcOracle/AmdcOracleMisc.h" -class IRDBAccessSvcWithUpdate; class IRDBAccessSvc; /** diff --git a/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/MuonCalibDbOperations/CalibrationDbIOTool.h b/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/MuonCalibDbOperations/CalibrationDbIOTool.h index 2459169c421b..4667dd437b37 100644 --- a/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/MuonCalibDbOperations/CalibrationDbIOTool.h +++ b/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/MuonCalibDbOperations/CalibrationDbIOTool.h @@ -12,6 +12,7 @@ namespace MuonGM { // MuonCalibStandAloneBase #include "MuonCalibStandAloneBase/CalibrationIOTool.h" +#include "MuonCalibMath/SamplePoint.h" #include "MdtCalibUtils/RtDataFromFile.h" @@ -23,7 +24,6 @@ namespace MuonCalib { class CalibDbConnection; class IRtRelation; -class SamplePoint; class CalibHeadOperations; class CalibrationDbIOTool : public AthAlgTool, virtual public CalibrationIOTool { diff --git a/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/MuonCalibExtraTreeAlg/ExtraTreeTrackFillerTool.h b/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/MuonCalibExtraTreeAlg/ExtraTreeTrackFillerTool.h index 2507027b9cce..76148e3f4312 100644 --- a/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/MuonCalibExtraTreeAlg/ExtraTreeTrackFillerTool.h +++ b/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/MuonCalibExtraTreeAlg/ExtraTreeTrackFillerTool.h @@ -9,6 +9,7 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" #include "TrkTrack/TrackCollection.h" +#include "TrkToolInterfaces/IResidualPullCalculator.h" #include <vector> #include <set> @@ -16,7 +17,6 @@ class MdtIdHelper; namespace Trk { class ITrackHoleSearchTool; - class IResidualPullCalculator; class MeasurementBase; class CompetingRIOsOnTrack; class TrackStateOnSurface; diff --git a/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/MuonCalibExtraTreeAlg/MuonCalibExtraTreeAlg.h b/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/MuonCalibExtraTreeAlg/MuonCalibExtraTreeAlg.h index 3887b24a81fe..1b7282d893ed 100644 --- a/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/MuonCalibExtraTreeAlg/MuonCalibExtraTreeAlg.h +++ b/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/MuonCalibExtraTreeAlg/MuonCalibExtraTreeAlg.h @@ -17,6 +17,8 @@ #include "MuonCalibExtraTreeAlg/MuonCalibTrack_EBranch.h" #include "MuonCalibExtraTreeAlg/MuonCalibHit_EBranch.h" #include "MuonCalibExtraTreeAlg/MuonCalibTrackSegmentBranch.h" +#include "MuonCalibITools/IIdToFixedIdTool.h" +#include "TrkExInterfaces/IPropagator.h" class StoreGateSvc; class TFile; @@ -31,7 +33,6 @@ namespace MuonGM { namespace MuonCalib { class IExtraTreeFillerTool; -class IIdToFixedIdTool ; class ISegmentOnTrackSelector; /** @class MuonCalibExtraTreeAlg diff --git a/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/MuonCalibExtraTreeAlg/SegmentOnTrackSelector.h b/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/MuonCalibExtraTreeAlg/SegmentOnTrackSelector.h index 4ece45668148..83d6e3420202 100644 --- a/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/MuonCalibExtraTreeAlg/SegmentOnTrackSelector.h +++ b/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/MuonCalibExtraTreeAlg/SegmentOnTrackSelector.h @@ -13,11 +13,8 @@ #include <vector> #include "GaudiKernel/ToolHandle.h" #include "MuonCalibExtraTreeAlg/ISegmentOnTrackSelector.h" - -namespace Muon { - class MuonEDMHelperTool; - class MuonIdHelperTool; -} +#include "MuonRecHelperTools/MuonEDMHelperTool.h" +#include "MuonIdHelpers/MuonIdHelperTool.h" namespace Trk { class Track; diff --git a/MuonSpectrometer/MuonCalib/MuonCalibPatRec/MuonCalibPatRec/MuonSegmentToCalibSegment.h b/MuonSpectrometer/MuonCalib/MuonCalibPatRec/MuonCalibPatRec/MuonSegmentToCalibSegment.h index 282b18ea700d..ea1e8f3237ce 100644 --- a/MuonSpectrometer/MuonCalib/MuonCalibPatRec/MuonCalibPatRec/MuonSegmentToCalibSegment.h +++ b/MuonSpectrometer/MuonCalib/MuonCalibPatRec/MuonCalibPatRec/MuonSegmentToCalibSegment.h @@ -14,17 +14,17 @@ #include "MuonSegment/MuonSegmentCombinationCollection.h" #include "TrkSegment/SegmentCollection.h" #include "MuonSegment/MuonSegment.h" +#include "MuonCalibITools/IIdToFixedIdTool.h" +#include "MuonRecToolInterfaces/IMuonPatternSegmentAssociationTool.h" +#include "MdtCalibSvc/MdtCalibrationSvc.h" class MdtIdHelper; class CscIdHelper; class RpcIdHelper; class TgcIdHelper; -class MdtCalibrationSvc; namespace Muon{ class MuonPatternCombination; - class IMuonPatternSegmentAssociationTool; - } namespace MuonGM { @@ -33,8 +33,6 @@ namespace MuonGM { namespace MuonCalib { - class IIdToFixedIdTool; - /** @class MuonSegmentToCalibSegment Algorithm to retrieve MuonSegments or MuonSegmentCombinations from StoreGate and output the muon calibration input. diff --git a/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/CscRdoContByteStreamCnv.h b/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/CscRdoContByteStreamCnv.h index 943b1081f031..e869b2ad0e2a 100644 --- a/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/CscRdoContByteStreamCnv.h +++ b/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/CscRdoContByteStreamCnv.h @@ -30,9 +30,6 @@ extern long ByteStream_StorageType; class CscRdoContByteStreamCnv: public Converter { -protected: - ~CscRdoContByteStreamCnv(); - public: CscRdoContByteStreamCnv(ISvcLocator* svcloc); diff --git a/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/MdtCsmContByteStreamCnv.h b/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/MdtCsmContByteStreamCnv.h index 707e869b1aac..041807a881ba 100644 --- a/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/MdtCsmContByteStreamCnv.h +++ b/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/MdtCsmContByteStreamCnv.h @@ -12,19 +12,16 @@ #include "ByteStreamData/RawEvent.h" #include "ByteStreamCnvSvcBase/ByteStreamAddress.h" +#include "ByteStreamCnvSvcBase/IByteStreamEventAccess.h" #include <string> #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" +#include "MuonMDT_CnvTools/IMDT_RDOtoByteStreamTool.h" //class DataObject; class IAddressCreator; -class IByteStreamEventAccess; class StoreGateSvc; -namespace Muon { - class IMDT_RDOtoByteStreamTool; -} - // Abstract factory to create the converter template <class TYPE> class CnvFactory; @@ -34,9 +31,6 @@ extern long ByteStream_StorageType; class MdtCsmContByteStreamCnv: public Converter { - protected: - ~MdtCsmContByteStreamCnv(); - public: MdtCsmContByteStreamCnv(ISvcLocator* svcloc); diff --git a/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/RpcPadContByteStreamCnv.h b/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/RpcPadContByteStreamCnv.h index 3422efca7c03..9ef2f2440140 100644 --- a/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/RpcPadContByteStreamCnv.h +++ b/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/RpcPadContByteStreamCnv.h @@ -16,6 +16,7 @@ //#include "MuonByteStream/RPC_Hid2RESrcID.h" //#include "MuonByteStream/RpcROD_Decoder.h" +#include "MuonRPC_CnvTools/IRPC_RDOtoByteStreamTool.h" class DataObject; class StatusCode; @@ -24,9 +25,9 @@ class IByteStreamEventAccess; class StoreGateSvc; class MsgStream; -namespace Muon { -class IRPC_RDOtoByteStreamTool; -} +// namespace Muon { +// class IRPC_RDOtoByteStreamTool; +// } #include <string> // Abstract factory to create the converter @@ -37,9 +38,6 @@ extern long ByteStream_StorageType; class RpcPadContByteStreamCnv: public Converter { - protected: - ~RpcPadContByteStreamCnv(); - public: RpcPadContByteStreamCnv(ISvcLocator* svcloc); diff --git a/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/TgcRdoContByteStreamCnv.h b/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/TgcRdoContByteStreamCnv.h index 803c666d8040..d065adcfc4b5 100644 --- a/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/TgcRdoContByteStreamCnv.h +++ b/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/TgcRdoContByteStreamCnv.h @@ -35,9 +35,6 @@ extern long ByteStream_StorageType; class TgcRdoContByteStreamCnv: public Converter { -protected: - ~TgcRdoContByteStreamCnv(); - public: TgcRdoContByteStreamCnv(ISvcLocator* svcloc); diff --git a/MuonSpectrometer/MuonCnv/MuonByteStream/src/CscRdoContByteStreamCnv.cxx b/MuonSpectrometer/MuonCnv/MuonByteStream/src/CscRdoContByteStreamCnv.cxx index 25395d0240f4..11daf40a7c9e 100644 --- a/MuonSpectrometer/MuonCnv/MuonByteStream/src/CscRdoContByteStreamCnv.cxx +++ b/MuonSpectrometer/MuonCnv/MuonByteStream/src/CscRdoContByteStreamCnv.cxx @@ -36,11 +36,6 @@ CscRdoContByteStreamCnv::CscRdoContByteStreamCnv(ISvcLocator* svcloc) {} -// destructor -CscRdoContByteStreamCnv::~CscRdoContByteStreamCnv() -{} - - // class ID const CLID& CscRdoContByteStreamCnv::classID() { diff --git a/MuonSpectrometer/MuonCnv/MuonByteStream/src/MdtCsmContByteStreamCnv.cxx b/MuonSpectrometer/MuonCnv/MuonByteStream/src/MdtCsmContByteStreamCnv.cxx index 6a387db251cb..dcfbfb9c63e2 100644 --- a/MuonSpectrometer/MuonCnv/MuonByteStream/src/MdtCsmContByteStreamCnv.cxx +++ b/MuonSpectrometer/MuonCnv/MuonByteStream/src/MdtCsmContByteStreamCnv.cxx @@ -37,9 +37,6 @@ MdtCsmContByteStreamCnv::MdtCsmContByteStreamCnv(ISvcLocator* svcloc) : { } -MdtCsmContByteStreamCnv::~MdtCsmContByteStreamCnv() { -} - const CLID& MdtCsmContByteStreamCnv::classID(){ return ClassID_traits<MdtCsmContainer>::ID() ; } diff --git a/MuonSpectrometer/MuonCnv/MuonByteStream/src/RpcPadContByteStreamCnv.cxx b/MuonSpectrometer/MuonCnv/MuonByteStream/src/RpcPadContByteStreamCnv.cxx index 3e72b75a966d..16bab97188c9 100644 --- a/MuonSpectrometer/MuonCnv/MuonByteStream/src/RpcPadContByteStreamCnv.cxx +++ b/MuonSpectrometer/MuonCnv/MuonByteStream/src/RpcPadContByteStreamCnv.cxx @@ -40,9 +40,6 @@ RpcPadContByteStreamCnv::RpcPadContByteStreamCnv(ISvcLocator* svcloc) : m_storeGate("StoreGateSvc", "RpcPadContByteStreamCnv") {} -RpcPadContByteStreamCnv::~RpcPadContByteStreamCnv() -{} - const CLID& RpcPadContByteStreamCnv::classID(){ return ClassID_traits<RpcPadContainer>::ID() ; } diff --git a/MuonSpectrometer/MuonCnv/MuonByteStream/src/TgcRdoContByteStreamCnv.cxx b/MuonSpectrometer/MuonCnv/MuonByteStream/src/TgcRdoContByteStreamCnv.cxx index d4d74916e72a..46aacb6ff046 100644 --- a/MuonSpectrometer/MuonCnv/MuonByteStream/src/TgcRdoContByteStreamCnv.cxx +++ b/MuonSpectrometer/MuonCnv/MuonByteStream/src/TgcRdoContByteStreamCnv.cxx @@ -34,11 +34,6 @@ TgcRdoContByteStreamCnv::TgcRdoContByteStreamCnv(ISvcLocator* svcloc) {} -// destructor -TgcRdoContByteStreamCnv::~TgcRdoContByteStreamCnv() -{} - - // class ID const CLID& TgcRdoContByteStreamCnv::classID() { diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/MdtDigitToMdtRDO.h b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/MdtDigitToMdtRDO.h index a18aac5019ae..d0374bdd2aa5 100644 --- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/MdtDigitToMdtRDO.h +++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/MdtDigitToMdtRDO.h @@ -10,8 +10,8 @@ #include "MuonDigitContainer/MdtDigitContainer.h" #include "MuonRDO/MdtCsmContainer.h" +#include "MuonMDT_Cabling/MuonMDT_CablingSvc.h" -class MuonMDT_CablingSvc; class MdtIdHelper; ///////////////////////////////////////////////////////////////////////////// diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/TgcDigitToTgcRDO.h b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/TgcDigitToTgcRDO.h index 511062cd28da..55559feefd03 100644 --- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/TgcDigitToTgcRDO.h +++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/TgcDigitToTgcRDO.h @@ -12,9 +12,9 @@ #include "MuonRDO/TgcRdoContainer.h" #include "MuonRDO/TgcRdo.h" #include "MuonDigitContainer/TgcDigitContainer.h" +#include "TGCcablingInterface/ITGCcablingServerSvc.h" class TgcIdHelper; -class ITGCcablingServerSvc; class ITGCcablingSvc; ///////////////////////////////////////////////////////////////////////////// diff --git a/MuonSpectrometer/MuonCnv/MuonJiveXML/MuonJiveXML/TrigRpcDataRetriever.h b/MuonSpectrometer/MuonCnv/MuonJiveXML/MuonJiveXML/TrigRpcDataRetriever.h index 72608d2e6ba1..18947cfe9bf5 100644 --- a/MuonSpectrometer/MuonCnv/MuonJiveXML/MuonJiveXML/TrigRpcDataRetriever.h +++ b/MuonSpectrometer/MuonCnv/MuonJiveXML/MuonJiveXML/TrigRpcDataRetriever.h @@ -13,17 +13,12 @@ #include "MuonReadoutGeometry/MuonDetectorManager.h" #include "MuonReadoutGeometry/RpcReadoutElement.h" +#include "MuonRPC_CnvTools/IRPC_RDO_Decoder.h" class RpcIdHelper; class IRPCcablingSvc; -namespace Muon -{ - class IRPC_RDO_Decoder; -} - - namespace JiveXML { class TrigRpcDataRetriever : virtual public IDataRetriever, public AthAlgTool { diff --git a/MuonSpectrometer/MuonCnv/MuonPrepRawDataToxAOD/src/RPC_PrepDataToxAOD.h b/MuonSpectrometer/MuonCnv/MuonPrepRawDataToxAOD/src/RPC_PrepDataToxAOD.h index af6f19597de6..e8acccb568d3 100644 --- a/MuonSpectrometer/MuonCnv/MuonPrepRawDataToxAOD/src/RPC_PrepDataToxAOD.h +++ b/MuonSpectrometer/MuonCnv/MuonPrepRawDataToxAOD/src/RPC_PrepDataToxAOD.h @@ -13,13 +13,8 @@ #include "MuonPrepDataToxAOD.h" #include "MuonSimData/MuonSimDataCollection.h" #include "MuonPrepRawData/MuonPrepDataContainer.h" - -namespace Muon { - class IMuonClusterOnTrackCreator; -} -namespace Trk { - class IResidualPullCalculator; -} +#include "MuonRecToolInterfaces/IMuonClusterOnTrackCreator.h" +#include "TrkToolInterfaces/IResidualPullCalculator.h" class RPC_PrepDataToxAOD : public MuonPrepDataToxAOD<Muon::RpcPrepDataContainer,MuonSimDataCollection> { public: diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataTool.h b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataTool.h index 30e621756d7e..22ee6c3bd7a8 100755 --- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataTool.h +++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataTool.h @@ -15,6 +15,7 @@ #include "MuonPrepRawData/MuonPrepDataContainer.h" #include "MuonTrigCoinData/RpcCoinDataContainer.h" +#include "MuonCondInterface/IRPCConditionsSvc.h" #include "MuonRDO/RpcCoinMatrix.h" #include "MuonRDO/RpcPadContainer.h" @@ -38,7 +39,6 @@ class RpcPadIdHash; class IdentifierHash; class RpcPad; class RpcPadContainer; -class IRPCConditionsSvc; namespace Muon { diff --git a/MuonSpectrometer/MuonDetDescr/MuonAGDD/MuonAGDD/MuonAGDDTool.h b/MuonSpectrometer/MuonDetDescr/MuonAGDD/MuonAGDD/MuonAGDDTool.h index 7f44202c87fb..5aaba4fb204b 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonAGDD/MuonAGDD/MuonAGDDTool.h +++ b/MuonSpectrometer/MuonDetDescr/MuonAGDD/MuonAGDD/MuonAGDDTool.h @@ -16,7 +16,7 @@ class IRDBAccessSvc; class IGeoModelSvc; class GeoFullPhysVol; #ifndef SIMULATIONBASE -class AmdcsimrecAthenaSvc; +#include "AmdcAth/AmdcsimrecAthenaSvc.h" #endif diff --git a/MuonSpectrometer/MuonDigitization/RPC_Digitization/RPC_Digitization/RpcDigitizationTool.h b/MuonSpectrometer/MuonDigitization/RPC_Digitization/RPC_Digitization/RpcDigitizationTool.h index 951515ba13ce..81d83a253ce5 100644 --- a/MuonSpectrometer/MuonDigitization/RPC_Digitization/RPC_Digitization/RpcDigitizationTool.h +++ b/MuonSpectrometer/MuonDigitization/RPC_Digitization/RPC_Digitization/RpcDigitizationTool.h @@ -46,6 +46,7 @@ the same strip before the dead time is ignored. #include "MuonSimEvent/RPCSimHitCollection.h" #include "HitManagement/TimedHitCollection.h" #include "MuonSimData/MuonSimDataCollection.h" +#include "MuonCondInterface/IRPCConditionsSvc.h" #include "xAODEventInfo/EventInfo.h" // NEW EDM #include "xAODEventInfo/EventAuxInfo.h" // NEW EDM @@ -64,8 +65,6 @@ class PileUpMergeSvc; class IAtRndmGenSvc; class ITagInfoMgr; -class IRPCConditionsSvc; - namespace MuonGM{ class MuonDetectorManager; } diff --git a/MuonSpectrometer/MuonOverlay/CscOverlay/CscOverlay/CscOverlay.h b/MuonSpectrometer/MuonOverlay/CscOverlay/CscOverlay/CscOverlay.h index 03bc94b84126..d72a2171bf1d 100644 --- a/MuonSpectrometer/MuonOverlay/CscOverlay/CscOverlay/CscOverlay.h +++ b/MuonSpectrometer/MuonOverlay/CscOverlay/CscOverlay/CscOverlay.h @@ -17,6 +17,7 @@ #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/ToolHandle.h" #include "MuonOverlayBase/MuonOverlayBase.h" +#include "MuonDigToolInterfaces/IMuonDigitizationTool.h" #include "MuonRDO/CscRawDataContainer.h" @@ -30,7 +31,6 @@ #include <map> class CscIdHelper; -class IMuonDigitizationTool; namespace std { template<typename _Tp> class auto_ptr; } diff --git a/MuonSpectrometer/MuonOverlay/MdtOverlay/MdtOverlay/MdtOverlay.h b/MuonSpectrometer/MuonOverlay/MdtOverlay/MdtOverlay/MdtOverlay.h index fbfff996dc20..55f6af61652e 100644 --- a/MuonSpectrometer/MuonOverlay/MdtOverlay/MdtOverlay/MdtOverlay.h +++ b/MuonSpectrometer/MuonOverlay/MdtOverlay/MdtOverlay/MdtOverlay.h @@ -23,9 +23,9 @@ #include "MuonOverlayBase/MuonOverlayBase.h" #include "MuonDigitContainer/MdtDigitContainer.h" +#include "MuonDigToolInterfaces/IMuonDigitizationTool.h" class MdtIdHelper; -class IMuonDigitizationTool; class MdtOverlay : public MuonOverlayBase { diff --git a/MuonSpectrometer/MuonOverlay/RpcOverlay/RpcOverlay/RpcOverlay.h b/MuonSpectrometer/MuonOverlay/RpcOverlay/RpcOverlay/RpcOverlay.h index dc6d77194aa5..0cc849ca452e 100644 --- a/MuonSpectrometer/MuonOverlay/RpcOverlay/RpcOverlay/RpcOverlay.h +++ b/MuonSpectrometer/MuonOverlay/RpcOverlay/RpcOverlay/RpcOverlay.h @@ -23,9 +23,10 @@ #include "MuonOverlayBase/IDC_MultiHitOverlayBase.h" #include "MuonDigitContainer/RpcDigitContainer.h" +#include "MuonDigToolInterfaces/IMuonDigitizationTool.h" class RpcIdHelper; -class IMuonDigitizationTool; +// class IMuonDigitizationTool; class RpcOverlay : public IDC_MultiHitOverlayBase { public: diff --git a/MuonSpectrometer/MuonOverlay/TgcOverlay/TgcOverlay/TgcOverlay.h b/MuonSpectrometer/MuonOverlay/TgcOverlay/TgcOverlay/TgcOverlay.h index 98e03ec16d97..7de66532ef7c 100644 --- a/MuonSpectrometer/MuonOverlay/TgcOverlay/TgcOverlay/TgcOverlay.h +++ b/MuonSpectrometer/MuonOverlay/TgcOverlay/TgcOverlay/TgcOverlay.h @@ -23,9 +23,9 @@ #include "MuonOverlayBase/IDC_MultiHitOverlayBase.h" #include "MuonDigitContainer/TgcDigitContainer.h" +#include "MuonDigToolInterfaces/IMuonDigitizationTool.h" class TgcIdHelper; -class IMuonDigitizationTool; class TgcOverlay : public IDC_MultiHitOverlayBase { public: diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTruthTools/src/MuonTruthTrackBuilder.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTruthTools/src/MuonTruthTrackBuilder.h index 4a2b589d73c9..02b7e8466862 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTruthTools/src/MuonTruthTrackBuilder.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTruthTools/src/MuonTruthTrackBuilder.h @@ -24,12 +24,18 @@ #include "TrkParameters/TrackParameters.h" #include <vector> #include "GeoPrimitives/GeoPrimitives.h" +#include "TrkExInterfaces/IExtrapolator.h" +#include "MuonRecToolInterfaces/IMdtDriftCircleOnTrackCreator.h" +#include "MuonRecToolInterfaces/IMuonClusterOnTrackCreator.h" +#include "MuonRecToolInterfaces/IMuonCompetingClustersOnTrackCreator.h" +#include "MuonRecToolInterfaces/IMuonTrackCleaner.h" +#include "MuonRecToolInterfaces/IMuonTrackExtrapolationTool.h" +#include "MuonRecToolInterfaces/IMuonTrackToSegmentTool.h" +#include "TrkFitterInterfaces/ITrackFitter.h" namespace Trk { class Track; - class ITrackFitter; - class IExtrapolator; class IRIO_OnTrackCreator; class RIO_OnTrack; class MeasurementBase; @@ -41,12 +47,6 @@ namespace Muon { class MuonIdHelperTool; class MuonEDMPrinterTool; class MuonEDMHelperTool; - class IMdtDriftCircleOnTrackCreator; - class IMuonClusterOnTrackCreator; - class IMuonCompetingClustersOnTrackCreator; - class IMuonTrackToSegmentTool; - class IMuonTrackExtrapolationTool; - class IMuonTrackCleaner; class MuonSegment; class MuonClusterOnTrack; /** diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/TGC_LinearSegmentMakerTool/TGC_LinearSegmentMakerTool/TGC_LinearSegmentMakerTool.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/TGC_LinearSegmentMakerTool/TGC_LinearSegmentMakerTool/TGC_LinearSegmentMakerTool.h index 41d431542807..5a46ae4bac25 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/TGC_LinearSegmentMakerTool/TGC_LinearSegmentMakerTool/TGC_LinearSegmentMakerTool.h +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/TGC_LinearSegmentMakerTool/TGC_LinearSegmentMakerTool/TGC_LinearSegmentMakerTool.h @@ -9,6 +9,7 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" //#include "CLHEP/Vector/TwoVector.h" +#include "TrkExInterfaces/IIntersector.h" class TgcIdHelper; @@ -16,10 +17,6 @@ namespace MuonGM { class MuonDetectorManager; } -namespace Trk -{ - class IIntersector; -} class TGC_LinearSegmentMakerTool : virtual public Muon::IMuonSegmentMaker, public AthAlgTool { diff --git a/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.h b/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.h index fdefd356fe08..1b341adf9efe 100755 --- a/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.h +++ b/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.h @@ -30,12 +30,12 @@ #include "TrkTruthData/PRD_MultiTruthCollection.h" #include "xAODMuon/MuonSegmentContainer.h" #include "GeneratorObjects/xAODTruthParticleLink.h" +#include "MCTruthClassifier/IMCTruthClassifier.h" #include "StoreGate/ReadHandleKey.h" #include "StoreGate/WriteHandleKey.h" #include "StoreGate/WriteHandleKeyArray.h" -class IMCTruthClassifier; class MuonSimDataCollection; class CscSimDataCollection; diff --git a/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/UserAnalysisUtils/UserAnalysisOverlapCheckingTool.h b/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/UserAnalysisUtils/UserAnalysisOverlapCheckingTool.h index fecb8488faae..487477ea7640 100644 --- a/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/UserAnalysisUtils/UserAnalysisOverlapCheckingTool.h +++ b/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/UserAnalysisUtils/UserAnalysisOverlapCheckingTool.h @@ -67,11 +67,6 @@ public: template<class Object1, class Object2> bool overlap(const Object1* object1, const Object2* object2, double& deltaR) const ; -protected: - - /** Standard destructor */ - virtual ~UserAnalysisOverlapCheckingTool(); - private: diff --git a/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/UserAnalysisUtils/UserAnalysisOverlapRemovalTool.h b/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/UserAnalysisUtils/UserAnalysisOverlapRemovalTool.h index 7c7d2a6ccbcf..2288cf2ecc67 100644 --- a/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/UserAnalysisUtils/UserAnalysisOverlapRemovalTool.h +++ b/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/UserAnalysisUtils/UserAnalysisOverlapRemovalTool.h @@ -95,11 +95,6 @@ public: /** check if execute() is already called for this tool in this job for this event */ bool isExecuted(); -protected: - - /** Standard destructor */ - virtual ~UserAnalysisOverlapRemovalTool(); - private: struct Vectors { ConstDataVector<INavigable4MomentumCollection>* m_outputParticles; diff --git a/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/UserAnalysisUtils/UserAnalysisPreparationTool.h b/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/UserAnalysisUtils/UserAnalysisPreparationTool.h index ccbf0e65570b..e3102555ec7e 100644 --- a/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/UserAnalysisUtils/UserAnalysisPreparationTool.h +++ b/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/UserAnalysisUtils/UserAnalysisPreparationTool.h @@ -82,11 +82,6 @@ public: const std::pair<unsigned int, unsigned int>& trackParticleSummary() const; const std::pair<unsigned int, unsigned int>& caloClusterSummary() const; -protected: - - /** Standard destructor */ - virtual ~UserAnalysisPreparationTool(); - private: /** container preparation */ diff --git a/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/src/UserAnalysisOverlapCheckingTool.cxx b/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/src/UserAnalysisOverlapCheckingTool.cxx index 976217f23347..c613002b4f0c 100644 --- a/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/src/UserAnalysisOverlapCheckingTool.cxx +++ b/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/src/UserAnalysisOverlapCheckingTool.cxx @@ -64,9 +64,6 @@ StatusCode UserAnalysisOverlapCheckingTool::finalize() { return StatusCode::SUCCESS; } -//------------------------------------------------------------------------------ -UserAnalysisOverlapCheckingTool::~UserAnalysisOverlapCheckingTool() -{} diff --git a/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/src/UserAnalysisOverlapRemovalTool.cxx b/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/src/UserAnalysisOverlapRemovalTool.cxx index 21c7dc9c8cf9..5aeb8042427d 100644 --- a/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/src/UserAnalysisOverlapRemovalTool.cxx +++ b/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/src/UserAnalysisOverlapRemovalTool.cxx @@ -105,10 +105,6 @@ StatusCode UserAnalysisOverlapRemovalTool::finalize() { return StatusCode::SUCCESS; } -//------------------------------------------------------------------------------ -UserAnalysisOverlapRemovalTool::~UserAnalysisOverlapRemovalTool() -{} - //------------------------------------------------------------------------------- StatusCode UserAnalysisOverlapRemovalTool::execute() { ATH_MSG_DEBUG("in execute()" ); diff --git a/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/src/UserAnalysisPreparationTool.cxx b/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/src/UserAnalysisPreparationTool.cxx index d25dad9d989d..24bf9bce90a7 100644 --- a/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/src/UserAnalysisPreparationTool.cxx +++ b/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/src/UserAnalysisPreparationTool.cxx @@ -77,10 +77,6 @@ StatusCode UserAnalysisPreparationTool::finalize() { return StatusCode::SUCCESS; } -//------------------------------------------------------------------------------ -UserAnalysisPreparationTool::~UserAnalysisPreparationTool() -{} - //------------------------------------------------------------------------------- StatusCode UserAnalysisPreparationTool::execute() { ATH_MSG_DEBUG("in execute()"); diff --git a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/src/RoIBResultToAOD.h b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/src/RoIBResultToAOD.h index ee85e2ae954e..533ec60671bd 100644 --- a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/src/RoIBResultToAOD.h +++ b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/src/RoIBResultToAOD.h @@ -13,18 +13,14 @@ #include "GaudiKernel/ServiceHandle.h" #include "GaudiKernel/ToolHandle.h" #include "StoreGate/DataHandle.h" +#include "TrigT1Interfaces/RecMuonRoiSvc.h" +#include "TrigT1CaloToolInterfaces/IL1JetTools.h" +#include "TrigT1CaloToolInterfaces/IL1EmTauTools.h" +#include "TrigConfInterfaces/ILVL1ConfigSvc.h" // Forward declaration(s): class StoreGateSvc; class LVL1_ROI; -namespace TrigConf { - class ILVL1ConfigSvc; -} -namespace LVL1 { - class RecMuonRoiSvc; - class IL1EmTauTools; - class IL1JetTools; -} namespace ROIB { class RoIBResult; } diff --git a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/src/RoIBResultToxAOD.h b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/src/RoIBResultToxAOD.h index 77d16793bdb6..02f1a810a1a2 100644 --- a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/src/RoIBResultToxAOD.h +++ b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/src/RoIBResultToxAOD.h @@ -17,17 +17,16 @@ // xAOD include(s): #include "xAODTriggerCnv/IMuonRoICnvTool.h" +#include "TrigT1CaloToolInterfaces/IL1JEMJetTools.h" +#include "TrigT1Interfaces/RecMuonRoiSvc.h" +#include "TrigT1CaloToolInterfaces/IL1CPMTools.h" + // Forward declaration(s): class StoreGateSvc; class LVL1_ROI; namespace TrigConf { class ILVL1ConfigSvc; } -namespace LVL1 { - class RecMuonRoiSvc; - class IL1CPMTools; - class IL1JEMJetTools; -} namespace ROIB { class RoIBResult; } diff --git a/PhysicsAnalysis/AthenaROOTAccess/src/tpcnvLoad.cxx b/PhysicsAnalysis/AthenaROOTAccess/src/tpcnvLoad.cxx index 5b23a47826b2..56d6fd121b69 100644 --- a/PhysicsAnalysis/AthenaROOTAccess/src/tpcnvLoad.cxx +++ b/PhysicsAnalysis/AthenaROOTAccess/src/tpcnvLoad.cxx @@ -48,7 +48,7 @@ Registry::instance() ITPCnvBase* Registry::load_tpcnv(const std::string& cls) { - ITPCnvBase* cnv = ITPCnvBase::Factory::create (cls); + ITPCnvBase* cnv = ITPCnvBase::Factory::create (cls).release(); if (cnv == 0) { ::Warning("tpcnvLoad", "could not load class [%s] via Reflex::PluginService", @@ -65,9 +65,9 @@ Registry::load_tpcnv(const std::string& cls) ITPCnvBase* Registry::p2t_cnv(const std::string& persClassName) { - ITPCnvBase* cnv = ITPCnvBase::Factory::create ("_ARA_PERS_" + persClassName); + ITPCnvBase* cnv = ITPCnvBase::Factory::create ("_ARA_PERS_" + persClassName).release(); if (!cnv) - cnv = ITPCnvBase::Factory::create ("_PERS_" + persClassName); + cnv = ITPCnvBase::Factory::create ("_PERS_" + persClassName).release(); if (cnv == 0) { ::Warning("tpcnvLoad", "could not load converter for persistent class [%s]", @@ -84,9 +84,9 @@ Registry::p2t_cnv(const std::string& persClassName) ITPCnvBase* Registry::t2p_cnv(const std::string& transClassName) { - ITPCnvBase* cnv = ITPCnvBase::Factory::create ("_ARA_TRANS_" + transClassName); + ITPCnvBase* cnv = ITPCnvBase::Factory::create ("_ARA_TRANS_" + transClassName).release(); if (!cnv) - cnv = ITPCnvBase::Factory::create ("_TRANS_" + transClassName); + cnv = ITPCnvBase::Factory::create ("_TRANS_" + transClassName).release(); if (cnv == 0) { ::Warning("tpcnvLoad", "could not load converter for transient class [%s]", @@ -104,9 +104,9 @@ Registry::t2p_cnv(const std::string& transClassName) std::string Registry::p2t_name(const std::string& persClassName) { std::string out; - ITPCnvBase* cnv = ITPCnvBase::Factory::create ("_ARA_PERS_" + persClassName); + ITPCnvBase* cnv = ITPCnvBase::Factory::create ("_ARA_PERS_" + persClassName).release(); if (!cnv) - cnv = ITPCnvBase::Factory::create ("_PERS_" + persClassName); + cnv = ITPCnvBase::Factory::create ("_PERS_" + persClassName).release(); if (cnv != 0) { out = SG::normalizedTypeinfoName (cnv->transientTInfo()); delete cnv; diff --git a/PhysicsAnalysis/BPhys/BPhysTagTools/BPhysTagTools/BPhysTagTool.h b/PhysicsAnalysis/BPhys/BPhysTagTools/BPhysTagTools/BPhysTagTool.h index 216fc27fe2e8..975c8e132c59 100755 --- a/PhysicsAnalysis/BPhys/BPhysTagTools/BPhysTagTools/BPhysTagTool.h +++ b/PhysicsAnalysis/BPhys/BPhysTagTools/BPhysTagTools/BPhysTagTool.h @@ -39,10 +39,6 @@ public: virtual StatusCode execute(TagFragmentCollection&, const int); virtual StatusCode finalize(); -protected: - - // Standard destructor - virtual ~BPhysTagTool(); }; diff --git a/PhysicsAnalysis/BPhys/BPhysTagTools/src/BPhysTagTool.cxx b/PhysicsAnalysis/BPhys/BPhysTagTools/src/BPhysTagTool.cxx index d056d02f9a8e..9e81608c2729 100755 --- a/PhysicsAnalysis/BPhys/BPhysTagTools/src/BPhysTagTool.cxx +++ b/PhysicsAnalysis/BPhys/BPhysTagTools/src/BPhysTagTool.cxx @@ -22,7 +22,6 @@ BPhysTagTool::BPhysTagTool(const std::string& type, const std::string& name, con /////////////////////////////////////////////////////////////////////////////// -BPhysTagTool::~BPhysTagTool() {} /////////////////////////////////////////////////////////////////////////////// diff --git a/PhysicsAnalysis/D3PDMaker/BackgroundD3PDMaker/src/LucidPMTHitFillerTool.h b/PhysicsAnalysis/D3PDMaker/BackgroundD3PDMaker/src/LucidPMTHitFillerTool.h index eff3cdbe95bc..cf54de127bde 100644 --- a/PhysicsAnalysis/D3PDMaker/BackgroundD3PDMaker/src/LucidPMTHitFillerTool.h +++ b/PhysicsAnalysis/D3PDMaker/BackgroundD3PDMaker/src/LucidPMTHitFillerTool.h @@ -17,8 +17,7 @@ #include "D3PDMakerUtils/BlockFillerTool.h" -class LUCID_RawDataContainer; - +#include "LUCID_RawEvent/LUCID_RawDataContainer.h" namespace D3PD { diff --git a/PhysicsAnalysis/D3PDMaker/BackgroundD3PDMaker/src/RawTagInDetSPFillerTool.h b/PhysicsAnalysis/D3PDMaker/BackgroundD3PDMaker/src/RawTagInDetSPFillerTool.h index 504b2831a757..279629d728ad 100644 --- a/PhysicsAnalysis/D3PDMaker/BackgroundD3PDMaker/src/RawTagInDetSPFillerTool.h +++ b/PhysicsAnalysis/D3PDMaker/BackgroundD3PDMaker/src/RawTagInDetSPFillerTool.h @@ -17,7 +17,7 @@ #include "D3PDMakerUtils/BlockFillerTool.h" -class RawInfoSummaryForTag; +#include "TagEvent/RawInfoSummaryForTag.h" namespace D3PD { diff --git a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/CaloCellDetailsFillerTool.h b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/CaloCellDetailsFillerTool.h index afb4350a6be1..d10d7d5dde54 100755 --- a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/CaloCellDetailsFillerTool.h +++ b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/CaloCellDetailsFillerTool.h @@ -14,13 +14,13 @@ #include "D3PDMakerUtils/BlockFillerTool.h" #include "CaloEvent/CaloCellContainer.h" #include "GaudiKernel/ToolHandle.h" +#include "CaloConditions/ICaloBadChanTool.h" +#include "CaloInterface/ICaloNoiseTool.h" class LArEM_ID; class LArFCAL_ID; class LArHEC_ID; class TileID; -class ICaloBadChanTool; -class ICaloNoiseTool; namespace D3PD { diff --git a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/LArCollisionTimeFillerTool.h b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/LArCollisionTimeFillerTool.h index 4dda1883ff67..f7ee44399f69 100644 --- a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/LArCollisionTimeFillerTool.h +++ b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/LArCollisionTimeFillerTool.h @@ -18,7 +18,7 @@ #include "D3PDMakerUtils/BlockFillerTool.h" -class LArCollisionTime; +#include "LArRecEvent/LArCollisionTime.h" namespace D3PD { diff --git a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/LArDigitFillerTool.h b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/LArDigitFillerTool.h index bed01ac320cf..ee1858003d14 100755 --- a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/LArDigitFillerTool.h +++ b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/LArDigitFillerTool.h @@ -14,12 +14,12 @@ #include "D3PDMakerUtils/BlockFillerTool.h" #include "LArRawEvent/LArDigitContainer.h" #include "GaudiKernel/ToolHandle.h" +#include "LArCabling/LArCablingService.h" class LArEM_ID; class LArFCAL_ID; class LArHEC_ID; class LArOnlineID; -class LArCablingService; namespace D3PD { diff --git a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/LArSCHitFillerTool.h b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/LArSCHitFillerTool.h index cbe28b62fe50..24d64cdfddf0 100644 --- a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/LArSCHitFillerTool.h +++ b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/LArSCHitFillerTool.h @@ -22,6 +22,7 @@ #include "D3PDMakerUtils/SGCollectionGetterTool.h" #include "LArSimEvent/LArHitContainer.h" #include "LArElecCalib/ILArfSampl.h" +#include "CaloDetDescr/ICaloSuperCellIDTool.h" #include <vector> #include <list> #include <map> @@ -38,7 +39,6 @@ class CaloDetDescrManager ; class Identifier; class CaloSuperCellDetDescrManager; -class ICaloSuperCellIDTool; class CaloCell_SuperCell_ID; diff --git a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/MBTSTimeFillerTool.h b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/MBTSTimeFillerTool.h index 3fe5be9d0a6f..75594bf30f9b 100644 --- a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/MBTSTimeFillerTool.h +++ b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/MBTSTimeFillerTool.h @@ -19,8 +19,7 @@ #include "D3PDMakerUtils/VoidBlockFillerTool.h" #include "GaudiKernel/ToolHandle.h" -class MBTSTimeFilterTool; - +#include "PrimaryDPDMaker/MBTSTimeFilterTool.h" namespace D3PD { diff --git a/PhysicsAnalysis/D3PDMaker/D3PDMakerCoreComps/src/CollectionGetterRegistryTool.h b/PhysicsAnalysis/D3PDMaker/D3PDMakerCoreComps/src/CollectionGetterRegistryTool.h index 73df0269c0c3..95d5f3495da7 100644 --- a/PhysicsAnalysis/D3PDMaker/D3PDMakerCoreComps/src/CollectionGetterRegistryTool.h +++ b/PhysicsAnalysis/D3PDMaker/D3PDMakerCoreComps/src/CollectionGetterRegistryTool.h @@ -21,10 +21,11 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" +#include "GaudiKernel/IJobOptionsSvc.h" + #include <unordered_map> -class IJobOptionsSvc; class IToolSvc; diff --git a/PhysicsAnalysis/D3PDMaker/D3PDMakerRoot/src/RootD3PDSvc.h b/PhysicsAnalysis/D3PDMaker/D3PDMakerRoot/src/RootD3PDSvc.h index 42bab27871d0..c24a3c06d191 100644 --- a/PhysicsAnalysis/D3PDMaker/D3PDMakerRoot/src/RootD3PDSvc.h +++ b/PhysicsAnalysis/D3PDMaker/D3PDMakerRoot/src/RootD3PDSvc.h @@ -23,11 +23,12 @@ #include <vector> #include <string> +#include "RootD3PD.h" namespace D3PD { -class RootD3PD; + // class RootD3PD; /** diff --git a/PhysicsAnalysis/D3PDMaker/D3PDMakerTest/src/IN4MHLVAssociationTool.h b/PhysicsAnalysis/D3PDMaker/D3PDMakerTest/src/IN4MHLVAssociationTool.h index 78085241e47b..a27a6bf4a3fb 100644 --- a/PhysicsAnalysis/D3PDMaker/D3PDMakerTest/src/IN4MHLVAssociationTool.h +++ b/PhysicsAnalysis/D3PDMaker/D3PDMakerTest/src/IN4MHLVAssociationTool.h @@ -19,7 +19,8 @@ #include "D3PDMakerUtils/SingleAssociationTool.h" #include "CLHEP/Vector/LorentzVector.h" -class INavigable4Momentum; +#include "EventKernel/INavigable4Momentum.h" + namespace D3PDTest { diff --git a/PhysicsAnalysis/D3PDMaker/D3PDMakerTest/src/Obj5FillerTool.h b/PhysicsAnalysis/D3PDMaker/D3PDMakerTest/src/Obj5FillerTool.h index ed46703589d1..a7d85cb22ba8 100644 --- a/PhysicsAnalysis/D3PDMaker/D3PDMakerTest/src/Obj5FillerTool.h +++ b/PhysicsAnalysis/D3PDMaker/D3PDMakerTest/src/Obj5FillerTool.h @@ -17,13 +17,11 @@ #include "D3PDMakerUtils/BlockFillerTool.h" - +#include "D3PDMakerTest/Obj5.h" namespace D3PDTest { -class Obj5; - /** * @brief D3PD maker regression tests. diff --git a/PhysicsAnalysis/D3PDMaker/D3PDMakerUtils/D3PDMakerUtils/IndexMap.h b/PhysicsAnalysis/D3PDMaker/D3PDMakerUtils/D3PDMakerUtils/IndexMap.h index 6feebeb25e2c..b142e8ec86de 100644 --- a/PhysicsAnalysis/D3PDMaker/D3PDMakerUtils/D3PDMakerUtils/IndexMap.h +++ b/PhysicsAnalysis/D3PDMaker/D3PDMakerUtils/D3PDMakerUtils/IndexMap.h @@ -25,6 +25,7 @@ #include "D3PDMakerUtils/TypeConverter.h" +#include "D3PDMakerInterfaces/ICollectionGetterRegistryTool.h" #include "GaudiKernel/IIncidentListener.h" #include "GaudiKernel/ToolHandle.h" #include <string> @@ -35,7 +36,6 @@ namespace D3PD { -class ICollectionGetterRegistryTool; class ICollectionGetterTool; diff --git a/PhysicsAnalysis/D3PDMaker/EventCommonD3PDMaker/src/LBMetadataTool.h b/PhysicsAnalysis/D3PDMaker/EventCommonD3PDMaker/src/LBMetadataTool.h index c32b051b80b5..daeccb39f4ec 100644 --- a/PhysicsAnalysis/D3PDMaker/EventCommonD3PDMaker/src/LBMetadataTool.h +++ b/PhysicsAnalysis/D3PDMaker/EventCommonD3PDMaker/src/LBMetadataTool.h @@ -19,9 +19,7 @@ #include "D3PDMakerInterfaces/IMetadataTool.h" #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" - - -class ILumiBlockMetaDataTool; +#include "LumiBlockComps/ILumiBlockMetaDataTool.h" namespace D3PD { diff --git a/PhysicsAnalysis/D3PDMaker/EventCommonD3PDMaker/src/SkimDecisionFillerTool.h b/PhysicsAnalysis/D3PDMaker/EventCommonD3PDMaker/src/SkimDecisionFillerTool.h index 5c2371bd3e88..e74b1594a7f3 100644 --- a/PhysicsAnalysis/D3PDMaker/EventCommonD3PDMaker/src/SkimDecisionFillerTool.h +++ b/PhysicsAnalysis/D3PDMaker/EventCommonD3PDMaker/src/SkimDecisionFillerTool.h @@ -19,13 +19,11 @@ #include "D3PDMakerUtils/BlockFillerTool.h" +#include "EventBookkeeperMetaData/SkimDecisionCollection.h" #include <string> #include <vector> -class SkimDecisionCollection; - - namespace D3PD { diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/src/JetTagMSVVtxInfoFillerTool.h b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/src/JetTagMSVVtxInfoFillerTool.h index feca0a23ff36..f08b6c48254a 100644 --- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/src/JetTagMSVVtxInfoFillerTool.h +++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/src/JetTagMSVVtxInfoFillerTool.h @@ -13,9 +13,7 @@ #define JetTagD3PDMaker_JetTagMSVVtxInfoFillerTool_H #include "D3PDMakerUtils/BlockFillerTool.h" -namespace Analysis{ -class MSVVtxInfo; -} +#include "JetTagInfo/MSVVtxInfo.h" namespace D3PD { diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/src/JetTagPixelModCondFillerTool.h b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/src/JetTagPixelModCondFillerTool.h index 546753840aa0..2b0d45ec2152 100644 --- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/src/JetTagPixelModCondFillerTool.h +++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/src/JetTagPixelModCondFillerTool.h @@ -13,6 +13,7 @@ #define JetTagD3PDMaker_JetTagPixelModCondFillerTool_H #include "D3PDMakerUtils/BlockFillerTool.h" +#include "InDetConditionsSummaryService/IInDetConditionsSvc.h" #include <vector> @@ -23,7 +24,6 @@ namespace InDetDD{ class PixelID; -class IInDetConditionsSvc; namespace D3PD { diff --git a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/src/MuonSpShowerFillerTool.h b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/src/MuonSpShowerFillerTool.h index f356c063c64a..4bfc71681935 100644 --- a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/src/MuonSpShowerFillerTool.h +++ b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/src/MuonSpShowerFillerTool.h @@ -17,10 +17,7 @@ #include "D3PDMakerUtils/BlockFillerTool.h" #include "StoreGate/StoreGateSvc.h" - -namespace Rec{ -class MuonSpShower; -} +#include "muonEvent/MuonSpShower.h" namespace D3PD { diff --git a/PhysicsAnalysis/D3PDMaker/QcdD3PDMaker/QcdD3PDMaker/fillers/MuonSpShowerFillerTool.h b/PhysicsAnalysis/D3PDMaker/QcdD3PDMaker/QcdD3PDMaker/fillers/MuonSpShowerFillerTool.h index adf67662416a..8536b08df556 100644 --- a/PhysicsAnalysis/D3PDMaker/QcdD3PDMaker/QcdD3PDMaker/fillers/MuonSpShowerFillerTool.h +++ b/PhysicsAnalysis/D3PDMaker/QcdD3PDMaker/QcdD3PDMaker/fillers/MuonSpShowerFillerTool.h @@ -17,10 +17,7 @@ #include "D3PDMakerUtils/BlockFillerTool.h" #include "StoreGate/StoreGateSvc.h" - -namespace Rec{ -class MuonSpShower; -} +#include "muonEvent/MuonSpShower.h" namespace QcdD3PD { diff --git a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/PerigeeBLPredictionFillerTool.h b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/PerigeeBLPredictionFillerTool.h index 0770fdf9eea1..a398dba3b03d 100644 --- a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/PerigeeBLPredictionFillerTool.h +++ b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/PerigeeBLPredictionFillerTool.h @@ -18,14 +18,10 @@ #include "GaudiKernel/ToolHandle.h" #include "Identifier/Identifier.h" #include "TrkParameters/TrackParameters.h" +#include "InDetRecToolInterfaces/IInDetTestBLayerTool.h" class PixelID; -namespace InDet { - class IInDetTestBLayerTool; -} - - namespace D3PD { /** diff --git a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/SCTTrackParticleToMuonAssociationTool.h b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/SCTTrackParticleToMuonAssociationTool.h index 7a2730050ce1..340290b4284b 100644 --- a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/SCTTrackParticleToMuonAssociationTool.h +++ b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/SCTTrackParticleToMuonAssociationTool.h @@ -14,11 +14,7 @@ #include "D3PDMakerUtils/SingleAssociationTool.h" - - -namespace Analysis { - class Muon; -} +#include "muonEvent/Muon.h" namespace Rec { class TrackParticle; diff --git a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/TrackIsolationFillerTool.h b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/TrackIsolationFillerTool.h index eac870921a2b..458d3f8c0eef 100644 --- a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/TrackIsolationFillerTool.h +++ b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/TrackIsolationFillerTool.h @@ -21,12 +21,12 @@ #include "xAODPrimitives/IsolationType.h" #include "xAODPrimitives/IsolationFlavour.h" #include "GaudiKernel/ToolHandle.h" +#include "RecoToolInterfaces/ICaloCellIsolationTool.h" +#include "RecoToolInterfaces/ITrackIsolationTool.h" #include <string> namespace xAOD { class IParticle; -class ITrackIsolationTool; -class ICaloCellIsolationTool; } diff --git a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/TrackStateOnSurfaceFillerTool.h b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/TrackStateOnSurfaceFillerTool.h index a2c0eeec2c04..86fedab7d88b 100644 --- a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/TrackStateOnSurfaceFillerTool.h +++ b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/TrackStateOnSurfaceFillerTool.h @@ -11,6 +11,9 @@ #include "Identifier/Identifier.h" #include "GaudiKernel/ServiceHandle.h" #include "GaudiKernel/ToolHandle.h" +#include "TrkToolInterfaces/IResidualPullCalculator.h" +#include "TRT_ConditionsServices/ITRT_CalDbSvc.h" +#include "TRT_DriftFunctionTool/ITRT_DriftFunctionTool.h" class AtlasDetectorID; class PixelID; @@ -20,14 +23,11 @@ class MdtIdHelper; class CscIdHelper; class RpcIdHelper; class TgcIdHelper; -class ITRT_CalDbSvc; namespace Trk { class TrackStateOnSurface; - class IResidualPullCalculator; } -class ITRT_DriftFunctionTool; namespace D3PD { diff --git a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/VertexPurityFillerTool.h b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/VertexPurityFillerTool.h index b649fe591dca..4d18fc24b44b 100644 --- a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/VertexPurityFillerTool.h +++ b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/VertexPurityFillerTool.h @@ -7,10 +7,10 @@ #include "D3PDMakerUtils/BlockFillerTool.h" #include "GaudiKernel/ToolHandle.h" +#include "TrkVertexFitterValidationUtils/TrkPriVxPurityTool.h" namespace Trk{ class VxCandidate; -class TrkPriVxPurityTool; } namespace D3PD { diff --git a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/TriggerBitFillerTool.h b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/TriggerBitFillerTool.h index 0cc3e2b1d508..f929b27ed0f1 100644 --- a/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/TriggerBitFillerTool.h +++ b/PhysicsAnalysis/D3PDMaker/TriggerD3PDMaker/src/TriggerBitFillerTool.h @@ -20,13 +20,12 @@ #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" #include "GaudiKernel/IIncidentListener.h" +#include "TrigDecisionTool/TrigDecisionTool.h" + #include <vector> #include <string> #include <set> #include <map> -namespace Trig { - class TrigDecisionTool; -} class IIncidentSvc; diff --git a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/GenParticlePerigeeFillerTool.h b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/GenParticlePerigeeFillerTool.h index ebd6f233abb2..052563d260b2 100644 --- a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/GenParticlePerigeeFillerTool.h +++ b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/GenParticlePerigeeFillerTool.h @@ -8,10 +8,7 @@ #include "D3PDMakerUtils/BlockFillerTool.h" #include "HepMC/GenParticle.h" #include "GaudiKernel/ToolHandle.h" - -namespace Trk { -class ITruthToTrack; -} +#include "TrkToolInterfaces/ITruthToTrack.h" namespace D3PD { diff --git a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthParticleFillerTool.h b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthParticleFillerTool.h index 53761d0bd2bc..5b060aed5584 100644 --- a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthParticleFillerTool.h +++ b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthParticleFillerTool.h @@ -19,8 +19,7 @@ #include "McParticleEvent/TruthParticle.h" #include "xAODTruth/TruthParticle.h" #include "GaudiKernel/ServiceHandle.h" -class IPartPropSvc; - +#include "GaudiKernel/IPartPropSvc.h" namespace D3PD { diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaMaxECellAlg.h b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaMaxECellAlg.h index 6cd1dba08963..65ea195b7391 100644 --- a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaMaxECellAlg.h +++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaMaxECellAlg.h @@ -19,11 +19,11 @@ #include "AthenaBaseComps/AthAlgorithm.h" #include "GaudiKernel/ToolHandle.h" +#include "LArCabling/LArCablingService.h" + #include <vector> #include <string> -class LArCablingService; - namespace D3PD { diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaTruthAlg.h b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaTruthAlg.h index 3c994bb8ecd1..805f385207cd 100644 --- a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaTruthAlg.h +++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaTruthAlg.h @@ -20,12 +20,11 @@ #include "AthenaBaseComps/AthAlgorithm.h" #include "xAODTruth/TruthParticle.h" #include "xAODTruth/TruthParticleContainer.h" +#include "RecoToolInterfaces/IParticleCaloExtensionTool.h" + #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" #include <string> -namespace Trk { -class IParticleCaloExtensionTool; -} namespace D3PD { diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/src/ElectronJetDRAssociator.h b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/src/ElectronJetDRAssociator.h index 1a2d14561fc7..eb8c11f7a885 100644 --- a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/src/ElectronJetDRAssociator.h +++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/src/ElectronJetDRAssociator.h @@ -21,13 +21,14 @@ #include "D3PDMakerUtils/MultiAssociationTool.h" #include "xAODEgamma/Electron.h" #include "xAODJet/Jet.h" +#include "TrkVertexFitterInterfaces/ITrackToVertexIPEstimator.h" #include "GaudiKernel/ToolHandle.h" #include <string> #include <vector> -namespace Trk { class VxCandidate; class ITrackToVertexIPEstimator; } +namespace Trk { class VxCandidate; } namespace D3PD { diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/src/ElectronL2TriggerObjectAssociationTool.h b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/src/ElectronL2TriggerObjectAssociationTool.h index 1e55050c1ead..707b336eb284 100644 --- a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/src/ElectronL2TriggerObjectAssociationTool.h +++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/src/ElectronL2TriggerObjectAssociationTool.h @@ -21,8 +21,9 @@ // when the TriggerObjectAssociationTool code is instantiated. class TrigElectron; class I4Momentum; +class IAlgTool; namespace D3PD { -bool lessForTriggerAssociation (void* tool, +bool lessForTriggerAssociation (IAlgTool* tool, const I4Momentum* p0, const TrigElectron* p1, const TrigElectron* p2); @@ -33,7 +34,6 @@ bool lessForTriggerAssociation (void* tool, #include "TrigObjectMatching/DistanceFunctor.h" #include "D3PDMakerUtils/IndexMap.h" #include "egammaEvent/egamma.h" -#include "TrigParticle/TrigElectron.h" #include "TrigParticle/TrigElectronContainer.h" #include "GaudiKernel/ToolHandle.h" diff --git a/PhysicsAnalysis/DPDUtils/DPDUtils/DPDTagTool.h b/PhysicsAnalysis/DPDUtils/DPDUtils/DPDTagTool.h index e3bdfb555a5e..fe4177b729a9 100644 --- a/PhysicsAnalysis/DPDUtils/DPDUtils/DPDTagTool.h +++ b/PhysicsAnalysis/DPDUtils/DPDUtils/DPDTagTool.h @@ -44,10 +44,6 @@ class DPDTagTool : public AthAlgTool { virtual StatusCode stop(); virtual StatusCode finalize(); - protected: - // Standard destructor - virtual ~DPDTagTool(); - private: ServiceHandle<StoreGateSvc> m_pMetaDataStore; diff --git a/PhysicsAnalysis/DPDUtils/src/DPDTagTool.cxx b/PhysicsAnalysis/DPDUtils/src/DPDTagTool.cxx index 14ba5fdd6392..4e906c951b02 100644 --- a/PhysicsAnalysis/DPDUtils/src/DPDTagTool.cxx +++ b/PhysicsAnalysis/DPDUtils/src/DPDTagTool.cxx @@ -25,9 +25,6 @@ DPDTagTool::DPDTagTool(const std::string& type, const std::string& name, const I } -DPDTagTool::~DPDTagTool() {} - - StatusCode DPDTagTool::initialize() { ATH_MSG_DEBUG("in initialize()"); diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/DerivationFrameworkEGamma/BkgElectronClassification.h b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/DerivationFrameworkEGamma/BkgElectronClassification.h index 4924d9ffb15e..1bb3901b5ecb 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/DerivationFrameworkEGamma/BkgElectronClassification.h +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/DerivationFrameworkEGamma/BkgElectronClassification.h @@ -7,6 +7,7 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "DerivationFrameworkInterfaces/IAugmentationTool.h" +#include "MCTruthClassifier/IMCTruthClassifier.h" #include "GaudiKernel/ToolHandle.h" class IMCTruthClassifier; diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/DerivationFrameworkInDet/TrackStateOnSurfaceDecorator.h b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/DerivationFrameworkInDet/TrackStateOnSurfaceDecorator.h index 052b221e4168..bc5cecd77c19 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/DerivationFrameworkInDet/TrackStateOnSurfaceDecorator.h +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/DerivationFrameworkInDet/TrackStateOnSurfaceDecorator.h @@ -18,23 +18,22 @@ #include "GaudiKernel/ServiceHandle.h" #include "AthLinks/ElementLink.h" #include "xAODTracking/TrackMeasurementValidationContainer.h" - +#include "TrkExInterfaces/IExtrapolator.h" +#include "TrkToolInterfaces/IPRD_AssociationTool.h" +#include "TrkToolInterfaces/IResidualPullCalculator.h" +#include "TrkToolInterfaces/ITrackHoleSearchTool.h" +#include "TRT_ConditionsServices/ITRT_CalDbSvc.h" +#include "TRT_ToT_Tools/ITRT_ToT_dEdx.h" +#include "TrkToolInterfaces/IUpdator.h" class AtlasDetectorID; class PixelID; class SCT_ID; class TRT_ID; -class ITRT_CalDbSvc; -class ITRT_ToT_dEdx; - namespace Trk { class IUpdator; - class IResidualPullCalculator; - class ITrackHoleSearchTool; class PrepRawData; - class IExtrapolator; - class IPRD_AssociationTool; } namespace DerivationFramework { diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/DerivationFrameworkInDet/TrackToVertexWrapper.h b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/DerivationFrameworkInDet/TrackToVertexWrapper.h index 78fdd6287eb7..e22bdea82026 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/DerivationFrameworkInDet/TrackToVertexWrapper.h +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/DerivationFrameworkInDet/TrackToVertexWrapper.h @@ -15,11 +15,7 @@ #include "DerivationFrameworkInterfaces/IAugmentationTool.h" #include "GaudiKernel/ToolHandle.h" #include "xAODTracking/VertexContainer.h" - -namespace Trk -{ - class ITrackToVertexIPEstimator; -} +#include "TrkVertexFitterInterfaces/ITrackToVertexIPEstimator.h" namespace DerivationFramework { diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/DerivationFrameworkTau/TauOverlappingElectronLLHDecoratorWrapper.h b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/DerivationFrameworkTau/TauOverlappingElectronLLHDecoratorWrapper.h index 298c81e7b5b6..09c6ede98691 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/DerivationFrameworkTau/TauOverlappingElectronLLHDecoratorWrapper.h +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/DerivationFrameworkTau/TauOverlappingElectronLLHDecoratorWrapper.h @@ -16,16 +16,11 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "DerivationFrameworkInterfaces/IAugmentationTool.h" #include "GaudiKernel/ToolHandle.h" +#include "TauAnalysisTools/ITauOverlappingElectronLLHDecorator.h" -//#include "TauAnalysisTools/ITauOverlappingElectronLLHDecorator.h" //#include "xAODTau/TauJetContainer.h" //#include "xAODEgamma/ElectronContainer.h" -/** - * @short Forward declarations - */ -namespace TauAnalysisTools { class ITauOverlappingElectronLLHDecorator; } - /** * @class TauOverlappingElectronLLHDecoratorWrapper * @brief wrapper tool for decorating reconstructed taus with a likelihood score of matched reconstructed electrons diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/DerivationFrameworkTau/TauPVRefitTool.h b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/DerivationFrameworkTau/TauPVRefitTool.h index 1c3edd1f8f65..ba4646e62f1d 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/DerivationFrameworkTau/TauPVRefitTool.h +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/DerivationFrameworkTau/TauPVRefitTool.h @@ -17,6 +17,7 @@ #include "xAODTracking/VertexContainer.h" #include "xAODTracking/VertexAuxContainer.h" #include "GaudiKernel/ToolHandle.h" +#include "JpsiUpsilonTools/PrimaryVertexRefitter.h" /** * refit any primary vertex in the PV collection that contains any @@ -25,8 +26,6 @@ * links to the refitted PV container */ -namespace Analysis { class PrimaryVertexRefitter; } - namespace DerivationFramework { class TauPVRefitTool : public AthAlgTool, public IAugmentationTool { diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/DerivationFrameworkTau/TauPVTrkSelectionTool.h b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/DerivationFrameworkTau/TauPVTrkSelectionTool.h index a048a3fd2873..985cecab50eb 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/DerivationFrameworkTau/TauPVTrkSelectionTool.h +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/DerivationFrameworkTau/TauPVTrkSelectionTool.h @@ -17,6 +17,7 @@ #include "xAODTracking/TrackParticleContainer.h" #include "xAODTracking/TrackParticle.h" #include "GaudiKernel/ToolHandle.h" +#include "TauAnalysisTools/ITauTruthTrackMatchingTool.h" /** * tool for selecting tracks associated to tau candidates (xAOD::TauJetContainer) @@ -24,8 +25,6 @@ * if UseTrueTracks = true, use truth matched tracks only */ -namespace TauAnalysisTools { class ITauTruthTrackMatchingTool; } - namespace DerivationFramework { class TauPVTrkSelectionTool : public AthAlgTool, public IAugmentationTool { diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/DerivationFrameworkTau/TauTruthMatchingWrapper.h b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/DerivationFrameworkTau/TauTruthMatchingWrapper.h index 2a6cac45c551..1f32df1c13c5 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/DerivationFrameworkTau/TauTruthMatchingWrapper.h +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/DerivationFrameworkTau/TauTruthMatchingWrapper.h @@ -15,13 +15,12 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "DerivationFrameworkInterfaces/IAugmentationTool.h" #include "GaudiKernel/ToolHandle.h" +#include "TauAnalysisTools/ITauTruthMatchingTool.h" /** * wrapper tool for tau truth matching */ -namespace TauAnalysisTools { class ITauTruthMatchingTool; } - namespace DerivationFramework { class TauTruthMatchingWrapper : public AthAlgTool, public IAugmentationTool { diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/ElectronPhotonTagTools/EgammaTagTool.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/ElectronPhotonTagTools/EgammaTagTool.h index 5d972d87bee3..bb34fa968b58 100755 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/ElectronPhotonTagTools/EgammaTagTool.h +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/ElectronPhotonTagTools/EgammaTagTool.h @@ -59,11 +59,6 @@ private: const DataHandle<EventInfo>& eventInfo); -protected: - - /** Standard destructor */ - virtual ~EgammaTagTool( ); - private: /** Properties */ std::string m_electronContainer; diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/ElectronPhotonTagTools/ElectronTagTool.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/ElectronPhotonTagTools/ElectronTagTool.h index e6c42d3b5300..16b5f86ca5e6 100755 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/ElectronPhotonTagTools/ElectronTagTool.h +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/ElectronPhotonTagTools/ElectronTagTool.h @@ -49,11 +49,6 @@ public: virtual StatusCode execute(TagFragmentCollection& electronTagCol, const int& max); virtual StatusCode finalize(); -protected: - - /** Standard destructor */ - virtual ~ElectronTagTool( ); - private: /** private function to get impact parameter */ diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/ElectronPhotonTagTools/PhotonTagTool.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/ElectronPhotonTagTools/PhotonTagTool.h index 469032865ec3..0f9dd7881527 100755 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/ElectronPhotonTagTools/PhotonTagTool.h +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/ElectronPhotonTagTools/PhotonTagTool.h @@ -48,11 +48,6 @@ public: virtual StatusCode execute(TagFragmentCollection& photonTagCol, const int& max); virtual StatusCode finalize(); -protected: - - /** Standard destructor */ - virtual ~PhotonTagTool( ); - private: /** Properties */ diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/src/EgammaTagTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/src/EgammaTagTool.cxx index 8f69bc6d7be5..15dc4f127705 100755 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/src/EgammaTagTool.cxx +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/src/EgammaTagTool.cxx @@ -118,9 +118,6 @@ StatusCode EgammaTagTool::finalize() { return StatusCode::SUCCESS; } -/** destructor */ -EgammaTagTool::~EgammaTagTool() {} - bool EgammaTagTool::ZeeSelection (const xAOD::ElectronContainer* eleColl, const DataHandle<EventInfo>& eventInfo) diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/src/ElectronTagTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/src/ElectronTagTool.cxx index 6dd3a124adee..dd52faf91ddf 100755 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/src/ElectronTagTool.cxx +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/src/ElectronTagTool.cxx @@ -515,9 +515,6 @@ StatusCode ElectronTagTool::finalize() { return StatusCode::SUCCESS; } -/** destructor */ -ElectronTagTool::~ElectronTagTool() {} - /** private function to get impact parameter */ void ElectronTagTool::getElectronImpactParameter (const xAOD::Electron* elec, double& d0_significance, double& z0_sintheta) { diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/src/PhotonTagTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/src/PhotonTagTool.cxx index f5c3057945ec..cc82e2b228d7 100755 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/src/PhotonTagTool.cxx +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/src/PhotonTagTool.cxx @@ -486,7 +486,4 @@ StatusCode PhotonTagTool::finalize() { return StatusCode::SUCCESS; } -/** destructor */ -PhotonTagTool::~PhotonTagTool() {} - diff --git a/PhysicsAnalysis/EventTag/EventTagUtils/EventTagUtils/EventInfoTagTool.h b/PhysicsAnalysis/EventTag/EventTagUtils/EventTagUtils/EventInfoTagTool.h index 4a87861b8dc8..994062e28230 100755 --- a/PhysicsAnalysis/EventTag/EventTagUtils/EventTagUtils/EventInfoTagTool.h +++ b/PhysicsAnalysis/EventTag/EventTagUtils/EventTagUtils/EventInfoTagTool.h @@ -22,13 +22,13 @@ Purpose : Tool to buid the Global Event Tags #include "TagEvent/TagFragmentCollection.h" #include "AthenaPoolUtilities/AthenaAttributeSpecification.h" #include "xAODEventInfo/EventInfo.h" +#include "LumiBlockComps/ILumiBlockMuTool.h" #include <map> #include <vector> #include <string> // forward declarations -class ILumiBlockMuTool; /** Interface ID for EventInfoTagTool */ static const InterfaceID IID_EventInfoTagTool("EventInfoTagTool", 1, 0); @@ -56,9 +56,6 @@ parent); protected: - /** Standard destructor */ - virtual ~EventInfoTagTool( ); - /** the various components to build their own fragments of tag */ StatusCode eventTag (TagFragmentCollection& eventTagCol, const DataHandle<xAOD::EventInfo> eventInfo); StatusCode eventTagFlags (TagFragmentCollection& eventTagCol, const DataHandle<xAOD::EventInfo> eventInfo); diff --git a/PhysicsAnalysis/EventTag/EventTagUtils/EventTagUtils/GlobalEventTagTool.h b/PhysicsAnalysis/EventTag/EventTagUtils/EventTagUtils/GlobalEventTagTool.h index 1aef8b5f6a14..ea831bbead04 100755 --- a/PhysicsAnalysis/EventTag/EventTagUtils/EventTagUtils/GlobalEventTagTool.h +++ b/PhysicsAnalysis/EventTag/EventTagUtils/EventTagUtils/GlobalEventTagTool.h @@ -49,11 +49,6 @@ parent); virtual StatusCode execute(TagFragmentCollection& eventTagCol); virtual StatusCode finalize(); -protected: - - /** Standard destructor */ - virtual ~GlobalEventTagTool( ); - private: /** the various components to build their own fragments of tag */ diff --git a/PhysicsAnalysis/EventTag/EventTagUtils/EventTagUtils/GlobalTriggerTagTool.h b/PhysicsAnalysis/EventTag/EventTagUtils/EventTagUtils/GlobalTriggerTagTool.h index 0d79992e9981..022408b8c7f0 100755 --- a/PhysicsAnalysis/EventTag/EventTagUtils/EventTagUtils/GlobalTriggerTagTool.h +++ b/PhysicsAnalysis/EventTag/EventTagUtils/EventTagUtils/GlobalTriggerTagTool.h @@ -56,11 +56,6 @@ parent); virtual StatusCode execute(TagFragmentCollection& eventTagCol, const std::vector<int>& max); virtual StatusCode finalize(); -protected: - - /** Standard destructor */ - virtual ~GlobalTriggerTagTool( ); - private: inline bool isPassed(std::string, unsigned int); diff --git a/PhysicsAnalysis/EventTag/EventTagUtils/EventTagUtils/RawInfoSummaryForTagTool.h b/PhysicsAnalysis/EventTag/EventTagUtils/EventTagUtils/RawInfoSummaryForTagTool.h index 99e9213d7283..7c5fbb7a81f5 100755 --- a/PhysicsAnalysis/EventTag/EventTagUtils/EventTagUtils/RawInfoSummaryForTagTool.h +++ b/PhysicsAnalysis/EventTag/EventTagUtils/EventTagUtils/RawInfoSummaryForTagTool.h @@ -41,11 +41,6 @@ parent); virtual StatusCode execute(TagFragmentCollection& dataQualityTagCol); virtual StatusCode finalize(); -protected: - - /** Standard destructor */ - virtual ~RawInfoSummaryForTagTool( ); - private: /** Properties */ diff --git a/PhysicsAnalysis/EventTag/EventTagUtils/EventTagUtils/RegistrationStreamTrig.h b/PhysicsAnalysis/EventTag/EventTagUtils/EventTagUtils/RegistrationStreamTrig.h index abe7f6c8772e..7f1bf53b3138 100755 --- a/PhysicsAnalysis/EventTag/EventTagUtils/EventTagUtils/RegistrationStreamTrig.h +++ b/PhysicsAnalysis/EventTag/EventTagUtils/EventTagUtils/RegistrationStreamTrig.h @@ -53,9 +53,6 @@ public: protected: - /// Standard Destructor - virtual ~RegistrationStreamTrig(); - ServiceHandle<StoreGateSvc> m_pOutputStore; ServiceHandle<StoreGateSvc> m_pInputStore; StringProperty m_LBColl_name; diff --git a/PhysicsAnalysis/EventTag/EventTagUtils/src/EventInfoTagTool.cxx b/PhysicsAnalysis/EventTag/EventTagUtils/src/EventInfoTagTool.cxx index 2522c26771fd..012e94e184f9 100755 --- a/PhysicsAnalysis/EventTag/EventTagUtils/src/EventInfoTagTool.cxx +++ b/PhysicsAnalysis/EventTag/EventTagUtils/src/EventInfoTagTool.cxx @@ -305,6 +305,3 @@ StatusCode EventInfoTagTool::stop() { return AthAlgTool::stop(); } - -/** destructor */ -EventInfoTagTool::~EventInfoTagTool() {} diff --git a/PhysicsAnalysis/EventTag/EventTagUtils/src/GlobalEventTagTool.cxx b/PhysicsAnalysis/EventTag/EventTagUtils/src/GlobalEventTagTool.cxx index bde8cedbc35c..ab3b71c0287f 100755 --- a/PhysicsAnalysis/EventTag/EventTagUtils/src/GlobalEventTagTool.cxx +++ b/PhysicsAnalysis/EventTag/EventTagUtils/src/GlobalEventTagTool.cxx @@ -365,6 +365,3 @@ StatusCode GlobalEventTagTool::finalize() { ATH_MSG_DEBUG("in finalize()"); return EventInfoTagTool::finalize(); } - -/** destructor */ -GlobalEventTagTool::~GlobalEventTagTool() {} diff --git a/PhysicsAnalysis/EventTag/EventTagUtils/src/GlobalTriggerTagTool.cxx b/PhysicsAnalysis/EventTag/EventTagUtils/src/GlobalTriggerTagTool.cxx index 42d164ec0005..e736511426a3 100755 --- a/PhysicsAnalysis/EventTag/EventTagUtils/src/GlobalTriggerTagTool.cxx +++ b/PhysicsAnalysis/EventTag/EventTagUtils/src/GlobalTriggerTagTool.cxx @@ -369,9 +369,6 @@ StatusCode GlobalTriggerTagTool::finalize() { return StatusCode::SUCCESS; } -/** destructor */ -GlobalTriggerTagTool::~GlobalTriggerTagTool() {} - inline bool GlobalTriggerTagTool::isPassed(std::string name, unsigned int condition) { return m_trigDec->isPassed(name, condition); } diff --git a/PhysicsAnalysis/EventTag/EventTagUtils/src/RawInfoSummaryForTagTool.cxx b/PhysicsAnalysis/EventTag/EventTagUtils/src/RawInfoSummaryForTagTool.cxx index a57f828f76a6..ed866fb59383 100755 --- a/PhysicsAnalysis/EventTag/EventTagUtils/src/RawInfoSummaryForTagTool.cxx +++ b/PhysicsAnalysis/EventTag/EventTagUtils/src/RawInfoSummaryForTagTool.cxx @@ -137,9 +137,3 @@ StatusCode RawInfoSummaryForTagTool::finalize() { return StatusCode::SUCCESS; } - -/** destructor */ -RawInfoSummaryForTagTool::~RawInfoSummaryForTagTool() {} - - - diff --git a/PhysicsAnalysis/EventTag/EventTagUtils/src/RegistrationStreamTrig.cxx b/PhysicsAnalysis/EventTag/EventTagUtils/src/RegistrationStreamTrig.cxx index 77239879d11c..f009ba23d8c9 100755 --- a/PhysicsAnalysis/EventTag/EventTagUtils/src/RegistrationStreamTrig.cxx +++ b/PhysicsAnalysis/EventTag/EventTagUtils/src/RegistrationStreamTrig.cxx @@ -53,10 +53,6 @@ RegistrationStreamTrig::RegistrationStreamTrig(const std::string& name, declareProperty("GetTriggerConf", m_gettriggerconf=true); } -// Standard Destructor -RegistrationStreamTrig::~RegistrationStreamTrig() { -} - // initialize data writer StatusCode RegistrationStreamTrig::initialize() diff --git a/PhysicsAnalysis/ExoticPhys/ExoticPhysTagTools/ExoticPhysTagTools/ExoticPhysTagTool.h b/PhysicsAnalysis/ExoticPhys/ExoticPhysTagTools/ExoticPhysTagTools/ExoticPhysTagTool.h index ede9249670db..220131b20990 100755 --- a/PhysicsAnalysis/ExoticPhys/ExoticPhysTagTools/ExoticPhysTagTools/ExoticPhysTagTool.h +++ b/PhysicsAnalysis/ExoticPhys/ExoticPhysTagTools/ExoticPhysTagTools/ExoticPhysTagTool.h @@ -41,11 +41,6 @@ parent); virtual StatusCode execute(TagFragmentCollection& exoticTagCol, const int max); virtual StatusCode finalize(); -protected: - - /** Standard destructor */ - virtual ~ExoticPhysTagTool( ); - private: /** Properties */ diff --git a/PhysicsAnalysis/ExoticPhys/ExoticPhysTagTools/src/ExoticPhysTagTool.cxx b/PhysicsAnalysis/ExoticPhys/ExoticPhysTagTools/src/ExoticPhysTagTool.cxx index 6299c3536cf6..fb7cbe57da36 100755 --- a/PhysicsAnalysis/ExoticPhys/ExoticPhysTagTools/src/ExoticPhysTagTool.cxx +++ b/PhysicsAnalysis/ExoticPhys/ExoticPhysTagTools/src/ExoticPhysTagTool.cxx @@ -77,7 +77,4 @@ StatusCode ExoticPhysTagTool::finalize() { return StatusCode::SUCCESS; } -/** destructor */ -ExoticPhysTagTool::~ExoticPhysTagTool() {} - diff --git a/PhysicsAnalysis/HeavyIonPhys/HeavyIonPhysTagTools/HeavyIonPhysTagTools/HeavyIonPhysTagTool.h b/PhysicsAnalysis/HeavyIonPhys/HeavyIonPhysTagTools/HeavyIonPhysTagTools/HeavyIonPhysTagTool.h index f5085d22e40c..850f274266da 100755 --- a/PhysicsAnalysis/HeavyIonPhys/HeavyIonPhysTagTools/HeavyIonPhysTagTools/HeavyIonPhysTagTool.h +++ b/PhysicsAnalysis/HeavyIonPhys/HeavyIonPhysTagTools/HeavyIonPhysTagTools/HeavyIonPhysTagTool.h @@ -40,11 +40,6 @@ public: virtual StatusCode execute(TagFragmentCollection& heavyIonTagCol, const int max); virtual StatusCode finalize(); -protected: - - /** Standard destructor */ - virtual ~HeavyIonPhysTagTool( ); - private: /** Properties */ diff --git a/PhysicsAnalysis/HeavyIonPhys/HeavyIonPhysTagTools/src/HeavyIonPhysTagTool.cxx b/PhysicsAnalysis/HeavyIonPhys/HeavyIonPhysTagTools/src/HeavyIonPhysTagTool.cxx index a2977124f14a..e6f98b4671aa 100755 --- a/PhysicsAnalysis/HeavyIonPhys/HeavyIonPhysTagTools/src/HeavyIonPhysTagTool.cxx +++ b/PhysicsAnalysis/HeavyIonPhys/HeavyIonPhysTagTools/src/HeavyIonPhysTagTool.cxx @@ -76,7 +76,5 @@ StatusCode HeavyIonPhysTagTool::finalize() { return StatusCode::SUCCESS; } -/** destructor */ -HeavyIonPhysTagTool::~HeavyIonPhysTagTool() {} diff --git a/PhysicsAnalysis/HiggsPhys/HiggsPhysTagTools/HiggsPhysTagTools/HiggsPhysTagTool.h b/PhysicsAnalysis/HiggsPhys/HiggsPhysTagTools/HiggsPhysTagTools/HiggsPhysTagTool.h index 5aef86d2da61..7f19809e5ab4 100755 --- a/PhysicsAnalysis/HiggsPhys/HiggsPhysTagTools/HiggsPhysTagTools/HiggsPhysTagTool.h +++ b/PhysicsAnalysis/HiggsPhys/HiggsPhysTagTools/HiggsPhysTagTools/HiggsPhysTagTool.h @@ -40,11 +40,6 @@ public: virtual StatusCode execute(TagFragmentCollection& higgsTagCol, const int max); virtual StatusCode finalize(); -protected: - - /** Standard destructor */ - virtual ~HiggsPhysTagTool( ); - private: /** Properties */ diff --git a/PhysicsAnalysis/HiggsPhys/HiggsPhysTagTools/src/HiggsPhysTagTool.cxx b/PhysicsAnalysis/HiggsPhys/HiggsPhysTagTools/src/HiggsPhysTagTool.cxx index 70a334bf82e0..b0f0fba19576 100755 --- a/PhysicsAnalysis/HiggsPhys/HiggsPhysTagTools/src/HiggsPhysTagTool.cxx +++ b/PhysicsAnalysis/HiggsPhys/HiggsPhysTagTools/src/HiggsPhysTagTool.cxx @@ -76,7 +76,3 @@ StatusCode HiggsPhysTagTool::finalize() { ATH_MSG_DEBUG( "in finalize()" ); return StatusCode::SUCCESS; } - -/** destructor */ -HiggsPhysTagTool::~HiggsPhysTagTool() {} - diff --git a/PhysicsAnalysis/JetMissingEtID/JetMissingEtTagTools/JetMissingEtTagTools/JetMissingEtIdentificationTagTool.h b/PhysicsAnalysis/JetMissingEtID/JetMissingEtTagTools/JetMissingEtTagTools/JetMissingEtIdentificationTagTool.h index bb6d9ec00d14..c1fdb9a24feb 100755 --- a/PhysicsAnalysis/JetMissingEtID/JetMissingEtTagTools/JetMissingEtTagTools/JetMissingEtIdentificationTagTool.h +++ b/PhysicsAnalysis/JetMissingEtID/JetMissingEtTagTools/JetMissingEtTagTools/JetMissingEtIdentificationTagTool.h @@ -40,11 +40,6 @@ public: virtual StatusCode execute(TagFragmentCollection& jetMissingEtTagCol, const int max); virtual StatusCode finalize(); -protected: - - /** Standard destructor */ - virtual ~JetMissingEtIdentificationTagTool( ); - private: /** Properties */ diff --git a/PhysicsAnalysis/JetMissingEtID/JetMissingEtTagTools/src/JetMissingEtIdentificationTagTool.cxx b/PhysicsAnalysis/JetMissingEtID/JetMissingEtTagTools/src/JetMissingEtIdentificationTagTool.cxx index 187a4b392b83..68c218c937f8 100755 --- a/PhysicsAnalysis/JetMissingEtID/JetMissingEtTagTools/src/JetMissingEtIdentificationTagTool.cxx +++ b/PhysicsAnalysis/JetMissingEtID/JetMissingEtTagTools/src/JetMissingEtIdentificationTagTool.cxx @@ -125,6 +125,3 @@ StatusCode JetMissingEtIdentificationTagTool::finalize() { return StatusCode::SUCCESS; } -/** destructor */ -JetMissingEtIdentificationTagTool::~JetMissingEtIdentificationTagTool() {} - diff --git a/PhysicsAnalysis/JetTagging/JetTaggingTagTools/JetTaggingTagTools/JetTaggingTagTool.h b/PhysicsAnalysis/JetTagging/JetTaggingTagTools/JetTaggingTagTools/JetTaggingTagTool.h index cca572dc76c1..ae18e901f3ad 100755 --- a/PhysicsAnalysis/JetTagging/JetTaggingTagTools/JetTaggingTagTools/JetTaggingTagTool.h +++ b/PhysicsAnalysis/JetTagging/JetTaggingTagTools/JetTaggingTagTools/JetTaggingTagTool.h @@ -42,11 +42,6 @@ parent); virtual StatusCode execute(TagFragmentCollection& tauIdTagCol, const int max); virtual StatusCode finalize(); -protected: - - /** Standard destructor */ - virtual ~JetTaggingTagTool( ); - private: /** Properties */ diff --git a/PhysicsAnalysis/JetTagging/JetTaggingTagTools/src/JetTaggingTagTool.cxx b/PhysicsAnalysis/JetTagging/JetTaggingTagTools/src/JetTaggingTagTool.cxx index 5de8d8334961..8d4fa1e309ea 100755 --- a/PhysicsAnalysis/JetTagging/JetTaggingTagTools/src/JetTaggingTagTool.cxx +++ b/PhysicsAnalysis/JetTagging/JetTaggingTagTools/src/JetTaggingTagTool.cxx @@ -87,8 +87,5 @@ StatusCode JetTaggingTagTool::finalize() { return StatusCode::SUCCESS; } -/** destructor */ -JetTaggingTagTool::~JetTaggingTagTool() {} - diff --git a/PhysicsAnalysis/MuonID/MuonTagTools/MuonTagTools/MuonTagTool.h b/PhysicsAnalysis/MuonID/MuonTagTools/MuonTagTools/MuonTagTool.h index 75719e11fa6e..1817a047eac3 100644 --- a/PhysicsAnalysis/MuonID/MuonTagTools/MuonTagTools/MuonTagTool.h +++ b/PhysicsAnalysis/MuonID/MuonTagTools/MuonTagTools/MuonTagTool.h @@ -47,12 +47,7 @@ class MuonTagTool : public AthAlgTool { virtual StatusCode attributeSpecification(std::map<std::string,AthenaAttributeType>& attrMap, const int max); virtual StatusCode execute(TagFragmentCollection& muonTagCol, const int max); virtual StatusCode finalize(); - - protected: - - /** Standard destructor */ - virtual ~MuonTagTool( ); - + private: inline int bit2int(int b) const { return 1<<b; }; diff --git a/PhysicsAnalysis/MuonID/MuonTagTools/src/MuonTagTool.cxx b/PhysicsAnalysis/MuonID/MuonTagTools/src/MuonTagTool.cxx index d1c86d62595e..fd9ca1c60a04 100644 --- a/PhysicsAnalysis/MuonID/MuonTagTools/src/MuonTagTool.cxx +++ b/PhysicsAnalysis/MuonID/MuonTagTools/src/MuonTagTool.cxx @@ -768,11 +768,6 @@ StatusCode MuonTagTool::finalize() { return StatusCode::SUCCESS; } -/** destructor */ -MuonTagTool::~MuonTagTool() { -} - - /** private function to get impact parameter */ void MuonTagTool::getMuonImpactParameter (const xAOD::Muon* muon, double& d0, double& z0, double& d0_significance) { diff --git a/PhysicsAnalysis/SUSYPhys/SUSYPhysTagTools/SUSYPhysTagTools/SUSYPhysTagTool.h b/PhysicsAnalysis/SUSYPhys/SUSYPhysTagTools/SUSYPhysTagTools/SUSYPhysTagTool.h index 51a7930a7c75..d7cf7ece5196 100755 --- a/PhysicsAnalysis/SUSYPhys/SUSYPhysTagTools/SUSYPhysTagTools/SUSYPhysTagTool.h +++ b/PhysicsAnalysis/SUSYPhys/SUSYPhysTagTools/SUSYPhysTagTools/SUSYPhysTagTool.h @@ -41,11 +41,6 @@ parent); virtual StatusCode execute(TagFragmentCollection& susyTagCol, const int max); virtual StatusCode finalize(); -protected: - - /** Standard destructor */ - virtual ~SUSYPhysTagTool( ); - private: /** Properties */ diff --git a/PhysicsAnalysis/SUSYPhys/SUSYPhysTagTools/src/SUSYPhysTagTool.cxx b/PhysicsAnalysis/SUSYPhys/SUSYPhysTagTools/src/SUSYPhysTagTool.cxx index f975f04a7a5b..e1245b209794 100755 --- a/PhysicsAnalysis/SUSYPhys/SUSYPhysTagTools/src/SUSYPhysTagTool.cxx +++ b/PhysicsAnalysis/SUSYPhys/SUSYPhysTagTools/src/SUSYPhysTagTool.cxx @@ -79,9 +79,3 @@ StatusCode SUSYPhysTagTool::finalize() { ATH_MSG_DEBUG( "in finalize()" ); return StatusCode::SUCCESS; } - -/** destructor */ -SUSYPhysTagTool::~SUSYPhysTagTool() {} - - - diff --git a/PhysicsAnalysis/StandardModelPhys/StandardModelPhysTagTools/StandardModelPhysTagTools/StandardModelPhysTagTool.h b/PhysicsAnalysis/StandardModelPhys/StandardModelPhysTagTools/StandardModelPhysTagTools/StandardModelPhysTagTool.h index b918aa585db3..fcdbb1b80758 100755 --- a/PhysicsAnalysis/StandardModelPhys/StandardModelPhysTagTools/StandardModelPhysTagTools/StandardModelPhysTagTool.h +++ b/PhysicsAnalysis/StandardModelPhys/StandardModelPhysTagTools/StandardModelPhysTagTools/StandardModelPhysTagTool.h @@ -40,11 +40,6 @@ public: virtual StatusCode execute(TagFragmentCollection& smTagCol, const int max); virtual StatusCode finalize(); -protected: - - /** Standard destructor */ - virtual ~StandardModelPhysTagTool( ); - private: /** Properties */ diff --git a/PhysicsAnalysis/StandardModelPhys/StandardModelPhysTagTools/src/StandardModelTagTool.cxx b/PhysicsAnalysis/StandardModelPhys/StandardModelPhysTagTools/src/StandardModelTagTool.cxx index 72caf2533016..2a6eba2f1764 100755 --- a/PhysicsAnalysis/StandardModelPhys/StandardModelPhysTagTools/src/StandardModelTagTool.cxx +++ b/PhysicsAnalysis/StandardModelPhys/StandardModelPhysTagTools/src/StandardModelTagTool.cxx @@ -79,9 +79,3 @@ StatusCode StandardModelPhysTagTool::finalize() { ATH_MSG_DEBUG( "in finalize()" ); return StatusCode::SUCCESS; } - -/** destructor */ -StandardModelPhysTagTool::~StandardModelPhysTagTool() {} - - - diff --git a/PhysicsAnalysis/TauID/TauTagTools/TauTagTools/TauIdentificationTagTool.h b/PhysicsAnalysis/TauID/TauTagTools/TauTagTools/TauIdentificationTagTool.h index b09e514d5977..f914f591c64d 100755 --- a/PhysicsAnalysis/TauID/TauTagTools/TauTagTools/TauIdentificationTagTool.h +++ b/PhysicsAnalysis/TauID/TauTagTools/TauTagTools/TauIdentificationTagTool.h @@ -40,11 +40,6 @@ public: virtual StatusCode execute(TagFragmentCollection& tauIdTagCol, const int max); virtual StatusCode finalize(); -protected: - - /** Standard destructor */ - virtual ~TauIdentificationTagTool( ); - private: /** Properties */ diff --git a/PhysicsAnalysis/TauID/TauTagTools/TauTagTools/TauJetTagTool.h b/PhysicsAnalysis/TauID/TauTagTools/TauTagTools/TauJetTagTool.h index dd41a35f8636..c47efe345ef4 100755 --- a/PhysicsAnalysis/TauID/TauTagTools/TauTagTools/TauJetTagTool.h +++ b/PhysicsAnalysis/TauID/TauTagTools/TauTagTools/TauJetTagTool.h @@ -18,16 +18,13 @@ Purpose : build the TauJet Tag objects - TauJetTagCollection.h. #include "TagEvent/TagFragmentCollection.h" #include "AthenaPoolUtilities/AthenaAttributeSpecification.h" +#include "TauAnalysisTools/ITauSelectionTool.h" #include <map> /** Interface ID for TauJetTagTool*/ static const InterfaceID IID_TauJetTagTool("TauJetTagTool", 1, 0); -namespace TauAnalysisTools { - class ITauSelectionTool; -} - class TauJetTagTool : public AthAlgTool { public: @@ -44,11 +41,6 @@ public: virtual StatusCode execute(TagFragmentCollection& tauJetTagCol, const int max); virtual StatusCode finalize(); -protected: - - /** Standard destructor */ - virtual ~TauJetTagTool( ); - private: /** Properties */ diff --git a/PhysicsAnalysis/TauID/TauTagTools/src/TauIdentificationTagTool.cxx b/PhysicsAnalysis/TauID/TauTagTools/src/TauIdentificationTagTool.cxx index cd41735628f8..6ce885975458 100755 --- a/PhysicsAnalysis/TauID/TauTagTools/src/TauIdentificationTagTool.cxx +++ b/PhysicsAnalysis/TauID/TauTagTools/src/TauIdentificationTagTool.cxx @@ -76,7 +76,3 @@ StatusCode TauIdentificationTagTool::finalize() { ATH_MSG_DEBUG( "in finalize()" ); return StatusCode::SUCCESS; } - -/** destructor */ -TauIdentificationTagTool::~TauIdentificationTagTool() {} - diff --git a/PhysicsAnalysis/TauID/TauTagTools/src/TauJetTagTool.cxx b/PhysicsAnalysis/TauID/TauTagTools/src/TauJetTagTool.cxx index 1ca7e004db45..0a85c9400e87 100755 --- a/PhysicsAnalysis/TauID/TauTagTools/src/TauJetTagTool.cxx +++ b/PhysicsAnalysis/TauID/TauTagTools/src/TauJetTagTool.cxx @@ -211,8 +211,3 @@ StatusCode TauJetTagTool::execute(TagFragmentCollection& tauJetTagColl, const in return StatusCode::SUCCESS; } - -/** destructor */ -TauJetTagTool::~TauJetTagTool() {} - - diff --git a/Projects/AnalysisBase/externals.txt b/Projects/AnalysisBase/externals.txt index faa3415a1a44..714dec59cd88 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.8 +AnalysisBaseExternalsVersion = 2.0.10 diff --git a/Projects/AnalysisTop/externals.txt b/Projects/AnalysisTop/externals.txt index 338270671d48..f1e3b89a4689 100644 --- a/Projects/AnalysisTop/externals.txt +++ b/Projects/AnalysisTop/externals.txt @@ -1,4 +1,4 @@ # Versions of the various externals to build before starting the build of # this project, when doing a full stack nightly build. -AnalysisBaseExternalsVersion = 2.0.8 +AnalysisBaseExternalsVersion = 2.0.10 diff --git a/Projects/AthDataQuality/externals.txt b/Projects/AthDataQuality/externals.txt index 45153f25f991..b970f5dc1bb5 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.8 +AtlasExternalsVersion = 2.0.10 diff --git a/Projects/AthSimulation/externals.txt b/Projects/AthSimulation/externals.txt index 9db1e9bfab32..705f4101d4a4 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.8 +AthSimulationExternalsVersion = 2.0.10 # The version of atlas/Gaudi to use: -GaudiVersion = v30r2.004 +GaudiVersion = v30r2.005 diff --git a/Projects/Athena/externals.txt b/Projects/Athena/externals.txt index 8fba97e62f84..aa5a84d208b6 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.8 +AthenaExternalsVersion = 2.0.10 # The version of atlas/Gaudi to use: -GaudiVersion = v30r2.004 +GaudiVersion = v30r2.005 diff --git a/Reconstruction/MET/METReconstruction/METReconstruction/METAssociationTool.h b/Reconstruction/MET/METReconstruction/METReconstruction/METAssociationTool.h index 8759371c3856..ff0dd3b492a8 100644 --- a/Reconstruction/MET/METReconstruction/METReconstruction/METAssociationTool.h +++ b/Reconstruction/MET/METReconstruction/METReconstruction/METAssociationTool.h @@ -91,7 +91,6 @@ namespace met{ /// Default constructor: METAssociationTool(); - virtual ~METAssociationTool(); // Run the MET tools here StatusCode buildMET(xAOD::MissingETContainer* metCont, xAOD::MissingETAssociationMap* metMap) const; diff --git a/Reconstruction/MET/METReconstruction/METReconstruction/METRecoTool.h b/Reconstruction/MET/METReconstruction/METReconstruction/METRecoTool.h index 07d09216e082..b9eeaf76677b 100644 --- a/Reconstruction/MET/METReconstruction/METReconstruction/METRecoTool.h +++ b/Reconstruction/MET/METReconstruction/METReconstruction/METRecoTool.h @@ -89,7 +89,6 @@ namespace met{ /// Default constructor: METRecoTool(); - virtual ~METRecoTool(); // Run the MET tools here StatusCode buildMET(xAOD::MissingETContainer* metCont, xAOD::MissingETComponentMap* metMap) const; diff --git a/Reconstruction/MET/METReconstruction/Root/METAssociationTool.cxx b/Reconstruction/MET/METReconstruction/Root/METAssociationTool.cxx index fdbcc13a1e7a..b97055ad6684 100644 --- a/Reconstruction/MET/METReconstruction/Root/METAssociationTool.cxx +++ b/Reconstruction/MET/METReconstruction/Root/METAssociationTool.cxx @@ -52,11 +52,6 @@ namespace met { declareProperty( "TimingDetail", m_timedetail = 0 ); } - // Destructor - /////////////// - METAssociationTool::~METAssociationTool() - {} - // Athena algtool's Hooks //////////////////////////// StatusCode METAssociationTool::initialize() diff --git a/Reconstruction/MET/METReconstruction/Root/METRecoTool.cxx b/Reconstruction/MET/METReconstruction/Root/METRecoTool.cxx index 402c1c137b63..5c8910484031 100644 --- a/Reconstruction/MET/METReconstruction/Root/METRecoTool.cxx +++ b/Reconstruction/MET/METReconstruction/Root/METRecoTool.cxx @@ -59,10 +59,6 @@ namespace met { declareProperty( "TimingDetail", m_timedetail = 0 ); } - // Destructor - /////////////// - METRecoTool::~METRecoTool() - {} // Athena algtool's Hooks //////////////////////////// diff --git a/Reconstruction/MissingETPerformance/MissingETPerformance/BasicPlotsTool.h b/Reconstruction/MissingETPerformance/MissingETPerformance/BasicPlotsTool.h index df02019b0dec..f414d5455824 100755 --- a/Reconstruction/MissingETPerformance/MissingETPerformance/BasicPlotsTool.h +++ b/Reconstruction/MissingETPerformance/MissingETPerformance/BasicPlotsTool.h @@ -45,11 +45,6 @@ public: inline void SetFolderName(const std::string& folderName) { m_folderName=folderName; } -protected: - - /** Standard destructor */ - virtual ~BasicPlotsTool( ); - private: struct MissingETHists { TH1D* METphi; diff --git a/Reconstruction/MissingETPerformance/MissingETPerformance/ContainerComparatorTool.h b/Reconstruction/MissingETPerformance/MissingETPerformance/ContainerComparatorTool.h index fbc003c6428e..85f8964cf94b 100755 --- a/Reconstruction/MissingETPerformance/MissingETPerformance/ContainerComparatorTool.h +++ b/Reconstruction/MissingETPerformance/MissingETPerformance/ContainerComparatorTool.h @@ -45,11 +45,6 @@ public: virtual StatusCode finalize(); virtual StatusCode execute(MissingETData *data); -protected: - - /** Standard destructor */ - virtual ~ContainerComparatorTool( ); - private: StatusCode comparatorPlots(MissingETData *data); diff --git a/Reconstruction/MissingETPerformance/MissingETPerformance/EtaRingsTool.h b/Reconstruction/MissingETPerformance/MissingETPerformance/EtaRingsTool.h index 11b466b770a0..12d9bf079eb9 100755 --- a/Reconstruction/MissingETPerformance/MissingETPerformance/EtaRingsTool.h +++ b/Reconstruction/MissingETPerformance/MissingETPerformance/EtaRingsTool.h @@ -43,11 +43,6 @@ public: inline void SetFolderName(const std::string& folderName) { m_folderName=folderName; } -protected: - - /** Standard destructor */ - virtual ~EtaRingsTool( ); - private: std::string m_folderName; diff --git a/Reconstruction/MissingETPerformance/MissingETPerformance/FakeMissingETTool.h b/Reconstruction/MissingETPerformance/MissingETPerformance/FakeMissingETTool.h index e9960710f7cc..961b5ecf7251 100755 --- a/Reconstruction/MissingETPerformance/MissingETPerformance/FakeMissingETTool.h +++ b/Reconstruction/MissingETPerformance/MissingETPerformance/FakeMissingETTool.h @@ -45,11 +45,6 @@ public: inline void SetFolderName(const std::string& folderName) { m_folderName=folderName; } -protected: - - /** Standard destructor */ - virtual ~FakeMissingETTool( ); - private: std::string m_folderName; diff --git a/Reconstruction/MissingETPerformance/MissingETPerformance/LinearityTool.h b/Reconstruction/MissingETPerformance/MissingETPerformance/LinearityTool.h index 2615633e6885..240225dd0215 100755 --- a/Reconstruction/MissingETPerformance/MissingETPerformance/LinearityTool.h +++ b/Reconstruction/MissingETPerformance/MissingETPerformance/LinearityTool.h @@ -46,11 +46,6 @@ public: inline void SetFolderName(const std::string& folderName) { m_folderName=folderName; } -protected: - - /** Standard destructor */ - virtual ~LinearityTool( ); - private: StatusCode linearity(MissingETData *data); diff --git a/Reconstruction/MissingETPerformance/MissingETPerformance/MissingETCompositionTool.h b/Reconstruction/MissingETPerformance/MissingETPerformance/MissingETCompositionTool.h index 45ec1ca448d2..6fbe009fc740 100755 --- a/Reconstruction/MissingETPerformance/MissingETPerformance/MissingETCompositionTool.h +++ b/Reconstruction/MissingETPerformance/MissingETPerformance/MissingETCompositionTool.h @@ -46,11 +46,6 @@ public: inline void SetFolderName(const std::string& folderName) { m_folderName=folderName; } -protected: - - /** Standard destructor */ - virtual ~MissingETCompositionTool( ); - private: StatusCode CBNT_initialize_jets(); StatusCode CBNT_initialize_taus(); diff --git a/Reconstruction/MissingETPerformance/MissingETPerformance/MissingETScaleTool.h b/Reconstruction/MissingETPerformance/MissingETPerformance/MissingETScaleTool.h index 33d9fef83daf..38954ee7af6a 100755 --- a/Reconstruction/MissingETPerformance/MissingETPerformance/MissingETScaleTool.h +++ b/Reconstruction/MissingETPerformance/MissingETPerformance/MissingETScaleTool.h @@ -50,11 +50,6 @@ public: virtual StatusCode finalize(); virtual StatusCode execute(MissingETData *data); - protected: - - /** Standard destructor */ - virtual ~MissingETScaleTool( ); - private: StatusCode MissingETScale(MissingETData *data); diff --git a/Reconstruction/MissingETPerformance/MissingETPerformance/MuonTool.h b/Reconstruction/MissingETPerformance/MissingETPerformance/MuonTool.h index 1c3ff8f24186..1756a1ff913c 100644 --- a/Reconstruction/MissingETPerformance/MissingETPerformance/MuonTool.h +++ b/Reconstruction/MissingETPerformance/MissingETPerformance/MuonTool.h @@ -46,11 +46,6 @@ public: inline void SetFolderName(const std::string& folderName) { m_folderName=folderName; } -protected: - - /** Standard destructor */ - virtual ~MuonTool( ); - private: std::string m_folderName; diff --git a/Reconstruction/MissingETPerformance/MissingETPerformance/PileUpTool.h b/Reconstruction/MissingETPerformance/MissingETPerformance/PileUpTool.h index 3903bf1f4359..6162b7ccba7e 100755 --- a/Reconstruction/MissingETPerformance/MissingETPerformance/PileUpTool.h +++ b/Reconstruction/MissingETPerformance/MissingETPerformance/PileUpTool.h @@ -41,11 +41,6 @@ class PileUpTool : public AthAlgTool inline void SetFolderName(const std::string& folderName) { m_folderName=folderName; } - protected: - - // Standard destructor - virtual ~PileUpTool( ); - private: StatusCode pileUp(MissingETData *data); diff --git a/Reconstruction/MissingETPerformance/MissingETPerformance/ResolutionTool.h b/Reconstruction/MissingETPerformance/MissingETPerformance/ResolutionTool.h index afa48cb1e5b0..9a5a75fc962b 100755 --- a/Reconstruction/MissingETPerformance/MissingETPerformance/ResolutionTool.h +++ b/Reconstruction/MissingETPerformance/MissingETPerformance/ResolutionTool.h @@ -46,11 +46,6 @@ public: inline void SetFolderName(const std::string& folderName) { m_folderName=folderName; } -protected: - - /** Standard destructor */ - virtual ~ResolutionTool( ); - private: StatusCode resolution(MissingETData *data); diff --git a/Reconstruction/MissingETPerformance/MissingETPerformance/TrigMissingETTool.h b/Reconstruction/MissingETPerformance/MissingETPerformance/TrigMissingETTool.h index efdce13433be..3761a4964b7e 100755 --- a/Reconstruction/MissingETPerformance/MissingETPerformance/TrigMissingETTool.h +++ b/Reconstruction/MissingETPerformance/MissingETPerformance/TrigMissingETTool.h @@ -46,10 +46,6 @@ public: inline void SetFolderName(const std::string& folderName) { m_folderName=folderName; } protected: - - /** Standard destructor */ - virtual ~TrigMissingETTool( ); - /** a handle on Store Gate for access to the Event Store */ StoreGateSvc* m_storeGate; diff --git a/Reconstruction/MissingETPerformance/MissingETPerformance/TrigVsOfflineMissingETTool.h b/Reconstruction/MissingETPerformance/MissingETPerformance/TrigVsOfflineMissingETTool.h index 793b84a86d41..5025c4dd4a57 100755 --- a/Reconstruction/MissingETPerformance/MissingETPerformance/TrigVsOfflineMissingETTool.h +++ b/Reconstruction/MissingETPerformance/MissingETPerformance/TrigVsOfflineMissingETTool.h @@ -43,11 +43,6 @@ class TrigVsOfflineMissingETTool: public AthAlgTool { inline void SetFolderName(const std::string& folderName) { m_folderName=folderName; } - protected: - - /** Standard destructor */ - virtual ~TrigVsOfflineMissingETTool( ); - private: ITHistSvc * m_thistSvc; diff --git a/Reconstruction/MissingETPerformance/MissingETPerformance/ZMuMuTool.h b/Reconstruction/MissingETPerformance/MissingETPerformance/ZMuMuTool.h index e3bdf61beafe..16be9bbe9329 100755 --- a/Reconstruction/MissingETPerformance/MissingETPerformance/ZMuMuTool.h +++ b/Reconstruction/MissingETPerformance/MissingETPerformance/ZMuMuTool.h @@ -46,11 +46,6 @@ public: inline void SetFolderName(const std::string& folderName) { m_folderName=folderName; } -protected: - - /** Standard destructor */ - virtual ~ZMuMuTool( ); - private: std::string m_folderName; diff --git a/Reconstruction/MissingETPerformance/MissingETPerformance/ZeeTool.h b/Reconstruction/MissingETPerformance/MissingETPerformance/ZeeTool.h index 1518204ab23a..2756b3e634c4 100755 --- a/Reconstruction/MissingETPerformance/MissingETPerformance/ZeeTool.h +++ b/Reconstruction/MissingETPerformance/MissingETPerformance/ZeeTool.h @@ -45,11 +45,6 @@ public: inline void SetFolderName(const std::string& folderName) { m_folderName=folderName; } -protected: - - /** Standard destructor */ - virtual ~ZeeTool( ); - private: std::string m_folderName; diff --git a/Reconstruction/MissingETPerformance/src/BasicPlotsTool.cxx b/Reconstruction/MissingETPerformance/src/BasicPlotsTool.cxx index 5a5817e8e8de..901a4b1ddcb3 100755 --- a/Reconstruction/MissingETPerformance/src/BasicPlotsTool.cxx +++ b/Reconstruction/MissingETPerformance/src/BasicPlotsTool.cxx @@ -598,6 +598,3 @@ StatusCode BasicPlotsTool::basicPlots(MissingETData *data) { StatusCode BasicPlotsTool::finalize() { return StatusCode::SUCCESS; } - -//------------------------------------------------------------------------------ -BasicPlotsTool::~BasicPlotsTool() {} diff --git a/Reconstruction/MissingETPerformance/src/ContainerComparatorTool.cxx b/Reconstruction/MissingETPerformance/src/ContainerComparatorTool.cxx index e3914cc625d9..6c18ac2cb4e2 100755 --- a/Reconstruction/MissingETPerformance/src/ContainerComparatorTool.cxx +++ b/Reconstruction/MissingETPerformance/src/ContainerComparatorTool.cxx @@ -177,9 +177,6 @@ StatusCode ContainerComparatorTool::finalize() { return StatusCode::SUCCESS; } -//------------------------------------------------------------------------------ -ContainerComparatorTool::~ContainerComparatorTool() {} - ContainerComparatorTool::DiffContainers::DiffContainers(const std::string &s, const std::string &s2,ITHistSvc * thistSvc) { StatusCode sc = StatusCode::SUCCESS; diff --git a/Reconstruction/MissingETPerformance/src/EtaRingsTool.cxx b/Reconstruction/MissingETPerformance/src/EtaRingsTool.cxx index 08f938109446..f2e746e87045 100755 --- a/Reconstruction/MissingETPerformance/src/EtaRingsTool.cxx +++ b/Reconstruction/MissingETPerformance/src/EtaRingsTool.cxx @@ -635,6 +635,3 @@ StatusCode EtaRingsTool::finalize() { return StatusCode::SUCCESS; } - -//------------------------------------------------------------------------------ -EtaRingsTool::~EtaRingsTool() {} diff --git a/Reconstruction/MissingETPerformance/src/FakeMissingETTool.cxx b/Reconstruction/MissingETPerformance/src/FakeMissingETTool.cxx index 729b05809719..e5e67680f7af 100755 --- a/Reconstruction/MissingETPerformance/src/FakeMissingETTool.cxx +++ b/Reconstruction/MissingETPerformance/src/FakeMissingETTool.cxx @@ -864,6 +864,3 @@ StatusCode FakeMissingETTool::finalize() { return StatusCode::SUCCESS; } - -//------------------------------------------------------------------------------ -FakeMissingETTool::~FakeMissingETTool() {} diff --git a/Reconstruction/MissingETPerformance/src/LinearityTool.cxx b/Reconstruction/MissingETPerformance/src/LinearityTool.cxx index 958605f398ce..f76fecc13b3b 100755 --- a/Reconstruction/MissingETPerformance/src/LinearityTool.cxx +++ b/Reconstruction/MissingETPerformance/src/LinearityTool.cxx @@ -450,8 +450,3 @@ StatusCode LinearityTool::linearity(MissingETData *data) { StatusCode LinearityTool::finalize() { return StatusCode::SUCCESS; } - -//------------------------------------------------------------------------------ -LinearityTool::~LinearityTool() {} - - diff --git a/Reconstruction/MissingETPerformance/src/MissingETCompositionTool.cxx b/Reconstruction/MissingETPerformance/src/MissingETCompositionTool.cxx index 00dca0b206b9..373a41192f28 100755 --- a/Reconstruction/MissingETPerformance/src/MissingETCompositionTool.cxx +++ b/Reconstruction/MissingETPerformance/src/MissingETCompositionTool.cxx @@ -2046,8 +2046,6 @@ StatusCode MissingETCompositionTool::finalize() { } //------------------------------------------------------------------------------ -MissingETCompositionTool::~MissingETCompositionTool() {} - evt_display::evt_display(int run, int event, ITHistSvc *thistSvc, const std::string &folderName, MsgStream* mLog) { //msg() << MSG::WARNING << "in evt_display" << endmsg; diff --git a/Reconstruction/MissingETPerformance/src/MissingETScaleTool.cxx b/Reconstruction/MissingETPerformance/src/MissingETScaleTool.cxx index f094e8735640..46e1c3676227 100755 --- a/Reconstruction/MissingETPerformance/src/MissingETScaleTool.cxx +++ b/Reconstruction/MissingETPerformance/src/MissingETScaleTool.cxx @@ -258,5 +258,3 @@ double MissingETScaleTool::invTTmass(double pxMiss, double pyMiss, return myTTmassd; } -//------------------------------------------------------------------------------ -MissingETScaleTool::~MissingETScaleTool() {} diff --git a/Reconstruction/MissingETPerformance/src/MuonTool.cxx b/Reconstruction/MissingETPerformance/src/MuonTool.cxx index 1c4a7af0c38b..2b92c46bc8ef 100644 --- a/Reconstruction/MissingETPerformance/src/MuonTool.cxx +++ b/Reconstruction/MissingETPerformance/src/MuonTool.cxx @@ -578,6 +578,3 @@ StatusCode MuonTool::muonSetup(MissingETMuonData *muondata) { StatusCode MuonTool::finalize() { return StatusCode::SUCCESS; } - -//------------------------------------------------------------------------------ -MuonTool::~MuonTool() {} diff --git a/Reconstruction/MissingETPerformance/src/PileUpTool.cxx b/Reconstruction/MissingETPerformance/src/PileUpTool.cxx index c3116e334752..4d48ba877e2f 100755 --- a/Reconstruction/MissingETPerformance/src/PileUpTool.cxx +++ b/Reconstruction/MissingETPerformance/src/PileUpTool.cxx @@ -394,8 +394,3 @@ StatusCode PileUpTool::finalize() return StatusCode::SUCCESS; } - - -PileUpTool::~PileUpTool() -{ -} diff --git a/Reconstruction/MissingETPerformance/src/ResolutionTool.cxx b/Reconstruction/MissingETPerformance/src/ResolutionTool.cxx index a5d0cf2863fc..323bcd3e4ff3 100755 --- a/Reconstruction/MissingETPerformance/src/ResolutionTool.cxx +++ b/Reconstruction/MissingETPerformance/src/ResolutionTool.cxx @@ -662,8 +662,3 @@ StatusCode ResolutionTool::finalize() { return StatusCode::SUCCESS; } - -//------------------------------------------------------------------------------ -ResolutionTool::~ResolutionTool() {} - - diff --git a/Reconstruction/MissingETPerformance/src/TrigMissingETTool.cxx b/Reconstruction/MissingETPerformance/src/TrigMissingETTool.cxx index 0b79f2343649..b6203c921cbf 100755 --- a/Reconstruction/MissingETPerformance/src/TrigMissingETTool.cxx +++ b/Reconstruction/MissingETPerformance/src/TrigMissingETTool.cxx @@ -499,6 +499,3 @@ StatusCode TrigMissingETTool::finalize() { return StatusCode::SUCCESS; } - -//------------------------------------------------------------------------------ -TrigMissingETTool::~TrigMissingETTool() {} diff --git a/Reconstruction/MissingETPerformance/src/TrigVsOfflineMissingETTool.cxx b/Reconstruction/MissingETPerformance/src/TrigVsOfflineMissingETTool.cxx index d725f96a7db7..a38775169f65 100755 --- a/Reconstruction/MissingETPerformance/src/TrigVsOfflineMissingETTool.cxx +++ b/Reconstruction/MissingETPerformance/src/TrigVsOfflineMissingETTool.cxx @@ -200,13 +200,6 @@ TrigVsOfflineMissingETTool::TrigVsOfflineMissingETTool(const std::string & type, } -/*-----------------------------------------------------*/ -TrigVsOfflineMissingETTool::~TrigVsOfflineMissingETTool() - /*-----------------------------------------------------*/ -{ -} - - /*-----------------------------------------------------*/ StatusCode TrigVsOfflineMissingETTool::CBNT_initialize() /*-----------------------------------------------------*/ diff --git a/Reconstruction/MissingETPerformance/src/ZMuMuTool.cxx b/Reconstruction/MissingETPerformance/src/ZMuMuTool.cxx index aa5c9b17468a..cc8b08e03527 100755 --- a/Reconstruction/MissingETPerformance/src/ZMuMuTool.cxx +++ b/Reconstruction/MissingETPerformance/src/ZMuMuTool.cxx @@ -565,6 +565,3 @@ StatusCode ZMuMuTool::finalize() { return StatusCode::SUCCESS; } - -//------------------------------------------------------------------------------ -ZMuMuTool::~ZMuMuTool() {} diff --git a/Reconstruction/MissingETPerformance/src/ZeeTool.cxx b/Reconstruction/MissingETPerformance/src/ZeeTool.cxx index 6b2212cfb209..3202e7f8aa35 100755 --- a/Reconstruction/MissingETPerformance/src/ZeeTool.cxx +++ b/Reconstruction/MissingETPerformance/src/ZeeTool.cxx @@ -221,6 +221,3 @@ StatusCode ZeeTool::finalize() { return StatusCode::SUCCESS; } - -//------------------------------------------------------------------------------ -ZeeTool::~ZeeTool() {} diff --git a/Reconstruction/MuonIdentification/CombinedMuonRefit/src/ExtrapolateMuonToIP.h b/Reconstruction/MuonIdentification/CombinedMuonRefit/src/ExtrapolateMuonToIP.h index f858a3055f24..0b736382baf4 100644 --- a/Reconstruction/MuonIdentification/CombinedMuonRefit/src/ExtrapolateMuonToIP.h +++ b/Reconstruction/MuonIdentification/CombinedMuonRefit/src/ExtrapolateMuonToIP.h @@ -12,9 +12,9 @@ // Base class #include "AthenaBaseComps/AthAlgorithm.h" #include "GaudiKernel/ToolHandle.h" +#include "MuonRecHelperTools/MuonEDMPrinterTool.h" namespace Muon{ - class MuonEDMPrinterTool; class IMuonTrackExtrapolationTool; } diff --git a/Reconstruction/RecAthenaPool/src/MissingETCompositionCnv.h b/Reconstruction/RecAthenaPool/src/MissingETCompositionCnv.h index 93dc752d5816..19e8a9f52073 100644 --- a/Reconstruction/RecAthenaPool/src/MissingETCompositionCnv.h +++ b/Reconstruction/RecAthenaPool/src/MissingETCompositionCnv.h @@ -27,9 +27,9 @@ class MissingETCompositionCnv : public MissingETCompositionCnvBase , m_TPconverter_p2(0) { }; - protected: virtual ~MissingETCompositionCnv() { delete m_TPconverter_p2; }; + protected: virtual MissingETComposition_PERS* createPersistent (MissingETComposition* transObj); virtual MissingETComposition* createTransient (); diff --git a/Reconstruction/RecEventAthenaPool/src/RecoTimingObjCnv.h b/Reconstruction/RecEventAthenaPool/src/RecoTimingObjCnv.h index f545ed632ce8..e9176e846113 100644 --- a/Reconstruction/RecEventAthenaPool/src/RecoTimingObjCnv.h +++ b/Reconstruction/RecEventAthenaPool/src/RecoTimingObjCnv.h @@ -21,9 +21,6 @@ class RecoTimingObjCnv: public T_AthenaPoolCustomCnv< RecoTimingObj, RecoTimingO // make the factory for this converter our friend friend class CnvFactory<RecoTimingObjCnv>; - // destructor - virtual ~RecoTimingObjCnv() { delete m_msg; }; - /////////////////////////////////////////////////////////////////// // Protected methods: /////////////////////////////////////////////////////////////////// @@ -33,6 +30,10 @@ class RecoTimingObjCnv: public T_AthenaPoolCustomCnv< RecoTimingObj, RecoTimingO */ public: RecoTimingObjCnv(ISvcLocator* svcloc); + + // destructor + virtual ~RecoTimingObjCnv() { delete m_msg; }; + protected: /** Build the persistent representation from the transient one. diff --git a/Reconstruction/RecoAlgs/CaloRingerAlgs/src/xAODRingSetConfWriter.h b/Reconstruction/RecoAlgs/CaloRingerAlgs/src/xAODRingSetConfWriter.h index ebf8b4d63a55..cb0d38bfe1ac 100644 --- a/Reconstruction/RecoAlgs/CaloRingerAlgs/src/xAODRingSetConfWriter.h +++ b/Reconstruction/RecoAlgs/CaloRingerAlgs/src/xAODRingSetConfWriter.h @@ -19,14 +19,13 @@ extern "C" { #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" #include "StoreGate/StoreGateSvc.h" +#include "CaloRingerTools/ICaloRingsBuilder.h" // EDM include(s): #include "xAODCaloRings/RingSetConfContainer.h" namespace Ringer { -class ICaloRingsBuilder; - /** * @short Algorithm used to write the RingSets configuration * diff --git a/Reconstruction/RecoTools/TrackToCalo/src/TrackParticleCaloExtensionAlg.h b/Reconstruction/RecoTools/TrackToCalo/src/TrackParticleCaloExtensionAlg.h index 8b8ee08b2779..714c79bccf64 100644 --- a/Reconstruction/RecoTools/TrackToCalo/src/TrackParticleCaloExtensionAlg.h +++ b/Reconstruction/RecoTools/TrackToCalo/src/TrackParticleCaloExtensionAlg.h @@ -18,10 +18,8 @@ #include "GaudiKernel/ToolHandle.h" #include "TrackCaloClusterRecInterfaces/IParticleExtrapolationTool.h" +#include "TrkToolInterfaces/ITrackSelectorTool.h" -namespace Trk { - class ITrackSelectorTool; -} namespace Rec { class IParticleCaloCellAssociationTool; } diff --git a/Reconstruction/TrackParticleAthenaPool/src/TrackParticleContainerCnv.cxx b/Reconstruction/TrackParticleAthenaPool/src/TrackParticleContainerCnv.cxx index bdffb4d6be04..42967a314b5c 100644 --- a/Reconstruction/TrackParticleAthenaPool/src/TrackParticleContainerCnv.cxx +++ b/Reconstruction/TrackParticleAthenaPool/src/TrackParticleContainerCnv.cxx @@ -21,12 +21,6 @@ TrackParticleContainerCnv::TrackParticleContainerCnv( ISvcLocator *svcloc ): m_log( m_msgSvc, "TrackParticleContainerCnv" ) {} -//----------------------------------------------------------------------------- -// Destructor -//----------------------------------------------------------------------------- -TrackParticleContainerCnv::~TrackParticleContainerCnv() -{} - //----------------------------------------------------------------------------- // Initializer //----------------------------------------------------------------------------- diff --git a/Reconstruction/TrackParticleAthenaPool/src/TrackParticleContainerCnv.h b/Reconstruction/TrackParticleAthenaPool/src/TrackParticleContainerCnv.h index 50abb13ae6bc..3bd3be87d65e 100644 --- a/Reconstruction/TrackParticleAthenaPool/src/TrackParticleContainerCnv.h +++ b/Reconstruction/TrackParticleAthenaPool/src/TrackParticleContainerCnv.h @@ -46,7 +46,6 @@ class TrackParticleContainerCnv : public TrackParticleContainerCnvBase public: TrackParticleContainerCnv( ISvcLocator *svcloc ); protected: - ~TrackParticleContainerCnv(); virtual StatusCode initialize(); virtual TrackParticleContainer_PERS *createPersistent( Rec::TrackParticleContainer *transCont); diff --git a/Reconstruction/TrackParticleTruthAthenaPool/src/TrackParticleTruthCollectionContainerCnv.cxx b/Reconstruction/TrackParticleTruthAthenaPool/src/TrackParticleTruthCollectionContainerCnv.cxx index 8f7bea4870eb..e89ac9b14e1c 100644 --- a/Reconstruction/TrackParticleTruthAthenaPool/src/TrackParticleTruthCollectionContainerCnv.cxx +++ b/Reconstruction/TrackParticleTruthAthenaPool/src/TrackParticleTruthCollectionContainerCnv.cxx @@ -7,6 +7,7 @@ #include "TrackParticleTruthTPCnv/TrackParticleTruthCollectionContainerCnv_tlp2.h" #include "TrackParticleTruthTPCnv/TrackParticleTruthCollection_p1.h" #include "TrackParticleTruthTPCnv/TrackParticleTruthCollection_p2.h" +#include "ParticleTruth/TrackParticleTruthVector.h" #include "GaudiKernel/StatusCode.h" #include "GaudiKernel/MsgStream.h" diff --git a/Reconstruction/TrackParticleTruthAthenaPool/src/TrackParticleTruthCollectionContainerCnv.h b/Reconstruction/TrackParticleTruthAthenaPool/src/TrackParticleTruthCollectionContainerCnv.h index 5bf8fc304bb7..0100c6b18eec 100644 --- a/Reconstruction/TrackParticleTruthAthenaPool/src/TrackParticleTruthCollectionContainerCnv.h +++ b/Reconstruction/TrackParticleTruthAthenaPool/src/TrackParticleTruthCollectionContainerCnv.h @@ -13,6 +13,7 @@ #include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h" #include "ParticleTruth/TrackParticleTruthCollectionContainer.h" +#include "ParticleTruth/TrackParticleTruthVector.h" class TrackParticleTruthCollectionContainer_tlp1; @@ -30,8 +31,8 @@ class TrackParticleTruthCollectionContainerCnv : public TrackParticleTruthCollec protected: public: TrackParticleTruthCollectionContainerCnv(ISvcLocator* svcloc); -protected: ~TrackParticleTruthCollectionContainerCnv(); +protected: virtual TrackParticleTruthCollectionContainer* createTransient(); virtual TrackParticleTruthCollectionContainerPERS* createPersistent(TrackParticleTruthCollectionContainer*); private: diff --git a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimerTool.h b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimerTool.h index de5a8564a1c8..06f64ff28386 100644 --- a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimerTool.h +++ b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimerTool.h @@ -7,8 +7,8 @@ #include "G4AtlasTools/UserActionToolBase.h" #include "TestActionTimer.h" +#include "GaudiKernel/ITHistSvc.h" -class ITHistSvc; namespace G4UA { diff --git a/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeMcEventCollection.h b/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeMcEventCollection.h index 30354b8b826a..1930fe2138f6 100755 --- a/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeMcEventCollection.h +++ b/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeMcEventCollection.h @@ -7,8 +7,8 @@ #include "AthenaBaseComps/AthAlgorithm.h" #include "GaudiKernel/ToolHandle.h" +#include "PileUpTools/PileUpMergeSvc.h" -class IPileUpTool; /** @class MergeMcEventCollection * @brief an algorithm to merge MC truth collection in the overlay store diff --git a/Simulation/ISF/ISF_Core/ISF_Tools/src/ParticleHelper.h b/Simulation/ISF/ISF_Core/ISF_Tools/src/ParticleHelper.h index 6b0a43c3e391..de3625bd38fa 100644 --- a/Simulation/ISF/ISF_Core/ISF_Tools/src/ParticleHelper.h +++ b/Simulation/ISF/ISF_Core/ISF_Tools/src/ParticleHelper.h @@ -20,11 +20,12 @@ #include "ISF_Interfaces/IParticleHelper.h" // Barcode includes #include "BarcodeEvent/Barcode.h" +#include "BarcodeInterfaces/IBarcodeSvc.h" -// forward declarations -namespace Barcode { - class IBarcodeSvc; -} +// // forward declarations +// namespace Barcode { +// class IBarcodeSvc; +// } namespace ISF { diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimSD/src/FCS_StepInfoSD.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimSD/src/FCS_StepInfoSD.h index e00740d417b7..37b9c882fc7c 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimSD/src/FCS_StepInfoSD.h +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimSD/src/FCS_StepInfoSD.h @@ -14,6 +14,8 @@ #include "CLHEP/Units/SystemOfUnits.h" #include "ISF_FastCaloSimEvent/FCS_StepInfoCollection.h" +#include "LArG4Code/ILArCalculatorSvc.h" +#include "TileG4Interfaces/ITileCalculator.h" #include <map> #include <vector> @@ -29,8 +31,6 @@ class LArMiniFCAL_ID; class TileID; class CaloDetDescrManager; -class ILArCalculatorSvc; -class ITileCalculator; class LArHitContainer; class StoreGateSvc; diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventAthenaPool/src/PlanarClusterContainerCnv.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventAthenaPool/src/PlanarClusterContainerCnv.cxx index 4d5866f65d30..cff8f0f01948 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventAthenaPool/src/PlanarClusterContainerCnv.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventAthenaPool/src/PlanarClusterContainerCnv.cxx @@ -13,8 +13,6 @@ PlanarClusterContainerCnv::PlanarClusterContainerCnv (ISvcLocator* svcloc) : PlanarClusterContainerCnvBase(svcloc) {} -PlanarClusterContainerCnv::~PlanarClusterContainerCnv() {} - iFatras::PlanarClusterContainer* PlanarClusterContainerCnv::createTransient() { diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventAthenaPool/src/PlanarClusterContainerCnv.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventAthenaPool/src/PlanarClusterContainerCnv.h index a93233924451..a4745db196b6 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventAthenaPool/src/PlanarClusterContainerCnv.h +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventAthenaPool/src/PlanarClusterContainerCnv.h @@ -33,7 +33,6 @@ protected: public: PlanarClusterContainerCnv (ISvcLocator* svcloc); protected: - virtual ~PlanarClusterContainerCnv() override; virtual PlanarClusterContainer_PERS* createPersistent (iFatras::PlanarClusterContainer* transCont) override; virtual iFatras::PlanarClusterContainer* createTransient () override; diff --git a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSDTool.h b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSDTool.h index 33e156e23989..627114419cf7 100644 --- a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSDTool.h +++ b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSDTool.h @@ -18,10 +18,10 @@ #include <string> #include "TileGeoG4SD/TileSDOptions.h" +#include "TileG4Interfaces/ITileCalculator.h" // Members class G4VSensitiveDetector; -class ITileCalculator; class TileGeoG4CalibSDTool: public SensitiveDetectorBase { public: diff --git a/TileCalorimeter/TileSimAlgs/TileSimAlgs/TileHitVecToCntTool.h b/TileCalorimeter/TileSimAlgs/TileSimAlgs/TileHitVecToCntTool.h index a642a013bc9e..81a5c8dae37d 100644 --- a/TileCalorimeter/TileSimAlgs/TileSimAlgs/TileHitVecToCntTool.h +++ b/TileCalorimeter/TileSimAlgs/TileSimAlgs/TileHitVecToCntTool.h @@ -32,10 +32,13 @@ #include "TileIdentifier/TileFragHash.h" #include "TileSimEvent/TileHitVector.h" #include "TileEvent/TileHitContainer.h" +#include "TileConditions/TileCablingSvc.h" // Athena includes #include "PileUpTools/PileUpToolBase.h" #include "StoreGate/WriteHandleKey.h" +#include "AthenaKernel/IAtRndmGenSvc.h" +#include "AthenaKernel/ITriggerTime.h" // Gaudi includes #include "GaudiKernel/ServiceHandle.h" @@ -50,10 +53,7 @@ class TileInfo; class TileHitNonConstContainer; class TileDetDescrManager; class PileUpMergeSvc; -class ITriggerTime; -class IAtRndmGenSvc; class Identifier; -class TileCablingSvc; class TileCablingService; class TileHitCollection; diff --git a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileRawChannelContByteStreamCnv.h b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileRawChannelContByteStreamCnv.h index c6ca4f49d6ad..e07be714ecfc 100644 --- a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileRawChannelContByteStreamCnv.h +++ b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileRawChannelContByteStreamCnv.h @@ -13,6 +13,8 @@ // Athena includes #include "AthenaBaseComps/AthMessaging.h" +#include "ByteStreamCnvSvcBase/IByteStreamEventAccess.h" +#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h" #include <vector> diff --git a/Tracking/TrkAlgorithms/TrkTruthAlgs/TrkTruthAlgs/TrackTruthSimilaritySelector.h b/Tracking/TrkAlgorithms/TrkTruthAlgs/TrkTruthAlgs/TrackTruthSimilaritySelector.h index 2dba50d928b0..957e20d58248 100644 --- a/Tracking/TrkAlgorithms/TrkTruthAlgs/TrkTruthAlgs/TrackTruthSimilaritySelector.h +++ b/Tracking/TrkAlgorithms/TrkTruthAlgs/TrkTruthAlgs/TrackTruthSimilaritySelector.h @@ -12,8 +12,7 @@ #include "GaudiKernel/ToolHandle.h" #include "TrkTruthData/DetailedTrackTruthCollection.h" #include "TrkTruthData/TrackTruthCollection.h" - -namespace Trk { class IDetailedTrackTruthSimilarity; } +#include "TrkToolInterfaces/IDetailedTrackTruthSimilarity.h" class TrackTruthSimilaritySelector: public AthAlgorithm { public: diff --git a/Tracking/TrkAlgorithms/TrkTruthAlgs/src/TrackParticleTruthAlg.h b/Tracking/TrkAlgorithms/TrkTruthAlgs/src/TrackParticleTruthAlg.h index c9747ebdc729..d52cb3ccef2f 100644 --- a/Tracking/TrkAlgorithms/TrkTruthAlgs/src/TrackParticleTruthAlg.h +++ b/Tracking/TrkAlgorithms/TrkTruthAlgs/src/TrackParticleTruthAlg.h @@ -13,9 +13,7 @@ #include "GeneratorObjects/xAODTruthParticleLink.h" #include "StoreGate/ReadHandleKey.h" #include "StoreGate/WriteDecorHandleKey.h" - - -class IMCTruthClassifier; +#include "MCTruthClassifier/IMCTruthClassifier.h" class TrackParticleTruthAlg: public AthAlgorithm { public: diff --git a/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/ElementTableCnv.cxx b/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/ElementTableCnv.cxx index b195dca2a908..c311bc863246 100644 --- a/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/ElementTableCnv.cxx +++ b/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/ElementTableCnv.cxx @@ -20,12 +20,6 @@ ElementTableCnv::ElementTableCnv( ISvcLocator *svcloc ) : m_log( m_msgSvc, "ElementTableCnv" ) {} -//----------------------------------------------------------------------------- -// Destructor -//----------------------------------------------------------------------------- -ElementTableCnv::~ElementTableCnv() -{} - //----------------------------------------------------------------------------- // Initializer //----------------------------------------------------------------------------- diff --git a/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/ElementTableCnv.h b/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/ElementTableCnv.h index 2a04196573bc..4a9e901e4cf3 100644 --- a/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/ElementTableCnv.h +++ b/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/ElementTableCnv.h @@ -36,8 +36,6 @@ class ElementTableCnv : public ElementTableCnvBase { public: ElementTableCnv( ISvcLocator *svcloc ); protected: - ~ElementTableCnv(); - virtual StatusCode initialize(); virtual ElementTable_PERS* createPersistent( Trk::ElementTable *transCont); diff --git a/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/LayerMaterialMapCnv.cxx b/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/LayerMaterialMapCnv.cxx index ca1361788232..a8c5aec75795 100644 --- a/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/LayerMaterialMapCnv.cxx +++ b/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/LayerMaterialMapCnv.cxx @@ -19,11 +19,6 @@ LayerMaterialMapCnv::LayerMaterialMapCnv(ISvcLocator* svcloc): { } -//----------------------------------------------------------------------------- -// Destructor -//----------------------------------------------------------------------------- -LayerMaterialMapCnv::~LayerMaterialMapCnv() {} - //----------------------------------------------------------------------------- // Initializer //----------------------------------------------------------------------------- diff --git a/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/LayerMaterialMapCnv.h b/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/LayerMaterialMapCnv.h index f6dcbac32f39..ef1f66ba4b3a 100644 --- a/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/LayerMaterialMapCnv.h +++ b/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/LayerMaterialMapCnv.h @@ -37,7 +37,6 @@ protected: public: LayerMaterialMapCnv( ISvcLocator *svcloc ); protected: - ~LayerMaterialMapCnv(); virtual StatusCode initialize(); virtual LayerMaterialMap_PERS *createPersistent( Trk::LayerMaterialMap *transCont); diff --git a/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/MaterialStepCollectionCnv.cxx b/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/MaterialStepCollectionCnv.cxx index b3651ebae54f..1ce168475834 100644 --- a/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/MaterialStepCollectionCnv.cxx +++ b/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/MaterialStepCollectionCnv.cxx @@ -20,12 +20,6 @@ MaterialStepCollectionCnv::MaterialStepCollectionCnv( ISvcLocator *svcloc ) : m_log( m_msgSvc, "MaterialStepCollectionCnv" ) {} -//----------------------------------------------------------------------------- -// Destructor -//----------------------------------------------------------------------------- -MaterialStepCollectionCnv::~MaterialStepCollectionCnv() -{} - //----------------------------------------------------------------------------- // Initializer //----------------------------------------------------------------------------- diff --git a/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/MaterialStepCollectionCnv.h b/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/MaterialStepCollectionCnv.h index 5d4f88e11bec..4c613123932a 100644 --- a/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/MaterialStepCollectionCnv.h +++ b/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/MaterialStepCollectionCnv.h @@ -36,8 +36,6 @@ class MaterialStepCollectionCnv : public MaterialStepCollectionCnvBase { public: MaterialStepCollectionCnv( ISvcLocator *svcloc ); protected: - ~MaterialStepCollectionCnv(); - virtual StatusCode initialize(); virtual MaterialStepCollection_PERS* createPersistent( Trk::MaterialStepCollection *transCont); diff --git a/Tracking/TrkDetDescr/TrkDetDescrUnitTests/TrkDetDescrUnitTests/TrackingGeometryTest.h b/Tracking/TrkDetDescr/TrkDetDescrUnitTests/TrkDetDescrUnitTests/TrackingGeometryTest.h index ddde3e38481c..6b99d709ff0f 100644 --- a/Tracking/TrkDetDescr/TrkDetDescrUnitTests/TrkDetDescrUnitTests/TrackingGeometryTest.h +++ b/Tracking/TrkDetDescr/TrkDetDescrUnitTests/TrkDetDescrUnitTests/TrackingGeometryTest.h @@ -15,6 +15,7 @@ // Trk includes #include "TrkDetDescrUnitTests/TrkDetDescrUnitTestBase.h" #include "TrkDetDescrInterfaces/ITrackingGeometrySvc.h" +#include "TrkDetDescrInterfaces/IGeometryProcessor.h" #ifdef TRKDETDESCR_MEMUSAGE #include "TrkDetDescrUtils/MemoryLogger.h" @@ -22,7 +23,6 @@ namespace Trk { - class IGeometryProcessor; class TrackingGeometry; class TrackingVolume; diff --git a/Tracking/TrkEventCnv/TrkEventAthenaPool/src/MVFVxContainerCnv.cxx b/Tracking/TrkEventCnv/TrkEventAthenaPool/src/MVFVxContainerCnv.cxx index 46690482d244..558f2ff4a220 100755 --- a/Tracking/TrkEventCnv/TrkEventAthenaPool/src/MVFVxContainerCnv.cxx +++ b/Tracking/TrkEventCnv/TrkEventAthenaPool/src/MVFVxContainerCnv.cxx @@ -23,12 +23,6 @@ MVFVxContainerCnv::MVFVxContainerCnv( ISvcLocator *svcloc ): } -//----------------------------------------------------------------------------- -// Destructor -//----------------------------------------------------------------------------- -MVFVxContainerCnv::~MVFVxContainerCnv() -{} - //----------------------------------------------------------------------------- // Initializer //----------------------------------------------------------------------------- diff --git a/Tracking/TrkEventCnv/TrkEventAthenaPool/src/MVFVxContainerCnv.h b/Tracking/TrkEventCnv/TrkEventAthenaPool/src/MVFVxContainerCnv.h index 6d72d3dcaab5..c9f23dc862d7 100644 --- a/Tracking/TrkEventCnv/TrkEventAthenaPool/src/MVFVxContainerCnv.h +++ b/Tracking/TrkEventCnv/TrkEventAthenaPool/src/MVFVxContainerCnv.h @@ -45,8 +45,6 @@ public: MVFVxContainerCnv( ISvcLocator *svcloc ); protected: - ~MVFVxContainerCnv(); - virtual StatusCode initialize(); virtual MVFVxContainer_PERS *createPersistent( MVFVxContainer *transCont); diff --git a/Tracking/TrkEventCnv/TrkEventAthenaPool/src/SegmentCollectionCnv.cxx b/Tracking/TrkEventCnv/TrkEventAthenaPool/src/SegmentCollectionCnv.cxx index 1eae12a3e2bc..3b1170a2bceb 100755 --- a/Tracking/TrkEventCnv/TrkEventAthenaPool/src/SegmentCollectionCnv.cxx +++ b/Tracking/TrkEventCnv/TrkEventAthenaPool/src/SegmentCollectionCnv.cxx @@ -24,11 +24,6 @@ SegmentCollectionCnv::SegmentCollectionCnv(ISvcLocator* svcloc): { } -//----------------------------------------------------------------------------- -// Destructor -//----------------------------------------------------------------------------- -SegmentCollectionCnv::~SegmentCollectionCnv() {} - //----------------------------------------------------------------------------- // Initializer //----------------------------------------------------------------------------- diff --git a/Tracking/TrkEventCnv/TrkEventAthenaPool/src/SegmentCollectionCnv.h b/Tracking/TrkEventCnv/TrkEventAthenaPool/src/SegmentCollectionCnv.h index 0e52e9257121..56d8c0f7e244 100755 --- a/Tracking/TrkEventCnv/TrkEventAthenaPool/src/SegmentCollectionCnv.h +++ b/Tracking/TrkEventCnv/TrkEventAthenaPool/src/SegmentCollectionCnv.h @@ -48,8 +48,6 @@ public: SegmentCollectionCnv( ISvcLocator *svcloc ); protected: - ~SegmentCollectionCnv(); - virtual SegmentCollection_PERS *createPersistent( Trk::SegmentCollection *transCont); virtual Trk::SegmentCollection *createTransient(); diff --git a/Tracking/TrkEventCnv/TrkEventAthenaPool/src/TrackCollectionCnv.cxx b/Tracking/TrkEventCnv/TrkEventAthenaPool/src/TrackCollectionCnv.cxx index 8a1b859e51c6..e4f174b7b9f5 100755 --- a/Tracking/TrkEventCnv/TrkEventAthenaPool/src/TrackCollectionCnv.cxx +++ b/Tracking/TrkEventCnv/TrkEventAthenaPool/src/TrackCollectionCnv.cxx @@ -29,13 +29,6 @@ TrackCollectionCnv::TrackCollectionCnv(ISvcLocator* svcloc): { } -//----------------------------------------------------------------------------- -// Destructor -//----------------------------------------------------------------------------- -TrackCollectionCnv::~TrackCollectionCnv() -{ -} - //----------------------------------------------------------------------------- // Initializer //----------------------------------------------------------------------------- diff --git a/Tracking/TrkEventCnv/TrkEventAthenaPool/src/TrackCollectionCnv.h b/Tracking/TrkEventCnv/TrkEventAthenaPool/src/TrackCollectionCnv.h index e6889db5f2db..a9a31cca4142 100755 --- a/Tracking/TrkEventCnv/TrkEventAthenaPool/src/TrackCollectionCnv.h +++ b/Tracking/TrkEventCnv/TrkEventAthenaPool/src/TrackCollectionCnv.h @@ -53,7 +53,6 @@ public: TrackCollectionCnv( ISvcLocator *svcloc ); protected: - ~TrackCollectionCnv(); virtual StatusCode initialize(); virtual TrackCollection_PERS *createPersistent( TrackCollection *transCont); diff --git a/Tracking/TrkEventCnv/TrkEventAthenaPool/src/V0ContainerCnv.cxx b/Tracking/TrkEventCnv/TrkEventAthenaPool/src/V0ContainerCnv.cxx index 9ba29c2ffec6..3c7111ae82f2 100755 --- a/Tracking/TrkEventCnv/TrkEventAthenaPool/src/V0ContainerCnv.cxx +++ b/Tracking/TrkEventCnv/TrkEventAthenaPool/src/V0ContainerCnv.cxx @@ -21,12 +21,6 @@ V0ContainerCnv::V0ContainerCnv( ISvcLocator *svcloc ): m_msgSvc( msgSvc() ), m_log( m_msgSvc, "V0ContainerCnv" ) {} - -//----------------------------------------------------------------------------- -// Destructor -//----------------------------------------------------------------------------- -V0ContainerCnv::~V0ContainerCnv() -{} //----------------------------------------------------------------------------- // Initializer diff --git a/Tracking/TrkEventCnv/TrkEventAthenaPool/src/V0ContainerCnv.h b/Tracking/TrkEventCnv/TrkEventAthenaPool/src/V0ContainerCnv.h index 452562dc774e..18602d6fde96 100644 --- a/Tracking/TrkEventCnv/TrkEventAthenaPool/src/V0ContainerCnv.h +++ b/Tracking/TrkEventCnv/TrkEventAthenaPool/src/V0ContainerCnv.h @@ -49,7 +49,6 @@ class V0ContainerCnv : public V0ContainerCnvBase public: V0ContainerCnv( ISvcLocator *svcloc ); protected: - ~V0ContainerCnv(); virtual StatusCode initialize(); virtual V0Container_PERS *createPersistent( V0Container *transCont); diff --git a/Tracking/TrkEventCnv/TrkEventAthenaPool/src/VxContainerCnv.cxx b/Tracking/TrkEventCnv/TrkEventAthenaPool/src/VxContainerCnv.cxx index c501aa0ac3c0..172b7cd8de30 100755 --- a/Tracking/TrkEventCnv/TrkEventAthenaPool/src/VxContainerCnv.cxx +++ b/Tracking/TrkEventCnv/TrkEventAthenaPool/src/VxContainerCnv.cxx @@ -25,12 +25,6 @@ VxContainerCnv::VxContainerCnv( ISvcLocator *svcloc ): m_log( m_msgSvc, "VxContainerCnv" ) {} -//----------------------------------------------------------------------------- -// Destructor -//----------------------------------------------------------------------------- -VxContainerCnv::~VxContainerCnv() -{} - //----------------------------------------------------------------------------- // Initializer //----------------------------------------------------------------------------- diff --git a/Tracking/TrkEventCnv/TrkEventAthenaPool/src/VxContainerCnv.h b/Tracking/TrkEventCnv/TrkEventAthenaPool/src/VxContainerCnv.h index e4995daf51d1..6dbb50787204 100644 --- a/Tracking/TrkEventCnv/TrkEventAthenaPool/src/VxContainerCnv.h +++ b/Tracking/TrkEventCnv/TrkEventAthenaPool/src/VxContainerCnv.h @@ -43,7 +43,6 @@ class VxContainerCnv : public VxContainerCnvBase, public AthenaPoolCnvTPExtensio public: VxContainerCnv( ISvcLocator *svcloc ); protected: - ~VxContainerCnv(); virtual StatusCode initialize(); virtual VxContainer_PERS *createPersistent( VxContainer *transCont); diff --git a/Tracking/TrkEventCnv/TrkJiveXML/TrkJiveXML/TrackRetriever.h b/Tracking/TrkEventCnv/TrkJiveXML/TrkJiveXML/TrackRetriever.h index de4ef6fe5f40..f4653a4d8680 100644 --- a/Tracking/TrkEventCnv/TrkJiveXML/TrkJiveXML/TrackRetriever.h +++ b/Tracking/TrkEventCnv/TrkJiveXML/TrkJiveXML/TrackRetriever.h @@ -8,12 +8,10 @@ #include "JiveXML/IDataRetriever.h" #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" +#include "TrkToolInterfaces/ITrackSummaryTool.h" +#include "TrkToolInterfaces/IResidualPullCalculator.h" //Forward declarations -namespace Trk { - class IResidualPullCalculator; - class ITrackSummaryTool; -} class AtlasDetectorID; namespace JiveXML{ diff --git a/Tracking/TrkEventCnv/TrkTruthAthenaPool/src/DetailedTrackTruthCollectionCnv.h b/Tracking/TrkEventCnv/TrkTruthAthenaPool/src/DetailedTrackTruthCollectionCnv.h index c8da50fd698f..39b0e21d3192 100644 --- a/Tracking/TrkEventCnv/TrkTruthAthenaPool/src/DetailedTrackTruthCollectionCnv.h +++ b/Tracking/TrkEventCnv/TrkTruthAthenaPool/src/DetailedTrackTruthCollectionCnv.h @@ -12,8 +12,9 @@ #include "TrkTruthTPCnv/DetailedTrackTruthCollectionCnv_p1.h" #include "TrkTruthTPCnv/DetailedTrackTruthCollectionCnv_p2.h" #include "TrkTruthTPCnv/DetailedTrackTruthCollectionCnv_p3.h" +#include "TrkTruthTPCnv/DetailedTrackTruthCollection_p2.h" -namespace Trk { class DetailedTrackTruthCollection_p2; } +// namespace Trk { class DetailedTrackTruthCollection_p2; } typedef Trk::DetailedTrackTruthCollection_p2 DetailedTrackTruthCollectionPERS; diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/TrkTruthTPCnv/DetailedTrackTruthCollectionCnv_p1.h b/Tracking/TrkEventCnv/TrkTruthTPCnv/TrkTruthTPCnv/DetailedTrackTruthCollectionCnv_p1.h index 24b975dfd008..2444e548fefc 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/TrkTruthTPCnv/DetailedTrackTruthCollectionCnv_p1.h +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/TrkTruthTPCnv/DetailedTrackTruthCollectionCnv_p1.h @@ -11,11 +11,12 @@ #define DETAILEDTRACKTRUTHCOLLECTIONCNV_P1_H #include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" +#include "TrkTruthTPCnv/DetailedTrackTruthCollection_p1.h" class StoreGateSvc; class MsgStream; class DetailedTrackTruthCollection; -namespace Trk { class DetailedTrackTruthCollection_p1; } +//namespace Trk { class DetailedTrackTruthCollection_p1; } class DetailedTrackTruthCollectionCnv_p1 diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/TrkTruthTPCnv/DetailedTrackTruthCollectionCnv_p3.h b/Tracking/TrkEventCnv/TrkTruthTPCnv/TrkTruthTPCnv/DetailedTrackTruthCollectionCnv_p3.h index 4ddbddfd14b4..2cb1d22e6b74 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/TrkTruthTPCnv/DetailedTrackTruthCollectionCnv_p3.h +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/TrkTruthTPCnv/DetailedTrackTruthCollectionCnv_p3.h @@ -12,11 +12,12 @@ #define DETAILEDTRACKTRUTHCOLLECTIONCNV_P3_H #include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" +#include "TrkTruthTPCnv/DetailedTrackTruthCollection_p3.h" class StoreGateSvc; class MsgStream; class DetailedTrackTruthCollection; -namespace Trk { class DetailedTrackTruthCollection_p3; } +// namespace Trk { class DetailedTrackTruthCollection_p3; } class DetailedTrackTruthCollectionCnv_p3 diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/TrkTruthTPCnv/PRD_MultiTruthCollectionCnv_p2.h b/Tracking/TrkEventCnv/TrkTruthTPCnv/TrkTruthTPCnv/PRD_MultiTruthCollectionCnv_p2.h index 895b0b127610..fc4ff21820fd 100755 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/TrkTruthTPCnv/PRD_MultiTruthCollectionCnv_p2.h +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/TrkTruthTPCnv/PRD_MultiTruthCollectionCnv_p2.h @@ -11,10 +11,11 @@ #define PRD_MULTITRUTHCOLLECTIONCNV_P2_H #include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" +#include "TrkTruthTPCnv/PRD_MultiTruthCollection_p2.h" class MsgStream; class PRD_MultiTruthCollection; -namespace Trk { class PRD_MultiTruthCollection_p2; } +// namespace Trk { class PRD_MultiTruthCollection_p2; } class PRD_MultiTruthCollectionCnv_p2 diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/TrkTruthTPCnv/PRD_MultiTruthCollectionCnv_p3.h b/Tracking/TrkEventCnv/TrkTruthTPCnv/TrkTruthTPCnv/PRD_MultiTruthCollectionCnv_p3.h index ac382d08e3a7..4aad4bde641f 100755 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/TrkTruthTPCnv/PRD_MultiTruthCollectionCnv_p3.h +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/TrkTruthTPCnv/PRD_MultiTruthCollectionCnv_p3.h @@ -11,10 +11,11 @@ #define PRD_MULTITRUTHCOLLECTIONCNV_P3_H #include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" +#include "TrkTruthTPCnv/PRD_MultiTruthCollection_p3.h" class MsgStream; class PRD_MultiTruthCollection; -namespace Trk { class PRD_MultiTruthCollection_p3; } +// namespace Trk { class PRD_MultiTruthCollection_p3; } class PRD_MultiTruthCollectionCnv_p3 diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/TrkTruthTPCnv/TrackTruthCollectionCnv_p0.h b/Tracking/TrkEventCnv/TrkTruthTPCnv/TrkTruthTPCnv/TrackTruthCollectionCnv_p0.h index 29bf0846b52c..726361b4f6e4 100755 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/TrkTruthTPCnv/TrackTruthCollectionCnv_p0.h +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/TrkTruthTPCnv/TrackTruthCollectionCnv_p0.h @@ -11,11 +11,12 @@ #define TRACKTRUTHCOLLECTIONCNV_P0_H #include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" +#include "TrkTruthTPCnv/TrackTruthCollection_p0.h" class StoreGateSvc; class MsgStream; class TrackTruthCollection; -class TrackTruthVector; +// class TrackTruthVector; namespace Trk { typedef TrackTruthVector TrackTruthCollection_p0; diff --git a/Tracking/TrkFitter/TrkRefitAlg/TrkRefitAlg/ReFitTrack.h b/Tracking/TrkFitter/TrkRefitAlg/TrkRefitAlg/ReFitTrack.h index 6db40dc054ca..bead3025482a 100755 --- a/Tracking/TrkFitter/TrkRefitAlg/TrkRefitAlg/ReFitTrack.h +++ b/Tracking/TrkFitter/TrkRefitAlg/TrkRefitAlg/ReFitTrack.h @@ -21,18 +21,17 @@ #include "TrkEventUtils/TrkParametersComparisonFunction.h" #include "StoreGate/ReadHandleKey.h" #include "StoreGate/WriteHandleKey.h" +#include "TrkExInterfaces/IExtrapolator.h" +#include "InDetBeamSpotService/IBeamCondSvc.h" +#include "TrkToolInterfaces/ITrackSelectorTool.h" +#include "TrkToolInterfaces/IPRD_AssociationTool.h" +#include "TrkToolInterfaces/ITrackSummaryTool.h" +#include "TrkFitterInterfaces/ITrackFitter.h" -class IBeamCondSvc; class VxContainer; namespace Trk{ -class ITrackFitter; -class IExtrapolator; -class ITrackSummaryTool; -class ITrackSelectorTool; -class IPRD_AssociationTool; - /** @brief Algorithm using an instance of a ITrackFitter to refit the tracks of a given track collection. diff --git a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/MaterialStepRecorder.h b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/MaterialStepRecorder.h index a20112b3447e..a30b1f8c6f5f 100644 --- a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/MaterialStepRecorder.h +++ b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/MaterialStepRecorder.h @@ -29,10 +29,8 @@ #include "TrkGeometry/MaterialStepCollection.h" #include "TrkGeometry/ElementTable.h" #include "TrkGeometry/Material.h" +#include "TrkValInterfaces/IPositionMomentumWriter.h" -namespace Trk { - class IPositionMomentumWriter; -} namespace G4UA { diff --git a/Tracking/TrkTools/TrkTruthToTrack/TrkTruthToTrack/TruthToTrack.h b/Tracking/TrkTools/TrkTruthToTrack/TrkTruthToTrack/TruthToTrack.h index abaa4a3f6998..8c6e2c779598 100755 --- a/Tracking/TrkTools/TrkTruthToTrack/TrkTruthToTrack/TruthToTrack.h +++ b/Tracking/TrkTools/TrkTruthToTrack/TrkTruthToTrack/TruthToTrack.h @@ -23,9 +23,9 @@ #include "GaudiKernel/ToolHandle.h" #include "TrkToolInterfaces/ITruthToTrack.h" #include "AthenaBaseComps/AthAlgTool.h" +#include "TrkExInterfaces/IExtrapolator.h" namespace HepPDT { class ParticleDataTable; } -namespace Trk { class IExtrapolator; } namespace Trk { diff --git a/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/PRD_TruthTrajectoryBuilder.h b/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/PRD_TruthTrajectoryBuilder.h index 49ddf7258310..f5e5e2bbb001 100644 --- a/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/PRD_TruthTrajectoryBuilder.h +++ b/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/PRD_TruthTrajectoryBuilder.h @@ -16,6 +16,8 @@ #include "TrkTruthTrackInterfaces/IPRD_TruthTrajectoryBuilder.h" #include "TrkTruthTrackInterfaces/PRD_TruthTrajectory.h" #include "TrkTruthData/PRD_MultiTruthCollection.h" +#include "TrkTruthTrackInterfaces/IPRD_TruthTrajectoryManipulator.h" +#include "TrkToolInterfaces/IPRD_Provider.h" class AtlasDetectorID; @@ -25,8 +27,6 @@ namespace HepMC { namespace Trk { - class IPRD_Provider; - class IPRD_TruthTrajectoryManipulator; class PrepRawData; /** diff --git a/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/TruthTrackBuilder.h b/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/TruthTrackBuilder.h index ca8233b237b3..360e02614016 100644 --- a/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/TruthTrackBuilder.h +++ b/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/TruthTrackBuilder.h @@ -13,10 +13,13 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/IIncidentListener.h" +#include "GaudiKernel/IPartPropSvc.h" // Trk includes #include "TrkTruthTrackInterfaces/ITruthTrackBuilder.h" +#include "TrkFitterInterfaces/ITrackFitter.h" +#include "TrkExInterfaces/IExtrapolator.h" +#include "TrkToolInterfaces/IRIO_OnTrackCreator.h" -class IPartPropSvc; class AtlasDetectorID; namespace HepPDT{ @@ -26,9 +29,6 @@ namespace HepPDT{ namespace Trk { class Track; - class ITrackFitter; - class IExtrapolator; - class IRIO_OnTrackCreator; /** @class ITruthTrackBuilder diff --git a/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigROBSelector.h b/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigROBSelector.h index e5ef3b006600..a884a8bc7235 100644 --- a/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigROBSelector.h +++ b/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigROBSelector.h @@ -26,8 +26,8 @@ #include "GaudiKernel/ServiceHandle.h" #include "GaudiKernel/ITHistSvc.h" #include "IRegionSelector/RegSelEnums.h" +#include "IRegionSelector/IRegSelSvc.h" -class IRegSelSvc; class MsgStream; class PartialEventBuildingInfo; class TH1I; diff --git a/Trigger/TrigAlgorithms/TrigL2MissingET/TrigL2MissingET/T2CaloMissingET.h b/Trigger/TrigAlgorithms/TrigL2MissingET/TrigL2MissingET/T2CaloMissingET.h index 15aba0530371..2eda10f02fa2 100755 --- a/Trigger/TrigAlgorithms/TrigL2MissingET/TrigL2MissingET/T2CaloMissingET.h +++ b/Trigger/TrigAlgorithms/TrigL2MissingET/TrigL2MissingET/T2CaloMissingET.h @@ -29,12 +29,13 @@ #include "LArIdentifier/LArOnlineID.h" #include "LArIdentifier/LArReadoutModuleService.h" #include "CaloIdentifier/CaloCell_ID.h" +#include "TrigT2CaloCommon/ITrigDataAccess.h" +#include "TrigTimeAlgs/ITrigTimerSvc.h" #include "xAODTrigMissingET/TrigMissingET.h" #include <vector> -class ITrigDataAccess; class MsgStream; class TrigTimerSvc; diff --git a/Trigger/TrigAnalysis/TrigEffJpsiTools/src/MuonRoiWithExtendedBunches.h b/Trigger/TrigAnalysis/TrigEffJpsiTools/src/MuonRoiWithExtendedBunches.h index a51fa59c7e5d..bc048635a0c8 100644 --- a/Trigger/TrigAnalysis/TrigEffJpsiTools/src/MuonRoiWithExtendedBunches.h +++ b/Trigger/TrigAnalysis/TrigEffJpsiTools/src/MuonRoiWithExtendedBunches.h @@ -19,10 +19,9 @@ *--------------------------------------------------------------------*/ #include "AthenaBaseComps/AthAlgorithm.h" #include "GaudiKernel/ServiceHandle.h" +#include "TrigT1Interfaces/RecMuonRoiSvc.h" namespace ROIB { class RoIBResult; } -namespace LVL1 { class RecMuonRoiSvc; } - namespace MuComm { enum { diff --git a/Trigger/TrigDataAccess/TrigSerializeCnvSvc/TrigSerializeCnvSvc/TrigSerializeConverter.h b/Trigger/TrigDataAccess/TrigSerializeCnvSvc/TrigSerializeCnvSvc/TrigSerializeConverter.h index 8548f28dc3bd..8a13f6b306e6 100755 --- a/Trigger/TrigDataAccess/TrigSerializeCnvSvc/TrigSerializeCnvSvc/TrigSerializeConverter.h +++ b/Trigger/TrigDataAccess/TrigSerializeCnvSvc/TrigSerializeCnvSvc/TrigSerializeConverter.h @@ -282,8 +282,6 @@ public: m_log = new MsgStream( msgSvc(), "TrigSerializeConverter" ); } -protected: - ~TrigSerializeConverter(){ delete m_log; } diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/CombinedMuonFeatureCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/CombinedMuonFeatureCnv.h index 52f530ff86f9..39eadacd1387 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/CombinedMuonFeatureCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/CombinedMuonFeatureCnv.h @@ -42,12 +42,11 @@ typedef T_AthenaPoolCustomCnv<CombinedMuonFeature, CombinedMuonFeature_PERS> class CombinedMuonFeatureCnv : public CombinedMuonFeatureCnvBase { friend class CnvFactory<CombinedMuonFeatureCnv>; - protected: public: CombinedMuonFeatureCnv( ISvcLocator *svcloc ); -protected: ~CombinedMuonFeatureCnv(); +protected: virtual CombinedMuonFeature_PERS* createPersistent( CombinedMuonFeature *transObj); virtual CombinedMuonFeature* createTransient(); diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/FTK_RawTrackContainerCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/FTK_RawTrackContainerCnv.h index 9145158d5a4f..4c2ac89a7405 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/FTK_RawTrackContainerCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/FTK_RawTrackContainerCnv.h @@ -38,9 +38,9 @@ class FTK_RawTrackContainerCnv : public FTK_RawTrackContainerCnvBase{ public: FTK_RawTrackContainerCnv(ISvcLocator* svcloc); -protected: ~FTK_RawTrackContainerCnv(); +protected: virtual FTK_RawTrackContainer_PERS* createPersistent(FTK_RawTrackContainer* transObj); virtual FTK_RawTrackContainer* createTransient (); diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/IsoMuonFeatureCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/IsoMuonFeatureCnv.h index 6c9564d6b417..f11cc54b23e5 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/IsoMuonFeatureCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/IsoMuonFeatureCnv.h @@ -40,12 +40,11 @@ typedef T_AthenaPoolCustomCnv<IsoMuonFeature, IsoMuonFeature_PERS> class IsoMuonFeatureCnv : public IsoMuonFeatureCnvBase { friend class CnvFactory<IsoMuonFeatureCnv>; - protected: public: IsoMuonFeatureCnv( ISvcLocator *svcloc ); -protected: ~IsoMuonFeatureCnv(); +protected: virtual IsoMuonFeature_PERS* createPersistent( IsoMuonFeature *transObj); virtual IsoMuonFeature* createTransient(); diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/MuonFeatureCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/MuonFeatureCnv.h index a70057af893f..c5eb6f0b84e7 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/MuonFeatureCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/MuonFeatureCnv.h @@ -36,12 +36,11 @@ class MuonFeatureCnv : public MuonFeatureCnvBase { friend class CnvFactory<MuonFeatureCnv>; - protected: public: MuonFeatureCnv(ISvcLocator *svcloc); -protected: ~MuonFeatureCnv(); +protected: virtual MuonFeature_PERS *createPersistent(MuonFeature *transObj); virtual MuonFeature *createTransient(); }; diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/MuonFeatureDetailsCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/MuonFeatureDetailsCnv.h index 87e1f9631860..a81ab4eae8b2 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/MuonFeatureDetailsCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/MuonFeatureDetailsCnv.h @@ -24,12 +24,11 @@ class MuonFeatureDetailsCnv : public MuonFeatureDetailsCnvBase { friend class CnvFactory<MuonFeatureDetailsCnv>; - protected: public: MuonFeatureDetailsCnv(ISvcLocator *svcloc); -protected: ~MuonFeatureDetailsCnv(); +protected: virtual MuonFeatureDetails_PERS *createPersistent(MuonFeatureDetails *transObj); virtual MuonFeatureDetails *createTransient(); }; diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/RingerRingsCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/RingerRingsCnv.h index 9fa357f46339..0e35b4510b70 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/RingerRingsCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/RingerRingsCnv.h @@ -35,9 +35,9 @@ class RingerRingsCnv : public T_AthenaPoolCustomCnv<RingerRings, RingerRings_PE public: RingerRingsCnv(ISvcLocator* svcloc); -protected: ~RingerRingsCnv(); +protected: RingerRings_PERS* createPersistent(RingerRings* transCont); RingerRings* createTransient (); diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TileMuFeatureCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TileMuFeatureCnv.h index a5a3752855ce..574c6cf2ad50 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TileMuFeatureCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TileMuFeatureCnv.h @@ -34,12 +34,11 @@ class TileMuFeatureCnv : public TileMuFeatureCnvBase { friend class CnvFactory<TileMuFeatureCnv>; - protected: public: TileMuFeatureCnv(ISvcLocator *svcloc); -protected: ~TileMuFeatureCnv(); +protected: virtual TileMuFeature_PERS *createPersistent(TileMuFeature *transObj); virtual TileMuFeature *createTransient(); }; diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigCompositeCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigCompositeCnv.h index 86296e21e353..e32f08fe1aa6 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigCompositeCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigCompositeCnv.h @@ -29,13 +29,11 @@ class TrigCompositeCnv : public T_AthenaPoolCustomCnv<TrigComposite, TrigCompos friend class CnvFactory<TrigCompositeCnv>; - protected: - public: TrigCompositeCnv(ISvcLocator* svcloc); -protected: ~TrigCompositeCnv(); +protected: TrigComposite_PERS* createPersistent(TrigComposite* transCont); TrigComposite* createTransient (); diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigDecisionCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigDecisionCnv.h index 05f0c721a01d..77584f8d5778 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigDecisionCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigDecisionCnv.h @@ -42,12 +42,11 @@ class TrigDecisionCnv : public TrigDecisionCnvBase { friend class CnvFactory<TrigDecisionCnv >; - protected: public: TrigDecisionCnv (ISvcLocator* svcloc); -protected: ~TrigDecisionCnv (); +protected: virtual TrigDecision_PERS* createPersistent (TrigDec::TrigDecision* transCont); virtual TrigDec::TrigDecision* createTransient (); }; diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigEFBjetContainerCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigEFBjetContainerCnv.h index 30f8d12e9035..37d438f7b5ca 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigEFBjetContainerCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigEFBjetContainerCnv.h @@ -46,9 +46,9 @@ class TrigEFBjetContainerCnv : public TrigEFBjetContainerCnvBase public: TrigEFBjetContainerCnv( ISvcLocator *svcloc ); -protected: ~TrigEFBjetContainerCnv(); +protected: virtual TrigEFBjetContainer_PERS *createPersistent( TrigEFBjetContainer *transObj); virtual TrigEFBjetContainer *createTransient(); diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigEFBphysContainerCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigEFBphysContainerCnv.h index 869ebe281417..b02187174217 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigEFBphysContainerCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigEFBphysContainerCnv.h @@ -46,9 +46,9 @@ class TrigEFBphysContainerCnv : public TrigEFBphysContainerCnvBase public: TrigEFBphysContainerCnv( ISvcLocator *svcloc ); -protected: ~TrigEFBphysContainerCnv(); +protected: virtual TrigEFBphysContainer_PERS *createPersistent( TrigEFBphysContainer *transObj); virtual TrigEFBphysContainer *createTransient(); diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigEMClusterCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigEMClusterCnv.h index ed72c1126602..72c32fdb82f2 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigEMClusterCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigEMClusterCnv.h @@ -33,13 +33,11 @@ class TrigEMClusterCnv : public T_AthenaPoolCustomCnv<TrigEMCluster, TrigEMClus friend class CnvFactory<TrigEMClusterCnv>; - protected: - public: TrigEMClusterCnv(ISvcLocator* svcloc); -protected: ~TrigEMClusterCnv(); +protected: TrigEMCluster_PERS* createPersistent(TrigEMCluster* transCont); TrigEMCluster* createTransient (); diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigHisto1DCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigHisto1DCnv.h index 63fe0ef1def2..87634dc12a0a 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigHisto1DCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigHisto1DCnv.h @@ -30,12 +30,11 @@ typedef T_AthenaPoolCustomCnv<TrigHisto1D, TrigHisto1D_PERS > TrigHisto1DCnvBase class TrigHisto1DCnv : public TrigHisto1DCnvBase { friend class CnvFactory<TrigHisto1DCnv>; - protected: public: TrigHisto1DCnv(ISvcLocator* svcloc); -protected: ~TrigHisto1DCnv(); +protected: TrigHisto1D_PERS* createPersistent(TrigHisto1D* transObj); TrigHisto1D* createTransient(); }; diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigHisto2DCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigHisto2DCnv.h index b15e8da75cbd..9fb6a271f89f 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigHisto2DCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigHisto2DCnv.h @@ -29,12 +29,11 @@ typedef T_AthenaPoolCustomCnv<TrigHisto2D, TrigHisto2D_PERS > TrigHisto2DCnvBase class TrigHisto2DCnv : public TrigHisto2DCnvBase { friend class CnvFactory<TrigHisto2DCnv>; - protected: public: TrigHisto2DCnv(ISvcLocator* svcloc); -protected: ~TrigHisto2DCnv(); +protected: TrigHisto2D_PERS* createPersistent(TrigHisto2D* transObj); TrigHisto2D* createTransient(); }; diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigInDetTrackCollectionCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigInDetTrackCollectionCnv.h index 17dc2d42a8ac..697044dfa60f 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigInDetTrackCollectionCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigInDetTrackCollectionCnv.h @@ -34,13 +34,11 @@ class TrigInDetTrackCollectionCnv : public TrigInDetTrackCollectionCnvBase{ friend class CnvFactory<TrigInDetTrackCollectionCnv>; - protected: - public: TrigInDetTrackCollectionCnv(ISvcLocator* svcloc); -protected: ~TrigInDetTrackCollectionCnv(); +protected: virtual TrigInDetTrackCollection_PERS* createPersistent(TrigInDetTrackCollection* transObj); virtual TrigInDetTrackCollection* createTransient (); diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigL2BphysContainerCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigL2BphysContainerCnv.h index 435e542e1f97..3be870193736 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigL2BphysContainerCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigL2BphysContainerCnv.h @@ -48,10 +48,9 @@ class TrigL2BphysContainerCnv : public TrigL2BphysContainerCnvBase public: TrigL2BphysContainerCnv( ISvcLocator *svcloc ); -protected: - ~TrigL2BphysContainerCnv(); +protected: virtual TrigL2BphysContainer_PERS *createPersistent( TrigL2BphysContainer *transObj); virtual TrigL2BphysContainer *createTransient(); diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMissingETCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMissingETCnv.h index b32f1cdb5ea1..26e4dcc68382 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMissingETCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMissingETCnv.h @@ -38,9 +38,9 @@ class TrigMissingETCnv : public TrigMissingETCnvBase { protected: public: TrigMissingETCnv(ISvcLocator *svcloc); -protected: ~TrigMissingETCnv(); +protected: virtual TrigMissingET_PERS *createPersistent(TrigMissingET *transObj); virtual TrigMissingET *createTransient(); }; diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMonConfigCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMonConfigCnv.h index 076bcfc9f778..99556ebaac4d 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMonConfigCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMonConfigCnv.h @@ -23,9 +23,9 @@ class TrigMonConfigCnv : public T_AthenaPoolCustomCnv<TrigMonConfig, TrigMonConf public: TrigMonConfigCnv(ISvcLocator* svcloc); -protected: virtual ~TrigMonConfigCnv(); +protected: TrigMonConfig_PERS* createPersistent(TrigMonConfig* transObj); TrigMonConfig* createTransient (); diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMonConfigCollectionCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMonConfigCollectionCnv.h index 8770c6f45d9a..db129c58aa0a 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMonConfigCollectionCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMonConfigCollectionCnv.h @@ -23,10 +23,9 @@ class TrigMonConfigCollectionCnv public: TrigMonConfigCollectionCnv(ISvcLocator* svcloc); - - protected: virtual ~TrigMonConfigCollectionCnv(); + protected: TrigMonConfigCollection_PERS* createPersistent(TrigMonConfigCollection* transObj); TrigMonConfigCollection* createTransient (); diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMonEventCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMonEventCnv.h index 2e6123c35656..e3d3131617a2 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMonEventCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMonEventCnv.h @@ -23,9 +23,9 @@ class TrigMonEventCnv : public T_AthenaPoolCustomCnv<TrigMonEvent, TrigMonEvent_ public: TrigMonEventCnv(ISvcLocator* svcloc); -protected: virtual ~TrigMonEventCnv(); +protected: TrigMonEvent_PERS* createPersistent(TrigMonEvent* transObj); TrigMonEvent* createTransient (); diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMonEventCollectionCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMonEventCollectionCnv.h index 661e82b90a74..b659e7c7ee90 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMonEventCollectionCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMonEventCollectionCnv.h @@ -23,10 +23,9 @@ class TrigMonEventCollectionCnv public: TrigMonEventCollectionCnv(ISvcLocator* svcloc); - - protected: virtual ~TrigMonEventCollectionCnv(); + protected: TrigMonEventCollection_PERS* createPersistent(TrigMonEventCollection* transObj); TrigMonEventCollection* createTransient (); diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMuonClusterFeatureContainerCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMuonClusterFeatureContainerCnv.h index 2bdafa5c2181..ba786abfb7cb 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMuonClusterFeatureContainerCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMuonClusterFeatureContainerCnv.h @@ -43,13 +43,11 @@ class TrigMuonClusterFeatureContainerCnv : public TrigMuonClusterFeatureContaine friend class CnvFactory<TrigMuonClusterFeatureContainerCnv>; - protected: - public: TrigMuonClusterFeatureContainerCnv( ISvcLocator *svcloc ); -protected: ~TrigMuonClusterFeatureContainerCnv(); +protected: virtual TrigMuonClusterFeatureContainer_PERS *createPersistent( TrigMuonClusterFeatureContainer *transObj); virtual TrigMuonClusterFeatureContainer *createTransient(); diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMuonEFInfoContainerCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMuonEFInfoContainerCnv.h index 6720ef654826..842ac0c3b67c 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMuonEFInfoContainerCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigMuonEFInfoContainerCnv.h @@ -35,13 +35,11 @@ class TrigMuonEFInfoContainerCnv : public TrigMuonEFInfoContainerCnvBase{ friend class CnvFactory<TrigMuonEFInfoContainerCnv>; - protected: - public: TrigMuonEFInfoContainerCnv( ISvcLocator *svcloc ); -protected: ~TrigMuonEFInfoContainerCnv(); +protected: virtual TrigMuonEFInfoContainer_PERS *createPersistent( TrigMuonEFInfoContainer *transObj); virtual TrigMuonEFInfoContainer *createTransient(); @@ -57,4 +55,4 @@ protected: }; -#endif \ No newline at end of file +#endif diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigRNNOutputCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigRNNOutputCnv.h index 941761a27500..86b6890cff5d 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigRNNOutputCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigRNNOutputCnv.h @@ -36,9 +36,9 @@ class TrigRNNOutputCnv : public T_AthenaPoolCustomCnv<TrigRNNOutput, TrigRNNOut public: TrigRNNOutputCnv(ISvcLocator* svcloc); -protected: ~TrigRNNOutputCnv(); +protected: TrigRNNOutput_PERS* createPersistent(TrigRNNOutput* transCont); TrigRNNOutput* createTransient (); diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigSpacePointCountsCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigSpacePointCountsCnv.h index 829509f4b2fd..4743556760fe 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigSpacePointCountsCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigSpacePointCountsCnv.h @@ -34,12 +34,11 @@ class TrigSpacePointCountsCnv : public TrigSpacePointCountsCnvBase { virtual StatusCode initialize(); - protected: public: TrigSpacePointCountsCnv(ISvcLocator *svcloc); -protected: ~TrigSpacePointCountsCnv(); +protected: virtual TrigSpacePointCounts_PERS *createPersistent(TrigSpacePointCounts *transObj); virtual TrigSpacePointCounts *createTransient(); }; diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigT2JetCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigT2JetCnv.h index 85b774584c12..60faaaca02c8 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigT2JetCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigT2JetCnv.h @@ -45,9 +45,9 @@ class TrigT2JetCnv : public TrigT2JetCnvBase public: TrigT2JetCnv( ISvcLocator *svcloc ); -protected: ~TrigT2JetCnv(); +protected: virtual TrigT2Jet_PERS *createPersistent( TrigT2Jet *transObj); virtual TrigT2Jet *createTransient(); diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigT2MbtsBitsCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigT2MbtsBitsCnv.h index 356fdb332366..d517e9287188 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigT2MbtsBitsCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigT2MbtsBitsCnv.h @@ -29,12 +29,11 @@ typedef T_AthenaPoolCustomCnv<TrigT2MbtsBits, TrigT2MbtsBits_PERS > TrigT2MbtsBi class TrigT2MbtsBitsCnv : public TrigT2MbtsBitsCnvBase { friend class CnvFactory<TrigT2MbtsBitsCnv>; - protected: public: TrigT2MbtsBitsCnv(ISvcLocator* svcloc); -protected: ~TrigT2MbtsBitsCnv(); +protected: TrigT2MbtsBits_PERS* createPersistent(TrigT2MbtsBits* transObj); TrigT2MbtsBits* createTransient(); }; diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigTauClusterCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigTauClusterCnv.h index 400420210065..4a850e5a92c8 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigTauClusterCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigTauClusterCnv.h @@ -33,12 +33,11 @@ class TrigTauClusterCnv : public T_AthenaPoolCustomCnv<TrigTauCluster, TrigTauCl friend class CnvFactory<TrigTauClusterCnv>; - protected: public: TrigTauClusterCnv(ISvcLocator* svcloc); -protected: ~TrigTauClusterCnv(); +protected: TrigTauCluster_PERS* createPersistent(TrigTauCluster* transCont); TrigTauCluster* createTransient (); diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigTauClusterDetailsCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigTauClusterDetailsCnv.h index d54d6d44d45a..0c154b2ac882 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigTauClusterDetailsCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigTauClusterDetailsCnv.h @@ -33,12 +33,11 @@ class TrigTauClusterDetailsCnv : public T_AthenaPoolCustomCnv<TrigTauClusterDeta friend class CnvFactory<TrigTauClusterDetailsCnv>; - protected: public: TrigTauClusterDetailsCnv(ISvcLocator* svcloc); -protected: ~TrigTauClusterDetailsCnv(); +protected: TrigTauClusterDetails_PERS* createPersistent(TrigTauClusterDetails* transCont); TrigTauClusterDetails* createTransient (); diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigTauCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigTauCnv.h index 9e150440559a..e6b0214472b3 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigTauCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigTauCnv.h @@ -37,9 +37,9 @@ class TrigTauCnv : public T_AthenaPoolCustomCnv<TrigTau, TrigTau_PERS > public: TrigTauCnv(ISvcLocator* svcloc); -protected: ~TrigTauCnv(); +protected: TrigTau_PERS* createPersistent(TrigTau* transCont); TrigTau* createTransient (); diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigTrackCountsCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigTrackCountsCnv.h index c82ed2ceec97..6978e95a08b5 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigTrackCountsCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigTrackCountsCnv.h @@ -33,12 +33,11 @@ class TrigTrackCountsCnv : public TrigTrackCountsCnvBase { friend class CnvFactory<TrigTrackCountsCnv>; - protected: public: TrigTrackCountsCnv(ISvcLocator *svcloc); -protected: ~TrigTrackCountsCnv(); +protected: virtual TrigTrackCounts_PERS *createPersistent(TrigTrackCounts *transObj); virtual TrigTrackCounts *createTransient(); }; diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigTrackCountsCollectionCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigTrackCountsCollectionCnv.h index aa0271a95c00..d1d8ec9e398b 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigTrackCountsCollectionCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigTrackCountsCollectionCnv.h @@ -41,13 +41,11 @@ class TrigTrackCountsCollectionCnv : public TrigTrackCountsCollectionCnvBase friend class CnvFactory<TrigTrackCountsCollectionCnv>; - protected: - public: TrigTrackCountsCollectionCnv( ISvcLocator *svcloc ); -protected: ~TrigTrackCountsCollectionCnv(); +protected: virtual TrigTrackCountsCollection_PERS *createPersistent( TrigTrackCountsCollection *transObj); virtual TrigTrackCountsCollection *createTransient(); diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigTrtHitCountsCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigTrtHitCountsCnv.h index 09ea6a5c7bc2..d67fb05812f9 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigTrtHitCountsCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigTrtHitCountsCnv.h @@ -29,12 +29,11 @@ typedef T_AthenaPoolCustomCnv<TrigTrtHitCounts, TrigTrtHitCounts_PERS > TrigTrtH class TrigTrtHitCountsCnv : public TrigTrtHitCountsCnvBase { friend class CnvFactory<TrigTrtHitCountsCnv>; - protected: public: TrigTrtHitCountsCnv(ISvcLocator* svcloc); -protected: ~TrigTrtHitCountsCnv(); +protected: TrigTrtHitCounts_PERS* createPersistent(TrigTrtHitCounts* transObj); TrigTrtHitCounts* createTransient(); }; diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigVertexCollectionCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigVertexCollectionCnv.h index 7223eedc926f..866d248760d7 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigVertexCollectionCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigVertexCollectionCnv.h @@ -44,13 +44,11 @@ class TrigVertexCollectionCnv : public TrigVertexCollectionCnvBase friend class CnvFactory<TrigVertexCollectionCnv>; - protected: - public: TrigVertexCollectionCnv( ISvcLocator *svcloc ); -protected: ~TrigVertexCollectionCnv(); +protected: virtual TrigVertexCollection_PERS *createPersistent( TrigVertexCollection *transObj); virtual TrigVertexCollection *createTransient(); diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigVertexCountsCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigVertexCountsCnv.h index 2c2424160acd..8fcd7103c147 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigVertexCountsCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigVertexCountsCnv.h @@ -29,12 +29,11 @@ typedef T_AthenaPoolCustomCnv<TrigVertexCounts, TrigVertexCounts_PERS > TrigVert class TrigVertexCountsCnv : public TrigVertexCountsCnvBase { friend class CnvFactory<TrigVertexCountsCnv>; - protected: public: TrigVertexCountsCnv(ISvcLocator* svcloc); -protected: ~TrigVertexCountsCnv(); +protected: TrigVertexCounts_PERS* createPersistent(TrigVertexCounts* transObj); TrigVertexCounts* createTransient(); }; diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigVertexCountsCollectionCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigVertexCountsCollectionCnv.h index 5d501d1e79e2..4b837b50413b 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigVertexCountsCollectionCnv.h +++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigVertexCountsCollectionCnv.h @@ -37,13 +37,11 @@ class TrigVertexCountsCollectionCnv : public TrigVertexCountsCollectionCnvBase friend class CnvFactory<TrigVertexCountsCollectionCnv>; - protected: - public: TrigVertexCountsCollectionCnv( ISvcLocator *svcloc ); -protected: ~TrigVertexCountsCollectionCnv(); +protected: virtual TrigVertexCountsCollection_PERS *createPersistent( TrigVertexCountsCollection *transObj); virtual TrigVertexCountsCollection *createTransient(); diff --git a/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/HLTResultCnv.h b/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/HLTResultCnv.h index 54f138767b77..fd58e00d2cdf 100644 --- a/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/HLTResultCnv.h +++ b/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/HLTResultCnv.h @@ -41,14 +41,12 @@ class HLTResultCnv : public HLTResultCnvBase { friend class CnvFactory< HLTResultCnv >; - protected: - public: HLTResultCnv (ISvcLocator* svcloc); -protected: - ~HLTResultCnv(); +protected: + virtual HLTResult_PERS* createPersistent (HLT::HLTResult* transCont); virtual HLT::HLTResult* createTransient (); diff --git a/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/Lvl1ResultCnv.h b/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/Lvl1ResultCnv.h index 78dbce2eda68..459df9a44585 100644 --- a/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/Lvl1ResultCnv.h +++ b/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/Lvl1ResultCnv.h @@ -38,14 +38,12 @@ class Lvl1ResultCnv : public Lvl1ResultCnvBase { friend class CnvFactory< Lvl1ResultCnv >; - protected: - public: Lvl1ResultCnv (ISvcLocator* svcloc); -protected: - ~Lvl1ResultCnv(); +protected: + virtual Lvl1Result_PERS* createPersistent (LVL1CTP::Lvl1Result* transCont); virtual LVL1CTP::Lvl1Result* createTransient (); diff --git a/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigOperationalInfoCnv.h b/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigOperationalInfoCnv.h index 2d567c93e34c..44f0715fe0af 100644 --- a/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigOperationalInfoCnv.h +++ b/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigOperationalInfoCnv.h @@ -37,9 +37,9 @@ class TrigOperationalInfoCnv : public T_AthenaPoolCustomCnv<TrigOperationalInfo, public: TrigOperationalInfoCnv(ISvcLocator* svcloc); -protected: ~TrigOperationalInfoCnv(); +protected: TrigOperationalInfo_PERS* createPersistent(TrigOperationalInfo* transObj); TrigOperationalInfo* createTransient (); diff --git a/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigOperationalInfoCollectionCnv.h b/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigOperationalInfoCollectionCnv.h index 774218c6ec03..c187d596d879 100644 --- a/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigOperationalInfoCollectionCnv.h +++ b/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigOperationalInfoCollectionCnv.h @@ -33,13 +33,11 @@ class TrigOperationalInfoCollectionCnv : public T_AthenaPoolCustomCnv<TrigOperat friend class CnvFactory<TrigOperationalInfoCollectionCnv>; - protected: - public: TrigOperationalInfoCollectionCnv(ISvcLocator* svcloc); -protected: ~TrigOperationalInfoCollectionCnv(); +protected: TrigOperationalInfoCollection_PERS* createPersistent(TrigOperationalInfoCollection* transObj); TrigOperationalInfoCollection* createTransient (); diff --git a/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigPassBitsCnv.h b/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigPassBitsCnv.h index e9799c36ad45..b4c31761f891 100644 --- a/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigPassBitsCnv.h +++ b/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigPassBitsCnv.h @@ -36,12 +36,11 @@ class TrigPassBitsCnv : public TrigPassBitsCnvBase { friend class CnvFactory<TrigPassBitsCnv>; - protected: public: TrigPassBitsCnv(ISvcLocator *svcloc); -protected: ~TrigPassBitsCnv(); +protected: virtual TrigPassBits_PERS *createPersistent(TrigPassBits *transObj); virtual TrigPassBits *createTransient(); }; diff --git a/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigPassFlagsCnv.cxx b/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigPassFlagsCnv.cxx index 82f116395d31..c80910e8814e 100644 --- a/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigPassFlagsCnv.cxx +++ b/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigPassFlagsCnv.cxx @@ -7,7 +7,6 @@ TrigPassFlagsCnv::TrigPassFlagsCnv(ISvcLocator *svcloc): TrigPassFlagsCnvBase(svcloc) {} -TrigPassFlagsCnv::~TrigPassFlagsCnv(){} //createPersistent TrigPassFlags_PERS* TrigPassFlagsCnv::createPersistent(TrigPassFlags* transObj) { diff --git a/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigPassFlagsCnv.h b/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigPassFlagsCnv.h index b2f566a03ba4..cdfe67480eeb 100644 --- a/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigPassFlagsCnv.h +++ b/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigPassFlagsCnv.h @@ -36,12 +36,10 @@ class TrigPassFlagsCnv : public TrigPassFlagsCnvBase { friend class CnvFactory<TrigPassFlagsCnv>; - protected: public: TrigPassFlagsCnv(ISvcLocator *svcloc); -protected: - ~TrigPassFlagsCnv(); +protected: virtual TrigPassFlags_PERS *createPersistent(TrigPassFlags *transObj); virtual TrigPassFlags *createTransient(); }; diff --git a/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigRoiDescriptorCnv.h b/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigRoiDescriptorCnv.h index 3c73f7d18dea..f02baeda0939 100644 --- a/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigRoiDescriptorCnv.h +++ b/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigRoiDescriptorCnv.h @@ -34,13 +34,11 @@ class TrigRoiDescriptorCnv : public T_AthenaPoolCustomCnv<TrigRoiDescriptor, Tri friend class CnvFactory<TrigRoiDescriptorCnv>; - protected: - public: TrigRoiDescriptorCnv(ISvcLocator* svcloc); -protected: ~TrigRoiDescriptorCnv(); +protected: TrigRoiDescriptor_PERS* createPersistent(TrigRoiDescriptor* transObj); TrigRoiDescriptor* createTransient (); diff --git a/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigRoiDescriptorCollectionCnv.h b/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigRoiDescriptorCollectionCnv.h index f81814454b1d..bb057014aa5f 100644 --- a/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigRoiDescriptorCollectionCnv.h +++ b/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/TrigRoiDescriptorCollectionCnv.h @@ -35,13 +35,11 @@ class TrigRoiDescriptorCollectionCnv : public T_AthenaPoolCustomCnv<TrigRoiDescr friend class CnvFactory<TrigRoiDescriptorCollectionCnv>; - protected: - public: TrigRoiDescriptorCollectionCnv(ISvcLocator* svcloc); -protected: ~TrigRoiDescriptorCollectionCnv(); +protected: TrigRoiDescriptorCollection_PERS* createPersistent(TrigRoiDescriptorCollection* transObj); TrigRoiDescriptorCollection* createTransient (); diff --git a/Trigger/TrigSteer/TrigHLTResultByteStream/TrigHLTResultByteStream/HLTResultByteStreamCnv.h b/Trigger/TrigSteer/TrigHLTResultByteStream/TrigHLTResultByteStream/HLTResultByteStreamCnv.h index 366ed5c17523..a503fd99c27f 100755 --- a/Trigger/TrigSteer/TrigHLTResultByteStream/TrigHLTResultByteStream/HLTResultByteStreamCnv.h +++ b/Trigger/TrigSteer/TrigHLTResultByteStream/TrigHLTResultByteStream/HLTResultByteStreamCnv.h @@ -25,6 +25,8 @@ #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" #include "ByteStreamCnvSvcBase/ByteStreamAddress.h" +#include "ByteStreamCnvSvcBase/IByteStreamEventAccess.h" +#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h" #include <string> @@ -32,8 +34,6 @@ class DataObject; class StatusCode; class IAddressCreator; -class IROBDataProviderSvc; -class IByteStreamEventAccess; class MsgStream; diff --git a/Trigger/TrigSteer/TrigSteering/TrigSteering/TrigSteer.h b/Trigger/TrigSteer/TrigSteering/TrigSteering/TrigSteer.h index c04bb5488334..7d27e2fe44fc 100755 --- a/Trigger/TrigSteer/TrigSteering/TrigSteering/TrigSteer.h +++ b/Trigger/TrigSteer/TrigSteering/TrigSteering/TrigSteer.h @@ -31,6 +31,7 @@ #include "TrigTimeAlgs/CookTimer.h" #include "TrigConfHLTData/HLTSequence.h" +#include "TrigNavigation/Navigation.h" #include "AthenaBaseComps/AthAlgorithm.h" #include "GaudiKernel/ToolHandle.h" diff --git a/Trigger/TrigT1/L1Topo/L1TopoMonitoring/src/L1TopoTestAlg.h b/Trigger/TrigT1/L1Topo/L1TopoMonitoring/src/L1TopoTestAlg.h index 9473a4836353..1bd84d7f0dc0 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoMonitoring/src/L1TopoTestAlg.h +++ b/Trigger/TrigT1/L1Topo/L1TopoMonitoring/src/L1TopoTestAlg.h @@ -6,11 +6,11 @@ #define L1TOPOMONITORING_L1TOPOTESTALG_H 1 #include "AthenaBaseComps/AthAlgorithm.h" +#include "TrigConfInterfaces/IL1TopoConfigSvc.h" - -namespace TrigConf { - class IL1TopoConfigSvc; -} +// namespace TrigConf { +// class IL1TopoConfigSvc; +// } class L1TopoTestAlg: public AthAlgorithm { public: diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMCPHitsCollectionCnv.h b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMCPHitsCollectionCnv.h index 72b57c0ebe98..52984913a053 100644 --- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMCPHitsCollectionCnv.h +++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMCPHitsCollectionCnv.h @@ -32,8 +32,6 @@ public: {} protected: - ~CMMCPHitsCollectionCnv() {} - virtual CMMCPHitsCollection_PERS* createPersistent (CMMCPHitsCollection* transCont); virtual CMMCPHitsCollection* createTransient (); diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMEtSumsCollectionCnv.h b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMEtSumsCollectionCnv.h index 39436cbe5bd4..9deb75e80c55 100644 --- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMEtSumsCollectionCnv.h +++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMEtSumsCollectionCnv.h @@ -32,8 +32,6 @@ public: {} protected: - - ~CMMEtSumsCollectionCnv() {} virtual CMMEtSumsCollection_PERS* createPersistent (CMMEtSumsCollection* transCont); virtual CMMEtSumsCollection* createTransient (); diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMJetHitsCollectionCnv.h b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMJetHitsCollectionCnv.h index 25cb9e411669..078f1ace1edd 100644 --- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMJetHitsCollectionCnv.h +++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMJetHitsCollectionCnv.h @@ -32,8 +32,6 @@ public: {} protected: - - ~CMMJetHitsCollectionCnv() {} virtual CMMJetHitsCollection_PERS* createPersistent (CMMJetHitsCollection* transCont); virtual CMMJetHitsCollection* createTransient (); diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMRoICnv.h b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMRoICnv.h index 78320f954666..369d7b741e12 100644 --- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMRoICnv.h +++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMRoICnv.h @@ -34,8 +34,6 @@ public: {} protected: - - ~CMMRoICnv() {} virtual CMMRoI_PERS* createPersistent (LVL1::CMMRoI* transCont); virtual LVL1::CMMRoI* createTransient (); diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXCPHitsCollectionCnv.h b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXCPHitsCollectionCnv.h index 30c117096d56..d670739b79e7 100644 --- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXCPHitsCollectionCnv.h +++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXCPHitsCollectionCnv.h @@ -33,8 +33,6 @@ public: {} protected: - - ~CMXCPHitsCollectionCnv() {} virtual CMXCPHitsCollection_PERS* createPersistent (CMXCPHitsCollection* transCont); virtual CMXCPHitsCollection* createTransient (); diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXCPTobCollectionCnv.h b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXCPTobCollectionCnv.h index dd2900e7dd3a..6201e8a3edf5 100644 --- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXCPTobCollectionCnv.h +++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXCPTobCollectionCnv.h @@ -33,8 +33,6 @@ public: {} protected: - - ~CMXCPTobCollectionCnv() {} virtual CMXCPTobCollection_PERS* createPersistent (CMXCPTobCollection* transCont); virtual CMXCPTobCollection* createTransient (); diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXEtSumsCollectionCnv.h b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXEtSumsCollectionCnv.h index 84ecbe143c8b..987e579b0c33 100644 --- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXEtSumsCollectionCnv.h +++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXEtSumsCollectionCnv.h @@ -33,8 +33,6 @@ public: {} protected: - - ~CMXEtSumsCollectionCnv() {} virtual CMXEtSumsCollection_PERS* createPersistent (CMXEtSumsCollection* transCont); virtual CMXEtSumsCollection* createTransient (); diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXJetHitsCollectionCnv.h b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXJetHitsCollectionCnv.h index 3910476de68b..c80918b48423 100644 --- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXJetHitsCollectionCnv.h +++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXJetHitsCollectionCnv.h @@ -33,8 +33,6 @@ public: {} protected: - - ~CMXJetHitsCollectionCnv() {} virtual CMXJetHitsCollection_PERS* createPersistent (CMXJetHitsCollection* transCont); virtual CMXJetHitsCollection* createTransient (); diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXJetTobCollectionCnv.h b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXJetTobCollectionCnv.h index 7a3025decede..c71e09d83677 100644 --- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXJetTobCollectionCnv.h +++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXJetTobCollectionCnv.h @@ -33,8 +33,6 @@ public: {} protected: - - ~CMXJetTobCollectionCnv() {} virtual CMXJetTobCollection_PERS* createPersistent (CMXJetTobCollection* transCont); virtual CMXJetTobCollection* createTransient (); diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXRoICnv.h b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXRoICnv.h index df070d2d880f..d603c74cf317 100644 --- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXRoICnv.h +++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXRoICnv.h @@ -33,8 +33,6 @@ public: {} protected: - - ~CMXRoICnv() {} virtual CMXRoI_PERS* createPersistent (LVL1::CMXRoI* transCont); virtual LVL1::CMXRoI* createTransient (); diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMHitsCollectionCnv.h b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMHitsCollectionCnv.h index 33de0b1e9ca1..34d04eca5676 100644 --- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMHitsCollectionCnv.h +++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMHitsCollectionCnv.h @@ -33,8 +33,6 @@ public: {} protected: - - ~CPMHitsCollectionCnv() {} virtual CPMHitsCollection_PERS* createPersistent (CPMHitsCollection* transCont); virtual CPMHitsCollection* createTransient (); diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMRoICollectionCnv.h b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMRoICollectionCnv.h index 19bb0e9aaac5..e2880197ffc8 100644 --- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMRoICollectionCnv.h +++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMRoICollectionCnv.h @@ -33,8 +33,6 @@ public: {} protected: - - ~CPMRoICollectionCnv() {} virtual CPMRoICollection_PERS* createPersistent (CPMRoICollection* transCont); virtual CPMRoICollection* createTransient (); diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMTobRoICollectionCnv.h b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMTobRoICollectionCnv.h index bfd55559b494..8242a053210b 100644 --- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMTobRoICollectionCnv.h +++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMTobRoICollectionCnv.h @@ -33,8 +33,6 @@ public: {} protected: - - ~CPMTobRoICollectionCnv() {} virtual CPMTobRoICollection_PERS* createPersistent (CPMTobRoICollection* transCont); virtual CPMTobRoICollection* createTransient (); diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMTowerCollectionCnv.h b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMTowerCollectionCnv.h index b9de36988f66..4d107c15578c 100644 --- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMTowerCollectionCnv.h +++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMTowerCollectionCnv.h @@ -34,8 +34,6 @@ public: protected: - ~CPMTowerCollectionCnv() {} - virtual CPMTowerCollection_PERS* createPersistent (CPMTowerCollection* transCont); virtual CPMTowerCollection* createTransient (); diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMEtSumsCollectionCnv.h b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMEtSumsCollectionCnv.h index 14d6b2539500..ce21a8a22795 100644 --- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMEtSumsCollectionCnv.h +++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMEtSumsCollectionCnv.h @@ -33,8 +33,6 @@ public: {} protected: - - ~JEMEtSumsCollectionCnv() {} virtual JEMEtSumsCollection_PERS* createPersistent (JEMEtSumsCollection* transCont); virtual JEMEtSumsCollection* createTransient (); diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMHitsCollectionCnv.h b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMHitsCollectionCnv.h index f7dbdfd25c26..b32842c5f0fd 100644 --- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMHitsCollectionCnv.h +++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMHitsCollectionCnv.h @@ -34,8 +34,6 @@ public: protected: - ~JEMHitsCollectionCnv() {} - virtual JEMHitsCollection_PERS* createPersistent (JEMHitsCollection* transCont); virtual JEMHitsCollection* createTransient (); diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMRoICollectionCnv.h b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMRoICollectionCnv.h index 528c05dd92a3..8f86a0543af5 100644 --- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMRoICollectionCnv.h +++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMRoICollectionCnv.h @@ -33,8 +33,6 @@ public: {} protected: - - ~JEMRoICollectionCnv() {} virtual JEMRoICollection_PERS* createPersistent (JEMRoICollection* transCont); virtual JEMRoICollection* createTransient (); diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMTobRoICollectionCnv.h b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMTobRoICollectionCnv.h index 4dade1dc789d..caed626a5a4b 100644 --- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMTobRoICollectionCnv.h +++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMTobRoICollectionCnv.h @@ -34,8 +34,6 @@ public: protected: - ~JEMTobRoICollectionCnv() {} - virtual JEMTobRoICollection_PERS* createPersistent (JEMTobRoICollection* transCont); virtual JEMTobRoICollection* createTransient (); diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JetElementCollectionCnv.h b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JetElementCollectionCnv.h index e9cba0dd9ebb..f46e83bf3b8d 100644 --- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JetElementCollectionCnv.h +++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JetElementCollectionCnv.h @@ -33,9 +33,7 @@ public: {} protected: - - ~JetElementCollectionCnv() {} - + virtual JetElementCollection_PERS* createPersistent (JetElementCollection* transCont); virtual JetElementCollection* createTransient (); diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/RODHeaderCollectionCnv.h b/Trigger/TrigT1/TrigT1EventAthenaPool/src/RODHeaderCollectionCnv.h index ceac1a8184a7..a39cfed6c501 100644 --- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/RODHeaderCollectionCnv.h +++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/RODHeaderCollectionCnv.h @@ -34,8 +34,6 @@ public: protected: - ~RODHeaderCollectionCnv() {} - virtual RODHeaderCollection_PERS* createPersistent (RODHeaderCollection* transCont); virtual RODHeaderCollection* createTransient (); diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/TriggerTowerCollectionCnv.h b/Trigger/TrigT1/TrigT1EventAthenaPool/src/TriggerTowerCollectionCnv.h index 31b3ebe3c56a..ceba4b85b273 100644 --- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/TriggerTowerCollectionCnv.h +++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/TriggerTowerCollectionCnv.h @@ -34,8 +34,6 @@ public: protected: - ~TriggerTowerCollectionCnv() {} - virtual TriggerTowerCollection_PERS* createPersistent (TriggerTowerCollection* transCont); virtual TriggerTowerCollection* createTransient (); diff --git a/Trigger/TrigT1/TrigT1TRT/TrigT1TRT/TrigT1TRT.h b/Trigger/TrigT1/TrigT1TRT/TrigT1TRT/TrigT1TRT.h index 51770aca2254..6cabb026f1cf 100644 --- a/Trigger/TrigT1/TrigT1TRT/TrigT1TRT/TrigT1TRT.h +++ b/Trigger/TrigT1/TrigT1TRT/TrigT1TRT/TrigT1TRT.h @@ -10,15 +10,12 @@ #include "InDetRawData/TRT_RDO_Container.h" #include "InDetReadoutGeometry/TRT_DetectorManager.h" +#include "TrigConfInterfaces/ILVL1ConfigSvc.h" +#include "TRT_ConditionsServices/ITRT_StrawNeighbourSvc.h" #include <string> #include <vector> -namespace TrigConf{ - class ILVL1ConfigSvc; -} -class ITRT_StrawNeighbourSvc; - namespace LVL1 { class TrigT1TRT : public AthAlgorithm { public: diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/SCT_ClusterCacheTool.h b/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/SCT_ClusterCacheTool.h index 07fead8bd8cc..462d6f76c18c 100755 --- a/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/SCT_ClusterCacheTool.h +++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/TrigOnlineSpacePointTool/SCT_ClusterCacheTool.h @@ -13,6 +13,7 @@ #include "InDetPrepRawData/SCT_ClusterContainer.h" #include "InDetRawData/SCT_RDO_Container.h" #include "SiClusterizationTool/ISCT_ClusteringTool.h" +#include "SCT_RawDataByteStreamCnv/ISCT_RodDecoder.h" #include "TrigOnlineSpacePointTool/FastSCT_RodDecoder.h" #include "Identifier/IdContext.h" @@ -23,7 +24,6 @@ class FastSCT_Clusterization; class ISCT_CablingSvc; -class ISCT_RodDecoder; class TrigTimer; typedef OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment ROBF ; diff --git a/Trigger/TrigTruthEvent/TrigTruthEventAthenaPool/src/TrigInDetTrackTruthMapCnv.h b/Trigger/TrigTruthEvent/TrigTruthEventAthenaPool/src/TrigInDetTrackTruthMapCnv.h index 979c700457a4..3cf689380641 100644 --- a/Trigger/TrigTruthEvent/TrigTruthEventAthenaPool/src/TrigInDetTrackTruthMapCnv.h +++ b/Trigger/TrigTruthEvent/TrigTruthEventAthenaPool/src/TrigInDetTrackTruthMapCnv.h @@ -42,13 +42,11 @@ class TrigInDetTrackTruthMapCnv : public TrigInDetTrackTruthMapCnvBase virtual StatusCode initialize(); - protected: - public: TrigInDetTrackTruthMapCnv(ISvcLocator* svcloc); -protected: ~TrigInDetTrackTruthMapCnv(); +protected: virtual TrigInDetTrackTruthMap_PERS* createPersistent(TrigInDetTrackTruthMap* transObj); virtual TrigInDetTrackTruthMap* createTransient (); diff --git a/graphics/JiveXML/JiveXML/AlgoJiveXML.h b/graphics/JiveXML/JiveXML/AlgoJiveXML.h index 650fb58925b0..63d52672a67a 100755 --- a/graphics/JiveXML/JiveXML/AlgoJiveXML.h +++ b/graphics/JiveXML/JiveXML/AlgoJiveXML.h @@ -9,6 +9,7 @@ #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" #include "GaudiKernel/MsgStream.h" +#include "JiveXML/IDataRetriever.h" #include <vector> @@ -16,7 +17,7 @@ class StoreGateSvc; namespace JiveXML{ - class IDataRetriever; + // class IDataRetriever; class IFormatTool; class IStreamTool; } -- GitLab From 2cb194c48aab029c6453968fab7527ff667ad4bd Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Sat, 21 Jul 2018 19:33:26 +0200 Subject: [PATCH 561/562] TestTools: Fix extrapatterns argument to post.sh. Last change broke the extrapatterns functionality of post.sh by appending a spurious space to the pattern. Fix. Former-commit-id: 44ac2b96696ef32de701af907ebeedac33f9b6c5 --- AtlasTest/TestTools/share/post.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AtlasTest/TestTools/share/post.sh b/AtlasTest/TestTools/share/post.sh index 880a44c976fd..0e2cf33da04c 100755 --- a/AtlasTest/TestTools/share/post.sh +++ b/AtlasTest/TestTools/share/post.sh @@ -33,7 +33,7 @@ pat="$2 $3" if [[ "$pat" = "-s "* ]]; then selectpatterns=`echo "$pat" | sed 's/-s\s*//'` else - extrapatterns="$pat" + extrapatterns="$2" fi #verbose="1" -- GitLab From 6cabf7ab31ff36569dcc6ae10374a33bf8f819e9 Mon Sep 17 00:00:00 2001 From: John Chapman <jchapman@cern.ch> Date: Sat, 21 Jul 2018 22:15:19 +0200 Subject: [PATCH 562/562] Fix failure of MergeCalibHitsTool in the case where some CaloCalibrationHitContainers are missing After the last rewrite of this code, handling of the case where some `CaloCalibrationHitContainers` are mising was accidentally lost. This change restores the previous behaviour. Should fix ATLASSIM-3790 and ATLASSIM-3794, Former-commit-id: a84d3afa98589d30f81427885026a0486ca16220 --- .../G4Utilities/MCTruthSimAlgs/src/MergeCalibHitsTool.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeCalibHitsTool.cxx b/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeCalibHitsTool.cxx index 55f73b931aef..39430814e52b 100644 --- a/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeCalibHitsTool.cxx +++ b/Simulation/G4Utilities/MCTruthSimAlgs/src/MergeCalibHitsTool.cxx @@ -83,9 +83,9 @@ StatusCode MergeCalibHitsTool::processBunchXing(int bunchXing, ATH_MSG_VERBOSE ( " Bunch Crossing: " <<bunchXing << ". Process CalibrationHit container " << m_CalibrationHitContainer[iHitContainer] ); const CaloCalibrationHitContainer* hitCont; if (!m_pMergeSvc->retrieveSingleSubEvtData(m_CalibrationHitContainer[iHitContainer], hitCont, - bunchXing, iEvt).isSuccess()){ - ATH_MSG_ERROR("CaloCalibrationHitContainer not found for event key " << m_CalibrationHitContainer[iHitContainer]); - return StatusCode::FAILURE; + bunchXing, iEvt).isSuccess()){ + ATH_MSG_VERBOSE("CaloCalibrationHitContainer not found for event key " << m_CalibrationHitContainer[iHitContainer]); + continue; } //if this is the first SubEvent for this Event then create the hitContainers; -- GitLab